1
0
mirror of https://github.com/PDP-10/its.git synced 2026-03-22 00:59:48 +00:00
Files
PDP-10.its/c20/mulseg.mid
2018-05-15 07:06:17 +02:00

75 lines
1.5 KiB
Plaintext
Raw Permalink Blame History

This file contains invisible Unicode characters
This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
; 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
]