From 5ee0be8f9701ce5723d64c9323bb4349d79bd089 Mon Sep 17 00:00:00 2001 From: Tauwasser Date: Sat, 2 Jun 2018 18:30:09 +0200 Subject: home: comment print hex fns Signed-off-by: Tauwasser --- home/print_hex.asm | 10 +++++++--- 1 file 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 -- cgit v1.2.3