Re: A82: Newbie: How do you get a proggie to quit.
[Prev][Next][Index][Thread]
Re: A82: Newbie: How do you get a proggie to quit.
Cory Crooks wrote:
> Hi there, a newbie here, learning ASM for tetris, with a couple
> questions... first for a simple proggie to move around some text when you
> press one key, and exit out when you press another (MODE I think), why
> doesn't this code work?
>
> #include "TI82.H"
>
> .org START_ADDR
> .DB "Hello World v0.0003",0
>
> ROM_CALL(CLEARLCD)
> GRAPH_START ; BTW what does this do???
This clears the screen and sets the rom page to 4 for find_pixel. You do not
need it for your current program.
> ld B,$0F
> ld C,$0F
> jr keydloop
>
The above line is redundant.
> keydloop:
> ROM_CALL(KEY_HAND) ; Any faster procedures?
>
Do a call GET_KEY. The codes in your program are for GET_KEY, while you call
KEY_HAND.
> cp $03
> JP Z,makeblockgoover
> cp $37
> jp Z,doending
If all that is in doending is a ret, do ret Z instead of the jp.
>
Also, instead of jp, use jr's (Untill the compiler complains, then go back to
jp for that jump only). They are smaller and faster.
> JR keydloop
>
> makeblockgoover:
> inc b
> inc c
> ld ($8215),BC
> ld HL,greets
> ROM_CALL(D_ZM_STR)
> jp keydloop
>
> doending:
> ret
>
> greets: .db "Hi there",0
>
> .end
>
> I think somethings wrond with my jp's and ret's. Any help is greatly
> appreciated. Also, anyone know why there isn't a ticalc newsgroup? Or is
> there one and my news server doesn't carry it. Anyway, thanx for any help
> you can give me...
>
> -- Badman
> http://badman.home.ml.org
> Home of: Badman's Funhouse and CRC Software
> badman@velocity.net
Follow-Ups:
References: