Some shit software I was messing with on gb
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

43 lines
578 B

4 years ago
include "charmap.inc"
section "home/text.asm", rom0
print::
; hl: String
; de: Tilemap position
ld a, [hli]
cp "$"
ret z
call lcd_blank_wait ; TODO: Really hackish.
ld [de], a
inc de
jr print
print_num_3digit::
; a: Number
; de: Tilemap positon
push af
call lcd_blank_wait
xor a
ld [de], a
inc de
ld [de], a
inc de
ld [de], a
pop af
ld l, 3
.loop
ld c, 10
call divide
add "0"
call lcd_blank_wait
ld [de], a
ld a, b
and a
ret z
dec de
dec l
jr nz, .loop
ret