Re: A83: variable question


[Prev][Next][Index][Thread]

Re: A83: variable question




Ok your first problem is that when you call the B_CALL(_GetKey)command it 
destroys the hl register!  that is a major problem if you want it to 
increment hl and display it!  you could use the "bc" register instead.
                     -Patrick-



>Hello everyone,
>I am a new programmer, and I am wondering how to display a variable (I am
>making a counting program, that displays 1 2 3 4 etc.)
>
>Anyway, here is the code, so if there are any problems with it, I would
>appreciate feedback. Thanks everyone!
>
>	.nolist
>	#include "ti83asm.inc"
>	.list
>
>#define B_CALL(xxxx)	rst 28h \ .dw xxxx
>#define B_JUMP(xxxx)	call 50h \ .dw xxxx
>#define kenter		05h
>
>
>.org 9D95h
>
>Start:
>	ld	hl,0
>ST:
>	B_CALL(_getkey)
>	cp kenter
>	jp z,jjj
>	B_CALL(_clrlcdfull)
>	inc	hl
>	B_CALL(_disphl)
>	jp	nxt
>
>nxt:
>	jp	st
>jjj:
>	ret
>
>.end
>END
>
>Thanks again!
>_________________________________________________________________
>Get your FREE download of MSN Explorer at http://explorer.msn.com
>
>

_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com