GET "NLIBHDR"

GLOBAL $(

OCODEFILE:181;      CODEFILE:182;       CGWORKSIZE:183
                    PROFILING:185;      STKCHKING:186
CALLCOUNTING:187;   NAMING:188;         DEBUGGING:189
ERR.P:190;          ERR.L:191;          OCODESTREAM:192
PROGSIZE:193;       OP:194;             TEMPV:195
TEMPT:196;          BREFV:197;          BREFP:198
PROCSTK:199;        PROCSTKP:200;       REG.K:201
REG.N:202;          LABV:203;           DP:204
PARAMNUMBER:205;    STV:206;            STVP:207
INITDATALISTS:208;  CGERROR:209;        RDN:210
RDL:211;            INCODE:212;         RETURN.SET:213
MAXGN:214;          MAXLAB:215;         MAXSSP:216
INITSTACK:217;      CODE:218;           CGNAME:219
SCAN:220;           EVEN:221;           OUTPUTSECTION:222
CHECKPARAM:223;     RDGN:224;           NEXTPARAM:225
RC:226;             ARG1:227;           ARG2:228
PENDINGOP:229;      SSP:230;            STACK:231
STORE:232;          STORET:233;         LOADT:244
CGSTRING:245;       CGSTIND:246;        CGRV:247
CGPENDINGOP:248;    REGSET:249;         GENBRANCH:250
CGJUMP:251;         GETVALUE:252;       GENJ:253
CGLAB:254;          CGENTRY:255;        CGSAVE:256
CODEB:257;          CGAPPLY:258;        CGRETURN:259
PWABO:260;          MOVETOR:261;        CGGLOBCALL:262
CGSWITCH:263;       CGBYTEAP:264;       CGGLOBAL:265
CGDATA:266;         DBOUTPUT:267;       MOVETOANYR:268
GENRS:269;          CHECKBREFS:270;     GEND:271
GENRD:272;          GENKD:273;          LOOKINFREEREGS:274
CONDBRFN:275;       NEXTRSET:276;       CGCMP:277
LOSE1:278;          CGPLUS:279;         CGMINUS:280
NUMBERIS:281;       GENSHIFT:282;       FREEREG:283
GENMULDIV:284;      GENF:285;           CGLOGORANDNEQV:286
INSET:287;          CGSHIFTK:288;       GENMOV:289
FORGETALL:290;      MOVETOINDEXR:291;   MOVETOINDEXRSH:292
LOOKINREGS:293;     SETR:294;           SETINFO:295
ISFREE:296;         NEXTR:297;          REGUSEDBY:298
NEXTRFORCESET:299;  CONSB2:300;         FORGETVARS:301
STOREIN:302;        GENBYTEXCHG:303;    GENCLEARBYTE:304
CGADDK:305;         GENINCDEC:306;      CGDIADWITHR:307
CGSTATICS:308;      GENBREFJUMPS:309;   SETLAB:310
INDCODE:311;        TRANR:312;          CASEK:313
CASEL:314;          BRLABREF:315;       ADDR.M:316
ADDR.V:317;         CODEKD:318;         CODERD:319
CODERS:320;         CODED:321;          REMEM:322
FORGET:323;         FORMSADDR:324;      FORMDADDR:325
CODEDISP:326;       FORMADDR:327;       CHECKSPACE:328
SMALLNUM:329;        ASKII:330;         LABREF:331
REFLISTE:332;       DLISTE:333;         REFLIST:334
DLIST:335;          ADDABO:336;         CGLISTING:337
OBJWORD:338;        CODESTREAM:339;     WRITEWORDS:340
VERSTREAM:341;      ISEVEN:342;         GETVBYTE:343
WRITEWCOUNT:344;    PUTVBYTE:345;       INSERTCOUNT:346
GENINT:347;      ORDCH:348;       MYRDCH:349
LISTCHAN:350;         LISTCNT:351;       LISTL:352
LISTAT:353;          LISTLAB:354;          LISTGEN:355
STRINGRB:356;         SF:357
DSIZE:359
DATVEC:360
       $)

MANIFEST $(
 // BITS OF OPCODES
 // JUMPS
F.JGE = #B01111101
F.JG  = #B01111111
F.JLE = #B01111110
F.JL  = #B01111100
F.JE  = #B01110100
F.JNE = #B01110101
F.JMP = #B11101011
F.B   = F.JMP
F.JI  = #B100    // INDIRECT JUMP
F.JIS = #B101    //    "      "   INTERSEGMENT
F.CALLI = #B010  // INDIRECT CALL
F.CIS   = #B011  //    "      "   INTERSEGMENT
 // MONADIC OPERATORS REPRESENTED BY 11 BIT QUANTITIES
F.NEG = #B11110111011
F.NOT = #B11110111010
 // SHIFT OPERATORS REP. BY 11 BIT QUANTITIES
F.SHL = #B11010001100
F.SHR = #B11010001101
F.SAR = #B11010001111
 // NOP I.E. XCHG AX,AX
F.NOP = #B10010000
 // MOVES
F.MOVIMMTRM = #B11000111
F.MOVRTRM = #B10001001
F.MOVIMMTR = #B10111000
F.LEA = #B10001101
 // CONVERT WORD IN AX TO DOUBLEWORD IN AX AND DX FOR DIVISION
F.CWD = #B10011001
 // MULTIPLY AND DIVIDE
F.IMUL = #B101
F.IDIV = #B111
 // DIADICS
F.XOR = #B110
F.OR  = #B001
F.AND = #B100
F.ADD = #B000
F.SUB = #B101
F.CMP = #B111
 //
F.INC = #B000
F.DEC = #B001
 // BYTE OPERATIONS
F.XCHGB = #B10000110
F.CLRB  = #B00110000   // THIS IS XOR REG,REG
 // SOFTWARE INTERRUPT WITH TYPE GIVEN
F.INT   = #B11001101
 //
 // REGISTERS
R0 = 0; R1 = 1; R2 = 2; R3 = 3; R4 = 4; R5 = 5; R6 = 6; R7 = 7
R.BX = R0
R.AX = R1
R.CX = R2
R.DX = R3
R.SI = R4
R.BP = R5
R.SP = R6
R.DI = R7
 // SETS
V.XX  = #B11111111
V.R0  = #B00000001
V.R1  = #B00000010
V.RI  = #B00010001
V.AX  = #B00000010
V.R80 = #B00001111
V.XMULDIV = #B00010101
 //
 // TYPES
K.LAB = 3
K.NUMB = 4
K.LVLOC = 5
K.LVGLOB = 6
K.LVLAB = 7
K.REG = 8
K.MLOC = 9
K.MLAB = 10
K.MGLOB = 11
K.NONE = 12
K.ROFF = 14
K.LOC = R.BP + K.ROFF
K.GLOB = R.DI + K.ROFF
K.XBX = R.BX + K.ROFF
K.XSI = R.SI + K.ROFF
 // M/C TYPES
M.LOC  = #B110
M.GLOB = #B101
M.BX   = #B111
M.SI   = #B100
M.BP   = #B110
M.DI   = #B101
M.LAB  = 1
M.REG  = 2
M.IMM  = 3
 // GLOBALS USED
GN.STOP       = 2
GN.IPDUMP     = 8
 //
 // INTERRUPT TYPES
I.STKCHECK    = 33
 //
 // OBJECT MODULE TYPES
T.HUNK   = 1000
T.END    = 1002
T.RELOCB = 1005
 //
SECWORD = 12345
 //
SAVESPACESIZE = 4
//
// AE TREE AND OCODE OPERATORS
S.TRUE=4; S.FALSE=5
S.RV=8; S.FNAP=10
S.MULT=11; S.DIV=12; S.REM=13; S.PLUS=14
S.MINUS=15; S.QUERY=16; S.NEG=17; S.ABS=19
S.EQ=20; S.NE=21; S.LS=22; S.GR=23; S.LE=24; S.GE=25
S.NOT=30; S.LSHIFT=31; S.RSHIFT=32; S.LOGAND=33
S.LOGOR=34; S.EQV=35; S.NEQV=36
S.NEEDS=48; S.SECTION=49
S.RTAP=51; S.GOTO=52
S.RETURN=67; S.FINISH=68
S.SWITCHON=70; S.GLOBAL=76

// OCODE OPERATORS
S.LP=40; S.LG=41; S.LN=42; S.LSTR=43; S.LL=44
S.LLP=45; S.LLG=46; S.LLL=47
S.LOCAL=77; S.LABEL=78
S.SP=80; S.SG=81; S.SL=82; S.STIND=83
S.JUMP=85; S.JT=86; S.JF=87; S.ENDFOR=88
S.LAB=90; S.STACK=91; S.STORE=92; S.RSTACK=93
S.ENTRY=94; S.SAVE=95; S.FNRN=96; S.RTRN=97
S.RES=98; S.DATALAB=100; S.ITEML=101; S.ITEMN=102
S.ENDPROC=103; S.GETBYTE=120; S.PUTBYTE=121

S.DEBUG=109; S.NONE=111
 //
 // SELECTORS
H1 = 0; H2 = 1; H3 = 2; H4 = 3; H5 = 4; H6 = 5
         $)