1 Assembler C9208 14-Jun-93 17:33 PAGE 1 ($$$LOGO.) F 2 1 INPUT $$$LOGO. 1 2 3 4 5 6 7 8 9 10 * ......... BBBBBBBBBBBBBBBBBB TTTTTTTTTTTTTTTTTTTTTTTT IIIIIIIIIIII 11 * ................. BBBBBBBBBBBBBBBBBBBBB TTTTTTTTTTTTTTTTTTTTTTTT IIIIIIIIIIII 12 * ..........##......... BBBBBBBBBBBBBBBBBBBBBB TTTTTTTTTTTTTTTTTTTTTTTT IIIIIIIIIIII 13 * ............##........... BBBBBB BBBBBB TTTTTT TTTTTT TTTTTT IIIIII 14 * .............##............ BBBBBB BBBBBB TTTTT TTTTTT TTTTT IIIIII 15 * .............##............ BBBBBB BBBBBBB TTTT TTTTTT TTTT IIIIII 16 * ..............##............. BBBBBBBBBBBBBBBBBBB TTTTTT IIIIII 17 * ..............##............. BBBBBBBBBBBBBBBBB TTTTTT IIIIII 18 * ..............##............. BBBBBBBBBBBBBBBBBBB TTTTTT IIIIII 19 * .............##.............. BBBBBB BBBBBB TTTTTT IIIIII 20 * ...........##.............. BBBBBB BBBBBB TTTTTT IIIIII 21 * ..........##............... BBBBBB BBBBBB TTTTTT IIIIII 22 * ........##............... BBBBBB BBBBBBB TTTTTT IIIIII 23 * .....##.............. BBBBBBBBBBBBBBBBBBBBBBBB TTTTTTTTTTTT IIIIIIIIIIII 24 * ................. BBBBBBBBBBBBBBBBBBBBBBB TTTTTTTTTTTT IIIIIIIIIIII 25 * ......... BBBBBBBBBBBBBBBBBBBB TTTTTTTTTTTT IIIIIIIIIIII 26 * 27 * 28 * ****** Copyright 1982, 1983, 1984, 1985, 1986, 1987, 1988, 29 * 1989, 1990, 1991, 1992 BTI Computer Systems ****** 30 * 31 * This document and the program it describes are the exclusive property 32 * of and proprietary to BTI Computer Systems. No use, reproduction, or 33 * disclosure of this document or its contents, either in full or in part, 34 * by any means whatsoever regardless of purpose may be made without the 35 * prior written consent of BTI Computer Systems. 36 * 37 * BTI Computer Systems 38 * Sunnyvale, California 94086 1 Assembler C9208 14-Jun-93 17:33 PAGE 2 F 0 3 4 CM BLOCK 5 ENTRY MCINIT 6 START MCINIT 7 EXT 8 9 ********************************************************************************** 10 * * 11 * Welcome to Control Mode!! It is a complete 'job * 12 * control language' designed to run under the VRM operating * 13 * system and provide an interface between the system and its * 14 * users. It provides users with information about the * 15 * system, allows users to log on to and log off of the * 16 * system, call programs run command files, and call other * 17 * system utilities. * 18 * * 19 * Control Mode is entered initially when a user hits * 20 * the break key on an on-line terminal. Control Mode will * 21 * then communicate with the user and take the user through * 22 * the log-in process if it is able to do so. Certain * 23 * restrictions may be in effect that will disallow a log-in. * 24 * These include inhibited terminal and insufficient disk * 25 * space available on the system disk. Control Mode will be * 26 * re-entered from time to time for a number of reasons. * 27 * Entries to Control Mode occur from a break request, * 28 * completion of an executive request to run some user * 29 * program or variable sets and gets. * 30 * * 31 * Control Mode is a trusted program and as such the OS * 32 * grants certain privileges and expects certain conditions * 33 * to be met. One of these conditions is the handling of * 34 * swapping pages. Swapping pages are used by Control Mode * 35 * to hold global variables. Prior to a logon swapping pages * 36 * are charged to the system, after a successful logon the * 37 * system must be recredited with those swapping pages still * 38 * in use. The logon account in turn must be charged with * 39 * those swapping pages. The pages must then be discarded so * 40 * that all new swapping pages come from the disk where the * 41 * logon account resides. The same result with with a * 42 * slightly different story holds true for a logoff. The * 43 * following describes the steps taken by both the system and * 44 * Control Mode to ensure proper limit updating during logons * 45 * and logoffs. * 46 * * 47 * Prior to a logon all the swapping pages are discarded * 48 * except page 0, which holds temporarily needed information. * 49 * At the time of the logon (a successful one) the new * 50 * account is charged for the one swapping page and the * 51 * system recredited that one swapping page. Due to the * 52 * possibility that the user may have done a cross log we * 53 * save away the vital information, then discard page 0 and * 54 * then restore all required information. This is done * 55 * because the swapping page may belong to a disk that is * 56 * about to be unloaded and if the disk does go away I can * 57 * almost guarantee that the system will crash!!! Note that * 58 * there is still a small window were the system may still * 1 Assembler C9208 14-Jun-93 17:33 PAGE 3 F 0 59 * crash, however this is an acceptable risk. * 60 * * 61 * The logoff side of things works similar except that * 62 * all units, except the absolute IO units are unequipped. * 63 * This is done so that units don't magically show up where * 64 * they are not supposed to be. When the logoff request is * 65 * issued all swapping blocks have been discarded except * 66 * block 0. The system account is then charged for that one * 67 * swapping page and the old logon account is recredited for * 68 * that page. During a cross log Control Mode issues a * 69 * logoff request prior to reissuing the logon request so * 70 * this case has been taken into consideration. * 71 * * 72 * * 73 * Core allocation is as follows: * 74 * * 75 * Core Address Usage * 76 * ------------ ------------------------------------- * 77 * 00000 Impure page - everyday garbage * 78 * 00400 impure page - user variables * 79 * 00800 impure page - user variables * 80 * 00C00 impure page - user variables * 81 * 01000 impure page - Catalog information * 82 * ... (catalog info may exist through address 0C3FF) * 83 * 10000 Pure page - constants, subroutines * 84 * 10400 pure page - subroutines, command processors * 85 * 10800 pure page - command processors, messages * 86 * 10C00 pure page - messages, IF processor, CATALOG * 87 * 11000 pure page - CATALOG processor, Errors * 88 * 11400 pure page - error messages, Help info * 89 * 11800 pure page - Help information * 90 * ... (help info exists through page 13000) * 91 * * 92 * Within Control Mode a few of the general registers (R0-R7) * 93 * have uses as follows: * 94 * R5(SP) - stack pointer, dedicated to impure stack pointer * 95 * R6(ST) - status, dedicated to CM status information * 96 * * 97 * R4(DO) - DO pointer, often used to point to DO control block * 98 * R3(COM) - command pointer, often used to point to current * 99 * Control Mode command entry in command table. * 100 * R3(VAR) - variable pointer, often used to point to core block * 101 * for a user variable. * 102 * * 103 ********************************************************************************** 104 105 INPUT CM.UTL:REVISIONS 1 Assembler C9208 Control Mode C9304 14-Jun-93 17:33 PAGE 4 (REVISIONS) F 3 Revisions List 4 5 ********************************************************************************** 6 * * 7 * The following sets the version number within the code * 8 * file and also signifies the version to print out upon * 9 * successful logon. These symbols are combined to form the * 10 * string, VERSION. * 11 * * 12 ********************************************************************************** 13 43393330 ABS 14 CMVERS1 EQU "C930" 34202020 ABS 15 CMVERS2 EQU "4 " 16 17 ********************************************************************************** 18 * * 19 * To debug a version of Control Mode change the following * 20 * within a debugger, set your break points, and type go. From * 21 * there proceed with a normal logon, in order to cancel the * 22 * timer interrupt and inform CM that the session is properly * 23 * logged on. Have fun kids!!! * 24 * * 25 * CMEQLUN => #BB (000000BB) * 26 * MAXULUN => #AA (000000AA) * 27 * LOGJAMMER(7) => NOP (FEC00000) * 28 * VANITY10(2) => HALT (00000000) * 29 * * 30 * If you're debugging the logon code and need more than * 31 * one minute to get logged on, the following will prevent the * 32 * scheduling of the timer interrupt. * 33 * * 34 * MC05(10) => NOP (FEC00000) * 35 * * 36 * * 37 ********************************************************************************** 1 Assembler C9208 Control Mode C9304 14-Jun-93 17:33 PAGE 5 (REVISIONS) F 3 Revision List 40 41 ********************************************************************************** 42 * * 43 * Revision Date * 44 * -------- ---- * 45 * 1.4 23 Apr 83 * 46 * The CATALOG command was changed so that the optional * 47 * parameters NAME, and EXT accepted both normal and * 48 * wildcard name specifications. * 49 * 1.4-1 15 Jun 83 * 50 * The help information has been updated so that commands * 51 * that optionally take a unit or filename have been * 52 * updated. * 53 * * 54 * Guaranteed disk blocks have gone away. They have been * 55 * replaced by saved disk blocks, limit on permanent files. * 56 * Limits command shows appropriate values. Logon to * 57 * accounts with !, &, _, starting their extension name * 58 * will not execute the file .sys:greetings.logon. * 59 * 1.4-2 15 Jun 83 * 60 * Bug fix. Batch jobs submitted from special accounts, * 61 * div/proj name begining with !, &, _, will also not * 62 * execute the program .sys:greetings.logon. * 63 * 1.4-3 22 Nov 83 * 64 * SCN. Does not close units 101-200 when /XO programs * 65 * terminate. * 66 * 1.4-4 6 Jan 84 * 67 * Bug fix. Can not allow breaking out of password2.logon * 68 * programs. Also Password2.logon programs will always * 69 * execute from the logon account and not the alias account. * 70 * 1.5 9 Jan 84 * 71 * Addition of transaction in progress. Share read now * 72 * looks at entry length field. * 73 * 1.5-1 24 Jan 84 * 74 * Bug fix. Allow multiple units for a single OPEN request. * 75 * 1.5-2 29 Jan 84 * 76 * Bug fix. Must set/clear transaction bit in the FCB * 77 * whenever the transaction bit in the directory is being * 78 * set/cleared. * 79 * 1.5-3 08 Feb 84 * 80 * Bug fixes. Closed SPR's concerning opening multiple * 81 * units on one line. Batch jobs that do not request logon * 82 * must not run password2.logon program. If batch jobs do * 83 * request logon then password2.logon program will run, if it * 84 * exists. * 85 * 1.5-4 08 Feb 84 * 86 * Internal changes. This version of Control Mode is * 87 * pretty much a test code file. It doesn't work properly * 88 * if you find it get rid of it. * 89 * 1.5-5 08 Feb 84 * 90 * This version opens the error unit (3) for the user. CM now * 91 * only opens units 1, 2 and 3 for itself all other processes get * 92 * the units opened by the O.S. Also CM has been modified to work * 93 * with the expansion of the terminal type field to 12 characters. * 94 * 1.5-6 08 Feb 84 * 95 * Internal changes in regards to port types of 12 characters. * 1 Assembler C9208 Control Mode C9304 14-Jun-93 17:33 PAGE 6 (REVISIONS) F 3 Revision List 96 * 1.5-7 20 Mar 84 * 97 * This version still works with the local units version of the system,* 98 * however being that programs do not clean up after themselves, we * 99 * still need to close units 101-200. * 100 * 1.5-8 20 Mar 84 * 101 * Bug fix. Reset units with low unit being 3, did not get reopened * 102 * properly. * 103 * 1.6 26 Mar 84 * 104 * Bug fix. Transaction flag printing at wrong times. Added more * 105 * room for flags on STATUS and UNITS commands. * 106 * 1.6-1 26 Mar 84 * 107 * CM now recognizes 12 character port types. * 108 * 1.6-2 25 Jul 84 * 109 * Bug fix for +,$$$,$$,$ returning undefined opcode. The NAME and * 110 * EXT parameters accept the unequal character (#). * 111 * 1.6-3 27 Jul 84 * 112 * Bug fix so that RESET UNDER will only reset the top most under * 113 * program. * 114 * 1.6-4 01 Aug 84 (Released as 1.7) * 115 * Addition of new error messages C6 and C7. * 116 * 1.7-1 07 Sep 84 * 117 * Bug fix in the catalog long display that enables the entire user * 118 * field to be displayed. Bug fix to the selection criteria based * 119 * on the trasnsaction flag. * 120 * 1.7-2 25 Sep 84 * 121 * Patch to inhibit XO checking. * 122 * 1.7-3 02 Oct 84 * 123 * Change to the request that destroys under processes. This version * 124 * will only work with OS versions later than VRM3_6 (C8410c). * 125 * 1.7-4 15 Oct 84 * 126 * Addition of commands INHIBITBRK and ALLOWBRK to disable and enable * 127 * break processing in DO/BATCH files. All the execute-only garbage * 128 * has been taken out and chucked for good. * 129 * 1.7-5 18 Oct 84 * 130 * Modification of the STATELIST routine to check for execute * 131 * only process before proceeding. STATE command now has additional * 132 * parameter, PROCTREE, used to display the structure of the current * 133 * underprocess tree. * 134 * 1.7-6 22 Oct 84 (released as 2.0) * 135 * Added call to OLDDEBUG, this is the debugger used with programs * 136 * generated with the old symbol table format. Fixed bug that crashed * 137 * CM for not trapping operator soft aborts. Commands INPUT and * 138 * REQUEST no longer interrupted due to operator warning. * 139 * C8411a 2 Nov 84 * 140 * Bug fix in interrupt routine to always accept operator requests, * 141 * at times we would ignore them consequently losing them. Changed * 142 * version number to use date. * 143 * 2.1 2 Nov 84 * 144 * Patch to allow interupt routines to always accept operator * 145 * requests. * 146 * C8411b 7 Nov 84 * 147 * Addition of INPUT$ and INPUT#. The dollar sign ($) specifies * 148 * that the INPUT statement is to expect a string. The pound * 149 * sign specifies that the INPUT statement is to expect a number. * 150 * The standard INPUT statement remains the same. * 151 * C8411c 13 Nov 84 (Released as version 2.2) * 1 Assembler C9208 Control Mode C9304 14-Jun-93 17:33 PAGE 7 (REVISIONS) F 3 Revision List 152 * Simplification of the method by which operator messages are * 153 * given to Control Mode. New library call LINK. * 154 * C8411d 30 Nov 84 (Released as version 2.3) * 155 * Fix to UNRUN routine, register got wasted before its time * 156 * Bug fix to the VARMAKECHK routine so that it does not zap * 157 * input buffer where we keep the string to assign to the variable. * 158 * 2.3-1 6 Mar 84 * 159 * Change to the COMMANDSPL routine to accomodate corresponding * 160 * header change in spooler reply. Spooler now returns an entry * 161 * length. * 162 * 2.3-2 8 Mar 84 (released as 2.4) * 163 * Fix to the spooler error printer, all spooler lines * 164 * need to end with a CR. * 165 * C8504 23 Apr 85 * 166 * Addition of the file log flag to the CATALOG, MODIFY, UNITS * 167 * STATUS, command. When this flag is set all accesses (opens, * 168 * closes, unsaves) get logged into the appropriate accounting * 169 * file. * 170 * C8505 10 May 85 * 171 * Addition of new system error message (0C8), VERBATIM illegal * 172 * on batch sessions. * 173 * C8506a 14 Jun 85 * 174 * Simplification of the error reporting code for logon, there * 175 * are basically two error messages returned. Added code to the * 176 * interrupt processor to handle virtual memory failures. A new * 177 * bit returned in initial entry code to indicate no swapping * 178 * pages available, if this bit is set we print a message and * 179 * vanish. Another bit in initial entry code that indicates * 180 * terminal is inhibited. * 181 * C8506b 18 Jun 85 * 182 * Reorganization of the underprocess scheme, CM was not initially * 183 * designed to deal with process trees or PSN. Most of the changes * 184 * went into keep track of the variable UPNUM (underprocess niumber). * 185 * Addition of additional parameter to the open command, NOWAIT. * 186 * This option prevents processes from getting shutdown into * 187 * filewait if a file is busy, actually only affects DO files. * 188 * C8506c 20 Jun 85 * 189 * Fix to the break processing routine to restore original echo * 190 * mode if someone hits break during password type in. * 191 * C8506d 21 Jun 85 * 192 * Fix to the catalog command so that if an extension is specified * 193 * in the NAME and EXT parameter, a duplicate parameter error is * 194 * displayed. Spelling corrections and updates to the help files. * 195 * C8507 13 Jul 85 (released as version 2.5) * 196 * Fix to DO file parameter processing so that if no parameters * 197 * appear on the invocation line, PARAMETERS! is set accordingly. * 198 * Change to the CATALOG command, in that entries are no longer sorted.* 199 * Entries are printed based on order given by the OS. Fix to the LOGOFF* 200 * command so that breaks are ignored between the logoff and vanish * 201 * requests. Fix to the status function, so that on certain record * 202 * types EOF, EOD, AEOD would not get set accidentally. * 203 * C8510 01 Oct 85 * 204 * Fix to catalog processing so that sort will execute if certain * 205 * parameters are selected. Specifically CREATE, LAST READ, LAST WRITE,* 206 * LAST BACKUP, FILE LENGTH, USER FIELD. * 207 * C8510a 14 Oct 85 * 1 Assembler C9208 Control Mode C9304 14-Jun-93 17:33 PAGE 8 (REVISIONS) F 3 Revision List 208 * Fix to the operator abort processing code so that aborts from * 209 * session 3 does not look like a warn request. Note that 3 is * 210 * the subcode for a warn. * 211 * C8510b 21 Oct 85 * 212 * CM now uses the new field in the static status of a unit that * 213 * determines the privilege. The OS no longer supports the old * 214 * privilege field and is always returned as zero. * 215 * C8511a 18 Nov 85 * 216 * Increased the catalog buffer to allow up to 2500 entries, * 217 * previously the buffer could hold around 1900. Fix to the * 218 * release swap page code in that ALL possible swapping pages * 219 * are release after a successful logon. This was done to * 220 * prevent a system halt and to ensure all new swapping pages * 221 * are to be charged to the new logon account. * 222 * C8511b 29 Nov 85 * 223 * The catalog name parameter accepts a range of filenames as * 224 * well as wildcard filenames. A range is specified as * 225 * :. The filename may not contain * 226 * wildcard character and the not equal separator (#) may * 227 * be used with this format. All filenames that do/do not * 228 * fall within the specified range are displayed. * 229 * C8512a 05 Dec 85 * 230 * Additon of error message for error code 028, unit received. * 231 * C8512b 05 Dec 85 * 232 * Reorganization of the CM interrupt processing scheme in order * 233 * to prevent multiple interrupts at one time. Initial coding * 234 * to allow CM to reconnect to another session. This entails * 235 * basically switching absolute I/O units and logging off the * 236 * requesting process. * 237 * C8512c 17 Dec 85 * 238 * Expanded the privilege code table to include BK (8) and * 239 * NA(F). This reflects the code that the system uses for * 240 * privileges to devices. * 241 * C8512d 27 Dec 85 * 242 * If an ATTACH is issued to a batch job, the batch job * 243 * is converted to an interactive job internally. * 244 * C8512e 17 Jan 86 * 245 * Addition of new expression symbol SESSION, which returns * 246 * the session number of the current session. Similar to * 247 * the HOUR and TIME symbols. * 248 * C8601a 27 Jan 86 * 249 * Addition of a new command, CYCLE. This comand simply * 250 * cycles cartridge tapes in an attempt to repair the * 251 * internal drive mechanism. * 252 * C8602 01 Feb 86 * 253 * Minor fixes to the help information. * 254 * C8602a 11 Feb 86 * 255 * Fixes to the disconnect code. First, if a disconnect occurs * 256 * while CM is running this is handled the same as when the * 257 * error occurs while another process is running. Second, the * 258 * disconnect routine was not swapping absolute IO units nor * 259 * was it disassociating the session with a port. This was * 260 * caused by not closing the originally associated terminal * 261 * units. * 262 * C8602b 24 Feb 86 * 263 * Change to the interrupt processing routine. Errors or interrupts * 1 Assembler C9208 Control Mode C9304 14-Jun-93 17:33 PAGE 9 (REVISIONS) F 3 Revision List 264 * from underprograms are not longer always returned as termination * 265 * code to CM. This is not the case if CM happens to be trapping that * 266 * type of interrupt. So if interrupt generated from under process, * 267 * basicly initialize register, enable interrupts and jump to code * 268 * to process program termination of control. * 269 * Fix to the catalog parameter processor so that you are allowed * 270 * to specify a null extension. It originally worked correctly, * 271 * but addition of the range function produced undesirable results. * 272 * C8602c 6 Mar 86 * 273 * Fix to the ZAP routine so that if GETRUNLUN requests returns * 274 * a local unit, CM will close these units as well. * 275 * C8602d 26 Mar 86 * 276 * Changed all the read request to use the sequential read requests. * 277 * C8604a 03 Apr 86 * 278 * Fix to the logoff and logon code so that one one single swapping * 279 * page remains prior to the actual xreq calls. This allows better * 280 * scratch block usage accounting, since the OS expects CM to have * 281 * one swapping block. The problem was that the swapping blocks * 282 * were being discarded long after the logoff, hence what account * 283 * gets the credit for these blocks? As it turns out the system * 284 * ULB was the most likely recipient. * 285 * C8604b 10 Apr 86 * 286 * If terminal is inhibited than CM will attempt to open a file * 287 * called .SYS:INHIBIT.LOGON and write its contents to the absolute * 288 * output unit (202). If no file exists then a standard message * 289 * will be displayed. * 290 * C8605a 22 May 86 * 291 * Updates to the list of system error messages, added the device * 292 * dependant errors. Fix to set the stack pointer before entry * 293 * code check for error conditions, prevents stack overflow trying * 294 * to write error message with OUTO routine. * 295 * C8605b 27 May 86 * 296 * Change to the logoff code: if a session has logged off then a * 297 * message is sent to the session so designated to receive one. * 298 * See the xreq URSETLGFSES for additional details. If no session * 299 * has been designated and the startup code indicates a concurrent * 300 * session, then a message is sent to the parent session. Note in * 301 * the case of concurrent sessions only one message gets sent. * 302 * C8606a 11 Jun 86 * 303 * Fix to the LOGON code so that error message other than password * 304 * wrong in a batch job gives descriptive message instead of always * 305 * giving password invalid response. * 306 * C8606b 23 Jun 86 * 307 * Fix to the READLINE routine to handle input errors from an * 308 * interactive session. Since the comm driver has been modified * 309 * to detect input buffer overflow, CM retries the read in the case * 310 * of errors. * 311 * C8608a 05 Aug 86 (Released as version 2.6) * 312 * Added two new error messages for the codes C9 and CA. Fix to * 313 * the catalog syntax 'name=a. long' works correctly. * 314 * C8609a 19 Sep 86 * 315 * Fix ATTACH command so an attach to a concurrent session * 316 * works correctly (added SKLNOV*SKIL to the CLRBATMSK). * 317 * [Note: This fixed ATTACH to CONC session, but made other * 318 * ATTACHes unconditionally set SKILL=NOVICE. Fixed in 2.7.] * 319 * C8701a 21 Jan 87 * 1 Assembler C9208 Control Mode C9304 14-Jun-93 17:33 PAGE 10 (REVISIONS) F 3 Revision List 320 * Fix to the disconnect code to turn on the internal break * 321 * disable bit, this allows a session to be attached to. * 322 * Changed the time to wait after a terminal disconnect from * 323 * 3 minutes to 5 minutes. * 324 * Changed the device relinquish message sent to the spooler * 325 * from "OPR RELINQUISH ALL" to "DUM". Yes, that is correct! * 326 * C8701b 23 Jan 87 * 327 * At CM initial entry point interrupt registers are set before * 328 * any processing is done. Specifically before looking to see * 329 * if the terminal is inhibited or insufficient disk space. * 330 * C8702a 18 Feb 87 * 331 * Traps and processes UINTVMFISR error (insufficient system * 332 * resources). Puts user in RESOURCELOW state until system * 333 * says it's OK again. More specific error messages when * 334 * file name spec is bad during expression evaluation. Moved * 335 * BREAK flag from BIT 7 to BIT 8 in the ST register and STATS. * 336 * C8702b 21 Feb 87 * 337 * Minor fixes to message handling for RESOURCESLOW. * 338 * C8702c 25 Feb 87 * 339 * Added new pseudo-ops in MCINIT to initialize R5, IAR, IMR * 340 * in our code file's CCB. Replaces setting these registers * 341 * via XREQ, and allows us to handle errors right off the bat. * 342 * Now enables interrupts before sending logon message to * 343 * interactive or non-spooled batch job. Allows us to be * 344 * aborted while hanging in TermOWait for the message. * 345 * C8703a 25 Mar 87 * 346 * Changed ERM355 from "TITLE illegal on batch" (which was * 347 * obsolete anyway), to "Unknown parameter". * 348 * 2.7 27 Mar 87 * 349 * Fixed ATTACH to preserve SKILL level, except to set * 350 * SKILL=NOVICE if it was APPLICATION (removed SKLNOV*SKIL * 351 * from CLRBATMASK, and put real smarts in INTRUNIT). * 352 * Reassembled for Beta 22 release. * 353 * B8706a xx Jun 87 * 354 * MCINIT flushes input buffer to dump possible errors from * 355 * absolute input (e.g. XREQERPFE -- port framing error). * 356 * (patched into 2.7-1). * 357 * B8708 25 Aug 87 * 358 * Changed ENTDISC (terminal disconnect) to use FRSTATUS FREQ * 359 * to decide whether terminal was absolute I/O unit. Was * 360 * funny flag in subcode (patched into 2.7-2). * 361 * B8709 01 Sep 87 * 362 * Rewrote help for UNSAVE command. * 363 * Changed BIGZAP to use URPDSTRYA UREQ instead of repeated ZAP. * 364 * Changed STATPRNT subroutine to handle null account name/project. * 365 * B8709a 02 Sep 87 * 366 * Changed the DISPLAY command to accept wildcarded names. * 367 * B8709b 29 Sep 87 * 368 * Minor cleanup to interrupt processor (INTERRUPT gets OURPSN * 369 * w/o reading into a buffer, PROCUSRINT uses URINTRTN to get * 370 * to URPGO analyzer). * 371 * B8712 10 Dec 87 * 372 * Fixed some HELP info typos. * 373 * Changed ENTATCHx to combine the URSSINTARM of INTENABLE * 374 * and 1*BIT INTUNIT, to save space. * 375 * Removed CAT96 spur ("Unexpected parameter"), ERM429 * 1 Assembler C9208 Control Mode C9304 14-Jun-93 17:33 PAGE 11 (REVISIONS) F 3 Revision List 376 * ("Unexpected parameter name") and ERM408 ("Position not * 377 * specified"), and CATFMESB (" ") because they * 378 * were unused. Misc other unrefs, too. * 379 * Merged INTRUNIT into ENTATCH/ENTATCHU, using a URDELAY for * 380 * giftunits so as to simplify things and avoid interrupt * 381 * processing. Also, makes it work right with DO files. * 382 * B8712a 11 Dec 87 * 383 * Fixed MC06 section (batch job logon) to calculate * 384 * correct length of message (was temporarily wrong). * 385 * B8801 13 Jan 88 * 386 * Changed ENTDISC (terminal disconnect interrupt) to set * 387 * skill to SKLNOV if it was SKLAPP. This allows session * 388 * to be interrupted while on TIMEWAIT (ints not just for * 389 * ATTACH, but also evict, terminate, etc). Shouldn't * 390 * pose security prob since only way out of that state is * 391 * ATTACH or logoff. * 392 * B8803 09 Mar 88 * 393 * Tidied definitions in VARPROTO (session variables). * 394 * Changed NCPW to CPW. * 395 * Changed ATTACH to propagate SKIL level of originating * 396 * session. Added GO parameter to ATTACH to cause resulting * 397 * session to resume the interrupted underprocess. * 398 * B8803a 10 Mar 88 * 399 * Removed definitions of STANDIN and STANDOUT, replaced usages * 400 * with LUNAIN and LUNAOUT, respectively. * 401 * Added entry for UINTATTACH in INTERRUPT's table. Changed * 402 * INTERRUPT to allow UINTATTACH and UINTOPRQ when ST/SKIL=SKLAPP. * 403 * This means a) Applications mode program may now ATTACH to * 404 * another such session, and b) INTDISC no longer changes SKIL * 405 * to SKLNOV from SKLAPP. * 406 * B8805a 5 May 88 * 407 * Chain request to a DO file now equivalences the original * 408 * chain unit to a Control Mode unit. This prevents the user * 409 * from fiddling with the DO unit we are about to take input * 410 * from. Removed the modify Access Lock attribute from Control * 411 * Mode sinve VRM not longer supported FRMODACSLK. * 412 * B8810 3 Oct 88 * 413 * Added optional session variable to specify timeout period * 414 * following disconnect. * 415 * B8901 14 Jan 89 * 416 * Added hardware device type VT. * 417 * Added our process serial number to the SRVCOMP message. * 418 * Fixed bug in program cleanup to close run unit (BIGZAP). * 419 * Removed wildcarding from display command. * 420 * B8907 25 Jul 89 * 421 * Changes to use ONLY page zero after logoff and before vanish. * 422 * B8908 21 Aug 89 * 423 * Fix server complete message to not store into pure page. Now * 424 * creates message in impure buffer area. * 425 * B8908a 31 Aug 89 * 426 * Fix to ensure a zero character exists after each help line, * 427 * was causing lines to run together. * 428 * B8911 02 Nov 89 * 429 * Changed UNSHARE command so that it no longer requires accounts * 430 * to be specified after the filename, and to use the UNSHAREALL * 431 * form of FRUNSHARE in such a case. CG * 1 Assembler C9208 Control Mode C9304 14-Jun-93 17:33 PAGE 12 (REVISIONS) F 3 Revision List 432 * B8911a 27 Nov 89 * 433 * Change to the GETOURPSN subroutine to fetch the process serial * 434 * number iff the current process serial number is less than or * 435 * equal to zero. Does not allow -1 to slip through, was causing * 436 * SPOOLER to fall over dead. * 437 * B9001 03 Jan 90 * 438 * Addition to STATPRNT to include currently selected track for * 439 * CT devices. CG * 440 * B9001a 19 Jan 90 * 441 * Changed size of CATBUF to allow 2600 entries. Output warning * 442 * message if the number of entries read is more than the maximum * 443 * minus 10. Removed old attempt at this (was checking R1 < 0 * 444 * after the dir read, this can't happen). Noted above features, * 445 * and corrected some spelling, in the Help texts. CG * 446 * B9001b 24 Jan 90 * 447 * Changed error handling for implicit run command to print * 448 * 'File is busy' if it was, rather than 'Unknown command'. * 449 * Allowed PORT command while not logged on. Changed DO * 450 * command processor to keep track of where the value of * 451 * PARAMETERS! should start. CG * 452 * B9004 09 Apr 90 (customer release 12c) * 453 * Fixed to give terminal disconnect message if unit was NOT an * 454 * absolute IO unit. Was giving unknown error code. * 455 * B9005 04 May 90 * 456 * Added LOGONACCT and ALIASACCT to predefined operands for * 457 * expressions. CG * 458 * B9005a 29 May 90 * 459 * Added Unix-like PATH variable for file searches. Changed * 460 * implicit run command to look for a do file if it doesn't * 461 * find a code. CG * 462 * B9005b 31 May 90 * 463 * Allowed INPUT command to take an optional unit number, like * 464 * OUTPUT. Made INPUT available outside of do files. This * 465 * required clearing the terminal input flag ST/TIN during the * 466 * call to READER. It also required removing an instruction * 467 * which set the in-do-file flag (STZ ST/NDO). Since the * 468 * command was only valid from do files, this didn't hurt * 469 * anything but now it would. I cannot see why it was done * 470 * because READER does not modify the flag. Hopefully there * 471 * will be no adverse effect. Changed the DISPLAY command to * 472 * display expressions instead of just variables. It works * 473 * as before if no expression is supplied. * 474 * Change to keep session variables sorted by name. CG * 475 * C9006 07 Jun 90 * 476 * Removed catalog processor, changed catalog command to a library * 477 * call. Restructured impure data declarations. Changed the * 478 * special data page involved in logon/logoff from page zero to * 479 * the last data page. Hopefully, didn't screw anything up. CG * 480 * C9006a 12 Jun 90 * 481 * Added ability to put multiple commands on a line, separated by * 482 * semicolons. Allowed NORMAL and EXIT outside of do files, with * 483 * EXIT meaning to discard the rest of the command input buffer. CG * 484 * C9006b 18 Jun 90 * 485 * Changed commands to continue to process following arguments on the * 486 * line after one gets an error (e.g., ">unsave 10 308 20"), and to * 487 * identify in an error message what the error pertains to. CG * 1 Assembler C9208 Control Mode C9304 14-Jun-93 17:33 PAGE 13 (REVISIONS) F 3 Revision List 488 * C9007 18 Jul 90 * 489 * Added 'more' processing support for underprocess, requested via * 490 * a bit in the termination code. CG * 491 * C9009 18 Sep 90 * 492 * Fixed a problem in UNSAVE where if it received an error condition * 493 * unsaving multiple files, potentially a file could be left open * 494 * with no means of closing it other than logging off. * 495 * C9101 24 Jan 91 * 496 * In FETCHITM, when the carriage return terminating the line is * 497 * encountered (at FICR), jump to FIEXIT instead of FIEX, which * 498 * backs up the BUFPT by one character. Probably required by a * 499 * change to GETCHAR, which now remembers hitting end of line. * 500 * Also changed PARMAKE to skip leading spaces in the input line * 501 * before setting PARAMETERS! (patch ) CG * 502 * C9102 01 Feb 91 * 503 * Changed the DEBLOCK procedure so that it does not consider a * 504 * carriage return to be the end of line. Instead it uses the * 505 * IBENDPTR in the input buffer control block. It still appends * 506 * a carriage return to the string it stores in BUFFER. CG * 507 * C9103 04 Mar 91 * 508 * Fix to the PARMAKE routine to correctly calculate the * 509 * length of a string assigned to a variable. Was causing * 510 * problems setting PARAMETERS! invoking DO files. * 511 * C9206 01 Jun 92 * 512 * Fix to NOT free page zero prior to a LOGON and after a LOGOFF. * 513 * Was causing session to remain if cross logon attempted with * 514 * incorrect password. * 515 * C9206a 02 Jun 92 * 516 * Reorganized the impure data area so the variables that need to * 517 * remain during the existence of the Control Mode session are ALL * 518 * on page zero. * 519 * C9209 28 Sep 92 * 520 * Completly new algorithm for allocating free space to hold * 521 * session variables. Routines GETMEM and FREEMEM added. * 522 * Added two variables list: one for temporary variables and * 523 * the other for regular variables. * 524 * C9210 01 Oct 92 * 525 * Bug fixes to GET/SET session variable introduced by changes * 526 * to the session variable algorithms. * 527 * C9210a 02 Oct 92 * 528 * Bug fix to the code that returns returns system error message * 529 * strings (UREQ URERRORGET). * 530 * C9210b 05 Oct 92 * 531 * Bug fix to the INPUT command. After call to VARMAKECHK, R0 * 532 * conatins and error code or 0. Following instruction changed * 533 * from JEQZ R0 COMERR -> JNEZ R0 COMERR. Fixed bug of the * 534 * FREEHEAD butting against the free memory FREESTART. Causes * 535 * list screwups during FREEMEM. * 536 * C9210c 06 Oct 92 * 537 * Some minor code cleanups in VARCLRTMP. Added size check to * 538 * VARCHECK routine. * 539 * C9210d 07 Oct 92 * 540 * Added RECVRS function to IF statement to return the current * 541 * transmitters for a given unit. * 542 * C9303 17 Mar 93 * 543 * Bug fixes to the get session variable ! CM function variable * 1 Assembler C9208 Control Mode C9304 14-Jun-93 17:33 PAGE 14 (REVISIONS) F 3 Revision List 544 * get. * 545 * C9304 07 Apr 93 * 546 * Fix to flush auxiliary buffer after more processing, cause * 547 * leftover shit for the input command. * 548 * * 549 ********************************************************************************** 106 INPUT $$$VIRTDEFS 107 INPUT $$$XREQINFOMACS 108 INPUT CM.UTL:CMDEFS 1 Assembler C9208 Control Mode C9304 14-Jun-93 17:33 PAGE 15 (CMDEFS) F 6 Variable definitions, storage allocation 3 4 ********************************************************************************** 5 * * 6 * The following macro will define the beginning of a * 7 * stack frame. It is intended to be used with the ENDFRMAE * 8 * macro. We will automatically generate a BSS 1 for the * 9 * return link word. * 10 * * 11 ********************************************************************************** 12 13 BEGFRAME MACRO 14 NOLIST 15 NOLIST CREF 16 NOSYMS 17 ZZ!FRAME BASE SP 18 SYMS 19 BSS 1 20 LIST CREF 21 LIST 22 EMAC 23 24 ********************************************************************************** 25 * * 26 * The following macro is just like the BEGFRAME except * 27 * that it does NOT generate a BSS 1 for the return link word. * 28 * * 29 ********************************************************************************** 30 31 BEGFRAME2 MACRO 32 NOLIST 33 NOLIST CREF 34 NOSYMS 35 ZZ!FRAME BASE SP 36 SYMS 37 LIST CREF 38 LIST 39 EMAC 40 41 ********************************************************************************** 42 * * 43 * The following macro will define the end of a stack * 44 * frame. It is intended for use with the BEGFRAME. We will * 45 * define labels called PUSH and POP for use as operands of * 46 * ENTR and LEAVE instructions. This pair of macros can only * 47 * be used once per block. Note that this precludes their use * 48 * in an inner block. * 49 * * 50 ********************************************************************************** 51 52 ENDFRAME MACRO 53 NOLIST 54 NOLIST CREF 55 DRCT 56 ZZ!LEN EQU DISPW ZZ!FRAME 57 PUSH EQU STAK SP,ZZ!LEN 58 POP EQU PUSH 1 Assembler C9208 Control Mode C9304 14-Jun-93 17:33 PAGE 16 (CMDEFS) F 6 Variable definitions, storage allocation 59 ORG ZZ!FRAME 60 LIST CREF 61 LIST 62 EMAC 63 64 ********************************************************************************** 65 * * 66 * Symbol definition, page size, various pages. * 67 * * 68 ********************************************************************************** 69 00000000 ABS 70 XREQ EQU 0 flag for executive requests 00000010 ABS 71 MODIFBIT EQU 1*BIT 27 modify arithmetic bit 00000008 ABS 72 OFLOWBIT EQU 1*BIT 28 overflow bit 00000004 ABS 73 CARRYBIT EQU 1*BIT 29 carry bit FFFFFFFF ABS 74 ONEBITS EQU -1 bits used for masks 75 00000004 ABS 76 CPW EQU 4 number of bytes per word 00000400 ABS 77 WPP EQU 0400 number of words per page 00000000 ABS 78 IMPAGE EQU 0 impure page 00010000 ABS 79 PUREPAGE EQU 010000 first CM page 00000004 ABS 80 NCPW EQU 4 number of characters per word 00000004 ABS 81 OPXREQ EQU 08/2 op-code for xreq family 82 83 ********************************************************************************** 84 * * 85 * Register definitions. * 86 * * 87 ********************************************************************************** 88 00130000 4 REG 89 DO EQU R4 DO-file control register 00138000 6 REG 90 ST EQU R6 status register 00134000 5 REG 91 SP EQU R5 stack pointer 0012C000 3 REG 92 COM EQU R3 command table pointer 0012C000 3 REG 93 VAR EQU R3 variable pointer register 94 95 ********************************************************************************** 96 * * 97 * Status bits for the CM status register (ST). * 98 * * 99 ********************************************************************************** 100 00000010 BYTE 101 NLOG EQU BIT 0 NOT Logged in 00000210 BYTE 102 TRM EQU BIT 1 On-line Terminal user 00000410 BYTE 103 TIN EQU BIT 2 Terminal input 00000610 BYTE 104 NDO EQU BIT 3 NOT DO unit input 00000810 BYTE 105 ABRT EQU BIT 4 Aborted 00000A10 BYTE 106 FOUL EQU BIT 5 Always on. To catch bad words 00000C10 BYTE 107 BAT EQU BIT 6 Batch job 00000E10 BYTE 108 VMFISR EQU BIT 7 1 sez system resources are scarce 00001010 BYTE 109 BREAK EQU BIT 8 no breaks during DO/BATCH jobs 00001210 BYTE 110 SKLX EQU BIT 9 1 sez expert or wizard 00001410 BYTE 111 SKLF EQU BIT 10 fine skill factor (1 sez better) 00001220 BYTE 112 SKIL EQU BITS 9:10 Skill factor 00000002 ABS 113 SKILB EQU 2 size of SKIL field 00001610 BYTE 114 INTM EQU BIT 11 LOGON time out interrupt occurred 1 Assembler C9208 Control Mode C9304 14-Jun-93 17:33 PAGE 17 (CMDEFS) F 6 Variable definitions, storage allocation 00001810 BYTE 115 OFFON EQU BIT 12 Log off and back on again 00001A80 BYTE 116 DYNAM EQU BITS 13:20 dynamic status bits 00001A10 BYTE 117 LBC EQU BIT 13 Library Call flag 00001C10 BYTE 118 SKPR EQU BIT 14 SKIP in progress 00001E10 BYTE 119 IFP EQU BIT 15 IF in progress 00002010 BYTE 120 UCOM EQU BIT 16 User Command attempt 00002210 BYTE 121 INOK EQU BIT 17 interrupts ok 00002410 BYTE 122 INRQ EQU BIT 18 interrupt requested 00002610 BYTE 123 PREP EQU BIT 19 input Preprocessor flag 00002810 BYTE 124 MEMPROT EQU BIT 20 memory protect violation 00002A10 BYTE 125 LGN1 EQU BIT 21 Logon program 1 executed 00002C10 BYTE 126 LGN2 EQU BIT 22 Logon program 2 executed 00002E10 BYTE 127 LGN3 EQU BIT 23 Logon program 3 executed 00002A30 BYTE 128 LOGN EQU BITS 21:23 Logon program control bits 00003040 BYTE 129 CMSTATE EQU BITS 24:27 error/help state 00003840 BYTE 130 ECHOMODE EQU BITS 28:31 actual echo mode 00000080 BYTE 131 STATBITS EQU BITS 0:7 Status info for command restrict 00003000 BYTE 132 STATFIX EQU BITS 24:23 status fixer-upper 133 134 ********************************************************************************** 135 * * 136 * Miscellaneous equivalences. * 137 * * 138 ********************************************************************************** 139 00000006 ABS 140 NUMDO EQU 6 allow maximum of 6 DO units at once 00000003 ABS 141 LSBIAS EQU 3 Lineset bias for screen length 00000000 ABS 142 SPLMSGID EQU 0 message ID for spooler - no reply wanted 143 * note a message ID of 0 will not be used when a reply is needed 00000004 ABS 144 MAXLOGONT EQU 4 maximum number of logon attempts allowed 145 REPMASK EQU 1*MSGRESPONS response class mask 146 OPRMASK EQU 1*MSGOPR operator class mask 000000C8 ABS 147 PPMAX EQU 200 allow enough cycles of preprocessor 00000E10 ABS 148 MAXDELAY EQU 3600 maximum period for URDELAY UREQ 0000003C ABS 149 WAITTIME EQU 60 1 minute wait before logon must be done 00000005 ABS 150 OPERDELAY EQU 5 5 seconds delay between checking 151 * if operator message has been cleared 0000001E ABS 152 MSGWAIT EQU 30 time waiting for a spooler reply 00000046 ABS 153 MAXOPRMSG EQU 70 maximum length of operator message 0000012C ABS 154 REDIALWAIT EQU 5*60 time to wait for ATTACH after disconnect 0000000A ABS 155 UNITDELAY EQU 10 time to wait for units after ATTACH 156 00000010 BYTE 157 INTARM EQU BIT 0 arms all other interrupts 00000A10 BYTE 158 INTMEM EQU BIT 5 memory protect interrupt 00000C10 BYTE 159 INTBRK EQU BIT 6 sez interrupt on break 00001010 BYTE 160 INTTIN EQU BIT 8 terminal input present 00001410 BYTE 161 INTTIM EQU BIT 10 timer interrupt 00001610 BYTE 162 INTMSG EQU BIT 11 message mask bit 00001810 BYTE 163 INTVMF EQU BIT 12 virtual memory failure 00001A10 BYTE 164 INTABRT EQU BIT 13 soft abort bit 00001C10 BYTE 165 INTUNIT EQU BIT 14 receive unit 020C0000 ABS 166 INTARMBITS EQU 1*INTBRK+1*INTABRT+1*INTVMF interrupt arming bits 80000000 ABS 167 INTENABLE EQU 1*INTARM interrupt enable bit 04000000 ABS 168 MEMPROTMSK EQU 1*INTMEM bit to set memory protect interrupt 169 00000100 BYTE 170 ATCHFLAGS EQU BITS 0:15 field in UINTATTACH subcode 1 Assembler C9208 Control Mode C9304 14-Jun-93 17:33 PAGE 18 (CMDEFS) F 6 Variable definitions, storage allocation 00002100 BYTE 171 ATCHSESS EQU BITS 16:31 field in UINTATTACH subcode 00003A10 BYTE 172 ATCHGO EQU BIT 29 bit in ATCHFLAGS to say resume UP 00003C20 BYTE 173 ATCHSKIL EQU BITS 30:(29+SKILB) bits in ATCHFLAGS passing skill 174 00004341 ABS 175 SPLOK EQU "CA" spooler OK reply 00004343 ABS 176 SPLERRCODE EQU "CC" spooler reply with error code 00004342 ABS 177 SPLERRSTR EQU "CB" spooler reply with error string 00005A42 ABS 178 SPLERRMSG EQU "ZB" bad message to spooler 179 00003E10 BYTE 180 ZCBIT EQU BIT 31 zero core request bit 00003C10 BYTE 181 MOBIT EQU BIT 30 'more' processing request bit 00003A10 BYTE 182 PCBIT EQU BIT 29 increment pc bit 00003810 BYTE 183 ABBIT EQU BIT 28 abort request bit 184 00001F30 BYTE 185 FLDCHARS EQU BITS 15:1 character address in memory 186 000016C0 BYTE 187 YRBITS EQU BITS 11:22 year (yyyy) 00002E40 BYTE 188 MOBITS EQU BITS 23:26 month (mm) 00003650 BYTE 189 DABITS EQU BITS 27:31 day (dd) 190 191 ********************************************************************************** 192 * * 193 * Logical unit dynamic status returned from Xreq's. * 194 * * 195 ********************************************************************************** 196 00000010 BYTE 197 ERROR EQU BIT 0 sez error on XREQ 00000880 BYTE 198 LUNFIELD EQU BITS 4:11 unit number field 00002040 BYTE 199 RECTYPE EQU BITS 16:19 record type field 00000000 ABS 200 RTTEXT EQU 0 text record 00000001 ABS 201 RTTEXTF EQU 1 text with forms control 00000002 ABS 202 RTBIN EQU 2 binary record 00000003 ABS 203 RTCOM EQU 3 comment record 00000008 ABS 204 RTEOF EQU 8 end-of-file (file mark) 00000009 ABS 205 RTEOD EQU 9 end-of-data 0000000B ABS 206 RTAEOD EQU 11 abnormal end-of-data 00002410 BYTE 207 AEOD EQU BIT 18 abnormal end-of-data 00002610 BYTE 208 EOD EQU BIT 19 end-of-data 00002210 BYTE 209 EOF EQU BIT 17 end-of-file 210 * (note that EOF is artificial bit only in CM) 00002010 BYTE 211 RTSP EQU BIT 16 'special' record 00002810 BYTE 212 LDPT EQU BIT 20 load point bit 00002AB0 BYTE 213 ECFIELD EQU BITS 21:31 error code field 214 215 ********************************************************************************** 216 * * 217 * Logical unit static status returned from Xreq's. * 218 * * 219 ********************************************************************************** 220 00001C40 BYTE 221 PVFIELD EQU BITS 14:17 privilege field 00002410 BYTE 222 OPNCBIT EQU BIT 18 file was created by this OPEN 00002630 BYTE 223 ACFIELD EQU BITS 19:21 access field 00002E10 BYTE 224 ABSIOBIT EQU BIT 23 unit is absolute I/O 00003010 BYTE 225 CRASHBIT EQU BIT 24 writing when crashed 00003210 BYTE 226 SAVEBIT EQU BIT 25 file saved 1 Assembler C9208 Control Mode C9304 14-Jun-93 17:33 PAGE 19 (CMDEFS) F 6 Variable definitions, storage allocation 00003460 BYTE 227 HWFIELD EQU BITS 26:31 hardware type field 228 000000C0 ABS 229 WWCSVMASK EQU 1*CRASHBIT+1*SAVEBIT mask for EE 00007800 ABS 230 STATMASK EQU 1*AEOD+1*EOD+1*EOF+1*LDPT mask for EE 231 232 ********************************************************************************** 233 * * 234 * Entry sub-type codes. * 235 * * 236 ********************************************************************************** 237 00000000 ABS 238 TRMJOB EQU 0 On-line session 00000001 ABS 239 SYSJOB EQU 1 System or non-spooler batch session 00000002 ABS 240 RPRJOB EQU 2 Remote port session 00000003 ABS 241 BCHJOB EQU 3 Spooler batch session 00000004 ABS 242 CONJOB EQU 4 Concurrent process 243 244 ********************************************************************************** 245 * * 246 * Access and Privilege definitions. * 247 * * 248 ********************************************************************************** 249 00000000 ABS 250 ACRW EQU 0 read/write access 00000001 ABS 251 ACRO EQU 1 read-only access 00000002 ABS 252 ACAO EQU 2 append-only 00000003 ABS 253 ACXO EQU 3 execute-only 00000004 ABS 254 ACMW EQU 4 multiple-write 00000005 ABS 255 ACDR EQU 5 destructive read 00000007 ABS 256 ACNA EQU 7 no-access 257 00000000 ABS 258 PVRW EQU ACRW read/write privilege 00000001 ABS 259 PVRO EQU ACRO read-only privilege 00000002 ABS 260 PVMO EQU 2 modify privilege 261 262 ********************************************************************************** 263 * * 264 * Hardware type definitions. * 265 * * 266 ********************************************************************************** 267 00000000 ABS 268 HTUNDEF EQU 0 undefined 00000001 ABS 269 HTSAF EQU 1 sequential file 00000002 ABS 270 HTRAF EQU 2 random access file 00000003 ABS 271 HTCODE EQU 3 executable file 00000004 ABS 272 HTPATH EQU 4 IPC link 00000005 ABS 273 HTDIR EQU 5 file directory 00000006 ABS 274 HTNULL EQU 6 data sink 00000007 ABS 275 HTTERM EQU 7 terminal 276 * EQU 8 unused (was .LOCK) 00000009 ABS 277 HTBATCH EQU 9 batch job source 0000000A ABS 278 HTCDR EQU 10 card reader 0000000B ABS 279 HTLP EQU 11 line printer 0000000C ABS 280 HTMT EQU 12 9-track tape 0000000D ABS 281 HTCT EQU 13 cartridge tape 0000000E ABS 282 HTVOL EQU 14 disk drive 1 Assembler C9208 Control Mode C9304 14-Jun-93 17:33 PAGE 20 (CMDEFS) F 6 Variable definitions, storage allocation 0000000F ABS 283 HTVT EQU 15 video tape 284 285 ********************************************************************************** 286 * * 287 * Under-process register definitions. These are used as * 288 * indices for a) URPSETREG/URPGETREG XREQ request codes, and * 289 * b) the interrupt register buffer (REGBLOCK). * 290 * * 291 ********************************************************************************** 292 00000000 ABS 293 UPR0 EQU 00 under-process R0 00000001 ABS 294 UPR1 EQU 01 under-process R1 00000002 ABS 295 UPR2 EQU 02 under-process R2 00000003 ABS 296 UPR3 EQU 03 under-process R3 00000004 ABS 297 UPR4 EQU 04 under-process R4 00000005 ABS 298 UPR5 EQU 05 under-process R5 00000006 ABS 299 UPR6 EQU 06 under-process R6 00000007 ABS 300 UPR7 EQU 07 under-process R7 00000008 ABS 301 UPPC EQU 08 under-process PC 00000009 ABS 302 UPPSR EQU 09 under-process PSR 0000000A ABS 303 UPIMR EQU 0A under-procees IMR 0000000B ABS 304 UPIAD EQU 0B under-process IAD 0000000C ABS 305 NUREG EQU 12 number of user registers 306 307 ********************************************************************************** 308 * * 309 * Character type definitions for FETCHITM. Please note * 310 * that some of the code in FETCHITM assumes the following the * 311 * be in a specific order. Do not rearrange, adding to the end * 312 * is acceptable. * 313 * * 314 ********************************************************************************** 315 00000000 ABS 316 CNM EQU 0 digits 00000001 ABS 317 CLA EQU 1 alphas (only legal hex chars (A-F)) 00000002 ABS 318 CHA EQU 2 alphas (all lowercase and G-Z) 00000003 ABS 319 CFC EQU 3 file chars (+ $) 00000004 ABS 320 CCM EQU 4 control mode special (* ?) 00000005 ABS 321 CDL EQU 5 delimiters 00000006 ABS 322 CEL EQU 6 end-of-line (CR) 00000007 ABS 323 CBL EQU 7 blank 00000008 ABS 324 CCC EQU 8 control character 00000009 ABS 325 COP EQU 9 operator 0000000A ABS 326 CQT EQU 10 double-quote (string) 0000000B ABS 327 CDT EQU 11 dot (.) 0000000C ABS 328 CLB EQU 12 pound sign (#) 0000000D ABS 329 CNG EQU 13 minus sign (-) 0000000E ABS 330 CCL EQU 14 internal filename delimiters ( ( ) : ) 0000000F ABS 331 NFITYPES EQU 15 number of classes 332 00003E10 BYTE 333 TNUM EQU BIT 31 number 00003C10 BYTE 334 TALPH EQU BIT 30 alpha (also files, commands, etc) 00003A10 BYTE 335 TDELM EQU BIT 29 delimiters (CR in I mode) 00003810 BYTE 336 TEOL EQU BIT 28 end-of-line 00003610 BYTE 337 TCNTL EQU BIT 27 control character 00003410 BYTE 338 TOPR EQU BIT 26 operator 1 Assembler C9208 Control Mode C9304 14-Jun-93 17:33 PAGE 21 (CMDEFS) F 6 Variable definitions, storage allocation 00003210 BYTE 339 TSTR EQU BIT 25 string 00003010 BYTE 340 TFILC EQU BIT 24 dot (in E mode) 00002210 BYTE 341 TBLANK EQU BIT 17 blanks were skipped at end of field 00002010 BYTE 342 THEX EQU BIT 16 value was in hex (used with TNUM only) 00001E10 BYTE 343 TFCS EQU BIT 15 file characters exists after the dot 00000000 ABS 344 TERR EQU 0 error 345 346 ********************************************************************************** 347 * * 348 * CM state definitions for error/help info. * 349 * * 350 ********************************************************************************** 351 00000000 ABS 352 CMSNORM EQU 0 error/help state - normal 00000001 ABS 353 CMSUC EQU 1 unknown command 00000002 ABS 354 CMSUC2 EQU 2 unknown command second try 00000003 ABS 355 CMSPARE EQU 3 parameter error 00000004 ABS 356 CMSCOME EQU 4 command error 00000005 ABS 357 CMSFRUS EQU 5 frustration mode 00000006 ABS 358 CMSPTOK EQU 6 normal program termination 00000007 ABS 359 CMSPSE EQU 7 program stop with error 00000008 ABS 360 CMSIDU EQU 8 DO interrupted in user program 00000009 ABS 361 CMSIDC EQU 9 DO interrupted in control mode 362 363 ********************************************************************************** 364 * * 365 * Skill levels for help/error information. * 366 * * 367 ********************************************************************************** 368 00000000 ABS 369 SKLNOV EQU 0 Novice 00000001 ABS 370 SKLAVG EQU 1 Average 00000002 ABS 371 SKLEXP EQU 2 Expert 00000003 ABS 372 SKLAPP EQU 3 Application 373 374 ********************************************************************************** 375 * * 376 * Various useful LUN definitions. * 377 * * 378 ********************************************************************************** 379 000000D3 ABS 380 CMLOWLUN EQU 211 lowest CM unit to use 000000FF ABS 381 CMMAXLUN EQU 255 highest CM unit to use 000000C8 ABS 382 PROGLUN EQU 200 unit to run for parallel process 00000001 ABS 383 UINLUN EQU 1 user normal input unit 00000002 ABS 384 UOUTLUN EQU 2 user normal output unit 00000003 ABS 385 UERRLUN EQU 3 user normal error unit 00000001 ABS 386 LOWULUN EQU 1 lowest possible user unit 000000C8 ABS 387 HIGHULUN EQU 200 highest user unit 000000CA ABS 388 GOODLUN EQU 202 highest unit user may reference 389 00002710 ABS 390 TIMLIM EQU 10000 default - 10000 sec CPU time limit 000001F4 ABS 391 SCRLIM EQU 500 default - 500 blks scratch space 392 393 394 ********************************************************************************** 1 Assembler C9208 Control Mode C9304 14-Jun-93 17:33 PAGE 22 (CMDEFS) F 6 Variable definitions, storage allocation 395 * * 396 * Various important characters named with symbols. * 397 * * 398 ********************************************************************************** 399 0000003E ABS 400 CMCHAR EQU ">" Control Mode identifier 00000028 ABS 401 LPAREN EQU "(" left paren 00000029 ABS 402 RPAREN EQU ")" right paren 0000003A ABS 403 COLON EQU ":" large intestine 0000003B ABS 404 SEMICOLON EQU 03B small intestine 0000002E ABS 405 DOT EQU "." period. finis. that's all. 00000020 ABS 406 BLANK EQU " " a blank 0000002C ABS 407 COMMA EQU "," commakazie?? 0000003D ABS 408 EQUAL EQU "=" double-bar 0000003C ABS 409 LESS EQU "<" less than 0000003E ABS 410 GREATER EQU ">" greater than 0000000D ABS 411 CR EQU 00D carriage return 0000000A ABS 412 LF EQU 00A line feed 0000002B ABS 413 PLUS EQU "+" positive 0000002D ABS 414 MINUS EQU "-" negative 0000002A ABS 415 STAR EQU "*" ass to risk 0000002F ABS 416 SLASH EQU "/" over my dead body! 00000024 ABS 417 DOLLAR EQU "$" money! 00000025 ABS 418 PERCENT EQU "%" teeter-totter 00000027 ABS 419 QUOTE EQU "'" don't quote me on it 00000022 ABS 420 QUOTES EQU 022 double quote me! 0000003F ABS 421 QM EQU "?" what did you say? 00000021 ABS 422 BANG EQU "!" exclamation 00000023 ABS 423 POUND EQU "#" pound sign 00000020 ABS 424 SPACE EQU " " space 00000020 ABS 425 EOW EQU " " end of wildcard 00000026 ABS 426 AMPER EQU "&" ampersand 0000005F ABS 427 UNDRSCORE EQU "_" underscore 00000000 ABS 428 NUL EQU 000 the big nothing!! 0000007F ABS 429 GASMASK EQU 07F ASCII parity mask 00000025 ABS 430 CSUB EQU PERCENT substitution character 00000027 ABS 431 CCONCAT EQU QUOTE concatenation character 00000023 ABS 432 HEXCHAR EQU POUND prefix to indicate hex 433 434 435 436 ********************************************************************************** 437 * * 438 * Share list info block prototype * 439 * * 440 ********************************************************************************** 441 00000000 442 SHRPROTO BASE R0 00160000 0 CACH 443 SHRACS BSSB 8 access privilege 00081010 0 ZBM 444 SHRPWFLG BSSB 1 password required flag 445 BSSB 6 filler 00081F10 0 ZBM 446 SHRENLEN BSSB 17 length of each entry 00160801 0 BASE 447 SHRSYS BSS 1 system (or -1) 00160802 0 BASE 448 SHRACCT BSS 2 account 00160804 0 BASE 449 SHRPRJ BSS 1 project 450 DRCT 1 Assembler C9208 Control Mode C9304 14-Jun-93 17:33 PAGE 23 (CMDEFS) F 6 Variable definitions, storage allocation 00000005 ABS 451 SHRBLEN EQU DISPW SHRPROTO 452 ORG SHRPROTO 453 454 455 456 ********************************************************************************** 457 * * 458 * System serial number definitions from URGETSSN request. * 459 * * 460 ********************************************************************************** 461 00000100 BYTE 462 CUSTOMER EQU BITS 0:15 customer portion of serial number 00002100 BYTE 463 SYSTEM EQU BITS 16:31 system number portion of serial number 464 465 466 ********************************************************************************** 467 * * 468 * Template for message to parent process * 469 * * 470 ********************************************************************************** 471 00000000 472 LFSTAK BASE SP stack area 00174800 5 BASE 473 LFTRMCODE BSS 1 program termination code 00174801 5 BASE 474 LFSUBCODE BSS 1 program termination sub-code 475 DRCT 00000002 ABS 476 LFSS EQU DISPW LFSTAK 00000008 ABS 477 LFSSC EQU DISPC LFSTAK 478 ORG LFSTAK 479 480 ********************************************************************************** 481 * * 482 * Process Information request data block prototype. From XREQINFOMACS * 483 * * 484 ********************************************************************************** 485 486 PROCINFORD 487 488 DIRINFORD LIST 488 ********************************************************************************** 488 * * 488 * This is the format of information that is returned to * 488 * the user when he requests directory information. The * 488 * header is returned only when the .DIR is at load point. * 488 * After that the buffer is filled with an integral number of * 488 * entries, one for each file. * 488 * When the directory is exhausted, an end-of-data status * 488 * is returned. * 488 * * 488 ********************************************************************************** 488 00000000 488 DIRHINFO BASE R0 Header giving account information 00160800 0 BASE 488 DIRHLNTH BSS 1 Length of entry in words (now 8) 00160801 0 BASE 488 DIRFLAGS BSS 1 Flags 00080011 0 ZBM 488 DIRSHADOW EQU DIRFLAGS/BIT 0 On if a shadow account 00080211 0 ZBM 488 DIRFOREIGN EQU DIRFLAGS/BIT 1 On if account not at home here 00080411 0 ZBM 488 DIRNETWORK EQU DIRFLAGS/BIT 2 On if account accessed via network 1 Assembler C9208 Control Mode C9304 14-Jun-93 17:33 PAGE 24 (CMDEFS) F 6 Variable definitions, storage allocation 00160802 0 BASE 488 DIRVOLUME BSS2 1 Volume account is on (PAK12) 00160804 0 BASE 488 DIRSYSTEM BSS 1 System account is on (PAK6) 00160805 0 BASE 488 DIRACCOUNT BSS2 1 Account name (PAK12) 00160807 0 BASE 488 DIRPROJECT BSS 1 Project of account (PAK6) 488 DRCT 00000008 ABS 488 DIRHWIDE EQU DISPW DIRHINFO Template length 488 ORG DIRHINFO Recover template space 488 488 488 ********************************************************************************** 488 * * 488 * Template for .DIR file entry block * 488 * * 488 ********************************************************************************** 488 00000000 488 DIREINFO BASE R0 Entry for individual file 00160800 0 BASE 488 DIRENTLEN BSS 1 Entry length in words 00160801 0 BASE 488 DIRNAME BSS2 1 Name of file (PAK12) 00160803 0 BASE 488 DIREXT BSS 1 File name extension (PAK6) 00160804 0 BASE 488 DIRCREATD BSS 1 Creation date 00160805 0 BASE 488 DIRLACSD BSS 1 Last access date 00160806 0 BASE 488 DIRLMODD BSS 1 Last modified date 00160807 0 BASE 488 DIRLBKUPD BSS 1 Last backup date 488 00080108 0 ZBM 488 DIRTOTRACS BSSB 16 Total read accesses 00082108 0 ZBM 488 DIRTOTWACS BSSB 16 Total write accesses 488 00080109 0 ZBM 488 DIRRACS BSSB 16 Currently active EQUIPs for RO 00082109 0 ZBM 488 DIRWACS BSSB 16 Currently active EQUIPs for RW 488 0008010A 0 ZBM 488 DIRMWACS BSSB 16 Currently active EQUIPs for MW 0008218A 0 ZBM 488 DIRTFL BSSB 24 Total file length (in blocks) 0008118B 0 ZBM 488 DIRROOTBLK BSSB 24 Root block (or 0 if not GOD) 488 00160030 0 CACH 488 DIRTYPE BSSB 8 Type of file (see FSSTATDTYP) 0008104C 0 ZBM 488 DIRACCESS BSSB 4 Access allowed (see FSSTATACS) 0008184C 0 ZBM 488 DIRACSLOCK BSSB 4 Master level that locked access 00160032 0 CACH 488 DIRPRGINT BSSB 8 Purge interval 0008301C 0 ZBM 488 DIRPRGFLG BSSB 1 On if file was purged 0008321C 0 ZBM 488 DIRNOBKUP BSSB 1 On if file should not be backed up 0008341C 0 ZBM 488 DIRRCVRD BSSB 1 On if file recovered from backup 0008361C 0 ZBM 488 DIRFWWSC BSSB 1 On if file EQUIPed for W at crash 0008381C 0 ZBM 488 DIRFBC BSSB 1 On if file being closed 00083A1C 0 ZBM 488 DIRGHOST BSSB 1 On if file not yet recovered from backup 00083C1C 0 ZBM 488 DIRTRANS BSSB 1 On if file opened when user program crashed 00083E1C 0 ZBM 488 DIRFLOG BSSB 1 On if file access should be logged 488 488 BSSB 1 unused filler 0008021D 0 ZBM 488 DIRLRAF BSSB 1 On if a large (2 level) .RAF 0008050D 0 ZBM 488 DIRCUSE BSSB 16 current use count 488 0016080E 0 BASE 488 DIRUSRFLD BSS 1 user-definable field 0016080F 0 BASE 488 DIRSERNO BSS2 1 file serial number 00160810 0 BASE 488 DIRUNITNM EQU DIRSERNO(1) unit number for hardware devices 488 BSS 0 *** filler *** 488 DRCT 1 Assembler C9208 Control Mode C9304 14-Jun-93 17:33 PAGE 25 (CMDEFS) F 6 Variable definitions, storage allocation 00000011 ABS 488 DIRENTWIDE EQU DISPW DIREINFO Template size in words 488 ORG DIREINFO Recover template space 489 490 ********************************************************************************** 491 * * 492 * Message Header Definitions. From XREQINFIMACS * 493 * * 494 ********************************************************************************** 495 496 MSGDEFS 497 00000008 ABS 498 MSGSHDLEN EQU MSGSTEXT DISPC MSGPROC length of send header 0000001C ABS 499 MSGRHDLEN EQU MSGRTEXT DISPC MSGPROC length of receive header 500 00000010 BYTE 501 MSGRESPONS EQU BIT 0 response message class 00000410 BYTE 502 MSGOPR EQU BIT 2 operator message class 1 Assembler C9208 Control Mode C9304 14-Jun-93 17:33 PAGE 26 (CMDEFS) F 6 Variable definitions, storage allocation 504 * OKLEN should not be less than MAXLEN 505 * to prevent truncation of input lines 506 * and variables 00000100 ABS 507 OKLEN EQU 256 maximum output record size 00000100 ABS 508 MAXLEN EQU 256 maximum input record size 00000040 ABS 509 SLOP EQU 64 allow extra room 510 511 ********************************************************************************** 512 * * 513 * Template for an input buffer. * 514 * * 515 ********************************************************************************** 516 00000000 517 IBPROTO BASE R0 an input buffer 00160800 0 BASE 518 IBPTR BSS 1 current position pointer 00160801 0 BASE 519 IBENDPTR BSS 1 pointer past the end of contents 00160008 0 CACH 520 IBCHARS BSSC MAXLEN where the chars live 521 DRCT 00000042 ABS 522 IBLEN EQU DISPW IBPROTO length of an input buffer CB 523 ORG IBPROTO 524 525 ********************************************************************************** 526 * * 527 * Impure area allocation. * 528 * * 529 ********************************************************************************** 530 531 ********************************************************************************** 532 * * 533 * BE CAREFUL moving some of the variables from the * 534 * IMPAGE. Control Mode discards ALL swapping pages except page * 535 * 0, which must be preserved for the entire existence of the * 536 * users session. * 537 * * 538 ********************************************************************************** 539 540 ORG IMPAGE define impure storage 00000000 541 INITSUBTYP BSS 1 initial entry sub-type from VRM 00000001 542 TIMEINTADR BSS 1 address of timer interrupt processing 00000002 543 SAVTRMCODE BSS 1 termination code for last program run 00000003 544 SAVSUBCODE BSS 1 termination sub-code for last program 00000004 545 LOGONTRIES BSS 1 number of logon attempts made 00000005 546 UNUSED BSS 1 place to store garbage that's never used 00000006 547 PATHPTR BSS 1 points into PATH during file open attempts 00000007 548 LINEMAX BSS 1 line count limit for pause 00000008 549 LINECNT BSS 1 line count for help listing 00000009 550 LUN BSS 1 unit currently operating on 0000000A 551 READLUN BSS 1 read unit for next CM command 0000000B 552 LOWLUN BSS 1 low unit number from LUNGET 0000000C 553 MAXLUN BSS 1 high unit number from LUNGET 0000000D 554 NUMFUNCS BSS 1 number of times to function 0000000E 555 PPCOUNT BSS 1 pre-processor cycle count 0000000F 556 RLSPSAVE BSS 1 stack pointer for READLINE 00000010 557 RLR7SAVE BSS 1 old R7 for READLINE 00000011 558 TCSAVE BSS 1 terminating character temp 00000012 559 COMSAVE BSS 1 COM command pointer save 1 Assembler C9208 Control Mode C9304 14-Jun-93 17:33 PAGE 27 (CMDEFS) F 6 Variable definitions, storage allocation 00000013 560 COMSAVEXO BSS 1 command pointer save for execute-only 00000014 561 VNAME BSS2 1 variable name 00000016 562 VTYPE BSS 1 variable type 00000017 563 SETVALUE BSS 1 Set value 00000018 564 LASTCOM BSS 1 last command 00000019 565 EQDEFAULT BSS 1 open default extension 0000001A 566 RUNLUN BSS 1 unit of current running program 0000001B 567 CMLUN BSS 1 current CM unit for misc. 0000001C 568 ERASELUN BSS 1 unit to be released upon break or error 0000001D 569 UPNUM BSS 1 under-process number 0000001E 570 DOLUN BSS 1 unit used for user input during do 0000001F 571 DOBRINP BSS 1 user input unit at break in a do 00000020 572 INTINFO BSS 2 interrupt entry information 00000022 573 INTFROMUP BSS 1 whether error came during underprocess 00000023 574 OURPSN BSS 1 PSN of our process (CM) 00000024 575 ECHOUNIT BSS 1 echo unit while BATCH/DO active 00000025 576 SWAPUNITS BSS 2 (pair up for double word instructions) 00000025 577 INUNIT EQU SWAPUNITS(0) input unit for EXCHUNITS subroutine 00000026 578 OUTUNIT EQU SWAPUNITS(1) output unit for EXCHUNITS subroutine 00000027 579 RECUNITS BSS 2 (pair up for double word instructions) 00000027 580 RECINUNIT EQU RECUNITS(0) input unit for receive unit request 00000028 581 RECOUTUNIT EQU RECUNITS(1) output unit for receive unit request 00000029 582 SESSNUM BSS 1 session number for various xreqs 0000002A 583 REGBLOCK BSS 12 register save area on break entry 00000036 584 FLAGS BSS 1 flags word contains various bit definitonss 00000037 585 FRONTBUFF BSS 2 for indenting DO files 586 00000039 587 EQBUFF BSS 2 buffer front for acct stuff 588 BSS 1 589 BSS 2 0000003E 590 EQBUF BSS 2 open buffer top 00000040 591 EQBSYS BSS 1 00000041 592 EQBSPWD BSS 2 00000043 593 EQBACCT BSS 2 00000044 594 EQBACCT2 EQU EQBACCT(1) 00000045 595 EQBPRJ BSS 1 00000046 596 EQBACPW BSS 2 00000048 597 EQBFN BSS 2 0000004A 598 EQBFE BSS 1 0000004B 599 EQBPASS BSS 2 0000004D 600 EQBACS BSS 1 601 BSS 5 0000001A ABS 602 EQBUFL EQU DISPW EQBUFF 603 00000053 604 INBUFF BSS IBLEN input buffer 00000095 605 BUFFW LABEL single command line buffer 02000095 606 BUFFER BSSC MAXLEN another buffer 000000D5 607 SBUFFW LABEL fetchitm symbol buffer 020000D5 608 SBUFF BSSC OKLEN 00000100 ABS 609 SBUFL EQU DISPC SBUFF symbol buffer length 610 * 611 * The following four locations (LBUFPT, BUFPT, ERRTOKEN) 612 * must remain contiguous and in this order 613 * 00000115 614 LBUFPT BSS 1 last buffer pointer 00000116 615 BUFPT BSS 1 buffer pointer 1 Assembler C9208 Control Mode C9304 14-Jun-93 17:33 PAGE 28 (CMDEFS) F 6 Variable definitions, storage allocation 00000117 616 ERRTOKEN BSS 2 pointers to beginning and end of the 617 string to include in error message 00000119 618 ATEOL BSS 1 1 says entire input line has been scanned 0000011A 619 LEN BSS 1 input record length 0000011B 620 LGNTRMCHR BSS 1 pointer to logon string terminator 0000011C 621 VALUE BSS 1 fetchitm number storage 0000011D 622 ALPHALEN BSS 1 length of alpha symbol from fetchitm 623 0000011E 624 MBUFFW LABEL 0200011E 625 MBUFF BSSC OKLEN message buffer 00000100 ABS 626 MBUFFL EQU DISPC MBUFFW length of MBUFF in characters 0000015E 627 MSGLEN BSS 1 length of message in MBUFF 628 629 ********************************************************************************** 630 * * 631 * Stack area for DO control and general-purpose stack. * 632 * * 633 ********************************************************************************** 634 0000015F 635 DOPTR BSS 1 DO stack pointer 636 BSS 8 more stack area 637 00000168 638 STACKEND LABEL end of CM stack 639 BSS 256 stack area 00000268 640 STACK LABEL (they work downward) 641 BSS WPP-((DISPW MA 0)-(((DISPW MA 0)/WPP)*WPP)) 642 00000001 ABS 643 SYSBUFPN EQU (DISPW MA 0)/WPP 00000400 644 SYSBUF BSS 4*WPP miscellaneous system communication 645 this buffer must start on a page boundary! 00004000 ABS 646 SYSBUFL EQU 4*WPP*CPW 647 00001400 648 OBUFFW LABEL output buffer 02001400 649 OBUFF BSSC MAXLEN+SLOP 00000140 ABS 650 OBUFFL EQU DISPC OBUFFW length of OBUFF in characters 651 00001450 652 INBUFFX BSS IBLEN auxiliary input buffer for doing input 653 outside of the job command stream 654 655 ********************************************************************************** 656 * * 657 * Area for aliased account information used in UNITS and * 658 * STATUS commands. This is set by the ACCTGET subroutine and * 659 * used by the STATPRNT subroutine. * 660 * * 661 ********************************************************************************** 662 00001492 663 STATVOL BSS 2 aliased volume name 00001494 664 STATACCT BSS 2 aliased account name 00001496 665 STATPROJ BSS 1 aliased project name 666 667 668 ********************************************************************************** 669 * * 670 * DO control block prototype. * 671 * * 1 Assembler C9208 Control Mode C9304 14-Jun-93 17:33 PAGE 29 (CMDEFS) F 6 Variable definitions, storage allocation 672 ********************************************************************************** 673 00001497 674 DOPROTO BASE DO DO unit status area prototype 00170800 4 BASE 675 DOSTAT BSS 1 status word 00090010 4 ZBM 676 DOTRAP EQU DOSTAT/BIT 0 trap flag 00090210 4 ZBM 677 DOLIST EQU DOSTAT/BIT 1 list flag 00090410 4 ZBM 678 DOUCNT EQU DOSTAT/BIT 2 user controlled counter flag 00090610 4 ZBM 679 DOCP EQU DOSTAT/BIT 3 sez counter already given 00090810 4 ZBM 680 DOIN EQU DOSTAT/BIT 4 input parameter already read 00090A10 4 ZBM 681 DOSAME EQU DOSTAT/BIT 5 user input file not changed 00090C10 4 ZBM 682 DOSTD EQU DOSTAT/BIT 6 user input from std device 00090E10 4 ZBM 683 DOINT EQU DOSTAT/BIT 7 interrupted DO flag 00091010 4 ZBM 684 DONO1 EQU DOSTAT/BIT 8 no user input unit at start of DO 000916D0 4 ZBM 685 DOCOUNT EQU DOSTAT/BITS 11:23 user controlled counter 00093080 4 ZBM 686 DOUNIT EQU DOSTAT/BITS 24:31 unit for this DO unit 00170801 4 BASE 687 DOSTAT2 BSS 1 second status word 00090081 4 ZBM 688 DOINP EQU DOSTAT2/BITS 0:7 unit where previous input unit is saved 00170802 4 BASE 689 DOIBUFF BSS IBLEN input buffer for this do level 690 DRCT 00000044 ABS 691 DOBLEN EQU DISPW DOPROTO DO status entry length 692 ORG DOPROTO recover storage 693 00001497 694 DOAREA BSS NUMDO*DOBLEN 695 00001453 REL 696 DOPTPROTO EQU (ADR(DOAREA))-DOBLEN initial DO pointer 000015EB REL 697 DOMAX EQU DOPTPROTO+DOBLEN*NUMDO maximum DO pointer 698 699 ********************************************************************************** 700 * * 701 * Expression evaluator operator/operand stacks. * 702 * * 703 ********************************************************************************** 704 00000002 ABS 705 EEOPRSEL EQU 2 operator element length 00000002 ABS 706 EEOPNSEL EQU 2 operand element length 0000162F 707 EEOPRSTAK BSS 20*EEOPRSEL allow 20 operators on stack 00001657 708 EEOPRSTKL LABEL end of stack 00001657 709 EEOPNSTAK BSS 20*EEOPNSEL allow 20 operands on stack 0000167F 710 EEOPNSTKL LABEL end of stack 711 712 ********************************************************************************** 713 * * 714 * Variable block prototype and list control. * 715 * * 716 ********************************************************************************** 717 0000167F 718 VARPROTO BASE VAR user variable element 0008C010 3 ZBM 719 VARTYPE BSSB 1 variable type (0=number,1=string) 0008C2E0 3 ZBM 720 VARSIZE BSSB 14 length of the block in bytes 0008DF10 3 ZBM 721 VARLINK BSSB 17 link to then next element 722 0016C801 3 BASE 723 VARNAME BSS2 1 variable name 0016C803 3 BASE 724 VARVALUE BSS 1 variable value 0016C803 3 BASE 725 VARSTRLEN EQU VARVALUE variable string length 0016C804 3 BASE 726 VARSTR BSS 0 start of the string 727 DRCT 1 Assembler C9208 Control Mode C9304 14-Jun-93 17:33 PAGE 30 (CMDEFS) F 6 Variable definitions, storage allocation 00000010 ABS 728 VARLEN EQU DISPC VARPROTO character length of element 000000FF ABS 729 VARLENSTC EQU 255 maximum string size (bytes) 730 ORG VARPROTO recover storage 731 732 * FREEHEAD must never butt against the free storage area FREESTART 0000167F 733 FREEPT BSS 1 pointer to free storage 00001680 734 FREEHEAD BSS 1 free storage element list 735 BSS 1 length word (always zero) 736 737 * The following cleared via STZ2 double word instruction 00001682 738 VARPT BSS 1 pointer to variable list 00001683 739 VARTMP BSS 1 pointer to temp variable list 740 00001684 741 FREESTART LABEL start of free memory 00010000 ABS 742 FREETOP EQU PUREPAGE top of free storage (for vars) 0000003F ABS 743 HIGHSWAPPG EQU PUREPAGE/WPP-1 highest page number with CM data 1 Assembler C9208 Control Mode C9304 14-Jun-93 17:33 PAGE 31 (CMDEFS) F 6 Variable definitions, storage allocation 745 746 ********************************************************************************** 747 * * 748 * Constants and other pure area definitions. * 749 * * 750 ********************************************************************************** 751 752 ORG PUREPAGE now to the pure code 10000 F4000000 753 TRMPROTO VFD 1*FOUL+1*NDO+1*NLOG+1*TRM+1*TIN+SKLNOV*SKIL 10001 96400000 754 BATPROTO VFD 1*FOUL+1*NDO+1*NLOG+1*BAT+SKLEXP*SKIL 10002 F5FF9FFF 755 CLRBATMSK VFD NOT (1*ABRT+1*BAT+1*INOK+1*INRQ) 10003 60000000 756 SETTRMMSK VFD 1*TRM+1*TIN 10005 0001149B 757 INTBLOCK VFD ADR(REGBLOCK),ADR(INTERRUPT) 758 10006 000000FF 759 CMEQLUN VFD CMMAXLUN start of CM free units 10007 000000C8 760 MAXULUN VFD HIGHULUN highest user unit 000000FF ABS 761 MAXREPLYL EQU MAXLEN-1 maximum allowable error str from spooler 00001F30 BYTE 762 NXTCHAR EQU BITS 15:1 buffer address increment 00164000 1 CACH 763 BPT EQU CACH R1,0 input buffer pointer 10008 020C0095 764 IBPT PTR BUFFER input buffer pointer 10009 020C00D5 765 SBPT PTR SBUFF symbol buffer pointer 1000A 020C1400 766 OBPT PTR OBUFF output buffer pointer 1000B 020C011E 767 MBPT PTR MBUFF message buffer pointer 1000C 020C00D8 768 SBPKPT PTR SBUFF(12) pointer for packer 769 00000011 ABS 770 CATENTRYLEN EQU 17 word size of one catalog entry 771 1000D 00480036 772 BINARYREAD PTR FLAGS/BIT 0 perform a binary read flag 1000E 08480036 773 OPERMSGGEN PTR FLAGS/BIT 1 operator message generated flag 1000F 10480036 774 ATTACHCMD PTR FLAGS/BIT 2 performing an ATTACH command 10010 18480036 775 ATTACHFLG PTR FLAGS/BIT 3 processing an ATTACH interrupt 10011 84080036 776 ATTACHOPTS PTR FLAGS/BITS 16:31 ATTACH only: the flags from subcode 777 00000004 ABS 778 NCOMPL EQU 4 number of commands listed per line 10012 00000001 779 COMSPOT VFDC 47,31,16,1 positions for command listing 10013 020D0012 780 COMPOST PTR COMSPOT pointer to places for command list 10014 0098967F 781 LIMMAX VFD 9999999 limits maximum value 10014 0000003E 782 PROMPT VFDC STAR,CMCHAR prompt sequence 00000002 ABS 783 PROMPTLEN EQU 2 prompt sequence length 10016 0000003E 784 PROMPT2 VFD 8:STAR,DOT,DOT,DOT,CMCHAR prompt for additional lines 00000005 ABS 785 PROMPT2LEN EQU 5 length of prompt for additional lines 10018 0000003E 786 RDCORCT VFD 8:DOT,DOT,DOT,CMCHAR to repair continued line 00000004 ABS 787 RDCORCTL EQU 4 length of characters needed for repair 10019 2E2E2E2E 788 DOTS ASCII 2,........ for fronting DO echos 1001B 533719C0 789 EXTCODE PAK6 CODE .CODE extension 1001C 58748800 790 EXTDIR PAK6 DIR .DIR extension 1001D 59439000 791 EXTDO PAK6 DO .DO extension 1001E 703D0E80 792 EXTHELP PAK6 HELP .HELP extension 1001F 894A3D80 793 EXTLIST PAK6 LIST .LIST extension 10020 8A3EA000 794 EXTLP PAK6 LP .LP extension 10021 974CF580 795 EXTNULL PAK6 NULL .NULL extension 10022 B2BDD000 796 EXTSAF PAK6 SAF .SAF extension 10023 4B095010 797 EXTBATCH PAK6 BATCH .BATCH extension 00010024 798 LISTCHRS BSS 0 use word address for list extension 10024 00000054 799 VFDC ".","L","I","S","T" .LIST extension for FRNOPEN 00000005 ABS 800 LISTCHRSL EQU DISPC LISTCHRS 1 Assembler C9208 Control Mode C9304 14-Jun-93 17:33 PAGE 32 (CMDEFS) F 6 Variable definitions, storage allocation 00010026 801 PRFILETYP BSS 0 word address for print file type 10025 00000020 802 VFDC "L","P"," " LP file type 00000003 ABS 803 PRFILETYPL EQU DISPC PRFILETYP length of LP file type 00010027 804 SBFILETYP BSS 0 10027 00000020 805 VFDC "B","A","T","C","H"," " BATCH file type 00000006 ABS 806 SBFILETYPL EQU DISPC SBFILETYP length of BATCH file type 10029 E79DF200 807 PRJLIB PAK6 !!! .!!! project 1002A A07A5067 808 PARNAME PAK12 PARAMETERS! parameter string variable name 1002C 5875D740 809 TIMERNAME PAK12 DISCONNECT! variable to specify disconnect timeout 1002E 5448454E 810 THENCHARS ASCII 2,THEN THEN for IF processor 10030 4C414245 811 LABCHARS ASCII 2,LABEL LABEL label for SKIP looks 10032 894A3D80 812 LISTCHARS PAK6 LIST LIST for DO command 10033 BA180848 813 TIMESCHARS PAK6 TIMES TIMES for DO command 10034 BB6C2080 814 TRAPCHARS PAK6 TRAP TRAP for DO command 10035 B59FB63B 815 STNDCHARS PAK12 STANDARD STANDARD for DO command 10037 B2C503C0 816 SAMECHARS PAK6 SAME SAME for DO command 10038 77BB2A70 817 INPTCHARS PAK6 INPUT INPUT for DO command 10039 55502020 818 UPCHARS ASCII 1,UP UP for CATALOG command 1003A 4F555420 819 OUTCHARS ASCII 1,OUT OUT for HELLO command 1003B A07C7248 820 PATHCHARS PAK12 PATH! PATH for file searches 1003D 061A8000 821 VAR0LOW PAK6 0 minimum createable PAK6 not all spaces 1003E 43238000 822 VARLOW PAK6 A minimum legal variable name 1003F E1D47FFF 823 VARHIGH PAK6 Z_____ maximum legal variable name 10040 E1D48000 824 VARBANGLOW PAK6 ! minimum special variable name 10041 E7EEFFFF 825 VARBANGHIGH PAK6 !_____ maximum special variable name 10042 F423FFFF 826 VARMAX PAK6 ______ maximum creatable PAK6 name 10043 2153504F 827 SPLNAME ASCII 2,!SPOOLER name of spooler 00000008 ABS 828 SPLNAMELEN EQU DISPC SPLNAME length of spooler name 10045 4F505220 829 OPRREQTYPE TEXT "OPR " operator request type for spooler 10046 52465020 830 RFPCHARS TEXT "RFP " RFP name for port index conversion 10047 00000000 831 EMPTYLINE TEXTZ "" null output line 00010048 832 OPRMSGHEAD BSS 0 operator message header 10048 0000004D 833 VFDC 007,"O","P","R"," ","M" 10049 00000020 834 VFDC "S","G",":"," " 0000000A ABS 835 OPRMSGHLEN EQU DISPC OPRMSGHEAD 836 1004B DFFFFFFF 837 MSGNOTOPR VFD NOT OPRMASK all classes except operator mask 838 839 0001004C 840 INIT1 LABEL 10050 00000000 841 VFD 0,0,-1,0,0 10055 00000000 842 VFD 0,0,-1,0,0 10056 A07BBC81 843 PAK12 PASSWORD2 10058 8A28CA00 844 PAK6 LOGON 1005A 00000000 845 VFD 0,0 0000003C ABS 846 INIT1LEN EQU DISPC INIT1 1005B 2E535953 847 INHMSGFL TEXTZ ".SYS:INHIBIT.LOGON" 00000012 ABS 848 INHMSGLEN EQU 012 10060 2E535953 849 INITU2 TEXTZ ".SYS:GREETINGS.LOGON" 10066 2E535953 850 INITC1 TEXTZ ".SYS:MESSAGE.LOGON" 1006B 2B444542 851 CALLDBG TEXTZ "+DEBUG.CODE" 1006E 2B4F4C44 852 CALLODBG TEXTZ "+OLDDEBUG.CODE" 10072 2B424153 853 CALLBAS TEXTZ "+BASIC.CODE" 10075 2B434F42 854 CALLCOB TEXTZ "+COBOL.CODE" 10078 2B434F50 855 CALLCOPY TEXTZ "+COPY.CODE" 1007B 2B454449 856 CALLEDIT TEXTZ "+EDIT.CODE" 1 Assembler C9208 Control Mode C9304 14-Jun-93 17:33 PAGE 33 (CMDEFS) F 6 Variable definitions, storage allocation 1007E 2B464F52 857 CALLFTN TEXTZ "+FORTRAN.CODE" 10082 2B4C494E 858 CALLLINK TEXTZ "+LINK.CODE" 10085 2B4C4F41 859 CALLLOAD TEXTZ "+LOAD.CODE" 10088 2B4D4552 860 CALLMRG TEXTZ "+MERGE.CODE" 1008B 2B504153 861 CALLPAS TEXTZ "+PASCAL.CODE" 1008F 2B534F52 862 CALLSORT TEXTZ "+SORT.CODE" 10092 2B48454C 863 CALLHELP TEXTZ "+HELP.CODE" 10095 2B434154 864 CALLCAT TEXTZ "+CATALOG.CODE" 865 000BC010 7 CBM 866 PICADEBUG EQU R7/BIT 0 00010099 867 DEBUGPTRS LABEL 10099 0001006B 868 PTR CALLDBG 1009A 0001006E 869 PTR CALLODBG 870 1009E 00000008 871 BITTAB VFD 1*BIT 31,1*BIT 30,1*BIT 29,1*BIT 28 100A2 00000080 872 VFD 1*BIT 27,1*BIT 26,1*BIT 25,1*BIT 24 100AB 05F5E100 873 TENTAB VFD 1,10,100,1000,10000,100000,1000000,10000000,100000000 100AC 3B9ACA00 874 VFD 1000000000 100AD 30313233 875 HEXTAB TEXT "0123456789ABCDEF" 100B1 020D00AD 876 HEXC PTR HEXTAB/BITS 0:7 hex decode table 100B2 20303132 877 P6TAB TEXT " 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ!&_" 100BC 020D00B2 878 P6CHARS PTR P6TAB/BITS 0:7 pack-6 decode table 879 880 ********************************************************************************** 881 * * 882 * Table of open request by access type. * 883 * * 884 ********************************************************************************** 885 000100BD 886 TABFROPEN LABEL 100BD 00000260 887 VFD FRNOPENW read-write access 100BE 00000261 888 VFD FRNOPENR read-only access 100BF 00000000 889 VFD 0 100C0 00000000 890 VFD 0 100C1 00000264 891 VFD FRNOPENMW multiple write access 100C2 00000000 892 VFD 0 100C3 00000000 893 VFD 0 100C4 00000267 894 VFD FRNOPENNA no data access 895 896 ********************************************************************************** 897 * * 898 * CM error/help state control tables. * 899 * * 900 ********************************************************************************** 901 100C5 010900C6 902 CMSUCTAB PTR CMSUCTBL 100C5 00000001 903 CMSUCTBL VFD 4:CMSUC,CMSUC2,CMSNORM,CMSUC 100C6 00000001 904 VFDB 4:CMSUC,CMSUC,CMSUC,CMSUC 100C6 00000001 905 VFDB 4:CMSUC,CMSUC 100C8 000114E9 906 CMSUCADR ADR MC 0 100C9 000117CC 907 ADR HELP60 1 100CA 000117D7 908 ADR HELP100 2 100CB 000114E9 909 ADR MC 3 100CC 000114E9 910 ADR MC 4 100CD 000114E9 911 ADR MC 5 100CE 000117DB 912 ADR HELP110 6 1 Assembler C9208 Control Mode C9304 14-Jun-93 17:33 PAGE 34 (CMDEFS) F 6 Variable definitions, storage allocation 100CF 000117DD 913 ADR HELP120 7 100D0 000117E1 914 ADR HELP140 8 100D1 000117E5 915 ADR HELP150 9 916 100D2 010900D3 917 CMSHTAB PTR CMSHTBL 100D2 00000005 918 CMSHTBL VFD 4:CMSFRUS,CMSUC2,CMSNORM,CMSFRUS 100D3 00000000 919 VFDB 4:CMSFRUS,CMSNORM,CMSNORM,CMSNORM 100D3 00000000 920 VFDB 4:CMSNORM,CMSNORM 100D5 000117CC 921 CMSHADR ADR HELP60 0 100D6 000117CC 922 ADR HELP60 1 100D7 000117D1 923 ADR HELP70 2 100D8 000117D3 924 ADR HELP80 3 100D9 000117D5 925 ADR HELP90 4 100DA 000117D7 926 ADR HELP100 5 100DB 000117DB 927 ADR HELP110 6 100DC 000117DD 928 ADR HELP120 7 100DD 000117E1 929 ADR HELP140 8 100DE 000117E5 930 ADR HELP150 9 931 932 ********************************************************************************** 933 * * 934 * Batch session complete message for spooler. A ASCII * 935 * decimal represention of OURPSN is injected in the blank * 936 * area. * 937 * * 938 ********************************************************************************** 939 100DF 00000000 940 SPLCOMP VFD SPLMSGID message ID 100E0 53525620 941 TEXT "SRV COMPLETE " session complete message 0000001C ABS 942 SPLCOMPLEN EQU DISPC SPLCOMP message length 943 944 ********************************************************************************** 945 * * 946 * Relinquish all devices message for spooler. * 947 * * 948 ********************************************************************************** 949 000100E6 950 SPLDUMMSG LABEL 100E6 00000000 951 VFD SPLMSGID message ID (to be added) 100E7 44554D20 952 TEXT "DUM" 00000008 ABS 953 SPLDUMLEN EQU DISPC SPLDUMMSG message length 1 Assembler C9208 Control Mode C9304 14-Jun-93 17:33 PAGE 35 (CMDEFS) F 6 Variable definitions, storage allocation 955 956 ********************************************************************************** 957 * * 958 * The following table is for determining character type * 959 * of each of the 128 ASCII characters (after stripping * 960 * parity). Each entry corresponds to one character. After * 961 * converting the character to a type, the type may then be * 962 * used to index one of the FETCHITM control tables. * 963 * * 964 ********************************************************************************** 965 100E8 010900E9 966 CODES PTR CODETAB pointer to ASCII code table 100E9 00000008 967 CODETAB VFD 4:CCC,CCC,CCC,CCC,CCC,CCC,CCC,CCC 100EA 00000008 968 VFDB 4:CCC,CCC,CEL,CCC,CCC,CEL,CCC,CCC 100EB 00000008 969 VFDB 4:CCC,CCC,CCC,CCC,CCC,CCC,CCC,CCC 100EC 00000008 970 VFDB 4:CCC,CCC,CCC,CCC,CCC,CCC,CCC,CCC 100ED 00000005 971 VFDB 4:CBL,CHA,CQT,CLB,CFC,CDL,CHA,CDL 100EE 00000005 972 VFDB 4:CCL,CCL,CCM,CFC,CDL,CNG,CDT,CDL 100EF 00000000 973 VFDB 4:CNM,CNM,CNM,CNM,CNM,CNM,CNM,CNM 100F0 00000004 974 VFDB 4:CNM,CNM,CCL,CDL,COP,CDL,COP,CCM 100F1 00000002 975 VFDB 4:CDL,CLA,CLA,CLA,CLA,CLA,CLA,CHA 100F2 00000002 976 VFDB 4:CHA,CHA,CHA,CHA,CHA,CHA,CHA,CHA 100F3 00000002 977 VFDB 4:CHA,CHA,CHA,CHA,CHA,CHA,CHA,CHA 100F4 00000002 978 VFDB 4:CHA,CHA,CHA,CDL,CDL,CDL,CDL,CHA 100F5 00000002 979 VFDB 4:CDL,CHA,CHA,CHA,CHA,CHA,CHA,CHA 100F6 00000002 980 VFDB 4:CHA,CHA,CHA,CHA,CHA,CHA,CHA,CHA 100F7 00000002 981 VFDB 4:CHA,CHA,CHA,CHA,CHA,CHA,CHA,CHA 100F8 00000008 982 VFDB 4:CHA,CHA,CHA,CDL,CDL,CDL,CDL,CCC 983 00000061 ABS 984 LOWCASE EQU 061 lower case characters 0000007A ABS 985 LOWTOP EQU 07A last lower case char 00000020 ABS 986 LOWBIAS EQU 020 change lower to upper 00000030 ABS 987 NUMBIAS EQU 030 change ASCII to binary 00000037 ABS 988 HEXBIAS EQU 037 change ASCII hex to binary (A to F) 989 100F9 018900F4 990 PAKCODE PTR PAK6TAB(-020) 100FA 00000000 991 PAK6TAB VFD 6:00,37,00,00,00,00,38,00 100FC 00000000 992 VFDB 6:00,00,00,00,00,00,00,00 100FD 00000008 993 VFDB 6:01,02,03,04,05,06,07,08 100FF 00000000 994 VFDB 6:09,10,00,00,00,00,00,00 10100 00000011 995 VFDB 6:00,11,12,13,14,15,16,17 10102 00000019 996 VFDB 6:18,19,20,21,22,23,24,25 10103 00000021 997 VFDB 6:26,27,28,29,30,31,32,33 10105 00000027 998 VFDB 6:34,35,36,00,00,00,00,39 1 Assembler C9208 Control Mode C9304 14-Jun-93 17:33 PAGE 36 (CMDEFS) F 6 Variable definitions, storage allocation 1000 00010106 1001 HDWTAB LABEL hardware types table 10107 00000000 1002 VFD 0,0 10108 B2BDD000 1003 PAK12 SAF 1010A ACA35000 1004 PAK12 RAF 1010C 533719C0 1005 PAK12 CODE 1010E A07C6C80 1006 PAK12 PATH 10110 58748800 1007 PAK12 DIR 10112 974CF580 1008 PAK12 NULL 10114 B980D7C0 1009 PAK12 TERM 10117 00000001 1010 VFD 0,1 unmatchable - was LOCK 10118 4B095010 1011 PAK12 BATCH 1011A 5196B800 1012 PAK12 CDR 1011C 8A3EA000 1013 PAK12 LP 1011E 90F56000 1014 PAK12 MT 10120 53EC6000 1015 PAK12 CT 10122 C7360C00 1016 PAK12 VOL 10124 C7E3E000 1017 PAK12 VT 00000010 ABS 1018 HDWTLEN EQU DISP2 HDWTAB 1019 00010126 1020 PRTTAB LABEL port parameter table 10126 53ABEC00 1021 PAK12 CRD 10128 88C5AC00 1022 PAK12 LFD 1012A 6426AC00 1023 PAK12 FFD 1012C 88A86000 1024 PAK12 LEN 1012E CC5E5C00 1025 PAK12 WID 10130 5D9B8040 1026 PAK12 ECHO 10132 ACB159C0 1027 PAK12 RATE 00000007 ABS 1028 PRTTYPEIDX EQU DISP2 PRTTAB 10134 BC8BF1C0 1029 PAK12 TYPE 10136 7848BBD8 1030 PAK12 IRATE 10138 9CE7BBD8 1031 PAK12 ORATE 1013A 4C8F4480 1032 PAK12 BKSP 1013C 8328B580 1033 PAK12 KILL 1013E 4D984200 1034 PAK12 BRK 10140 727E8C00 1035 PAK12 HTD 0000001C ABS 1036 PRTTLEN EQU DISPW PRTTAB 1037 00010142 1038 RESTAB LABEL reset parameter table 10142 C0F24E08 1039 PAK12 UNITS 10144 59439000 1040 PAK12 DO 10146 C0ED0E20 1041 PAK12 UNDER 10148 C519BD40 1042 PAK12 VARS 1014A 46945C00 1043 PAK12 ALL 00000005 ABS 1044 RESTLEN EQU DISP2 RESTAB 1045 1014C C0ED0E20 1046 UNDERCHARS PAK12 UNDER state parameter values 1014E A30F800C 1047 PROCCHARS PAK12 PROCTREE 1048 00010150 1049 SKLTAB LABEL skill level table 10150 966C48D7 1050 PAK12 NOVICE 10152 4814D6C9 1051 PAK12 AVERAGE 10154 60D7663E 1052 PAK12 EXPERT 10156 47351085 1053 PAK12 APPLICATION 00000004 ABS 1054 SKLTLEN EQU DISP2 SKLTAB 1055 1 Assembler C9208 Control Mode C9304 14-Jun-93 17:33 PAGE 37 (CMDEFS) F 6 Variable definitions, storage allocation 00010158 1056 GETDOUB LABEL flags double entry tables 00010158 1057 ACSTAB LABEL access codes table 10158 AFEF1000 1058 PAK12 RW 1015A CDC38BD8 1059 PAK12 WRITE 1015C AEB69000 1060 PAK12 RO 1015E AD3B0580 1061 PAK12 READ 10160 46F41000 1062 PAK12 AO 10162 4734E58E 1063 PAK12 APPEND 10164 D3559000 1064 PAK12 XO 10166 60CC9C36 1065 PAK12 EXECUTE 10168 916A9000 1066 PAK12 MW 1016A 9186637F 1067 PAK12 MWRITE 1016C 59B8C000 1068 PAK12 DR 1016E 57DA01FF 1069 PAK12 DESTRUCT 10170 00000000 1070 PAK12 10172 00000000 1071 PAK12 10174 9429B000 1072 PAK12 NA 10176 9657A157 1073 PAK12 NOACCESS 00000010 ABS 1074 ACSTLEN EQU DISP2 ACSTAB 1075 00010178 1076 ATRTAB LABEL attribute codes table 10178 CDC38BD8 1077 PAK12 WRITE 1017A AFEF1000 1078 PAK12 RW 1017C AD3B0580 1079 PAK12 READ 1017E AEB69000 1080 PAK12 RO 10180 90403563 1081 PAK12 MODIFY 10182 90321000 1082 PAK12 MO 10184 60CC9C36 1083 PAK12 EXECUTE 10186 D3559000 1084 PAK12 XO 00000008 ABS 1085 ATRTLEN EQU DISP2 ATRTAB 1086 00010188 1087 MODTAB LABEL saved file modify codes table 00000000 ABS 1088 MODACS EQU (DISP2 MODTAB)/2 10188 452C6465 1089 PAK12 ACCESS 1018A 453BA200 1090 PAK12 ACS 1018C A387B4AB 1091 PAK12 PURGEINT 1018E A1973000 1092 PAK12 PI 10190 C1B1A796 1093 PAK12 USERFLD 10192 BFBC5380 1094 PAK12 UFLD 00000003 ABS 1095 MODYN EQU (DISP2 MODTAB)/2 10194 4AF8EA32 1096 PAK12 BACKUP 10196 946607D0 1097 PAK12 NBKUP 10198 53A9B620 1098 PAK12 CRASHFLG 1019A CE804200 1099 PAK12 WWC 1019C 6A9AC400 1100 PAK12 GHOSTFLG 1019E 6C4C9C00 1101 PAK12 GST 101A0 BB6C1898 1102 PAK12 TRANSFLG 101A2 BB6C1888 1103 PAK12 TRANS 101A4 64A40D49 1104 PAK12 FILELOG 101A6 651C3440 1105 PAK12 FLOG 00000010 ABS 1106 MODTLEN EQU DISP2 MODTAB 1107 000101A8 1108 YNTAB LABEL yes/no table 101A8 964C9000 1109 PAK12 NO 101AA 927C0000 1110 PAK12 N 101AC D805C200 1111 PAK12 YES 1 Assembler C9208 Control Mode C9304 14-Jun-93 17:33 PAGE 38 (CMDEFS) F 6 Variable definitions, storage allocation 101AE D59F8000 1112 PAK12 Y 00000004 ABS 1113 YNTLEN EQU DISP2 YNTAB 1114 000101B0 1115 MODFUNCS LABEL save file modify XREQ's 101B0 000000D0 1116 VFD FRMODACS access privilege 101B1 000000D2 1117 VFD FRMODPRGI purge interval 101B2 000000D5 1118 VFD FRMODUSRN user field 101B3 000000D3 1119 VFD FRMODNBKUP no-backup flag 101B4 000000D4 1120 VFD FRMODFWWSC writing-when-crashed flag 101B5 000000D7 1121 VFD FRMODGHOST ghost flag 101B6 000000DA 1122 VFD FRMODTRANS transaction in progress flag 101B7 000000DB 1123 VFD FRMODFLOG file logging flag 1124 000101B8 1125 PRTFUNCS LABEL port characteristic XREQ's 101B8 00000111 1126 VFD FRTSETCRD carriage return delay 101B9 00000112 1127 VFD FRTSETLFD line feed delay 101BA 00000113 1128 VFD FRTSETFFD form feed delay 101BB 00000117 1129 VFD FRTSETSH length of form 101BC 00000116 1130 VFD FRTSETCW form width 101BD 00000118 1131 VFD FRTSETECHO echo state 101BE 00000119 1132 VFD FRTSETRATE baud rate 101BF 00000110 1133 VFD FRTSETTYPE terminal type 101C0 0000011C 1134 VFD FRTSETIRAT input baud rate 101C1 0000011D 1135 VFD FRTSETORAT output baud rate 101C2 00000114 1136 VFD FRTSETBKSP backspace character 101C3 00000115 1137 VFD FRTSETKILL line kill character 101C4 00000223 1138 VFD FRTSETBRCH break character 101C5 00000222 1139 VFD FRTSETHTD horizontal tab delay 1 Assembler C9208 Control Mode C9304 14-Jun-93 17:33 PAGE 39 (CMDEFS) F 6 Variable definitions, storage allocation 1141 1142 ********************************************************************************** 1143 * * 1144 * Data for PORT command message creation. * 1145 * * 1146 ********************************************************************************** 1147 101C6 028901C7 1148 PTRFRTGET PTR TABFRTGET pointer to table of freq's 101C6 0000012E 1149 TABFRTGET VFDB 10:FRTGETPORT table of freq's for port info 101C6 00000127 1150 VFDB 10:FRTGETSH 101C6 00000121 1151 VFDB 10:FRTGETCRD 101C7 00000120 1152 VFDB 10:FRTGETTYPE 101C7 00000126 1153 VFDB 10:FRTGETCW 101C7 00000123 1154 VFDB 10:FRTGETFFD 101C8 00000128 1155 VFDB 10:FRTGETECHO 101C8 00000124 1156 VFDB 10:FRTGETBKSP 101C8 00000122 1157 VFDB 10:FRTGETLFD 101C9 0000012C 1158 VFDB 10:FRTGETIRAT 101C9 00000125 1159 VFDB 10:FRTGETKILL 101C9 00000232 1160 VFDB 10:FRTGETHTD 101CA 00000129 1161 VFDB 10:FRTGETRATE 101CA 00000233 1162 VFDB 10:FRTGETBRCH 1163 00000000 ABS 1164 PORTDEC EQU 0 decimal processing 00000001 ABS 1165 PORTPAK12 EQU 1 PAK12 processing 00000002 ABS 1166 PORTHEX EQU 2 hexidecimal processing 00000003 ABS 1167 PORTNUM EQU 3 port number processing 1168 101CC 010901CD 1169 PTRPROCTYP PTR TABPROCTYP pointer to processing type table 101CC 00000003 1170 TABPROCTYP VFD 4:PORTNUM table of processing types 101CC 00000000 1171 VFDB 4:PORTDEC 101CC 00000000 1172 VFDB 4:PORTDEC 101CC 00000001 1173 VFDB 4:PORTPAK12 101CC 00000000 1174 VFDB 4:PORTDEC 101CC 00000000 1175 VFDB 4:PORTDEC 101CC 00000000 1176 VFDB 4:PORTDEC 101CD 00000002 1177 VFDB 4:PORTHEX 101CD 00000000 1178 VFDB 4:PORTDEC 101CD 00000000 1179 VFDB 4:PORTDEC 101CD 00000002 1180 VFDB 4:PORTHEX 101CD 00000000 1181 VFDB 4:PORTDEC 101CD 00000000 1182 VFDB 4:PORTDEC 101CD 00000002 1183 VFDB 4:PORTHEX 1184 000101CF 1185 TABPRTPRC LABEL table of pntrs to conversion routines 101CF 00010A97 1186 PTR NDCRL 101D0 00010C2B 1187 PTR UP12RL 101D1 00010AB9 1188 PTR NHCRL 101D2 00010AFC 1189 PTR NUMTOPORTX 1190 000101D3 1191 TABPRTMAX LABEL table of maximum values for conversion 101D3 000F423F 1192 VFD 999999 101D4 F423FFFF 1193 PAK6 ______ 101D5 000000FF 1194 VFD 0FF 1 Assembler C9208 Control Mode C9304 14-Jun-93 17:33 PAGE 40 (CMDEFS) F 6 Variable definitions, storage allocation 1196 1197 ********************************************************************************** 1198 * * 1199 * The following tables are for conversion from port index * 1200 * supplied by the operating system to port specifiers * 1201 * displayed for users and vice versa. They contain all the * 1202 * possible characters that can occur in each position of a * 1203 * port specifier. * 1204 * * 1205 ********************************************************************************** 1206 00000080 BYTE 1207 ACCCHAR EQU BITS 0:7 ACC character 00001180 BYTE 1208 ACCINDEX EQU BITS 8:31 bits for index for ACC's 1209 000101D6 1210 ACCTAB LABEL 101D6 00000001 1211 VFD 8:"A",24:1 101D7 00000041 1212 VFD 8:"B",24:65 101D8 00000081 1213 VFD 8:"C",24:129 101D9 000000C1 1214 VFD 8:"D",24:193 101DA 00000101 1215 VFD 8:"E",24:257 101DB 00000141 1216 VFD 8:"F",24:321 101DC 00000181 1217 VFD 8:"H",24:385 101DD 000001C1 1218 VFD 8:"J",24:449 00000008 ABS 1219 ACCTABL EQU DISPW ACCTAB 1220 00000080 BYTE 1221 BOARDCHAR EQU BITS 0:7 board character 00001180 BYTE 1222 BOARDINDEX EQU BITS 8:31 bits for index for board 1223 000101DE 1224 BOARDTAB LABEL 101DE 00000000 1225 VFD 8:"J",24:0 101DF 00000008 1226 VFD 8:"H",24:8 101E0 00000010 1227 VFD 8:"F",24:16 101E1 00000018 1228 VFD 8:"E",24:24 101E2 00000020 1229 VFD 8:"D",24:32 101E3 00000028 1230 VFD 8:"C",24:40 101E4 00000030 1231 VFD 8:"B",24:48 101E5 00000038 1232 VFD 8:"A",24:56 00000008 ABS 1233 BOARDTABL EQU DISPW BOARDTAB 1234 00000080 BYTE 1235 PORTCHAR EQU BITS 0:7 port character 00001180 BYTE 1236 PORTINDEX EQU BITS 8:31 bits for index for port 1237 000101E6 1238 PORTTAB LABEL 101E6 00000000 1239 VFD 8:"1",24:0 101E7 00000001 1240 VFD 8:"2",24:1 101E8 00000002 1241 VFD 8:"3",24:2 101E9 00000003 1242 VFD 8:"4",24:3 101EA 00000004 1243 VFD 8:"5",24:4 101EB 00000005 1244 VFD 8:"6",24:5 101EC 00000006 1245 VFD 8:"7",24:6 101ED 00000007 1246 VFD 8:"8",24:7 00000008 ABS 1247 PORTTABL EQU DISPW PORTTAB 109 INPUT CM.UTL:CMENTS 1 Assembler C9208 Control Mode C9304 14-Jun-93 17:33 PAGE 41 (CMENTS) F 7 Tables for CM re-entry from user programs 3 00000000 ABS 4 EILL EQU 0 illegal entry 00000001 ABS 5 EMSG EQU 1 message print entry 00000002 ABS 6 EBRK EQU 2 break request 00000003 ABS 7 EVAR EQU 3 CM variable set/fetch 00000004 ABS 8 ESTP EQU 4 program termination 00000005 ABS 9 EOPR EQU 5 operator intervention 00000006 ABS 10 ELGF EQU 6 logoff request 00000007 ABS 11 ECHN EQU 7 chain to another program 00000008 ABS 12 EDIS EQU 8 unit disconnect 00000009 ABS 13 EATC EQU 9 session attachment 0000000A ABS 14 EISR EQU 0A insufficient system resources 00000000 ABS 15 ETRC EQU EILL instruction trace interrupt 00000000 ABS 16 EINI EQU EILL initial entry to CM 17 000101EE 18 ENTLOCP LABEL table of processing locations 101EE 000111CC 19 ADR ENTILL 0 - illegal entry 101EF 000111CC 20 ADR ENTMSG 1 - print message 101F0 000111DD 21 ADR ENTBRKU 2 - break request 101F1 000111ED 22 ADR ENTVAR 3 - CM variable set/fetch 101F2 00011274 23 ADR ENTSTP 4 - program termination 101F3 000112B6 24 ADR ENTOPR 5 - operator intervention 101F4 000112B3 25 ADR ENTLGF 6 - logoff request 101F5 00011278 26 ADR ENTCHN 7 - chain to another program 101F6 000112DD 27 ADR ENTDISC 8 - unit disconnect 101F7 000112FC 28 ADR ENTATCHU 9 - session attachment 101F8 000111E6 29 ADR ENTVMFISR 0A - insufficient system resources 30 000101F9 31 ENTLOCC LABEL table of entries for CM trap 101F9 000112B4 32 ADR ENTCMILL 0 - illegal entry 101FA 000112B4 33 ADR ENTCMILL 1 - print message 101FB 000111DA 34 ADR ENTBRKC 2 - break request 101FC 000112B4 35 ADR ENTCMILL 3 - CM variable set/fetch 101FD 000112B4 36 ADR ENTCMILL 4 - program termination 101FE 000112BD 37 ADR ENTOPRCM 5 - operator intervention 101FF 000112B3 38 ADR ENTLGF 6 - logoff request 10200 000112B4 39 ADR ENTCMILL 7 - chain to another program 10201 000112DD 40 ADR ENTDISC 8 - unit disconnect 10202 000112FD 41 ADR ENTATCH 9 - session attachment 10203 000112B4 42 ADR ENTCMILL 0A - insufficient system resources 43 000A3080 0 CBM 44 ENTTYPE EQU R0/BITS 24:31 entry type field 00124000 1 REG 45 ENTSUBT EQU R1 entry sub-type field 00000010 BYTE 46 VGSBIT EQU BIT 0 get/set bit 00000210 BYTE 47 VECBIT EQU BIT 1 error code request bit 00000430 BYTE 48 VTBITS EQU BITS 2:4 variable type 00001B30 BYTE 49 VLBITS EQU BITS 13:31 variable length 00001F10 BYTE 50 ADRBITS EQU BITS 15:31 address of variable 00001E70 BYTE 51 PADRBITS EQU BITS 15:21 page address 00002CA0 BYTE 52 WADRBITS EQU BITS 22:31 word address 00003080 BYTE 53 ECBITS EQU BITS 24:31 error code field 54 55 * Fields for initial entry sub-type 00000010 BYTE 56 INITSKILL EQU BIT 0 set if skill is application 00000210 BYTE 57 INITBATCH EQU BIT 1 set if new process is batch 00000410 BYTE 58 ERRORIDS EQU BIT 2 set if insufficient disk space 1 Assembler C9208 Control Mode C9304 14-Jun-93 17:33 PAGE 42 (CMENTS) F 7 Tables for CM re-entry from user programs 00000610 BYTE 59 ERRORTINH EQU BIT 3 set if terminal unable to logon 000009C0 BYTE 60 INITTYPE EQU BITS 4:31 type of new process logon 1 Assembler C9208 Control Mode C9304 14-Jun-93 17:33 PAGE 43 (CMENTS) F 7 Tables for CM re-entry from user programs 62 10204 01090205 63 ENTS PTR ENTTAB entry codes table 10205 00000001 64 ENTTAB VFD 4:EILL,EMSG,EMSG,EMSG,EMSG,EMSG,EMSG,EMSG 00 10206 00000000 65 VFDB 4:EMSG,EMSG,EILL,EILL,EMSG,EMSG,EMSG,EILL 10207 00000001 66 VFDB 4:EMSG,EMSG,EMSG,EMSG,EMSG,EMSG,EMSG,EMSG 10 10208 00000000 67 VFDB 4:EMSG,EILL,EILL,EILL,EILL,EILL,EILL,ETRC 10209 00000005 68 VFDB 4:EBRK,EMSG,EILL,EILL,EDIS,EILL,EILL,EOPR 20 1020A 00000000 69 VFDB 4:EILL,EILL,EILL,EILL,EILL,EILL,EILL,EILL 1020B 00000000 70 VFDB 4:EILL,EILL,EILL,EILL,EILL,EILL,EILL,EILL 30 1020C 00000000 71 VFDB 4:EILL,EILL,EILL,EILL,EILL,EILL,EILL,EILL 1020D 00000000 72 VFDB 4:EILL,EILL,EILL,EILL,EILL,EILL,EILL,EILL 40 1020E 00000000 73 VFDB 4:EILL,EILL,EILL,EILL,EILL,EILL,EILL,EILL 1020F 00000000 74 VFDB 4:EILL,EILL,EILL,EILL,EILL,EILL,EILL,EILL 50 10210 00000000 75 VFDB 4:EILL,EILL,EILL,EILL,EILL,EILL,EILL,EILL 10211 00000000 76 VFDB 4:EILL,EILL,EILL,EILL,EILL,EILL,EILL,EILL 60 10212 00000000 77 VFDB 4:EILL,EILL,EILL,EILL,EILL,EILL,EILL,EILL 10213 00000000 78 VFDB 4:EMSG,EMSG,EMSG,EISR,EMSG,EATC,EILL,EILL 70 10214 00000000 79 VFDB 4:EILL,EILL,ELGF,ECHN,EVAR,EOPR,ESTP,EINI 10215 00000001 80 VFDB 4:EMSG,EMSG,EMSG,EMSG,EMSG,EMSG,EMSG,EMSG 80 10216 00000001 81 VFDB 4:EMSG,EMSG,EMSG,EMSG,EMSG,EMSG,EMSG,EMSG 10217 00000001 82 VFDB 4:EMSG,EMSG,EMSG,EMSG,EMSG,EMSG,EMSG,EMSG 90 10218 00000001 83 VFDB 4:EMSG,EMSG,EMSG,EMSG,EMSG,EMSG,EMSG,EMSG 10219 00000001 84 VFDB 4:EMSG,EMSG,EMSG,EMSG,EMSG,EMSG,EMSG,EMSG A0 1021A 00000001 85 VFDB 4:EMSG,EMSG,EMSG,EMSG,EMSG,EMSG,EMSG,EMSG 1021B 00000001 86 VFDB 4:EMSG,EMSG,EMSG,EMSG,EMSG,EMSG,EMSG,EMSG B0 1021C 00000001 87 VFDB 4:EMSG,EMSG,EMSG,EMSG,EMSG,EMSG,EMSG,EMSG 1021D 00000001 88 VFDB 4:EMSG,EMSG,EMSG,EMSG,EMSG,EMSG,EMSG,EMSG C0 1021E 00000001 89 VFDB 4:EMSG,EMSG,EMSG,EMSG,EMSG,EMSG,EMSG,EMSG 1021F 00000001 90 VFDB 4:EMSG,EMSG,EMSG,EMSG,EMSG,EMSG,EMSG,EMSG D0 10220 00000001 91 VFDB 4:EMSG,EMSG,EMSG,EMSG,EMSG,EMSG,EMSG,EMSG 10221 00000001 92 VFDB 4:EMSG,EMSG,EMSG,EMSG,EMSG,EMSG,EMSG,EMSG E0 10222 00000001 93 VFDB 4:EMSG,EMSG,EMSG,EMSG,EMSG,EMSG,EMSG,EMSG 10223 00000001 94 VFDB 4:EMSG,EMSG,EMSG,EMSG,EMSG,EMSG,EMSG,EMSG F0 10224 00000001 95 VFDB 4:EMSG,EMSG,EMSG,EMSG,EMSG,EMSG,EMSG,EMSG 110 INPUT CM.UTL:CMCOMS 1 Assembler C9208 Control Mode C9304 14-Jun-93 17:33 PAGE 44 (CMCOMS) F 8 Table of valid CM commands 3 4 ********************************************************************************** 5 * * 6 * The following table contains one entry for each valid * 7 * CM command. An entry consists of up to 12 characters of the * 8 * command name followed by a word containing command * 9 * restrictions and an address to jump to for processing the * 10 * command. The restriction information consists of bits (the * 11 * same as in the ST register) corresponding to each condition * 12 * that prohibits execution of the command. If a user attempts * 13 * to do a restricted command, an appropriate error message * 14 * will be given and the command will not be executed. * 15 * * 16 ********************************************************************************** 17 00010225 18 COMTAB LABEL Control Mode command table 10225 451050B7 19 PAK12 ABNORMAL 10227 A0011562 20 VFD (ADR(ABNORMAL))+1*NLOG+1*TIN 10228 452C6465 21 PAK12 ACCESS 1022A 88011566 22 VFD (ADR(ACCESS))+1*ABRT+1*NLOG 1022B 4691B748 23 PAK12 ALIAS 1022D 8901157D 24 VFD (ADR(ALIAS))+1*VMFISR+1*ABRT+1*NLOG 1022E 4694FD74 25 PAK12 ALLOWBRK 10230 A00115A8 26 VFD (ADR(ALLOWBRK))+1*NLOG+1*TIN 10231 47D4F2DA 27 PAK12 ATTACH 10233 8B0115AC 28 VFD (ADR(ATTACH))+1*VMFISR+1*ABRT+1*NLOG+1*BAT 10234 4B087AC8 29 PAK12 BASIC 10236 890515C8 30 VFD (ADR(BASIC))+1*VMFISR+1*ABRT+1*NLOG+1*LBC 10237 4C8F4480 31 PAK12 BKSP 10239 880115CA 32 VFD (ADR(BKSP))+1*ABRT+1*NLOG 1023A 4CB21EA5 33 PAK12 BLOCKS 1023C 800115CD 34 VFD (ADR(BLOCKS))+1*NLOG 1023D 5123C449 35 PAK12 CATALOG 1023F 800515DE 36 VFD (ADR(CATALOG))+1*NLOG+1*LBC 10240 52C2CF20 37 PAK12 CLEAR 10242 800115E0 38 VFD (ADR(CLEAR))+1*NLOG 10243 52CD0198 39 PAK12 CLOSE 10245 880115EE 40 VFD (ADR(CLOSE))+1*ABRT+1*NLOG 10246 533567B0 41 PAK12 COBOL 10248 89051611 42 VFD (ADR(COBOL))+1*VMFISR+1*ABRT+1*NLOG+1*LBC 10249 53401790 43 PAK12 COMMANDS 1024B 00011613 44 VFD (ADR(COMMANDS)) 1024C 53401830 45 PAK12 COMMENT 1024E 000114E6 46 VFD (ADR(COMMENT)) 1024F 53434EC0 47 PAK12 COPY 10251 89051632 48 VFD (ADR(COPY))+1*VMFISR+1*ABRT+1*NLOG+1*LBC 10252 54BCEDD8 49 PAK12 CYCLE 10254 89011634 50 VFD (ADR(CYCLE))+1*VMFISR+1*ABRT+1*NLOG 10255 573E59C0 51 PAK12 DATE 10257 00011637 52 VFD (ADR(DATE)) 10258 57C96C68 53 PAK12 DEBUG 1025A 81051656 54 VFD (ADR(DEBUG))+1*VMFISR+1*NLOG+1*LBC 1025B 57DA01F9 55 PAK12 DESTROY 1025D 89011675 56 VFD (ADR(DESTROY))+1*VMFISR+1*ABRT+1*NLOG 1025E 587627FB 57 PAK12 DISPLAY 10260 80011687 58 VFD (ADR(DISPLAY))+1*NLOG 1 Assembler C9208 Control Mode C9304 14-Jun-93 17:33 PAGE 45 (CMCOMS) F 8 Table of valid CM commands 10261 59439000 59 PAK12 DO 10263 890116A0 60 VFD (ADR(DOC))+1*VMFISR+1*ABRT+1*NLOG 10264 5DC3A980 61 PAK12 EDIT 10266 89051727 62 VFD (ADR(EDIT))+1*VMFISR+1*ABRT+1*NLOG+1*LBC 10267 5FDEB598 63 PAK12 ERASE 10269 88011729 64 VFD (ADR(ERASE))+1*ABRT+1*NLOG 1026A 60D0E980 65 PAK12 EXIT 1026C 8001172C 66 VFD (ADR(EXIT))+1*NLOG 1026D 6594A7EB 67 PAK12 FORTRAN 1026F 8905173B 68 VFD (ADR(FORTRAN))+1*VMFISR+1*ABRT+1*NLOG+1*LBC 10270 66CE0480 69 PAK12 FWSP 10272 8801173D 70 VFD (ADR(FWSP))+1*ABRT+1*NLOG 10273 6B931000 71 COMGO PAK12 GO 10275 89011740 72 VFD (ADR(GO))+1*VMFISR+1*ABRT+1*NLOG 10276 703D0E80 73 PAK12 HELP 10278 0005178E 74 VFD (ADR(HELP))+1*LBC 10279 76688000 75 PAK12 IF 1027B 800117E9 76 VFD (ADR(IF))+1*NLOG 1027C 76A7A0AF 77 PAK12 IGNOREBRK 1027E A00117FB 78 VFD (ADR(IGNOREBRK))+1*NLOG+1*TIN 1027F 77BB2A70 79 PAK12 INPUT 10281 800117FF 80 VFD (ADR(INPUT))+1*NLOG 10282 77BDB43E 81 PAK12 INSERT 10284 89011853 82 VFD (ADR(INSERT))+1*VMFISR+1*ABRT+1*NLOG 10285 8800C930 83 PAK12 LABEL 10287 A00114E6 84 VFD (ADR(LABEL))+1*NLOG+1*TIN 10288 8944218D 85 PAK12 LIMITS 1028A 81011866 86 VFD (ADR(LIMITS))+1*VMFISR+1*NLOG 1028B 89452340 87 PAK12 LINK 1028D 890518A3 88 VFD (ADR(LINK))+1*VMFISR+1*ABRT+1*NLOG+1*LBC 1028E 894A3D80 89 PAK12 LIST 10290 800118A5 90 VFD (ADR(LIST))+1*NLOG 10291 8A22A580 91 PAK12 LOAD 10293 890518B9 92 VFD (ADR(LOAD))+1*VMFISR+1*ABRT+1*NLOG+1*LBC 10294 8A28C8D0 93 PAK12 LOGOFF 10296 800118BB 94 VFD (ADR(LOGOFF))+1*NLOG 00010297 95 COMLOGON LABEL 10297 8A28CA00 96 PAK12 LOGON 10299 00811926 97 VFD (ADR(LOGON))+1*NOECHO 1029A 8EC73498 98 PAK12 MERGE 1029C 890519F5 99 VFD (ADR(MERGE))+1*VMFISR+1*ABRT+1*NLOG+1*LBC 1029D 90403563 100 PAK12 MODIFY 1029F 890119F7 101 VFD (ADR(MODIFY))+1*VMFISR+1*ABRT+1*NLOG 102A0 9668798E 102 PAK12 NORMAL 102A2 80011A1F 103 VFD (ADR(NORMAL))+1*NLOG 102A3 9BFFE5E4 104 PAK12 OLDDEBUG 102A5 81051A23 105 VFD (ADR(OLDDEBUG))+1*VMFISR+1*NLOG+1*LBC 102A6 9C9D5C00 106 PAK12 OPEN 102A8 89011A26 107 VFD (ADR(OPEN))+1*VMFISR+1*ABRT+1*NLOG 102A9 9D6F6376 108 PAK12 OUTPUT 102AB 88011A73 109 VFD (ADR(OUTPUT))+1*ABRT+1*NLOG 102AC A07B550E 110 PAK12 PASCAL 102AE 89051AAC 111 VFD (ADR(PASCAL))+1*VMFISR+1*ABRT+1*NLOG+1*LBC 102AF A07BBC81 112 PAK12 PASSWORD 102B1 89011AAE 113 VFD (ADR(PASSWORD))+1*VMFISR+1*ABRT+1*NLOG 102B2 A29DA380 114 PAK12 PORT 1 Assembler C9208 Control Mode C9304 14-Jun-93 17:33 PAGE 46 (CMCOMS) F 8 Table of valid CM commands 102B4 0B011AD0 115 VFD (ADR(PORT))+1*VMFISR+1*ABRT+1*BAT 102B5 A29E5D83 116 PAK12 POSITION 102B7 88011B1C 117 VFD (ADR(POSITION))+1*ABRT+1*NLOG 102B8 A309E8B0 118 PAK12 PRINT 102BA 81011B35 119 VFD (ADR(PRINT))+1*VMFISR+1*NLOG 102BB AD45E69B 120 PAK12 RELINQUISH 102BD 88011B81 121 VFD (ADR(RELINQUISH))+1*NLOG+1*ABRT 102BE AD47A867 122 PAK12 RENAME 102C0 89011B84 123 VFD (ADR(RENAME))+1*VMFISR+1*ABRT+1*NLOG 102C1 AD49DF45 124 PAK12 REPLACE 102C3 89011BBD 125 VFD (ADR(REPLACE))+1*VMFISR+1*ABRT+1*NLOG 102C4 AD4B1235 126 PAK12 REQUEST 102C6 88011BD4 127 VFD (ADR(REQUEST))+1*NLOG+1*ABRT 102C7 AD4CA470 128 PAK12 RESET 102C9 88011BE0 129 VFD (ADR(RESET))+1*ABRT+1*NLOG 102CA AD50A48E 130 PAK12 REWIND 102CC 88011C26 131 VFD (ADR(REWIND))+1*ABRT+1*NLOG 102CD AFB86000 132 PAK12 RUN 102CF 89011C29 133 VFD (ADR(RUN))+1*VMFISR+1*ABRT+1*NLOG 102D0 B2CDCDC0 134 PAK12 SAVE 102D2 89011C55 135 VFD (ADR(SAVE))+1*VMFISR+1*ABRT+1*NLOG 102D3 B2E56FC0 136 PAK12 SBFM 102D5 88011C75 137 VFD (ADR(SBFM))+1*ABRT+1*NLOG 102D6 B3633180 138 PAK12 SEOD 102D8 88011C7B 139 VFD (ADR(SEOD))+1*ABRT+1*NLOG 102D9 B367BC00 140 PAK12 SET 102DB 80011C7E 141 VFD (ADR(SET))+1*NLOG 102DC B381AFC0 142 PAK12 SFFM 102DE 88011C78 143 VFD (ADR(SFFM))+1*ABRT+1*NLOG 102DF B3CB0F58 144 PAK12 SHARE 102E1 89011C94 145 VFD (ADR(SHARE))+1*VMFISR+1*ABRT+1*NLOG 102E2 B447EAF0 146 PAK12 SKILL 102E4 80011CEC 147 VFD (ADR(SKILL))+1*NLOG 102E5 B4480080 148 PAK12 SKIP 102E7 A0011D08 149 VFD (ADR(SKIP))+1*NLOG+1*TIN 102E8 B4ED2380 150 PAK12 SORT 102EA 89051D37 151 VFD (ADR(SORT))+1*VMFISR+1*ABRT+1*NLOG+1*LBC 102EB B59FDBD8 152 PAK12 STATE 102ED 80011D39 153 VFD (ADR(STATE))+1*NLOG 102EE B59FDE75 154 PAK12 STATUS 102F0 80011D6D 155 VFD (ADR(STATUSC))+1*NLOG 102F1 B5C7BAD6 156 PAK12 SUBMIT 102F3 89011D8E 157 VFD (ADR(SUBMIT))+1*VMFISR+1*ABRT+1*NLOG 102F4 BA1803C0 158 PAK12 TIME 102F6 80011DD8 159 VFD (ADR(TIME))+1*NLOG 102F7 BB6BE493 160 PAK12 TRAFFIC 102F9 00011DE9 161 VFD (ADR(TRAFFIC)) 102FA C0F24E08 162 PAK12 UNITS 102FC 80011E04 163 VFD (ADR(UNITS))+1*NLOG 102FD C0FB9BCF 164 PAK12 UNSAVE 102FF 89011E0F 165 VFD (ADR(UNSAVE))+1*VMFISR+1*ABRT+1*NLOG 10300 C0FBC454 166 PAK12 UNSHARE 10302 89011E22 167 VFD (ADR(UNSHARE))+1*VMFISR+1*ABRT+1*NLOG 10303 CBF1F600 168 PAK12 WFM 10305 89011E52 169 VFD (ADR(WFM))+1*VMFISR+1*ABRT+1*NLOG 00010306 170 COMLIST LABEL 1 Assembler C9208 Control Mode C9304 14-Jun-93 17:33 PAGE 47 (CMCOMS) F 8 Table of valid CM commands 10306 2A202020 171 STRCOM ASCII 2,* 10308 000114E6 172 VFD (ADR(SNOWFLAKE)) 10309 3F202020 173 QSTCOM ASCII 2,? 1030B 00011793 174 VFD (ADR(QUESTION)) 0001030C 175 COMGOOD LABEL end of decent commands 1030C 66702540 176 PAK12 FUCK 1030E 04000000 177 VFD 1*FOUL 1030F B3D2E980 178 PAK12 SHIT 10311 04000000 179 VFD 1*FOUL 10312 53A9A080 180 PAK12 CRAP 10314 04000000 181 VFD 1*FOUL 10315 A1B43740 182 PAK12 PISS 10317 04000000 183 VFD 1*FOUL 10318 B5C8A540 184 PAK12 SUCK 1031A 04000000 185 VFD 1*FOUL 1031B 47AD167E 186 PAK12 ASSHOLE 1031D 04000000 187 VFD 1*FOUL 0001031E 188 COMTABE LABEL end of command table 189 00001010 BYTE 190 NOECHO EQU BIT 8 no echo from command 0001031E 191 COMENTRY BASE COM command entry prototype 00000002 ABS 192 NWPCOM EQU 2 number of words per command name 0016C800 3 BASE 193 COMNAME BSS NWPCOM command name 0016C802 3 BASE 194 COMX BSS 1 other tidbits 0008C082 3 ZBM 195 COMSTAT EQU COMX/STATBITS status under which command illegal 0008D012 3 ZBM 196 COMNOECHO EQU COMX/NOECHO do not echo this command 0008DF12 3 ZBM 197 COMADR EQU COMX/BITS 15:31 address to go to perform command 198 DRCT 00000003 ABS 199 COMLENE EQU DISPW COMENTRY command entry length 200 ORG COMENTRY recover 112 INPUT CM.UTL:CMISUB 1 Assembler C9208 Control Mode C9304 14-Jun-93 17:33 PAGE 48 (CMISUB) F 9 Input Subroutines 3 4 BLOCK FETCHITM routines 5 ENTRY FETCHITM 6 ENTRY FETCHITMF 7 ENTRY FETCHITMC 8 ENTRY FETCHITMI 9 ENTRY FETCHITMO 10 ENTRY FETCHITME 11 ENTRY FETCHITMP 12 ENTRY FETCHITMW 13 ENTRY FETCHITMEW 14 15 ********************************************************************************** 16 * * 17 * The following are the FETCHITM control tables. The * 18 * first three tables (I, N, A) control processing of current * 19 * character based on character type, FETCHITM entry, and * 20 * item-being- processed type. The last table (J) is the jump * 21 * table for continuation of processing based on the decision * 22 * by the prevceeding tables. * 23 * * 24 ********************************************************************************** 25 00000000 ABS 26 FPN EQU 0 process number 00000001 ABS 27 FPA EQU 1 process alpha 00000002 ABS 28 FCN EQU 2 continue number 00000003 ABS 29 FCA EQU 3 continue alpha 00000004 ABS 30 FSK EQU 4 skip current character 00000005 ABS 31 FCR EQU 5 carriage return (EOL) 00000006 ABS 32 FDL EQU 6 delimiter character 00000007 ABS 33 FCC EQU 7 control character 00000008 ABS 34 FEN EQU 8 exit from number packing 00000009 ABS 35 FEA EQU 9 exit from string packer 0000000A ABS 36 FPO EQU 10 operator 0000000B ABS 37 FPS EQU 11 process string 0000000C ABS 38 FFC EQU 12 process file character 0000000D ABS 39 FEF EQU 13 exit file char processing 0000000E ABS 40 FPH EQU 14 process hex number 0000000F ABS 41 FHN EQU 15 continue hex (numeric char) 00000010 ABS 42 FHA EQU 16 continue hex (alpha char) 00000011 ABS 43 FEH EQU 17 exit from hex packing 00000012 ABS 44 FER EQU 18 error 00000013 ABS 45 FFP EQU 19 process file parameter str on filename 00000014 ABS 46 FIP EQU 20 process file parameter string alone 47 48 * CNM CLA CHA CFC CCM CDL CEL CBL CCC COP CQT CDT CLB CNG 1031E 0000000E 49 CCL 50 10320 00000012 51 FITABI VFD 5:FPN,FPA,FPA,FSK,FSK,FSK,FCR,FSK,FCC,FSK,FPS,FSK,FPH,FER 10320 00000004 52 VFDB 5:FSK 10322 00000012 53 VFDB 5:FPN,FPA,FPA,FPA,FSK,FSK,FCR,FSK,FCC,FSK,FPS,FPA,FPH,FER 10322 00000004 54 VFDB 5:FSK 10324 00000012 55 VFDB 5:FPN,FPA,FPA,FPA,FDL,FSK,FCR,FSK,FCC,FSK,FPS,FPA,FPH,FER 10325 00000004 56 VFDB 5:FSK 10327 00000006 57 VFDB 5:FPN,FPA,FPA,FDL,FDL,FDL,FDL,FSK,FCC,FDL,FPS,FDL,FPH,FDL 10327 00000006 58 VFDB 5:FDL 1 Assembler C9208 Control Mode C9304 14-Jun-93 17:33 PAGE 49 (CMISUB) F 9 Input Subroutines 10329 00000006 59 VFDB 5:FPN,FPA,FPA,FDL,FDL,FDL,FDL,FSK,FCC,FPO,FPS,FDL,FPH,FDL 10329 00000006 60 VFDB 5:FDL 1032B 00000012 61 VFDB 5:FPA,FPA,FPA,FSK,FSK,FSK,FCR,FSK,FCC,FSK,FPS,FFC,FSK,FER 1032C 00000004 62 VFDB 5:FSK 1032E 00000012 63 VFDB 5:FPN,FPA,FPA,FPA,FSK,FSK,FCR,FSK,FCC,FIP,FPS,FPA,FPH,FER 1032E 00000004 64 VFDB 5:FSK 10330 00000012 65 VFDB 5:FER,FPA,FPA,FER,FPA,FSK,FCR,FSK,FER,FER,FER,FEF,FSK,FER 10330 00000012 66 VFDB 5:FER 10332 00000012 67 VFDB 5:FPA,FPA,FPA,FER,FPA,FSK,FCR,FSK,FER,FER,FER,FSK,FSK,FER 10333 00000012 68 VFDB 5:FER 69 10336 00000008 70 FITABN VFD 5:FCN,FEN,FEN,FEN,FEN,FEN,FEN,FEN,FEN,FEN,FEN,FEN,FEN,FEN 10336 00000008 71 VFDB 5:FEN 10338 00000008 72 VFDB 5:FCN,FEN,FEN,FEN,FEN,FEN,FEN,FEN,FEN,FEN,FEN,FEN,FEN,FEN 10338 00000008 73 VFDB 5:FEN 1033A 00000008 74 VFDB 5:FCN,FEN,FEN,FEN,FEN,FEN,FEN,FEN,FEN,FEN,FEN,FEN,FEN,FEN 1033B 00000008 75 VFDB 5:FEN 1033D 00000008 76 VFDB 5:FCN,FEN,FEN,FEN,FEN,FEN,FEN,FEN,FEN,FEN,FEN,FEN,FEN,FEN 1033D 00000008 77 VFDB 5:FEN 1033F 00000008 78 VFDB 5:FCN,FEN,FEN,FEN,FEN,FEN,FEN,FEN,FEN,FEN,FEN,FEN,FEN,FEN 1033F 00000008 79 VFDB 5:FEN 10341 0000000D 80 VFDB 5:FPA,FPA,FPA,FEF,FEF,FEF,FEF,FEF,FEF,FEF,FEF,FEF,FEF,FEF 10342 0000000D 81 VFDB 5:FEF 10344 00000008 82 VFDB 5:FCN,FEN,FEN,FEN,FEN,FEN,FEN,FEN,FEN,FEN,FEN,FEN,FEN,FEN 10344 00000008 83 VFDB 5:FEN 10346 00000012 84 VFDB 5:FER,FER,FER,FER,FER,FER,FER,FER,FER,FER,FER,FER,FEA,FER 10346 00000012 85 VFDB 5:FER 10348 00000009 86 VFDB 5:FCA,FCA,FCA,FEA,FCA,FEA,FEA,FEA,FEA,FEA,FEA,FER,FEA,FEA 10349 00000009 87 VFDB 5:FEA 88 1034C 00000009 89 FITABA VFD 5:FCA,FCA,FCA,FEA,FEA,FEA,FEA,FEA,FEA,FEA,FEA,FEA,FEA,FEA 1034C 00000009 90 VFDB 5:FEA 1034E 00000009 91 VFDB 5:FCA,FCA,FCA,FCA,FEA,FEA,FEA,FEA,FEA,FEA,FEA,FCA,FEA,FEA 1034E 00000009 92 VFDB 5:FEA 10350 00000009 93 VFDB 5:FCA,FCA,FCA,FEA,FEA,FEA,FEA,FEA,FEA,FEA,FEA,FEA,FEA,FEA 10351 00000009 94 VFDB 5:FEA 10353 00000009 95 VFDB 5:FCA,FCA,FCA,FEA,FEA,FEA,FEA,FEA,FEA,FEA,FEA,FEA,FEA,FEA 10353 00000009 96 VFDB 5:FEA 10355 00000009 97 VFDB 5:FCA,FCA,FCA,FEA,FEA,FEA,FEA,FEA,FEA,FEA,FEA,FEA,FEA,FEA 10355 00000009 98 VFDB 5:FEA 10357 00000009 99 VFDB 5:FCA,FCA,FCA,FEA,FEA,FEA,FEA,FEA,FEA,FEA,FEA,FEA,FEA,FEA 10358 00000009 100 VFDB 5:FEA 1035A 00000009 101 VFDB 5:FCA,FCA,FCA,FCA,FEA,FEA,FEA,FEA,FEA,FFP,FEA,FCA,FEA,FEA 1035A 00000003 102 VFDB 5:FCA 1035C 00000009 103 VFDB 5:FCA,FCA,FCA,FEA,FCA,FEA,FEA,FEA,FEA,FEA,FEA,FEF,FEA,FEA 1035C 00000009 104 VFDB 5:FEA 1035E 00000009 105 VFDB 5:FCA,FCA,FCA,FEA,FCA,FEA,FEA,FEA,FEA,FEA,FEA,FER,FEA,FEA 1035F 00000009 106 VFDB 5:FEA 107 10362 00000011 108 FITABH VFD 5:FHN,FHA,FEH,FEH,FEH,FEH,FEH,FEH,FEH,FEH,FEH,FEH,FEH,FEH 10362 00000011 109 VFDB 5:FEH 10364 00000011 110 VFDB 5:FHN,FHA,FEH,FEH,FEH,FEH,FEH,FEH,FEH,FEH,FEH,FEH,FEH,FEH 10364 00000011 111 VFDB 5:FEH 10366 00000011 112 VFDB 5:FHN,FHA,FEH,FEH,FEH,FEH,FEH,FEH,FEH,FEH,FEH,FEH,FEH,FEH 10367 00000011 113 VFDB 5:FEH 10369 00000011 114 VFDB 5:FHN,FHA,FEH,FEH,FEH,FEH,FEH,FEH,FEH,FEH,FEH,FEH,FEH,FEH 1 Assembler C9208 Control Mode C9304 14-Jun-93 17:33 PAGE 50 (CMISUB) F 9 Input Subroutines 10369 00000011 115 VFDB 5:FEH 1036B 00000011 116 VFDB 5:FHN,FHA,FEH,FEH,FEH,FEH,FEH,FEH,FEH,FEH,FEH,FEH,FEH,FEH 1036B 00000011 117 VFDB 5:FEH 1036D 0000000D 118 VFDB 5:FPA,FPA,FPA,FEF,FEF,FEF,FEF,FEF,FEF,FEF,FEF,FEF,FEF,FEF 1036E 0000000D 119 VFDB 5:FEF 10370 00000011 120 VFDB 5:FHN,FHA,FEH,FEH,FEH,FEH,FEH,FEH,FEH,FEH,FEH,FEH,FEH,FEH 10370 00000011 121 VFDB 5:FEH 10372 00000012 122 VFDB 5:FER,FER,FER,FER,FER,FER,FER,FER,FER,FER,FER,FER,FER,FER 10372 00000012 123 VFDB 5:FER 10374 00000012 124 VFDB 5:FER,FER,FER,FER,FER,FER,FER,FER,FER,FER,FER,FER,FER,FER 10375 00000012 125 VFDB 5:FER 126 10377 0149031F 127 FITIPT PTR FITABI pointer to initial table 10378 01490335 128 FITNPT PTR FITABN pointer to number table 10379 0149034B 129 FITAPT PTR FITABA pointer to alpha table 1037A 01490361 130 FITHPT PTR FITABH pointer to hex table 131 1037B 000103B6 132 FITABJ ADR FIPN process numbers 1037C 000103C3 133 ADR FIPA process alpha 1037D 000103B7 134 ADR FICN continue numbers 1037E 000103C4 135 ADR FICA continue alpha 1037F 000103B0 136 ADR FISK skip character 10380 000103E4 137 ADR FICR end-of-line return 10381 000103E6 138 ADR FIDL delimiter return 10382 000103E9 139 ADR FICC control char return 10383 000103C1 140 ADR FIEN exit from number packer 10384 000103CC 141 ADR FIEA exit from alpha packer 10385 000103EB 142 ADR FIPO process operator < or > 10386 000103D4 143 ADR FIPS pack string (have quotes) 10387 000103F6 144 ADR FIFC process dot (in E mode only) 10388 000103FB 145 ADR FIFE exit from dot processing 10389 00010403 146 ADR FIPH process hex numbers 1038A 00010406 147 ADR FIHN continue hex (numeric char) 1038B 00010408 148 ADR FIHA continue hex (alpha char) 1038C 00010413 149 ADR FIHE exit from hex packing 1038D 0001041E 150 ADR FIER error 1038E 00010421 151 ADR FIFP process file parameter str with filename 1038F 00010420 152 ADR FIIP process file parameter string alone 1 Assembler C9208 Control Mode C9304 14-Jun-93 17:33 PAGE 51 (CMISUB) F 9 Input Subroutines 154 155 ********************************************************************************** 156 * * 157 * This is the FETCHITM routine. It scans the input * 158 * buffer and returns symbols or numbers or possibly a line * 159 * terminator (EOL or question mark). On return, R0 = * 160 * terminating character. * 161 * * 162 * R1 = terminating character type * 163 * R2 = item type * 164 * SBUFF = item returned, if symbol * 165 * VALUE = item returned, if number * 166 * * 167 * FETCHITM calls GETCHAR and between the two of them, R0, * 168 * R1, and R2 are clobbered. R3 and R4 are saved and restored * 169 * on exit, and R5 and R6 are untouched. * 170 * * 171 ********************************************************************************** 172 173 BEGFRAME 173 NOLIST CREF 173 NOSYMS 00010390 173 ZZ!FRAME BASE SP 173 SYMS 173 BSS 1 173 LIST CREF 00174801 5 BASE 174 FITMP BSS2 1 temp for R3 and R4 175 ENDFRAME 175 NOLIST CREF 175 DRCT 00000003 ABS 175 ZZ!LEN EQU DISPW ZZ!FRAME 001F4003 5 STAK 175 PUSH EQU STAK SP,ZZ!LEN 001F4003 5 STAK 175 POP EQU PUSH 175 ORG ZZ!FRAME 175 LIST CREF 176 10390 DD5F4003 5 STAK 177 FETCHITM ENTRNP PUSH entry for 'normal' fetches 10391 60040000 0 IMM 178 LD R0 0 10392 FE0F03AA 179 JMP FI00 180 * --- 181 10393 DD5F4003 5 STAK 182 FETCHITMF ENTRNP PUSH entry for file/acct names 10394 60040001 0 IMM 183 LD R0 1 10395 FE0F03AA 184 JMP FI00 185 * --- 186 10396 DD5F4003 5 STAK 187 FETCHITMC ENTRNP PUSH entry for CM commands 10397 60040002 0 IMM 188 LD R0 2 10398 FE0F03AA 189 JMP FI00 190 * --- 191 10399 DD5F4003 5 STAK 192 FETCHITMI ENTRNP PUSH entry for individual items 1039A 60040003 0 IMM 193 LD R0 3 1039B FE0F03AA 194 JMP FI00 195 * --- 196 1 Assembler C9208 Control Mode C9304 14-Jun-93 17:33 PAGE 52 (CMISUB) F 9 Input Subroutines 1039C DD5F4003 5 STAK 197 FETCHITMO ENTRNP PUSH entry when expecting operator 1039D 60040004 0 IMM 198 LD R0 4 1039E FE0F03AA 199 JMP FI00 200 * --- 201 1039F DD5F4003 5 STAK 202 FETCHITME ENTRNP PUSH entry when expecting extension 103A0 60040005 0 IMM 203 LD R0 5 103A1 FE0F03AA 204 JMP FI00 205 * --- 206 103A2 DD5F4003 5 STAK 207 FETCHITMP ENTRNP PUSH entry when file name with parameter str 103A3 60040006 0 IMM 208 LD R0 6 103A4 FE0F03AA 209 JMP FI00 210 * --- 211 103A5 DD5F4003 5 STAK 212 FETCHITMW ENTRNP PUSH entry when file name with wildcard 103A6 60040007 0 IMM 213 LD R0 7 103A7 FE0F03AA 214 JMP FI00 215 * --- 216 103A8 DD5F4003 5 STAK 217 FETCHITMEW ENTRNP PUSH entry when extension with wildcard 103A9 60040008 0 IMM 218 LD R0 8 219 * \ / 000103AA 220 FI00 LABEL 103AA E6D74801 345 BASE 221 ST2 R3 SP,FITMP save R3 and R4 103AB 61120000 4 0 REG 222 LD R4 R0 transfer entry type code 103AC 1D04000F 4 IMM 223 MUL R4 NFITYPES adjust case index 103AD 608400D5 2 IMM 224 LD R2 ADR(SBUFFW) point to the symbol buffer 103AE 60440100 1 IMM 225 LD R1 SBUFL get length 103AF FE580020 226 CFILL BLANK and clear it out 227 * \ / 000103B0 228 FISK LABEL 103B0 60000116 0 229 LD R0 BUFPT get current pointer 103B1 E4000115 0 230 ST R0 LBUFPT save in case we get goodies 103B2 DC41044B 231 CALLNP GETCHAR get a character 103B3 389D0800 2 41 BASE 232 LEA R2 R4,0(R1) make index (R2 := R4 + R1) 103B4 60B50377 2 2 @ 233 LD R2 @FITIPT(R2) get processing type 103B5 5CA5037B 2 234 LDPC FITABJ(R2) go do what we must 235 * --- 236 000103B6 237 FIPN LABEL number processing 103B6 60C40000 3 IMM 238 LD R3 0 number to build 239 * \ / 000103B7 240 FICN LABEL 103B7 10040030 0 IMM 241 SUB R0 NUMBIAS take off ASCII clothes 103B8 58840008 IMM 242 CLBPSR OFLOWBIT clear overflow bit 103B9 1CC4000A 3 IMM 243 MUL R3 10 103BA 18D20000 3 0 REG 244 ADD R3 R0 make new number 103BB FE17041E 245 JOS FIER jump if too big 103BC E4C0011C 3 246 ST R3 VALUE save in case of end 103BD DC41044B 247 CALLNP GETCHAR get next character 103BE 389D0800 2 41 BASE 248 LEA R2 R4,0(R1) make index (R2 := R4 + R1) 103BF 60B50378 2 2 @ 249 LD R2 @FITNPT(R2) get type of action 103C0 5CA5037B 2 250 LDPC FITABJ(R2) so go do it 251 * --- 252 1 Assembler C9208 Control Mode C9304 14-Jun-93 17:33 PAGE 53 (CMISUB) F 9 Input Subroutines 000103C1 253 FIEN LABEL exit from number packer 103C1 60840001 2 IMM 254 LD R2 1*TNUM get type code to return 103C2 FE0F03CE 255 JMP FIZOOM and go exit 256 * --- 257 000103C3 258 FIPA LABEL process alpha 103C3 60C40000 3 IMM 259 LD R3 0 buffer pointer 260 * \ / 000103C4 261 FICA LABEL (no, its not Social Security) 103C4 64C400FF 3 IMM 262 CPR R3 SBUFL-1 see if enough 103C5 FE0703C8 263 JGE FIA10 jump if full (I wouldn't try) 103C6 E4370009 0 3 @ 264 ST R0 @SBPT(R3) add to former string 103C7 18C40001 3 IMM 265 ADD R3 1 advance pointer 266 * \ / 000103C8 267 FIA10 LABEL 103C8 DC41044B 268 CALLNP GETCHAR get next character 103C9 389D0800 2 41 BASE 269 LEA R2 R4,0(R1) make index (R2 := R4 + R1) 103CA 60B50379 2 2 @ 270 LD R2 @FITAPT(R2) get processing type 103CB 5CA5037B 2 271 LDPC FITABJ(R2) and off we go.... 272 * --- 273 000103CC 274 FIEA LABEL exit from alpha packer 103CC 60840002 2 IMM 275 LD R2 1*TALPH get type code to return 103CD E4C0011D 3 276 ST R3 ALPHALEN save length of symbol 277 * \ / 000103CE 278 FIZOOM LABEL 103CE 60C00116 3 279 LD R3 BUFPT get current buff pointer 280 * \ / 000103CF 281 FIZZ LABEL 103CF 64040020 0 IMM 282 CPR R0 BLANK is terminator a blank? 103D0 FE0D0418 283 JNE FIEXB if not then go exit 103D1 DC41045E 284 CALLNP GETCHARX else scan to next non-blank 103D2 7C844000 2 IMM 285 IOR R2 1*TBLANK indicate that blanks have been skipped 103D3 FE0F03CF 286 JMP FIZZ until we have something solid 287 * --- 288 000103D4 289 FIPS LABEL (string packer) 103D4 EC12C000 3 REG 290 STZ R3 clear buffer pointer 291 * \ / 000103D5 292 FICS LABEL 103D5 DC41045E 293 CALLNP GETCHARX pick up a character 103D6 64040022 0 IMM 294 CPR R0 QUOTES is it a double-quote? 103D7 FE0D03DE 295 JNE FIS20 jump if not 103D8 DC41045E 296 CALLNP GETCHARX it is - better check next 103D9 64040022 0 IMM 297 CPR R0 QUOTES maybe user really wanted one 103DA FE0303E0 298 JEQ FIS30 if so, go pack it in 103DB E4C0011C 3 299 ST R3 VALUE else we are done here 103DC 60840040 2 IMM 300 LD R2 1*TSTR say we have a string 103DD FE0F03CE 301 JMP FIZOOM and proceed through exit 302 * --- 303 000103DE 304 FIS20 LABEL 103DE 6404000D 0 IMM 305 CPR R0 CR did we reach the end? 103DF FE03041E 306 JEQ FIER if so then user blew it!! 307 * \ / 000103E0 308 FIS30 LABEL 1 Assembler C9208 Control Mode C9304 14-Jun-93 17:33 PAGE 54 (CMISUB) F 9 Input Subroutines 103E0 64C400FF 3 IMM 309 CPR R3 OKLEN-1 do we have a full load? 103E1 FE0703D5 310 JGE FICS if so then don't pack this one 103E2 E4370009 0 3 @ 311 ST R0 @SBPT(R3) otherwise add it in 103E3 FAE103D5 3 312 IRJ R3 FICS then go 'round again 313 * --- 314 000103E4 315 FICR LABEL return end-of-line 103E4 60840008 2 IMM 316 LD R2 1*TEOL 103E5 FE0F041A 317 JMP FIEXIT that's that 318 * --- 319 000103E6 320 FIDL LABEL return delimiter 103E6 60840004 2 IMM 321 LD R2 1*TDELM 103E7 E40000D5 0 322 ST R0 SBUFFW remember what it was 103E8 FE0F041A 323 JMP FIEXIT 324 * --- 325 000103E9 326 FICC LABEL return control character 103E9 60840010 2 IMM 327 LD R2 1*TCNTL 103EA FE0F041A 328 JMP FIEXIT 329 * --- 330 000103EB 331 FIPO LABEL process 'operator' 103EB 60840004 2 IMM 332 LD R2 1*TDELM say we have delimiter 103EC E40000D5 0 333 ST R0 SBUFFW save the character 103ED DC41045E 334 CALLNP GETCHARX get the next one 103EE 6404003D 0 IMM 335 CPR R0 EQUAL is it an equal sign? 103EF FE0303F2 336 JEQ FICO if so, we know what to do 103F0 64440009 1 IMM 337 CPR R1 COP is it another operator? 103F1 FE0D0417 338 JNE FIEX if not then return 339 * \ / 000103F2 340 FICO LABEL 103F2 60440100 1 IMM 341 LD R1 0100 prepare to shift the former char 103F3 9C4000D5 1 342 MULM R1 SBUFFW there it goes! 103F4 B80000D5 0 343 ADDB R0 SBUFFW add in the second one 103F5 FE0F041A 344 JMP FIEXIT and go home 345 * --- 346 000103F6 347 FIFC LABEL process dot in E mode 103F6 E4110009 0 @ 348 ST R0 @SBPT save the character 103F7 DC41044B 349 CALLNP GETCHAR get next character 103F8 389D0800 2 41 BASE 350 LEA R2 R4,0(R1) make index (R2 := R4 + R1) 103F9 60B50378 2 2 @ 351 LD R2 @FITNPT(R2) get type of action 103FA 5CA5037B 2 352 LDPC FITABJ(R2) so go do it 353 * --- 354 000103FB 355 FIFE LABEL exit from dot processing 103FB 60840080 2 IMM 356 LD R2 1*TFILC say we have a dot 103FC 60C00116 3 357 LD R3 BUFPT current buffer pointer 103FD 6116C000 4 3 CACH 358 LD R4 CACH R3,0 get the character after the dot 103FE 613900E8 4 4 @ 359 LD R4 @CODES(R4) get the type 103FF 65040004 4 IMM 360 CPR R4 CCM is it a legal file character 10400 FE0503CF 361 JGT FIZZ jump if not file characterr 10401 7C850000 2 IMM 362 IOR R2 1*TFCS indicate file character after dot 10402 FE0F03CF 363 JMP FIZZ and go exit 364 * --- 1 Assembler C9208 Control Mode C9304 14-Jun-93 17:33 PAGE 55 (CMISUB) F 9 Input Subroutines 365 00010403 366 FIPH LABEL number processing 10403 EDDF4001 5 STAK 367 STW STAK SP,1 indicate that no digits processed 10404 EC12C000 3 REG 368 STZ R3 clear value 10405 FE0F040E 369 JMP FIH20 jump to get next digit 370 * --- 371 00010406 372 FIHN LABEL 10406 10040030 0 IMM 373 SUB R0 NUMBIAS take off ASCII clothes 10407 FE0F0409 374 JMP FIH10 jump to common hex processing 375 * --- 376 00010408 377 FIHA LABEL 10408 10040037 0 IMM 378 SUB R0 HEXBIAS change from ASCII to hex 379 * \ / 00010409 380 FIH10 LABEL 10409 EC174400 5 @R 381 STZ @SP clear no digits indicator 1040A 5C0AC040 3 CBM 382 CMZ R3/BITS 0:3 check if room left 1040B FE0D041D 383 JNE FI89 error if no room 1040C 60CAC800 3 3 CBM 384 LD R3 R3/BITS 4:3 multiply R3 by 16 with no overflow 1040D 18D20000 3 0 REG 385 ADD R3 R0 make new number 386 * \ / 0001040E 387 FIH20 LABEL 1040E E4C0011C 3 388 ST R3 VALUE save in case of end 1040F DC41044B 389 CALLNP GETCHAR get next character 10410 389D0800 2 41 BASE 390 LEA R2 R4,0(R1) make index (R2 := R4 + R1) 10411 60B5037A 2 2 @ 391 LD R2 @FITHPT(R2) get type of action 10412 5CA5037B 2 392 LDPC FITABJ(R2) so go do it 393 * --- 394 00010413 395 FIHE LABEL exit from hex packer 10413 5C1F4001 5 STAK 396 CMZ STAK SP,1 check if any digits read 10414 FE0D041E 397 JNE FIER error if no digits 10415 60848001 2 IMM 398 LD R2 1*TNUM+1*THEX set number and hex bits for return 10416 FE0F03CE 399 JMP FIZOOM 400 * --- 401 00010417 402 FIEX LABEL return whatever we were doing 10417 60C00116 3 403 LD R3 BUFPT 404 * \ / 00010418 405 FIEXB LABEL 10418 D04ADF30 3 CBM 406 DEC R3/NXTCHAR back up so we see again 10419 E4C00116 3 407 ST R3 BUFPT 408 * \ / 0001041A 409 FIEXIT LABEL 1041A E4000011 0 410 ST R0 TCSAVE remember the terminator 1041B 62D74801 345 BASE 411 LD2 R3 SP,FITMP restore caller's R3 and R4 1041C 5D1F4003 5 STAK 412 LEAVE POP 413 * --- 414 0001041D 415 FI89 LABEL 1041D 19440001 5 IMM 416 ADD SP 1 restore stack pointer 417 * \ / 0001041E 418 FIER LABEL illegal character 1041E 60840000 2 IMM 419 LD R2 1*TERR give a nothing response 1041F FE0F041A 420 JMP FIEXIT 1 Assembler C9208 Control Mode C9304 14-Jun-93 17:33 PAGE 56 (CMISUB) F 9 Input Subroutines 421 * --- 422 00010420 423 FIIP LABEL (lone file parameter string) 10420 EC12C000 3 REG 424 STZ R3 clear buffer pointer 425 * \ / 00010421 426 FIFP LABEL (file parameter string on filename) 10421 EC130000 4 REG 427 STZ R4 clear level number 10422 6404003E 0 IMM 428 CPR R0 GREATER check if end, not start 10423 FE03041E 429 JEQ FIER if so, it's an error 00010424 430 FIF10 LABEL 10424 D0130000 4 REG 431 INC R4 increment level number 432 * \ / 00010425 433 FIF20 LABEL 10425 64C400FF 3 IMM 434 CPR R3 OKLEN-1 is buffer full 10426 FE07041E 435 JGE FIER if so, give back an error 10427 E4370009 0 3 @ 436 ST R0 @SBPT(R3) store away the character 10428 D012C000 3 REG 437 INC R3 move character pointer 10429 DC41045E 438 CALLNP GETCHARX pick up another character 1042A FB0303CC 4 439 JEQZ R4 FIEA jump if at level zero 1042B 6404000D 0 IMM 440 CPR R0 CR check if end-of-line 1042C FE03041E 441 JEQ FIER if so, it's all over 1042D 64040022 0 IMM 442 CPR R0 QUOTES check for quotes 1042E FE030435 443 JEQ FIF30 process quoted string 1042F 64440009 1 IMM 444 CPR R1 COP is it "<" or ">" 10430 FE0D0425 445 JNE FIF20 if not, just store it away 10431 6404003C 0 IMM 446 CPR R0 LESS is it another start 10432 FE030424 447 JEQ FIF10 down another level 10433 D0530000 4 REG 448 DEC R4 up one level 10434 FE0F0425 449 JMP FIF20 go store the character 450 * --- 451 00010435 452 FIF30 LABEL 10435 64C400FF 3 IMM 453 CPR R3 OKLEN-1 is buffer full 10436 FE07041E 454 JGE FIER if so, give back an error 10437 E4370009 0 3 @ 455 ST R0 @SBPT(R3) store away the character 10438 D012C000 3 REG 456 INC R3 move character pointer 10439 DC41045E 457 CALLNP GETCHARX pick up another character 1043A 6404000D 0 IMM 458 CPR R0 CR check if end-of-line 1043B FE03041E 459 JEQ FIER if so, it's all over 1043C 64040022 0 IMM 460 CPR R0 QUOTES check for quotes 1043D FE030425 461 JEQ FIF20 back to normal processing 1043E FE0F0435 462 JMP FIF30 just add the character on 463 * --- 464 465 END FETCHITM routines 1 Assembler C9208 Control Mode C9304 14-Jun-93 17:33 PAGE 57 (CMISUB) F 9 Input Subroutines 467 468 ********************************************************************************** 469 * * 470 * This routine tests whether the character at the current * 471 * position is equal to the expected character. If so, the * 472 * pointer is advanced and the skip return is taken, otherwise * 473 * no action. * 474 * * 475 ********************************************************************************** 476 477 BLOCK 478 ENTRY TESTCHAR 479 480 BEGFRAME 480 NOLIST CREF 480 NOSYMS 0001043F 480 ZZ!FRAME BASE SP 480 SYMS 480 BSS 1 480 LIST CREF 481 ENDFRAME 481 NOLIST CREF 481 DRCT 00000001 ABS 481 ZZ!LEN EQU DISPW ZZ!FRAME 001F4001 5 STAK 481 PUSH EQU STAK SP,ZZ!LEN 001F4001 5 STAK 481 POP EQU PUSH 481 ORG ZZ!FRAME 481 LIST CREF 482 1043F DD1F4001 5 STAK 483 TESTCHAR ENTR PUSH 10440 C0520000 0 REG 484 STPVL R0 485 * \ / 10441 5C000119 486 CMZ ATEOL have we seen end of line? 10442 FE0D044A 487 JNE NOTTHERE 10443 60400116 1 488 LD R1 BUFPT get buffer pointer 10444 60964000 2 1 CACH 489 LD R2 CACH R1,0 get current character 10445 64920000 2 0 REG 490 CPR R2 R0 is it what it should be? 10446 FE0D044A 491 JNE NOTTHERE nope 10447 D00A5F30 1 CBM 492 INC R1/NXTCHAR advance past 10448 E4400116 1 493 ST R1 BUFPT 10449 19C40001 7 IMM 494 ADD R7 1 indicate success 495 * \ / 0001044A 496 NOTTHERE LABEL 1044A 5D1F4001 5 STAK 497 LEAVE POP 498 * --- 499 500 END 1 Assembler C9208 Control Mode C9304 14-Jun-93 17:33 PAGE 58 (CMISUB) F 9 Input Subroutines 502 503 ********************************************************************************** 504 * * 505 * This is the GETCHAR routine. It picks up one character * 506 * from the input buffer, converts from lower to upper case if * 507 * necessary, and also picks up the character type from the * 508 * decode table. * 509 * Alternate entry, GETCHARX, is used for the input line * 510 * pre- processor. It's just a simpler version. * 511 * * 512 * On return, R0 = character (7 bit) * 513 * R1 = character type * 514 * * 515 ********************************************************************************** 516 517 BLOCK GETCHAR/GETCHARX routines 518 ENTRY GETCHAR 519 ENTRY GETCHARX 520 521 BEGFRAME 521 NOLIST CREF 521 NOSYMS 0001044B 521 ZZ!FRAME BASE SP 521 SYMS 521 BSS 1 521 LIST CREF 522 ENDFRAME 522 NOLIST CREF 522 DRCT 00000001 ABS 522 ZZ!LEN EQU DISPW ZZ!FRAME 001F4001 5 STAK 522 PUSH EQU STAK SP,ZZ!LEN 001F4001 5 STAK 522 POP EQU PUSH 522 ORG ZZ!FRAME 522 LIST CREF 523 1044B DD5F4001 5 STAK 524 GETCHAR ENTRNP PUSH character fetch routine 1044C 5C000119 525 CMZ ATEOL have we seen end-of-line already? 1044D FE030450 526 JEQ GC10 1044E 6004000D 0 IMM 527 LD R0 CR yes, return it again 1044F FE0F045C 528 JMP GC30 529 * --- 530 00010450 531 GC10 LABEL 10450 60400116 1 532 LD R1 BUFPT get pointer to input buffer 10451 60164000 0 1 CACH 533 LD R0 BPT get a character 10452 7804007F 0 IMM 534 AND R0 GASMASK chop off parity garbage 10453 6404000D 0 IMM 535 CPR R0 CR at end of line? 10454 EC400119 536 STLEQ ATEOL remember for posterity 10455 D00A5F30 1 CBM 537 INC R1/NXTCHAR advance to next character in buf 10456 E4400116 1 538 ST R1 BUFPT remember for later 10457 64040061 0 IMM 539 CPR R0 LOWCASE check for lower case 10458 FE09045C 540 JLT GC30 jump if not 10459 6404007A 0 IMM 541 CPR R0 LOWTOP be sure its in range 1045A FE05045C 542 JGT GC30 jump if not lower case 1045B 10040020 0 IMM 543 SUB R0 LOWBIAS convert to upper case 544 * \ / 1 Assembler C9208 Control Mode C9304 14-Jun-93 17:33 PAGE 59 (CMISUB) F 9 Input Subroutines 0001045C 545 GC30 LABEL 1045C 607100E8 1 0 @ 546 LD R1 @CODES(R0) get character group type 1045D 5D1F4001 5 STAK 547 LEAVE POP return 548 * --- 549 1045E DD5F4001 5 STAK 550 GETCHARX ENTRNP PUSH alternate entry for pre-proc 1045F 60400116 1 551 LD R1 BUFPT get buffer pointer 10460 60164000 0 1 CACH 552 LD R0 BPT get next input character 10461 7804007F 0 IMM 553 AND R0 GASMASK chop off parity junk 10462 D00A5F30 1 CBM 554 INC R1/NXTCHAR advance to next character 10463 E4400116 1 555 ST R1 BUFPT save position 10464 FE0F045C 556 JMP GC30 go get type and exit 557 * --- 558 559 END GETCHAR/GETCHARX routines 1 Assembler C9208 Control Mode C9304 14-Jun-93 17:33 PAGE 60 (CMISUB) F 9 Input Subroutines 561 562 ********************************************************************************** 563 * * 564 * This is the FINDSPACE routine. It is called when an * 565 * error has been detected in the middle of a parameter and a * 566 * routine wants to continue with the next one (e. g., 'open 10 * 567 * a/lj/nowait 20 b/rw') It advances the input pointer until it * 568 * finds a space, a comma, or the end of the line (carriage * 569 * return). * 570 * * 571 ********************************************************************************** 572 573 BLOCK 574 ENTRY FINDSPACE 575 576 BEGFRAME 576 NOLIST CREF 576 NOSYMS 00010465 576 ZZ!FRAME BASE SP 576 SYMS 576 BSS 1 576 LIST CREF 577 ENDFRAME 577 NOLIST CREF 577 DRCT 00000001 ABS 577 ZZ!LEN EQU DISPW ZZ!FRAME 001F4001 5 STAK 577 PUSH EQU STAK SP,ZZ!LEN 001F4001 5 STAK 577 POP EQU PUSH 577 ORG ZZ!FRAME 577 LIST CREF 578 10465 DD5F4001 5 STAK 579 FINDSPACE ENTRNP PUSH 10466 60000116 0 580 LD R0 BUFPT load string pointer 10467 3841046F 1 581 LEA R1 STOPCHARS point to scan table 10468 60840100 2 IMM 582 LD R2 MAXLEN max length to look 10469 DA145000 0 12 583 SCAN R0 R1 R2 this sure better find one 1046A E4000116 0 584 ST R0 BUFPT leave BUFPT pointing to the space 1046B 60160000 0 0 CACH 585 LD R0 CACH R0,0 get character we stopped on 1046C 6404000D 0 IMM 586 CPR R0 CR is it the end of the line? 1046D EC400119 587 STLEQ ATEOL remember if so 1046E 5D1F4001 5 STAK 588 LEAVE POP 589 * --- 590 10472 00000000 591 STOPCHARS VFD 000040000,080080000,000000000,000000000 10476 00000000 592 VFD 000040000,080080000,000000000,000000000 593 594 END 1 Assembler C9208 Control Mode C9304 14-Jun-93 17:33 PAGE 61 (CMISUB) F 9 Input Subroutines 596 597 ********************************************************************************** 598 * * 599 * This is the PACKER routine. It is called when the * 600 * previous symbol (as picked up by FETCHITM) is desired in * 601 * PAK-40 format. SBUFF should contain the input string * 602 * containing the symbol to be packed. On exit, R0 and R1 will * 603 * contain the packed symbol. * 604 * * 605 ********************************************************************************** 606 607 BLOCK PACKER routine 608 ENTRY PACKER 609 610 BEGFRAME 610 NOLIST CREF 610 NOSYMS 00010477 610 ZZ!FRAME BASE SP 610 SYMS 610 BSS 1 610 LIST CREF 00174801 5 BASE 611 PKTMP BSS2 1 temp area for R2 and R3 612 ENDFRAME 612 NOLIST CREF 612 DRCT 00000003 ABS 612 ZZ!LEN EQU DISPW ZZ!FRAME 001F4003 5 STAK 612 PUSH EQU STAK SP,ZZ!LEN 001F4003 5 STAK 612 POP EQU PUSH 612 ORG ZZ!FRAME 612 LIST CREF 613 10477 DD5F4003 5 STAK 614 PACKER ENTRNP PUSH 10478 E6974801 235 BASE 615 ST2 R2 SP,PKTMP save R2 and R3 from harm 10479 EE140000 01 PAIR 616 STZ2 PAIR R0 zero the PAK12 buffer 1047A 60C7FFF4 3 IMM 617 LD R3 -12 this thing has 12 characters 618 * \ / 0001047B 619 PKR10 LABEL 1047B 60B7000C 2 3 @ 620 LD R2 @SBPKPT(R3) get next character 1047C 60B500F9 2 2 @ 621 LD R2 @PAKCODE(R2) get radpack code 1047D 64C7FFFA 3 IMM 622 CPR R3 -6 which word gets it? 1047E FE070482 623 JGE PKR20 jump if second half 1047F 1C040028 0 IMM 624 MUL R0 40 shift the value 10480 18128000 0 2 REG 625 ADD R0 R2 add in next digit 10481 FE0F0484 626 JMP PKR40 then do another 627 * --- 628 00010482 629 PKR20 LABEL 10482 1C440028 1 IMM 630 MUL R1 40 shift current value 10483 18528000 1 2 REG 631 ADD R1 R2 add in new digit 632 * \ / 00010484 633 PKR40 LABEL 10484 FAE1047B 3 634 IRJ R3 PKR10 recycle until complete 10485 62974801 235 BASE 635 LD2 R2 SP,PKTMP restore original R2,R3 10486 5D1F4003 5 STAK 636 LEAVE POP return to caller 637 * --- 638 1 Assembler C9208 Control Mode C9304 14-Jun-93 17:33 PAGE 62 (CMISUB) F 9 Input Subroutines 639 END PACKER routine 1 Assembler C9208 Control Mode C9304 14-Jun-93 17:33 PAGE 63 (CMISUB) F 9 Input Subroutines 641 642 ********************************************************************************** 643 * * 644 * DEBLOCK is used to return a command string from the * 645 * actual terminal input buffer, which may hold more than one. * 646 * The command, if there is one, is copied to BUFFER. If there * 647 * was no command string pending, a skip return is taken. On * 648 * entry, R0 points to an input buffer control block. * 649 * * 650 ********************************************************************************** 651 652 BLOCK 653 ENTRY DEBLOCK 654 655 BEGFRAME 655 NOLIST CREF 655 NOSYMS 00010487 655 ZZ!FRAME BASE SP 655 SYMS 655 BSS 1 655 LIST CREF 00174801 5 BASE 656 BUFF BSS 1 Holds the IBCB pointer 00174802 5 BASE 657 ENDPTR BSS 1 Copy of the buffer end pointer 658 ENDFRAME 658 NOLIST CREF 658 DRCT 00000003 ABS 658 ZZ!LEN EQU DISPW ZZ!FRAME 001F4003 5 STAK 658 PUSH EQU STAK SP,ZZ!LEN 001F4003 5 STAK 658 POP EQU PUSH 658 ORG ZZ!FRAME 658 LIST CREF 659 10487 DD5F4003 5 STAK 660 DEBLOCK ENTRNP PUSH 10488 E4174801 0 5 BASE 661 ST R0 SP,BUFF 10489 60560800 1 0 BASE 662 LD R1 R0,IBPTR get current buffer position 1048A 64560801 1 0 BASE 663 CPR R1 R0,IBENDPTR at the end? 1048B FE0D048D 664 JNE DEB10 no, pick out a command line 1048C FBE104AA 7 665 IRJ R7 DONE indicate a read is necessary 666 * --- 667 0001048D 668 DEB10 LABEL 1048D 60960801 2 0 BASE 669 LD R2 R0,IBENDPTR get pointer to end of input line buffer 1048E E4974802 2 5 BASE 670 ST R2 SP,ENDPTR and save for easy access 1048F 38800095 2 671 LEA R2 BUFFW point to the command line buffer 10490 38968000 2 2 CACH 672 LEA R2 CACH R2,0 make it a character pointer 10491 EC12C000 3 REG 673 STZ R3 initialize length 674 * \ / 00010492 675 DEB20 LABEL 10492 64574802 1 5 BASE 676 CPR R1 SP,ENDPTR at end of line? 10493 FE0304A2 677 JEQ HITEND 10494 60164400 0 1 @R 678 LD R0 @R1 get next character 10495 6404003B 0 IMM 679 CPR R0 SEMICOLON is it a semicolon? 10496 FE0304A1 680 JEQ GOTSEMI yes, end of command string 10497 6404005C 0 IMM 681 CPR R0 "\" an escape? 10498 FE0D049D 682 JNE DEB30 no, treat normally 10499 D0924000 1 REG 683 INCP R1 advance pointer one character 1 Assembler C9208 Control Mode C9304 14-Jun-93 17:33 PAGE 64 (CMISUB) F 9 Input Subroutines 1049A 64574802 1 5 BASE 684 CPR R1 SP,ENDPTR was escape at line's end? 1049B FE0304A2 685 JEQ HITEND yes, ignore it 1049C 60164400 0 1 @R 686 LD R0 @R1 and get that char 687 * \ / 0001049D 688 DEB30 LABEL 1049D E4168400 0 2 @R 689 ST R0 @R2 copy the character 1049E D0928000 2 REG 690 INCP R2 advance output pointer 1049F D0924000 1 REG 691 INCP R1 advance input pointer 104A0 FAE10492 3 692 IRJ R3 DEB20 increase length and continue 693 * --- 694 000104A1 695 GOTSEMI LABEL 104A1 D0924000 1 REG 696 INCP R1 skip past the semicolon 697 * \ / 000104A2 698 HITEND LABEL 104A2 60174801 0 5 BASE 699 LD R0 SP,BUFF get IBCB pointer 104A3 E4560800 1 0 BASE 700 ST R1 R0,IBPTR update buffer position 104A4 70D2C000 3 3 REG 701 LDN R3 R3 prepare for backward search 104A5 DA9E1820 2 3 702 SRCHNI R2 R3 SPACE find last non-space in line 104A6 70D2C000 3 3 REG 703 LDN R3 R3 get the new length of the string 104A7 E4C0011A 3 704 ST R3 LEN set where the world can see it 104A8 6004000D 0 IMM 705 LD R0 CR get a carriage return 104A9 E4168400 0 2 @R 706 ST R0 @R2 add it at the end of the line 707 * \ / 000104AA 708 DONE LABEL 104AA 6052C000 1 3 REG 709 LD R1 R3 get length in right register 104AB EC120000 0 REG 710 STZ R0 indicate "no read error" 104AC 5D1F4003 5 STAK 711 LEAVE POP 712 * --- 713 714 END 1 Assembler C9208 Control Mode C9304 14-Jun-93 17:33 PAGE 65 (CMISUB) F 9 Input Subroutines 716 717 ********************************************************************************** 718 * * 719 * READER is actually the input routine for Control Mode. * 720 * It simply inputs one record from READLUN into BUFFER, and * 721 * returns to the caller. It is used by READLINE to input CM * 722 * commands, and also by the IF and SKIP routines to advance * 723 * within a job deck. Returns data in BUFFER. * 724 * * 725 * Note that Control Mode ABNORMAL status is only reset * 726 * when a terminal user is given a prompt. This means that if * 727 * he enters a line with more than one command, ABNORMAL can * 728 * persist through the commands following the one that * 729 * encountered a problem, meaning in most cases that the other * 730 * commands on the line will not be executed. * 731 * * 732 ********************************************************************************** 733 734 BLOCK READER routine 735 ENTRY READER 736 737 BEGFRAME 737 NOLIST CREF 737 NOSYMS 000104AD 737 ZZ!FRAME BASE SP 737 SYMS 737 BSS 1 737 LIST CREF 00174801 5 BASE 738 RDR3SV BSS 1 preserve R3 00174802 5 BASE 739 RDBRK BSS 1 temp for Break OK flag 00174803 5 BASE 740 RDR0SV BSS 1 temp for saving R0 00174804 5 BASE 741 RDPTR BSS 1 temp for pointer save 00174805 5 BASE 742 RDPOSSV BSS 1 temp to save position after last read 00174806 5 BASE 743 RDBUFF BSS 1 points to input buffer control block 00174807 5 BASE 744 RDCHARS BSS 1 points to text area in IBCB 745 ENDFRAME 745 NOLIST CREF 745 DRCT 00000008 ABS 745 ZZ!LEN EQU DISPW ZZ!FRAME 001F4008 5 STAK 745 PUSH EQU STAK SP,ZZ!LEN 001F4008 5 STAK 745 POP EQU PUSH 745 ORG ZZ!FRAME 745 LIST CREF 746 104AD DD5F4008 5 STAK 747 READER ENTRNP PUSH routine to input one line 104AE EC000119 748 STZ ATEOL 104AF E4174806 0 5 BASE 749 ST R0 SP,RDBUFF 104B0 E4D74801 3 5 BASE 750 ST R3 SP,RDR3SV 104B1 38560008 1 0 CACH 751 LEA R1 R0,IBCHARS 104B2 E4574807 1 5 BASE 752 ST R1 SP,RDCHARS 753 * \ / 000104B3 754 RDENTRY LABEL 104B3 EC000008 755 STZ LINECNT reset our output line count 104B4 EC174805 5 BASE 756 STZ SP,RDPOSSV clear previous position 104B5 EC00011A 757 STZ LEN set length to zero 104B6 DC410487 758 CALLNP DEBLOCK see if a command is pending 1 Assembler C9208 Control Mode C9304 14-Jun-93 17:33 PAGE 66 (CMISUB) F 9 Input Subroutines 104B7 FE0F0534 759 JMP RD105 we have a command string 760 * \ / 104B8 F38504C2 6 761 JBF ST/TIN RD20 don't change breaks if bat/do 104B9 D1CBA210 6 CBM 762 SETT ST/INOK get break flag, allow breaks 104BA EC574802 5 BASE 763 STLEQ SP,RDBRK remember the previous flag 104BB F7A51522 6 764 JBT ST/INRQ MCBRK process break if already received 104BC F797190C 6 765 JBT ST/INTM VANISHMSG process logon timeout if already occurred 766 * \ / 000104BD 767 RD10 LABEL 104BD EC0B8810 6 CBM 768 STZ ST/ABRT clear abort if terminal input 104BE 60040041 0 IMM 769 LD R0 FRWRITETF give the user a kick in the pants 104BF 60440002 1 IMM 770 LD R1 PROMPTLEN 104C0 60850015 2 IMM 771 LD R2 ADR(PROMPT) ">" 104C1 088400CA IMM 772 FREQ LUNAOUT+XREQ hello out there!! 773 * \ / 000104C2 774 RD20 LABEL 104C2 604400FF 1 IMM 775 LD R1 MAXLEN-1 get maximum buffer size 104C3 60174806 0 5 BASE 776 LD R0 SP,RDBUFF get pointer to IBCB 104C4 38960008 2 0 CACH 777 LEA R2 R0,IBCHARS get pointer to text area 104C5 E4960800 2 0 BASE 778 ST R2 R0,IBPTR initialize the input buffer 104C6 E4960801 2 0 BASE 779 ST R2 R0,IBENDPTR 780 * \ / 000104C7 781 RD25 LABEL 104C7 60040032 0 IMM 782 LD R0 FRSREAD get read request 104C8 5C11000D @ 783 CMZ @BINARYREAD check if binary read required 104C9 FE0304CB 784 JEQ RD25A1 go perform read 104CA 60040033 0 IMM 785 LD R0 FRSREADB get read request 786 * \ / 000104CB 787 RD25A1 LABEL 104CB 0880000A 788 FREQ READLUN(XREQ) read in whatever is out there 104CC 304400FF 1 IMM 789 RSB R1 MAXLEN-1 calculate read length 104CD FA09051E 0 790 JLTZ R0 RD80 jump on error 104CE F621051E 0 791 JBT R0/RTSP RD80 eod get out fast 000104CF 792 RD25A2 LABEL 104CF 60840020 2 IMM 793 LD R2 BLANK get a space " " 794 * \ / 000104D0 795 RD25A LABEL 104D0 10440001 1 IMM 796 SUB R1 1 point to last character read 104D1 FA4904D4 1 797 JLTZ R1 RD25B no characters read 104D2 649D4C07 2 51 FPVR 798 CPR R2 @(SP,RDCHARS)(R1) see if last character is a space 104D3 FE0304D0 799 JEQ RD25A if so, move pointer back and try again 800 * \ / 000104D4 801 RD25B LABEL 104D4 18440001 1 IMM 802 ADD R1 1 point to one character after last 104D5 6084000D 2 IMM 803 LD R2 CR get a carriage return (EOL) 104D6 38DD4C07 3 51 FPVR 804 LEA R3 @(SP,RDCHARS)(R1) point to end of line 104D7 E496C400 2 3 @R 805 ST R2 @R3 end line with carriage return 104D8 60974806 2 5 BASE 806 LD R2 SP,RDBUFF get IBCB pointer 104D9 E4D68801 3 2 BASE 807 ST R3 R2,IBENDPTR set end position 104DA 608A2040 2 0 CBM 808 LD R2 R0/RECTYPE get the record type code 104DB 64840000 2 IMM 809 CPR R2 RTTEXT be sure it's really text 104DC FE0D050D 810 JNE RD60 else don't look further 104DD 644400FF 1 IMM 811 CPR R1 MAXLEN-1 see if a biggie 104DE FE050507 812 JGT RD50 jump if trouble 104DF FA430503 1 813 JEQZ R1 RD45 see if it's really small, a special case 104E0 E4174803 0 5 BASE 814 ST R0 SP,RDR0SV save R0 1 Assembler C9208 Control Mode C9304 14-Jun-93 17:33 PAGE 67 (CMISUB) F 9 Input Subroutines 104E1 F38304E5 6 815 JBF ST/TRM RD26 can't be a terminal, it's batch 104E2 6000000A 0 816 LD R0 READLUN pick up unit being read 104E3 640400C9 0 IMM 817 CPR R0 LUNAIN see if it's the input unit 104E4 FE0304EB 818 JEQ RD27 it's a terminal after all 819 * \ / 000104E5 820 RD26 LABEL 104E5 60174805 0 5 BASE 821 LD R0 SP,RDPOSSV get position of start of this read 104E6 FA0304EB 0 822 JEQZ R0 RD27 it's O.K. it's the first character 104E7 18040001 0 IMM 823 ADD R0 1 increment pointer over added space 104E8 601D4407 0 50 FPVR 824 LD R0 @(SP,RDCHARS)(R0) pick up first character of this read 104E9 6404003E 0 IMM 825 CPR R0 CMCHAR check if prompt character 104EA FE030510 826 JEQ RD70 bail out if it is 827 * \ / 000104EB 828 RD27 LABEL 104EB E440011A 1 829 ST R1 LEN save it for later 104EC 10440003 1 IMM 830 SUB R1 3 move back to characters to check 104ED 64574805 1 5 BASE 831 CPR R1 SP,RDPOSSV check if three characters were read 104EE FE09052D 832 JLT RD90 get out now if less than three char read 104EF 389D4C07 2 51 FPVR 833 LEA R2 @(SP,RDCHARS)(R1) pointer to characters for checking 104F0 E4574805 1 5 BASE 834 ST R1 SP,RDPOSSV save position of end of this read 104F1 60040002 0 IMM 835 LD R0 2 check three characters 104F2 6044002E 1 IMM 836 LD R1 DOT get a "." to check for 837 * \ / 000104F3 838 RD30 LABEL 104F3 645A8400 1 20 @R 839 CPR R1 @R2(R0) check character 104F4 FE0D052D 840 JNE RD90 it's all we're getting 104F5 FA2704F3 0 841 JDR R0 RD30 see if it's time for another character 842 * \ / 104F6 F38504FD 6 843 JBF ST/TIN RD40 no prompt for batch or do file 104F7 E4974804 2 5 BASE 844 ST R2 SP,RDPTR save pointer for input 104F8 60040041 0 IMM 845 LD R0 FRWRITETF set up prompt 104F9 60440005 1 IMM 846 LD R1 PROMPT2LEN get length 104FA 60850016 2 IMM 847 LD R2 ADR(PROMPT2) find prompt 104FB 088400CA IMM 848 FREQ LUNAOUT+XREQ send out prompt 104FC 60974804 2 5 BASE 849 LD R2 SP,RDPTR get pointer back 850 * \ / 000104FD 851 RD40 LABEL 104FD 60440020 1 IMM 852 LD R1 BLANK get a space " " 104FE E4568400 1 2 @R 853 ST R1 @R2 place as next character in buffer 104FF D0928000 2 REG 854 INCP R2 move pointer to next position 10500 60440101 1 IMM 855 LD R1 MAXLEN+1 get maximum buffer length again 10500 60440101 1 IMM 856 this buffer length has 2 added to it to 10500 60440101 1 IMM 857 compensate for the "."'s being removed 10501 1040011A 1 858 SUB R1 LEN subtract what we've already gotten 10502 FE0F04C7 859 JMP RD25 get some more 860 * --- 861 00010503 862 RD45 LABEL 10503 6004000D 0 IMM 863 LD R0 CR an empty record was read, we just return 10504 60440095 1 IMM 864 LD R1 ADR(BUFFER) an empty buffer directly, because DEBLOCK 10505 E4164000 0 1 CACH 865 ST R0 CACH R1,0 won't be able to handle it 10506 FE0F0534 866 JMP RD105 867 * --- 868 00010507 869 RD50 LABEL 10507 E440011A 1 870 ST R1 LEN save length for echo routine 1 Assembler C9208 Control Mode C9304 14-Jun-93 17:33 PAGE 68 (CMISUB) F 9 Input Subroutines 10508 DC4109B5 871 CALLNP ECHO list out the offender 10509 60052583 0 IMM 872 LD R0 ADR(ERM331) "LINE TOO LONG" 1050A DC410A34 873 CALLNP ERPRT tell them off 1050B F38504C2 6 874 JBF ST/TIN RD20 jump if batch/DO input 1050C FE0F04BD 875 JMP RD10 try again 876 * --- 877 0001050D 878 RD60 LABEL 1050D F785051E 6 879 JBT ST/TIN RD80 take other path for terminal 1050E 5C00011A 880 CMZ LEN pick up position before read 1050F FE030536 881 JEQ RD110 exit with line 882 * \ / 00010510 883 RD70 LABEL 10510 F79D0519 6 884 JBT ST/SKPR RD75 no echo, skip in progress 10511 60050018 0 IMM 885 LD R0 ADR(RDCORCT) load address of characters overwritten 10512 60440004 1 IMM 886 LD R1 RDCORCTL number of characters to move 10513 60974805 2 5 BASE 887 LD R2 SP,RDPOSSV pick up position of the start of read 10514 389D5407 2 52 FPVR 888 LEA R2 @(SP,RDCHARS)(R2) create pointer to characters 10515 FE400000 889 CMOVE move "."'s back in 10516 DC4109B5 890 CALLNP ECHO list out the incomplete line 10517 60052513 0 IMM 891 LD R0 ADR(ERM312) "EXPECTING CONTINUATION OF ..." 10518 DC410A34 892 CALLNP ERPRT print out the error 893 * \ / 00010519 894 RD75 LABEL 10519 60040016 0 IMM 895 LD R0 FRBKSP get back up code 1051A 0880000A 896 FREQ READLUN(XREQ) back it up a record 1051B 6084000D 2 IMM 897 LD R2 CR pick up a EOL 1051C E4974C07 2 5 FPVR 898 ST R2 @(SP,RDCHARS) store at start of line 1051D FE0F04C2 899 JMP RD20 go get next record 900 * --- 901 0001051E 902 RD80 LABEL 1051E 5C00011A 903 CMZ LEN pick up position before read 1051F FE030536 904 JEQ RD110 exit with line 10520 F79D052E 6 905 JBT ST/SKPR RD100 no echo skip in progress 10521 E4174803 0 5 BASE 906 ST R0 SP,RDR0SV save R0 for later 10522 60050018 0 IMM 907 LD R0 ADR(RDCORCT) load address of characters overwritten 10523 60440004 1 IMM 908 LD R1 RDCORCTL number of characters to move 10524 60974805 2 5 BASE 909 LD R2 SP,RDPOSSV pick up position of the start of read 10525 389D5407 2 52 FPVR 910 LEA R2 @(SP,RDCHARS)(R2) create pointer to characters 10526 FE400000 911 CMOVE move "."'s back in 10527 DC4109B5 912 CALLNP ECHO list out the incomplete line 10528 60052513 0 IMM 913 LD R0 ADR(ERM312) "EXPECTING CONTINUATION OF ..." 10529 DC410A34 914 CALLNP ERPRT print out the error 1052A EC00011A 915 STZ LEN set length to zero 1052B 6084000D 2 IMM 916 LD R2 CR pick up a EOL 1052C E4974C07 2 5 FPVR 917 ST R2 @(SP,RDCHARS) store at start of line 918 * \ / 0001052D 919 RD90 LABEL 1052D 60174803 0 5 BASE 920 LD R0 SP,RDR0SV restore R0 921 * \ / 0001052E 922 RD100 LABEL 1052E F3850531 6 923 JBF ST/TIN RD102 don't change breaks if bat/do 1052F 5C174802 5 BASE 924 CMZ SP,RDBRK check previous break flag 10530 ED8BA210 6 CBM 925 STLNE ST/INOK restore the status flag 00010531 926 RD102 LABEL 1 Assembler C9208 Control Mode C9304 14-Jun-93 17:33 PAGE 69 (CMISUB) F 9 Input Subroutines 10531 F6210534 0 927 JBT R0/RTSP RD105 leave if eof 10532 60174806 0 5 BASE 928 LD R0 SP,RDBUFF 10533 FE0F04B3 929 JMP RDENTRY otherwise, go around again and 930 * --- pick out the first command string 931 00010534 932 RD105 LABEL 10534 60D74801 3 5 BASE 933 LD R3 SP,RDR3SV restore R3 10535 5D1F4008 5 STAK 934 LEAVE POP return to caller 935 * --- 936 00010536 937 RD110 LABEL 10536 E440011A 1 938 ST R1 LEN save length of whatever it is 10537 FE0F052E 939 JMP RD100 no partial line input 940 * --- 941 942 END READER routine 1 Assembler C9208 Control Mode C9304 14-Jun-93 17:33 PAGE 70 (CMISUB) F 9 Input Subroutines 944 945 ********************************************************************************** 946 * * 947 * The READLINE routine is used to read one line * 948 * into the input buffer from whatever unit is the * 949 * current input unit. Input is expected to be a * 950 * Control Mode command. This routine is also res- * 951 * ponsible for DO-unit management in that if the * 952 * current DO input unit reaches end-of-data, the * 953 * unit is recycled if under counter control, or * 954 * freed up and the DO level popped if the unit is * 955 * finished. All CM input from batch or DO must * 956 * have the CM character (">") in column one of the * 957 * input line. If a line is found which does not * 958 * contain the ">", an error message is generated. * 959 * Also, if an end-of-file is encountered, a similar * 960 * error message is produced. * 961 * Returns input line in BUFFER. * 962 * * 963 ********************************************************************************** 964 965 BLOCK READLINE routine 966 ENTRY READLINE 967 ENTRY PP90 968 ENTRY PP91 969 ENTRY PP92 970 ENTRY PP94 971 972 BEGFRAME 972 NOLIST CREF 972 NOSYMS 00010538 972 ZZ!FRAME BASE SP 972 SYMS 972 BSS 1 972 LIST CREF 00174801 5 BASE 973 RLLUN BSS 1 lun save area during read 00174802 5 BASE 974 PPTEMP BSS 1 preprocessor temp 975 ENDFRAME 975 NOLIST CREF 975 DRCT 00000003 ABS 975 ZZ!LEN EQU DISPW ZZ!FRAME 001F4003 5 STAK 975 PUSH EQU STAK SP,ZZ!LEN 001F4003 5 STAK 975 POP EQU PUSH 975 ORG ZZ!FRAME 975 LIST CREF 976 10538 DD5F4003 5 STAK 977 READLINE ENTRNP PUSH routine to read one CM line 10539 E540000F 5 978 ST SP RLSPSAVE freeze this stack pointer 1053A E5C00010 7 979 ST R7 RLR7SAVE also save the original R7 1053B 60000009 0 980 LD R0 LUN get current lun 1053C E4174801 0 5 BASE 981 ST R0 SP,RLLUN save from harm 982 * \ / 0001053D 983 RL10 LABEL recycle here 1053D F387054F 6 984 JBF ST/NDO RLDO jump if DO input in progress 1053E 600400C9 0 IMM 985 LD R0 LUNAIN get ordinary unit to use 1053F E400000A 0 986 ST R0 READLUN for READER 1 Assembler C9208 Control Mode C9304 14-Jun-93 17:33 PAGE 71 (CMISUB) F 9 Input Subroutines 10540 E4000009 0 987 ST R0 LUN in case of error 10541 5C0B8210 6 CBM 988 CMZ ST/TRM see if terminal or batch 10542 ED8B8410 6 CBM 989 STLNE ST/TIN set flag accordingly 10543 600B9220 0 6 CBM 990 LD R0 ST/SKIL check the user skill level 10544 64040003 0 IMM 991 CPR R0 SKLAPP is it an Application job? 10545 FE0318BB 992 JEQ BYENOW if so, then no input - flush! 10546 38000053 0 993 LEA R0 INBUFF point to standard input buffer 994 * \ / 00010547 995 RL20 LABEL 10547 DC4104AD 996 CALLNP READER read line into buffer 10548 FA090556 0 997 JLTZ R0 RL25 jump if error on input unit 10549 F2210574 0 998 JBF R0/RTSP RL70 jump if not 'special' record 1054A F6270559 0 999 JBT R0/EOD RL30 jump if EOD or AEOD 1054B F785053D 6 1000 JBT ST/TIN RL10 don't insult if on-line 1054C 600523E9 0 IMM 1001 LD R0 ADR(ERM158) "EXTRA END-OF-FILE" 1054D DC410A38 1002 CALLNP ERPRTNA tell them what happened 1054E FE0F053D 1003 JMP RL10 go read again 1004 * --- 1005 0001054F 1006 RLDO LABEL (DO unit input) 1054F 6100015F 4 1007 LD DO DOPTR retrieve DO pointer 10550 EC0B8410 6 CBM 1008 STZ ST/TIN keep status up-to-date 10551 60093080 0 4 ZBM 1009 LD R0 DO,DOUNIT get unit to use 10552 E400000A 0 1010 ST R0 READLUN now we read from DO unit 10553 E4000009 0 1011 ST R0 LUN in case of error 10554 38170802 0 4 BASE 1012 LEA R0 DO,DOIBUFF point to the input buffer 10555 FE0F0547 1013 JMP RL20 and go get the command 1014 * --- 1015 00010556 1016 RL25 LABEL (error on input) 10556 DC410A34 1017 CALLNP ERPRT list out the error 10557 F785053D 6 1018 JBT ST/TIN RL10 if interactive, basically ignore 10558 F387056B 6 1019 JBF ST/NDO RL50 error on DO input, abort 1020 * \ / 00010559 1021 RL30 LABEL (EOD) 10559 F78718BB 6 1022 JBT ST/NDO BYENOW EOD on batch - FLUSH!!! 1055A 604916D0 1 4 ZBM 1023 LD R1 DO,DOCOUNT get counter value 1055B 5C090410 4 ZBM 1024 CMZ DO,DOUCNT see if user controlled 1055C FE0D0560 1025 JNE RL35 jump if it is 1055D 10440001 1 IMM 1026 SUB R1 1 one more time through 1055E E44916D0 1 4 ZBM 1027 ST R1 DO,DOCOUNT and put it back 1055F FE0F0564 1028 JMP RL40 go see if finished 1029 * --- 1030 00010560 1031 RL35 LABEL 10560 5C084010 1 ZBM 1032 CMZ R1,VARTYPE see if numeric variable 10561 FE0D056B 1033 JNE RL50 jump if time to close 10562 D0564803 1 BASE 1034 DEC R1,VARVALUE one more time around 10563 60564803 1 1 BASE 1035 LD R1 R1,VARVALUE and see what it is now 1036 * \ / 00010564 1037 RL40 LABEL 10564 FA4B056B 1 1038 JLEZ R1 RL50 jump if unit is done 10565 6100015F 4 1039 LD DO DOPTR clear out the input buffer 10566 38170802 0 4 BASE 1040 LEA R0 DO,DOIBUFF 10567 DC410613 1041 CALLNP ZAPIBUFF 10568 60040012 0 IMM 1042 LD R0 FRREWIND otherwise rewind and go again 1 Assembler C9208 Control Mode C9304 14-Jun-93 17:33 PAGE 72 (CMISUB) F 9 Input Subroutines 10569 0880000A 1043 FREQ READLUN(XREQ) 1056A FE0F053D 1044 JMP RL10 and go start at the beginning 1045 * --- 1046 0001056B 1047 RL50 LABEL come here to close up DO unit 1056B DC410D44 1048 CALLNP DOEND go back to input unit before do 1056C 60093080 0 4 ZBM 1049 LD R0 DO,DOUNIT get the lun for this unit 1056D E4000009 0 1050 ST R0 LUN pu it where you want it 1056E DC410E35 1051 CALLNP FREEFILE go free it up if ours 1056F 11040044 4 IMM 1052 SUB DO DOBLEN drop one DO level 10570 65041497 4 IMM 1053 CPR DO ADR(DOAREA) see if more DO'S to do 10571 ED0B8610 6 CBM 1054 STLLT ST/NDO are we still DOing or not? 10572 E500015F 4 1055 ST DO DOPTR remember current DO pointer 10573 FE0F14E9 1056 JMP MC lets go see... 1057 * --- 1058 00010574 1059 RL70 LABEL (normal input comes here) 10574 600A2040 0 0 CBM 1060 LD R0 R0/RECTYPE get record type code 10575 64040000 0 IMM 1061 CPR R0 RTTEXT be sure it's really text 10576 FE0D057D 1062 JNE RL80 else don't use as command 10577 60440095 1 IMM 1063 LD R1 ADR(BUFFER) see what we got 10578 E4400116 1 1064 ST R1 BUFPT remember to reset pointer 10579 F7850587 6 1065 JBT ST/TIN PREPROC jump if not batch or DO 1057A 60564000 1 1 CACH 1066 LD R1 BPT get first character 1057B 6444003E 1 IMM 1067 CPR R1 CMCHAR be sure its a ">" 1057C FE030587 1068 JEQ PREPROC exit if correct 1069 * --- 1070 0001057D 1071 RL80 LABEL 1057D F781053D 6 1072 JBT ST/NLOG RL10 go read again if not logged in 1057E F789053D 6 1073 JBT ST/ABRT RL10 go read again if aborted 1057F 64040003 0 IMM 1074 CPR R0 RTCOM is it a comment record? 10580 FE03053D 1075 JEQ RL10 ignore it if so 10581 64040000 0 IMM 1076 CPR R0 RTTEXT I thought we did this 10582 FE0D0584 1077 JNE RL90 don't echo if garbage line 10583 DC4109B5 1078 CALLNP ECHO list out the line 1079 * \ / 00010584 1080 RL90 LABEL 10584 600523EE 0 IMM 1081 LD R0 ADR(ERM159) "EXPECTING CONTROL MODE COMMAND" 10585 DC410A34 1082 CALLNP ERPRT complain and set aborted 10586 FE0F053D 1083 JMP RL10 go try again 1084 * --- 1 Assembler C9208 Control Mode C9304 14-Jun-93 17:33 PAGE 73 (CMISUB) F 9 Input Subroutines 1086 1087 ********************************************************************************** 1088 * * 1089 * This is the PREPROC routine. It is basically a part of * 1090 * the READLINE command input routine. PREPROC checks each * 1091 * command input line to see if the substitution/concatenation * 1092 * flag is on. If so, it "pre-processes" the line, performing * 1093 * all necessary expansion before returning the line to main * 1094 * control. The output buffer (OBUFF) is used as a temporary * 1095 * buffer for diddling. * 1096 * * 1097 ********************************************************************************** 1098 00010587 1099 PREPROC LABEL pre-process input line 10587 5C00011A 1100 CMZ LEN any input at all? 10588 FE0305BA 1101 JEQ RLEXIT quick exit if not 10589 EC00000E 1102 STZ PPCOUNT say we are just starting 1058A 6004003E 0 IMM 1103 LD R0 CMCHAR get the CM identifier 1058B E411000A 0 @ 1104 ST R0 @OBPT place at head of the table 1058C 61040001 4 IMM 1105 LD R4 1 output buffer pointer 1058D 60040027 0 IMM 1106 LD R0 CCONCAT get concatenation character 1058E E439000A 0 4 @ 1107 ST R0 @OBPT(R4) add to the result buffer 1058F DC41045E 1108 CALLNP GETCHARX get first character of input line 10590 6404003E 0 IMM 1109 CPR R0 CMCHAR is it the CM identifier? 10591 FE0D0593 1110 JNE PP10 jump if not 10592 DC41045E 1111 CALLNP GETCHARX get the next after the ">" 1112 * \ / 00010593 1113 PP10 LABEL 10593 64040027 0 IMM 1114 CPR R0 CCONCAT is it the concatenation char? 10594 EC4BA610 6 CBM 1115 STLEQ ST/PREP set the flag accordingly 10595 FE0D0597 1116 JNE PP20 jump if not the switch 10596 61040002 4 IMM 1117 LD R4 2 otherwise adjust buffer pointer 1118 * \ / 00010597 1119 PP20 LABEL 10597 60000116 0 1120 LD R0 BUFPT must backup and look again 10598 D04A1F30 0 CBM 1121 DEC R0/NXTCHAR this is a big pain! 10599 E4000116 0 1122 ST R0 BUFPT but there is no other way 1059A E4174802 0 5 BASE 1123 ST R0 SP,PPTEMP save in case we need it later 1059B DC410396 1124 CALLNP FETCHITMC now get the first symbol 1059C F2BD05B0 2 1125 JBF R2/TALPH PP40 jump if it wasn't alpha 1059D F6A305A0 2 1126 JBT R2/TBLANK PP25 jump if blank delimiter is present 1059E 6404002E 0 IMM 1127 CPR R0 DOT check if it ends with a "." 1059F FE0305B0 1128 JEQ PP40 if so it's a file name 1129 * \ / 000105A0 1130 PP25 LABEL 105A0 DC410477 1131 CALLNP PACKER else determine if a variable 105A1 E6000014 01 1132 ST2 R0 VNAME set up for variable scan 105A2 DC410C8E 1133 CALLNP COMVAR check if it's a command 105A3 FA0305B0 0 1134 JEQZ R0 PP40 it is, no substitution for now 105A4 DC4110F5 1135 CALLNP VARCHK go see if in the list 105A5 FAC305B0 3 1136 JEQZ VAR PP40 well, did we find it? 105A6 5C08C010 3 ZBM 1137 CMZ VAR,VARTYPE if so, is it a string? 105A7 FE0305B0 1138 JEQ PP40 jump if a number - no good 105A8 3816C804 0 3 BASE 1139 LEA R0 VAR,VARSTR point to the string 105A9 60560000 1 0 CACH 1140 LD R1 CACH R0,0 get the first character of string 105AA 64440027 1 IMM 1141 CPR R1 CCONCAT is it the switch?? 1 Assembler C9208 Control Mode C9304 14-Jun-93 17:33 PAGE 74 (CMISUB) F 9 Input Subroutines 105AB FE0D05AD 1142 JNE PP30 if not then go move the string 105AC EDCBA610 6 CBM 1143 STW ST/PREP else set the processing flag 1144 * \ / 000105AD 1145 PP30 LABEL 105AD DC4105CE 1146 CALLNP SUBBER go move the string 105AE 60000116 0 1147 LD R0 BUFPT and point to the original line 105AF FE0F05B2 1148 JMP PP50 go append the rest of it 1149 * --- 1150 000105B0 1151 PP40 LABEL 105B0 F3A705BA 6 1152 JBF ST/PREP RLEXIT jump if no special processing 105B1 60174802 0 5 BASE 1153 LD R0 SP,PPTEMP else start back a ways 1154 * \ / 000105B2 1155 PP50 LABEL 105B2 DC4105CE 1156 CALLNP SUBBER and finish up the original line 105B3 6004000D 0 IMM 1157 LD R0 CR get a terminator 105B4 E439000A 0 4 @ 1158 ST R0 @OBPT(R4) tack on end for safety 105B5 60041400 0 IMM 1159 LD R0 ADR(OBUFF) now pick up our finished product 105B6 60840095 2 IMM 1160 LD R2 ADR(BUFFER) put back into the input buffer 105B7 60571001 1 4 REG 1161 LD R1 R4+1 get the string length 105B8 E500011A 4 1162 ST R4 LEN save in case we changed it 105B9 DA880800 2 01 1163 MOVE R2 R0 R1 and transfer the string 1164 * \ / 000105BA 1165 RLEXIT LABEL 105BA 60040095 0 IMM 1166 LD R0 ADR(BUFFER) reset buffer pointer to front 105BB E4000116 0 1167 ST R0 BUFPT now FETCHITM can have it 105BC EC000119 1168 STZ ATEOL 105BD 60174801 0 5 BASE 1169 LD R0 SP,RLLUN get the original lun 105BE E4000009 0 1170 ST R0 LUN restore for caller's use 105BF 5D1F4003 5 STAK 1171 LEAVE POP be seeing ya! 1172 * --- 1173 000105C0 1174 PP90 LABEL 105C0 60052935 0 IMM 1175 LD R0 ADR(ERM700) "BAD VARIABLE NAME" 105C1 FE0F05C7 1176 JMP PP95 1177 * --- 1178 000105C2 1179 PP91 LABEL 105C2 6005293B 0 IMM 1180 LD R0 ADR(ERM701) "VARIABLE UNDEFINED" 105C3 FE0F05C7 1181 JMP PP95 1182 * --- 1183 000105C4 1184 PP92 LABEL 105C4 60052404 0 IMM 1185 LD R0 ADR(ERM162) "LOOPED PERFORMING SUBSTITUTIONS" 105C5 FE0F05C7 1186 JMP PP95 1187 * --- 1188 000105C6 1189 PP94 LABEL 105C6 600523FE 0 IMM 1190 LD R0 ADR(ERM161) "EXPANDED LINE TOO LONG" 1191 * \ / 000105C7 1192 PP95 LABEL 105C7 6140000F 5 1193 LD SP RLSPSAVE restore original stack pointer 105C8 E413C000 0 7 REG 1194 ST R0 R7 save error from harm 105C9 DC4109B5 1195 CALLNP ECHO go list out input line 105CA 6013C000 0 7 REG 1196 LD R0 R7 restore error code 105CB DC410A34 1197 CALLNP ERPRT go list out the error 1 Assembler C9208 Control Mode C9304 14-Jun-93 17:33 PAGE 75 (CMISUB) F 9 Input Subroutines 105CC 61C00010 7 1198 LD R7 RLR7SAVE restore original R7 105CD FE0F053D 1199 JMP RL10 then try again 1200 * --- 1201 1202 END READLINE routine 1 Assembler C9208 Control Mode C9304 14-Jun-93 17:33 PAGE 76 (CMISUB) F 9 Input Subroutines 1204 1205 ********************************************************************************** 1206 * * 1207 * This is the SUBBER subroutine. It performs the * 1208 * substitutions for the Pre-processor of READLINE. It calls * 1209 * itself recursively if necessary. Error exits are to the * 1210 * Pre-proc labels. * 1211 * * 1212 ********************************************************************************** 1213 1214 BLOCK SUBBER routine 1215 ENTRY SUBBER 1216 1217 BEGFRAME 1217 NOLIST CREF 1217 NOSYMS 000105CE 1217 ZZ!FRAME BASE SP 1217 SYMS 1217 BSS 1 1217 LIST CREF 00174801 5 BASE 1218 SUBTMP BSS 1 temp area 1219 ENDFRAME 1219 NOLIST CREF 1219 DRCT 00000002 ABS 1219 ZZ!LEN EQU DISPW ZZ!FRAME 001F4002 5 STAK 1219 PUSH EQU STAK SP,ZZ!LEN 001F4002 5 STAK 1219 POP EQU PUSH 1219 ORG ZZ!FRAME 1219 LIST CREF 1220 105CE DD5F4002 5 STAK 1221 SUBBER ENTRNP PUSH 105CF E0000116 0 1222 EXCH R0 BUFPT swizzle buffer pointer 105D0 E4174801 0 5 BASE 1223 ST R0 SP,SUBTMP save old value from harm 105D1 EC000119 1224 STZ ATEOL be sure we can fetch items 105D2 BC00000E 0 1225 INCL R0 PPCOUNT say we are here again 105D3 640400C8 0 IMM 1226 CPR R0 PPMAX too many visits?? 105D4 FE0705C4 1227 JGE PP92 go say we are looped 105D5 65440168 5 IMM 1228 CPR SP ADR(STACKEND) have we gone too far? 105D6 FE0B05C4 1229 JLE PP92 go say we are looped 1230 * \ / 000105D7 1231 SUB10 LABEL 105D7 DC41045E 1232 CALLNP GETCHARX get a character from input 105D8 F3A705DD 6 1233 JBF ST/PREP SUB30 jump if not to do magic 105D9 64040027 0 IMM 1234 CPR R0 CCONCAT is it the concatenation char? 105DA FE0305F9 1235 JEQ SUB60 go process if so 1236 * \ / 000105DB 1237 SUB20 LABEL 105DB 64040025 0 IMM 1238 CPR R0 CSUB how about substitution? 105DC FE0305E3 1239 JEQ SUB40 go process it if so 1240 * \ / 000105DD 1241 SUB30 LABEL 105DD 6404000D 0 IMM 1242 CPR R0 CR is it the end??? 105DE FE0305FB 1243 JEQ SUBEX time to exit if it is 1244 * \ / 000105DF 1245 SUB35 LABEL 105DF E439000A 0 4 @ 1246 ST R0 @OBPT(R4) add to the result string 1 Assembler C9208 Control Mode C9304 14-Jun-93 17:33 PAGE 77 (CMISUB) F 9 Input Subroutines 105E0 650400FF 4 IMM 1247 CPR R4 MAXLEN-1 too many?? 105E1 FE0705C6 1248 JGE PP94 go tell them line is too long 105E2 FB2105D7 4 1249 IRJ R4 SUB10 advance and recycle 1250 * --- 1251 000105E3 1252 SUB40 LABEL 105E3 DC41045E 1253 CALLNP GETCHARX get next from input 105E4 64040025 0 IMM 1254 CPR R0 CSUB is it also a subs char? 105E5 FE0305DF 1255 JEQ SUB35 if so then leave one as real 105E6 60000116 0 1256 LD R0 BUFPT else backup 105E7 D04A1F30 0 CBM 1257 DEC R0/NXTCHAR so we can look again 105E8 E4000116 0 1258 ST R0 BUFPT 105E9 DC410399 1259 CALLNP FETCHITMI get the entire item 105EA F2BD05C0 2 1260 JBF R2/TALPH PP90 go say bad variable name 105EB DC410477 1261 CALLNP PACKER pack into sardine mode 105EC E6000014 01 1262 ST2 R0 VNAME put it where you want it 105ED DC4110F5 1263 CALLNP VARCHK and go see if it is a var 105EE FAC305C2 3 1264 JEQZ VAR PP91 say the variable is undefined 105EF 5C08C010 3 ZBM 1265 CMZ VAR,VARTYPE is it a string? 105F0 FE0D05F6 1266 JNE SUB50 jump if it is 105F1 6016C803 0 3 BASE 1267 LD R0 VAR,VARVALUE get the number's amount 105F2 E0D30000 3 4 REG 1268 EXCH R3 R4 swizzle buffer pointers 105F3 DC410AB2 1269 CALLNP NDCVAR unpack into result buffer 105F4 E0D30000 3 4 REG 1270 EXCH R3 R4 un-swizzle 105F5 FE0F05D7 1271 JMP SUB10 and go back for more 1272 * --- 1273 000105F6 1274 SUB50 LABEL 105F6 3816C804 0 3 BASE 1275 LEA R0 VAR,VARSTR point to the string 105F7 DC4105CE 1276 CALLNP SUBBER and do a little recursing 105F8 FE0F05D7 1277 JMP SUB10 then go back for more 1278 * --- 1279 000105F9 1280 SUB60 LABEL 105F9 DC41045E 1281 CALLNP GETCHARX get next character 105FA FE0F05DB 1282 JMP SUB20 and go place in line 1283 * --- 1284 000105FB 1285 SUBEX LABEL 105FB 60174801 0 5 BASE 1286 LD R0 SP,SUBTMP get old BUFPT pointer 105FC E4000116 0 1287 ST R0 BUFPT restore for the caller 105FD 5D1F4002 5 STAK 1288 LEAVE POP and go home 1289 * --- 1290 1291 END SUBBER routine 1 Assembler C9208 Control Mode C9304 14-Jun-93 17:33 PAGE 78 (CMISUB) F 9 Input Subroutines 1293 1294 ********************************************************************************** 1295 * * 1296 * The READLINEX routine is used to read one line into the * 1297 * input buffer from the standard input unit at the start of a * 1298 * batch job. The line is returned even if it does not start * 1299 * with a ">". This allows batch jobs that are automatcily * 1300 * logged on to start a program in their INITIAL. LOGON file * 1301 * that requires input from the job stream. Returns input line * 1302 * in BUFFER. * 1303 * * 1304 ********************************************************************************** 1305 1306 BLOCK READLINEX routine 1307 ENTRY READLINEX 1308 1309 BEGFRAME 1309 NOLIST CREF 1309 NOSYMS 000105FE 1309 ZZ!FRAME BASE SP 1309 SYMS 1309 BSS 1 1309 LIST CREF 1310 ENDFRAME 1310 NOLIST CREF 1310 DRCT 00000001 ABS 1310 ZZ!LEN EQU DISPW ZZ!FRAME 001F4001 5 STAK 1310 PUSH EQU STAK SP,ZZ!LEN 001F4001 5 STAK 1310 POP EQU PUSH 1310 ORG ZZ!FRAME 1310 LIST CREF 1311 105FE DD5F4001 5 STAK 1312 READLINEX ENTRNP PUSH routine to read one CM line 105FF 600400C9 0 IMM 1313 LD R0 LUNAIN get ordinary unit to use 10600 E400000A 0 1314 ST R0 READLUN for READER 10601 E4000009 0 1315 ST R0 LUN in case of error 10602 EC0B8410 6 CBM 1316 STZ ST/TIN clear terminal input flag 10603 38000053 0 1317 LEA R0 INBUFF indicate standard input buffer 10604 DC4104AD 1318 CALLNP READER read line into buffer 10605 FA090609 0 1319 JLTZ R0 RLX25 jump if error on input unit 10606 F221060B 0 1320 JBF R0/RTSP RLX70 jump if not 'special' record 10607 F62718BB 0 1321 JBT R0/EOD BYENOW jump if EOD or AEOD 10608 FE0F0612 1322 JMP RLX80 return to user if EOF 1323 * --- 1324 00010609 1325 RLX25 LABEL (error on input) 10609 DC410A34 1326 CALLNP ERPRT list out the error 1060A FE0F18BB 1327 JMP BYENOW error on input - terminate job 1328 * --- 1329 0001060B 1330 RLX70 LABEL (normal input comes here) 1060B 600A2040 0 0 CBM 1331 LD R0 R0/RECTYPE get record type code 1060C 64040000 0 IMM 1332 CPR R0 RTTEXT be sure it's really text 1060D FE0D0612 1333 JNE RLX80 else don't use as command 1060E 60440095 1 IMM 1334 LD R1 ADR(BUFFER) see what we got 1060F E4400116 1 1335 ST R1 BUFPT remember to reset pointer 1 Assembler C9208 Control Mode C9304 14-Jun-93 17:33 PAGE 79 (CMISUB) F 9 Input Subroutines 10610 60564000 1 1 CACH 1336 LD R1 BPT get first character 10611 6444003E 1 IMM 1337 CPR R1 CMCHAR be sure its a ">" 1338 * \ / 00010612 1339 RLX80 LABEL 10612 5D1F4001 5 STAK 1340 LEAVE POP return 1341 * --- 1342 1343 END READLINEX routine 1 Assembler C9208 Control Mode C9304 14-Jun-93 17:33 PAGE 80 (CMISUB) F 9 Input Subroutines 1345 1346 ********************************************************************************** 1347 * * 1348 * This routine is used to set the status of an input * 1349 * buffer to 'empty'. Called with R0 pointing to the buffer * 1350 * control block. * 1351 * * 1352 ********************************************************************************** 1353 1354 BLOCK 1355 ENTRY ZAPIBUFF 1356 1357 BEGFRAME 1357 NOLIST CREF 1357 NOSYMS 00010613 1357 ZZ!FRAME BASE SP 1357 SYMS 1357 BSS 1 1357 LIST CREF 1358 ENDFRAME 1358 NOLIST CREF 1358 DRCT 00000001 ABS 1358 ZZ!LEN EQU DISPW ZZ!FRAME 001F4001 5 STAK 1358 PUSH EQU STAK SP,ZZ!LEN 001F4001 5 STAK 1358 POP EQU PUSH 1358 ORG ZZ!FRAME 1358 LIST CREF 1359 10613 DD5F4001 5 STAK 1360 ZAPIBUFF ENTRNP PUSH 10614 38560009 1 0 CACH 1361 LEA R1 R0,IBCHARS(1) point to second character in buffer 10615 E4560800 1 0 BASE 1362 ST R1 R0,IBPTR make that the current position 10616 E4560801 1 0 BASE 1363 ST R1 R0,IBENDPTR and also the end position 10617 5D1F4001 5 STAK 1364 LEAVE POP 1365 * --- 1366 1367 END 114 INPUT CM.UTL:CMEXEV 1 Assembler C9208 Control Mode C9304 14-Jun-93 17:33 PAGE 81 (CMEXEV) F 10 Expression Evaluator 3 4 ********************************************************************************** 5 * * 6 * This section is called to process complex expressions * 7 * and return the result. In addition to normal arithemetic * 8 * values, it can also return strings if these are encountered. * 9 * * 10 * The expression evaluator recognizes the standard * 11 * operators and also operands useful to Control Mode * 12 * execution. Operands include abort condition, on-line * 13 * condition, CPU time, output blocks, user defined variables, * 14 * traffic, file status and types, file access and privilege * 15 * codes, etc. The expresion is set up with the usual * 16 * assortment of operators and operands and parentheses thrown * 17 * in where desired or necessary. A special check is made for * 18 * processing IF statements, and if that is the case, the * 19 * expression must be terminated by the keyword THEN. * 20 * Otherwise, the expression is ended with a CR. * 21 * * 22 * On return, R0 = error code (0=no error). * 23 * R1 = length if string, -1 if number * 24 * R2 = value if number, address if string * 25 * * 26 ********************************************************************************** 27 28 BLOCK EEPROC routines 29 ENTRY EEPROC 30 ENTRY EEPROCS 31 32 BEGFRAME 00174801 5 BASE 33 EETMP BSS 2 temp for OPR and OPN 00174803 5 BASE 34 EET2 BSS 1 another temp 00174804 5 BASE 35 EESTATE BSS 1 current processing state 00174805 5 BASE 36 EEOPRSAVE BSS 1 temp for saving operator ptr 37 ENDFRAME 38 0012C000 3 REG 39 OPR EQU R3 operator stack pointer 00130000 4 REG 40 OPN EQU R4 operand stack pointer 41 00010618 42 EEOPRPROTO BASE operator element prototype 00000000 DISP 43 EEOPRSYM BSS 1 operator symbol or name 00400001 DISP 44 EEOPRUN BSSB 1 unary operation flag 00000010 BYTE 45 EEUNARY EQU BIT 0 unary operation bit 09000001 DISP 46 EEOPRPREC BSSB 4 operation precedence 28C00001 DISP 47 EEOPRNXST BSSB 3 next state 40C00001 DISP 48 EEOPRCPR BSSB 3 for compare operators 00001030 BYTE 49 EECOMPARE EQU BITS 8:10 compare type bits 50 BSSB 4 dummy 7C400001 DISP 51 EEOPRADR BSSB 17 operation processing address 52 DRCT 53 ORG EEOPRPROTO 54 00010618 55 EEOPNPROTO BASE operand(symbol table) prototype 00000000 DISP 56 EEOPNSYM BSS 2 operand name 00800002 DISP 57 EEOPNTYP BSSB 2 type of operand 58 BSSB 13 dummy 1 Assembler C9208 Control Mode C9304 14-Jun-93 17:33 PAGE 82 (CMEXEV) F 10 Expression Evaluator 7C400002 DISP 59 EEOPNADR BSSB 17 processing address 7C400002 DISP 60 EEOPNVAL EQU EEOPNADR operand value if absolute 61 DRCT 62 63 BASE OPN operand stack value 00170800 4 BASE 64 EEOPNVS BSS 1 value of operand 65 DRCT 66 ORG EEOPNPROTO 67 00010618 68 EEOPNPROC LABEL operand processing address 10618 000107D9 69 ADR EEOPNABS 0 - absolute 10619 000107E6 70 ADR EEOPNCALC 1 - calculate value 1061A 00010874 71 ADR EEOPNFUNC 2 - function (lun/file) 1061B 00010797 72 ADR EEEND 3 - done ('THEN') 73 00000002 ABS 74 EEOPRTEL EQU 2 2 words per entry 00000003 ABS 75 EEOPNTEL EQU 3 3 words per symbol entry 76 00000001 ABS 77 TRUE EQU 1 true value 00000000 ABS 78 FALSE EQU 0 false value 00000000 ABS 79 EEUNDEF EQU 0 value for undefined 00000000 ABS 80 NONE EQU 0 value for none 81 00000000 ABS 82 ABS EQU 0 absolute value 00000001 ABS 83 VAL EQU 1 calculated value 00000002 ABS 84 FUNC EQU 2 function (file) 85 00000001 ABS 86 UN EQU 1 unary operation 00000000 ABS 87 BI EQU 0 binary operation 88 0001061C 89 EETESTTAB BASE compare operator test table 1061C FE0F07A4 90 JMP EE90 (unused) 1061D EC528000 2 REG 91 EEEQ STLEQ R2 = 1061E ED928000 2 REG 92 EENE STLNE R2 <> 1061F ECD28000 2 REG 93 EEGE STLGE R2 >= 10620 ED128000 2 REG 94 EELT STLLT R2 < 10621 EC928000 2 REG 95 EEGT STLGT R2 > 10622 ED528000 2 REG 96 EELE STLLE R2 <= 97 DRCT 1 Assembler C9208 Control Mode C9304 14-Jun-93 17:33 PAGE 83 (CMEXEV) F 10 Expression Evaluator 99 100 ********************************************************************************** 101 * * 102 * This is the operator table. It contains an entry for * 103 * each recognized operator. The entry holds the operator name * 104 * or character, the unary minus flag (expecting operand), the * 105 * operation type (unary or binary), the operation precedence, * 106 * and the processing address for the operation. Entries are * 107 * defined for the top of the stack, and the left-parenthesis. * 108 * The right-parenthesis is never stacked. A separate entry is * 109 * also defined for the unary minus, and the correct entry is * 110 * selected depending on the flag. * 111 * * 112 ********************************************************************************** 113 00010623 114 EEOPRTAB LABEL table of operators 10623 4F522020 115 ASCII 1,OR 10624 12010920 116 VFD 1:BI,4:2,3:2,3:0,4:0,17:ADR(EEOR) 10625 414E4420 117 ASCII 1,AND 10626 1A010923 118 VFD 1:BI,4:3,3:2,3:0,4:0,17:ADR(EEAND) 10627 0000003D 119 VFD EQUAL 10628 22210926 120 VFD 1:BI,4:4,3:2,3:EEEQ,4:0,17:ADR(EETEST) 10629 0000003E 121 VFD 16:0,8:LESS,GREATER 1062A 22410926 122 VFD 1:BI,4:4,3:2,3:EENE,4:0,17:ADR(EETEST) 1062B 0000003D 123 VFD 16:0,8:GREATER,EQUAL 1062C 22610926 124 VFD 1:BI,4:4,3:2,3:EEGE,4:0,17:ADR(EETEST) 1062D 0000003C 125 VFD LESS 1062E 22810926 126 VFD 1:BI,4:4,3:2,3:EELT,4:0,17:ADR(EETEST) 1062F 0000003E 127 VFD GREATER 10630 22A10926 128 VFD 1:BI,4:4,3:2,3:EEGT,4:0,17:ADR(EETEST) 10631 0000003D 129 VFD 16:0,8:LESS,8:EQUAL 10632 22C10926 130 VFD 1:BI,4:4,3:2,3:EELE,4:0,17:ADR(EETEST) 10633 49532020 131 ASCII 1,IS 10634 2201092A 132 VFD 1:BI,4:4,3:2,3:0,4:0,17:ADR(EEIS) 10635 0000002B 133 VFD PLUS 10636 2901092C 134 VFD 1:BI,4:5,3:1,3:0,4:0,17:ADR(EEADD) 10637 0000002D 135 VFD MINUS 10638 2901092F 136 VFD 1:BI,4:5,3:1,3:0,4:0,17:ADR(EESUB) 10639 0000002A 137 VFD STAR 1063A 31010931 138 VFD 1:BI,4:6,3:1,3:0,4:0,17:ADR(EEMUL) 1063B 0000002F 139 VFD SLASH 1063C 31010933 140 VFD 1:BI,4:6,3:1,3:0,4:0,17:ADR(EEDIV) 1063D 4E4F5420 141 EEOPRNOT ASCII 1,NOT 1063E BA01091D 142 VFD 1:UN,4:7,3:2,3:0,4:0,17:ADR(EENOT) 0001063F 143 EEOPRTEND LABEL 1063F 0000002D 144 EEUMINUS VFD MINUS 10640 C101090B 145 VFD 1:UN,4:8,3:1,3:0,4:0,17:ADR(EEUSUB) 10641 00000028 146 EEOPRLP VFD LPAREN 10642 0A0107A4 147 VFD 1:BI,4:1,3:2,3:0,4:0,17:ADR(EE90) 148 10643 00000000 149 EEOPRTOP VFD 0 10644 020107A4 150 VFD 1:BI,4:0,3:2,3:0,4:0,17:ADR(EE90) 1 Assembler C9208 Control Mode C9304 14-Jun-93 17:33 PAGE 84 (CMEXEV) F 10 Expression Evaluator 152 153 ********************************************************************************** 154 * * 155 * This is the table of valid operands. * 156 * * 157 ********************************************************************************** 158 00010645 159 EEOPNTAB LABEL operand (symbol) table 10645 C0ED0C40 160 PAK12 UNDEF 10647 00000000 161 VFD 2:ABS,13:0,17:EEUNDEF 10648 C0ED0C53 162 PAK12 UNDEFINED 1064A 00000000 163 VFD 2:ABS,13:0,17:EEUNDEF 1064B B2BDD000 164 PAK12 SAF 1064D 00000001 165 VFD 2:ABS,13:0,17:HTSAF 1064E ACA35000 166 PAK12 RAF 10650 00000002 167 VFD 2:ABS,13:0,17:HTRAF 10651 533719C0 168 PAK12 CODE 10653 00000003 169 VFD 2:ABS,13:0,17:HTCODE 10654 A07C6C80 170 PAK12 PATH 10656 00000004 171 VFD 2:ABS,13:0,17:HTPATH 10657 58748800 172 PAK12 DIR 10659 00000005 173 VFD 2:ABS,13:0,17:HTDIR 1065A 974CF580 174 PAK12 NULL 1065C 00000006 175 VFD 2:ABS,13:0,17:HTNULL 1065D B980D7C0 176 PAK12 TERM 1065F 00000007 177 VFD 2:ABS,13:0,17:HTTERM 10660 53EC6000 178 PAK12 CT 10662 0000000D 179 VFD 2:ABS,13:0,17:HTCT 10663 8A3EA000 180 PAK12 LP 10665 0000000B 181 VFD 2:ABS,13:0,17:HTLP 10666 90F56000 182 PAK12 MT 10668 0000000C 183 VFD 2:ABS,13:0,17:HTMT 10669 C7E3E000 184 PAK12 VT 1066B 0000000F 185 VFD 2:ABS,13:0,17:HTVT 186 * The following item has been temporarily deleted due to a conflict with the 187 * job type BATCH. 188 * PAK12 BATCH 189 * VFD 2:ABS,13:0,17:HTBATCH 1066C 5196B800 190 PAK12 CDR 1066E 0000000A 191 VFD 2:ABS,13:0,17:HTCDR 1066F B5B03291 192 PAK12 STRING 10671 00000002 193 VFD 2:ABS,13:0,17:2 10672 974DC833 194 PAK12 NUMERIC 10674 00000001 195 VFD 2:ABS,13:0,17:1 10675 AFEF1000 196 PAK12 RW 10677 00000000 197 VFD 2:ABS,13:0,17:ACRW 10678 AEB69000 198 PAK12 RO 1067A 00000001 199 VFD 2:ABS,13:0,17:ACRO 1067B 46F41000 200 PAK12 AO 1067D 00000002 201 VFD 2:ABS,13:0,17:ACAO 1067E D3559000 202 PAK12 XO 10680 00000003 203 VFD 2:ABS,13:0,17:ACXO 10681 916A9000 204 PAK12 MW 10683 00000004 205 VFD 2:ABS,13:0,17:ACMW 10684 59B8C000 206 PAK12 DR 10686 00000005 207 VFD 2:ABS,13:0,17:ACDR 1 Assembler C9208 Control Mode C9304 14-Jun-93 17:33 PAGE 85 (CMEXEV) F 10 Expression Evaluator 10687 9429B000 208 PAK12 NA 10689 00000007 209 VFD 2:ABS,13:0,17:ACNA 1068A 90321000 210 PAK12 MO 1068C 00000002 211 VFD 2:ABS,13:0,17:PVMO 1068D 5F6DB000 212 PAK12 EOF 1068F 00004000 213 VFD 2:ABS,13:0,17:1*EOF 10690 5F6BBC00 214 PAK12 EOD 10692 00001000 215 VFD 2:ABS,13:0,17:1*EOD 10693 45863180 216 PAK12 AEOD 10695 00002000 217 VFD 2:ABS,13:0,17:1*AEOD 10696 8883FF80 218 PAK12 LDPT 10698 00000800 219 VFD 2:ABS,13:0,17:1*LDPT 10699 B2CDCFF0 220 PAK12 SAVED 1069B 00000040 221 VFD 2:ABS,13:0,17:1*SAVEBIT 1069C CE804200 222 PAK12 WWC 1069E 00000080 223 VFD 2:ABS,13:0,17:1*CRASHBIT 1069F 966C48D7 224 PAK12 NOVICE 106A1 00000001 225 VFD 2:ABS,13:0,17:2 POWER SKLNOV 106A2 4814D6C9 226 PAK12 AVERAGE 106A4 00000002 227 VFD 2:ABS,13:0,17:2 POWER SKLAVG 106A5 60D7663E 228 PAK12 EXPERT 106A7 00000004 229 VFD 2:ABS,13:0,17:2 POWER SKLEXP 106A8 47351085 230 PAK12 APPLICATION 106AA 00000008 231 VFD 2:ABS,13:0,17:2 POWER SKLAPP 106AB BB7F63C0 232 PAK12 TRUE 106AD 00000001 233 VFD 2:ABS,13:0,17:TRUE 106AE 636BE398 234 PAK12 FALSE 106B0 00000000 235 VFD 2:ABS,13:0,17:FALSE 106B1 D805C200 236 PAK12 YES 106B3 00000001 237 VFD 2:ABS,13:0,17:TRUE 106B4 964C9000 238 PAK12 NO 106B6 00000000 239 VFD 2:ABS,13:0,17:FALSE 106B7 D59F8000 240 PAK12 Y 106B9 00000001 241 VFD 2:ABS,13:0,17:TRUE 106BA 927C0000 242 PAK12 N 106BC 00000000 243 VFD 2:ABS,13:0,17:FALSE 106BD 96645DC0 244 PAK12 NONE 106BF 00000000 245 VFD 2:ABS,13:0,17:NONE 106C0 B5D3395B 246 PAK12 SUNDAY 106C2 00000000 247 VFD 2:ABS,13:0,17:0 106C3 9049D95B 248 PAK12 MONDAY 106C5 00000001 249 VFD 2:ABS,13:0,17:1 106C6 BBE54D7B 250 PAK12 TUESDAY 106C8 00000002 251 VFD 2:ABS,13:0,17:2 106C9 CBC2B475 252 PAK12 WEDNESDAY 106CB 00000003 253 VFD 2:ABS,13:0,17:3 106CC B9F91996 254 PAK12 THURSDAY 106CE 00000004 255 VFD 2:ABS,13:0,17:4 106CF 6600A75B 256 PAK12 FRIDAY 106D1 00000005 257 VFD 2:ABS,13:0,17:5 106D2 B2CC422E 258 PAK12 SATURDAY 106D4 00000006 259 VFD 2:ABS,13:0,17:6 106D5 7BD7E394 260 PAK12 JANUARY 106D7 00000001 261 VFD 2:ABS,13:0,17:1 106D8 63FE5BE3 262 PAK12 FEBRUARY 106DA 00000002 263 VFD 2:ABS,13:0,17:2 1 Assembler C9208 Control Mode C9304 14-Jun-93 17:33 PAGE 86 (CMEXEV) F 10 Expression Evaluator 106DB 8E2ADC10 264 PAK12 MARCH 106DD 00000003 265 VFD 2:ABS,13:0,17:3 106DE 4736F230 266 PAK12 APRIL 106E0 00000004 267 VFD 2:ABS,13:0,17:4 106E1 8E315E00 268 PAK12 MAY 106E3 00000005 269 VFD 2:ABS,13:0,17:5 106E4 7EE4BDC0 270 PAK12 JUNE 106E6 00000006 271 VFD 2:ABS,13:0,17:6 106E7 7EE346C0 272 PAK12 JULY 106E9 00000007 273 VFD 2:ABS,13:0,17:7 106EA 47EFD066 274 PAK12 AUGUST 106EC 00000008 275 VFD 2:ABS,13:0,17:8 106ED B36491EF 276 PAK12 SEPTEMBER 106EF 00000009 277 VFD 2:ABS,13:0,17:9 106F0 9AB03A2F 278 PAK12 OCTOBER 106F2 0000000A 279 VFD 2:ABS,13:0,17:10 106F3 966C3164 280 PAK12 NOVEMBER 106F5 0000000B 281 VFD 2:ABS,13:0,17:11 106F6 57CA0364 282 PAK12 DECEMBER 106F8 0000000C 283 VFD 2:ABS,13:0,17:12 284 106F9 451050B7 285 PAK12 ABNORMAL 106FB 400107F5 286 VFD 2:VAL,13:0,17:ADR(EEABNORMAL) 106FC 4691B753 287 PAK12 ALIASACCT 106FE 4001082D 288 VFD 2:VAL,13:0,17:ADR(EEALIAS) 106FF 4B095010 289 PAK12 BATCH 10701 400107F9 290 VFD 2:VAL,13:0,17:ADR(EEBATCH) 10702 4D92AE08 291 PAK12 BREAK 10704 400107F7 292 VFD 2:VAL,13:0,17:ADR(EEBREAK) 10705 5953AA3F 293 PAK12 DOFILE 10707 400107FE 294 VFD 2:VAL,13:0,17:ADR(EEDOFILE) 10708 9668798E 295 PAK12 NORMAL 1070A 40010800 296 VFD 2:VAL,13:0,17:ADR(EENORMAL) 1070B 9C55F68F 297 PAK12 ONLINE 1070D 40010803 298 VFD 2:VAL,13:0,17:ADR(EEONLINE) 1070E B447EAF0 299 PAK12 SKILL 10710 400107FB 300 VFD 2:VAL,13:0,17:ADR(EESKILL) 10711 BA1803C0 301 PAK12 TIME 10713 400107E7 302 VFD 2:VAL,13:0,17:ADR(EETIME) 10714 BA18328F 303 PAK12 TIMLIM 10716 400107EB 304 VFD 2:VAL,13:0,17:ADR(EETIMLIM) 10717 4CB21EA5 305 PAK12 BLOCKS 10719 400107EE 306 VFD 2:VAL,13:0,17:ADR(EEBLOCKS) 1071A 4CAE6E8F 307 PAK12 BLKLIM 1071C 400107F2 308 VFD 2:VAL,13:0,17:ADR(EEBLKLIM) 1071D 573E59C0 309 PAK12 DATE 1071F 40010805 310 VFD 2:VAL,13:0,17:ADR(EEDATE) 10720 5742DE00 311 PAK12 DAY 10722 40010815 312 VFD 2:VAL,13:0,17:ADR(EEDAY) 10723 904A3E50 313 PAK12 MONTH 10725 40010811 314 VFD 2:VAL,13:0,17:ADR(EEMONTH) 10726 71CC8500 315 PAK12 HOUR 10728 40010819 316 VFD 2:VAL,13:0,17:ADR(EEHOUR) 10729 BB6BE493 317 PAK12 TRAFFIC 1072B 40010834 318 VFD 2:VAL,13:0,17:ADR(EETRAFFIC) 1072C 8A22A580 319 PAK12 LOAD 1 Assembler C9208 Control Mode C9304 14-Jun-93 17:33 PAGE 87 (CMEXEV) F 10 Expression Evaluator 1072E 40010837 320 VFD 2:VAL,13:0,17:ADR(EELOAD) 1072F 8A28CA0B 321 PAK12 LOGONACCT 10731 4001082B 322 VFD 2:VAL,13:0,17:ADR(EELOGON) 10732 A29DA75F 323 PAK12 PORTNUM 10734 4001083A 324 VFD 2:VAL,13:0,17:ADR(EEPORTNUM) 10735 A29DA7EB 325 PAK12 PORTRATE 10737 4001083F 326 VFD 2:VAL,13:0,17:ADR(EEPORTRATE) 10738 A29DA853 327 PAK12 PORTTYPE 1073A 40010843 328 VFD 2:VAL,13:0,17:ADR(EEPORTTYPE) 1073B A29DA6FF 329 PAK12 PORTLEN 1073D 40010848 330 VFD 2:VAL,13:0,17:ADR(EEPORTLEN) 1073E A29DA8BB 331 PAK12 PORTWID 10740 4001084A 332 VFD 2:VAL,13:0,17:ADR(EEPORTWID) 10741 A29DA5E5 333 PAK12 PORTECHO 10743 4001084C 334 VFD 2:VAL,13:0,17:ADR(EEPORTECHO) 10744 A29DA694 335 PAK12 PORTIRATE 10746 4001084E 336 VFD 2:VAL,13:0,17:ADR(EEPRTIRATE) 10747 A29DA5A4 337 PAK12 PORTCRD 10749 40010850 338 VFD 2:VAL,13:0,17:ADR(EEPORTCRD) 1074A A29DA610 339 PAK12 PORTFFD 1074C 40010852 340 VFD 2:VAL,13:0,17:ADR(EEPORTFFD) 1074D A29DA700 341 PAK12 PORTLFD 1074F 40010854 342 VFD 2:VAL,13:0,17:ADR(EEPORTLFD) 10750 A29DA66E 343 PAK12 PORTHTD 10752 40010856 344 VFD 2:VAL,13:0,17:ADR(EEPORTHTD) 10753 A29DA575 345 PAK12 PORTBKSP 10755 40010858 346 VFD 2:VAL,13:0,17:ADR(EEPORTBKSP) 10756 A29DA6DB 347 PAK12 PORTKILL 10758 4001085A 348 VFD 2:VAL,13:0,17:ADR(EEPORTKILL) 10759 A29DA57C 349 PAK12 PORTBRK 1075B 4001085C 350 VFD 2:VAL,13:0,17:ADR(EEPORTBRK) 1075C AD4CE334 351 PAK12 RESOURCESLOW 1075E 4001085E 352 VFD 2:VAL,13:0,17:ADR(EERESLOW) 1075F AD4CE334 353 PAK12 RESOURCESOK 10761 40010860 354 VFD 2:VAL,13:0,17:ADR(EERESOK) 10762 C5190800 355 PAK12 VAR 10764 40010862 356 VFD 2:VAL,13:0,17:ADR(EEVAR) 10765 B3677A51 357 PAK12 SESSION 10767 40010823 358 VFD 2:VAL,13:0,17:ADR(EESESSION) 10768 B59FDE75 359 PAK12 STATUS 1076A 8001088D 360 VFD 2:FUNC,13:0,17:ADR(EESTATUS) 1076B BC8BF1C0 361 PAK12 TYPE 1076D 80010895 362 VFD 2:FUNC,13:0,17:ADR(EETYPE) 1076E A30A1600 363 PAK12 PRIV 10770 80010899 364 VFD 2:FUNC,13:0,17:ADR(EEPRIV) 10771 452C6465 365 PAK12 ACCESS 10773 80010897 366 VFD 2:FUNC,13:0,17:ADR(EEACCESS) 10774 B40A35C0 367 PAK12 SIZE 10776 8001089B 368 VFD 2:FUNC,13:0,17:ADR(EESIZE) 10777 AD3D6E7D 369 PAK12 RECVRS 10779 800108A6 370 VFD 2:FUNC,13:0,17:ADR(EERECVRS) 0001077A 371 EEOPNTEND LABEL 1 Assembler C9208 Control Mode C9304 14-Jun-93 17:33 PAGE 88 (CMEXEV) F 10 Expression Evaluator 373 374 ********************************************************************************** 375 * * 376 * This is the beginning of the EE processing code. * 377 * Initialization is done and then we fall into the top of the * 378 * main loop. We loop through EELOOP for each item (operator, * 379 * operand, parenthesis, etc.) that we pick off the input line. * 380 * We then jump off on the right direction based on what we * 381 * got. * 382 * * 383 ********************************************************************************** 384 1077A DD5F4006 5 STAK 385 EEPROCS ENTRNP PUSH enter and make stack 1077B 60000011 0 386 LD R0 TCSAVE get terminator 1077C 6404002C 0 IMM 387 CPR R0 COMMA was it a comma 1077D FE030780 388 JEQ EEPROCS10 if so, skip it 1077E 6404003D 0 IMM 389 CPR R0 EQUAL was it an equal-sign? 1077F FE0D0783 390 JNE EEGO if not, then start processing 391 * \ / 00010780 392 EEPROCS10 LABEL 10780 DC410399 393 CALLNP FETCHITMI else skip past the equal 10781 FE0F0783 394 JMP EEGO then get going!! 395 * --- 396 10782 DD5F4006 5 STAK 397 EEPROC ENTRNP PUSH enter and build stack area 00010783 398 EEGO LABEL 10783 60C4162D 3 IMM 399 LD OPR (ADR(EEOPRSTAK))-EEOPRSEL operator stack address 10784 61041655 4 IMM 400 LD OPN (ADR(EEOPNSTAK))-EEOPNSEL operand stack address 10785 62010643 01 401 LD2 R0 EEOPRTOP get the initial stack element 10786 FE0F08F7 402 JMP EESTAKOPR go initialize operator stack 403 * --- 404 00010787 405 EELOOP LABEL loop here for each item 10787 F7A51522 6 406 JBT ST/INRQ MCBRK exit if user break request 10788 DC41039C 407 CALLNP FETCHITMO get something from dear user 10789 F6BD07B2 2 408 JBT R2/TALPH EESYM alpha. see if in symbol tables 1078A F6BF07E2 2 409 JBT R2/TNUM EENUM number. must be an operand 1078B F6B308AD 2 410 JBT R2/TSTR EESTRNG jump if a string encountered 1078C 64040028 0 IMM 411 CPR R0 LPAREN is it a "("? 1078D FE0D0792 412 JNE EESPEC10 jump if not 1078E 5C174804 5 BASE 413 CMZ SP,EESTATE are we expecting an operand? 1078F FE030797 414 JEQ EEEND quit if wanted operator 10790 62010641 01 415 LD2 R0 EEOPRLP get operator info for "(" 10791 FE0F08F7 416 JMP EESTAKOPR go stack it on operator stack 417 * --- 418 00010792 419 EESPEC10 LABEL 10792 64040029 0 IMM 420 CPR R0 RPAREN is it a ")" ? 10793 FE0D08DE 421 JNE EEOPR go see if known 10794 5C174804 5 BASE 422 CMZ SP,EESTATE are we expecting operator? 10795 FE030916 423 JEQ EEOPR60 go pop operator stack 10796 FE0F07A4 424 JMP EE90 syntax error! 425 * --- 1 Assembler C9208 Control Mode C9304 14-Jun-93 17:33 PAGE 89 (CMEXEV) F 10 Expression Evaluator 427 428 ********************************************************************************** 429 * * 430 * This is where we come to wrap up this fun. The signal * 431 * to finish can be a carriage-return or the word THEN. * 432 * Depending on who called us, one or the other is ok and the * 433 * other is an error. The operator and operand stacks are * 434 * checked to be sure they do not have extra goodies on them, * 435 * and then the last operand (result) is returned to the * 436 * caller. Bye. * 437 * * 438 ********************************************************************************** 439 00010797 440 EEEND LABEL 10797 60040003 0 IMM 441 LD R0 3 say we want to finish up 10798 E0174804 0 5 BASE 442 EXCH R0 SP,EESTATE set the state and get current 10799 FA0D07AC 0 443 JNEZ R0 EE94 if expected operand, bitch 444 * \ / 0001079A 445 EEDONE LABEL 1079A 5C16C800 3 BASE 446 CMZ OPR,EEOPRSYM is this the top of the stack? 1079B FE0D08FE 447 JNE EEOPR30 if not then keep popping 1079C 65041657 4 IMM 448 CPR OPN ADR(EEOPNSTAK) 1079D FE0D07A4 449 JNE EE90 error if not just one operand 1079E 62570800 124 BASE 450 LD2 R1 OPN,EEOPNVS get operand value 1079F 60040000 0 IMM 451 LD R0 0 say we have success 452 * \ / 000107A0 453 EEEXIT LABEL 107A0 DC411121 454 CALLNP VARCLRTMP clear temporary variables 455 * \ / 107A1 61000115 4 456 LD R4 LBUFPT back up the buffer pointer 107A2 E5000116 4 457 ST R4 BUFPT as a favor to our caller 107A3 5D1F4006 5 STAK 458 LEAVE POP return on home 459 * --- 460 000107A4 461 EE90 LABEL 107A4 6005249A 0 IMM 462 LD R0 ADR(ERM257) "SYNTAX ERROR" 107A5 FE0F07A0 463 JMP EEEXIT 464 * --- 465 000107A6 466 EE91 LABEL 107A6 600524A0 0 IMM 467 LD R0 ADR(ERM258) "STACK OVERFLOW" 107A7 FE0F07A0 468 JMP EEEXIT 469 * --- 470 000107A8 471 EE92 LABEL 107A8 6005247D 0 IMM 472 LD R0 ADR(ERM252) "INVALID OPERAND" 107A9 FE0F07A0 473 JMP EEEXIT 474 * --- 475 000107AA 476 EE93 LABEL 107AA 600528C7 0 IMM 477 LD R0 ADR(ERM617) "Divide by zero" 107AB FE0F07A0 478 JMP EEEXIT 479 * --- 480 000107AC 481 EE94 LABEL 107AC 6005248D 0 IMM 482 LD R0 ADR(ERM255) "Expecting operand" 1 Assembler C9208 Control Mode C9304 14-Jun-93 17:33 PAGE 90 (CMEXEV) F 10 Expression Evaluator 107AD FE0F07A0 483 JMP EEEXIT 484 * --- 485 000107AE 486 EE95 LABEL 107AE 600524BF 0 IMM 487 LD R0 ADR(ERM262) "Port Characteristics Not Available" 107AF FE0F07A0 488 JMP EEEXIT 489 * --- 490 000107B0 491 EE96 LABEL 107B0 6005268C 0 IMM 492 LD R0 ADR(ERM364) "Information is unavailable" 107B1 FE0F07A0 493 JMP EEEXIT 494 * --- 1 Assembler C9208 Control Mode C9304 14-Jun-93 17:33 PAGE 91 (CMEXEV) F 10 Expression Evaluator 496 497 ********************************************************************************** 498 * * 499 * This section is arrived at for each symbol we find in * 500 * the main loop. The symbol is first checked to see if it is * 501 * an operand, and if it is not, we jump on to the 'operator' * 502 * section. Otherwise, we process the operand based upon its * 503 * type. * 504 * * 505 ********************************************************************************** 506 000107B2 507 EESYM LABEL (symbol table search) 107B2 5C174804 5 BASE 508 CMZ SP,EESTATE what do we want next? 107B3 FE0308DE 509 JEQ EEOPR jump if want operator 107B4 620000D5 01 510 LD2 R0 SBUFFW set up search for operand 107B5 6401063D 0 511 CPR R0 EEOPRNOT make special check for NOT 107B6 FE0308DE 512 JEQ EEOPR if so we're in the wrong place 107B7 E6D74801 345 BASE 513 ST2 OPR SP,EETMP save stack pointers 107B8 DC410477 514 CALLNP PACKER convert to packed format 107B9 E6000014 01 515 ST2 R0 VNAME set up to check for variable 107BA 68010040 0 516 UCPR R0 VARBANGLOW is this a legal variable name 107BB FE0707C2 517 JGE EESYM05 check if it's a special ! name 107BC DC4110F5 518 CALLNP VARCHK do we have this variable?? 107BD FAC307CF 3 519 JEQZ VAR EESYM10 if not, may be normal operand 107BE 5C08C010 3 ZBM 520 CMZ VAR,VARTYPE variable exists,is it numeric? 107BF FE0D08B7 521 JNE EESTRVAR process string if not 107C0 6056C803 1 3 BASE 522 LD R1 VAR,VARVALUE get the value it holds 107C1 FE0F07DA 523 JMP EEOPN and head back with an operand 524 * --- 525 000107C2 526 EESYM05 LABEL 107C2 68010041 0 527 UCPR R0 VARBANGHIGH does it begin with a ! 107C3 FE0507CF 528 JGT EESYM10 no, it must be something else 107C4 58C40014 IMM 529 IORPSR MODIFBIT+CARRYBIT use unsigned arithmetic 107C5 10010040 0 530 SUB R0 VARBANGLOW subtract off leading ! 107C6 58840004 IMM 531 CLBPSR CARRYBIT clear carry bit 107C7 62924000 231 REG 532 LD2 R2 R1 move 2nd half out of harms way 107C8 1C040028 0 IMM 533 MUL R0 40 move char in word 1 up 1 position 107C9 1481003D 2 534 DIV R2 VAR0LOW separate top character off word 2 107CA 1CC40028 3 IMM 535 MUL R3 40 move char in word 2 up 1 position 107CB 18528000 1 2 REG 536 ADD R1 R2 place char from word 2 in word 1 107CC E4400014 1 537 ST R1 VNAME store 1st word 107CD E5000015 4 538 ST R4 VNAME(1) store 2nd word 107CE 58840010 IMM 539 CLBPSR MODIFBIT 540 * \ / 000107CF 541 EESYM10 LABEL (not a variable, try symbol) 107CF 60850645 2 IMM 542 LD R2 ADR(EEOPNTAB) get symbol table address 107D0 62000014 01 543 LD2 R0 VNAME get the symbol again 544 * \ / 000107D1 545 EESYM20 LABEL 107D1 66168800 012 BASE 546 CPR2 R0 R2,EEOPNSYM see if a match 107D2 FE0307D7 547 JEQ EESYM30 jump if we found it 107D3 18840003 2 IMM 548 ADD R2 EEOPNTEL advance to next element 107D4 6485077A 2 IMM 549 CPR R2 ADR(EEOPNTEND) see if off the end 107D5 FE0907D1 550 JLT EESYM20 jump if more to examine 107D6 FE0F07A8 551 JMP EE92 I'm tired of looking! 1 Assembler C9208 Control Mode C9304 14-Jun-93 17:33 PAGE 92 (CMEXEV) F 10 Expression Evaluator 552 * --- 553 000107D7 554 EESYM30 LABEL 107D7 60088022 0 2 ZBM 555 LD R0 R2,EEOPNTYP get operand type 107D8 5CA10618 0 556 LDPC EEOPNPROC(R0) go to proper routine 557 * --- 558 000107D9 559 EEOPNABS LABEL (absolute value) 107D9 60489F12 1 2 ZBM 560 LD R1 R2,EEOPNVAL get symbol value 561 * \ / 000107DA 562 EEOPN LABEL stack new operand 107DA 62D74801 345 BASE 563 LD2 OPR SP,EETMP restore OPR and OPN stack ptrs 564 * \ / 000107DB 565 EEOPNX LABEL 107DB D1520000 0 REG 566 STMW R0 say this is numeric 567 * \ / 000107DC 568 EEOPNS LABEL 107DC EC174804 5 BASE 569 STZ SP,EESTATE set to expecting operator 107DD 19040002 4 IMM 570 ADD OPN EEOPNSEL push operand stack 107DE 6504167F 4 IMM 571 CPR OPN ADR(EEOPNSTKL) see if stack overflow 107DF FE0707A6 572 JGE EE91 jump if stack overflow 107E0 E6170800 014 BASE 573 ST2 R0 OPN,EEOPNVS place new operand on stack 107E1 FE0F0787 574 JMP EELOOP back around again 575 * --- 576 000107E2 577 EENUM LABEL (numeric item) 107E2 5C174804 5 BASE 578 CMZ SP,EESTATE what are we expecting? 107E3 FE030797 579 JEQ EEEND quit if expecting operator 107E4 6040011C 1 580 LD R1 VALUE get item value 107E5 FE0F07DB 581 JMP EEOPNX go place on stack 582 * --- 583 584 ********************************************************************************** 585 * * 586 * The following values must be determined from various * 587 * sources of information. * 588 * * 589 ********************************************************************************** 590 000107E6 591 EEOPNCALC LABEL (value must be determined) 107E6 5C889F12 2 ZBM 592 LDPC R2,EEOPNADR go to proper address 593 * --- 594 000107E7 595 EETIME LABEL TIME (cpu time used) 107E7 600400A1 0 IMM 596 LD R0 URCPTIMEG 107E8 09040000 IMM 597 UREQ XREQ ask system for time 107E9 60528000 1 2 REG 598 LD R1 R2 wrong register 107EA FE0F07DA 599 JMP EEOPN 600 * --- 601 000107EB 602 EETIMLIM LABEL TIMLIM (cpu time limit) 107EB 600400A1 0 IMM 603 LD R0 URCPTIMEG 107EC 09040000 IMM 604 UREQ XREQ 107ED FE0F07DA 605 JMP EEOPN grab it and run 606 * --- 607 1 Assembler C9208 Control Mode C9304 14-Jun-93 17:33 PAGE 93 (CMEXEV) F 10 Expression Evaluator 000107EE 608 EEBLOCKS LABEL BLOCKS (output blocks produced) 107EE 600400B1 0 IMM 609 LD R0 URSESBLKG 107EF 09040000 IMM 610 UREQ XREQ get from system 107F0 60528000 1 2 REG 611 LD R1 R2 transfer 107F1 FE0F07DA 612 JMP EEOPN 613 * --- 614 000107F2 615 EEBLKLIM LABEL BLKLIM (output block limit) 107F2 600400B1 0 IMM 616 LD R0 URSESBLKG 107F3 09040000 IMM 617 UREQ XREQ 107F4 FE0F07DA 618 JMP EEOPN 619 * --- 620 000107F5 621 EEABNORMAL LABEL ABNORMAL (abort status set) 107F5 604B8810 1 6 CBM 622 LD R1 ST/ABRT 107F6 FE0F07DA 623 JMP EEOPN 624 * --- 625 000107F7 626 EEBREAK LABEL BREAKTRAP (break processing set) 107F7 604B9010 1 6 CBM 627 LD R1 ST/BREAK 107F8 FE0F07DA 628 JMP EEOPN 629 * --- 630 000107F9 631 EEBATCH LABEL BATCH (batch user) 107F9 604B8210 1 6 CBM 632 LD R1 ST/TRM 107FA FE0F0801 633 JMP EENOTOPN 634 * --- 635 000107FB 636 EESKILL LABEL SKILL (skill level) 107FB 604B9220 1 6 CBM 637 LD R1 ST/SKIL get skill level from status 107FC 6063009B 1 1 638 LD R1 BITTAB(R1) get a bit 107FD FE0F07DA 639 JMP EEOPN 640 * --- 641 000107FE 642 EEDOFILE LABEL DOFILE (DO file processing) 107FE 604B8610 1 6 CBM 643 LD R1 ST/NDO 107FF FE0F0801 644 JMP EENOTOPN 645 * --- 646 00010800 647 EENORMAL LABEL NORMAL (not aborted) 10800 604B8810 1 6 CBM 648 LD R1 ST/ABRT 649 * \ / 00010801 650 EENOTOPN LABEL 10801 74440001 1 IMM 651 XOR R1 1 switch our thinking 10802 FE0F07DA 652 JMP EEOPN 653 * --- 654 00010803 655 EEONLINE LABEL ONLINE (on-line terminal user) 10803 604B8210 1 6 CBM 656 LD R1 ST/TRM 10804 FE0F07DA 657 JMP EEOPN 658 * --- 659 00010805 660 EEDATE LABEL DATE (yymmdd) 10805 60040063 0 IMM 661 LD R0 URUNLDATE 10806 09040000 IMM 662 UREQ XREQ get date from system 10807 624A16C0 120 CBM 663 LD2 R1 R0/YRBITS 1 Assembler C9208 Control Mode C9304 14-Jun-93 17:33 PAGE 94 (CMEXEV) F 10 Expression Evaluator 10808 58C40010 IMM 664 IORPSR MODIFBIT set funny arithmetic 10809 14440064 1 IMM 665 DIV R1 100 1080A 58840010 IMM 666 CLBPSR MODIFBIT 1080B 1C840064 2 IMM 667 MUL R2 100 this seems like work 1080C 188A2E40 2 0 CBM 668 ADD R2 R0/MOBITS now add in the month 1080D 1C840064 2 IMM 669 MUL R2 100 1080E 188A3650 2 0 CBM 670 ADD R2 R0/DABITS and add the date 1080F 60528000 1 2 REG 671 LD R1 R2 10810 FE0F07DA 672 JMP EEOPN that wasn't too bad, was it? 673 * --- 674 00010811 675 EEMONTH LABEL MONTH (mm) 10811 60040063 0 IMM 676 LD R0 URUNLDATE 10812 09040000 IMM 677 UREQ XREQ get system date 10813 604A2E40 1 0 CBM 678 LD R1 R0/MOBITS extract the month number 10814 FE0F07DA 679 JMP EEOPN that was very easy 680 * --- 681 00010815 682 EEDAY LABEL DAY (day of the week) 10815 60040063 0 IMM 683 LD R0 URUNLDATE 10816 09040000 IMM 684 UREQ XREQ 10817 6052C000 1 3 REG 685 LD R1 R3 system gives day in R3 (nice!) 10818 FE0F07DA 686 JMP EEOPN 687 * --- 688 00010819 689 EEHOUR LABEL HOUR (time of day hhmm) 10819 60040063 0 IMM 690 LD R0 URUNLDATE 1081A 09040000 IMM 691 UREQ XREQ 1081B 1484EA60 2 IMM 692 DIV R2 60*1000 zap seconds and milliseconds 1081C 62128000 012 REG 693 LD2 R0 R2 juggle 1081D 58C40010 IMM 694 IORPSR MODIFBIT 1081E 1404003C 0 IMM 695 DIV R0 60 get hours and minutes 1081F 58840010 IMM 696 CLBPSR MODIFBIT 10820 1C040064 0 IMM 697 MUL R0 100 this is pure shit 10821 18520000 1 0 REG 698 ADD R1 R0 this should do it 10822 FE0F07DA 699 JMP EEOPN 700 * --- 701 00010823 702 EESESSION LABEL 10823 60040052 0 IMM 703 LD R0 URPROCINFO session information request 10824 60444000 1 IMM 704 LD R1 SYSBUFL buffer length 10825 60840400 2 IMM 705 LD R2 ADR (SYSBUF) first page of catalog buffer 10826 09040000 IMM 706 UREQ 0 ask info on ourselves 10827 FA0907B0 0 707 JLTZ R0 EE96 should probably not happen 10828 60440400 1 IMM 708 LD R1 ADR (SYSBUF) restore address to buffer 10829 604840F0 1 1 ZBM 709 LD R1 R1,0/BITS 0:14 extract session number 1082A FE0F07DA 710 JMP EEOPN 711 * --- 712 0001082B 713 EELOGON LABEL 1082B 38C00402 3 714 LEA R3 SYSBUF/PILOGACCT 1082C FE0F082E 715 JMP EEGETACCT 716 * --- 0001082D 717 EEALIAS LABEL 1082D 38C00408 3 718 LEA R3 SYSBUF/PIALIASACT 719 * \ / 1 Assembler C9208 Control Mode C9304 14-Jun-93 17:33 PAGE 95 (CMEXEV) F 10 Expression Evaluator 0001082E 720 EEGETACCT LABEL 1082E 60040052 0 IMM 721 LD R0 URPROCINFO session information request 1082F 60444000 1 IMM 722 LD R1 SYSBUFL buffer length 10830 60840400 2 IMM 723 LD R2 ADR (SYSBUF) first page of catalog buffer 10831 09040000 IMM 724 UREQ 0 ask info on ourselves 10832 FA0907B0 0 725 JLTZ R0 EE96 should probably not happen 10833 FE0F08CA 726 JMP EEACCTNAME go extract selected account name 727 * --- 728 00010834 729 EETRAFFIC LABEL TRAFFIC (number of users) 10834 60040050 0 IMM 730 LD R0 URTRAFFIC 10835 09040000 IMM 731 UREQ XREQ get value from system 10836 FE0F07DA 732 JMP EEOPN 733 * --- 734 00010837 735 EELOAD LABEL LOAD (load factor - bogging) 10837 60040051 0 IMM 736 LD R0 URLOADFACT 10838 09040000 IMM 737 UREQ XREQ 10839 FE0F07DA 738 JMP EEOPN and this was easy 739 * --- 740 0001083A 741 EEPORTNUM LABEL PORTNUM (Port number) 1083A 6004012E 0 IMM 742 LD R0 FRTGETPORT get find port number request 1083B 088400C9 IMM 743 FREQ LUNAIN+XREQ pick up the value 1083C FA0907AE 0 744 JLTZ R0 EE95 give up on error 1083D 60124000 0 1 REG 745 LD R0 R1 put where needed 1083E FE0F08BF 746 JMP EEPORTNBR convert to port number 747 * --- 748 0001083F 749 EEPORTRATE LABEL PORTRATE (Port rate) 1083F 60040129 0 IMM 750 LD R0 FRTGETRATE 751 * \ / 00010840 752 EEPORT LABEL 10840 088400C9 IMM 753 FREQ LUNAIN+XREQ pick up the value 10841 FA0907AE 0 754 JLTZ R0 EE95 give up on error 10842 FE0F07DA 755 JMP EEOPN 756 * --- 757 00010843 758 EEPORTTYPE LABEL PORTTYPE (Port type) 10843 60040120 0 IMM 759 LD R0 FRTGETTYPE 10844 088400C9 IMM 760 FREQ LUNAIN+XREQ 10845 FA0907AE 0 761 JLTZ R0 EE95 give up on error 10846 62144000 0112 PAIR 762 LD2 R0 PAIR R1 get value where needed 10847 FE0F08BB 763 JMP EEPAK12 convert pack-6 to string 764 * --- 765 00010848 766 EEPORTLEN LABEL PORTLEN (Port length) 10848 60040127 0 IMM 767 LD R0 FRTGETSH 10849 FE0F0840 768 JMP EEPORT 769 * --- 770 0001084A 771 EEPORTWID LABEL PORTWID (Port width) 1084A 60040126 0 IMM 772 LD R0 FRTGETCW 1084B FE0F0840 773 JMP EEPORT 774 * --- 775 1 Assembler C9208 Control Mode C9304 14-Jun-93 17:33 PAGE 96 (CMEXEV) F 10 Expression Evaluator 0001084C 776 EEPORTECHO LABEL PORTECHO (Port echo mode) 1084C 60040128 0 IMM 777 LD R0 FRTGETECHO 1084D FE0F0840 778 JMP EEPORT 779 * --- 780 0001084E 781 EEPRTIRATE LABEL PORTIRATE (Port input baud rate) 1084E 6004012C 0 IMM 782 LD R0 FRTGETIRAT 1084F FE0F0840 783 JMP EEPORT 784 * --- 785 00010850 786 EEPORTCRD LABEL PORTCRD (Port carriage return delay) 10850 60040121 0 IMM 787 LD R0 FRTGETCRD 10851 FE0F0840 788 JMP EEPORT 789 * --- 790 00010852 791 EEPORTFFD LABEL PORTFFD (Port forms feed delay) 10852 60040123 0 IMM 792 LD R0 FRTGETFFD 10853 FE0F0840 793 JMP EEPORT 794 * --- 795 00010854 796 EEPORTLFD LABEL PORTLFD (Port line feed delay) 10854 60040122 0 IMM 797 LD R0 FRTGETLFD 10855 FE0F0840 798 JMP EEPORT 799 * --- 800 00010856 801 EEPORTHTD LABEL PORTHTD (Port horizontal tab delay) 10856 60040232 0 IMM 802 LD R0 FRTGETHTD 10857 FE0F0840 803 JMP EEPORT 804 * --- 805 00010858 806 EEPORTBKSP LABEL PORTBKSP (Port back space character) 10858 60040124 0 IMM 807 LD R0 FRTGETBKSP 10859 FE0F0840 808 JMP EEPORT 809 * --- 810 0001085A 811 EEPORTKILL LABEL PORTKILL (Port line kill character) 1085A 60040125 0 IMM 812 LD R0 FRTGETKILL 1085B FE0F0840 813 JMP EEPORT 814 * --- 815 0001085C 816 EEPORTBRK LABEL PORTBRK (Port break character) 1085C 60040233 0 IMM 817 LD R0 FRTGETBRCH 1085D FE0F0840 818 JMP EEPORT 819 * --- 820 0001085E 821 EERESLOW LABEL 1085E 604B8E10 1 6 CBM 822 LD R1 ST/VMFISR RESOURCESLOW (insufficent system resources) 1085F FE0F07DA 823 JMP EEOPN 824 * --- 825 00010860 826 EERESOK LABEL 10860 604B8E10 1 6 CBM 827 LD R1 ST/VMFISR RESOURCESOK (sufficent system resources) 10861 FE0F0801 828 JMP EENOTOPN 829 * --- 830 00010862 831 EEVAR LABEL VAR(var) variable status 1 Assembler C9208 Control Mode C9304 14-Jun-93 17:33 PAGE 97 (CMEXEV) F 10 Expression Evaluator 10862 DC410399 832 CALLNP FETCHITMI get next item 10863 F2BB07A4 2 833 JBF R2/TDELM EE90 jump if not delimiter 10864 64040028 0 IMM 834 CPR R0 LPAREN must be a parenthesis 10865 FE0D07A4 835 JNE EE90 error if not 10866 DC410399 836 CALLNP FETCHITMI now get variable name 10867 F2BD07A4 2 837 JBF R2/TALPH EE90 jump if not alpha 10868 DC410477 838 CALLNP PACKER pack up symbol for VAR search 10869 E6000014 01 839 ST2 R0 VNAME now we can look for it 1086A DC4110F5 840 CALLNP VARCHK go see if it exists 1086B FAC3086E 3 841 JEQZ VAR EEVAR10 jump if it doesn't 1086C 60C8C010 3 3 ZBM 842 LD VAR VAR,VARTYPE get its type 1086D 18C40001 3 IMM 843 ADD VAR 1 bias 844 * \ / 0001086E 845 EEVAR10 LABEL 1086E DC410399 846 CALLNP FETCHITMI now get next item 1086F F2BB07A4 2 847 JBF R2/TDELM EE90 must be a right-paren 10870 64040029 0 IMM 848 CPR R0 RPAREN all else fails 10871 FE0D07A4 849 JNE EE90 10872 6052C000 1 3 REG 850 LD R1 VAR get the type where needed 10873 FE0F07DA 851 JMP EEOPN go stack it 852 * --- 853 854 ********************************************************************************** 855 * * 856 * The following values are functions which operate on a * 857 * file or variable. The file functions may have to equip the * 858 * unit, test it, and then unequip it. * 859 * * 860 ********************************************************************************** 861 00010874 862 EEOPNFUNC LABEL lun function 10874 60C89F12 3 2 ZBM 863 LD R3 R2,EEOPNADR get processing address 10875 DC410399 864 CALLNP FETCHITMI get next item 10876 F2BB07A4 2 865 JBF R2/TDELM EE90 must be a left-paren 10877 64040028 0 IMM 866 CPR R0 LPAREN anything else is an error 10878 FE0D07A4 867 JNE EE90 10879 DC410DC1 868 CALLNP FILEGET now get a lun 1087A FA050884 0 869 JGTZ R0 EEFUNC10 jump if error with line 1087B DC410399 870 CALLNP FETCHITMI be sure a ")" follows 1087C F2BB0883 2 871 JBF R2/TDELM EEFUNC05 error if not 1087D 64040029 0 IMM 872 CPR R0 RPAREN 1087E FE0D0883 873 JNE EEFUNC05 preserve the "clean-deal" 1087F 60040010 0 IMM 874 LD R0 FRSTATUS now get status request 10880 08800009 875 FREQ LUN(XREQ) 10881 FA090886 0 876 JLTZ R0 EEFUNCUD jump if undefined lun 10882 5C92C000 3 REG 877 LDPC R3 go to proper routine 878 * --- 879 00010883 880 EEFUNC05 LABEL (bad syntax) 10883 6005249A 0 IMM 881 LD R0 ADR(ERM257) "SYNTAX ERROR" 882 * \ / 00010884 883 EEFUNC10 LABEL (error in line) 10884 DC410E35 884 CALLNP FREEFILE give up the lun 10885 FE0F07A0 885 JMP EEEXIT go give an error 886 * --- 887 1 Assembler C9208 Control Mode C9304 14-Jun-93 17:33 PAGE 98 (CMEXEV) F 10 Expression Evaluator 00010886 888 EEFUNCUD LABEL (undefined lun) 10886 60440000 1 IMM 889 LD R1 0 return junk operand 10887 64C5089B 3 IMM 890 CPR R3 ADR(EESIZE) are we to return a size 10888 FE0307B0 891 JEQ EE96 tell them we couldn't do it 10889 64C50895 3 IMM 892 CPR R3 ADR(EETYPE) is it hardware-type request? 1088A FE0D07DA 893 JNE EEOPN jump if not 1088B 60440000 1 IMM 894 LD R1 EEUNDEF otherwise use proper type code 1088C FE0F07DA 895 JMP EEOPN return 'undefined' hardware type 896 * --- 897 0001088D 898 EESTATUS LABEL (status function) 1088D F6210890 0 899 JBT R0/RTSP SYSRECTYPE jump if system record type 1088E EC0A2040 0 CBM 900 STZ R0/RECTYPE clear any normal record types 1088F FE0F0892 901 JMP EESTAT10 jump to combine statuses 902 * --- 903 00010890 904 SYSRECTYPE LABEL 10890 F6270892 0 905 JBT R0/EOD EESTAT10 if EOD or AEOD not EOF 10891 EDCA2210 0 CBM 906 STW R0/EOF say its at end-of-file 907 * \ / 00010892 908 EESTAT10 LABEL 10892 7C124000 0 1 REG 909 IOR R0 R1 put the two together 10893 780478C0 0 IMM 910 AND R0 STATMASK+WWCSVMASK mask off irrelavant bits 10894 FE0F08AA 911 JMP EEFUNCEND and go wrap up 912 * --- 913 00010895 914 EETYPE LABEL (hardware type function) 10895 600A7460 0 1 CBM 915 LD R0 R1/HWFIELD get the hardware typ0e 10896 FE0F08AA 916 JMP EEFUNCEND 917 * --- 918 00010897 919 EEACCESS LABEL (access function) 10897 600A6630 0 1 CBM 920 LD R0 R1/ACFIELD 10898 FE0F08AA 921 JMP EEFUNCEND 922 * --- 923 00010899 924 EEPRIV LABEL (privilege function) 10899 600A5C40 0 1 CBM 925 LD R0 R1/PVFIELD 1089A FE0F08AA 926 JMP EEFUNCEND 927 * --- 928 0001089B 929 EESIZE LABEL (size function) 1089B 600400E0 0 IMM 930 LD R0 FRCATALOG request for catalog information 1089C 60444000 1 IMM 931 LD R1 SYSBUFL maximum length 1089D 60840400 2 IMM 932 LD R2 ADR(SYSBUF) our catalog info buffer 1089E 08800009 933 FREQ LUN(XREQ) let her rip 1089F FA0907B0 0 934 JLTZ R0 EE96 let them know we had problems 108A0 30444000 1 IMM 935 RSB R1 SYSBUFL see how much we actually got 108A1 6444002B 1 IMM 936 CPR R1 DIRHWIDE*4+11 did we just get a header 108A2 FE0B07B0 937 JLE EE96 probably an illegal request 108A3 18968800 2 2 BASE 938 ADD R2 R2,DIRHLNTH skip the header information 108A4 6008A18A 0 2 ZBM 939 LD R0 R2,DIRTFL get the file length (in blocks) 108A5 FE0F08AA 940 JMP EEFUNCEND 941 * --- 942 000108A6 943 EERECVRS LABEL 1 Assembler C9208 Control Mode C9304 14-Jun-93 17:33 PAGE 99 (CMEXEV) F 10 Expression Evaluator 108A6 6004012F 0 IMM 944 LD R0 FRTGETRCVR get port receivers 108A7 08800009 945 FREQ LUN(XREQ) unit number 108A8 FA0907B0 0 946 JLTZ R0 EE96 let them know we had problems 108A9 600A7840 0 1 CBM 947 LD R0 R1/BITS 28:31 get interesting bits 948 * \ / 000108AA 949 EEFUNCEND LABEL 108AA DC410E35 950 CALLNP FREEFILE give up the lun 108AB 60520000 1 0 REG 951 LD R1 R0 transfer the operand 108AC FE0F07DA 952 JMP EEOPN go stack the operand 953 * --- 954 955 ********************************************************************************** 956 * * 957 * This is for processing strings. If an operand is * 958 * expected then the string is moved into the variable list * 959 * with a zero name, and then the operand element stacked like * 960 * any other operands. Otherwise, wrap-up processing is * 961 * performed. * 962 * * 963 ********************************************************************************** 964 000108AD 965 EESTRNG LABEL 108AD 5C174804 5 BASE 966 CMZ SP,EESTATE expecting operator? 108AE FE030797 967 JEQ EEEND wrap-up if so 108AF E6D74801 345 BASE 968 ST2 OPR SP,EETMP save stack pointers 108B0 604400D5 1 IMM 969 LD R1 ADR(SBUFFW) get string address 108B1 6080011C 2 970 LD R2 VALUE get string length 971 * \ / 000108B2 972 EESTRNG10 LABEL 108B2 EE000014 973 STZ2 VNAME clear variable name 108B3 E4400016 1 974 ST R1 VTYPE string address for VARMAKE 108B4 E4800017 2 975 ST R2 SETVALUE string length for VARMAKE 108B5 DC411139 976 CALLNP VARMAKE and go create it 108B6 FA0D07A0 0 977 JNEZ R0 EEEXIT bail out fast if error 978 * \ / 000108B7 979 EESTRVAR LABEL 108B7 6016C803 0 3 BASE 980 LD R0 VAR,VARSTRLEN string length 108B8 6052C000 1 3 REG 981 LD R1 VAR variable pointer 108B9 62D74801 345 BASE 982 LD2 OPR SP,EETMP restore stack pointers 108BA FE0F07DC 983 JMP EEOPNS then go merge back in 984 * --- 985 986 ********************************************************************************** 987 * * 988 * This is for turning PAK12 values in R0, R1 into strings * 989 * so they can be used as operands. * 990 * * 991 ********************************************************************************** 992 000108BB 993 EEPAK12 LABEL 108BB EC128000 2 REG 994 STZ R2 (output buffer pointer) 108BC DC410C32 995 CALLNP UP12 go unpack it 108BD 60441400 1 IMM 996 LD R1 ADR(OBUFF) string address 108BE FE0F08B2 997 JMP EESTRNG10 and merge in 998 * --- 999 1 Assembler C9208 Control Mode C9304 14-Jun-93 17:33 PAGE 100 (CMEXEV) F 10 Expression Evaluator 1000 ********************************************************************************** 1001 * * 1002 * This is for turning the port number into a string so it * 1003 * can be used as an operand. * 1004 * * 1005 ********************************************************************************** 1006 000108BF 1007 EEPORTNBR LABEL 108BF EC128000 2 REG 1008 STZ R2 (output buffer pointer) 108C0 DC410B00 1009 CALLNP NUMTOPORT calculate port number 108C1 60441400 1 IMM 1010 LD R1 ADR(OBUFF) string address 108C2 60840003 2 IMM 1011 LD R2 3 length of port number 108C3 FE0F08B2 1012 JMP EESTRNG10 and merge in 1013 * --- 1014 1015 ********************************************************************************** 1016 * * 1017 * This is for turning a packed account name, pointed to * 1018 * by R3, into a string for use as an operand. * 1019 * * 1020 ********************************************************************************** 1021 1022 BLOCK 1023 ENTRY EEACCTNAME 1024 000108C4 1025 ACCTINFO BASE R3 0016C800 3 BASE 1026 ACCTVOL BSS 2 0016C802 3 BASE 1027 ACCTSYS BSS 1 0016C803 3 BASE 1028 ACCTACCT BSS 2 0016C805 3 BASE 1029 ACCTDIVPRJ BSS 1 1030 DRCT 1031 000108CA 1032 EEACCTNAME LABEL 108CA EC128000 2 REG 1033 STZ R2 initialize buffer pointer 108CB 6216C800 013 BASE 1034 LD2 R0 R3,ACCTVOL unpack the volume name 108CC DC410C32 1035 CALLNP UP12 108CD 6004002E 0 IMM 1036 LD R0 DOT add a period 108CE E435000A 0 2 @ 1037 ST R0 @OBPT(R2) 108CF 18840001 2 IMM 1038 ADD R2 1 108D0 6016C802 0 3 BASE 1039 LD R0 R3,ACCTSYS unpack the system name 108D1 DC410C09 1040 CALLNP UP6 108D2 6004003A 0 IMM 1041 LD R0 COLON add a colon 108D3 E435000A 0 2 @ 1042 ST R0 @OBPT(R2) 108D4 18840001 2 IMM 1043 ADD R2 1 108D5 6216C803 013 BASE 1044 LD2 R0 R3,ACCTACCT unpack the account name 108D6 DC410C32 1045 CALLNP UP12 108D7 6004002E 0 IMM 1046 LD R0 DOT add a period 108D8 E435000A 0 2 @ 1047 ST R0 @OBPT(R2) 108D9 18840001 2 IMM 1048 ADD R2 1 108DA 6016C805 0 3 BASE 1049 LD R0 R3,ACCTDIVPRJ and unpack the division/project 108DB DC410C09 1050 CALLNP UP6 108DC 60441400 1 IMM 1051 LD R1 ADR(OBUFF) string address 108DD FE0F08B2 1052 JMP EESTRNG10 and pretend it was a string all along 1053 * --- 1054 1055 END 1 Assembler C9208 Control Mode C9304 14-Jun-93 17:33 PAGE 101 (CMEXEV) F 10 Expression Evaluator 1057 1058 ********************************************************************************** 1059 * * 1060 * This section is entered for each operator we find. * 1061 * Operators may be special characters (+ - * / ), or may be * 1062 * known symbols (EQ, AND, NE, OR, etc.) Based upon the * 1063 * operator precedence, the operation is either performed or * 1064 * stacked. We also check for unary or binary operations. * 1065 * * 1066 ********************************************************************************** 1067 000108DE 1068 EEOPR LABEL 108DE 60974804 2 5 BASE 1069 LD R2 SP,EESTATE get processing state 108DF 64840001 2 IMM 1070 CPR R2 1 is an operand required? 108E0 FE0307AC 1071 JEQ EE94 go complain about this 108E1 600000D5 0 1072 LD R0 SBUFFW get the symbol 108E2 60450623 1 IMM 1073 LD R1 ADR(EEOPRTAB) set up to search operator table 1074 * \ / 000108E3 1075 EEOPR10 LABEL 108E3 64164800 0 1 BASE 1076 CPR R0 R1,EEOPRSYM compare to table element 108E4 FE0308E9 1077 JEQ EEOPR20 jump if a match 108E5 18440002 1 IMM 1078 ADD R1 EEOPRTEL advance to next entry 108E6 6445063F 1 IMM 1079 CPR R1 ADR(EEOPRTEND) off the end yet?? 108E7 FE0908E3 1080 JLT EEOPR10 go around again if not 108E8 FE0F0797 1081 JMP EEEND assume we are finished 1082 * --- 1083 000108E9 1084 EEOPR20 LABEL (have a match with opr table) 108E9 FA8308F0 2 1085 JEQZ R2 EEOPR27 jump if want binary operator 108EA 6404002D 0 IMM 1086 CPR R0 MINUS is this a minus sign? 108EB FE0D08ED 1087 JNE EEOPR25 jump if not 108EC 6045063F 1 IMM 1088 LD R1 ADR(EEUMINUS) else switch to unary minus 1089 * \ / 000108ED 1090 EEOPR25 LABEL 108ED 5C084011 1 ZBM 1091 CMZ R1,EEOPRUN is this a unary operator? 108EE FE0D08F2 1092 JNE EEOPROK jump if so - go process 108EF FE0F07AC 1093 JMP EE94 go say we expected an operand 1094 * --- 1095 000108F0 1096 EEOPR27 LABEL 108F0 5C084011 1 ZBM 1097 CMZ R1,EEOPRUN want binary operator, is it? 108F1 FE0D07A4 1098 JNE EE90 go give a syntax error 1099 * \ / 000108F2 1100 EEOPROK LABEL 108F2 E4574805 1 5 BASE 1101 ST R1 SP,EEOPRSAVE save the operator pointer 108F3 60084241 0 1 ZBM 1102 LD R0 R1,EEOPRPREC get operation precedence 108F4 6408C241 0 3 ZBM 1103 CPR R0 OPR,EEOPRPREC compare with top of stack 108F5 FE0B08FE 1104 JLE EEOPR30 go do it if lower or same 108F6 62164800 011 BASE 1105 LD2 R0 R1,EEOPRSYM get whole operator data element 1106 * \ / 000108F7 1107 EESTAKOPR LABEL 108F7 18C40002 3 IMM 1108 ADD OPR EEOPRSEL advance stack pointer 108F8 64C41657 3 IMM 1109 CPR OPR ADR(EEOPRSTKL) see if stack full 108F9 FE0707A6 1110 JGE EE91 jump if stack overflow 108FA E616C800 013 BASE 1111 ST2 R0 OPR,EEOPRSYM place on top of stack 108FB 6008CA31 0 3 ZBM 1112 LD R0 OPR,EEOPRNXST get the next processing state 1 Assembler C9208 Control Mode C9304 14-Jun-93 17:33 PAGE 102 (CMEXEV) F 10 Expression Evaluator 108FC E4174804 0 5 BASE 1113 ST R0 SP,EESTATE and set for the next pass 108FD FE0F0787 1114 JMP EELOOP done. back for next item 1115 * --- 1116 000108FE 1117 EEOPR30 LABEL (perform operation) 108FE 6216C800 013 BASE 1118 LD2 R0 OPR,EEOPRSYM get operation data element 108FF 10C40002 3 IMM 1119 SUB OPR EEOPRSEL pop the stack 10900 60124000 0 1 REG 1120 LD R0 R1 save from harm 10901 D1524000 1 REG 1121 STMW R1 clear status in case unary 10902 F6010905 0 1122 JBT R0/EEUNARY EEOPR40 jump if unary operation 10903 62570800 124 BASE 1123 LD2 R1 OPN,EEOPNVS get an operand 10904 11040002 4 IMM 1124 SUB OPN EEOPNSEL pop operand stack 1125 * \ / 00010905 1126 EEOPR40 LABEL (unary operator) 10905 E6D74801 345 BASE 1127 ST2 OPR SP,EETMP save stack pointers 10906 62D70800 344 BASE 1128 LD2 R3 OPN,EEOPNVS get operand 10907 E092C000 2 3 REG 1129 EXCH R2 R3 switch type(2) with value(1) 10908 FA6F0936 1 1130 JNEMW R1 EEOPRSTRNG jump if operand is a string 10909 FAAF07A4 2 1131 JNEMW R2 EE90 syntax error if other is 1090A 5C920000 0 REG 1132 LDPC R0 go process operation 1133 * --- 1134 0001090B 1135 EEUSUB LABEL (unary minus) 1090B 70930000 2 4 REG 1136 LDN R2 R4 negate operand 1137 * \ / 0001090C 1138 EEOPR50 LABEL (stack result) 1090C D1524000 1 REG 1139 STMW R1 remember we have a number 1090D 62D74801 345 BASE 1140 LD2 OPR SP,EETMP restore stack pointers 1090E E6570800 124 BASE 1141 ST2 R1 OPN,EEOPNVS add result to operand stack 1090F 60174804 0 5 BASE 1142 LD R0 SP,EESTATE get the current state 10910 64040003 0 IMM 1143 CPR R0 3 are we in wrap-up mode? 10911 FE03079A 1144 JEQ EEDONE if so, then time to go! 10912 60574805 1 5 BASE 1145 LD R1 SP,EEOPRSAVE get operator pointer back 10913 600000D5 0 1146 LD R0 SBUFFW get item fetched 10914 64040029 0 IMM 1147 CPR R0 RPAREN was it a ")" ? 10915 FE0D08F2 1148 JNE EEOPROK go recycle operator stuff if not 1149 * \ / 00010916 1150 EEOPR60 LABEL ( have a right parenthesis ) 10916 6016C800 0 3 BASE 1151 LD R0 OPR,EEOPRSYM get the top operator 10917 64040028 0 IMM 1152 CPR R0 LPAREN see if a spouse 10918 FE0D08FE 1153 JNE EEOPR30 go do operation if not 10919 10C40002 3 IMM 1154 SUB OPR EEOPRSEL otherwise pop operator stack 1091A 64C4162F 3 IMM 1155 CPR OPR ADR(EEOPRSTAK) see if stack empty 1091B FE0907A4 1156 JLT EE90 go bomb if it is 1091C FE0F0787 1157 JMP EELOOP and go get new item 1158 * --- 1159 0001091D 1160 EENOT LABEL NOT operator 1091D FB0D0921 4 1161 JNEZ R4 EEFALSE 1162 * \ / 0001091E 1163 EETRUE LABEL 1091E 60840001 2 IMM 1164 LD R2 TRUE 1091F FE0F090C 1165 JMP EEOPR50 1166 * --- 1167 00010920 1168 EEOR LABEL OR operator 1 Assembler C9208 Control Mode C9304 14-Jun-93 17:33 PAGE 103 (CMEXEV) F 10 Expression Evaluator 10920 FADD091E 34 1169 JNEZ2 R3 EETRUE 1170 * \ / 00010921 1171 EEFALSE LABEL 10921 60840000 2 IMM 1172 LD R2 FALSE 10922 FE0F090C 1173 JMP EEOPR50 1174 * --- 1175 00010923 1176 EEAND LABEL AND operator 10923 FAC30921 3 1177 JEQZ R3 EEFALSE 1178 * \ / 00010924 1179 EETT LABEL 10924 FB030921 4 1180 JEQZ R4 EEFALSE 10925 FE0F091E 1181 JMP EETRUE 1182 * --- 1183 00010926 1184 EETEST LABEL compare operators 10926 6512C000 4 3 REG 1185 CPR R4 R3 1186 * \ / 00010927 1187 EETESTER LABEL 10927 600A1030 0 0 CBM 1188 LD R0 R0/EECOMPARE get the compare type 10928 5D61061C 0 1189 XCT EETESTTAB(R0) set proper result 10929 FE0F090C 1190 JMP EEOPR50 and bingo! 1191 * --- 1192 0001092A 1193 EEIS LABEL IS operator 1092A 7912C000 4 3 REG 1194 AND R4 R3 1092B FE0F0924 1195 JMP EETT 1196 * --- 1197 0001092C 1198 EEADD LABEL + operator 1092C 1912C000 4 3 REG 1199 ADD R4 R3 1200 * \ / 0001092D 1201 EEARITH LABEL 1092D E5128000 4 2 REG 1202 ST R4 R2 1092E FE0F090C 1203 JMP EEOPR50 1204 * --- 1205 0001092F 1206 EESUB LABEL - operator 1092F 1112C000 4 3 REG 1207 SUB R4 R3 10930 FE0F092D 1208 JMP EEARITH 1209 * --- 1210 00010931 1211 EEMUL LABEL * operator 10931 1D12C000 4 3 REG 1212 MUL R4 R3 10932 FE0F092D 1213 JMP EEARITH 1214 * --- 1215 00010933 1216 EEDIV LABEL / operator 10933 FAC307AA 3 1217 JEQZ R3 EE93 trap attempted divide by zero 10934 1512C000 4 3 REG 1218 DIV R4 R3 10935 FE0F092D 1219 JMP EEARITH 1220 * --- 1221 00010936 1222 EEOPRSTRNG LABEL (string expression) 10936 FAAD07A4 2 1223 JEQMW R2 EE90 error if either is non-string 10937 64528000 1 2 REG 1224 CPR R1 R2 see which is shorter 1 Assembler C9208 Control Mode C9304 14-Jun-93 17:33 PAGE 104 (CMEXEV) F 10 Expression Evaluator 10938 FE0B093A 1225 JLE EEOPRS10 jump if it's the right one 10939 60528000 1 2 REG 1226 LD R1 R2 else get the other 1227 * \ / 0001093A 1228 EEOPRS10 LABEL 1093A E4174803 0 5 BASE 1229 ST R0 SP,EET2 save operation type 1093B 38170804 0 4 BASE 1230 LEA R0 R4,VARSTR point to first string 1093C 3896C804 2 3 BASE 1231 LEA R2 R3,VARSTR and the second 1093D DA108800 0 21 1232 CMSTR R0 R2 R1 check 'em out 1093E FE0D0941 1233 JNE EEOPRS20 jump if different 1093F 60570803 1 4 BASE 1234 LD R1 R4,VARSTRLEN same, check lengths 10940 6456C803 1 3 BASE 1235 CPR R1 R3,VARSTRLEN string length will be test 1236 * \ / 00010941 1237 EEOPRS20 LABEL 10941 60174803 0 5 BASE 1238 LD R0 SP,EET2 restore operation type 10942 FE0F0927 1239 JMP EETESTER and go make the check 1240 * --- 1241 1242 END EEPROC routines 115 INPUT CM.UTL:CMOSUB 1 Assembler C9208 Control Mode C9304 14-Jun-93 17:33 PAGE 105 (CMOSUB) F 11 Output Subroutines 3 4 ********************************************************************************** 5 * * 6 * This is the ACCTGET routine. It fetches the current * 7 * aliased account number and volumn name for use in the * 8 * STATPRNT routine. * 9 * * 10 ********************************************************************************** 11 12 BLOCK ACCTGET routine 13 ENTRY ACCTGET 14 15 BEGFRAME 00174801 5 BASE 16 ACPROCINFO BSS PILONG area for process information block 17 ENDFRAME 18 10943 DD5F4020 5 STAK 19 ACCTGET ENTRNP PUSH 10944 60040052 0 IMM 20 LD R0 URPROCINFO get process information request 10945 6044007C 1 IMM 21 LD R1 PILONG*4 get length of process information 10946 38974801 2 5 BASE 22 LEA R2 SP,ACPROCINFO get address of process info area 10947 09040000 IMM 23 UREQ 0 get information about this process 10948 FA09154C 0 24 JLTZ R0 COMERR jump on error 10949 62168808 012 BASE 25 LD2 R0 R2,PIAAVOL get the volumn name 1094A E6001492 01 26 ST2 R0 STATVOL save volumn name 1094B 6216880B 012 BASE 27 LD2 R0 R2,PIAAACCT get account name 1094C E6001494 01 28 ST2 R0 STATACCT save account name 1094D 6016880D 0 2 BASE 29 LD R0 R2,PIAAPROJ get project name 1094E E4001496 0 30 ST R0 STATPROJ save project name 1094F 5D1F4020 5 STAK 31 LEAVE POP 32 * --- 33 34 END ACCGET routine 1 Assembler C9208 Control Mode C9304 14-Jun-93 17:33 PAGE 106 (CMOSUB) F 11 Output Subroutines 36 37 ********************************************************************************** 38 * * 39 * This is the CRCHECK routine. It is called by command * 40 * processors that do not expect any information except the * 41 * command name. It will check for an end-of-line, and if one * 42 * is found, exit. Otherwise, it will admonish the user as to * 43 * his sinful ways, and then exit. No aborting is done. * 44 * * 45 * The entry NOCRCHECK is used to be sure that lines of * 46 * input have some parameters and not just an end-of-line. If * 47 * there is only an end-of-line, a message is printed. This * 48 * entry exits to PARERR to do its complaining! * 49 * * 50 ********************************************************************************** 51 52 BLOCK CRCHECK/NOCRCHECK routines 53 ENTRY CRCHECK 54 ENTRY NOCRCHECK 55 56 BEGFRAME 57 ENDFRAME 58 10950 DD5F4001 5 STAK 59 CRCHECK ENTRNP PUSH 10951 DC410390 60 CALLNP FETCHITM get next item of input 10952 F6B90955 2 61 JBT R2/TEOL CRCEXIT jump if got what we want 10953 6005240C 0 IMM 62 LD R0 ADR(ERM164) "(NO PARAMETERS USED)" 10954 DC410A38 63 CALLNP ERPRTNA give them a lecture 64 * \ / 00010955 65 CRCEXIT LABEL 10955 5D1F4001 5 STAK 66 LEAVE POP and now go do the command 67 * --- 68 10956 DD5F4001 5 STAK 69 NOCRCHECK ENTRNP PUSH 10957 60800116 2 70 LD R2 BUFPT get the buffer pointer 71 * \ / 00010958 72 CRC20 LABEL 10958 DC41045E 73 CALLNP GETCHARX get a character 10959 64440002 1 IMM 74 CPR R1 CHA see if alpha or numeric 1095A FE0B095D 75 JLE CRC25 jump if it is 1095B 6444000A 1 IMM 76 CPR R1 CQT see if it's a quote 1095C FE0D095F 77 JNE CRC30 jump if it's not 78 * \ / 0001095D 79 CRC25 LABEL 1095D E4800116 2 80 ST R2 BUFPT restore buffer pointer 1095E 5D1F4001 5 STAK 81 LEAVE POP and return to our caller 82 * --- 83 0001095F 84 CRC30 LABEL 1095F 64440006 1 IMM 85 CPR R1 CEL is it the end of the line? 10960 FE0D0958 86 JNE CRC20 if not, then go 'round again 10961 60052416 0 IMM 87 LD R0 ADR(ERM165) "(No action taken)" 10962 FE0F1543 88 JMP PARERR go complain about no input 89 * --- 90 91 END CRCHECK/NOCRCHECK routines 1 Assembler C9208 Control Mode C9304 14-Jun-93 17:33 PAGE 107 (CMOSUB) F 11 Output Subroutines 93 94 ********************************************************************************** 95 * * 96 * This is the DATEMAKE routine. It is called by the DATE * 97 * command processor and the LOGON processor to build a date * 98 * message in the output buffer for display on the user's * 99 * terminal or other lun. System xreq's are used to obtain * 100 * most of the date parts. * 101 * * 102 ********************************************************************************** 103 104 BLOCK DATEMAKE routine 105 ENTRY DATEMAKE 106 107 BEGFRAME 00174801 5 BASE 108 DMJUNK BSS 1 year, month, day 00094011 5 ZBM 109 DMAMPM EQU DMJUNK/BIT 0 am/pm 000956C1 5 ZBM 110 DMYEAR EQU DMJUNK/YRBITS year (yyyy) 00096E41 5 ZBM 111 DMMONTH EQU DMJUNK/MOBITS month (mm) 00097651 5 ZBM 112 DMDAY EQU DMJUNK/DABITS day (dd) 00174802 5 BASE 113 DMTOD BSS 1 time of day (in ms) 00174803 5 BASE 114 DMTZ BSS 1 time zone (zzz) 115 ENDFRAME 116 0012C000 3 REG 117 DMDOW EQU R3 day of week (Sun=0) 0000A8C0 ABS 118 DMNOON EQU 12*60*60 noon o'clock 00000E10 ABS 119 DMONE EQU 1*60*60 One o'clock 120 10963 DD5F4004 5 STAK 121 DATEMAKE ENTRNP PUSH 10964 60040063 0 IMM 122 LD R0 URUNLDATE set up to get the date 10965 09040000 IMM 123 UREQ XREQ let's get it!! 10966 E4174801 0 5 BASE 124 ST R0 SP,DMJUNK save some info 10967 E4974802 2 5 BASE 125 ST R2 SP,DMTOD save time of day 10968 E4574803 1 5 BASE 126 ST R1 SP,DMTZ save the time zone 10969 60E71E84 3 3 127 LD R3 DAYNAME(DMDOW) get pointer to day of week 1096A DC410A86 128 CALLNP MESSMOVEZ into the output buffer 1096B 60496E41 1 5 ZBM 129 LD R1 SP,DMMONTH now get the month 1096C 60E31E8A 3 1 130 LD R3 MONTHNAME(R1-1) get pointer to month 1096D DC410A84 131 CALLNP MESSMOVE transfer to output line 1096E 60097651 0 5 ZBM 132 LD R0 SP,DMDAY get day number 1096F 60D28000 3 2 REG 133 LD R3 R2 juggle pointers 10970 DC410AA1 134 CALLNP NDCLR unpack the day 10971 6004002C 0 IMM 135 LD R0 COMMA add lace and doilies 10972 E437000A 0 3 @ 136 ST R0 @OBPT(R3) dress up the line 10973 18C40001 3 IMM 137 ADD R3 1 advance buffer pointer 10974 60040020 0 IMM 138 LD R0 BLANK more dress 10975 E437000A 0 3 @ 139 ST R0 @OBPT(R3) we're really rolling 10976 18C40001 3 IMM 140 ADD R3 1 this takes time though 10977 600956C1 0 5 ZBM 141 LD R0 SP,DMYEAR now get the year 10978 DC410AA1 142 CALLNP NDCLR add this in 10979 60040020 0 IMM 143 LD R0 BLANK add some air 1097A E437000A 0 3 @ 144 ST R0 @OBPT(R3) pretty-printing is so much fun!! 1097B 18C40001 3 IMM 145 ADD R3 1 advance the guard 1097C 60174802 0 5 BASE 146 LD R0 SP,DMTOD get the time of day 1097D 140403E8 0 IMM 147 DIV R0 1000 eliminate milli-secs. 1097E 6404A8C0 0 IMM 148 CPR R0 DMNOON is it after noon? 1 Assembler C9208 Control Mode C9304 14-Jun-93 17:33 PAGE 108 (CMOSUB) F 11 Output Subroutines 1097F ECC94011 5 ZBM 149 STLGE SP,DMAMPM set flag accordingly 10980 FE0B0982 150 JLE DM10 jump if noon or earlier 10981 1004A8C0 0 IMM 151 SUB R0 DMNOON take off twelve hours 152 * \ / 00010982 153 DM10 LABEL 10982 64040E10 0 IMM 154 CPR R0 DMONE is it after one (am or pm)? 10983 FE070985 155 JGE DM20 jump if so 10984 1804A8C0 0 IMM 156 ADD R0 DMNOON else change to twelve from zero 157 * \ / 00010985 158 DM20 LABEL (R0 now has time in ms 1-12) 10985 62120000 010 REG 159 LD2 R0 R0 swizzle for funny divide 10986 58C40010 IMM 160 IORPSR MODIFBIT turn on charm 10987 14040E10 0 IMM 161 DIV R0 60*60 get in hours and minutes 10988 58840010 IMM 162 CLBPSR MODIFBIT turn off charm 10989 E4574802 1 5 BASE 163 ST R1 SP,DMTOD save the minutes 1098A DC410AA1 164 CALLNP NDCLR unpack the hours 1098B 6004003A 0 IMM 165 LD R0 COLON get a spacer 1098C E437000A 0 3 @ 166 ST R0 @OBPT(R3) add in to the string 1098D 18C40001 3 IMM 167 ADD R3 1 advance pointer 1098E 60040000 0 IMM 168 LD R0 0 now for the minutes 1098F 60574802 1 5 BASE 169 LD R1 SP,DMTOD get them back again 10990 58C40010 IMM 170 IORPSR MODIFBIT turn on charm 10991 1404003C 0 IMM 171 DIV R0 60 get in minutes and seconds 10992 58840010 IMM 172 CLBPSR MODIFBIT turn off charm 10993 E4574802 1 5 BASE 173 ST R1 SP,DMTOD save the seconds 10994 62120000 010 REG 174 LD2 R0 R0 get into correct form 10995 58C40010 IMM 175 IORPSR MODIFBIT more magic 10996 1404000A 0 IMM 176 DIV R0 10 this is getting boring! 10997 58840010 IMM 177 CLBPSR MODIFBIT what a crock!! 10998 18040030 0 IMM 178 ADD R0 NUMBIAS will I ever get finished? 10999 18440030 1 IMM 179 ADD R1 NUMBIAS I think not!!!!!!!! 1099A E437000A 0 3 @ 180 ST R0 @OBPT(R3) tens of minutes 1099B 18C40001 3 IMM 181 ADD R3 1 worse than a snail 1099C E477000A 1 3 @ 182 ST R1 @OBPT(R3) minutes 1099D 18C40001 3 IMM 183 ADD R3 1 worse than a snail 1099E 6004003A 0 IMM 184 LD R0 COLON get a spacer 1099F E437000A 0 3 @ 185 ST R0 @OBPT(R3) add in to the string 109A0 18C40001 3 IMM 186 ADD R3 1 advance pointer 109A1 60040000 0 IMM 187 LD R0 0 now for the seconds 109A2 60574802 1 5 BASE 188 LD R1 SP,DMTOD get them back again 109A3 58C40010 IMM 189 IORPSR MODIFBIT more magic 109A4 1404000A 0 IMM 190 DIV R0 10 this is getting boring! 109A5 58840010 IMM 191 CLBPSR MODIFBIT what a crock!! 109A6 18040030 0 IMM 192 ADD R0 NUMBIAS will I ever get finished? 109A7 18440030 1 IMM 193 ADD R1 NUMBIAS I think not!!!!!!!! 109A8 E437000A 0 3 @ 194 ST R0 @OBPT(R3) tens of seconds 109A9 18C40001 3 IMM 195 ADD R3 1 worse than a snail 109AA E477000A 1 3 @ 196 ST R1 @OBPT(R3) seconds 109AB 6096D001 2 3 REG 197 LD R2 R3+1 juggle 109AC 60094011 0 5 ZBM 198 LD R0 SP,DMAMPM get the AM/PM flag 109AD 60E11E97 3 0 199 LD R3 AMPM(R0) get AM/PM label 109AE DC410A84 200 CALLNP MESSMOVE this is really dragging out 109AF 38174803 0 5 BASE 201 LEA R0 SP,DMTZ point to time zone 109B0 38B5000A 2 2 @ 202 LEA R2 @OBPT(R2) and to output buffer 109B1 60440003 1 IMM 203 LD R1 3 time zones are three letters 109B2 FE400000 204 CMOVE add to the line 1 Assembler C9208 Control Mode C9304 14-Jun-93 17:33 PAGE 109 (CMOSUB) F 11 Output Subroutines 109B3 EC168000 2 CACH 205 STZ CACH R2,0 tack on a terminator 109B4 5D1F4004 5 STAK 206 LEAVE POP and now we can be free 207 * --- 208 209 END DATEMAKE routine 1 Assembler C9208 Control Mode C9304 14-Jun-93 17:33 PAGE 110 (CMOSUB) F 11 Output Subroutines 211 212 ********************************************************************************** 213 * * 214 * The ECHO routine is used to echo input lines on the * 215 * job's standard output unit. Called with line to be echoed * 216 * in BUFFER, and length in LEN. * 217 * * 218 ********************************************************************************** 219 220 BLOCK ECHO routine 221 ENTRY ECHO 222 223 BEGFRAME 00174801 5 BASE 224 ECHOSAVER4 BSS 1 for saving value or R4 225 ENDFRAME 226 109B5 DD5F4002 5 STAK 227 ECHO ENTRNP PUSH routine to echo input 109B6 E5174801 4 5 BASE 228 ST R4 SP,ECHOSAVER4 save R4 109B7 F78509C6 6 229 JBT ST/TIN ECHO50 just exit if on-line input 109B8 F79F09C6 6 230 JBT ST/IFP ECHO50 exit if IF in progress 109B9 60840095 2 IMM 231 LD R2 ADR(BUFFER) get buffer address 109BA 6040011A 1 232 LD R1 LEN get record length 109BB F78709C3 6 233 JBT ST/NDO ECHO10 if batch, list for sure 109BC 6100015F 4 234 LD DO DOPTR get DO pointer 109BD 5C090210 4 ZBM 235 CMZ DO,DOLIST see if wants this DO listed 109BE FE0309C6 236 JEQ ECHO50 jump if not to list 109BF 11041453 4 IMM 237 SUB DO DOPTPROTO see what level this is 109C0 15040044 4 IMM 238 DIV DO DOBLEN etc. 109C1 18530000 1 4 REG 239 ADD R1 DO advance the record length 109C2 B10A9F30 4 2 CBM 240 RSBM DO R2/NXTCHAR and backup the start address 241 * \ / 000109C3 242 ECHO10 LABEL 109C3 60040040 0 IMM 243 LD R0 FRWRITET do text write 109C4 50440100 1 IMM 244 MIN R1 OKLEN reduce to a reasonable length 109C5 088400CA IMM 245 FREQ LUNAOUT+XREQ do it to it 246 * \ / 000109C6 247 ECHO50 LABEL 109C6 61174801 4 5 BASE 248 LD R4 SP,ECHOSAVER4 restore value of R4 109C7 5D1F4002 5 STAK 249 LEAVE POP and return to caller 250 * --- 251 252 END ECHO routine 1 Assembler C9208 Control Mode C9304 14-Jun-93 17:33 PAGE 111 (CMOSUB) F 11 Output Subroutines 254 255 ********************************************************************************** 256 * * 257 * This is the HELPPRNT routine. It is used to provide * 258 * the help information for the troubled user. It expects R4 * 259 * to point to the first line of the message. Messages should * 260 * have a star (*) in the first character of the last line of * 261 * the help info. All other lines should have some padding * 262 * character (not printed) at the start of the line. All lines * 263 * should be built with TEXTZ psuedo-ops so as to provide a * 264 * null delimiter at the end of each line. * 265 * * 266 ********************************************************************************** 267 268 BLOCK HELPPRNT/HELPPRNTD routine 269 ENTRY HELPPRNT 270 ENTRY HELPPRNTD 271 272 BEGFRAME 273 ENDFRAME 274 109C8 DD5F4001 5 STAK 275 HELPPRNT ENTRNP PUSH 109C9 60C52A0F 3 IMM 276 LD R3 ADR(HELPMES) "FORM IS: " 277 * \ / 000109CA 278 HP10 LABEL 109CA DC410A86 279 CALLNP MESSMOVEZ start a new output line 109CB 60D30000 3 4 REG 280 LD R3 R4 get start of message 109CC D00ADF30 3 CBM 281 INC R3/NXTCHAR advance to start of REAL message 109CD DC410A84 282 CALLNP MESSMOVE add to the prexif 109CE 60C41400 3 IMM 283 LD R3 ADR(OBUFF) 109CF DC410ACF 284 CALLNP OUT let the user see it 109D0 60170000 0 4 CACH 285 LD R0 CACH R4,0 examine first character 109D1 6404002A 0 IMM 286 CPR R0 STAR is it the last line? 109D2 FE0309DC 287 JEQ HP50 jump if it is 109D3 60C52A12 3 IMM 288 LD R3 ADR(HELPMESC) " " 289 * \ / 000109D4 290 HP20 LABEL 109D4 60170000 0 4 CACH 291 LD R0 CACH R4,0 scan for end of line 109D5 FA0309D8 0 292 JEQZ R0 HP30 jump if we made it 109D6 D00B1F30 4 CBM 293 INC R4/NXTCHAR move to next character 109D7 FE0F09D4 294 JMP HP20 try again 295 * --- 296 000109D8 297 HP30 LABEL 109D8 60170000 0 4 CACH 298 LD R0 CACH R4,0 now skip through the void 109D9 FA0D09CA 0 299 JNEZ R0 HP10 find solid ground again 109DA D00B1F30 4 CBM 300 INC R4/NXTCHAR keep plugging along 109DB FE0F09D8 301 JMP HP30 302 * --- 303 000109DC 304 HP50 LABEL 109DC 5D1F4001 5 STAK 305 LEAVE POP 306 * --- 307 109DD DD5F4001 5 STAK 308 HELPPRNTD ENTRNP PUSH alternate entry for detail 109DE 60C52A12 3 IMM 309 LD R3 ADR(HELPMESC) " " 1 Assembler C9208 Control Mode C9304 14-Jun-93 17:33 PAGE 112 (CMOSUB) F 11 Output Subroutines 109DF DC410ACF 310 CALLNP OUT one blank line for aesthetics 109E0 FE0F09CA 311 JMP HP10 and carry on 312 * --- 313 314 END HELPPRNT/HELPPRNTD routine 1 Assembler C9208 Control Mode C9304 14-Jun-93 17:33 PAGE 113 (CMOSUB) F 11 Output Subroutines 316 317 ********************************************************************************** 318 * * 319 * The HEXDC routine is like the NDC routines except that * 320 * it decodes 8 hexidecimal digits from the number in R0, * 321 * packing them into the position in OBUFF pointed to by R3. As * 322 * before, R2 is not free!!!! * 323 * * 324 ********************************************************************************** 325 326 BLOCK HEXDC routine 327 ENTRY HEXDC 328 329 BEGFRAME 330 ENDFRAME 331 109E1 DD5F4001 5 STAK 332 HEXDC ENTRNP PUSH 109E2 61040007 4 IMM 333 LD R4 7 8 digits 334 * \ / 000109E3 335 HDC10 LABEL 109E3 604A0040 1 0 CBM 336 LD R1 R0/BITS 0:3 get a digit 109E4 607300B1 1 1 @ 337 LD R1 @HEXC(R1) get appropriate ASCII character 109E5 E477000A 1 3 @ 338 ST R1 @OBPT(R3) add to output 109E6 18C40001 3 IMM 339 ADD R3 1 advance buffer pointer 109E7 600A0800 0 0 CBM 340 LD R0 R0/BITS 4:3 shift to next digit 109E8 FB2709E3 4 341 JDR R4 HDC10 cycle through all 109E9 5D1F4001 5 STAK 342 LEAVE POP and that's all 343 * --- 344 345 END HEXDC routine 1 Assembler C9208 Control Mode C9304 14-Jun-93 17:33 PAGE 114 (CMOSUB) F 11 Output Subroutines 347 348 ********************************************************************************** 349 * * 350 * The INITMSSG routine copies a message to the use * 351 * terminal or batch job before the user is logged in. These * 352 * messages are for warning the user of situations that might * 353 * affect the ability of the user to logon. Things such as a * 354 * disk being down fall into this catagory. * 355 * * 356 ********************************************************************************** 357 358 BLOCK INITMSSG routine 359 ENTRY INITMSSG 360 361 BEGFRAME 362 ENDFRAME 363 109EA DD5F4001 5 STAK 364 INITMSSG ENTRNP PUSH 109EB 60450066 1 IMM 365 LD R1 ADR(INITC1) find name of message file 109EC E4400116 1 366 ST R1 BUFPT store as pointer for file get 109ED DC410DCB 367 CALLNP FILEGETR get the file 109EE FA0D09FD 0 368 JNEZ R0 INIT70 jump if couldn't get the file 369 * \ / 000109EF 370 INIT10 LABEL 109EF 60040032 0 IMM 371 LD R0 FRSREAD get a read request 109F0 60440100 1 IMM 372 LD R1 OKLEN as long as will fit in buffer 109F1 60841400 2 IMM 373 LD R2 ADR(OBUFF) use output buffer 109F2 08800009 374 FREQ LUN(XREQ) get the record 109F3 FA0909FA 0 375 JLTZ R0 INIT60 jump if bad read 109F4 F62109FD 0 376 JBT R0/RTSP INIT70 get out if end of file 109F5 30440100 1 IMM 377 RSB R1 OKLEN find record length 109F6 504400FF 1 IMM 378 MIN R1 OKLEN-1 make sure it's not too long 109F7 60C41400 3 IMM 379 LD R3 ADR(OBUFF) point to output buffer 109F8 DC410AF3 380 CALLNP OUTN send out the line 109F9 FE0F09EF 381 JMP INIT10 around for another time 382 * --- 383 000109FA 384 INIT60 LABEL 109FA DC410E44 385 CALLNP FREEFILES free up file if any 109FB DC410A34 386 CALLNP ERPRT print the error 109FC 5D1F4001 5 STAK 387 LEAVE POP return 388 * --- 389 000109FD 390 INIT70 LABEL 109FD DC410E44 391 CALLNP FREEFILES free up file if any 109FE 5D1F4001 5 STAK 392 LEAVE POP return 393 * --- 394 395 END INITMSSG routine 1 Assembler C9208 Control Mode C9304 14-Jun-93 17:33 PAGE 115 (CMOSUB) F 11 Output Subroutines 397 398 ********************************************************************************** 399 * * 400 * The LMSET routine is used to set up the "LUN : " * 401 * message if required, for lun error message output. * 402 * * 403 ********************************************************************************** 404 405 BLOCK LMSET routine 406 ENTRY LMSET 407 408 BEGFRAME 409 ENDFRAME 410 109FF DD5F4001 5 STAK 411 LMSET ENTRNP PUSH 10A00 60840000 2 IMM 412 LD R2 0 initialize buffer pointer 10A01 60000009 0 413 LD R0 LUN get the lun we're using 10A02 640400CA 0 IMM 414 CPR R0 GOODLUN see if CM's magic luns 10A03 FE050A09 415 JGT LMS10 forget it if we used magic 10A04 60C51F76 3 IMM 416 LD R3 ADR(MESLUN) "LUN : " 10A05 DC410A86 417 CALLNP MESSMOVEZ so he knows which lun it is 10A06 60C40007 3 IMM 418 LD R3 LUNSPOT now add the lun 10A07 60000009 0 419 LD R0 LUN get the lun again 10A08 DC410A97 420 CALLNP NDCRL put it into the buffer 421 * \ / 00010A09 422 LMS10 LABEL 10A09 5D1F4001 5 STAK 423 LEAVE POP 424 * --- 425 426 END LMSET routine 1 Assembler C9208 Control Mode C9304 14-Jun-93 17:33 PAGE 116 (CMOSUB) F 11 Output Subroutines 428 429 ********************************************************************************** 430 * * 431 * ERPRTSL will print the error message pointed to by R0, * 432 * or the appropriate message for the error code in R0, * 433 * preceded by an indication that it came from the lun in R3. * 434 * * 435 ********************************************************************************** 436 437 BLOCK 438 ENTRY ERPRTSL 439 440 BEGFRAME 00174801 5 BASE 441 SAVER0 BSS 1 442 ENDFRAME 443 00010A0A 444 ERPRTSL LABEL 10A0A DD5F4002 5 STAK 445 ENTRNP PUSH 10A0B E4174801 0 5 BASE 446 ST R0 SP,SAVER0 10A0C DC4109FF 447 CALLNP LMSET output the lun message 10A0D 60174801 0 5 BASE 448 LD R0 SP,SAVER0 10A0E FA050A11 0 449 JGTZ R0 GOTMSG 10A0F 600A2AB0 0 0 CBM 450 LD R0 R0/ECFIELD get error code 10A10 60212270 0 0 451 LD R0 ECTABLE(R0) and the message 452 * \ / 00010A11 453 GOTMSG LABEL 10A11 60D20000 3 0 REG 454 LD R3 R0 get pointer in R3 10A12 DC410A84 455 CALLNP MESSMOVE add the message to buffer 10A13 60C41400 3 IMM 456 LD R3 ADR(OBUFF) 10A14 DC410ACF 457 CALLNP OUT and print it 10A15 60C00009 3 458 LD R3 LUN put it back the way we found it 10A16 5D1F4002 5 STAK 459 LEAVE POP 460 * --- 461 462 END 463 464 ********************************************************************************** 465 * * 466 * ERPRTS will print the error message pointed to by R0, * 467 * or the appropriate message for the error code in R0, * 468 * preceded by the last string that was fetched from the input * 469 * buffer. * 470 * * 471 ********************************************************************************** 472 473 BLOCK 474 ENTRY ERPRTS 475 476 BEGFRAME 00174801 5 BASE 477 SAVER0 BSS 1 478 ENDFRAME 479 10A17 DD5F4002 5 STAK 480 ERPRTS ENTRNP PUSH 10A18 E4174801 0 5 BASE 481 ST R0 SP,SAVER0 save the error ptr/number 10A19 EE140000 01 PAIR 482 STZ2 PAIR R0 zero the error token pointers 10A1A E2000117 01 483 EXCH2 R0 ERRTOKEN and see if there is one to use 1 Assembler C9208 Control Mode C9304 14-Jun-93 17:33 PAGE 117 (CMOSUB) F 11 Output Subroutines 10A1B FA0D0A1D 0 484 JNEZ R0 EPS05 skip if there was 10A1C 62000115 01 485 LD2 R0 LBUFPT otherwise get current and start position 486 * \ / 00010A1D 487 EPS05 LABEL 10A1D 604A5F30 1 1 CBM 488 LD R1 R1/FLDCHARS change to character address 10A1E 104A1F30 1 0 CBM 489 SUB R1 R0/FLDCHARS get length of token 10A1F 60C41400 3 IMM 490 LD R3 ADR(OBUFF) point to output buffer 10A20 DAC80800 3 01 491 MOVE R3 R0 R1 move the token 10A21 6004003A 0 IMM 492 LD R0 COLON add a colon 10A22 E416C000 0 3 CACH 493 ST R0 CACH R3,0 10A23 60040020 0 IMM 494 LD R0 SPACE add a space or two 10A24 E416C001 0 3 CACH 495 ST R0 CACH R3,1 10A25 E416C002 0 3 CACH 496 ST R0 CACH R3,2 10A26 60174801 0 5 BASE 497 LD R0 SP,SAVER0 get the error back 10A27 FA070A2A 0 498 JGEZ R0 EPS20 skip if message supplied 10A28 604A3080 1 0 CBM 499 LD R1 R0/ECBITS get the error code 10A29 60232270 0 1 500 LD R0 ECTABLE(R1) get message address 501 * \ / 00010A2A 502 EPS20 LABEL 10A2A 60520000 1 0 REG 503 LD R1 R0 copy the address 10A2B 608403E8 2 IMM 504 LD R2 1000 nice big number 10A2C DA5C1000 1 2 505 SRCHI R1 R2 0 find the end 10A2D 308403E8 2 IMM 506 RSB R2 1000 get the message length 10A2E 38D6C003 3 3 CACH 507 LEA R3 CACH R3,3 advance past ": " from above 10A2F DAC81000 3 02 508 MOVE R3 R0 R2 move the message in 10A30 EC16C000 3 CACH 509 STZ CACH R3,0 finish off the message 10A31 60C41400 3 IMM 510 LD R3 ADR(OBUFF) point back to output buffer 10A32 DC410ACF 511 CALLNP OUT and print it out 10A33 5D1F4002 5 STAK 512 LEAVE POP 513 * --- 514 515 END 516 517 ********************************************************************************** 518 * * 519 * ERPRT is the error print out routine. It expects an * 520 * error code or error message address in R0. It will set the * 521 * abnormal condition, convert error code to a message, and * 522 * list it out. Alternate entry, ERPRTNA, does not set the * 523 * Abnormal state. * 524 * * 525 ********************************************************************************** 526 527 BLOCK ERPRT/ERPRTNA routines 528 ENTRY ERPRT 529 ENTRY ERPRTNA 530 ENTRY ERPMC 531 ENTRY ERPMCNA 532 ENTRY ERPSPL 533 534 BEGFRAME 535 ENDFRAME 536 10A34 DD5F4001 5 STAK 537 ERPRT ENTRNP PUSH error print-out routine 10A35 EDCB8810 6 CBM 538 STW ST/ABRT say we're aborted 10A36 61040001 4 IMM 539 LD R4 1 say this is abort entry 1 Assembler C9208 Control Mode C9304 14-Jun-93 17:33 PAGE 118 (CMOSUB) F 11 Output Subroutines 10A37 FE0F0A3A 540 JMP ERPUP 541 * --- 542 10A38 DD5F4001 5 STAK 543 ERPRTNA ENTRNP PUSH non-abort entry 10A39 61040000 4 IMM 544 LD R4 0 say this is non-abort entry 545 * \ / 00010A3A 546 ERPUP LABEL 10A3A 60400000 1 547 LD R1 INITSUBTYP get entry sub-type 10A3B 604A49C0 1 1 CBM 548 LD R1 R1/INITTYPE mask out entry type code 10A3C 64440004 1 IMM 549 CPR R1 CONJOB is this a concurrent process 10A3D FE030A52 550 JEQ ERP20 if concurrent process, don't print 10A3E FA070A4A 0 551 JGEZ R0 ERP10 jump if error message address 10A3F 604A3080 1 0 CBM 552 LD R1 R0/ECBITS else get the error code 10A40 60232270 0 1 553 LD R0 ECTABLE(R1) get the message address 10A41 6405279A 0 IMM 554 CPR R0 ADR(ERM508) is it the "SYSTEM ERROR"? 10A42 FE0D0A4A 555 JNE ERP10 jump if not 10A43 60C40000 3 IMM 556 LD R3 0 at the front, please 10A44 60124000 0 1 REG 557 LD R0 R1 get system error code 10A45 DC4109E1 558 CALLNP HEXDC decode to readable format 10A46 EC37000A 3 @ 559 STZ @OBPT(R3) add stopper for OUT 10A47 60C41400 3 IMM 560 LD R3 ADR(OBUFF) 10A48 DC410ACF 561 CALLNP OUT list the error code 10A49 6005279A 0 IMM 562 LD R0 ADR(ERM508) "SYSTEM ERROR. SOMEBODY BLEW IT" 563 * \ / 00010A4A 564 ERP10 LABEL 10A4A 60D20000 3 0 REG 565 LD R3 R0 get message back 10A4B DC410A6B 566 CALLNP ERRLIST message may contain lun 10A4C F7870A52 6 567 JBT ST/NDO ERP20 jump if not DOing 10A4D FB030A52 4 568 JEQZ R4 ERP20 jump if non-abort entry 10A4E 6100015F 4 569 LD DO DOPTR get DO pointer 10A4F 5C090010 4 ZBM 570 CMZ DO,DOTRAP see if trapping to user 10A50 FE030A52 571 JEQ ERP20 jump if not trapping 10A51 DC410D23 572 CALLNP DOBREAK return to standard input unit 573 * \ / 00010A52 574 ERP20 LABEL 10A52 F3890A57 6 575 JBF ST/ABRT ERPBYE if not aborted leave 10A53 F7850A57 6 576 JBT ST/TIN ERPBYE if terminal input skip 10A54 F7930A57 6 577 JBT ST/SKLX ERPBYE if expert don't worry 10A55 60C52927 3 IMM 578 LD R3 ADR(ERM633) entering abnormal state 10A56 DC410ACF 579 CALLNP OUT write out the message 580 * \ / 00010A57 581 ERPBYE LABEL 10A57 5D1F4001 5 STAK 582 LEAVE POP return to caller 583 * --- 584 00010A58 585 ERPMC LABEL print error and go to MC 10A58 DC410A34 586 CALLNP ERPRT 10A59 FE0F14E9 587 JMP MC saves code elsewhere 588 * --- 589 00010A5A 590 ERPMCNA LABEL same as above but no abort 10A5A DC410A38 591 CALLNP ERPRTNA 10A5B FE0F14E9 592 JMP MC and out 593 * --- 594 00010A5C 595 ERPSPL LABEL print spooler error and abort 1 Assembler C9208 Control Mode C9304 14-Jun-93 17:33 PAGE 119 (CMOSUB) F 11 Output Subroutines 10A5C 60050047 0 IMM 596 LD R0 ADR(EMPTYLINE) get address of an empty message 10A5D DC410A34 597 CALLNP ERPRT print it out and abort 10A5E 60C10009 3 598 LD R3 SBPT get pointer to error message 599 * \ / 00010A5F 600 ERPSPL10 LABEL 10A5F 60440000 1 IMM 601 LD R1 0 initialize character index 00010A60 602 ERPSPL20 LABEL 10A60 601ACC00 0 31 @R 603 LD R0 @R3(R1) pick up a character 10A61 6404000D 0 IMM 604 CPR R0 CR check if carriage return 10A62 FE030A66 605 JEQ ERPSPL30 jump if so 10A63 FA0314E9 0 606 JEQZ R0 MC jump if end of message 10A64 18440001 1 IMM 607 ADD R1 1 increment index 10A65 FE0F0A60 608 JMP ERPSPL20 process next character 609 * --- 610 00010A66 611 ERPSPL30 LABEL 10A66 61124000 4 1 REG 612 LD R4 R1 save character count 10A67 DC410AF3 613 CALLNP OUTN output this line 10A68 19040002 4 IMM 614 ADD R4 2 increment character count to start of next line 10A69 38DAE400 3 34 @R 615 LEA R3 @R3(R4) find pointer to start of next line 10A6A FE0F0A5F 616 JMP ERPSPL10 process next line 617 * --- 618 619 END ERPRT/ERPRTNA routines 1 Assembler C9208 Control Mode C9304 14-Jun-93 17:33 PAGE 120 (CMOSUB) F 11 Output Subroutines 621 622 ********************************************************************************** 623 * * 624 * This routine is for listing out error messages. If the * 625 * message is found to need a lun, the lun will be placed in * 626 * the final message with the actual error message. When * 627 * called, R3 is expected to contain the actual message address * 628 * and LUN should contain the proper lun to insert. * 629 * * 630 ********************************************************************************** 631 632 BLOCK ERRLIST routine 633 ENTRY ERRLIST 634 635 BEGFRAME 00174801 5 BASE 636 ERLMESS BSS 1 error message to be listed 637 ENDFRAME 638 10A6B DD5F4002 5 STAK 639 ERRLIST ENTRNP PUSH 10A6C E4D74801 3 5 BASE 640 ST R3 SP,ERLMESS remember the message 10A6D 64C524CE 3 IMM 641 CPR R3 ADR(LUNERRS) see if LUN involved 10A6E FE090A7E 642 JLT ERL30 go print if not 10A6F 64C5269C 3 IMM 643 CPR R3 ADR(LUNERRT) still checking... 10A70 FE070A7E 644 JGE ERL30 weed out imposters 10A71 60000009 0 645 LD R0 LUN get the offending lun 10A72 FA030A7E 0 646 JEQZ R0 ERL30 jump if no lun to list 10A73 DC4109FF 647 CALLNP LMSET set up the lun message 10A74 5C0B9220 6 CBM 648 CMZ ST/SKIL see if novice user 10A75 FE0D0A79 649 JNE ERL10 if not, then shorten message 10A76 FB030A79 4 650 JEQZ R4 ERL10 if non-abort, no 'error' 10A77 60C52136 3 IMM 651 LD R3 ADR(ERRORMES) "Error. " 10A78 DC410A84 652 CALLNP MESSMOVE 653 * \ / 00010A79 654 ERL10 LABEL 10A79 60D74801 3 5 BASE 655 LD R3 SP,ERLMESS get original message back 10A7A DC410A84 656 CALLNP MESSMOVE tack on to end of other 10A7B 60C41400 3 IMM 657 LD R3 ADR(OBUFF) and now to s it off 658 * \ / 00010A7C 659 ERL20 LABEL 10A7C DC410ACF 660 CALLNP OUT there you go turkey 10A7D 5D1F4002 5 STAK 661 LEAVE POP bye!!! 662 * --- 663 00010A7E 664 ERL30 LABEL 10A7E 5C0B9220 6 CBM 665 CMZ ST/SKIL what level is our user? 10A7F FE0D0A7C 666 JNE ERL20 if non-novice just give message 10A80 FB030A7C 4 667 JEQZ R4 ERL20 jump if not an error 10A81 60C52136 3 IMM 668 LD R3 ADR(ERRORMES) "Error. " 10A82 DC410A86 669 CALLNP MESSMOVEZ 10A83 FE0F0A79 670 JMP ERL10 and go add the rest 671 * --- 672 673 END ERRLIST routine 1 Assembler C9208 Control Mode C9304 14-Jun-93 17:33 PAGE 121 (CMOSUB) F 11 Output Subroutines 675 676 ********************************************************************************** 677 * * 678 * This section is the MESSMOVE routine. It will move a * 679 * message from wherever it is to a specified position in * 680 * OBUFF. Called with R3 pointing to the message, R2 the * 681 * position number in OBUFF, R0 and R1 are used by MESSMOVE. On * 682 * exit, R2 will point to the last position filled (the null), * 683 * and may be left intact for another call to MESSMOVE. All * 684 * messages moved must be terminated with a null. An alternate * 685 * entry, MESSMOVEZ, will initialize the output buffer pointer * 686 * at zero. * 687 * * 688 ********************************************************************************** 689 690 BLOCK MESSMOVE/MESSMOVEZ/MESSMOVEN routines 691 ENTRY MESSMOVE 692 ENTRY MESSMOVEZ 693 ENTRY MESSMOVEN 694 695 BEGFRAME 696 ENDFRAME 697 10A84 DD5F4001 5 STAK 698 MESSMOVE ENTRNP PUSH 10A85 FE0F0A88 699 JMP MM05 700 * --- 701 10A86 DD5F4001 5 STAK 702 MESSMOVEZ ENTRNP PUSH entry to zero pointer 10A87 60840000 2 IMM 703 LD R2 0 point to front 704 * \ / 00010A88 705 MM05 LABEL 10A88 60440000 1 IMM 706 LD R1 0 initialize message index 707 * \ / 00010A89 708 MM10 LABEL 10A89 601AC800 0 31 CACH 709 LD R0 CACH R3,0(R1) get a character 10A8A E435000A 0 2 @ 710 ST R0 @OBPT(R2) transfer to output buffer 10A8B FA030A8E 0 711 JEQZ R0 MM20 jump if done 10A8C 18840001 2 IMM 712 ADD R2 1 next position 10A8D FA610A89 1 713 IRJ R1 MM10 and recycle 714 * --- 715 00010A8E 716 MM20 LABEL 10A8E 5D1F4001 5 STAK 717 LEAVE POP that's all folks 718 * --- 719 10A8F DD5F4001 5 STAK 720 MESSMOVEN ENTRNP PUSH 10A90 60440000 1 IMM 721 LD R1 0 initialize 722 * \ / 00010A91 723 MM30 LABEL 10A91 601AC800 0 31 CACH 724 LD R0 CACH R3,0(R1) get one char 10A92 E435000A 0 2 @ 725 ST R0 @OBPT(R2) add to buffer 10A93 18840001 2 IMM 726 ADD R2 1 10A94 18440001 1 IMM 727 ADD R1 1 10A95 FB270A91 4 728 JDR R4 MM30 10A96 5D1F4001 5 STAK 729 LEAVE POP 730 * --- 1 Assembler C9208 Control Mode C9304 14-Jun-93 17:33 PAGE 122 (CMOSUB) F 11 Output Subroutines 731 732 END MESSMOVE/MESSMOVEZ/MESSMOVEN routines 1 Assembler C9208 Control Mode C9304 14-Jun-93 17:33 PAGE 123 (CMOSUB) F 11 Output Subroutines 734 735 ********************************************************************************** 736 * * 737 * The NDCRL routine is used to convert some integer * 738 * number into digits and place into OBUFF in the appointed * 739 * character position indicated by R3. The number to be placed * 740 * in the buffer should be in R0. The calling routine should * 741 * make sure that the number in R0 will fit into the area it * 742 * expects the number to be packed into, as NDCRL will expand * 743 * the number until it is completely decoded. * 744 * * 745 * ***** CAUTION!!! - R2 is NOT free!!! ***** * 746 * * 747 ********************************************************************************** 748 749 BLOCK NDCRL routine 750 ENTRY NDCRL 751 752 BEGFRAME 753 ENDFRAME 754 10A97 DD5F4001 5 STAK 755 NDCRL ENTRNP PUSH 00010A98 756 NDCRL10 LABEL 10A98 62120000 010 REG 757 LD2 R0 R0 play games with number 10A99 58C40010 IMM 758 IORPSR MODIFBIT request modify arithmetic 10A9A 1404000A 0 IMM 759 DIV R0 10 10A9B 58840010 IMM 760 CLBPSR MODIFBIT restore normal diplomatic relations 10A9C 18440030 1 IMM 761 ADD R1 NUMBIAS adjust to ASCII character 10A9D E477000A 1 3 @ 762 ST R1 @OBPT(R3) place in buffer 10A9E FA030AA0 0 763 JEQZ R0 NDCRL20 exit if finished 10A9F FAE30A98 3 764 DRJ R3 NDCRL10 and recycle 765 * --- 766 00010AA0 767 NDCRL20 LABEL 10AA0 5D1F4001 5 STAK 768 LEAVE POP and now for a homecoming 769 * --- 770 771 END NDCRL routine 1 Assembler C9208 Control Mode C9304 14-Jun-93 17:33 PAGE 124 (CMOSUB) F 11 Output Subroutines 773 774 ********************************************************************************** 775 * * 776 * The NDCLR routine is also a decimal conversion routine. * 777 * It packs the decoded number from left-to-right in the output * 778 * buffer, thus left-justifying. To do this, a table of * 779 * powers-of-ten is utilized. Again, remember that R2 may be * 780 * in use and cannot be zapped. Called with R0 containing the * 781 * number to be coded, and R3 pointing to the position in the * 782 * output buffer to begin stuffing the number. * 783 * * 784 * ***** CAUTION!!! - R2 is NOT free!!! ***** * 785 * * 786 ********************************************************************************** 787 788 BLOCK NDCLR/NDCVAR routines 789 ENTRY NDCLR 790 ENTRY NDCVAR 791 792 BEGFRAME 793 ENDFRAME 794 10AA1 DD5F4001 5 STAK 795 NDCLR ENTRNP PUSH 10AA2 61040007 4 IMM 796 LD R4 7 maximum of eight digits 797 * \ / 00010AA3 798 NDCLR10 LABEL 10AA3 62120000 010 REG 799 LD2 R0 R0 play games with number 800 * \ / 00010AA4 801 NDCLR20 LABEL 10AA4 58C40010 IMM 802 IORPSR MODIFBIT request special arithmetic 10AA5 142900A3 0 4 803 DIV R0 TENTAB(R4) look for first position 10AA6 58840010 IMM 804 CLBPSR MODIFBIT undo the damage 10AA7 FA0D0AAD 0 805 JNEZ R0 NDCLR40 jump if ready 10AA8 FB270AA4 4 806 JDR R4 NDCLR20 otherwise keep playing 807 * \ / 00010AA9 808 NDCLR30 LABEL 10AA9 60040000 0 IMM 809 LD R0 0 10AAA 58C40010 IMM 810 IORPSR MODIFBIT request special arithmetic 10AAB 142900A3 0 4 811 DIV R0 TENTAB(R4) extract next digit 10AAC 58840010 IMM 812 CLBPSR MODIFBIT undo the damage 813 * \ / 00010AAD 814 NDCLR40 LABEL 10AAD 18040030 0 IMM 815 ADD R0 NUMBIAS adjust for ASCII char 10AAE E437000A 0 3 @ 816 ST R0 @OBPT(R3) place in output string 10AAF 18C40001 3 IMM 817 ADD R3 1 advance buffer pointer 10AB0 FB270AA9 4 818 JDR R4 NDCLR30 next! 10AB1 5D1F4001 5 STAK 819 LEAVE POP 820 * --- 821 10AB2 DD5F4001 5 STAK 822 NDCVAR ENTRNP PUSH alternate entry for pre-process 10AB3 61040009 4 IMM 823 LD R4 9 maximum of 10 digits 10AB4 FA070AA3 0 824 JGEZ R0 NDCLR10 jump if positive number 10AB5 1C07FFFF 0 IMM 825 MUL R0 -1 else change the sign 10AB6 6044002D 1 IMM 826 LD R1 MINUS and place sign in buffer 10AB7 E477000A 1 3 @ 827 ST R1 @OBPT(R3) (nice that minus is legal) 10AB8 FAE10AA3 3 828 IRJ R3 NDCLR10 advance pointer and jump 1 Assembler C9208 Control Mode C9304 14-Jun-93 17:33 PAGE 125 (CMOSUB) F 11 Output Subroutines 829 * --- 830 831 END NDCLR/NDCVAR routines 1 Assembler C9208 Control Mode C9304 14-Jun-93 17:33 PAGE 126 (CMOSUB) F 11 Output Subroutines 833 834 ********************************************************************************** 835 * * 836 * The NHCRL routine is used to convert some integer * 837 * number into hex digits and place into OBUFF in the appointed * 838 * character position indicated by R3. The number to be placed * 839 * in the buffer should be in R0. The number of hex digit to be * 840 * used should be in R2. If the number is too large to fit in * 841 * the specified number of digits it will be truncated. If a * 842 * zero is the number to convert, the word "none" will be * 843 * placed in the output area without regard to the number of * 844 * digits specified. * 845 * * 846 ********************************************************************************** 847 848 BLOCK NHCRL routine 849 ENTRY NHCRL 850 851 BEGFRAME 852 ENDFRAME 853 10AB9 DD5F4001 5 STAK 854 NHCRL ENTRNP PUSH 10ABA FA030AC9 0 855 JEQZ R0 NHCRL50 jump if no hex character 10ABB D0528000 2 REG 856 DEC R2 set up loop index 857 * \ / 00010ABC 858 NHCRL10 LABEL 10ABC 604A3840 1 0 CBM 859 LD R1 R0/BITS 28:31 get last hex digit 10ABD 600A01C0 0 0 CBM 860 LD R0 R0/BITS 0:27 shift over rest of number 10ABE 64440009 1 IMM 861 CPR R1 9 check if its a number 10ABF FE050AC2 862 JGT NHCRL20 if it's over 9 it's alpha 10AC0 18440030 1 IMM 863 ADD R1 NUMBIAS adjust to ASCII character 10AC1 FE0F0AC3 864 JMP NHCRL30 jump over alpha adjust 865 * --- 866 00010AC2 867 NHCRL20 LABEL 10AC2 18440037 1 IMM 868 ADD R1 HEXBIAS add bias for upper hex chars 869 * \ / 00010AC3 870 NHCRL30 LABEL 10AC3 E477000A 1 3 @ 871 ST R1 @OBPT(R3) place in buffer 10AC4 D052C000 3 REG 872 DEC R3 move buffer index back 10AC5 FAA70ABC 2 873 JDR R2 NHCRL10 and recycle 10AC6 60440023 1 IMM 874 LD R1 HEXCHAR get a # 10AC7 E477000A 1 3 @ 875 ST R1 @OBPT(R3) place in buffer 10AC8 5D1F4001 5 STAK 876 LEAVE POP and now for a homecoming 877 * --- 878 00010AC9 879 NHCRL50 LABEL 10AC9 60440004 1 IMM 880 LD R1 NOTSPECLEN pick up message length 10ACA 38012020 0 881 LEA R0 NOTSPECIFY indicate this charater not specified 10ACB E4D69003 3 2 REG 882 ST R3 R2+NOTSPECLEN-1 find position to put message in 10ACC 38B5000A 2 2 @ 883 LEA R2 @OBPT(R2) find the address to put it in 10ACD FE400000 884 CMOVE move it 10ACE 5D1F4001 5 STAK 885 LEAVE POP and back where we came from 886 * --- 887 888 END NHCRL routine 1 Assembler C9208 Control Mode C9304 14-Jun-93 17:33 PAGE 127 (CMOSUB) F 11 Output Subroutines 890 891 ********************************************************************************** 892 * * 893 * The OUT routine is used to actually print out * 894 * messages, echo lines, etc. It simply scans the buffer for * 895 * the terminating character (0), and lists the line out on the * 896 * standard output unit. * 897 * * 898 * In addition to outputting, this routine keeps track of * 899 * the number of lines output, and if more than the terminal * 900 * limit, stops output and lets the user bail out or continue * 901 * for another screenful. * 902 * * 903 * Alternate entry OUTX is for printing without Break checking. * 904 * Alternate entry OUTN is for lines with length known in R1. * 905 * Alternate entry OUTT is for lines with length in R1 and record * 906 * type in R0 * 907 * * 908 * Returns R0=0 normally, R0=x if user wants to bail out. * 909 * * 910 ********************************************************************************** 911 912 BLOCK OUT/OUTN/OUTT/OUTX routines 913 ENTRY OUT 914 ENTRY OUTN 915 ENTRY OUTT 916 ENTRY OUTX 917 918 BEGFRAME 00174801 5 BASE 919 OUTTMP BSS 2 temp for R1 and R2 00174803 5 BASE 920 OUTT2 BSS 2 temp for R3 and R4 00174805 5 BASE 921 OUTT3 BSS 1 temp for R0 922 ENDFRAME 923 10ACF DD5F4006 5 STAK 924 OUT ENTRNP PUSH routine to print a line 10AD0 F7A51522 6 925 JBT ST/INRQ MCBRK if break request, then bail out 926 * \ / 00010AD1 927 OUT05 LABEL 10AD1 6012C000 0 3 REG 928 LD R0 R3 get message address 10AD2 60440140 1 IMM 929 LD R1 OBUFFL nice maximum length 10AD3 60840000 2 IMM 930 LD R2 0 look for a null please 10AD4 FE560000 931 CSRCH 10AD5 30440140 1 IMM 932 RSB R1 OBUFFL 933 * \ / 00010AD6 934 OUT10 LABEL 10AD6 EC120000 0 REG 935 STZ R0 set record type to text 00010AD7 936 OUT15 LABEL 10AD7 E4174805 0 5 BASE 937 ST R0 SP,OUTT3 save record type 10AD8 6092C000 2 3 REG 938 LD R2 R3 get starting address again 10AD9 E6574801 125 BASE 939 ST2 R1 SP,OUTTMP save the vital values 10ADA E6D74803 345 BASE 940 ST2 R3 SP,OUTT2 save caller's R3 and R4 10ADB F3850AE7 6 941 JBF ST/TIN OUT20 if not terminal input, list away 10ADC BC000008 0 942 INCL R0 LINECNT advance line counter 10ADD 64000007 0 943 CPR R0 LINEMAX are we over the limit? 10ADE FE0B0AE7 944 JLE OUT20 jump if we still have room 10ADF 5C000007 945 CMZ LINEMAX is the max infinite? 1 Assembler C9208 Control Mode C9304 14-Jun-93 17:33 PAGE 128 (CMOSUB) F 11 Output Subroutines 10AE0 FE030AE7 946 JEQ OUT20 if so then who cares? 10AE1 EC000008 947 STZ LINECNT zero the counter 10AE2 60C5202A 3 IMM 948 LD R3 ADR(MOREMESS) "--More--" 10AE3 DC410AF1 949 CALLNP OUTX recurse away!!!!! 10AE4 DC410538 950 CALLNP READLINE get some user input 10AE5 5C00011A 951 CMZ LEN was there any?? 10AE6 FE0D0AED 952 JNE OUTQUIT if so then go process 953 * \ / 00010AE7 954 OUT20 LABEL 10AE7 62574801 125 BASE 955 LD2 R1 SP,OUTTMP get the vital info back 10AE8 60040040 0 IMM 956 LD R0 FRWRITET we want a text write 10AE9 18174805 0 5 BASE 957 ADD R0 SP,OUTT3 add in record type 10AEA 088400CA IMM 958 FREQ LUNAOUT+XREQ tell them our tale 10AEB 62D74803 345 BASE 959 LD2 R3 SP,OUTT2 restore caller's vitals 10AEC 5D1F4006 5 STAK 960 LEAVE POP and exit to caller 961 * --- 962 00010AED 963 OUTQUIT LABEL 10AED DC410E35 964 CALLNP FREEFILE free up possible lun 10AEE EC0B9A80 6 CBM 965 STZ ST/DYNAM clear our head 10AEF EDCBA210 6 CBM 966 STW ST/INOK accept interrupts 10AF0 FE0F143D 967 JMP MC20 go process our input line 968 * --- 969 10AF1 DD5F4006 5 STAK 970 OUTX ENTRNP PUSH entry for no Break checking 10AF2 FE0F0AD1 971 JMP OUT05 so go print away 972 * --- 973 10AF3 DD5F4006 5 STAK 974 OUTN ENTRNP PUSH entry for R1=line length 10AF4 FE0F0AD6 975 JMP OUT10 so go do it!!! 976 * --- 977 10AF5 DD5F4006 5 STAK 978 OUTT ENTRNP PUSH entry for R1=line length and 979 * R0=record type 10AF6 FE0F0AD7 980 JMP OUT15 981 * --- 982 983 END OUT/OUTN/OUTT/OUTX routines 1 Assembler C9208 Control Mode C9304 14-Jun-93 17:33 PAGE 129 (CMOSUB) F 11 Output Subroutines 985 986 ********************************************************************************** 987 * * 988 * The OUTBLANK routine is used to pre-blank the output * 989 * buffer (OBUFF). It blanks OKLEN characters currently. * 990 * * 991 ********************************************************************************** 992 993 BLOCK OUTBLANK routine 994 ENTRY OUTBLANK 995 996 BEGFRAME 997 ENDFRAME 998 10AF7 DD5F4001 5 STAK 999 OUTBLANK ENTRNP PUSH 10AF8 60841400 2 IMM 1000 LD R2 ADR(OBUFFW) point to the buffer 10AF9 60440100 1 IMM 1001 LD R1 OKLEN number of characters to blank 10AFA FE580020 1002 CFILL BLANK and blank them out!! 10AFB 5D1F4001 5 STAK 1003 LEAVE POP that was simple 1004 * --- 1005 1006 END OUTBLANK routine 1 Assembler C9208 Control Mode C9304 14-Jun-93 17:33 PAGE 130 (CMOSUB) F 11 Output Subroutines 1008 1009 ********************************************************************************** 1010 * * 1011 * The NUMTOPORT routine converts a binary port index, as * 1012 * received from the operating system, into the proper format * 1013 * for display. Called with R0 containing the number to * 1014 * convert and R2 pointing to the position in the output buffer * 1015 * to start placing characters in. * 1016 * * 1017 * Returns with R2 pointing to the next available location * 1018 * in the output buffer. R0, R1, and R4 are destroyed. The * 1019 * return of a negative value in R0 indicates an error. A * 1020 * second entry, NUMTOPORTX, is available where R3 contains the * 1021 * character position for the right most character on entry. * 1022 * This version destroys R2. * 1023 * * 1024 ********************************************************************************** 1025 1026 BLOCK NUMTOPORT/NUMTOPORTX routines 1027 ENTRY NUMTOPORT 1028 ENTRY NUMTOPORTX 1029 1030 BEGFRAME 1031 ENDFRAME 1032 10AFC DD5F4001 5 STAK 1033 NUMTOPORTX ENTRNP PUSH 10AFD 6092C000 2 3 REG 1034 LD R2 R3 set up output buffer pointer 10AFE 10840002 2 IMM 1035 SUB R2 2 move to left most digit position 10AFF FE0F0B01 1036 JMP NTP00 process normally 1037 * --- 1038 10B00 DD5F4001 5 STAK 1039 NUMTOPORT ENTRNP PUSH 00010B01 1040 NTP00 LABEL 10B01 FA030B20 0 1041 JEQZ R0 NTP70 jump if "RFP" port 10B02 61040007 4 IMM 1042 LD R4 ACCTABL-1 get index to last ACC table entry 1043 * \ / 00010B03 1044 NTP10 LABEL 10B03 606901D6 1 4 1045 LD R1 ACCTAB(R4) get table entry 10B04 640A5180 0 1 CBM 1046 CPR R0 R1/ACCINDEX compare to 1st port on this ACC 10B05 FE070B08 1047 JGE NTP20 jump if on this ACC 10B06 FB270B03 4 1048 JDR R4 NTP10 loop through all ACC's 10B07 FE0F0B29 1049 JMP NTP90 error 1050 * --- 1051 00010B08 1052 NTP20 LABEL 10B08 100A5180 0 1 CBM 1053 SUB R0 R1/ACCINDEX subtract off ACC portion of port index 10B09 604A4080 1 1 CBM 1054 LD R1 R1/ACCCHAR get character associated with this ACC 10B0A E475000A 1 2 @ 1055 ST R1 @OBPT(R2) store in output buffer 10B0B D0128000 2 REG 1056 INC R2 increment output buffer index 10B0C 61040007 4 IMM 1057 LD R4 BOARDTABL-1 get index to last BOARD table entry 1058 * \ / 00010B0D 1059 NTP30 LABEL 10B0D 606901DE 1 4 1060 LD R1 BOARDTAB(R4) get table entry 10B0E 640A5180 0 1 CBM 1061 CPR R0 R1/BOARDINDEX compare to 1st port on this BOARD 10B0F FE070B12 1062 JGE NTP40 jump if on this BOARD 10B10 FB270B0D 4 1063 JDR R4 NTP30 loop through all BOARD's 1 Assembler C9208 Control Mode C9304 14-Jun-93 17:33 PAGE 131 (CMOSUB) F 11 Output Subroutines 10B11 FE0F0B29 1064 JMP NTP90 error 1065 * --- 1066 00010B12 1067 NTP40 LABEL 10B12 100A5180 0 1 CBM 1068 SUB R0 R1/BOARDINDEX subtract off BOARD portion of port index 10B13 604A4080 1 1 CBM 1069 LD R1 R1/BOARDCHAR get character associated with this BOARD 10B14 E475000A 1 2 @ 1070 ST R1 @OBPT(R2) store in output buffer 10B15 D0128000 2 REG 1071 INC R2 increment output buffer index 10B16 61040007 4 IMM 1072 LD R4 PORTTABL-1 get index to last PORT table entry 1073 * \ / 00010B17 1074 NTP50 LABEL 10B17 606901E6 1 4 1075 LD R1 PORTTAB(R4) get table entry 10B18 640A5180 0 1 CBM 1076 CPR R0 R1/PORTINDEX compare to port 10B19 FE070B1C 1077 JGE NTP60 jump if this port 10B1A FB270B17 4 1078 JDR R4 NTP50 loop through all PORT's 10B1B FE0F0B29 1079 JMP NTP90 error 1080 * --- 1081 00010B1C 1082 NTP60 LABEL 10B1C 604A4080 1 1 CBM 1083 LD R1 R1/PORTCHAR get character associated with this PORT 10B1D E475000A 1 2 @ 1084 ST R1 @OBPT(R2) store in output buffer 10B1E D0128000 2 REG 1085 INC R2 increment output buffer index 10B1F 5D1F4001 5 STAK 1086 LEAVE POP 1087 * --- 1088 00010B20 1089 NTP70 LABEL 10B20 38410046 1 1090 LEA R1 RFPCHARS get pointer to RFP characters 10B21 61040003 4 IMM 1091 LD R4 3 get number of RFP characters 1092 * \ / 00010B22 1093 NTP80 LABEL 10B22 60040003 0 IMM 1094 LD R0 3 get number of RFP characters 10B23 10130000 0 4 REG 1095 SUB R0 R4 create index to RFP characters 10B24 601A4000 0 10 CACH 1096 LD R0 CACH R1,0(R0) load an RFP character 10B25 E435000A 0 2 @ 1097 ST R0 @OBPT(R2) save in output buffer 10B26 D0128000 2 REG 1098 INC R2 increment output buffer pointer 10B27 FB230B22 4 1099 DRJ R4 NTP80 loop through all characters 10B28 5D1F4001 5 STAK 1100 LEAVE POP 1101 * --- 1102 00010B29 1103 NTP90 LABEL 10B29 D1520000 0 REG 1104 STMW R0 indicate error 10B2A 5D1F4001 5 STAK 1105 LEAVE POP 1106 * --- 1107 1108 END NUMTOPORT/NUMTOPORTX routines 1 Assembler C9208 Control Mode C9304 14-Jun-93 17:33 PAGE 132 (CMOSUB) F 11 Output Subroutines 1110 ********************************************************************************** 1111 * * 1112 * This is the PROCLIST routine. It is called by the * 1113 * STATE command to list out the current underprocess tree * 1114 * structure. All that is given is name and serial number * 1115 * (sounds like the army). * 1116 * * 1117 ********************************************************************************** 1118 1119 UNDRPINFORD list 1119 ********************************************************************************** 1119 * * 1119 * The under process structure read request returns the * 1119 * following block of information for each process. * 1119 * * 1119 ********************************************************************************** 1119 00010B2B 1119 UNDRPROTO BASE R0 000800F0 0 ZBM 1119 UNDRRSTR BSSB 15 process restrictions 00081F10 0 ZBM 1119 UNDRELEN BSSB 17 length of this entry, in words 00080091 0 ZBM 1119 UNDRLEVEL BSSB 9 level number of this under process 00081371 0 ZBM 1119 UNDRPSN BSSB 23 process serial number of this process 00080172 0 ZBM 1119 UNDRDPSN BSSB 23 process serial number of father 00082F72 0 ZBM 1119 UNDRDBG BSSB 23 process serial number of debugger process 1119 BSSB 18 reserved for future expansion 00160804 0 BASE 1119 UNDRNAME BSS 2 process name 1119 00081C10 0 ZBM 1119 UNDRSTCTG1 EQU UNDRRSTR/BIT 31 on if group 1 restrictions (limit change) 00081A10 0 ZBM 1119 UNDRSTCTG2 EQU UNDRRSTR/BIT 30 on if group 2 restrictions (catalog fetch) 00081810 0 ZBM 1119 UNDRSTCTG3 EQU UNDRRSTR/BIT 29 on if group 3 restrictions (acct att. chng) 00081610 0 ZBM 1119 UNDRSTCTG4 EQU UNDRRSTR/BIT 28 on if group 4 restrictions (unassigned) 00081410 0 ZBM 1119 UNDRSTCTG5 EQU UNDRRSTR/BIT 27 on if group 5 restrictions (unassigned) 00081210 0 ZBM 1119 UNDROPREQ EQU UNDRRSTR/BIT 26 on if operator requests restricted 00081010 0 ZBM 1119 UNDRMAINTR EQU UNDRRSTR/BIT 25 on if maintenance read restricted 00080E10 0 ZBM 1119 UNDRMAINTW EQU UNDRRSTR/BIT 24 on if maintenance write restricted 00080C10 0 ZBM 1119 UNDRBACKUP EQU UNDRRSTR/BIT 23 on if backup requests restricted 00080A10 0 ZBM 1119 UNDRMANAGR EQU UNDRRSTR/BIT 22 on if manager requests restricted 00080810 0 ZBM 1119 UNDREXO EQU UNDRRSTR/BIT 21 on if address space is execute only 00080610 0 ZBM 1119 UNDRCNTLM EQU UNDRRSTR/BIT 20 on if in Control Mode 1119 1119 DRCT 00000006 ABS 1119 UNDRPLONG EQU DISPW UNDRPROTO 00000003 ABS 1119 UNDRPLOG EQU UNDRPLONG LOG 2 1119 ORG UNDRPROTO recover lost space 1120 1121 BLOCK PROCLIST routine 1122 ENTRY PROCLIST 1123 1124 BEGFRAME 1125 ENDFRAME 1126 10B2B DD5F4001 5 STAK 1127 PROCLIST ENTRNP PUSH 10B2C 60840400 2 IMM 1128 LD R2 ADR SYSBUF lets zero part of the buffer 10B2D 60444000 1 IMM 1129 LD R1 SYSBUFL 10B2E FE580000 1130 CFILL 0 1131 * \ / 1 Assembler C9208 Control Mode C9304 14-Jun-93 17:33 PAGE 133 (CMOSUB) F 11 Output Subroutines 10B2F 60040056 0 IMM 1132 LD R0 URUDRPINFO under process information 10B30 60444000 1 IMM 1133 LD R1 SYSBUFL how big the buffer is 10B31 60840400 2 IMM 1134 LD R2 ADR SYSBUF where the info will go 10B32 09040000 IMM 1135 UREQ 0 give us our information 10B33 30444000 1 IMM 1136 RSB R1 SYSBUFL find out how much info we got 10B34 61040400 4 IMM 1137 LD R4 ADR(SYSBUF) R4 -> SYSBUF 10B35 14440004 1 IMM 1138 DIV R1 CPW adjust info length to words 10B36 64491F10 1 4 ZBM 1139 CPR R1 R4,UNDRELEN see if we are the only process 10B37 FE030B4F 1140 JEQ NOUNDER if so then no tree to print 10B38 19091F10 4 4 ZBM 1141 ADD R4 R4,UNDRELEN move up to first under entry 1142 * \ / 00010B39 1143 TREELOOP LABEL 10B39 DC410AF7 1144 CALLNP OUTBLANK clear output buffer 10B3A 60840003 2 IMM 1145 LD R2 3 how much to indent per level 10B3B 1C890091 2 4 ZBM 1146 MUL R2 R4,UNDRLEVEL adjust for level 1147 * \ / 10B3C 60D30000 3 4 REG 1148 LD R3 R4 R3 doesn't get touched at all 10B3D 6016C804 0 3 BASE 1149 LD R0 R3,UNDRNAME(0) get the underprocess's name 10B3E DC410C17 1150 CALLNP UP6B unpack the first half of the name 10B3F 6016C805 0 3 BASE 1151 LD R0 R3,UNDRNAME(1) get the other half 10B40 DC410C17 1152 CALLNP UP6B unpack the second half of the name 10B41 18840002 2 IMM 1153 ADD R2 2 leave some space between name and number 1154 * \ / 10B42 E092C000 2 3 REG 1155 EXCH R2 R3 place buffer pointer here for safety 1156 * R2 <= buffer pointer, R3 <= output buffer index 10B43 60089371 0 2 ZBM 1157 LD R0 R2,UNDRPSN get the process serial number 10B44 DC410AA1 1158 CALLNP NDCLR put this in the output line 10B45 D012C000 3 REG 1159 INC R3 increment to mark end of the line 10B46 EC37000A 3 @ 1160 STZ @OBPT(R3) add in a terminator 10B47 60C41400 3 IMM 1161 LD R3 ADR(OBUFF) starting address of the output buffer 10B48 61128000 4 2 REG 1162 LD R4 R2 restore buffer pointer 10B49 DC410ACF 1163 CALLNP OUT send it to the terminal 10B4A 19091F10 4 4 ZBM 1164 ADD R4 R4,UNDRELEN move to next entry 10B4B 5C091F10 4 ZBM 1165 CMZ R4,UNDRELEN beyond the information? 10B4C FE0D0B39 1166 JNE TREELOOP if not then do the next process 10B4D EC120000 0 REG 1167 STZ R0 idicate no errors 1168 * \ / 00010B4E 1169 PROCEXIT LABEL 10B4E 5D1F4001 5 STAK 1170 LEAVE POP 1171 * --- 1172 00010B4F 1173 NOUNDER LABEL 10B4F 6005242B 0 IMM 1174 LD R0 ADR(ERM167) "No existing underprocesses" 10B50 FE0F0B4E 1175 JMP PROCEXIT go to error handler 1176 * --- 1177 1178 END PROCLIST routine 1 Assembler C9208 Control Mode C9304 14-Jun-93 17:33 PAGE 134 (CMOSUB) F 11 Output Subroutines 1180 1181 ********************************************************************************** 1182 * * 1183 * This is the STATELIST routine. It is called by the * 1184 * STATE command and by the interrupt entry routine to list out * 1185 * the registers of the top under-program. Before we give * 1186 * anything away we check to make sure the darn process is NOT * 1187 * execute only. * 1188 * * 1189 ********************************************************************************** 1190 1191 BLOCK STATELIST routine 1192 ENTRY STATELIST 1193 1194 BEGFRAME 00174801 5 BASE 1195 SLREG BSS 1 register being displayed 00174802 5 BASE 1196 SLRUN BSS 1 holder for the run unit number 1197 ENDFRAME 1198 10B51 DD5F4003 5 STAK 1199 STATELIST ENTRNP PUSH 10B52 60040120 0 IMM 1200 LD R0 URGRUNLUN get run unit of the current underprocess 10B53 0900001D 1201 UREQ UPNUM(XREQ) ask the system nicely 10B54 FA090B7C 0 1202 JLTZ R0 SLEXIT underprocess must not exists 10B55 E4174802 0 5 BASE 1203 ST R0 SP,SLRUN place the unit number here for safety 10B56 60040010 0 IMM 1204 LD R0 FRSTATUS get status of the unit 10B57 08974802 5 BASE 1205 FREQ SP,SLRUN 10B58 FA090B76 0 1206 JLTZ R0 SLCLNUP if error, clean up what we started 10B59 60040003 0 IMM 1207 LD R0 ACXO need to check for XO underprocess 10B5A 640A6630 0 1 CBM 1208 CPR R0 R1/ACFIELD this should tell us one way or another 10B5B FE030B7D 1209 JEQ SLXOERR if XO, cann't let anyone see 10B5C EC174801 5 BASE 1210 STZ SP,SLREG start at R0 1211 * \ / 00010B5D 1212 SL10 LABEL 10B5D EC128000 2 REG 1213 STZ R2 line position 1214 * \ / 00010B5E 1215 SL20 LABEL 10B5E 60174801 0 5 BASE 1216 LD R0 SP,SLREG get the register to list 10B5F 3AE120E4 3 0 1217 LEA2 R3 MESREG(R0) get register name message 10B60 DC410A84 1218 CALLNP MESSMOVE place in output buffer 10B61 60C520FC 3 IMM 1219 LD R3 ADR(MESALLREG) " xxxxxxxx " 10B62 DC410A84 1220 CALLNP MESSMOVE add to line 10B63 60D28000 3 2 REG 1221 LD R3 R2 10B64 10C4000A 3 IMM 1222 SUB R3 REGBIAS 10B65 60174801 0 5 BASE 1223 LD R0 SP,SLREG get register again 10B66 180400F0 0 IMM 1224 ADD R0 URPGETREG add in the xreq code 10B67 0900001D 1225 UREQ UPNUM(XREQ) get it 10B68 FA090B76 0 1226 JLTZ R0 SLCLNUP is there anything down there?? 10B69 60124000 0 1 REG 1227 LD R0 R1 10B6A DC4109E1 1228 CALLNP HEXDC go place in line 10B6B BC174801 0 5 BASE 1229 INCL R0 SP,SLREG advance to next register 10B6C 6404000C 0 IMM 1230 CPR R0 NUREG see if done 10B6D FE070B73 1231 JGE SL30 jump if done 10B6E 6484003B 2 IMM 1232 CPR R2 REGLSPOT see if enough 10B6F FE090B5E 1233 JLT SL20 jump if can have more 10B70 60C41400 3 IMM 1234 LD R3 ADR(OBUFF) get buffer to output 10B71 DC410ACF 1235 CALLNP OUT print it out 1 Assembler C9208 Control Mode C9304 14-Jun-93 17:33 PAGE 135 (CMOSUB) F 11 Output Subroutines 10B72 FE0F0B5D 1236 JMP SL10 next line. 1237 * --- 1238 00010B73 1239 SL30 LABEL 10B73 60C41400 3 IMM 1240 LD R3 ADR(OBUFF) write last line 10B74 DC410ACF 1241 CALLNP OUT 10B75 EC120000 0 REG 1242 STZ R0 get the green light 1243 * \ / 00010B76 1244 SLCLNUP LABEL 10B76 60574802 1 5 BASE 1245 LD R1 SP,SLRUN get run unit number 10B77 64440064 1 IMM 1246 CPR R1 MAXLOCAL got an equivalenced local unit 10B78 FE050B7C 1247 JGT SLEXIT if not, no need to unequip anything 10B79 60040060 0 IMM 1248 LD R0 FRUNEQUIP close the unit system opened for us 10B7A 08924000 1 REG 1249 FREQ R1 good-night forever 10B7B EC120000 0 REG 1250 STZ R0 get the green light 1251 * \ / 00010B7C 1252 SLEXIT LABEL 10B7C 5D1F4003 5 STAK 1253 LEAVE POP back from whence we came 1254 * --- 1255 00010B7D 1256 SLXOERR LABEL 10B7D 60574802 1 5 BASE 1257 LD R1 SP,SLRUN get run unit number 10B7E 64440064 1 IMM 1258 CPR R1 MAXLOCAL got an equivalenced local unit 10B7F FE050B82 1259 JGT SL90 if not, no need to unequip anything 10B80 60040060 0 IMM 1260 LD R0 FRUNEQUIP close the unit system opened for us 10B81 08924000 1 REG 1261 FREQ R1 good-night forever 1262 * \ / 00010B82 1263 SL90 LABEL 10B82 60052420 0 IMM 1264 LD R0 ADR(ERM166) "May not see specified program/process" 10B83 FE0F0B7C 1265 JMP SLEXIT 1266 * --- 1267 1268 END STATELIST routine 1 Assembler C9208 Control Mode C9304 14-Jun-93 17:33 PAGE 136 (CMOSUB) F 11 Output Subroutines 1270 1271 ********************************************************************************** 1272 * * 1273 * The STATPRNT routine is used to print out all the * 1274 * status and file information about luns or saved files. It * 1275 * is called by the LUNLIST and STATUS processors and expects * 1276 * LUN to contain the lun to be listed. Additional entry * 1277 * through STATPRNTU is used if the caller wishes undefined * 1278 * units to be listed also. * 1279 * * 1280 ********************************************************************************** 1281 1282 BLOCK STATPRNT routine 1283 ENTRY STATPRNT 1284 1285 BEGFRAME 00174801 5 BASE 1286 STATTEMP BSS 2 temp for status info 00174803 5 BASE 1287 STATCATSIZ BSS 1 length of catalog info 1288 ENDFRAME 1289 00000022 ABS 1290 SPPOSFN EQU 34 position for file name 1291 10B84 DD5F4004 5 STAK 1292 STATPRNT ENTRNP PUSH 10B85 60040010 0 IMM 1293 LD R0 FRSTATUS check out the lun 10B86 08800009 1294 FREQ LUN(XREQ) get static and dynamic status 10B87 E6174801 015 BASE 1295 ST2 R0 SP,STATTEMP save the status from harm 10B88 DC4109FF 1296 CALLNP LMSET set lun message in buffer 10B89 61174802 4 5 BASE 1297 LD R4 SP,STATTEMP(1) get static status back 10B8A 600B3460 0 4 CBM 1298 LD R0 R4/HWFIELD check hardware type again 10B8B 3AE11F79 3 0 1299 LEA2 R3 HWMESTAB(R0) get proper message 10B8C DC410A84 1300 CALLNP MESSMOVE add to output 10B8D 600B2630 0 4 CBM 1301 LD R0 R4/ACFIELD get access type 10B8E 3AE11FA4 3 0 1302 LEA2 R3 ACMESTAB(R0) and the message 10B8F DC410A84 1303 CALLNP MESSMOVE add to output 10B90 600B1C40 0 4 CBM 1304 LD R0 R4/PVFIELD now get privilege field 10B91 38E11FB4 3 0 1305 LEA R3 PVMESTAB(R0) and its message 10B92 DC410A84 1306 CALLNP MESSMOVE add to output 10B93 61174801 4 5 BASE 1307 LD R4 SP,STATTEMP now get dynamic status 10B94 F3290B97 4 1308 JBF R4/LDPT SP25 jump if not at load point 10B95 60C51FC6 3 IMM 1309 LD R3 ADR(LDPTMES) say its at load point 10B96 DC410A84 1310 CALLNP MESSMOVE add to output 1311 * \ / 00010B97 1312 SP25 LABEL 10B97 F3210BA1 4 1313 JBF R4/RTSP SP40 check for special records 10B98 F3270B9B 4 1314 JBF R4/EOD SP30 how about end-of-data? 10B99 60C51FC7 3 IMM 1315 LD R3 ADR(EODMES) 10B9A DC410A84 1316 CALLNP MESSMOVE add to output 1317 * \ / 00010B9B 1318 SP30 LABEL 10B9B F3250B9E 4 1319 JBF R4/AEOD SP35 is it abnormal? 10B9C 60C51FC8 3 IMM 1320 LD R3 ADR(AEODMES) 10B9D DC410A84 1321 CALLNP MESSMOVE add to output 1322 * \ / 00010B9E 1323 SP35 LABEL 10B9E F7270BA1 4 1324 JBT R4/EOD SP40 must be a file mark 10B9F 60C51FC9 3 IMM 1325 LD R3 ADR(EOFMES) 1 Assembler C9208 Control Mode C9304 14-Jun-93 17:33 PAGE 137 (CMOSUB) F 11 Output Subroutines 10BA0 DC410A84 1326 CALLNP MESSMOVE add to output 1327 * \ / 00010BA1 1328 SP40 LABEL 10BA1 61174802 4 5 BASE 1329 LD R4 SP,STATTEMP(1) get static status again 10BA2 600B3460 0 4 CBM 1330 LD R0 R4/HWFIELD get the hardware type 10BA3 6404000D 0 IMM 1331 CPR R0 HTCT is it a cartridge tape drive? 10BA4 FE0D0BAA 1332 JNE SP42 no, skip this part 10BA5 60040095 0 IMM 1333 LD R0 FRRAFCPOS 10BA6 08800009 1334 FREQ LUN(XREQ) get the currently selected track number 10BA7 18524000 1 1 REG 1335 ADD R1 R1 10BA8 38F31FCF 3 1 @ 1336 LEA R3 @TRKNUMSP(R1) get message ptr 10BA9 DC410A84 1337 CALLNP MESSMOVE add to output 00010BAA 1338 SP42 LABEL 10BAA F3330BAD 4 1339 JBF R4/SAVEBIT SP45 jump if not saved 10BAB 60C51FC4 3 IMM 1340 LD R3 ADR(SVMES) 10BAC DC410A84 1341 CALLNP MESSMOVE add to output 1342 * \ / 1343 1344 ********************************************************************************** 1345 * * 1346 * Now it is time to determine if the file has been * 1347 * recovered from backup. The ghost bit is used to determine * 1348 * this. If the bit is set then the file has not yet been * 1349 * recovered. This information is returned in the catalog * 1350 * information about each file. Note that the buffer is * 1351 * cleared before we do the request, since bogus filenames and * 1352 * unsaved luns return no information for each file and if we * 1353 * aren't careful we could be looking at the previous entry. * 1354 * * 1355 ********************************************************************************** 1356 1357 * \ / 00010BAD 1358 SP45 LABEL 10BAD E4974801 2 5 BASE 1359 ST R2 SP,STATTEMP save output buffer pointer 10BAE 600400E0 0 IMM 1360 LD R0 FRCATALOG set up to get file name if any 10BAF 60444000 1 IMM 1361 LD R1 SYSBUFL ten trillion words!! 10BB0 60840400 2 IMM 1362 LD R2 ADR(SYSBUF) the entire state of Wyoming 10BB1 08800009 1363 FREQ LUN(XREQ) see what we get 10BB2 FA090C00 0 1364 JLTZ R0 SP70 jump if nothing good 10BB3 30444000 1 IMM 1365 RSB R1 SYSBUFL see how big it really is 10BB4 E4574803 1 5 BASE 1366 ST R1 SP,STATCATSIZ save length of catalog 10BB5 60974801 2 5 BASE 1367 LD R2 SP,STATTEMP get the position pointer back 10BB6 6444002B 1 IMM 1368 CPR R1 DIRHWIDE*4+11 did we just get a header 10BB7 FE0B0BCA 1369 JLE SPNOFLOG jump if a scratch file 10BB8 61040400 4 IMM 1370 LD R4 ADR(SYSBUF) address of the catalog entries 10BB9 19170800 4 4 BASE 1371 ADD R4 R4,DIRHLNTH skip pass the header information 10BBA 5C09361C 4 ZBM 1372 CMZ R4,DIRFWWSC check if writing when system crashed 10BBB FE030BBE 1373 JEQ SPNOWWC jump if it's not 10BBC 60C51FC5 3 IMM 1374 LD R3 ADR(CRSHMES) indicate we have a crashed file (?) 10BBD DC410A84 1375 CALLNP MESSMOVE implant it for good! 1376 * \ / 00010BBE 1377 SPNOWWC LABEL 10BBE 5C093A1C 4 ZBM 1378 CMZ R4,DIRGHOST check if the ghost flag is on 10BBF FE030BC2 1379 JEQ SPNOGST jump if it's not 10BC0 60C51FCA 3 IMM 1380 LD R3 ADR(GHOSTMES) indicate we have a ghost (#) 10BC1 DC410A84 1381 CALLNP MESSMOVE implant it for good! 1 Assembler C9208 Control Mode C9304 14-Jun-93 17:33 PAGE 138 (CMOSUB) F 11 Output Subroutines 1382 * \ / 00010BC2 1383 SPNOGST LABEL 10BC2 5C093C1C 4 ZBM 1384 CMZ R4,DIRTRANS check if transaction flag on 10BC3 FE030BC6 1385 JEQ SPNOTRNS jump if it's not 10BC4 60C51FCB 3 IMM 1386 LD R3 ADR(TRANSMES) indicate possible bogus file 10BC5 DC410A84 1387 CALLNP MESSMOVE let the guy see what happened 1388 * \ / 00010BC6 1389 SPNOTRNS LABEL 10BC6 5C093E1C 4 ZBM 1390 CMZ R4,DIRFLOG check if file log flag on 10BC7 FE030BCA 1391 JEQ SPNOFLOG jump if it's not 10BC8 60C51FCC 3 IMM 1392 LD R3 ADR(FLOGMES) indicate file accesses to be logged 10BC9 DC410A84 1393 CALLNP MESSMOVE let the guy see what happened 1394 * \ / 00010BCA 1395 SPNOFLOG LABEL 10BCA 60528000 1 2 REG 1396 LD R1 R2 get the output buffer position 10BCB 30440022 1 IMM 1397 RSB R1 SPPOSFN see how much to blank out 10BCC 38B5000A 2 2 @ 1398 LEA R2 @OBPT(R2) restablish our output pointer 10BCD FE580020 1399 CFILL BLANK then do it to it! 10BCE 60840022 2 IMM 1400 LD R2 SPPOSFN point to the right spot 10BCF 60C40400 3 IMM 1401 LD R3 ADR(SYSBUF) get catalog buffer location 1402 1403 * print volume name unless we are aliased to same volume 10BD0 6216C802 013 BASE 1404 LD2 R0 R3,DIRVOLUME get volume file is on 10BD1 FA130BF2 01 1405 JEQZ2 R0 SP60 skip everything if empty volume name (.TERM) 10BD2 66001492 01 1406 CPR2 R0 STATVOL check if on aliased volume 10BD3 FE030BE0 1407 JEQ SP55 if same don't print volume or system 10BD4 DC410C09 1408 CALLNP UP6 unpack first half to output buffer 10BD5 6016C803 0 3 BASE 1409 LD R0 R3,DIRVOLUME(1) get second half 10BD6 DC410C09 1410 CALLNP UP6 unpack second half 10BD7 6004002E 0 IMM 1411 LD R0 DOT get a separator 10BD8 E435000A 0 2 @ 1412 ST R0 @OBPT(R2) store in output buffer 10BD9 D0128000 2 REG 1413 INC R2 increment buffer pointer 10BDA 6016C804 0 3 BASE 1414 LD R0 R3,DIRSYSTEM get system name 10BDB DC410C09 1415 CALLNP UP6 unpack into output buffer 10BDC 6004003A 0 IMM 1416 LD R0 COLON get a separator 10BDD E435000A 0 2 @ 1417 ST R0 @OBPT(R2) store in output buffer 10BDE D0128000 2 REG 1418 INC R2 increment buffer pointer 10BDF FE0F0BE6 1419 JMP SP57 force account name listing 1420 * --- 1421 1422 * don't print account name if it matches alias 00010BE0 1423 SP55 LABEL 10BE0 6216C805 013 BASE 1424 LD2 R0 R3,DIRACCOUNT get account file is on 10BE1 66001494 01 1425 CPR2 R0 STATACCT check if on aliased account 10BE2 FE0D0BE6 1426 JNE SP57 if not same,must process 10BE3 6056C807 1 3 BASE 1427 LD R1 R3,DIRPROJECT get project file is on 10BE4 64401496 1 1428 CPR R1 STATPROJ check if on aliased project 10BE5 FE030BF2 1429 JEQ SP60 if same don't print account or project 1430 * \ / 1431 1432 * thumbs up for account name and project 00010BE6 1433 SP57 LABEL 10BE6 6016C805 0 3 BASE 1434 LD R0 R3,DIRACCOUNT get first half of account name 10BE7 DC410C09 1435 CALLNP UP6 unpack first half to output buffer 10BE8 6016C806 0 3 BASE 1436 LD R0 R3,DIRACCOUNT(1) get second half 10BE9 DC410C09 1437 CALLNP UP6 unpack second half 1 Assembler C9208 Control Mode C9304 14-Jun-93 17:33 PAGE 139 (CMOSUB) F 11 Output Subroutines 10BEA 6004002E 0 IMM 1438 LD R0 DOT get a separator 10BEB E435000A 0 2 @ 1439 ST R0 @OBPT(R2) store in output buffer 10BEC D0128000 2 REG 1440 INC R2 increment buffer pointer 10BED 6016C807 0 3 BASE 1441 LD R0 R3,DIRPROJECT get project name 10BEE DC410C09 1442 CALLNP UP6 unpack into output buffer 10BEF 6004003A 0 IMM 1443 LD R0 COLON get a separator 10BF0 E435000A 0 2 @ 1444 ST R0 @OBPT(R2) store in output buffer 10BF1 D0128000 2 REG 1445 INC R2 increment buffer pointer 1446 * \ / 1447 1448 * print the file name if we have it 00010BF2 1449 SP60 LABEL 10BF2 60574803 1 5 BASE 1450 LD R1 SP,STATCATSIZ get length of catalog info read 10BF3 64440020 1 IMM 1451 CPR R1 DIRHWIDE*CPW compare to length of header 10BF4 FE0B0BFF 1452 JLE SP65 done if only a header 10BF5 60C40408 3 IMM 1453 LD R3 (ADR(SYSBUF))+DIRHWIDE 10BF6 6016C801 0 3 BASE 1454 LD R0 R3,DIRNAME get first half of file name 10BF7 DC410C09 1455 CALLNP UP6 unpack into output buffer 10BF8 6016C802 0 3 BASE 1456 LD R0 R3,DIRNAME(1) second half 10BF9 DC410C09 1457 CALLNP UP6 carry on 10BFA 6004002E 0 IMM 1458 LD R0 DOT get some dress 10BFB E435000A 0 2 @ 1459 ST R0 @OBPT(R2) for appearance 10BFC 18840001 2 IMM 1460 ADD R2 1 10BFD 6016C803 0 3 BASE 1461 LD R0 R3,DIREXT now for the extension 10BFE DC410C09 1462 CALLNP UP6 this should do it 1463 * \ / 00010BFF 1464 SP65 LABEL 10BFF EC35000A 2 @ 1465 STZ @OBPT(R2) wrap it up 00010C00 1466 SP70 LABEL 10C00 60C41400 3 IMM 1467 LD R3 ADR(OBUFF) now to list it 10C01 DC410ACF 1468 CALLNP OUT and stir... 10C02 5D1F4004 5 STAK 1469 LEAVE POP 1470 * --- 1471 1472 END STATPRNT routine 1 Assembler C9208 Control Mode C9304 14-Jun-93 17:33 PAGE 140 (CMOSUB) F 11 Output Subroutines 1474 1475 ********************************************************************************** 1476 * * 1477 * This is the PACK6 number unpacker. It is used to * 1478 * decode file names provided by the system into something a * 1479 * user might be able to comprehend. It places characters into * 1480 * the output buffer at the position pointed to by R2. The * 1481 * number to be unpacked is passed in R0. A maximum of six * 1482 * characters will be unpacked. No blank filling is performed. * 1483 * An alternate entry (UP6B) is used when blank-filling is * 1484 * desired. It always unpacks six positions, padding with * 1485 * trailing blanks. On exit, R2 is left pointing to the next * 1486 * position to be filled. *** R3 is left unused. * 1487 * * 1488 ********************************************************************************** 1489 00010C03 1490 UN40TAB LABEL 10C03 00000001 1491 VFD 1 10C04 00000028 1492 VFD 40 10C05 00000640 1493 VFD 40*40 10C06 0000FA00 1494 VFD 40*40*40 10C07 00271000 1495 VFD 40*40*40*40 10C08 061A8000 1496 VFD 40*40*40*40*40 1497 1498 BLOCK UP6 routine 1499 ENTRY UP6 1500 1501 BEGFRAME 1502 ENDFRAME 1503 10C09 DD5F4001 5 STAK 1504 UP6 ENTRNP PUSH 10C0A 61040005 4 IMM 1505 LD R4 5 number of characters 10C0B 60520000 1 0 REG 1506 LD R1 R0 pre-function the divide 1507 * \ / 00010C0C 1508 UP610 LABEL 10C0C 60040000 0 IMM 1509 LD R0 0 all this for division? 10C0D 58C40010 IMM 1510 IORPSR MODIFBIT say we want special handling 10C0E 14290C03 0 4 1511 DIV R0 UN40TAB(R4) get one character 10C0F 58840010 IMM 1512 CLBPSR MODIFBIT undo funny magic 10C10 FA030C16 0 1513 JEQZ R0 UP620 jump if no more characters 10C11 603100BC 0 0 @ 1514 LD R0 @P6CHARS(R0) get the character 10C12 E435000A 0 2 @ 1515 ST R0 @OBPT(R2) add to the output line 10C13 18840001 2 IMM 1516 ADD R2 1 advance buffer pointer 10C14 FB270C0C 4 1517 JDR R4 UP610 recycle 10C15 6107FFFF 4 IMM 1518 LD R4 -1 kludge!!!!! 1519 * \ / 00010C16 1520 UP620 LABEL 10C16 5D1F4001 5 STAK 1521 LEAVE POP and head home 1522 * --- 1523 1524 END UP6 routine 1 Assembler C9208 Control Mode C9304 14-Jun-93 17:33 PAGE 141 (CMOSUB) F 11 Output Subroutines 1526 1527 ********************************************************************************** 1528 * * 1529 * This routine is another flavor of the UP6 routine. It * 1530 * always unpacks six characters, even if blank. It calls the * 1531 * regular UP6 routine and then blank-fills the remainder of * 1532 * the six characters. * 1533 * * 1534 ********************************************************************************** 1535 1536 BLOCK UP6B routine 1537 ENTRY UP6B 1538 1539 BEGFRAME 1540 ENDFRAME 1541 10C17 DD5F4001 5 STAK 1542 UP6B ENTRNP PUSH 10C18 DC410C09 1543 CALLNP UP6 go unpack 10C19 FB090C1E 4 1544 JLTZ R4 UP6B20 exit if all six filled 10C1A 60040020 0 IMM 1545 LD R0 BLANK now to blank-fill 1546 * \ / 00010C1B 1547 UP6B10 LABEL 10C1B E435000A 0 2 @ 1548 ST R0 @OBPT(R2) 10C1C 18840001 2 IMM 1549 ADD R2 1 stuff blank and advance 10C1D FB270C1B 4 1550 JDR R4 UP6B10 loop till all six chars filled 1551 * \ / 00010C1E 1552 UP6B20 LABEL 10C1E 5D1F4001 5 STAK 1553 LEAVE POP and now return to real caller 1554 * --- 1555 1556 END UP6B routine 1 Assembler C9208 Control Mode C9304 14-Jun-93 17:33 PAGE 142 (CMOSUB) F 11 Output Subroutines 1558 1559 ********************************************************************************** 1560 * * 1561 * This is the UP6RL routine. It is yet another flavor of * 1562 * PAK-6 outputter. This form is called to output the value * 1563 * right-justified in the output line. The output buffer * 1564 * pointer (R3) should be pointing to the spot to stuff in the * 1565 * output line. R0 should contain the value to output. * 1566 * * 1567 ********************************************************************************** 1568 1569 BLOCK UP6RL routine 1570 ENTRY UP6RL 1571 1572 BEGFRAME 1573 ENDFRAME 1574 10C1F DD5F4001 5 STAK 1575 UP6RL ENTRNP PUSH 10C20 61040006 4 IMM 1576 LD R4 6 6 characters 1577 * \ / 00010C21 1578 UP6RL10 LABEL 10C21 62120000 010 REG 1579 LD2 R0 R0 juggle number 10C22 58C40010 IMM 1580 IORPSR MODIFBIT change hardware 10C23 14040028 0 IMM 1581 DIV R0 40 this stuff is radpack-40 10C24 58840010 IMM 1582 CLBPSR MODIFBIT back to normal 10C25 FA430C29 1 1583 JEQZ R1 UP6RL20 jump if just a blank 10C26 607300BC 1 1 @ 1584 LD R1 @P6CHARS(R1) convert to real character 10C27 E477000A 1 3 @ 1585 ST R1 @OBPT(R3) into output line 10C28 10C40001 3 IMM 1586 SUB R3 1 backup one slot 1587 * \ / 00010C29 1588 UP6RL20 LABEL 10C29 FB230C21 4 1589 DRJ R4 UP6RL10 recycle until done 10C2A 5D1F4001 5 STAK 1590 LEAVE POP then return to caller 1591 * --- 1592 1593 END UP6RL routine 1 Assembler C9208 Control Mode C9304 14-Jun-93 17:33 PAGE 143 (CMOSUB) F 11 Output Subroutines 1595 1596 ********************************************************************************** 1597 * * 1598 * UP12RL. This routine is basically a spin off of the * 1599 * pak6 outputter. This routine right justifies 12 characters * 1600 * into the output line. The output buffer pointer (R3) should * 1601 * be pointing to the spot to stuff in the output line. R0, R1 * 1602 * contain the value to output. * 1603 * * 1604 ********************************************************************************** 1605 1606 BLOCK UP12RL routine 1607 ENTRY UP12RL 1608 1609 BEGFRAME 00174801 5 BASE 1610 UP12TMP BSS 1 used to save second half of word 1611 ENDFRAME 1612 10C2B DD5F4002 5 STAK 1613 UP12RL ENTRNP PUSH 10C2C E0124000 0 1 REG 1614 EXCH R0 R1 swizzle around these two registers 10C2D E4574801 1 5 BASE 1615 ST R1 SP,UP12TMP save away for later use 10C2E DC410C1F 1616 CALLNP UP6RL tear up the first word 10C2F 60174801 0 5 BASE 1617 LD R0 SP,UP12TMP now for the second half 10C30 DC410C1F 1618 CALLNP UP6RL last thing to do 10C31 5D1F4002 5 STAK 1619 LEAVE POP and now return to real caller 1620 * --- 1621 1622 END UP12RL routine 1 Assembler C9208 Control Mode C9304 14-Jun-93 17:33 PAGE 144 (CMOSUB) F 11 Output Subroutines 1624 1625 ********************************************************************************** 1626 * * 1627 * This is the UP12 number unpacker. It works very * 1628 * similar to the UP6 routine because we call it. The symbol * 1629 * to be unpacked must be in R0 and R1 respectively, R2 is the * 1630 * output buffer pointer. * 1631 * * 1632 ********************************************************************************** 1633 1634 BLOCK UP12 routine 1635 ENTRY UP12 1636 1637 BEGFRAME 00174801 5 BASE 1638 UP12R1 BSS 1 used to save second half of word 1639 ENDFRAME 1640 10C32 DD5F4002 5 STAK 1641 UP12 ENTRNP PUSH 10C33 E4574801 1 5 BASE 1642 ST R1 SP,UP12R1 save away for later use 10C34 DC410C09 1643 CALLNP UP6 tear up the first word 10C35 60174801 0 5 BASE 1644 LD R0 SP,UP12R1 now for the second half 10C36 DC410C09 1645 CALLNP UP6 last thing to do 10C37 5D1F4002 5 STAK 1646 LEAVE POP and now return to real caller 1647 * --- 1648 1649 END UP12 routine 1 Assembler C9208 Control Mode C9304 14-Jun-93 17:33 PAGE 145 (CMOSUB) F 11 Output Subroutines 1651 1652 ********************************************************************************** 1653 * * 1654 * This is the VAROUT subroutine. It is called to output * 1655 * (display) a variable on the standard output unit. The * 1656 * variable name, type, and value are listed for the user to * 1657 * see. Called with VAR (R3) pointing to the block for * 1658 * variable to be listed. * 1659 * VAR is saved and restored, R5 and R6 are not touched, * 1660 * and R0, R1, R2, and R4 are zapped. * 1661 * * 1662 ********************************************************************************** 1663 1664 BLOCK VAROUT routine 1665 ENTRY VAROUT 1666 1667 BEGFRAME 00174801 5 BASE 1668 VOTMP BSS 1 temp for VAR 1669 ENDFRAME 1670 10C38 DD5F4002 5 STAK 1671 VAROUT ENTRNP PUSH 10C39 E4D74801 3 5 BASE 1672 ST VAR SP,VOTMP save VAR pointer from harm 10C3A DC410AF7 1673 CALLNP OUTBLANK blank out the list buffer 10C3B 60840000 2 IMM 1674 LD R2 0 point to front of buffer 10C3C 6016C801 0 3 BASE 1675 LD R0 VAR,VARNAME get the variable name 10C3D DC410C09 1676 CALLNP UP6 unpack into list buffer 10C3E 6016C802 0 3 BASE 1677 LD R0 VAR,VARNAME(1) get second half of name 10C3F DC410C09 1678 CALLNP UP6 and unpack it 10C40 600520FF 0 IMM 1679 LD R0 ADR(VIN) pretend its numeric 10C41 5C08C010 3 ZBM 1680 CMZ VAR,VARTYPE is it really? 10C42 FE030C44 1681 JEQ VO10 jump if hunch correct 10C43 60052101 0 IMM 1682 LD R0 ADR(VIS) use string data 1683 * \ / 00010C44 1684 VO10 LABEL 10C44 60D20000 3 0 REG 1685 LD R3 R0 juggle 10C45 DC410A84 1686 CALLNP MESSMOVE transfer to output buffer 10C46 60D74801 3 5 BASE 1687 LD VAR SP,VOTMP get the pointer again 10C47 5C08C010 3 ZBM 1688 CMZ VAR,VARTYPE what was that?? 10C48 FE030C4F 1689 JEQ VO20 jump if numeric 10C49 3816C804 0 3 BASE 1690 LEA R0 VAR,VARSTR point to string 10C4A 6056C803 1 3 BASE 1691 LD R1 VAR,VARSTRLEN get its length 10C4B 38B5000A 2 2 @ 1692 LEA R2 @OBPT(R2) point to output buffer spot 10C4C DA880800 2 01 1693 MOVE R2 R0 R1 and move it 10C4D EC168000 2 CACH 1694 STZ CACH R2,0 add terminator for our output 10C4E FE0F0C53 1695 JMP VO30 and go send it out 1696 * --- 1697 00010C4F 1698 VO20 LABEL (numeric value) 10C4F 6016C803 0 3 BASE 1699 LD R0 VAR,VARVALUE get the value of the number 10C50 60D28000 3 2 REG 1700 LD R3 R2 juggle 10C51 DC410AB2 1701 CALLNP NDCVAR transfer value to buffer 10C52 EC37000A 3 @ 1702 STZ @OBPT(R3) add terminator 1703 * \ / 00010C53 1704 VO30 LABEL 10C53 60C41400 3 IMM 1705 LD R3 ADR(OBUFF) point to output buffer 10C54 DC410ACF 1706 CALLNP OUT ship it out on display 1 Assembler C9208 Control Mode C9304 14-Jun-93 17:33 PAGE 146 (CMOSUB) F 11 Output Subroutines 10C55 60D74801 3 5 BASE 1707 LD VAR SP,VOTMP restore VAR pointer 10C56 5D1F4002 5 STAK 1708 LEAVE POP and return to caller 1709 * --- 1710 1711 END VAROUT routine 116 INPUT CM.UTL:CMUSUB1 1 Assembler C9208 Control Mode C9304 14-Jun-93 17:33 PAGE 147 (CMUSUB1) F 12 Utility subroutines 3 4 ********************************************************************************** 5 * * 6 * This is the BIGZAP routine. It is called whenever the * 7 * entire under-process stack is to be purged. This is done * 8 * for logoff and for RESET ALL, for example. It simply calls * 9 * ZAP until there is nothing left. Also note that ZAP closes * 10 * the run unit for each underprocess. * 11 * * 12 ********************************************************************************** 13 14 BLOCK BIGZAP subroutine 15 ENTRY BIGZAP 16 17 BEGFRAME 18 ENDFRAME 19 10C57 DD5F4001 5 STAK 20 BIGZAP ENTRNP PUSH 10C58 D140001D 21 STMW UPNUM immediate under process 22 * \ / 00010C59 23 BZ10 LABEL 10C59 DC411163 24 CALLNP ZAP poof!!! goes a program 10C5A FA030C59 0 25 JEQZ R0 BZ10 jump if no more to hit 10C5B 5D1F4001 5 STAK 26 LEAVE POP return 27 * --- 28 29 END BIGZAP subroutine 1 Assembler C9208 Control Mode C9304 14-Jun-93 17:33 PAGE 148 (CMUSUB1) F 12 Utility subroutines 31 32 ********************************************************************************** 33 * * 34 * This is the CHKDELIM routine. This routine is called * 35 * to check if bogus filenames handed to the system are * 36 * actually ok. If the system encounters an illegal character * 37 * while packing it stops, and no error message. Here we check * 38 * the terminating charater and the legal possibilities are * 39 * blank, comma, carriage return all else returns an error. * 40 * This routine is called with R0 contain the character to * 41 * check. Also this routine uses two registers R0 and R1. If * 42 * things are fine R0 returns with a zero. * 43 * * 44 ********************************************************************************** 45 46 BLOCK CHKDELIM subroutine 47 ENTRY CHKDELIM 48 49 BEGFRAME 50 ENDFRAME 51 10C5C DD5F4001 5 STAK 52 CHKDELIM ENTRNP PUSH 10C5D EC120000 0 REG 53 STZ R0 assume good until proven rotten 10C5E 6444000D 1 IMM 54 CPR R1 CR compare to a carriage return 10C5F FE030C67 55 JEQ CHKDELIMOK if equal, we're outta here 10C60 64440020 1 IMM 56 CPR R1 BLANK we accept blanks also 10C61 FE030C67 57 JEQ CHKDELIMOK no problem with blanks 10C62 6444002C 1 IMM 58 CPR R1 COMMA check for comma 10C63 FE030C67 59 JEQ CHKDELIMOK standard legal delimiter 10C64 64440000 1 IMM 60 CPR R1 NUL check for nothing, used as delimeter 10C65 FE030C67 61 JEQ CHKDELIMOK kludge if I ever saw one 10C66 6004008F 0 IMM 62 LD R0 08F "Bad filename" 63 * \ / 00010C67 64 CHKDELIMOK LABEL 10C67 5D1F4001 5 STAK 65 LEAVE POP until we meet again 66 * --- 67 68 END CHKDELIM subroutine 1 Assembler C9208 Control Mode C9304 14-Jun-93 17:33 PAGE 149 (CMUSUB1) F 12 Utility subroutines 70 71 ********************************************************************************** 72 * * 73 * This is the CMLUNGET routine. It is called whenever a * 74 * free CM lun is needed. This is for such things as the * 75 * FILEGET routine, the initial run file, or the catalog input * 76 * unit. It finds a free lun (from up in the CM region) and * 77 * stuffs the value in CMLUN, as well as returning the lun in * 78 * R1. R0 is also clobbered. If an error occurrs, this routine * 79 * exits directly to ERPMC. * 80 * * 81 ********************************************************************************** 82 83 BLOCK CMLUNGET subroutine 84 ENTRY CMLUNGET 85 86 BEGFRAME 87 ENDFRAME 88 10C68 DD5F4001 5 STAK 89 CMLUNGET ENTRNP PUSH 10C69 60040122 0 IMM 90 LD R0 URFREELUN xreq code for free lun finder 10C6A 09010006 91 UREQ CMEQLUN(XREQ) use our CM base lun for starters 10C6B FA070C6E 0 92 JGEZ R0 CMLGEXIT jump if it's ok 10C6C 6005279A 0 IMM 93 LD R0 ADR(ERM508) "System error. Somebody blew it!" 10C6D FE0F0A58 94 JMP ERPMC and go drop the bomb 95 * --- 96 00010C6E 97 CMLGEXIT LABEL 10C6E E440001B 1 98 ST R1 CMLUN remember the unit we found 10C6F 5D1F4001 5 STAK 99 LEAVE POP and return home 100 * --- 101 102 END CMLUNGET subroutine 1 Assembler C9208 Control Mode C9304 14-Jun-93 17:33 PAGE 150 (CMUSUB1) F 12 Utility subroutines 104 105 ********************************************************************************** 106 * * 107 * The COMLOOK routine is used to pick up a user input * 108 * item and see if it is a valid command. If so, R0 returns * 109 * zero to indicate that the item was found, and R3 points to * 110 * the entry in the command table. If the item is not a valid * 111 * command, R0 will return an error message. NOTE** R2 returns * 112 * the FETCHITM type so R2 is left intact here!! * 113 * * 114 * A second entry, COMVAR, is used to check for a variable * 115 * name the same as a command name. If a variable name matches * 116 * a command name, the command will be performed and the * 117 * variable ignored. * 118 * * 119 ********************************************************************************** 120 121 BLOCK COMLOOK/COMVAR subroutines 122 ENTRY COMLOOK 123 ENTRY COMVAR 124 125 BEGFRAME 126 ENDFRAME 127 10C70 DD5F4001 5 STAK 128 COMLOOK ENTRNP PUSH 10C71 DC410396 129 CALLNP FETCHITMC get user input 10C72 F6B90C7C 2 130 JBT R2/TEOL CL05 end of line, return error 10C73 F6BD0C7E 2 131 JBT R2/TALPH CL10 alpha, could be command 10C74 F2BB0C7C 2 132 JBF R2/TDELM CL05 jump if not special char 10C75 EC000011 133 STZ TCSAVE don't get fooled again!!! 10C76 60C50309 3 IMM 134 LD R3 ADR(QSTCOM) pretend user needs help 10C77 6404003F 0 IMM 135 CPR R0 QM is it the ? ? 10C78 FE030C8C 136 JEQ CL40 take it 10C79 60C50306 3 IMM 137 LD R3 ADR(STRCOM) maybe just a comment 10C7A 6404002A 0 IMM 138 CPR R0 STAR see if a * 10C7B FE030C8C 139 JEQ CL40 take it if so 140 * \ / 00010C7C 141 CL05 LABEL 10C7C 6007FFFF 0 IMM 142 LD R0 -1 give an all out error return 10C7D 5D1F4001 5 STAK 143 LEAVE POP and back to the calling party 144 * --- 145 00010C7E 146 CL10 LABEL 10C7E DC410477 147 CALLNP PACKER make in PAK12 format 10C7F 60C00116 3 148 LD R3 BUFPT get buffer pointer 10C80 60D6C000 3 3 CACH 149 LD R3 CACH R3,0 get next input character 10C81 78C4007F 3 IMM 150 AND R3 GASMASK sterilize 10C82 64C4002E 3 IMM 151 CPR R3 DOT is it a period? 10C83 FE030C8A 152 JEQ CL30 if so, assume file name 153 * \ / 00010C84 154 CL15 LABEL 10C84 60C50225 3 IMM 155 LD R3 ADR(COMTAB) set up to search table 156 * \ / 00010C85 157 CL20 LABEL 10C85 6616C800 013 BASE 158 CPR2 R0 R3,COMNAME see if this is the one 10C86 FE030C8C 159 JEQ CL40 right on!! return pointer 1 Assembler C9208 Control Mode C9304 14-Jun-93 17:33 PAGE 151 (CMUSUB1) F 12 Utility subroutines 10C87 18C40003 3 IMM 160 ADD R3 COMLENE advance to next entry 10C88 64C5031E 3 IMM 161 CPR R3 ADR(COMTABE) see if off the end 10C89 FE090C85 162 JLT CL20 try again if more 163 * \ / 00010C8A 164 CL30 LABEL 10C8A 600523AF 0 IMM 165 LD R0 ADR(ERM150) "UNRECOGNIZED COMMAND" 10C8B 5D1F4001 5 STAK 166 LEAVE POP sorry charlie 167 * --- 168 00010C8C 169 CL40 LABEL 10C8C 60040000 0 IMM 170 LD R0 0 good command. return ok. 10C8D 5D1F4001 5 STAK 171 LEAVE POP nice work. 172 * --- 173 10C8E DD5F4001 5 STAK 174 COMVAR ENTRNP PUSH entry for variable check 10C8F FE0F0C84 175 JMP CL15 and go check it out 176 * --- 177 178 END COMLOOK/COMVAR subroutines 1 Assembler C9208 Control Mode C9304 14-Jun-93 17:33 PAGE 152 (CMUSUB1) F 12 Utility subroutines 180 181 ********************************************************************************** 182 * * 183 * This is the COMMANDSPL routine. It takes the current * 184 * command and sends it, as a message, to the spooler. No * 185 * processing is done on the contents of the message. This * 186 * routine then looks for a response from the spooler. If an * 187 * error message is received, it is displayed for the user. If * 188 * a good response is received, this routine returns to the * 189 * calling routine. * 190 * * 191 ********************************************************************************** 192 193 BLOCK COMMANDSPL subroutine 194 ENTRY COMMANDSPL 195 00010C90 196 CSRDEF BASE R4 00170000 4 CACH 197 CSRHEAD BSSC MSGRHDLEN save area for header 00170807 4 BASE 198 CSRID BSS 1 reply message ID 00170808 4 BASE 199 CSLNTH BSS 1 length of the entry (characters) 00170024 4 CACH 200 CSRREPLY BSSC 2 reply value 201 BSSC 2 remainder of reply type field 00000028 ABS 202 CSRHIRL EQU DISPC CSRHEAD length of header, ID, and reply 00170028 4 CACH 203 CSRDETLS BSSC 0 reply string 0017080A 4 BASE 204 CSRERR BSSB 32 reply error code 205 BSSC MAXREPLYL-4 save area for reply string 00000127 ABS 206 CSRLEN EQU DISPC CSRHEAD maximum total length of reply message 207 DRCT 0000004A ABS 208 CSRSIZE EQU DISPW CSRDEF 209 ORG CSRDEF 210 00010C90 211 CSMDEF BASE R4 00170800 4 BASE 212 CSMSGID BSS 1 message ID 00170801 4 BASE 213 CSMSGRTWRD BSS 0 word address of message request type 00170004 4 CACH 214 CSMSGREQTP BSSC 4 message request type 00000008 ABS 215 CSMSGIDLEN EQU DISPC CSMSGID length if ID and request type 00170008 4 CACH 216 CSMSGTEXT BSSC MAXLEN maximum length of message 00000108 ABS 217 CSMLEN EQU DISPC CSMSGID maximum total length of reply message 218 DRCT 00000042 ABS 219 CSMSIZE EQU DISPW CSMDEF 220 ORG CSMDEF 221 222 BEGFRAME 00174801 5 BASE 223 CSMASKMSG BSS 1 message classes enabled 00174802 5 BASE 224 CSSPOOLER BSS 1 spooler process number 00174803 5 BASE 225 CSERR BSS 1 error code 00174804 5 BASE 226 CSMSG BSS CSMSIZE save command message area 00174846 5 BASE 227 CSLENACT BSS 1 length of actual reply 00174847 5 BASE 228 CSRMSG BSS CSRSIZE save reply message area 229 ENDFRAME 230 10C90 DD5F4091 5 STAK 231 COMMANDSPL ENTRNP PUSH 10C91 60040163 0 IMM 232 LD R0 URSSMSGA get enable message classes request 10C92 60430000 1 IMM 233 LD R1 REPMASK get response message class 10C93 09040000 IMM 234 UREQ 0 set the enable 10C94 FA09154C 0 235 JLTZ R0 COMERR jump on error 1 Assembler C9208 Control Mode C9304 14-Jun-93 17:33 PAGE 153 (CMUSUB1) F 12 Utility subroutines 10C95 E4574801 1 5 BASE 236 ST R1 SP,CSMASKMSG save classes enabled 237 * \ / 00010C96 238 CS05 LABEL 10C96 60040061 0 IMM 239 LD R0 URFSERNO get find serial number request 10C97 09040000 IMM 240 UREQ 0+XREQ get the serial number 10C98 FA090CE7 0 241 JLTZ R0 CS90 jump on error 10C99 FAC30C96 3 242 JEQZ R3 CS05 don't accept a zero message ID 10C9A 39174804 4 5 BASE 243 LEA R4 SP,CSMSG get address of command message 10C9B E4D70800 3 4 BASE 244 ST R3 R4,CSMSGID store in message 10C9C 60010045 0 245 LD R0 OPRREQTYPE get operator request type 10C9D E4170801 0 4 BASE 246 ST R0 R4,CSMSGRTWRD store in message 10C9E 60010008 0 247 LD R0 IBPT get input buffer pointer 10C9F 60440100 1 IMM 248 LD R1 MAXLEN get input buffer length 10CA0 DA1C080D 0 1 249 SRCHI R0 R1 CR find length of line 10CA1 30440100 1 IMM 250 RSB R1 MAXLEN find length of string without CR 10CA2 60010008 0 251 LD R0 IBPT get string pointer back 10CA3 60D60400 3 0 @R 252 LD R3 @R0 get 1st char in string 10CA4 64C4003E 3 IMM 253 CPR R3 CMCHAR is it the cm prompt 10CA5 FE0D0CA8 254 JNE CS10 if not, skip adjustment 10CA6 D0920000 0 REG 255 INCP R0 skip prompt character 10CA7 D0524000 1 REG 256 DEC R1 one less character to move 257 * \ / 00010CA8 258 CS10 LABEL 10CA8 60D60400 3 0 @R 259 LD R3 @R0 get next character 10CA9 64C40027 3 IMM 260 CPR R3 CCONCAT is it the substitution character 10CAA FE0D0CAD 261 JNE CS15 if not, skip adjustment 10CAB D0920000 0 REG 262 INCP R0 skip substitution character 10CAC D0524000 1 REG 263 DEC R1 decrement number of characters in command 264 * \ / 00010CAD 265 CS15 LABEL 10CAD 38970008 2 4 CACH 266 LEA R2 R4,CSMSGTEXT get address of message area 10CAE 60D24000 3 1 REG 267 LD R3 R1 save message length 10CAF FE400000 268 CMOVE move command line into message 10CB0 18C40008 3 IMM 269 ADD R3 CSMSGIDLEN find total message length 10CB1 60934000 2 5 REG 270 LD R2 SP save stack pointer 10CB2 DC01101B 271 CALL SENDSPLMSG send message to spooler 10CB3 4152C000 3 REG 272 PARV R3 message length 10CB4 41170800 4 BASE 273 PAR R4,CSMSGID message location 10CB5 41168802 2 BASE 274 PAR R2,CSSPOOLER save spooler process number 10CB6 40168803 2 BASE 275 PARL R2,CSERR save error code 10CB7 FA090CE7 0 276 JLTZ R0 CS90 jump if error in message transmission 10CB8 60934000 2 5 REG 277 LD R2 SP save stack address 10CB9 39174804 4 5 BASE 278 LEA R4 SP,CSMSG get address of message 10CBA DC010E4D 279 CALL GETSPLREP get reply from spooler 10CBB 41168802 2 BASE 280 PAR R2,CSSPOOLER pass spooler process number 10CBC 41170800 4 BASE 281 PAR R4,CSMSGID pass message ID 10CBD 41440127 IMM 282 PARV CSRLEN get maximum spooler reply length 10CBE 41168847 2 BASE 283 PAR R2,CSRMSG get address for reply 10CBF 41168846 2 BASE 284 PAR R2,CSLENACT length of actual reply 10CC0 40168803 2 BASE 285 PARL R2,CSERR get address for error 10CC1 60174803 0 5 BASE 286 LD R0 SP,CSERR get error code 10CC2 FA0D0CE7 0 287 JNEZ R0 CS90 jump on error 10CC3 39174847 4 5 BASE 288 LEA R4 SP,CSRMSG get address of reply message 10CC4 60570024 1 4 CACH 289 LD R1 R4,CSRREPLY get reply code 10CC5 604A5000 1 1 CBM 290 LD R1 R1/BITS 8:7 shift one character left 10CC6 7C570025 1 4 CACH 291 IOR R1 R4,CSRREPLY(1) or in second character 1 Assembler C9208 Control Mode C9304 14-Jun-93 17:33 PAGE 154 (CMUSUB1) F 12 Utility subroutines 10CC7 64444341 1 IMM 292 CPR R1 SPLOK check if command successful 10CC8 FE0D0CCE 293 JNE CS20 jump if not OK 10CC9 60040164 0 IMM 294 LD R0 URSCMSGA get clear message enable request 10CCA 60574801 1 5 BASE 295 LD R1 SP,CSMASKMSG get those classes we enabled 10CCB 09040000 IMM 296 UREQ 0 clear the enables 10CCC FA09154C 0 297 JLTZ R0 COMERR jump on error 10CCD 5D1F4091 5 STAK 298 LEAVE POP 299 * --- 300 00010CCE 301 CS20 LABEL 10CCE 64444343 1 IMM 302 CPR R1 SPLERRCODE check if system error code 10CCF FE0D0CD3 303 JNE CS30 jump if not an error code 10CD0 6017080A 0 4 BASE 304 LD R0 R4,CSRERR get error code 10CD1 EDCA0010 0 CBM 305 STW R0/ERROR set the error bit 10CD2 FE0F0CE7 306 JMP CS90 go print error 307 * --- 308 00010CD3 309 CS30 LABEL 10CD3 64444342 1 IMM 310 CPR R1 SPLERRSTR check if error string 10CD4 FE0D0CE2 311 JNE CS35 jump if not error string 10CD5 38170028 0 4 CACH 312 LEA R0 R4,CSRDETLS get address of details portion 10CD6 60574846 1 5 BASE 313 LD R1 SP,CSLENACT get length of actual reply 10CD7 10440028 1 IMM 314 SUB R1 CSRHIRL subtract part other than string 10CD8 FA4B0CE6 1 315 JLEZ R1 CS40 bad message if no string 10CD9 60810009 2 316 LD R2 SBPT get pointer to symbol buffer 10CDA FE400000 317 CMOVE move reply string to symbol buffer 10CDB 6004000D 0 IMM 318 LD R0 CR get a carriage return 10CDC E4168400 0 2 @R 319 ST R0 @R2 place it in the output string 10CDD D00A9F30 2 CBM 320 INC R2/NXTCHAR advance the output buffer pointer 10CDE EC168400 2 @R 321 STZ @R2 put zero at end of message 10CDF D00A9F30 2 CBM 322 INC R2/NXTCHAR advance the output buffer pointer 10CE0 EC168400 2 @R 323 STZ @R2 put zero at end of message 10CE1 FE0F1554 324 JMP SPLCOMERR go print error string 325 * --- 326 00010CE2 327 CS35 LABEL 10CE2 64445A42 1 IMM 328 CPR R1 SPLERRMSG check if bad CM message 10CE3 FE0D0CE6 329 JNE CS40 jump if not 10CE4 60052817 0 IMM 330 LD R0 ADR(ERM529) "Spooler could not understand message" 10CE5 FE0F0CE7 331 JMP CS90 go print error 332 * --- 333 00010CE6 334 CS40 LABEL 10CE6 600527EB 0 IMM 335 LD R0 ADR(ERM521) "bad spooler reply" 00010CE7 336 CS90 LABEL 10CE7 E4174803 0 5 BASE 337 ST R0 SP,CSERR save error code 10CE8 60040164 0 IMM 338 LD R0 URSCMSGA get clear message enable request 10CE9 60574801 1 5 BASE 339 LD R1 SP,CSMASKMSG get those classes we enabled 10CEA 09040000 IMM 340 UREQ 0 clear the enables 10CEB 60174803 0 5 BASE 341 LD R0 SP,CSERR get error code back 10CEC FE0F154C 342 JMP COMERR go tell the bad news 343 * --- 344 345 END COMMANDSPL subroutine 1 Assembler C9208 Control Mode C9304 14-Jun-93 17:33 PAGE 155 (CMUSUB1) F 12 Utility subroutines 347 348 ********************************************************************************** 349 * * 350 * This routine performs control functions on luns. Each * 351 * function is called through a different command, such as * 352 * BKSP, SEOD, WFM, etc, but all of these come to this routine. * 353 * Entry is through CONTROLS if a single operation is allowed * 354 * (e. g. REWIND), and through CONTROLM if a * 355 * multiple-operation function (e. g. FWSP). Called with the * 356 * correct function code and the address of the response * 357 * message to print when done. On completion, exiting is done * 358 * directly to main control (MCDONE). * 359 * * 360 ********************************************************************************** 361 362 BLOCK CONTROLS/CONTROLM subroutines 363 ENTRY CONTROLS 364 ENTRY CONTROLM 365 366 BEGFRAME2 00174800 5 BASE 367 CNTLRPT BSS 1 repeat count initializer 00174801 5 BASE 368 CNTLFUNC BSS 1 xreq function code 00174802 5 BASE 369 CNTLDMES BSS 1 message to print when done 00174803 5 BASE 370 CNTBUFSAV BSS 1 pointer to start of parameter 371 ENDFRAME 372 10CED DD1F4004 5 STAK 373 CONTROLS ENTR PUSH entry for single operation 10CEE C1574801 5 BASE 374 STPV SP,CNTLFUNC save the function code 10CEF C0574802 5 BASE 375 STPVL SP,CNTLDMES and the response message on done 10CF0 EC174800 5 BASE 376 STZ SP,CNTLRPT say no repeating allowed 10CF1 FE0F0CF6 377 JMP CNT10 378 * --- 379 10CF2 DD1F4004 5 STAK 380 CONTROLM ENTR PUSH entry for multiple operations 10CF3 C1574801 5 BASE 381 STPV SP,CNTLFUNC save the function code 10CF4 C0574802 5 BASE 382 STPVL SP,CNTLDMES and the 'done' message 10CF5 EDD74800 5 BASE 383 STW SP,CNTLRPT allow repeat counts 384 * \ / 00010CF6 385 CNT10 LABEL 10CF6 DC410956 386 CALLNP NOCRCHECK make sure there is work to do 00010CF7 387 CNT20 LABEL recycle here - help ecoalliance 10CF7 5C000119 388 CMZ ATEOL are we all done here?' 10CF8 FE0D0D20 389 JNE CNT99 guess so 10CF9 60000116 0 390 LD R0 BUFPT get input buffer pointer 10CFA E4174803 0 5 BASE 391 ST R0 SP,CNTBUFSAV and save for later 10CFB 60174800 0 5 BASE 392 LD R0 SP,CNTLRPT get repeat limiter 10CFC E400000D 0 393 ST R0 NUMFUNCS set it up for LUNGET 10CFD DC410F04 394 CALLNP LUNGET go get lun(s) 10CFE FA0D0D1A 0 395 JNEZ R0 CNT95 jump if possible error 10CFF 6000000D 0 396 LD R0 NUMFUNCS get repeat count 10D00 FA090D19 0 397 JLTZ R0 CNT90 jump if repeat count negative 10D01 60974800 2 5 BASE 398 LD R2 SP,CNTLRPT see if wanted a repeat count 10D02 FA830D04 2 399 JEQZ R2 CNT25 ok if so 10D03 FA030D19 0 400 JEQZ R0 CNT90 error if repeat count zero 401 * \ / 00010D04 402 CNT25 LABEL 1 Assembler C9208 Control Mode C9304 14-Jun-93 17:33 PAGE 156 (CMUSUB1) F 12 Utility subroutines 10D04 60C0000B 3 403 LD R3 LOWLUN get first lun to zap 404 * \ / 00010D05 405 CNT30 LABEL small recycling programs help too 10D05 E4C00009 3 406 ST R3 LUN remember lun to use 10D06 6100000D 4 407 LD R4 NUMFUNCS how many times should we do it? 408 * \ / 00010D07 409 CNT35 LABEL 10D07 F7A51522 6 410 JBT ST/INRQ MCBRK exit if break requested 10D08 60174801 0 5 BASE 411 LD R0 SP,CNTLFUNC get the function to perform 10D09 0892C000 3 REG 412 FREQ R3 do it to it!!! 10D0A FA090D16 0 413 JLTZ R0 CNT70 jump out if trouble 10D0B F6290D12 0 414 JBT R0/LDPT CNT45 exit if load point 10D0C F2210D11 0 415 JBF R0/RTSP CNT40 jump if not special record 10D0D F2270D11 0 416 JBF R0/EOD CNT40 jump if not end-of-data 10D0E 60040019 0 IMM 417 LD R0 FRWFM check for writing file marks 10D0F 64174801 0 5 BASE 418 CPR R0 SP,CNTLFUNC is that what we are doing? 10D10 FE0D0D12 419 JNE CNT45 if not, then bail out now 420 * \ / 00010D11 421 CNT40 LABEL 10D11 FB230D07 4 422 DRJ R4 CNT35 keep going if possible 00010D12 423 CNT45 LABEL 10D12 18C40001 3 IMM 424 ADD R3 1 advance to next lun 10D13 64C0000C 3 425 CPR R3 MAXLUN see if done 10D14 FE0B0D05 426 JLE CNT30 go do next 10D15 FE0F0CF7 427 JMP CNT20 get some more luns 428 * --- 429 00010D16 430 CNT70 LABEL 10D16 DC410A0A 431 CALLNP ERPRTSL give the error 10D17 EDCB8810 6 CBM 432 STW ST/ABRT remember it happened 10D18 FE0F0D12 433 JMP CNT45 proceed to next lun, if any 434 * --- 435 00010D19 436 CNT90 LABEL 10D19 600526AD 0 IMM 437 LD R0 ADR(ERM402) "INVALID REPEAT COUNT" 438 * \ / 00010D1A 439 CNT95 LABEL 10D1A 60574803 1 5 BASE 440 LD R1 SP,CNTBUFSAV reset pointer for error message 10D1B E4400115 1 441 ST R1 LBUFPT 10D1C DC410A17 442 CALLNP ERPRTS give the error 10D1D DC410465 443 CALLNP FINDSPACE 10D1E EDCB8810 6 CBM 444 STW ST/ABRT remember the error 10D1F FE0F0CF7 445 JMP CNT20 keep going 446 * --- 00010D20 447 CNT99 LABEL 10D20 F7891539 6 448 JBT ST/ABRT MCSETAB go to jail if we were bad 10D21 61D74802 7 5 BASE 449 LD R7 SP,CNTLDMES get nice message 10D22 FE0F14D8 450 JMP MCDONE and return to user 451 * --- 452 453 END CONTROLS/CONTROLM subroutines 1 Assembler C9208 Control Mode C9304 14-Jun-93 17:33 PAGE 157 (CMUSUB1) F 12 Utility subroutines 455 456 ********************************************************************************** 457 * * 458 * This routine is used to set up the user input unit at a * 459 * break in do file exection. The new input lun is the standard * 460 * input unit. The old input unit is equivalenced to a cm lun and * 461 * saved for restoration. The user input unit is closed. Finally, * 462 * the input unit is equivalenced to the standard input unit. R0, * 463 * R1, and R2 are destroyed. * 464 * * 465 ********************************************************************************** 466 467 BLOCK DOBREAK subroutine 468 ENTRY DOBREAK 469 470 BEGFRAME 471 ENDFRAME 472 10D23 DD5F4001 5 STAK 473 DOBREAK ENTRNP PUSH 10D24 EDCB8610 6 CBM 474 STW ST/NDO stop DO 10D25 DC410C68 475 CALLNP CMLUNGET get free cm lun 10D26 E440001F 1 476 ST R1 DOBRINP save it 10D27 E4400009 1 477 ST R1 LUN save for xreq 10D28 DC410DA2 478 CALLNP EQBZAP clear open buffer 10D29 60040001 0 IMM 479 LD R0 UINLUN get user input lun 10D2A E4000049 0 480 ST R0 EQBFN(1) put it in open buffer 10D2B 60040050 0 IMM 481 LD R0 FREQUIPW get open request 10D2C 6044003E 1 IMM 482 LD R1 ADR(EQBUF) point to buffer 10D2D 08800009 483 FREQ LUN(XREQ) equivalence the lun's 10D2E 60440001 1 IMM 484 LD R1 UINLUN get user input unit 10D2F E4400009 1 485 ST R1 LUN save for xreq 10D30 FA070D36 0 486 JGEZ R0 DOBR03 jump if no trouble 10D31 EC00001F 487 STZ DOBRINP set user input file not present 10D32 604A3080 1 0 CBM 488 LD R1 R0/ECBITS separate off error code 10D33 64440081 1 IMM 489 CPR R1 XREQERLNE check if user input unit was not open 10D34 FE030D38 490 JEQ DOBR05 jump to equivalence units 491 * \ / 492 493 * error other than "unit not open" 10D35 DC410A34 494 CALLNP ERPRT print error message 00010D36 495 DOBR03 LABEL 10D36 60040060 0 IMM 496 LD R0 FRUNEQUIP get close request 10D37 08800009 497 FREQ LUN(XREQ) close the lun 498 * \ / 00010D38 499 DOBR05 LABEL 10D38 60040241 0 IMM 500 LD R0 FRECHOOFF get remove echo request 10D39 088400C9 IMM 501 FREQ LUNAIN+XREQ remove the echo if any 10D3A 600400C9 0 IMM 502 LD R0 LUNAIN get lun for input file 10D3B E4000049 0 503 ST R0 EQBFN(1) put it in open buffer 10D3C 60040050 0 IMM 504 LD R0 FREQUIPW get open request 10D3D 6044003E 1 IMM 505 LD R1 ADR(EQBUF) point to buffer 10D3E 08800009 506 FREQ LUN(XREQ) equivalence the lun's 10D3F FA070D41 0 507 JGEZ R0 DOBR10 jump if no trouble 10D40 DC410A34 508 CALLNP ERPRT print error message 509 * \ / 00010D41 510 DOBR10 LABEL 1 Assembler C9208 Control Mode C9304 14-Jun-93 17:33 PAGE 158 (CMUSUB1) F 12 Utility subroutines 10D41 EC000009 511 STZ LUN clean up garbage 10D42 EC00001B 512 STZ CMLUN 10D43 5D1F4001 5 STAK 513 LEAVE POP 514 * --- 515 516 END DOBREAK subroutine 1 Assembler C9208 Control Mode C9304 14-Jun-93 17:33 PAGE 159 (CMUSUB1) F 12 Utility subroutines 518 519 ********************************************************************************** 520 * * 521 * This routine is used to change the user input unit (lun 1) * 522 * back to the proper device after completion of a do file. The * 523 * input lun is obtained from the do stack, lun 1 is equivalenced * 524 * to it, and the unit from the stack is closed. R0, R1, and R2 * 525 * are destroyed. * 526 * * 527 ********************************************************************************** 528 529 BLOCK DOEND subroutine 530 ENTRY DOEND 531 532 BEGFRAME 533 ENDFRAME 534 10D44 DD5F4001 5 STAK 535 DOEND ENTRNP PUSH 10D45 60440001 1 IMM 536 LD R1 UINLUN get user input lun 10D46 E4400009 1 537 ST R1 LUN save for xreq 10D47 60040060 0 IMM 538 LD R0 FRUNEQUIP get close request 10D48 08800009 539 FREQ LUN(XREQ) close the lun 10D49 5C091010 4 ZBM 540 CMZ DO,DONO1 check if user input unit closed at start 10D4A FE0D0D53 541 JNE DOEN10 leave it as we found it 10D4B DC410DA2 542 CALLNP EQBZAP clear the open buffer 10D4C 60090081 0 4 ZBM 543 LD R0 DO,DOINP get input lun from stack 10D4D E4000049 0 544 ST R0 EQBFN(1) put lun in open buffer 10D4E 60040050 0 IMM 545 LD R0 FREQUIPW get open request 10D4F 6044003E 1 IMM 546 LD R1 ADR(EQBUF) point to buffer 10D50 08800009 547 FREQ LUN(XREQ) equivalence the lun's 10D51 FA070D53 0 548 JGEZ R0 DOEN10 jump if no error 10D52 DC410A34 549 CALLNP ERPRT print error message and set abort 550 * \ / 00010D53 551 DOEN10 LABEL 10D53 60090081 0 4 ZBM 552 LD R0 DO,DOINP get lun from stack 10D54 E4000009 0 553 ST R0 LUN save for xreq 10D55 60040241 0 IMM 554 LD R0 FRECHOOFF get remove echo request 10D56 08800009 555 FREQ LUN(XREQ) remove the echo 10D57 DC410E35 556 CALLNP FREEFILE close the lun 10D58 5D1F4001 5 STAK 557 LEAVE POP return 558 * --- 559 560 END DOEND subroutine 1 Assembler C9208 Control Mode C9304 14-Jun-93 17:33 PAGE 160 (CMUSUB1) F 12 Utility subroutines 562 563 ********************************************************************************** 564 * * 565 * This routine is used to set up the user input unit at the * 566 * start of do file exection. The new input lun is obtained from * 567 * DOLUN. The old input unit is equivalenced to a cm lun and placed * 568 * on the do stack. The user input unit is closed. Finally, the * 569 * input unit is equivalenced to the lun obtained from DOLUN. R0, * 570 * R1, and R2 are destroyed. * 571 * * 572 ********************************************************************************** 573 574 BLOCK DOSTART subroutine 575 ENTRY DOSTART 576 577 BEGFRAME 578 ENDFRAME 579 10D59 DD5F4001 5 STAK 580 DOSTART ENTRNP PUSH 10D5A 38170802 0 4 BASE 581 LEA R0 DO,DOIBUFF clear out the input buffer for this level 10D5B DC410613 582 CALLNP ZAPIBUFF 10D5C E5169044 4 2 REG 583 ST DO R2+DOBLEN set R2 to previous DO block 10D5D 64841497 2 IMM 584 CPR R2 ADR(DOAREA) check if DO in progress 10D5E FE090D63 585 JLT DO01A jump if no DO 10D5F 5C088210 2 ZBM 586 CMZ R2,DOLIST check if listing DO 10D60 FE030D6A 587 JEQ DO01D no echo if not listing 10D61 6088B080 2 2 ZBM 588 LD R2 R2,DOUNIT get the DO unit as echoed unit 10D62 FE0F0D65 589 JMP DO01C pass over BATCH check 590 * --- 591 00010D63 592 DO01A LABEL 10D63 F7830D6A 6 593 JBT ST/TRM DO01D jump if not batch 10D64 608400C9 2 IMM 594 LD R2 LUNAIN get standard input unit number 595 * \ / 00010D65 596 DO01C LABEL 10D65 60040240 0 IMM 597 LD R0 FRECHOUNIT get echo request 10D66 604400CA 1 IMM 598 LD R1 LUNAOUT get echo to standard output unit 10D67 08969000 2 REG 599 FREQ R2+XREQ set up echo 10D68 FA070D6A 0 600 JGEZ R0 DO01D jump if error 10D69 DC410A34 601 CALLNP ERPRT print out the error 602 * \ / 00010D6A 603 DO01D LABEL 10D6A DC410C68 604 CALLNP CMLUNGET get free cm lun 10D6B E4490081 1 4 ZBM 605 ST R1 DO,DOINP save it on do stack 10D6C E4400009 1 606 ST R1 LUN save for xreq 10D6D DC410DA2 607 CALLNP EQBZAP clear open buffer 10D6E 60040001 0 IMM 608 LD R0 UINLUN get user input lun 10D6F E4000049 0 609 ST R0 EQBFN(1) put it in open buffer 10D70 60040050 0 IMM 610 LD R0 FREQUIPW get open request 10D71 6044003E 1 IMM 611 LD R1 ADR(EQBUF) point to buffer 10D72 08800009 612 FREQ LUN(XREQ) equivalence the lun's 10D73 60440001 1 IMM 613 LD R1 UINLUN get user input unit 10D74 E4400009 1 614 ST R1 LUN save for xreq 10D75 FA070D7E 0 615 JGEZ R0 DOST03 jump if no trouble 10D76 EDC91010 4 ZBM 616 STW DO,DONO1 set user input file not present 10D77 604A3080 1 0 CBM 617 LD R1 R0/ECBITS separate off error code 1 Assembler C9208 Control Mode C9304 14-Jun-93 17:33 PAGE 161 (CMUSUB1) F 12 Utility subroutines 10D78 64440081 1 IMM 618 CPR R1 XREQERLNE check if user input unit was not open 10D79 FE0D0D7D 619 JNE DOST02 jump if error other than unit not open 10D7A 5C090A10 4 ZBM 620 CMZ DO,DOSAME check for same user input unit 10D7B FE0D0D89 621 JNE DOST10 leave units equivalenced 10D7C FE0F0D82 622 JMP DOST05 jump to equivalence units 623 * --- 624 00010D7D 625 DOST02 LABEL 10D7D DC410A34 626 CALLNP ERPRT print error message 00010D7E 627 DOST03 LABEL 10D7E 5C090A10 4 ZBM 628 CMZ DO,DOSAME check for same user input unit 10D7F FE0D0D89 629 JNE DOST10 leave units equivalenced 10D80 60040060 0 IMM 630 LD R0 FRUNEQUIP get close request 10D81 08800009 631 FREQ LUN(XREQ) close the lun 632 * \ / 00010D82 633 DOST05 LABEL 10D82 6000001E 0 634 LD R0 DOLUN get lun for input file 10D83 E4000049 0 635 ST R0 EQBFN(1) put it in open buffer 10D84 60040050 0 IMM 636 LD R0 FREQUIPW get open request 10D85 6044003E 1 IMM 637 LD R1 ADR(EQBUF) point to buffer 10D86 08800009 638 FREQ LUN(XREQ) equivalence the lun's 10D87 FA070D89 0 639 JGEZ R0 DOST10 jump if no trouble 10D88 DC410A34 640 CALLNP ERPRT print error message 641 * \ / 00010D89 642 DOST10 LABEL 10D89 5D1F4001 5 STAK 643 LEAVE POP 644 * --- 645 646 END DOSTART subroutine 1 Assembler C9208 Control Mode C9304 14-Jun-93 17:33 PAGE 162 (CMUSUB1) F 12 Utility subroutines 648 649 ********************************************************************************** 650 * * 651 * This routine is used to change the user input unit (lun 1) * 652 * back to the proper device when returning to do file after a * 653 * break. The input lun is obtained from memory, lun 1 is * 654 * equivalenced to it, and the unit from memory is closed. R0, R1, * 655 * and R2 are destroyed. * 656 * * 657 ********************************************************************************** 658 659 BLOCK DORESTORE subroutine 660 ENTRY DORESTORE 661 662 BEGFRAME 663 ENDFRAME 664 10D8A DD5F4001 5 STAK 665 DORESTORE ENTRNP PUSH 10D8B F7830D8F 6 666 JBT ST/TRM DORS05 jump if not batch 10D8C 60040240 0 IMM 667 LD R0 FRECHOUNIT get echo request 10D8D 604400CA 1 IMM 668 LD R1 LUNAOUT get echo to standard output unit 10D8E 088400C9 IMM 669 FREQ LUNAIN+XREQ echo standard input 670 * \ / 00010D8F 671 DORS05 LABEL 10D8F 60440001 1 IMM 672 LD R1 UINLUN get user input lun 10D90 E4400009 1 673 ST R1 LUN save for xreq 10D91 60040060 0 IMM 674 LD R0 FRUNEQUIP get close request 10D92 08800009 675 FREQ LUN(XREQ) close the lun 10D93 5C00001F 676 CMZ DOBRINP check if user input unit closed at start 10D94 FE030D9D 677 JEQ DORS10 leave it as we found it 10D95 DC410DA2 678 CALLNP EQBZAP clear the open buffer 10D96 6000001F 0 679 LD R0 DOBRINP get input lun 10D97 E4000049 0 680 ST R0 EQBFN(1) put lun in open buffer 10D98 60040050 0 IMM 681 LD R0 FREQUIPW get open request 10D99 6044003E 1 IMM 682 LD R1 ADR(EQBUF) point to buffer 10D9A 08800009 683 FREQ LUN(XREQ) equivalence the lun's 10D9B FA070D9D 0 684 JGEZ R0 DORS10 jump if no error 10D9C DC410A34 685 CALLNP ERPRT print error message and set abort 686 * \ / 00010D9D 687 DORS10 LABEL 10D9D 6000001F 0 688 LD R0 DOBRINP get lun 10D9E E4000009 0 689 ST R0 LUN save for xreq 10D9F DC410E35 690 CALLNP FREEFILE close the lun 10DA0 EC00001F 691 STZ DOBRINP say it's closed 10DA1 5D1F4001 5 STAK 692 LEAVE POP return 693 * --- 694 695 END DORESTORE subroutine 1 Assembler C9208 Control Mode C9304 14-Jun-93 17:33 PAGE 163 (CMUSUB1) F 12 Utility subroutines 697 698 ********************************************************************************** 699 * * 700 * This is the EQBZAP routine. It is used to initialize the * 701 * file equip block for file and directory equips. It zeros and * 702 * minus one's the equip buffer. * 703 * * 704 ********************************************************************************** 705 706 BLOCK EQBZAP subroutine 707 ENTRY EQBZAP 708 709 BEGFRAME 710 ENDFRAME 711 10DA2 DD5F4001 5 STAK 712 EQBZAP ENTRNP PUSH 10DA3 60840039 2 IMM 713 LD R2 ADR(EQBUFF) point to the buffer 10DA4 60440068 1 IMM 714 LD R1 EQBUFL*CPW get its length 10DA5 FE580000 715 CFILL 0 clean it out good 10DA6 D1400040 716 STMW EQBSYS default system 10DA7 D1400045 717 STMW EQBPRJ default project 10DA8 D140004A 718 STMW EQBFE default extension 10DA9 5D1F4001 5 STAK 719 LEAVE POP and return to caller 720 * --- 721 722 END EQBZAP subroutine 1 Assembler C9208 Control Mode C9304 14-Jun-93 17:33 PAGE 164 (CMUSUB1) F 12 Utility subroutines 724 725 ********************************************************************************** 726 * * 727 * This section is for resetting all DO units. The current DO * 728 * level is set back to no DO units active, all CM luns are * 729 * declared free, and any which were in use are unequipped. * 730 * * 731 ********************************************************************************** 732 733 BLOCK DORESET subroutine 734 ENTRY DORESET 735 736 BEGFRAME 737 ENDFRAME 738 10DAA DD5F4001 5 STAK 739 DORESET ENTRNP PUSH 10DAB 6100015F 4 740 LD DO DOPTR get DO pointer 10DAC 6000001F 0 741 LD R0 DOBRINP get user input unit from break 10DAD FA030DB1 0 742 JEQZ R0 DOR10 if none, no problem 10DAE E4000009 0 743 ST R0 LUN save for freer 10DAF DC410E35 744 CALLNP FREEFILE free up the unit 10DB0 EC00001F 745 STZ DOBRINP say we've done it 746 * \ / 00010DB1 747 DOR10 LABEL 10DB1 65041497 4 IMM 748 CPR DO ADR(DOAREA) see if units in use 10DB2 FE090DBA 749 JLT DOR20 jump if no DO's 10DB3 60093080 0 4 ZBM 750 LD R0 DO,DOUNIT get the lun for this unit 10DB4 E4000009 0 751 ST R0 LUN save for our freer 10DB5 DC410E35 752 CALLNP FREEFILE give it back if ours 10DB6 DC410D44 753 CALLNP DOEND reset user input unit 10DB7 11040044 4 IMM 754 SUB DO DOBLEN once less unit 10DB8 E500015F 4 755 ST DO DOPTR save new DO pointer 10DB9 FE0F0DB1 756 JMP DOR10 go see if that's all 757 * --- 758 00010DBA 759 DOR20 LABEL 10DBA EDCB8610 6 CBM 760 STW ST/NDO say no DO's in process 10DBB 5D1F4001 5 STAK 761 LEAVE POP and return 762 * --- 763 764 END DORESET subroutine 1 Assembler C9208 Control Mode C9304 14-Jun-93 17:33 PAGE 165 (CMUSUB1) F 12 Utility subroutines 766 767 ********************************************************************************** 768 * * 769 * This routine is used to obtain a lun or saved file from the * 770 * user's input. If a lun, it is just returned to the caller. If * 771 * a saved file, it is equipped to a Control Mode lun and that lun * 772 * is returned. On return, R0 = error code (0 = no error) * 773 * * 774 * R0 > 0 = FETCHITM type error * 775 * (R2 will contain Fetchitm item code) * 776 * R0 < 0 = file equip error * 777 * R1 = static status * 778 * LUN = lun to use * 779 * * 780 * All registers are zapped!!!!! * 781 * * 782 ********************************************************************************** 783 784 BLOCK FILEGET subroutines 785 ENTRY FILEGET 786 ENTRY FILEGETCK 787 ENTRY FILEGETR 788 ENTRY FILEGETP 789 790 BEGFRAME 00174801 5 BASE 791 EQUIPTYPE BSS 1 type of equip xreq to do 00174802 5 BASE 792 FIGFLAG BSS 1 flag for terminating character check 00174803 5 BASE 793 PACKRTN BSS 1 address of packing routine to use 794 ENDFRAME 795 10DBC DD5F4004 5 STAK 796 FILEGETCK ENTRNP PUSH get saved file or lun 10DBD 60040057 0 IMM 797 LD R0 FREQUIPNA get the no-access equip code 10DBE 38410E00 1 798 LEA R1 FILEPACK use the normal packer 10DBF EDD74802 5 BASE 799 STW FIGFLAG check terminating character 10DC0 FE0F0DCF 800 JMP FIG01 file does not get read 801 * --- 802 10DC1 DD5F4004 5 STAK 803 FILEGET ENTRNP PUSH get saved file or lun 10DC2 60040057 0 IMM 804 LD R0 FREQUIPNA get the no-access equip code 10DC3 38410E00 1 805 LEA R1 FILEPACK use the normal packer 10DC4 EC174802 5 BASE 806 STZ FIGFLAG no terminating character check 10DC5 FE0F0DCF 807 JMP FIG01 file does not get read 808 * --- 809 10DC6 DD5F4004 5 STAK 810 FILEGETP ENTRNP PUSH entry for PATH searches 10DC7 60040051 0 IMM 811 LD R0 FREQUIPR equip code to allow reads 10DC8 38410DFD 1 812 LEA R1 FILEPACKP use the PATH packer 10DC9 EC174802 5 BASE 813 STZ FIGFLAG no terminating character check 10DCA FE0F0DCF 814 JMP FIG01 815 * --- 816 10DCB DD5F4004 5 STAK 817 FILEGETR ENTRNP PUSH entry for DO (read) 10DCC 60040051 0 IMM 818 LD R0 FREQUIPR equip code to allow reads 10DCD 38410E00 1 819 LEA R1 FILEPACK use the normal packer 10DCE EC174802 5 BASE 820 STZ FIGFLAG no terminating character check 821 * \ / 1 Assembler C9208 Control Mode C9304 14-Jun-93 17:33 PAGE 166 (CMUSUB1) F 12 Utility subroutines 00010DCF 822 FIG01 LABEL 10DCF E4174801 0 5 BASE 823 ST R0 SP,EQUIPTYPE remember how to equip it 10DD0 E4574803 1 5 BASE 824 ST R1 SP,PACKRTN remember how to pack it 10DD1 DC410393 825 CALLNP FETCHITMF get something from user 10DD2 F6BD0DDD 2 826 JBT R2/TALPH FIG40 alpha means file name 10DD3 F2BF0DF5 2 827 JBF R2/TNUM FIG90 must be a number - else error 10DD4 6100011C 4 828 LD R4 VALUE get lun to use 10DD5 650400CA 4 IMM 829 CPR R4 GOODLUN see if reasonable 10DD6 FE050DF7 830 JGT FIG91 jump if no-good lun 10DD7 E5000009 4 831 ST R4 LUN save the lun to use 10DD8 60040010 0 IMM 832 LD R0 FRSTATUS now see if its alive 10DD9 08800009 833 FREQ LUN(XREQ) well, how 'bout it? 10DDA FA090DDC 0 834 JLTZ R0 FIGEXIT exit if error on lun 835 * \ / 00010DDB 836 FIG10 LABEL 10DDB 60040000 0 IMM 837 LD R0 0 otherwise say no error 00010DDC 838 FIGEXIT LABEL 10DDC 5D1F4004 5 STAK 839 LEAVE POP return to caller 840 * --- 841 00010DDD 842 FIG40 LABEL come here for file name 10DDD F78F0DFA 6 843 JBT ST/VMFISR FIG92 jump if resource shortage exists 10DDE DC574C03 5 FPVR 844 CALLNP @(SP,PACKRTN) go pack up file specifier 10DDF FA0D0DDC 0 845 JNEZ R0 FIGEXIT exit if bad news 10DE0 5C174802 5 BASE 846 CMZ FIGFLAG do a terminating character check 10DE1 FE030DE4 847 JEQ FIG44 no, skip it for now and ever 10DE2 DC410C5C 848 CALLNP CHKDELIM go check the terminating character 10DE3 FA0D0DF5 0 849 JNEZ R0 FIG90 exit if bad news 850 * \ / 00010DE4 851 FIG44 LABEL 10DE4 DC410C68 852 CALLNP CMLUNGET get a free CM lun 10DE5 E4400009 1 853 ST R1 LUN save the lun we want 00010DE6 854 FIG46 LABEL 10DE6 60174801 0 5 BASE 855 LD R0 SP,EQUIPTYPE usually read 10DE7 6044003E 1 IMM 856 LD R1 ADR(EQBUF) point to the equip buffer 10DE8 F3850DEA 6 857 JBF ST/TIN FIG50 jump if not terminal input 10DE9 EDCA1E20 0 CBM 858 STW R0/XRFLDSUSP request error if suspended 859 * \ / 00010DEA 860 FIG50 LABEL 10DEA 08800009 861 FREQ LUN(XREQ) try to equip it up 10DEB E4124000 0 1 REG 862 ST R0 R1 switch hands 10DEC FA070DDB 0 863 JGEZ R0 FIG10 jump if all ok 10DED 5C000006 864 CMZ PATHPTR anywhere else we can try? 10DEE FE030DDC 865 JEQ FIGEXIT nope, it just aint there 10DEF 608A2AB0 2 0 CBM 866 LD R2 R0/ECFIELD get error code 10DF0 6484008D 2 IMM 867 CPR R2 XREQERFNF was it 'file not found'? 10DF1 FE0D0DDC 868 JNE FIGEXIT any other error, we give up 10DF2 DC410E28 869 CALLNP FILEPACK2 prepare next filename to try 10DF3 FA0D0DDC 0 870 JNEZ R0 FIGEXIT oops, name was bad 10DF4 FE0F0DE6 871 JMP FIG46 and retry the open 872 * --- 873 00010DF5 874 FIG90 LABEL 10DF5 600526FF 0 IMM 875 LD R0 ADR(ERM414) "INVALID LUN OR FILE NAME" 10DF6 FE0F0DDC 876 JMP FIGEXIT leave 877 * --- 1 Assembler C9208 Control Mode C9304 14-Jun-93 17:33 PAGE 167 (CMUSUB1) F 12 Utility subroutines 878 00010DF7 879 FIG91 LABEL 10DF7 600526E2 0 IMM 880 LD R0 ADR(ERM410) "PARAMETER OUT OF BOUNDS" 10DF8 60840000 2 IMM 881 LD R2 TERR don't fake ourselves out 10DF9 FE0F0DDC 882 JMP FIGEXIT leave 883 * --- 884 00010DFA 885 FIG92 LABEL 10DFA 60052754 0 IMM 886 LD R0 ADR(ERM42A) "CANNOT OPEN FILE WHILE RESOURCESLOW" 10DFB 60840000 2 IMM 887 LD R2 TERR don't fake ourselves out 10DFC FE0F0DDC 888 JMP FIGEXIT leave 889 * --- 890 891 END FILEGET subroutines 1 Assembler C9208 Control Mode C9304 14-Jun-93 17:33 PAGE 168 (CMUSUB1) F 12 Utility subroutines 893 894 ********************************************************************************** 895 * * 896 * This is the FILEPACK routine. It is called to pack up a * 897 * file specifier. The file specifier should be pointed to by * 898 * LBUFPT and verified as an alpha string. This routine uses the * 899 * system pack request to build a file-equip-block for use by the * 900 * caller. The packed-up block is returned in EQBUF, and R0 will * 901 * be zero. If any problems arise, R0 will contain an error code. * 902 * R1 will contain the terminating character. * 903 * The entrypoint FILEPACKP is used if the caller wants to use * 904 * the PATH variable to find the file. * 905 * * 906 ********************************************************************************** 907 908 BLOCK FILEPACK subroutine 909 ENTRY FILEPACK 910 ENTRY FILEPACKP 911 912 BEGFRAME 00174801 5 BASE 913 USEPATH BSS 1 914 ENDFRAME 915 10DFD DD5F4002 5 STAK 916 FILEPACKP ENTRNP PUSH 10DFE EDD74801 5 BASE 917 STW SP,USEPATH 10DFF FE0F0E02 918 JMP FIP10 919 * --- 920 10E00 DD5F4002 5 STAK 921 FILEPACK ENTRNP PUSH 10E01 EC174801 5 BASE 922 STZ SP,USEPATH 923 * \ / 00010E02 924 FIP10 LABEL 10E02 60400115 1 925 LD R1 LBUFPT point to the input string 10E03 6084003E 2 IMM 926 LD R2 ADR(EQBUF) point to the pack buffer 10E04 60040102 0 IMM 927 LD R0 URPACKFS request full file specifier 10E05 09040000 IMM 928 UREQ XREQ and call the system 10E06 FA090E23 0 929 JLTZ R0 FIP90 jump if problems 10E07 E4400116 1 930 ST R1 BUFPT update the buffer pointer 10E08 60564000 1 1 CACH 931 LD R1 CACH R1,0 get the terminating character 10E09 E4400011 1 932 ST R1 TCSAVE and remember it, like FETCHITM does 10E0A 6000004A 0 933 LD R0 EQBFE check out the extension 10E0B FA2F0E0E 0 934 JNEMW R0 FIP20 jump if user-specified 10E0C 60000019 0 935 LD R0 EQDEFAULT else get the default 10E0D E400004A 0 936 ST R0 EQBFE and use it instead of junk 937 * \ / 938 ********************************************************************************** 939 * * 940 * We now check whether the user has specified a Unix-type * 941 * PATH variable for use in file finding. If he has, (and if an * 942 * account was not explicitly specified in the file spec that we * 943 * received) then we initialize our pointer into the search list. * 944 * * 945 ********************************************************************************** 946 * \ / 00010E0E 947 FIP20 LABEL 10E0E EC000006 948 STZ PATHPTR assume no path 1 Assembler C9208 Control Mode C9304 14-Jun-93 17:33 PAGE 169 (CMUSUB1) F 12 Utility subroutines 10E0F 5C174801 5 BASE 949 CMZ SP,USEPATH are we even supposed to do this? 10E10 FE030E21 950 JEQ FIP30 no, leave quickly 10E11 62000044 01 951 LD2 R0 EQBACCT2 10E12 FA0D0E21 0 952 JNEZ R0 FIP30 an account was specified 10E13 FA6F0E21 1 953 JNEMW R1 FIP30 an account (.xxx) was specified 10E14 6201003B 01 954 LD2 R0 PATHCHARS 10E15 E6000014 01 955 ST2 R0 VNAME 10E16 DC4110F5 956 CALLNP VARCHK does a PATH exist? 10E17 FAC30E21 3 957 JEQZ VAR FIP30 nope 10E18 5C08C010 3 ZBM 958 CMZ VAR,VARTYPE is it a string var? 10E19 FE030E21 959 JEQ FIP30 no, can't use it 10E1A 5C16C810 3 BASE 960 CMZ VAR,VARLEN does it contain anything? 10E1B FE030E21 961 JEQ FIP30 no, don't bother 10E1C 3816C803 0 3 BASE 962 LEA R0 VAR,VARVALUE get address of string 10E1D 38160000 0 0 CACH 963 LEA R0 CACH R0,0 make a character pointer 10E1E E4000006 0 964 ST R0 PATHPTR make path available 10E1F DC410E28 965 CALLNP FILEPACK2 and get the first account 10E20 FA090E22 0 966 JLTZ R0 FIP32 return account packing error 967 * \ / 00010E21 968 FIP30 LABEL 10E21 EC120000 0 REG 969 STZ R0 return the a-ok condition 00010E22 970 FIP32 LABEL 10E22 5D1F4002 5 STAK 971 LEAVE POP later... 972 * --- 973 00010E23 974 FIP90 LABEL 10E23 600A3080 0 0 CBM 975 LD R0 R0/ECBITS extract just the error code 10E24 60212270 0 0 976 LD R0 ECTABLE(R0) and point to proper message 10E25 60840000 2 IMM 977 LD R2 1*TERR clear any possible FI code 10E26 EC000006 978 STZ PATHPTR no alternatives, obviously 10E27 5D1F4002 5 STAK 979 LEAVE POP return the bad news 980 * --- 981 982 END FILEPACK subroutine 1 Assembler C9208 Control Mode C9304 14-Jun-93 17:33 PAGE 170 (CMUSUB1) F 12 Utility subroutines 984 985 ********************************************************************************** 986 * * 987 * This routine modifies the equip buffer so that it * 988 * references the next account specified in the file search path. * 989 * After calling FILEPACK and trying to open the file, one can then * 990 * call this routine and retry the open request. This is repeated * 991 * while the file is not found, and PATHPTR is non-zero, indicating * 992 * another account remains to be tried. If R0 < 0, the name was * 993 * bad and the remainder should not be tried. * 994 * * 995 ********************************************************************************** 996 997 BLOCK 998 ENTRY FILEPACK2 999 1000 BEGFRAME 1001 ENDFRAME 1002 10E28 DD5F4001 5 STAK 1003 FILEPACK2 ENTRNP PUSH 10E29 60040101 0 IMM 1004 LD R0 URPACKFI just pack an account name 10E2A 60400006 1 1005 LD R1 PATHPTR the name to pack 10E2B 38800043 2 1006 LEA R2 EQBACCT where to put it 10E2C 09040000 IMM 1007 UREQ 0 do it to it 10E2D 60964400 2 1 @R 1008 LD R2 @R1 get terminating character 10E2E 6484000D 2 IMM 1009 CPR R2 CR end of string? 10E2F FE030E33 1010 JEQ NOMORE 10E30 D0924000 1 REG 1011 INCP R1 skip past delimiter 10E31 E4400006 1 1012 ST R1 PATHPTR and save for next time 10E32 FE0F0E34 1013 JMP FIP290 1014 * --- 00010E33 1015 NOMORE LABEL 10E33 EC000006 1016 STZ PATHPTR 1017 * \ / 00010E34 1018 FIP290 LABEL 10E34 5D1F4001 5 STAK 1019 LEAVE POP 1020 1021 END 1 Assembler C9208 Control Mode C9304 14-Jun-93 17:33 PAGE 171 (CMUSUB1) F 12 Utility subroutines 1023 1024 ********************************************************************************** 1025 * * 1026 * FREEFILE is called to 'free-up' a unit after Control Mode * 1027 * is finished with it. It may be a user lun or a CM lun. If a * 1028 * user lun, FREEFILE simply returns, but if a CM lun, the unit is * 1029 * unequipped and the lun is returned to the pool of free CM luns. * 1030 * Since R0 may contain an error code, it is saved and restored on * 1031 * exit. * 1032 * * 1033 * Alternate entry FREEFILES is for LUN and CMLUN. * 1034 * * 1035 ********************************************************************************** 1036 1037 BLOCK FREEFILE subroutines 1038 ENTRY FREEFILE 1039 ENTRY FREEFILES 1040 1041 BEGFRAME 00174801 5 BASE 1042 FFTMP BSS 1 temp for R0 1043 ENDFRAME 1044 10E35 DD5F4002 5 STAK 1045 FREEFILE ENTRNP PUSH CM lun free-up routine 10E36 E4174801 0 5 BASE 1046 ST R0 SP,FFTMP save the error code, if any 10E37 60000009 0 1047 LD R0 LUN get the lun we were using 10E38 640400D3 0 IMM 1048 CPR R0 CMLOWLUN see if his or ours 10E39 FE090E42 1049 JLT FF50 jump if his - leave alone 10E3A 6400001C 0 1050 CPR R0 ERASELUN check if unit is to be released before closing 10E3B FE0D0E3F 1051 JNE FF20 jump if not unit to be released 10E3C 60040013 0 IMM 1052 LD R0 FRRELEASE get release request 10E3D 08800009 1053 FREQ LUN(XREQ) release the data 10E3E EC00001C 1054 STZ ERASELUN set erase complete 1055 * \ / 00010E3F 1056 FF20 LABEL 10E3F 60040060 0 IMM 1057 LD R0 FRUNEQUIP now do the unequip 10E40 08800009 1058 FREQ LUN(XREQ) its gone... 10E41 EC000009 1059 STZ LUN say we have no lun equipped 1060 * \ / 00010E42 1061 FF50 LABEL 10E42 60174801 0 5 BASE 1062 LD R0 SP,FFTMP get error code back 10E43 5D1F4002 5 STAK 1063 LEAVE POP return to caller 1064 * --- 1065 10E44 DD5F4002 5 STAK 1066 FREEFILES ENTRNP PUSH (entry for CM luns) 10E45 DC410E35 1067 CALLNP FREEFILE give back first lun (LUN) 10E46 6040001B 1 1068 LD R1 CMLUN now get second lun (CMLUN) 10E47 FA4B0E4C 1 1069 JLEZ R1 FF70 jump if not used 10E48 E0400009 1 1070 EXCH R1 LUN set up for freefiler 10E49 EC00001B 1071 STZ CMLUN clear the thing out 10E4A DC410E35 1072 CALLNP FREEFILE give it back too 10E4B E4400009 1 1073 ST R1 LUN restore unit for error message 1074 * \ / 00010E4C 1075 FF70 LABEL 10E4C 5D1F4002 5 STAK 1076 LEAVE POP return to home base 1077 * --- 1078 1 Assembler C9208 Control Mode C9304 14-Jun-93 17:33 PAGE 172 (CMUSUB1) F 12 Utility subroutines 1079 END FREEFILE subroutines 1 Assembler C9208 Control Mode C9304 14-Jun-93 17:33 PAGE 173 (CMUSUB1) F 12 Utility subroutines 1081 1082 ********************************************************************************** 1083 * * 1084 * This is the GETSPLREP routine. It obtains a reply to an * 1085 * operator type request from the spooler. The reply is not * 1086 * processed, but rather simply stored in the location passed to * 1087 * this routine. If any errors occur the error code is left in R0. * 1088 * The calling sequence is: * 1089 * * 1090 * CALL GETSPLREP * 1091 * PARV spooler process number * 1092 * PARV ID of expected message * 1093 * PARV length of message area * 1094 * PAR address for message * 1095 * PAR address for message length * 1096 * PARL address for error code * 1097 * * 1098 ********************************************************************************** 1099 1100 BLOCK GETSPLREP subroutine 1101 ENTRY GETSPLREP 1102 1103 BEGFRAME 00174801 5 BASE 1104 GSRSPOOLER BSS 1 spooler process number 00174802 5 BASE 1105 GSRMSGID BSS 1 expected message ID 00174803 5 BASE 1106 GSRMSGLEN BSS 1 maximum message length 00174804 5 BASE 1107 GSRMSGADDR BSS 1 message address 00174805 5 BASE 1108 GSRACTLEN BSS 1 address in which to return length 00174806 5 BASE 1109 GSRERR BSS 1 address in which to return error code 1110 ENDFRAME 1111 10E4D DD1F4007 5 STAK 1112 GETSPLREP ENTR PUSH 10E4E C1574801 5 BASE 1113 STPV SP,GSRSPOOLER save spooler process number 10E4F C1574802 5 BASE 1114 STPV SP,GSRMSGID save expected message ID 10E50 C1574803 5 BASE 1115 STPV SP,GSRMSGLEN save maximum message length 10E51 C1174804 5 BASE 1116 STP SP,GSRMSGADDR save message address 10E52 C1174805 5 BASE 1117 STP SP,GSRACTLEN save address for actual message length 10E53 C0174806 5 BASE 1118 STPL SP,GSRERR save address for error code 1119 * \ / 10E54 60050E7F 0 IMM 1120 LD R0 ADR(GSRINT) get address of timer interrupt processing 10E55 E4000001 0 1121 ST R0 TIMEINTADR save in case of interrupt 10E56 60040142 0 IMM 1122 LD R0 URCLRTIMIN get clear timer interrupt request 10E57 09040000 IMM 1123 UREQ 0+XREQ clear the timer, just in case 10E58 60040080 0 IMM 1124 LD R0 URSSINTARM get interrupt arming request 10E59 60420040 1 IMM 1125 LD R1 1*INTTIM timer interrupt 10E5A 09040000 IMM 1126 UREQ 0+XREQ enable the timer interrupt 10E5B FA090E76 0 1127 JLTZ R0 GSR50 exit on error 10E5C 60040141 0 IMM 1128 LD R0 URSETTIMIN get set timer interrupt request 10E5D 6044001E 1 IMM 1129 LD R1 MSGWAIT get the wait time 10E5E 09040000 IMM 1130 UREQ 0+XREQ set the timer 10E5F FA090E78 0 1131 JLTZ R0 GSR60 exit on error 1132 * \ / 00010E60 1133 GSR10 LABEL 10E60 60040161 0 IMM 1134 LD R0 URGETMSG load get message request 10E61 60574803 1 5 BASE 1135 LD R1 SP,GSRMSGLEN get maximum message length 10E62 60974804 2 5 BASE 1136 LD R2 SP,GSRMSGADDR get message address 1 Assembler C9208 Control Mode C9304 14-Jun-93 17:33 PAGE 174 (CMUSUB1) F 12 Utility subroutines 10E63 09030000 IMM 1137 UREQ REPMASK+XREQ mask for spooler reply messages 10E64 FA090E6E 0 1138 JLTZ R0 GSR20 error on message request 10E65 60974804 2 5 BASE 1139 LD R2 SP,GSRMSGADDR get message address 10E66 60C88100 3 2 ZBM 1140 LD R3 R2,MSGPROC get process number 10E67 64D74801 3 5 BASE 1141 CPR R3 SP,GSRSPOOLER check if correct process 10E68 FE0D0E60 1142 JNE GSR10 if not, wait somemore 10E69 60D68807 3 2 BASE 1143 LD R3 R2,MSGRTEXT get message ID 10E6A 64D74802 3 5 BASE 1144 CPR R3 SP,GSRMSGID check if same as expected 10E6B FE0D0E60 1145 JNE GSR10 if not, wait somemore 10E6C 30574803 1 5 BASE 1146 RSB R1 SP,GSRMSGLEN find actual length of message 10E6D E4574C05 1 5 FPVR 1147 ST R1 @(SP,GSRACTLEN) return actual length to caller 1148 * \ / 00010E6E 1149 GSR20 LABEL 10E6E EC000001 1150 STZ TIMEINTADR clear timer interrupt addr - ignore such interrupts 10E6F E4174C06 0 5 FPVR 1151 ST R0 @(SP,GSRERR) save error code 10E70 60040142 0 IMM 1152 LD R0 URCLRTIMIN get clear timer interrupt request 10E71 09040000 IMM 1153 UREQ 0 clear the timer 1154 * \ / 00010E72 1155 GSR40 LABEL 10E72 60040081 0 IMM 1156 LD R0 URSCINTARM get clear interrupts request 10E73 60420040 1 IMM 1157 LD R1 1*INTTIM clear only the timer interrupt 10E74 09040000 IMM 1158 UREQ 0 get rid of the interrupt enable 10E75 5D1F4007 5 STAK 1159 LEAVE POP exit 1160 * --- 1161 00010E76 1162 GSR50 LABEL 10E76 E4174C06 0 5 FPVR 1163 ST R0 @(SP,GSRERR) save error code 10E77 5D1F4007 5 STAK 1164 LEAVE POP exit 1165 * --- 1166 00010E78 1167 GSR60 LABEL 10E78 EC000001 1168 STZ TIMEINTADR clear timer interrupt processing addr 10E79 E4174C06 0 5 FPVR 1169 ST R0 @(SP,GSRERR) save error code 10E7A FE0F0E72 1170 JMP GSR40 clear interrupts and exit 1171 * --- 1172 00010E7B 1173 GSR80 LABEL 10E7B EC000001 1174 STZ TIMEINTADR clear timer interrupt processing addr 10E7C 600527E4 0 IMM 1175 LD R0 ADR(ERM520) "no response from spooler" 10E7D E4174C06 0 5 FPVR 1176 ST R0 @(SP,GSRERR) save error code 10E7E FE0F0E72 1177 JMP GSR40 clear interrupts and exit 1178 * --- 1179 00010E7F 1180 GSRINT LABEL 10E7F 38010E7B 0 1181 LEA R0 GSR80 get interrupt processing address 10E80 E4000032 0 1182 ST R0 REGBLOCK(CCBFLDPC) save as program counter 10E81 60040082 0 IMM 1183 LD R0 URINTRTN get interupt return request 10E82 0904002A IMM 1184 UREQ (ADR(REGBLOCK))+XREQ do the return 10E83 EC0A0010 0 CBM 1185 STZ R0/ERROR set error code bit 10E84 DC410A34 1186 CALLNP ERPRT show the error to the user 10E85 FE0F18BB 1187 JMP BYENOW log the user off 1188 * --- 1189 1190 END GETSPLREP subroutine 1 Assembler C9208 Control Mode C9304 14-Jun-93 17:33 PAGE 175 (CMUSUB1) F 12 Utility subroutines 1192 1193 ********************************************************************************** 1194 * * 1195 * GETSTUFF - routine used to input one item and search a * 1196 * table to see if the item matches one of the table entries. If * 1197 * no match, an error code is returned, and if found, a pointer to * 1198 * the match is returned. There are several entries, one for each * 1199 * table. Currently, these are: * 1200 * * 1201 * ACSGET - access code search * 1202 * HDWGET - hardware type table search * 1203 * RSTGET - restriction code search * 1204 * MODGET - save file attribute modify search * 1205 * PRTGET - port parameter search * 1206 * PRVGET - privilege code search * 1207 * RESGET - reset parameter table search * 1208 * SKLGET - skill level search * 1209 * YNGET - Yes/No answer search * 1210 * * 1211 * On return, R0 = 0 if no error, or has error code * 1212 * R2 = pointer to table * 1213 * R3 = pointer to matching item in table * 1214 * * 1215 ********************************************************************************** 1216 1217 BLOCK GETSTUFF subroutines 1218 ENTRY ACSGET 1219 ENTRY HDWGET 1220 ENTRY PRTGET 1221 ENTRY PRVGET 1222 ENTRY MODGET 1223 ENTRY RESGET 1224 ENTRY SKLGET 1225 ENTRY YNGET 1226 1227 BEGFRAME 00174801 5 BASE 1228 GETTMP BSS 2 temp for table pointers 1229 ENDFRAME 1230 10E86 DD5F4003 5 STAK 1231 ACSGET ENTRNP PUSH access code scan 10E87 60850158 2 IMM 1232 LD R2 ADR(ACSTAB) 10E88 60C4000F 3 IMM 1233 LD R3 ACSTLEN-1 10E89 FE0F0EA8 1234 JMP GET10 1235 * --- 1236 10E8A DD5F4003 5 STAK 1237 HDWGET ENTRNP PUSH hardware type scan 10E8B 60850106 2 IMM 1238 LD R2 ADR(HDWTAB) 10E8C 60C4000F 3 IMM 1239 LD R3 HDWTLEN-1 10E8D FE0F0EA8 1240 JMP GET10 1241 * --- 1242 10E8E DD5F4003 5 STAK 1243 PRTGET ENTRNP PUSH port parameter search 10E8F 60850126 2 IMM 1244 LD R2 ADR(PRTTAB) 10E90 60C4001B 3 IMM 1245 LD R3 PRTTLEN-1 10E91 FE0F0EA8 1246 JMP GET10 1247 * --- 1 Assembler C9208 Control Mode C9304 14-Jun-93 17:33 PAGE 176 (CMUSUB1) F 12 Utility subroutines 1248 10E92 DD5F4003 5 STAK 1249 PRVGET ENTRNP PUSH privilege code scan 10E93 DC01043F 1250 CALL TESTCHAR next char must be a slash 10E94 4044002F IMM 1251 PARVL SLASH 10E95 FE0F0EBA 1252 JMP GET91 10E96 60850178 2 IMM 1253 LD R2 ADR(ATRTAB) 10E97 60C40007 3 IMM 1254 LD R3 ATRTLEN-1 10E98 FE0F0EA8 1255 JMP GET10 1256 * --- 1257 10E99 DD5F4003 5 STAK 1258 MODGET ENTRNP PUSH save file attribute modify scan 10E9A 60850188 2 IMM 1259 LD R2 ADR(MODTAB) 10E9B 60C4000F 3 IMM 1260 LD R3 MODTLEN-1 10E9C FE0F0EA8 1261 JMP GET10 1262 * --- 1263 10E9D DD5F4003 5 STAK 1264 RESGET ENTRNP PUSH reset parameter table search 10E9E 60850142 2 IMM 1265 LD R2 ADR(RESTAB) 10E9F 60C40004 3 IMM 1266 LD R3 RESTLEN-1 10EA0 FE0F0EA8 1267 JMP GET10 1268 * --- 1269 10EA1 DD5F4003 5 STAK 1270 SKLGET ENTRNP PUSH Skill level scan 10EA2 60850150 2 IMM 1271 LD R2 ADR(SKLTAB) 10EA3 60C40003 3 IMM 1272 LD R3 SKLTLEN-1 10EA4 FE0F0EA8 1273 JMP GET10 1274 * --- 1275 10EA5 DD5F4003 5 STAK 1276 YNGET ENTRNP PUSH Yes/No scan 10EA6 608501A8 2 IMM 1277 LD R2 ADR(YNTAB) 10EA7 60C40003 3 IMM 1278 LD R3 YNTLEN-1 1279 * \ / 1280 00010EA8 1281 GET10 LABEL now do the job 10EA8 E6974801 235 BASE 1282 ST2 R2 SP,GETTMP save where safe 10EA9 DC410390 1283 CALLNP FETCHITM get an item 10EAA F2BD0EB8 2 1284 JBF R2/TALPH GET90 error if not alpha 10EAB DC410477 1285 CALLNP PACKER pack symbol up for checks 10EAC 62974801 235 BASE 1286 LD2 R2 SP,GETTMP get our table info back 1287 * \ / 00010EAD 1288 GET20 LABEL 10EAD 661C9800 0123 BASE 1289 CPR2 R0 R2,0(R3) compare to table 10EAE FE030EB3 1290 JEQ GET30 jump if a match found 10EAF FAE70EAD 3 1291 JDR R3 GET20 try again 10EB0 60840000 2 IMM 1292 LD R2 0 save possible confusion 10EB1 600526CA 0 IMM 1293 LD R0 ADR(ERM406) "UNIDENTIFIED PARAMETER" 10EB2 5D1F4003 5 STAK 1294 LEAVE POP return with sad news 1295 * --- 1296 00010EB3 1297 GET30 LABEL symbol found 10EB3 64850158 2 IMM 1298 CPR R2 ADR(GETDOUB) see if dual entries in table 10EB4 FE090EB6 1299 JLT GET40 no problem if single entries 10EB5 14C40002 3 IMM 1300 DIV R3 2 otherwise make adjustment 1301 * \ / 00010EB6 1302 GET40 LABEL 10EB6 60040000 0 IMM 1303 LD R0 0 no error occurred 1 Assembler C9208 Control Mode C9304 14-Jun-93 17:33 PAGE 177 (CMUSUB1) F 12 Utility subroutines 10EB7 5D1F4003 5 STAK 1304 LEAVE POP and bye-bye 1305 * --- 1306 00010EB8 1307 GET90 LABEL 10EB8 600526F6 0 IMM 1308 LD R0 ADR(ERM413) "INCORRECT PARAMETER TYPE" 10EB9 5D1F4003 5 STAK 1309 LEAVE POP and return to caller 1310 * --- 1311 00010EBA 1312 GET91 LABEL 10EBA 60052749 0 IMM 1313 LD R0 ADR(ERM427) "Parameter syntax error" 10EBB 5D1F4003 5 STAK 1314 LEAVE POP 1315 * --- 1316 1317 END GETSTUFF subroutines 117 INPUT CM.UTL:CMUSUB2 1 Assembler C9208 Control Mode C9304 14-Jun-93 17:33 PAGE 178 (CMUSUB2) F 13 Utility subroutines 3 4 ********************************************************************************** 5 * * 6 * This is the HEADER routine. It writes a header on the * 7 * standard output unit during logon processing and initial batch * 8 * job startup. * 9 * * 10 ********************************************************************************** 11 12 BLOCK HEADER subroutine 13 ENTRY HEADER 14 15 BEGFRAME 16 REGAREA EQU VERSNUM(0) place to save registers 00174801 5 BASE 17 VERSNUM BSS 2 system version number 18 ENDFRAME 19 10EBC DD5F4003 5 STAK 20 HEADER ENTRNP PUSH 10EBD DC410963 21 CALLNP DATEMAKE now list out the date for them 10EBE 60C41400 3 IMM 22 LD R3 ADR(OBUFF) 10EBF DC410ACF 23 CALLNP OUT give them something to look at 10EC0 60C51E55 3 IMM 24 LD R3 ADR(LOGONMEST1) get the logon message 10EC1 DC410A86 25 CALLNP MESSMOVEZ move it to the output buffer 10EC2 E4974801 2 5 BASE 26 ST R2 SP,REGAREA save output buffer pointer 10EC3 60040053 0 IMM 27 LD R0 URGETSSN get serial number request 10EC4 09040000 IMM 28 UREQ 0+XREQ get the serial number 10EC5 60128000 0 2 REG 29 LD R0 R2 move system name for unpacking 10EC6 60D24000 3 1 REG 30 LD R3 R1 save system serial number 10EC7 60974801 2 5 BASE 31 LD R2 SP,REGAREA get output buffer pointer 10EC8 DC410C09 32 CALLNP UP6 unpack system name 10EC9 60040020 0 IMM 33 LD R0 SPACE get a space 10ECA E435000A 0 2 @ 34 ST R0 @OBPT(R2) place in output buffer 10ECB 18840001 2 IMM 35 ADD R2 1 increment buffer index 10ECC 600AC100 0 3 CBM 36 LD R0 R3/CUSTOMER move customer number for conversion 10ECD E0D28000 3 2 REG 37 EXCH R3 R2 move buffer index and serial number 10ECE DC410AA1 38 CALLNP NDCLR change customer number to decimal 10ECF 60040026 0 IMM 39 LD R0 AMPER get a period 10ED0 E437000A 0 3 @ 40 ST R0 @OBPT(R3) place in output buffer 10ED1 18C40001 3 IMM 41 ADD R3 1 increment buffer index 10ED2 600AA100 0 2 CBM 42 LD R0 R2/SYSTEM move system number for conversion 10ED3 DC410AA1 43 CALLNP NDCLR change serial number to decimal 10ED4 6092C000 2 3 REG 44 LD R2 R3 move pointer back to R2 10ED5 60C51E58 3 IMM 45 LD R3 ADR(LOGONMEST2) find 1st part of 2nd line 10ED6 DC410A84 46 CALLNP MESSMOVE move to output buffer 10ED7 61128000 4 2 REG 47 LD R4 R2 save output pointer 10ED8 60040054 0 IMM 48 LD R0 URGETVERS get version number request 10ED9 09040000 IMM 49 UREQ 0+XREQ get the version number 10EDA E6974801 235 BASE 50 ST2 R2 SP,VERSNUM move version to temp storage 10EDB 60C40007 3 IMM 51 LD R3 7 set end index to last character 52 * \ / 00010EDC 53 HEAD03 LABEL 10EDC 601B5804 0 53 CACH 54 LD R0 CACH SP,VERSNUM(R3) pick up first character 10EDD 64040020 0 IMM 55 CPR R0 SPACE check if it's a space 10EDE FE0D0EE0 56 JNE HEAD05 jump if non-blank found 10EDF FAE70EDC 3 57 JDR R3 HEAD03 around again until all are checked 58 * \ / 1 Assembler C9208 Control Mode C9304 14-Jun-93 17:33 PAGE 179 (CMUSUB2) F 13 Utility subroutines 00010EE0 59 HEAD05 LABEL 10EE0 EC128000 2 REG 60 STZ R2 clear character index 61 * \ / 00010EE1 62 HEAD07 LABEL 10EE1 6492C000 2 3 REG 63 CPR R2 R3 check if end is reached 10EE2 FE050EE8 64 JGT HEAD09 jump if it is 10EE3 601B5004 0 52 CACH 65 LD R0 CACH SP,VERSNUM(R2) pick up a character 10EE4 E439000A 0 4 @ 66 ST R0 @OBPT(R4) save the character 10EE5 D0130000 4 REG 67 INC R4 increment buffer pointer 10EE6 D0128000 2 REG 68 INC R2 increment character index 10EE7 FE0F0EE1 69 JMP HEAD07 continue loop 70 * --- 71 00010EE8 72 HEAD09 LABEL 10EE8 60930000 2 4 REG 73 LD R2 R4 restore buffer pointer to R2 10EE9 60C51E5A 3 IMM 74 LD R3 ADR(LOGNMEST2A) pick up end of message 10EEA DC410A84 75 CALLNP MESSMOVE move to output buffer 10EEB 60C41400 3 IMM 76 LD R3 ADR(OBUFF) 10EEC DC410ACF 77 CALLNP OUT send message to user 10EED F3830EF0 6 78 JBF ST/TRM HEAD12 that's enough for batch jobs 10EEE 60C51E5F 3 IMM 79 LD R3 ADR(LOGONMEST3) get help message 10EEF DC410ACF 80 CALLNP OUT send it out 81 * \ / 00010EF0 82 HEAD12 LABEL 10EF0 600400B3 0 IMM 83 LD R0 URBLKUSED specify get disk usage 10EF1 09040000 IMM 84 UREQ 0+XREQ issue request 10EF2 64528000 1 2 REG 85 CPR R1 R2 check for warning 10EF3 FE0B0EF6 86 JLE HEAD15 jump if o.k. 10EF4 60C51F3E 3 IMM 87 LD R3 ADR(MESENTDSK) get too much space message 10EF5 DC410ACF 88 CALLNP OUT send it out 89 * \ / 00010EF6 90 HEAD15 LABEL 10EF6 5D1F4003 5 STAK 91 LEAVE POP return 92 * --- 93 94 END HEADER subroutine 1 Assembler C9208 Control Mode C9304 14-Jun-93 17:33 PAGE 180 (CMUSUB2) F 13 Utility subroutines 96 97 ********************************************************************************** 98 * * 99 * This is the INITIALIZE routine. It is called during * 100 * start-up to initialize several CM impure locations. This is * 101 * done at CM entry, and also at Logon after freeing all pages. * 102 * * 103 ********************************************************************************** 104 105 BLOCK INITIALIZE subroutine 106 ENTRY INITIALIZE 107 108 BEGFRAME 109 ENDFRAME 110 10EF7 DD5F4001 5 STAK 111 INITIALIZE ENTRNP PUSH 10EF8 61041453 4 IMM 112 LD DO DOPTPROTO start with the DO pointer 10EF9 E500015F 4 113 ST DO DOPTR that's reset 10EFA 62010019 01 114 LD2 R0 DOTS get dress for output 10EFB E6000037 01 115 ST2 R0 FRONTBUFF set up for DO listings 10EFC 60041684 0 IMM 116 LD R0 ADR(FREESTART) set up free memory pointer 10EFD E400167F 0 117 ST R0 FREEPT 10EFE D140001D 118 STMW UPNUM set the under-process PSN 10EFF 600400C8 0 IMM 119 LD R0 PROGLUN may have a .CODE on 200 10F00 E4000009 0 120 ST R0 LUN so say we do 10F01 DC41106C 121 CALLNP TERMSET set the terminal carriage len 10F02 EC000004 122 STZ LOGONTRIES clear number of logons tried 10F03 5D1F4001 5 STAK 123 LEAVE POP now return to our business 124 * --- 125 126 END INITIALIZE subroutine 1 Assembler C9208 Control Mode C9304 14-Jun-93 17:33 PAGE 181 (CMUSUB2) F 13 Utility subroutines 128 129 ********************************************************************************** 130 * * 131 * LUNGET is used to obtain a lun or range of luns from the * 132 * user input. A repeat count may also be specified in some * 133 * instances. The calling routine should stuff NUMFUNCS with 1 if * 134 * a repeat count is allowed, and 0 if no repeat count is allowed. * 135 * It will return the actual repeat count specified as well as the * 136 * lun or range of luns to be used. On return, R0 = error code (0 * 137 * = no error) * 138 * NUMFUNCS = repeat count * 139 * LOWLUN = first lun to be used * 140 * MAXLUN = last lun to be used * 141 * (note that LOWLUN and MAXLUN may be the same) * 142 * * 143 * Valid forms are: * 144 * ,, * 145 * ,:, * 146 * ,( ), * 147 * ,:( ), * 148 * * 149 ********************************************************************************** 150 151 BLOCK LUNGET subroutine 152 ENTRY LUNGET 153 154 BEGFRAME 155 ENDFRAME 156 10F04 DD5F4001 5 STAK 157 LUNGET ENTRNP PUSH lun fetch routine 10F05 DC410390 158 CALLNP FETCHITM get next parameter 10F06 F2BF0F23 2 159 JBF R2/TNUM LG90 luns must be numeric 10F07 6100011C 4 160 LD R4 VALUE get the number 10F08 650400CA 4 IMM 161 CPR R4 GOODLUN be sure its legit 10F09 FE050F2F 162 JGT LG96 scream if not 10F0A E500000B 4 163 ST R4 LOWLUN set up limits 10F0B E500000C 4 164 ST R4 MAXLUN in case of lun range 10F0C 64040028 0 IMM 165 CPR R0 LPAREN see if a "(" 10F0D FE0D0F15 166 JNE LG20 jump if not a repeat group 167 * \ / 00010F0E 168 LG10 LABEL 10F0E 6100000D 4 169 LD R4 NUMFUNCS see if repeat count allowed 10F0F FB030F25 4 170 JEQZ R4 LG91 jump if error (not allowed) 10F10 DC410782 171 CALLNP EEPROC go get the repeat count 10F11 FA0D0F29 0 172 JNEZ R0 LG93 jump if error 10F12 FA470F27 1 173 JGEZ R1 LG92 jump if string 10F13 E480000D 2 174 ST R2 NUMFUNCS save the value we got 10F14 FE0F0F21 175 JMP LG40 passed all the tests - return 176 * --- 177 00010F15 178 LG20 LABEL 10F15 6404003A 0 IMM 179 CPR R0 COLON see if a lun range 10F16 FE0D0F21 180 JNE LG40 otherwise we're finished 10F17 DC410390 181 CALLNP FETCHITM get next item 10F18 F2BF0F2D 2 182 JBF R2/TNUM LG95 luns are always numbers 10F19 6100011C 4 183 LD R4 VALUE get the high lun value 1 Assembler C9208 Control Mode C9304 14-Jun-93 17:33 PAGE 182 (CMUSUB2) F 13 Utility subroutines 10F1A E500000C 4 184 ST R4 MAXLUN remember it for later 10F1B 6500000B 4 185 CPR R4 LOWLUN lets be sure its legitimate 10F1C FE090F2B 186 JLT LG94 jump if range out of order 10F1D 650400CA 4 IMM 187 CPR R4 GOODLUN be sure its legit 10F1E FE050F2D 188 JGT LG95 don't take any shit 10F1F 64040028 0 IMM 189 CPR R0 LPAREN see if repeat count too 10F20 FE030F0E 190 JEQ LG10 jump if there is 191 * \ / 00010F21 192 LG40 LABEL otherwise go home 10F21 60040000 0 IMM 193 LD R0 0 10F22 5D1F4001 5 STAK 194 LEAVE POP see ya later alligator 195 * --- 196 00010F23 197 LG90 LABEL 10F23 6005270F 0 IMM 198 LD R0 ADR(ERM416) "INVALID LUN SPECIFIED" 10F24 5D1F4001 5 STAK 199 LEAVE POP 200 * --- 201 00010F25 202 LG91 LABEL 10F25 600526D7 0 IMM 203 LD R0 ADR(ERM409) "REPEAT COUNT NOT ALLOWED" 10F26 FE0F0F30 204 JMP LG99 205 * --- 206 00010F27 207 LG92 LABEL 10F27 600526AD 0 IMM 208 LD R0 ADR(ERM402) "INVALID REPEAT COUNT" 10F28 FE0F0F30 209 JMP LG99 210 * --- 211 00010F29 212 LG93 LABEL 10F29 600526B3 0 IMM 213 LD R0 ADR(ERM403) "REPEAT COUNT FORMAT ERROR" 10F2A FE0F0F30 214 JMP LG99 215 * --- 216 00010F2B 217 LG94 LABEL 10F2B 600526BC 0 IMM 218 LD R0 ADR(ERM404) "LUN RANGE OUT OF ORDER" 10F2C FE0F0F30 219 JMP LG99 220 * --- 221 00010F2D 222 LG95 LABEL 10F2D 6005270F 0 IMM 223 LD R0 ADR(ERM416) "INVALID LUN SPECIFIED" 10F2E FE0F0F30 224 JMP LG99 225 * --- 226 00010F2F 227 LG96 LABEL 10F2F 600526E2 0 IMM 228 LD R0 ADR(ERM410) "PARAMETER OUT OF BOUNDS" 229 * \ / 00010F30 230 LG99 LABEL 10F30 60840000 2 IMM 231 LD R2 TERR save future confusion 10F31 5D1F4001 5 STAK 232 LEAVE POP 233 * --- 234 235 END LUNGET subroutine 1 Assembler C9208 Control Mode C9304 14-Jun-93 17:33 PAGE 183 (CMUSUB2) F 13 Utility subroutines 237 238 ********************************************************************************** 239 * * 240 * This is the MAKEOUT routine. It is called when a section * 241 * wants an output unit which may be a lun or saved file, and may * 242 * be created or may already exist. This is done for routines like * 243 * the LOGON section and the CATALOG printer. It operates just * 244 * like FILEGET and LUNGET in the style of returns. * 245 * * 246 * R0 = 0 if all ok * 247 * R0 < 0 if file error * 248 * R0 > 0 if parameter error * 249 * * 250 * An alternate entry MAKEOUTX can be called to use a * 251 * specific lun which is passed in R0. * 252 * * 253 ********************************************************************************** 254 255 BLOCK MAKEOUT subroutines 256 ENTRY MAKEOUT 257 ENTRY MAKEOUTX 258 259 BEGFRAME 00174801 5 BASE 260 MKFNAMEPOS BSS 1 pointer to current position in file name 00174802 5 BASE 261 MKPARALEN BSS 1 length of file name parameters 00174803 5 BASE 262 MKNAMELEN BSS 1 length of filename 00174804 5 BASE 263 MKFNSTRL BSS 1 length of complete filename string 00174014 5 CACH 264 MKFNAME BSSC MAXLEN file name string with extension 265 ENDFRAME 266 10F32 DD5F4045 5 STAK 267 MAKEOUT ENTRNP PUSH 10F33 DC4103A2 268 CALLNP FETCHITMP go get the thing to write on 10F34 F6BD0F49 2 269 JBT R2/TALPH MKO40 jump if a file name 10F35 F2BF0F88 2 270 JBF R2/TNUM MKO900 jump if not a lun 10F36 6100011C 4 271 LD R4 VALUE get the lun to write on 10F37 650400CA 4 IMM 272 CPR R4 GOODLUN be sure it's in our range 10F38 FE050F8A 273 JGT MKO901 jump if too big 10F39 E5000009 4 274 ST R4 LUN remember the lun 10F3A 60040010 0 IMM 275 LD R0 FRSTATUS see if it's around 10F3B 08800009 276 FREQ LUN(XREQ) how 'bout it, system? 10F3C FA070F44 0 277 JGEZ R0 MKO10 jump if looks ok 10F3D DC410DA2 278 CALLNP EQBZAP clear equip buffer 10F3E 60010022 0 279 LD R0 EXTSAF get extension of .SAF 10F3F E400004A 0 280 ST R0 EQBFE set the extension 10F40 60040050 0 IMM 281 LD R0 FREQUIPW we want to write! 10F41 6044003E 1 IMM 282 LD R1 ADR(EQBUF) point to the buffer 10F42 08800009 283 FREQ LUN(XREQ) can we equip it? 10F43 FA090F45 0 284 JLTZ R0 MKO20 jump if we failed 285 * \ / 00010F44 286 MKO10 LABEL 10F44 60040000 0 IMM 287 LD R0 0 say we succeeded 288 * \ / 00010F45 289 MKO20 LABEL 10F45 5D1F4045 5 STAK 290 LEAVE POP Homeward bound!! 291 * --- 292 1 Assembler C9208 Control Mode C9304 14-Jun-93 17:33 PAGE 184 (CMUSUB2) F 13 Utility subroutines 10F46 DD5F4045 5 STAK 293 MAKEOUTX ENTRNP PUSH entry for caller-supplied lun 10F47 E4000009 0 294 ST R0 LUN save the lun where needed 10F48 FE0F0F4B 295 JMP MKO45 and merge in 296 * --- 297 00010F49 298 MKO40 LABEL (file name section) 10F49 DC410C68 299 CALLNP CMLUNGET get a free CM lun 10F4A E4400009 1 300 ST R1 LUN say this is our lun 301 * \ / 00010F4B 302 MKO45 LABEL (find start of parameters) 10F4B EC174804 5 BASE 303 STZ SP,MKFNSTRL set length of filename string to zero 10F4C 38974014 2 5 CACH 304 LEA R2 SP,MKFNAME get position for filename string 10F4D E4974801 2 5 BASE 305 ST R2 SP,MKFNAMEPOS save as current position 10F4E 60010009 0 306 LD R0 SBPT get pointer to symbol buffer 10F4F 6040011D 1 307 LD R1 ALPHALEN get length of filename string in buffer 10F50 6084003C 2 IMM 308 LD R2 LESS find less than sign 10F51 FE560000 309 CSRCH find end of filename 10F52 FE0D0F57 310 JNE MKO50 jump if no parameters 10F53 E4574802 1 5 BASE 311 ST R1 SP,MKPARALEN save remaining chars as length of params 10F54 3040011D 1 312 RSB R1 ALPHALEN find length of filename 10F55 FA430F7C 1 313 JEQZ R1 MKO90 jump if no filename input 10F56 FE0F0F59 314 JMP MKO60 315 * --- 316 00010F57 317 MKO50 LABEL 10F57 6040011D 1 318 LD R1 ALPHALEN get length of entire filename string 10F58 EC174802 5 BASE 319 STZ SP,MKPARALEN say parameters length is zero 320 * \ / 00010F59 321 MKO60 LABEL 10F59 E4574803 1 5 BASE 322 ST R1 SP,MKNAMELEN save name length 10F5A D0524000 1 REG 323 DEC R1 get index of last part of file name 10F5B EC120000 0 REG 324 STZ R0 set number of password char to zero 325 * \ / 00010F5C 326 MKO65 LABEL (include password with parameters) 10F5C D0120000 0 REG 327 INC R0 increment number of password chars 10F5D 60B30009 2 1 @ 328 LD R2 @SBPT(R1) get last char of file name 10F5E 64840028 2 IMM 329 CPR R2 LPAREN check if a left paren 10F5F FE030F66 330 JEQ MKO68 jump if one found 10F60 6484002E 2 IMM 331 CPR R2 DOT check if period 10F61 FE030F68 332 JEQ MKO69 no password - move file name 10F62 6484003A 2 IMM 333 CPR R2 COLON check if colon 10F63 FE030F68 334 JEQ MKO69 no password - move file name 10F64 FA670F5C 1 335 JDR R1 MKO65 check next char, if any 10F65 FE0F0F68 336 JMP MKO69 no password - move file name 337 * --- 338 00010F66 339 MKO68 LABEL 10F66 98174802 0 5 BASE 340 ADDM R0 SP,MKPARALEN add password length to params length 10F67 B0174803 0 5 BASE 341 RSBM R0 SP,MKNAMELEN subtract password length from filename 342 * \ / 00010F68 343 MKO69 LABEL (move filename) 10F68 60010009 0 344 LD R0 SBPT find start of symbol buffer 10F69 60574803 1 5 BASE 345 LD R1 SP,MKNAMELEN save length of filename 10F6A 60974801 2 5 BASE 346 LD R2 SP,MKFNAMEPOS get position to place filename at 10F6B 98574804 1 5 BASE 347 ADDM R1 SP,MKFNSTRL add number of chars moved to length 10F6C FE400000 348 CMOVE move filename 1 Assembler C9208 Control Mode C9304 14-Jun-93 17:33 PAGE 185 (CMUSUB2) F 13 Utility subroutines 10F6D E4974801 2 5 BASE 349 ST R2 SP,MKFNAMEPOS save position of next character avail 10F6E 60574803 1 5 BASE 350 LD R1 SP,MKNAMELEN get length of filename back 10F6F D0524000 1 REG 351 DEC R1 decrement to find index to last char 352 * \ / 00010F70 353 MKO70 LABEL (check for extension) 10F70 60B30009 2 1 @ 354 LD R2 @SBPT(R1) pick up a char from filename 10F71 6484002E 2 IMM 355 CPR R2 DOT check if it's a period 10F72 FE030F7C 356 JEQ MKO90 if so extension is supplied 10F73 6484003A 2 IMM 357 CPR R2 COLON check if it's a colon 10F74 FE030F76 358 JEQ MKO80 if so, no extension 10F75 FA670F70 1 359 JDR R1 MKO70 get another char if any left 360 * \ / 00010F76 361 MKO80 LABEL (add extension if necessary) 10F76 38010024 0 362 LEA R0 LISTCHRS get address of default extension 10F77 60440005 1 IMM 363 LD R1 LISTCHRSL get length of default extension 10F78 60974801 2 5 BASE 364 LD R2 SP,MKFNAMEPOS get current position in filename string 10F79 98574804 1 5 BASE 365 ADDM R1 SP,MKFNSTRL add number of chars moved to length 10F7A FE400000 366 CMOVE move in default extension 10F7B E4974801 2 5 BASE 367 ST R2 SP,MKFNAMEPOS save pointer to next char position 368 * \ / 00010F7C 369 MKO90 LABEL (move parameters and password) 10F7C 60574803 1 5 BASE 370 LD R1 SP,MKNAMELEN get length of filename 10F7D 38330009 0 1 @ 371 LEA R0 @SBPT(R1) find address of parameters 10F7E 60574802 1 5 BASE 372 LD R1 SP,MKPARALEN get length of parameters 10F7F 60974801 2 5 BASE 373 LD R2 SP,MKFNAMEPOS get position chars should be moved to 10F80 98574804 1 5 BASE 374 ADDM R1 SP,MKFNSTRL add number of chars moved to length 10F81 FE400000 375 CMOVE move in parameters 10F82 60040268 0 IMM 376 LD R0 FRNOPENCW get open file request 10F83 60574804 1 5 BASE 377 LD R1 SP,MKFNSTRL get length of filename string 10F84 38974014 2 5 CACH 378 LEA R2 SP,MKFNAME get address of filename string 10F85 08800009 379 FREQ LUN(XREQ) open the file 10F86 FA070F44 0 380 JGEZ R0 MKO10 jump if OK 10F87 FE0F0F45 381 JMP MKO20 and return bad news 382 * --- 383 00010F88 384 MKO900 LABEL 10F88 600526FF 0 IMM 385 LD R0 ADR(ERM414) "Invalid lun or file name" 10F89 FE0F0F45 386 JMP MKO20 387 * --- 388 00010F8A 389 MKO901 LABEL 10F8A 600526E2 0 IMM 390 LD R0 ADR(ERM410) "Parameter out of bounds" 10F8B 60840000 2 IMM 391 LD R2 TERR save later confusion 10F8C FE0F0F45 392 JMP MKO20 393 * --- 394 395 END MAKEOUT subroutines 1 Assembler C9208 Control Mode C9304 14-Jun-93 17:33 PAGE 186 (CMUSUB2) F 13 Utility subroutines 397 398 ********************************************************************************** 399 * * 400 * The following subroutines are for mapping user pages in and * 401 * out of Control Mode's address space for variable fetching and * 402 * setting. The user's variable address should be in R0 and the * 403 * string variable length should be in SETVALUE. UPNUM has the * 404 * under-process serial number. * 405 * * 406 ********************************************************************************** 407 408 BLOCK MAPING subroutines 409 ENTRY MAPIN 410 ENTRY MAPOUT 411 412 BEGFRAME 00174801 5 BASE 413 MIOFLAG BSS 1 one/two page flag 414 ENDFRAME 415 10F8D DD5F4002 5 STAK 416 MAPIN ENTRNP PUSH 10F8E 608A1E70 2 0 CBM 417 LD R2 R0/PADRBITS get page address 10F8F 60400017 1 418 LD R1 SETVALUE get string length 10F90 14440004 1 IMM 419 DIV R1 CPW convert from characters 10F91 18165001 0 1 REG 420 ADD R0 R1+1 then compute ending address 10F92 600A1E70 0 0 CBM 421 LD R0 R0/PADRBITS calculate ending page 10F93 64128000 0 2 REG 422 CPR R0 R2 are they on same page? 10F94 ED974801 5 BASE 423 STLNE SP,MIOFLAG set flag accordingly 10F95 60040110 0 IMM 424 LD R0 URMAPINAS 10F96 60440001 1 IMM 425 LD R1 SYSBUFPN get our page to use 10F97 0900001D 426 UREQ UPNUM(XREQ) do it to it 10F98 FA091270 0 427 JLTZ R0 ENTVARERR jump if screwy 10F99 5C174801 5 BASE 428 CMZ SP,MIOFLAG one page or two?? 10F9A FE030FA0 429 JEQ MIEXIT exit if only one 10F9B 60040110 0 IMM 430 LD R0 URMAPINAS now get second page 10F9C 60440002 1 IMM 431 LD R1 SYSBUFPN+1 use our next page, too 10F9D 18840001 2 IMM 432 ADD R2 1 and user's next 10F9E 0900001D 433 UREQ UPNUM(XREQ) 10F9F FA091270 0 434 JLTZ R0 ENTVARERR jump if problems 435 * \ / 00010FA0 436 MIEXIT LABEL 10FA0 5D1F4002 5 STAK 437 LEAVE POP 438 * --- 439 10FA1 DD5F4002 5 STAK 440 MAPOUT ENTRNP PUSH 10FA2 600400C0 0 IMM 441 LD R0 URFREEPAGE we want to free it up 10FA3 09040001 IMM 442 UREQ SYSBUFPN+XREQ 10FA4 600400C0 0 IMM 443 LD R0 URFREEPAGE 10FA5 09040002 IMM 444 UREQ SYSBUFPN+1+XREQ and one more just for luck 10FA6 5D1F4002 5 STAK 445 LEAVE POP 446 * --- 447 448 END MAPIN subroutines 1 Assembler C9208 Control Mode C9304 14-Jun-93 17:33 PAGE 187 (CMUSUB2) F 13 Utility subroutines 450 451 ********************************************************************************** 452 * * 453 * This section does the mass reset operation. It is called * 454 * by the RESET command processor if the user wanted all luns reset * 455 * (no parameters), and also by the execute-only-violation * 456 * processor, since all luns must be unequipped if the user tries * 457 * to interfere with a running, execute-only program. Finally, it * 458 * is called at the completion (normal or abnormal) of any * 459 * execute-only program to clean up any loose ends so the user * 460 * can't find out anything about the program. * 461 * * 462 ********************************************************************************** 463 464 BLOCK MASSRESET subroutine 465 ENTRY MASSRESET 466 467 BEGFRAME 468 ENDFRAME 469 10FA7 DD5F4001 5 STAK 470 MASSRESET ENTRNP PUSH 10FA8 61040000 4 IMM 471 LD R4 LOWULUN-1 start at the bottom 472 * \ / 00010FA9 473 MR10 LABEL 10FA9 60040121 0 IMM 474 LD R0 URNEXTLUN request next equipped lun 10FAA 09171000 4 REG 475 UREQ R4+XREQ let the system find it 10FAB FA090FB2 0 476 JLTZ R0 MR20 jump if no more equipped 10FAC 64410007 1 477 CPR R1 MAXULUN see if above user's area 10FAD FE050FB2 478 JGT MR20 all done if so 10FAE 61124000 4 1 REG 479 LD R4 R1 get the next lun to zap 10FAF 60040060 0 IMM 480 LD R0 FRUNEQUIP request to free it up 10FB0 08971000 4 REG 481 FREQ R4+XREQ that should do it 10FB1 FE0F0FA9 482 JMP MR10 go around the horn again 483 * --- 484 00010FB2 485 MR20 LABEL 10FB2 5D1F4001 5 STAK 486 LEAVE POP and back to caller 487 * --- 488 489 END MASSRESET subroutine 1 Assembler C9208 Control Mode C9304 14-Jun-93 17:33 PAGE 188 (CMUSUB2) F 13 Utility subroutines 491 492 ********************************************************************************** 493 * * 494 * This is the MATCH routine. It is used to match strings * 495 * according to a wildcard specification. On return R0 will * 496 * contain a 1 if the string satisfied the wildcard specification * 497 * and a -1 if not. One note is that this routine is recursive, it * 498 * calls itself while pro- cessing * specifications. This routine * 499 * is called as follows: * 500 * * 501 * CALL MATCH * 502 * PARV address of the wildcard string * 503 * PARVL address of the string to match * 504 * * 505 * Eats:R0-R2 * 506 * * 507 ********************************************************************************** 508 509 BLOCK MATCH subroutine 510 ENTRY MATCH 511 512 BEGFRAME 00174801 5 BASE 513 WILDADR BSS 1 wildcard string pointer 00174802 5 BASE 514 STRADR BSS 1 match string pointer 515 ENDFRAME 516 10FB3 DD1F4003 5 STAK 517 MATCH ENTR PUSH 10FB4 C1574801 5 BASE 518 STPV WILDADR address of the wildcard string 10FB5 C0574802 5 BASE 519 STPVL STRADR address of the match string 10FB6 60574801 1 5 BASE 520 LD R1 WILDADR wildcard string pointer 521 * \ / 00010FB7 522 MATCNXT LABEL 10FB7 60164000 0 1 CACH 523 LD R0 CACH R1,0 character from wildcard string 10FB8 6404003F 0 IMM 524 CPR R0 QM compare to a ? 10FB9 FE030FC1 525 JEQ MATCQM process the ? if match 10FBA 6404002A 0 IMM 526 CPR R0 STAR compare to a * 10FBB FE030FCB 527 JEQ MATCSTAR process the * if match 528 * \ / 10FBC 60574802 1 5 BASE 529 LD R1 STRADR address of the match string 10FBD 64164000 0 1 CACH 530 CPR R0 CACH R1,0 are the characters equal 10FBE FE0D0FD8 531 JNE NOMATCH no they are not! 10FBF 64040020 0 IMM 532 CPR R0 EOW are we at the end 10FC0 FE030FDA 533 JEQ YESMATCH yes, and we are all done 534 * \ / 00010FC1 535 MATCQM LABEL 10FC1 60574802 1 5 BASE 536 LD R1 STRADR string pointer 10FC2 60164000 0 1 CACH 537 LD R0 CACH R1,0 get a character 10FC3 64040020 0 IMM 538 CPR R0 EOW are we at the end? 10FC4 FE030FD8 539 JEQ NOMATCH strings unequal if so 10FC5 D00A5F30 1 CBM 540 INC R1/NXTCHAR increment the string pointer 10FC6 E4574802 1 5 BASE 541 ST R1 STRADR save it for later 10FC7 60574801 1 5 BASE 542 LD R1 WILDADR wildcard pointer 10FC8 D00A5F30 1 CBM 543 INC R1/NXTCHAR bump it up one character 10FC9 E4574801 1 5 BASE 544 ST R1 WILDADR and save it for later 10FCA FE0F0FB7 545 JMP MATCNXT go look at the next character 546 * --- 1 Assembler C9208 Control Mode C9304 14-Jun-93 17:33 PAGE 189 (CMUSUB2) F 13 Utility subroutines 547 548 ********************************************************************************** 549 * * 550 * At this point we have found a "*" in the wild string. We * 551 * skip the "*" and see if the remainder of the wild string matches * 552 * ANY remainder of the compare string, since * may represent any * 553 * numbers of characters including null. * 554 * * 555 ********************************************************************************** 556 00010FCB 557 MATCSTAR LABEL 10FCB D00A5F30 1 CBM 558 INC R1/NXTCHAR point to next wildcard char 10FCC E4574801 1 5 BASE 559 ST R1 WILDADR store this address back 10FCD 60974802 2 5 BASE 560 LD R2 STRADR address to the match string 561 * \ / 00010FCE 562 MATCAGIN LABEL 10FCE 60534000 1 5 REG 563 LD R1 SP 10FCF DC010FB3 564 CALL MATCH compare next characters 10FD0 41564801 1 BASE 565 PARV R1,WILDADR 10FD1 40528000 2 REG 566 PARVL R2 10FD2 FA070FDB 0 567 JGEZ R0 RETURN they sure did match 10FD3 60168000 0 2 CACH 568 LD R0 CACH R2,0 get the match string character 10FD4 64040020 0 IMM 569 CPR R0 EOW are we at the end of the line? 10FD5 FE030FD8 570 JEQ NOMATCH no more left 10FD6 D00A9F30 2 CBM 571 INC R2/NXTCHAR point to the next string char 10FD7 FE0F0FCE 572 JMP MATCAGIN go compare more characters 573 * --- 574 00010FD8 575 NOMATCH LABEL 10FD8 D1520000 0 REG 576 STMW R0 say strings are unequal 10FD9 FE0F0FDB 577 JMP RETURN 578 * --- 579 00010FDA 580 YESMATCH LABEL 10FDA EDD20000 0 REG 581 STW R0 say strings are equal 582 * \ / 00010FDB 583 RETURN LABEL 10FDB 5D1F4003 5 STAK 584 LEAVE POP off into the wild blue younder 585 * --- 586 587 END MATCH subroutine 1 Assembler C9208 Control Mode C9304 14-Jun-93 17:33 PAGE 190 (CMUSUB2) F 13 Utility subroutines 589 590 ********************************************************************************** 591 * * 592 * The OPERMSG routine is used to send a message to the system * 593 * operator. The return from the routine is not executed until the * 594 * operator clears the message from the queue. The user may break * 595 * out this routine, but his message is cleared when he does so. * 596 * The message string must be in SBUFF and its length must be in * 597 * VALUE. * 598 * * 599 ********************************************************************************** 600 601 BLOCK OPERMSG subroutine 602 ENTRY OPERMSG 603 604 BEGFRAME 00174801 5 BASE 605 OPBRK BSS 1 temp for break flag 606 ENDFRAME 607 10FDC DD5F4002 5 STAK 608 OPERMSG ENTRNP PUSH 10FDD EDD1000E @ 609 STW @OPERMSGGEN set operator message generated flag 10FDE D1CBA210 6 CBM 610 SETT ST/INOK set break flag 10FDF EC574801 5 BASE 611 STLEQ SP,OPBRK remember previous break flag 10FE0 F7A51522 6 612 JBT ST/INRQ MCBRK honor break if it already happened 10FE1 60040150 0 IMM 613 LD R0 URGENOPMSG get operator message request 10FE2 6040011C 1 614 LD R1 VALUE get message length 10FE3 608400D5 2 IMM 615 LD R2 ADR(SBUFF) get message address 10FE4 09040000 IMM 616 UREQ 0+XREQ send the message 10FE5 FA0D154C 0 617 JNEZ R0 COMERR jump if error occurs 618 * \ / 00010FE6 619 OPR10 LABEL 10FE6 60040140 0 IMM 620 LD R0 URDELAY get delay request 10FE7 60440005 1 IMM 621 LD R1 OPERDELAY get delay time 10FE8 60840000 2 IMM 622 LD R2 0 wait for full time unless interrupted 10FE9 09040000 IMM 623 UREQ 0+XREQ do the wait 10FEA FA09154C 0 624 JLTZ R0 COMERR jump if trouble 10FEB 60040150 0 IMM 625 LD R0 URGENOPMSG get operator message request again 10FEC 6040011C 1 626 LD R1 VALUE get back the length 10FED 608400D5 2 IMM 627 LD R2 ADR(SBUFF) and the message address 10FEE 09040000 IMM 628 UREQ 0+XREQ try to send the message again 10FEF 604A2AB0 1 0 CBM 629 LD R1 R0/ECFIELD get error code 10FF0 64440099 1 IMM 630 CPR R1 XREQERSIU check if message still in queue 10FF1 FE030FE6 631 JEQ OPR10 if so, wait some more 10FF2 FA0D154C 0 632 JNEZ R0 COMERR any other error 10FF3 60040151 0 IMM 633 LD R0 URCANOPMSG get a message cancel request 10FF4 09040000 IMM 634 UREQ 0+XREQ now cancel the extra message 10FF5 FA09154C 0 635 JLTZ R0 COMERR process any error 10FF6 5C174801 5 BASE 636 CMZ SP,OPBRK check previous break flag 10FF7 ED8BA210 6 CBM 637 STLNE ST/INOK restore the break flag 10FF8 EC11000E @ 638 STZ @OPERMSGGEN clear operator message requested flag 10FF9 5D1F4002 5 STAK 639 LEAVE POP 640 * --- 641 642 END OPERMSG subroutine 1 Assembler C9208 Control Mode C9304 14-Jun-93 17:33 PAGE 191 (CMUSUB2) F 13 Utility subroutines 644 645 ********************************************************************************** 646 * * 647 * This is the PARMAKE routine. It is called by RUN and * 648 * INSERT to take the parameter string given on the program call * 649 * and pack it into a variable (PARAMETERS! ) so it will be * 650 * available to user programs through the variable get xreq. * 651 * * 652 ********************************************************************************** 653 654 BLOCK PARMAKE subroutine 655 ENTRY PARMAKE 656 657 BEGFRAME 658 ENDFRAME 659 10FFA DD5F4001 5 STAK 660 PARMAKE ENTRNP PUSH 10FFB 60000116 0 661 LD R0 BUFPT get input buffer address 10FFC 604400FF 1 IMM 662 LD R1 OKLEN-1 set up to find end of input 10FFD DA1E0820 0 1 663 SRCHNI R0 R1 " " skip leading spaces 10FFE E4000016 0 664 ST R0 VTYPE value starts here 10FFF E4528000 1 2 REG 665 ST R1 R2 current length of remaining string 11000 DA1C080D 0 1 666 SRCHI R0 R1 CR now look for the end of line 11001 30528000 1 2 REG 667 RSB R1 R2 calculate string length 11002 E4400017 1 668 ST R1 SETVALUE and save string length 11003 6201002A 01 669 LD2 R0 PARNAME variable name 11004 E6000014 01 670 ST2 R0 VNAME set up its name (PARAMETER!) 11005 DC411139 671 CALLNP VARMAKE and set the new value 11006 5D1F4001 5 STAK 672 LEAVE POP 673 * --- 674 675 END PARMAKE subroutine 1 Assembler C9208 Control Mode C9304 14-Jun-93 17:33 PAGE 192 (CMUSUB2) F 13 Utility subroutines 677 678 ********************************************************************************** 679 * * 680 * This is the SENDMSG routine. It send a message to * 681 * request process. The Control Mode privledge is set, but no * 682 * other privledges are. The calling sequence is: * 683 * * 684 * CALL SENDMSG * 685 * PARV message class * 686 * PARV destination process * 687 * PARV length of message text * 688 * PAR message text * 689 * PARL error code * 690 * * 691 * This routine will provide a header for the message and ship * 692 * it out. This routine does not attempt to wait for or get any * 693 * response. Note: R3 and R4 shaould not be changed until all * 694 * parameters have been picked up. This routine return with R0 * 695 * containing any error code received from the request to send the * 696 * message. * 697 * * 698 ********************************************************************************** 699 700 BLOCK SENDMSG subroutine 701 ENTRY SENDMSG 702 703 BEGFRAME 00174801 5 BASE 704 SNMLEN BSS 1 message text length 00174802 5 BASE 705 SNMADR BSS 1 message text address 00174803 5 BASE 706 SNMMSG BSS MSGSHDLEN reserve area for message header 0017402C 5 CACH 707 SNMTEXT BSSC 256 message text 708 ENDFRAME 709 11007 DD1F404B 5 STAK 710 SENDMSG ENTR PUSH 11008 38574803 1 5 BASE 711 LEA R1 SP,SNMMSG get address of message header 11009 C1486100 1 ZBM 712 STPV R1,MSGCLASS put message class in message 1100A C1484100 1 ZBM 713 STPV R1,MSGPROC put destination process in message 1100B C1574801 5 BASE 714 STPV SP,SNMLEN get length of message 1100C C1174802 5 BASE 715 STP SP,SNMADR get address of message text 1100D C0130000 4 REG 716 STPL R4 get address for error code 717 * \ / 1100E 60174802 0 5 BASE 718 LD R0 SP,SNMADR get address of message 1100F 38964802 2 1 BASE 719 LEA R2 R1,MSGSTEXT get address of area for message text 11010 60574801 1 5 BASE 720 LD R1 SP,SNMLEN get length of message 11011 FE400000 721 CMOVE move message text to message area 11012 38974803 2 5 BASE 722 LEA R2 SP,SNMMSG get address of header back 11013 EC168801 2 BASE 723 STZ R2,MSGPRIVS clear privledges 11014 EDC8A811 2 ZBM 724 STW R2,MSGPRIVS/MSGPRIVCM set control mode privledge 11015 60040160 0 IMM 725 LD R0 URSENDMSG get send message request 11016 60574801 1 5 BASE 726 LD R1 SP,SNMLEN get message text length 11017 18440008 1 IMM 727 ADD R1 MSGSHDLEN add in header length 11018 09040000 IMM 728 UREQ 0+XREQ send the message 11019 E4170400 0 4 @R 729 ST R0 @R4 save error code 1101A 5D1F404B 5 STAK 730 LEAVE POP return 731 * --- 732 1 Assembler C9208 Control Mode C9304 14-Jun-93 17:33 PAGE 193 (CMUSUB2) F 13 Utility subroutines 733 END SENDMSG subroutine 1 Assembler C9208 Control Mode C9304 14-Jun-93 17:33 PAGE 194 (CMUSUB2) F 13 Utility subroutines 735 736 ********************************************************************************** 737 * * 738 * This is the SENDSPLMSG routine. It locates the spooler and * 739 * sends a message to it. This routine locates the spooler and * 740 * sets up the message header. The message passed to it should * 741 * contain only the message ID, the request type, and the message * 742 * text. If any errors occur, the error code will be returned. * 743 * The calling sequence is as follows: * 744 * * 745 * CALL SENDSPLMSG * 746 * PARV message length (without header) (input) * 747 * PAR message text ( without header) (input) * 748 * PAR spooler process number (output) * 749 * PARL error code (output) * 750 * * 751 ********************************************************************************** 752 753 BLOCK SENDSPLMSG subroutine 754 ENTRY SENDSPLMSG 755 756 BEGFRAME 00174801 5 BASE 757 SNSMSGADR BSS 1 address of message 00174802 5 BASE 758 SNSMSGLEN BSS 1 length of message 00174803 5 BASE 759 SNSERRADR BSS 1 address to return error code to 00174804 5 BASE 760 SNSERR BSS 1 location to receive error code 00174805 5 BASE 761 SNSPRNADR BSS 1 address for spooler process number 762 ENDFRAME 763 1101B DD1F4006 5 STAK 764 SENDSPLMSG ENTR PUSH 1101C C1574802 5 BASE 765 STPV SP,SNSMSGLEN get message length 1101D C1174801 5 BASE 766 STP SP,SNSMSGADR get message address 1101E C1174805 5 BASE 767 STP SP,SNSPRNADR get process number address 1101F C0174803 5 BASE 768 STPL SNSERRADR save error code address 769 * \ / 11020 60040170 0 IMM 770 LD R0 URGETPNUM get find process number request 11021 60440008 1 IMM 771 LD R1 SPLNAMELEN get length of spooler name 11022 38810043 2 772 LEA R2 SPLNAME get address of spooler name 11023 09040000 IMM 773 UREQ 0+XREQ get spooler process number 11024 FA09102E 0 774 JLTZ R0 SNS30 jump on error 11025 E4574C05 1 5 FPVR 775 ST R1 @(SP,SNSPRNADR) pass spooler process number to caller 11026 61134000 4 5 REG 776 LD R4 SP save stack address 11027 DC011007 777 CALL SENDMSG send the message 11028 41440003 IMM 778 PARV 3 set message class to spooler comm. 11029 41170C05 4 FPVR 779 PAR @(R4,SNSPRNADR) use process number for spooler 1102A 41570802 4 BASE 780 PARV R4,SNSMSGLEN passon message length 1102B 41170C01 4 FPVR 781 PAR @(R4,SNSMSGADR) pass on message address 1102C 40170804 4 BASE 782 PARL R4,SNSERR pass on error code address 1102D 60174804 0 5 BASE 783 LD R0 SP,SNSERR get error code back 784 * \ / 0001102E 785 SNS30 LABEL 1102E E4174C03 0 5 FPVR 786 ST R0 @(SP,SNSERRADR) save error code 1102F 5D1F4006 5 STAK 787 LEAVE POP 788 * --- 789 790 END SENDSPLMSG subroutine 1 Assembler C9208 Control Mode C9304 14-Jun-93 17:33 PAGE 195 (CMUSUB2) F 13 Utility subroutines 792 793 ********************************************************************************** 794 * * 795 * EXCHUNITS. This routine switches the standard IO units for * 796 * . NULLs. This is the prerequisite for attaching to a session. * 797 * If we get any kind of error, then we almost certainly can * 798 * recover. The one exception is if we can not restore the * 799 * standard input unit. In this case, instead of limping along, we * 800 * log the session off. * 801 * * 802 ********************************************************************************** 803 804 BLOCK EXCHUNITS subroutine 805 ENTRY EXCHUNITS 806 807 BEGFRAME 808 ENDFRAME 809 11030 DD5F4001 5 STAK 810 EXCHUNITS ENTRNP PUSH 11031 DC410DA2 811 CALLNP EQBZAP initialize the equip block 11032 60010021 0 812 LD R0 EXTNULL get NULL extension 11033 E400004A 0 813 ST R0 EQBFE set into the file extension 11034 DC410C68 814 CALLNP CMLUNGET get a free unit 11035 E4400025 1 815 ST R1 INUNIT temporary input unit 11036 60040050 0 IMM 816 LD R0 FREQUIPW open request 11037 6044003E 1 IMM 817 LD R1 ADR (EQBUF) address of the equip buffer 11038 08800025 818 FREQ INUNIT(XREQ) open a .NULL 11039 FA091053 0 819 JLTZ R0 FORGETIT ignore what we are doing 1103A DC410C68 820 CALLNP CMLUNGET get a free unit 1103B E4400026 1 821 ST R1 OUTUNIT temporary output unit 1103C 60040050 0 IMM 822 LD R0 FREQUIPW open request 1103D 6044003E 1 IMM 823 LD R1 ADR (EQBUF) address of the equip buffer 1103E 08800026 824 FREQ OUTUNIT(XREQ) open a .NULL 1103F FA091050 0 825 JLTZ R0 CLOSEIN if error, close input file 11040 60040290 0 IMM 826 LD R0 FRRESSWTCH resource switch 11041 604400C9 1 IMM 827 LD R1 LUNAIN unit number of standard input 11042 08800025 828 FREQ INUNIT(XREQ) make the switch 11043 FA09104E 0 829 JLTZ R0 CLOSEBOTH if error, close both temp units 11044 60040290 0 IMM 830 LD R0 FRRESSWTCH resource switch 11045 604400CA 1 IMM 831 LD R1 LUNAOUT unit number of standard output 11046 08800026 832 FREQ OUTUNIT(XREQ) make the switch 11047 FA09104A 0 833 JLTZ R0 SWITCHIN if error, restore input unit 11048 19C40002 7 IMM 834 ADD R7 2 advance to good return 835 * \ / 00011049 836 SWAPEXIT LABEL 11049 5D1F4001 5 STAK 837 LEAVE POP 838 * --- 839 0001104A 840 SWITCHIN LABEL 1104A 60040290 0 IMM 841 LD R0 FRRESSWTCH resource switch 1104B 604400C9 1 IMM 842 LD R1 LUNAIN unit number of standard input 1104C 08800025 843 FREQ INUNIT(XREQ) make the switch 1104D FA091049 0 844 JLTZ R0 SWAPEXIT cann't restore input unit, die! 845 * \ / 0001104E 846 CLOSEBOTH LABEL 1104E 60040060 0 IMM 847 LD R0 FRUNEQUIP close unit request 1 Assembler C9208 Control Mode C9304 14-Jun-93 17:33 PAGE 196 (CMUSUB2) F 13 Utility subroutines 1104F 08800026 848 FREQ OUTUNIT(XREQ) temporary output unit 849 * \ / 00011050 850 CLOSEIN LABEL 11050 60040060 0 IMM 851 LD R0 FRUNEQUIP close unit request 11051 08800025 852 FREQ INUNIT(XREQ) zap the temporary unit 11052 EE000025 853 STZ2 SWAPUNITS units no longer in use 854 * \ / 00011053 855 FORGETIT LABEL 11053 FBE11049 7 856 IRJ R7 SWAPEXIT advance to recoverable error return 857 * --- 858 859 END EXCHUNITS subroutine 1 Assembler C9208 Control Mode C9304 14-Jun-93 17:33 PAGE 197 (CMUSUB2) F 13 Utility subroutines 861 862 ********************************************************************************** 863 * * 864 * This is the SWIZZLE routine. It is called to convert a CM * 865 * lun to a user lun. This is necessary for files which are to * 866 * used as programs. When called, LUN should have the currently * 867 * equipped lun of the file. R0 may have an XREQ code. R0 will be * 868 * saved and restored, and LUN will be returned with the new lun of * 869 * the file. If an error occurred in this routine, R0 will be * 870 * returned with a system error code (negative). R1 will be * 871 * returned containing a zero if the swizzle was performed or a -1 * 872 * if no swizzle was needed. * 873 * * 874 ********************************************************************************** 875 876 BLOCK SWIZZLE subroutine 877 ENTRY SWIZZLE 878 879 BEGFRAME 00174801 5 BASE 880 SWIZTMP BSS 1 temp for R0 881 ENDFRAME 882 11054 DD5F4002 5 STAK 883 SWIZZLE ENTRNP PUSH 11055 60400009 1 884 LD R1 LUN check the lun we have 11056 64410007 1 885 CPR R1 MAXULUN is it a user lun? 11057 6047FFFF 1 IMM 886 LD R1 -1 indicate no swizzle needed 11058 FE0B106B 887 JLE SWIZEXIT if so then no need to be here 11059 E4174801 0 5 BASE 888 ST R0 SP,SWIZTMP save R0 from harm 1105A DC410DA2 889 CALLNP EQBZAP clean out the equip area 1105B 60400009 1 890 LD R1 LUN get the old lun again 1105C E4400049 1 891 ST R1 EQBFN(1) stuff into file name 1105D 60040122 0 IMM 892 LD R0 URFREELUN now to find a free user lun 1105E 60C10007 3 893 LD R3 MAXULUN get highest user unit 1105F 0916D001 3 REG 894 UREQ R3+1+XREQ ask system for the value 11060 FA09106B 0 895 JLTZ R0 SWIZEXIT bail out if trouble 11061 E452C000 1 3 REG 896 ST R1 R3 juggle the lun we fgot 11062 60040051 0 IMM 897 LD R0 FREQUIPR set up to make the swicth 11063 6044003E 1 IMM 898 LD R1 ADR(EQBUF) point to equip block 11064 0896D000 3 REG 899 FREQ R3+XREQ do it to it 11065 FA09106B 0 900 JLTZ R0 SWIZEXIT make quick escape if error 11066 60040060 0 IMM 901 LD R0 FRUNEQUIP give back the CM lun 11067 08800009 902 FREQ LUN(XREQ) into thin air 11068 E4C00009 3 903 ST R3 LUN make this the official lun 11069 60174801 0 5 BASE 904 LD R0 SP,SWIZTMP restore the old R0 1106A 60440000 1 IMM 905 LD R1 0 indicate swizzle performed 906 * \ / 0001106B 907 SWIZEXIT LABEL 1106B 5D1F4002 5 STAK 908 LEAVE POP return to sender, address unknown 909 * --- 910 911 END SWIZZLE subroutine 1 Assembler C9208 Control Mode C9304 14-Jun-93 17:33 PAGE 198 (CMUSUB2) F 13 Utility subroutines 913 914 ********************************************************************************** 915 * * 916 * This is the TERMSET routine. It gets the on-line user's * 917 * terminal screen height and stuffs it into LINEMAX. Then the * 918 * output routine can check for a screenful and not ship too much * 919 * crud out at once. The echo mode is also gathered and saved in * 920 * ECHOMODE, so it can be reset after logon. * 921 * * 922 ********************************************************************************** 923 924 BLOCK TERMSET subroutine 925 ENTRY TERMSET 926 927 BEGFRAME 00174801 5 BASE 928 TSTMP BSS 2 temp for R0 and R1 929 ENDFRAME 930 1106C DD5F4003 5 STAK 931 TERMSET ENTRNP PUSH 1106D F3831079 6 932 JBF ST/TRM TSEXIT just exit if not on-line 1106E E6174801 015 BASE 933 ST2 R0 SP,TSTMP save goodies from destruction 1106F 60040127 0 IMM 934 LD R0 FRTGETSH request for screen height 11070 088400C9 IMM 935 FREQ LUNAIN+XREQ ask about the standard unit 11071 FA431074 1 936 JEQZ R1 TS10 value is ok as is for tty's 11072 10440003 1 IMM 937 SUB R1 LSBIAS adjust for our own crud 11073 54440004 1 IMM 938 MAX R1 4 don't let it get to small 939 * \ / 00011074 940 TS10 LABEL 11074 E4400007 1 941 ST R1 LINEMAX save the maximum value 11075 60040128 0 IMM 942 LD R0 FRTGETECHO now pick up echo mode 11076 088400C9 IMM 943 FREQ LUNAIN+XREQ in case of logon games 11077 E44BB840 1 6 CBM 944 ST R1 ST/ECHOMODE keep this with status info 11078 62174801 015 BASE 945 LD2 R0 SP,TSTMP restore original registers 946 * \ / 00011079 947 TSEXIT LABEL 11079 5D1F4003 5 STAK 948 LEAVE POP and return to caller 949 * --- 950 951 END TERMSET subroutine 1 Assembler C9208 Control Mode C9304 14-Jun-93 17:33 PAGE 199 (CMUSUB2) F 13 Utility subroutines 953 954 ********************************************************************************** 955 * * 956 * This is the UNPACK routine. It is similar to the other * 957 * unpacker routines except that the output is place starting at * 958 * the position pointed to by R3 and indexed by R2. So these * 959 * registers must be initialized before this subroutine is called. * 960 * * 961 * Eats: R0-R1 * 962 * * 963 ********************************************************************************** 964 965 BLOCK UNPACK subroutine 966 ENTRY UNPACK 967 968 BEGFRAME 00174801 5 BASE 969 STREG4 BSS 1 save register 4 970 ENDFRAME 971 1107A DD5F4002 5 STAK 972 UNPACK ENTRNP PUSH 1107B E5174801 4 5 BASE 973 ST R4 STREG4 save away register 4 1107C 61040005 4 IMM 974 LD R4 5 number of chars to unpack 1107D 60520000 1 0 REG 975 LD R1 R0 pre-function the divide 976 * \ / 0001107E 977 UNPACK10 LABEL 1107E 60040000 0 IMM 978 LD R0 0 setting up the division 1107F 58C40010 IMM 979 IORPSR MODIFBIT do modified arithmetic 11080 14290C03 0 4 980 DIV R0 UN40TAB(R4) get one character 11081 58840010 IMM 981 CLBPSR MODIFBIT return to normal 11082 603100BC 0 0 @ 982 LD R0 @P6CHARS(R0) get a real character 11083 E41AD000 0 32 CACH 983 ST R0 CACH R3,0(R2) store away where needed 11084 D0128000 2 REG 984 INC R2 advance output pointer 11085 FB27107E 4 985 JDR R4 UNPACK10 up, up and away 11086 61174801 4 5 BASE 986 LD R4 STREG4 restore back to normal 11087 5D1F4002 5 STAK 987 LEAVE POP 988 * --- 989 990 END UNPACK subroutine 1 Assembler C9208 Control Mode C9304 14-Jun-93 17:33 PAGE 200 (CMUSUB2) F 13 Utility subroutines 992 993 ********************************************************************************** 994 * * 995 * This is an unpacker routine. It is used to convert packed * 996 * filenames into something recognizable. There are two entries * 997 * UNPACK12 which unpacks 12 characters and UNPACK6 which unpacks 6 * 998 * characters. This routine is called as follows: * 999 * * 1000 * CALL UNPACK12/UNPACK6 * 1001 * PARV Address of the packed string * 1002 * PARVL Address to put the unpacked string * 1003 * * 1004 * Eats: R0-R1,R3 * 1005 * * 1006 ********************************************************************************** 1007 1008 BLOCK UNPACK6/12 subroutines 1009 ENTRY UNPACK6 1010 ENTRY UNPACK12 1011 1012 BEGFRAME 00174801 5 BASE 1013 UNPSOUR BSS 1 source address 00174802 5 BASE 1014 UNPDEST BSS 1 destination address 00174803 5 BASE 1015 STREG2 BSS 2 storage for registers 2, 3 1016 ENDFRAME 1017 11088 DD1F4005 5 STAK 1018 UNPACK12 ENTR PUSH 11089 C1574801 5 BASE 1019 STPV UNPSOUR get the source address 1108A C0574802 5 BASE 1020 STPVL UNPDEST get the destination address also 1021 * \ / 1108B E6974803 235 BASE 1022 ST2 R2 STREG2 save them or lose them 1108C EC128000 2 REG 1023 STZ R2 output buffer index 1108D 60174C01 0 5 FPVR 1024 LD R0 @UNPSOUR the actual value to unpack 1108E 60D74802 3 5 BASE 1025 LD R3 UNPDEST first word to store unpacked chars 1108F DC41107A 1026 CALLNP UNPACK unpack the first word 11090 D0174801 5 BASE 1027 INC UNPSOUR increment address to next word 11091 60174C01 0 5 FPVR 1028 LD R0 @UNPSOUR the value to unpack 11092 DC41107A 1029 CALLNP UNPACK unpack the second word 11093 62974803 235 BASE 1030 LD2 R2 STREG2 restore the registers 11094 5D1F4005 5 STAK 1031 LEAVE POP 1032 * --- 1033 11095 DD1F4005 5 STAK 1034 UNPACK6 ENTR PUSH 11096 C1574801 5 BASE 1035 STPV UNPSOUR get the source address 11097 C0574802 5 BASE 1036 STPVL UNPDEST get the destination address 1037 * \ / 11098 E6974803 235 BASE 1038 ST2 R2 STREG2 save them away until we leave 11099 EC128000 2 REG 1039 STZ R2 output buffer index 1109A 60174C01 0 5 FPVR 1040 LD R0 @UNPSOUR get the first word to unpack 1109B 60D74802 3 5 BASE 1041 LD R3 UNPDEST where to store the unpacked chars 1109C DC41107A 1042 CALLNP UNPACK only unpack one word 1109D 62974803 235 BASE 1043 LD2 R2 STREG2 come out its safe again 1109E 5D1F4005 5 STAK 1044 LEAVE POP 1045 * --- 1046 1047 END UNPACK6/12 subroutines 1 Assembler C9208 Control Mode C9304 14-Jun-93 17:33 PAGE 201 (CMUSUB2) F 13 Utility subroutines 1049 1050 ********************************************************************************** 1051 * * 1052 * This routine is used to clean-up after a user program when * 1053 * it finishes. Taking into account the possibility of execute- * 1054 * program may often remain intact after termination, (for * 1055 * debugger, only status, as well as the stop bits of the * 1056 * terminating program, luns may be unequipped, abort status set, * 1057 * and/or core zeroed and under-process area destroyed and .CODE * 1058 * lun freed up. Since the dump routine, etc.), the ZAP routine * 1059 * should be used when the under-process area must be cleaned out * 1060 * for sure. * 1061 * * 1062 ********************************************************************************** 1063 1064 BLOCK UNRUN subroutine 1065 ENTRY UNRUN 1066 1067 BEGFRAME 00174801 5 BASE 1068 ERRSUBC BSS 1 error subcode 1069 ENDFRAME 1070 1109F DD5F4002 5 STAK 1071 UNRUN ENTRNP PUSH 1072 110A0 F27910A8 1 1073 JBF R1/ABBIT UR30 jump if not to abort 110A1 EDCB8810 6 CBM 1074 STW ST/ABRT abort 'em 110A2 EC0A7C10 1 CBM 1075 STZ R1/MOBIT since abort and more processing 110A2 EC0A7C10 1 CBM 1076 are incompatible, it they are 110A2 EC0A7C10 1 CBM 1077 both on, it was probably an 110A2 EC0A7C10 1 CBM 1078 old program requesting units reset 110A3 F79310A8 6 1079 JBT ST/SKLX UR30 if expert skip the lesson 110A4 60C5291F 3 IMM 1080 LD R3 ADR(ERM632) inform them of an aborted process 110A5 E4574801 1 5 BASE 1081 ST R1 SP,ERRSUBC save away the subcode 110A6 DC410ACF 1082 CALLNP OUT on our standard output device 110A7 60574801 1 5 BASE 1083 LD R1 SP,ERRSUBC restore the error subcode 1084 * \ / 000110A8 1085 UR30 LABEL 110A8 F27F10AC 1 1086 JBF R1/ZCBIT UR40 jump if not to destroy 110A9 EC0A7C10 1 CBM 1087 STZ R1/MOBIT 110AA DC411163 1088 CALLNP ZAP (ZAP. well, excuse me!!!) 110AB D140001D 1089 STMW UPNUM all future references to immediate underprocess 1090 * \ / 000110AC 1091 UR40 LABEL 110AC F27D10D2 1 1092 JBF R1/MOBIT UR90 jump if not request for 'more' processing 110AD F27B10D2 1 1093 JBF R1/PCBIT UR90 if pc not incremented, this must be an old 110AD F27B10D2 1 1094 program which was requesting unit reset 110AD F27B10D2 1 1095 (we have to check for this because if we 110AD F27B10D2 1 1096 continue the underprog it will come right back) 110AE F3851740 6 1097 JBF ST/TIN GO no 'more' processing if not terminal input 110AF 60040010 0 IMM 1098 LD R0 FRSTATUS 110B0 08840002 IMM 1099 FREQ LUNSOUT get status of unit 2 110B1 FA091740 0 1100 JLTZ R0 GO continue program if no unit 2 110B2 600A7460 0 1 CBM 1101 LD R0 R1/HWFIELD get device type of unit 2 110B3 64040007 0 IMM 1102 CPR R0 HTTERM is it a terminal? 110B4 FE0D1740 1103 JNE GO no, no 'more' processing 1104 1 Assembler C9208 Control Mode C9304 14-Jun-93 17:33 PAGE 202 (CMUSUB2) F 13 Utility subroutines 110B5 60040040 0 IMM 1105 LD R0 FRWRITE write out "--More--" 110B6 60440008 1 IMM 1106 LD R1 MOREMESSLEN 110B7 3881202A 2 1107 LEA R2 MOREMESS 110B8 088400CA IMM 1108 FREQ LUNAOUT 110B9 38001450 0 1109 LEA R0 INBUFFX use auxiliary input buffer 110BA DC410613 1110 CALLNP ZAPIBUFF 110BB DC4104AD 1111 CALLNP READER 110BC FA091740 0 1112 JLTZ R0 GO continue if error from input unit 1113 * \ / 1114 ********************************************************************************** 1115 * * 1116 * There are now three possibilities -- * 1117 * 1) He entered a blank line. We want to just continue * 1118 * the program. * 1119 * 2) He entered an End of File (^W). We want to terminate the * 1120 * program and return. This is used to continue processing * 1121 * pending Control Mode commands. * 1122 * 3) He entered a new command line. We want to terminate the * 1123 * program and copy the temporary input buffer we used into * 1124 * the standard one, getting the new command line executed. * 1125 * Any unexecuted commands from the last command line are * 1126 * lost. We have to kludge a bit and reset the current position * 1127 * pointer in the input buffer because the first sub-line has * 1128 * already been moved into BUFFER. * 1129 * * 1130 ********************************************************************************** 1131 * \ / 110BD 600A2040 0 0 CBM 1132 LD R0 R0/RECTYPE get record type read 110BE 64040008 0 IMM 1133 CPR R0 RTEOF did the user enter an EOF? 110BF FE0D10C4 1134 JNE NOTEOF 110C0 60040040 0 IMM 1135 LD R0 FRWRITE yes, end the program after 110C1 60440000 1 IMM 1136 LD R1 0 writing out a blank line 110C2 088400CA IMM 1137 FREQ LUNAOUT 110C3 FE0F10CE 1138 JMP ZAPIT 1139 * --- 1140 000110C4 1141 NOTEOF LABEL 110C4 38000095 0 1142 LEA R0 BUFFW 110C5 60160000 0 0 CACH 1143 LD R0 CACH R0,0 get first character of input 110C6 6404000D 0 IMM 1144 CPR R0 CR was a blank line entered? 110C7 FE031740 1145 JEQ GO yes, continue the program 1146 * \ / 110C8 38000053 0 1147 LEA R0 INBUFF no, he typed in a line. 110C9 38801450 2 1148 LEA R2 INBUFFX 110CA 38568008 1 2 CACH 1149 LEA R1 R2,IBCHARS 110CB E4568800 1 2 BASE 1150 ST R1 R2,IBPTR 110CC 60440108 1 IMM 1151 LD R1 IBLEN*CPW 110CD DA088800 0 21 1152 MOVE R0 R2 R1 1153 * \ / 000110CE 1154 ZAPIT LABEL 110CE 38001450 0 1155 LEA R0 INBUFFX auxiliary buffer 110CF DC410613 1156 CALLNP ZAPIBUFF flush that buffer 110D0 DC411163 1157 CALLNP ZAP 110D1 D140001D 1158 STMW UPNUM 1159 * \ / 000110D2 1160 UR90 LABEL 1 Assembler C9208 Control Mode C9304 14-Jun-93 17:33 PAGE 203 (CMUSUB2) F 13 Utility subroutines 110D2 5D1F4002 5 STAK 1161 LEAVE POP and see ya 1162 * --- 1163 1164 END UNRUN subroutine 1 Assembler C9208 Control Mode C9304 14-Jun-93 17:33 PAGE 204 (CMUSUB2) F 13 Utility subroutines 1166 1167 ********************************************************************************** 1168 * * 1169 * This is another version of the PACK6 number unpacker. It * 1170 * works the same as UP6 except it always unpacks all 6 characters * 1171 * and it places them in the input buffer. It is used for * 1172 * unpacking variable names received from under-processes. * 1173 * * 1174 ********************************************************************************** 1175 1176 BLOCK UP6F subroutine 1177 ENTRY UP6F 1178 1179 BEGFRAME 1180 ENDFRAME 1181 110D3 DD5F4001 5 STAK 1182 UP6F ENTRNP PUSH 110D4 61040005 4 IMM 1183 LD R4 5 number of characters 110D5 60520000 1 0 REG 1184 LD R1 R0 pre-function the divide 1185 * \ / 000110D6 1186 UP6F10 LABEL 110D6 60040000 0 IMM 1187 LD R0 0 all this for division? 110D7 58C40010 IMM 1188 IORPSR MODIFBIT say we want special handling 110D8 14290C03 0 4 1189 DIV R0 UN40TAB(R4) get one character 110D9 58840010 IMM 1190 CLBPSR MODIFBIT undo funny magic 110DA 603100BC 0 0 @ 1191 LD R0 @P6CHARS(R0) get the character 110DB E4350008 0 2 @ 1192 ST R0 @IBPT(R2) add to the output line 110DC 18840001 2 IMM 1193 ADD R2 1 advance buffer pointer 110DD FB2710D6 4 1194 JDR R4 UP6F10 recycle 110DE 5D1F4001 5 STAK 1195 LEAVE POP and head home 1196 * --- 1197 1198 END UP6F subroutine 1 Assembler C9208 Control Mode C9304 14-Jun-93 17:33 PAGE 205 (CMUSUB2) F 13 Utility subroutines 1200 1201 ********************************************************************************** 1202 * * 1203 * USERUNITS. This subroutine is called to create the standard * 1204 * input, standard output, and standard error output units * 1205 * equivalencing to the existing absolute units 201 and 202 * 1206 * respectively. * 1207 * * 1208 ********************************************************************************** 1209 1210 BLOCK USERUNIT subroutine 1211 ENTRY USERUNITS 1212 1213 BEGFRAME 1214 ENDFRAME 1215 110DF DD5F4001 5 STAK 1216 USERUNITS ENTRNP PUSH 110E0 60040060 0 IMM 1217 LD R0 FRUNEQUIP unequip request 110E1 08840001 IMM 1218 FREQ UINLUN+XREQ close the users input unit 1219 * \ / 110E2 60040060 0 IMM 1220 LD R0 FRUNEQUIP unequip request 110E3 08840002 IMM 1221 FREQ UOUTLUN+XREQ close the users output unit 1222 * \ / 110E4 60040060 0 IMM 1223 LD R0 FRUNEQUIP another unequip request 110E5 08840003 IMM 1224 FREQ UERRLUN+XREQ close the users error unit 1225 * \ / 110E6 DC410DA2 1226 CALLNP EQBZAP clear out the equip buffer 110E7 60040051 0 IMM 1227 LD R0 FREQUIPR equip with read-only access 110E8 604400C9 1 IMM 1228 LD R1 LUNAIN make same as 201 110E9 E4400049 1 1229 ST R1 EQBFN(1) this will do an equivalence 110EA 6044003E 1 IMM 1230 LD R1 ADR EQBUF address of the equip buffer 110EB 08840001 IMM 1231 FREQ UINLUN+XREQ reopen the users output unit 1232 * \ / 110EC 60040050 0 IMM 1233 LD R0 FREQUIPW equip with write access 110ED 604400CA 1 IMM 1234 LD R1 LUNAOUT make same as 202 110EE E4400049 1 1235 ST R1 EQBFN(1) this will do an equivalence 110EF 6044003E 1 IMM 1236 LD R1 ADR EQBUF address of the equip buffer 110F0 08840002 IMM 1237 FREQ UOUTLUN+XREQ reopen the users output unit 1238 * \ / 110F1 60040050 0 IMM 1239 LD R0 FREQUIPW equip with write access again 110F2 6044003E 1 IMM 1240 LD R1 ADR EQBUF address of the equip buffer 110F3 08840003 IMM 1241 FREQ UERRLUN+XREQ open the users error unit 110F4 5D1F4001 5 STAK 1242 LEAVE POP return to caller 1243 * --- 1244 1245 END USERUNITS subroutine 1 Assembler C9208 Control Mode C9304 14-Jun-93 17:33 PAGE 206 (CMUSUB2) F 13 Utility subroutines 1247 1248 ********************************************************************************** 1249 * * 1250 * This is the VARCHK routine, which is called to see if a * 1251 * variable exists with the given name. It is called with the name * 1252 * in VNAME. Call: * 1253 * * 1254 * VNAME * 1255 * CALLNP VARCHK * 1256 * ST VAR * 1257 * * 1258 * Register Usage R0:R1, VAR. * 1259 * * 1260 ********************************************************************************** 1261 1262 BLOCK 1263 ENTRY VARCHK 1264 1265 BEGFRAME 1266 ENDFRAME 1267 110F5 DD5F4001 5 STAK 1268 VARCHK ENTRNP PUSH 110F6 60C01682 3 1269 LD VAR VARPT get pointer to variable list 110F7 62000014 01 1270 LD2 R0 VNAME get symbol user wants 110F8 3E16C801 013 BASE 1271 LSRCH2 R0 VAR,VARNAME take a look, captain 1272 * CALLNP VARCHECK for debugging puposes only! 110F9 5D1F4001 5 STAK 1273 LEAVE POP bye-bye baby 1274 * --- 1275 1276 END 1 Assembler C9208 Control Mode C9304 14-Jun-93 17:33 PAGE 207 (CMUSUB2) F 13 Utility subroutines 1278 1279 ********************************************************************************** 1280 * * 1281 * This is the VARCHECK routine. Its job is to attempt to ensure * 1282 * that the variable list in a consistent state. Call: * 1283 * * 1284 * CALLNP VARCHECK * 1285 * * 1286 * Register Usage: None. * 1287 * * 1288 ********************************************************************************** 1289 1290 BLOCK 1291 ENTRY VARCHECK 1292 1293 BEGFRAME 00174801 5 BASE 1294 SAVEREGS BSS 2 save registers R0, R1 1295 ENDFRAME 1296 110FA DD5F4003 5 STAK 1297 VARCHECK ENTRNP PUSH 110FB E6174801 015 BASE 1298 ST2 R0 SP,SAVEREGS saver register values 110FC 60001682 0 1299 LD R0 VARPT get pointer to variable list 110FD FA311106 0 1300 JZA R0 VARTMPLIST try the temporary list 1301 * \ / 000110FE 1302 VARPTLOOP LABEL 110FE 604802E0 1 0 ZBM 1303 LD R1 R0,VARSIZE size of this element 110FF 64440110 1 IMM 1304 CPR R1 VARLENSTC+VARLEN+1 maximum size 11100 FE051112 1305 JGT HALT jump if too large 1306 * \ / 11101 64041684 0 IMM 1307 CPR R0 ADR FREESTART low heap address 11102 FE091112 1308 JLT HALT below this is an error 11103 64050000 0 IMM 1309 CPR R0 FREETOP high heap address 11104 FE071112 1310 JGE HALT above this is an error 11105 FA3710FE 0 1311 LJNA R0 VARPTLOOP back round for more 1312 * \ / 00011106 1313 VARTMPLIST LABEL 11106 60001683 0 1314 LD R0 VARTMP get pointer to temporary list 11107 FA311110 0 1315 JZA R0 VAREXIT jump if no list 1316 * \ / 00011108 1317 VARTMPLOOP LABEL 11108 604802E0 1 0 ZBM 1318 LD R1 R0,VARSIZE size of this element 11109 64440110 1 IMM 1319 CPR R1 VARLENSTC+VARLEN+1 maximum size 1110A FE051112 1320 JGT HALT jump if too large 1321 * \ / 1110B 64041684 0 IMM 1322 CPR R0 ADR FREESTART low heap address 1110C FE091112 1323 JLT HALT below this is an error 1110D 64050000 0 IMM 1324 CPR R0 FREETOP high heap address 1110E FE071112 1325 JGE HALT above this is an error 1110F FA371108 0 1326 LJNA R0 VARTMPLOOP back round for more 1327 * \ / 00011110 1328 VAREXIT LABEL 11110 62174801 015 BASE 1329 LD2 R0 SP,SAVEREGS restore register values 11111 5D1F4003 5 STAK 1330 LEAVE POP bye-bye baby 1331 * --- 1332 00011112 1333 HALT LABEL 1 Assembler C9208 Control Mode C9304 14-Jun-93 17:33 PAGE 208 (CMUSUB2) F 13 Utility subroutines 11112 00000000 1334 HALT 0 halt this program 1335 * --- 1336 1337 END 1 Assembler C9208 Control Mode C9304 14-Jun-93 17:33 PAGE 209 (CMUSUB2) F 13 Utility subroutines 1339 1340 ********************************************************************************** 1341 * * 1342 * This is the VARCLEAR routine, which is called to remove a * 1343 * variable from existence. Only non-temporary variables are * 1344 * erased (VNAME not equal to zero). These variables reside on the * 1345 * VARPT linked list. Call: * 1346 * * 1347 * VNAME * 1348 * CALLNP VARCLEAR * 1349 * * 1350 * Register Usage R0:R2. * 1351 * * 1352 ********************************************************************************** 1353 1354 BLOCK 1355 ENTRY VARCLEAR 1356 1357 BEGFRAME 00174801 5 BASE 1358 SAVEREGS BSS 2 save register values here 1359 ENDFRAME 1360 11113 DD5F4003 5 STAK 1361 VARCLEAR ENTRNP PUSH 11114 E6D74801 345 BASE 1362 ST2 R3 SP,SAVEREGS save R3 and R4 11115 60C01682 3 1363 LD VAR VARPT variable list 11116 39001682 4 1364 LEA R4 VARPT pointer to list head 11117 62000014 01 1365 LD2 R0 VNAME the variable name 11118 4A16C801 013 BASE 1366 RLSCH2 R0 VAR,VARNAME give a look 11119 FE0D111F 1367 JNE NOVAR jump if one not found 1368 * \ / 1111A 6008DF10 0 3 ZBM 1369 LD R0 VAR,VARLINK get remainder of list 1111B E4091F10 0 4 ZBM 1370 ST R0 R4,VARLINK removes us from the list 1111C DC01118F 1371 CALL FREEMEM free up the memory 1111D 4152C000 3 REG 1372 PARV VAR pointer to the variable 1111E 4048C2E0 3 ZBM 1373 PARVL VAR,VARSIZE size of the variable 1374 * \ / 0001111F 1375 NOVAR LABEL 1376 * CALLNP VARCHECK for debugging purposes only! 1377 * CALLNP MEMCHECK for debugging purposes only! 1111F 62D74801 345 BASE 1378 LD2 R3 SP,SAVEREGS restore register values 11120 5D1F4003 5 STAK 1379 LEAVE POP bye-bye baby 1380 * --- 1381 1382 END 1 Assembler C9208 Control Mode C9304 14-Jun-93 17:33 PAGE 210 (CMUSUB2) F 13 Utility subroutines 1384 ********************************************************************************** 1385 * * 1386 * This is the VARCLRTMP routine, which is called to remove * 1387 * ALL temporaries variable from existence (names with all zeros). * 1388 * These variables reside on the VARTMP linked list. This routine * 1389 * preserves registers R0:R2 because the EEPROC routine passes * 1390 * values back in those registers. Call: * 1391 * * 1392 * CALLNP VARCLRTMP * 1393 * * 1394 * Register Usage R3:R4. * 1395 * * 1396 ********************************************************************************** 1397 1398 BLOCK 1399 ENTRY VARCLRTMP 1400 1401 BEGFRAME 00174801 5 BASE 1402 SAVEREGS BSS 3 save register values here 1403 ENDFRAME 1404 11121 DD5F4004 5 STAK 1405 VARCLRTMP ENTRNP PUSH 11122 E6174801 015 BASE 1406 ST2 R0 SP,SAVEREGS(0) save R0 and R1 11123 E4974803 2 5 BASE 1407 ST R2 SP,SAVEREGS(2) save R2 only 11124 61001683 4 1408 LD R4 VARTMP first element 1409 * \ / 00011125 1410 VARCLRNXT LABEL 11125 FB31112C 4 1411 JZA R4 VARCLRXIT return if none 11126 60D30000 3 4 REG 1412 LD VAR R4 copy pointer 11127 61091F10 4 4 ZBM 1413 LD R4 R4,VARLINK next element 11128 DC01118F 1414 CALL FREEMEM free memory chunk 11129 4152C000 3 REG 1415 PARV VAR address 1112A 4048C2E0 3 ZBM 1416 PARVL VAR,VARSIZE size of the variable 1417 * \ / 1418 * CALLNP VARCHECK for debugging purposes only! 1419 * CALLNP MEMCHECK for debugging purposes only! 1112B FE0F1125 1420 JMP VARCLRNXT back for more 1421 * --- 1422 0001112C 1423 VARCLRXIT LABEL 1112C EC001683 1424 STZ VARTMP no more temporary variables 1112D 60974803 2 5 BASE 1425 LD R2 SP,SAVEREGS(2) restore register R2 1112E 62174801 015 BASE 1426 LD2 R0 SP,SAVEREGS(0) restore registers R0:R1 1112F 5D1F4004 5 STAK 1427 LEAVE POP bye-bye baby 1428 * --- 1429 1430 END 1 Assembler C9208 Control Mode C9304 14-Jun-93 17:33 PAGE 211 (CMUSUB2) F 13 Utility subroutines 1432 1433 ********************************************************************************** 1434 * * 1435 * This is the VARMAKE routine. It is used to create a new * 1436 * user variable element. It checks to be sure there is enough * 1437 * free storage, and then makes a new element of the correct type * 1438 * depending on whether a string or numeric variable is being * 1439 * produced. If the variable is a temporary (VNAME equal to zero) * 1440 * then the variable is linked onto the VARTMP list. If the * 1441 * variable is not temporary, then any previous element with the * 1442 * same name is removed and the new element linked in. Call: * 1443 * * 1444 * VTYPE (-1=NUM, else STR pointer) * 1445 * VNAME (PAK12) * 1446 * SETVALUE * 1447 * CALLNP VARMAKE * 1448 * ST R0 * 1449 * * 1450 * A second entry point is provided, VARMAKECHK. When this * 1451 * entry point is used an additional check is made to see the the * 1452 * variable name starts with an alpha character. This is required * 1453 * of user created variables. * 1454 * * 1455 * Register Usage R0:R3. * 1456 * * 1457 ********************************************************************************** 1458 1459 BLOCK 1460 ENTRY VARMAKE 1461 ENTRY VARMAKECHK 1462 1463 BEGFRAME 00174801 5 BASE 1464 SAVEREG BSS 1 save register value 1465 ENDFRAME 1466 11130 DD5F4002 5 STAK 1467 VARMAKECHK ENTRNP PUSH 11131 62000014 01 1468 LD2 R0 VNAME pick up the name 11132 6801003E 0 1469 UCPR R0 VARLOW compare to lowest legal name 11133 FE09115D 1470 JLT VMNAMBAD jump because it doesn't start alpha 11134 6801003F 0 1471 UCPR R0 VARHIGH compare to highest legal name 11135 FE05115D 1472 JGT VMNAMBAD jump because it doesn't start alpha 11136 68410042 1 1473 UCPR R1 VARMAX compare to largest PAK6 number 11137 FE05115D 1474 JGT VMNAMBAD jump because it's not in PAK12 11138 FE0F113A 1475 JMP VM10 jump to main routine 1476 * --- 1477 11139 DD5F4002 5 STAK 1478 VARMAKE ENTRNP PUSH 0001113A 1479 VM10 LABEL 1113A E5174801 4 5 BASE 1480 ST R4 SP,SAVEREG save register R4 1113B 61040000 4 IMM 1481 LD R4 0 assume we have a number 1113C 60000016 0 1482 LD R0 VTYPE get the type wanted 1113D FA2D1141 0 1483 JEQMW R0 VMISNUM jump if number 1113E 61000017 4 1484 LD R4 SETVALUE get the string length 1113F 650400FF 4 IMM 1485 CPR R4 VARLENSTC compare against maximum length 11140 FE05115F 1486 JGT VMSTR2BIG jump if too large 1487 * \ / 1 Assembler C9208 Control Mode C9304 14-Jun-93 17:33 PAGE 212 (CMUSUB2) F 13 Utility subroutines 00011141 1488 VMISNUM LABEL 11141 19040011 4 IMM 1489 ADD R4 VARLEN+1 header length plus extra 11142 DC01116E 1490 CALL GETMEM get some memory 11143 40530000 4 REG 1491 PARVL R4 length requested 11144 FAF11161 3 1492 JZA VAR VMNOMEM jump if no memory 1493 * CALLNP MEMCHECK for debugging purposes only! 1494 * \ / 11145 E508C2E0 4 3 ZBM 1495 ST R4 VAR,VARSIZE save block size 11146 62000014 01 1496 LD2 R0 VNAME variable name 11147 E616C801 013 BASE 1497 ST2 R0 VAR,VARNAME place in the block 11148 60400017 1 1498 LD R1 SETVALUE value or string length 11149 E456C803 1 3 BASE 1499 ST R1 VAR,VARVALUE plave in the block 1114A EC08C010 3 ZBM 1500 STZ VAR,VARTYPE assume a number 1114B 60000016 0 1501 LD R0 VTYPE get the type 1114C FA2D1152 0 1502 JEQMW R0 ADD2LIST if number, link in element 1114D EDC8C010 3 ZBM 1503 STW VAR,VARTYPE it is a string 1504 * \ / 1114E 3896C804 2 3 BASE 1505 LEA R2 VAR,VARSTR destination address 1114F DA880800 2 01 1506 MOVE R2 R0 R1 copy the string 11150 6004000D 0 IMM 1507 LD R0 CR string terminator 11151 E4168000 0 2 CACH 1508 ST R0 CACH R2,0 so it's clearly marked 1509 * \ / 00011152 1510 ADD2LIST LABEL 11152 39001683 4 1511 LEA R4 VARTMP assume temporary variable 11153 5E000014 1512 CMZ2 VNAME temporary variable 11154 FE031157 1513 JEQ NOERASE don't erase temporaries 11155 DC411113 1514 CALLNP VARCLEAR remove variable 11156 39001682 4 1515 LEA R4 VARPT normal variable 1516 * \ / 00011157 1517 NOERASE LABEL 11157 60170800 0 4 BASE 1518 LD R0 R4,0 head of the list 11158 E408DF10 0 3 ZBM 1519 ST R0 VAR,VARLINK link behind us 11159 E4D70800 3 4 BASE 1520 ST VAR R4,0 head are now the head guy 1521 * CALLNP VARCHECK for debugging purposes only 1115A 60040000 0 IMM 1522 LD R0 0 indicate all is well 1523 * \ / 0001115B 1524 VMEXIT LABEL 1115B 61174801 4 5 BASE 1525 LD R4 SP,SAVEREG restore register R4 1115C 5D1F4002 5 STAK 1526 LEAVE POP return to caller 1527 * --- 1528 0001115D 1529 VMNAMBAD LABEL 1115D 60052935 0 IMM 1530 LD R0 ADR(ERM700) "EXPECTING VARIABLE NAME" 1115E FE0F115B 1531 JMP VMEXIT 1532 * --- 1533 0001115F 1534 VMSTR2BIG LABEL 1115F 6005295A 0 IMM 1535 LD R0 ADR(ERM707) "VARIABLE TOO LONG" 11160 FE0F115B 1536 JMP VMEXIT 1537 * --- 1538 00011161 1539 VMNOMEM LABEL 11161 60052946 0 IMM 1540 LD R0 ADR(ERM704) "TOO MANY VARIABLES" 11162 FE0F115B 1541 JMP VMEXIT 1542 * --- 1543 1 Assembler C9208 Control Mode C9304 14-Jun-93 17:33 PAGE 213 (CMUSUB2) F 13 Utility subroutines 1544 END 1 Assembler C9208 Control Mode C9304 14-Jun-93 17:33 PAGE 214 (CMUSUB2) F 13 Utility subroutines 1546 1547 ********************************************************************************** 1548 * * 1549 * This is the ZAP routine. It is used to wipe out one * 1550 * under-process. It zaps the next lowest process. That may be an * 1551 * inserted process or a normal running program. If there is * 1552 * nothing to zap, it just exits. * 1553 * Zapping consists of destroying the under-area and freeing * 1554 * up the lun associated with it. * 1555 * * 1556 ********************************************************************************** 1557 1558 BLOCK ZAP subroutine 1559 ENTRY ZAP 1560 1561 BEGFRAME 1562 ENDFRAME 1563 11163 DD5F4001 5 STAK 1564 ZAP ENTRNP PUSH 11164 60040120 0 IMM 1565 LD R0 URGRUNLUN request to get the run unit 11165 0900001D 1566 UREQ UPNUM(XREQ) for this process 11166 FA09116D 0 1567 JLTZ R0 ZAPEXIT leave if we couldn't get it 11167 E4000009 0 1568 ST R0 LUN set up for lun freer 1569 * \ / 11168 600400D5 0 IMM 1570 LD R0 URPDSTRYP destroy a single underprocess 11169 0900001D 1571 UREQ UPNUM(XREQ) zap goes the process area 1116A 60040060 0 IMM 1572 LD R0 FRUNEQUIP close request 1116B 08800009 1573 FREQ LUN(XREQ) close run unit 1116C EC120000 0 REG 1574 STZ R0 indicate that we got one 1575 * \ / 0001116D 1576 ZAPEXIT LABEL 1116D 5D1F4001 5 STAK 1577 LEAVE POP 1578 * --- 1579 1580 END ZAP subroutine 118 INPUT CM.UTL:CMMEM 1 Assembler C9208 Control Mode C9304 14-Jun-93 17:33 PAGE 215 (CMMEM) F 14 GETMEM - Memory Allocator 3 4 ********************************************************************************** 5 * * 6 * Template definition for free pieces of memory that can * 7 * not be place onto the HEAP. This elements are linked on the * 8 * FREEHEAD list. * 9 * * 10 ********************************************************************************** 11 0001116E 12 FREEPROT BASE R0 00160800 0 BASE 13 FREELINK BSS 1 holds link element 00160801 0 BASE 14 FREESIZE BSS 1 size in words 15 DRCT 16 ORG FREEPROT 17 18 ********************************************************************************** 19 * * 20 * This routine returns a block of free storage to the * 21 * caller given the block size required. If no more memory * 22 * exists the a NULL pointer is returned in the register VAR * 23 * (R3). * 24 * The job of the memory manager is to hand out free * 25 * storage as per request of a user. The allocation policy * 26 * used is first fit. This was chosen because it was * 27 * relatively easy to implement and it tends to NOT fragment * 28 * memory. Hopefully in this implementation high memory will * 29 * tend to be in use while lower memory will tend to be free. * 30 * The head of the freelist is a variable called FREEHEAD. * 31 * You will note the extra word after the definition * 32 * initialized to zero, this is necessary for the algorithm * 33 * to work properly. The list is organized in descending * 34 * order based on address NOT on size (that would be a best * 35 * fit policy). When a user requests free storage we attempt * 36 * to satisfy the request from the list of free storage. If * 37 * there is no block large enough then we must allocate * 38 * storage from the heap. The heap grows from high memory to * 39 * low memory. Call: * 40 * * 41 * CALL GETMEM * 42 * PARVL * 43 * ST VAR * 44 * * 45 * Registers Used: R0:R3 * 46 * * 47 ********************************************************************************** 48 49 BLOCK 50 ENTRY GETMEM 51 52 BEGFRAME 00174801 5 BASE 53 SAVEREG BSS 1 save register R4 54 ENDFRAME 55 1116E DD1F4002 5 STAK 56 GETMEM ENTR PUSH 1116F C0524000 1 REG 57 STPVL R1 size requested 58 * \ / 1 Assembler C9208 Control Mode C9304 14-Jun-93 17:33 PAGE 216 (CMMEM) F 14 GETMEM - Memory Allocator 11170 E5174801 4 5 BASE 59 ST R4 SP,SAVEREG save a register 11171 18440003 1 IMM 60 ADD R1 3 round up size 11172 604A41E0 1 1 CBM 61 LD R1 R1/BITS 0:29 convert to words 62 * \ / 11173 60C01680 3 63 LD R3 FREEHEAD load first element on list 11174 FAF1117C 3 64 JZA R3 GETOFFHEAP jump if nothing there 11175 39001680 4 65 LEA R4 FREEHEAD pointer to the list head 66 * \ / 00011176 67 LISTNOTMT LABEL 11176 6456C801 1 3 BASE 68 CPR R1 R3,FREESIZE compare the sizes 11177 FE031183 69 JEQ EXACTFIT jump if exact fit 70 * \ / 11178 6016C801 0 3 BASE 71 LD R0 R3,FREESIZE get the size again 11179 10165002 0 1 REG 72 SUB R0 R1+2 enough with some left over 1117A FA071186 0 73 JGEZ R0 USETHISBLK jump if block usable 1117B FAFB1176 34 74 RLJNA R3 LISTNOTMT try the next block 75 * \ / 0001117C 76 GETOFFHEAP LABEL 1117C 60C0167F 3 77 LD R3 FREEPT new block address 1117D 1852C000 1 3 REG 78 ADD R1 R3 new free memory pointer 1117E 64450000 1 IMM 79 CPR R1 FREETOP exceeded memory limit? 1117F FE05118D 80 JGT NOMOREMEM jump if out of memory 11180 E440167F 1 81 ST R1 FREEPT save new memory pointer 82 * \ / 00011181 83 GETMEMXIT LABEL 11181 61174801 4 5 BASE 84 LD R4 SP,SAVEREG restore register value 11182 5D1F4002 5 STAK 85 LEAVE POP return to caller 86 * --- 87 00011183 88 EXACTFIT LABEL 11183 6016C800 0 3 BASE 89 LD R0 R3,FREELINK pointer to next element 11184 E4170800 0 4 BASE 90 ST R0 R4,FREELINK remove us from the list 11185 FE0F1181 91 JMP GETMEMXIT jump to exit 92 * --- 93 00011186 94 USETHISBLK LABEL 11186 381CC800 0 31 BASE 95 LEA R0 R3,0(R1) new link address 11187 3056C801 1 3 BASE 96 RSB R1 R3,FREESIZE remaining block size 11188 E4560801 1 0 BASE 97 ST R1 R0,FREESIZE set adjusted size 11189 6056C800 1 3 BASE 98 LD R1 R3,FREELINK remainder of the list 1118A E4560800 1 0 BASE 99 ST R1 R0,FREELINK list behind new element 1118B E4170800 0 4 BASE 100 ST R0 R4,FREELINK set new link 1118C FE0F1181 101 JMP GETMEMXIT jump to exit 102 * --- 103 0001118D 104 NOMOREMEM LABEL 1118D 60C40000 3 IMM 105 LD R3 0 indicates no more memory 1118E FE0F1181 106 JMP GETMEMXIT jump to exit 107 * --- 108 109 END 1 Assembler C9208 Control Mode C9304 14-Jun-93 17:33 PAGE 217 (CMMEM) F 14 FREEMEM - Memory Deallocator 112 113 ********************************************************************************** 114 * * 115 * This routine returns a block of back to the free * 116 * storage list. There is no checking to make sure that the * 117 * block is indeed unused. The code is pretty straight * 118 * forward but please note that if the freed block butts * 119 * against the heap pointer, the heap pointer is incremented * 120 * rather than placing the block on the free list. This * 121 * gives both the stack and free memory the greatest * 122 * flexibility in growth. Call: * 123 * * 124 * CALL FREEMEM * 125 * PARV
* 126 * PARVL * 127 * * 128 * Registers Used: R0:R3 * 129 * * 130 ********************************************************************************** 131 132 BLOCK 133 ENTRY FREEMEM 134 135 BEGFRAME 00174801 5 BASE 136 SAVEREG BSS 1 save register R4 137 ENDFRAME 138 1118F DD1F4002 5 STAK 139 FREEMEM ENTR PUSH 11190 C1528000 2 REG 140 STPV R2 block address 11191 C0524000 1 REG 141 STPVL R1 length in bytes 142 * \ / 11192 7885FFFF 2 IMM 143 AND R2 ONEBITS/ADRBITS mask off upper 15 bits 11193 18440003 1 IMM 144 ADD R1 3 round up size 11194 604A41E0 1 1 CBM 145 LD R1 R1/BITS 0:29 convert to words 11195 E4568801 1 2 BASE 146 ST R1 R2,FREESIZE set size in the block 147 * \ / 11196 E5174801 4 5 BASE 148 ST R4 SP,SAVEREG save register value 11197 60C01680 3 149 LD R3 FREEHEAD first element on the list 11198 39001680 4 150 LEA R4 FREEHEAD address of the list head 11199 4C92C000 2 3 REG 151 RLSHLE R2 R3 find insertion point 1119A 60170800 0 4 BASE 152 LD R0 R4,FREELINK forward link pointer 1119B E4168800 0 2 BASE 153 ST R0 R2,FREELINK pointing to remainder of list 1119C E4970800 2 4 BASE 154 ST R2 R4,FREELINK now linked in 155 * \ / 1119D FAF111A5 3 156 JZA R3 NONEAFTER jump if no list behind us 1119E 381C8800 0 21 BASE 157 LEA R0 R2,0(R1) trailing buddy address 1119F 6412C000 0 3 REG 158 CPR R0 R3 is that who is behind us? 111A0 FE0D11A5 159 JNE NONEAFTER jump if it is not! 160 * \ / 111A1 6016C800 0 3 BASE 161 LD R0 R3,FREELINK remainder of the list 111A2 E4168800 0 2 BASE 162 ST R0 R2,FREELINK link in behind us 111A3 6016C801 0 3 BASE 163 LD R0 R3,FREESIZE size of trailing block 111A4 98168801 0 2 BASE 164 ADDM R0 R2,FREESIZE this combines the two blocks 165 * \ / 000111A5 166 NONEAFTER LABEL 111A5 60170801 0 4 BASE 167 LD R0 R4,FREESIZE size of previous block 1 Assembler C9208 Control Mode C9304 14-Jun-93 17:33 PAGE 218 (CMMEM) F 14 FREEMEM - Memory Deallocator 111A6 381D0000 0 40 BASE 168 LEA R0 R4,0(R0) forward buddy address 111A7 64128000 0 2 REG 169 CPR R0 R2 is it really him? 111A8 FE0D11AE 170 JNE NONEBEFORE jump if it is not! 171 * \ / 111A9 E0930000 2 4 REG 172 EXCH R2 R4 swizzle for heap check 111AA 60170800 0 4 BASE 173 LD R0 R4,FREELINK list behind us 111AB E4168800 0 2 BASE 174 ST R0 R2,FREELINK place into previous element 111AC 60170801 0 4 BASE 175 LD R0 R4,FREESIZE delinked block size 111AD 98168801 0 2 BASE 176 ADDM R0 R2,FREESIZE this combines the two blocks 177 * \ / 000111AE 178 NONEBEFORE LABEL 111AE 60168801 0 2 BASE 179 LD R0 R2,FREESIZE size of the block 111AF 381C8000 0 20 BASE 180 LEA R0 R2,0(R0) address just behind us 111B0 6400167F 0 181 CPR R0 FREEPT up against the heap pointer 111B1 FE0D11B7 182 JNE FREEMEMXIT jump if not! 183 * \ / 111B2 38C01680 3 184 LEA R3 FREEHEAD pointer to free list head 111B3 3C96C800 2 3 BASE 185 LSRCH R2 R3,FREELINK find who points to us 111B4 60168800 0 2 BASE 186 LD R0 R2,FREELINK list behind us 111B5 E416C800 0 3 BASE 187 ST R0 R3,FREELINK removes us from the list 111B6 E480167F 2 188 ST R2 FREEPT update heap pointer 189 * \ / 000111B7 190 FREEMEMXIT LABEL 111B7 61174801 4 5 BASE 191 LD R4 SP,SAVEREG restore register value 111B8 5D1F4002 5 STAK 192 LEAVE POP return to caller 193 * --- 194 195 END 1 Assembler C9208 Control Mode C9304 14-Jun-93 17:33 PAGE 219 (CMMEM) F 14 MEMCHECK - Memory Verifier 198 199 ********************************************************************************** 200 * * 201 * * 202 * This routine attempts to ensure that the free memory * 203 * lists are in good shape. Call: * 204 * * 205 * CALLNP MEMCHECK * 206 * * 207 * Registers Used: None. * 208 * * 209 ********************************************************************************** 210 211 BLOCK 212 ENTRY MEMCHECK 213 214 BEGFRAME 00174801 5 BASE 215 SAVEREGS BSS 2 save registers R0:R1 216 ENDFRAME 217 111B9 DD5F4003 5 STAK 218 MEMCHECK ENTRNP PUSH 111BA E6174801 015 BASE 219 ST2 R0 SP,SAVEREGS save register values 111BB 60001680 0 220 LD R0 FREEHEAD first element 111BC FA3111C9 0 221 JZA R0 FREEXIT return if none 222 * \ / 000111BD 223 FREELOOP LABEL 111BD 64041684 0 IMM 224 CPR R0 ADR FREESTART low heap address 111BE FE0911CB 225 JLT HALT below this is an error 111BF 64050000 0 IMM 226 CPR R0 FREETOP high heap address 111C0 FE0711CB 227 JGE HALT above this is an error 228 * \ / 111C1 5C160800 0 BASE 229 CMZ R0,FREELINK anyone behind us 111C2 FE0311C8 230 JEQ FREENEXT jump if no! 111C3 60560801 1 0 BASE 231 LD R1 R0,FREESIZE size in words 111C4 18520000 1 0 REG 232 ADD R1 R0 minimum address behind us 111C5 64560800 1 0 BASE 233 CPR R1 R0,FREELINK do we overlap 111C6 FE0B11C8 234 JLE FREENEXT jump if ok 111C7 00000000 235 HALT 0 addresses overlap 236 * \ / 000111C8 237 FREENEXT LABEL 111C8 FA3711BD 0 238 LJNA R0 FREELOOP on to the next element 239 * \ / 000111C9 240 FREEXIT LABEL 111C9 62174801 015 BASE 241 LD2 R0 SP,SAVEREGS restore register values 111CA 5D1F4003 5 STAK 242 LEAVE POP return to caller 243 * --- 244 000111CB 245 HALT LABEL 111CB 00000000 246 HALT 0 just halt this program 247 * --- 248 249 END 119 INPUT CM.UTL:CMMAIN 1 Assembler C9208 Control Mode C9304 14-Jun-93 17:33 PAGE 220 (CMMAIN) F 15 Main control logic 3 4 ********************************************************************************** 5 * * 6 * The following sections are for processing entries to * 7 * Control Mode from user programs. After control is given to * 8 * a user program, it eventually transfers control back to * 9 * Control Mode. The entry code from the system determines what * 10 * action should be taken. Some entries allow restarting of * 11 * the under-process, while others cause the under-process to * 12 * be destroyed. * 13 * * 14 * The entry code returned by the system is in R0/BITS 25:31 * 15 * R1 contains the entry sub-type, and R2 has the entry type * 16 * category. Each small section below is for one category of * 17 * entry from the system. * 18 * * 19 ********************************************************************************** 20 21 ********************************************************************************** 22 * * 23 * Illegal entry code. Error message print and stop * 24 * entry. * 25 * * 26 ********************************************************************************** 27 000111CC 28 ENTILL LABEL (illegal entry code) 000111CC 29 ENTMSG LABEL (error message print and stop) 111CC F3AD155C 6 30 JBF ST/LGN2 PASS2ERR logoff if running 2nd password 111CD EDCA0010 0 CBM 31 STW R0/ERROR say this is an error code 111CE DC410A34 32 CALLNP ERPRT tell them the news 33 * \ / 000111CF 34 ENTSHARE LABEL 111CF 60440007 1 IMM 35 LD R1 CMSPSE say our program screwed up 111D0 E44BB040 1 6 CBM 36 ST R1 ST/CMSTATE set CM state info 111D1 F7831535 6 37 JBT ST/TRM MCENT if terminal user, go input 111D2 60800000 2 38 LD R2 INITSUBTYP get entry sub-type 111D3 608A89C0 2 2 CBM 39 LD R2 R2/INITTYPE mask out entry type code 111D4 64840004 2 IMM 40 CPR R2 CONJOB is this a concurrent process 111D5 FE031535 41 JEQ MCENT if concurrent process, don't print 111D6 DC410B51 42 CALLNP STATELIST if not, print program state 111D7 FE0F1535 43 JMP MCENT and go get some input 44 * --- 45 46 ********************************************************************************** 47 * * 48 * Pseudo break request. Break processing due to operator * 49 * request. * 50 * * 51 ********************************************************************************** 52 000111D8 53 ENTBRK LABEL (operator generated break request) 111D8 EDCB8610 6 CBM 54 STW ST/NDO clear DO unit input 111D9 FE0F14E9 55 JMP MC and go see what user wants to do 56 * --- 57 58 ********************************************************************************** 1 Assembler C9208 Control Mode C9304 14-Jun-93 17:33 PAGE 221 (CMMAIN) F 15 Main control logic 59 * * 60 * Break request. Out of control mode. * 61 * * 62 ********************************************************************************** 63 000111DA 64 ENTBRKC LABEL (break request while in CM) 111DA F78714E9 6 65 JBT ST/NDO MC jump if no DO in progress 111DB 60440009 1 IMM 66 LD R1 CMSIDC say a DO has been interrupted 111DC FE0F11E3 67 JMP ENTBRKSHR share exit code 68 * --- 69 70 ********************************************************************************** 71 * * 72 * * 73 * Break request. Out of a user program. * 74 * * 75 ********************************************************************************** 76 000111DD 77 ENTBRKU LABEL (break request while in user program) 111DD F3AD155C 6 78 JBF ST/LGN2 PASS2ERR logoff if 2nd password running 111DE F78714E9 6 79 JBT ST/NDO MC jump if no DO in progress 111DF F7911740 6 80 JBT ST/BREAK GO continue the program 111E0 6100015F 4 81 LD DO DOPTR fetch do pointer 111E1 EDC90E10 4 ZBM 82 STW DO,DOINT set interrupted DO flag 111E2 60440008 1 IMM 83 LD R1 CMSIDU say a DO has been interrupted 84 * \ / 000111E3 85 ENTBRKSHR LABEL 111E3 E44BB040 1 6 CBM 86 ST R1 ST/CMSTATE set CM state info 111E4 DC410D23 87 CALLNP DOBREAK restore user input unit 111E5 FE0F1535 88 JMP MCENT go do input 89 * --- 90 91 ********************************************************************************** 92 * * 93 * Virtual memory failure - insufficient system resources. * 94 * * 95 ********************************************************************************** 96 000111E6 97 ENTVMFISR LABEL (insufficient system resources) 111E6 EDCB8E10 6 CBM 98 STW ST/VMFISR say we're low and treat seriously 111E7 F3AD155C 6 99 JBF ST/LGN2 PASS2ERR logoff if running 2nd password 111E8 EDCA0010 0 CBM 100 STW R0/ERROR say this is an error code 111E9 DC410A34 101 CALLNP ERPRT tell them the news 111EA 60C5292D 3 IMM 102 LD R3 ADR(ERM634) "RESOURCESLOW state entered" 111EB DC410ACF 103 CALLNP OUT tell user 111EC FE0F11CF 104 JMP ENTSHARE join code 105 * --- 106 107 ********************************************************************************** 108 * * 109 * Error code string fetch or CM Variable set/fetch * 110 * * 111 ********************************************************************************** 112 113 * R1 = entry subcode 000111ED 114 ENTVAR LABEL (CM variable set/fetch) 1 Assembler C9208 Control Mode C9304 14-Jun-93 17:33 PAGE 222 (CMMAIN) F 15 Main control logic 111ED EC1F4002 5 STAK 115 STZ STAK SP,2 allocate stack frame 111EE 61D24000 7 1 REG 116 LD R7 ENTSUBT protect entry codes 111EF 600400F2 0 IMM 117 LD R0 URPGETREG+UPR2 get variable name user wants 111F0 0900001D 118 UREQ UPNUM(XREQ) may also be an error code 111F1 F7C31204 7 119 JBT R7/VECBIT ENTVAREC jump if error code (URERRORGET) 120 * messing with session variable 121 * \ / 111F2 E4400014 1 122 ST R1 VNAME(0) save first half of name 111F3 600400F3 0 IMM 123 LD R0 URPGETREG+UPR3 now obtain second half of name 111F4 0900001D 124 UREQ UPNUM(XREQ) 111F5 E4400015 1 125 ST R1 VNAME(1) save second half 111F6 600400F1 0 IMM 126 LD R0 URPGETREG+UPR1 now get address or value 111F7 0900001D 127 UREQ UPNUM(XREQ) 111F8 F7C11229 7 128 JBT R7/VGSBIT ENTVARGET jump if doing a 'get' 111F9 600BC430 0 7 CBM 129 LD R0 R7/VTBITS get the variable type 111FA FA0D120E 0 130 JNEZ R0 ENTVS20 jump if a string set 131 * \ / 132 * making numeric variable (URVARSET) 111FB D1400016 133 STMW VTYPE say this is a number 111FC E4400017 1 134 ST R1 SETVALUE save variable value 135 * \ / 136 * share code to make CM variable 000111FD 137 ENTVS10 LABEL 111FD DC411130 138 CALLNP VARMAKECHK go establish the variable 111FE FA0D1270 0 139 JNEZ R0 ENTVARERR jump if any problems 140 * \ / 000111FF 141 ENTVARRET LABEL 111FF 60440000 1 IMM 142 LD R1 0 'no error' return (number) 143 * \ / 00011200 144 ENTVARRETX LABEL 11200 600400E0 0 IMM 145 LD R0 URPSETREG+UPR0 give user code back in his R0 11201 0900001D 146 UREQ UPNUM(XREQ) there you go, turkey 11202 5C1F4002 5 STAK 147 CMZ STAK SP,2 deallocate stack frame 11203 FE0F1772 148 JMP GOAGAIN and go restart the user 149 * --- 150 00011204 151 ENTVAREC LABEL (error message return for code) 11204 60D24000 3 1 REG 152 LD R3 R1 save the error code from harm 11205 600400F1 0 IMM 153 LD R0 URPGETREG+UPR1 get address to put message into 11206 0900001D 154 UREQ UPNUM(XREQ) 11207 600AF080 0 3 CBM 155 LD R0 R3/ECBITS get the error code 11208 60212270 0 0 156 LD R0 ECTABLE(R0) get pointer to message 11209 6405279A 0 IMM 157 CPR R0 ADR(ERM508) is it the 'catch-all'? 1120A FE031270 158 JEQ ENTVARERR if so, tell user he goofed 1120B E4574801 1 5 BASE 159 ST R1 SP,1 save the 'to' address 1120C 60840000 2 IMM 160 LD R2 NUL error messages end with zero 1120D FE0F1238 161 JMP ENTVG40 and go merge with normal 'get' 162 * --- 163 164 * making a string CM variable (URVARSETS) 0001120E 165 ENTVS20 LABEL 1120E 600BDB30 0 7 CBM 166 LD R0 R7/VLBITS get the variable length 1120F 640400FF 0 IMM 167 CPR R0 OKLEN-1 be sure we are legal 11210 FE051270 168 JGT ENTVARERR give error return 11211 E4000017 0 169 ST R0 SETVALUE save length for MAPIN 11212 61D24000 7 1 REG 170 LD R7 R1 remember the address of string 1 Assembler C9208 Control Mode C9304 14-Jun-93 17:33 PAGE 223 (CMMAIN) F 15 Main control logic 11213 600BDF10 0 7 CBM 171 LD R0 R7/ADRBITS get just the address portion 11214 DC410F8D 172 CALLNP MAPIN get user's page into core 11215 60040080 0 IMM 173 LD R0 URSSINTARM get interrupt arm requst 11216 60420800 1 IMM 174 LD R1 MEMPROTMSK get memory protection bit 11217 09040000 IMM 175 UREQ 0 arm interrupt 176 * \ / 11218 3817C000 0 7 CACH 177 LEA R0 CACH R7,0 point to 'to' address 11219 EC0A1E70 0 CBM 178 STZ R0/PADRBITS clear page address 1121A 18040400 0 IMM 179 ADD R0 ADR(SYSBUF) we're using OUR page now! 1121B 608400D5 2 IMM 180 LD R2 ADR(SBUFF) VARMAKE uses SBUFF, remember?? 1121C E4800016 2 181 ST R2 VTYPE remember the string address 1121D 60400017 1 182 LD R1 SETVALUE get length of string as we know it 1121E DA880800 2 01 183 MOVE R2 R0 R1 put it where you want it 1121F 60040081 0 IMM 184 LD R0 URSCINTARM get interrupt clear request 11220 60420800 1 IMM 185 LD R1 MEMPROTMSK get memory protection bit 11221 09040000 IMM 186 UREQ 0 disarm interrupt 11222 DC410FA1 187 CALLNP MAPOUT now we can free up user's page(s) 188 * \ / 11223 F7A91270 6 189 JBT ST/MEMPROT ENTVARERR give user an error 11224 600400D5 0 IMM 190 LD R0 ADR(SBUFF) now be sure data is good 11225 60400017 1 191 LD R1 SETVALUE get supposed length 11226 DA1C080D 0 1 192 SRCHI R0 R1 CR search for the end 11227 B0400017 1 193 RSBM R1 SETVALUE and put the real length back 11228 FE0F11FD 194 JMP ENTVS10 and go do merging busses game 195 * --- 196 197 * retrieve a CM variable (URVARGET, URVARGETS) 00011229 198 ENTVARGET LABEL 11229 E4574801 1 5 BASE 199 ST R1 SP,1 save 'to' address 1122A DC4110F5 200 CALLNP VARCHK see if variable exists 1122B FAF11255 3 201 JZA VAR ENTVARSPCL variable must be defined, else... 1122C 5C0BC430 7 CBM 202 CMZ R7/VTBITS see what user wants 1122D FE0D1234 203 JNE ENTVG20 jump if will take either 1122E 5C08C010 3 ZBM 204 CMZ VAR,VARTYPE wants numeric - what have we? 1122F FE0D1270 205 JNE ENTVARERR error if have string 206 * \ / 00011230 207 ENTVG10 LABEL 11230 6056C803 1 3 BASE 208 LD R1 VAR,VARVALUE get the actual number 209 * \ / 00011231 210 ENTVG15 LABEL 11231 600400E1 0 IMM 211 LD R0 URPSETREG+UPR1 give it to the user 11232 0900001D 212 UREQ UPNUM(XREQ) there it is!! 11233 FE0F11FF 213 JMP ENTVARRET and that is all 214 * --- 215 00011234 216 ENTVG20 LABEL 11234 5C08C010 3 ZBM 217 CMZ VAR,VARTYPE what do we have? 11235 FE031230 218 JEQ ENTVG10 jump if have a number - share 11236 3816C804 0 3 BASE 219 LEA R0 VAR,VARSTR point to the start of string 11237 6084000D 2 IMM 220 LD R2 CR strings end with a CR 221 * \ / 00011238 222 ENTVG40 LABEL 11238 E4174800 0 5 BASE 223 ST R0 SP,0 save 'from' address 11239 60440100 1 IMM 224 LD R1 OKLEN get maximum possible length 1123A DA188800 0 21 225 SRCH R0 R2 R1 see how long it is 1123B 30440100 1 IMM 226 RSB R1 OKLEN calculate length 1 Assembler C9208 Control Mode C9304 14-Jun-93 17:33 PAGE 224 (CMMAIN) F 15 Main control logic 1123C 60124000 0 1 REG 227 LD R0 R1 diddle 1123D 304BDB30 1 7 CBM 228 RSB R1 R7/VLBITS compute residual char count 1123E 500BDB30 0 7 CBM 229 MIN R0 R7/VLBITS get shortest length 1123F E4000017 0 230 ST R0 SETVALUE save the length to use 11240 600400E1 0 IMM 231 LD R0 URPSETREG+UPR1 tell user what the count is 11241 0900001D 232 UREQ UPNUM(XREQ) its a 'residual character count' 233 * \ / 11242 61D74801 7 5 BASE 234 LD R7 SP,1 get the 'to' address back 11243 600BDF10 0 7 CBM 235 LD R0 R7/ADRBITS get the address portion 11244 DC410F8D 236 CALLNP MAPIN go get user's page mapped in 11245 60040080 0 IMM 237 LD R0 URSSINTARM get interrupt arm requst 11246 60420800 1 IMM 238 LD R1 MEMPROTMSK get memory protection bit 11247 09040000 IMM 239 UREQ 0 arm interrupt 11248 60400017 1 240 LD R1 SETVALUE get the length back 11249 60174800 0 5 BASE 241 LD R0 SP,0 get 'from' address 1124A 3897C000 2 7 CACH 242 LEA R2 CACH R7,0 point to 'to' location 1124B EC0A9E70 2 CBM 243 STZ R2/PADRBITS clear the page address info 1124C 18840400 2 IMM 244 ADD R2 ADR(SYSBUF) (it's in our page, now) 1124D DA880800 2 01 245 MOVE R2 R0 R1 transfer 1124E 60040081 0 IMM 246 LD R0 URSCINTARM get interrupt clear request 1124F 60420800 1 IMM 247 LD R1 MEMPROTMSK get memory protection bit 11250 09040000 IMM 248 UREQ 0 disarm interrupt 11251 DC410FA1 249 CALLNP MAPOUT release the page(s) 250 * \ / 11252 F7A91270 6 251 JBT ST/MEMPROT ENTVARERR give user an error 11253 60440001 1 IMM 252 LD R1 1 say we had a string 11254 FE0F1200 253 JMP ENTVARRETX and return to our caller 254 * --- 255 00011255 256 ENTVARSPCL LABEL (obtains values of CM operands for user) 11255 EC128000 2 REG 257 STZ R2 point to start of buffer 11256 60000014 0 258 LD R0 VNAME(0) get first half of name 11257 68010042 0 259 UCPR R0 VARMAX check if it's legal 11258 FE051270 260 JGT ENTVARERR goodbye if it's not 11259 DC4110D3 261 CALLNP UP6F change to ASCII 1125A 60000015 0 262 LD R0 VNAME(1) get second half of the name 1125B 68010042 0 263 UCPR R0 VARMAX check if this one's legal 1125C FE051270 264 JGT ENTVARERR goodbye if it's not 1125D DC4110D3 265 CALLNP UP6F change second half to ASCII 1125E 6044000D 1 IMM 266 LD R1 CR pick up an EOL 1125F E4750008 1 2 @ 267 ST R1 @IBPT(R2) terminate with EOL 268 * \ / 11260 60440095 1 IMM 269 LD R1 ADR(BUFFER) pick up input buffer address 11261 60964000 2 1 CACH 270 LD R2 BPT get first character 11262 64840021 2 IMM 271 CPR R2 BANG compare to "!" 11263 FE0D1270 272 JNE ENTVARERR still an error 11264 E4400116 1 273 ST R1 BUFPT store as buffer pointer 11265 EC000119 274 STZ ATEOL 11266 DC410782 275 CALLNP EEPROC let the ExEv figure this out 11267 FA0D1270 0 276 JNEZ R0 ENTVARERR ExEv error 11268 FA47126B 1 277 JGEZ R1 ENTVARSPST non-numeric quantity returned 11269 60528000 1 2 REG 278 LD R1 R2 get value 1126A FE0F1231 279 JMP ENTVG15 back to variable processing 280 * --- 281 0001126B 282 ENTVARSPST LABEL 1 Assembler C9208 Control Mode C9304 14-Jun-93 17:33 PAGE 225 (CMMAIN) F 15 Main control logic 1126B 5C0BC430 7 CBM 283 CMZ R7/VTBITS see if string is acceptable 1126C FE031270 284 JEQ ENTVARERR it's not, send an error 1126D 38168804 0 2 BASE 285 LEA R0 R2,VARSTR generate address of 'form' string 1126E 6084000D 2 IMM 286 LD R2 CR look for a CR 1126F FE0F1238 287 JMP ENTVG40 return string to user 288 * --- 289 00011270 290 ENTVARERR LABEL 11270 EC0BA810 6 CBM 291 STZ ST/MEMPROT clear memory protection error flag 11271 60440097 1 IMM 292 LD R1 XREQERBVAR give the all-encompassing error 11272 EDCA4010 1 CBM 293 STW R1/ERROR say it was an error 11273 FE0F1200 294 JMP ENTVARRETX and go back to user 295 * --- 296 297 ********************************************************************************** 298 * * 299 * Program termination. * 300 * * 301 ********************************************************************************** 302 00011274 303 ENTSTP LABEL (program termination) 11274 60C40006 3 IMM 304 LD R3 CMSPTOK say our program finished ok 11275 E4CBB040 3 6 CBM 305 ST R3 ST/CMSTATE set CM state 11276 DC41109F 306 CALLNP UNRUN go say last program is stopped 11277 FE0F1535 307 JMP MCENT and go talk to the user 308 * --- 309 310 ********************************************************************************** 311 * * 312 * Chain to another program or DO file. If its a DO file * 313 * note that the entire DO area is reset. Also note that we * 314 * fetch a Control Mode unit and equivalence to the unit on * 315 * which we are to chain. This prevent the user from * 316 * destroying the DO unit on which we are about to take input * 317 * from. * 318 * * 319 ********************************************************************************** 320 00011278 321 ENTCHN LABEL (chain) 11278 60C40006 3 IMM 322 LD R3 CMSPTOK normal termination 11279 E4CBB040 3 6 CBM 323 ST R3 ST/CMSTATE just in case chain bombs 1127A 60D24000 3 1 REG 324 LD R3 R1 get the lun to chain to 1127B EC124000 1 REG 325 STZ R1 clear termination control bits 1127C EDCA7E10 1 CBM 326 STW R1/ZCBIT clear out core below 1127D DC41109F 327 CALLNP UNRUN clear previous program area 328 * \ / 1127E E4C00009 3 329 ST R3 LUN save the new run run 330 * \ / 0001127F 331 CHAIN LABEL 1127F 60040010 0 IMM 332 LD R0 FRSTATUS otherwise see what lun is 11280 08800009 333 FREQ LUN(XREQ) ask the system 11281 FA090A58 0 334 JLTZ R0 ERPMC get out if unit is bad 11282 600A7460 0 1 CBM 335 LD R0 R1/HWFIELD get just the hardware type 11283 60400000 1 336 LD R1 INITSUBTYP get entry sub-code field back 11284 604A49C0 1 1 CBM 337 LD R1 R1/INITTYPE mask out entry type 11285 64040001 0 IMM 338 CPR R0 HTSAF is it a sequential file? 1 Assembler C9208 Control Mode C9304 14-Jun-93 17:33 PAGE 226 (CMMAIN) F 15 Main control logic 11286 FE0D12AD 339 JNE CHAIN20 if not,go insert program 11287 64440004 1 IMM 340 CPR R1 CONJOB check if concurrent process 11288 FE0318BB 341 JEQ BYENOW if so, time to go 11289 60C00009 3 342 LD R3 LUN save the lun from harm 1128A F385128D 6 343 JBF ST/TIN CHAIN05 jump if not terminal input 1128B DC410DAA 344 CALLNP DORESET reset DO's if on-line request 1128C E4C00009 3 345 ST R3 LUN restore lun to 'DO' from 346 * \ / 0001128D 347 CHAIN05 LABEL 1128D 64C40001 3 IMM 348 CPR R3 UINLUN is it user input unit 1128E FE0312B1 349 JEQ CHAIN95 if it is, get out fast 1128F 64C40002 3 IMM 350 CPR R3 UOUTLUN is it user output unit 11290 FE0312B1 351 JEQ CHAIN95 if it is, get out fast 11291 6100015F 4 352 LD DO DOPTR get DO pointer 11292 650415EB 4 IMM 353 CPR DO DOMAX see if we can accomodate 11293 FE0712AB 354 JGE CHAIN10 jump if no more room 11294 64C400D3 3 IMM 355 CPR R3 CMLOWLUN check if unit in CM range 11295 FE0712A0 356 JGE NONEEDTOSWAP if so no need to swap units 11296 DC410DA2 357 CALLNP EQBZAP clear the equip buffer 11297 E4C00049 3 358 ST R3 EQBFN(1) place in the equip buffer 11298 DC410C68 359 CALLNP CMLUNGET get a unit in the CM range 11299 60040051 0 IMM 360 LD R0 FREQUIPR open for reading only 1129A 6044003E 1 IMM 361 LD R1 ADR(EQBUF) address of equip buffer 1129B 0880001B 362 FREQ CMLUN(XREQ) try for an equivalence 1129C FA090A58 0 363 JLTZ R0 ERPMC tell of or woes 1129D 60040060 0 IMM 364 LD R0 FRUNEQUIP don't need the original chain unit anymore 1129E 08800009 365 FREQ LUN(XREQ) cross our fingers it worked 1129F 60C0001B 3 366 LD R3 CMLUN new chain unit... 367 * \ / 000112A0 368 NONEEDTOSWAP LABEL 112A0 EC0B8610 6 CBM 369 STZ ST/NDO say we are DOing 112A1 19040044 4 IMM 370 ADD DO DOBLEN say we have another 112A2 EC170800 4 BASE 371 STZ DO,DOSTAT clear status 112A3 EDC916D0 4 ZBM 372 STW DO,DOCOUNT say one time through 112A4 E4C93080 3 4 ZBM 373 ST R3 DO,DOUNIT set the lun for the DO unit 112A5 E4C0001E 3 374 ST R3 DOLUN set the user input unit to do unit 112A6 DC410D59 375 CALLNP DOSTART set up user input unit 112A7 E500015F 4 376 ST DO DOPTR save DO pointer 112A8 EC000009 377 STZ LUN clear lun so we won't unequip 112A9 EC00001B 378 STZ CMLUN clear them both out 112AA FE0F14E9 379 JMP MC now go process 380 * --- 381 000112AB 382 CHAIN10 LABEL 112AB 60052465 0 IMM 383 LD R0 ADR(ERM200) "TOO MANY DO UNITS" 112AC FE0F0A58 384 JMP ERPMC that's the breaks 385 * --- 386 000112AD 387 CHAIN20 LABEL 112AD 60040132 0 IMM 388 LD R0 FRINSRTP get insert request 112AE 64440004 1 IMM 389 CPR R1 CONJOB check if concurrent process 112AF FE0D1749 390 JNE GORUN if not, run with echo 112B0 FE0F1789 391 JMP GOENTRY run without echo 392 * --- 393 000112B1 394 CHAIN95 LABEL 1 Assembler C9208 Control Mode C9304 14-Jun-93 17:33 PAGE 227 (CMMAIN) F 15 Main control logic 112B1 600525AB 0 IMM 395 LD R0 ADR(ERM339) "ILLEGAL UNIT FOR "DO"" 112B2 FE0F1543 396 JMP PARERR 397 * --- 398 399 ********************************************************************************** 400 * * 401 * User logoff request. * 402 * * 403 ********************************************************************************** 404 000112B3 405 ENTLGF LABEL (logoff request) 112B3 FE0F18BB 406 JMP BYENOW and go give 'em the flush... 407 * --- 408 409 ********************************************************************************** 410 * * 411 * Error entry while CM was running. * 412 * * 413 ********************************************************************************** 414 000112B4 415 ENTCMILL LABEL 112B4 EDCA0010 0 CBM 416 STW R0/ERROR say this is an error 112B5 FE0F0A58 417 JMP ERPMC and go sock it to them 418 * --- 419 420 ********************************************************************************** 421 * * 422 * Operator intervention. * 423 * * 424 ********************************************************************************** 425 000112B6 426 ENTOPR LABEL (operator intervention out of user program) 112B6 F3AD155C 6 427 JBF ST/LGN2 PASS2ERR jump if password2 running 112B7 64040027 0 IMM 428 CPR R0 UINTOPRQA operator abort 112B8 FE0312D9 429 JEQ ENTOPROA give the abort message 112B9 64440003 1 IMM 430 CPR ENTSUBT UINTOPRQW check if warn request 112BA FE0D12BE 431 JNE ENTOPR05 if not process with request out of user program 112BB DC411361 432 CALLNP OPRMSG send message to user 112BC FE0F1777 433 JMP GOAGAIN1 resume user process 434 * --- 435 000112BD 436 ENTOPRCM LABEL (operator intervention out of cm) 112BD F3AD155C 6 437 JBF ST/LGN2 PASS2ERR jump if password2 running 438 * \ / 000112BE 439 ENTOPR05 LABEL 112BE 60920000 2 0 REG 440 LD R2 R0 save primary termination code 112BF F38312C2 6 441 JBF ST/TRM ENTOPR10 jump if not a terminal session 112C0 600401B1 0 IMM 442 LD R0 FRTFLSHI request input buffer flush 112C1 088400C9 IMM 443 FREQ LUNAIN+XREQ do it 444 * \ / 000112C2 445 ENTOPR10 LABEL 112C2 64840027 2 IMM 446 CPR R2 UINTOPRQA operator abort 112C3 FE0312D9 447 JEQ ENTOPROA give the abort message 112C4 64440005 1 IMM 448 CPR ENTSUBT UINTOPRQP is this parallel process termination? 112C5 FE0312D5 449 JEQ ENTOPRPP jump if it is 112C6 64440001 1 IMM 450 CPR ENTSUBT UINTOPRQL is this the operator evict? 1 Assembler C9208 Control Mode C9304 14-Jun-93 17:33 PAGE 228 (CMMAIN) F 15 Main control logic 112C7 FE0312D7 451 JEQ ENTOPROE jump if correct 112C8 64440002 1 IMM 452 CPR ENTSUBT UINTOPRQT how about operator termination 112C9 FE0312DB 453 JEQ ENTOPROT go give termination message 112CA 64440004 1 IMM 454 CPR ENTSUBT UINTOPRQUL user evict? 112CB FE0D11D8 455 JNE ENTBRK just pretend a break 112CC 6005279F 0 IMM 456 LD R0 ADR(ERM509) "User-requested eviction" 457 * \ / 000112CD 458 ENTFLUSH LABEL 112CD DC410A34 459 CALLNP ERPRT give them the story 112CE F78318BB 6 460 JBT ST/TRM BYENOW if terminal, leave now too 112CF 60800000 2 461 LD R2 INITSUBTYP get entry sub-type 112D0 608A89C0 2 2 CBM 462 LD R2 R2/INITTYPE mask out entry type code 112D1 64840004 2 IMM 463 CPR R2 CONJOB is this a concurrent process 112D2 FE0318BB 464 JEQ BYENOW if concurrent process, don't print 112D3 DC410B51 465 CALLNP STATELIST else list registers for him 112D4 FE0F18BB 466 JMP BYENOW then give them the flush! 467 * --- 468 000112D5 469 ENTOPRPP LABEL (parent process terminated) 112D5 600527DD 0 IMM 470 LD R0 ADR(ERM519) "Parent Process Terminated" 112D6 FE0F12CD 471 JMP ENTFLUSH different story, same effect 472 * --- 473 000112D7 474 ENTOPROE LABEL (operator evict) 112D7 600527A5 0 IMM 475 LD R0 ADR(ERM510) "Operator-requested eviction" 112D8 FE0F12CD 476 JMP ENTFLUSH different story, same effect 477 * --- 478 000112D9 479 ENTOPROA LABEL (operator soft abort) 112D9 600527AC 0 IMM 480 LD R0 ADR(ERM511) "Operator-requested abort" 112DA FE0F147F 481 JMP MCERR then go give them the news 482 * --- 483 000112DB 484 ENTOPROT LABEL (operator termination) 112DB 600527B3 0 IMM 485 LD R0 ADR(ERM512) "Operator-requested termination" 112DC FE0F147F 486 JMP MCERR then go give them the news 487 * --- 488 489 ********************************************************************************** 490 * * 491 * Terminal disconnect. Just print message if unit is not * 492 * the absolute I/O terminal. If it is the absolute I/O, * 493 * switch LUNAIN and LUNAOUT with . NULLs, and close the * 494 * former. Then we suspend to give the guy a chance to redial * 495 * and reattach to this session. Timeout causes logoff. * 496 * * 497 ********************************************************************************** 498 000112DD 499 ENTDISC LABEL 112DD 60040010 0 IMM 500 LD R0 FRSTATUS get status of unit being disconnected 112DE 08965000 1 REG 501 FREQ R1+XREQ unit is subcode of error 112DF FA0912FA 0 502 JLTZ R0 ENTDISCM jump if unit not ours 112E0 F26F12FA 1 503 JBF R1/ABSIOBIT ENTDISCM jump if unit NOT absolute I/O 504 * \ / 505 506 * death is knocking... 1 Assembler C9208 Control Mode C9304 14-Jun-93 17:33 PAGE 229 (CMMAIN) F 15 Main control logic 112E1 DC411030 507 CALLNP EXCHUNITS swap units with .NULLs 112E2 FE0F18BB 508 JMP BYENOW unrecoverable error 112E3 FE0F18BB 509 JMP BYENOW recoverable error 112E4 60040060 0 IMM 510 LD R0 FRUNEQUIP close request 112E5 08800025 511 FREQ INUNIT(XREQ) close absolute input unit 112E6 FA0918BB 0 512 JLTZ R0 BYENOW logoff if errors occurred 112E7 60040060 0 IMM 513 LD R0 FRUNEQUIP close request 112E8 08800026 514 FREQ OUTUNIT(XREQ) close absolute output unit 112E9 FA0918BB 0 515 JLTZ R0 BYENOW logoff if errors occurred 112EA EE000025 516 STZ2 SWAPUNITS safety first 517 518 * determine length of timeout period 112EB 6201002C 01 519 LD2 R0 TIMERNAME name of optional session variable 112EC E6000014 01 520 ST2 R0 VNAME where to put it when you want it 112ED DC4110F5 521 CALLNP VARCHK look for custom timeout 112EE 6044012C 1 IMM 522 LD R1 REDIALWAIT default timeout 112EF FAC312F5 3 523 JEQZ VAR HAVETO jump if no variable w/name 112F0 5C08C010 3 ZBM 524 CMZ VAR,VARTYPE is variable numeric? 112F1 FE0D12F5 525 JNE HAVETO jump if not 112F2 6056C803 1 3 BASE 526 LD R1 VAR,VARVALUE get the number's amount 112F3 50440E10 1 IMM 527 MIN R1 MAXDELAY trim down 112F4 54440000 1 IMM 528 MAX R1 0 trim up 529 * \ / 000112F5 530 HAVETO LABEL 112F5 EDCBA210 6 CBM 531 STW ST/INOK allow attach or evict to occur 112F6 60040140 0 IMM 532 LD R0 URDELAY do a delay 112F7 60840000 2 IMM 533 LD R2 0 no terminating event 112F8 09040000 IMM 534 UREQ 0 waiting for time to pass 112F9 FE0F18BB 535 JMP BYENOW no one tried to reattach 536 * --- 537 538 ********************************************************************************** 539 * * 540 * Disconnect was not for absolute I/O, so just let the * 541 * user know what happened, and reenter command processor. An * 542 * aside: We can come here with the unit number being 0. It * 543 * happens if the terminal was open on a unit local to an * 544 * underprocess, or if the disconnect occurred as the unit was * 545 * being closed. * 546 * * 547 ********************************************************************************** 548 000112FA 549 ENTDISCM LABEL 112FA 60040024 0 IMM 550 LD R0 UINTTDISC terminal disconnect 112FB FE0F11CC 551 JMP ENTMSG go tell the user 552 * --- 1 Assembler C9208 Control Mode C9304 14-Jun-93 17:33 PAGE 230 (CMMAIN) F 15 Main control logic 554 555 ********************************************************************************** 556 * * 557 * Here we process a session attach interrupt/error. We * 558 * can be either the originating session (@ATTACHCMD=1) waiting * 559 * to hear back from the victim, or be the victim of an ATTACH * 560 * from another request from another session (@ATTACHCMD=0). * 561 * As the sender, we take this as the go-ahead to send off our * 562 * absolute units and logoff. As the receiver, it is the first * 563 * notice that someone is attaching to us. We swap our absolute * 564 * units with .NULLs, signal the sender we're ready, and wait for * 565 * the units to appear. Note that we attempt to recover from * 566 * errors whereever possible. * 567 * * 568 ********************************************************************************** 569 000112FC 570 ENTATCHU LABEL 112FC 62000002 01 571 LD2 R0 SAVTRMCODE get program termination codes 572 * \ / 000112FD 573 ENTATCH LABEL 574 * R0 <= termination code, R1 <= session number 112FD EC0BA210 6 CBM 575 STZ ST/INOK disallow any more interrupts 112FE 600A4100 0 1 CBM 576 LD R0 R1/ATCHFLAGS get options 112FF E4110011 0 @ 577 ST R0 @ATTACHOPTS save options 11300 604A6100 1 1 CBM 578 LD R1 R1/ATCHSESS isolate session number 11301 E4400029 1 579 ST R1 SESSNUM and save it 11302 61C5282D 7 IMM 580 LD R7 ADR (ERM52C) assume the worst 11303 7DC30000 7 IMM 581 IOR R7 1*BIT 0 indicate error address 11304 5C11000F @ 582 CMZ @ATTACHCMD are we receiver or sender? 11305 FE0D1352 583 JNE GIVEUNITS jump if we are the sender 584 * \ / 585 586 * We are being attached to, prepare to be boarded! 11306 EE000027 587 STZ2 RECUNITS indicate no receiving units yet 11307 F78F1348 6 588 JBT ST/VMFISR ERRECOVER2 jump if RESOURCESLOW 11308 DC411030 589 CALLNP EXCHUNITS swap standard IO units 11309 FE0F18BB 590 JMP BYENOW unrecoverable error 1130A FE0F1348 591 JMP ERRECOVER2 just couldn't do it 1130B 60040013 0 IMM 592 LD R0 ORATTACH send attach error to sending session 1130C 60440000 1 IMM 593 LD R1 0 no param 1130D 09400029 594 OPREQ SESSNUM(XREQ) coordinate effort 1130E FA091336 0 595 JLTZ R0 ERRECOVER1 just forget everything here 1130F 6044000A 1 IMM 596 LD R1 UNITDELAY period to wait 597 * \ / 00011310 598 DELAY4UNIT LABEL 11310 60040140 0 IMM 599 LD R0 URDELAY wait for units 11311 60820004 2 IMM 600 LD R2 1*INTUNIT mask sez "unit transfer" 11312 09040000 IMM 601 UREQ 0+XREQ delay this process 11313 FA091336 0 602 JLTZ R0 ERRECOVER1 jump if bad XREQ 603 * \ / 604 605 * delay stopped 11314 FA4B1336 1 606 JLEZ R1 ERRECOVER1 time out, recover and forget 11315 61124000 4 1 REG 607 LD R4 R1 remember time remaining 11316 DC410C68 608 CALLNP CMLUNGET get a Control Mode unit number 11317 E452C000 1 3 REG 609 ST R1 R3 save from harm 1 Assembler C9208 Control Mode C9304 14-Jun-93 17:33 PAGE 231 (CMMAIN) F 15 Main control logic 11318 60040191 0 IMM 610 LD R0 URRCVUNIT receive unit request 11319 09165000 1 REG 611 UREQ R1+XREQ get the unit 1131A FA091336 0 612 JLTZ R0 ERRECOVER1 recover then forget the whole thing 1131B 64400029 1 613 CPR R1 SESSNUM getting units from the correct session 1131C FE0D1322 614 JNE BADSESSION if so, close the given unit 1131D 5C000027 615 CMZ RECINUNIT is this the second unit? 1131E FE0D1325 616 JNE RESWAP jump if it is 617 * \ / 618 619 * have received the first unit, save and do it again 1131F E4C00027 3 620 ST R3 RECINUNIT save for later use 00011320 621 RETRYRECV LABEL 11320 60530000 1 4 REG 622 LD R1 R4 restore delay time remaining 11321 FE0F1310 623 JMP DELAY4UNIT and delay again 624 * --- 625 626 * got unit from some other session, just flush it 00011322 627 BADSESSION LABEL 11322 60040060 0 IMM 628 LD R0 FRUNEQUIP close unit request 11323 0896D000 3 REG 629 FREQ R3+XREQ close given unit 11324 FE0F1320 630 JMP RETRYRECV try some more 631 * --- 632 633 * have received the second and final unit from attacher 00011325 634 RESWAP LABEL 11325 E4C00028 3 635 ST R3 RECOUTUNIT save output unit number 11326 62000025 01 636 LD2 R0 SWAPUNITS old standard IO units 11327 E2000027 01 637 EXCH2 R0 RECUNITS switch places 11328 E6000025 01 638 ST2 R0 SWAPUNITS now new standard IO units 639 640 * have received both units, now set up state information 11329 F787132F 6 641 JBT ST/NDO NOTINDO if no DO, skip some cleanup 1132A 5C000022 642 CMZ INTFROMUP was underprocess interrupted? 1132B FE03132E 643 JEQ NOTFROMUP jump if not 1132C 6100015F 4 644 LD DO DOPTR get DO descriptor 1132D EDC90E10 4 ZBM 645 STW DO,DOINT say its job was interrupted 646 * \ / 0001132E 647 NOTFROMUP LABEL 1132E DC410D23 648 CALLNP DOBREAK suspend the DO job 649 * \ / 0001132F 650 NOTINDO LABEL 1132F 79810002 6 651 AND ST CLRBATMSK clear batch job indicators 11330 7D810003 6 652 IOR ST SETTRMMSK and convert to interactive job 11331 60110011 0 @ 653 LD R0 @ATTACHOPTS get options back 11332 600A3C20 0 0 CBM 654 LD R0 R0/ATCHSKIL isolate skill 11333 E40B9220 0 6 CBM 655 ST R0 ST/SKIL propagate it 11334 EC0BB040 6 CBM 656 STZ ST/CMSTATE normalize state 11335 61C5214B 7 IMM 657 LD R7 ADR (MESATH) "Session attached to" 658 * \ / 659 660 ********************************************************************************** 661 * * 662 * Restore the I/O units from SWAPUNITS, then close the * 663 * RECUNITS. These values have been juggled so we end up either * 664 * a) back where we started, or b) completing the attachment. * 665 * Then clean up ATTACH indicators and return. * 1 Assembler C9208 Control Mode C9304 14-Jun-93 17:33 PAGE 232 (CMMAIN) F 15 Main control logic 666 * * 667 ********************************************************************************** 668 00011336 669 ERRECOVER1 LABEL 11336 60040290 0 IMM 670 LD R0 FRRESSWTCH resource switch request 11337 60400026 1 671 LD R1 OUTUNIT next standard output unit 11338 088400CA IMM 672 FREQ LUNAOUT+XREQ switch with current .NULL 11339 FA0918BB 0 673 JLTZ R0 BYENOW logoff if can't perform 1133A 60040290 0 IMM 674 LD R0 FRRESSWTCH resource switch request 1133B 60400025 1 675 LD R1 INUNIT next standard input unit 1133C 088400C9 IMM 676 FREQ LUNAIN+XREQ switch with current .NULL 1133D FA0918BB 0 677 JLTZ R0 BYENOW logoff if can't perform 678 * \ / 1133E 60040060 0 IMM 679 LD R0 FRUNEQUIP close unit request 1133F 08800027 680 FREQ RECINUNIT(XREQ) received standard input unit 11340 60040060 0 IMM 681 LD R0 FRUNEQUIP close unit request 11341 08800028 682 FREQ RECOUTUNIT(XREQ) received standard output unit 11342 EE000027 683 STZ2 RECUNITS indicate no units in use 684 * \ / 11343 60040060 0 IMM 685 LD R0 FRUNEQUIP close unit request 11344 08800025 686 FREQ INUNIT(XREQ) old standard input unit 11345 60040060 0 IMM 687 LD R0 FRUNEQUIP close unit request 11346 08800026 688 FREQ OUTUNIT(XREQ) old standard output unit 11347 EE000025 689 STZ2 SWAPUNITS indicate no units in use 690 * \ / 00011348 691 ERRECOVER2 LABEL 11348 60110011 0 @ 692 LD R0 @ATTACHOPTS get options back 11349 EC110011 @ 693 STZ @ATTACHOPTS now zero them 1134A EC11000F @ 694 STZ @ATTACHCMD clear this variable 1134B EC110010 @ 695 STZ @ATTACHFLG not processing attach interrupt 1134C EDCBA210 6 CBM 696 STW ST/INOK reallow interrupts 1134D FBC91350 7 697 JLTZ R7 ERRMSGTIME jump if errors 1134E F63B1740 0 698 JBT R0/ATCHGO GO jump to resume UP or DO 1134F FE0F14D8 699 JMP MCDONE start in command processor 700 * --- 701 00011350 702 ERRMSGTIME LABEL 11350 600BDF10 0 7 CBM 703 LD R0 R7/ADRBITS error message address 11351 FE0F147F 704 JMP MCERR give user the error 705 * --- 706 707 ********************************************************************************** 708 * * 709 * We are the attacher, so this int means the attachee has * 710 * heard us and prepared himself to receive our I/O units. * 711 * Oblige him. * 712 * * 713 ********************************************************************************** 714 00011352 715 GIVEUNITS LABEL 11352 DC411030 716 CALLNP EXCHUNITS swap standard IO units 11353 FE0F18BB 717 JMP BYENOW unrecoverable error 11354 FE0F1348 718 JMP ERRECOVER2 just couldn't do it 11355 60040190 0 IMM 719 LD R0 URGIVEUNIT give unit request 11356 60400025 1 720 LD R1 INUNIT standard input unit 11357 60840001 2 IMM 721 LD R2 ACRO maximum privilege over device (RO) 1 Assembler C9208 Control Mode C9304 14-Jun-93 17:33 PAGE 233 (CMMAIN) F 15 Main control logic 11358 09000029 722 UREQ SESSNUM(XREQ) send to this session 11359 FA091336 0 723 JLTZ R0 ERRECOVER1 recover from this error 1135A 60040190 0 IMM 724 LD R0 URGIVEUNIT give unit request 1135B 60400026 1 725 LD R1 OUTUNIT standard output unit 1135C 60840000 2 IMM 726 LD R2 ACRW maximum privilege over device (RW) 1135D 09000029 727 UREQ SESSNUM(XREQ) send to this session 728 * \ / 729 730 * Any errors here are fatal, we assume the best and if problems 731 * did occur then logoff should clean them up. 1135E 60040060 0 IMM 732 LD R0 FRUNEQUIP close unit request 1135F 08800026 733 FREQ OUTUNIT(XREQ) this is just in case 11360 FE0F18BB 734 JMP BYENOW jump because we have no units 735 * --- 1 Assembler C9208 Control Mode C9304 14-Jun-93 17:33 PAGE 234 (CMMAIN) F 15 Main control logic 737 738 ********************************************************************************** 739 * * 740 * This routine picks up a message from the operator and * 741 * copies it to the users terminal. WARNING: This routine can * 742 * be called during the execution of a user process. Care must * 743 * be taken not to disturb the state of the process. * 744 * * 745 ********************************************************************************** 746 00011361 747 OPRMSSG BASE R4 format of message from +OPR 00170000 4 CACH 748 OPRHEAD BSSC MSGRHDLEN header 0017001C 4 CACH 749 OPRTEXT BSSC MAXOPRMSG message text 00000062 ABS 750 OPRLEN EQU DISPC OPRHEAD total length 751 DRCT 00000019 ABS 752 OPRSIZE EQU DISPW OPRMSSG needed area in words 753 ORG OPRMSSG 754 00011361 755 OPRSTAK BASE SP stack frame 756 BSS 1 00174801 5 BASE 757 OPMSG BSS OPRSIZE reserve area for message 00174068 5 CACH 758 OPTEXT BSSC OPRMSGHLEN+MAXOPRMSG area for output message 759 DRCT 0000002E ABS 760 OPRSS EQU DISPW OPRSTAK 761 ORG OPRSTAK 762 11361 DD5F402E 5 STAK 763 OPRMSG ENTRNP STAK SP,OPRSS 11362 60040040 0 IMM 764 LD R0 FRWRITET get write request 11363 60440000 1 IMM 765 LD R1 0 length of null line 11364 38810047 2 766 LEA R2 EMPTYLINE get pointer to null line 11365 088400CA IMM 767 FREQ LUNAOUT+XREQ move on to new line 768 * \ / 00011366 769 OPRMSG10 LABEL 11366 60040161 0 IMM 770 LD R0 URGETMSG get receive message request 11367 60440062 1 IMM 771 LD R1 OPRLEN get maximum message length 11368 38974801 2 5 BASE 772 LEA R2 SP,OPMSG get address for message 11369 EDCA1E20 0 CBM 773 STW R0/XRFLDSUSP set no suspend bit 1136A 09024000 IMM 774 UREQ OPRMASK+XREQ try to get message 1136B FA091380 0 775 JLTZ R0 OPRMSG40 get out if error 1136C 39174801 4 5 BASE 776 LEA R4 SP,OPMSG get address of message 1136D 60170801 0 4 BASE 777 LD R0 R4,MSGPRIVS get privilege bits 1136E 5C0A3410 0 CBM 778 CMZ R0/MSGPRIVOPR check if operator privileges 1136F FE031366 779 JEQ OPRMSG10 not from +OPR, try again 11370 30440062 1 IMM 780 RSB R1 OPRLEN find length of reply 11371 50440062 1 IMM 781 MIN R1 OPRLEN cannot exceed buffer length 11372 1044001C 1 IMM 782 SUB R1 MSGRHDLEN subtract header length 11373 60D24000 3 1 REG 783 LD R3 R1 save length 11374 38010048 0 784 LEA R0 OPRMSGHEAD get address of output message header 11375 6044000A 1 IMM 785 LD R1 OPRMSGHLEN get length of output message header 11376 38974068 2 5 CACH 786 LEA R2 SP,OPTEXT get address for output message 11377 FE400000 787 CMOVE move output message header to output buffer 11378 3817001C 0 4 CACH 788 LEA R0 R4,OPRTEXT get address of text in message from +OPR 11379 6052C000 1 3 REG 789 LD R1 R3 get length of text from +OPR 1137A FE400000 790 CMOVE move text to output buffer 1137B 6056D00A 1 3 REG 791 LD R1 R3+OPRMSGHLEN get total output length 1137C 38974068 2 5 CACH 792 LEA R2 SP,OPTEXT get output buffer address 1 Assembler C9208 Control Mode C9304 14-Jun-93 17:33 PAGE 235 (CMMAIN) F 15 Main control logic 793 * \ / 0001137D 794 OPRMSG30 LABEL 1137D 60040040 0 IMM 795 LD R0 FRWRITE get write request 1137E 088400CA IMM 796 FREQ LUNAOUT+XREQ write it to the user 1137F 5D1F402E 5 STAK 797 LEAVE STAK SP,OPRSS return 798 * --- 799 00011380 800 OPRMSG40 LABEL 11380 60440020 1 IMM 801 LD R1 OPRMSGLLEN get length of message lost message 11381 38811E7C 2 802 LEA R2 OPRMSGLOST get address of message lost message 11382 FE0F137D 803 JMP OPRMSG30 804 * --- 1 Assembler C9208 Control Mode C9304 14-Jun-93 17:33 PAGE 236 (CMMAIN) F 15 Main control logic 806 807 ********************************************************************************** 808 * * 809 * GETOURPSN. Subroutine to ensure that OURPSN is * 810 * correctly set. Call: * 811 * * 812 * CALLNP GETOURPSN * 813 * * 814 * Eats R0 * 815 * Stack Usage: 3 * 816 * * 817 ********************************************************************************** 818 819 BLOCK GETOURPSN subroutine 820 ENTRY GETOURPSN 821 822 BEGFRAME 00174801 5 BASE 823 SAVEREGS BSS 2 safe place for regs 824 ENDFRAME 825 11383 DD5F4003 5 STAK 826 GETOURPSN ENTRNP PUSH 11384 5C000023 827 CMZ OURPSN do we have this value yet? 11385 FE05138C 828 JGT PSNSET jump if so 11386 E6574801 125 BASE 829 ST2 R1 SP,SAVEREGS save important registers 11387 60840000 2 IMM 830 LD R2 0 in case XREQ fails 11388 600400D0 0 IMM 831 LD R0 URPGO execute ... 11389 09040000 IMM 832 UREQ 0+XREQ ... ourselves 1138A E4800023 2 833 ST R2 OURPSN to get our real PSN 1138B 62574801 125 BASE 834 LD2 R1 SP,SAVEREGS restore important registers 835 * \ / 836 0001138C 837 PSNSET LABEL 1138C 5D1F4003 5 STAK 838 LEAVE POP return 839 * --- 840 841 END GETOURPSN subroutine 1 Assembler C9208 Control Mode C9304 14-Jun-93 17:33 PAGE 237 (CMMAIN) F 15 Main control logic 843 844 ********************************************************************************** 845 * * 846 * All 'INITIALREQ's come in here. This will start a user * 847 * on the yellow-brick-road towards being logged in. One * 848 * exception to this is if there is insufficient disk space * 849 * give Control Mode any swapping pages. If this is the case * 850 * we print a message and quickly die, this is better than * 851 * halting the system. * 852 * * 853 * This is also Control Mode's MAIN CONTROL section. When * 854 * Control Mode is active, this section picks up the next user * 855 * input and decodes it to the proper command processor. It * 856 * also handles screening of commands to determine if the * 857 * entered command is valid under the current conditions. If * 858 * that is the case, the user is informed of the reason why the * 859 * command is not valid. * 860 * * 861 * Finally, it checks for a help request and jumps off to * 862 * the help routine if the user needs aid. * 863 * * 864 ********************************************************************************** 865 866 SETR5 STACK designate initial R5 (stack pointer) 867 SETIAR INTBLOCK designate initial IAR value 868 SETIMR INTARMBITS designate initial IMR value 869 0001138D 870 MCINIT LABEL INITIALREQ'S come in here 1138D 61D24000 7 1 REG 871 LD R7 ENTSUBT save the sub-entry code 1138E 600400C0 0 IMM 872 LD R0 URFREEPAGE zap our impure page 1138F 09040000 IMM 873 UREQ 0+XREQ clean it out good 11390 600401B1 0 IMM 874 LD R0 FRTFLSHI flush extra input 11391 088400C9 IMM 875 FREQ LUNAIN+XREQ from absolute input 11392 60040163 0 IMM 876 LD R0 URSSMSGA get enable message request 11393 60424000 1 IMM 877 LD R1 OPRMASK enable messages from operator 11394 09040000 IMM 878 UREQ 0+XREQ enable the messages 11395 FA09190F 0 879 JLTZ R0 VANISH give up if can't be done 11396 61810000 6 880 LD ST TRMPROTO pretend we have a terminal 11397 F7C51428 7 881 JBT R7/ERRORIDS DIENOW just die if no disk space 11398 F7C7140C 7 882 JBT R7/ERRORTINH TERMINH jump if terminal inhibited 11399 F3C3139B 7 883 JBF R7/INITBATCH MC00 jump if not batch 1139A 61810001 6 884 LD ST BATPROTO otherwise change our mind 885 * \ / 0001139B 886 MC00 LABEL 1139B F3C1139E 7 887 JBF R7/INITSKILL MC01 jump if skill application not requested 1139C 60040003 0 IMM 888 LD R0 SKLAPP else we have application entry 1139D E40B9220 0 6 CBM 889 ST R0 ST/SKIL set the skill factor 890 * \ / 0001139E 891 MC01 LABEL 1139E DC410EF7 892 CALLNP INITIALIZE set up some goodies 1139F E5C00000 7 893 ST R7 INITSUBTYP save initial sub-type 113A0 61CBC9C0 7 7 CBM 894 LD R7 R7/INITTYPE mask off all but entry sub-type field 113A1 FBC313C0 7 895 JEQZ R7 MC05 go fire up if regular entry 113A2 65C40001 7 IMM 896 CPR R7 SYSJOB check if non-spooler batch job 113A3 FE0313C0 897 JEQ MC05 go fire that up too 113A4 EC0B8010 6 CBM 898 STZ ST/NLOG set logged in flag 1 Assembler C9208 Control Mode C9304 14-Jun-93 17:33 PAGE 238 (CMMAIN) F 15 Main control logic 113A5 65C40004 7 IMM 899 CPR R7 CONJOB check if concurrent process 113A6 FE0313B2 900 JEQ MC03 jump if it is 113A7 600400A0 0 IMM 901 LD R0 URCPTIMES set some initial limits 113A8 60442710 1 IMM 902 LD R1 TIMLIM 113A9 09040000 IMM 903 UREQ XREQ set time limit 113AA 600400B0 0 IMM 904 LD R0 URSESBLKS 113AB 604401F4 1 IMM 905 LD R1 SCRLIM 113AC 09040000 IMM 906 UREQ XREQ and set scratch limit 113AD 65C40002 7 IMM 907 CPR R7 RPRJOB check if automatic terminal logon 113AE FE031405 908 JEQ MC08 jump if it is 113AF 65C40003 7 IMM 909 CPR R7 BCHJOB check if spooler generated batch job 113B0 FE0313D3 910 JEQ MC06 jump if it is 113B1 FE0F1426 911 JMP MCUNKN unknown entry code - BIG TROUBLE 912 * --- 913 914 ********************************************************************************** 915 * * 916 * This code is for creation of concurrent sessions. Note * 917 * that the system has already graciously given us a unit * 918 * opened to the code file we are supposed to run, which * 919 * uncoincidently is unit 200. Besides setting up the standard * 920 * units for this session we must also create the PARAMETERS! * 921 * variable. This is necessary so that programs that actually * 922 * look for this variable don't wig out if it doesn't exist. * 923 * * 924 ********************************************************************************** 925 000113B2 926 MC03 LABEL 113B2 D14BAA30 6 CBM 927 STMW ST/LOGN else say logon stuff done 113B3 DC4110DF 928 CALLNP USERUNITS set up unit 1, 2 and 3 113B4 60040080 0 IMM 929 LD R0 URSSINTARM get set interrupt arming mask request 113B5 60430000 1 IMM 930 LD R1 INTENABLE get interrupt enable bit 113B6 09040000 IMM 931 UREQ 0+XREQ set interrupt enable bit 113B7 EC000016 932 STZ VTYPE set initial string length 113B8 EC000017 933 STZ SETVALUE set string address 113B9 6201002A 01 934 LD2 R0 PARNAME pick up PARAMETERS! name 113BA E6000014 01 935 ST2 R0 VNAME put it here for the varmake routine 113BB DC4110F5 936 CALLNP VARCHK make sure it doesn't exist 113BC FACD13BE 3 937 JNEZ VAR MCNOMAKE if it exists, don't create it 113BD DC411139 938 CALLNP VARMAKE in one swoop, it now lives 939 * \ / 000113BE 940 MCNOMAKE LABEL 113BE 60040131 0 IMM 941 LD R0 FRSETUPP get freq for set-up 113BF FE0F1789 942 JMP GOENTRY run program 943 * --- 944 945 ********************************************************************************** 946 * * 947 * This code is for interactive terminals and non-spooler * 948 * generated batch jobs. Sending out the initial message * 949 * includes the dates as well as current versions of Control * 950 * Mode and VRM. If the session is an interactive terminal we * 951 * set up the timer interrupt for 60 seconds, which is the * 952 * amount of time he has to successfully logon or we blow him * 953 * out of the water. * 954 * * 1 Assembler C9208 Control Mode C9304 14-Jun-93 17:33 PAGE 239 (CMMAIN) F 15 Main control logic 955 ********************************************************************************** 956 000113C0 957 MC05 LABEL 113C0 60040080 0 IMM 958 LD R0 URSSINTARM get set interrupt arming mask request 113C1 60430000 1 IMM 959 LD R1 INTENABLE get interrupt enable bit 113C2 09040000 IMM 960 UREQ 0+XREQ set interrupt enable bit 113C3 DC4109EA 961 CALLNP INITMSSG send out initial message 113C4 65C40001 7 IMM 962 CPR R7 SYSJOB check if spooler start-up 113C5 FE031433 963 JEQ MC10 no time out if spooler start-up 113C6 6005142B 0 IMM 964 LD R0 ADR(MCINTR) get timer interrupt handler address 113C7 E4000001 0 965 ST R0 TIMEINTADR set up timer interrupt handler 113C8 60040142 0 IMM 966 LD R0 URCLRTIMIN get clear timer interrupt request 113C9 09040000 IMM 967 UREQ 0+XREQ clear timer interrupt 113CA 60040080 0 IMM 968 LD R0 URSSINTARM get interrupt arming request 113CB 60420040 1 IMM 969 LD R1 1*INTTIM get timer interrupt bit 113CC 09040000 IMM 970 UREQ 0+XREQ arm timer interrupt 113CD FA09190F 0 971 JLTZ R0 VANISH exit if interrupt won't arm 113CE 60040141 0 IMM 972 LD R0 URSETTIMIN get set timer request 113CF 6044003C 1 IMM 973 LD R1 WAITTIME get logon time allowed 113D0 09040000 IMM 974 UREQ 0+XREQ start timer 113D1 FA09190F 0 975 JLTZ R0 VANISH exit if can't set up timer 113D2 FE0F1433 976 JMP MC10 jump to start of main loop 977 * --- 978 979 ********************************************************************************** 980 * * 981 * This code is for spooler generated batch jobs, can you * 982 * believe all this crap. Basically what we are attempting to * 983 * do is create the absolute output unit, note that the * 984 * absolute input unit is the batch job itself. First we try * 985 * to open a file the spooler sent us via an inter-session * 986 * message, then we try to get a . LP and last we attempt to * 987 * open a . NULL. We should be able to open one of these, if * 988 * not the system will probably halt with a C1200. * 989 * * 990 ********************************************************************************** 991 000113D3 992 MC06 LABEL 113D3 60040161 0 IMM 993 LD R0 URGETMSG get receive message request 113D4 60440100 1 IMM 994 LD R1 MBUFFL get maximum length 113D5 6081000B 2 995 LD R2 MBPT get pointer to message buffer 113D6 09030000 IMM 996 UREQ REPMASK+XREQ get message 113D7 FA09190F 0 997 JLTZ R0 VANISH goodbye if can't get message 113D8 304400E4 1 IMM 998 RSB R1 (MBUFFL-MSGRHDLEN) find length of message 113D9 E440015E 1 999 ST R1 MSGLEN save the length 113DA 60040164 0 IMM 1000 LD R0 URSCMSGA get clear message enable request 113DB 6041004B 1 1001 LD R1 MSGNOTOPR clear all enables except opr messages 113DC 09040000 IMM 1002 UREQ 0+XREQ clear all message enables 113DD FA09190F 0 1003 JLTZ R0 VANISH goodbye if they can't be cleared 113DE DC4105FE 1004 CALLNP READLINEX get first input record 113DF 60110008 0 @ 1005 LD R0 @IBPT get first character from input buffer 113E0 6404003E 0 IMM 1006 CPR R0 CMCHAR check if it's a CM prompt 113E1 FE0D13E6 1007 JNE MC06A if not, it can't be a logon command 113E2 DC410C70 1008 CALLNP COMLOOK check what commands in it 113E3 FA0D13E6 0 1009 JNEZ R0 MC06A not recognized - wait for initial.logon 113E4 64C50297 3 IMM 1010 CPR R3 ADR(COMLOGON) check if it's logon 1 Assembler C9208 Control Mode C9304 14-Jun-93 17:33 PAGE 240 (CMMAIN) F 15 Main control logic 113E5 FE031443 1011 JEQ MC25 it is - don't open output file 1012 * \ / 000113E6 1013 MC06A LABEL 113E6 EDCBAA10 6 CBM 1014 STW ST/LGN1 if not logon, don't run password2 113E7 60040012 0 IMM 1015 LD R0 FRREWIND get rewind request 113E8 0880000A 1016 FREQ READLUN(XREQ) rewind standard input 113E9 FA09190F 0 1017 JLTZ R0 VANISH big trouble - let's die 113EA 60810009 2 1018 LD R2 SBPT point to symbol buffer 113EB 60440100 1 IMM 1019 LD R1 SBUFL get it's length 113EC FE580020 1020 CFILL BLANK clear it out 113ED 6041000B 1 1021 LD R1 MBPT find message buffer 113EE 38164807 0 1 BASE 1022 LEA R0 R1,MSGRTEXT get address of message text 113EF 6040015E 1 1023 LD R1 MSGLEN get the message length 113F0 FA4B13F7 1 1024 JLEZ R1 MC07 jump if empty message 113F1 E440011D 1 1025 ST R1 ALPHALEN save as symbol length 113F2 60810009 2 1026 LD R2 SBPT get pointer to symbol table 113F3 FE400000 1027 CMOVE move message text to symbol table 113F4 600400CA 0 IMM 1028 LD R0 LUNAOUT get standard output unit number 113F5 DC410F46 1029 CALLNP MAKEOUTX create output file 113F6 FA031405 0 1030 JEQZ R0 MC08 jump if file created 1031 * \ / 000113F7 1032 MC07 LABEL 113F7 60040060 0 IMM 1033 LD R0 FRUNEQUIP be sure nothing was left half made 113F8 088400CA IMM 1034 FREQ LUNAOUT+XREQ get rid of it 113F9 DC410DA2 1035 CALLNP EQBZAP clean out the equip buffer 113FA 60010020 0 1036 LD R0 EXTLP we want a .LP 113FB E400004A 0 1037 ST R0 EQBFE and hope the system has one 113FC 60040050 0 IMM 1038 LD R0 FREQUIPW we want this writeable 113FD 6044003E 1 IMM 1039 LD R1 ADR(EQBUF) point to the equip block 113FE 088400CA IMM 1040 FREQ LUNAOUT+XREQ pretty please... 113FF FA071405 0 1041 JGEZ R0 MC08 jump if we made progress 11400 60010021 0 1042 LD R0 EXTNULL this is our last try 11401 E400004A 0 1043 ST R0 EQBFE give the guy a .NULL 11402 60040050 0 IMM 1044 LD R0 FREQUIPW same thing as above 11403 6044003E 1 IMM 1045 LD R1 ADR(EQBUF) point to the block 11404 088400CA IMM 1046 FREQ LUNAOUT+XREQ and let him worry about his output 1047 * \ / 1048 1049 ********************************************************************************** 1050 * * 1051 * This code is for remote port startup sessions and the * 1052 * tail end for the spooler generated batch jobs. You'll * 1053 * notice that we send out our greetings, create the standard * 1054 * units, and enable taking interrupts. All in a days work! * 1055 * * 1056 ********************************************************************************** 1057 00011405 1058 MC08 LABEL 11405 DC4109EA 1059 CALLNP INITMSSG send out initial message 11406 DC4110DF 1060 CALLNP USERUNITS set units 1, 2 and 3 11407 60040080 0 IMM 1061 LD R0 URSSINTARM get set interrupt arming mask request 11408 60430000 1 IMM 1062 LD R1 INTENABLE get interrupt enable bit 11409 09040000 IMM 1063 UREQ 0+XREQ set interrupt enable bit 1140A DC410EBC 1064 CALLNP HEADER put header out on standard output unit 1140B FE0F14E9 1065 JMP MC start initial files 1066 * --- 1 Assembler C9208 Control Mode C9304 14-Jun-93 17:33 PAGE 241 (CMMAIN) F 15 Main control logic 1067 1068 ********************************************************************************** 1069 * * 1070 * This code is for errors that we can not possible * 1071 * recover from. All we can do is alert the user to what the * 1072 * problem is and hope that he gets the message. If the * 1073 * terminal is inhibited CM will attempt to open a file in the * 1074 * system library (. SYS: INHIBIT. LOGON) and print the * 1075 * contents. Insufficient disk space indicates that someone * 1076 * needs to clean shit out. Unknown initial entry code * 1077 * indicates a problem with either the OS or CM. * 1078 * * 1079 ********************************************************************************** 1080 0001140C 1081 TERMINH LABEL 1140C 61440268 5 IMM 1082 LD SP ADR (STACK) initialize stack pointer 1140D 60040122 0 IMM 1083 LD R0 URFREELUN free unit request 1140E 09010006 1084 UREQ CMEQLUN(XREQ) in the CM range 1140F FA091424 0 1085 JLTZ R0 GIVSTDNEWS give standard vanilla message 11410 E453C000 1 7 REG 1086 ST R1 R7 place here for safe keeping 11411 60048261 0 IMM 1087 LD R0 FRNOPENR+XRSUSPERR open request /RO 11412 60440012 1 IMM 1088 LD R1 INHMSGLEN filename length 11413 6085005B 2 IMM 1089 LD R2 ADR (INHMSGFL) address of filename 11414 0897D000 7 REG 1090 FREQ R7+XREQ try to equip the file 11415 FA091424 0 1091 JLTZ R0 GIVSTDNEWS jump if our attempt failed 1092 * \ / 00011416 1093 INHMSGRD LABEL 11416 60040032 0 IMM 1094 LD R0 FRSREAD read request 11417 60440140 1 IMM 1095 LD R1 OBUFFL buffer length 11418 60841400 2 IMM 1096 LD R2 ADR (OBUFFW) buffer address 11419 0897D000 7 REG 1097 FREQ R7+XREQ read a record 1141A FA091421 0 1098 JLTZ R0 INHMSGDONE if error, just finish up 1141B F6211421 0 1099 JBT R0/RTSP INHMSGDONE jump if system record 1141C 30440140 1 IMM 1100 RSB R1 OBUFFL calculate read length 1141D 60C41400 3 IMM 1101 LD R3 ADR (OBUFFW) address of buffer to write 1141E DC410AF3 1102 CALLNP OUTN write the output buffer 1141F FA091421 0 1103 JLTZ R0 INHMSGDONE if error, cleanup 11420 FE0F1416 1104 JMP INHMSGRD read another record 1105 * --- 1106 00011421 1107 INHMSGDONE LABEL 11421 60040060 0 IMM 1108 LD R0 FRUNEQUIP close request 11422 0897D000 7 REG 1109 FREQ R7+XREQ 11423 FE0F1923 1110 JMP VANITY10 vanish this session 1111 * --- 1112 00011424 1113 GIVSTDNEWS LABEL 11424 60C52854 3 IMM 1114 LD R3 ADR (ERM533) inhibited terminal 11425 FE0F1429 1115 JMP GIVENEWS jump to print error 1116 * --- 1117 00011426 1118 MCUNKN LABEL 11426 60C52847 3 IMM 1119 LD R3 ADR (ERM532) unknown entry code 11427 FE0F1429 1120 JMP GIVENEWS jump to print error 1121 * --- 1122 1 Assembler C9208 Control Mode C9304 14-Jun-93 17:33 PAGE 242 (CMMAIN) F 15 Main control logic 00011428 1123 DIENOW LABEL 11428 60C5283A 3 IMM 1124 LD R3 ADR (ERM531) insufficient disk space 1125 * \ / 00011429 1126 GIVENEWS LABEL 11429 DC410ACF 1127 CALLNP OUT list it out 1142A FE0F1923 1128 JMP VANITY10 time to turn out the lights 1129 * --- 1 Assembler C9208 Control Mode C9304 14-Jun-93 17:33 PAGE 243 (CMMAIN) F 15 Main control logic 1131 1132 ********************************************************************************** 1133 * * 1134 * The following code handles timer interrupts that occur * 1135 * while waiting for logon. If interrupts are being handled, * 1136 * an immediate exit to vanish occurs. Otherwise, a flag is * 1137 * set and the interrupt is handled later. * 1138 * * 1139 ********************************************************************************** 1140 0001142B 1141 MCINTR LABEL 1142B EDCB9610 6 CBM 1142 STW ST/INTM set timer interrupt occurred flag 1142C F3A3142F 6 1143 JBF ST/INOK MCINTR10 checks if interrupts OK 1142D 3801190C 0 1144 LEA R0 VANISHMSG get address of exit routine 1142E E4000032 0 1145 ST R0 REGBLOCK(CCBFLDPC) put in PC area 1146 * \ / 0001142F 1147 MCINTR10 LABEL 1142F E5800030 6 1148 ST ST REGBLOCK(UPR6) save status for return 11430 60040082 0 IMM 1149 LD R0 URINTRTN get interrupt return request 11431 0904002A IMM 1150 UREQ (ADR(REGBLOCK))+XREQ return from interrupt 11432 FE0F190F 1151 JMP VANISH if this fails, try to die 1152 * --- 1 Assembler C9208 Control Mode C9304 14-Jun-93 17:33 PAGE 244 (CMMAIN) F 15 Main control logic 1154 1155 ********************************************************************************** 1156 * * 1157 * This is the top of the main control loop. Each time a * 1158 * new command is wanted, we come screaming through here to * 1159 * read another input line. * 1160 * * 1161 ********************************************************************************** 1162 00011433 1163 MC10 LABEL 11433 EC0B9A80 6 CBM 1164 STZ ST/DYNAM say all is quiet for now 11434 61440268 5 IMM 1165 LD SP ADR(STACK) reset stack pointer 11435 F38F143C 6 1166 JBF ST/VMFISR MC15 jump if RESOURCESOK 11436 60040014 0 IMM 1167 LD R0 ORRESETVM try to make OK 11437 09440000 IMM 1168 OPREQ 0 cross fingers 11438 FA09143C 0 1169 JLTZ R0 MC15 jump if no luck 11439 EC0B8E10 6 CBM 1170 STZ ST/VMFISR else, clear indicator 1143A 60C5203F 3 IMM 1171 LD R3 ADR(MESRCEOK) and give nice message 1143B DC410AF1 1172 CALLNP OUTX to the user 0001143C 1173 MC15 LABEL 1143C DC410538 1174 CALLNP READLINE get something from user 1175 * \ / 0001143D 1176 MC20 LABEL 1143D 60040080 0 IMM 1177 LD R0 URSSINTARM get set interrupt arming mask request 1143E 60430000 1 IMM 1178 LD R1 INTENABLE get interrupt enable bit 1143F 09040000 IMM 1179 UREQ 0+XREQ set interrupt enable bit 11440 61440268 5 IMM 1180 LD SP ADR(STACK) reset stack pointer 11441 DC410C70 1181 CALLNP COMLOOK get command from user 11442 FA0D1450 0 1182 JNEZ R0 MC40 jump if not valid command 1183 * \ / 00011443 1184 MC25 LABEL 11443 6108C082 4 3 ZBM 1185 LD R4 COM,COMSTAT get command restrictions 11444 790B8080 4 6 CBM 1186 AND R4 ST/STATBITS determine if command is legal now 11445 FB0D146A 4 1187 JNEZ R4 MC60 jump if not legal right now 11446 5C08D012 3 ZBM 1188 CMZ COM,COMNOECHO check no echo bit 11447 FE0D144B 1189 JNE MC35 jump if set 11448 EDCBA210 6 CBM 1190 STW ST/INOK say we will accept interrupts 11449 DC4109B5 1191 CALLNP ECHO good command. echo it out 1144A EC0BA210 6 CBM 1192 STZ ST/INOK say no interrupts allowed 1193 * \ / 0001144B 1194 MC35 LABEL 1144B 60400011 1 1195 LD R1 TCSAVE get terminator type back 1144C 6444003F 1 IMM 1196 CPR R1 QM is terminator a ?? 1144D FE03148A 1197 JEQ MCHELP give first aid if so 1144E E4C00012 3 1198 ST COM COMSAVE remember the command 1144F 5C88DF12 3 ZBM 1199 LDPC COM,COMADR and follow the yellow-brick-road 1200 * --- 1201 1202 ********************************************************************************** 1203 * * 1204 * We wind up here when we get crap for a command name. * 1205 * (Remember, it may be the name of a .CODE file to run! ) * 1206 * * 1207 ********************************************************************************** 1208 00011450 1209 MC40 LABEL (crud for command) 1 Assembler C9208 Control Mode C9304 14-Jun-93 17:33 PAGE 245 (CMMAIN) F 15 Main control logic 11450 F79F1458 6 1210 JBT ST/IFP MC51 jump if processing true IF 11451 F6B91433 2 1211 JBT R2/TEOL MC10 try again if blank line 11452 F3811457 6 1212 JBF ST/NLOG MC50 jump if logged in 1213 * \ / 00011453 1214 MC45 LABEL 11453 F3831433 6 1215 JBF ST/TRM MC10 if batch, go try again 11454 60C523B7 3 IMM 1216 LD R3 ADR(ERM152) "PLEASE LOGIN - 'HELLO,...'" 11455 DC410ACF 1217 CALLNP OUT yell at the turkey 11456 FE0F1433 1218 JMP MC10 and se ya later 1219 * --- 1220 00011457 1221 MC50 LABEL 11457 F7891433 6 1222 JBT ST/ABRT MC10 ignore errors if aborted 1223 * \ / 00011458 1224 MC51 LABEL 11458 E413C000 0 7 REG 1225 ST R0 R7 save the error code a second 11459 DC4109B5 1226 CALLNP ECHO list out the line 1145A FBC91461 7 1227 JLTZ R7 MC55 jump if we had a total crud error 1145B 60400115 1 1228 LD R1 LBUFPT restore buffer pointer 1145C E4400116 1 1229 ST R1 BUFPT so we can read again! 1145D EC000119 1230 STZ ATEOL 1145E EDCBA010 6 CBM 1231 STW ST/UCOM must be a user command 1145F EC0BA210 6 CBM 1232 STZ ST/INOK accept no interrupts 11460 FE0F1C2D 1233 JMP RUNIN go try to run his .CODE 1234 * --- 1235 00011461 1236 MC55 LABEL (command error) 11461 EC0BA010 6 CBM 1237 STZ ST/UCOM say no implicit 'run' 11462 604A2AB0 1 0 CBM 1238 LD R1 R0/ECFIELD get error code 11463 600523AF 0 IMM 1239 LD R0 ADR(ERM150) prepare generic "Unknown command" 11464 6444008A 1 IMM 1240 CPR R1 XREQERFBZ was error 'File is busy'? 11465 FE0D1467 1241 JNE MC57 11466 60052524 0 IMM 1242 LD R0 ADR(ERM314) yes, give specific error instead 1243 * \ / 00011467 1244 MC57 LABEL 1245 * \ / 11467 F39F147F 6 1246 JBF ST/IFP MCERR go list error if not IF 11468 600523DF 0 IMM 1247 LD R0 ADR(ERM157) "Expecting CM command after IF" 11469 FE0F147F 1248 JMP MCERR and that should give better help 1249 * --- 1 Assembler C9208 Control Mode C9304 14-Jun-93 17:33 PAGE 246 (CMMAIN) F 15 Main control logic 1251 1252 ********************************************************************************** 1253 * * 1254 * This section takes care of commands which are not * 1255 * currently valid under the present conditions. The status * 1256 * bits are checked to determine the exact problem and the user * 1257 * is given an appropriate message. * 1258 * * 1259 ********************************************************************************** 1260 0001146A 1261 MC60 LABEL 1146A 610B3000 4 4 CBM 1262 LD R4 R4/STATFIX re-align status bits 1146B F7091433 4 1263 JBT R4/ABRT MC10 if aborted, ignore 1146C F70F1477 4 1264 JBT R4/VMFISR MC70 if RESOURCESLOW, complain or ignore 1146D F7011453 4 1265 JBT R4/NLOG MC45 jump if not logged in 1146E DC4109B5 1266 CALLNP ECHO list out now for all to see 1146F F70B147E 4 1267 JBT R4/FOUL MC90 jump if using filthy language 11470 60400011 1 1268 LD R1 TCSAVE was terminator a help request? 11471 6444003F 1 IMM 1269 CPR R1 QM is it a help request? 11472 FE03144B 1270 JEQ MC35 give help any old time 11473 F707147A 4 1271 JBT R4/NDO MC80 jump if DO-only violation 11474 F705147C 4 1272 JBT R4/TIN MC85 jump if DO/BATCH violation 11475 60052450 0 IMM 1273 LD R0 ADR(ERM172) "Command not valid from batch session" 11476 FE0F147F 1274 JMP MCERR complain and try again 1275 * --- 1276 00011477 1277 MC70 LABEL 11477 F3851433 6 1278 JBF ST/TIN MC10 ignore if not terminal input 11478 6005245A 0 IMM 1279 LD R0 ADR(ERM173) "Command not valid while RESOURCESLOW" 11479 FE0F147F 1280 JMP MCERR complain and try again 1281 * --- 1282 0001147A 1283 MC80 LABEL DO-only violation 1147A 600523D6 0 IMM 1284 LD R0 ADR(ERM156) "VALID FROM 'DO' UNIT ONLY" 1147B FE0F147F 1285 JMP MCERR try again! 1286 * --- 1287 0001147C 1288 MC85 LABEL 1147C 600523CB 0 IMM 1289 LD R0 ADR(ERM155) "VALID ONLY FROM DO/BATCH UNIT" 1147D FE0F147F 1290 JMP MCERR complain and try again 1291 * --- 1292 0001147E 1293 MC90 LABEL filthy words!!! 1147E 600523B3 0 IMM 1294 LD R0 ADR(ERM151) "Hey! Let's keep it clean!" 1295 * \ / 0001147F 1296 MCERR LABEL 1147F DC410A34 1297 CALLNP ERPRT you dumb son-of-a-bitch 11480 600BB040 0 6 CBM 1298 LD R0 ST/CMSTATE get our current CM state 11481 607100C5 1 0 @ 1299 LD R1 @CMSUCTAB(R0) get next state to enter 11482 E44BB040 1 6 CBM 1300 ST R1 ST/CMSTATE say we are there 11483 F38314E9 6 1301 JBF ST/TRM MC no fancies if batch job 11484 F79314E9 6 1302 JBT ST/SKLX MC if expert, don't bother with talk 11485 60800000 2 1303 LD R2 INITSUBTYP get entry sub-type 11486 608A89C0 2 2 CBM 1304 LD R2 R2/INITTYPE mask out entry type code 11487 64840004 2 IMM 1305 CPR R2 CONJOB is this a concurrent process 11488 FE0314E9 1306 JEQ MC if concurrent process, don't print 1 Assembler C9208 Control Mode C9304 14-Jun-93 17:33 PAGE 247 (CMMAIN) F 15 Main control logic 11489 5CA100C8 0 1307 LDPC CMSUCADR(R0) and process by previous state 1308 * --- 1 Assembler C9208 Control Mode C9304 14-Jun-93 17:33 PAGE 248 (CMMAIN) F 15 Main control logic 1310 1311 ********************************************************************************** 1312 * * 1313 * This section takes care of giving the user a list of * 1314 * the parameters for a command when the user has appended a * 1315 * question mark to the command entered. * 1316 * * 1317 ********************************************************************************** 1318 0001148A 1319 MCHELP LABEL (give help for command) 1148A EC0BB040 6 CBM 1320 STZ ST/CMSTATE say we are in normal state 1148B FE0F148E 1321 JMP MCHELPER and go give some aid 1322 * --- 1323 0001148C 1324 MCHELPS LABEL 1148C 60440004 1 IMM 1325 LD R1 CMSCOME say we have a command error 1148D E44BB040 1 6 CBM 1326 ST R1 ST/CMSTATE since we are giving help now 1327 * \ / 0001148E 1328 MCHELPER LABEL 1148E 10C50225 3 IMM 1329 SUB COM ADR(COMTAB) convert to relative index 1148F 14C40003 3 IMM 1330 DIV COM COMLENE now it's ready 11490 62E72975 34 3 1331 LD2 R3 HELPTAB(COM) get help addresses 11491 DC4109C8 1332 CALLNP HELPPRNT go list short-form help 11492 FE0F14E9 1333 JMP MC and go try again 1334 * --- 1 Assembler C9208 Control Mode C9304 14-Jun-93 17:33 PAGE 249 (CMMAIN) F 15 Main control logic 1336 1337 ********************************************************************************** 1338 * * 1339 * This section handles Break requests from within * 1340 * Control Mode and memory protect violations when setting or * 1341 * getting variables for under programs. First the interrupt * 1342 * processor checks to see if it's a break request. If it is * 1343 * the interrupt processor routine checks to see if Breaks * 1344 * are accepted when they are received. If so, the exit is * 1345 * made immediately to MCBRK. Otherwise, the Break request is * 1346 * noted (ST/INRQ) and the routine returns to the interrupted * 1347 * code. The request bit is then checked by the code being * 1348 * executed, or by the MC section when preparing to input the * 1349 * next command. One special check is to see if we are * 1350 * executing a DO file and breaks are inhibited. If so we * 1351 * just continue on, note that there is no way to abort the * 1352 * DO file other than an operator abort. * 1353 * If the interrupt is for a memory protect violation, a * 1354 * flag is set to indicate this to the variable get or set * 1355 * routine. Then the PC is incremented to prevent executing * 1356 * the fault again. Then we return to the routine where the * 1357 * problem occurred. * 1358 * If the break is from a terminal we always flush the * 1359 * output buffer. This is done so that guys using extremely * 1360 * slow baud rates don't fall asleep waiting for the output * 1361 * to finish. * 1362 * WARNING!!!. If you rearrange the interrupt table make * 1363 * sure that break is always at the top. * 1364 * * 1365 ********************************************************************************** 1366 1367 BLOCK 1368 ENTRY INTERRUPT 1369 00000080 BYTE 1370 INTCODE EQU BITS 0:7 interrupt identification code 1371 00011493 1372 INTTABLE LABEL 11493 200114A4 1373 VFD UINTBREAK*INTCODE+ADR (INTBREAK) break request 11494 740114C2 1374 VFD UINTMPV*INTCODE+ADR (INTMEMPROT) memory protect violation 11495 250114C6 1375 VFD UINTTIMINT*INTCODE+ADR (INTTIMER) timer interrupt 11496 7D0114BD 1376 VFD UINTOPRQ*INTCODE+ADR (INTOPRQ) operator request 11497 750114D1 1377 VFD UINTATTACH*INTCODE+ADR (INTATTACH) session mating ritual 11498 710114CA 1378 VFD UINTVMFDE*INTCODE+ADR (INTVMEMF) disk error 11499 720114CA 1379 VFD UINTVMFIDS*INTCODE+ADR (INTVMEMF) insufficient disk space 1149A 730114C9 1380 VFD UINTVMFISR*INTCODE+ADR (INTVMFISR) insufficient system resources 00000008 ABS 1381 NUMINTS EQU DISPW INTTABLE number of possible interrupts 1382 1383 * R1 = PSN, R2 = interrupt code, R3 = subcode 0001149B 1384 INTERRUPT LABEL 1149B DC411383 1385 CALLNP GETOURPSN ensure that our process serial number known 1149C 64400023 1 1386 CPR R1 OURPSN interrupt from underprocess? 1149D FE0D14D3 1387 JNE PROCUSRINT jump if so 1388 * \ / 1389 * Interrupted while Control Mode itself running 1149E 60040007 0 IMM 1390 LD R0 NUMINTS-1 initialize index value 0001149F 1391 INTLOOP LABEL 1 Assembler C9208 Control Mode C9304 14-Jun-93 17:33 PAGE 250 (CMMAIN) F 15 Main control logic 1149F 60611493 1 0 1392 LD R1 INTTABLE(R0) get code and address 114A0 648A4080 2 1 CBM 1393 CPR R2 R1/INTCODE compare interrupt codes 114A1 FE0314A3 1394 JEQ FOUNDINT found interrupt in our table 114A2 FA27149F 0 1395 JDR R0 INTLOOP continue our search 1396 * \ / 000114A3 1397 FOUNDINT LABEL 114A3 5C924000 1 REG 1398 LDPC R1 appropriate processing 1399 * --- 1400 1401 * BREAK or unrecognized interrupt 000114A4 1402 INTBREAK LABEL 114A4 F78714A8 6 1403 JBT ST/NDO ALLOWINT if not DO, skip special break check 114A5 64840020 2 IMM 1404 CPR R2 UINTBREAK only intercept breaks from terminals 114A6 FE0D14A8 1405 JNE ALLOWINT allow the interupt if not terminal break 114A7 F79114B4 6 1406 JBT ST/BREAK RFI ignore the break we just got 1407 * \ / 000114A8 1408 ALLOWINT LABEL 114A8 604B9220 1 6 CBM 1409 LD R1 ST/SKIL for later check 000114A9 1410 ALLOWINT1 LABEL 114A9 E6800020 23 1411 ST2 R2 INTINFO save interrupting information 114AA F7A514B8 6 1412 JBT ST/INRQ XTRAINT already interrupt pending? 114AB EDCBA410 6 CBM 1413 STW ST/INRQ say we have a break request 114AC E5800030 6 1414 ST ST REGBLOCK(UPR6) save the new status for return 114AD F3A314B2 6 1415 JBF ST/INOK RFIFLUSH just exit if don't want now 1416 * \ / 1417 * R1 = skill to check against 000114AE 1418 MAYBEINT LABEL 114AE 64440003 1 IMM 1419 CPR R1 SKLAPP is it an Application user? 114AF FE0314B2 1420 JEQ RFIFLUSH if so then ignore the guy 114B0 38011522 0 1421 LEA R0 MCBRK else give them a break (bad pun) 114B1 E4000032 0 1422 ST R0 REGBLOCK(UPPC) set the return address 1423 * \ / 000114B2 1424 RFIFLUSH LABEL flush output before RFI 114B2 600401B0 0 IMM 1425 LD R0 FRTFLSHO going to flush the output buffer 114B3 08800009 1426 FREQ LUN(XREQ) whoooosh!!! there it goes 1427 * \ / no error checks, either we did it or not 000114B4 1428 RFI LABEL return from interrupt 114B4 60040082 0 IMM 1429 LD R0 URINTRTN prepare to exit 114B5 0904002A IMM 1430 UREQ (ADR(REGBLOCK))+XREQ and enter a time warp 114B6 6005279A 0 IMM 1431 LD R0 ADR(ERM508) "System error, we blew it" 114B7 FE0F147F 1432 JMP MCERR and tell them our troubles 1433 * --- 1434 000114B8 1435 XTRAINT LABEL (had one already) 114B8 60100032 0 @ 1436 LD R0 @(REGBLOCK(UPPC)) get current instruction 114B9 600A0070 0 0 CBM 1437 LD R0 R0/BITS 0:6 check the op-code 114BA 64040004 0 IMM 1438 CPR R0 OPXREQ is it one of the xreqs? 114BB FE0D14B2 1439 JNE RFIFLUSH if not then don't allow 114BC FE0F14AE 1440 JMP MAYBEINT else force our way in 1441 * --- 1442 1443 * Operator Request (R3=request code) 000114BD 1444 INTOPRQ LABEL 114BD 6047FFFC 1 IMM 1445 LD R1 NOT(SKLAPP) allow int for application user 114BE 64C40003 3 IMM 1446 CPR R3 UINTOPRQW is this a warning request 114BF FE0D14A9 1447 JNE ALLOWINT1 continue processing interrupt 1 Assembler C9208 Control Mode C9304 14-Jun-93 17:33 PAGE 251 (CMMAIN) F 15 Main control logic 114C0 DC411361 1448 CALLNP OPRMSG get the message from the operator 114C1 FE0F14B4 1449 JMP RFI return to our interrupted address 1450 * --- 1451 1452 * Memory Protect Violation 000114C2 1453 INTMEMPROT LABEL 114C2 EDCBA810 6 CBM 1454 STW ST/MEMPROT set memory protect violation 114C3 E5800030 6 1455 ST ST REGBLOCK(UPR6) save the new status for return 114C4 D0000032 1456 INC REGBLOCK(UPPC) increment PC 114C5 FE0F14B4 1457 JMP RFI return from interrupt 1458 * --- 1459 1460 * Timer Interrupt 000114C6 1461 INTTIMER LABEL 114C6 5C000001 1462 CMZ TIMEINTADR check if timer interrupt address set up 114C7 FE0314B4 1463 JEQ RFI if not, just ignore it 114C8 5C800001 1464 LDPC TIMEINTADR go to specified processing location 1465 * --- 1466 1467 * Insufficient System Resources (OS virtual memory shortage) 000114C9 1468 INTVMFISR LABEL 114C9 EDCB8E10 6 CBM 1469 STW ST/VMFISR set RESOURCESLOW 1470 * \ / 1471 * Disk Error or Insufficient Disk Space 000114CA 1472 INTVMEMF LABEL 114CA 600AB080 0 2 CBM 1473 LD R0 R2/ECBITS extract the error code 114CB EDCA0010 0 CBM 1474 STW R0/ERROR set error bit 114CC DC410A34 1475 CALLNP ERPRT give user the bad news 114CD 60040080 0 IMM 1476 LD R0 URSSINTARM set interrupt arm register 114CE 60430000 1 IMM 1477 LD R1 INTENABLE interrupt enable bit 114CF 09040000 IMM 1478 UREQ 0+XREQ re-enable interrupts 114D0 FE0F1433 1479 JMP MC10 try for another command 1480 * --- 1481 1482 * Attach request 000114D1 1483 INTATTACH LABEL 114D1 6047FFFC 1 IMM 1484 LD R1 NOT(SKLAPP) allow int for application user 114D2 FE0F14A9 1485 JMP ALLOWINT1 continue processing 1486 * --- 1487 1488 * Interrupt from an underprocess, fake return from GO 000114D3 1489 PROCUSRINT LABE