|
|
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: 16128 (0x3f00)
Types: TextFile
Names: »lmitxt002«
└─⟦2c55ea56f⟧ Bits:30001844 SW-save af projekt 1000, Alarm-system
└─⟦093e2ad1c⟧
└─⟦this⟧ »lmitxt002«
;; begin lmitxt002
;;
;;description of the memory access procedures:
;;
;; name base,disp data bytes count test odd comment
;;
;; writenextt w2,w1++ w3 2 2 yes odd
;; writenext w2,w1++ w3 2 2 odd
;; writebnextt w2,w1++ w3 1 1 yes odd
;; writebnext w2,w1++ w3 1 1 odd
;; wr34fetcht spb,slu++ w4,w3 4 4 yes test stackoverflow; goto fetch
;; wr34fetch spb,slu++ w4,w3 4 4 test stackoverflow; goto fetch
;; wrfetcht spb,slu++ w3 2 2 yes test stackoverflow; goto fetch
;; wrfetch spb,slu++ w3 2 2 test stackoverflow; goto fetch
;; cwrite21 w6,w5 w2,w1 4
;; cwrite1 w6,w5 w1 2
;; cwrite65 w2,w1 w6,w5 4
;; cwrite6 w2,w1 w6 2
;;
;; cexch21 w6,w5 w2,w1 4 exchanges memory words with w2,w1
;;
;; readcont sib,sic w3 2 2 odd param: w7
;; readbcont sib,sic w4 1 1 odd param: w7 ; s.zro(w4) set at exit
;; readcown36 sib,sic w6,w3 4 4 odd param: w7
;; read12t w2,w1++ bd 2 yes
;; read12 w2,w1++ bd 2
;; readluct spb,slu-- bd 2 -2 yes
;; readluc spb,slu-- bd 2 -2
;; readlucq spb,slu-- q 2 -2
;; readnextt w6,w5++ bd 2 2 yes
;; readnext w6,w5++ bd 2 2
;; readonext w6,w5++ q 2 2 odd
;; reado12 w2,w1 q 2 odd
;; readb65next w6,w5++ w3 1 1 odd
;; readb21next w2,w1++ w3 1 1 odd
;; cread65 w2,w1 w6,w5 4
;; cread21 w6,w5 w2,w1 4
;; cread1 w6,w5 w1 2 s(w1) set at exit
;; creadbyte1 w6,w5 w1 1 odd s.zro(w1) set at exit
.p ;;
;;explanation to the above table:
;;
;; base,disp: defines the memory address of the first byte.
;;
;; data: defines the register to/from which the data is transferred.
;; the register "bd" means, that the data should be fetched
;; from the "bd" register, and the parity should thereafter
;; be tested before the registers s, r, errb, errd, bf, bd,
;; and "base,disp" are changed and before the back-plane bus
;; is released (by an instruction not containing "h").
;;
;; test: "yes" in this coloumn means that the memory procedure starts by
;; testing the old parity.
;;
;; count: this value is added to "disp", before the procedure returns.
;;
;; odd: "odd" in this coloumn means that the procedure is able to
;; read/write a word placed over two physical words. if "odd"
;; is absent, then the data is assumed aligned at physical word
;; boundaries, i. e. odd addresses denote the same data as
;; the preceeding even addresses.
;;
;; bytes: the number of bytes to be read from/written to the memory.
;;
;;
;;usage of the registers:
;;
;; beside the registers mentioned in the above table, the following
;; registers are used by the procedures:
;;
;; registers used by
;;
;; s(status), errb, errd all memory access procedures
;; r(am2910), q read and exchange memory procedures
;; c creadbyte1
;; w7 in/out parameter, set by fetch, used by
;; readcont, readbcont, readcown36
.p ;;
;
;
;; procs for selecting the address and the data:
;
mmab: ;; write address selection:
bf:=errb,h ,crtn ;
;
mmdb: ;; write data selection:
bf:=errb++,h ,crtn ;
;
;
;; procs for parity error handling:
;
rterror: ;; jump to r in case of error
,h ,crtn not pty ;
;
rerror: ;; parity error: jump to r
,h ,jrp not pty ;
;
perror= rerror ;
terror= rterror ;
;
errw65m1: ;
errd:=w5--,h , ; errb,errd := w6,w5-1
;
errw6: ;
errb:=w6,h ,cjp herror ; errb := w6; goto herror
;
errw2: ;
errb:=w2,h ,cjp herror ; errb:=w2; goto herror
;
errlu: ;
errd:=slu++,h , ; errb,errd := slb,slu+1
errb:=slb,h ,cjp herror ; goto herror
;
errib: ;
errd:=sic--,h , ; errb,errd := sib,sic-1
errb:=sib,h ,cjp herror ; goto herror
;
errm1: ;
errd:=errd--,h ,cjp herror ; errd:=errd-1; goto herror
;
testbyte: ;
,,cjv 3 testbyte1 ;
.loc ;
testbyte1: ;
w3:=w3 and 0ff,,crtn ; parity ok
,,cjp testbyte2 ; goto testbyte2
w3:=w3 and 0ff,,crtn ; parity ok
testbyte2:
w3:=w3 and 0ff,,crtn not pty ; return if parity ok
q:=54,,jrp not pty ; q:=54; goto r;
;
errw6b: ;
errb:=w6,,cjp debugmess ; errb:=w6; goto debugmess
;
errw2b: ;
errb:=w2,,cjp debugmess ; errb:=w2; goto debugmess
.p ;
;; memory read procs:
;
readcont: ;
bf:=sib,sic:=sic++,h ,ldct errib;
bd:=sic,sic:=sic++,h r s, ;
q:=w7 and 0ff,h , ; q:=lastbyte of w7
w3:=bd,h w s,cjp b15 rterror; w3:=readword; goto rterror if even
w7:=w3,h ,cjp pty rerror ; w7:=w3; jump if parity error
w3:=w3 and 700,, ; w3:=firstbyte of w3
bus:=w3+q,, ;
w3:=swp,s,crtn ; w3:=word; define status
;
readbcont: ;
bus:=sic,sic:=sic++,s, ;
w4:=w7 and 0ff,s,crtn b15 ; w4:=lastbyte; define zro; return if odd
bf:=errb:=sib,h , ;
bd:=errd:=sic--,h r , ;
w4:=0ff,h , ;
w7:=bd,h w s, ; w7:=readword; w4:=firstbyte; define zro
w4:=w4 and swp,h s,crtn not pty ; return if no error
,h ,cjp herror ; goto herror
;
readcown36: ;
,,cjs readcont ;
w6:=w3,,cjp readcont ;
;
read12t: ;
,h ,cjp pty rerror ;
read12: ;
bf:=errb:=w2,h ,ldct herror;
bd:=errd:=w1++,h r ,crtn ;
;
readluct: ;
,h ,cjp pty rerror ;
readluc: ;
bf:=slb,slu:=slu--,h ,ldct errlu;
bd:=slu,slu:=slu--,h r s,crtn ;
;
readlucq: ;
bf:=slb,slu:=slu--,h ,ldct errlu;
bd:=slu,slu:=slu--,h r s, ;
q:=bd,h w s,cjp rterror ;
;
readnextt: ;
,h ,cjp pty rerror ;
readnext: ;
bf:=w6,w5:=w5++,h ,ldct errw65m1;
bd:=w5,w5:=w5++,h r s,crtn ;
;
readonext: ;
bf:=w6,h ,ldct errw6 ;
bd:=errd:=w5++,h r s, ;
w5:=errd++,h ,cjp b15 readodd; jump if odd
q:=bd,h w s,cjp rterror ;
;
readodd: ;; r def, module selected, errd=disp+1
q:=bd,h w s, ; q:=first word
readodd0: ;; r def, module selected, errd=disp+1, q=firstword
q:=q and 0ff,h , ;
errb:=swp,h ,jrp not pty readodd1; jump to r if error
readodd1: ;
bd:=errd:=errd++,h r , ;
errb:=bd and errb,h w s, ; errb:=second byte
bus:=errb ior q,h ,jrp not pty readodd2; jump to r if error
readodd2: ;
q:=swp,,crtn ; q:=word; return
;
reado12: ;
bf:=w2,h ,ldct errw2 ;
bd:=errd:=w1,h r s, ;
q:=bd,h w s,cjp b15 readodd0; jump if odd
,h ,crtn not pty ;
,h ,cjp rerror ;
;
readb65n1: ;; from mrq7, mrq19, and readb
bf:=w6,w5:=w5++,h , ;
bd:=errd:=w5,h r , ;
0,,h , ; force ones out to the backplane bus
w3:=bd,h w b s,cjp testbyte; goto test right parity ok and mask w3
;
readb65next: ;
bf:=w6,w5:=w5++,h ,ldct errw6b;
bd:=errd:=w5,h r , ;
w3:=bd,h w b s,cjp testbyte; goto test right parity ok and mask w3
;
readb21next: ;
bf:=w2,w1:=w1++,h ,ldct errw2b;
bd:=errd:=w1,h r , ;
w3:=bd,h w b s,cjp testbyte;
;
cread65: ;
bf:=errb:=w2,h , ;
bd:=w1,errd:=w1++,h r ,ldct errm1;
w6:=bd,h w s,cjs rterror ;
bd:=errd:=errd++,h r ,ldct herror;
w5:=bd,h w s,cjp rterror ;
;
cread21: ;
bf:=errb:=w6,h , ;
bd:=w5,errd:=w5++,h r ,ldct errm1;
;
w2:=bd,h w s,cjs rterror ;
bd:=errd:=errd++,h r ,ldct herror;
w1:=bd,h w s,cjp rterror ;
;
cread1: ;
bf:=errb:=w6,h , ;
bd:=errd:=w5,h r ,ldct herror;
w1:=bd,h w s,cjp rterror ;
;
creadbyte1: ;
c:=w5,,cjs cread1 ;
q:=0ff,, ;
w1,w1:=w1 and q,s,crtn cry ; return if odd
w1:=swp and q,s,crtn ; swap; return
;
writenextt: ;
bf:=errb:=w2,h ,jrp not pty writenext1; jump to r or writenext1
writenext: ;
bf:=errb:=w2,h , ;
writenext1: ;
bd:=w1:=w1++,h s, ;
bf:=w2++,h ,cjp b15 writenxt10; jump if odd
bd:=w3,w1:=w1++,h w ,crtn ;
writenxt10: ;; odd
bus:=w3,h , ;
bd:=swp,,h w b ,cjs mmab ;
bd:=w1:=w1++,h ,cjs mmdb ;
bd:=w3,h w b ,crtn ;
;
writebnextt: ;
bf:=errb:=w2,h ,jrp not pty writebnext1; jump to r or writebnext1
writebnext: ;
bf:=errb:=w2,h , ;
writebnext1: ;
bd:=w1:=w1++,h ,cjs mmdb ;
bd:=w3,h w b ,crtn ;
;
wr34fetcht: ;
,h ,cjp pty rerror ;
wr34fetch: ;
slu-zd0,s, ;
bf:=errb:=slb,h ,cjp acy stackerror; if slu>=maxstack then goto stackerror
bd:=slu:=slu++,h ,cjs mmdb ;
bd:=w4,slu:=slu++,h w ,cjp wrfetch;
;
wrfetcht: ;
,h ,cjp pty rerror ;
wrfetch: ;
slu-zd0,s, ;
bf:=errb:=slb,h ,cjp acy stackerror; if slu>=maxstack then goto stackerror;
bd:=slu:=slu++,h ,cjs mmdb ;
bd:=w3,slu:=slu++,h w ,cjp fetch;
;
cwrite21: ;
bf:=errb:=w6,h , ;
bd:=w5,errd:=w5++,h ,cjs mmdb;
bd:=w2,h w ,cjs mmab ;
bd:=errd++,h ,cjs mmdb ;
bd:=w1,h w ,crtn ;
;
cwrite1: ;
bf:=errb:=w6,h , ;
bd:=w5,h ,cjs mmdb ;
bd:=w1,h w ,crtn ;
;
cwrite65: ;
bf:=errb:=w2,h , ;
bd:=w1,errd:=w1++,h ,cjs mmdb;
bd:=w6,h w ,cjs mmab ;
bd:=errd++,h ,cjs mmdb ;
bd:=w5,h w ,crtn ;
;
cwrite6: ;
bf:=errb:=w2,h , ;
bd:=w1,h ,cjs mmdb ;
bd:=w6,h w ,crtn ;
;
cexch21: ;
bf:=errb:=w6,h , ;
bd:=w5,errd:=w5++,h r ,cjs qthmm6;
bd:=w2,w2:=q,h w , ;
bf:=w6,errd:=errd++,h , ;
bd:=errd,errd:=errd++,h r ,cjs qthmm6;
bd:=w1,w1:=q,h w ,crtn ;
;
qthmm6: ;
q:=bd,h w s, ;
,h ,cjp pty errm1 ;
bd:=errd--,h , ;
bf:=w6++,h ,crtn ;
.p ;
;;
;; procedure getsa (* 23x = 5,0us *)
;; procedure getsat (* 24x = 5,2us *)
;;
;; entry: -
;; exit : w1= mem(lu) + rel - 1; w2= mem(lu-2); w3= rel; q= w6= undf;
;; read(mem(lu-2)) started;
;;
getsat: ;proc getsat;
,h ,cjs pty perror ; if pty then perror;
getsa: ;proc getsa;
,,cjs readcont ; rel:= readcont;
getsa1: ;proc getsa1;
w1:=w3--,,cjs readluc ; readluc;
w1:=w1+bd,h w s,cjs readluct; d:= rel-1+waitmem; readluct;
w2:=bd,h w s,cjp terror ; b:= waitmem; testpty; return;
.p ;
;;
;; procedure clearbits(mask); (* 2x = 0,43us *)
;;
;; entry: w0= mask;
;; exit : w0= unch, q= old ps;
;;
clearbits: ;proc clearbits;
q:=zd1,, ; ra.ps:= ra.ps and -,mask;
zd1:=q clr w0,,crtn ; return;
;;
;; procedure testint1; (* 1x = 0,22us *)
;;
;; entry: -
;; exit : stat(zro)= (int=lev);
;;
testint1: ;proc testint1;
int xor lev,h s,crtn ; stat:= (int=lev); return;
;;
;; procedure nill (* 1x = 0,22us *)
;;
nill: ;proc nill;
bus:=40,,,crtn ; swap:= nill; return;
.p ;
;; procedure clear (* ext: 7x = 1,52us, int: 13x = 2,82us *)
;;
;; entry: lev;
;; exit : w0= level, q= undf, ra= unch, ir= 300, stat= undf;
;;
clear: ;proc clear;
w0:=lev and 0ff,, ; bplevel:= lev(8:15);
q:=w0 ior 200,, ;
bf:=q,, ; msel:= bplevel + interrupt;
q:=w0 and 7,h , ; chan:= bplevel(13:15);
bd:=q,h w , ; xbus:= chan + clear interrupt;
reg--sregmax,s, ; if reg > sregmax then
ir:=300,,,crtn acy ; begin sync-intrp; return; end;
ir:=c:=2,w0:=reg,,push 2 ;
w0:=>w0,,rfct ; ilevel:= reg shift (-3);
bf:=w0,, ; msel:= ilevel;
ir:=300,,h u ,crtn ; setsoft; sync-intrp; return;
;;
;; procedure setlocalint(level) (* 10x = 2,17us *)
;;
;; entry: w0= level; (* setlint only *)
;; exit : w0= level, q= undf, stat= undf, ir:= 320;
;;
setlint: ;proc setlint;
q:=w0 ior 200,, ; q:= level ior -,iors0;
bf:=q,, ; msel:= q;
q:=q and 7,, ; q:= lev and dev-mask
q:=q ior 20,h , ; + setint;
bd:=q,h w , ; xbus:= q;
w0--sintmax,s, ; if level<=softintmax then
ir:=320,,,crtn acy ;
q:=q xor 28,, ; msel:= level(13:15) ior setsoft;
bf:=q,, ;
ir:=320,,h u ,crtn ; sync-intrp; return;
;;
;; end of lmitxt002
;;
.p ;
▶EOF◀