Re: A86: Learning ASM by A Simple Method
[Prev][Next][Index][Thread]
Re: A86: Learning ASM by A Simple Method
In a message dated 4/21/99 23:06:07 Eastern Daylight Time, ieatlint@home.com
writes:
> you should also concetrate on more useful ROM call's like _getky or _getkey,
> and such, I also suggest learning a little more asm before writing a
> tutorial...
> here is quick program that will wait for enter to be pressed then exit:
> init:
> call _clrLCD ;clears lcd
> call _runindicoff ;turns run indicator off
> Start:
> call _getky ;get key ROM call
> cp K_ENTER ;check for zero flag set on ENTER
> jr z,Exit ;if it is jump to Exit
> jr Start ;if not loop back to start
> Exit:
> call _runindicon ;turns run indicator back on
> ret ;end of program
how about this?
call _clrScrn
call _rundindicoff
getkey:
call GET_KEY
cp K_ENTER
jr nz,getkey
ret
you NEVER need to call _runindicon at the end of a program, btw
Follow-Ups: