mirror of
https://github.com/PDP-10/its.git
synced 2026-01-27 12:42:10 +00:00
72 lines
918 B
Plaintext
72 lines
918 B
Plaintext
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: 1
|
|
|
|
.vector pdl(pdllen==100)
|
|
|
|
end start
|