[A83] Re: A small thing I found With the Getcsc code you gave me Weiss


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

[A83] Re: A small thing I found With the Getcsc code you gave me Weiss




You ran waitkey twice.
----------------------
First you called it,
After the call waitkey line is the actual waitkey, which got executed.  Put
a ret after the call waitkey if the last thing you plan to do is call
waitkey.
------------------------
I THINK I know what you mean....instead of the old code:
***ION HEADER***
start:
	bcall(_clrlcdf)
	bcall(_homeup)
	ld hl,txt
	bcall(_puts)
	call waitkey
waitkey:
	ei
WKA_loop:
	HALT
	bcall(_getcsc)
	or a
	jr z, WKA_loop
	bcall(_clrlcdf)
	ret
.end
end

so the new code would be:
***ION HEADER***
start:
        bcall(_clrlcdf)
        bcall(_homeup)
        ld hl,txt
        bcall(_puts)
waitkey:
        ei
WKA_loop:
        HALT
        bcall(_getcsc)
        or a
        jr z,WKA_loop
        bcall(_clrlcdf)
        ret
.end
end

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