ASM for a TI-83+ calculator help!
I don't know if ASM is similar for any platform, but hopefully someone will know how to help. If it helps, the TI-83+ uses a Z80 processor (the same processor in a GameBoy)
I'm looking for a way to delay the program... I need something to display on the screen for about 1 second, then go away. So, I have this:
Code:
'Stuff to display on screen
ld bc,65535
loop:
djnz loop
jr done
ret
done:
ret
Basically, it subtracts 1 from 65535 over and over until it reaches 0. Then it ends the program. That is the best way I could think of to delay the program... however, it only delays it for a very, very short time... I have to stare really hard, and I can sometimes barely see my message flash on the screen... however, as I said earlier, I need it to last for about 1 second... any ideas on how could I do this?
thanks,
stettybet0
Re: ASM for a TI-83+ calculator help!
Code:
'Stuff to display on screen
ld bc,0 ;this gives you 1 more loop than 65535
loop:
ld hl, 0 ;adjust this for 1 second
loop1:
;I forgot my Z80, but decrement hl and jnz loop1
djnz loop
;jr done ;this isn't needed
;ret ;this never gets executed
done:
ret
This will give you a maximum of 65536 times your original loop time - probably a lot longer than you want, so adjust hl to make it as long as you want.
Re: ASM for a TI-83+ calculator help!
That is going to completely thrash the CPU and waste your batteries though. You'd be better off using ticker interrupts.