I'm converting a 16 bit number into decimal to display on four led display.
I want to check if a 16 bit value is greater 1000. Currently I have this implemented but sometimes it does not output the correct value, and I can't figure out why.
;s2 is MSB and s3 LSB
minus_100_hbyte:;Minus one hundred
COMP s2, $01
JUMP C, minus_100
ADD s6, $01 ;increment 100 counter
SUB s3, $64 ;100 in decimal
SUBC s2, $00
JUMP minus_100_hbyte
minus_100:;Minus one hundred
COMP s3, $64
JUMP C, minus10
ADD s6, $01 ;increment 100 counter
SUB s3, $64
SUBC s2, $00
JUMP minus_100