Re: A86: Re: Key Presses


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

Re: A86: Re: Key Presses




>From what you have there, yes you would.  And you can actually optimize the
<cp 1 \ jr c> to <or a \ jr nz> I believe.

> if you this the following code, wouldnt you also have to ld ($c008),a
after
> out(2),a?
>
> up:
>  ld a,($c008)   ;load contrast into a
>  cp 31            ;see if it's top
>  jr z,getkey     ;if it is go back to the getkey loop
>  inc a             ;if it isn't, increment it
>  jr changecont ;get another key
> down:
>  ld a,($c008)  ;"
>  cp 1             ;see if it is-
>  jr c,getkey    ;less than one, and go to getkey loop if so
>  dec a           ;else decrement it
> changecont:
>  out (2),a       ;actually change the contrast
>
>



References: