Trailing-Edge
-
PDP-10 Archives
-
decuslib10-02
-
43,50272/meta2c.met
There are 2 other files named meta2c.met in the archive. Click here to see a list.
00100 .SYNTAX META2
00200
00300 OUT1: "*" ( "L" .OUT("PUSHJ"-"P,%LEN")/
00400 .NUMBER .OUT("PUSHJ"-"P,%GEN") .OUT("DEC"-*)/
00500 .EMPTY .OUT("PUSHJ"-"P,%COPYI"))/
00600 "CL#" .OUT("PUSHJ"-"P,%CLEVL+1")/
00700 "C#" .OUT("PUSHJ"-"P,%BLOCK+1")/COMPUTE/
00800 "BL#" .OUT("PUSHJ"-"P,%BLEVL+1")/
00900 "B#" .OUT("PUSHJ"-"P,%BLOCK")/
01000 "S#" .OUT("PUSHJ"-"P,%SYMB")/
01100 "N#" .NUMBER .OUT("PUSHJ"-"P,%CALND") .OUT("DEC"-*)/
01200 "^(" .NUMBER %1 "," AREX ")" ^1 .OUT("PUSHJ"-"P,%GET") .OUT("DEC"-*)/
01300 "^" .NUMBER .OUT("PUSHJ"-"P,%POP") .OUT("DEC"-*)/
01400 ("+%(" .OUT("TLO"-"F,SCATEN") / "%(") .NUMBER %1 "," AREX ")" ^1
01500 .OUT("PUSHJ"-"P,%PUT") .OUT("DEC"-*)/
01600 ("+%" .OUT("TLO"-"F,SCATEN") / "%") .NUMBER
01700 .OUT("PUSHJ"-"P,%PUSH") .OUT("DEC"-*)/
01800 ("+#(" .OUT("TLO"-"F,SCATEN") / "#(") .NUMBER %1 "," AREX ")"
01900 .STRING %2^1 .OUT("PUSHJ"-"P,%PUT") .OUT("XWD"-"-1,^D"*)
02000 ^2 .OUT("ASCIZ"-*)/
02100 ("+#" .OUT("TLO"-"F,SCATEN") / "#") .NUMBER %1 .STRING %2^1
02200 .OUT("PUSHJ"-"P,%PUSH") .OUT("XWD"-"-1,^D"*) ^2 .OUT("ASCIZ"-*)/
02300 "-" .OUT("PUSHJ"-"P,%COPYL") .OUT("BYTE"-"(7) 011,0")/
02400 .STRING .OUT("PUSHJ"-"P,%COPYL") .OUT("ASCIZ"-*);
02500
02600 OUTPUT: ".OUT" "(" .OUT("PUSHJ"-"P,%COPYL") .OUT("BYTE"-"(7) 011,0")
02700 *OUT1 ")" .OUT("PUSHJ"-"P,%COPYL") .OUT("BYTE"-"(7) 015,012,0")/
02800 ".LABEL" ("(" *OUT1 ")" / OUT1 )
02900 .OUT("PUSHJ"-"P,%COPYL") .OUT("ASCIZ"-"/:/")/
03000 ".RESET" .OUT("PUSHJ"-"P,%SETRE")/
03100 ".N$*" .OUT("PUSHJ"-"P,%CPYDC")/
03200 ".N$S" .OUT("PUSHJ"-"P,%CPYDC+1")/
03300 ".*" .NUMBER .OUT("HLRZ"-"T,(P)") .OUT("ADDI"-"T,^D"*)
03400 .OUT("PUSH"-"P,T") .OUT("PUSHJ"-"P,%PUTNM")/
03500 ":" .ID %1 "[" .NUMBER "]" .OUT("PUSHJ"-"P,%MAKND")
03600 .OUT("XWD"-"^D"*^1","*)/
03700 ".TYPE" .STRING .OUT("PUSHJ"-"P,%TYPE") .OUT("ASCIZ"-*)/
03800 "^(" .NUMBER %1 "," AREX ")" ^1 .OUT("PUSHJ"-"P,%GET") .OUT("DEC"-*)/
03900 "^" .NUMBER .OUT("PUSHJ"-"P,%POP") .OUT("DEC"-*)/
04000 ("+%(" .OUT("TLO"-"F,SCATEN") / "%(") .NUMBER %1 "," AREX ")" ^1
04100 .OUT("PUSHJ"-"P,%PUT") .OUT("DEC"-*)/
04200 ("+%" .OUT("TLO"-"F,SCATEN") / "%") .NUMBER
04300 .OUT("PUSHJ"-"P,%PUSH") .OUT("DEC"-*)/
04400 ("+#(" .OUT("TLO"-"F,SCATEN") / "#(") .NUMBER %1 "," AREX ")"
04500 .STRING %2^1 .OUT("PUSHJ"-"P,%PUT") .OUT("XWD"-"-1,^D"*)
04600 ^2 .OUT("ASCIZ"-*)/
04700 ("+#" .OUT("TLO"-"F,SCATEN") / "#") .NUMBER %1 .STRING %2^1
04800 .OUT("PUSHJ"-"P,%PUSH") .OUT("XWD"-"-1,^D"*) ^2 .OUT("ASCIZ"-*)/
04900 ".BEGIN" .OUT("PUSHJ"-"P,%BEGIN")/
05000 ".END" .OUT("PUSHJ"-"P,%END")/ COMPUTE /
05100 ".SETSCAN" .OUT("PUSHJ"-"P,%SCAN") .OUT("DEC"-"0")/
05200 ".ENTER" .OUT("PUSHJ"-"P,%LOOK")
05300 (-"C" .OUT("DEC"-"-1") / .EMPTY .OUT("DEC"-"2"))/
05400 ".CLEAR" .NUMBER .OUT("PUSHJ"-"P,%CLEAR") .OUT("DEC"-*)/
05500 ".SET" .NUMBER .OUT("PUSHJ"-"P,%SET") .OUT("DEC"-*);
05600
05700 EX3: ".ID" .OUT("PUSHJ"-"P,%ID")/ IFSTUFF /
05800 ".TREE" .OUT("PUSHJ"-"P,%DMPTR")/
05900 ".N#" .NUMBER .OUT("PUSHJ"-"P,%CALND") .OUT("DEC"-*)/
06000 ".EMPTY" .OUT("TLO"-"F,SUCCES")/
06100 ".STRING" .OUT("PUSHJ"-"P,%STR")/
06200 ".NUMBER" .OUT("PUSHJ"-"P,%NUM")/
06300 ".CHECK" .NUMBER .OUT("PUSHJ"-"P,%CHECK") .OUT("DEC"-*)
06400 ("SET"/"CLEAR" .OUT("TLC"-"F,SUCCES"))/
06500 ".UNTIL" .STRING .OUT("PUSHJ"-"P,%UNTIL") .OUT("ASCIZ"-*)/
06600 "-.ID" .OUT("PUSHJ"-"P,%ID+1")/
06700 "-.STRING" .OUT("PUSHJ"-"P,%STR+1")/
06800 "-.NUMBER" .OUT("PUSHJ"-"P,%NUM+1")/
06900 "-" .STRING .OUT("PUSHJ"-"P,%TST+1") .OUT("ASCIZ"-*)/
07000 .ID .OUT("PUSHJ"-"P," *)/
07100 .STRING .OUT("PUSHJ"-"P,%TST") .OUT("ASCIZ"-*)/
07200 ".NODE" "(" .OUT("MOVE"-"T,%MARK") .OUT("TLO"-"F,SUCCES")
07300 .OUT("IF1"-"<"*2"=1>") .OUT("MOVE"-"T+1,1(T)") .OUT("CAIE"-"T+1,"*2)
07400 .OUT("TLZ"-"F,SUCCES") .OUT("JUMPGE"-"F,"*1) .OUT("ADD"-"T,1(T)")
07500 TSTITM *("," .OUT("JUMPGE"-"F,"*1) .OUT("IF1"-"<"*2"="*2"+1>")
07600 TSTITM) ")" .LABEL *1 /
07700 ".SCAN" .OUT("PUSHJ"-"P,%SCAN") .OUT("DEC"-"1")/
07800 ".LOOK" .OUT("PUSHJ"-"P,%LOOK")
07900 (-"C" .OUT("DEC"-"0") / .EMPTY .OUT("DEC"-"1"))/
08000 ".NOT" "(" .OUT("TLO"-"F,NDELET") EX3 ")"
08100 .OUT("TLC"-"F,SUCCES") .OUT("TLZ"-"F,BACKUP+NDELET")/
08200 ".PEEK" "(" .OUT("TLO"-"F,NDELET")
08300 (EX3 .OUT("JUMPGE"-"F," *1) / OUTPUT)
08400 *(EX3 .OUT("JUMPGE"-"F," *1) / OUTPUT)
08500 .LABEL *1 .OUT("TLZ"-"F,NDELET") ")"
08600 .OUT("TLNN"-"F,SUCCES") .OUT("TLZ"-"F,BACKUP")/
08700 "(" EX1 ")"/
08800 "*" .LABEL *1 EX3 .OUT("JUMPL"-"F," *1) .OUT("TLO"-"F,SUCCES");
08900
09000 EX2: (EX3 .OUT("JUMPGE"-"F," *1) / OUTPUT .OUT("TLO"-"F,SUCCES"))
09100 *(EX3 .OUT("JUMPGE"-"F,%ERROR") / OUTPUT ) .LABEL *1;
09200
09300 TSTITM: (.ID .OUT("SKIPLE"-"T+1,1(T)") .OUT("CAILE"-"T+1,777777")
09400 .OUT("JRST"-".+3") .OUT("MOVE"-"T+1,(T+1)") .OUT("CAIE"-"T+1,"*)
09500 .OUT("TLZ"-"F,SUCCES") ("(" .OUT("JUMPGE"-"F,"*1"+1") .OUT("PUSH"-"P,T")
09600 .OUT("MOVE"-"T,1(T)") .OUT("IF1"-"<"*2"=1>")
09700 .OUT("MOVE"-"T+1,1(T)") .OUT("CAIE"-"T+1,"*2)
09800 .OUT("TLZ"-"F,SUCCES") .OUT("JUMPGE"-"F,"*1) .OUT("ADD"-"T,1(T)")
09900 TSTITM *("," .OUT("JUMPGE"-"F,"*1) .OUT("IF1"-"<"*2"="*2"+1>")
10000 TSTITM) ")" .LABEL *1 .OUT("POP"-"P,T") /.EMPTY )/
10100 "*" .OUT("MOVE"-"T+1,1(T)") .OUT("TLNE"-"T+1,777777")
10200 .OUT("SOJA"-"T,.+3") .OUT("TLZ"-"F,SUCCES")/
10300 ("-" .NUMBER [*:=-*]/.NUMBER) .OUT("MOVE"-"T+1,[DEC "*"]")
10400 .OUT("CAME"-"T+1,1(T)") .OUT("TLZ"-"F,SUCCES")/ .EMPTY)
10500 .OUT("SOJ"-"T,");
10600
10700 EX1: EX2 *("/" .OUT("JUMPL"-"F," *1) EX2) .LABEL *1;
10800
10900 COMPUTE: "[" ( "*" ":=" AREX "]" .OUT("PUSHJ"-"P,%PUTNM")/
11000 "N$" ":=" AREX "]" .OUT("POP"-"P,T") .OUT("PUSH"-"STK1,T")/
11100 .ID %1 ("(" AREX ")" ":=" AREX "]"
11200 .OUT("POP"-"P,T") .OUT("POP"-"P,T+1") .OUT("MOVEM"-"T,"^1*"-1(T+1)")/
11300 ":=" AREX "]" .OUT("POP"-"P,"^1*)));
11400
11500 IFSTUFF: ".IF" "(" BOOLEX ")" .OUT("POP"-"P,T") .OUT("TLO"-"F,SUCCES")
11600 .OUT("JUMPN"-"T,.+2") .OUT("TLZ"-"F,SUCCES");
11700
11800 BOOLEX: BOOLTM *(".OR." BOOLTM .OUT("POP"-"P,T") .OUT("ORM"-"T,(P)"));
11900
12000 BOOLTM: BOOLPR *(".AND." BOOLPR .OUT("POP"-"P,T") .OUT("ANDM"-"T,(P)"));
12100
12200 BOOLPR: ".NOT." BOOLPR .OUT("SETCMM"-"(P)") / AREX REL AREX
12300 .OUT("POP"-"P,T+1") .OUT("POP"-"P,T") .OUT("PUSH"-"P,[0]")
12400 .OUT("CAM"^2*-"T,T+1") .OUT("SETCMM"-"(P)");
12500
12600 REL: ".EQ." #2"N" / ".NE." #2"E" / ".LT." #2"GE" /
12700 ".LE." #2"G" / ".GT." #2"LE" / ".GE." #2"L" ;
12800
12900 AREX: TERM *("+" TERM .OUT("POP"-"P,T") .OUT("ADDM"-"T,(P)")/
13000 "-" TERM .OUT("POP"-"P,T") .OUT("EXCH"-"T,(P)")
13100 .OUT("SUBM"-"T,(P)"));
13200
13300 TERM: PRIME *("*" PRIME .OUT("POP"-"P,T") .OUT("IMULM"-"T,(P)")/
13400 "/" PRIME .OUT("POP"-"P,T") .OUT("EXCH"-"T,(P)") .OUT("IDIVM"-"T,(P)")/
13500 "REM" PRIME .OUT("POP"-"P,T") .OUT("EXCH"-"T,(P)")
13600 .OUT("IDIV"-"T,(P)") .OUT("MOVEM"-"T+1,(P)"));
13700
13800 PRIME: .NUMBER .OUT("PUSH"-"P,[DEC "*"]")/
13900 "(" AREX ")" / "-" PRIME .OUT("MOVNS"-"(P)")/
14000 "*L" .OUT("PUSHJ"-"P,%XLEN")/
14100 "*" .OUT("PUSHJ"-"P,%GETNM")/
14200 "SL#" .NUMBER .OUT("PUSHJ"-"P,%LEVEL") .OUT("DEC"-*)/
14300 "S#" .OUT("PUSHJ"-"P,%XSYMB")/
14400 "CL#" .OUT("PUSHJ"-"P,%CLEVL")/
14500 "BL#" .OUT("PUSHJ"-"P,%BLEVL")/
14600 "B#" .OUT("PUSHJ"-"P,%XBLK")/
14700 "C#" .OUT("PUSHJ"-"P,%XBLK+1")/
14800 "N#" .NUMBER .OUT("PUSHJ"-"P,%CALND") .OUT("XWD"-"-1,^D"*)/
14900 .ID ("(" %1 AREX ")" .OUT("POP"-"P,T")
15000 .OUT("PUSH"-"P,"^1*"-1(T)") / .EMPTY .OUT("PUSH"-"P,"*));
15100
15200 DECLARE: ".INTEGER" ITEM *("," ITEM) ;
15300
15400 ITEM: .ID .LABEL * ("(" .NUMBER ")" .OUT("BLOCK"-*)/
15500 .EMPTY .OUT("BLOCK"-"1"));
15600
15700 COMMENT: ".COMMENT" .UNTIL ";" ;
15800
15900 ST: .ID ":" .LABEL * .OUT("HRLM"-"F,(P)") .OUT("ADDI"-"F,4")
16000 *EX1 ";" .OUT("POPJ"-"P,")/COMMENT;
16100
16200 META2: ".SYNTAX" .ID .OUT("TITLE"-*) SETUP
16300 .OUT("ENTRY"-"%MESS1") .LABEL "%MESS1" .OUT("ASCIZ"-"/"*": /") .OUT("BLOCK"-"20")
16400 .OUT("ENTRY"-"%MESS2") .LABEL "%MESS2" ("(" %1 .ID ")"
16500 .OUT("SIXBIT"-"/"*"/") ^1 / .OUT("SIXBIT"-"/MAC/"))
16600 .LABEL "%META2" .OUT("JSR"-"%RESET") .OUT("JSR"-"%RESET+2")
16700 .OUT("PUSHJ"-"P," *) .OUT("JUMPGE"-"F,%ERROR")
16800 .OUT("JRST"-"%FIN") *ST ".END" .OUT("END"-"%META2")/
16900 ".SUBSYNTAX" .ID .OUT("TITLE"-*) SETUP *ST ".END" .OUT("END");
17000
17100 SETUP: .OUT("EXTERN"-"%ID,%NUM,%STR,%GEN,%PUSH,%POP,%ERROR,%LEN")
17200 .OUT("EXTERN"-"%UNTIL,%TST,%COPYL,%COPYI,%TYPE,%RESET")
17300 .OUT("EXTERN"-"%BEGIN,%END,%BLOCK,%LIST,%LOOK,%SET,%CHECK")
17400 .OUT("EXTERN"-"%CLEAR,%SCAN,%GETNM,%PUTNM,%XLEN,%XBLK")
17500 .OUT("EXTERN"-"%GET,%PUT,%LEVEL,%SYMB,%XSYMB,%BLEVL,%FIN")
17600 .OUT("EXTERN"-"%CLEVL,%MAKND,%SETRE,%CPYDC,%CALND,%DMPTR,%MARK")
17700 .OUT("STK1="-"4")
17800 .OUT("P="-"17") .OUT("F="-"16") .OUT("SUCCES="-"400000")
17900 .OUT("NDELET="-"200000") .OUT("BACKUP="-"100000")
18000 .OUT("SCATEN="-"040000") .OUT("T="-"1") %3
18100 *(DECLARE/OUTSIDE/COMMENT) ^3;
18200
18300 OUTSIDE: ".INTERNAL" .ID .OUT("ENTRY"-*)
18400 *("," .ID .OUT("ENTRY"-*))/
18500 ".EXTERNAL" .ID .OUT("EXTERN"-*)
18600 *("," .ID .OUT("EXTERN"-*));
18700
18800 .END