Re: A83: Re: Clearing & xoring rectangles


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

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
  


-----Original Message-----
From: Henry Davidowich <rdaneelolivaw@hotmail.com>
To: assembly-83@lists.ticalc.org <assembly-83@lists.ticalc.org>
Date: Sunday, October 25, 1998 6:25 PM
Subject: Re: A83: Re: Clearing & xoring rectangles


>
>Thanks to Dave Phillips, JKhum98, and James Matthews.  The _ILine idea 
>should work, but I was hoping for something faster.  Like working with 
>the bits of the graph screen.  Any ideas?  BTW, I do want to fill the 
>rect.  Thanks!
>
>______________________________________________________
>Get Your Private, Free Email at http://www.hotmail.com