[A83] Re: How using and


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

[A83] Re: How using and




>
> Hi, I'm trying do to something...
>
> CHANGEMELEEWEAPON:
> bcall(_convop1)       ; My number to compare is in op1
> ld (v_temp),de   ; Now I want to see if v_temp
> ld a,(v_temp)    ; (v_temp AND v_weapma) not= 0
> ld de,(v_weapma) ; But this doesn't work
> and de            ; How can I do this?
> cp 0
> jp z,cannotbuy
> jp verifyachat
>
> v_temp:
>          .dw 0
> v_weapma:
>          .dw 0


You are trying to AND a one byte register with a two byte register.  This
will not compile =P ('and de' is not an opcode).  However, this will
accomplish 'and de':
    and d        ;if both d
    and e        ;and e
                    ;are zero, z flag gets reset
- - Joe

joe@joepnet.com





References: