summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTauwasser <Tauwasser@tauwasser.eu>2018-06-02 18:30:09 +0200
committerTauwasser <Tauwasser@tauwasser.eu>2018-06-02 22:47:58 +0200
commit5ee0be8f9701ce5723d64c9323bb4349d79bd089 (patch)
tree305d1499ab05053c4d642899ed6ed1dbdf0d64a5
parent5fb7140613d6ea00ec1964fde18418c6257c2e27 (diff)
home: comment print hex fns
Signed-off-by: Tauwasser <Tauwasser@tauwasser.eu>
-rw-r--r--home/print_hex.asm10
1 files changed, 7 insertions, 3 deletions
diff --git a/home/print_hex.asm b/home/print_hex.asm
index 3f50467..0232211 100644
--- a/home/print_hex.asm
+++ b/home/print_hex.asm
@@ -3,6 +3,7 @@ INCLUDE "constants.asm"
SECTION "Print Hexadecimal functions", ROM0[$3597]
PrintHexBytes: ; 3597 (0:3597)
+; Print c hex bytes located at de to hl
.loop
push bc
call PrintHexByte
@@ -12,19 +13,22 @@ PrintHexBytes: ; 3597 (0:3597)
ret
PrintHexByte:: ; 35a0 (0:35a0)
+; Print one hex byte located at de to hl
ld a, [de]
swap a
and $0f
- call PrintHexDigit
+ call GetHexDigit
ld [hli], a
ld a, [de]
and $0f
- call PrintHexDigit
+ call GetHexDigit
ld [hli], a
inc de
ret
-PrintHexDigit: ; 35b2 (0:35b2)
+GetHexDigit: ; 35b2 (0:35b2)
+; Get a hex digit tile number
+; in a.
ld bc, .hexDigitTable
add c
ld c, a