Re: A85: Complement the Z flag?


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

Re: A85: Complement the Z flag?



I promise it is necessary!  i am using the z flag like you normally
would the carry flag to return status information from a function.

-mike

On Sat, 01 Nov 1997 03:14:51 -0800, you wrote:

>Michael Pearce wrote:
>> 
>> Does anyone know of a good way to complement the zero flag?
>
>Interesting problem indeed... although I can't really see when
>that's necessary.
>
>push af
>ex (sp),hl  ; to preserve HL
>ld a,%01000000  ; Z flag is the 6th bit in the F register
>xor l  ; L = previous F register
>ld l,a
>ex (sp),hl
>pop af ; 8 bytes
>
>No registers or flags are changed, except the Z flag.
>
>-- 
>Jimmy Mårdell                "The nice thing about standards is that 
>mailto:mja@algonet.se         there are so many of them to choose from."
>http://www.algonet.se/~mja    
>IRC: Yarin                   "Sanity? I'm sure I have it on tape
>somewhere!"
>

mgp4007@omega.uta.edu


References: