Re: A83: variable question


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

Re: A83: variable question




Oops i messed up...figures...The clrlcdfull destroys all of the registers so 
you you might want to push the register "hl" and then Pop it when 
needed...sorry for that mistake.  i modified the code at the bottom for you.
>
>
>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
        push hl
>>ST:
>>	B_CALL(_getkey)
>>	cp kenter
>>	jp z,jjj
>>	B_CALL(_clrlcdfull)
>>	inc	hl
        pop hl
>>	B_CALL(_disphl)
        push hl
>>	jr	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
>
>

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




Follow-Ups: