(****************************************
*                                       *
*  MODULA-2 Operating System Interface  *
*  ***********************************  *
*                                       *
*       VAX/VMS Implementation          *
*                                       *
*                                       *
*     OpcodeTable:                      *
*                                       *
*     Definitions of the VAX-11         *
*     instruction set, in terms of the  *
*     opcode mnemonics and their        *
*     operand types.                    *
*     To this definition module belongs *
*     the macro file OPCODETAB.MAR      *
*     which contains the initialized    *
*     variables defined below.          *
*                                       *
*     Version 3.1 of  1-FEB-1983        *
*                                       *
*                                       *
*                                       *
*                                       *
****************************************)

(****************************************
* Updates:                              *
****************************************)

%FOREIGN DEFINITION MODULE OpcodeTable; (* M. Mall *)

  FROM SYSTEM IMPORT BYTE;

  EXPORT QUALIFIED OpcodeRange, OpcodeRecord, OpcodeTable,
                   OPCTAB, XFCTAB;

  TYPE
    OpcodeRange = [0..255];
    OpcodeRecord = RECORD
                     Name: ARRAY [0..5] OF CHAR;
                     Args: ARRAY [0..9] OF BYTE;
                   END;
    (* arg[0] = number of operands for this instruction *)
    (* arg[i] (i > 0 AND i <= 6) =                      *)
    (*    arg[i] MOD 8 = access type of operand i       *)
    (*    arg[i] DIV 8 = data type of operand i         *)
    (* access type = (address, read, modify, write,     *)
    (*                field, branch)                    *)
    (* data type = (unknown, byte, word, longword,      *)
    (*              quadword, octaword, float,          *)
    (*              d_float, g_float, h_float)          *)

    OpcodeTable = ARRAY OpcodeRange OF OpcodeRecord;

  VAR
    OPCTAB: OpcodeTable; (* 1byte instructions*)
    XFCTAB: OpcodeTable; (* extended instruction set, 2 byte instruction codes
                            first byte is FD *)

END OpcodeTable.
