mirror of
https://github.com/PDP-10/its.git
synced 2026-03-09 04:19:38 +00:00
106 lines
2.1 KiB
Groff
Executable File
106 lines
2.1 KiB
Groff
Executable File
.sbttl MINITS macros
|
||
|
||
;;; ;;; General info:
|
||
;;; ;;; Complete and utter hair in here. This sets things up for
|
||
;;; ;;; the configuration file.
|
||
|
||
.sbttl Allow definition of host string
|
||
|
||
.macro .host. name
|
||
.macro $host$
|
||
.asciz \name\
|
||
.endm
|
||
.macro %host%
|
||
.ascii \name\
|
||
.endm
|
||
.endm
|
||
|
||
.sbttl Constant and Variable storage construction macros
|
||
|
||
;;; DEFCON allows code to be assembled in the constant region of the
|
||
;;; program, which is retreivable by CONSTANTS. Uses the APPEND macro
|
||
|
||
txtint constants
|
||
.macro defcon code
|
||
append constants,^|code
|
||
|
|
||
.endm
|
||
|
||
;;; .STRING takes a character string arggument, and optionally a
|
||
;;; pointer. The character string is assembled in the constants area,
|
||
;;; and either sets the pointer to the string, or deposits the
|
||
;;; pointer with a .word
|
||
|
||
%nstr==77
|
||
.macro .string chars,pointr
|
||
%nstr==%nstr+1
|
||
.irp num,\%nstr
|
||
.iif nb pointr, pointr=str'num
|
||
.ielse .word str'num
|
||
defcon ^|str'num:.asciz ãharsŠ
|
||
.even|
|
||
.endm
|
||
.endm
|
||
|
||
;;; .LITRL similar to .string except it assembles code not .asciz in
|
||
;;; the constants area
|
||
|
||
%nlit==77
|
||
.macro .litrl code,pointr
|
||
%nlit==%nlit+1
|
||
.irp num,\%nlit
|
||
.iif nb pointr, pointr=lit'num
|
||
.ielse .word lit'num
|
||
defcon ^|lit'num:code|
|
||
.endm
|
||
.endm
|
||
|
||
.sbttl Random macros
|
||
|
||
.macro .regs a,b,c,d,e,f
|
||
.irp arg,<a,b,c,d,e,f>
|
||
.irp num,\.irpcnt
|
||
.if idn arg,#0
|
||
clr r'num
|
||
.iff
|
||
.lif nb arg
|
||
mov arg,r'num
|
||
.endc
|
||
.endm
|
||
.endm
|
||
.endm
|
||
|
||
.macro key string,data
|
||
.string ^"string"
|
||
data
|
||
.endm
|
||
|
||
txtint atktyp
|
||
txtint atkhlp
|
||
natk==0
|
||
.macro atk ttytyp,string
|
||
natk==natk+1
|
||
appnd1 atktyp,< t.'ttytyp: .word 0>
|
||
appnd1 atkhlp,< .ascii string¼%tdcrl>>
|
||
.endm
|
||
|
||
.sbttl Device defining macros
|
||
|
||
;;; magic characters
|
||
ch%brk==100000 ;high bit always, low byte word index able
|
||
|
||
txtint devini
|
||
txtint devpwu
|
||
txtint devdef
|
||
txtint devfil
|
||
.macro defdev device,file,code
|
||
appnd1 devini,< call device'ini >
|
||
appnd1 devpwu,< call device'pwu >
|
||
txtint device'def
|
||
appnd1 devdef,^ãode ;remember for later recall
|
||
.iif nb ^æile¬ appnd1 devfil,^¤insrt fileŠ
|
||
.endm
|
||
|
||
;;; local modes:
|
||
;;; mode:midas
|
||
;;; comment column:32
|
||
;;; end:
|