	.TITLE	RODATA
	.IDENT	/hah002/
	.PSECT	RODATA,RO,D
	.NLIST	BEX
 
;
; VERSION 01
;
; TOM GETZINGER  21-SEP-80
;
; Modified:	07-Nov-83	hah002
;		Add code to handle library base additive RLD
;
; THIS MODULE CONTAINS MOST GLOBAL CONSTANTS
;
; LOCAL MACROS
;
 
.MACRO	INST	MNEM	MASK	OPLST	TYPE
	.WORD	MASK,MNEM
	.RAD50	/MNEM/
	.NCHR	LEN,MNEM
	.IIF LE	LEN-3	.WORD	0
	OP=0
	OPM=1
	.IRP	COP,<OPLST>
	OP=	COP*OPM+OP
	OPM=	OPM*20
	.ENDR
	.BYTE	OP
	.IIF B	<TYPE>,	.BYTE	0
	.IIF NB	<TYPE>,	.BYTE	S.'TYPE
	.ENDM
 
;
; INSTRUCTION TABLE
;
 
INSTBL::
	INST	HALT	177777	<>
	INST	WAIT	177777	<>
	INST	RTI	177777	<>
	INST	BPT	177777	<>
	INST	IOT	177777	<>
	INST	RESET	177777	<>
	INST	RTT	177777	<>
	INST	JMP	177700	<1>
	INST	RETURN	177777	<>
	INST	RTS	177770	<6>
	INST	SPL	177770	<12>
	INST	NOP	177777	<>
	INST	CLC	177777	<>
	INST	CLV	177777	<>
	INST	CLZ	177777	<>
	INST	CLN	177777	<>
	INST	CCC	177777	<>
	INST	SEC	177777	<>
	INST	SEV	177777	<>
	INST	SEZ	177777	<>
	INST	SEN	177777	<>
	INST	SCC	177777	<>
	INST	SWAB	177700	<1>
	INST	BR	177400	<4>
	INST	BNE	177400	<4>
	INST	BEQ	177400	<4>
	INST	BGE	177400	<4>
	INST	BLT	177400	<4>
	INST	BGT	177400	<4>
	INST	BLE	177400	<4>
	INST	CALL	177700	<1>
	INST	JSR	177000	<3,1>
	INST	CLR	077700	<1>
	INST	COM	077700	<1>
	INST	INC	077700	<1>
	INST	DEC	077700	<1>
	INST	NEG	077700	<1>
	INST	ADC	077700	<1>
	INST	SBC	077700	<1>
	INST	TST	077700	<1>
	INST	ROR	077700	<1>
	INST	ROL	077700	<1>
	INST	ASR	077700	<1>
	INST	ASL	077700	<1>
	INST	MARK	177000	<5>
	INST	MFPI	177700	<1>
	INST	MTPI	177700	<1>
	INST	SXT	177700	<1>
	INST	MOV	070000	<2,1>
	INST	CMP	070000	<2,1>
	INST	BIT	070000	<2,1>
	INST	BIC	070000	<2,1>
	INST	BIS	070000	<2,1>
	INST	ADD	170000	<2,1>
	INST	MUL	177000	<1,3>	EIS
	INST	DIV	177000	<1,3>	EIS
	INST	ASH	177000	<1,3>	EIS
	INST	ASHC	177000	<1,3>	EIS
	INST	XOR	177000	<3,1>	EIS
	INST	FADD	177770	<6,0>	FIS
	INST	FSUB	177770	<6,0>	FIS
	INST	FMUL	177770	<6,0>	FIS
	INST	FDIV	177770	<6,0>	FIS
	INST	SOB	177000	<3,7>	EIS
	INST	BPL	177400	<4>
	INST	BMI	177400	<4>
	INST	BHI	177400	<4>
	INST	BLOS	177400	<4>
	INST	BVC	177400	<4>
	INST	BVS	177400	<4>
	INST	BCC	177400	<4>
	INST	BCS	177400	<4>
	INST	EMT	177400	<13>
	INST	TRAP	177400	<13>
	INST	MFPD	177700	<1>
	INST	MTPD	177700	<1>
	INST	SUB	170000	<2,1>
	INST	CFCC	177777	<>	FPP
	INST	SETF	177777	<>	FPP
	INST	SETI	177777	<>	FPP
	INST	SETD	177777	<>	FPP
	INST	SETL	177777	<>	FPP
	INST	LDFPS	177700	<1>	FPP
	INST	STFPS	177700	<1>	FPP
	INST	STST	177700	<1>	FPP
	INST	CLRF	177700	<11>	FPP
	INST	TSTF	177700	<11>	FPP
	INST	ABSF	177700	<11>	FPP
	INST	NEGF	177700	<11>	FPP
	INST	MULF	177400	<11,10>	FPP
	INST	MODF	177400	<11,10>	FPP
	INST	ADDF	177400	<11,10>	FPP
	INST	LDF	177400	<11,10>	FPP
	INST	SUBF	177400	<11,10>	FPP
	INST	CMPF	177400	<11,10>	FPP
	INST	STF	177400	<10,11>	FPP
	INST	DIVF	177400	<11,10>	FPP
	INST	STEXP	177400	<10,1>	FPP
	INST	STCFI	177400	<10,11>	FPP
	INST	STCFD	177400	<10,11>	FPP
	INST	LDEXP	177400	<1,10>	FPP
	INST	LDCIF	177400	<11,10>	FPP
	INST	LDCDF	177400	<11,10>	FPP
NINSTS	==	<.-INSTBL>/10.
 
;
; RELOCATION FORMAT FLAGS
;
 
CF.NAM	==	1		; SET IF COMMAND NEEDS A "NAME"
CF.VAL	==	2		; SET IF COMMAND NEEDS A "VALUE"
CF.DSP	==	4		; SET IF COMMAND IS DISPLACED
 
CMDFLG::.BYTE	0			; ILLEGAL
	.BYTE	CF.VAL			; INTERNAL RELOCATION
	.BYTE	CF.NAM			; GLOBAL RELOCATION
	.BYTE	CF.VAL!CF.DSP		; ABSOLUTE DISPLACED RELOCATION
	.BYTE	CF.NAM!CF.DSP		; GLOBAL DISPLACED RELOCATION
	.BYTE	CF.NAM!CF.VAL		; GLOBAL ADDITIVE RELOCATION
	.BYTE	CF.NAM!CF.VAL!CF.DSP	; GLOBAL ADDITIVE DISPLACED RELOCATION
	.BYTE	CF.NAM!CF.VAL		; LOCATION COUNTER DEFINITION
	.BYTE	CF.VAL			; LOCATION COUNTER MODIFICATION
	.BYTE	0			; PROGRAM LIMITS
	.BYTE	CF.NAM			; PSECT RELOCATION
	.BYTE	0			; ILLEGAL
	.BYTE	CF.NAM!CF.DSP		; PSECT DISPLACED RELOCATION
	.BYTE	CF.NAM!CF.VAL		; PSECT ADDITIVE RELOCATION
	.BYTE	CF.NAM!CF.VAL!CF.DSP	; PSECT ADDITIVE DISPLACED RELOCATION
	.BYTE	0			; COMPLEX RELOCATION
	.byte	cf.val			;Library base additive rel.	;hah002

;
; ASCII CONSTANTS
;
 
ASECT::	.ASCIZ	"	.ASECT"
base::	.asciz	"lib.base"						;hah002
BLKB::	.ASCIZ	"	.BLKB	"
BYTE::	.ASCIZ	".BYTE	"
CSECT::	.ASCIZ	"	.CSECT	"
END::	.ASCIZ	"	.END"
GLOBL::	.ASCIZ	"	.GLOBL	"
IDENT::	.ASCIZ	"	.IDENT	/"
LIMIT::	.ASCIZ	".LIMIT"
PPCP::	.ASCIZ	"(PC)"
PSECT::	.ASCIZ	"	.PSECT	"
TITLE::	.ASCIZ	"	.TITLE	"
WORD::	.ASCIZ	".WORD	"
.EQ.P::	.ASCIZ	"	.=.+"
.EQ.M::	.ASCIZ	"	.=.-"

	.even								;hah002
 
;
; BIT MASKS
;
 
BITMSK::.WORD	100000,040000,020000,010000,004000,002000,001000,000400
	.WORD	000200,000100,000040,000020,000010,000004,000002,000001
 
;
; SST VECTOR TABLE
;
 
SSTTBL::.WORD	0,0,0,0,0,0,ERROR
 
	.END
