ACTREF	MACRO M1110  21-AUG-78 22:26

TABLE OF CONTENTS



    32-    7	REFERENCES

    33-   54	REFERENCE DIRECTIVE ROUTINES (.REFN)

    34-   88	OPERAND REFERENCE ROUTINES

    35-  145	LITERAL AND IMMEDIATE MODES

    36-  203	DISPLACEMENT REFERENCES

    38-  296	EXPLICIT DISPLACEMENTS  AND  PIC REFERENCE

    39-  345	INDEXED REFERENCES

ACTREF	MACRO M1110  21-AUG-78 22:26  PAGE 26





      1						.IDENT	\X03.11\

      2					;

      3					; COPYRIGHT (C) 1977, 1978

      4					; DIGITAL EQUIPMENT CORPORATION, MAYNARD MASSACHUSETTS 01754

      5					;

      6					; THIS SOFTWARE IS FURNISHED UNDER A LICENSE FOR USE ON A SINGLE

      7					; COMPUTER SYSTEM AND MAY BE COPIED ONLY WITH THE INCLUSION OF THE

      8					; ABOVE COPYRIGHT NOTICE.  THIS SOFTWARE, OR ANY OTHER COPIES THEREOF,

      9					; MAY NOT BE PROVIDED OR OTHERWISE MADE AVAILABLE TO ANY OTHER PERSON

     10					; EXCEPT FOR USE ON SUCH SYSTEM AND TO ONE WHO AGREES TO THESE LICENSE

     11					; TERMS.  TITLE TO AND OWNERSHIP OF THE SOFTWARE SHALL AT ALL TIMES

     12					; REMAIN IN DEC.

     13					;

     14					; THE INFORMATION IN THIS SOFTWARE IS SUBJECT TO CHANGE WITHOUT NOTICE

     15					; AND SHOULD NOT BE CONSTRUED AS A COMMITMENT BY DIGITAL EQUIPMENT

     16					; CORPORATION.

     17					;

     18					; DEC ASSUMES NO RESPONSIBILITY FOR THE USE OR RELIABILITY OF ITS

     19					; SOFTWARE ON EQUIPMENT WHICH IS NOT SUPPLIED BY DEC.

     20					;

     21

     22					;++

     23					; FACILITY:	VAX-11 MACRO OBJECT MODULE LIBRARY "MAR.OLB"

     24					;

     25					; ABSTRACT:	THIS MODULE IS PART OF THE VAX-11 MACRO ASSEMBLER, ITS DESCRIPTION

     26					;		IS ON THE FOLLOWING PAGE.

     27					;

     28					;

     29					; ENVIRNOMENT:	VAX-11 MACRO RUNS ON ANY VAX-11 WITH COMPATIBILITY MODE, UNDER

     30					;		THE CME (COMPATIBILITY MODE EMULATOR) OF VAX/VMS OR ON A PDP-11

     31					;		WITH EXTENDED INSTRUCTIONS UNDER RSX-11/M.

     32					;

     33					; AUTHOR:	STEVE POULSEN, CREATION DATE:  22-JUL-76

     34					;		DALE A. ROEDGER, 10-JAN-77 - 19-DEC-77

     35					;		DAVE N. CUTLER

     36					;		BENN L. SCHREIBER

     37					;

     38					; MODIFIED BY:

     39					;

     40					;--

     41					.IF NDF $DATA$

ACTREF	MACRO M1110  21-AUG-78 22:26  PAGE 32





      1					.TITLE	ACTREF

      2	000000				.PSECT	ACTREF

      3					.GLOBL	REF1,	REF2,	REF3,	RFHD1,	RFHD2,	RFHD4,	RFHD8,	DIRREF

      4					.GLOBL	RDEFER,	AUTOI,	AUTOII,	AUTODC,	DISP,	DISPI,	LITERL,	AINC1

      5					.GLOBL	AINC2,	AINC3,	AUTOI3,	DISPL1,	DISPL2,	DISPL3,	DISPL4,	DISPL5

      6					.GLOBL	DISPL6,	DISPL7,	DISPL8,	GENLDS,	INDEX

      7					.SBTTL	REFERENCES

      8					;

      9					;			REFERENCES

     10					;

     11					; OPERANDS OF MACHINE INSTRUCTION ARE SPECIFIED BY REFERENCES.  BEFORE

     12					; THESE ROUTINES ARE CALLED, THE FOLLOWING FLAGS MUST BE SET:

     13					;

     14					;	OPSIZE = SIZE OF OPERAND IN BYTES (DEPENDS ON INSTRUCTION)

     15					;

     16					;	REFSIZE = USER SUPPLIED REF WIDTH (IE. MOVL ^S#1,R0)

     17					;		  THIS VALUE MUST BE SET TO THE DEFAULT SIZE IF

     18					;		  THE USER SPECIFIED NO WIDTH.

     19					;

     20					;

     21					; THESE ROUTINES GENERATE INTERMEDIATE CODE SPECIFYING THE MODE(S) AND

     22					; REGISTER(S) USED BY THE REF.

     23					;

     24					; THE RESULTS ARE RETURNED IN <VAL1, VAL2> AS FOLLOWS:

     25					;

     26					;	VAL1 (UPPER) = IMODE ('E' MODE IF INDEX MODE)

     27					;	VAL1 (LOWER) = MODE  (MODE OF OPERAND)

     28					;	VAL2 (UPPER) = IREG  ('E' REGISTER IF INDEX MODE)

     29					;	VAL2 (LOWER) = REG   (REGISTER USED BY OPERAND)

     30					;

     31					; THE VALUE OF '$PC' IS UPDATED BY THE SIZE OF THE REFERENCE AND ASSOCIATED

     32					; VALUE IF ANY.

     33					;

     34					; ADDRESSING MODE DEFINITIONS

     35					;

     36		000000 			M.LIT	==	0.		; LITERAL

     37		000001 			M.IMM	==	1.		; IMMEDIATE

     38		000002 			M.ABS	==	2.		; ABSOLUTE MODE

     39		000003 			M.PIC	==	3.		; G^E	 POSITION INDEPENDENT OPERAND

     40		000004 			M.INDEX == 	4.		; E[R]	 INDEXED

     41		000005 			M.REG	==	5.		; R	 REGISTER

     42		000006 			M.RRIND ==	6.		; (R)	 REGISTER DEFERRED

     43		000007 			M.MNSRE ==	7.		; -(R)	 AUTO DECREMENT

     44		000010 			M.RPLUS	==	8.		; (R)+	 AUTO INCREMENT

     45		000011 			M.DRPLU == 	9.		; @(R)+  DEFERRED AUTO INCREMENT

     46		000012 			M.D8	==	10.		; B^D(R) BYTE DISPLACEMENT

     47		000013 			M.DFD8	==	11.		; @B^D(R) DEFERRED BYTE DISPLACEMENT

     48		000014 			M.D16	==	12.		; W^D(R) WORD DISPLACEMENT

     49		000015 			M.DFD16	==	13.		; @W^D(R) DEFERRED WORD DISPLACEMENT

     50		000016 			M.D32	==	14.		; L^D(R) LONGWORD DISPLACEMENT

     51		000017 			M.DFD32	==	15.		; @L^D(R) DEFERRED LONGWORD DISPLACEMENT

     52

ACTREF	MACRO M1110  21-AUG-78 22:26  PAGE 33

REFERENCE DIRECTIVE ROUTINES (.REFN)



     54					.SBTTL REFERENCE DIRECTIVE ROUTINES (.REFN)

     55

     56	000000				DIRREF:	;(DBG)			; DIRECTIVE = REF_HEAD REF

     57	000000					OUT	#I.REF,<VAL1,VAL2,OPSIZE>	; OUTPUT REFERENCE

     58	000024					IF OPSIZE EQ #8. ANDB VAL1 EQ #M.IMM THEN ; QUAD IMMEDIATE REF?

     59	000044					    OUT	#I.STIL,<VAL3,VAL4>		; UPPER 16 BITS

     60	000064					END;IF

     61	000064					RETURN

     62

     63	000066				RFHD1:				; REF_HEAD = KREF1

     64	000066					LET OPSIZE	:= #1

     65	000074					GOTO	RFHDEX

     66

     67	000076				RFHD2:				; REF_HEAD = KREF2

     68	000076					LET OPSIZE	:= #2

     69	000104					GOTO	RFHDEX

     70

     71	000106				RFHD4:				; REF_HEAD = KREF4

     72	000106					LET OPSIZE	:= #4

     73	000114					GOTO	RFHDEX

     74

     75	000116				RFHD8:				; REF_HEAD = KREF8

     76	000116					LET OPSIZE	:= #8.

     77

     78	000124				RFHDEX:					; ".REFX" EXIT POINT

     79	000124					LET MOPPTR	:= #DATPTR	; POINT TO TEMP WORD

     80	000132					LET DATPTR	:= 0		; ALL MODES LEGAL

     81	000136					LET IREG	:= 0		; INITIALIZE RESULT

     82	000142					LET IMODE	:= 0		;

     83	000146					LET EVALEXPR	:= TRUE		; EVALUATE EXPR

     84	000154					LET COMPEXPR	:= TRUE		; ASSUME COMPILE TIME EXPR

     85	000162					RETURN				;

     86

ACTREF	MACRO M1110  21-AUG-78 22:26  PAGE 34

OPERAND REFERENCE ROUTINES



     88					.SBTTL	OPERAND REFERENCE ROUTINES

     89

     90	000164				REF1:	;(DBG)			; REF = BASIC_REF

     91	000164				REF3:				; REF = INDEX_REF

     92	000164				REFEXIT:				; GENERAL REF EXIT

     93	000164					LET VAL1	:B= MODE	; ENCODE MODE/REG

     94	000172					LET VAL1+1	:B= IMODE	; INTO VAL1/VAL2

     95	000200					LET VAL2	:B= REG		;

     96	000206					LET VAL2+1	:B= IREG	;

     97	000214					RETURN				;

     98

     99	000216				REF2:				; REF = RRREG

    100	000216					LET MODE	:= #M.REG	;

    101	000224					LET REG		:= VAL1		;

    102	000232					CALL REFERR			; CHECK FOR ERROR, INC PC

    103	000236					GOTO REFEXIT

    104

    105	000240				RDEFER:				; BASIC_REF = DOPN RRREG DCLS

    106	000240					LET MODE	:= #M.RRIND	; INDIRECT REGISTER

    107	000246					LET REG		:= V1STACK-2(R4) ; LOAD REGISTER NUMBER

    108	000254					CALL REFERR			; CHECK FOR ERROR, INC PC

    109	000260					RETURN

    110

    111	000262				AUTOI:				; BASIC_REF = AUTO_INC

    112	000262				DISP:				; BASIC_REF = DISPLACEMENT

    113	000262					RETURN

    114

    115	000264				AUTOII:				; BASIC_REF = DAT AUTO_INC

    116	000264					CALL INDXCH			; FORCE LITERAL TO IMMEDIATE

    117	000270					CALL INDXCH			; FORCE LONGWORD CONTEXT

    118	000274					LET MODE	:= MODE +1	; MODE = M.ABS

    119	000300					RETURN				;

    120

    121	000302				AUTODC:				; BASIC_REF = DMINUS DOPN RRREG DCLS

    122	000302					LET MODE	:= #M.MNSREG	; AUTO DECREMENT

    123	000310					LET REG		:= V1STACK-2(R4) ; LOAD REGISTER NUMBER

    124	000316					CALL REFERR			; CHECK FOR ERROR, INC PC

    125	000322					RETURN

    126

    127	000324				DISPI:				; BASIC_REF = DAT DISPLACEMENT

    128	000324					IF MODE EQ #M.ABS THEN LET MODE := #M.D32 ; FOR AMA KLUDGE

    129	000342					IF MODE EQ #M.PIC THEN LET MODE := #M.D32 ; FOR "@G^E"

    130	000360					IF MODE EQ #M.RRIND THEN	; DE-OPTIMIZE

    131	000370					    INCRPC	#1		; ONE MORE BYTE

    132	000402					    LET MODE	:= #M.D8	; BYTE DISPLACEMENT

    133	000410					END;IF

    134	000410					CALL INDXCH			; CHECK MODES FOR DEFERRAL

    135	000414					LET MODE	:= MODE +1	; DEFERRED DISPLACEMENT

    136	000420					RETURN

    137

    138	000422				REFERR:

    139	000422					IF REG EQ #15. THEN

    140	000432					    CALL ERORPT,#ILLREG		; "PC" NOT ALLOWED HERE

    141	000442					END;IF

    142	000442					INCRPC		#1		; ADD ONE TO LOCATION COUNTER

    143	000454					RETURN				;

ACTREF	MACRO M1110  21-AUG-78 22:26  PAGE 35

LITERAL AND IMMEDIATE MODES



    145					.SBTTL	LITERAL AND IMMEDIATE MODES

    146

    147	000456				LITERL:	;(DBG)			; REF = DSUP DPOUND EXPR

    148	000456					IF ABSEXPR IS NE THEN LET EXPOPT := FALSE

    149	000470					LET MODE	:= #M.LIT

    150	000476					INCRPC		#1

    151	000510					LET EXPOP1	:= V1STACK(R4)

    152	000516					LET EXPOP2	:= V2STACK(R4)

    153	000524					IF RDXPTR EQ #FLTPNT THEN		; FLOATING POINT INSTRUCTION

    154	000534					    LET R0 := EXPOP1 + #140000 SHIFT #-4 ; CONVERT FLOATING LITERAL

    155	000550					    LET EXPOP1	:= R0			; RESTORE NEW SHORT LITERAL

    156	000554					END

    157	000554					JUMPTO	REFEXIT				; EXIT FROM REF

    158

    159	000560				AINC1:				; AUTO_INC = DOPN RRREG DCLS DPLUS

    160	000560					LET MODE	:= #M.RPLUS	; REGISTER AUTO INCREMENT

    161	000566					LET REG		:= V1STACK-4(R4) ; LOAD REGISTER NUMBER

    162	000574					CALL REFERR			; CHECK FOR ERROR, INC PC

    163	000600					RETURN

    164

    165	000602				AINC3:				; BASIC_REF = DIUP DPOUND EXPR

    166	000602					LET ABSEXPR	:= #1			; NO OPTIMIZATION

    167	000610				AINC2:				; AUTO_INC = DPOUND EXPR

    168	000610					IF ABSEXPR IS NE THEN LET EXPOPT := FALSE

    169	000622					LET EXPOP1	:= V1STACK(R4)

    170	000630					LET EXPOP2	:= V2STACK(R4)

    171	000636					IF ABSEXPR IS EQ AND EXPOP2 IS EQ THEN	; ABSOLUTE AND UPPER HALF 0

    172	000652					    IFB #^O200 SET.IN @MOPPTR THEN	; FLOATING OPCODE

    173	000662						LET R0	:= EXPOP1 + #140000	; FLOATING CONSTANT

    174	000672						IF #176017 OFF.IN R0 THEN	; CAN MAKE FLOATING SHORT LITERAL

    175	000700						    LET R0	:= R0 SHIFT #-4	; SHIFT FLOATING NUMBER

    176	000704						    LET EXPOP1	:= R0		; SAVE LITERAL FOR LATER

    177	000710						    GOTO SHFLIT			;

    178	000712						END

    179	000712					    ELSE

    180	000714						IF #^C^O77 OFF.IN EXPOP1 THEN	; NUMBER LESS THAN 64.

    181	000724				SHFLIT:		    LET MODE	:= #M.LIT	; SHORT LITERAL MODE

    182	000732						    INCRPC	#1		; CONSUME ONE BYTE

    183	000744						    GOTO AINC2X			; EXIT

    184	000746						END

    185	000746					    END;IF

    186	000746					END;IF

    187	000746					LET MODE	:= #M.IMM		; IMMEDIATE MODE

    188	000754					LET REG		:= #15.			; REGISTER IS PC

    189	000762					INCRPC		#1			;

    190	000774					INCRPC		OPSIZE			;

    191	001006				AINC2X:	RETURN

    192

    193	001010				AUTOI3:				; BASIC_REF = DAT DOPN RRREG DCLS

    194	001010					LET EXPOP1	:= 0			; ASSUME EXPRESSION OF 0

    195	001014					LET EXPOP2	:= 0

    196	001020					LET R1		:= 0

    197	001022					LET R2		:= 0

    198	001024					LET MODE	:= #M.DFD8		; BYTE OFFSET DEFERRED

    199	001032					LET REG		:= V1STACK-2(R4)	; LOAD REGISTER NUMBER

    200	001040					INCRPC		#1+1

    201	001052					RETURN

ACTREF	MACRO M1110  21-AUG-78 22:26  PAGE 36

DISPLACEMENT REFERENCES



    203					.SBTTL	DISPLACEMENT REFERENCES

    204					;++

    205					;	DISPLACEMENT OFF SPECIFIC REGISTER.

    206					;	DEFAULT DISPLACEMENT SIZE IS WORD

    207					;--

    208

    209	001054				DISPL1:	;(DBG)			; DISPLACEMENT = EXPR DOPN RRREG DCLS

    210

    211	001054					LET R1		:= V1STACK-6(R4)	; GET EXPRESSION TO OPTIMIZE

    212	001060					LET R2		:= V2STACK-6(R4)

    213	001064					LET REG		:= V1STACK-2(R4)	; GET REGISTER BEING DISPLACED

    214	001072					IF REG EQ #15. THEN GOTO DISPPC		; TREAT AS "EXPR"

    215	001102					LET EXPOP1	:= R1			; LOAD VALUE OF EXPR

    216	001106					LET EXPOP2	:= R2			;

    217	001112					LET MODE	:= #M.D16		; DEFAULT DISPLACEMENT SIZE IS WORD

    218	001120					LET R0		:= #3			; OPERAND WILL TAKE 3 BYTES

    219	001124					IF ABSEXPR IS EQ THEN			; EXPRESSION IS ABSOLUTE

    220	001132					    IF R1 IS EQ AND R2 IS EQ AND EXPOPT IS TRUE THEN ; VALUE ZERO & OPTIMIZE

    221	001150						CALL OPTEXP			; WIPE OUT EXPRESSION

    222	001154						LET EXPEND := FRMPTR		; RESET EXPRESSION END

    223	001162						JUMPTO RDEFER			; USE REGISTER DEFERED INSTEAD

    224	001166					    END;IF

    225	001166					    IF R2 IS LT THEN			; MAKE EXPRESSION POSITIVE MAGNITUDE

    226	001172	005101 					COM	R1			;

    227	001174	005102 					COM	R2			;

    228	001176					    END;IF

    229	001176					    IF RESULT IS EQ AND R1 IS GE THEN	; DISPLACEMENT BYTE OR WORD

    230	001204						IF #177600 OFF.IN R1 THEN	; BYTE DISPLACEMENT?

    231	001212						    LET MODE := #M.D8		; SET MODE

    232	001220						    LET R0   := #2		; 2 BYTE OPERAND

    233	001224						END;IF

    234	001224					    ELSE

    235	001226						LET MODE     := #M.D32		; LONGWORD DISPLACEMENT

    236	001234						LET R0	     := #5		; 5 BYTE OPERAND

    237	001240					    END;IF

    238	001240					ELSE

    239	001242					    IF R2 IS NE OR R1 IS LT THEN	; NEED 32-BIT EXPRESSION?

    240	001252						LET MODE := #M.D32		; YES

    241	001260						LET R0 := #5			; 5 BYTE OPERAND FOR LONGWORD

    242	001264					    END

    243	001264					    LET COMPEXPR := FALSE		; NOT COMPILE-TIME EXPRESSIN

    244	001270					END;IF

    245	001270					INCRPC	R0				; UPDATE LOCATION COUNTER

    246	001300					RETURN

ACTREF	MACRO M1110  21-AUG-78 22:26  PAGE 37

DISPLACEMENT REFERENCES



    248					;++

    249					;

    250					; DISPLACEMENT OFF OF "PC".

    251					; LONGWORD DISPLACEMENT IS THE DEFAULT.

    252					;--

    253

    254	001302				DISPL2:	;(DBG)			; DISPLACEMENT = EXPR

    255

    256	001302					IF EN.AMA+SYMVL2 IS NE THEN		; ABSOLUTE ADDRESSING?

    257	001310					    CALL AINC2				; TREAT AS IMMEDIATE

    258	001314					    JUMPTO AUTOII			; THEN MAKE ABSOLUTE AND EXIT

    259	001320					END

    260	001320					LET R1		:= V1STACK(R4)		; PICK UP EXPRESSION

    261	001324					LET R2		:= V2STACK(R4)		;

    262	001330					LET REG		:= #15.			; ALWAYS USE PC

    263	001336				DISPPC:	LET EXPOP1	:= R1			; COPY EXPRESSION

    264	001342					LET EXPOP2	:= R2			;

    265	001346					LET MODE	:= #M.D32		; SET DEFAULT DISPLACEMENT MODE

    266	001354					LET R0		:= #1			; INCREMENT/DECREMENT VALUE

    267	001360					INCRPC	#2				; OPERAND IS AT LEAST 2 BYTES

    268	001372					IF ABSEXPR IS NE AND COMPEXPR IS TRUE THEN ; EXPRESSION CAN BE OPTIMIZED

    269	001406	166701 	000000G			    SUB	PC1,R1				; GET DISPLACEMENT

    270	001412	005602 				    SBC	R2				;

    271	001414	166702 	000000G			    SUB	PC2,R2				;

    272	001420					    IF R2 IS LT THEN			; DISPLACEMENT NEGATIVE

    273	001424	005400 					NEG	R0			; NEED TO ADD ONE IF NOT BYTE

    274	001426	005101 					COM	R1			; GET POSITIVE MAGNITUDE - 1

    275	001430	005102 					COM	R2			;

    276	001432					    END;IF

    277	001432					    IF RESULT IS EQ AND #177600 OFF.IN R1 THEN ; BYTE DISPLACEMENT?

    278	001442						LET MODE := #M.D8		; SET BYTE RELATIVE MODE

    279	001450						LET R0   := #0			; ADD ZERO TO LOCATION COUNTER

    280	001452					    ELSE

    281	001454	160001 					SUB	R0,R1			; INCLUDE EXTRA BYTE INTO DISPL

    282	001456						IF R1 IS GT THEN		; WORD DISPLACEMENT?

    283	001462						    LET MODE := #M.D16		; SET WORD RELATIVE MODE

    284	001470						    LET R0   := #1		; ADD ONE TO LOCATION COUNTER

    285	001474						ELSE

    286	001476						    LET R0   := #3		; ADD THREE TO LOCATION COUNTER

    287	001502						END;IF

    288	001502					    END;IF

    289	001502					    INCRPC R0				; UPDATE LOCATION COUNTER BY R0

    290	001512					ELSE

    291	001514					    LET COMPEXPR := FALSE		; NOT COMPILE-TIME EXPRESSION

    292	001520					    INCRPC #3				; UPDATE PC FOR DEFAULT LONGWORD

    293	001532					END;IF

    294	001532					RETURN

ACTREF	MACRO M1110  21-AUG-78 22:26  PAGE 38

EXPLICIT DISPLACEMENTS  AND  PIC REFERENCE



    296					.SBTTL	EXPLICIT DISPLACEMENTS  AND  PIC REFERENCE

    297

    298	001534				DISPL3:	;(DBG)			; DISPLACEMENT = DBUP EXPR DOPN RRREG DCLS

    299	001534					LET MODE	:= #M.D8

    300	001542					PUSH		#2			; 2 BYTE OPERAND

    301	001546					GOTO		DIS345			; COMMON EXIT POINT

    302

    303	001550				DISPL4:				; DISPLACEMENT = DLUP EXPR DOPN RRREG DCLS

    304	001550					LET MODE	:= #M.D32

    305	001556					PUSH		#5			; 5 BYTE OPERAND

    306	001562					GOTO		DIS345			; COMMON EXIT POINT

    307

    308	001564				DISPL5:				; DISPLACEMENT = DWUP EXPR DOPN RRREG DCLS

    309	001564					LET MODE	:= #M.D16

    310	001572					PUSH		#3			; 3 BYTE OPERAND

    311	001576				DIS345:

    312	001576					IF ABSEXPR IS NE THEN LET COMPEXPR := FALSE ; EXPRESSION NOT ABSOLUTE

    313	001610					LET EXPOP1	:= V1STACK-6(R4)

    314	001616					LET EXPOP2	:= V2STACK-6(R4)

    315	001624					LET REG		:= V1STACK-2(R4)

    316	001632					INCRPC		(SP)+			; ADD TOP OF STACK TO PC

    317	001642					RETURN

    318

    319	001644				DISPL6:	;(DBG)			; DISPLACEMENT = DBUP EXPR

    320	001644					LET MODE	:= #M.D8

    321	001652					PUSH		#2			; 2 BYTE OPERAND

    322	001656					GOTO		DIS678			; COMMON EXIT POINT

    323

    324	001660				DISPL7:				; DISPLACEMENT = DLUP EXPR

    325	001660					LET MODE	:= #M.D32

    326	001666					PUSH		#5			; 5 BYTE OPERAND

    327	001672					GOTO		DIS678			; COMMON EXIT POINT

    328

    329	001674				DISPL8:				; DISPLACEMENT = DWUP EXPR

    330	001674					LET MODE	:= #M.D16

    331	001702					PUSH		#3			; 3 BYTE OPERAND

    332	001706				DIS678:

    333	001706					IF ABSEXPR IS EQ THEN LET COMPEXPR := FALSE ; ABSOLUTE REQUIRES LINKER ACTION

    334	001720					LET EXPOP1	:= V1STACK(R4)

    335	001726					LET EXPOP2	:= V2STACK(R4)

    336	001734					LET REG		:= #15.			; PC IS REGISTER

    337	001742					INCRPC		(SP)+			; ADD TOP OF STACK TO PC

    338	001752					RETURN

    339

    340	001754				GENLDS:				; DISPLACEMENT = DGUP EXPR

    341	001754					LET MODE	:= #M.PIC		; SET MODE FOR PIC

    342	001762					PUSH		#5			; 5 BYTE OPERAND

    343	001766					GOTO		DIS678			;

ACTREF	MACRO M1110  21-AUG-78 22:26  PAGE 39

INDEXED REFERENCES



    345					.SBTTL	INDEXED REFERENCES

    346

    347	001770				INDEX:	;(DBG)			; INDEX_REF = BASIC_REF DSQOPN RRREG DSQCLS

    348	001770					PUSH	R0				; SAVE REGISTER

    349	001772	016700 	000000G			MOV	MODE,R0				; COPY MODE INTO R0

    350	001776	020027 	000000 			CMP	R0,#M.LIT			; LITERAL OPERAND?

    351	002002	001403 				BEQ	10$				; CAN'T INDEX LITERALS

    352	002004	020027 	000001 			CMP	R0,#M.IMM			; OR IMMEDIATES !

    353	002010	001004 				BNE	20$				; SO FAR SO GOOD!

    354	002012				10$:	CALL ERORPT,#ILDXMD			; ILLEGAL INDEX MODE

    355	002022	026427 	177776G	000017 	20$:	CMP	V1STACK-2(R4),#15.		; IS REGISTER PC ?

    356	002030	001415 				BEQ	30$				; ILLEGAL HERE !

    357	002032	026467 	177776G	000000G		CMP	V1STACK-2(R4),REG		; IS INDEX REG SAME AS "REG"

    358	002040	001015 				BNE	40$				; SKIP IF NOT SAME

    359	002042	020027 	000007 			CMP	R0,#M.MNSREG			; IS MODE "-(RX)[RX]"

    360	002046	001406 				BEQ	30$				; ILLEGAL !!!

    361	002050	020027 	000010 			CMP	R0,#M.RPLUS			; IS MODE "(RX)+[RX]"

    362	002054	001403 				BEQ	30$				; ILLEGAL !!!

    363	002056	020027 	000011 			CMP	R0,#M.DRPLUS			; IS MODE "@(RX)+[RX]"

    364	002062	001004 				BNE	40$				; NO, SKIP ERROR CALL

    365	002064				30$:	CALL ERORPT,#ILDXRG			; ILLEGAL INDEX REGISTER

    366	002074				40$:	POP	R0				; RESTORE REGISTER

    367	002076					LET IMODE	:= MODE

    368	002104					LET MODE	:= #M.INDEX

    369	002112					LET IREG	:= REG

    370	002120					LET REG		:= V1STACK-2(R4)

    371	002126					INCRPC		#1

    372	002140					RETURN

    373

    374

    375					;

    376					; CHECK FOR SPECIAL MODES (IMMEDIATE AND LITERAL) WHICH

    377					; MUST BE HANDLED SPECIALLY SINCE THEY ARE USED AS ADDRESSES

    378					; IN INDEX MODE.

    379					;

    380	002142				INDXCH:					; CHECK OPERAND MODE FOR INDEXING

    381	002142					IF MODE EQ #M.LIT THEN			; LITERAL MODE

    382	002152					    LET MODE	:= #M.IMM		; MAKE IT IMMEDIATE MODE

    383	002160					    LET REG	:= #15.			; (PC)+

    384	002166					    INCRPC	OPSIZE			; CONTEXT OF OPERAND

    385	002200					ELSE

    386	002202					    IF MODE EQ #M.IMM			; IMMEDIATE MODE?

    387	002212						DECRPC	OPSIZE			; SUBTRACT DEFAULT SIZE

    388	002224						INCRPC	#4			; FORCE TO LONGWORD

    389	002236						LET OPSIZE := #4		; FORCE LONGWORD OPERAND

    390	002244					    END

    391	002244					END

    392	002244					RETURN					;

    393

    394		000001 			.END

ACTREF	MACRO M1110  21-AUG-78 22:26  PAGE 39-1

SYMBOL TABLE



ABSEXP= ****** GX	IIII  = 177777   	L32     001502R     002	OPSIZE= ****** GX	S.DBG = 002000

AINC1   000560RG    002	ILDXMD= ****** GX	L33     001476R     002	OPTEXP= ****** GX	S.DF  = 100000

AINC2   000610RG    002	ILDXRG= ****** GX	L34     001502R     002	OUTFRA= ****** GX	S.EPT = 000100

AINC2X  001006R     002	ILLREG= ****** GX	L35     001532R     002	PC1   = ****** GX	S.EXTN= 010000

AINC3   000602RG    002	IMODE = ****** GX	L36     001610R     002	PC2   = ****** GX	S.GLOB= 020000

AUTODC  000302RG    002	INDEX   001770RG    002	L37     001720R     002	PSECCH= 000020   	S.LOCL= 001000

AUTOI   000262RG    002	INDXCH  002142R     002	L4      000442R     002	PSECOP= 000016   	S.ODBG= 000040

AUTOII  000264RG    002	IREG  = ****** GX	L40     002202R     002	PSECV1= 000012   	S.REF = 000400

AUTOI3  001010RG    002	I.REF = ****** GX	L41     002244R     002	PSECV2= 000014   	S.TKMS= 000377

BLNK  = 000040   	I.STIL= ****** GX	L42     002244R     002	RDEFER  000240RG    002	S.WEAK= 040000

CNT   = 000006   	LBLS0 = 000041   	L5      000470R     002	RDXPTR= ****** GX	TAB   = 000011

COMMA = 000054   	LBLS1 = 000042   	L6      000554R     002	REFERR  000422R     002	TYPS0 = 000000

COMPEX= ****** GX	LBLS2 = 000034   	L7      000622R     002	REFEXI  000164R     002	TYPS1 = 000000

CR    = 000015   	LF    = 000012   	MODE  = ****** GX	REF1    000164RG    002	TYPS2 = 000000

DATPTR= ****** GX	LFTANG= 000074   	MOPPTR= ****** GX	REF2    000216RG    002	VAL1  = ****** GX

DIRREF  000000RG    002	LITERL  000456RG    002	M.ABS = 000002 G 	REF3    000164RG    002	VAL2  = ****** GX

DISP    000262RG    002	LOWCAS= 000140   	M.ARGC= 000014   	REG   = ****** GX	VAL3  = ****** GX

DISPI   000324RG    002	LPTLEN= 000074   	M.ARGS= 000016   	RFHDEX  000124R     002	VAL4  = ****** GX

DISPL1  001054RG    002	L0      000064R     002	M.DFD1= 000015 G 	RFHD1   000066RG    002	V1STAC= ****** GX

DISPL2  001302RG    002	L1      000342R     002	M.DFD3= 000017 G 	RFHD2   000076RG    002	V2STAC= ****** GX

DISPL3  001534RG    002	L10     000746R     002	M.DFD8= 000013 G 	RFHD4   000106RG    002	$DIDDO= 000000

DISPL4  001550RG    002	L11     000714R     002	M.DRPL= 000011 G 	RFHD8   000116RG    002	$E$   = 000001

DISPL5  001564RG    002	L12     000712R     002	M.D16 = 000014 G 	RGTANG= 000076   	$F$   = 000000

DISPL6  001644RG    002	L13     000746R     002	M.D32 = 000016 G 	RTNVAL=%000000   	$I$   = 000001

DISPL7  001660RG    002	L14     000746R     002	M.D8  = 000012 G 	R6    =%000006   	$L    = 000000

DISPL8  001674RG    002	L15     001242R     002	M.END = 000012   	R7    =%000007   	$LL   = 000000

DISPPC  001336R     002	L16     001166R     002	M.GETL= 000004   	SEMI  = 000073   	$L$   = 000000

DIS345  001576R     002	L17     001176R     002	M.IFLV= 000006   	SHFLIT  000724R     002	$O$   = 000000

DIS678  001706R     002	L2      000360R     002	M.IFVL= 000010   	SPACE = 000040   	$R    = 177777

EN.AMA= ****** GX	L20     001226R     002	M.IMM = 000001 G 	SYMCHR= 000012   	$SV$  = 000000

ERORPT= ****** GX	L21     001224R     002	M.INDE= 000004 G 	SYMFLA= 000002   	$T    = 000043

EVALEX= ****** GX	L22     001240R     002	M.LINK= 000000   	SYMLEN= 000011   	$T1   = 000000

EXPEND= ****** GX	L23     001270R     002	M.LIT = 000000 G 	SYMLIN= 000000   	$T2   = 000041

EXPOPT= ****** GX	L24     001252R     002	M.MNSR= 000007 G 	SYMMAX= 000017   	$Y$   = 000000

EXPOP1= ****** GX	L25     001264R     002	M.NXTL= 000002   	SYMSEG= 000010   	$Z$   = 000000

EXPOP2= ****** GX	L26     001320R     002	M.PIC = 000003 G 	SYMVL1= 000004   	$$S   = 000000

FF    = 000014   	L27     001514R     002	M.REG = 000005 G 	SYMVL2= 000006   	$$T   = 000037

FLTPNT= ****** GX	L3      000410R     002	M.RPLU= 000010 G 	S.ABS = 004000   	$$TT  = 000025

FRMPTR= ****** GX	L30     001432R     002	M.RRIN= 000006 G 	S.ASN = 000200   	.$T   = 000001

GENLDS  001754RG    002	L31     001454R     002



. ABS.	000000	   000

      	000000	   001

ACTREF	002246	   002

ERRORS DETECTED:  0



VIRTUAL MEMORY USED:  12205 WORDS  ( 48 PAGES)

DYNAMIC MEMORY:  13332 WORDS  ( 51 PAGES)

ELAPSED TIME:  00:04:15

OBJ$:ACTREF,LIS$:ACTREF/-SP=SRC$:MD,COMMON,ACTREF

