Google
 

Trailing-Edge - PDP-10 Archives - bb-d868b-bm_tops20_v3a_2020_dist - 3a-sources/lnkcst.mac
There are 38 other files named lnkcst.mac in the archive. Click here to see a list.
TITLE LNKCST - LOAD CUSTOMER LINK ITEMS MODULE FOR LINK-10
SUBTTL	D.M.NIXON/DMN/JBC/JNG	27-Feb-78

;THIS SOFTWARE IS FURNISHED UNDER A LICENSE AND MAY ONLY BE USED
;  OR COPIED IN ACCORDANCE WITH THE TERMS OF SUCH LICENSE.
;
;COPYRIGHT (C) 1973, 1978 BY DIGITAL EQUIPMENT CORPORATION, MAYNARD, MASS.

ENTRY	LNKCST
SEARCH	LNKPAR,LNKLOW,MACTEN,UUOSYM,SCNMAC
EXTERN	LNKSCN,LNKLOD,LNKCOR,LNKWLD,LNKLOG



CUSTVR==0		;CUSTOMER VERSION
DECVER==4		;DEC VERSION
DECMVR==0		;DEC MINOR VERSION
DECEVR==765		;DEC EDIT VERSION





;LOCAL ACC DEFINITIONS
INTERN	R,RB,WC

R=R1		;CURRENT RELOCATION COUNTER
RB=R+1		;RELOCATION BYTE WORD
WC=R3		;WORD COUNT


SEGMENT
SUBTTL	REVISION HISTORY

;START OF VERSION 2

;START OF VERSION 2B
;363	UPDATE MINOR VERSION #

;START OF VERSION 2C
;465	Redo entire module, remove T.100.

;START OF VERSION 3A
;560	Release on both TOPS-10 and TOPS-20 as LINK version 3A(560)


;START OF VERSION 4
;731	SEARCH MACTEN,UUOSYM
;765	Release on both TOPS-10 and TOPS-20 as LINK version 4(765)
SUBTTL	DISPATCH TABLES FOR CUSTOMER TYPES

;CUSTOMERS HAVE THE FOLLOWING TYPES RESERVED TO THEM:
;		40	-	77
;		402	-	677
;		2000	-	3777
;WHERE 40-577 SHOULD BE USED FOR THOSE TYPES INVOLVING RADIX50,
;ONE OR TWO SEGMENTS, OR SINGLE LENGTH SYMBOLS (OLD STYLE BLOCKS),
;600-677 SHOULD BE USED FOR CUSTOMER SPECIAL FILE TYPES, AND
;2000-3777 SHOULD BE USED FOR BLOCK TYPES INVOLVING SIXBIT,
;EXTENDED SYMBOLS, OR MULTIPLE SEGMENTS (NEW BLOCK TYPES)
;ON THE OTHER HAND, CUSTOMERS CAN DO ANYTHING THEY PLEASE.


;DISPATCH FOR TYPES 40-77
CDSTB1:	LITYPE	(40,41)
CDSTL1==.-CDSTB1

;DISPATCH FOR TYPES 402-677
CDSTB2:	LITYPE	(402,403)
CDSTL2==.-CDSTB2

IFN	.NWBLK,<
;DISPATCH FOR TYPES 2000-3777
CDSTB3:	LITYPE	(2000,2001)
CDSTL3==.-CDSTB3
> ;END OF IFN .NWBLK


SALL
SUBTTL	DISPATCH TO LINK ITEM TYPE

;ENTER WITH LINK ITEM TYPE IN T1
;ALSO IN W1

LNKCST:	CAIL	T1,40		;IN FIRST RANGE?
	CAIL	T1,40+2*CDSTL1	;..
	SKIPA			;NO, CHECK OTHER RANGES
	JRST	CSTYP1		;YES, GO HANDLE
	CAIL	T1,402		;HOW ABOUT 2ND RANGE?
	CAIL	T1,402+2*CDSTL2	;..
IFE .NWBLK,<
	JRST	T.ERR##		;NEW BLOCK TYPES NOT IMPLEMENTED
> ;END IFE .NWBLK
IFN .NWBLK,<
	SKIPA			;NO, MUST BE 3RD RANGE
	JRST	CSTYP2		;OK, GO DISPATCH
	CAIL	T1,2000		;IN NEW CUSTOMER RANGE?
	CAIL	T1,2000+2*CDSTL3;..
	JRST	T.ERR##		;SNH,GIVE ERROR MESSAGE
	HRREI	T2,-<2000+CDSTL3>(T1)	;OFFSET TYPE
	JUMPGE	T2,.+2			;IF NEGATIVE, USE RHS
	SKIPA	T2,CDSTB3+CDSTL3(T2)	;USE RIGHT HALF
	HLRZ	T2,CDSTB3(T2)	;USE LEFT HALF
	JRST	(T2)		;DISPATCH
> ;END IFN .NWBLK

CSTYP2:	HRREI	T2,-<402+CDSTL2>(T1)	;OFFSET TYPE
	JUMPGE	T2,.+2			;IF NEGATIVE, USE RHS
	SKIPA	T2,CDSTB2+CDSTL2(T2)	;USE RIGHT HALF
	HLRZ	T2,CDSTB2(T2)	;USE LEFT HALF
	JRST	(T2)		;DISPATCH

CSTYP1:	HRREI	T2,-<2000+CDSTL1>(T1)	;OFFSET TYPE
	JUMPGE	T2,.+2			;IF NEGATIVE, USE RHS
	SKIPA	T2,CDSTB1+CDSTL1(T2)	;USE RIGHT HALF
	HLRZ	T2,CDSTB1(T2)	;USE LEFT HALF
	JRST	(T2)		;DISPATCH


CSTLIT:
END