|
-
May 16th, 2007, 12:26 PM
#1
Thread Starter
Lively Member
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
Last edited by stettybet0; May 16th, 2007 at 12:31 PM.
-
May 22nd, 2007, 02:01 PM
#2
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.
The most difficult part of developing a program is understanding the problem.
The second most difficult part is deciding how you're going to solve the problem.
Actually writing the program (translating your solution into some computer language) is the easiest part.
Please indent your code and use [HIGHLIGHT="VB"] [/HIGHLIGHT] tags around it to make it easier to read.
Please Help Us To Save Ana
-
Oct 27th, 2007, 06:36 AM
#3
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.
I don't live here any more.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|