1
0
mirror of https://github.com/PDP-10/its.git synced 2026-01-11 23:53:12 +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

View File

@ -27,7 +27,8 @@ SRC = syseng sysen1 sysen2 sysen3 sysnet kshack dragon channa \
macsym lmcons dmcg hack hibou agb gt40 rug maeda ms kle aap common \
fonts zork 11logo kmp info aplogo bkph bbn pdp11 chsncp sca music1 \
moon teach ken lmio1 llogo a2deh chsgtv clib sys3 lmio turnip \
mits_s rab stan_k bs cstacy kp dcp2 -pics- victor imlac rjl mb bh
mits_s rab stan_k bs cstacy kp dcp2 -pics- victor imlac rjl mb bh \
lars
DOC = info _info_ sysdoc sysnet syshst kshack _teco_ emacs emacs1 c kcc \
chprog sail draw wl pc tj6 share _glpr_ _xgpr_ inquir mudman system \
xfont maxout ucode moon acount alan channa fonts games graphs humor \

View File

@ -554,6 +554,13 @@ respond "*" ":link sys1;ts 340d, stan.k; mod11 bin\r"
respond "*" ":midas sys2;ts munch_sysen2;munch\r"
expect ":KILL"
# Munching squares for 340 display.
respond "*" ":midas lars; ts munch_munch\r"
expect ":KILL"
respond "*" ":midas /t dsk0: .; @ munch_lars; munch\r"
respond "with ^C" ".iotlsr==jfcl\r\003"
expect ":KILL"
# PI
respond "*" ":midas sys3;ts pi_rwg; ran\r"
expect ":KILL"

View File

@ -212,6 +212,7 @@
- MUDDLE, MDL interpreter.
- MUDINQ, Muddle inquirer.
- MUNCH, TV-munching square.
- MUNCH, munching squares for Type 340 display.
- NAME, shows logged in users and locations, aka FINGER.
- NAMDRG, free TV display.
- NETIME, network time dragon.

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