Trailing-Edge
-
PDP-10 Archives
-
bb-r775d-bm_tops20_ks_upd_4
-
sources/lnksub.mac
There are 38 other files named lnksub.mac in the archive. Click here to see a list.
TITLE LNKPRM - RETURN NEXT PRIME NUMBER FOR HASH SEARCH
SUBTTL D.M.NIXON/DMN/JBC/JNG/DZN/PAH/PY 11-Feb-85
;COPYRIGHT (C) 1973, 1985 BY
;DIGITAL EQUIPMENT CORPORATION, MAYNARD, MASS.
;
;
;THIS SOFTWARE IS FURNISHED UNDER A LICENSE AND MAY BE USED AND COPIED
;ONLY IN ACCORDANCE WITH THE TERMS OF SUCH LICENSE AND WITH THE
;INCLUSION OF THE ABOVE COPYRIGHT NOTICE. THIS SOFTWARE OR ANY OTHER
;COPIES THEREOF MAY NOT BE PROVIDED OR OTHERWISE MADE AVAILABLE TO ANY
;OTHER PERSON. NO TITLE TO AND OWNERSHIP OF THE SOFTWARE IS HEREBY
;TRANSFERRED.
;
;
;THE INFORMATION IN THIS SOFTWARE IS SUBJECT TO CHANGE WITHOUT NOTICE
;AND SHOULD NOT BE CONSTRUED AS A COMMITMENT BY DIGITAL EQUIPMENT
;CORPORATION.
;
;DIGITAL ASSUMES NO RESPONSIBILITY FOR THE USE OR RELIABILITY OF ITS
;SOFTWARE ON EQUIPMENT WHICH IS NOT SUPPLIED BY DIGITAL.
SEARCH LNKLOW,LNKPAR
SALL
ENTRY NPRIME
EXTERN LNKLOG
CUSTVR==0 ;CUSTMER VERSIN
DECVER==5 ;DEC VERSION
DECMVR==1 ;DEC MINOR VERSION
DECEVR==2356 ;DEC EDIT VERSION
SEGMENT
;REVISION HISTORY
;START OF VERSION 2C
;475 Delete .TYVER, since can now use .TVERW in SCAN
;557 Clean up the listing for release.
;START OF VERSION 3A
;560 Release on both TOPS-10 and TOPS-20 as LINK version 3A(560)
;START OF VERSION 4
;635 Define dummy label for /ARSIZE in LNKLOD.
;765 Release on both TOPS-10 and TOPS-20 as LINK version 4(765)
;START OF VERSION 4A
;1161 Add .TSIXB to .TSUBS
;1174 Label and clean up all error messages.
;1217 Clean up the listings for release.
;1220 Release on both TOPS-10 and TOPS-20 as version 4A(1220).
;Start of Version 5.1
;2026 Update copyright notice.
;2062 Add LNK012 for argument typechecking dummies.
;Start of version 6
;2300 Remove overlay check in dummy F40 module.
;2356 Add dummy symbol, move NAMCMP into seperate module (from LNKWLD)
;HERE TO GET THE REQUIRED PRIME NUMBER INTO HT.PRM
;USUALLY JUST THE NEXT PRIME IS REQUIED, IN WHICH CASE
;HT.PRM CONTAINS THE LAST PRIME USED
;OTHERWISE HT.PRM CONTAINS A NUMBER ON ENTRY, THE RETURN WILL SET
;HT.PRM WITH A PRIME NUMBER LARGER THAN THE ENTRY NUMBER.
;USES T1
NPRIME: IBP PRMPTR ;INCREMENT REL POINTER
MOVE T1,PRMPTR ;GET IT
ADDI T1,PRMTAB ;MAYBE IN MORE THAN ONE SEGMENT
ILDB T1,T1 ;GET NEXT PRIME
JUMPE T1,E$$HTL ;[1174] NONE THERE (0 IS END MARKER)
SKIPE HASHSZ ;SKIP IF NO USER SIZE REQUEST
CAML T1,HASHSZ ;AS BIG AS USER REQUESTED?
CAMGE T1,HT.PRM ;IS IT BIG ENOUGH?
JRST NPRIME ;NO, TRY AGAIN
MOVEM T1,HT.PRM ;STORE NEW PRIME
POPJ P, ;AND RETURN
E$$HTL::.ERR. (MS,0,V%L,L%F,S%F,HTL,<Symbol hash table too large>) ;[1174]
SUBTTL TABLE OF PRIME NUMBER STORED 2 PER WORD
;POINTER IS IN PRMPRT (REL TO PRMTAB)
;THE PRIMES ARE THE NEAREST PRIME TO N*P-3
;WHERE P IS ONE PAGE (512.) WORDS
DEFINE MAKPRM (PRIME)<
RADIX 10
%PL==<%PR==0>
IRP PRIME,<
IFN %PL,<%PR==PRIME>
IFE %PL,<%PL==PRIME>
IFN %PR,<
%PL,,%PR
%PL==<%PR==0>
>>
%PL,,%PR
RADIX 8
>
PRMTAB:
MAKPRM <127,251,509,1021,1531,2039,2557,3067,3581,4093,4603,5099,5623,
6133,6653,7159,7673,8179,8699,9209,9721,10223,10739,11261,11743,12281,
12791,13309,13807,14327,14843,15349,15859,16381,16889,17401,17911,18427,
18919,19447,19963,20477,20983,21499,22013,22511,23029,23549,24061,24571,25073>
PRGEND
TITLE .TSUBS - TYPE OUT ROUTINES
SUBTTL D.M.NIXON/DMN/JBC/DZN 25-Jul-79
;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, 1979 BY DIGITAL EQUIPMENT CORPORATION
SEARCH LNKLOW,LNKPAR,MACTEN,UUOSYM
SALL
ENTRY .T6OCT,.TFOCT,.T6ZOC,.TDEP,.TOEP,.TSIXB
SEGMENT
;HERE TO OUTPUT OCTAL FULL WORD WITH LEADING BLANKS
;IGNORES SIGN BIT AND USES 36 BIT VALUE
;CALLED BY
; MOVE T1,WORD
; PUSHJ P,.TFOCT
;USES T1, T2, T3
.TFOCT: TLNN T1,-1 ;ANY LEFT HALF?
JRST T6SPAC ;NO
HRRZ T2,T1 ;GET LAST 6 DIGITS
PUSH P,T2 ;SAVE
HLRZ T1,T1 ;FIRST SIX
PUSHJ P,.T6OCT ;LEADING SPACES
POP P,T1 ;GET 2ND PART
PJRST .T6ZOC ;WITH LEADING 0'S
T6SPAC: PUSH P,T1 ;SAVE NUMBER
MOVEI T2,6 ;SIX SPACES
PUSHJ P,.TSPAC##
SOJG T2,.-1 ;LOOP
POP P,T1 ;RESTORE ORIGINAL NUMBER
;FALL INTO.T6OCT
;HERE TO OUTPUT OCTAL HALF WORD WITH LEADING BLANKS
;CALLED BY
; HRRZ T1,WORD
; PUSHJ P,.T6OCT
;USES T1, T2, T3
.T6OCT: JFFO T1,.+2 ;COUNT LOADING ZEROS
MOVEI T2,^D18+5*3 ;ALL ZERO
SUBI T2,^D18 ;IGNORE LEFT HALF
IDIVI T2,3 ;INTO OCTAL (3 BITS PER 0)
JUMPE T2,.TOCTW## ;NO LEADING SPACES
MOVE T3,T1 ;SAVE T1
PUSHJ P,.TSPAC## ;FILL
SOJG T2,.-1 ;LOOP
MOVE T1,T3 ;RESTORE
PJRST .TOCTW## ; AND OUTPUT OCTAL NUMBER
;HERE TO OUTPUT OCTAL HALF WORD WITH LEADING ZEROS
;CALLED BY
; HRRZ T1,WORD
; PUSHJ P,.T6ZOC
;USES T1, T2, T3
.T6ZOC: JFFO T1,.+2 ;COUNT LOADING ZEROS
MOVEI T2,^D18+5*3 ;ALL ZERO
SUBI T2,^D18 ;IGNORE LEFT HALF
IDIVI T2,3 ;INTO OCTAL (3 BITS PER 0)
JUMPE T2,.TOCTW## ;NO LEADING SPACES
MOVE T3,T1 ;SAVE T1
MOVEI T1,"0"
PUSHJ P,.TCHAR## ;FILL
SOJG T2,.-2 ;LOOP
MOVE T1,T3 ;RESTORE
PJRST .TOCTW## ; AND OUTPUT OCTAL NUMBER
;DEC NUM IN PARENS "(###)"
;CALLED BY
; MOVE T1,DEC. NUMBER
; PUSHJ P,.TDEP
.TDEP:: PUSH P,T1 ;SAVE NUMBER
MOVEI T1,"("
PUSHJ P,.TCHAR## ;ENCLOSE NUMBER IN ()
POP P,T1
PUSHJ P,.TDECW##
MOVEI T1,")"
PJRST .TCHAR##
;OCTAL NUMBER ENCLOSED IN PARENS
;CALLED BY
; MOVE T1,NUMBER
; PUSHJ P,.TOEP
.TOEP:: PUSH P,T1 ;SAVE NUMBER
MOVEI T1,"("
PUSHJ P,.TCHAR##
POP P,T1
PUSHJ P,.TOCTW##
MOVEI T1,")"
PJRST .TCHAR##
;TYPE SIXBIT WORD, BLANK FILLED
;CALL:
; T1/ WORD
; PUSHJ P,.TSIXB
;
;USES T1,T2,T3
.TSIXB::MOVEI T3,6 ;[1161] NUMBER OF CHARACTERS TO TYPE
MOVE T2,T1 ;[1161] SIXBIT WORD INTO T2
TSIXB2: SETZ T1, ;[1161] CLEAN AC
LSHC T1,6 ;[1161] NEXT CHAR INTO T1
ADDI T1,"0"-'0' ;[1161] CONVERT TO ASCII
PUSHJ P,.TCHAR## ;[1161] TYPE IT
SOJG T3,TSIXB2 ;[1161] LOOP OVER SIX CHARACTERS
POPJ P, ;[1161] RETURN
PRGEND
TITLE NAMCMP - COMPARE POSSIBLY LONG SYMBOLS
SUBTTL Paul Young/PY 25-Jan-85
;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, 1979 BY DIGITAL EQUIPMENT CORPORATION
SEARCH LNKPAR
SALL
ENTRY NAMCMP
SEGMENT
;[2356] Symbol comparison routine
;[2220] This routine compares symbols, one or both of which may be
;[2220] long. The symbols are in T2 and W2. Skip return if not
;[2220] equal. Assumes that the symbol in T2 if long has no trailing
;[2220] zeros, but W2 may.
NAMCMP::TLNN W2,770000 ;[2220] Long symbol?
JRST NAMCP1 ;[2220] Yes
CAME W2,T2 ;[2220] No, same?
AOS (P) ;[2220] No, skip return
POPJ P, ;[2220] Yes, return
;[2220] Here on long symbol. Check for special case (long and short)
NAMCP1: SPUSH <P1,P2,T1,T3,T4> ;[2220] Save ACs for extend instruction
PUSH P,T2 ;[2220] Save symbol
TLNN T2,770000 ;[2220] Both extended?
JRST NAMCP2 ;[2220] Yes, do extended compare
;[2220] Special case of a long and short. They might be equal because
;[2220] the symbol in W2 may be padded with zeros. Make a long symbol
;[2220] out of it (use the stack) and use the long symbol compare code.
HRRI T2,0(P) ;[2220] Build a pointer to the symbol
HRLI T2,1 ;[2220] One word symbol
;[2220] Here on long symbols. Compare them.
NAMCP2: HLRZ T1,T2 ;[2220] Get the count
HRLI T2,(POINT 36) ;[2220] Make a byte pointer
HLRZ T4,W2 ;[2220] Get the count
MOVE P1,W2 ;[2220] Get the address
HRLI P1,(POINT 36) ;[2220] Make a byte pointer
EXTEND T1,[CMPSE ;[2220] Compare the strings
0 ;[2220]
0] ;[2220]
AOS -6(P) ;[2220] Not the same, skip return
POP P,T2 ;[2220] Restore the symbol
SPOP <T4,T3,T1,P2,P1> ;[2220] Restore the ACs
POPJ P, ;[2220] Return
PRGEND
TITLE CSTORE - DUMMY FOR CSTORE MACRO
SUBTTL D.M.NIXON/DMN/DZN 25-Jul-79
;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, 1979 BY DIGITAL EQUIPMENT CORPORATION
SEARCH LNKPAR
SALL
ENTRY CS.LHS,CS.RHS
CS.LHS==(MOVEM W1,(P3))
CS.RHS==0
PRGEND
TITLE LNK000 - DUMMY LINK
SUBTTL D.M.NIXON/DMN/DZN 25-Jul-79
;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, 1979 BY DIGITAL EQUIPMENT CORPORATION
SEARCH LNKPAR,LNKLOW
SALL
ENTRY LINK ;[1174]
SEGMENT
LINK: ;[1174]
IFE FTSINGLE,<
MOVE T1,['LINK ']
JRST @NXTSEG
>
PRGEND
TITLE LNK001 - DUMMY LNKSCN
SUBTTL D.M.NIXON/DMN/DZN 25-Jul-79
;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, 1979 BY DIGITAL EQUIPMENT CORPORATION
SEARCH LNKPAR,LNKLOW
SALL
ENTRY LNKSCN
SEGMENT
LNKSCN:
IFE FTSINGLE,<
MOVE T1,['LNKSCN']
JRST @NXTSEG
>
PRGEND
TITLE LNK002 - DUMMY LNKLOD
SUBTTL D.M.NIXON/DMN/DZN 25-Jul-79
;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, 1979 BY DIGITAL EQUIPMENT CORPORATION
SEARCH LNKPAR,LNKLOW
SALL
ENTRY LNKLOD
SEGMENT
LNKLOD:
IFE FTSINGLE,<
MOVE T1,['LNKLOD']
JRST @NXTSEG
>
PRGEND
TITLE LNK003 - DUMMY LNKMAP
SUBTTL D.M.NIXON/DMN/DZN 25-Jul-79
;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, 1979 BY DIGITAL EQUIPMENT CORPORATION
SEARCH LNKPAR,LNKLOW
SALL
ENTRY LNKMAP
SEGMENT
LNKMAP:
IFE FTSINGLE,<
MOVE T1,['LNKMAP']
JRST @NXTSEG
>
PRGEND
TITLE LNK004 - DUMMY LNKXIT
SUBTTL D.M.NIXON/DMN/DZN 25-Jul-79
;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, 1979 BY DIGITAL EQUIPMENT CORPORATION
SEARCH LNKPAR,LNKLOW
SALL
ENTRY LNKXIT
SEGMENT
LNKXIT:
IFE FTSINGLE,<
MOVE T1,['LNKXIT']
JRST @NXTSEG
>
PRGEND
TITLE LNK005 - DUMMY LNKERR
SUBTTL D.M.NIXON/DMN/DZN 25-Jul-79
;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, 1979 BY DIGITAL EQUIPMENT CORPORATION
SEARCH LNKPAR,LNKLOW,MACTEN,UUOSYM
SALL
ENTRY LNKERR
SEGMENT
LNKERR:
IFE FTSINGLE,<
MOVE T1,HIORGN ;[650] SEGMENT ORIGIN
HRRZ T1,.JBHNM##(T1) ;[650] NAME
CAIN T1,'999' ;[650] IF A 999
JRST .RPOPJ ;DON'T ALLOW EXTRA GETSEGS
MOVE T1,[P2,,SAVEAC+P2]
BLT T1,SAVEAC+16 ;SAVE ALL VAULABLE ACCS
;NOTE P1 IS ALREADY SAVED ONCE
MOVEM P1,SAVEAC+T1 ;SO SAVE IT AGAIN IN T1 FOR LNKLOG
MOVE T1,['LNKERR']
JRST @NXTSEG
.RPOPJ::MOVE T1,UUOTRAP ;PICKUP PC WORD
TXZ T1,PC.LIP ;INCASE EXECUTE ONLY
JRSTF @T1 ;SINCE JSR WAS IN PUBLIC PAGE
>
PRGEND
TITLE LNK006 - DUMMY LNKOV1
SUBTTL D.M.NIXON/DMN/DZN 29-Jul-79
;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, 1979 BY DIGITAL EQUIPMENT CORPORATION
SEARCH LNKPAR,LNKLOW
SALL
ENTRY LNKOV1
SEGMENT
LNKOV1:
IFE FTSINGLE,<
MOVE T1,['LNKOV1']
JRST @NXTSEG
>
PRGEND
TITLE LNK007 - DUMMY LNKOV2
SUBTTL D.M.NIXON/DMN/DZN 25-Jul-79
;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, 1979 BY DIGITAL EQUIPMENT CORPORATION
SEARCH LNKPAR,LNKLOW
SALL
ENTRY LNKOV2
SEGMENT
LNKOV2:
IFE FTSINGLE,<
MOVE T1,['LNKOV2']
JRST @NXTSEG
>
PRGEND
TITLE LNK010 - DUMMY LNKPLT
SUBTTL D.M.NIXON/DMN/DZN 25-Jul-79
;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, 1979 BY DIGITAL EQUIPMENT CORPORATION
SEARCH LNKPAR,LNKLOW
SALL
ENTRY LNKPLT
SEGMENT
LNKPLT:
IFE FTSINGLE,<
MOVE T1,['LNKPLT']
JRST @NXTSEG
>
PRGEND
TITLE LNK100 - DUMMY OVERLAY ROUTINES
SUBTTL D.M.NIXON/DMN/JNG/DZN 25-Jul-79
;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, 1979 BY DIGITAL EQUIPMENT CORPORATION
SEARCH LNKPAR,LNKLOW
SALL
SEGMENT
DEFINE $LABEL (A)<
IRP A,<
ENTRY %'A
INTERN .'A
.'A:%'A:
>>
ENTRY E$$IOV ;[1174]
RT.INC:: LINKGO:: INPH:: RDCST:: E$$IOV: ;[1174]
RT.T2E:: RT.T2F:: RT.T2R:: RT.T2L:: RT.P3:: RT.P2:: RT.FX:: ;[2356]
$LABEL <OVERLAY,LINK,NODE,NOENTRY,PLOT,NOREQUEST,RESET,REGION,REQUEST,SPACE,ARSIZE>
IFE FTOVERLAY,<
E$$ONS::.ERR. (MS,,V%L,L%W,S%I,ONS,<Overlays not supported in this version of LINK>) ;[1174]
> ;END OF IFE FTOVERLAY
IFN FTOVERLAY,<
E$$OMB::.ERR. (MS,,V%L,L%F,S%F,OMB,</OVERLAY switch must be first>) ;[1174]
> ;END OF IFN FTOVERLAY
POPJ P,
PRGEND
TITLE LNK011 - DUMMY TRY.BG
SUBTTL D.M.NIXON/DMN/DZN 25-Jul-79
;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, 1979 BY DIGITAL EQUIPMENT CORPORATION
SEARCH LNKPAR
SALL
ENTRY TRY.BG
SEGMENT
TRY.BG: POPJ P, ;CAN NEVER GET HERE
;BUT IF WE DO, POPJ IS RIGHT
PRGEND
TITLE LNK012 - DUMMY TYP.BG and COEOVL
SUBTTL PAUL YOUNG/PY 6-Mar-84
;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, 1984 BY DIGITAL EQUIPMENT CORPORATION
;[2062] Provide these dummy entries for typechecking overlays.
SEARCH LNKPAR
SALL
ENTRY TYP.BG,COEOVL
SEGMENT
COEOVL==COESP0## ;Don't do anything, go to .+1
TYP.BG: POPJ P, ;Can never get here
;But if we do, POPJ is right
PRGEND
TITLE LNK400 - DUMMY OLD FORTRAN MODULE
SUBTTL D.M.NIXON/DMN/JNG/DZN 25-Jul-79
;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, 1979 BY DIGITAL EQUIPMENT CORPORATION
SEARCH LNKPAR,LNKLOW
SALL
ENTRY LNKF40
INTERN T.400,T.401
EXTERN LNKLOD,LNKLOG
SEGMENT
LNKF40:
T.400:
T.401:
E$$OFN::.ERR. (MS,.EC,V%L,L%F,S%F,OFN,<Old FORTRAN (F40) module not available>) ;[1174]
.ETC. (JMP,,,,,.ETIMF##) ;[1174]
END