[A83] Re: Testing pixels


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

[A83] Re: Testing pixels



Added an inc hl so it would search the entire row.  Also shortened a couple 
other things.


; a - pixel row to check...
checkrow:
push hl
push bc
ld h, 0
ld l, a
add hl,hl ; Multiply by two
add hl,hl ; by 4
ld b, h ; save for later
ld c, l
add hl,hl ; by 8
add hl,bc ; adds 4x so that it gets to 12x
ld bc, plotSScreen
add hl,bc ; add offset to buffer
ld b, 12
ld a, $FF
checkrowloop:
and (hl)
inc hl     ;need to increment hl...
djnz checkrowloop
pop bc
pop hl
inc a    ;z = all bits set, nz = at least one bit was clear
ret


In a message dated 6/9/2001 3:42:19 PM Eastern Daylight Time, 
kingofhackers2k@hotmail.com writes:


> In asm should be easy...
> 
> make sure that the function is graphed also in the plotSScreen buffer...
> 
> ld hl, plotSScreen
> B_CALL SaveDisp
> 
> 
> ; a - pixel row to check...
> checkrow:
> push hl
> push de
> push bc
> ld h, 0
> ld l, a
> add hl,hl ; Multiply by two
> add hl,hl ; by 4
> ld d, h ; save for later
> ld e, l
> add hl,hl ; by 8
> add hl,de ; adds 4x so that it gets to 12x
> ld de, plotSScreen
> add hl,de ; add offset to buffer
> ld b, 12 ; (might need to be 11... just try.. )
> ld e, $FF
> checkrowloop:
> ld a, (hl)
> and e
> ld e, a
> djnz checkrowloop
> ld a, e
> pop bc
> pop de
> pop hl
> cp $FF
> ret
> 
> 




----
Jonah Cohen
<ComAsYuAre@aol.com>
http://jonah.ticalc.org