SNODEF COMMON TITLE TYPE, MACRO, AND GLOBAL CELL DECLARATIONS SNODEF 1 * SNODEF 2 * SOME PARAMETERS AND CONSTANTS SNODEF 3 * SNODEF 4 TSS EQU 0 . THIS IS NOT THE TSS VERSION SNODEF 5 TRCFLG EQU 1 . ASSEMBLE IN THE MACHINE LANG. TRACESNODEF 6 * SNODEF 7 CHSIZ EQU 6 . BITS/CHARACTER SNODEF 8 CHMASK EQU 77B . 2 @ CHSIZ - 1 SNODEF 9 CHPWD EQU 42/CHSIZ . CHARACTERS/WORD SNODEF 10 * SNODEF 11 * SIMPLE VARIABLE TYPES SNODEF 12 * SNODEF 13 SFTY EQU 0 . TEMPORARY STRING IN LIST FORM SNODEF 14 STY EQU 1 . STRING IN CHARACTER FORM SNODEF 15 SSTY EQU 2 . STRING IN LIST FORM SNODEF 16 SITY EQU 3 . INTEGER CONSTANTS SNODEF 17 PSTY EQU 4 . SIMPLE PATTERN SNODEF 18 PATY EQU 5 . ALTERNATED PATTERNS SNODEF 19 PETY EQU 6 . CONCATENATED PATTERNS SNODEF 20 ITY EQU 7 . BINARY INTEGER SNODEF 21 RTY EQU 8 . REAL VALUE SNODEF 22 ATY EQU 9 . ARRAY REFERENCE SNODEF 23 DTY EQU 10 . DATA REFERENCE SNODEF 24 NTY EQU 11 . NAME SNODEF 25 CTY EQU 12 . CODE REFERENCE SNODEF 26 INTY EQU 13 . INPUT ASSOCIATED SNODEF 27 OUTTY EQU 14 . OUTPUT ASSOCIATED SNODEF 28 SPECTY EQU 14 . LEFT OPERAND IN STACK SNODEF 29 * SNODEF 30 * STATIC RECORD TYPES SNODEF 31 * SNODEF 32 VARTYP EQU 37B-1 . SIMPLE VARIABLE SNODEF 33 CALLTYP EQU 37B-2 . FUNCTION SNODEF 34 LBLTYP EQU 37B-3 . LABEL SNODEF 35 LITTYP EQU 37B-4 . LITERAL STRING SNODEF 36 INTTYP EQU 37B-6 . INTEGER CONSTANT SNODEF 37 REALTYP EQU 37B-7 . REAL CONSTANT SNODEF 38 STRTYP EQU 37B-10B . ARRAY/DATA STRUCTURE SNODEF 39 FILTYP EQU 37B-11B . FET AND I/O BUFFER SNODEF 40 DOPTYP EQU 37B-12B . DOPE VECTOR SNODEF 41 CODTYP EQU 37B-13B . COMPILED MICROCODE SNODEF 42 FRETYP EQU 37B-14B . FREE HEAP BLOCK SNODEF 43 * SNODEF 44 * FUNCTION TYPES SNODEF 45 * SNODEF 46 PROCTYP EQU 0 . PROCEDURE SNODEF 47 UNDFTYP EQU 1 . UNDEFINED FUNCTION OR LABEL SNODEF 48 DATATYP EQU 3 . DATA CONSTRUCTOR SNODEF 49 FLDTYP EQU 10B . FIELD SELECTOR SNODEF 50 * SNODEF 51 * LABEL TYPES SNODEF 52 * SNODEF 53 LPRGDFTY EQU 0 . PROGRAM-DEFINED LABEL SNODEF 54 LUNDFTY EQU 1 . UNDEFINED LABEL (SAME AS UNDFTYP) SNODEF 55 LRETY EQU 2 . RETURN LABEL SNODEF 56 LFRETY EQU 3 . FRETURN LABEL SNODEF 57 LNRETY EQU 4 . NRETURN LABEL SNODEF 58 LENDTY EQU 5 . END LABEL SNODEF 59 * SNODEF 60 * MACRO TO CALL A SUBROUTINE SNODEF 61 * SNODEF 62 CALL MACRO A,REG,RET SNODEF 63 LOCAL NEXT SNODEF 64 XX IFC NE,/REG// SNODEF 65 YY IFC NE,/RET// SNODEF 66 S_REG RET SNODEF 67 YY ELSE SNODEF 68 S_REG NEXT SNODEF 69 YY ENDIF SNODEF 70 XX ELSE SNODEF 71 YY IFC NE,/RET// SNODEF 72 SB1 RET SNODEF 73 YY ELSE SNODEF 74 SB1 NEXT SNODEF 75 YY ENDIF SNODEF 76 XX ENDIF SNODEF 77 JP A SNODEF 78 NEXT BSS 0 SNODEF 79 ENDM SNODEF 80 * SNODEF 81 * MACRO TO SWITCH ON DATATYPE SNODEF 82 * SNODEF 83 SWITCH MACRO Q,A,B,C,D,E,F,G,H,I,J,K,L,M,N,O SNODEF 84 + VFD 4/O,4/N,4/M,4/L,4/K,4/J,4/I,4/H,4/G,4/F,4/E,4/D,4/C,4/B,4/ASNODEF 85 Q BSS 0 SNODEF 86 ENDM SNODEF 87 * SNODEF 88 * MACROS TO TEST A CHARACTER. SNODEF 89 * SNODEF 90 IFCH MACRO CHAR,WHERE SNODEF 91 SX7 X2-1R_CHAR SNODEF 92 ZR X7,WHERE SNODEF 93 ENDM SNODEF 94 * SNODEF 95 IFNCH MACRO CHAR,WHERE SNODEF 96 SX7 X2-1R_CHAR SNODEF 97 NZ X7,WHERE SNODEF 98 ENDM SNODEF 99 * SNODEF 100 * MACRO TO GENERATE AN SS TYPE SVD FOR A GIVEN STRING. SNODEF 101 * THE 'LAST' FIELD OF THE SVD IS ASSEMBLED RELATIVE TO 'FIRST'. SNODEF 102 PERMSS MACRO STRING SNODEF 103 LOCAL FIRST,LAST,CLENGTH SNODEF 104 VFD 5/SSTY,1/0,18/CLENGTH,18/LAST-FIRST,18/FIRST SNODEF 105 PERMSTR (STRING),FIRST,LAST,CLENGTH SNODEF 106 ENDM SNODEF 107 * SNODEF 108 * FOLLOWING MACRO ASSEMBLES A (7 CHARACTER/WORD, LINKED-FORMAT) STRING,SNODEF 109 * SETTING THE ?BY NAME? PARAMETERS FIRST , LAST , AND CLENGTH SNODEF 110 * APPROPRIATELY. SNODEF 111 PERMSTR MACRO STRING,FIRST,LAST,CLENGTH SNODEF 112 LOCAL NEXT,TLEN SNODEF 113 PERMSTRF MICRO 1,7,?_STRING_? SNODEF 114 PERMSTRR MICRO 8,,?_STRING_? SNODEF 115 PERMSTRX IFC EQ,?_'PERMSTRR'_?_? SNODEF 116 TLEN SET 0 SNODEF 117 PERMSTRR MICRO 1,,?_STRING_? SNODEF 118 DUP 7 SNODEF 119 PERMSTRY IFC EQ,?_'PERMSTRR'_?_? SNODEF 120 STOPDUP SNODEF 121 PERMSTRY ELSE SNODEF 122 PERMSTRR MICRO 2,,?_'PERMSTRR'_? SNODEF 123 TLEN SET TLEN+1 SNODEF 124 PERMSTRY ENDIF SNODEF 125 ENDD SNODEF 126 PERMSTRN MICRO TLEN+1,1,?01234567? SNODEF 127 FIRST BSS 0 SNODEF 128 LAST VFD 42/_'PERMSTRN'_L_STRING,18/0 SNODEF 129 CLENGTH EQU TLEN SNODEF 130 PERMSTRX ELSE SNODEF 131 FIRST VFD 42/7L_'PERMSTRF'_,18/NEXT SNODEF 132 PERMSTR (_'PERMSTRR'_),NEXT,LAST,TLEN SNODEF 133 CLENGTH EQU TLEN+7 SNODEF 134 PERMSTRX ENDIF SNODEF 135 ENDM SNODEF 136 * SNODEF 137 * MACROS TO CALL DEBUG PACKAGE. SNODEF 138 TRACE MACRO MODE,ADDR,REGS SNODEF 139 TR IFC EQ,/MODE// SNODEF 140 * BEGIN TRACING (MAY BE TRACED): SNODEF 141 RJ =XTRACE. SNODEF 142 TR ENDIF SNODEF 143 LI IFC EQ,/MODE/LIST/ SNODEF 144 * BEGIN LISTING (EFFECTIVE ONLY IF CURRENTLY TRACING): SNODEF 145 NO 2 SNODEF 146 LI ENDIF SNODEF 147 NOLI IFC EQ,/MODE/NOLIST/ SNODEF 148 * STOP LISTING (EFFECTIVE ONLY IF CURRENTLY TRACING): SNODEF 149 NO 1 SNODEF 150 NOLI ENDIF SNODEF 151 NOTR IFC EQ,/MODE/NOTRACE/ SNODEF 152 * STOP TRACING (NO-OPS IF NOT TRACED): SNODEF 153 RJ =XUTRACE. SNODEF 154 NOTR ENDIF SNODEF 155 RF IFC EQ,/MODE/REFSTOP/ SNODEF 156 * SET REFERENCE STOP (EFFECTIVE ANY TIME): SNODEF 157 RJ =XCMREF. SNODEF 158 VFD 6/0,24/REGS,30/ADDR SNODEF 159 RF ENDIF SNODEF 160 ENDM SNODEF 161 * SNODEF 162 * SYMBOLS DESCRIBING FILTYP HEAP BLOCKS SNODEF 163 * SNODEF 164 FI.RFC EQU 1 . EOI FLAG, REFERENCE COUNT SNODEF 165 FI.FET EQU 2 . BEGINNING OF FILE ENVIRONMENT TABLESNODEF 166 FI.BUF EQU 7 . BEGINNING OF CIRCULAR BUFFER SNODEF 167 * SNODEF 168 * SYMBOLS DESCRIBING SCOPE FILE ENVIRONMENT TABLES (FETS) SNODEF 169 * SNODEF 170 FET.LFN EQU 0 . LOGICAL FILE NAME, CODE AND STATUS SNODEF 171 FET.FRST EQU 1 . FIRST POINTER SNODEF 172 FET.IN EQU 2 . IN POINTER SNODEF 173 FET.OUT EQU 3 . OUT POINTER SNODEF 174 FET.LIM EQU 4 . LIMIT POINTER SNODEF 175 FET.LEN EQU 5 . ACTUAL LENGTH OF FET SNODEF 176 FET.SZ EQU 1 . PSEUDO SIZE = FAKE LENGTH - 1 SNODEF 177 * SNODEF 178 * SYMBOLS DEFINING BITS WITHIN THE SCOPE FET STATUS FIELD SNODEF 179 * SNODEF 180 FS.BUSY EQU 59-0 . COMPLETION BIT SNODEF 181 FS.MODE EQU 59-1 . PARITY BIT, 0 = EVEN = CODED SNODEF 182 FS.EOF EQU 59-3 . END OF FILE (WITH FS.EOR) SNODEF 183 FS.EOR EQU 59-4 . END OF RECORD SNODEF 184 FS.EOI EQU 59-9 . END OF INFORMATION SNODEF 185 * SNODEF 186 STREAM MACRO STRM,XSCR SNODEF 187 IFC EQ,/XSCR// SNODEF 188 SA1 STRM SNODEF 189 SB2 X1 SNODEF 190 ELSE SNODEF 191 SA.XSCR STRM SNODEF 192 SB2 X.XSCR SNODEF 193 ENDIF SNODEF 194 ENDM SNODEF 195 * SNODEF 196 CIO MACRO CODE,RCLFLAG SNODEF 197 IFC EQ,/RCLFLAG// SNODEF 198 MX0 60 SNODEF 199 ELSE SNODEF 200 MX0 59 SNODEF 201 ENDIF SNODEF 202 SX7 CODE SNODEF 203 RJ =XCALLCIO SNODEF 204 ENDM SNODEF 205 * SNODEF 206 CIO.READ EQU 10B . BUFFERED READ SNODEF 207 CIO.WRIT EQU 14B . BUFFERED WRITE SNODEF 208 CIO.WEOR EQU 24B . WRITE END OF RECORD (FLUSH BUFFER) SNODEF 209 CIO.BWRR EQU 26B . BINARY MODE WRITE EOR SNODEF 210 CIO.RWND EQU 50B . REWIND FILE SNODEF 211 * SNODEF 212 RCL MACRO AUTOFLAG SNODEF 213 IFC EQ,/AUTOFLAG// SNODEF 214 MX0 60 SNODEF 215 ELSE SNODEF 216 MX0 59 SNODEF 217 ENDIF SNODEF 218 RJ =XCALLRCL SNODEF 219 ENDM SNODEF 220 * SNODEF 221 * MACRO TO WAIT FOR FILE ACTIVITY TO CEASE. USES X0, A2-X2, A7-X7. SNODEF 222 * SNODEF 223 WARTAUF MACRO SNODEF 224 LOCAL NEXT SNODEF 225 SA2 B2+FI.FET+FET.LFN SNODEF 226 LX2 FS.BUSY SNODEF 227 NG X2,NEXT SNODEF 228 RCL AUTO SNODEF 229 NEXT BSS 0 SNODEF 230 ENDM SNODEF 231 * SNODEF 232 * MACRO TO GENERATE RUN-TIME ERROR MESSAGE: SNODEF 233 MACRO ERROR,LABEL,NUMBER SNODEF 234 XX IFC NE,/LABEL/+/ SNODEF 235 YY IFC NE,/LABEL// SNODEF 236 ENTRY LABEL SNODEF 237 YY ENDIF SNODEF 238 XX ENDIF SNODEF 239 LABEL SB5 NUMBER SNODEF 240 JP RTERROR SNODEF 241 ENDM SNODEF 242 * SNODEF 243 * LOWCORE SNODEF 244 EXT BGP3STK,BGP2STK SNODEF 245 EXT HASHLWD,HASHLN,HASHTBL SNODEF 246 EXT FIELDLN,MAXLS,MAXHS,MINHS SNODEF 247 EXT MAXSTAK,MINSTAK SNODEF 248 EXT NXTWRD,FRSTWRD SNODEF 249 EXT INFAIL SNODEF 250 EXT CODLIST,FILLIST,FHBLRP SNODEF 251 EXT INSTRM,OUTSTRM,BUFFSIZ SNODEF 252 EXT FLDLM,MXLNGTH,STCOUNT,STLIM,ANCHOR SNODEF 253 EXT INTRPT,STATWD,STATHBC,STATSC,STATTRC SNODEF 254 EXT FREQWD SNODEF 255 EXT ARROWD,MAXSTAT,LBLLINK,VARLINK SNODEF 256 EXT TESTCND,TSTPMOP,PRGBASE SNODEF 257 EXT COMPB7,P1ERFLG,LC,PAGENO,RULENO SNODEF 258 EXT P1MAX,P1TEMP1,P1TEMP2,P1TEMP3,P4SVX4,P4SVB5 SNODEF 259 EXT CURWD,P0STWD,P1LTFLG SNODEF 260 EXT PIX,SIX,PIB,LENFAIL,SBASE SNODEF 261 EXT TEMPDOL,SLENGTH,PCHAIN SNODEF 262 EXT PMASX6,PMASX0,PMASX3,PMASX2,PMASX4 SNODEF 263 EXT PMASB1,PMASB2,PMASB4 SNODEF 264 EXT CALLB5P,DATAWD,PMA5,SPOS,DTYPWD,UA SNODEF 265 EXT PMSTX3,PMSTB1,PMSTB3,PMSTB4 SNODEF 266 EXT PMFA0,PMFX4,PMFA4 SNODEF 267 EXT MSGSTAT SNODEF 268 EXT QARSV,QIOSV,QDEFSV1,QDEFSV2,QDEFSV3 SNODEF 269 EXT QFRZSV,QEQSV,QDATSV1 SNODEF 270 EXT VIPTR,VLASTB,VNWLS,VNCODB,VNFHB,VNFILB SNODEF 271