mirror of
https://github.com/PDP-10/its.git
synced 2026-01-29 13:21:11 +00:00
STINKR - new linker. No source.
This commit is contained in:
committed by
Eric Swenson
parent
544dbc74af
commit
d0555d8c41
74
src/syseng/mulseg.insert
Executable file
74
src/syseng/mulseg.insert
Executable file
@@ -0,0 +1,74 @@
|
||||
; THIS INSERT FILE ALLOWS USE OF STINKR MULTIPLE SEGMENT FEATURE
|
||||
|
||||
; MACROS:
|
||||
;
|
||||
; .MSEG o1,o2,o3,...
|
||||
;
|
||||
; This macro should come after the RELOCATABLE and any RADIX
|
||||
; command and before any code. The arguments are the virtual
|
||||
; origins of the segments other than segment 0. The virtual
|
||||
; origin of segment 0 is always 0. The virtual origins are used
|
||||
; internally to distinguish the various segments. For example,
|
||||
; if one has done .MSEG 400000, then relocatable addresses in
|
||||
; segment 1 will start from relocatable 400000. The choice
|
||||
; of virtual segment origins is important only in that it
|
||||
; limits the maximum size of the various segments.
|
||||
;
|
||||
; .SEG n
|
||||
;
|
||||
; This macro switches to segment n, where n ranges from 0 to
|
||||
; one less than the number of segments. Initially, the current
|
||||
; segment is 0.
|
||||
;
|
||||
|
||||
IF1,[
|
||||
|
||||
DEFINE MS%AS *PREFIX*,#SEGNO,*SUFFIX*
|
||||
PREFIX!SEGNO!SUFFIX
|
||||
TERMIN
|
||||
|
||||
DEFINE .MSEG ARGS/
|
||||
MS%NS==1
|
||||
MS%O0==0
|
||||
MS%L0==.
|
||||
IRP ARG,,[ARGS]
|
||||
MS%AS /MS%O/,MS%NS,/==ARG/
|
||||
MS%AS /MS%L/,MS%NS,/==.+ARG/
|
||||
MS%AS /.KILL MS%O/,MS%NS
|
||||
MS%AS /.KILL MS%L/,MS%NS
|
||||
MS%NS==MS%NS+1
|
||||
TERMIN
|
||||
MS%CS==0
|
||||
TERMIN
|
||||
|
||||
DEFINE .SEG N
|
||||
IFN N-MS%CS,[
|
||||
MS%AS /MS%L/,MS%CS,/==./
|
||||
MS%CS==N
|
||||
MS%AS /LOC MS%L/,MS%CS
|
||||
]
|
||||
TERMIN
|
||||
|
||||
EQUALS MS%END END
|
||||
EXPUNGE END
|
||||
DEFINE END ENDLOC
|
||||
MS%AS /MS%L/,MS%CS,/==./
|
||||
EQUALS END MS%END
|
||||
END ENDLOC
|
||||
TERMIN
|
||||
]
|
||||
|
||||
IF2,[
|
||||
WORD <24._25.>+<MS%NS_18.>
|
||||
MS%CS==0
|
||||
REPEAT MS%NS,[
|
||||
MS%AS /MS%TMP==.ABSP MS%L/,MS%CS,
|
||||
MS%AS /MS%TMP==MS%TMP-MS%O/,MS%CS
|
||||
MS%AS /WORD <MS%TMP,,MS%O/,MS%CS,/>/
|
||||
MS%CS==MS%CS+1
|
||||
]
|
||||
WORD 0 ; CHECKSUM
|
||||
MS%CS==0
|
||||
|
||||
.KILL MS%NS,MS%CS,MS%TMP,MS%L0,MS%O0
|
||||
]
|
||||
Reference in New Issue
Block a user