mirror of
https://github.com/PDP-10/its.git
synced 2026-02-11 18:54:32 +00:00
Build NWATCH.
This commit is contained in:
committed by
Eric Swenson
parent
95cb6f4a9e
commit
f78c65e3cc
117
src/eak/macros.36
Executable file
117
src/eak/macros.36
Executable file
@@ -0,0 +1,117 @@
|
||||
; MACROS - MIDAS macros for ITS
|
||||
|
||||
|
||||
IF2 .INEOF ; only assemble on pass 1
|
||||
|
||||
define tellversion
|
||||
if1 [
|
||||
.tyo6 .ifnm1
|
||||
printx " "
|
||||
.tyo6 .ifnm2
|
||||
printx " Included in this assembly
|
||||
"]
|
||||
termin
|
||||
|
||||
tellversion
|
||||
|
||||
|
||||
SUBTTL Definitions
|
||||
|
||||
; Macro to define registers
|
||||
define register name
|
||||
if1 [
|
||||
name=:.reg.
|
||||
.reg.==.reg.+1
|
||||
]
|
||||
termin
|
||||
|
||||
.reg.==0
|
||||
|
||||
|
||||
; Register definitions
|
||||
register F ; program flags
|
||||
register P ; pdl ptr
|
||||
register T ; temporaries
|
||||
register T1 ; (not saved by uuos)
|
||||
register T2
|
||||
register A ; A-E saved by subrs
|
||||
register B
|
||||
register C
|
||||
register D
|
||||
register E
|
||||
|
||||
; Define acs for .I and .F
|
||||
A0==:T
|
||||
A1==:T1
|
||||
A2==:T2
|
||||
|
||||
TT==:T1 ; for using other MACRO packages
|
||||
|
||||
; Common byte-pointer LH's
|
||||
$opcod==:331100 ; Instruction op-code
|
||||
$acfld==:270400 ; Instruction AC field
|
||||
|
||||
|
||||
; .BREAK 12, codes (as defined by DDT)
|
||||
..rcmd==:5 ; read command line
|
||||
..scmd==:400005 ; set command line
|
||||
..rrnd==:14 ; read ..URANDM
|
||||
..srnd==:400014 ; set ..URANDM
|
||||
|
||||
|
||||
EQUALS BEGIN,.BEGIN ; BEGIN looks better than .BEGIN
|
||||
EQUALS VAR,.SCALAR ; Use VAR for vectors and scalars
|
||||
|
||||
|
||||
; Macro to print on tty during assembly
|
||||
define inform a,b,c,d,e,f,g
|
||||
printx á!b!c!d!e!f!g
|
||||
Š
|
||||
termin
|
||||
|
||||
|
||||
; Macro to define bit names for use with ac F.
|
||||
define flag x
|
||||
if1 [
|
||||
ife %f.&777777, .ERR Too many flags declared
|
||||
%f!x==%f.
|
||||
.c"%f.==%f._1
|
||||
]
|
||||
termin
|
||||
|
||||
%f.==1 ; for defining flags in RH of F
|
||||
%f==525252 ; for DDT's bit typeout mode
|
||||
|
||||
|
||||
; Macro to define channel no.s
|
||||
define channel name
|
||||
if1 [
|
||||
name==:.chnl.
|
||||
.chnl.==.chnl.+1
|
||||
]
|
||||
termin
|
||||
|
||||
.chnl.==1
|
||||
|
||||
|
||||
; Macro to produce string constant
|
||||
define string &x&
|
||||
440700,,[ascii x] ? .length x termin
|
||||
|
||||
|
||||
; Macro to simulate KL10's ADJSP instruction
|
||||
define adjsp sp,amt
|
||||
ifl amt, sub sp,[-amt,,-amt]
|
||||
.else [ add sp,[amt,,amt]
|
||||
jumpl sp,.+2
|
||||
.suset [.sipirq,,[%pipdl]]
|
||||
]
|
||||
termin
|
||||
|
||||
|
||||
; Macro to output string constants
|
||||
define sout ch,ctrl,&s&
|
||||
move t1,[440700,,[ascii s]]
|
||||
movei t2,.length s
|
||||
$call siot,[ch,t1,t2][][ctrl]
|
||||
.lose %lssys
|
||||
Reference in New Issue
Block a user