                                         
sniffin kelly bellows

rbt=iot 2217	ckn=iot 2027
dimension knb(4),dlk(4)

fnp,	lac .rlx
	lio .rly
	dpy-i 300
	xor .-1
	add .-2
	rar 7s
	add rly
	dac rly
	swp
	cks
	spi
	jmp fol
	dac rlx
	jmp fnp 1

fol,	dac rly
	lac (20000	/radius
	cli
flu,	dac .y
	dio .x
	add rly
	swp
	add rlx
	dpy-i 300
	rbt
	spi i
	jmp xec
	lac x
	sar 1
	sub y
	lia cma-opr
	sar 1
	add x
	swp
	dio .tem
	cks
	spi
	jmp fou
	lio tem
	jmp flu
      
                                                                           
fou,	lia
	idx pt3
	sad (dzm end-dzm dio 1
	jmp xec
	dap pt1
	dap pt2
	idx pt2
	dap pt3
	idx pt3
	ckn 300
	rir 8s
pt3,	dzm-dzm dio .
	lac y
	sar 1
	add rly
	dac rly
pt2,	dac .
	lac x
	sar 1
	add rlx
	dac rlx
pt1,	dac .
	lac tem
	swp
	jmp flu
sov,	law pbf-3
	dap pt1
	law pbf-2
	dap pt2
	law pbf-1
	dap pt3
	jmp xec 1
smu,	law pbf
	dap sm0
	law pbf 3
	dap sm1
	law pbf 6
	dap sm2
	law pbf 9.
	dap sm3
	lac sm3
sml,	add (dzm-dzm dio-lac
	sub pt3
	sma
	jmp smx
sm3,	lac .
sm0,	sub .
	mul (100
	div (3
	jmp sm2 1
	sar 6s
sm1,	add .
sm2,	dac .
	idx sm0
	idx sm1
	idx sm2
	idx sm3
	jmp sml
smx,	rbt
	ril 1
	spi
	jmp smx
	jmp xec
     
                                                         
dsp,	law pbf-3	/show drawing
	dap ds1
	law pbf-2
	dap ds2
dsl,	lac ds1
	add (dac-lac
	sad pt1
	jmp xec 1
	law 3
	add ds1
	dap ds1
	dap ds2
	idx ds2
ds1,	lac .
ds2,	lio .
	lem 213
	jmp dsl

ini,	zzj=0		/initialize
repeat 4, dzm knb zzj	zzj=zzj 1
	jmp sov

bak,	law i 3	/remove 2 pts/sec
	add pt1
	dap pt1
	dap pt2
	idx pt2
	dap pt3
	idx pt3
	lac (-20000.
	jda dla
	jmp xec
dla,	0	/isp ac
	dap dlx
	isp dla
	jmp .-1
dlx,	jmp .

chk,	law ckn-iot
	dap toi
	clf 4
	law knb
	dap skn
	law dlk
	dap sdk
toi,	iot .
	law 100
	add toi
	dap toi
skn,	lac .
	dio skn i
	cma
	add i skn
	sza
	stf 4
sdk,	dac .
	idx skn
	idx sdk
	sas (dac dlk 4
	jmp toi
	jmp xec 2
       
                                                                 
rot,	law pbf-3
	dap ro1
	law pbf-2
	dap ro2
	law pbf-1
	dap ro3
rol,	lac ro1
	sad pt1
	jmp xec
	idx ro3
	dap ro1
	dap ro2
	idx ro2
	dap ro3
	idx ro3
	lio dlk
	jsp snc
	jda tra
ro1,	. dac
ro2,	.
	lio dlk 1
	jsp snc
	jda tra
	i ro2
ro3,	.
	lio dlk 2
	jsp snc
	jda tra
	i ro3
	i ro1
	jmp rol

tra,	0
	dap tr1
	dap tr2
	idx tr2
	dap trx
	idx trx
	dio .cos
tr1,	lac i .
	mul cos
	dac .tem
tr2,	lac i .
	mul tra
	add tem
	scl 1
	dac tem
	lac i tr1
	mul tra
	dac .tme
	lac i tr2
	mul cos
	sub tme
	scl 1
	dac i tr2
	lac tem
	dac i tr1
trx,	jmp .
      
                                                
snc,	dap snx	/sin,cos of knob in io
	spi i
	jmp snw
	lai
	add (400
	lia
snw,	clf 7
	rcr 7s
	rir 1
	spi
	stf 1
	spa
	spi
	sma spi-skp
	stf 2
	ral 7s
	and (6s
	add (sin
	dap sng
	cma
	add (sin sin 100
	dap csg
sng,	lac .
csg,	lio .
	szf 1
	cma swp-opr
	szf 2
	cma swp-opr
snx,	jmp .

sin,
0	1608.	3215.	4821.
6424.	8022.	9616.	11204.
12785.	14359.	15924.	17479.
19024.	20557.	22078.	23586.
25080.	26558.	28020.	29466.
30893.	32303.	33692.	35062.
36410.	37736.	39040.	40320.
41576.	42806.	44011.	45190.
46341.	47464.	48559.	49624.
50660.	51665.	52639.	53581.
54491.	55368.	56212.	57022.
57797.	58538.	59244.	59913.
60547.	61144.	61705.	62228.
62714.	63162.	63572.	63943.
64276.	64571.	64826.	65043.
65220.	65358.	65457.	65516.
65536.
         
                                                 
xec,	jmp dsp
	jmp chk
	rbt
	rir 9s	/sw1, etch
	spi
	jmp ech
	szf 4
	jmp rot
	rir 9s	/bt1, track
	spi
	jmp fnp
	ril 1	/bt2, smooth
	spi
	jmp smu
	ril 1	/bt3, back
	spi
	jmp bak
	ril 1	/bt4, start over
	spi
	jmp sov
	jmp xec

ech,	jmp xec	/temporarily

pbf,
pbf 5400-300/end,	variables
constants
start ini
       
                                                                                                                     
