Re: LZ: A couple routines
[Prev][Next][Index][Thread]
Min Idzelis wrote:
>
> I"m looking for the following routines....i have tried to figure it
> out, but couldn't
>
> A screen-blacking routine that only calls FIND_PIXEL once...
You just want to clear the screen? This will do it
ld hl,$FC00
ld d,h
ld e,l
inc de
ld (hl),0
ld bc,1023
ldir
> and a
> horizontal line erasing routine that only calls find_pixel once, and
> can have variable length. It should also be able to start at varied
> locations.
Horizontal line routines are often useful. This should work, though
you can optimize it if you want, but then the routine will be bigger
I think.
HorzLine: ; IN: b,c - x,y start location, d - length of line
ROM_CALL(FIND_PIXEL)
ld b,d
ld c,a
ld de,$FC00
add hl,de
HRep:
ld a,c
or (hl)
ld (hl),a
ld a,c ; Skip these three lines
xor (hl) ; if you want to fill
ld (hl),a ; instead of erase
rrc c
adc hl,0
djnz HRep
ret
I think someone posted an idea of a much faster routine (Oskar?) but no
code.
<pre>
--
Real name: Jimmy Mårdell
Email....: mailto:mja@algonet.se
IRC-name.: Yarin
WWW......: http://www.algonet.se/~mja
"Strap me down with disillusion
Tie me up in lifelines
Nothing stops my thoughts from breeding
Nothing's stopping my mind" - Leather Strip
</pre>
References: