mirror of
https://github.com/PDP-10/its.git
synced 2026-01-28 04:57:43 +00:00
TCTYP and CRTSTY source code.
This commit is contained in:
58
src/syseng/$call.macro
Executable file
58
src/syseng/$call.macro
Executable file
@@ -0,0 +1,58 @@
|
||||
;;; System-Call Macro.
|
||||
|
||||
DEFINE $CALL PROC,IN,OUT,CTLB
|
||||
;COUNT ARGUMENTS
|
||||
.CLST.==0
|
||||
.CLCT. IN
|
||||
.CLCT. OUT
|
||||
.CLCT. CTLB
|
||||
|
||||
043000,,[SETZ
|
||||
.1STWD SIXBIT/PROC/
|
||||
.CLAG. 4000,CTLB
|
||||
.CLAG. 0,IN
|
||||
.CLAG. 2000,OUT
|
||||
IFN .CLST.,INFORM BAD FORMAT SYSTEM CALL - PROC
|
||||
]
|
||||
TERMIN
|
||||
|
||||
DEFINE .CLCT. ?A,B,C,D,E,F,G,H ;CROCK DUE TO IRP LOSS
|
||||
IFNB [A] .CLST.==.CLST.+1
|
||||
IFNB [B] .CLST.==.CLST.+1
|
||||
IFNB [C] .CLST.==.CLST.+1
|
||||
IFNB [D] .CLST.==.CLST.+1
|
||||
IFNB [E] .CLST.==.CLST.+1
|
||||
IFNB [F] .CLST.==.CLST.+1
|
||||
IFNB [G] .CLST.==.CLST.+1
|
||||
IFNB [H] .CLST.==.CLST.+1
|
||||
TERMIN
|
||||
|
||||
;;; ARGUMENT POINTER GENERATOR FOR ABOVE
|
||||
;;; A # INDICATES AN IMMEDIATE ARGUMENT
|
||||
|
||||
DEFINE .CLAG. BITS?A,B,C,D,E,F,G,H
|
||||
IFNB [A] .CLG1. BITS,A
|
||||
IFNB [B] .CLG1. BITS,B
|
||||
IFNB [C] .CLG1. BITS,C
|
||||
IFNB [D] .CLG1. BITS,D
|
||||
IFNB [E] .CLG1. BITS,E
|
||||
IFNB [F] .CLG1. BITS,F
|
||||
IFNB [G] .CLG1. BITS,G
|
||||
IFNB [H] .CLG1. BITS,H
|
||||
TERMIN
|
||||
|
||||
DEFINE .CLG1. BITS?ARG
|
||||
.CLST.==.CLST.-1 ;COUNT ARGS
|
||||
.CLG2.==0
|
||||
IRPNC 0,1,-1,CH,REST,[ARG]
|
||||
IFE "CH-"#,[ <IFE .CLST.,[400000]+BITS+1000>,,0*"CH+REST
|
||||
.CLG2.==1 ;the 0 times is per order rms
|
||||
] ;Immediate
|
||||
IFE "CH-"?,[ <IFE .CLST.,[400000]+3000>,,0*"CH+REST
|
||||
.CLG2.==1
|
||||
] ;Error-code argument
|
||||
IFN "CH-40, .ISTOP ;STOP ON FIRST NON BLANK
|
||||
TERMIN
|
||||
IFE .CLG2., <IFE .CLST.,[400000]+BITS>,,ARG
|
||||
TERMIN
|
||||
|
||||
18212
src/syseng/crtsty.1377
Executable file
18212
src/syseng/crtsty.1377
Executable file
File diff suppressed because it is too large
Load Diff
151
src/syseng/system.14
Executable file
151
src/syseng/system.14
Executable file
@@ -0,0 +1,151 @@
|
||||
; -*-MIDAS-*-
|
||||
|
||||
comment |
|
||||
This macro package is for use in programs which can assemble for more
|
||||
than one operating system. An assembly parameter exists for each possible
|
||||
operating system; if it is nonzero then the assembly is for that operating
|
||||
system. Thus if "FOO" is the name of the parameter for an operating system,
|
||||
then "IFN FOO" is a conditional which assembles iff the output is for that
|
||||
system. Corresponding parameters are defined to specify on which operating
|
||||
system the assembly is taking place. The currently defined parameter names
|
||||
are "ITS" for the ITS, "10X" for Tenex, and "20X" for Tops-20. In addition
|
||||
"TNX" is defined to be 10X\20X since Tenex and Tops-20 are very much alike.
|
||||
To use this package set to 1 the operating system parameters for which
|
||||
the program is willing to assemble and then .INSRT this package. Do this
|
||||
on pass 1 only. For example,
|
||||
if1 [
|
||||
its==1 ; can assemble for either ITS or Tops-20
|
||||
20x==1 ; (but not Tenex)
|
||||
.insrt system
|
||||
]
|
||||
All undefined operating system switches will be set to zero (thus the
|
||||
program need not know about all the systems defined in this package).
|
||||
If more than one switch is nonzero then the user will be asked at assembly
|
||||
time "System? ". Entering a blank line will default to the system on
|
||||
which the assembly is taking place. Entering "?" will list the valid
|
||||
responses. Finally entering an operating systme name will select that
|
||||
system. Once the system is determined all the other operating system
|
||||
switches will be set to zero.
|
||||
Finally the output format is selected on the basis of the target
|
||||
system and the $$REL switch (which defaults to zero, i.e. non-relocatable).
|
||||
If the target system is not the same as the assembly system then the
|
||||
symbol definitions for the target system are .INSRT'd.
|
||||
|
|
||||
|
||||
; Determine which system we're assembling on.
|
||||
.its==:ife .osmidas-sixbit/its/,[1] .else [0]
|
||||
.10x==:ife .osmidas-sixbit/tenex/,[1] .else [0]
|
||||
.20x==:ife .osmidas-sixbit/twenex/,[1] .else [0]
|
||||
.dec==:ife .osmidas-sixbit/dec/,[1] .else [0]
|
||||
.tnx==.10x\.20x
|
||||
|
||||
|
||||
ifdef tnx, ifn tnx, 10x==1 ? 20x==1 ; TNX==1 is like 10X==1 and 20X==1
|
||||
|
||||
; Program doesn't run on a system unless it explicitly says so.
|
||||
ifndef its, its==0 ; ITS
|
||||
ifndef 10x, 10x==0 ; Tenex
|
||||
ifndef 20x, 20x==0 ; Tops-20
|
||||
ifndef dec, dec==0 ; Tops-10
|
||||
ife its\10x\20x\dec, .fatal No operating system(s) specified
|
||||
|
||||
ifndef $$ask,$$ask==1 ; Default is to ask question if necessary.
|
||||
ife $$ask,[ ; Don't ask, just use system we're assembling on.
|
||||
ifn its&.its, 10x==0 ? 20x==0 ? dec==0
|
||||
.else [ ifn 10x&.10x, its==0 ? 20x==0 ? dec==0
|
||||
.else [ ifn 20x&.20x, its==0 ? 10x==0 ? dec==0
|
||||
.else [ ifn dec&.dec, its==0 ? 10x==0 ? 20x==0
|
||||
.else [ $$ask==1
|
||||
]]]]
|
||||
]
|
||||
ifn $$ask*<its+10x+20x+dec-1>,[
|
||||
define system ; need macro to use .TAG and .GO
|
||||
.tag retry
|
||||
printx "System? "
|
||||
.ttymac -response
|
||||
ifn its, ifse [response][ITS] 10x==0 ? 20x==0 ? dec==0 ? .stop
|
||||
ifn 10x, ifse [response][Tenex] its==0 ? 20x==0 ? dec==0 ? .stop
|
||||
ifn 20x, ifse [response][Tops-20] its==0 ? 10x==0 ? dec==0 ? .stop
|
||||
ifn 20x, ifse [response][Twenex] its==0 ? 10x==0 ? dec==0 ? .stop
|
||||
ifn dec, ifse [response][Tops-10] its==0 ? 10x==0 ? 20x==0 ? .stop
|
||||
ifn dec, ifse [response][Bots-10] its==0 ? 10x==0 ? 20x==0 ? .stop
|
||||
ifse [response][?]{
|
||||
printx "One of the following:
|
||||
"
|
||||
ifn its, printx " ITS "
|
||||
ifn 10x, printx " Tenex "
|
||||
ifn 20x, printx " Twenex "
|
||||
ifn dec, printx " Tops-10 "
|
||||
printx "
|
||||
"
|
||||
.go retry
|
||||
}
|
||||
ifb [response]{
|
||||
ifn its&.its, 10x==0 ? 20x==0 ? dec==0 ? .stop
|
||||
ifn 10x&.10x, its==0 ? 20x==0 ? dec==0 ? .stop
|
||||
ifn 20x&.20x, its==0 ? 10x==0 ? dec==0 ? .stop
|
||||
ifn dec&.dec, its==0 ? 10x==0 ? 20x==0 ? .stop
|
||||
}
|
||||
printx |"response" is not valid. Type "?" for list.
|
||||
|
|
||||
.go retry
|
||||
termin
|
||||
termin
|
||||
system ; ask which system to assemble for
|
||||
expunge system ; macro is no longer needed
|
||||
]
|
||||
|
||||
tnx==10x\20x ; TNX iff either 10X or 20X
|
||||
|
||||
|
||||
; Now that the operating system is determined, pick an output format.
|
||||
ifndef $$rel, $$rel==:0 ; default is not to use crufty linkers
|
||||
ife $$rel,[
|
||||
ifn its, ife .its, sblk
|
||||
ife its, .decsav
|
||||
]
|
||||
ifn $$rel,[
|
||||
ifn its, relocatable
|
||||
ife its, .decrel
|
||||
]
|
||||
|
||||
; Remove the multitude of output format pseudos now that we've picked one.
|
||||
expunge .decsav,.decrel,.dectwo,.sldr,1pass,relocatable,rim,rim10,sblk
|
||||
|
||||
|
||||
ifn its, ife .its, .insrt itsdfs
|
||||
ifn tnx,[
|
||||
ife .tnx,[
|
||||
ifn .its,[
|
||||
.insrt sys;tnxdfs
|
||||
.tnxjs
|
||||
.insrt sys;twxbts
|
||||
]
|
||||
ife .its,[
|
||||
.insrt tnxdfs
|
||||
.tnxjs
|
||||
.insrt twxbts
|
||||
]
|
||||
]
|
||||
]
|
||||
ifn dec,[
|
||||
ife .dec, [
|
||||
ifn .its,[
|
||||
.insrt sys;decdfs
|
||||
.insrt sys;decbts
|
||||
]
|
||||
ife .its,[
|
||||
.insrt decdfs
|
||||
.insrt decbts
|
||||
]
|
||||
]
|
||||
]
|
||||
|
||||
|
||||
; Page size definitions
|
||||
ifn its, pg$log==:10.
|
||||
ifn tnx, pg$log==:9.
|
||||
ifn its\tnx,[
|
||||
pg$siz==:1_pg$log
|
||||
pg$msk==:pg$siz-1
|
||||
]
|
||||
BIN
src/syseng/tctyp.153
Executable file
BIN
src/syseng/tctyp.153
Executable file
Binary file not shown.
Reference in New Issue
Block a user