Re: A85: Complement the Z flag?


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

Re: A85: Complement the Z flag?



>push af
>ex (sp),hl  ; to preserve HL

pop hl would be faster, so unlees you need īthe value in hl replace this.
(or use pop de/pop bc)

>ld a,%01000000  ; Z flag is the 6th bit in the F register
>xor l  ; L = previous F register

Changing this to xor %01000000 would be faster (Saves one M cycle and 1
byte)

>ld l,a
>ex (sp),hl

This would be replaced by push hl.

>pop af ; 8 bytes

I can not see why you need to complement the zero flag (but you probably do
:) ), couldnt you just replace jr z with jr nz ?

Dines


Follow-Ups: