mirror of
https://github.com/dschmenk/PLASMA.git
synced 2025-01-21 17:31:31 +00:00
Prepare HLin assemblyizing
This commit is contained in:
parent
d979f0ffed
commit
748eaa342d
@ -470,66 +470,52 @@ asm _dcgrXorPlotH
|
|||||||
end
|
end
|
||||||
|
|
||||||
def dcgrHLin(x1, x2, y)#0
|
def dcgrHLin(x1, x2, y)#0
|
||||||
byte pix7, mask
|
byte pix7, div7l, div7r
|
||||||
word pix7addr
|
word pix7addr
|
||||||
|
|
||||||
pix7addr = hgrscanl[y] + (hgrscanh[y] << 8) + ((divmod7[x1] & $F8) >> 2)
|
if x1 == x2
|
||||||
pix7 = divmod7[x1] & 7
|
dcgrPlot(x1, y)
|
||||||
while x1 <= x2
|
else
|
||||||
mask = auxclrmsk[pix7]
|
div7l = (divmod7[x1] & $F8) >> 2
|
||||||
if mask
|
div7r = (divmod7[x2] & $F8) >> 2
|
||||||
^page1x
|
pix7 = divmod7[x1] & 7
|
||||||
if mask & $80
|
if div7l < div7r
|
||||||
^(pix7addr+1) = (^(pix7addr+1) & ~mask) | (mask & auxclrh)
|
while pix7 < 7
|
||||||
else
|
dcgrPlot(x1, y)
|
||||||
^pix7addr = (^pix7addr & ~mask) | (mask & auxclrl)
|
x1++
|
||||||
fin
|
pix7++
|
||||||
|
loop
|
||||||
|
div7l++
|
||||||
|
pix7addr = hgrscanl[y] + (hgrscanh[y] << 8) + div7l
|
||||||
|
while div7l < div7r
|
||||||
|
^page1x
|
||||||
|
^pix7addr = auxclrl
|
||||||
|
^page1m
|
||||||
|
^pix7addr = memclrl
|
||||||
|
pix7addr++
|
||||||
|
^page1x
|
||||||
|
^pix7addr = auxclrh
|
||||||
|
^page1m
|
||||||
|
^pix7addr = memclrh
|
||||||
|
pix7addr++
|
||||||
|
x1 = x1 + 7
|
||||||
|
div7l++
|
||||||
|
loop
|
||||||
fin
|
fin
|
||||||
mask = memclrmsk[pix7]
|
if div7l == div7r
|
||||||
if mask
|
while x1 <= x2
|
||||||
^page1m
|
dcgrPlot(x1, y)
|
||||||
if mask & $80
|
x1++
|
||||||
^(pix7addr+1) = (^(pix7addr+1) & ~mask) | (mask & memclrh)
|
loop
|
||||||
else
|
|
||||||
^pix7addr = (^pix7addr & ~mask) | (mask & memclrl)
|
|
||||||
fin
|
|
||||||
fin
|
fin
|
||||||
pix7++
|
fin
|
||||||
if pix7 == 7
|
|
||||||
pix7 = 0;
|
|
||||||
pix7addr = pix7addr + 2
|
|
||||||
fin
|
|
||||||
x1++
|
|
||||||
loop
|
|
||||||
end
|
end
|
||||||
def dcgrVLin(y1, y2, x)#0
|
def dcgrVLin(y1, y2, x)#0
|
||||||
byte pix7, div7, mask
|
byte y
|
||||||
word pix7addr
|
|
||||||
|
for y = y1 to y2
|
||||||
pix7 = divmod7[x] & 7
|
dcgrPlot(x, y)
|
||||||
div7 = (divmod7[x] & $F8) >> 2
|
next
|
||||||
while y1 <= y2
|
|
||||||
pix7addr = hgrscanl[y1] + (hgrscanh[y1] << 8) + div7
|
|
||||||
mask = auxclrmsk[pix7]
|
|
||||||
if mask
|
|
||||||
^page1x
|
|
||||||
if mask & $80
|
|
||||||
^(pix7addr+1) = (^(pix7addr+1) & ~mask) | (mask & auxclrh)
|
|
||||||
else
|
|
||||||
^pix7addr = (^pix7addr & ~mask) | (mask & auxclrl)
|
|
||||||
fin
|
|
||||||
fin
|
|
||||||
mask = memclrmsk[pix7]
|
|
||||||
if mask
|
|
||||||
^page1m
|
|
||||||
if mask & $80
|
|
||||||
^(pix7addr+1) = (^(pix7addr+1) & ~mask) | (mask & memclrh)
|
|
||||||
else
|
|
||||||
^pix7addr = (^pix7addr & ~mask) | (mask & memclrl)
|
|
||||||
fin
|
|
||||||
fin
|
|
||||||
y1++
|
|
||||||
loop
|
|
||||||
end
|
end
|
||||||
def dcgrScan(x, y, w, scanptr)#0
|
def dcgrScan(x, y, w, scanptr)#0
|
||||||
byte pix7, c, mask
|
byte pix7, c, mask
|
||||||
@ -670,11 +656,11 @@ def dcgrTest#0
|
|||||||
setlinespans(@dcgrHLin, @dcgrVLin)
|
setlinespans(@dcgrHLin, @dcgrVLin)
|
||||||
for i = 0 to 191 step 4
|
for i = 0 to 191 step 4
|
||||||
dhgrColor(i)
|
dhgrColor(i)
|
||||||
line(0, 0, 139, i)
|
linespans(0, 0, 139, i)
|
||||||
next
|
next
|
||||||
for i = 139 downto 0 step 4
|
for i = 139 downto 0 step 4
|
||||||
dhgrColor(i)
|
dhgrColor(i)
|
||||||
line(0, 0, i, 191)
|
linespans(0, 0, i, 191)
|
||||||
next
|
next
|
||||||
pixblk = heapalloc(16/2*20)
|
pixblk = heapalloc(16/2*20)
|
||||||
dhgrDst(0, 0, 2, 20, pixblk)
|
dhgrDst(0, 0, 2, 20, pixblk)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user