Re: A86: call _getky usage...
[Prev][Next][Index][Thread]
Re: A86: call _getky usage...
the push bc was because of other stuff that i didn't include since it worked
already... heheh sorry for the confusion
Alan Wong / Damnation
-----Original Message-----
From: Kirk Meyer <kirk008@ibm.net>
To: assembly-86@lists.ticalc.org <assembly-86@lists.ticalc.org>
Date: Tuesday, July 21, 1998 10:21 AM
Subject: Re: A86: call _getky usage...
>
>you can't compare to the OP's using standard Z80 instructions... _getky
>returns in A anyway... all you need is:
>
>SpriteMove:
> call _getky
> cp 24
> jr z,left ;can't be call unless you PUSH AF, POP AF in routine
> cp 25
> jr z,up
> cp 26
> jr z,right
> cp 34
> jr z,down
> push bc ;huh? what's this for? this would lock up the 86 i think
> ret
>
>Roy Wong wrote:
>>
>> Ok, i got most of this already, such as _getky saves a number to OP2 and
>> stuff, but then i can't make it if then else... I tried compiling the
>> following, but tells me the OP2's are unused data. The compiler tells me
it
>> can't recognize OP2, but it recognizes _OP2, but its unused. I also tried
ld
>> b,OP2 and ld b,_OP2, but it doesn't work for me. Help!
>>
>> SpriteMove:
>> call _getky
>> ld a,24
>> cp _OP2
>> call z,Left
>> ld a,25
>> cp _OP2
>> call z,Up
>> ld a,26
>> cp _OP2
>> call z,Right
>> ld a,34
>> cp _OP2
>> call z,Down
>> push bc
>> ret
>>
>> This must be yet another of my stupid mistakes...
>>
>> Alan Wong / Damnation
>
>--
>
>=====================================
>= =
>= Kirk Meyer (mailto:_@ibm.net) =
>= http://www.bigfoot.com/~kirkmeyer =
>= http://simcommunity.home.ml.org =
>= =
>= "Set your affection on things =
>= above, not on things on the =
>= earth." Colossians 3:2 =
>= =
>=====================================
>