1
0
mirror of https://github.com/PDP-10/its.git synced 2026-04-05 13:41:09 +00:00
Files
PDP-10.its/c20/new/mulseg.mid
2018-05-15 07:06:17 +02:00

75 lines
1.5 KiB
Plaintext

; 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
]