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,> IFGE %CPU-2,> JRST %1 .KI: IFGE %CPU-2,> %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$),,< SAVE$ > MOVE A,[''CODE$'',,[ASCIZ \TEXT$\] ] LIST PUSHJ PP,LEVEL$'MSG XLIST IFIDN ,< RSTR$ > 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