diff options
Diffstat (limited to 'home/print_hex.asm')
-rw-r--r-- | home/print_hex.asm | 10 |
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 |