diff options
author | ISSOtm <eldredhabert0@gmail.com> | 2018-06-03 04:52:18 +0200 |
---|---|---|
committer | ISSOtm <eldredhabert0@gmail.com> | 2018-06-03 04:52:18 +0200 |
commit | bbdc4926b3ca23e6e9332c2883ea37da1be30a79 (patch) | |
tree | 4166ab85fc33b17db5d10f9828094b0a5614aa34 /home/print_hex.asm | |
parent | 65f85a7bd0f04ad83904a988a6071306888e84ff (diff) | |
parent | e51ea1412c8be994b713f9748d78ac7efb347c43 (diff) |
Merge branch 'master' of https://github.com/pret/pokegold-spaceworld
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 |