TITLE LNKWLD - SWITCH HANDLER FOR LINK
SUBTTL D.M.NIXON/DMN/JLd/SRM/JBC/JNG/MCHC/PAH/DZN/PY/JBS/HD/RJF 30-MAR-90
;COPYRIGHT (c) DIGITAL EQUIPMENT CORPORATION 1973,1986,1988.
; ALL RIGHTS RESERVED.
;
;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 LNKPAR,LNKLOW,MACTEN,UUOSYM,SCNMAC
IFN TOPS20,<SEARCH MACSYM,MONSYM>
SALL
ENTRY LNKWLD
EXTERN LNKFIO,LNKCOR,LNKLOG,LNKMAP,TTYCHK
CUSTVR==0 ;CUSTOMER VERSION
DECVER==6 ;DEC VERSION
DECMVR==0 ;DEC MINOR VERSION
DECEVR==2424 ;DEC EDIT VERSION
SEGMENT

;CALLING SEQUENCE
;PUSHJ P,LNKWLD
;RETURN
;END OF LIST NOTHING LEFT
;ALL I/O SETUP SO SOSGE LOOP WILL GET DATA
;CALLS LNKFIO TO TAKE CARE OF ALL OUTPUT FILE I/O
;OUTPUT FILES MUST BE FIRST IN LIST
;ALSO HANDLES ALL SWITCHES

;START OF VERSION 2B
;225 ADD SUPPORT FOR PSECT (MACRO VERSION 51)
;245 CHANGED CALLING SEQUENCE TO DVLKP.
;247 Rework the use of the DEBUGSW; set .LOCALS before main
; program is loaded.
;253 Make multiple line ASCII text blocks work
;254 Disconnect from the file spec. switches deferred until
; after the file is open so won't dispatch off of PC
; if the file spec. is edited.
;256 Add a zero entry to the key word table, incase the
; user types "/<switch>:" without a key word
;262 Make SYSLB1 a global routine to force a LIBRARY search
;272 Correctly force rehashing if /HASHSIZE seen
;277 Control stack so can continue after editing file spec.
;302 MAKE TENEX DDT WORK RIGHT
;307 MAKE LOCAL ASCII BLOCK SWITCHES WORK RIGHT
;343 INCLUDE EDITS 302,307 IN MAINTENANCE SOURCES
;353 REMOVE EDIT 225
;377 Fix some bugs in the handling of the /SET switch.
;400 Default the PPN correctly on /DEFAULT
;406 Make DDT default for /TEST: and /DEBUG:
;411 Implement /K to correct ASCII text processing
;421 Give %LNKMSN and %LNKSSN if can't act as requested.
;431 Make the /ESTIMATE switch work.
;START OF VERSION 2C
;464 Implement the /MISSING switch.
;471 Add code for ALGOL debugging system.
;472 Update HL.S1 on the /COMMON switch, and fix the map.
;530 Define triplet flags bits correctly.
;534 Fix problems with .OSCAN and ASCII text.
;544 SOUP in LINK version 3 stuff for TOPS-20.
;551 Change /SYMBOL to /SYFILE
;557 Clean up the listing for release.
;START OF VERSION 3
;446 CHANGE TO LOAD SYS:UDDT.EXE FOR TENEX
;START OF VERSION 3A
;560 Release on both TOPS-10 and TOPS-20 as LINK version 3A(560)

SUBTTL HERE FOR ASCII TEXT BLOCK
;ENTER HERE TO MERGE ASCII TEXT BLOCK WITH CURRENT COMMAND TREE
;THERE ARE TWO POSSIBILITIES
;IF THE FIRST BLOCK HAS NO FILE SPEC, THEN THE SWITCHES APPLY TO
;THE CURRENT FILE BEING LOADED AS IF THEY HAD BEEN TYPED AFTER
;THE FILE NAME IN THE COMMAND LINE
;IF A FILE SPEC IS SEEN THEN THE NEW TREE IS ADDED TO THE IN CORE
;ONE AFTER THE CURRENT FILE, THE GLOBAL SWITCHES OF THIS DO NOT
;APPLY TO THE CURRENT FILE BEING LOADED
IFN .ASBLK,<
ASCMRG: SKIPE P1,F.INZR ;ANYTHING TO DO
SKIPE F.NAME(P1) ;ANY SWITCHES FOR THIS FILE?
JRST ASCRET## ;NO, RETURN TO FIXUP LISTS AND STACK
HRRZ T1,F.ASZR ;FIRST LINE OF .TEXT BLOCK?
JUMPN T1,ASCRET## ;NO, DON'T PROCESS IT NOW
MOVSS F.SWP(P1) ;FIRST MAKE THE SWITCHES LOCAL
SETOM NULSPC ;MAKE SURE WE DON'T LOAD ANYTHING
JRST NXTSPC ;YES, DO THEM NOW
>;END IFN .ASBLK