1
0
mirror of https://github.com/PDP-10/its.git synced 2026-02-01 06:22:14 +00:00

Munching Squares for Type 340 display.

This is an implementation of HAKMEM item 146, with a bug fixed.
This commit is contained in:
Lars Brinkhoff
2019-01-09 15:43:02 +01:00
parent c37a1a6555
commit 19e85f69ef
4 changed files with 81 additions and 1 deletions

71
src/lars/munch.340 Normal file
View File

@@ -0,0 +1,71 @@
title Munching Squares
a=1
b=2
c=3
v=10
x=11
y=x+1
p=17
dis==130
point==020000
inten==002000
verti==200000
start: move p,[-pdllen,,pdl-1]
setzb x,y
seto a,
.iotlsr a,
cono dis,100 ;Reset display.
movei a,point+17+<5_4> ;Set intentity and scale, go to point mode.
pushj p,send
loop: move x,[1001002] ;Munching squares algorithm.
addb x,v
rotc x,-22
xor x,v
move a,x ;Point mode, set X.
lsh a,10.-36.
iori a,point
pushj p,send
move a,y ;Point mode, set Y and intensify.
lsh a,10.-36.
iori a,point+verti+inten
move c,count
rep: pushj p,send ;Send this word COUNT times.
sojge c,rep
jrst loop
buf: 0
state: first
send: jrst @state
first: movem a,buf ;Buffer this word.
movei b,second
movem b,state
popj p,
second: conso dis,200 ;Wait for display.
jrst .-1
move b,a
hrl b,buf
datao dis,b
movei b,first
movem b,state
popj p,
count: 15.
.vector pdl(pdllen==100)
end start