I've been working on a 3 digit display for a countdown timer and have been running into so many little issues.
BCD seems to work but have it's own problems
Does anyone have a quick routine that I can start with;
Timer = 999
Display
Decrement
Loop until 0
This is the direction I am headed...
I found this bit of code that looks like what I need, any thought?
print_number:
ld bc, #-100
call print_digit
ld 2(ix), a
ld bc, #-10
call print_digit
ld 3(ix), a
ld bc, #-1
call print_digit
ld 4(ix), a
push ix
pop hl
ld bc, #5
call WRITE_VRAM
ret
print_digit:
ld a, #'0' - 1
1$:
inc a
add hl, bc
jr c, 1$
sbc hl, bc
ret