Re: A86: FindPixel
[Prev][Next][Index][Thread]
Re: A86: FindPixel
No, the zero flag's not affected by the ldir and ldi instructions.
Here's an example of a string comparison routine (for comparing large
strings) that uses the p/v flag to loop:
ld bc,500
ld hl,string1
ld de,string2
compare_loop:
ld a,(de)
cpi
inc de
jr nz,not_equal
jp pe,compare_loop
equal:
Dan Eble wrote:
>
> On Wed, 6 May 1998, Matt2000 wrote:
>
> > One use for parity is to check if BC = 0 on Z80 insructions that move blocks
> > of memory, ldir, ldi, etc.
> >
>
> No, that would be the zero flag.
>
> The main use for parity is to detect transmission errors (like through a
> serial link). It's the same concept as a checksum.
>
> --------
> Dan Eble (mailto:eble@cis.ohio-state.edu)
> (http://www.cis.ohio-state.edu/~eble)
>
> "Behold, how great a matter a little fire kindleth!" -- James 3:5
Follow-Ups:
References: