[A83] Re: Getkey loop
[Prev][Next][Index][Thread]
[A83] Re: Getkey loop
Neat! so you don't have to do a fancy subtract thing for < > tests, just do
a cp and read z and c! I think that that is not the right way to do a
keytest, however (°
>
>I just learned this a couple of weeks ago.:) Say you do a "cp b", the
>carry flag (c) is set if a<b, nc if a>=b, z if a=b, and nz if a!=b. Thanks
>to jynx in #tcpa for teaching me this. #tcpa is a great place to go for
>z80 help.
>
> >hello,
> >
> >Well, nc is for the carry flag, you want nz for the zero flag, when
>register
> >a is equal (zero difference) to kY
> >
> >I think that should work,
> > Jimmy Pardey
> >
> >
> > >X:
> > > B_Call _getkey ;Gets a keypress
> > > cp kY ;If key = [Y=]
> > > jp nc,StartMenu ;Jump to StartMenu
> > > jp X ;Repeat the loop (jump to X)
> > >
>
>
_________________________________________________________________
Join the world’s largest e-mail service with MSN Hotmail.
http://www.hotmail.com