Trailing-Edge
-
PDP-10 Archives
-
BB-5255D-BM
-
language-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 24-Aug-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
SALL
ENTRY NPRIME
EXTERN LNKLOG
CUSTVR==0 ;CUSTMER VERSIN
DECVER==4 ;DEC VERSION
DECMVR==1 ;DEC MINOR VERSION
DECEVR==1220 ;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).
;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 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.T2F:: RT.T2R:: RT.T2L:: RT.P3:: RT.P2:: RT.FX::
$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 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:
IFN FTOVERLAY,<
SKIPE OVERLW ;SEEN /OVERLAY?
JRST E$$FOV## ;[1174] YES, GIVE BETTER MESSAGE
>
E$$OFN::.ERR. (MS,.EC,V%L,L%F,S%F,OFN,<Old FORTRAN (F40) module not available>) ;[1174]
.ETC. (JMP,,,,,.ETIMF##) ;[1174]
END