Re: A83: Re: Clearing & xoring rectangles
[Prev][Next][Index][Thread]
Re: A83: Re: Clearing & xoring rectangles
Sorry, I accidentally sent this before I was finished. Please ignore it,
I'll finish converting my HLine/VLine routines and send them tomorrow.
Everything below the adc hl,bc is trash.
-----Original Message-----
From: David Phillips <electrum@tfs.net>
To: assembly-83@lists.ticalc.org <assembly-83@lists.ticalc.org>
Date: Sunday, October 25, 1998 11:39 PM
Subject: Re: A83: Re: Clearing & xoring rectangles
>
>HLine: (not tested)
>; IN: d = x1, e = x2, l = y
> lh h,0 ; clear high byte
> sla l ; * 2
> sla l ; * 4
> ld b,l ; save y * 4
> sla l ; * 8
> rl h ; handle overflow
> ld a,l ; get low byte
> add a,b ; add saved value (*4 + *8 = *12)
> ld l,a ; save low byte
> ld bc,VRAM ; VRAM = start of video ram (graph buffer)
> adc hl,bc ; compute pointer, including overflow from *4 + *8
>
> ld a,d ; get x1
> sub e ; compute x2-x1
> jr nc,HLineP ; if it's positive, continue
> neg ; make it positive
>HLineP:
>
> ld a,d ; get x1
> and %11111000 ; clear lower 3 bits
>