summaryrefslogtreecommitdiff
path: root/home/print_num.asm
diff options
context:
space:
mode:
Diffstat (limited to 'home/print_num.asm')
-rw-r--r--home/print_num.asm12
1 files changed, 4 insertions, 8 deletions
diff --git a/home/print_num.asm b/home/print_num.asm
index 2a0f36f..c40f826 100644
--- a/home/print_num.asm
+++ b/home/print_num.asm
@@ -1,12 +1,8 @@
INCLUDE "constants.asm"
-; if DEBUG
SECTION "home/print_num.asm", ROM0
-; else
-; SECTION "Number Printing Functions", ROM0[$3424]
-; endc
-PrintNumber:: ; 3460 (0:3460)
+PrintNumber::
; function to print a number
; de = address of number in little-endian format
; hl = destination address
@@ -164,7 +160,7 @@ PrintNumber:: ; 3460 (0:3460)
pop bc
ret
-.PrintDigit: ; 3525 (0:3525)
+.PrintDigit:
ld c, $00
.loop
ldh a, [hPrintNumDivisor]
@@ -237,7 +233,7 @@ PrintNumber:: ; 3460 (0:3460)
ld [hl], "0"
ret
-.AdvancePointer: ; 3589 (0:3589)
+.AdvancePointer:
; increments the pointer unless leading zeroes are not being printed,
; the number is left-aligned, and no nonzero digits have been printed yet
bit 7, d ; print leading zeroes?
@@ -249,4 +245,4 @@ PrintNumber:: ; 3460 (0:3460)
ret z ; don't advance if leading digit is zero
.inc
inc hl
- ret \ No newline at end of file
+ ret