summaryrefslogtreecommitdiff
path: root/home/print_num.asm
diff options
context:
space:
mode:
authorRangi <remy.oukaour+rangi@gmail.com>2020-08-09 15:16:31 -0400
committerRangi <remy.oukaour+rangi@gmail.com>2020-08-09 15:16:31 -0400
commit9c229cde440bc6f68343331ad7bc6e1a52a742f0 (patch)
tree3bc08aaca7e09ae9933a11dbdcdc545b90d5b343 /home/print_num.asm
parenta75c6619fb933dc2d4c94b24394fb6fa9335b3b1 (diff)
Clean up some code in home/
Diffstat (limited to 'home/print_num.asm')
-rw-r--r--home/print_num.asm8
1 files changed, 4 insertions, 4 deletions
diff --git a/home/print_num.asm b/home/print_num.asm
index 3a2a2fb..c40f826 100644
--- a/home/print_num.asm
+++ b/home/print_num.asm
@@ -2,7 +2,7 @@ INCLUDE "constants.asm"
SECTION "home/print_num.asm", ROM0
-PrintNumber:: ; 3460 (0:3460)
+PrintNumber::
; function to print a number
; de = address of number in little-endian format
; hl = destination address
@@ -160,7 +160,7 @@ PrintNumber:: ; 3460 (0:3460)
pop bc
ret
-.PrintDigit: ; 3525 (0:3525)
+.PrintDigit:
ld c, $00
.loop
ldh a, [hPrintNumDivisor]
@@ -233,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?
@@ -245,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