!*********************************************************************
!*                                                                   *
!*             DRS 8086 Instruction Set                              *
!*                                                                   *
!*********************************************************************
%constinteger           ADD  =    0  {00}
%constinteger          PUSH  =    6  {06}
%constinteger           POP  =    7  {07}
%constinteger            OR  =    8  {08}
%constinteger           ADC  =   16  {10}
%constinteger           SBB  =   24  {18}
%constinteger           AND  =   32  {20}
%constinteger           SEG  =   38  {26}
%constinteger           DAA  =   39  {27}
%constinteger           SUB  =   40  {28}
%constinteger           DAS  =   47  {2F}
%constinteger           XOR  =   48  {30}
%constinteger           AAA  =   55  {37}
%constinteger           CMP  =   56  {38}
%constinteger           AAS  =   63  {3F}
%constinteger           INC  =   64  {40}
%constinteger           DEC  =   72  {48}
%constinteger            JO  =  112  {70}
%constinteger           JNO  =  113  {71}
%constinteger            JB  =  114  {72}
%constinteger          JNAE  =  114  {72}
%constinteger           JNB  =  115  {73}
%constinteger           JAE  =  115  {73}
%constinteger            JE  =  116  {74}
%constinteger            JZ  =  116  {74}
%constinteger           JNE  =  117  {75}
%constinteger           JNZ  =  117  {75}
%constinteger           JBE  =  118  {76}
%constinteger           JNA  =  118  {76}
%constinteger          JNBE  =  119  {77}
%constinteger            JA  =  119  {77}
%constinteger            JS  =  120  {78}
%constinteger           JNS  =  121  {79}
%constinteger            JP  =  122  {7A}
%constinteger           JPE  =  122  {7A}
%constinteger           JNP  =  123  {7B}
%constinteger           JPO  =  123  {7B}
%constinteger            JL  =  124  {7C}
%constinteger          JNGE  =  124  {7C}
%constinteger           JNL  =  125  {7D}
%constinteger           JGE  =  125  {7D}
%constinteger           JLE  =  126  {7E}
%constinteger           JNG  =  126  {7E}
%constinteger          JNLE  =  127  {7F}
%constinteger            JG  =  127  {7F}
%constinteger         IMMED  =  128  {80}
%constinteger          TEST  =  132  {84}
%constinteger          XCHG  =  134  {86}
%constinteger           MOV  =  136  {88}
%constinteger           LEA  =  141  {8D}
%constinteger           CBW  =  152  {98}
%constinteger           CWD  =  153  {99}
%constinteger          CALL  =  154  {9A}
%constinteger          WAIT  =  155  {9B}
%constinteger         PUSHF  =  156  {9C}
%constinteger          POPF  =  157  {9D}
%constinteger          SAHF  =  158  {9E}
%constinteger          LAHF  =  159  {9F}
%constinteger          MOVL  =  163  {A3}
%constinteger          MOVS  =  164  {A4}
%constinteger          MOVW  =  165  {A5}
%constinteger          CMPS  =  166  {A6}
%constinteger          STDS  =  170  {AA}
%constinteger          LODS  =  172  {AC}
%constinteger          SCAS  =  174  {AE}
%constinteger           RET  =  195  {C3}
%constinteger           LES  =  196  {C4}
%constinteger           LDS  =  197  {C5}
%constinteger         ENTER  =  200  {C8}
%constinteger         LEAVE  =  201  {C9}
%constinteger          LRET  =  203  {CB}
%constinteger           INT  =  204  {CC}
%constinteger          INTO  =  206  {CE}
%constinteger          IRET  =  207  {CF}
%constinteger          ROL   =  208  {D0}
%constinteger          ROR   =  209  {D1}
%constinteger          RCL   =  210  {D2}
%constinteger          RCR   =  211  {D3}
%constinteger          SHL   =  212  {D4}
%constinteger          SAL   =  212  {D4}
%constinteger          SHR   =  213  {D5}
%constinteger          SAR   =  215  {D7}
%constinteger           AAM  =  212  {D4}
%constinteger           AAD  =  213  {D5}
%constinteger          XLAT  =  215  {D7}
%constinteger           ESC  =  216  {D8}
%constinteger        LOOPNZ  =  224  {E0}
%constinteger        LOOPNE  =  224  {E0}
%constinteger         LOOPZ  =  225  {E1}
%constinteger         LOOPE  =  225  {E1}
%constinteger          LOOP  =  226  {E2}
%constinteger          JCXZ  =  227  {E3}
%constinteger            IN  =  228  {E4}
%constinteger           OUT  =  230  {E6}
%constinteger           JMP  =  233  {E9}
%constinteger          LOCK  =  240  {F0}
%constinteger         REPNZ  =  242  {F2}
%constinteger           REP  =  243  {F3}
%constinteger         REPNE  =  243  {F3}
%constinteger           HLT  =  244  {F4}
%constinteger           CMC  =  245  {F5}
%constinteger           NEG  =  246  {F6}
%constinteger           NOT  =  247  {F7}
%constinteger           CLC  =  248  {F8}
%constinteger           STC  =  249  {F9}
%constinteger           CLI  =  250  {FA}
%constinteger           STI  =  251  {FB}
%constinteger           CLD  =  252  {FC}
%constinteger           STD  =  253  {FD}
%constinteger          GRP2  =  254  {FE}
!*
!*********************************************************************
!*
!*    DRS Instruction types
!*
!*********************************************************************
%CONSTINTEGERARRAY TYPE(0:255)=
{00}    ADD,   ADD,   ADD,   ADD,   ADD,   ADD,   PUSH,  POP,
{08}    OR,    OR,    OR,    OR,    OR,    OR,    PUSH,  0,
{10}    ADC,   ADC,   ADC,   ADC,   ADC,   ADC,   PUSH,  POP,
{18}    SBB,   SBB,   SBB,   SBB,   SBB,   SBB,   PUSH,  POP,
{20}    AND,   AND,   AND,   AND,   AND,   AND,   SEG,   DAA,
{28}    SUB,   SUB,   SUB,   SUB,   SUB,   SUB,   SEG,   DAS,
{30}    XOR,   XOR,   XOR,   XOR,   XOR,   XOR,   SEG,   AAA,
{38}    CMP,   CMP,   CMP,   CMP,   CMP,   CMP,   SEG,   AAS,
{40}    INC,   INC,   INC,   INC,   INC,   INC,   INC,   INC,   
{48}    DEC,   DEC,   DEC,   DEC,   DEC,   DEC,   DEC,   DEC,
{50}    PUSH,  PUSH,  PUSH,  PUSH,  PUSH,  PUSH,  PUSH,  PUSH,
{58}    POP,   POP,   POP,   POP,   POP,   POP,   POP,   POP,
{60}    0,     0,     0,     0,     0,     0,     0,     0,
{68}    0,     0,     0,     0,     0,     0,     0,     0,     
{70}    JO,    JNO,   JB,    JNB,   JE,    JNE,   JBE,   JNBE,
{78}    JS,    JNS,   JP,    JNP,   JL,    JNL,   JLE,   JNLE,  
{80}    IMMED, IMMED, IMMED, IMMED, TEST,  TEST,  XCHG,  XCHG,  
{88}    MOV,   MOV,   MOV,   MOV,   MOV,   LEA,   MOV,   POP,   
{90}    XCHG,  XCHG,  XCHG,  XCHG,  XCHG,  XCHG,  XCHG,  XCHG,  
{98}    CBW,   CWD,   CALL,  WAIT,  PUSHF, POPF,  SAHF,  LAHF,
{A0}    MOV,   MOV,   MOV,   MOV,   MOVS,  MOVS,  CMPS,  CMPS,  
{A8}    TEST,  TEST,  STDS,  STDS,  LODS,  LODS,  SCAS,  SCAS,  
{B0}    MOV,   MOV,   MOV,   MOV,   MOV,   MOV,   MOV,   MOV,
{B8}    MOV,   MOV,   MOV,   MOV,   MOV,   MOV,   MOV,   MOV,   
{C0}    0,     0,     RET,   RET,   LES,   LDS,   MOV,   MOV,
{C8}    0, LEAVE,     RET,  LRET,   INT,   INT,   INTO,  IRET,  
{D0}    ROL  , ROR  , RCL  , RCR  , SHL,   SHR,   0,      SAR,  
{D8}    ESC,   ESC,   ESC,   ESC,   ESC,   ESC,   ESC,   ESC,   
{E0}    LOOPNZ,LOOPZ, LOOP,  JCXZ,  IN,    IN,    OUT,   OUT,   
{E8}    CALL,  JMP,   JMP,   JMP,   IN,    IN,    OUT,   OUT,
{F0}    LOCK,  0,     REP,   REP,   HLT,   CMC,    NEG,   NEG,  
{F8}    CLC,   STC,   CLI,   STI,   CLD,   STD,   GRP2,  GRP2
!*
!************************************************************************
!*                                                                       *
!*        DRS instruction set as names                                   *
!*                                                                       *
!************************************************************************
%Conststring(6) %Array MNEM(0:255)=
{00}    "ADD",   "ADD",   "ADD",   "ADD",   "ADD",   "ADD",   "PUSH",  "POP",
{08}    "OR",    "OR",    "OR",    "OR",    "OR",    "OR",    "PUSH",  "", 
{10}    "ADC",   "ADC",   "ADC",   "ADC",   "ADC",   "ADC",   "PUSH",  "POP",
{18}    "SBB",   "SBB",   "SBB",   "SBB",   "SBB",   "SBB",   "PUSH",  "POP",
{20}    "AND",   "AND",   "AND",   "AND",   "AND",   "AND",   "SEG",   "DAA",
{28}    "SUB",   "SUB",   "SUB",   "SUB",   "SUB",   "SUB",   "SEG",   "DAS",
{30}    "XOR",   "XOR",   "XOR",   "XOR",   "XOR",   "XOR",   "SEG",   "AAA",
{38}    "CMP",   "CMP",   "CMP",   "CMP",   "CMP",   "CMP",   "SEG",   "AAS",
{40}    "INC",   "INC",   "INC",   "INC",   "INC",   "INC",   "INC",   "INC",   
{48}    "DEC",   "DEC",   "DEC",   "DEC",   "DEC",   "DEC",   "DEC",   "DEC",
{50}    "PUSH",  "PUSH",  "PUSH",  "PUSH",  "PUSH",  "PUSH",  "PUSH",  "PUSH",
{58}    "POP",   "POP",   "POP",   "POP",   "POP",   "POP",   "POP",   "POP",
{60}    "",      "",      "",      "",      "",      "",      "",      "", 
{68}    "",      "",      "",      "",      "",      "",      "",      "",      
{70}    "JO",    "JNO",   "JB",    "JNB",   "JE",    "JNE",   "JBE",   "JNBE",
{78}    "JS",    "JNS",   "JP",    "JNP",   "JL",    "JNL",   "JLE",   "JNLE",  
{80}    "OP80",  "OP81",  "OP82",  "OP83",  "TEST",  "TEST",  "XCHG",  "XCHG",  
{88}    "MOV",   "MOV",   "MOV",   "MOV",   "MOV",   "LEA",   "MOV",   "POP",   
{90}    "XCHG",  "XCHG",  "XCHG",  "XCHG",  "XCHG",  "XCHG",  "XCHG",  "XCHG",  
{98}    "CBW",   "CWB",   "CALL",  "WAIT",  "PUSHF", "POPF",  "SAHF",  "LAHF",
{A0}    "MOV",   "MOV",   "MOV",   "MOVL",  "MOVS",  "MOVW",  "CMPS",  "CMPW",  
{A8}    "TEST",  "TEST",  "STDS",  "STDS",  "LODS",  "LODS",  "SCAS",  "SCAS",  
{B0}    "MOV",   "MOV",   "MOV",   "MOV",   "MOV",   "MOV",   "MOV",   "MOV",
{B8}    "MOV",   "MOV",   "MOV",   "MOV",   "MOV",   "MOV",   "MOV",   "MOV",   
{C0}    "",      "",      "RET",   "RET",   "LES",   "LDS",   "MOV",   "MOV",
{C8}    "",      "LEAVE", "RET",   "RET",   "INT",   "INT",   "INTO",  "IRET",  
{D0}    "OPD0",  "OPD1",  "OPD2",  "OPD3",  "AAM",   "AAD",   "",      "XLAT",  
{D8}    "ESC",   "ESC",   "ESC",   "ESC",   "ESC",   "ESC",   "ESC",   "ESC",   
{E0}    "LOOPNZ","LOOPZ", "LOOP",  "JCXZ",  "IN",    "IN",    "OUT",   "OUT",   
{E8}    "CALL",  "JMP",   "JMP",   "JMP",   "IN",    "IN",    "OUT",   "OUT",
{F0}    "LOCK",  "",      "REP",   "REP",   "HLT",   "CMC",   " NEG",  "OPF7",  
{F8}    "CLC",   "STC",   "CLI",   "STI",   "CLD",   "STD",   "OPFE",  "OPFF"
!*
!************************************************************************
%constinteger EAX = 0
%constinteger ECX = 1
%constinteger EDX = 2
%constinteger EBX = 3
%constinteger ESP = 4
%constinteger EBP = 5
%constinteger ESI = 6
%constinteger EDI = 7
!*
%constinteger AX = 0
%constinteger CX = 1
%constinteger DX = 2
%constinteger BX = 3
%constinteger SP = 4
%constinteger BP = 5
%constinteger SI = 6
%constinteger DI = 7
!*
%constinteger AL = 0
%constinteger CL = 1
%constinteger DL = 2
%constinteger BL = 3
%constinteger AH = 4
%constinteger CH = 5
%constinteger DH = 6
%constinteger BH = 7
!*
%constinteger ES = 8
%constinteger CS = 9
%constinteger SS = 10
%constinteger DS = 11
!*
%conststring(3) %array Regname(0:7)= %c
"EAX","ECX","EDX","EBX","ESP","EBP","ESI","EDI"
!*
%conststring(3) %array Wregname(0:7)=%c
" AX","CX"," DX"," BX"," SP"," BP"," SI"," DI"
!*
%conststring(3) %array Bregname(0:7)= %c
" AL"," CL"," DL"," BL"," AH"," CH"," DH"," BH"
