[A83] Re: Getkey loop
[Prev][Next][Index][Thread]
[A83] Re: Getkey loop
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)
> >
References: