TITLE      ASSEMBLY LANGUAGE DEFINITION FILE FOR EXAMPLE COMPUTER DESIGN
WORD       32
WIDTH      72
LINES      161
;**********************************************************************
;REGISTER ASSIGNMENTS - REGISTER DIRECT ADDRESSING
;**********************************************************************
R0:         EQU     B#00000
R1:         EQU     B#00001
R2:         EQU     B#00010
R3:         EQU     B#00011
R4:         EQU     B#00100
R5:         EQU     B#00101
R6:         EQU     B#00110
R7:         EQU     B#00111
R8:         EQU     B#01000
R9:         EQU     B#01001
R10:        EQU     B#01010
R11:        EQU     B#01011
R12:        EQU     B#01100
R13:        EQU     B#01101
R14:        EQU     B#01110
R15:        EQU     B#01111
R16:        EQU     B#10000
R17:        EQU     B#10001
R18:        EQU     B#10010
R19:        EQU     B#10011
R20:        EQU     B#10100
R21:        EQU     B#10101
R22:        EQU     B#10110
R23:        EQU     B#10111
R24:        EQU     B#11000
R25:        EQU     B#11001
R26:        EQU     B#11010
R27:        EQU     B#11011
R28:        EQU     B#11100
R29:        EQU     B#11101
R30:        EQU     B#11110
R31:        EQU     B#11111


;**********************************************************************
; INSTRUCTION OPCODE LABELS - MUST BE 6-BITS, 2 OCTAL DIGITS
;**********************************************************************
OPSPECIAL:      EQU     Q#00
OPJ:            EQU     Q#02
OPJAL:          EQU     Q#03
OPBEQZ:         EQU     Q#04
OPBNEZ:         EQU     Q#05
OPADDI:         EQU     Q#06
OPADDUI:        EQU     Q#07
OPSUBI:         EQU     Q#12
OPSUBUI:        EQU     Q#13
OPANDI:         EQU     Q#14
OPORI:          EQU     Q#15
OPXORI:         EQU     Q#16
OPLHI:          EQU     Q#17
OPJR:           EQU     Q#20
OPJALR:         EQU     Q#21
OPSEQI:         EQU     Q#30
OPSNEI:         EQU     Q#31
OPSLTI:         EQU     Q#32
OPSGTI:         EQU     Q#33
OPSLEI:         EQU     Q#36
OPSGEI:         EQU     Q#37
OPLB:           EQU     Q#40
OPLH:           EQU     Q#41
OPLW:           EQU     Q#43
OPLBU:          EQU     Q#44
OPLHU:          EQU     Q#45
OPSB:           EQU     Q#50
OPSH:           EQU     Q#51
OPSW:           EQU     Q#53
OPPUTC:         EQU     Q#54
OPNOP:          EQU     Q#77
;********
;SPECIAL OPCODES IN LAST 6 BITS OF INSTRUCTION
;********
FSLLI:         EQU     Q#00
FSRLI:         EQU     Q#02
FSRAI:         EQU     Q#03
FSLL:          EQU     Q#04
FSRL:          EQU     Q#06
FSRA:          EQU     Q#07
FADD:          EQU     Q#40
FADDU:         EQU     Q#41
FSUB:          EQU     Q#42
FSUBU:         EQU     Q#43
FAND:          EQU     Q#44
FOR:           EQU     Q#45
FXOR:          EQU     Q#56
FSEQ:          EQU     Q#50
FSNE:          EQU     Q#51
FSLT:          EQU     Q#52
FSGT:          EQU     Q#53
FSLE:          EQU     Q#54
FSGE:          EQU     Q#55
;**********************************************************************
;INSTRUCTION FORMAT TYPE FIELD
;**********************************************************************
NULL5:      EQU     B#00000          ;5-bit ZERO VALUE
NULL16:     EQU     H#0000           ;16-BIT ZERO VALUE
NULL10:     EQU     B#0000000000     ;12-BIT NULL
BLANK5:     SUB     5VNULL5             ;5-BIT FIELD
BLANK16:    SUB     16VNULL16          ;16-BIT FIELD
DW:         DEF     16VH#0000,16VH#0000    ;32-BIT DATA DIRECTIVE
;**********************************************************************
;ASSEMBLY LANGUAGE INSTRUCTIONS
;**********************************************************************
ADD:        DEF     OPSPECIAL,BLANK5,BLANK5,BLANK5,B#00000,FADD
ADDI:       DEF     OPADDI,BLANK5,BLANK5,BLANK16
ADDU:       DEF     OPSPECIAL,BLANK5,BLANK5,BLANK5,B#00000,FADDU
ADDUI:      DEF     OPADDUI,BLANK5,BLANK5,BLANK16
SUBT:       DEF     OPSPECIAL,BLANK5,BLANK5,BLANK5,B#00000,FSUB
SUBI:       DEF     OPSUBI,BLANK5,BLANK5,BLANK16
SUBU:       DEF     OPSPECIAL,BLANK5,BLANK5,BLANK5,B#00000,FSUBU
SUBUI:      DEF     OPSUBUI,BLANK5,BLANK5,BLANK16
AND:        DEF     OPSPECIAL,BLANK5,BLANK5,BLANK5,B#00000,FAND
ANDI:       DEF     OPANDI,BLANK5,BLANK5,BLANK16
OR:         DEF     OPSPECIAL,BLANK5,BLANK5,BLANK5,B#00000,FOR
ORI:        DEF     OPORI,BLANK5,BLANK5,BLANK16
XOR:        DEF     OPSPECIAL,BLANK5,BLANK5,BLANK5,B#00000,FXOR
XORI:       DEF     OPXORI,BLANK5,BLANK5,BLANK16
LHI:        DEF     OPLHI,BLANK5,BLANK5,BLANK16
SLL:        DEF     OPSPECIAL,BLANK5,BLANK5,BLANK5,BLANK5,FSLL
SRL:        DEF     OPSPECIAL,BLANK5,BLANK5,BLANK5,B#00000,FSRL
SRA:        DEF     OPSPECIAL,BLANK5,BLANK5,BLANK5,B#00000,FSRA
SLLI:       DEF     OPSPECIAL,BLANK5,BLANK5,BLANK5,B#00000,FSLLI
SRLI:       DEF     OPSPECIAL,BLANK5,BLANK5,BLANK5,B#00000,FSRLI
SRAI:       DEF     OPSPECIAL,BLANK5,BLANK5,BLANK5,B#00000,FSRAI
;
SLT:        DEF     OPSPECIAL,BLANK5,BLANK5,BLANK5,B#00000,FSLT
SGT:        DEF     OPSPECIAL,BLANK5,BLANK5,BLANK5,B#00000,FSGT
SLE:        DEF     OPSPECIAL,BLANK5,BLANK5,BLANK5,B#00000,FSLE
SGE:        DEF     OPSPECIAL,BLANK5,BLANK5,BLANK5,B#00000,FSGE
SEQ:        DEF     OPSPECIAL,BLANK5,BLANK5,BLANK5,B#00000,FSEQ
SNE:        DEF     OPSPECIAL,BLANK5,BLANK5,BLANK5,B#00000,FSNE
;
SLTI:       DEF     OPSLTI,BLANK5,BLANK5,BLANK16
SGTI:       DEF     OPSGTI,BLANK5,BLANK5,BLANK16
SLEI:       DEF     OPSLEI,BLANK5,BLANK5,BLANK16
SGEI:       DEF     OPSGEI,BLANK5,BLANK5,BLANK16
SEQI:       DEF     OPSEQI,BLANK5,BLANK5,BLANK16
SNEI:       DEF     OPSNEI,BLANK5,BLANK5,BLANK16
;
LB:         DEF     OPLB,BLANK5,BLANK5,BLANK16
LBU:        DEF     OPLBU,BLANK5,BLANK5,BLANK16
SB:         DEF     OPSB,BLANK5,BLANK5,BLANK16
LH:         DEF     OPLH,BLANK5,BLANK5,BLANK16
LHU:        DEF     OPLHU,BLANK5,BLANK5,BLANK16
SH:         DEF     OPSH,BLANK5,BLANK5,BLANK16
LW:         DEF     OPLW,BLANK5,BLANK5,BLANK16
SW:         DEF     OPSW,BLANK5,BLANK5,BLANK16
BEQZ:       DEF     OPBEQZ,BLANK5,NULL5,BLANK16
BNEZ:       DEF     OPBNEZ,BLANK5,NULL5,BLANK16
J:          DEF     OPJ,26VB#00000000000000000000000000
JR:         DEF     OPJR,BLANK5,NULL16,B#01000
JAL:        DEF     OPJAL,26VB#00000000000000000000000000
JALR:       DEF     OPJALR,BLANK5,NULL5,BLANK5,NULL5,B#001001
NOP:        DEF     OPADDI,BLANK5,BLANK5,BLANK16
PUTC:       DEF     OPPUTC,BLANK5,BLANK5,BLANK16
;
END
