|
|
DataMuseum.dkPresents historical artifacts from the history of: RC4000/8000/9000 |
This is an automatic "excavation" of a thematic subset of
See our Wiki for more about RC4000/8000/9000 Excavated with: AutoArchaeologist - Free & Open Source Software. |
top - metrics - download
Length: 8448 (0x2100)
Types: TextFile
Names: »smup«
└─⟦00964e8f7⟧ Bits:30007478 RC8000 Dump tape fra HCØ.
└─⟦b2ec5d50f⟧
└─⟦this⟧ »smup«
(moveupdate=slang list.yes xref.yes
moveupdate)
; code procedure moveupdate(totval,env,envval,propose,proposelow,cd,cval);
; integer array totval(0:881) x2+8 p0
; env(176:3351) x2+12 p1
; envval(-2:3280) x2+16 p2
; propose(88:2187) x2+20 p3
; proposelow(1:2,1:2) x2+24 p4
; cd(1:32)+dist(1:16) x2+28 p5
; cval(0:4) x2+32
; dsb=depth<stdepth or backwards p6
; mover= (4=X, 8=O) p7
; distsign= (64=forwards,80=backwards) p8
; pm1= (2=X, -2=O) p9
; xy= pointer to a byte in totval p10
;
b. g1, i15
d.
p.<:fpnames:>
l.
s. a22, b3, d1, j30, p10
w. k=10000
h.
i0: d1, d0 ; rel last point, rel last abs word
j8: 8, 0 ; rs entry end address expression
j13: 13, 0 ; rs variable last used
j30: 30, 0 ; rs variable saved last used
d0= k-2-i0 ; number of abs words
d1= k-2-i0 ; number of abs words + points
i1: 0, 0 ; external list
0, 0
w. 080481 ; date
171700 ; time
;
h.
a0: 0,1004,836,668 ; integer array threat(0:3)
500, r.7 ; threat(4:10)
332, r.53 ; threat(11:63)
w.
a3: 0 ; actmover (2=X, 4=O)
a4: 0 ; actopp (4=X, 2=O)
a5: 0 ; distance
a6: 0 ; ws
a7: 0 ; dir
a8: 0 ; wing
a9: 0 ; ffield
a10: 0 ; dw
;
a12: 0 ; totval1
a13: 0 ; totval2
;
a15: 0 ; ij
;
a17: 0 ; pq
;
;
a20: 0 ; met1
a21: 0 ; met2
a22: 0 ; updmover
b0: 2
b1: 16383
b2: 16384
b3: 2.1111111
p0: 0
p1: 0
p2: 0
p3: 0
p4: 0
p5: 0
p6: 0
p7: 0
p8: 0
p9: 0
p10: 0
;
i2: rl. w2 ( j13.) ; w2:= last used
ds. w3 ( j30.) ; saved last used:= last used
rl w0 (x2+8 ) ; hent parameter-adresser
; rs. w1 p0.
rl w1 (x2+12 )
ds. w1 p1.
rl w0 (x2+16 )
; rs. w1 p2.
rl w1 (x2+20 )
ds. w1 p3.
rl w0 (x2+24 )
; rs. w1 p4.
rl w1 (x2+28 )
ds. w1 p5.
rl w3 (x2+32 ) ; hent cval-parameter-værdier
; rl w1 x3
; rs. w1 p6.
dl w1 x3+2
ds. w1 p7.
; rl w1 x3+4
; rs. w1 p8.
dl w1 x3+6
ds. w1 p9.
rl w1 x3+8
rs. w1 p10.
;
;
rl. w3 p10. ; actmover:= (xy extract 2) + 2
la. w3 b0.
al w3 x3+2
rs. w3 a3.
ac w3 x3-6 ; actopp:= 6-actmover
rs. w3 a4.
;
al w1 0
rs. w1 a7. ; dir:= 0
i3: al w1 0
rs. w1 a8. ; new dir: wing:= 0
i4: rl. w1 a7. ; new wing: dw:= dir shift 3 + wing
ls w1 3
wa. w1 a8.
rs. w1 a10.
rl. w1 a8. ; ws:= wing+distsign
wa. w1 p8.
rs. w1 a6.
al w1 0
rs. w1 a20. ; met1:= false
rs. w1 a21. ; met2:= false
i5: rs. w1 a9. ; next ffield:
wa. w1 a10. ; ij:= xy+cd(dw+ffield)
wa. w1 p5.
rl w3 x1
wa. w3 p10.
rs. w3 a15.
am. ( p0.) ; totval1:= totval(ij)
rl w1 x3
wa. w3 p9. ; pq:= ij+pm1
rs. w3 a17.
am. ( p0.) ; totval2:= totval(pq)
rl w2 x3
sh. w1 ( b1.) ; if totval1 < 16384 then
jl. i11. ; goto felt besat af X
sh. w2 ( b1.) ; if totval2 < 16384 then
jl. i13. ; goto felt besat af O
; rs. w1 a12. ; store totval1
ds. w2 a13. ; store totval2
rl. w3 a3. ; updmover:= actmover
rs. w3 a22. ;
rl. w3 a6. ; distance:= cd(ffield+ws)
wa. w3 a9.
wa. w3 p5.
rl w3 x3
rs. w3 a5.
i6: rl. w3 a15. ; distupdate: gh:= ij shift 1
ls w3 1
wa. w3 p3. ; tu:= propose(gh+1)
rl w2 x3+2
sh w2 0 ; if tu=0 then skip propose-delete
jl. i7.
rl w1 x3+0 ; rs:= propose(gh)
am. ( p3.) ; propose(rs+1):= tu
rs w2 x1+2
am. ( p3.) ; propose(tu):= rs
rs w1 x2+0
al w1 0 ; propose(gh+1):= 0
rs w1 x3+2
i7: rl. w3 a15. ; mn:= (ij shift 2) + dir
ls w3 2
wa. w3 a7.
wa. w3 p1. ; rs:= env(mn)
rl w1 x3+0
rl. w2 a12. ; totval1:= totval1-envval.rs extract 12
am. ( p2.)
es w2 x1+0
wa. w1 a5. ; tu:= rs+distance
rs w1 x3+0 ; env(mn):= tu
am. ( p2.) ; totval1:= totval1+envval.tu extract 12
ea w2 x1+0
rl. w3 a15. ; totval(ij):= totval1
am. ( p0.)
rs w2 x3
al w3 x2 ; threatval:= totval1 shift(-7) extract 7
ls w3 -7
la. w3 b3.
se w3 0 ; if threatval > 0
jl. i8.
rl. w1 p6. ; or
sh w1 0 ; (dsb and
jl. i10.
la. w2 b3. ; totval1 extract 7
rl. w1 a22. ; > proposelow(mover,updmover)
wa. w1 p4.
wa. w1 p7.
sh w2 (x1 ) ; then propose-insert:
jl. i10.
rl. w1 a22.
al w1 x1+1674
ls w1 1 ; rs:= (totval1 extract 7 shift 3)
ls w2 3 ; +2*(updmover+1674)
wa w2 2
jl. i9.
i8: rl. w2 a22. ; rs:= threat(threatval)+2*updmover
ls w2 1
ea. w2 x3+a0.
i9: am. ( p3.) ; tu:= propose(rs+1)
rl w3 x2+2
rl. w1 a15. ; propose(rs+1):= ij shift 1 (=gh)
ls w1 1
am. ( p3.)
rs w1 x2+2
am. ( p3.) ; propose(tu):= gh
rs w1 x3+0
wa. w1 p3. ; propose(gh):= rs
ds w3 x1+2 ; propose(gh+1):= tu
i10: rl. w1 a17. ; if ij = pq then
sn. w1 ( a15.)
jl. i14. ; goto next ffield
rs. w1 a15. ; ij:= pq
rl. w1 a13. ; totval1:= totval2
rs. w1 a12.
rl. w1 a4. ; updmover:= actopp
rs. w1 a22.
rl. w1 a5. ; distance:= distance * 2
wa. w1 a5.
rs. w1 a5.
jl. i6. ; goto distupdate
i11: rs. w3 a20. ; met1:= true (<> 0)
sl. w2 ( b2.) ; if totval2 > 16383 then
jl. i12. ; goto test met2
rs. w3 a21. ; met2:= true
jl. i15. ; goto next wing
i12: rl. w3 a21. ; if met2 then
se w3 0
jl. i15. ; goto next wing
jl. i14. ; else goto next ffield
i13: rs. w3 a21. ; met2:= true
rl. w3 a20.
se w3 0 ; if met1 then
jl. i15. ; goto next wing
i14: rl. w1 a9. ; next ffield: ffield:= ffield+2
al w1 x1+2
sh w1 6 ; if ffield <= 6 then
jl. i5. ; goto new ffield
i15: rl. w1 a8. ; next wing: wing:= wing+8
al w1 x1+8
rs. w1 a8.
sh w1 8 ; if wing <= 8 then
jl. i4. ; goto new wing
rl. w1 a7. ; next dir: dir:= dir+2
al w1 x1+2
rs. w1 a7.
sh w1 6 ; if dir <= 6 then
jl. i3. ; goto next dir
jl. w3 ( j8.) ; return
h. 0, r. i0.+505 ; fill segment with zero
w. <:moveupdate<0><0>:> ; alarm text
i.e. ; end segment
;
h. ; tail
g0: g1: ; first entry, last entry
0, 1 ; 1 segment
0, r.8 ; fill
2048, i2-i0 ; entry
w. 1<18+25<12+25<6+25 ; no type proc, 3*int array
25<18+25<12+25<6+25 ; 4*int array
h. 4, i1-i0 ; kind, external list
1, 0 ; 1 segment code, no own bytes
d.
p.<:insertproc:>
▶EOF◀