Trailing-Edge
-
PDP-10 Archives
-
decuslib20-06
-
decus/20-153/rpgunv.mac
There is 1 other file named rpgunv.mac in the archive. Click here to see a list.
UNIVER RPGUNV RPGII UNIVERSAL FILE
; RPGUNV
;
; UNIVERSAL FILE FOR RPGII ASSEMBLY
;
; BOB CURRIER DECEMBER 27, 1975
;
; ALL RIGHTS RESERVED, BOB CURRIER
;
.DIRECTIVE .NOBIN
;DEFINE VARIOUS USEFUL MACROS
;
;MACRO TO ACCEPT NAME OF OTS AND GENERATE SIX AND SEVEN BIT NAMES
DEFINE LIBNAM(%NAM),<
DEFINE %LB6,<
SIXBIT "'%NAM'"
>
DEFINE %LB7,<
POINT 7,[ASCIZ / SIXBIT "'%NAM'"/]
>
>
;Define macro to make sure we're on the right type of CPU
DEFINE CPUCHK (AC),<
JUMPPT (AC,.KA,.KA,.KI,%1)
JRST %1
.KA: IFE %CPU-1,<MSG <%RPGWCP Compiler was assembled to run on KI processor only>>
IFGE %CPU-2,<MSG <%RPGWCP Compiler was assembled to run on KL processor only>>
JRST %1
.KI: IFGE %CPU-2,<MSG <%RPGWCP Compiler was assembled to run on KL processor only>>
%1:
>
;Define macro to verify if all flags have been properly set up
DEFINE CPUVER,<
IFN BIS,<
IFL %CPU-2,<
PRINTX ?Sorry, BIS is only supported on KL CPU's
>>
IFN FTENEX,<
IFE %CPU-%20,<
PRINTX ?Sorry, you must take your choice of either TENEX or TOPS-20, not both
>>
>
;Define SCAN MACRO's
;
;
;MSG$ is followed by the three letter error code, one of the indicators
;ERR, WRN, or INF for which class of message, an optional S to save all
;accumulators, and the message text. It will force out any TTY buffers,
;issue the file name if not yet done, then issue the message
;correctly prefixed.
;
DEFINE MSG$(CODE$,LEVEL$,SAVEF$,TEXT$),<XLIST
E$$'CODE$:
IFIDN <SAVEF$><S>,< SAVE$ <A,B,C,D> >
MOVE A,[''CODE$'',,[ASCIZ \TEXT$\] ]
LIST
PUSHJ PP,LEVEL$'MSG
XLIST
IFIDN <SAVEF$><S>,< RSTR$ <D,C,B,A> >
LIST>
;SAVE$ pushs the list of locations onto the stack.
;
;
DEFINE SAVE$(LIST$),<
XLIST
IRP (LIST$),< PUSH PP,LIST$ >
LIST
>
;RSTR$ pops the list of locations from the stack
;
;
DEFINE RSTR$(LIST$),<
XLIST
IRP (LIST$),< POP PP,LIST$ >
LIST
>
;DEFINE MACRO TO GET ERROR CAUSING LINE NUMBER
;
;USED BY PHASE E ROUTINES
;
DEFINE GETLN,<
LDB LN,OP.LN##
MOVEM LN,SAVELN##
>
;DEFINE MISC CONSTANTS
;
;DEFINITIONS FOR THE 20/40
.PRIIN==100 ; PRIMARY INPUT JFN
.PRIOU==101 ; PRIMARY OUTPUT JFN
%20==3 ; FLAG FOR 20/40 CODE
;OUTPUT MACROS
DEFINE MSG (MES),<
OUTSTR [ASCIZ \MES\]
>
DEFINE CHROUT (CHR),<
OUTCHR CHR
>
END