1 Assembler C9208 12-May-93 12:30 PAGE 1 F 0 1 GLOBAL BLOCK Global Block 2 EXT 3 INPUT PROP put proprietary notice in listing! 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 4 INPUT REVISIONS revision data 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 2 (REVISIONS) F 3 3 4 ********************************************************************************** 5 * * 6 * Rev. Date * 7 * ---- --------- * 8 * 3.10 24 Jun 85 ( A20, 9C release was reassembled as 3.10-1 ) * 9 * Error return from DISKIT in share/unshare freq * 10 * processor changed to unmap WNDO1. * 11 * C8506h 29 Jun 85 * 12 * Cancel disk space low operator message when disk * 13 * is dismounted. * 14 * Minor changes to maintenance dismount code, VOLNAWAY * 15 * now indicates volume in process of being dismounted. * 16 * C8507 02 Jul 85 * 17 * Created FILLTCQ subroutine from terminal write FREQ so * 18 * that ECHOLINE can use the same chunk of code. Changed * 19 * the way stack space is allocated in INITWRITE. Rewrite * 20 * ECHOLINE to use FILLTCQ, and handle line kill processing * 21 * correctly. This also fixes the problem of having * 22 * delays set for delayable characters in echo mode 3. * 23 * C8507a 11 Jul 85 * 24 * Restored check for power fail at beginning of dispatcher, * 25 * this guarantees that all CPUs will execute the power fail * 26 * restart code. * 27 * Moved SETMEMTRAP call from INITWRITE to the beginning of * 28 * each write FREQ. This allows the write routines to set * 29 * different error addresses. Added PASSERRW1 which does * 30 * a GRUBWNDO1 before executing the PASSERRUP code. * 31 * 3.10-1 12 Jul 85 (9C patched to 3.10-10, CM 2.5) * 32 * Changed OUTTSET to not flush input and output buffers. * 33 * Fix to the recover SAF block code so that if a current * 34 * block (FCMABLK) is not specified, the load point block * 35 * is used instead. * 36 * C8507b 17 Jul 85 * 37 * Changed CIA driver to only put as many characters into * 38 * a port's output buffer as can be output in 4 CIA cycles * 39 * (200 ms). Added port option to XOFF the port when the * 40 * input buffer gets more than half full. XON gets sent * 41 * when the input buffer reaches less than 1/8 full, or * 42 * the input buffer gets flushed, or on a port reset. * 43 * C8507c 22 Jul 85 * 44 * New FREQs FRTSETXOIQ and FRTGETXOIQ to set and get the * 45 * XOFF port on input buffer full option. * 46 * Reread Modem/Hardwire jumper in CIA_RESET. * 47 * C8507d 25 Jul 85 * 48 * Added GRUBWNDO1 for file page in RAFREAD/CODEREAD at * 49 * USRMEMBAD (patched into 3.10-2). * 50 * Prevent S0007 by preserving R3 (FDE address) around * 51 * call to GRUBWNDO2 in RAFEXPAND (patched into 3.10-2). * 52 * Changes to the PRIV2MOD routine to protect spooled files * 53 * from changes by non .!!!, .SYS users. This prevents * 54 * unsaving devices from hardware.sys by unprivileged users. * 55 * C8507e 31 Jul 85 * 56 * Changed SPLRTIME from 30 seconds to 600 seconds. * 57 * Forestalls 'spooler currently unavailable' on loaded * 58 * systems (patched into 3.10-2). Fix to the path WFM * 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 3 (REVISIONS) F 3 59 * code. It didn't recognize EOR, consequently it * 60 * did stores with an uninitialized register (R7). * 61 * Added 2 new trace calls to the CIA driver. * 62 * Added code to SSU_RESET to have the SSU keep FDATE * 63 * current using a new microcode feature. This * 64 * requires a jump instruction to be changed to a NOP. * 65 * C8508 07 Aug 85 * 66 * Changed CIATPS to 10 and CIATICKTIME to 45. Also changed * 67 * WAIT30SEC to WAIT60SEC and WAIT60SEC to WAIT120SEC in the * 68 * CIA driver. These changes reflect the discovery that a * 69 * CIA tick equals 2.2 ms and not the documented 1 ms. * 70 * Changed subroutines that modify FDATE to check SSUVER * 71 * first and if using a new SSU to not update FDATE. * 72 * Replaced the unconditional jump around the code to set * 73 * up the SSU updating FDATE in SSU_RESET to check SSUVER. * 74 * Added FSNDATE to keep track of the last dispensed serial * 75 * number for systems using SSU updated FDATE to assure * 76 * unique serial numbers. * 77 * Added SMULIST to keep track of SMUs on the system. * 78 * This list is built in HAVEMEMORY in INITIAL. * 79 * Added SMUCHECK (called from DEADMAN) which reads * 80 * SMU error logs once a minute. Changed CIA driver * 81 * to look for the PORTCINIT parameter instead of the * 82 * PORTCRALL parameter after the PORTCRESET command. * 83 * Removed old code that allowed for CPUs not recognizing * 84 * power fail while executing WAIT instructions. This * 85 * code was causing errors due to the new code that * 86 * enables interrupts in DISPATCH. * 87 * C8508a 08 Aug 85 * 88 * Added new fields to COMM block to hold a pointer to the * 89 * first TCB in the TCB list belonging to this comm, and a * 90 * count of the terminals timing belonging to this comm. * 91 * Changed terminal timing values to negative counts so that * 92 * timing TCBs can be LSRCHed for the sign bit on in the * 93 * timing count field. Changed timing routine to use these. * 94 * Created new file CONSTANTS and moved memory management * 95 * constants, BITTAB, etc. into it. Also moved many * 96 * constants from COREDEFS into routines that use them. * 97 * Split COREDEFS into CPUPAGE, COREDEFS, VIRTCOREDEFS, * 98 * and USERCOREDEFS. * 99 * C8508b 12 Aug 85 * 100 * Fixed S0005 in OPENERRBZY portion of FROPEN requests by * 101 * having FREETEMPS and SELFFWAIT save R2. Before, a load * 102 * from the FCB was being made after FREETEMPS dumped the * 103 * FCB. * 104 * C8509 20 Sep 85 * 105 * Fix in initial to properly calculate the free storage * 106 * equilibrium value (FSXCOUNT). * 107 * C8510 01 Oct 85 * 108 * Changes to MS driver. READ does no error recovery during * 109 * headchecks (added MDVLOWTOL). Removed READ1TRACK, * 110 * incorporated this function into READTRACKS, which only * 111 * reads one sector off each track. Also, checker quits * 112 * as soon as error limit is exceeded. * 113 * Change to sleep code in dispatcher so that the error log * 114 * list and accounting list are empty before system allowed * 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 4 (REVISIONS) F 3 115 * to sleep. Change in dispatcher to check to see if a * 116 * process wants to run on a specified CPU. * 117 * OPREQ ORSETCPU to select a CPU for a process to run on. * 118 * C8510a 01 Oct 85 * 119 * Fix to open .VOL so that special privileges over alias * 120 * dir are not required to execute open successfully. * 121 * Addition of pseudo-command for the comm driver to * 122 * indicate reset the port's interface state. * 123 * C8510b 07 Oct 85 * 124 * Fix to open, close, destroy, and unsave code so log * 125 * entries will go in the proper accounting files. * 126 * Fix to abort, terminate, and evict, to set the proper * 127 * port number when a batch job is involved. * 128 * Addition of CPUINIT to keep track of number of CPUs * 129 * on INITIAL page. When goes to zero INITIAL page is * 130 * made available for free storage. * 131 * Changes to ORVANISH when system is sleeping so that * 132 * the system volume will not be dismounted until all * 133 * accounting and error log entries have been made. * 134 * C8510c 14 Oct 85 * 135 * Addition of logon account names to alias and unalias * 136 * logging. New OPREQs OPRCPUSTOP and OPRCPUSTRT to remove * 137 * and restore CPUs from active work in the system. * 138 * C8510d 16 Oct 85 * 139 * The volume mount and dismount code now writes to the * 140 * Manager.Sys accounting log file, informing who loaded * 141 * or unloaded a specific volume. * 142 * C8510e 17 Oct 85 * 143 * Added GRUBWNDO1 after FORCEWRW1 in RAFEXPAND. * 144 * Cleaned up the code that generates accounting records * 145 * for file opens, basically used existing subroutine. * 146 * Added additional information returned by the session * 147 * information request, being a bit indicating whether * 148 * the session was created by the system or a user. * 149 * C8510f 24 Oct 85 * 150 * Added OPREQ to remove memory pages from service * 151 * for system load testing. Modified FSXPAND to * 152 * actually do the removal and restoration. * 153 * Added 0 case to PROCPOWER session finder. Allows 0 * 154 * for session number in ORPABORT, ORPEVICT, ORPTERMIN. * 155 * Fix to OPRSTRTBAT request in that standard input * 156 * unit is tagged as a CM unit. This disallows rewinds * 157 * by anyone other than Control Mode. * 158 * Changes to INITIAL and INITPROC to generate PPLs * 159 * for their pages but put them on PPLINIT list. * 160 * INITPROC then moves these to the idle list when * 161 * finished and makes its pages available for free storage. * 162 * Reordering of some system files (INTPROC, SPROCSTART, * 163 * CONVERSION, AFTMANGLE, HOURPROC). * 164 * Moved FETCHDIR and FREEDIR into ULBTWIDDLE. * 165 * C8510g 25 Oct 85 * 166 * ALL mount and dismount requests and support routines * 167 * moved into MOUNTUTIL and OPRQMOUNT. * 168 * Various volume and system information requests moved * 169 * from XRQOPREQ2 to OPREQCVOL. * 170 * OPREQ files reordered. * 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 5 (REVISIONS) F 3 171 * C8510h 31 Oct 85 * 172 * Renamed CAIMSABORT to CAIMABORT. * 173 * Removed unused symbol ALIAGVER, and unused pointer * 174 * LONGERSP and word LONGERS. * 175 * Set bit in PCB indicating special project for CPU patch * 176 * process and CPU stop process. * 177 * Set FLAGS bit in POWERUP to reload CPU microcode patches. * 178 * Removed TERMTIMING word (now kept track of in COMBLOCK). * 179 * Boxed out ascii parity table, TTYPARTAB (unused). * 180 * Changed FCFBC to FCFBD (file being destroyed not closed). * 181 * C8511a 04 Nov 85 * 182 * Changed FILLTCQ to not do CMOVE into TCQ. Changed * 183 * terminal write code to catch user memory errors. * 184 * Changed ORDESACCT OPREQ to call XREQs to return disk * 185 * and CPU limits to manager account. * 186 * Removed halt S0201 from comm driver. * 187 * C8511b 04 Nov 85 * 188 * Minor bug fixes to the backup/recover requests. All * 189 * recover requests should trap user memory errors * 190 * correctly. Initialize volume request should copy * 191 * the system configuration information and store it * 192 * into both security blocks. * 193 * C8511c 06 Nov 85 * 194 * Implementation of the account foreign flag. This * 195 * prevents managers on a volume from a different system * 196 * from having access to accounts not on his volume. * 197 * Boot, PowerUp, PowerDown, Sleep accounting records * 198 * are now written to the manager.!!! account if an * 199 * accounting file exists. * 200 * C8511d 11 Nov 85 * 201 * Register usage change in FRQNOPEN to ensure that * 202 * initial privileges are set properly. * 203 * The account names in file accounting records have been * 204 * switched, this allows the entries to be written to the * 205 * correct manager/user accounts. File actions are not * 206 * logged if the file accessor is also the file owner. * 207 * Checks for alias or unalias account being same as logon * 208 * account when creating accounting record moved to central * 209 * routine. * 210 * Failed alias accounting record now contains logon * 211 * account name. * 212 * Reorganization of the INITDEVACS and LINKPHYDEV routines. * 213 * C8511e 13 Nov 85 * 214 * Changes to OPEN and CLOSE code to keep terminal busy * 215 * count in the TCB so that any port may be opened * 216 * both RO and RW. * 217 * C8511f 14 Nov 85 * 218 * Combined FREQECHO, FREQUNIT, and FREQMKPATH into * 219 * FREQUNIT file. * 220 * Added FREQ to switch resources associated with 2 units. * 221 * Moved code to make accounting entries for evicts, * 222 * aborts, etc. into a subroutine. Rearranged code in * 223 * OPR process control section. * 224 * Fix to the logoff code so that an unalias record gets * 225 * the correct logon account name. * 226 * C8511g 18 Nov 85 * 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 6 (REVISIONS) F 3 227 * Added OPREQs to put a process in the STOPWAIT queue, * 228 * and to remove it from same. Made changes to DISPATCH * 229 * to actually put the process in STOPWAIT. Added 2 new * 230 * accounting types for these activities. * 231 * C8511h 27 Nov 85 * 232 * Bug fix to lock PCNTLLOCK in PROCPOWER 0 case. * 233 * Changed PROCPOWER to allow nonzero self-spec even * 234 * if the requester is a system session. * 235 * Changed powerfail code to live through multiple * 236 * powerfails. Involved POWERUP, POWERUP2, OWNCOPY, * 237 * ZEROPAGE, CIADRIVER, and new CPU var POWERRTNPC. * 238 * Enhancements to the foreign account restriction. * 239 * Basically, we disallow access by foreign accounts and * 240 * inhibit access to foreign accounts. Foreign accounts * 241 * may only receive information on similar foreign * 242 * accounts (same system serial number), while * 243 * non-foreign accounts will not receive privileges * 244 * over foreign accounts. * 245 * C8512a 04 Dec 85 * 246 * Changes to the open service routine to initialize * 247 * the SAF end pointers when files are opened /RO. * 248 * This allows faster SEODs even when the file is * 249 * not open for writing. * 250 * Removed jump around check for CM unit in LUNSEARCH. * 251 * Fix exchange save request to set the SAF end pointers. * 252 * Added UNITWAIT queue for processes waiting to give or * 253 * receive units from other processes. Added UREQs to * 254 * give and receive units between sessions. * 255 * C8512b 04 Dec 85 * 256 * Added check in create FCB routine to ensure enough * 257 * user free storage before we hand out a new FCB. * 258 * This prevents system crashes by arbitarily * 259 * opening a whole slough of units. * 260 * C8512c 05 Dec 85 * 261 * Fixed TAPENOTRDY in MTDRIVER to not loop trying to * 262 * rewind a drive that has errors but is still "ready" * 263 * and the controller is not dead (reported by UK). * 264 * Changed message send UREQ to pass bit indicating it is * 265 * ok to interrupt receiver if his interrupts are enabled. * 266 * Added to OUTTSET creating and linking in a command * 267 * element to reset the port's primary status word. * 268 * Added check in CHECKUINT for unit being given interrupt. * 269 * C8512d 09 Dec 85 * 270 * New OPREQ for CM to use when attaching to a session. * 271 * UINTDISC returns unit number of disconnected terminal as * 272 * parameter (high bit set if absolute i/o unit). Changed * 273 * UNMOUNTVOL in MSPROC to use MDVVOLFLD symbol, instead of * 274 * VOLFIELD, for clarity. Changed CHECKSTATE to not * 275 * UNMOUNTVOL in NODRIVE case if the drive was not thought * 276 * to be ready. Changed UNMOUNTVOL to log 'not ready' * 277 * even if there was no volume mounted. * 278 * C8512e 10 Dec 85 * 279 * Increased stack size for the error log process to 7 to * 280 * give a little more margin for changes in stack usage. * 281 * Added new error code for attaching to session so that * 282 * we can pass the session number of the attacher to the * 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 7 (REVISIONS) F 3 283 * attachee. * 284 * Added another entry into LUNSEARCH (LUNSEARCHX) that * 285 * checks for units 201 and up being in control mode. * 286 * Changed FRRESSWTCH and URGIVEUNIT to use LUNSEARCHX. * 287 * C8512f 11 Dec 85 * 288 * Added code to check for new PPUs on an all SMU system * 289 * and if found to enable triple word transfers for the PPU. * 290 * Modified slot loop in initial to loop once looking for * 291 * memory and then loop looking for other devices. This * 292 * removes the OS requirement that memory must reside in * 293 * slots lower than other devices. Modified DEADMAN to * 294 * reset the bit in the PPU to enable triple word transfers * 295 * whenever a device attached to the PPU must be reset. * 296 * C8512g 18 Dec 85 * 297 * Bug fix in ORATTACH request. * 298 * Changed register usage in INTPROC so R1 will contain * 299 * error code at STOPC1200 even if the error went through * 300 * PASS2CM on the way. * 301 * Changed URGIVEUNIT to allow giving a control mode unit * 302 * even if privilege is not modify. * 303 * Fix to catalog read request, so that if one has no * 304 * privilege to a DIR than the header information for the * 305 * system volume is returned. * 306 * Rewrite of the recover file request to recover hardware * 307 * file types properly. Also additional fixes to make * 308 * ready on full implementation of selective backup. * 309 * Fixes to the unit give and receiving requests to * 310 * properly update the related hardware control elements. * 311 * Fix to disallow access to device from file other than * 312 * one in hardware.sys on system disk, A/U error returned. * 313 * C8512h 27 Dec 85 * 314 * The ORATTACH request no longer allows the requesting * 315 * session and the destination session to be one * 316 * and the same! * 317 * C8601a 05 Jan 86 * 318 * Addition of SETMEMTRAP for a text with forms write, this * 319 * traps correctly when fetching the control character. * 320 * Also change to the memory protect recover code to pass * 321 * error directly to overprocess (PASSERRUP) and not to * 322 * process as an XREQ error (FERROR). * 323 * Reorganization of the backup recovery request to check * 324 * for exceeding limits. * 325 * Addition of the ULLIMLOCK to setup critical region when * 326 * changing limits in the ULB. This was necessary because * 327 * most of the fields in the ULB are ZBMs. Proper locking * 328 * will be implemented initially for ULDSKUSD, others to * 329 * follow. * 330 * C8601b 06 Jan 86 * 331 * Bug fix in UREQRCVU to properly set FCB pointer in TCB. * 332 * C8601c 08 Jan 86 * 333 * Better checking for CM units in FRRESSWTCH and * 334 * URGIVEUNIT requests. * 335 * Minor fixes for foreign account checking. Also fix * 336 * to DIR read to return proper system number. * 337 * C8601d 14 Jan 86 * 338 * Added a NOP in memory parity error routine so that it * 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 8 (REVISIONS) F 3 339 * can be easily patched to not send a WRU(0) to MCUs. * 340 * Added backup privilege to INITPROC. * 341 * Rewrite the code file write protect code to not * 342 * use RSEEK. Change to RSEEK to unmap WNDO1. Changed * 343 * all callers of RSEEK accordingly. * 344 * C8601e 16 Jan 86 * 345 * Change to FROPEN code to properly free a file if the * 346 * file being destroyed bit is set. * 347 * Fixes to ensure proper list locking during updates to * 348 * word 0 of the ULB. This was a possible cause for ULB * 349 * list screwups, if others occur, then we need to look * 350 * elsewhere. * 351 * Implemented the new ULB limit lock, ULLIMLOCK, to * 352 * protect following fields: ULDSKUSD, ULDSKLIM, * 353 * ULSCRDSK. Others to follow as necessary. * 354 * Reworked the create account request into two * 355 * separate requests, one for managers the other for * 356 * backup. * 357 * Fix so that the correct account serial number gets * 358 * placed into FBI on share and authlist blocks. * 359 * Fixes to GETPUTADT to avoid PUNLOCK on a lock not * 360 * held. Added a GRUB for block about to be freed. * 361 * Added MAPOUTFBI and GRUB in disk error processing * 362 * to dump bad block before continuing. * 363 * C8601f 21 Jan 86 * 364 * Tiny RAFs added. Change to terminal delay so * 365 * rounding errors will not generate a POB error. * 366 * PFNOREFVAL added to MACHDEFS and used in PFPUTIL. * 367 * Change in Timer at SSU_INT to save one instruction. * 368 * Fix to open of .DIR, so that account serial number * 369 * is put into the FCB. * 370 * C8601g 21 Jan 86 * 371 * Fix to file size updating when expanding a RAF. * 372 * Change create account to use logon ULB and not * 373 * privilege ULB if program has backup privilege. * 374 * C8601h 23 Jan 86 * 375 * Minor bug fixes to create account code. * 376 * Minor bug fix to recover RAF file pages. * 377 * Bug fix in GETFSEQN associated with new SSU ucode * 378 * for clock update to memory. * 379 * C8601i 24 Jan 86 * 380 * Addition of an Executive Request to cycle the * 381 * cartridge tape, FRCYCLE FREQ (1E). * 382 * C8601j 28 Jan 86 * 383 * Bug fix in Monitor parameter out of bounds error * 384 * return (clears IHBUSY). * 385 * Fix to error recovery for SAF write. File lengths * 386 * and account limits should all be restored properly. * 387 * C8601k 30 Jan 86 * 388 * Addition of an Executive Request to recover an * 389 * account and deallocate the needed resources from an * 390 * appropriate manager. * 391 * C8602 03 Feb 86 * 392 * Mask character before checking if line kill. * 393 * Change to SCAN4DLY to also look for the character * 394 * with the high bit turned on. * 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 9 (REVISIONS) F 3 395 * Change in SMUCHECK due to the high bit no longer * 396 * being set on error responses. * 397 * Added CHECK4CM subroutine to ensure that if a unit is * 398 * CM's then CM is the one diddling with it. Added calls * 399 * to this in rewind, backspace, and skip to filemark * 400 * backwards requests. * 401 * Changed FCSAFEPP, FDSAFEPP, FCSAFEND, FDSAFEND to FCEPP, * 402 * FDEPP, FCEND, FDEND to reflect their usage by non-SAFs. * 403 * Changes to keep track of the RAF end position. * 404 * C8602a 04 Feb 86 * 405 * Removed unused symbols from create and destroy account * 406 * XREQs and stack allocation from destroy account XREQ. * 407 * Added new halt code to replace the second usage of * 408 * HALTS1280. Changed error exit in recover FP to unmap * 409 * FBIs. Removed label GIVEDSEUM. * 410 * Removed VIQDIDLE from volume information request record, * 411 * UPCOMSGSER from UPC, UERRORDSE error return from * 412 * XREQPROC, and DORELSSDE error return from release FREQ. * 413 * Bug fix to WHOLOOK routine to check only a limited class * 414 * of privileges, rather than the whole UPCPRIV field. * 415 * Fix to exchange save to propagate the file log bit, not * 416 * log the unsave of the orignal file, and log the * 417 * exchange save. Change CPR to UCPR in RSEEK and WSEEK * 418 * so very large RAFs will work. * 419 * C8602b 05 Feb 86 * 420 * Bug fix to create account so that manager ULB is freed * 421 * when no longer needed. Change to RAF position code so * 422 * that it checks to see if back at load point. Fix to * 423 * the backup file page request to not loop indefinitely * 424 * if the very last block in a large RAF is non-hole. * 425 * C8602c 07 Feb 86 * 426 * Fix to file log event subroutine to ignore those events * 427 * caused by the system. This prevents system crash by * 428 * setting FLOG flag on accounting.logfil file. * 429 * Headchecker now suppresses potentially confusing Perm * 430 * Read log entry (only one error is needed to perm a * 431 * block during head check). * 432 * Addition of sequential RAF read and write routines * 433 * (FRSREAD, FRSREADB, FRSWRITE). * 434 * C8602d 10 Feb 86 * 435 * Modify FRSEOD request to work for RAFs. Addition of * 436 * FWSP and BKSP routines for RAFs. New FREQ FREPP added * 437 * to return the end position pointer of a RAF or SAF. * 438 * Echo unit now allowed to deal with RAFs. * 439 * C8602e 11 Feb 86 * 440 * Programs running with backup privilege no longer do * 441 * any file logging, regardless of the FLOG flag value. * 442 * Added trace calls to substitution process. * 443 * C8602f 26 Feb 86 * 444 * Bug fix in unsubstitute process. Set NOSUB flag in FBI * 445 * of substitution block during volume recover request. * 446 * Fix to the session information request so that CPU time * 447 * limit is returned in seconds and not milliseconds to * 448 * agree with documentation. * 449 * Fix to create account so that error returned if trying * 450 * to create account on a foreign volume. * 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 10 (REVISIONS) F 3 451 * Added entry in LFWEIGHTTAB for UNITWAIT queue. * 452 * Change to volume mount code to set the new volume * 453 * revision level in the volume label. This prevents * 454 * an old OS from mounting a volume with tiny RAFs. * 455 * Changed INITTERM default for TCLASTCOM2 to include * 456 * 1*PCFBRKOUT (terminal should delay output during break). * 457 * C8602g 27 Feb 86 * 458 * Converted the backup RAF/CODE page lookup into a * 459 * subroutine and added an Executive Request to find * 460 * the next non-hole page in a RAF/CODE (FRRAFNEXT FREQ). * 461 * C8602h 28 Feb 86 * 462 * Removed PABLOCK and replaced it with PAPPLPTR. This * 463 * also involves calling TESTTRUBL before the WSX check. * 464 * Minor bug fixes to the find next non-hole in RAF/CODE * 465 * request. * 466 * C8603a 13 Mar 86 * 467 * Fixed READ in MSPROC to ensure block with segment * 468 * correction is actually rewritten. Took out * 469 * 'unloaded vol' check prior to SUBSTITUTE call * 470 * (redundant because SUBSTITUTE checks). * 471 * Backup privilege now sufficient to execute manager * 472 * requests. However the privileges come from the * 473 * logon account and not the privilege account (OWNDIR * 474 * is ignored). * 475 * Added global file control block for all files opened MW. * 476 * Change FDE to use a 2 bit field to keep track of RAF * 477 * type. Added this field to the FCB (used only for RAFs * 478 * and CODEs). Removed RAFPTRLOCK (now lock is on a * 479 * per file basis in GFC). * 480 * C8603b 25 Mar 86 * 481 * New user interrupt scheme. Trapping goes up the * 482 * underprocess tree. Errors not lost in process * 483 * switching. Errors can be local to underprocess. * 484 * Trapper's TCG, TCA, and TCINTE are used even if * 485 * trapper is not CPCUPC. * 486 * Fix in OUTTSET so second element created will not * 487 * be lost if the port must be XONed. * 488 * Moved a call to DELINKUERR outside of the critical * 489 * region locked by PSLOCK. This was because DELINKUERR * 490 * itself attempted a lock on PSLOCK. * 491 * Bug fix in OPEN code when file being destroyed bit * 492 * is set. Fix to FREEFILER to properly free a RAF. * 493 * Fix to DISMTDMY to properly cancel disk low message. * 494 * C8604a 04 Apr 86 * 495 * Changes made to the logon and logoff request to adjust * 496 * scratch block limits so that the current logon account * 497 * (system account also) reflects what is in use. This * 498 * also involved changes to Control Mode, for additional * 499 * details consult the begining of the Control Mode * 500 * listing. * 501 * C8604b 15 Apr 86 * 502 * Change to initial so that when each TCB is built a * 503 * default baud rate of 300 is set for both the input * 504 * and output bauds. * 505 * Change to CHECKDCH routine to store its return address * 506 * on a preallocated stack location. * 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 11 (REVISIONS) F 3 507 * Added FRTAPESTAT to return PPU and controller status * 508 * for a tape device. * 509 * Added new error code for read errors. Changed mag tape * 510 * driver to return read error. * 511 * C8604c 17 Apr 86 * 512 * Fix to the substitution process so that grub of a * 513 * swapping page does not allow page to go to ADT. * 514 * Unsubstitution will occur when user is finished with * 515 * page. See comments in the Disk Substitution Process. * 516 * Changes to CIA driver to link an error element into * 517 * the chain of input TCQs when a framing or parity error * 518 * occurs or the input buffer overflows. Terminal read * 519 * now will return the error. * 520 * C8604d 25 Apr 86 * 521 * Fix exchange save to preserve the user defined field. * 522 * Reworked the URLUNITS UREQ to compact space and return * 523 * proper buffer remaining counts if users buffer is * 524 * initially too small. * 525 * C8605a 01 May 86 * 526 * Fix to FRXSAVE FREQ to get the file name from the * 527 * original files directory. This prevents bogus * 528 * filenames from appearing if the file got renamed * 529 * after it was opened. * 530 * C8605b 15 May 86 * 531 * Changed parity error routine to not perform a WRU but * 532 * instead do a data read of location zero, then pick out * 533 * the slot type from the SLOTTABLE. Added ADJUSTCYL * 534 * before checking second set of tracks in CHECK1HEAD * 535 * (first read of second set was repeating the last read * 536 * of the first set). * 537 * Added minor fix to cancel account so that bogus * 538 * error code would not be returned incorrectly * 539 * (undefined opcode). * 540 * C8605c 19 May 86 * 541 * Bug fix to TIME2DISK routine. If VOLN contains zero * 542 * for the security block (maintenance mounted) then * 543 * hour stuff is ignored. * 544 * Addition of two Executive Requests: one adds an * 545 * account name to the system AFT (ORADDAFT OPREQ) ... * 546 * the other removes an account from the system AFT * 547 * (ORDELAFT OPREQ). * 548 * C8605d 21 May 86 * 549 * Fix in COMM driver to unsuspend a user from TERMOWAIT * 550 * when TERMWBUSY goes to zero. Set TCBAUDROOM when * 551 * output baud rate is changed by FREQ. * 552 * C8605e 22 May 86 * 553 * Changes made to the internal structure of the system * 554 * NVM. The time values NVMCLOCK1 and NVMCLOCK2 are no * 555 * longer used. Instead the lower 16 bytes of the * 556 * DEATHFLAGS are used to hold four separate 32 bit time * 557 * values. Each hour the oldest time is over written. * 558 * The times are deemed to be good if two of the latest * 559 * times are within one hour and one minute of another. * 560 * C8605f 23 May 86 * 561 * Added new field in the PSA to keep session number that * 562 * receives message when session logs off. New XREQ * 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 12 (REVISIONS) F 3 563 * to set field and changed URSESSINFO request to return * 564 * current value. Message to be sent by Control Mode. * 565 * C8605g 27 May 86 * 566 * Fix to the set PAC/FAC fields with respect to BACKUP. * 567 * It turns out that backup needs to unconditionally set * 568 * or clear the PAC/FAC fields. Also some minor code * 569 * cleanups were done in the file ACCTDIDDLE. * 570 * C8606a xx Jun 86 * 571 * Fix to write filemark (SAF), to not jump to nullwrite * 572 * label at conclusion of request, the problem was stack * 573 * size incompatabilities. * 574 * Minor fix to the NVM clock check, clock time could be * 575 * as great as 1 hour and 5 minutes difference. Did not * 576 * have enough of a fudge factor here. Also necessary to * 577 * rearrange the NVM definition for the new clock values, * 578 * error due to misunderstanding of the death flags. * 579 * These flags begin at the end of the NVM and work their * 580 * way towards the begining. * 581 * C8606b 11 Jun 86 * 582 * Fix to TIMER to modify rollover test to work if system * 583 * stopped at rollover. Added "idle" state to MS driver, * 584 * which is entered for 800 ms a) when the drive comes * 585 * ready, b) after reading the kludge board, and c) upon * 586 * entering REZERO, if a previous REZERO call failed. * 587 * Reinstalled delayed head check in CHECKSTATE, because * 588 * idling drive now takes up the slack time coming ready. * 589 * Heads are retracted upon final REZERO failure. Fixed * 590 * logging of "not ready" on drive without volume mounted. * 591 * Moved HAVESSU call into first bus device initialization * 592 * loop in INITIAL. * 593 * C8606c 18 Jun 86 * 594 * Fix to the terminator scan code in the comm driver. * 595 * Because it is now possible to have error elements as * 596 * well as blocks of characters, the terminator scanner * 597 * needs to ignore the error elements. * 598 * C8606d 23 Jun 86 * 599 * Added fix to the local unit information request to * 600 * clear the temporary buffer as each unit is processed. * 601 * Added code to the initproc to make sure locations on * 602 * virtual page zero are initialized. PROMBOOT does not * 603 * store into all location hence some will have parity * 604 * errors when they are read (this gives the crashdump * 605 * code problems). This problem appeared due to the * 606 * release of the SMU, the fix needs to made in PROMBOOT. * 607 * C8607a 08 Jul 86 * 608 * Changed STMW R1,FBIDA to STMW R1,FBIWORDB in disk * 609 * driver at READOVER(2) to match that at READ(9). The * 610 * earlier change was made sometime between July 85 and * 611 * Oct 85 to prevent getting parity errors caused by * 612 * uninitialized memory. * 613 * C8608a 01 Aug 86 * 614 * Small bug fix to the system free memory overlap check * 615 * routine. The check for index out of range was incorrect. * 616 * Change to the ADDSWAP and LIMITCHECK routines to * 617 * differentiate between account limit and session limit * 618 * errors. Change error code C5 from account limits * 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 13 (REVISIONS) F 3 619 * exceeded to session limits exceeded. * 620 * Fix to create account request to allow manager.!!! to * 621 * create proprietary account. * 622 * Fix to the temporary code that initializes words on * 623 * page zero, was not storing enough words. * 624 * C8608b 05 Aug 86 * 625 * URPGO no longer zeroes the requester's R0 before letting * 626 * the underprocess run. Was causing screwups with * 627 * new user interrupt scheme because URINTRTN to UREQ * 628 * instruction would be with R0 = 0 (i.e. interrupt * 629 * occurred while underprogram was running). * 630 * C8608c 10 Aug 86 * 631 * New OPREQ ORSTRTSPLR to start up the spooler without a * 632 * password in the batch file. Changed INITPROC to use the * 633 * same subroutine, STARTSPLR (moved MAKEBATCH to OPREQ). * 634 * C8608d 15 Aug 86 * 635 * New subroutine UNMAPPAGE (merged with UNMAPFILE), and * 636 * calls to it from the FRDELPAGE FREQ. No unmap of * 637 * deleted file page was causing FBI mismatches on * 638 * subsequent page faults (3.12-5). * 639 * C8608e 18 Aug 86 * 640 * Fixed XREQ monitor to set up BREAKTAB entry in XHTABTAB. * 641 * Was leaving it 0, causing S0007 when user singlesteps. * 642 * C8608f 19 Aug 86 * 643 * Fixed FRSETCCB to correctly set the OWNDIR bit (reported * 644 * by 80101, no SPRs). * 645 * C8608g 29 Aug 86 * 646 * Fixed ORDEVINFO to correctly set the DIDRVNUM field. * 647 * C8609 03 Sept 86 * 648 * Made death bias for system 3 years * 649 * C8609a 04 Sept 86 * 650 * Foreign accounts are now defined to be accounts that * 651 * reside on a volume in which the volume customer number * 652 * does NOT match the customer number of the system. * 653 * C8609b 04 Sept 86 * 654 * Modified check to see if a PPU can do triple word * 655 * transfers to use a bit array on PPU microcode revision. * 656 * C8609c 07 Sept 86 * 657 * Change to ORDESACCT OPREQ to allow manager.sys to * 658 * cancel proprietary accounts (.& only). * 659 * C8609d 09 Sept 86 * 660 * Fix to PPU triple word transfer check. * 661 * C8609e 22 Sept 86 (3.11, Alpha 22) * 662 * Fix to open code so that RAF type gets set into the FCB, * 663 * this was causing serious problems (all RAFs assumed * 664 * empty on first open). * 665 * C8609f 30 Sept 86 * 666 * Fix to CIA interrupt processor to remap user free * 667 * storage after giving terminal disconnect error. * 668 * Changes to disk driver to allow online disk formatting, * 669 * this includes new XREQ (ORFORMAT OPREQ). * 670 * C8610a 03 Oct 86 * 671 * Fix maintenance dismount code to proceed with dismount * 672 * even if disk is offline. Also changed REMOUNT in the * 673 * disk driver so if MDV can not be associated with * 674 * volume then MDVVOLFLD is cleared. Minor changes to * 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 14 (REVISIONS) F 3 675 * DOWRITEREQ in regards to format operation. * 676 * C8610b 10 Oct 86 * 677 * Fix to the ORSECTRK OPREQ, it was eating R5 (FCB) before * 678 * jumping to FERROR. Fix to the format routine within * 679 * the disk driver, illegal store to begin operation * 680 * caused seek error. * 681 * C8610c 14 Oct 86 * 682 * Fixed FRSAVE FREQ to return XREQERISYR (instead of * 683 * XREQERDSKL) on directory overflow. * 684 * Fix to cancel account so that manager.sys may cancel * 685 * normal system accounts. * 686 * Revision of the format operation from a write request to * 687 * a read request. This was necessary because locking the * 688 * output queue lock might cause deadlock in certain cases. * 689 * C8610d 15 Oct 86 * 690 * Fixed CHKBZYACS to allow PATH MW -> RO in 0,X,X instead * 691 * of 0,1,X. * 692 * Erased write check operations from windows and included * 693 * a new maintenance write request to perform the * 694 * write/write-check operation. * 695 * Fixed PATHREAD and CHKPTHREC to return XREQERREOD only * 696 * if path is actually empty on the second attempt. Before * 697 * it would give REOD if FCLASTREAD said EOD, regardless of * 698 * current state of the PATH. * 699 * C8610e 23 Oct 86 * 700 * Change to create account so that only customer numbers * 701 * are checked to see if new account is foreign. * 702 * Special maintenance bits have been added to the VP and * 703 * PAL elements to allow greater flexibility within the * 704 * disk driver. These bits control substitutions, error * 705 * handling and write-checks. * 706 * C8610f 28 Oct 86 * 707 * Fixed INITPROC and LIQUIDINIT to unload the INITPROC * 708 * PF locations for all CPUs, not just the executioner. * 709 * C8610g 29 Oct 86 * 710 * Change disk driver so the CLEARFAULTs and REZEROs are * 711 * done prior to the requested operation rather than after * 712 * the operation. Preserves more accurate disk status. * 713 * C8611a 03 Nov 86 * 714 * Changed disk driver to not fiddle with the FBI on a disk * 715 * read error if special error handling in force. Changed * 716 * maintenance write to shutdown awaiting forcewrite. * 717 * C8611b 13 Nov 86 * 718 * Bug fixes to the head checker: zero PPL holder of bad * 719 * trax block so when head checker inhibited, same PPL does * 720 * not get repeatedly freed, zero error counters prior to * 721 * performing a head check. * 722 * C8612a 02 Dec 86 * 723 * Changed STATCHANGE routine of CIADRIVER to not mask the * 724 * port status prior to tracing the state change. This * 725 * lets us look at everything (line parity/framing error). * 726 * Fixed FINDPATH to ensure read type access exists on * 727 * particular FCB (before, if a session had both an RO and * 728 * an RW unit open to the same path, it was possible to * 729 * say that the RW was "non-empty"). * 730 * Fixed CHECKUINT/CHECKEVENT to not cream R3 in NE term * 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 15 (REVISIONS) F 3 731 * and NE path checks. Was causing hangs for all but NE * 732 * term (GRW). Small cleanup in DISPATCH (NONEVB code was * 733 * duplicated in DPRUER). Fixed OVPUPONE and OVPDOWNONE * 734 * to CHECKUINT with the new process' CAINTMASK instead * 735 * of using -1. Was causing extra errors to be generated * 736 * (C1200 at GRW, to boot!). Proper interlock in * 737 * CHECKNOINT. Rearranged fields in tape MTU element * 738 * to prevent CPU interlock problems. * 739 * C8612b 05 Dec 86 * 740 * Fixed problem in open code where a disk or parity error * 741 * rips us out of the SHLCHKALL routine and the VAR (R7) * 742 * pointer does not get reset. * 743 * C8612c 06 Dec 86 * 744 * Changed so FCB of .TERM with NA access has FCDCBPTR * 745 * pointing to TCB(was nil). This allows unit to get * 746 * information about the terminal (no I/O or ints, tho), * 747 * esp. if terminal is busy. * 748 * C8612d 18 Dec 86 * 749 * Bug fix so that files can be created during the open, * 750 * bug introduced in version C8612b. Fixed URRCVUNIT and * 751 * ORSTRTTERM to check for fake .TERM condition (make sure * 752 * FCDCBPTR is not nil before using it). * 753 * Change to OPEN code so that the RAF conversion code is * 754 * not duplicated. * 755 * C8701a xx Jan 87 * 756 * Rearranged STATPI routine (URSESSINFO and ORSESSINFO) * 757 * to decrease possibility of 'bad ULB' (S10E1) halt when * 758 * calling USEULB on PSDFLTDIR of other session. * 759 * Fix to the CIA interrupt routine when unit disconnect * 760 * occurs. Sign bit is supposed to be set if the unit * 761 * number (error subcode) is an absolute IO unit. * 762 * Fixed FRSHARE FREQ to disallow empty acct name/proj * 763 * combination. Fix to access changes on /MW RAFs so that * 764 * the file length does not get reset to zero. * 765 * Fixes to RAF control requests to call RAFCURCHEK if * 766 * file opened /MW. * 767 * C8701b 16 Jan 87 * 768 * Changed URPSETREG and URSSINTARM/URSCINTARM to correctly * 769 * calculate masks for CHECKNOINT and CHECKUINT. Removes * 770 * SETCHKMASK subroutine from existence. * 771 * Added code to check if the SSU has the new 2K NVM and * 772 * adjust the number of clock values it stores from 4 to * 773 * 64. * 774 * C8701c 17 Jan 87 * 775 * Fixed GETTRAPPER to check UPCNETINTE correctly (changed * 776 * JNE to JEQ). Fixed GETTRAPPER to check whether unit * 777 * int is for unit available to the prospective trapper. * 778 * UPC is disqualified if not. Was allowing overprocesses * 779 * to get interrupts from units strictly local to an * 780 * underprocess. * 781 * C8701d xx Jan 87 * 782 * Mods to the NVM updater in INITPROC. * 783 * C8702a 09 Feb 87 * 784 * Moved RAFCURCHEK call from DSTRAF (DESTRYDEV) to RRAFUM * 785 * (INITDEVACS). Ensures that RAFCURCHEK caller has a * 786 * GFC (FCDCBPTR) that has not been freed (RAFCURCHEK is * 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 16 (REVISIONS) F 3 787 * now called before the use count is decremented). Moved * 788 * zero address check for RAFCURCHEK and UPDATEGFC into * 789 * the subroutines themselves (before, it was done by every * 790 * caller). Fixed ORSTRTBAT to set PCSPECPROC iff caller * 791 * is in monitor. This makes Manager.!!!:Boot.Batch, * 792 * Manager.Sys:Boot.Batch, and the Spooler special (also, * 793 * any concurrent sessions they might start). Fixed * 794 * OPRSTRTSPR to end by jumping to UERROR w/error code, * 795 * instead of jumping to NOERROR. * 796 * C8702b 15 Feb 87 * 797 * Removed redundant error code checks at PASS2CMO in * 798 * DISPATCH (now can jump directly to GIVEINT from within * 799 * PASS2CM). Added CMERRB and CMERR to UERPROT (user error * 800 * elements). CMERRB flag indicates error is to go straight * 801 * to CM. Saves code in dispatcher at PASSUP. Fixed up * 802 * UERRSET calls for the related errors (UINTVAR, UINTTDISC, * 803 * UINTOPRQ, and UINTATTACH). Fixed URSENDERR to mask off * 804 * CODEPART of code being sent. Before was just clearing * 805 * VERYBADB. * 806 * C8702c 16 Feb 87 * 807 * Reworked PUTINCHAR in CIAINUTIL. Input buffer overflow * 808 * now does not cause "break", because we queue a read * 809 * error element. Rearranged code because less needs to * 810 * be shared. Moved code in OCSTOREIN (still PUTINCHAR) * 811 * to save an instruction. * 812 * C8702d 18 Feb 87 * 813 * Merged in the NASSEMs for online disk formatting. * 814 * C8702e 19 Feb 87 * 815 * Change user virtual storage scheme so that we can * 816 * generate a user interrupt when free storage is getting * 817 * scarce. This required changes in the USERMEM page * 818 * definitions, the PSA/UPC error list root (RTUERRORZ), * 819 * DISPATCH, BLDPROCESS, and the user GETMEMs. It added * 820 * HALTS0072 and the OPREQ ORRESETVM. * 821 * C8702f 21 Feb 87 * 822 * Fix to OPEN share list checking. Was using wrong * 823 * window after SRCHDIR to get info for SHLCHKALL, when * 824 * DIR is RAF-type. Problem introduced in C8612b. * 825 * Fixed change in OPRSTARTBAT to use correct console area * 826 * pointer in determining PCSPECPROC. * 827 * C8702g 23 Feb 87 * 828 * Fixed UERRSET/UERRSETY to correctly mask error code * 829 * before duplicate-error LSRCH. Mask instruction used * 830 * 0FFFFFFFF for an operand (made it a NOP!). Allowed * 831 * duplicate errors causing various problems. Fixed * 832 * FRUNITID/FRUNITIE FREQs to use CPCUPCs CAINTMASK for * 833 * call to CHECKUINT. Was blanketly using CAIMNETERM and * 834 * CAIMNEPATH bits, now these are ANDed with user's mask. * 835 * C8702h 24 Feb 87 * 836 * Fixed up DISPATCH to dispense user interrupts more * 837 * smoothly. Removed UERHELD bit from UER element. Now, * 838 * CAINTENABL is turned off prior to moving to process * 839 * getting interrupt. Change sense of mask to CHECKNOINT. * 840 * Changed SOME (!) callers appropriately ... others * 841 * already had it backwards. Fixes problem of some user * 842 * interrupts not going away. Fixed URPSETREG UREQ to * 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 17 (REVISIONS) F 3 843 * handle IAR/IMR changes correctly. * 844 * C8702i 25 Feb 87 * 845 * Changed FRSETCCB FREQ and URPSETREG UREQ to just change * 846 * the FLDADRS part of CAINTADR. This ensures UPR15 is * 847 * zero for other checks. * 848 * Replaced CMENTRY (initial CM PC) with CMODECA. CMODECA * 849 * is set from CCBPREGS in INITPROC. UERRCMMK uses it to * 850 * initialize R0:R7, IMR, IAR, and PC upon UINTLOGIN * 851 * interrupt. Allows CM to specify many initial registers. * 852 * C8702j 26 Feb 87 * 853 * Fixed ORDESAUTHE OPREQ to not do an extra FREEULB. * 854 * Was causing S00E0 halts if FERRORNSE was given (halts * 855 * in +MGRs FRCLOSE FREQ of .VOL, because FCLIMITPTR * 856 * was freed). Cleaned up exit code in PRESETAUTH. * 857 * Changed DISPATCH to hold off interrupts to CM if the * 858 * CAINTENABL flag is off and the error element has the * 859 * CMERRB flag set. This prevents overwriting CM's * 860 * register buffer with a second interrupt while it is * 861 * processing the first. * 862 * C8703a 02 Mar 87 * 863 * Added code in LIQUIDATE to remove unused UER elements * 864 * from the UPC. Renamed MAPVALUES to PSMAPVALS. Minor * 865 * cleanup to MAPINMEM. Moved USERMEM to the first of the * 866 * "user virtual" pages. These pages now allocated in * 867 * ascending, rather than descending, order (changes in * 868 * MAPINMEM and GETVPAGE). Minor cleanup in BLKLIMCHK. * 869 * C8703b 03 Mar 87 * 870 * Cleaned up the USERMEM definitions. Renamed PSAOWNER to * 871 * UMEMPSA, XTRAMEM to UMEMXTRA, and ULOCK to UMEMLOCK. * 872 * These locations are now BSSs in themselves, and are not * 873 * referenced as an offset from USERMEM. Minor cleanup to * 874 * BLDPROCESS. * 875 * C8703c 05 Mar 87 * 876 * Fixed ORCREACCT OPREQ to get the customer number right * 877 * when checking for foreign manager. Problem introduced * 878 * in C8610e. * 879 * Fixed LEVELBIT to: perform "foreign" check after assuring * 880 * requester is a MANAGER, not give foreign MANAGER.SYS * 881 * special power, not give "self" power to foreign account * 882 * accessing native account with same name, and correctly * 883 * check just the customer number to decide whether two * 884 * foreign accounts are from same place. * 885 * Added VOLN element symbol VOLNCUST to replace instances * 886 * of VOLNSSN/CUSTNUM. * 887 * Changed UERRSET and UERRSETY to put new element at end * 888 * of list. Ensures that normal errors are processed in * 889 * the order they were received. * 890 * C8703d 06 Mar 87 * 891 * File open modified to NOT increment the total read * 892 * count on backup open. * 893 * C8703e 18 Mar 87 * 894 * Fixed FRUNITIGET FREQ to store answer in user's R1, * 895 * instead of in TCCIAPORT (!). * 896 * Changes in MSPROC to avoid reading head retract * 897 * board if pack label info indicates no board present. * 898 * C8703f 19 Mar 87 * 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 18 (REVISIONS) F 3 899 * Fix to BACKOUTRAF. Showed up when trying to expand * 900 * a RAF and received a disk full error. * 901 * C8703g 25 Mar 87 * 902 * Added XREQ error code XREQERUKP (0BC) -- * 903 * "Unknown parameter" * 904 * C8703h 26 Mar 87 * 905 * Fixed various AUTH list handling OPREQs to give * 906 * XREQERPOB if the specified volume name was all 0's. * 907 * Name=0 makes PRESETAUTH and GETAUTHN work differently, * 908 * so this keeps us from screwing up the AUTH list. * 909 * Fixed error recovery in OPRCAUT (ORCAUTHxx OPREQs) to * 910 * use correct register in GETAUTHN call. * 911 * Replaced store loop with CFILL in FREQSAVE. * 912 * Fix in BLKREADIN to get the right hash value for IDLE * 913 * pages. * 914 * 3.12 30 Mar 87 * 915 * Reassembled for Beta 22 release. * 916 * Fix to BLKREADIN to not destroy R1 when picking up * 917 * proper hash value. * 918 * Fixed ORMAINTW OPREQ to allow for new DA on block * 919 * (means changed check in MSPROCs WRITE DA error proc). * 920 * Added 8 bit filler in TCB (word w/TCBKSPC & TCPCADRS). * 921 * Fixed acceptable version of working 2K NVM SSU. * 922 * C8704a 07 Apr 87 * 923 * Fixed FRCATALOG FREQ window error recovery to actually * 924 * do the GRUBs (instructions were misplaced before the * 925 * label) (patched in 3.12-3). TCIQXOFFED moved to proper * 926 * section of TCB (patched in 3.12-1). * 927 * Minor cleanups to user interrupt processing in DISPATCH. * 928 * C8704b 30 Apr 87 * 929 * Cleaned up the loop in GPADTADDIT that moves MS addresses * 930 * from an ADT block to resident free list in VOLN. * 931 * Cleaned up ERRORLOG calling sequence in STATCHECK. * 932 * Cleaned up DISCARDPAL, DONEPPL, and FORCEWRWx. * 933 * Cleaned up ELPRESTART. * 934 * Fixed ORSTRTTERM OPREQ to use good PSA pointer for * 935 * in LOGONPROC calling sequence (patched in 3.12-1). * 936 * Removed left over jump table entry for ORFORMAT * 937 * in OPRQMAINTR (maintenance read OPREQs). XREQ * 938 * code had been changed from 0142 to 0152. * 939 * C8705a 18 May 87 * 940 * Changed SETWNDOx to STZ2 into VPWORDC (was STZ). * 941 * Fixed CANCELTMR calling sequence in MS_RESET to * 942 * include the PARL (patched in 3.12-2). * 943 * Remove unimplemented OPREQ code ORGCONFIG (0100, * 944 * get system configuration info) from VIRTDEFS. * 945 * Cleaned up exit code in FNDNONHOLE. * 946 * Cleaned up URDELAYx UREQs. * 947 * Fixed SAFREAD memory error handler to use PASSERRW1 to * 948 * prevent STOP0064 in later XREQ call (patched in 3.12-2). * 949 * Cleaned up PUTRECHEAD in SAF write code. * 950 * Changed SPLRTALK to include volume name in alias account * 951 * sent with OPEN requests. Will allow batch job initial * 952 * alias to go to shadow account (patched in 3.12-3). * 953 * C8705b xx May 87 * 954 * Cleaned up STRTMON routine (ORSTRTMON OPREQ). * 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 19 (REVISIONS) F 3 955 * Changed CANCELTMR in MSPROC to save R4. Fixes * 956 * register eating in MS_RESET (patched in 3.12-2). * 957 * C8706a 11 Jun 87 * 958 * URSTATPI routine (URSESSINFO and ORSESSINFO XREQs) now * 959 * uses absolute INPUT for determining online/dialup/etc. * 960 * Also, session is dialup if this unit is a .NULL (i.e. * 961 * session is disconnected waiting for ATTACH). * 962 * C8706b xx Jun 87 * 963 * Removed unneeded LD instruction from OPRQINITVL routine. * 964 * Cleaned up SETUPDIR in XRQOPRRCVR. * 965 * Fixed OPRQINITND (ORINITEND OPREQ) to not FERRORDSE if * 966 * a disk error occurs on a block being freed after volume * 967 * is recovered (block stays out of ADT, tho). * 968 * Fixed OPRRCVRFL (ORRCVRFIL OPREQ) to ensure that unit is * 969 * .NULL (errors result if FDE/FCB have real MS addresses) * 970 * (patched in 3.12-3). * 971 * Misc minor cleanups in CIA routines. * 972 * Fix in echo of line kill character (3.12-4). * 973 * Fix in MAPOUTMEM to do the correct 4 locations (3.12-4). * 974 * Fixed ORMAINTR OPREQ to ensure free and swapping pages * 975 * don't stay in PPAGELIST or PPUSDIDLE (3.12-4). * 976 * Fixed RECOVERFDE (file recovery) to copy FDCUSE from * 977 * .NULL to recovered file's FDE. Prevents HALT S109B * 978 * if another user grabs file as .NULL, then second user * 979 * closes the file (3.12-4). * 980 * C8708 26 Aug 87 * 981 * Changed calling sequence to GETNXTBLK (used in * 982 * sequential RAF read code). Was leaving the stack * 983 * messed up if a disk error occurred when the mapped in * 984 * page was referenced outside the subroutine (3.12-4). * 985 * Removed conversion code in Mount and fixed system * 986 * serial number check (3.12-4). * 987 * Fixed INITDEVACS to free the GFC on RAF going from MW * 988 * to RW or RO access (3.12-4). * 989 * Fixed DOTIMING in CIADRIVER to pass FCB as subcode to * 990 * UINTTDISC interrupt. Subcode no longer has flag for * 991 * 'absolute I/O'. Moved FCABSIO to FCSTATSTAT area * 992 * so that static status will reflect this attribute. * 993 * (CM altered to use FRSTATUS FREQ instead of disconnect * 994 * subcode flag). Functionality patched in 3.12-4. * 995 * Added VOLNFOREN bit. Modified FINDULB to use same, * 996 * MOUNTNAME to set it, and changevol to re-set it. * 997 * Modified FINDULB to save a word on the stack. * 998 * Modified SRCHAFTIDX, DELAFTIDX, and callers to pass * 999 * the account name triple by a single address parameter. * 1000 * Modified ADDIDXAFT and callers to pass the account * 1001 * name triple by a single address parameter. * 1002 * Misc minor changes in XRQOPRAFTIDX. Moved IOFF in * 1003 * GRUBVPEL to enclose entire critical region (3.12-4). * 1004 * C8708a xx Aug 87 * 1005 * Created common exit for some FRASxxx FREQs. Space * 1006 * and speed mods to process name table manager, pak6 * 1007 * and character conversion routines, ORBUSYVOL request, * 1008 * ZAPAFT, GETIDXACS, and CHARTOP6. * 1009 * Eliminated DISMTDMY1 as a separate routine because it was * 1010 * only called from DISMTDUMMY. Modified calling sequence * 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 20 (REVISIONS) F 3 1011 * to FBICKCKSUM and changed caller accordingly. Saves one * 1012 * MAPINMEM and MAPOUTMEM for each disk transfer. Fix to * 1013 * HOURINT to more accurately hit the hour in an unusual * 1014 * case. TSCAN macro and TSCANR routine eliminated. * 1015 * C8709 01 Sep 87 * 1016 * Fixed and cleaned up DIRINFOHD subroutine. Was not * 1017 * checking foreign flag on fake .DIRs, and was giving * 1018 * alias acct name and volume on .TERMs. * 1019 * Fixed ORCVOLNAME OPREQ to ensure new name is not null. * 1020 * C8709a 02 Sep 87 * 1021 * Fixed STRTSPLR to use URFREELUN to get unit number for * 1022 * SPLRBATCH file open. * 1023 * Changed OPRCVOLNAME OPREQ to use full blown CHECKSYM. * 1024 * C8709b 10 Sep 87 * 1025 * Changed MAKTRMSTAT to return the operand of the XREQ * 1026 * as the unit number rather than calling FINDUCE. * 1027 * Fixed OPEN to use file password for file share check. * 1028 * Was using acct pwd by mistake (3.12-5). * 1029 * Minor fixes to URLUNITS UREQ and DIRINFOHD. Info was * 1030 * not always consistent. * 1031 * C8709c xx Sep 87 * 1032 * Cleaned up STTERMTGRP to eliminate CALCTERMC call if * 1033 * absolute unit is not controlled by CPCUPC anyway. * 1034 * Minor mod to ?FREEMEM to only calculate buddy address * 1035 * in the path that uses it. Minor mods in clock driver * 1036 * regarding location of PFRC in TIMEADJUST and TIMEDRFT. * 1037 * Fix in LOOKUPBTRX in the disk driver to not clear a * 1038 * random page file location if BTRX list gave a disk * 1039 * error or FBI mismatch (3.12-5). Save and Rename * 1040 * changed to use FERRORISYR if they could not split a * 1041 * UDIR2 block because the UDIR1 was full. Fixed FRCATALOG * 1042 * to GRUB wndos 1 & 2 on a memory error, and FRREADSHL to * 1043 * return correct code for memory errors (3.12-5). * 1044 * FRCATALOG and FRREADSHL now share mem error handler. * 1045 * Minor cleanups to RAF WSEEK. * 1046 * C8711 03 Nov 87 * 1047 * Added STZ TCFCB and STZ PTHREADFCB to GULOCKHW (reader). * 1048 * Fixed URRCVUNIT UREQ to set PTHREADFCB and STW PTHINTE * 1049 * when FCACCESS=RO. Minor mods to subs process... removed * 1050 * unused instruction, re-organized logging code, and fixed * 1051 * unsubs for case where entry being removed is at extreme * 1052 * end of subs block. MAXPRIV shortened. Interlocked the * 1053 * RTSWITCHB bit in PSUERROR with PSLOCK (3.12-5). * 1054 * C8711a 23 Nov 87 * 1055 * Register usage changed in OPEN error code. Added S00E2 * 1056 * halt, freedir on already free directory (3.12-5). * 1057 * Changed MAPOUTFBI to consume no registers. * 1058 * Fixed GETFREEWx to return error code in R0 on error * 1059 * jump return. * 1060 * Minor fixes and changes to FROPEN code. * 1061 * Fixed DIR read and fetch catalog info to not attempt * 1062 * to free directory if memory protect during header * 1063 * return (3.12-5). * 1064 * Fixes to DIRSHRINK routine (3.12-5). Also reorganized * 1065 * the catalog/share list information request. * 1066 * Fix to OPRSTRTBAT so that error/not found returns from * 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 21 (REVISIONS) F 3 1067 * SRCHDIR unlock directory. Also moved error code off * 1068 * the stack and into R7. * 1069 * Fix to recover file page to release directory on * 1070 * disk error, error return from call to TRAFDSE. * 1071 * Altered SRCHDIR to skip SETERRWx on a disk error * 1072 * where it had just grubbed the windows. Now returns * 1073 * error code in R0. Minor other reorganization and * 1074 * comment fixes. Minor moves in NAMEPACK to save * 1075 * space. Fixed GETFREEWx to not touch R4 at all. * 1076 * Trace calls added in MSPROC for calls to SUBSTITUTE. * 1077 * Removed temporary code in ULBTWIDDLE that ensured that * 1078 * a UDIR and its FBI had proper account serial numbers. * 1079 * Modified SHLCHECK and callers to eliminate the unused * 1080 * PWW (password wrong) return. OPEN modified to GRUB * 1081 * window 2 as soon as possible, removes code from error * 1082 * routines. Changes to share/unshare code to make * 1083 * better use of registers. * 1084 * Copious modifications to SRCHDIR, USVREM, BLKSPLIT, * 1085 * DIRXPAND,and DIRSHRINK to make all error returns with * 1086 * the directory freed and both windows grubbed. Mods * 1087 * to callers: FRQNOPEN, FRQWRRAF, FRQRDDIR, FRQCNTL, * 1088 * FRQRAFCNTL, FRQACSCHNG, FREQSAVE, FREQUSAVE, * 1089 * FREQUEQUIP, FREQRENAME, FREQCATINF, OPRSESSSTRT, * 1090 * XRQOPRBKUP, XRQOPRRCVR, and INITPROC. * 1091 * C8712 02 Dec 87 * 1092 * Moved UERRBMEM memory error handler in user interrupt * 1093 * part of DISPATCH (GETVIRTUAL) adjacent to the code it * 1094 * protects. * 1095 * Modified OPRQBKUPFL to give XREQERLNS when SRCHDIRSN * 1096 * no-finds (was XREQERDSE after being XREQERNSE). * 1097 * C8712a 05 Dec 87 * 1098 * Removed URGIVEUNIT's irrelevant check that the * 1099 * destination session is delaying for or trapping * 1100 * UINTGUNIT (3.12-6). Fixed URGIVEUNIT and GUUNLOCKHW * 1101 * to ensure that the correct FCB address is placed in * 1102 * the DCB. This also fixes the session starting requests * 1103 * that use GIVEUNIT, the PTHREADFCB wasn't being set at * 1104 * all (3.12-6). Fixed URRCVUNIT and PURGEGIFTU to * 1105 * DQUEONE all the sessions waiting to send more units * 1106 * (3.12-6). Fixed register eat in PURGEGIFTU, and * 1107 * fixed URGIVEUNIT to release PCNTLLOCK even when * 1108 * request suspends (3.12-5). * 1109 * C8712b 17 Dec 87 * 1110 * Made single LEAVE for RAF WSEEK. Fixed RAF WSEEK to * 1111 * not ULKWNDO2 after GETFREEW2ing a RAF minor, because * 1112 * the block is touched later and we can't afford a disk * 1113 * error. Tidied CKPVMU and FIXUPVAL. * 1114 * Combined duplicated code in INITDEVACS for PATHs. * 1115 * Fixed REALDEVICE so it actually uses the ULB (3.12-6). * 1116 * Fixed MODACS error recovery to use correct FDE * 1117 * and ULB pointers. Fixed MODACS to not clobber CKxxx * 1118 * codes through INITDEVACS call. Would cause use file * 1119 * use counts to be off (3.12-6). * 1120 * Modified the backup recover requests to keep the account * 1121 * and file entries more consistent (3.12-6) and fixed the * 1122 * error recovery specifically related to memory protect. * 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 22 (REVISIONS) F 3 1123 * C8712c 21 Dec 87 * 1124 * Revamped TIMESET code to use RLSLE2 instruction to save * 1125 * time. TMRLINK made into a full word so that list * 1126 * manipulations more often use base mode instead of ZBM. * 1127 * Added SHACCT call in LIQUIDATE to remove timer quantum. * 1128 * Allow .NULLs to be MW. Zeroed .LOCK entry in VERIFYTAB. * 1129 * Fixed MSPROC (CHECKSTATE) and MOUNT to give error if * 1130 * mount candidate drive is writeprotected (added MDVWPROT). * 1131 * Fixed PRESETAUTH to check ULB account names instead of * 1132 * ULB addresses to determine caller/victim equality. * 1133 * C8801a 11 Jan 88 * 1134 * Fixed OPEN to unsave a "file being destroyed" only if * 1135 * the FDSUN doesn't match the FILESUN. Also, this check * 1136 * is now made AFTER the WWC and use count checks (3.12-6). * 1137 * Fixed LOGXREQ and STOPXMON to interlock use of XHTABTAB * 1138 * (with new lock XHTABLCK). LOGXREQ was able to get pntr * 1139 * to free space, or a nil pointer from XHTABTAB. Minor * 1140 * cleanup to URSTATPI (URSESSINFO and ORSESSINFO XREQs). * 1141 * Changed CREATEDEV to DMOTEWNDO1 after GETFREEW1 for * 1142 * SAF and CODE (more straightforward than ULKWNDO1 and * 1143 * allowing subsequent subroutines to map over the window). * 1144 * Fixed FRTGETTCS to return the users currently active * 1145 * TCS for the console terminal (was always getting his * 1146 * user defined set). * 1147 * C8801b 12 Jan 88 * 1148 * Changed URDELAY ending code in ONCEASEC so that timed * 1149 * out session will not be put on the end of SQRUNNABLE * 1150 * (was having user reexecute URDELAY with delay=0 unless * 1151 * original wait mask included CAIMNETERM). * 1152 * Changed to URSTATPI: minor cleanups, fixed "disconnected * 1153 * terminal" check to exclude concurrent sessions. * 1154 * C8802a 19 Feb 88 * 1155 * Changed ORATTACH OPREQ to disallow attach to requester's * 1156 * concurrent session (wouldn't work because requester's * 1157 * logoff would force new session to logoff). Fix to * 1158 * recover account, ULB use count of managers account * 1159 * where authorization was coming from during selective * 1160 * backup was not getting decremented properly (3.12-6). * 1161 * Changed MINBLKLIM from 40 to 100 in BLKLIMCHK as an * 1162 * added margin of safety (were seeing C1200s because CM * 1163 * couldn't get logged on even though BLKLIMCHK passed). * 1164 * Reorganized code in OPEN that checks the SUN and FBD. * 1165 * This allowed the file being destroyed code to work * 1166 * because the windows contained the UDIR blocks and not * 1167 * leftovers from SHLCHKALL routine (3.12-6). * 1168 * Fixed the CIADRIVER SETUPWRIT code to ensure powerfail * 1169 * ints are disabled on exit (actually, moved PFAILEN to * 1170 * after terminal timing checks, so no PFAILDS needed by * 1171 * earlier exit, such as to SETNORM when TERMWBUSY=0). * 1172 * Saw S0007 halt at 80103 where a pfail int occurred * 1173 * while looking at UERs in DISPATCH (3.12-6). * 1174 * Modified code in recover file page to ensure that * 1175 * RAF index blocks had proper relative block numbers. * 1176 * Fixed URSESWCLK request to properly compute figures * 1177 * using single register instructions, double register * 1178 * instruction with BASE mode did not work properly. * 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 23 (REVISIONS) F 3 1179 * Changed Set Wall Clock Limit/Used to give error if * 1180 * new value to be set is negative. Changed OPRSTRTBAT * 1181 * and FREQCONCP to use symbols for unit numbers. * 1182 * Changed the disk driver to CLEARFAULT and REZERO after * 1183 * operation. New status added to MDV, MDVLOPSTATUS is * 1184 * the status after the last operation and not the * 1185 * status after any error recovery. * 1186 * C8802b xx Feb 88 * 1187 * The code in the disk driver that attributes some * 1188 * header errors to seek errors (i.e. being on the * 1189 * wrong cylinder) was modified so that the first * 1190 * header error was not treated as a seek error. * 1191 * Bug fix in BootUpdate to give back the free memory * 1192 * fetched for holding the FBI. * 1193 * C8803 09 Mar 88 * 1194 * Changed SWAPPMVS in INITIAL to clear the PFREFBIT * 1195 * before storing PMV into PFMAP (cleaner map). * 1196 * Changed ORATTACH to pass lower half of requester's * 1197 * R1 in the upper half of the subcode. * 1198 * C8803a xx Mar 88 * 1199 * Removed FRMODACSLK (00D1) because it was unimplemented. * 1200 * Changed ORBKCACCT to hand back XREQERILR if the user * 1201 * hasn't backup privilege (was giving XREQERPNS). * 1202 * In MSPROC, moved trace calls to after action initiation * 1203 * to save time. Minor change in calls to errorlogger. * 1204 * C8803b 24 Mar 88 * 1205 * Modified TSELECT to work with the BTI SMD to ESDI * 1206 * adaptor board (patched into 3.12-8 #5). * 1207 * Moved INC FFPROCS from SPROCSTART into DISPATCH to * 1208 * eliminate the timing window that allowed the count * 1209 * of active free filers to become incorrect (3.12-8). * 1210 * Eliminated FFBUSY word usages, because it is not kept * 1211 * in a way that was useful. The location remains as * 1212 * a space filler to make freefile match the template. * 1213 * Changed URRCVUNIT UREQ to return XREQERLAE instead * 1214 * of XREQERPOB when non-CM user uses 201 or 202. * 1215 * Removed def and code for URPSTOP UREQ. Was intended * 1216 * to become "stop another process", but this was done * 1217 * by ORPSTOP. Def had been commented out, code was * 1218 * just a jump to UERRORILR (now in table). * 1219 * C8804 29 Apr 88 * 1220 * Changed OPEN request to give XREQERBFN rather than * 1221 * XREQERFNF if the device type was needed, but was * 1222 * either not specified or not a defined type. * 1223 * C8805 09 May 88 * 1224 * Added the drive name to several ERRORFILE entries. * 1225 * C8805a 11 May 88 * 1226 * Fixed MS_RESET to really use the skip return when * 1227 * a drive timed out. Fixed CHECKBFD to use this. * 1228 * Before, no ERLCDSKTO errors could ever be recorded. * 1229 * Fixed DEADMAN to SETPPU3WRD only when PPU has recovered * 1230 * from illness (was doing iff a controller needed reset). * 1231 * Fixed POWERUP to force this SETPPU3WRD. * 1232 * C8805b 26 May 88 * 1233 * Made new ERRORFILE code ERLCRDGCS (reading check * 1234 * segment), and changed FIXSEGMENT to use it rather * 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 24 (REVISIONS) F 3 1235 * than ERLCDE (because the entry is a notification). * 1236 * This replaces OPFIXSEG as a code to ERRORLOG, so the * 1237 * OPFIXSEG definition was removed. * 1238 * C8805c 30 May 88 * 1239 * Restored FRTGETTCS to return the users defined TCS for * 1240 * console TCS (see C8801a), because it is more useful. * 1241 * C8806 02 Jun 88 * 1242 * Added HALTS0102 to MS REMOUNT (matching VOLN HCB not 0). * 1243 * Fix in INITDEVACS when RAF changing access from /MW, * 1244 * if GFC block gets freed then the FCDCBPTR must get set * 1245 * to zero. * 1246 * C8806a xx Jun 88 * 1247 * Removed stack loc from INTREAD by using regs instead. * 1248 * Fixed MS READ to not rewrite or sub a block with a * 1249 * permanent read error. * 1250 * Fixed MS driver to not REMOUNT a pack that was mounted * 1251 * or otherwise altered somewhere else. Also prevents * 1252 * remount of wrong pack with same PLINITDATE. This added * 1253 * the SECMNTDAT to the security block, and changed * 1254 * VOLNFMTDAT to VOLNMNTDAT. * 1255 * C8807 xx Jul 88 * 1256 * Fixed URRCVUNIT to use correct register when setting * 1257 * TCFCB and TCINTE (recent bug : after CM ATTACH, the * 1258 * TCFCB was wrong, with bad results such as unrestored * 1259 * (0) TCTERMA). * 1260 * C8808 31 Aug 88 * 1261 * Fixed change in C8802a that disallowed negative values * 1262 * for wallclock and disk warn limits, to allow -1 (*Huge*). * 1263 * Added similar checks for super privileged sets of CPUU, * 1264 * CPUL, DISKL, and DISKS. Changed DELAFTIDX and SRCHAFTIDX * 1265 * to use CMSTR instead of CMS instruction. Also modified * 1266 * to GRUB window 1 on disk error. Fixed callers as * 1267 * appropriate, and fixed comments regarding window mapping. * 1268 * Added MAPOUTFBI to error path at GPADTSECE. * 1269 * Removed the forcewrite from the disk error path at * 1270 * FREEULB01. Changed DMOTE to GRUB in error path for * 1271 * REWRITE at FILEISAU. Modified LOCKDIR exit. * 1272 * Changed FREQs FRMODLBKU, FRMODLWD, FRMODLRD to share * 1273 * code. Also changes to body of the FRMOD*** requests * 1274 * to use an execute table rather than a jump table. * 1275 * Fixed ORINITVOL OPREQ to copy the MDVFMTDAT into the * 1276 * VOLNMNTDAT for the time the security blocks are being * 1277 * written (ensures volume can always remount). * 1278 * Fixed ORINITVOL to place dates into security block. * 1279 * (was using wrong window and placing them into the * 1280 * volume label). Other mods to ORINITVOL to not read * 1281 * the packs volume label (which we overlay anyway), * 1282 * removed an UNLKWNDO for a page that was subsequently * 1283 * forcewritten, and altered a few minor items for * 1284 * efficiency. * 1285 * C8809 12 Sep 88 * 1286 * Changed INPUTERR in CIAINUTIL to prevent multiple * 1287 * contiguous error elements in the input queue. Was * 1288 * allowing a bad port to eat up free memory with * 1289 * error elements (patched in 3.12-9 #6). * 1290 * Added ORRESETDRV OPREQ, with corresponding code in * 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 25 (REVISIONS) F 3 1291 * DOREADREQ (request to reinitialize MDV after format). * 1292 * C8809a 20 Sep 88 * 1293 * Fixed error in TSELECT count of table entries. * 1294 * Added CANOPMSG to DISMNTDUMMY (mainly for maint vols * 1295 * that dropped offline and were closed). * 1296 * Added MDVNOLOG flag (using MDVNOERRS for this was * 1297 * preventing head checker error logging). * 1298 * Fixed CHECKHEADS to clear entire MDVERRWORD initially * 1299 * (was using leftover flags). * 1300 * C8809b 27 Sep 88 * 1301 * Changed FIXSEGMENT to do no retries, and READ to reread * 1302 * instead (STATCHECK now accumulates single seg errors in * 1303 * MDVDKERRS, limited by MDVDKERLIM). * 1304 * C8810 26 Oct 88 * 1305 * Moved process switch check closer to DOPSAERR in * 1306 * DISPATCH. Fixed WRITE subroutine in MSPROC to prevent a * 1307 * bad block from being put into the ADT. Fixed SUBSPROC * 1308 * to not do a substitution on a block being freed. * 1309 * C8811 16 Nov 88 * 1310 * Removed virtual monitor page checking from parity error * 1311 * routine, because all pages are now resident. * 1312 * Modifications to add new hardware type, VT. * 1313 * C8812 13 Dec 88 * 1314 * Fixed CHKBZYACS to disallow going from NA to RW on a * 1315 * PATH if someone has the PATH for MW. Moved SECMNTDAT * 1316 * to a more static area of the security block. * 1317 * C8812a 16 Dec 88 * 1318 * Changed resource locking to allow a full 32 bit resource * 1319 * number, however the maximum number of resource locks * 1320 * allowed per file has been reduced to 128. Note that the * 1321 * RCE element increased from 2 words to 4 words. * 1322 * C8901a 4 Jan 89 * 1323 * Allow no-data open of hardware device file that does * 1324 * not reside in system volume HARDWARE.SYS account. This * 1325 * is to grant backup (and others?) access to HARDWARE.SYS * 1326 * shadows. Fixed the URDELAY request to lock PSA * 1327 * EVENTLOCK during CHECKEVENT and shutdown into * 1328 * SQTIMEWAIT. Also used EVENTLOCK in GIVEUINT to * 1329 * coordinate when events are given to URDELAY requesters, * 1330 * should eliminate missing events. * 1331 * C8901b 14 Jan 89 * 1332 * Changed FRCONCP and ORSTARTBAT XREQs to return the * 1333 * process serial number of the new session's Control Mode * 1334 * in R1. This is so the spooler can have truly unique * 1335 * session ID for servers. * 1336 * Warning!! These requests previously did not eat R1. * 1337 * C8901c 18 Jan 89 * 1338 * Fixed the change SSN code to reset foreign volume flag * 1339 * only if the customer numbers do not match. * 1340 * Wrong register used in cancel operator message during * 1341 * volume dismount (DISMTDUMMY). * 1342 * C8901d 20 Jan 89 * 1343 * Fixes to LINKTERM, allow open of backup copies of .TERMS * 1344 * and also give no-data-access TCB linkup so we may fetch * 1345 * information on busy terminals. * 1346 * C8901e 30 Jan 89 * 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 26 (REVISIONS) F 3 1347 * Fixed recover file to know about VTs. Fixed bug in out * 1348 * of bounds check. RC * 1349 * C8902a 01 Feb 89 * 1350 * Fixed the URFORCEP xreq to not set the FWIP bit, also * 1351 * not to suspend if page not dirty or write not pending. * 1352 * Removed UPDATEPAGE and FORCEPAGE routines. * 1353 * C8902b 02 Feb 89 * 1354 * Fix to prevent system halt if memory protect violation * 1355 * during register saving interrupt processing for user * 1356 * process. Need halt only if memory protect for Control * 1357 * Mode. Fix to STATCHECK in MS driver at label SEGERROR * 1358 * to not munch the segment number in R0, caused halt S0105. * 1359 * C8903a 09 Mar 89 * 1360 * Fix to CHECKCIA in DEADMAN, set R0 to one after ERRORLOG * 1361 * to indicate PPU was alive. CIA_RESET looked at R0 to * 1362 * determine if reset should happen. This instruction was * 1363 * inadvertantly removed in C8805a. * 1364 * C8903b 10 Mar 89 * 1365 * Added code to DONEPPL to decrement the volume busy * 1366 * counter if the block was to go into the ADT, but * 1367 * abandoned due to disk error. Removed the VPERRGIVEN * 1368 * bit (RC). Fixed vanish request to not dismount * 1369 * maintanence mounted volumes, these volumes should get * 1370 * dismounted when the units opened to the .VOLs get * 1371 * closed. * 1372 * C8903c 21 Mar 89 * 1373 * Mods to tape driver MT_RESET to give a little * 1374 * more time after a PPURESET. * 1375 * C8903d 28 Mar 89 * 1376 * Changed tape driver to perform NO retries for type * 1377 * VT. Made retry count for each tape operation more * 1378 * consistent. * 1379 * C8904 01 Apr 89 * 1380 * Added PPUITOUT (time out) bit to PPU status. Added * 1381 * checks in I/O drivers. * 1382 * C8904a 05 Apr 89 * 1383 * Removed 'any error' check from TapeFunc in the * 1384 * tape driver. This was added in December, but * 1385 * should not have been. * 1386 * Fixed GIVEUNIT to have the correct users memory * 1387 * mapped in when looking at FCB just given away. * 1388 * C8904b xx Apr 89 * 1389 * Request To Logoff error now returns underprocess * 1390 * serial number as subcode. * 1391 * C8904c 20 Apr 89 * 1392 * Fix in SRCHDIR to restore ULB pointer before call to * 1393 * FREEULB in disk error recovery. * 1394 * C8905 02 May 89 * 1395 * Added interrupt enable bit (BFDINTBIT) to the read check * 1396 * segment operation. The system was not receiving an end * 1397 * of operation interrupt, the funny thing is that 3.12 * 1398 * system appears to work fine. Increased timeout value * 1399 * for VT WFM. * 1400 * C8905a 30 May 89 * 1401 * Fixed Remote Port Startup code to pass acceptable * 1402 * initial entry code to Control Mode. Modified PPUREV3MSK * 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 27 (REVISIONS) F 3 1403 * to indicate that even revs are capable of triple word * 1404 * store, odd revs not. * 1405 * C8906a 15 Jun 89 * 1406 * Fix to tape driver to fetch the MTUTYPE during the call * 1407 * of TAPEFUNC. Any retry was screwing up the type in R1 * 1408 * and causing S0000 system halt. * 1409 * C8906b 16 Jun 89 * 1410 * Fix to OPEN code to restore EQT pointer following * 1411 * destroying a file marked FBD. * 1412 * C8907 25 Jul 89 * 1413 * Fix in DIOSETUP to properly return memory protect error * 1414 * codes. Fix in GIVEUNIT to ensure that MAPINMEM is called * 1415 * while interrupts are still off. GU*LOCKHW routines * 1416 * fixed to include table entry for VT. MT read code * 1417 * altered to send read buffer length to controller. RC * 1418 * C8907a 25 Jul 89 * 1419 * Fix to the disk head checker to ignore substituted * 1420 * blocks, this caused DA mismatch errors. * 1421 * C8908 02 Aug 89 * 1422 * Removed the WSXCLNALL for all pages if the file type was * 1423 * a .VOL, this was moved into DESTROYDEV. Added WSXCLNALL * 1424 * to FREEULB iff the ULB is being dissolved. Should prevent* 1425 * halts where pages still exists for dismounted volumes. * 1426 * C8909 26 Sep 89 * 1427 * Fix in OPRQRCVACL to correctly leave a partially * 1428 * recovered authlist during any kind of manager * 1429 * insufficient authorization. * 1430 * C8910 xx Oct 89 * 1431 * Changed the S001A, C1200, and C1215 STOPs to HALTs. * 1432 * C8910a 25 Oct 89 * 1433 * Invoked FILESTAT macro and removed separate definitions. * 1434 * C8911 xx Nov 89 * 1435 * Added call to FREECHECK in HAVEPPU to fix possibility * 1436 * of not enought memory to finish configuring the system. * 1437 * C8911a 02 Nov 89 * 1438 * Changed FREQUSHARE to allow requesting complete * 1439 * elimination of share list. CG * 1440 * C8911b 03 Nov 89 * 1441 * Fix in HAVEPPU to save and restore PPU element pointer * 1442 * between calls to FREECHECK. * 1443 * C8911c 30 Nov 89 * 1444 * Fix to the ORRCVRACTL request to not hang in DIRWAIT if * 1445 * recovering a managers account that does not currently * 1446 * exist. * 1447 * C8912 04 Dec 89 * 1448 * Added a bound to the loop in TSELECT. CG * 1449 * C8912a 12 Dec 89 * 1450 * Added a new entry into the Xreq error processing block * 1451 * (FERROR3FCB) for use when FCB is defined but the unit * 1452 * number is not the Xreq operand. * 1453 * Added a bit to FBIFLAGS saying that this block has * 1454 * been rewritten by the disk driver. Modified the driver * 1455 * to substitute a block if this bit is already set when * 1456 * a rewrite request is made the bit is cleared in the * 1457 * FBI of the new block. * 1458 * Added ORMAINTRSUB to do a maintenance read and * 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 28 (REVISIONS) F 3 1459 * substitute the block. CG * 1460 * C8912b 19 Dec 89 * 1461 * Fixed WSEEK to put correct relative block number in * 1462 * RAF minor access blocks. RC * 1463 * C8912c 20 Dec 89 * 1464 * 8912c was a version with changes to disk driver * 1465 * scheduling, which was completely removed shortly after * 1466 * being added. CG * 1467 * C8912d 31 Dec 89 * 1468 * Changed PACKITEM to stop packing after encountering * 1469 * an initial number (123.abc stops, pointing at the * 1470 * period). Changed PACKFS to give an error if the item * 1471 * following a colon is a number. CG * 1472 * C9001 02 Jan 90 * 1473 * Changed PUTINCHAR to reset a current XON state on a * 1474 * port upon receipt of a break. Changed INITDEVACS to * 1475 * position a cartridge tape to track 0. (Note: this * 1476 * added a call to MTCHKWFM which seems proper, although * 1477 * file marks were somehow getting there before.) * 1478 * Allowed FRRAFCPOS to inquire as to currently selected * 1479 * track on a CT. CG * 1480 * C9001a xx Jan 90 * 1481 * Fixed set output baud rate executive request to * 1482 * correctly return the old rate upon a successful * 1483 * completion. * 1484 * C9002 01 Feb 90 * 1485 * Removed the change (C8912d) to symbol packing, was * 1486 * causing backward compatibility problems. CG * 1487 * C9002a 09 Feb 90 * 1488 * Changed the zero meaning 'current time' to a minus * 1489 * one in FRMODLRD,FRMODLWD,FRMODLBKUP. CG * 1490 * C9002b 27 Feb 90 * 1491 * Discovered that the FBINOREWRIT bit was defined * 1492 * incorrectly. Fortunately it landed on FBIERRD which * 1493 * is not used. Revised FBIFLAGS to get it right. * 1494 * Defined a subfield FBIDEFFLAGS which consists of the * 1495 * flag bits that DISKCOPY can legitimately check the * 1496 * value of. CG * 1497 * C9003 01 Mar 90 * 1498 * Changed SAFENDFIX (fixes up some garbage when a file * 1499 * recovery does not finish) to set the backward link * 1500 * on the last file block. Changed DSTRYDEV to check * 1501 * for empty CODE as well as empty RAF. CODE can be * 1502 * empty if a file recovery did not complete. CG * 1503 * C9003a 25 Mar 90 * 1504 * Changed definition of DiskToTape group of halt codes * 1505 * to Offline Utility halts. CG * 1506 * C9003b 29 Mar 90 * 1507 * In CLOSEUNIT, if SAFENDFIX is called, the directory * 1508 * window(s) need to be reestablished. In SAFENDFIX, * 1509 * zero FCB,FCMABLK so the file no longer looks like it * 1510 * is in the middle of a recovery. CG * 1511 * C9004 09 Apr 90 ( Release 12C ) * 1512 * Fixed MT_RESET to ensure the MTSTDSC was set to * 1513 * force PROC_INT to recognize current status on boot. * 1514 * C9005 24 May 90 * 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 29 (REVISIONS) F 3 1515 * Added a check in STATCHECK for a weird case of a write * 1516 * setting the time code error bit but no others. Nobody * 1517 * knows how this happens, but when it did it was falling * 1518 * through to the rewrite code and the problem was * 1519 * persisting. Now causes a substitution. CG * 1520 * C9006 24 Jun 90 * 1521 * Fixed code in RECOVERFDE to correctly set the end * 1522 * position pointers for both SAFs and RAFs, was just * 1523 * setting them to zero. * 1524 * C9007 09 Jul 90 * 1525 * Expanded top boundary of user limits block to include the * 1526 * restriction word in the UDIR. Changed directory reading * 1527 * to see if the target directory has catalog reading * 1528 * restricted and if so, then check whether the requester * 1529 * has an override. Added URPROCLVL and URDROPPRIV. * 1530 * Implemented restriction group 3 (account attribute * 1531 * changing). CG * 1532 * C9008 09 Aug 90 * 1533 * Removed DIRACSLOCK and DIRLRAF from the DIRINFORD * 1534 * structure. CG * 1535 * C9010 19 Oct 90 * 1536 * Added jump instruction to take care of memory parity * 1537 * error return for call to DISKWRITE in the routine * 1538 * DOREWRITE. Fix in PRESETAUTH routine to zero ULB * 1539 * register (R4) if division project manager did not have * 1540 * proper authorization. Prevented ULB from being freed * 1541 * twice (patched C9004-1). * 1542 * C9011 12 Nov 90 * 1543 * Fix to DIOSETUP to turn off interrupts during page * 1544 * searching and locking operation. Suspect that S1300 * 1545 * halt resulted from being interrupted from this routine * 1546 * (patched C9004-2). * 1547 * C9103 27 Mar 91 * 1548 * Fixes in Re-Mount code in MSPROC (included in patch * 1549 * C9004-3). * 1550 * C9105 17 May 91 * 1551 * Fix in READ at DOREWRITE where test to see if block had * 1552 * already been rewritten was backwards. Changed instruction* 1553 * JNEZ R2 DOTHESUB -> JEQZ R2 DOTHESUB. * 1554 * (included in patch C9004-3). * 1555 * Changed timeout value for a MT rewind from 0 to 48 ticks, * 1556 * this was done for the SCSI 9-track. Made some additional * 1557 * changes to DOREWIND in the MT driver to fix a bug * 1558 * introduced by changing the timeout value from 0 to 48. * 1559 * C9105a 23 May 91 * 1560 * Mods to TRACE routines to include time. RC * 1561 * C9107 25 Jul 91 * 1562 * PATCHPROC modified by moving PLOCK to where destroying R0 * 1563 * will not cause a problem (bus error, seen in house). RC * 1564 * (included in patch C9004-3). * 1565 * Changes made to integrate the SCSI files to reduce the * 1566 * number of different files for each OS version. * 1567 * C9203 04 Mar 92 * 1568 * Changed some of the BFD symbols names to the more * 1569 * generic MSC (mass storage controller) names. * 1570 * C9203a 30 Mar 92 * 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 30 (REVISIONS) F 3 1571 * Shortened the patch area to ensure enough free storage to * 1572 * do the SSU configuration (HAVESSU) in INITIAL if all of * 1573 * the memory is in higher slots, such as for a manufacturing* 1574 * test (included in patch C9004-3 and S9202-1). RC * 1575 * C9207 23 Jul 92 * 1576 * Changes in MAKETRAF to prevent freeing a random block * 1577 * (actually 3F8F) on out of disk space error. Mods in * 1578 * PFPROC to restore disk space totals after getting an * 1579 * out of disk space error on a swapping page. * 1580 * (included in patch C9004-4 and S9202-1). RC * 1581 * PSXTRACA eliminated in favor of having a single CA/STACK * 1582 * per CPU (new variable on base page CPXTRACA). * 1583 * (patch in C9004-5 for this effect). RC * 1584 * C9209 30 Sep 92 * 1585 * Bug fixed in LOGOFF for case where ULSCRDSK goes negative.* 1586 * (patched in C9004-5) RC * 1587 * C9303 18 Mar 93 * 1588 * Bug fixed in UNDOPATH to properly restore interrupt * 1589 * level counter. (patch C9004-6) RC * 1590 * * 1591 ********************************************************************************** 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 31 (REVISIONS) F 3 1593 3DB03E00 ABS 1594 ASSYTIME EQU 03DB03E00 time of the system assembly 1595 * . 1 count here = 4 seconds 1596 * . 10 count here = 1 minute + 5 1597 * . 100 count here = 17 minutes + 28 1598 * .1000 count here = 4 hours + 39 min + 37 1599 * 10000 count here = 3 days + 1 hour + 14 min 43393330 ABS 1600 REVNAMEH EQU "C930" revision number of this assembly 33202020 ABS 1601 REVNAMEL EQU "3 " second part of revision number 5 6 START INITIAL starting point for first CPU 7 START2 SUCKERS starting point for everyone else 8 INPUT ASCIITABLE table of ascii character definitions 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 32 (ASCIITABLE) F 4 ASCII character table 3 4 ********************************************************************************** 5 * * 6 * OCT HEX DEC CHR OCT HEX DEC CHR OCT HEX DEC CHR OCT HEX DEC CHR * 7 * * 8 * 000 00 0 NUL 040 20 32 SP 100 40 64 @ 140 60 96 ` * 9 * 001 01 1 SOH 041 21 33 ! 101 41 65 A 141 61 97 a * 10 * 002 02 2 STX 042 22 34 " 102 42 66 B 142 62 98 b * 11 * 003 03 3 ETX 043 23 35 # 103 43 67 C 143 63 99 c * 12 * 004 04 4 EOT 044 24 36 $ 104 44 68 D 144 64 100 d * 13 * 005 05 5 ENQ 045 25 37 % 105 45 69 E 145 65 101 e * 14 * 006 06 6 ACK 046 26 38 & 106 46 70 F 146 66 102 f * 15 * 007 07 7 BEL 047 27 39 ' 107 47 71 G 147 67 103 g * 16 * 010 08 8 BS 050 28 40 ( 110 48 72 H 150 68 104 h * 17 * 011 09 9 HT 051 29 41 ) 111 49 73 I 151 69 105 i * 18 * 012 0A 10 LF 052 2A 42 * 112 4A 74 J 152 6A 106 j * 19 * 013 0B 11 VT 053 2B 43 + 113 4B 75 K 153 6B 107 k * 20 * 014 0C 12 FF 054 2C 44 , 114 4C 76 L 154 6C 108 l * 21 * 015 0D 13 CR 055 2D 45 - 115 4D 77 M 155 6D 109 m * 22 * 016 0E 14 SO 056 2E 46 . 116 4E 78 N 156 6E 110 n * 23 * 017 0F 15 SI 057 2F 47 / 117 4F 79 O 157 6F 111 o * 24 * 020 10 16 DLE 060 30 48 0 120 50 80 P 160 70 112 p * 25 * 021 11 17 DC1 061 31 49 1 121 51 81 Q 161 71 113 q * 26 * 022 12 18 DC2 062 32 50 2 122 52 82 R 162 72 114 r * 27 * 023 13 19 DC3 063 33 51 3 123 53 83 S 163 73 115 s * 28 * 024 14 20 DC4 064 34 52 4 124 54 84 T 164 74 116 t * 29 * 025 15 21 NAK 065 35 53 5 125 55 85 U 165 75 117 u * 30 * 026 16 22 SYN 066 36 54 6 126 56 86 V 166 76 118 v * 31 * 027 17 23 ETB 067 37 55 7 127 57 87 W 167 77 119 w * 32 * 030 18 24 CAN 070 38 56 8 130 58 88 X 170 78 120 x * 33 * 031 19 25 EM 071 39 57 9 131 59 89 Y 171 79 121 y * 34 * 032 1A 26 SUB 072 3A 58 : 132 5A 90 Z 172 7A 122 z * 35 * 033 1B 27 ESC 073 3B 59 SEMI 133 5B 91 [ 173 7B 123 { * 36 * 034 1C 28 FS 074 3C 60 < 134 5C 92 \ 174 7C 124 | * 37 * 035 1D 29 GS 075 3D 61 = 135 5D 93 ] 175 7D 125 } * 38 * 036 1E 30 RS 076 3E 62 > 136 5E 94 ^ 176 7E 126 ~ * 39 * 037 1F 31 US 077 3F 63 ? 137 5F 95 _ 177 7F 127 DEL * 40 * * 41 ********************************************************************************** 42 00000008 ABS 43 BS EQU 008 backspace 00000009 ABS 44 HT EQU 009 horizontal tab 0000000A ABS 45 LF EQU 00A line feed 0000000C ABS 46 FF EQU 00C form feed 0000000D ABS 47 CR EQU 00D carriage return 00000011 ABS 48 XON EQU 011 XON 00000013 ABS 49 XOFF EQU 013 XOFF 00000017 ABS 50 ETB EQU 017 control-W 00000018 ABS 51 CAN EQU 018 line cancel 0000007F ABS 52 DEL EQU 07F delete 10 INPUT MACRODEFS definitions of system macros 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 33 (MACRODEFS) F 5 Macro Definitions 4 5 ********************************************************************************** 6 * * 7 * List locking and unlocking macros. Note that the * 8 * LOCKWAIT routine is carefully constructed to be used with * 9 * the PLOCK macro, so excercise caution. Call: * 10 * * 11 * PLOCK lockword (gets R0, condition bits, * 12 ** and turns off interrupts) * 13 * PUNLOCK lockword (turns on ints) * 14 * * 15 ********************************************************************************** 16 17 PLOCK MACRO 18 $L IOFF 19 SETT $P 20 JNE MA(2+DISPW MA 0) 21 CALLNP LOCKWAIT 22 EMAC 23 24 PUNLOCK MACRO 25 $L STZ $P 26 ION 27 EMAC 28 29 ********************************************************************************** 30 * * 31 * The following macro will get the stack pointer to the * 32 * top of the stack associated with the current console area. * 33 * * 34 ********************************************************************************** 35 36 SETSP MACRO 37 $L STCAR SP 38 LD SP SP,CASTACKPTR 39 LD SP SP+(2 POWER STAKLOG) 40 EMAC 41 42 43 44 ********************************************************************************** 45 * * 46 * The following macro will do an interlocked SETT on a * 47 * 1-bit ZBM field. It destroys R0. * 48 * Usage: " SETTBIT reg,field " (the register is required). * 49 * * 50 ********************************************************************************** 51 52 SETTBIT MACRO 53 $L LD R0 1*BIT((($(1),$(2)) DISP ($(1),0))/BITS 0:4) 54 IORM R0 $(1),((($(1),$(2)) DISP ($(1),0))/BITS 15:31) 55 EMAC 56 57 58 ********************************************************************************** 59 * * 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 34 (MACRODEFS) F 5 Macro Definitions 60 * The following macro will do an interlocked clear on a * 61 * 1-bit ZBM field. It destroys R0. * 62 * Usage: " CLRTBIT reg,field " (the register is required). * 63 * * 64 ********************************************************************************** 65 66 CLRTBIT MACRO 67 $L LD R0 1*BIT((($(1),$(2)) DISP ($(1),0))/BITS 0:4) 68 BRSBM R0 $(1),((($(1),$(2)) DISP ($(1),0))/BITS 15:31) 69 EMAC 70 71 * If you believe this, wait 'till you see what I come up 72 * with next month! 73 74 75 ********************************************************************************** 76 * * 77 * The following macro will cause an event to be entered * 78 * into the system trace table, if tracing is active. There * 79 * are 32 different classes of trace events (numbered 0-31), * 80 * and you can specify a unique 5 bit event id. When a user * 81 * activates tracing, he can specify which of the different * 82 * event classes he wants traced. * 83 * Usage: " TRACE , " * 84 * * 85 ********************************************************************************** 86 87 TRACE MACRO 88 $L XCT TRACECALL($(1)) 89 NOP ($(1)*BITS 22:26)+($(2)*BITS 27:31) 90 EMAC 91 92 93 ********************************************************************************** 94 * * 95 * The following macro will define the beginning of a * 96 * stack frame. It is intended for use with ENDFRAME. We will * 97 * automatically generate a BSS 1 for the return link word. * 98 * * 99 ********************************************************************************** 100 101 NOLIST CREF 102 BEGFRAME MACRO 103 NOLIST 104 NOLIST CREF 105 NOSYMS 106 ZZ!FRAME BASE SP beginning of stack frame 107 SYMS 108 BSS 1 space for return link 109 LIST CREF 110 LIST 111 EMAC 112 LIST CREF 113 114 115 ********************************************************************************** 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 35 (MACRODEFS) F 5 Macro Definitions 116 * * 117 * The following macro is just like BEGFRAME except that * 118 * it does NOT generate a BSS 1 for the return link word. * 119 * * 120 ********************************************************************************** 121 122 BEGFRAME2 MACRO 123 NOLIST 124 NOLIST CREF 125 NOSYMS 126 ZZ!FRAME BASE SP beginning of stack frame 127 SYMS 128 LIST CREF 129 LIST 130 EMAC 131 132 133 ********************************************************************************** 134 * * 135 * The following macro will define the end of a stack * 136 * frame. It is intended for use with BEGFRAME. We will * 137 * define labels called PUSH and POP for use as operands of * 138 * ENTER and LEAVE instructions. This pair of macros can only * 139 * be used once per block. Note that this precludes their use * 140 * in an inner block! * 141 * * 142 ********************************************************************************** 143 144 NOLIST CREF 145 ENDFRAME MACRO 146 NOLIST 147 NOLIST CREF 148 DRCT 149 ZZ!LEN EQU DISPW ZZ!FRAME 150 PUSH EQU STAK SP,ZZ!LEN 151 POP EQU PUSH 152 ORG ZZ!FRAME 153 LIST CREF 154 LIST 155 EMAC 156 LIST CREF 157 158 159 ********************************************************************************** 160 * * 161 * PFAILEN - Enable Power-Fail Interrupt * 162 * This macro will set the power-fail restart address and * 163 * enable power-fail interrupts. Usage: * 164 * * 165 * PFAILEN location * 166 * * 167 ********************************************************************************** 168 169 170 PFAILEN MACRO 171 $L LD R0 ADR $(1) 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 36 (MACRODEFS) F 5 Macro Definitions 172 ST R0 POWERUPLOC 173 IORMSR MSRPFINTE 174 EMAC 175 176 177 ********************************************************************************** 178 * * 179 * PFAILDS - Disable Power-Fail Interrupt * 180 * This macro will disable power-fail interrupts and * 181 * clear the power-fail restart address. * 182 * * 183 ********************************************************************************** 184 185 PFAILDS MACRO 186 $L CLBMSR MSRPFINTE 187 STZ POWERUPLOC 188 EMAC 189 190 191 ********************************************************************************** 192 * * 193 * PFAILCHK - Check for power failure * 194 * This macro will allow a power-fail interrupt to occur * 195 * if one is pending, control returns to the specified address * 196 * if a power-fail interrupt just occurred or if a power-fail * 197 * restart is in progress. Usage: * 198 * * 199 * PFAILCHK location * 200 * * 201 ********************************************************************************** 202 203 PFAILCHK MACRO 204 $L CMZ POWERFLAG power-fail restart in progress? 205 JNE $(1) jump if so 206 PFAILEN $(1) else allow interrupt 207 PFAILDS then disallow interrupt 208 EMAC 209 210 211 ********************************************************************************** 212 * * 213 * ASSERTEQ - Make sure two labels are equal * 214 * This macro will generate an assembly-time error if the * 215 * given expressions are not equal. Usage: * 216 * * 217 * ASSERTEQ expr1,expr2 * 218 * * 219 ********************************************************************************** 220 221 ASSERTEQ MACRO 222 BSS $(1)-$(2) error if $(1) < $(2) 223 BSS $(2)-$(1) error if $(2) < $(1) 224 EMAC 11 INPUT MACHDEFS machine parameter definitions 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 37 (MACHDEFS) F 6 Machine Definitions 4 5 ********************************************************************************** 6 * * 7 * MACHINE DEFINITIONS * 8 * * 9 ********************************************************************************** 10 00000000 11 ZERO EQU MA 0 BEGINNING OF MONITOR MAIN MEMORY 00000000 12 PWRUPADDR EQU ZERO address for Power Fail Restart Code 13 00000000 ABS 14 STORE EQU 0 marker for pre-initialized variables FFFFFFFF ABS 15 ONEBITS EQU 0FFFFFFFF 00000010 BYTE 16 LOCKBITB EQU BIT 0 this bit indicates a list is locked 80000000 ABS 17 LOCKBIT EQU 1*LOCKBITB 18 19 ********************************************************************************** 20 * * 21 * Size information for various entities. * 22 * * 23 ********************************************************************************** 24 00000020 ABS 25 WORDLNTH EQU 32 BITS PER MACHINE WORD 00000011 ABS 26 ADDRESS EQU 17 BITS IN AN ADDRESS 00000810 BYTE 27 STPNLAST EQU BIT 4 bit in R7 for NOT last PAR/STP 00000A10 BYTE 28 STPVALUE EQU BIT 5 bit in R7 for value PAR/STP 00000C10 BYTE 29 STPDUBL EQU BIT 6 bit in R7 for double word PAR/STP 00000018 ABS 30 MSBLKLOG EQU 24 length of mass storage relative address 00000004 ABS 31 CPW EQU 4 number of characters in a word 00000400 ABS 32 WPP EQU 1024 number of words on a page 0000000A ABS 33 LWPP EQU WPP LOG 2 log of page size 00001000 ABS 34 CPP EQU WPP*CPW number of characters on a page 00001C10 BYTE 35 FLDRELOCB BIT (WORDLNTH-ADDRESS-1) xtra addr bit to flip reloc sense 00001F10 BYTE 36 FLDADRS BITS (WORDLNTH-ADDRESS):(WORDLNTH-1) address field 00001E70 BYTE 37 FLDPAGE BITS (WORDLNTH-ADDRESS):(WORDLNTH-LWPP-1) virt. page # field 000000F0 BYTE 38 UPR15 EQU BITS 0:(WORDLNTH-ADDRESS-1) non-address part of word 00001450 BYTE 39 FLDMODE EQU BITS 10:14 pointer mode field 00001560 BYTE 40 FLDMODEADR EQU FLDMODE+FLDADRS mode and address part of opcode 00001F30 BYTE 41 FLDCHARS EQU BITS 15:1 character address field 00001F60 BYTE 42 FLDBITS EQU BITS 15:4 bit address field 00000080 BYTE 43 CH0 EQU BITS 0:7 character zero 00001080 BYTE 44 CH1 EQU BITS 8:15 character one 00002080 BYTE 45 CH2 EQU BITS 16:23 character two 00003080 BYTE 46 CH3 EQU BITS 24:31 character three 00000010 ABS 47 NUMSLOTS EQU 16 number of bus slots 00000004 ABS 48 LOGSLOTS EQU NUMSLOTS LOG 2 size of a slot number field 49 50 * Monitor status register bit definitions 51 00000080 BYTE 52 MSRRSTRT EQU BITS 0:7 instruction restart code 53 00001E10 BYTE 54 MSRMPEPRCB EQU BIT 15 indicates processing memory parity error 55 00002040 BYTE 56 MSRINTCNT EQU BITS 16:19 interrupt level counter 57 00002810 BYTE 58 MSRPFINTEB EQU BIT 20 power fail interrupt enable 59 * if 1, PF interrupts allowed, 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 38 (MACHDEFS) F 6 Machine Definitions 60 * if 0, PF ints controlled by MSRINTCNT. 00002A10 BYTE 61 MSRIAPRB EQU BIT 21 associated processor interrupt pending 00002C10 BYTE 62 MSRTRACEIB EQU BIT 22 interrupt after instruction step 00002E10 BYTE 63 MSRMONB EQU BIT 23 on if monitor instructions okay 64 * relocation bits: 65 * 1 sez use monitor half of page file 66 * 0 sez use user half of page file 00003010 BYTE 67 MSRSRELOCB EQU BIT 24 operand store 00003210 BYTE 68 MSRFRELOCB EQU BIT 25 operand fetch 00003410 BYTE 69 MSRPRELOCB EQU BIT 26 pointer relocation 00003610 BYTE 70 MSRIRELOCB EQU BIT 27 instruction fetch 71 00003840 BYTE 72 MSRSLOT EQU BITS 28:31 bus slot of processor 73 * values used in changing MSR 00000100 ABS 74 MSRMON EQU 1*MSRMONB 00000800 ABS 75 MSRPFINTE EQU 1*MSRPFINTEB 00000080 ABS 76 MSRSRELOC EQU 1*MSRSRELOCB 00000040 ABS 77 MSRFRELOC EQU 1*MSRFRELOCB 00000020 ABS 78 MSRPRELOC EQU 1*MSRPRELOCB 00000010 ABS 79 MSRIRELOC EQU 1*MSRIRELOCB 80 0000F000 ABS 81 INTSON EQU ONEBITS/MSRINTCNT*MSRINTCNT 0000E000 ABS 82 INTSOFF EQU ((ONEBITS/MSRINTCNT)-1)*MSRINTCNT 0000F000 ABS 83 USERMSR EQU INTSON 000001F0 ABS 84 MSRFORMON EQU MSRMON+MSRSRELOC+MSRFRELOC+MSRPRELOC+MSRIRELOC 0000F1F0 ABS 85 MONMSR EQU INTSON+MSRFORMON 0000E1F0 ABS 86 MONMSRIOFF EQU INTSOFF+MSRFORMON Used by offline stuff 87 88 * Process Status Register bit definitions 89 00002C10 BYTE 90 PSRBCDOTRP EQU BIT 22 BCD overflow trap enable 00003010 BYTE 91 PSRFIXATRP EQU BIT 24 fixed point arith error trapbit 00003210 BYTE 92 PSRFLTATRP EQU BIT 25 floating point arith error trapbit 00003410 BYTE 93 PSRUNDETRP EQU BIT 26 undefined number arith error trapbit 00003610 BYTE 94 PSRMODIFB EQU BIT 27 modify arithmetic 00003810 BYTE 95 PSROVERFB EQU BIT 28 arithmetic overflow 00003A10 BYTE 96 PSRCARRYB EQU BIT 29 arithmetic carry 00003C20 BYTE 97 PSRCONDB EQU BITS 30:31 condition bits (30-EQ, 31-LT) 98 * values used in changing PSR 00000010 ABS 99 PSRMODIF EQU 1*PSRMODIFB 00000004 ABS 100 PSRCARRY EQU 1*PSRCARRYB 00000008 ABS 101 PSROVERFLOW EQU 1*PSROVERFB 102 103 * The WAIT instruction waits ten microseconds for each count 104 * in the operand. 105 00040000 ABS 106 WAITCOUNT EQU 2 POWER 18 about 2.5 seconds 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 39 (MACHDEFS) F 6 Machine Definitions 108 109 ********************************************************************************** 110 * * 111 * PAGE FILE DEFINITIONS * 112 * The page file contains all information required to * 113 * convert a virtual page number and the monitor/user * 114 * information into a slot number/physical page number/ * 115 * allowed access. A word formatted for the page file is * 116 * referred to as a 'page map value'. * 117 * After reading the indicated page file location, the * 118 * PFRC instruction sets it to illegal to reference. However, * 119 * this may also be accomplished by loading both the 'read * 120 * only' and 'altered' bits. * 121 * * 122 ********************************************************************************** 123 0012C000 3 REG 124 PFPTR EQU R3 register used to address PF 125 00000840 BYTE 126 PFSLOT EQU BITS 4:7 slot where page is hiding 00001A30 BYTE 127 PFCNTL EQU BITS 13:15 bits for controlling page 00001A10 BYTE 128 PFROBIT EQU BIT 13 on if page read only 00001C10 BYTE 129 PFALTBIT EQU BIT 14 on if page altered 00001E10 BYTE 130 PFREFBIT EQU BIT 15 on if page referenced 00060000 ABS 131 PFNOREFVAL EQU 1*PFROBIT+1*PFALTBIT page map value that indicates 132 * illegal to reference 000028C0 BYTE 133 PFPAGENUM EQU BITS 20:31 page number in slot ( or I/O device ) 00000080 ABS 134 NPS EQU 2 POWER (ADDRESS-LWPP) number of pages per state 00000100 ABS 135 PFSIZE EQU 2*NPS size of the page file 00000080 ABS 136 MONPF EQU NPS first location in monitor page file 137 138 ********************************************************************************** 139 * * 140 * Other miscellaneous address field definitions * 141 * * 142 ********************************************************************************** 143 144 * for I/O channel use, large hardware address field 00001560 BYTE 145 PAGEANDISP BITS 10:31 full physical address 146 * within an 18 bit virtual address, the following fields apply 00001C80 BYTE 147 PAGEFIELD BITS 14:21 page number 00003010 BYTE 148 MONBIT BIT (31-(NPS LOG 2)) bit within pagefield which 149 * indicates page is monitor 00002CA0 BYTE 150 DISPFIELD BITS 22:31 displacement within page 000014C0 BYTE 151 FLDABSPG EQU BITS 10:21 page # in absolute address 152 00000080 ABS 153 PNPAGEZERO EQU MONPF+0 page number for monitor zero page 00001000 154 BOOTLOC EQU MA 01000 location for system bootstrap 00000084 ABS 155 PNBOOTLOC EQU MONPF+(BOOTLOC DISPW ZERO)/WPP page number for bootstrap 156 157 ********************************************************************************** 158 * * 159 * MAXMAPVALS determines the number of virtual pages that * 160 * is specifically reserved for the free storage required to * 161 * maintain each user active. Note that these pages are NOT * 162 * available to the system and are never reclaimed. * 163 * * 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 40 (MACHDEFS) F 6 Machine Definitions 164 ********************************************************************************** 165 00000004 ABS 166 MAXMAPVALS EQU 4 maximum pages for user free memory 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 41 (MACHDEFS) F 6 Machine Definitions 168 169 ********************************************************************************** 170 * * 171 * Treatise on list locking * 172 * This is in here because, even though we know better, * 173 * this keeps getting screwed up. * 174 * The only instructions that ever do an interlocked * 175 * memory operation (read-modify-write) are: * 176 * * 177 * ADDB ADDM ANDM BRSBM CLRT DEC EXCH INC INCL * 178 * IORM RSBM SETT SUBM XORM * 179 * * 180 * Even these instructions do non-interlocked * 181 * read-restore operations if the operand is not a whole word. * 182 * For the purposes of this discussion, a ZBM starting at bit * 183 * 0, 32 long is NOT a whole word. * 184 * The normal kind of lock word is a whole word, directly * 185 * addressed and set with a SETT instruction and cleared with * 186 * a STZ. * 187 * * 188 * Protecting data structures * 189 * A word may be modified in a protected manner in one of * 190 * two ways: * 191 * 1) Every operation on the word is an interlocked * 192 * memory operation. * 193 * 2) The word is modified only when an associated lock * 194 * is held. * 195 * Please, please note that these two methods may not, * 196 * nay, MUST not ever be mixed. Note especially that if ANY * 197 * operation inside a critical region is non-interlocked, then * 198 * it does NOT work to try to modify the word outside of the * 199 * critical region with an RMW. * 200 * * 201 ********************************************************************************** 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 42 (MACHDEFS) F 6 Machine Definitions 203 204 ********************************************************************************** 205 * * 206 * Console Area * 207 * The console area register of a CPU points to a block * 208 * of memory where the machine state will be saved on an * 209 * interrupt. The machine state is saved in the first 10 * 210 * words of the console area as defined below. The remainder * 211 * of the block is used by the operating system to hold the * 212 * virtual machine state and temporary storage. The entire * 213 * block is defined here for convenience. * 214 * The operating system maintains a stack of CAs for each * 215 * process so that when a user traps to the monitor, the * 216 * monitor has its own registers and stack area to use. * 217 * Furthermore, the monitor can issue further XREQs, in * 218 * effect, calling itself. This works as follows: Each * 219 * interrupt vector specifies a NEW CA ( the registers for the * 220 * interrupted process are always stored into its own console * 221 * area ) which will be used to save the registers of the * 222 * interrupt routine being started ( if it, in turn, is * 223 * interrupted ). If the interrupt routine being started * 224 * branches to the virtual monitor, the CA that it acquired * 225 * from the IVT will be replaced in the IVT by a fresh one ( * 226 * acquired from free storage ) and the CA in use will be * 227 * linked to the PSA of the process. * 228 * * 229 ********************************************************************************** 230 00000000 231 CONAREA BASE R0 CPU CONSOLE AREA 000800F0 0 ZBM 232 CAPSR BSSB WORDLNTH-ADDRESS process status word 00081F10 0 ZBM 233 CAPC BSSB ADDRESS the program counter 00160801 0 BASE 234 CAMSR BSS 1 monitor status word 00160802 0 BASE 235 CAR0 BSS 1 R0 00160803 0 BASE 236 CAR1 BSS 1 R1 00160804 0 BASE 237 CAR2 BSS 1 R2 00160805 0 BASE 238 CAR3 BSS 1 R3 00160806 0 BASE 239 CAR4 BSS 1 R4 00160807 0 BASE 240 CAR5 BSS 1 R5 00160808 0 BASE 241 CAR6 BSS 1 R6 00160809 0 BASE 242 CAR7 BSS 1 R7 243 * end of the machine dependant part 0016080A 0 BASE 244 CAINTADR BSS 1 user interrupt address 0016080B 0 BASE 245 CAINTMASK BSS 1 bits controlling interrupt ability 246 * bit assignments in mask word 0008001B 0 ZBM 247 CAINTENABL EQU CAINTMASK/BIT 0 indicates user accepting interrupts 248 * EQU 0 interrupt enable 00000001 ABS 249 CAIMINST EQU 1 instruction failure 00000002 ABS 250 CAIMCALL EQU 2 call/enter mismatch 00000003 ABS 251 CAIMARITH EQU 3 arithmetic failure 00000004 ABS 252 CAIMCKBDS EQU 4 check bounds trap 00000005 ABS 253 CAIMMPV EQU 5 memory protect violation 00000006 ABS 254 CAIMBREAK EQU 6 terminal break 00000007 ABS 255 CAIMALLXR EQU 7 if off, return all XREQ error codes 00000008 ABS 256 CAIMNETERM EQU 8 non-empty terminal 00000009 ABS 257 CAIMNEPATH EQU 9 non-empty path 0000000A ABS 258 CAIMTIME EQU 10 time interrupt 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 43 (MACHDEFS) F 6 Machine Definitions 0000000B ABS 259 CAIMMSG EQU 11 message receipt 0000000C ABS 260 CAIMVMF EQU 12 virtual memory failure 0000000D ABS 261 CAIMABORT EQU 13 operator abort 0000000E ABS 262 CAIMGUNIT EQU 14 unit receipt 263 0000000A ABS 264 CANUMUREGS EQU DISPW CAR0 number of scratch regs + IMR/IAR 0000000C ABS 265 CANUMREGS EQU DISPW CAPC number of registers in console area 0016080C 0 BASE 266 CALINK BSS 1 link to next console area 267 0016080D 0 BASE 268 CASTACKPTR BSS 1 address of stack associated with this CA 269 NOLIST CREF 00138000 6 REG 270 SP EQU R6 register used for stack pointer 271 LIST CREF 0016080E 0 BASE 272 CAXOPERAND BSS 1 holds XREQ operand 273 DRCT 0000000F DISP 274 CALNTH EQU DISP CONAREA LENGTH OF A CONSOLE AREA 00000004 ABS 275 CALOG EQU CALNTH LOG 2 276 ORG CONAREA 277 12 INPUT IODEFS definitions for I/O devices 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 44 (IODEFS) F 7 I/O definitions 4 5 ********************************************************************************** 6 * * 7 * Bus commands. * 8 * * 9 * These are the basic command words that appear on the * 10 * bus. The left 4 bits are interpreted as the bus command. * 11 * The right 22 bits are the address. The remaining 6 bits * 12 * are reserved for information used in support of debugging. * 13 * * 14 * When these commands go to a memory, the address (for * 15 * read, read2, write, rmw) is interpreted as a normal memory * 16 * data address. When these commands go to other devices, the * 17 * interpretation is dependent on the device. In general, the * 18 * 'page number' part of the address is decoded as a 'class' * 19 * of request. In the PPU only four classes are allowed, one * 20 * for each channel. This classification on the part of the * 21 * devices is useful to the operating system, because in order * 22 * to alter this part of the address the page file location * 23 * must be reloaded with the new page number field. * 24 * * 25 * The 'displacement' part of the address is used to * 26 * break down the requests to their final form. These bits * 27 * may be altered by the operating system by merely index * 28 * modifying an instruction or assembling a different address * 29 * (while using the same page file location). * 30 * * 31 ********************************************************************************** 32 00000000 ABS 33 BUSCWRITE EQU 000000000 write data to the device 10000000 ABS 34 BUSCRMW EQU 010000000 read/modify write 20000000 ABS 35 BUSCREAD EQU 020000000 request read of data 30000000 ABS 36 BUSCREAD2 EQU 030000000 read double 40000000 ABS 37 BUSCWRU EQU 040000000 request WRU info 50000000 ABS 38 BUSCST EQU 050000000 request self test 60000000 ABS 39 BUSCIP EQU 060000000 interrupt poll 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 45 (IODEFS) F 7 I/O definitions 41 42 ********************************************************************************** 43 * * 44 * Format of the interrupt poll response * 45 * This is the data word that a VRA bus board will return * 46 * in response to an interrupt poll request. If the polled * 47 * device does not have an interrupt asserted the data word * 48 * returned will be all zero. * 49 * The PPU and the SSU are the only boards that recognize * 50 * this command. Each has its own meaning assigned to bits * 51 * 1:31 while bit zero is reserved to indicate that an * 52 * interrupt is being requested. * 53 * * 54 ********************************************************************************** 55 00001080 BYTE 56 IPRPPUCHAN EQU BITS 8:15 PPU channel requesting interrupt 00002100 BYTE 57 IPRPPUSTAT EQU BITS 16:31 PPU status causing interrupt 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 46 (IODEFS) F 7 I/O definitions 59 60 ********************************************************************************** 61 * Format of the Who-aRe-yoU zero response. * 62 * This is the data word that all VRA bus boards return * 63 * in response to a WRU with a zero address. * 64 ********************************************************************************** 65 00000040 BYTE 66 WRU0TYPE EQU BITS 0:3 type of device 00000000 ABS 67 SLTTUNK EQU 0 indicates nothing here 00000001 ABS 68 SLTTMEM EQU 1 indicates memory here 00000002 ABS 69 SLTTCPU EQU 2 indicates CPU here 00000003 ABS 70 SLTTPPU EQU 3 indicates PPU here 00000004 ABS 71 SLTTSSU EQU 4 indicates SSU here 00000A10 BYTE 72 WRU0INT EQU BIT 5 on if interrupting 00000D20 BYTE 73 WRU0DD EQU BITS 6:23 device dependent status 00001040 BYTE 74 WRU0CPUSUB EQU BITS 8:11 sub code in CPU indicating CPU type 00000001 ABS 75 CPU4 EQU 1 indicates we are a CPU4 00003080 BYTE 76 WRU0MREV EQU BITS 24:31 micro code revision 77 78 ********************************************************************************** 79 * Format of the WRU 0 response from a Memory Control * 80 * Unit and a Semi-conductor Memory Unit. * 81 ********************************************************************************** 82 00001040 BYTE 83 WRUMEMDEVT EQU BITS 8:11 indicates type of memory device 84 * EQU 0 indicates regular MCU 00000001 ABS 85 WRU0SMUDEV EQU 1 indicates this is a SMU board 00002040 BYTE 86 WRUMEMINC EQU BITS 16:19 says the number of words of memory 87 * described by each bit of the WRU4 response: 88 * 0 => 32K words, 1 => 64K words, 89 * 2 => 128K words, 3 => 256K words, etc. 00002E10 BYTE 90 WRUMEMNO0 EQU BIT 23 1 if memory address zero not installed 91 * on this memory controller. 92 93 ********************************************************************************** 94 * Format of the WRU 4 response from a MCU. In the * 95 * following description, "n" means 2 POWER (15+WRUMEMINC). * 96 ********************************************************************************** 97 00002C10 BYTE 98 WRUMEMNONE EQU BIT 22 no memory is attached to this MCU 00002E10 BYTE 99 WRUMEMBAD EQU BIT 23 memory is improperly attached 00003080 BYTE 100 WRUMEMHERE EQU BITS 24:31 bits describing what memory is attached: 101 * bit 31 => words 0.. n-1 are useable 102 * bit 30 => words n..2*n-1 are useable 103 * bit 29 => words 2*n..3*n-1 are useable 104 * ... 105 * bit 24 => words 7*n..8*n-1 are useable 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 47 (IODEFS) F 7 I/O definitions 107 108 ********************************************************************************** 109 * * 110 * SMU command codes. These command codes are used for * 111 * manipulation of the SMU error logs. * 112 * The SMU is limited in the number of pseudo-commands it * 113 * can process so requires that they come in no faster than * 114 * one command every 20 ms. If the SMU receives a * 115 * pseudo-command while it is processing a previous one the * 116 * first pseudo-command will be lost. * 117 * * 118 ********************************************************************************** 119 120 * EQU BITS 0:3 bits containing SMU command code 121 * These are the standard bus read and write command formats 122 * EQU 0 write 123 * EQU 1 illegal 124 * EQU 2 read 125 00000C10 BYTE 126 SMUPCMND EQU BIT 6 indicates this is a pseudo-command 00001840 BYTE 127 SMUPCC EQU BITS 12:15 psuedo-command code 128 * Write pseudo-command pseudo-command codes 129 * EQU 0 unused 130 * EQU 1 clear error log and error log buffer 131 * EQU 2 clear individual error entry 132 * Read pseudo-command pseudo-command codes 133 * EQU 0 read random error log entry 134 * EQU 1 read sequential error log entry 00000002 ABS 135 SMUPCRCEL EQU 2 read current error log status 136 137 * EQU BITS 20:31 address field 138 * EQU BITS 21:23 rank field 139 * EQU BITS 24:31 IC field 140 141 * Format of the error status word 142 * EQU BIT 0 unused 143 * EQU BITS 1:7 correction check bits 144 * EQU BITS 9:10 error type 145 * EQU 0 soft error 146 * EQU 1 hard error 147 * EQU 2 uncorrectable error 148 * EQU BITS 11:13 rank address 149 * EQU BITS 14:15 upper address bits 150 * EQU BITS 16:23 Ras address 151 * EQU BITS 24:31 Cas address 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 48 (IODEFS) F 7 I/O definitions 153 154 ********************************************************************************** 155 * * 156 * CPU ERROR CODES (Rev 12 and greater microcode) * 157 * * 158 * The CPU has two types of fatal errors: Bus errors * 159 * and CPU errors. When the CPU gets a Bus error, it asserts * 160 * BSE. When a CPU error occurs, a CPU error message is sent * 161 * to the SSU. In both cases, certain state information has * 162 * been saved by the CPU, and is accessable from the RFP. * 163 * * 164 * The state information is saved as follows: * 165 * * 166 * R11 (SP17) = Microstatus register 1 * 167 * R12 (SP18) = Microstatus register 2 ([28:31]=From register) * 168 * R13 (SP19) = Microstatus register 3 * 169 * R14 (SP20) = Input register 1 * 170 * R15 (SP21) = Input register 2 * 171 * R16 (SP22) = Output register 1 * 172 * R17 (SP23) = Output register 2 * 173 * R19 (SP24) [0:3] = Error code * 174 * [4:7] = Error parameter * 175 * [20:31] = ucode address where error was detected * 176 * * 177 * The error codes are listed below. Error codes 1 * 178 * through 7 are Bus error codes and codes 8 through A are * 179 * CPU error codes. * 180 * * 181 * 1 --> Parity error on the Bus. * 182 * 2 --> Bad flags on the Bus. * 183 * 3 --> Bad command code on the Bus. * 184 * 4 --> Bad command address on the Bus. * 185 * 5 --> RTO timeout on the Bus. * 186 * 6 --> IBF timeout on the Bus. * 187 * 7 --> Parity and flag error on the Bus (same as codes * 188 * 1 and 2) * 189 * 8 --> Page fault during trap setup * 190 * 9 --> Page fault when trying to store console area * 191 * A --> Hardware error * 192 * * 193 * The second digit of the error message is the error * 194 * parameter. These are used to indicate the type of word * 195 * which caused a flag or parity error. * 196 * * 197 * 0 --> No information * 198 * 1 --> Error in command word of received command * 199 * 2 --> Error in data word of received command * 200 * 3 --> Error in instruction fetch data * 201 * 4 --> Error in operand fetch data * 202 * 5 --> Error in pointer fetch data * 203 * 6 --> Error in interrupt poll data * 204 * 7 --> Error in trap fetch data * 205 * * 206 * CPU command codes. The command codes given here * 207 * require something in the page file which is given as the * 208 * offset. Command values given are within that offset. * 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 49 (IODEFS) F 7 I/O definitions 209 * * 210 ********************************************************************************** 211 00000000 ABS 212 CPUREGOFST EQU 000000 offset for registers in RAM 00000000 ABS 213 CPUREG EQU 000 R/W registers indexed by number (R0:R7) 00000008 ABS 214 CPUPC EQU 008 R/W program counter 00000009 ABS 215 CPUMSR EQU 009 R/W monitor status register 0000000A ABS 216 CPUCCA EQU 00A R/W current console area register 217 * EQU 00B R/W interrupt mask 218 * 00010000 ABS 219 CPUPFOFSET EQU 010000 R/W offset for PF indexed by number 220 * 00020000 ABS 221 CPUOOFFSET EQU 020000 R/W offset for other registers 00000000 ABS 222 CPUPSR EQU 000 R/W processor status register 00000001 ABS 223 CPUI EQU 001 R/W processor instruction register 00000002 ABS 224 CPUA EQU 002 R/W processor A accumulator 00000003 ABS 225 CPUQ EQU 003 R/W processor Q accumulator 00000004 ABS 226 CPUPMS EQU 004 R/W processor "outboard" MSR 00000005 ABS 227 CPUUS EQU 005 R/W processor uproc status register 228 * 00030000 ABS 229 CPUCOFFSET EQU 030000 command offset 230 * (the data word is ignored for these commands) 00000000 ABS 231 CPURUN EQU 000 W begin running 00000001 ABS 232 CPUSTOP EQU 001 W stop execution 00000002 ABS 233 CPUSCYCLE EQU 002 W single cycle 00000003 ABS 234 CPUSSTEP EQU 003 W single step 00000004 ABS 235 CPUIAPR EQU 004 W interrupt associated processor 236 00000700 ABS 237 CPUUCODELD EQU 0700 W tells CPU to reload its microcode 00000703 ABS 238 CPUPTCHCMD EQU 0703 W load microcode patches 239 * data word contains physical address of 240 * start of patch 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 50 (IODEFS) F 7 I/O definitions 242 243 ********************************************************************************** 244 * * 245 * SSU * 246 * The SSU (System Services Unit) provides all manner of * 247 * miscellaneous services to the system. * 248 * * 249 * CLOCK * 250 * The system clock is a 44 bit CMOS counter that ticks * 251 * every millisecond. It has a battery backup to keep it * 252 * operating during power outages of up to a week. The clock * 253 * is factory loaded with the correct time, and it should only * 254 * need occasional corrections for drift. The epoch (time * 255 * when clock would have been 0000) is 0000 17 November, 1858. * 256 * The 44 bit counter will overflow sometime in the 25th * 257 * century. * 258 * Functions are provided to read the clock, write the * 259 * clock, and to increment or decrement it. The latter are * 260 * used for all minor corrections to prevent slippage * 261 * problems. Starting with Rev 14, the SSU can also be * 262 * initialized to store the current clock into memory * 263 * every millisecond. * 264 * * 265 * CONTROL PANEL DISPLAY * 266 * The 10 character display on the control panel is * 267 * shared by several functions. The SSU contains two message * 268 * buffers for driving the display. One is used for SSU * 269 * generated displays, while the other is reserved for * 270 * displays generated by the CPUs (operating system). This * 271 * allows the most recent display of each type to be available * 272 * to the RDU. * 273 * First, the SSU will display bus errors and self test * 274 * errors in it. * 275 * Second, if any CPU executes a halt or stop * 276 * instruction, that CPU sends a message to the SSU who * 277 * displays a halt code (see HALTDEFS) then stops the entire * 278 * system by asserting PAUSE. * 279 * Third, the system may display anything that it chooses * 280 * while it is running. * 281 * The character set is 6-bit ASCII, as follows: * 282 * 0 1 2 3 4 5 6 7 * 283 * +-------------------------- * 284 * 00 | @ A B C D E F G * 285 * 08 | H I J K L M N O * 286 * 10 | P Q R S T U V W * 287 * 18 | X Y Z [ ~ ] { } * 288 * 20 | ! " # $ % & ' * 289 * 28 | ( ) * + , - . / * 290 * 30 | 0 1 2 3 4 5 6 7 * 291 * 38 | 8 9 : s < = > ? (s = semicolon) * 292 * In each character, the 80 bit turns on a decimal point * 293 * after the character. In the word containing the last two * 294 * characters, two low-order bits control the ALARM light and * 295 * the horn. * 296 * * 297 * REMOTE FRONT PANEL * 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 51 (IODEFS) F 7 I/O definitions 298 * The SSU has an RS232 port on it for connection to a * 299 * dedicated modem. This is provided for use by the remote * 300 * front panel maintenance facility. There is also a 50 pin * 301 * ribbon connector provided for connection to a portable * 302 * field service maintenance unit. * 303 * * 304 * INTERVAL TIMER * 305 * A 'fence' register is provided to indicate the time at * 306 * which the system desires an interrupt. A down counter is * 307 * not used because of the problem of slippage. That is, a * 308 * given interrupt time, if composed of many smaller * 309 * intervals, is subject to an error for each interval used. * 310 * This error would be one millisecond for each tick that * 311 * occurs between the interrupt posting and the reloading of * 312 * the down counter. Instead, when the lower 16 bits of the * 313 * clock become equal to the fence register due to a tick, or * 314 * an increment, the SSU posts an interrupt. This allows the * 315 * system to store the actual times at which interrupts are * 316 * desired. The interrupts are kept ordered and the next one * 317 * is used to load the fence. * 318 * * 319 * CONTROL PANEL SWITCHES * 320 * These switches are provided primarily so that the * 321 * operator can indicate a few options at the time of a system * 322 * boot. They also allow the operator to select what will be * 323 * displayed on the ten character display during system * 324 * operation. * 325 * * 326 * NON-VOLATILE MEMORY * 327 * A buried charge read-mostly memory is provided so that * 328 * the system may store up to 128 bytes of vital information. * 329 * In SSU rev 14, the NVM is of a different type and contains * 330 * 2048 bytes of information, although the full 2048 bytes are * 331 * not usable until rev 15 due to microcode bugs. Each byte is * 332 * individually addressed. Bytes are read or written by reading * 333 * or writing through SSUNVM+nn. For read, only bits 24:31 are * 334 * valid, for write, the data is taken from bits 24:31. * 335 * * 336 * Error Block * 337 * The SSU's error block is a 16 word buffer. Each word * 338 * corresponds to a slot in the VRA bus. If a word is zero, * 339 * then either there is not a CPU in that slot, or that CPU * 340 * has not sent a Halt, Stop, or Error message to the SSU. * 341 * Prior to microcode 15, the special case of a CPU executing * 342 * a word of all zeros created the irritating phenomenon of * 343 * storing a zero into the error file which appeared as no * 344 * error. Rev 15 converts the all zero word, when received, * 345 * into 0FF000000 before storing it into the error file. * 346 * * 347 * If a word in the block is nonzero, it is displayed as follows: * 348 * * 349 * If (Bits[0:7] = 0) and (Bit[8] = 0), then the display is * 350 * "HLTn axxxx", where n is the slot number, a is a 6-bit ASCII * 351 * char in Bits[10-15], and xxxx is the 4 hex nibbles in Bits[16-31]. * 352 * Note that, prior to SSU microcode Rev 15, a HALT 0 * 353 * placed all 0s (the instruction word) into the error * 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 52 (IODEFS) F 7 I/O definitions 354 * file. This looks as if no error has been posted. * 355 * * 356 * If (Bits[0:7] = 0) and (Bit[8] = 1), then the display is * 357 * "STPn axxxx", where n is the slot number, a is a 6-bit ASCII * 358 * char in Bits[10-15], and xxxx is the 4 hex nibbles in Bits[16-31]. * 359 * * 360 * If (Bits[0:7] = 0FF) then the entry is for a HALT 0. * 361 * * 362 * If (Bits[0:7] <> 0) then the display is "CPU n Err wwwwwwww", * 363 * where n is the slot number, and wwwwwwww is the word in the * 364 * error block. * 365 * * 366 * BOOTSTRAP * 367 * The sequence of events during a bootstrap is as * 368 * follows: * 369 * 1) Assert PAUSE, PFW, and MCLR. This clears out the * 370 * bus interface logic and such like and sets up the * 371 * microprocessors to run when released. * 372 * 2) Release PFW and MCLR. * 373 * 3) Poll all slots and build a table of filled slots. * 374 * 4) For each active slot, do WRU 0 through WRU 0E * 375 * and store the results into 0200+*16 * 376 * in the first available page of memory. * 377 * 5) Command each bus device to run its self test. * 378 * 6) Allow enough time for the self test to complete. * 379 * 7) Retrieve the self test response (WRU OF) from all slots * 380 * and store it with the other WRU data (see item 4, above). * 381 * 8) Initialize each CPU to execute the monitor code * 382 * starting at location 0. * 383 * 9) Copy the 16K EPROM into locations 0-01FF of the * 384 * first page of available memory. Note: This EPROM * 385 * may also be read by reading through SSUROFFSET+nn. * 386 * 10) Release PAUSE to let the CPUs go. * 387 * * 388 * POWER UP * 389 * The sequence of events at power up is as * 390 * follows: * 391 * 1) Run self test on itself. * 392 * 2) Assert MCLR, PFW, and PAUSE. Wait for 1 second. * 393 * 3) Clear MCLR. Wait for 250 Msecs. * 394 * 4) Clear PFW. Wait for 5 seconds. * 395 * 5) * 396 * * 397 * SSU command codes. The command codes given here require * 398 * an offset to be loaded in the page file (as a page number). * 399 * The command values are relative to that offset. * 400 * * 401 ********************************************************************************** 402 00003080 BYTE 403 IPRSSUSTAT EQU BITS 24:31 Interrupt status bits in interrupt poll 404 405 * EQU 0C00 R/W SSU scratchpad Ram (byte at a time in bits 24:31) 406 00001000 ABS 407 SSUROFFSET EQU 01000 R offset to address PROM bootstrap 408 00001400 ABS 409 SSUCOFFSET EQU 01400 offset to following commands 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 53 (IODEFS) F 7 I/O definitions 410 * The SSU clock is a 44 bit counter 411 * that counts every millisecond. 412 * It has a battery to keep it 413 * operating during power failures. 00000001 ABS 414 SSUCLOCKU EQU 00001 R/W most significant 12 bits of clock 00000002 ABS 415 SSUCLOCKL EQU 00002 R/W least significant 32 bits of clock 00000003 ABS 416 SSUINCCLK EQU 00003 W increment clock 00000004 ABS 417 SSUDECCLK EQU 00004 W decrement clock 418 * These 3 codes are sent by the 419 * CPU microcode only. 00000005 ABS 420 SSUCPUHALT EQU 00005 W CPU halt/stop message 00000006 ABS 421 SSUCPUERR EQU 00006 W user error in monitor 00000007 ABS 422 SSUCPUBUSE EQU 00007 W CPU got abnormal data 423 * To/From remote or local front 424 * panel port. 00000008 ABS 425 SSUCHAROUT EQU 00008 R/W send char out to UART, sign sez ready 00002E10 BYTE 426 SSUBREAKB EQU BIT 23 bit indicating break command 00002C10 BYTE 427 SSUDWELLB EQU BIT 22 bit indicating dwell command 000000FF ABS 428 SSUMAXCC EQU 0FF maximum number of break or dwell chars 429 that can be sent at once 430 431 * The fence is matched against the 432 * right 16 bits of CLOCKL. 00000009 ABS 433 SSUFENCE EQU 00009 R/W 16 bit time to interrupt 434 435 * The operating system has control of the 436 * control panel display as long as the machine 437 * is running. These three locations are used 438 * for communications with the display. 439 * The SSU takes control of the display for 440 * many conditions. The system may read what 441 * the SSU last put up in the display through 442 * a different set of addresses, see below. 0000000A ABS 443 SSUDISP03 EQU 0000A R/W characters 0, 1, 2, 3 of system display 0000000B ABS 444 SSUDISP47 EQU 0000B R/W characters 4, 5, 6, 7 of system display 0000000C ABS 445 SSUDISP89 EQU 0000C R/W characters 8, 9 of system display, alarm, horn 00003410 BYTE 446 SSUHORN EQU BIT 26 W on to sound horn (continuously) 00003610 BYTE 447 SSUALARM EQU BIT 27 W on to light ALARM box 448 * EQU BIT 1 R horn is on 449 * EQU BIT 9 R Alarm light is on 450 0000000D ABS 451 SSUCHARIN EQU 0000D R char in from UART, sign sez new 452 * EQU BIT 23 on if Break rather than character 0000000E ABS 453 SSUMISCST EQU 0000E R misc. statuses 00003E10 BYTE 454 SSUMSLFP EQU BIT 31 local front panel connected 00003C10 BYTE 455 SSUMSBC EQU BIT 30 SSU providing bus clock 00003A10 BYTE 456 SSUMSNVM EQU BIT 29 NVM not busy 457 0000000F ABS 458 SSUINTMASK EQU 0000F R/W interrupt mask 459 * Bits in interrupt mask and WRU response 00003010 BYTE 460 SSUIMCI EQU BIT 24 character in from UART 00003210 BYTE 461 SSUIMCO EQU BIT 25 ready for character out 462 * EQU BIT 26 unused 00003610 BYTE 463 SSUIMCLKSTR EQU BIT 27 allow SSU to update clock in memory 00003810 BYTE 464 SSUIMERR EQU BIT 28 error log information available 00003A10 BYTE 465 SSUIMNVM EQU BIT 29 NVM ready 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 54 (IODEFS) F 7 I/O definitions 00003C10 BYTE 466 SSUIMFPS EQU BIT 30 control panel switch change 00003E10 BYTE 467 SSUIMTICK EQU BIT 31 clock interrupt 468 00000010 ABS 469 SSUBOOTFP EQU 00010 R control panel switches at boot time 470 * EQU 00010 W cause boot to happen 471 * bits 24:31 are boot number 00000011 ABS 472 SSUFPSWCH EQU 00011 R current control panel switches 473 * Bits in SSU control panel switch read 00000010 BYTE 474 SSURFP EQU BIT 0 on if RFP doing boot 475 * EQU BIT 24 RUN - when we can look, its on 476 * EQU BIT 25 BOOT - when we can look, its off 00003410 BYTE 477 SSUSWMAINT EQU BIT 26 MAINT - remote maintenance enable 478 * EQU BIT 27 POWER - on 00003810 BYTE 479 SSUSW1 EQU BIT 28 switch numbered 1 00003A10 BYTE 480 SSUSW2 EQU BIT 29 switch numbered 2 00003C10 BYTE 481 SSUSW3 EQU BIT 30 switch numbered 3 00003E10 BYTE 482 SSUSW4 EQU BIT 31 switch numbered 4 00003840 BYTE 483 SSUSWITCH EQU SSUSW1+SSUSW2+SSUSW3+SSUSW4 484 00000012 ABS 485 SSUERRLOG EQU 00012 R read and clear error log information 486 * EQU BIT 29 write to port zero when no room 487 * EQU BIT 30 write to NVM when busy 488 * EQU BIT 31 read to NVM when busy 489 490 * The SSU itself generates control panel 491 * displays (self test, bus error, etc) 492 * The system can read the last such display. 493 * EQU 00013 R characters 0, 1, 2, 3 of SSU display 494 * EQU 00014 R characters 4, 5, 6, 7 of SSU display 495 * EQU 00015 R characters 8, 9 of SSU display 496 497 * EQU 00016 R/W 32 bit version of the clock 498 499 * The SSU will automatically store the 500 * clock every millisecond if the appropriate 501 * control bit (in interrupt mask) is set. 502 * This word contains the physical address 503 * of the double word that is to be kept 504 * up to date. 00000017 ABS 505 SSUCLOKAD EQU 00017 R/W physical address for clock update 506 * bits 4:7 = slot number of memory 507 * bits 8:31 = physical address of first word of two 508 00001800 ABS 509 SSUNVM EQU 01800 R/W offset to get at NVM 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 55 (IODEFS) F 7 I/O definitions 511 512 ********************************************************************************** 513 * * 514 * PPU command codes * 515 * The PPU provides the link between the VRA bus and the * 516 * peripheral controllers. * 517 * The PPU is capable of operating 4 completely * 518 * independant channels. They are addressed by making the * 519 * PPUCHAN bits in the store and load commands equal to the * 520 * channel desired. Normally, this is done by loading a base * 521 * address into the page file. * 522 * channel 0 = MA 000000 or page number 000 * 523 * channel 1 = MA 010000 or page number 040 * 524 * channel 2 = MA 020000 or page number 080 * 525 * channel 3 = MA 030000 or page number 0C0 * 526 * Two basic functions are provided. The first of these * 527 * is the DMA or data channel capability. Also included is * 528 * interrupt control and such like capabilities. * 529 * These capabilities are controlled by stores and loads * 530 * from the addresses between 0 and 01FF. * 531 * The other basic function provided by the PPU is to * 532 * send control information directly to and receive status * 533 * information directly from the controller. This is * 534 * accomplished by loads and stores with the DEVBIT bit set * 535 * in the address (that is, addresses from 0200 to 03FF). * 536 * * 537 ********************************************************************************** 538 00003020 BYTE 539 PPUCHAN EQU BITS 24:25 PPU channel number as put in PF 00000004 ABS 540 PPUCHANS EQU 4 number of channels on a PPU 541 00000000 ABS 542 PPUCABLED EQU 000 R gets non-zero if channel cabled to responding 543 * (non-zero return is controller WRU info) 00000001 ABS 544 PPUINTSTAT EQU 001 R gets ports internal PPU status, format below 00003E10 BYTE 545 PPUIDMAD EQU BIT 31 *DMA direction, 1 sez memory -> PPU device 00003C10 BYTE 546 PPUIINTP EQU BIT 30 +PPU requests interrupt 00003A10 BYTE 547 PPUIDMAE EQU BIT 29 DMA output enabled 00003810 BYTE 548 PPUIINTC EQU BIT 28 +controller requests interrupt 549 00003610 BYTE 550 PPUIROLL EQU BIT 27 +byte count rollover 00003410 BYTE 551 PPUILAST EQU BIT 26 last byte count processed 00003210 BYTE 552 PPUIBCNR EQU BIT 25 next byte count not ready on rollover 00003010 BYTE 553 PPUIDMANB EQU BIT 24 DMA not busy 554 00002E10 BYTE 555 PPUIMPE EQU BIT 23 memory parity error 00002C10 BYTE 556 PPUIINTR EQU BIT 22 *cause PPU interrupt request 557 * on byte count rollover 00002A10 BYTE 558 PPUICONF EQU BIT 21 PPU is confused 00002810 BYTE 559 PPUICIA EQU BIT 20 #*controller allowed to interrupt CPU 560 00002610 BYTE 561 PPUIPIA EQU BIT 19 #*PPU allowed to interrupt CPU 00002410 BYTE 562 PPUIDPPE EQU BIT 18 data path parity error 00002210 BYTE 563 PPUIXTRA EQU BIT 17 extra characters after rollover 00002010 BYTE 564 PPUIBTR EQU BIT 16 between records (EOR from controller) 565 * The CPU may change the bits marked with a "*", 566 * the bits marked with a "+" are cleared on a status read, 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 56 (IODEFS) F 7 I/O definitions 567 * the bits marked with a "#" are cleared when the CPU 568 * accepts an interrupt. 00001E10 BYTE 569 PPUITOUT EQU BIT 15 software timeout, ORed in on deadman 570 00000000 ABS 571 PPURESET EQU 000 W give power reset to controller 00000001 ABS 572 PPUABORT EQU 001 W abort operation and reset error state on channel 00000002 ABS 573 PPUCHANS1 EQU 002 R fetch controller status word 1 00000003 ABS 574 PPUCHANS2 EQU 003 R fetch controller status word 2 00000002 ABS 575 PPUSSSTAT EQU 002 W selectively set bits in internal status 00000003 ABS 576 PPUSCSTAT EQU 003 W selectively clear bits in internal status 577 00000004 ABS 578 PPUCNT1 EQU 004 R/W primary byte count - below format 00002010 BYTE 579 PPUCLAST EQU BIT 16 sez last byte count 000022F0 BYTE 580 PPUCCOUNT EQU BITS 17:31 character count 581 00000005 ABS 582 PPUADDR1 EQU 005 R/W primary transfer address 00000840 BYTE 583 PPUASLOT EQU BITS 4:7 slot that address is in 00001560 BYTE 584 PPUAMEMA EQU BITS 10:31 physical memory address 585 00000006 ABS 586 PPUCNT2 EQU 006 R/W secondary byte count 00000007 ABS 587 PPUADDR2 EQU 007 R/W secondary memory address 588 00000008 ABS 589 PPU3WRD EQU 008 R/W 1 sez enable PPU to do triple word transfers 590 * Note that PPU3 (the double board model) cannot 591 * do double word transfers. The initial release 592 * of PPU4 was on microcode rev 014, however, a 593 * release of PPU3 microcode has since been issued 594 * that is for rev 015. See the bit array in 595 * initial for the current information. Note that 596 * a store to this location in a PPU3 will cause 597 * a bus error. 598 00000200 ABS 599 DEVBIT EQU 0200 bit indicates that communications 600 * to the PPU are passed through 601 * to the device 602 603 ********************************************************************************** 604 * The WRU responses from the devices have the following * 605 * format. These responses are acquired either by doing a * 606 * load from PPUCABLED or by doing a load from location 0 of * 607 * the device (proper channel and DEVBIT set in the physical * 608 * address). * 609 ********************************************************************************** 610 00000080 BYTE 611 DWRUTYPE EQU BITS 0:7 type of device 612 * 0 sez nothing cabled 00000001 ABS 613 DVCTBFD EQU 01 disk 00000002 ABS 614 DVCTLPC EQU 02 line printer controller 00000008 ABS 615 DVCTCOMM EQU 08 async. communications 00000009 ABS 616 DVCTMTC EQU 09 9 track mag tape 0000000A ABS 617 DVCTCTC EQU 0A cartridge tape controller 0000000B ABS 618 DVCTVTC EQU 0B video tape (exabyte) 0000000C ABS 619 DVCTSDC EQU 0C SCSI disk controller 620 00001080 BYTE 621 DWRUMREV EQU BITS 8:15 micro-code revision 622 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 57 (IODEFS) F 7 I/O definitions 00002080 BYTE 623 DWRUDD EQU BITS 16:23 device dependent status 624 625 * EQU BITS 24:31 undefined 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 58 (IODEFS) F 7 I/O definitions 627 628 ********************************************************************************** 629 * * 630 * Definitions for the BFD * 631 * Command codes and statuses for the Binary Formatted * 632 * Disk controller (BFD). * 633 * The disk controller can handle up to four units, * 634 * however, it allows unit number plugs to be zero through * 635 * seven. * 636 * The disk controller only handles transfers in terms of * 637 * whole blocks which are 1035 words long. The system * 638 * software treats the first 1024 words as data and the * 639 * remaining 11 words as a File Block Identifier (FBI). * 640 * However, the hardware does not see this distinction except * 641 * at the PPU who handles the double buffers used by the * 642 * operating system. * 643 * The disk controller partitions each block into 9 * 644 * sectors of 115 words and writes sync fields and CRCs for * 645 * each sector. In addition, the exclusive or of all of the * 646 * sectors is written to a tenth sector which is available to * 647 * the software for error correction. * 648 * The offset to the first word of each segment is: * 649 * segment first word * 650 * ------- ----- ---- * 651 * 1 0000 * 652 * 2 0073 * 653 * 3 00E6 * 654 * 4 0159 * 655 * 5 01CC * 656 * 6 023F * 657 * 7 02B2 * 658 * 8 0325 * 659 * 9 0398 * 660 * * 661 ********************************************************************************** 662 00000073 ABS 663 BFDSEGSIZE EQU 115 size of segments for error correction 0000000A ABS 664 BFDNUMSEGS EQU 0A number of segments incl. check seg 0000000A ABS 665 BFDCHKSEG EQU 0A check segment's number 00000008 ABS 666 BFDUNITS EQU 8 number of units on a BFD 667 668 * In the device WRU: 00002080 BYTE 669 BFDIDSTEST EQU BITS 16:23 self test status 670 * BIT 16 unknown nano-program counter 671 * BIT 17 timeout waiting for nano-processor 672 * BIT 18 soft pattern error 673 * BIT 19 buffer A error 674 * BIT 20 CRC generator error 675 * BIT 21 buffer B error 676 * BIT 22 error file error 677 * BIT 23 switchyard or data path flag error 678 00000210 ABS 679 BFDSEEK EQU 0210 R/W seek 680 * data word is seek address 00000100 BYTE 681 BFDSACYL EQU BITS 0:15 cylinder number 00002080 BYTE 682 BFDSAHEAD EQU BITS 16:23 head number 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 59 (IODEFS) F 7 I/O definitions 00003080 BYTE 683 BFDSASEC EQU BITS 24:31 sector number 684 00000220 ABS 685 BFDSS EQU 0220 R standard status 00000010 BYTE 686 BFDSSOLINT EQU BIT 0 device went off line interrupt request 687 * BIT 1 off line interrupt enabled 00000410 BYTE 688 BFDSSNSAFE EQU BIT 2 volume not safe (has been offline) 00000610 BYTE 689 BFDSSWPROT EQU BIT 3 write protect 00000810 BYTE 690 BFDSSRDY EQU BIT 4 ready 00000A10 BYTE 691 BFDSSONCYL EQU BIT 5 on cylinder 00000C10 BYTE 692 BFDSSSKERR EQU BIT 6 seek error 00000E10 BYTE 693 BFDSSFAULT EQU BIT 7 read/write unsafe (fault) 00001080 BYTE 694 BFDSSEBITS EQU BITS 8:15 seek end bits 695 * bit 8 = drive H 696 * bit 9 = drive G 697 * ... 698 * bit 15= drive A 00002030 BYTE 699 BFDSSDNUM EQU BITS 16:18 drive number responding 700 * 0=A, 1=B, etc. 701 * BIT 19 interrupt on seek end enabled 00002810 BYTE 702 BFDSSWCERR EQU BIT 20 word count error (FIFO not empty) 00002A10 BYTE 703 BFDSSLOSTD EQU BIT 21 lost data (PPU didn't keep up) 00002C10 BYTE 704 BFDSSIFPE EQU BIT 22 interface parity error 00002E10 BYTE 705 BFDSSRSPER EQU BIT 23 response error 706 * (multiple or no drive responding) 00003030 BYTE 707 BFDSSHDECD EQU BITS 24:26 error code for sector header 708 * EQU 0 no error 709 * EQU 1 header gap field non zero 710 * ( after any sector mark ) 711 * EQU 2 no header found 712 * ( after any sector mark ) 713 * EQU 3 bad header CRC 714 * ( only if header otherwise matches ) 715 * EQU 4 matching header not found 716 * ( no header on this track matches ) 00003610 BYTE 717 BFDSSCEOV EQU BIT 27 (read, write check): time code error 718 * (write check): compare error 719 * (write): overrun 00003840 BYTE 720 BFDSSERRCD EQU BITS 28:31 error code 721 * 0 = no error 722 * 1-0A error in single segment corresponding 723 * (0A is the check segment) 724 * 0B = bad command 725 * 0C = drive not ready/on cylinder, response error, 726 * no data found, gap non-zero 727 * 0D = hardware error 728 * 0E = time out 729 * 0F = (read, write check): multiple CRC 730 * errors or sector overrun, 731 * (write, format): drive write protected 732 00000230 ABS 733 BFDEF18 EQU 0230 R error file locations 1 - 8 734 * each segment has 4 bits (WOCT) 735 * where: W => write check error 736 * O => sector over-run 737 * C => segment CRC error 738 * T => segment time code error 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 60 (IODEFS) F 7 I/O definitions 00000240 ABS 739 BFDEF9A EQU 0240 R error file locations 9 - 0A, and other stuff 00001080 BYTE 740 BFDREADY EQU BITS 8:15 ready bits for units 7..0 00002080 BYTE 741 BFDPRESENT EQU BITS 16:23 present bits for units 7..0 00000250 ABS 742 BFDINTERNS EQU 0250 R internal status 743 00000200 ABS 744 BFDSELECT EQU 0200 W select 745 * data word contains unit number 00000220 ABS 746 BFDFUNC EQU 0220 W function 747 * data words 00000011 ABS 748 BFDFNCLFLT EQU 011 reset ( clear fault ) 00000012 ABS 749 BFDFNZERO EQU 012 restore ( rezero heads ) 00000014 ABS 750 BFDFNSOLNT EQU 014 enable off line interrupts 00000018 ABS 751 BFDFNUOLNT EQU 018 disable off line interrupts 00000020 ABS 752 BFDFNSAFE EQU 020 clear volume not safe status 00000021 ABS 753 BFDFNSISE EQU 021 select int on seek end 00000022 ABS 754 BFDFNUISE EQU 022 unselect int on seek end 00000024 ABS 755 BFDFNENINT EQU 024 enable interrupts 00000028 ABS 756 BFDFNDSINT EQU 028 disable interrupts 00000041 ABS 757 BFDFNOFSF EQU 041 select offset forward 00000042 ABS 758 BFDFNOFSB EQU 042 select offset reverse 00000044 ABS 759 BFDFNCLOFS EQU 044 clear offset 00000048 ABS 760 BFDFNRESET EQU 048 reset controller 00000081 ABS 761 BFDFNDSE EQU 081 select data strobe early 00000082 ABS 762 BFDFNDSL EQU 082 select data strobe late 00000084 ABS 763 BFDFNRDS EQU 084 reset data strobe 764 00000230 ABS 765 BFDREAD EQU 0230 W read 766 * reads data (1035 words) if 0 stored 767 * reads check (115 words+time code) if 1 stored 768 * read header if 2 stored 769 * read data with hard sectoring if 3 stored 00000240 ABS 770 BFDWRITE EQU 0240 W write data 771 * data word = time code word to be written 00000250 ABS 772 BFDWRCH EQU 0250 W write check 773 * data word = time code expected 00000260 ABS 774 BFDFORMAT EQU 0260 W write format F0783C1E ABS 775 BFDFORMATW EQU 0F0783C1E data word for format operation 776 00000008 ABS 777 BFDSELECTB EQU 0008 select enable 778 * If this bit is set, the right 779 * three bits of this commands 780 * address are used to select a 781 * drive. This is the unit number 782 * which is not the same as drive number. 783 * unit number is the plug on the front 784 * of each drive, drive number is the 785 * cable position on the controller. 786 00003010 BYTE 787 BFDINTBIT EQU BIT 24 bit in store address indicates 788 * interrupt on completion 789 790 ********************************************************************************** 791 * * 792 * Definitions for the BTI Kludge Board * 793 * * 794 * Each disk drive has a BTI-installed kludge board in it * 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 61 (IODEFS) F 7 I/O definitions 795 * that has two features: it contains a 1K prom containing * 796 * the drive's serial number, and the kludge board can * 797 * retract the heads from the disk under software control. * 798 * * 799 * The board is activated by doing a SEEK specifying * 800 * BFDMAGICHD as the head number. After this seek, the * 801 * Write-Protect status bit does not reflect the actual * 802 * Write-Protectedness of the disk, but is set to a bit * 803 * out of the on-board PROM corresponding to the selected * 804 * cylinder number. Additionally if the cylinder number * 805 * is BFDUNLDCYL, the heads are retracted from the disk. * 806 * * 807 ********************************************************************************** 808 000000FF ABS 809 BFDMAGICHD EQU 255 activates kludge board 000003FF ABS 810 BFDUNLDCYL EQU 1023 along with BFDMAGICHD, retracts disk heads 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 62 (IODEFS) F 7 I/O definitions 812 813 ********************************************************************************** 814 * * 815 * CIA (communications interface adapter) command codes * 816 * * 817 * The CIA interrupts the system about 9 times a second * 818 * (or whatever is set in TICKTIME) and each of those times * 819 * the system reads from the CIA to get any characters that * 820 * came in during that period. The system then writes any * 821 * characters for terminals that are outputting. * 822 * Reads from the CIA consist of an entry for each * 823 * terminal that either has had its status change, a change in * 824 * the number of characters in the output buffer, or has * 825 * characters in its input buffer. If a port is idle then * 826 * nothing is read for that port. If all of the ports on a * 827 * CIA are idle, the reads are only two characters long -- the * 828 * two terminating FF's. If the read buffer that the system * 829 * gave to the CIA is too small to hold all of the characters * 830 * that have been received then the terminating characters are * 831 * FE's and the system must do another read to get the rest of * 832 * the data. * 833 * The writes to the CIA consist of characters and * 834 * commands for any port that is outputting. The CIA has a * 835 * limited output buffer for each port (256 chars) so the * 836 * amount of output is tempered by the space left in the CIA * 837 * output buffer for that port (remaining output buffer count * 838 * is returned in the read). * 839 * Commands that go to a port can be mixed into the * 840 * character output stream and the commands will be done when * 841 * their turn to output occurs. Commands take up space in the * 842 * port's output buffer so their size must be accounted for. * 843 * There is a special type of read, called the Delayed * 844 * Read, that reads data from the CIA and terminates the read * 845 * when the memory buffer is full or the TICKTIME has passed. * 846 * The advantage of this is that one interrupt is saved for * 847 * each read. That is, using the regular read, the sequence * 848 * is: * 849 * 1) TICK interrupt * 850 * 2) Set up read * 851 * 3) Read end of operation interrupt * 852 * 4) Process read information * 853 * 5) Generate write information * 854 * 6) Set up write * 855 * 7) Write end of operation interrupt * 856 * 8) Return from interrupt to wait for next TICK * 857 * Using the delayed read, the sequence is: * 858 * 1) Delayed read end of operation interrupt * 859 * 2) Process read information * 860 * 3) Generate write information * 861 * 4) Set up write * 862 * 5) Write end of operation interrupt * 863 * 6) Set up delayed read * 864 * As you can see, the delayed read saves one interrupt * 865 * per TICK time and at about 9 tick interrupts a second that * 866 * is a big saving. * 867 * * 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 63 (IODEFS) F 7 I/O definitions 868 * Notes on parity checking. The normal mode of the CIA * 869 * is to receive and transmit all 8 data bits. However, * 870 * parity generation may be selected via the secondary port * 871 * status selections in microcode revisions 7 and up. The * 872 * generation options are: set eighth bit to 1, odd parity, * 873 * and even parity. The generated bit replaces the data bit * 874 * supplied from the buffer. * 875 * If parity is being generated, it may optionally be * 876 * checked. If the received parity matches the proper parity * 877 * (as determined by the transmit options) then the eighth bit * 878 * is set to zero in the receive buffer. An error causes the * 879 * bit to be set to one and the 'framing error' bit in the * 880 * status is set. * 881 * * 882 ********************************************************************************** 883 00000008 ABS 884 CIABOARDS EQU 8 number of boards in CIA 00000008 ABS 885 CIAPPBRD EQU 8 number of ports on a board 00003430 BYTE 886 CIABRDF EQU BITS 26:28 board field 00000100 ABS 887 CIATRMBUFL EQU 256 number of characters in CIA's port buffer 888 00000201 ABS 889 CIAWHYINT EQU 0201 gets reason for interrupt and 890 * other info (status word 1) 00003E10 BYTE 891 CIATICK EQU BIT 31 on if timer tick 00003C10 BYTE 892 CIAFULL EQU BIT 30 on if some buffer more than half full 00003A10 BYTE 893 CIAEOP EQU BIT 29 on if end of operation 00003810 BYTE 894 CIAAEOP EQU BIT 28 on if abnormal EOP 00003610 BYTE 895 CIAERR EQU BIT 27 on if error - info given by CIAERROR 00000100 BYTE 896 CIACHARS EQU BITS 0:15 count of characters in input buffer 897 00000201 ABS 898 CIAINTACK EQU 0201 acknowledge interrupt processing 899 00000202 ABS 900 CIAINTMASK EQU 0202 get/set interrupt mask 901 * same bits as in CIAWHYINT 902 00000203 ABS 903 CIAERROR EQU 0203 get error log information 904 * format - ccnnnnpp 905 * cc = code for first error 906 * 011 - PPU handshake time out 907 * 012 - PPU data parity error 908 * 013 - PPU "head butt" 909 * 021 - receive fifo overflow 910 * 022 - transmit fifo overflow 911 * 031 - bad command 912 * 032 - CS path confused 913 * 033 - bad status request 914 * 041 - char in from non-existant port 915 * 081 - input buffer overflow 916 * 082 - output buffer overflow 917 * 083 - input buffer parity error 918 * 084 - output buffer parity error 919 * nnnn = count of errors 920 * pp = port number of first error 921 00000204 ABS 922 CIASREAD EQU 0204 store buffer size, starts transfer to memory 923 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 64 (IODEFS) F 7 I/O definitions 00000205 ABS 924 CIASWRITE EQU 0205 store buffer size, starts transfer from memory 925 00000206 ABS 926 CIASETTICK EQU 0206 get/set number of CIA ticks between interrupts 927 * CIA tick = 2.2 ms 0000000A ABS 928 CIATPS EQU 10 ticks per second 000001C6 ABS 929 CIATICKPSEC EQU 454 CIA ticks per second (1000/2.2) 0000002D ABS 930 CIATICKTIME EQU CIATICKPSEC/CIATPS number of CIA ticks between interrupts 931 00000207 ABS 932 CIASDREAD EQU 0207 store buffer size, starts delayed transfer to memory 933 00000080 BYTE 934 CIASRWACK EQU BITS 0:7 interrupt acknowledge 00001080 BYTE 935 CIASRWMSK EQU BITS 8:15 new Int mask 00002100 BYTE 936 CIASRWCNT EQU BITS 16:31 number of bytes in transfer 937 00000208 ABS 938 CIAVERSION EQU 0208 get version code "VVYYMMLL" 939 00000209 ABS 940 CIAMODE EQU 0209 set CIA operation mode 00000000 ABS 941 CIAMODEN EQU 0 normal operation mode 00000001 ABS 942 CIAMODET EQU 1 CIA test mode (cntl-B,etc) 00000002 ABS 943 CIAMODEM EQU 2 message "echo" mode 944 00000280 ABS 945 CIAPORT EQU 0280 get/set port info, indexed by port 946 00000080 BYTE 947 CIAPSTAT EQU BITS 0:7 on read, status of port, format is PORTxxxx 00001080 BYTE 948 CIAPOCH EQU BITS 8:15 on read, output space available (chars) 00002080 BYTE 949 CIAPICH EQU BITS 16:23 on read, number of input chars waiting 00003C10 BYTE 950 CIAPWAIT EQU BIT 30 on read, bit on if waiting for XON 00003E10 BYTE 951 CIAPMODM EQU BIT 31 on read, bit on if modem configuration 952 * , bit off if hardwire configuration 953 954 * EQU BITS 0:7 on write, port control or secondary port control 955 * (see CIAPSTS and *) 956 * PORT CONTROL 957 * for modem configuration 958 * EQU 008 set RTS 959 * EQU 010 set receive enable 960 * EQU 020 set DTR 961 * for hardwire configuration 962 * EQU 008 set CTS 963 * EQU 010 set receive enable 964 * EQU 020 set DSR 965 * EQU 040 set CD 966 * EQU 080 set RI 967 * for both 968 * EQU 001 two stop bits 969 * EQU 002 data 970 * EQU 004 break 971 * EQU 006 dwell 972 * SECONDARY PORT CONTROL 973 * EQU 001 two stop bits 974 * EQU 000 no parity 975 * EQU 002 set parity bit 976 * EQU 004 generate even parity 977 * EQU 006 generate odd parity 978 * EQU 008 check received parity (only if parity selected) 979 * EQU 010 set receive enable 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 65 (IODEFS) F 7 I/O definitions 980 * EQU 020 set break output holdoff processing 981 * EQU 040 set X-OFF processing 982 * EQU 080 set CTS processing 983 * EQU BIT 9 on write, do secondary port control 00001410 BYTE 984 CIAPECHO EQU BIT 10 on write, 1=echo on, 0=echo off 00001610 BYTE 985 CIAPSTS EQU BIT 11 on write, do port control 00001810 BYTE 986 CIAPFI EQU BIT 12 on write, flush input queue 00001A10 BYTE 987 CIAPFO EQU BIT 13 on write, flush output queue 00001C10 BYTE 988 CIAPSIB EQU BIT 14 on write, set input baud rate 00001E10 BYTE 989 CIAPSOB EQU BIT 15 on write, set output baud rate 00002100 BYTE 990 CIAPBAUD EQU BITS 16:31 on write, rate parameter 991 992 ********************************************************************************** 993 * The rough format of the input buffer elements is... * 994 * For ports with no status change. * 995 * Char 0 = 000 + port number * 996 * Char 1 = amount of space in output buffer * 997 * Char 2 = count of input characters transmitted with this read * 998 * Char 3... = the characters counted by Char 2. * 999 * For ports with a status change. * 1000 * Char 0 = 040 + port number * 1001 * Char 1 = amount of space in output buffer * 1002 * Char 2 = current status * 1003 * Char 3 = count of input characters transmitted with this read * 1004 * Char 4... = the characters counted by Char 3. * 1005 * For the end of the input buffer. * 1006 * Char 0 = 0FF (iff all terminals got a chance) * 1007 * = 0FE (iff buffer filled up first) * 1008 * Char 1 = * 1009 * * 1010 ********************************************************************************** 1011 1012 * In the port number the following bits appear 00003010 BYTE 1013 PORTLAST EQU BIT 24 the is the end of input flag 00003210 BYTE 1014 PORTSTAT EQU BIT 25 port status present 1015 * 1016 * the bits in the status character are: 00003010 BYTE 1017 PORTBOF EQU BIT 24 not input buffer overflow 00003210 BYTE 1018 PORTFFE EQU BIT 25 first framing error - cleared by read 00003410 BYTE 1019 PORTFBRK EQU BIT 26 first break - cleared by read 00003610 BYTE 1020 PORTBRK EQU BIT 27 break or framing error in progress 00003810 BYTE 1021 PORTRI EQU BIT 28 ring indicator on 00003A10 BYTE 1022 PORTCD EQU BIT 29 carrier detect on 00003C10 BYTE 1023 PORTDSR EQU BIT 30 data set ready on/data terminal ready 00003E10 BYTE 1024 PORTCS EQU BIT 31 clear to send on/request to send 1025 1026 ********************************************************************************** 1027 * * 1028 * The format for the output buffer is: * 1029 * For character output. * 1030 * Char 0 = 000 + port number * 1031 * Char 1 = count of output characters transmitted with this * 1032 * write (must be less than 128) * 1033 * Char 2... = the characters counted by Char 1. * 1034 * For command output. * 1035 * Char 0 = 000 + port number * 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 66 (IODEFS) F 7 I/O definitions 1036 * Char 1 = Command code (always >= 080) * 1037 * Char 2.. = (optional parameters for the command) * 1038 * Note that we cleverly avoid putting out more than 128 * 1039 * characters in one element. Each TCQ that we copy into the * 1040 * CIA output buffer gets its own port number and output * 1041 * count. We limit the maximum size of the TCQs to a size * 1042 * that will hold less than 128 characters. * 1043 * * 1044 * Both characters and commands may be sent to the same * 1045 * port in one write as long as the output buffer has room. * 1046 * Commands are queued in the output buffer except for those * 1047 * marked 'done when received'. * 1048 * * 1049 ********************************************************************************** 1050 1051 * Command codes are: 00000081 ABS 1052 PORTCIRATE EQU 081 set input baud rate (done in stream) 00000082 ABS 1053 PORTCORATE EQU 082 set output baud rate (done in stream) 1054 * the above are followed by 2 characters holding the 1055 * rate constant = -(19200*3)/baud 00000083 ABS 1056 PORTCSTAT EQU 083 set port status (done in stream) 00003010 BYTE 1057 PORTSRI EQU BIT 24 ring indicator 00003210 BYTE 1058 PORTSCD EQU BIT 25 carrier detect 00003410 BYTE 1059 PORTSDTR EQU BIT 26 turn on data terminal ready/data set ready 00003810 BYTE 1060 PORTSRTS EQU BIT 28 turn on request to send/clear to send 1061 00000084 ABS 1062 PORTFLUSHO EQU 084 flush output queue (done when received) 1063 00000085 ABS 1064 PORTFLUSHI EQU 085 flush input queue (done when received) 1065 00000086 ABS 1066 PORTDWELL EQU 086 followed by 1 char giving count (done in stream) 1067 * of dwell times ( in character times ) 00000087 ABS 1068 PORTBREAK EQU 087 followed by 1 char giving count (done in stream) 1069 * of break times ( in character times ) 00000088 ABS 1070 PORTECHOON EQU 088 CIA echo on (done when received) 1071 00000089 ABS 1072 PORTECHOOF EQU 089 CIA port echo off (done when received) 1073 0000008A ABS 1074 PORTWRITIN EQU 08A write into port's input buffer (done when received) 1075 0000008B ABS 1076 PORTALWRIT EQU 08B write into all port's input buffers (done when received) 1077 0000008C ABS 1078 PORTCLRAIN EQU 08C clear all port's input buffers (done when received) 1079 0000008D ABS 1080 PORTCSTAT2 EQU 08D set port secondary status (done in stream) 00003010 BYTE 1081 PORTSCTS EQU BIT 24 enable clear to send processing 00003210 BYTE 1082 PORTSXOF EQU BIT 25 enable XON/XOFF processing (output) 00003410 BYTE 1083 PORTSBRK EQU BIT 26 enable no transmit when break (output) 00003610 BYTE 1084 PORTSRDE EQU BIT 27 enable (input) receive data enable (input) 00003810 BYTE 1085 PORTCHKPAR EQU BIT 28 check port's incoming character's parity 1086 * Currently parity checking is not supported by the OS. 00003A20 BYTE 1087 PORTPARITY EQU BITS 29:30 parity type for this port 1088 * If a parity type is specified that parity will be generated by 1089 * the comm. If parity checking is enabled PORTPARITY is what is 1090 * checked for. 00000000 ABS 1091 PORTNOPAR EQU 0 no parity generated (or checked) 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 67 (IODEFS) F 7 I/O definitions 00000001 ABS 1092 PORTHIBIT EQU 1 generate high bit on parity 00000002 ABS 1093 PORTEVENP EQU 2 generate even parity 00000003 ABS 1094 PORTODDP EQU 3 generate odd parity 00003E10 BYTE 1095 PORTSSTOP2 EQU BIT 31 enable two stop bits (output) 1096 0000008E ABS 1097 PORTCRESET EQU 08E do a port reset (done in stream) 00003610 BYTE 1098 PORTCRFBR EQU BIT 27 force buffer remaining return 00003810 BYTE 1099 PORTCRFS EQU BIT 28 force status return 00003A10 BYTE 1100 PORTCRCXON EQU BIT 29 clear XON wait 00003C10 BYTE 1101 PORTCRFO EQU BIT 30 flush output buffer 00003E10 BYTE 1102 PORTCRFI EQU BIT 31 flush input buffer 0000001F ABS 1103 PORTCRALL EQU 1*PORTCRFI+1*PORTCRFO+1*PORTCRCXON+1*PORTCRFS+1*PORTCRFBR 00000018 ABS 1104 PORTCRINIT EQU 1*PORTCRFBR+1*PORTCRFS port initializing parameters 1105 0000008F ABS 1106 PORTCZAP EQU 08F port reset (done when received) 1107 * Format identical to PORTCRESET 1108 1109 * The following are pseudo-commands. We process these in the 1110 * comm driver, but they do not get sent to the hardware. 00000090 ABS 1111 PORTPCINIT EQU 090 initialize port's interface state 1112 * If an input error occurs we link an element into the input TCQ chain 1113 * with this command code and the parameter is the error code. 00000091 ABS 1114 PORTIERR EQU 091 input error 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 68 (IODEFS) F 7 I/O definitions 1116 1117 ********************************************************************************** 1118 * * 1119 * 9 track magnetic tape * 1120 * The tape controller may have up to 4 units. Each * 1121 * unit may be an 800 NRZI unit or a 1600 PE unit or switch * 1122 * selectable between these two standards. Normal * 1123 * inter-record gap is .6 inches. * 1124 * * 1125 * Cartridge Tape * 1126 * The cartridge tape controller may have up to 4 units. * 1127 * They behave very much like conventional magnetic tape, * 1128 * except that any one of 4 tracks may be selected for bit * 1129 * serial recording. Density is 6400 BPI at 30 IPS and the * 1130 * normal tape cartridge has 300 ft. of tape in it. Normal * 1131 * inter-record gap is 1.3 inches. The tape always writes * 1132 * forward, so it must be rewound after every track. * 1133 * 450 ft. and 555 ft. tape cartridges are also * 1134 * available. A possible future change is a 7 track drive, * 1135 * where the extra three tracks run backward between the * 1136 * normal four. * 1137 * * 1138 * Video Tape * 1139 * The video tape controller may have up to 4 units. * 1140 * They behave in most respects like 9 track tape. A notable * 1141 * exception is in speed. While the data transfer rates are * 1142 * quite respectable, the rewind and wfm operations can be * 1143 * exceedingly tedious. * 1144 * * 1145 * Where differences occur between the various tape devices * 1146 * the CT status meaning is enclosed in [], the VT status * 1147 * differences are inclosed in {} and the SCSI MT differences * 1148 * are enclosed in <>. * 1149 * * 1150 ********************************************************************************** 1151 00000004 ABS 1152 NMTPUNITS EQU 4 number of units that can go on a controller 1153 0000C000 ABS 1154 MTDIOSIZE EQU 12*CPP maximum size for records on tape. 1155 * We don't allow any longer records since 1156 * the MT is too slow to allow a user to 1157 * lock up more memory than this. 1158 000047F8 ABS 1159 CTDIOSIZE EQU ((9*CPP)/2)-(2*CPW) maximum size for records on cartridge tape. 1160 * (Four-and-a-half pages minus two words.) 1161 * This number may not be any larger without 1162 * compromising the security of 4000/5000/6000 1163 * tape backups since they are not encrypted. 1164 * For public consumption, say that the CT is 1165 * too slow to allow a user to lock up more 1166 * memory than this. 1167 0000C000 ABS 1168 VTDIOSIZE EQU 12*CPP maximum size for records on tape. 1169 * We don't allow any longer records since 1170 * the VT is too slow to allow a user to 1171 * lock up more memory than this. 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 69 (IODEFS) F 7 I/O definitions 1172 1173 * In the device WRU: 00002080 BYTE 1174 MTIDSTEST EQU BITS 16:23 self-test results, 0 = ok 1175 * BITS 24:31 undefined 1176 * In the device WRU for VT 1177 * BITS 16:19 self test error code 1178 * 1 PPU bus error. Byte sent by Z80 does not equal byte 1179 * found on PPU bus. Bad bit(s) on PPU bus or SCSI HA. 1180 * 2 PPU timeout. PPU did not acknowledge byte sent by 1181 * SCSI HA or PPU failed to send an expected byte. 1182 * 3 PPU collision. PPU over-rides SCSI HA trying to send 1183 * a byte and sends a byte of its own. 1184 * 4 PPU BCC error. Block check character wrong for PPU 1185 * string received. 1186 * 5 PPU NACK. PPU nacked string received from SCSI HA. 1187 * Bad first byte or parity error. 1188 * 6 PPU command error. Unrecognized PPU command received. 1189 * 7 SCSI bus error. Byte sent by Z80 to SCSI target did 1190 * not match byte found on SCSI bus. 1191 * 8 SCSI bus empty. No targets found on SCSI bus. Note: 1192 * a target does not have to be ready to be found. 1193 * 9 SCSI timeout. SCSI target did not accept byte sent. 1194 * A SCSI bus parity error. Parity error in byte received 1195 * from SCSI target. 1196 * B Lost Arbitration. SCSI HA lost arbitration trying to 1197 * select a SCSI target. Another SCSI ID bit was on bus. 1198 * C No select. SCSI target did not select. 1199 * D SCSI bus not free. While trying to select a SCSI target 1200 * the SCSI bus was found not free. 1201 * E SCSI phase error. SCSI target did not change phases 1202 * properly during communications with SCSI HA. 1203 00000210 ABS 1204 MTLDSTAT EQU 0210 fetch primary status 00000010 BYTE 1205 MTSTDSC EQU BIT 0 drive state change 00000210 BYTE 1206 MTSTSCIEN EQU BIT 1 interrupt on state change enabled 00000410 BYTE 1207 MTSTANER EQU BIT 2 any error 1208 * BIT 3 unused [unused] 1209 * BIT 3 {buffer parity error} 1210 * BIT 3 <1 indicates a SCSI 9-track> 1211 1212 * BITS 4:5 unused 1213 * BITS 4:5 [track number] 1214 * BIT 4 {media error} 1215 * BIT 5 {tape motion error} 1216 * BITS 6:7 unit number returned 1217 00001010 BYTE 1218 MTSTEOF EQU BIT 8 EOF read 00001220 BYTE 1219 MTSTTMD EQU BITS 9:10 direction of last tape motion 1220 * EQU 0 not moved 00000001 ABS 1221 MTSTTMFW EQU 1 forward 00000002 ABS 1222 MTSTTMBK EQU 2 backward 00000003 ABS 1223 MTSTTMLOST EQU 3 lost 00001210 BYTE 1224 MTSTTMBKB EQU BIT 9 on if backward (or lost) 00001410 BYTE 1225 MTSTTMFWB EQU BIT 10 on if forward (or lost) 00001650 BYTE 1226 MTSTERSTAT EQU BITS 11:15 fatal error statuses 1227 * 00 no error 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 70 (IODEFS) F 7 I/O definitions 1228 * Error codes returned by MT (Rev 5 u-code) 1229 * 01 multi-track (hard) error reading pe data 1230 * 02 vertical parity error reading pe data 1231 * 03 vertical parity error reading nrzi data 1232 * 04 crc error reading nrzi data 1233 * 05 lrc error reading nrzi data 1234 * 06 no rdr while attempting to read data 1235 * 07 rate error while reading data 1236 * 08 rate error while writing data 1237 * 09 multi-track (hard) error writing pe data 1238 * 0A vertical parity error writing pe data 1239 * 0B vertical parity error writing nrzi data 1240 * 0C crc error writing nrzi data 1241 * 0D lrc error writing nrzi data 1242 * 0E bad check sum in string from PPU 1243 * 0F drive not ready for requested command 1244 * 010 bad (unrecognized) command 1245 * 011 illegal command with tape at bot/eot 1246 * 012 got more data after word count exhausted 1247 * 013 bad filemark read or written 1248 * 014 bad phase encoded id zone 1249 * 015 timeout: 80" of blank tape read 1250 * 016 got spurious NAK from PPU 1251 * 017 got bad first byte (not 96 or 62) 1252 * 018 data path parity error 1253 * 019 timed out PPU data path 1254 * Error codes returned by CT 1255 * 01 illegal drive 1256 * 02 illegal store 1257 * 03 illegal track 1258 * 04 illegal tape motion 1259 * 05 no go byte 1260 * 06 timeout during FF or rewind 1261 * 07 offline during FF or rewind or write gap 1262 * 08 load point hole late 1263 * 09 sync zone late 1264 * 0A IRG found when not expected 1265 * 0B dropout during write 1266 * 0C ID zone late 1267 * 0D leading ID zone bad 1268 * 0E word count CRC bad 1269 * 0F data CRC bad (MFM mode only) 1270 * 10 reverse word count check bad (GCR mode only) 1271 * 11 trailing ID zone bad 1272 * 12 trailing sync zone bad 1273 * 13 GCR byte count not match blockette number 1274 * 14 GCR record not recoverable / write error 1275 * 15 GCR read not all right but recoverable 1276 * 16 GCR record not recoverable 1277 * 17 EOT caused some other error to be detected 1278 * 18 BOT caused some other error to be detected 1279 * Error codes returned by VT (* = unit goes not ready) 1280 * 01 not used (hardware error) 1281 * 02 * unit not ready. 1282 * 03 non-recovered error due to flaw in tape or: 1283 * with EOT set, reached EOT 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 71 (IODEFS) F 7 I/O definitions 1284 * with BOT set, reached BOT 1285 * 04 tape unit detected non-recoverable hardware 1286 * error during command or self test. 1287 * 05 tape received illegal request 1288 * 06 * unit attention. unit received a RESET or 1289 * cartridge was changed. 1290 * 07 cartridge has write protect set. 1291 * 08 blank check. blank tape encountered while reading 1292 * 09 tape mark detect error 1293 * 0A * copy aborted (not used) 1294 * 0B command aborted 1295 * 0C * not used 1296 * 0D volume overflow. Physical EOT reached on a write. 1297 * 0E * not used 1298 * 0F * reserved 1299 * 10 communications error 1300 * 11 * tape not present 1301 * 12 * power failure 1302 * 13 unused 1303 * 14 bad data received from tape unit after issuing 1304 * a request sense command. 1305 * Error codes returned by SCSI 9 track (* = unit goes not ready) 1306 * 01 recovered error 1307 * 02 * unit not ready. 1308 * 03 non-recovered error due to flaw in tape or: 1309 * with EOT set, reached EOT 1310 * with BOT set, reached BOT 1311 * 04 tape unit detected non-recoverable hardware 1312 * error during command or self test. 1313 * 05 tape received illegal request 1314 * 06 * unit attention. unit received a RESET or 1315 * cartridge was changed. 1316 * 07 cartridge has write protect set. 1317 * 08 blank check. blank tape encountered while reading 1318 * 09 vendor unique 1319 * 0A * copy aborted (not used) 1320 * 0B command aborted 1321 * 0C * not used 1322 * 0D volume overflow. Physical EOT reached on a write. 1323 * 0E * miscompare (not used) 1324 * 0F * reserved 1325 * 10 communications error 1326 * 11 * tape not present 1327 * 12 * power failure 1328 * 13 unused 1329 * 14 bad data received from tape unit after issuing 1330 * a request sense command. 1331 * 1332 * EQU BIT 16 unused 1333 * EQU BIT 17 WC < 0 1334 * EQU BIT 18 4 naks from PPU 1335 * EQU BIT 19 passed EOT on last command 1336 * EQU BIT 20 word count register = zero 1337 * EQU BIT 21 unused 1338 * EQU BIT 22 PPU interrupted our send 1339 * EQU BIT 23 0 sez completion interrupt, 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 72 (IODEFS) F 7 I/O definitions 1340 * 1 sez drive state change 1341 * 00002010 BYTE 1342 MTSTDPPE EQU BIT 16 [parity error on data from PPU in write] 1343 * EQU BIT 17 [overflow error] 1344 * EQU BIT 18 [underflow error] 1345 * EQU BIT 19 [WDL error] 1346 * EQU BIT 20 [RDL error] 1347 * EQU BIT 21 [unused] 1348 * EQU BIT 22 [good byte count in secondary status] 1349 * EQU BIT 23 [high for GCR, low for MFM] 1350 * 1351 * EQU BIT 16 {filemark error} 1352 * EQU BIT 17 {underrun} 1353 * EQU BIT 18 {write error 1} 1354 * EQU BIT 19 {servo system error} 1355 * EQU BITS 16:19 {if error code = #10 Z80 error code placed 1356 * here. (see selftest error codes above)} 1357 * EQU BIT 20 {word count reg = 0} 1358 * EQU BIT 21 {unused} 1359 * EQU BIT 22 {unused} 1360 * EQU BIT 23 {0 sez completion interrupt} 1361 * {1 sez drive changed state} 1362 * 1363 * EQU BITS 16:19 1365 * EQU BITS 16:23 00003080 BYTE 1366 MTSTDRVST EQU BITS 24:31 drive status 1367 * These bits are the drive status and are available both 1368 * here and for all four drives at once (each in its byte). 00003010 BYTE 1369 MTDST9 EQU BIT 24 9 track tape 1370 * EQU BIT 24 {unused} [hard EOT] 00003210 BYTE 1371 MTDSTEOT EQU BIT 25 end of tape 00003410 BYTE 1372 MTDSTRDY EQU BIT 26 drive ready [not rewinding] 00003610 BYTE 1373 MTDSTBOT EQU BIT 27 beginning of tape 1374 00003810 BYTE 1375 MTDSTWPRT EQU BIT 28 write protect 00003A10 BYTE 1376 MTDSTBREW EQU BIT 29 busy rewinding 00003A10 BYTE 1377 MTDSTTPK EQU BIT 29 [tape position known] 00003C10 BYTE 1378 MTDSTPRS EQU BIT 30 drive is present 00003E10 BYTE 1379 MTDSTDEN EQU BIT 31 density high [hard BOT] 1380 00000220 ABS 1381 MTLD2STAT EQU 0220 loads secondary status 1382 * BIT 0 parity type {unused} 1383 * BIT 1 density {unused} 1384 * BITS 16:31 word count 1385 00000240 ABS 1386 MTLDDRVST EQU 0240 load drive statuses 1387 * ww xx yy zz 1388 * ww drive status of unit 0 1389 * xx drive status of unit 1 1390 * yy drive status of unit 2 1391 * zz drive status of unit 3 1392 1393 * BIT 28 contains 1 if to select new drive 1394 * during a store. 1395 * BITS 30:31 contains new drive number 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 73 (IODEFS) F 7 I/O definitions 1396 00000008 ABS 1397 MTSELECT EQU 008 add to any of the following stores for 1398 * unit select 00000080 ABS 1399 MTINTREQ EQU 080 add to any of the following for 1400 * interrupt on completion 00000200 ABS 1401 MTCMRESET EQU 0200 reset 1402 00000230 ABS 1403 MTCMFUNC EQU 0230 issue function 00000001 ABS 1404 MTFNCYCLE EQU 0001 cycle 00000002 ABS 1405 MTFNREWIND EQU 0002 rewind 00000004 ABS 1406 MTFNSEFB EQU 0004 search end file backward 00000005 ABS 1407 MTFNSEFF EQU 0005 search end file forward 00000006 ABS 1408 MTFNBKSP EQU 0006 backspace 00000007 ABS 1409 MTFNFWSP EQU 0007 forward space 00000008 ABS 1410 MTFNDSCIOF EQU 0008 drive state change interrupt disable 00000009 ABS 1411 MTFNDSCION EQU 0009 drive state change interrupt enable 0000000A ABS 1412 MTFNOFFL EQU 000A rewind and set off line 0000000C ABS 1413 MTFNDENSEL EQU 000C density select, this code + density 00000010 ABS 1414 MTFNTRSEL EQU 0010 [track select, this code + track number] 00000018 ABS 1415 MTFNWFM EQU 0018 write file mark 1416 00000240 ABS 1417 MTCMREAD EQU 0240 read 1418 00000250 ABS 1419 MTCMWRITE EQU 0250 write 1420 00000260 ABS 1421 MTCMERASE EQU 0260 erase 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 74 (IODEFS) F 7 I/O definitions 1423 1424 ********************************************************************************** 1425 * * 1426 * LINE PRINTER. * 1427 * The line printer controller will drive one of several * 1428 * different types of line printers. It supports a virtual * 1429 * forms control unit and does all forms control character * 1430 * processing. It accepts one line at a time and handles the * 1431 * print of it -- it's not very difficult. * 1432 * * 1433 ********************************************************************************** 1434 00000080 ABS 1435 LPINT EQU 1*BIT 24 if on in address, enables interrupts 1436 1437 * In the device WRU: 00002080 BYTE 1438 LPWRUOPT EQU BITS 16:23 printer options selected 00003010 BYTE 1439 LPWRUPPUE EQU BIT 24 on if error on last PPU status 00003460 BYTE 1440 LPWRUITYP EQU BITS 26:31 printer interface type 1441 00000200 ABS 1442 LPNOP EQU 0200 W no operation 1443 00000201 ABS 1444 LPCLRCTL EQU 0201 W Clear control bits 00000202 ABS 1445 LPSETCTL EQU 0202 W Set control bits 1446 0000020C ABS 1447 LPLOADVFU EQU 020C W load vertical forms unit 1448 * (data = number of lines per page) 1449 00000210 ABS 1450 LPSKIP EQU 0210 W skip lines (data = number of lines) 1451 00000220 ABS 1452 LPSTATUS EQU 0220 R fetch current status 00000010 BYTE 1453 LPSTFAULT EQU BIT 0 line printer fault 00000210 BYTE 1454 LPSTOOP EQU BIT 1 out of paper 00000610 BYTE 1455 LPSTBUFE EQU BIT 3 on if buffer empty 00000840 BYTE 1456 LPSTERROR EQU BITS 4:7 error code 1457 * EQU 00 no error 1458 * BC EQU 01 bad command (unknown loc) 1459 * OF EQU 02 input overflow (write when buf full) 1460 * VOF EQU 03 too many lines for VFU 1461 * VFU0 EQU 04 zero lines in VVFU 1462 * DPOF EQU 05 data path overflow (too many bytes) 1463 * WRT0 EQU 06 zero-length write command 1464 * WRBAD EQU 07 write command while previous one in progress 1465 * DPUF EQU 08 data path underflow (too few bytes from PPU) 1466 * VFU1 EQU 09 first line of VVFU is not channel 1 1467 * DPPE EQU 0A data path parity error 1468 * MANY EQU 0F multiple errors have occurred 00001410 BYTE 1469 LPSTVFU EQU BIT 10 VFU enabled 00001610 BYTE 1470 LPSTPSKP EQU BIT 11 perforation skip enabled 00001840 BYTE 1471 LPSTUNIT EQU BITS 12:15 controller unit number (from dip switches) 00002410 BYTE 1472 LPSTREADY EQU BIT 18 line printer is ready 00002E10 BYTE 1473 LPSTBUFRDY EQU BIT 23 controller buffer ready for another line 00003010 BYTE 1474 LPSTIPRE EQU BIT 24 interrupt because of protocol error (see LPSTERROR) 00003410 BYTE 1475 LPSTILINE EQU BIT 26 interrupt because on/off line 00003610 BYTE 1476 LPSTBADWRT EQU BIT 27 interrupt because last write not successful 00003C10 BYTE 1477 LPSTIVFU EQU BIT 30 interrupt because load VVFU completed 00003E10 BYTE 1478 LPSTIRDY EQU BIT 31 interrupt because input buffer ready 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 75 (IODEFS) F 7 I/O definitions 1479 00000240 ABS 1480 LPWRITE EQU 0240 W write line (data described below) 00001E10 BYTE 1481 LPWRFORM EQU BIT 15 first character of line is forms control 00002C20 BYTE 1482 LPWRHDR EQU BITS 22:23 number of characters to ignore at beginning of line 00003080 BYTE 1483 LPWRLNTH EQU BITS 24:31 length of line (including header and forms chars) 13 INPUT DISKDEFS disk structure definitions 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 76 (DISKDEFS) F 8 Disk Data Structures 4 00000000 5 CRANDALL LABEL to recapture all of this space 00000400 ABS 6 BLOCKSIZE EQU WPP size of the data areas on mass storage 0000000B ABS 7 FBILNTH EQU 11 file block identifier length 8 08000000 ABS 9 REVVOLUME EQU 008000000 volume format revision herein described 18000000 ABS 10 REVMNTVOL EQU 018000000 volume format revisions we can mount 10000000 ABS 11 REVVOLLRAF EQU 010000000 this bit indicates that the volume format 12 uses FDLRAF instead of FDRAFTYPE 00000000 ABS 13 REVBACKUP EQU 0 revision of backup format 14 15 ********************************************************************************** 16 * * 17 * MASS STORAGE ADDRESSES * 18 * * 19 * Each volume on a system is identified by a volume * 20 * number. This volume number is assigned when a pack is * 21 * mounted. * 22 * Data stored on volumes is organized into blocks * 23 * consisting of a page of data and a file block identifier * 24 * (qv). Volumes may only be accessed by reads and writes of * 25 * entire blocks. * 26 * Within a volume, each file block has a unique address. * 27 * These addresses always start at zero and increment by one * 28 * for each block. These addresses are used by the MS driver * 29 * to calculate the physical location of the block, so some * 30 * addresses may represent bad tracks. These blocks do not * 31 * have spares assigned, rather, they are identified in a list * 32 * called BADTRAX and are never assigned. * 33 * The volume number and the block number are often * 34 * combined into a single word according to these definitions. * 35 * * 36 ********************************************************************************** 37 00001180 BYTE 38 MSBLKFIELD BITS (32-MSBLKLOG):31 block number field right justified 00000080 BYTE 39 VOLFIELD BITS 0:(31-MSBLKLOG) volume number field 40 41 ********************************************************************************** 42 * * 43 * Certain types of files, .CODEs, .RAFs, .SAFs all use * 44 * the same addressing convention to specify a certain * 45 * location. This convention is a block number followed by a * 46 * byte offset. In the case of .RAFs the block number is * 47 * split into a major and minor block index. The following * 48 * definitions describe the above. * 49 * * 50 ********************************************************************************** 51 00000140 BYTE 52 PGNUMFLD EQU BITS 0:19 page number field 000000A0 BYTE 53 PGNUMFLDMAJ EQU BITS 0:9 major index within the page field 000014A0 BYTE 54 PGNUMFLDMIN EQU BITS 10:19 minor index within the page field 000028C0 BYTE 55 BYTEDISP EQU BITS 20:31 byte displacement field 56 57 ********************************************************************************** 58 * * 59 * RAD40 PACK * 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 77 (DISKDEFS) F 8 Disk Data Structures 60 * Six characters may be packed into 32 bits by using a * 61 * multiply-add technique with a radix of 40 decimal. * 62 * Identifiers (file names, account names, volume names, and * 63 * passwords) consist of two such words (12 characters). * 64 * Extensions (file name extensions, division/project * 65 * specifiers, and system names) consist of one such word. * 66 * Division/project are packed and a divide is required * 67 * to separate them. Since these numbers are unsigned, MODIF * 68 * must be used for the divide. In some code, the extra * 69 * register is not available (and the extra instructions are * 70 * undesirable) so we do the divide in two parts. First, the * 71 * power of 2 part is accomplished by a CBM or ZBM. Then the * 72 * remaining factors are gotten by a real divide that always * 73 * has positive operands. * 74 * The characters to be code converted for packing are: * 75 * char code (decimal) * 76 * ---- ---- * 77 * space 0 * 78 * 0-9 1-10 * 79 * A-Z 11-36 * 80 * a-z 11-36 * 81 * cntl A-Z 11-36 (allowed only in passwords) * 82 * ! 37 * 83 * & 38 * 84 * underscore 39 * 85 * Identifiers less than 'A ' are not allowed. * 86 * Identifiers greater than or equal to '!' are not allowed. * 87 * Embedded blanks are not allowed. A null file name followed * 88 * by an extension indicates a hardware type (e.g. .LP for a * 89 * line printer). * 90 * * 91 ********************************************************************************** 92 0000FA00 ABS 93 DVSNDISP EQU 40 POWER 3 to extract division field 00000170 BYTE 94 DVSNPART1 EQU BITS 0:(31-9) power of two part of DVSNDISP 0000007D ABS 95 DVSNPART2 EQU DVSNDISP/(2 POWER 9) the remaining factors 96 97 ********************************************************************************** 98 * * 99 * ACCOUNT NAME FORMAT * 100 * ACCOUNT STRUCTURE * 101 * The format of account names is: * 102 * . . * 103 * Each element is RAD packed and consists of characters * 104 * from the 40 character rad pack set. may not * 105 * begin with a digit. * 106 * is from 0 to twelve characters. * 107 * is 0 to 3 characters. (It must be 3 non- * 108 * blank characters if projects are to be specified). * 109 * is 0 to 3 characters. * 110 * * 111 * Certain accounts (many of these have null account * 112 * names) are assigned control functions. * 113 * * 114 * 1.) .!!! - BTI supplied library * 115 * 2.) SYSTEM.!!! - System software account * 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 78 (DISKDEFS) F 8 Disk Data Structures 116 * 3.) OFFLINE.!!! - Maintenance account * 117 * 4.) MANAGER.!!! - Maintenance manager * 118 * 5.) .SYS - Owner supplied public library * 119 * 6.) xxx.SYS - Operator accounts * 120 * 7.) .&xxxxx - Proprietary account * 121 * 8.) .fff - Division library * 122 * 9.) .fffppp - Project library * 123 * 10.) MANAGER.SYS - System manager * 124 * 11.) MANAGER.fff - Division manager * 125 * 12.) MANAGER.fffppp - Project manager * 126 * * 127 ********************************************************************************** 128 129 ********************************************************************************** 130 * * 131 * DATE-TIME FORMAT * 132 * A system time value is a 44 bit integer representing * 133 * millisecond intervals from 0000 17 Nov, 1858. This choice * 134 * has been made to match the Julian day count commonly used * 135 * by astronomers. * 136 * The stored time is the time as provided by the system * 137 * clock. Any known clock errors are corrected in the system * 138 * clock by the delete/increment count commands. The clock * 139 * count is treated as if all days from the epoch were of * 140 * equal length. This means that leap seconds and the varying * 141 * second is ignored. The time as stored by the system will * 142 * always be universal time. Users may request the time with * 143 * time zone corrections applied and/or already unpacked into * 144 * year/month/day/time. * 145 * Many of the uses of the date do not require the * 146 * millisecond resolution provided by the entire 44 bit * 147 * quantity. The upper 32 bits of the date word (DATEHORD) * 148 * are used in these cases. The resolution of DATEHORD is * 149 * about 4 seconds. * 150 * Since the system date-time is used for file serial * 151 * numbers, backup and purge control, and the like, it is very * 152 * important that it be irreversable, and nearly correct. * 153 * When the operator specifies a correction, the software * 154 * applies it at a rate no faster than 1000 ppm. * 155 * Additionally, the software attempts to calculate the rate * 156 * error in the clock and will apply corrections for it up to * 157 * 35 ppm. * 158 * * 159 ********************************************************************************** 160 161 * For the use of the 64 bit date format 162 BASE R0 163 BSSB 20 unused 00082800 0 ZBM 164 DATEHORD BSSB 32 high order (4 second resolution) 165 BSSB 12 low order 166 DRCT 167 168 ********************************************************************************** 169 * * 170 * Definitions of various labels for quantities of time * 171 * * 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 79 (DISKDEFS) F 8 Disk Data Structures 172 ********************************************************************************** 173 000003E8 ABS 174 MSECSS EQU 1000 milliseconds per second 0000EA60 ABS 175 MSECSM EQU 60*MSECSS milliseconds per minute 0036EE80 ABS 176 MSECSH EQU 60*MSECSM milliseconds per hour 05265C00 ABS 177 MSECSD EQU 24*MSECSH milliseconds per day 178 179 * Intervals for 32 bit time words (DATEHORD) 180 * Several users depend on truncation rather than rounding. 181 0000000E ABS 182 FOURSECSM EQU MSECSM/(2 POWER 12) 4.096 seconds per minute 0000036E ABS 183 FOURSECSH EQU MSECSH/(2 POWER 12) 4.096 seconds per hour 00005265 ABS 184 FOURSECSD EQU MSECSD/(2 POWER 12) 4.096 seconds per day 185 186 ********************************************************************************** 187 * * 188 * Definitions for the Non-Volatile Memory * 189 * The SSU has a non-volatile memory. The memory is * 190 * electronicly alterable by byte but retains information even * 191 * with no power. The original SSUs stored only 128 bytes. The * 192 * revised SSUs (rev 14 and later) store 2048 bytes. The memory * 193 * is read and written by byte. Since the write operation is * 194 * quite slow and a power fail during a write leaves the * 195 * location with random data, we must allow for such errors in * 196 * our processing of the data. We do this by storing some data * 197 * twice and having a flag that tells which to use. * 198 * Note that we define each of the 128 bytes in the NVM * 199 * by a BASE offset. This is because the SSU returns the byte * 200 * right justified in a whole word and stores the byte out of * 201 * the right character on a store. The definitions, * 202 * therefore, correspond to the word offsets that the system * 203 * must use. * 204 * * 205 ********************************************************************************** 206 00000080 ABS 207 NVMSIZE EQU 128 number of bytes in original (small) NVM 00000002 208 NVMBASE BASE 209 00000000 DISP 210 NVMRFPPW BSS 1 flag for remote front panel password 00000001 DISP 211 NVMRFPPW1 BSS 8 00000009 DISP 212 NVMRFPPW2 BSS 8 213 00000011 DISP 214 NVMLFPPW BSS 1 local front panel password 00000012 DISP 215 NVMLFPPW1 BSS 8 0000001A DISP 216 NVMLFPPW2 BSS 8 217 218 * The preceeding definitions are used by the SSU microcode 219 * as well as others. 220 221 * The PROMBOOT code uses the following password. For systems 222 * without removable mass storage, the system installation or 223 * recovery from serious problems involves loading the system 224 * software from mag tape (9 track or Cartridge). In order to 225 * protect our proprietary interests, these bootstrap tapes 226 * must be encrypted. This is the only location suitable for 227 * the storage of the password for this encryption. It is also 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 80 (DISKDEFS) F 8 Disk Data Structures 228 * entirely appropriate for such storage (my, what luck). 229 * Note that BTI must maintain lists of this password for all 230 * sites, since if a major disaster befalls a site, its backup 231 * tapes cannot be recovered without this password. 232 00000022 DISP 233 NVMTAPEPW BSS 8 password for mag tape boot 234 235 BSS 9 filler (very old location for clock values) 236 00000033 DISP 237 NVMDATDRFT BSS 1 clock drift 238 BSS 4 filler 239 00000038 DISP 240 NVMSSUSN BSS 4 SSU serial number 241 0000003C DISP 242 NVMSSN BSS 4 system serial number 243 00000040 DISP 244 NVMMAXMCU BSS 1 max number of MCU's paid for 00000001 ABS 245 NVMFACMCU EQU 1 in units of one 246 00000041 DISP 247 NVMMAXPAGE BSS 1 max pages of memory paid for 00000020 ABS 248 NVMFACPAGE EQU 32 in units of 32 pages 249 00000042 DISP 250 NVMMAXCPU BSS 1 max number of CPUs paid for 00000001 ABS 251 NVMFACCPU EQU 1 in units of one 252 00000043 DISP 253 NVMMAXPPU BSS 1 max number of PPU's paid for 00000001 ABS 254 NVMFACPPU EQU 1 in units of one 255 00000044 DISP 256 NVMMAXACC BSS 1 max number of comm controllers paid for 00000001 ABS 257 NVMFACACC EQU 1 in units of one 258 00000045 DISP 259 NVMMAXPORT BSS 1 max number of ports paid for 00000008 ABS 260 NVMFACPORT EQU 8 in units of 8 261 00000046 DISP 262 NVMMAXMSC BSS 1 max number of disk controllers paid for 00000001 ABS 263 NVMFACMSC EQU 1 in units of 1 264 00000047 DISP 265 NVMMAXDISK BSS 1 max number of disk drives paid for 00000001 ABS 266 NVMFACDISK EQU 1 in units of 1 267 00000048 DISP 268 NVMMAXLPC BSS 1 max number of LP controllers paid for 00000001 ABS 269 NVMFACLPC EQU 1 in units of 1 270 00000049 DISP 271 NVMMAXCTC BSS 1 max number of CT controllers paid for 00000001 ABS 272 NVMFACCTC EQU 1 in units of 1 273 0000004A DISP 274 NVMMAXCTU BSS 1 max number of CT drives paid for 00000001 ABS 275 NVMFACCTU EQU 1 in units of 1 276 0000004B DISP 277 NVMMAXMTC BSS 1 max number of MT controllers paid for 00000001 ABS 278 NVMFACMTC EQU 1 in units of 1 279 0000004C DISP 280 NVMMAXMTU BSS 1 max number of MT drives paid for 00000001 ABS 281 NVMFACMTU EQU 1 in units of 1 282 0000004D DISP 283 NVMMAXVTC BSS 1 max number of VT controllers paid for 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 81 (DISKDEFS) F 8 Disk Data Structures 00000001 ABS 284 NVMFACVTC EQU 1 in units of 1 285 0000004E DISP 286 NVMMAXVTU BSS 1 max number of VT drives paid for 00000001 ABS 287 NVMFACVTU EQU 1 in units of 1 288 289 BSS 1 filler of 1 bytes available for use 290 291 * These are the NVM clock values. There are 4 4 byte clock 292 * values taken collectively to keep the last known date. 293 * Each time the date is to be updated we write to the oldest 294 * 4 byte value in the group. Note that locations 2A:32 are 295 * no longer used for this purpose. Note also that the newest 296 * revision of the SSU has vastly expanded NVM and that the 297 * clock values for those SSUs are stored in the newly added 298 * NVM space. 299 00000004 ABS 300 NVMCLKBYTS EQU 4 number of bytes per clock value 00000050 DISP 301 ONVMCLOCKS BSS NVMCLKBYTS*4 NVM clock dates 302 00000010 ABS 303 NVMDEADCNT EQU 010 number of death flags (16) 00000060 DISP 304 NVMDEATHE BSS 0 end of death table 305 BSS NVMDEADCNT*2 allocate NVM death flags 306 00000080 DISP 307 NVMDEATH BSS 0 start of death flag table 308 * each is two bytes long and is the 309 * upper 16 bits of the target time 310 * for the indicated subsystem. 311 * These flags start at NVMDEATH and work backwards 312 * to NVMDEATHE. Flag 0 (VRM) is currently positioned 313 * at locations 7E:7F. 314 315 * The codes that are assigned for the "program number" are: 316 * 0 (7E) - Operating system (VRM) 317 * 1 (7C) - "InHouse" diagnostics. This exists to turn off any 318 * inhouse programs that BTI does not wish to go out 319 * into the field. This code is true when the machine 320 * is at BTI and false when the machine goes into the field. 321 * 2 (7A) - Assembler 322 * 3 (78) - Edit 323 * 4 (76) - Basic 324 * 5 (74) - Cobol 325 * 6 (72) - DBMS 326 * 7 (70) - FMS 327 * 8 (6E) - Pascal 328 * 9 (6C) - Fortran 329 * 10(6A) - PCLINK 330 * 11(68) - Basicx 331 * 12-15 are unused 332 * 333 * 334 * As of version 14 of the SSU the NVM has been increased to 335 * 2K, so there is ample room to store a variety of clock 336 * values. There will be 64 new clock values starting at 337 * byte address #300 and extending through #3FF. 338 * 339 BSS 640 push clock values to end of first 1K. 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 82 (DISKDEFS) F 8 Disk Data Structures 00000300 DISP 340 NNVMCLOCKS BSS NVMCLKBYTS*64 new clock values 341 342 DRCT 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 83 (DISKDEFS) F 8 Disk Data Structures 344 345 ********************************************************************************** 346 * * 347 * MASS STORAGE ORGANIZATION * 348 * This file describes all data structures that are * 349 * present on a volume. Most of these data structures are * 350 * present on every volume that the system recognizes. The * 351 * definitions are not necessarily in the most desirable order * 352 * because the element lengths must be defined before the * 353 * definitions for the block that holds them. * 354 * * 355 * These data structures and the transactions used to * 356 * update them have been designed to prevent the loss of data * 357 * during system crashes, operator errors, etc. Consequently, * 358 * they may be sub-optimal in terms of execution time or * 359 * space. See the section on crash resistance. * 360 * * 361 * These structures are divided into several groups: * 362 * 1.) those that control the recording media * 363 * 2.) those that control the data structure * 364 * 3.) those that control space allocation and use * 365 * * 366 * When a disk pack is placed on-line, or when it is * 367 * certified, certain information is placed on it that is * 368 * unique to the physical medium. * 369 * * 370 * This information should remain separate from that * 371 * associated with the volume. That is, when a volume is * 372 * copied, the hardware unique items are not copied at all, * 373 * but are taken from the new medium. * 374 * * 375 * The tables associated with the physical medium are: * 376 * 1.) pack label * 377 * 2.) bad trax list * 378 * 3.) bootstrap routine * 379 * * 380 * The pack label, volume label (discussed later), and * 381 * the bootstrap occupy fixed addresses. The two labels * 382 * contain pointers to the other tables. * 383 * * 384 ********************************************************************************** 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 84 (DISKDEFS) F 8 Disk Data Structures 386 387 ********************************************************************************** 388 * * 389 * CRASH RESISTANCE * 390 * In order to enhance maintainability, reliability, and * 391 * security, all mass storage structures and transactions are * 392 * designed around a set of goals collectively called * 393 * crashproofing. These goals are: * 394 * 1.) The mass storage structures must be 'safe' and * 395 * accurately represent the actual state of the volume * 396 * at the completion of every write. This is so that * 397 * any system crash, at any time, for any reason, will * 398 * leave the MS structures in a reasonable state for * 399 * restart. (This saves unbelievable amounts of * 400 * skilled field service labor to put systems back * 401 * together, which also helps customer relations). * 402 * 2.) The loss of one block on mass storage must never * 403 * cause the loss of more than one block of user * 404 * data. Note that this implies that the information * 405 * in essentially all system tables be duplicated. * 406 * In most cases this duplicated information is * 407 * distributed in various FBIs and a disk scan is * 408 * needed to recover it. * 409 * * 410 * Note that goal (1) can not protect against these * 411 * problems: * 412 * 1.) software or hardware errors corrupt the data * 413 * being written. * 414 * 2.) A block is read incorrectly with no indication of * 415 * an error. If the system does not determine that * 416 * the block is bad (inconsistent, internal checksum * 417 * failure, etc.) the results are unpredictable. * 418 * * 419 * Note also that goal (1) presumes that each mass * 420 * storage write completes successfully. If the system stops * 421 * because of a crash, the PPU will continue to transfer data * 422 * to the mass storage controller, so the block write should * 423 * complete successfully. If the system stops because of a * 424 * power failure, the controller will abort the operation if * 425 * the write has not actually started, otherwise, it will * 426 * attempt to finish the write. In any event, the system * 427 * power fail recovery routine will re-do the transfer when * 428 * power is restored. The most vulnerable areas are as * 429 * follows: * 430 * 1) The system stops because of a bus error during * 431 * a mass storage write. The PPU is no longer able * 432 * to transfer data over the bus, and the write will * 433 * die in the middle. This is awkward, because there * 434 * is really no practical recovery mechanism which * 435 * would allow the system to retry the transfer. * 436 * 2) The operator turns off a mass storage device and * 437 * removes the media (or removes the media during a * 438 * power failure). A write may have been aborted when * 439 * the device went off line, which it will do with * 440 * no warning (at least, in the currently available * 441 * devices). * 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 85 (DISKDEFS) F 8 Disk Data Structures 442 * 3) A power failure occurs during a write, and the * 443 * recovery never occurs (due to loss of volatile * 444 * memory, disassembly of the system, etc.). * 445 * * 446 * Goal (2) is established to ensure that the loss of * 447 * mass storage blocks for any reason has a limited effect on * 448 * the system users. When a mass storage error is detected, * 449 * the system will usually be able to continue operation and * 450 * inform the affected user and the system operator of the * 451 * problem. However, certain errors will cause a situation in * 452 * which no safe continuation is possible and the system will * 453 * display an error code and stop. * 454 * * 455 * A permanent read error in a user file will cause that * 456 * data to be lost. In user directories, read errors may * 457 * cause the unavailability of all or part of that users data. * 458 * In system tables, such as the IDX, they may make the entire * 459 * volume unusable. Due to the severity of this problem, some * 460 * critical tables are duplicated. During table writes, both * 461 * versions are written. During table reads, the first error * 462 * free read from either table is accepted. * 463 * * 464 * It is, however, possible to scan the volume and * 465 * reconstruct tables on the basis of the FBI information. * 466 * This requires a small amount of heuristics, but is not * 467 * impractical (heuristic because blocks not yet freed contain * 468 * obsolete FBI information and must be recognized. The space * 469 * freer attempts to destroy some of the worst offenders * 470 * first.). * 471 * * 472 * By keeping these guidelines in mind, the intent of * 473 * each updating scheme should be clear: * 474 * 1.) multiple assignment of blocks is strictly forbidden!! * 475 * 2.) loss of unused file blocks in a crash is of * 476 * little concern since they may be recovered by * 477 * recreate or backup. * 478 * 3.) a crash at any time should leave either the old * 479 * structure or the completed new structure, never an * 480 * intermediate structure that is ambiguous or confusing. * 481 * This generally means that the more junior table * 482 * must be created first and removed last. * 483 * * 484 * Even relatively complex structures can be handled in a * 485 * crash resistant manner by using the worst case technique of * 486 * creating an entirely new data structure (containing the new * 487 * information and a copy of any previous information being * 488 * retained), updating the block that points to it, then * 489 * freeing the old structure. * 490 * * 491 * Note that the internal structure of the block must be * 492 * complete at the time that it is written to its permanent * 493 * location on the volume. That is, if a user program is * 494 * swapped, the partially updated tables that it controls must * 495 * not be written (back) to their permanent locations. They * 496 * must be retained strictly in resident memory. A cursory * 497 * analysis of table updating indicates that swapping during * 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 86 (DISKDEFS) F 8 Disk Data Structures 498 * updates would usually result in garbage if a crash * 499 * occurred. The system avoids the problem by locking the * 500 * affected pages into main memory where necessary. Another * 501 * technique not used by this system is to allocate a scratch * 502 * block for the swapping of such pages during their * 503 * modification. * 504 * * 505 * At the time of a crash, there may be several users * 506 * updating tables. As long as the crashproofing rules are * 507 * followed for each transaction individually, and the * 508 * transactions do not interfere with one another (normal * 509 * multiprocessing rules apply), there will be no defects as a * 510 * result of having multiple occurrences of acceptable funnys * 511 * (unfreed blocks, sections of files being unwritten, new * 512 * data structures not linked in, etc.). * 513 * * 514 * Under the description of each table are listed the * 515 * rules governing its updating. Tables that stand alone * 516 * might not have any special updating procedure. Table * 517 * updates involving several different tables are included or * 518 * referenced under each table description. * 519 * * 520 ********************************************************************************** 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 87 (DISKDEFS) F 8 Disk Data Structures 522 523 ********************************************************************************** 524 * * 525 * MASS STORAGE ERRORS * 526 * The mass storage drivers will normally retry failing * 527 * transfers according to generally accepted recovery * 528 * procedures. * 529 * * 530 * For mass storage hardware that has error correction * 531 * capability, most rereads will not be necessary, though it * 532 * may be desirable to classify transfers as follows: * 533 * 1.) no errors * 534 * 2.) correctable data error, retry gave no error * 535 * 3.) correctable data error, retry gave another * 536 * correctable error (correction is not attempted until * 537 * the simpler retry operation is tried) * 538 * 4.) data error not corrected on first read, but * 539 * ultimately recovered * 540 * 5.) permanent data error * 541 * 6.) permanent data error, the disk drive appears * 542 * to be faulty (as verified by test reads of * 543 * other blocks [such as bad trax list]) * 544 * 7.) permanent data error, the disk controller * 545 * appears to be faulty (as verified by test * 546 * reads of other units) * 547 * 8.) no error status, but FBI checksum or block * 548 * number wrong * 549 * * 550 * Condition 8 could indicate a problem with the * 551 * controller, the channel, or a problem at the time of the * 552 * previous write. It should promptly cause a system halt * 553 * except in the case of a maintenance read. If a controller * 554 * problem causing write errors is discovered, the faulty * 555 * blocks must all be rectified to prevent their reappearence * 556 * as a later case of the plague. * 557 * * 558 * Condition 7 on any volume or condition 6 on the system * 559 * volume are grounds for an immediate halt. Any attempt to * 560 * terminate system operation more normally runs the risk of * 561 * irretrievably damaging the data structures. * 562 * * 563 * Condition 2 should be treated as no error since it is * 564 * probably caused by transient conditions unrelated to the * 565 * media, although a history of these is indicative of a bad * 566 * track or a hardware problem. * 567 * * 568 * Conditions 2 through 5 should cause an entry into the * 569 * disk error log (or possibly just the normal system log * 570 * file). * 571 * * 572 * Conditions 3 through 5 and possibly also 2 should * 573 * cause an entry in the bad trax list of this medium, * 574 * indicating the type of error for analysis when the medium * 575 * is reformatted and to prevent a recreate from using these * 576 * potentially bad blocks. * 577 * * 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 88 (DISKDEFS) F 8 Disk Data Structures 578 * Conditions 3 and 4 should cause the block to be * 579 * rewritten in a new location, and an entry made in the * 580 * substitution list. * 581 * * 582 * When the system is idle or has excess disk transfer * 583 * capacity, it may be desirable to investigate each head of * 584 * each disk periodicly. These reads could provide early * 585 * detection of head crashes. To be useful, of course, the * 586 * system must be able to unload the heads. A list of test * 587 * blocks may be maintained (one for each head) so that the * 588 * mass storage driver can write as well as read to test for * 589 * malfunctions. Alternatively, the innermost cylinder of * 590 * each drive could be reserved for diagnostic purposes. Such * 591 * a reserved area could be used both for diagnostics and for * 592 * a crashdump area. * 593 * * 594 * Test reads could also comprise a disk certification * 595 * based on the bad trax information concerning the * 596 * completeness of pattern testing, etc. * 597 * * 598 * The first few blocks on each volume are occupied by * 599 * tables that must occupy those fixed block addresses. If * 600 * one of these blocks becomes unreadable, the pack must be * 601 * refurbished. However, all user data may be recovered. A * 602 * feature that may be added to the system later is that of a * 603 * search over the first N blocks of the volume in order to * 604 * find the required tables. This would provide even more * 605 * tolerance to packs with imperfections. * 606 * * 607 * All other tables occupy variable block numbers and may * 608 * be substituted. Substitutions may take place on either a * 609 * write that did not write check or on a read with a * 610 * recoverable error. The system will do substitutions * 611 * without affecting the use of the system. Most * 612 * substitutions may be done simply by copying the data to a * 613 * new block and making an appropriate entry in the * 614 * substitution list. However, certain of the system control * 615 * blocks must be available even when the substitution list is * 616 * not available. These blocks may not be substituted. * 617 * However, they may be moved to another location if the new * 618 * block address is entered into the appropriate root block. * 619 * DISKBOOT goes to a lot of trouble to load the substitution * 620 * list so that it can boot from a file containing * 621 * substitutions. However, the operating system reads in the * 622 * substitution list in a piece of virtual code, and that code * 623 * must be free of substitutions. * 624 * * 625 * If an unrecoverable read error occurs, the data on * 626 * that block must be presumed lost. In some cases, a * 627 * heuristic scan of the questionable data may reveal the * 628 * error, but this is expensive and hazardous. Such scans are * 629 * primarily applicable in the case of a table occupying a * 630 * very small part of a block. Additionally, if read errors * 631 * have been caused by a defective drive or controller, * 632 * replacing or repairing the offending hardware may restore * 633 * the readability of the data. * 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 89 (DISKDEFS) F 8 Disk Data Structures 634 * * 635 * If the lost data is user data, he must look to a * 636 * backup or transaction log to recover it. * 637 * * 638 * If the lost data is system control or management data, * 639 * it may be possible to recover it automaticly by means of a * 640 * recovery program. Such a program would build a copy of the * 641 * defective volume and repair the damage. * 642 * * 643 * After the data has been recovered from a pack, it is * 644 * intended that the pack may be reused. The blocks that were * 645 * discovered bad should be entered into the bad trax list to * 646 * prevent further read errors on the same block. The volume * 647 * may then be zeroed or recovered onto and is as good as new! * 648 * However, the label area is required to be good for a pack * 649 * to be usable. * 650 * * 651 * Each of the tables on the volume has certain rules to * 652 * be followed when mass storage errors occur on it. These * 653 * rules are listed in the description of each table. * 654 * However, a read of a table may be for an informative * 655 * purpose, such as a maintenance program investigating the * 656 * volume. These reads occur through a mechanism similar to * 657 * file reads and the recovery actions are the same as for a * 658 * file. * 659 * * 660 ********************************************************************************** 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 90 (DISKDEFS) F 8 Disk Data Structures 662 663 ********************************************************************************** 664 * * 665 * FILE BLOCK IDENTIFIER (FBI) * 666 * remember J. Edgar * 667 * Each transfer to or from mass storage consists of two * 668 * data areas chained together. The first of these is exactly * 669 * one page in length. This page of data is always loaded on * 670 * a page boundary by the system. It consists primarily of * 671 * the actual data of interest and may be entirely user data. * 672 * * 673 * The other data area consists of FBILNTH words which * 674 * contain the information described in this section. * 675 * * 676 * When a volume is initialized and when space is freed, * 677 * each file block identifier is set up to indicate that it is * 678 * a free block. Every file block in use, however, is * 679 * uniquely labeled as to owner, data structure, and position * 680 * in that data structure by the data in the FBI. * 681 * * 682 * This enables the detection of many error conditions * 683 * such as: * 684 * crashes during writes extending a file. * 685 * various hardware errors. * 686 * various software errors. * 687 * This information also aids in the recovery of user * 688 * data when the volume structure has been damaged. * 689 * * 690 * If this block is a substitute, the block number in the * 691 * FBI is the block number of the original (defective) block. * 692 * If the substitution list is destroyed, this allows a scan * 693 * to find all substitutions. Furthermore, the program that * 694 * calls the mass storage driver may do its FBI checking * 695 * without knowing that the block was a substitute. * 696 * * 697 * If a block is read and its FBI is garbage (not the * 698 * correct block, a correct substitute, or a free block), it * 699 * must be assumed that an otherwise undetected mass storage * 700 * error has occured. See the section on mass storage errors. * 701 * * 702 * The forward link and backward link fields are used * 703 * only in sequential data structures (e.g. .SAFs). They are * 704 * zero if not used in such a structure. * 705 * * 706 * The relative block number indicates the location of the * 707 * block in the structure holding the block. The OS only sets * 708 * it, but it is available for consistency checks in the * 709 * REBUILD utility, and for OS debuggers to try to reconstruct * 710 * exploded structures. Only some block types have a meaningful * 711 * number, all others receive FBIRELBLK=0 (although 0 can be a * 712 * value in the "meaningful" blocks as well). * 713 * * 714 * Block type FBIRELBLK * 715 * ---------- -------------------------------------- * 716 * FBITIDX index into SECIDXENTS * 717 * FBITAFT index into SECAFTENTS * 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 91 (DISKDEFS) F 8 Disk Data Structures 718 * FBITSAF position in SAF chain (0:size-1) * 719 * FBITSRAF index into RAF major block (0:03FF) * 720 * FBITRAFD page number in file (0:0FFFFF) * 721 * FBITCODED page number in file (CCB index, 0:CCBMAXPAGE-1) * 722 * (others) 0 * 723 * * 724 * CRASH RESISTANCE * 725 * The FBI must be present with every block when it is * 726 * written to the volume. * 727 * * 728 ********************************************************************************** 729 730 BASE R2 00168800 2 BASE 731 FBIWORDA BSS 1 00168801 2 BASE 732 FBIWORDB BSS 1 00168802 2 BASE 733 FBIWORDC BSS 1 00088080 2 ZBM 734 FBITYPE EQU FBIWORDA/BITS 0:7 type of data block 735 * although this is assembled as an 8 bit 736 * field, the maximum value is 07F, i.e. 737 * only 7 bits 00089180 2 ZBM 738 FBIFLINK EQU FBIWORDA/MSBLKFIELD forward link 739 * (next block in a sequential structure) 00088041 2 ZBM 740 FBIFLAGS EQU FBIWORDB/BITS 0:3 misc flag bits 00088011 2 ZBM 741 FBINOREWRIT EQU FBIFLAGS/BIT 28 this block has been rewritten 00088211 2 ZBM 742 FBIWCHK EQU FBIFLAGS/BIT 29 set if this block is important 743 * enough to write check 00088411 2 ZBM 744 FBINOSUB EQU FBIFLAGS/BIT 30 set if not substitutable 00088611 2 ZBM 745 FBIMEMERR EQU FBIFLAGS/BIT 31 block written from page with memory error 00088221 2 ZBM 746 FBIDEFFLAGS EQU FBIFLAGS/BITS 29:30 flag bits which should have a known value 00089181 2 ZBM 747 FBIDA EQU FBIWORDB/MSBLKFIELD this block's disk block number 748 * (original MS address if this is a substitute) 00089182 2 ZBM 749 FBIBLINK EQU FBIWORDC/MSBLKFIELD backward link 750 * (preceeding block in a sequential structure) 751 * code entry type in FBITYPE field 752 * 0 should not appear 00000001 ABS 753 FBITPL EQU 001 pack label 00000002 ABS 754 FBITBTRX EQU 002 bad trax list 00000003 ABS 755 FBITBOOT EQU 003 bootstrap 00000004 ABS 756 FBITVL EQU 004 volume label 00000005 ABS 757 FBITSUBS EQU 005 substitution list 00000006 ABS 758 FBITSEC EQU 006 security block 00000007 ABS 759 FBITADT EQU 007 ADT block 00000008 ABS 760 FBITIDX EQU 008 IDX block 00000009 ABS 761 FBITUDIR1 EQU 009 UDIR primary block 0000000A ABS 762 FBITUDIR2 EQU 00A UDIR secondary block 0000000B ABS 763 FBITSYS EQU 00B misc system use (swapping) 0000000C ABS 764 FBITSAF EQU 00C SAF 0000000D ABS 765 FBITLRAF EQU 00D root of large RAF (major access block) 0000000E ABS 766 FBITSRAF EQU 00E root of small RAF (minor access block) 0000000F ABS 767 FBITRAFD EQU 00F RAF data block 00000010 ABS 768 FBITAFT EQU 010 account finder table block 00000011 ABS 769 FBITASLB EQU 011 account shared list block 00000012 ABS 770 FBITFSLB EQU 012 file shared list block 00000013 ABS 771 FBITCCB EQU 013 code file control block 00000014 ABS 772 FBITCODED EQU 014 code file data block 00000015 ABS 773 FBITAUTLB EQU 015 authorization list block 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 92 (DISKDEFS) F 8 Disk Data Structures 0000007E ABS 774 FBITESTB EQU 07E test block 0000007F ABS 775 FBITFREE EQU 07F code for a free block 776 00168803 2 BASE 777 FBILCD BSS 1 last changed date 00168804 2 BASE 778 FBIWORDE BSS 1 00089184 2 ZBM 779 FBIRELBLK EQU FBIWORDE/MSBLKFIELD relative block number 00168805 2 BASE 780 FBIACCT BSS2 1 account name of this blocks owner 00168807 2 BASE 781 FBIPROJ BSS 1 division-project 00168808 2 BASE 782 FBISERNO BSS2 1 serial number (creation date) of this structure 783 BSS FBILNTH-(DISPW FBIWORDA)-1 make checksum the last word 0016880A 2 BASE 784 FBICKSUM BSS 1 FBI checksum 785 DRCT 00000004 ABS 786 FBILOG EQU FBILNTH LOG 2 log size of FBI FFC00000 ABS 787 FBIGMASK EQU NOT(2 POWER (33-FBILNTH)-1) mask for PRMUT checksum gen. FFE00000 ABS 788 FBICSMASK EQU NOT(2 POWER (32-FBILNTH)-1) mask for PRMUT checksumming 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 93 (DISKDEFS) F 8 Disk Data Structures 790 791 ********************************************************************************** 792 * * 793 * PACK LABEL * 794 * This label block should never be written by the * 795 * system. Its creation is the task of a pack initialization * 796 * routine that need not be available to the system owner. * 797 * * 798 * CRASH RESISTANCE * 799 * Not applicable * 800 * * 801 * MASS STORAGE ERRORS * 802 * The pack label occupies a fixed MS block number. It * 803 * may not be substituted in any way. If this block goes bad, * 804 * the volume (and pack) may not be used. However, any data * 805 * already on the pack may be easily recovered. This is * 806 * because the data that is lost with this block is not * 807 * essential to the recovery operation. We require that the * 808 * pack be removed from service and refurbished because we * 809 * cannot guarantee the continued well being of a volume on a * 810 * pack where we cannot find the bad trax list. * 811 * * 812 ********************************************************************************** 813 00000000 ABS 814 PLDA EQU 0 MS address for pack label 815 816 BASE 00000000 DISP 817 PLSERIAL LABEL disk pack identifier 00000000 DISP 818 PLMAKER BSS 1 disk pack manufacturer code (pak6) 00000001 DISP 819 PLSERNO BSS 1 disk pack serial number (unsigned integer) 820 BSS 2 reserved for expansion 821 00000004 DISP 822 PLFLAGS BSS 1 misc pack information 00003010 BYTE 823 PLNODRVID EQU BIT 24 indicates no drive ID board 00002E10 BYTE 824 PLFORMNEW EQU BIT 23 indicates a new pack 00002C10 BYTE 825 PLFORMRFRB EQU BIT 22 indicates a refurbished pack 826 00000005 DISP 827 PLFRMTRID BSS 2 identification of who formatted this pack 00000007 DISP 828 PLINIDATE BSS2 1 date of initialization 00000009 DISP 829 PLINITSCANS BSS 1 number of certification passes at initialization 830 BSS 6 room to expand 831 * information used by the mass storage driver to 832 * calculate the hardware addresses of blocks. 00000010 DISP 833 PLSECPTRK BSS 1 blocks per track 00000011 DISP 834 PLTRKPCYL BSS 1 heads per cylinder 00000012 DISP 835 PLCYLPPCK BSS 1 cylinders per pack 00000013 DISP 836 PLSIZE BSS 1 size of pack in blocks 837 BSS 4 room to expand 00000018 DISP 838 PLBDTRXDA BSS 1 block number of bad trax list 839 * added for use by SCSI type disk drives 00000019 DISP 840 PLSDVID BSS 2 SCSI vendor identification 0000001B DISP 841 PLSDPID BSS 4 SCSI product identification 0000001F DISP 842 PLSDFREV BSS 1 SCSI firmware revision level 843 BSS 1 so string is null terminated 00000021 DISP 844 PLMODESN BSS 19 mode sense data (pages 1 to 4) 0000004C ABS 845 PLMODESNL EQU DISPC PLMODESN mode sense length 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 94 (DISKDEFS) F 8 Disk Data Structures 846 DRCT 847 ********************************************************************************** 848 * * 849 * MIRROR SECTOR * 850 * The mirror sector is used by the SCSI MIRROR host adaptor to * 851 * identify if two drives are mirrors of one another. A mirror set * 852 * exists if a pair of drives sharing an ID have equal RUN NUMBER, * 853 * equal VOL SIZE, and cross matching DATE STAMPS. The mirror sector * 854 * resides in the pack label, beginning in the last 512 bytes of the * 855 * block. The name SECTOR comes from the fact that a SCSI drive is * 856 * divided into sectors of 512 bytes each. The label MIRRORSECT is * 857 * used to generate a pointer to the start of the mirror sector. * 858 * * 859 ********************************************************************************** 860 00000380 ABS 861 MIRRORSECT EQU 1024-128 put in last 512 bytes of page 862 863 BASE mirror sector definition 04000000 DISP 864 SELFRUNNUM BSSB 16 our run number 80000000 DISP 865 SELFVOLSIZ BSSB 32 our volume size 80000001 DISP 866 SELFDATE1 BSSB 32 upper 16 bits of date 80000002 DISP 867 SELFDATE2 BSSB 32 lower 32 bits of date 868 BSSB 16 04000004 DISP 869 MATERUNNUM BSSB 16 mate run number 80000004 DISP 870 MATEVOLSIZ BSSB 32 mate volume size 80000005 DISP 871 MATEDATE1 BSSB 32 upper 16 bits of date 80000006 DISP 872 MATEDATE2 BSSB 32 lower 32 bits of date 873 BSSB 16 874 DRCT 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 95 (DISKDEFS) F 8 Disk Data Structures 876 877 ********************************************************************************** 878 * * 879 * BAD TRAX LIST * 880 * This is a list of file blocks that have been found to * 881 * be defective. This table stores the reason for each entry. * 882 * The pack certification or initialization routines makes the * 883 * original table. This block must be assigned even if there * 884 * are no bad trax found on the pack, since the MS driver * 885 * cannot allocate a file block during error recovery * 886 * operations. The bad trax list is amended by the system as * 887 * it discovers additional errors. There is currently no * 888 * provision for more than one block (512 entries). * 889 * * 890 * Elements are packed into the bad tracks block from the * 891 * beginning. The end of the list is indicated by an entry * 892 * with word 0 all zeros. * 893 * * 894 * When the pack is to be refurbished, the bad trax list * 895 * will indicate those areas requiring additional checking. * 896 * * 897 * CRASH RESISTANCE * 898 * Generally not applicable. However, when a mass storage * 899 * error is encountered, this table should have the offending * 900 * block number entered. If this update takes place * 901 * before any substitution, it affords an opportunity * 902 * to discover that the drive or controller have failed * 903 * before upsetting the actual volume data structure by * 904 * attempting a substitution. * 905 * * 906 * MASS STORAGE ERRORS * 907 * Pointer in pack label. May be moved, but the * 908 * correct pointer must be placed in the pack label (may * 909 * not use the substitution list). If this block cannot * 910 * be read, the volume may not be used, but recovery will * 911 * be complete. This pack must have a new bad trax * 912 * constructed. This offending block must be added to * 913 * the new bad trax list. * 914 * Note, however, that reads of this block are * 915 * initiated by other mass storage errors. The occurrence * 916 * of another mass storage error here should cause a high * 917 * degree of concern for the well being of the hardware. * 918 * * 919 ********************************************************************************** 920 921 BASE definition of elements 00000000 DISP 922 BTRXEL BSS 1 reason for entry/block number 00000080 BYTE 923 BTRXREASON EQU BITS 0:7 reason for entry 924 * MSBLKFIELD block number 925 * codes reason 00000010 ABS 926 BTRXLCDE EQU 010 MS error during certification 00000020 ABS 927 BTRXRTDE EQU 020 MS error at run time 00000030 ABS 928 BTRXACDE EQU 030 accident destroyed format 00000040 ABS 929 BTRXFSDE EQU 040 BTI field service designated block bad 00000001 DISP 930 BTRXDATE BSS 1 date when entry was made 00000002 ABS 931 BTRXLNTH EQU DISPW BTRXEL element size 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 96 (DISKDEFS) F 8 Disk Data Structures 932 DRCT 00000200 ABS 933 BTRXECNT EQU BLOCKSIZE/BTRXLNTH number of entries 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 97 (DISKDEFS) F 8 Disk Data Structures 935 936 ********************************************************************************** 937 * * 938 * BOOTSTRAP * 939 * This routine is emplaced during pack initialization or * 940 * software update. It is also placed on a pack when a copy * 941 * to it is being made and a newer version of the bootstrap is * 942 * present on the source pack. The bootstrap is loaded and * 943 * run by the initial bootstrap operation, which is partially * 944 * a microcode and hardware function. * 945 * * 946 * The primary purpose of this code is to load and start * 947 * the system software. For this, it must search the hardware * 948 * for a system volume, then search that volume for the * 949 * appropriate account and program. The normal program is the * 950 * system software code although special purpose programs such * 951 * as diagnostics may be available. * 952 * * 953 * In conjunction with the microcode and hardware, a * 954 * crashdump mode is provided that saves the machine states * 955 * for a later analysis. * 956 * * 957 * A secondary purpose of the bootstrap is as a * 958 * maintenance tool. Since it is loaded primarily by * 959 * microcode and hardware operations, it can be loaded despite * 960 * many kinds of malfunctions and it should be useful in * 961 * corrective maintenance. * 962 * * 963 * The bootstrap block has the revision level of the code * 964 * assembled into it. The software that looks at the * 965 * bootstrap blocks makes use of this revision level. It is * 966 * in the form: * 967 * * 968 * TEXT "Bx.y" * 969 * * 970 * Where x is the major revision code and y is the * 971 * minor revision. * 972 * * 973 * CRASH RESISTANCE * 974 * Not applicable * 975 * * 976 * MASS STORAGE ERRORS * 977 * See the notes under pack label. * 978 * * 979 ********************************************************************************** 980 00000002 ABS 981 BOOTDA EQU 2 MS address of bootstrap 982 983 BASE 984 BSS 1 the jump around 00000001 DISP 985 BOOTREV BSS 1 the revision code 986 DRCT 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 98 (DISKDEFS) F 8 Disk Data Structures 988 989 ********************************************************************************** 990 * * 991 * LOGICAL STRUCTURE * 992 * The remaining tables are associated with volumes * 993 * rather than physical recording media. * 994 * The volume label contains pointers to secondary * 995 * tables. * 996 * * 997 ********************************************************************************** 998 999 ********************************************************************************** 1000 * * 1001 * VOLUME LABEL * 1002 * This label is maintained by the system using this pack. * 1003 * It contains pointers to the secondary tables that control the * 1004 * data structure of the volume. * 1005 * * 1006 * Each volume label has a word which is a bit array of * 1007 * volume format revision numbers that can mount this volume and * 1008 * each system has such a bit array giving the revisions that it * 1009 * can mount. Thus a higher revision system knows which lower * 1010 * revisions it can not use and a lower revision system can not * 1011 * get at unacceptable higher revision formatted volumes. * 1012 * * 1013 * This works as follows: When a new system revision is * 1014 * being prepared, we know which old revision packs it can mount, * 1015 * so its bit mask will include those. When a pack is updated to * 1016 * a new revision, we similarly know which old systems are * 1017 * capable of handling whatever changes were made in the format * 1018 * so its bit mask will include those systems. Tricky, huh? * 1019 * * 1020 * A system serial number consists of two parts: * 1021 * 1.) the customer (owner) number * 1022 * 2.) the system number for that owner * 1023 * The system number follows our manufacturing sequence and * 1024 * is on our records as the system serial number. Normally, the * 1025 * customer number and the system number for a system are the * 1026 * same. However, in a few cases a multiple system customer will * 1027 * have a different customer number. A system distribution or * 1028 * backup volume may be encoded either for a specific system (by * 1029 * specifying the customer number and system number exactly) OR * 1030 * for a specific customer number (by specifying the customer * 1031 * number and 0 in place of the system number). * 1032 * * 1033 * The volume passwords work as follows: * 1034 * * 1035 * 1) Each volume has stored on it the SSN of the machine that * 1036 * 'owns' it. * 1037 * 2) On a OPR LOAD operation, if the SSN of the volume and the * 1038 * machine matches, no further checking is done. A volume * 1039 * SSN with a 0 system number will match on any system with * 1040 * the same customer number. * 1041 * 3) If not, the password supplied with the OPR LOAD command * 1042 * must match the volume password. There are several * 1043 * possibilities here.. * 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 99 (DISKDEFS) F 8 Disk Data Structures 1044 * A) The operator supplies the correct password, including * 1045 * the case where both are . The volume is loaded. * 1046 * B) The volume password is . No possible password * 1047 * matches, and the volume cannot be loaded. * 1048 * C) The operator specifies the wrong password. Of course, * 1049 * the volume is not loaded. * 1050 * 4) If the SSN did not match, the password did match, and the * 1051 * 'newowner' flag is on, the SSN of the 'owning' system (on * 1052 * the volume) is changed to that of the current system * 1053 * and the 'newowner' flag is cleared. * 1054 * 5) When the volume is loaded, the OPR program allows several * 1055 * items to be changed. The volume name and title may be * 1056 * changed arbitrarily (except cannot create a duplicate * 1057 * name). The volume password and 'newowner' flag may be * 1058 * changed iff the SSN matches. If the SSN currently * 1059 * matches, it may be changed to anything. * 1060 * * 1061 * * 1062 * Implied states of the volume * 1063 * * 1064 * 1) PWD is . This is a 'portable' volume, and may be * 1065 * mounted on any system. The SSN, however, will not change, * 1066 * so the volume still 'belongs' to the original system. * 1067 * 2) PWD is . The volume is 'transportable'. The * 1068 * original system can OPR LOAD the volume without the password. * 1069 * Any other system can OPR LOAD the volume iff they specify * 1070 * the correct password. * 1071 * 3) In either case (1) or (2), the 'newowner' flag may be set. The * 1072 * first system (other than the original system) to successfully * 1073 * OPR LOAD this volume becomes the new owner (the SSN is set to * 1074 * that of the new system and the 'newowner' flag is cleared). * 1075 * This is the state left by DISKINIT. It allows the system doing * 1076 * the pack formatting to load the pack for tests. When the pack * 1077 * is loaded onto its ultimate destination, it becomes the property * 1078 * of that system. (A customer formatting a pack for himself must * 1079 * explicitly clear the 'newowner' flag to get this same * 1080 * protection). * 1081 * 4) PWD is . The volume is 'private'. Only the original * 1082 * system can OPR LOAD the volume. * 1083 * * 1084 * 'How To' section * 1085 * * 1086 * 1) Prepare a pack to be sent to a specific site and no other. * 1087 * Set the password to something that you know, then set the * 1088 * SSN to be that of the destination system. * 1089 * Alternatively, set the password to something that you give * 1090 * the intended recipient, and set the 'newowner' flag. * 1091 * 2) Prepare a pack to go anywhere (such as a newly formatted pack). * 1092 * Set the password to and set the 'newowner' flag. * 1093 * 3) Prepare a pack to be used to transfer software to another site, * 1094 * where the return of the pack to the original site is expected. * 1095 * Set the password to something that you give the intended recipient. * 1096 * 4) Prepare a pack to be used to transfer software to anyone. * 1097 * Set the password to . * 1098 * 5) Prepare a pack that can not be used by any other site. * 1099 * Set the password to and clear the 'newowner' flag. * 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 100 (DISKDEFS) F 8 Disk Data Structures 1100 * * 1101 * CRASH RESISTANCE * 1102 * This block is normally a permanent part of the structure * 1103 * and is infrequently updated. During operations that destroy a * 1104 * volume (DISKCOPY, TAPERECOVER, Backup) a volume label * 1105 * indicating 'invalid' should be written before anything else. * 1106 * The last operation of a process that leaves a valid volume * 1107 * should be the write of a volume label indicating 'valid'. As * 1108 * it turns out, the invalidating write is usually about the * 1109 * third disk write because we need to determine the disk * 1110 * addresses of the subs and security blocks before we write out * 1111 * the volume label. The only consequence of a crash during this * 1112 * is that a pack that we were planning on overwriting (by doing * 1113 * the copy) has an old volume label (indicating a valid volume * 1114 * with the old name) with an empty subs list or security blocks. * 1115 * If the subs list is overwritten, the old volume is mostly * 1116 * still there except for blocks that were substituted. If the * 1117 * security block(s) are written, we essentially have an empty * 1118 * volume with the old name. It is also possible that the new * 1119 * subs block and/or security blocks do not have the same disk * 1120 * addresses as their previous counterparts. This will lead to * 1121 * various forms of disk structure error iff a load is attempted * 1122 * on the pack. * 1123 * Since the data on the pack is forfeit anyway, we are * 1124 * not concerned over the slight possibility of confusion. Note * 1125 * that no security violation is possible, since the old data is * 1126 * never accessible under a new volume label, and vice-versa. * 1127 * * 1128 * MASS STORAGE ERRORS * 1129 * Fixed block number. No substitutions. If this block * 1130 * cannot be read, the volume may not be used. Recovery must be * 1131 * instigated by manufacturers maintenance due to the security * 1132 * problem. Dependent blocks must be found by scanning. The * 1133 * recovery should be complete. The pack must be refurbished. * 1134 * * 1135 ********************************************************************************** 1136 00000001 ABS 1137 VOLLABELDA EQU 1 mass storage address of volume label 1138 1139 BASE 00000000 DISP 1140 VLSSN BSS 1 system serial number 1141 * if this volume is being mounted on 1142 * a system with a different system 1143 * serial number, the correct volume 1144 * password must be supplied. 00000100 BYTE 1145 CUSTNUM EQU BITS 0:15 customer number field 00002100 BYTE 1146 SYSTNUM EQU BITS 16:31 system number field 1147 BSS 1 1148 BSS2 1 00000004 DISP 1149 VLVNAME BSS2 1 volume name 1150 * each volume name at a site 1151 * should be unique. 00000006 DISP 1152 VLVPASSW BSS2 1 volume password 1153 * the default value cannot be matched. 1154 * This is so that a user who neglects 1155 * to set the volume password is 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 101 (DISKDEFS) F 8 Disk Data Structures 1156 * protected against another system 1157 * owner who might acquire that pack. 00000008 DISP 1158 VLCDATE BSS2 1 creation date for this volume 1159 BSS 1 filler (was creation date) 0000000B DISP 1160 VLFLAGS BSS 1 flag bits 00000210 BYTE 1161 VLFLAGINV EQU BIT 1 sez not a valid volume 00000410 BYTE 1162 VLFLAGNEWO EQU BIT 2 sez change volume to new owner 0000000C DISP 1163 VLAVREV BSS 1 bit array of revisions allowed to 1164 * mount this pack 0000000D DISP 1165 VLVREV BSS 1 volume revision of this pack 1166 BSS 1 1167 BSS 1 filler (was copy of VLSIZE) 00000010 DISP 1168 VLSUBSDA BSS 1 substitution list MS address 1169 BSS 1 00000012 DISP 1170 VLSECBDA BSS 1 primary security block MS address 00000013 DISP 1171 VLSECB2DA BSS 1 secondary security block MS address 1172 BSS 12 00000080 ABS 1173 VLTITLELEN EQU 128 length (characters) of volume title 00000020 DISP 1174 VLTITLE BSS VLTITLELEN/CPW ascii volume title 00000040 DISP 1175 VLBKUPE LABEL end of area written for backup 1176 DRCT 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 102 (DISKDEFS) F 8 Disk Data Structures 1178 1179 ********************************************************************************** 1180 * * 1181 * SUBSTITUTION LIST * 1182 * A list of file block substitutions that have been made * 1183 * as a result of the inability to write on an already committed * 1184 * file block or as a result of a soft read error. This block * 1185 * must be assigned even if there are no substitutions on this * 1186 * volume, since the MS driver cannot allocate a file block for * 1187 * this during error recovery operations. * 1188 * * 1189 * This list is copied into main memory when a volume is * 1190 * mounted and is written back each time a change is made. * 1191 * * 1192 * New entries are made when a write can not be successfully * 1193 * completed or when a read indicates a soft error and it seems * 1194 * prudent to remove the data to a fresh spot. Each entry in the * 1195 * subs list is a pair of block numbers: * 1196 * 1.) the failing address * 1197 * 2.) a substitute for it * 1198 * Entries are deleted when the failing address is freed. The * 1199 * substitute is freed instead and the failing block is discarded * 1200 * (it should already have been entered into the bad trax list). * 1201 * Each mass storage transfer on any volume involves a check to * 1202 * see if the requested block has a substitute. There is * 1203 * currently no provision for more than one block (512 entries). * 1204 * * 1205 * Other possible entries in this table (or bad trax) are * 1206 * flags requesting that all writes above a certain block number * 1207 * be write checked. This floor would grow as the medium was * 1208 * proven good. * 1209 * * 1210 * CRASH RESISTANCE * 1211 * This table may not be updated until after the substituted * 1212 * write has taken place. Additionally, the failing address * 1213 * should be entered into the bad trax list before any attempt at * 1214 * substitution is made. * 1215 * * 1216 * MASS STORAGE ERRORS * 1217 * The pointer to the substitution list is found in the * 1218 * volume label. If the MS block occupied by the substitution * 1219 * list goes bad, the subs list may be moved, but the correct * 1220 * pointer to it must be placed in the volume label (may not use * 1221 * the substitution list). If the subs block cannot be read, the * 1222 * volume may not be used. All blocks acting as substitutes must * 1223 * be found by the recover routine (by finding all blocks whose * 1224 * actual MS address does not match their FBIDA). * 1225 * * 1226 ********************************************************************************** 1227 1228 BASE 00000000 DISP 1229 SUBSBADDY BSS 1 first word contains bad block 1230 * address, zero if list end. 00000001 DISP 1231 SUBSSUB BSS 1 second word contains the substitute. 00000002 ABS 1232 SUBSLNTH EQU DISPW SUBSBADDY element length 00000200 ABS 1233 SUBSECNT EQU BLOCKSIZE/SUBSLNTH number of entries 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 103 (DISKDEFS) F 8 Disk Data Structures 1234 DRCT 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 104 (DISKDEFS) F 8 Disk Data Structures 1236 1237 ********************************************************************************** 1238 * * 1239 * SECURITY BLOCK * 1240 * This block contains the pointers to the ADT chains * 1241 * and other variables local to this volume or system. * 1242 * * 1243 * There exist multiple ADT chain heads in the security * 1244 * block. The purpose of this is to minimize the loss of free * 1245 * blocks when mass storage errors are encountered in the ADT * 1246 * chain linkages. * 1247 * * 1248 * The IDX and AFT tables are made up of multiple blocks, * 1249 * with each entry being hashed into one of the blocks. The * 1250 * security block contains the index to both of these tables. * 1251 * The IDX and AFT contain only as many blocks as are really * 1252 * needed to hold the entries, so there is also a word that * 1253 * indicates how big the index is (how many blocks are in the * 1254 * corresponding table). * 1255 * * 1256 * This block contains the current start up number (SUN). * 1257 * The SUN is used to validate file use counts. It is an eight * 1258 * bit counter that is incremented every time that the system * 1259 * is started, with counts of zero mod 256 being skipped. * 1260 * * 1261 * The SECMNTDAT field is the date of the most recent event * 1262 * that allowed the above ADT lists to be altered. Specifically, * 1263 * it is set when the pack is initialized, rebuilt, mounted, * 1264 * or recovered full volume style. It is used by the online MS * 1265 * driver to ensure that a pack being remounted has not had its * 1266 * ADTs corrupted while the drive was down (for example, by * 1267 * moving the pack to another system). This provides a finer * 1268 * granularity than the pack format date alone. It also works * 1269 * (prevents remount) if two or more packs have the same format * 1270 * date (i.e. some dick copied the pack label and didn't change * 1271 * PLINITDATE). This field was added 17 June 1988. Older packs * 1272 * have this field 0, and we fall back on the PLINITDATE until * 1273 * one of the above operations is performed. This also works * 1274 * for packs whose security blocks can't be read when the drive * 1275 * is spun up, but get initialized online (initializer should * 1276 * request the ORINITFMT OPREQ before starting). * 1277 * * 1278 * Note: System routines that update SECMNTDAT must take care * 1279 * to ensure that the volume will always be remountable, because * 1280 * VOLNMNTDAT can't possibly match both the old and the new * 1281 * values. These routines should copy the MDVFMTDAT to the * 1282 * VOLNMNTDAT just before the security blocks are written. * 1283 * After the writes complete, the new SECMNTDAT is valid and * 1284 * should be copied into the VOLNMNTDAT. * 1285 * * 1286 * The security block may also contain the most recent * 1287 * startup dates, backup date information, and information * 1288 * regarding the useability of this volume (tables destroyed * 1289 * by mass storage errors, etc.). * 1290 * * 1291 * The security block also contains a backup key unique * 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 105 (DISKDEFS) F 8 Disk Data Structures 1292 * to this system. This key is used by both backup and recovery * 1293 * routines. Since it is not available from a backup tape, * 1294 * the key must be provided by the security block of the system * 1295 * that it is being loaded on, or by the operator/manager. * 1296 * * 1297 * The security block is written into two blocks. * 1298 * The first error free read is used as the new manager * 1299 * block. In the event of a system crash between writes, * 1300 * either copy should be usable with the potential loss * 1301 * of only the last transaction. * 1302 * * 1303 * CRASH RESISTANCE * 1304 * Any entry being made in this block should relate to * 1305 * an already completed data structure. Any entry being * 1306 * removed from this block should be removed before any * 1307 * alteration of the entries data structure. * 1308 * * 1309 * MASS STORAGE ERRORS * 1310 * Pointers in volume label. May be moved, but * 1311 * the correct pointer must be placed into the volume * 1312 * label (may not use the substitution list). * 1313 * If neither security block can be read, the volume may * 1314 * not be used. Recovery must find all of the dependent * 1315 * blocks to be complete, although the entire user file * 1316 * structure will be completely recovered. * 1317 * * 1318 ********************************************************************************** 1319 000000FD ABS 1320 MAXIDXSIZE EQU 253 maximum number of blocks allowed in IDX 000000FD ABS 1321 MAXAFTSIZE EQU MAXIDXSIZE maximum number of blocks allowed in AFT 00000008 ABS 1322 SECADTNUM EQU 8 number of ADT chains 1323 1324 ********************************************************************************** 1325 * * 1326 * Hashing function for the IDX and AFT tables. * 1327 * $(1) = an available register * 1328 * $(2) = the next register, the result is left here * 1329 * $(3) = location of account name (double word) * 1330 * $(4) = location of project name * 1331 * $(5) = location of number of buckets * 1332 * * 1333 ********************************************************************************** 1334 1335 IDXHASH MACRO 1336 $L LD2 $(1) $(3) get the account name into $(1) and $(2) 1337 XOR $(2) $(1)/BITS 8:7 mix up the account number 1338 LD $(1) $(4) fetch up the project 1339 XOR $(2) $(1)/BITS 16:15 mix in the project shifted 1340 LD $(1) 0 initialize register for marth 1341 IORPSR PSRMODIF say that we want the remainder 1342 DIV $(1) $(5) divide by number of buckets 1343 CLBPSR PSRMODIF restore normalcy 1344 EMAC 1345 1346 BASE 00000000 DISP 1347 SECSUN BSS 1 bits 24:31 start up number 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 106 (DISKDEFS) F 8 Disk Data Structures 00000001 DISP 1348 SECBUDATE BSS 1 date of last backup 1349 00000002 DISP 1350 SECMNTDAT BSS2 1 date of last mount 1351 BSS 4 filler 1352 00000008 DISP 1353 SECADTTOP BSS SECADTNUM pointer to beginning of ADT chains 00000010 DISP 1354 SECADTBTM BSS SECADTNUM pointer to end of ADT chains 00000018 DISP 1355 SECADTCNT BSS SECADTNUM number of free blocks in each chain 1356 BSS 8 00000028 DISP 1357 SECIDXSIZ BSS 1 number of blocks in IDX 00000029 DISP 1358 SECAFTSIZ BSS 1 number of blocks in AFT 0000002A DISP 1359 SECIDXENTS BSS 1 number of entries in IDX 0000002B DISP 1360 SECAFTENTS BSS 1 number of entries in AFT 0000002C DISP 1361 SECIDXPTR BSS MAXIDXSIZE IDX table head 00000129 DISP 1362 SECAFTPTR BSS MAXAFTSIZE AFT table head (system volume only) 1363 00000226 DISP 1364 SECTZONE BSS 1 time zone and GMT displacement if system vol. 1365 * (PDT = -7, PST = -8, etc.) 1366 BSS2 1 filler 00000229 DISP 1367 SECLASTDT BSS2 1 last known date 0000022B DISP 1368 SECLASTSL BSS2 1 date when last slept or dismounted 0000022D DISP 1369 SECDATERR BSS 1 date correction in progress (correction in MS) 0000022E DISP 1370 SECDATDRFT BSS 1 date drift of SSU clock in ppb 1371 * + indicates clock slow, - sez fast 0000022F DISP 1372 SECDATCOR BSS2 1 date of last clock correction 1373 1374 ********************************************************************************** 1375 * The following locations contain the amount of hardware * 1376 * that was on the last time that the system was booted. This * 1377 * exists so that we can notify someone when the system is * 1378 * booted with less hardware than was expected. * 1379 ********************************************************************************** 1380 00000231 DISP 1381 SECNUMMCU BSS 1 number of MCUs 00000232 DISP 1382 SECNUMPAGE BSS 1 number of pages of memory 00000233 DISP 1383 SECNUMCPU BSS 1 number of CPUs 00000234 DISP 1384 SECNUMPPU BSS 1 number of PPUs 00000235 DISP 1385 SECNUMACC BSS 1 number of comm controllers 00000236 DISP 1386 SECNUMPORT BSS 1 number of ports 00000237 DISP 1387 SECNUMMSC BSS 1 number of disk controllers 00000238 DISP 1388 SECNUMDISK BSS 1 number of disk drives 00000239 DISP 1389 SECNUMLPC BSS 1 number of LP controllers 0000023A DISP 1390 SECNUMCTC BSS 1 number of CT controllers 0000023B DISP 1391 SECNUMCTU BSS 1 number of CT drives 0000023C DISP 1392 SECNUMMTC BSS 1 number of MT controllers 0000023D DISP 1393 SECNUMMTU BSS 1 number of MT drives 0000023E DISP 1394 SECNUMVTC BSS 1 number of VT controllers 0000023F DISP 1395 SECNUMVTU BSS 1 number of VT drives 00000240 DISP 1396 SECBKUPE LABEL end of backup information 1397 DRCT 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 107 (DISKDEFS) F 8 Disk Data Structures 1399 1400 ********************************************************************************** 1401 * * 1402 * AVAILABLE DISK TABLE (ADT) * 1403 * * 1404 * The ADT consists of multiple chains of ADT blocks linked * 1405 * together with both forward and backward pointers. The * 1406 * security block has pointers to the head and tail of each ADT * 1407 * chain and the total number of free blocks in each chain. The * 1408 * reason that multiple chains are provided is so that fewer * 1409 * blocks must be searched over on crash recovery and so that a * 1410 * mass storage error can not cause more than one eighth of the * 1411 * available blocks to be lost. Another possible structure that * 1412 * could have been used is that of a RAF. However, in that type * 1413 * of structure, the loss of an access block causes far too many * 1414 * blocks to be lost. In the SAF type structure used here, the * 1415 * loss of a single block means that you must search the list * 1416 * from the known beginning and can recover all space except that * 1417 * contained in the bad block. * 1418 * * 1419 * Each ADT block is a single file block with entries that * 1420 * are the MS addresses of blocks that are available. Each ADT * 1421 * block could have from 0 to about BLOCKSIZE entries in it. A * 1422 * smaller maximum (ADTECNT) is set up so that fewer blocks are * 1423 * lost if a mass storage error occurs while reading an ADT * 1424 * block. The ADT block itself is available when empty. * 1425 * Therefore, the ADT requires, in effect, no MS space. If an * 1426 * ADT block is filled, a free block is acquired and it becomes * 1427 * the new tail of the current ADT chain. In the event that the * 1428 * current chain is full, the new block becomes the first block * 1429 * in a new chain. * 1430 * * 1431 * The system maintains a table in monitor memory containing * 1432 * a VOLN ("volume name element") for each mounted volume. This * 1433 * element contains a short list of available blocks. When the * 1434 * resident list gets nearly full or nearly empty, the current * 1435 * ADT block is read in and entries (block numbers) are * 1436 * transferred as appropriate to leave the resident list near * 1437 * half-full. The ADT block must be forced out before using any * 1438 * free blocks acquired from it. * 1439 * * 1440 * When file blocks are freed, they could be inserted into * 1441 * the resident ADT list in order. This feature was removed * 1442 * because of its overhead and insignificant performance * 1443 * improvement. Blocks are inserted into the current ADT block * 1444 * in order. This keeps available space assignment more * 1445 * localized. It also provides an opportunity to check for a * 1446 * block being freed twice (in which case the system halts and * 1447 * you either fix the bug in the system or you rebuild the disk * 1448 * structure). No effort is made to sort the entire ADT, * 1449 * although it should be created in order. * 1450 * * 1451 * CRASH RESISTANCE * 1452 * During system initialization, the security block is read * 1453 * in and the head and tail pointers and free block count for the * 1454 * first non-empty ADT chain are copied. The tail pointer in the * 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 108 (DISKDEFS) F 8 Disk Data Structures 1455 * security block is then set to null. If the system was not * 1456 * properly terminated, the security block will contain a null * 1457 * tail pointer. In this case, the initialization routines * 1458 * search from the head down the forward links to rediscover the * 1459 * current tail of the chain and count the total number of free * 1460 * blocks available. The last legitimate ADT block in the chain * 1461 * will have either a null forward pointer or it will point to a * 1462 * block that was formerly an ADT block. In this case, the FBI * 1463 * type of the block will no longer be 'ADT' since such blocks * 1464 * are freed when emptied. * 1465 * * 1466 * It is possible that all existing ADT blocks are full when * 1467 * a block is freed. This results in an empty ADT block at the * 1468 * end of a chain. A later fetch will get that block as follows: * 1469 * The ADT block described by the tail pointer is read, its back * 1470 * pointer becomes the new tail pointer, and the block is * 1471 * overwritten. If the current chain is empty (the back pointer * 1472 * was null), then the security block is read in and the pointers * 1473 * and free block count for the next ADT chain are copied. * 1474 * * 1475 * When an ADT block fills up (has ADTECNT or more entries * 1476 * in it), a new block is added to the current ADT chain (or a * 1477 * new chain is begun if the current one is more than one eighth * 1478 * of the total volume size). To add an ADT block to the end of * 1479 * the current chain, a new block is selected (from amongst the * 1480 * free blocks in the current ADT block). The new block is given * 1481 * a null forward pointer and a backward pointer to the current * 1482 * tail block and is written to mass storage. The old tail is * 1483 * read in, given a new forward pointer to the new block, and * 1484 * rewritten. * 1485 * * 1486 * When the system is shut down, any free blocks residing * 1487 * in the resident tables must be placed onto the volume as * 1488 * described above. The security block is then read in and * 1489 * has the tail pointer and new free block count copied into it. * 1490 * * 1491 * MASS STORAGE ERRORS * 1492 * Pointers in the security block. May be substituted. If * 1493 * an error occurs while traversing the chain backwards (during * 1494 * normal use), the tail pointer is discarded and regenerated by * 1495 * a search from the chain head. If an error occurs while * 1496 * searching for the tail of an ADT chain (such as after a mass * 1497 * storage error or during initialization after a system crash), * 1498 * the bad block is treated as if it were a block beyond the end * 1499 * of the chain. If no ADT block is available, the volume has no * 1500 * remaining space and out-of-storage errors will occur. All * 1501 * data may be recovered from the volume. * 1502 * * 1503 ********************************************************************************** 1504 000000C8 ABS 1505 ADTECNT EQU 200 number of entries in each ADT block 1506 * note that ADTECNT must be less than 1507 * BLOCKSIZE to allow some work space 1508 * for the manager. 1509 1510 BASE 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 109 (DISKDEFS) F 8 Disk Data Structures 00000000 DISP 1511 ADTLIST BSS ADTECNT bits 8:31 - available block number 1512 * all zero indicates list end 1513 DRCT 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 110 (DISKDEFS) F 8 Disk Data Structures 1515 1516 ********************************************************************************** 1517 * * 1518 * USER INDEX (IDX) * 1519 * A table which points to each user directory on this * 1520 * volume. The table is searched by account number, and yields * 1521 * the block number of that account's user directory. * 1522 * * 1523 * This table consists of enough blocks to hold all of the * 1524 * required entries with a little space left over. The index of * 1525 * these blocks is found in the security block. A hashing * 1526 * function is applied to the account/project in order to find * 1527 * the proper first block to search. The table may not grow * 1528 * larger than 'MAXIDXSIZE'. * 1529 * * 1530 * The IDX entry contains only the account name and * 1531 * directory address, and since things are arranged so that the * 1532 * root block of a directory (UDIR1) does not move, this table * 1533 * is updated infrequently. * 1534 * * 1535 * Entries consist of the name of the account followed by * 1536 * the mass storage address (on this volume) of the directory * 1537 * (UDIR1) for that account. When searching the IDX block from * 1538 * the beginning to the end, encountering an "empty entry" * 1539 * (account name and project all zeros) sez that the rest of the * 1540 * IDX block is empty also. Since entries may overflow a block * 1541 * into the next block, and since overflow is sensed by reaching * 1542 * the end of the block without finding an empty entry, if an * 1543 * account is deleted we cannot just remove it and repack the * 1544 * IDX. Entries are deleted by writing all ones (-1) over the * 1545 * account and project. These "place holders" may be used up * 1546 * when a new account is created, but must be searched over when * 1547 * looking for an account. * 1548 * * 1549 * CRASH RESISTANCE * 1550 * When a new account is created, the user directory must * 1551 * be initialized on the volume before the IDX may point to it. * 1552 * When an account is destroyed, the account number must be * 1553 * removed from the IDX before the directory may be freed. * 1554 * * 1555 * MASS STORAGE ERRORS * 1556 * Pointers in the security block. May be moved, but the * 1557 * correct pointer must be placed in the security block (may not * 1558 * use the substitution list). If the IDX can not be read, the * 1559 * volume may not be used. Recovery must find all user * 1560 * directories and discard the freed but not desecrated * 1561 * directories in order to be complete. * 1562 * * 1563 ********************************************************************************** 1564 1565 BASE R6 00178800 6 BASE 1566 IDXACNO BSS2 1 account name 00178802 6 BASE 1567 IDXACNOP BSS 1 division-project 1568 * following word zero sez list end 00178803 6 BASE 1569 IDXDIRDA BSS 1 user directory address 00178804 6 BASE 1570 IDXDIRDA2 BSS 1 secondary directory address 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 111 (DISKDEFS) F 8 Disk Data Structures 00000005 ABS 1571 IDXLNTH EQU DISPW IDXACNO entry length 000000CC ABS 1572 IDXECNT EQU BLOCKSIZE/IDXLNTH number of entries 1573 DRCT 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 112 (DISKDEFS) F 8 Disk Data Structures 1575 1576 ********************************************************************************** 1577 * * 1578 * USER LIMIT FIELD * 1579 * Here we define a small block that contains * 1580 * all information concerning an accounts limits and * 1581 * privileges. Space is reserved for this block in * 1582 * both the user directory and the resident user limit * 1583 * block (ULB). When a ULB is created, the user limit * 1584 * information is copied into the resident block and * 1585 * the ULB is the current authority. In the event of * 1586 * a system crash, the UDIR user limits are the backup. * 1587 * When a ULB is destroyed, the user limits are copied * 1588 * back to the directory. * 1589 * * 1590 ********************************************************************************** 1591 0000079C 1592 LIMITS BASE R4 00170800 4 BASE 1593 RESTRWORD BSS 1 acct restrictions (catrd, etc) 00000050 BYTE 1594 XREQRSTR EQU BITS 0:4 indicates requests that are restricted 00170801 4 BASE 1595 PRIVWORD BSS 1 privilege word (manager access) 00000040 BYTE 1596 LIMFACCESS EQU BITS 0:3 file access control 00000840 BYTE 1597 LIMPACCESS EQU BITS 4:7 password access control 1598 * EQU BITS 8:12 unused 00001A50 BYTE 1599 LIMLOGSPOT EQU BITS 13:17 where to write accounting files 1600 see FDE format note on privileges 1601 bit definitions for these fields 00003E10 BYTE 1602 LIMACSALW EQU BIT 31 always (maintenance) 00003C10 BYTE 1603 LIMACSSYS EQU BIT 30 access to system manager 00003A10 BYTE 1604 LIMACSDIV EQU BIT 29 access to division manager 00003810 BYTE 1605 LIMACSPROJ EQU BIT 28 access to project manager 00003610 BYTE 1606 LIMACSUSR EQU BIT 27 access of user (implied on) 1607 00170802 4 BASE 1608 TIMLIM BSS 1 time limit (in seconds) 00170803 4 BASE 1609 TIMUSD BSS 1 time used (in seconds) 00170804 4 BASE 1610 WLCKLIM BSS 1 wall clock limit (in minutes) 00170805 4 BASE 1611 WLCKUSD BSS 1 wall clock time used (in minutes) 00090186 4 ZBM 1612 DSKSAVL BSSB MSBLKLOG saved disk blocks limit 00093186 4 ZBM 1613 DSKWARN BSSB MSBLKLOG disk block warning limit 00092187 4 ZBM 1614 DSKLIM BSSB MSBLKLOG disk block hard limit 00091188 4 ZBM 1615 DSKUSD BSSB MSBLKLOG disk blocks used 1616 BSS 0 force a word boundary 1617 DRCT 00000009 ABS 1618 LIMITSIZE EQU DISPW LIMITS size of the limits block 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 113 (DISKDEFS) F 8 Disk Data Structures 1620 1621 ********************************************************************************** 1622 * * 1623 * SHARED LISTS * 1624 * Shared lists are provided to give a list of other * 1625 * accounts which are allowed access and to indicate the * 1626 * type of access allowed. There may also be a password * 1627 * associated with the allowed access. * 1628 * Each user directory and each file directory entry * 1629 * contain a shared list. Since the most likely 'shares' * 1630 * are with no one and with only one other account, the * 1631 * share lists in directories and file directory entries * 1632 * are just long enough to hold one simple share list * 1633 * element. If the shared list is larger, either for * 1634 * a more complex element or for more than one element, * 1635 * the short shared list in the directory or FDE will be * 1636 * a pointer to a complete MS block containing the shared * 1637 * list (see its format under SHARED LIST BLOCK). * 1638 * * 1639 ********************************************************************************** 1640 1641 ********************************************************************************** 1642 * * 1643 * SHARED LIST BLOCK (SLB) * 1644 * A block containing shared list entries for a user * 1645 * directory or individual file if the list is too large * 1646 * to be kept in the short area allocated in the UDIR1 * 1647 * block or the FDE. * 1648 * * 1649 * The user directory block and the file directory entry * 1650 * have an area large enough to hold one short shared list * 1651 * entry but if more sharing than that is done, the shared list * 1652 * is put into a disk block that is pointed to by the first * 1653 * word of the entry in the UD or FDE. * 1654 * * 1655 * Shared list entries give the account shared with and the * 1656 * privileges afforded to him. They may also give a password if * 1657 * required. The privileges given by the shared list entry are: * 1658 * 1) read/write - whatever the access code is on the * 1659 * file entry itself. * 1660 * 2) read only - cannot write there upon. * 1661 * 3) modify - file access privileges and ability to change * 1662 * the access attributes. * 1663 * * 1664 * CRASH RESISTANCE * 1665 * This block may be changed in place but remember to write * 1666 * the initial block to the disk before pointing anything * 1667 * to it. * 1668 * * 1669 * MASS STORAGE ERRORS * 1670 * May be substituted. A mass storage error * 1671 * returns a "Disk Structure Error" to the * 1672 * requesting process. * 1673 * * 1674 ********************************************************************************** 1675 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 114 (DISKDEFS) F 8 Disk Data Structures 1676 1677 ********************************************************************************** 1678 * * 1679 * SHARED LIST ENTRY * 1680 * This format applies to all shared list entries. * 1681 * Note that a shared list entry in a shared list block * 1682 * (that is, in a separate block on mass storage) may * 1683 * not point to yet another shared list block. * 1684 * * 1685 ********************************************************************************** 1686 1687 BASE R3 shared list entry 0016C800 3 BASE 1688 SHLFLAGW BSS 1 this first word of a shared list entry 1689 * may either contain a block number (if the flag bit 1690 * is on) or indicate that an account number follows. 00000010 BYTE 1691 SHLDSKFLGB EQU BIT 0 one sez this SHLFLAGW contains 1692 * the MS address of the actual share list 0008C010 3 ZBM 1693 SHLDSKFLG EQU SHLFLAGW/SHLDSKFLGB 0008D180 3 ZBM 1694 SHLDISK EQU SHLFLAGW/MSBLKFIELD block number if above flag is on 0008C210 3 ZBM 1695 SHLACTPW EQU SHLFLAGW/BIT 1 if on, a password follows 0008C410 3 ZBM 1696 SHLACTSYS EQU SHLFLAGW/BIT 2 on if system specified 0008C220 3 ZBM 1697 SHLACTOPT EQU SHLFLAGW/BITS 1:2 flags for optional stuff 0008C630 3 ZBM 1698 SHLACTPRIV EQU SHLFLAGW/BITS 3:5 privilege given this acct 00000000 ABS 1699 SHLACTPRVW EQU 0 allowed file access code of FDE (FDACCESS) 00000001 ABS 1700 SHLACTPRVR EQU 1 read only access 00000002 ABS 1701 SHLACTPRVM EQU 2 file access and modify priv 00000003 ABS 1702 SHLACTPRVX EQU 3 execute only access 0008CC10 3 ZBM 1703 SHLENTRYF EQU SHLFLAGW/BIT 6 on if an entry present 0016C801 3 BASE 1704 SHLACCT BSS2 1 account that is allowed access 0016C803 3 BASE 1705 SHLACCTP BSS 1 division-project 00000004 ABS 1706 SHLENTLEN EQU DISPW SHLFLAGW length of entry 0016C804 3 BASE 1707 SHLPWORD BSS2 1 password for the privilege 00000006 ABS 1708 SHLENTPLEN EQU DISPW SHLFLAGW length if PW included 0016C806 3 BASE 1709 SHLACCTSYS BSS 1 system that account is on (-1 => this system) 00000007 ABS 1710 SHLENTSLEN EQU DISPW SHLFLAGW length if system specified 1711 DRCT 1712 00000004 ABS 1713 UDSHLSIZE EQU 4 size of share lists in directory 1714 * This is adequate for a single entry 1715 * with no password or else a pointer 1716 * to a shared list mass storage block. 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 115 (DISKDEFS) F 8 Disk Data Structures 1718 1719 ********************************************************************************** 1720 * * 1721 * AUTHORIZATION LIST * 1722 * The authorization list consists of a header followed * 1723 * by a variable number of entries. * 1724 * The system manager does not need auth list entries, * 1725 * he is presumed to have authority over all system resources. * 1726 * He, however, must explicitly delegate authority to each * 1727 * manager to 1) allocate time and 2) allocate space on a * 1728 * given volume. The time allocatable and allocated is kept * 1729 * in the auth list header and the MS space allocatable and * 1730 * allocated is kept in the individual auth list entries for * 1731 * each separate volume. * 1732 * * 1733 * CRASH RESISTANCE * 1734 * This block may be changed in place but remember to write * 1735 * the initial block to the disk before pointing anything * 1736 * to it. * 1737 * * 1738 * MASS STORAGE ERRORS * 1739 * May be substituted. A mass storage error * 1740 * returns a "Disk Structure Error" to the * 1741 * requesting process. * 1742 * * 1743 ********************************************************************************** 1744 1745 BASE auth list header 00000000 DISP 1746 AUTHTIME BSS 1 seconds allocatable by account 00000001 DISP 1747 AUTHTIMEA BSS 1 allocated auth time 1748 BSS 2 room for expansion 00000004 DISP 1749 AUTHENTBG LABEL beginning of volume auth list 1750 DRCT 1751 000007B0 1752 AUTHLENTRY BASE R3 auth list entry 0016C800 3 BASE 1753 AUTHVNAME BSS2 1 room for a volume name 1754 BSS 1 unused 1755 BSS 1 unused 0016C804 3 BASE 1756 AUTHDSK BSS 1 amount of disk space allocatable 0016C805 3 BASE 1757 AUTHDSKA BSS 1 amount of disk space allocated 0016C806 3 BASE 1758 AUTHSDSK BSS 1 amount of saved disk space allocatable 0016C807 3 BASE 1759 AUTHSDSKA BSS 1 amount of saved disk space allocated 1760 BSS 4 room for expansion 1761 DRCT 0000000C ABS 1762 AUTHLELEN EQU DISPW AUTHLENTRY 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 116 (DISKDEFS) F 8 Disk Data Structures 1764 1765 ********************************************************************************** 1766 * * 1767 * FILE DIRECTORY ENTRY (FDE) * 1768 * Each FDE represents one file. These entries may * 1769 * appear only in user directories. They appear in the * 1770 * index area of a UDIR1 for a small directory, and they * 1771 * appear in UDIR2 blocks for large directories. * 1772 * * 1773 ********************************************************************************** 1774 000007BC 1775 FDEPROT BASE R3 0016C800 3 BASE 1776 FDSTART BSS 0 account number (implicit!) 1777 * The following thing is here to make the first word of 1778 * a used file directory entry non-zero. 0016C000 3 CACH 1779 FDSUN BSSB 8 SUN to validate use counts 0008D040 3 ZBM 1780 FDACSLK BSSB 4 access lock bits - unused 1781 * controls who may change acct privileges 1782 * EQU BIT 31 access locked by maintenance 1783 * EQU BIT 30 access locked by owner (MANAGER.SYS) 1784 * EQU BIT 29 access locked by division (MANAGER.ddd) 1785 * EQU BIT 28 access locked by project (MANAGER.dddppp) 0008D830 3 ZBM 1786 FDPRIV BSSB 3 privilege allowed to this file 00000000 ABS 1787 FDACSRW EQU 0 read/write 00000001 ABS 1788 FDACSRO EQU 1 read only 00000002 ABS 1789 FDACSAO EQU 2 append only 00000003 ABS 1790 FDACSXO EQU 3 execute only 00000004 ABS 1791 FDACSMW EQU 4 multiple write allowed 00003E10 BYTE 1792 FDACSNWB EQU BIT 31 if one, no write allowed 0008DE10 3 ZBM 1793 FDFBD BSSB 1 file being destroyed bit 0008E010 3 ZBM 1794 FDNBU BSSB 1 no backup flag 0008E210 3 ZBM 1795 FDRFB BSSB 1 indicates recovered from backup 0008E410 3 ZBM 1796 FDPURG BSSB 1 indicates this file purged 1797 * if purged, other fields indicate 1798 * where to find the actual file. 0008E610 3 ZBM 1799 FDFWWSC BSSB 1 1 sez file equipped for write when system crashed 0008E810 3 ZBM 1800 FDLRAF BSSB 1 a one sez a large .RAF (see note) 0008EA60 3 ZBM 1801 FDET BSSB 6 entry type and access control 1802 * entry types for all equipable units are defined here. 1803 * code entry type (* sez may be directory entry) 00000001 ABS 1804 HTYPESAF EQU 1 SAF * 00000002 ABS 1805 HTYPERAF EQU 2 RAF * 00000003 ABS 1806 HTYPECODE EQU 3 code file * 00000004 ABS 1807 HTYPEPATH EQU 4 communication path * 00000005 ABS 1808 HTYPEDIR EQU 5 directory 00000006 ABS 1809 HTYPENULL EQU 6 output eater 00000007 ABS 1810 HTYPETERM EQU 7 interactive terminal * 1811 * EQU 8 unused (was lock) * 00000009 ABS 1812 HTYPETASK EQU 9 a 'batch' job submission unit 0000000A ABS 1813 HTYPECDR EQU 10 a card reader 0000000B ABS 1814 HTYPELP EQU 11 a line printer 0000000C ABS 1815 HTYPEMT EQU 12 magnetic tape * 0000000D ABS 1816 HTYPECT EQU 13 cartridge magnetic tape * 0000000E ABS 1817 HTYPEVOL EQU 14 a volume 0000000F ABS 1818 HTYPEVT EQU 15 video tape * 00000010 ABS 1819 HTYPELAST EQU 16 after last HTYPE 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 117 (DISKDEFS) F 8 Disk Data Structures 1820 0008F610 3 ZBM 1821 FDGHOST BSSB 1 file is a ghost (not yet recovered from backup) 0008F810 3 ZBM 1822 FDTRANS BSSB 1 file opened when user program crashed 0008FA10 3 ZBM 1823 FDFLOG BSSB 1 log file access when set 0008FC20 3 ZBM 1824 FDRAFTYPE BSSB 2 type of RAF file we have (see note) 00000000 ABS 1825 RAFTEMPTY EQU 0 00000001 ABS 1826 RAFTTINY EQU 1 00000002 ABS 1827 RAFTSMALL EQU 2 00000003 ABS 1828 RAFTLARGE EQU 3 1829 0008C101 3 ZBM 1830 FDCUSE BSSB 16 current use count 1831 BSSB 16 filler 0016C802 3 BASE 1832 FDNAME BSS2 1 file name - RAD40 0016C804 3 BASE 1833 FDEXTEN BSS 1 filename extension 1834 BSSB 32-MSBLKLOG filler to right justify MS address 0008D185 3 ZBM 1835 FDDA BSSB MSBLKLOG block number of the file head 0016C018 3 CACH 1836 FDPURGE BSSB 8 purge interval 0000005A ABS 1837 PURGESDV EQU 90 system default value - purge interval 0008D186 3 ZBM 1838 FDLEN BSSB MSBLKLOG file length 1839 * file lengths are only for accounting. 1840 * actual length determined by the structure 0016C807 3 BASE 1841 FDLCD BSS 1 last changed date 0016C808 3 BASE 1842 FDLACC BSS 1 last accessed date 0016C809 3 BASE 1843 FDLBU BSS 1 last backup date 0016C80A 3 BASE 1844 FDSERNO BSS2 1 file serial number 1845 * FDSERNO(0) device type code for hardware devices 1846 * FDSERNO(1) unit # for hardware devices 0016C80C 3 BASE 1847 FDACCESSES BSS 0 label for following 3 fields taken collectively 0008C10C 3 ZBM 1848 FDRACS BSSB 16 read current access count 0008E01C 3 ZBM 1849 FDWACS BSSB 1 write current access count 0008E2FC 3 ZBM 1850 FDMWACS BSSB 15 multiple write current access count 0008C10D 3 ZBM 1851 FDRUSE BSSB 16 total read use count 0008E10D 3 ZBM 1852 FDWUSE BSSB 16 total write use count 0016C80E 3 BASE 1853 FDUSRFLD BSS 1 user defined field 0016C80F 3 BASE 1854 FDCREDAT BSS 1 creation date 0016C810 3 BASE 1855 FDEPP BSS 1 file end byte position pointer 0016C811 3 BASE 1856 FDEND BSS 1 disk block for end of file 1857 BSS 24-UDSHLSIZE-(DISPW FDSTART) push shared list to end 0016C814 3 BASE 1858 FDSHL BSS UDSHLSIZE file directory entry share list 1859 DRCT 00000018 ABS 1860 FDLNTH EQU DISPW FDEPROT length of a directory entry 1861 1862 ********************************************************************************** 1863 * * 1864 * FILE DIRECTORY ENTRY * 1865 * * 1866 * CURRENT USE COUNTS * 1867 * File current use counts are stored in the directory * 1868 * entry for a file. These use counts are valid only if the * 1869 * SUN stored in the file directory entry is the same as the * 1870 * current SUN. A difference here indicates that the use * 1871 * counts are left over from a previous access during which * 1872 * the system crashed. * 1873 * * 1874 * When a user equips a file with a non-current SUN * 1875 * and a non-zero current write access count, the FWWSC * 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 118 (DISKDEFS) F 8 Disk Data Structures 1876 * bit is set indicating that the file was equipped for * 1877 * writing at the time of a system crash. This is to give * 1878 * the user an opportunity to recover as he sees fit. * 1879 * When a user equips a file with a non-current SUN, the * 1880 * use counts are set to zero plus this new access and * 1881 * the SUN is set current. * 1882 * * 1883 * False file use counts are possible only if the * 1884 * system was restarted 255 times without a reference to * 1885 * a given file. These false use counts are inconvenient * 1886 * but fail-safe. * 1887 * * 1888 * FILE BEING DESTROYED * 1889 * A file busy for read or write may not be deleted * 1890 * directly. However, a process with modify privilege may * 1891 * discard a file at any time by setting the 'file being * 1892 * destroyed' bit. The file will then be deleted when the * 1893 * last user unequips it and its use count becomes zero. * 1894 * * 1895 * A exchange save creates the same condition if the * 1896 * saved file is busy: the old entry may be left to control * 1897 * the file being destroyed and a new entry (with the same * 1898 * name) is created for the new file. * 1899 * * 1900 * RAF type (FDLRAF and FDRAFTYPE fields) * 1901 * The original system implemented only two types of * 1902 * RAFs... 'small', including a single minor index block which * 1903 * points directly to data blocks, and 'large', having a major * 1904 * access block which points to WPP minor index blocks. * 1905 * A disk type revision implemented two new RAF types... * 1906 * 'tiny', with only one data block, and 'empty', with no data * 1907 * blocks. Rather than force a major conversion effort, the * 1908 * entries may be of either type on the more recent format * 1909 * disk. (The format is updated to prevent old systems from * 1910 * getting and attempting to use new format entries). * 1911 * The conversion of a directory entry is as follows: * 1912 * Check the new type field (FDRAFTYPE) for zero ('empty'). * 1913 * If it is not, the conversion is already done. If the * 1914 * FDRAFTYPE field is zero, verify that the file is indeed * 1915 * empty by checking FDDA. If it is non-zero, then a * 1916 * conversion is needed. Check (and clear) the old FDLRAF * 1917 * field. If it was a zero, set FDRAFTYPE to 'small', else * 1918 * 'large'. * 1919 * * 1920 * MULTIPLE ACCESS * 1921 * Whenever a file is equipped to, FDCACS (current access * 1922 * count) is incremented for each access to the file. If the * 1923 * equip is for read-only (ie, the accessor is requesting only * 1924 * read access to the data), then FDRACS is incremented. If * 1925 * the equip is for read/write, FDWACS is incremented. If the * 1926 * access is for multiple write, FDMWACS is incremented. If * 1927 * the equip is for "no data access" (ie, the accessor requests * 1928 * no access to the data), then neither RACS, WACS or MWACS is * 1929 * incremented, thus busying the file but not disallowing access * 1930 * to the data in the file. * 1931 * * 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 119 (DISKDEFS) F 8 Disk Data Structures 1932 * Sequential files may not be open for write and any * 1933 * other data access simultaneously. * 1934 * * 1935 * RAFs may be open for general write access by no more than * 1936 * one user at a time. RAFs may be open for write by many users * 1937 * with 'multiple write' privilege. At one time, only large RAFs * 1938 * could be open multiple write. However, the implementation of * 1939 * global file control blocks in the system allows any RAF to be * 1940 * open multiple write. * 1941 * * 1942 * Pages cannot be deleted from a RAF that is open multiple * 1943 * write. * 1944 * * 1945 * Code files follow the same rules as for RAFs except * 1946 * that multiple write access is not allowed. Therefore, if * 1947 * users are executing a code file, the pages that they are * 1948 * executing from may not be altered by the owner. * 1949 * * 1950 * FILE SERIAL NUMBERS * 1951 * Every file created by the system is given a unique number * 1952 * to identify the file even if it is renamed by the user. The * 1953 * number, although given 64 bits, is actually the system's 44 bit * 1954 * millisecond clock when the file was first created. The * 1955 * millisecond clock in memory (not the actual system clock) is * 1956 * incremented after each fetch of a file serial number so that * 1957 * duplicate numbers are not given out. * 1958 * Serial numbers are specially coded if the file corresponds * 1959 * to a real hardware device. In this case, the upper 32 bits of * 1960 * the file serial number denote the hardware type of the device, * 1961 * and the lower 32 bits denote the particular device unit number. * 1962 * In particular, saved terminals use the port number as the lower * 1963 * 32 bits. This is so that a device controller may search for an * 1964 * entry without knowing its name and so that devices that are not * 1965 * assigned via the saved files may interface with same. * 1966 * * 1967 * PURGE * 1968 * Purge intervals are set to the system default value * 1969 * (90 days) when a file is created. They may be altered by * 1970 * command. Files with longer purge intervals might be more * 1971 * expensive. * 1972 * * 1973 * The file becomes subject to purge if the time since * 1974 * last access exceeds the purge interval. A purge interval of * 1975 * zero indicates never purge. * 1976 * * 1977 * The system manager is provided with a variation of * 1978 * the backup routine called PURGE which backs up all files * 1979 * subject to purge and deletes them from the volume. The * 1980 * file directory entry might remain to indicate the disposition * 1981 * of the file. * 1982 * * 1983 * The alternative of automatically doing PURGE with every * 1984 * backup was rejected because: * 1985 * 1.) it may be totally unnecessary (more than adequate * 1986 * space remains on mass storage) * 1987 * 2.) all backup tapes must be saved indefinitely * 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 120 (DISKDEFS) F 8 Disk Data Structures 1988 * * 1989 * Regardless of whether or not the operator uses purge, if * 1990 * the user desires, he should be notified of files that are * 1991 * subject to purge. This may be done by the hello program or * 1992 * by a periodic billing program. Also, catalogs should have * 1993 * files which are subject to purge marked in some manner. * 1994 * * 1995 * Files already purged are marked in catalogs. They * 1996 * are billable against the user at a flat fee each to prevent * 1997 * their proliferation. They may be killed at any time * 1998 * without reference to the backup tape. * 1999 * * 2000 * Purge intervals shorter than a week could be treated * 2001 * as if they were temporary files. When they exceed their * 2002 * purge interval, the next backup deletes them. This * 2003 * feature is not implemented in the current backup system. * 2004 * * 2005 * SHARED LIST * 2006 * The shared account list pointer is originally null, * 2007 * indicating shared with no one. It may point to a file block * 2008 * containing a list of authorized users and the access * 2009 * privileges that they are allowed. * 2010 * * 2011 * In addition, the file block may contain a password * 2012 * that must be matched by a process before it is granted * 2013 * access. * 2014 * * 2015 * MISC. * 2016 * The UDPRIORITY field is provided for use by the * 2017 * scheduler in setting user priorities. There is currently * 2018 * no function to set this field, but the value found in it * 2019 * (it may be set with PEEK&POKE) is actually used by the * 2020 * scheduler to modify its treatment of a user process. * 2021 * * 2022 * MANAGER PRIVILEGES * 2023 * Two fields are provided in the UD to control access * 2024 * by manager accounts. These fields are "manager file * 2025 * access" and "manager password access". When an account is * 2026 * created, these bits are set according to the MGR program * 2027 * defaults. These bits may only be set by the user and may * 2028 * only be cleared by the appropriate manager account. * 2029 * * 2030 * The manager file access bit when set allows the * 2031 * manager account modify privilege over the user's * 2032 * directory and files. This bit is normally set by a user * 2033 * when he has gotten himself into a hole (forgetting a file * 2034 * password, etc) and requires someone to set things right. * 2035 * With this bit on, a manager account may equip and modify * 2036 * any file on the user's account without supplying * 2037 * passwords. * 2038 * * 2039 * The manager password access bit allows the manager * 2040 * account to alter the logon password of the account, the * 2041 * FAC bit, the default restrictions, and the accounting * 2042 * control field. * 2043 * * 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 121 (DISKDEFS) F 8 Disk Data Structures 2044 * On some systems, the managers may wish to have the * 2045 * privilege of free access to their underlings directorys * 2046 * and passwords in which case the account creation default * 2047 * may be changed to create the accounts with these manager * 2048 * access bits set. * 2049 * * 2050 ********************************************************************************** 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 122 (DISKDEFS) F 8 Disk Data Structures 2052 2053 ********************************************************************************** 2054 * * 2055 * USER DIRECTORY (UDIR) * 2056 * * 2057 * This table is the repository for all system * 2058 * knowledge of an account and its privileges. The first * 2059 * 96 words of the primary directory block are reserved * 2060 * for all information other than the file directory. * 2061 * * 2062 * The first block of the UDIR has 928 words available * 2063 * for file directory use. If the entire file directory can * 2064 * fit into this space, it is so stored. The capacity of * 2065 * this type of directory is 38 entries (928/24). * 2066 * * 2067 * When the file directory overflows this space, a new * 2068 * block is acquired, and the current file directory * 2069 * written to it. The 928 words in the primary block is used * 2070 * as an index to this block (and other blocks added later) * 2071 * similar to a RAF minor access block. Each pointer requires * 2072 * 5 words, one for a block number and count of the number of * 2073 * entries in that block, one for a secondary UDIR mass * 2074 * storage address, and three to hold the name and extension * 2075 * of the first entry in that block. The directory may have * 2076 * up to 185 (928/5) pointers to secondary blocks. * 2077 * * 2078 * When deletions occur, the deleting routine checks the * 2079 * size of the adjacent blocks to see if two can be combined. * 2080 * The test for recombination must have sufficient hysteresis * 2081 * to prevent thrashing with alternating deletions and * 2082 * insertions. Currently, the combined block must be no more * 2083 * than 2/3 full (a total of 28 entries prevents combining). * 2084 * * 2085 * Each secondary UDIR block is capable of holding * 2086 * 42 entries (1024/24). * 2087 * * 2088 * The ultimate capacity of this directory structure is * 2089 * 7770 entries (185*42). However, this directory structure * 2090 * can not be reliably filled to capacity. This is because * 2091 * after all secondary blocks are assigned, the next addition * 2092 * may need to go in a block that is completely full, even * 2093 * though many other blocks are only partially filled. The * 2094 * usable directory capacity depends upon the amount of * 2095 * hysteresis in the recombining algorithm, but in any event * 2096 * is under one half of the filled capacity. We will assume * 2097 * that 2500 entries are possible, based on the current * 2098 * recombining algorithm (best calculations seem to indicate * 2099 * that 2592 will always fit). * 2100 * * 2101 * This structure requires that the file directory be * 2102 * ordered by filename (a hashing function could have been * 2103 * used, but this was an effective and more useful method). * 2104 * A full catalog may print the directory as is (in name * 2105 * order). Catalog options are provided for partial catalogs * 2106 * such as only items saved since , only items * 2107 * accessed since , or the most recently saved * 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 123 (DISKDEFS) F 8 Disk Data Structures 2108 * (accessed) items. The catalog may also be sorted so * 2109 * as to print in other than name order. * 2110 * * 2111 * The primary directory blocks never move. This allows * 2112 * the account finder table to contain the volume number and * 2113 * directory address of each account. * 2114 * * 2115 * CRASH RESISTANCE * 2116 * See IDX. When this table is set up to point to * 2117 * other blocks (such as a shared account list), those * 2118 * blocks must be written to the volume first and freed * 2119 * last. * 2120 * * 2121 * When the UDIR initially expands to two * 2122 * blocks (primary block and one secondary block), the new * 2123 * secondary block is created and written out, then the * 2124 * new format directory (now containing pointers to the * 2125 * secondary blocks) is written into the old position. * 2126 * * 2127 * If a secondary directory block overflows, it should * 2128 * be evenly divided between two new blocks, the updated * 2129 * primary directory block written out, and the original * 2130 * (overflowing) secondary directory block then freed. * 2131 * * 2132 * When two secondary blocks are to be combined, a third * 2133 * block is acquired and receives the information from the * 2134 * blocks being combined. The primary directory block is then * 2135 * updated and the two original blocks are freed. * 2136 * * 2137 * FILE DIRECTORY ENTRIES * 2138 * .SAF .RAF .CODE * 2139 * The original directory entry may be made with null * 2140 * pointers. When an initial block is assigned, its address * 2141 * may be entered into the file directory immediately because * 2142 * its FBI indicates that it is a free block until * 2143 * the initializing write has occurred. * 2144 * * 2145 * Any other blocks referenced by a file directory * 2146 * entry (share list for example) should be in place on the * 2147 * volume before the file directory entry or update is made. * 2148 * * 2149 * MASS STORAGE ERRORS * 2150 * Pointers to the primary UDIR block are in the IDX * 2151 * and AFT. Pointers to secondary UDIR blocks are in the * 2152 * primary UDIR. May be substituted. This user will get * 2153 * DSE status on any request referencing an unavailable * 2154 * block. Recovery must find all of the dependent items * 2155 * (files, share lists, etc.) in order to rebuild the * 2156 * defective block. The appropriate manager may be required * 2157 * to re-establish limits, authorities, and passwords. * 2158 * * 2159 ********************************************************************************** 2160 2161 BASE 00000000 DISP 2162 UD LABEL 00000000 DISP 2163 UDACCT BSS2 1 account name 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 124 (DISKDEFS) F 8 Disk Data Structures 00000002 DISP 2164 UDPROJ BSS 1 division-project 00000003 DISP 2165 UDPASS BSS2 1 logon password 2166 BSS 5 filler 2167 0000000A DISP 2168 UDWORDB BSS 1 0008001A 0 ZBM 2169 UDTYPE EQU R0,UDWORDB/BIT 0 0 => complete file directory 2170 * 1 => index to file directory 0000000B DISP 2171 UDHPRAC BSS2 1 hello program account name 0000000D DISP 2172 UDHPRACP BSS 1 hello program account division-project 0000000E DISP 2173 UDHPRACPW BSS2 1 hello program account password 00000010 DISP 2174 UDHPR BSS2 1 hello program name 00000012 DISP 2175 UDHPREXT BSS 1 hello program extension 00000013 DISP 2176 UDHPRPW BSS2 1 hello program password 00000015 DISP 2177 UDBYEAC BSS2 1 bye program account name 00000017 DISP 2178 UDBYEACP BSS 1 bye program account division-project 00000018 DISP 2179 UDBYEACPW BSS2 1 bye program account password 0000001A DISP 2180 UDBYE BSS2 1 bye program name 0000001C DISP 2181 UDBYEEXT BSS 1 bye program extension 0000001D DISP 2182 UDBYEPW BSS2 1 bye program password 0000001F DISP 2183 UDSFLAGS BSS 1 subsystem control flags 2184 * e.g. system is BASIC only. subsystems 2185 * may test these to control prompts, etc. 00000010 BYTE 2186 UDENCRFLG EQU BIT 0 flag sez to encrypt account info on backup 00000020 DISP 2187 UDSERNO BSS2 1 account serial number 2188 BSS 7 filler 00000029 DISP 2189 UDPRIORITY BSS 1 priority for this account 0000002A DISP 2190 UDPRIVS BSS 1 privileges 2191 2192 * The limit block for an account is kept in 2193 * main memory as long as a user is logged onto that 2194 * account or a file on that account is equipped. 2195 * Only one limit block for each account is kept 2196 * at any time: all users will point to the same block. 2197 0000002B DISP 2198 UDLIMITS LABEL beginning of the limit block 2199 BSS LIMITSIZE user limit info - see previous definitions 2200 BSS 011-LIMITSIZE room to expand user limit information 2201 0000003C DISP 2202 UDSHLLIST BSS UDSHLSIZE directory share list 00000040 DISP 2203 UDAUTHLIST BSS 1 ptr to auth list, 0 if none 00000048 ABS 2204 UDTITLEL EQU 72 length of account title in chars 2205 BSS 96-UDTITLEL/CPW-DISPW UD allow fixed size for UD 0000004E DISP 2206 UDTITLE BSS UDTITLEL/CPW 72 chars for account title (trailing nulls) 00000060 DISP 2207 UDFDLIST LABEL beginning of file directory 2208 DRCT 2209 000003A0 ABS 2210 UDFDSIZE EQU BLOCKSIZE-(UDFDLIST DISPW UD) size of FD 00000026 ABS 2211 UDFDECNT EQU UDFDSIZE/FDLNTH number of FD entries 0000002A ABS 2212 UD2FDECNT EQU WPP/FDLNTH number of entries in UDIR2 2213 2214 ********************************************************************************** 2215 * This symbol is used by the directory searching * 2216 * routines to detect when they have reached the end of * 2217 * the valid information area in a block. It points to * 2218 * the last possible place where a file directory entry * 2219 * may start (an entry starting later would not be * 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 125 (DISKDEFS) F 8 Disk Data Structures 2220 * entirely within the block). * 2221 ********************************************************************************** 2222 000003E8 ABS 2223 UDLFDE EQU BLOCKSIZE-FDLNTH last possible entry location 2224 2225 ********************************************************************************** 2226 * These symbols are used by the directory modifying * 2227 * routines for the ends of the valid areas in a block. * 2228 * They point to the first word of the last possible entry * 2229 * in a block of the type indicated. * 2230 ********************************************************************************** 2231 2232 * This symbol points to the first word of the last possible 2233 * file directory element in a small directory UDIR1 000003D8 ABS 2234 UD1LFDE EQU UDFDLIST+(UDFDECNT-1)*FDLNTH 2235 2236 * This symbol points to the first word of the last possible 2237 * file directory element in a large directory UDIR2 000003D8 ABS 2238 UD2LFDE EQU UD+(UD2FDECNT-1)*FDLNTH 2239 2240 * Entries in UDIR1 for an indexed directory 2241 00000834 2242 UDINDXPROT BASE R3 0016C800 3 BASE 2243 UDINDXNAM BSS2 1 name of first entry in pointed block 0016C802 3 BASE 2244 UDINDXEXT BSS 1 extension of first entry 0016C803 3 BASE 2245 UDINDXDAW BSS 0 whole word for count and MS address 0016C00C 3 CACH 2246 UDINDXNUM BSSB 8 number of entries in pointed block 0008D183 3 ZBM 2247 UDINDXADR BSSB MSBLKLOG MS address of directory block 0016C804 3 BASE 2248 UDINDXDA2 BSS 1 MS address of secondary UDIR block 2249 DRCT 2250 00000005 ABS 2251 UDINDXLEN EQU DISPW UDINDXPROT length of entry in index 000000B9 ABS 2252 UDINDCNT EQU UDFDSIZE/UDINDXLEN number of pointers in UDIR1 2253 2254 * This symbol points to the first word of the last possible 2255 * index entry in a large directory UDIR1 block 000003F8 ABS 2256 UD1LINDX EQU UDFDLIST+(UDINDCNT-1)*UDINDXLEN 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 126 (DISKDEFS) F 8 Disk Data Structures 2258 2259 ********************************************************************************** 2260 * * 2261 * SEQUENTIAL ACCESS FILE STRUCTURE (.SAF) * 2262 * Each file block contains the FBI information * 2263 * with the forward pointer pointing to the following file * 2264 * block, and the backward pointer pointing to the * 2265 * preceding file block. The forward pointer of the last * 2266 * file block and the backward pointer of the first file * 2267 * block are null (zeros). * 2268 * * 2269 * The data bytes in the file blocks may be considered * 2270 * as a continuous space. Within this space are stored * 2271 * records, file marks, and an end of data indicator. * 2272 * * 2273 * A record consists of a 3 byte type and length indicator * 2274 * (forward length), the N bytes of data, and a repeat of the * 2275 * type and length indicator (backward length). The type bits * 2276 * contain information about the recording mode of the record * 2277 * and mark it as a record. * 2278 * * 2279 * A file mark consists of a 3 byte type indicator * 2280 * reserved for this purpose. (it is 3 bytes long so that * 2281 * backspace works) * 2282 * * 2283 * Each file contains one end of data indicator (EOD). * 2284 * A 1 byte type indicator is reserved for the normal EOD. * 2285 * Any unrecognizable type indicator is treated as an abnormal * 2286 * EOD. * 2287 * * 2288 * Also treated as abnormal EOD are the following conditions: * 2289 * 1.) back pointer in subsequent file block incorrect * 2290 * 2.) other FBI information obviously wrong (although * 2291 * this may not be exhaustively examined) * 2292 * 3.) a records forward length and backward length are * 2293 * different * 2294 * * 2295 * Some or all of a garbage record may be transmitted * 2296 * to the users buffer on a read request but he is given * 2297 * the abnormal EOD status (the user can not retrieve data * 2298 * belonging to other users because all such data is * 2299 * overwritten before the space is returned to the ADT). * 2300 * * 2301 * When a user is updating an entire file, such as an * 2302 * edit file, the preferred method is to write the new file * 2303 * onto a scratch file and switch the data pointers into * 2304 * the directory using the XREQ supplied for this purpose. * 2305 * (the critical updating of the directory is done in one * 2306 * mass storage transfer and is crashproof with respect to * 2307 * the user's data) * 2308 * * 2309 * Writes onto the end of a file are accomplished as follows: * 2310 * 1.) bring the last file block into a buffer * 2311 * 2.) serially place the new record and EOD into the * 2312 * buffer * 2313 * 3.) if the block is filled, request a new file block, * 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 127 (DISKDEFS) F 8 Disk Data Structures 2314 * place the new forward pointer into the current * 2315 * block and write it out. Generate the FBI * 2316 * for the new block and continue filling. * 2317 * * 2318 * When a user writes onto a file at other than the end, the * 2319 * block containing the current position pointer is retained, * 2320 * but subsequent file blocks are freed. The write then * 2321 * takes place from the current position pointer into new * 2322 * file blocks if required. (the freeing may not take place * 2323 * until the current block is written with its new forward * 2324 * pointer) * 2325 * * 2326 * CRASH RESISTANCE * 2327 * Because unused space contains EOD's in the data and * 2328 * FBI areas, new blocks may be linked into a file before * 2329 * they have been written to the volume. * 2330 * * 2331 * MASS STORAGE ERRORS * 2332 * May be substituted. User requests will get * 2333 * abnormal/unavailable (A/U) status. Recovery may * 2334 * be able to retrieve the part of the file that occupies * 2335 * readable blocks. Blocks that have been unlinked from * 2336 * this file but not yet freed will create a problem * 2337 * during recovery. * 2338 * * 2339 ********************************************************************************** 2340 2341 * format of the type and length indicators 2342 00001040 BYTE 2343 FILTYPE BITS 8:11 type field 00000000 ABS 2344 RTYPETEXT EQU 0 text record 00000001 ABS 2345 RTYPETEXTF EQU 1 text with forms control 00000002 ABS 2346 RTYPEBIN EQU 2 binary 00000003 ABS 2347 RTYPEFORM EQU 3 forms record 00000004 ABS 2348 RTYPELABEL EQU 4 label record 00000005 ABS 2349 RTYPECOMM EQU 5 comment record 00001B30 BYTE 2350 FILRLEN BITS 13:31 character count of record 2351 * if FILSFLAGB = 1 then the type indicator is a file 2352 * mark or an end-of-data. File marks are three bytes 2353 * long and end-of-data marks are a single byte. 2354 * the bits in the type field are then defined as: 00003E10 BYTE 2355 FILEODB EQU BIT 31 end of data (file mark if zero) 00003C10 BYTE 2356 FILAEODB EQU BIT 30 abnormal EOD 00003A10 BYTE 2357 FILREODB EQU BIT 29 EOD read (not part of file, status to 2358 * user, indicates EOD read already) 00003810 BYTE 2359 FILSFLAGB EQU BIT 28 bit sez system record type 00000008 ABS 2360 FILEOF EQU 1*FILSFLAGB a file mark byte 00000009 ABS 2361 FILNEOD EQU 1*FILSFLAGB+1*FILEODB 0000000B ABS 2362 FILAEOD EQU 1*FILSFLAGB+1*FILEODB+1*FILAEODB 2363 00000140 BYTE 2364 SAFBLKNUM EQU PGNUMFLD contains current block number 000028C0 BYTE 2365 SAFCHARNUM EQU BYTEDISP current byte in current block 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 128 (DISKDEFS) F 8 Disk Data Structures 2367 2368 ********************************************************************************** 2369 * * 2370 * RANDOM ACCESS FILE STRUCTURE (.RAF) * 2371 * * 2372 * A RAF is an indexed file that provides a user with * 2373 * an addressable string of bytes. They are accessed by a * 2374 * seek to a specified byte location and a read or write of * 2375 * N bytes from there. * 2376 * * 2377 * Blocks not initialized by a user process are not * 2378 * allocated any MS space. Any minor access block may have * 2379 * a null (zeros) pointer indicating a non-existent data * 2380 * block. Reads from uninitialized space return all zero * 2381 * bits. Consequently, a write into a new block initializes * 2382 * that block to zeros to assure that all accesses to * 2383 * uninitialized space return zeros. * 2384 * * 2385 * When a RAF is initially created no blocks are allocated * 2386 * for it. If the first write to the RAF is within the address * 2387 * range of the first data block then only a data block is allocated * 2388 * for the RAF. When a write occurs outside of this block a * 2389 * minor access block is created and if necessary a major access * 2390 * block. * 2391 * * 2392 * The FDE for a RAF will point to either the data block * 2393 * (tiny RAF), the minor access block (small RAF), or the major * 2394 * access block (large RAF). It can also be zero indicating * 2395 * that there are no blocks yet associated with the RAF. There * 2396 * are 2 bits in the FDE to indicate what type of block the * 2397 * root block is. If FDLRAF is set then the root block of * 2398 * the RAF is a major access block. If FDTRAF is set then the * 2399 * first block of the RAF is a data block. Otherwise the root * 2400 * block is a minor access block. * 2401 * * 2402 * A RAF major access block contains the FBI and a list of * 2403 * pointers to minor access blocks. A zero pointer indicates an * 2404 * uninitialized region of the file. The forward and backward * 2405 * links and the relative block number in the FBI are always zero. * 2406 * * 2407 * Each minor access block contains the FBI and a list * 2408 * of pointers to the RAF data area blocks. A zero pointer * 2409 * indicates an uninitialized region of the file. The data * 2410 * area in the data block is all reserved for user data. The * 2411 * forward and backward pointers of the data blocks FBI are * 2412 * null. This is to avoid any inconsistent conditions due to * 2413 * crashes during the addition or deletion of a new data * 2414 * block. * 2415 * * 2416 * A RAF may be opened with multiple-write access. This * 2417 * means that the file may be opened by several processes * 2418 * intending to alter the file. These processes must assume * 2419 * responsibility for the proper interlocking of their * 2420 * transactions to assure data integrity. However, the * 2421 * system does not abdicate its responsibility for the file * 2422 * structure. In order to control the integrity of the file * 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 129 (DISKDEFS) F 8 Disk Data Structures 2423 * structure, several restrictions are necessary. The RAF * 2424 * must be a large RAF (small RAFs are made into large RAFs * 2425 * if they are opened multiple-write). Data blocks may not * 2426 * be removed from a RAF while it is opened multiple-write. * 2427 * * 2428 * In order to protect the users, when a RAF is currently * 2429 * opened for multiple-write by any user, each and every * 2430 * other user of the file must also open it for multiple-write. * 2431 * It is expected that each 'record' in a RAF will be interlocked * 2432 * by a small field in that record. * 2433 * * 2434 * In order to allow record oriented data to be stored in a * 2435 * RAF, a set of XREQs are provided for a special form of access * 2436 * called 'sequential'. When an SWRITE is performed, the write * 2437 * starts at the current position in the file and continues for * 2438 * the specified number of characters, then a LF is added onto the * 2439 * end of the record. The current position is set to the next * 2440 * character position beyond where the LF was written. The end * 2441 * position pointer is set to the maximum of the end position * 2442 * pointer and the current position. * 2443 * * 2444 * An SREAD from a RAF starts at the current position and * 2445 * continues until a LF is encountered or the end position is * 2446 * encountered. The current position is left pointing to the * 2447 * character position beyond the terminating LF (or is set equal * 2448 * to the end position pointer. * 2449 * * 2450 * CRASH RESISTANCE * 2451 * The block number of a major access block may be * 2452 * entered into the file directory before the major access * 2453 * block is written to the volume. This is because the * 2454 * FBI will stop any use of the file. However, as each * 2455 * minor access block (or data block) is created, it must * 2456 * be written to the volume before its address may be * 2457 * entered into the major access block (or minor access * 2458 * block). Major access blocks, minor access blocks, and * 2459 * data blocks may all be updated in place. * 2460 * * 2461 * MASS STORAGE ERRORS * 2462 * See the mass storage error section for files. * 2463 * * 2464 ********************************************************************************** 2465 000000A0 BYTE 2466 RAFMAJINDX EQU PGNUMFLDMAJ determines which minor access block 2467 to retrieve from the major access block 000014A0 BYTE 2468 RAFMININDX EQU PGNUMFLDMIN determines which data block to 2469 retrieve from the minor access block 000028C0 BYTE 2470 RAFCHARIDX EQU BYTEDISP determines the character position within 2471 the data block 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 130 (DISKDEFS) F 8 Disk Data Structures 2473 2474 ********************************************************************************** 2475 * * 2476 * CODE FILES (.CODE) * 2477 * Code files consist of a code control block (CCB) and * 2478 * file blocks containing page images. The FDE specifies * 2479 * the CCB block address. Each word in the CCB (below * 2480 * CCBMAXPAGE) controls a block of the file. A zero word * 2481 * indicates none allocated. Otherwise, the upper 8 bits * 2482 * contain control information and the lower MSBLKLOG bits * 2483 * contain an MS address. * 2484 * * 2485 * A code file must be equipped before it may be linked * 2486 * with a LIBCALL. The code file may not be unequipped until * 2487 * all pages belonging to it are unmapped. * 2488 * * 2489 * The first 128 pages of the code files address space * 2490 * correspond to the memory of the executing process. When a * 2491 * code file is set up to run, each page is mapped into the * 2492 * corresponding page in the users virtual memory. If the * 2493 * CCBPROTECT bit was on for the page, it is set up as read * 2494 * only, otherwise, it is set up read only with own copy * 2495 * allowed. The CCBINFO area contains the transfer addresses * 2496 * and privilege and restriction information. * 2497 * * 2498 * A code file is like a small RAF that has had a transfer * 2499 * address specified. XREQs are provided to specify primary * 2500 * and secondary transfer addresses, and to indicate the * 2501 * state of each page (impure, protected, etc.). * 2502 * * 2503 * CRASH RESISTANCE * 2504 * See the crash resistance section for RAFs. * 2505 * * 2506 * MASS STORAGE ERRORS * 2507 * See the mass storage error section for files. * 2508 * * 2509 ********************************************************************************** 2510 2511 ********************************************************************************** 2512 * CCB INFO BLOCK * 2513 * This block resides near the end of the CCB and contains * 2514 * information special to code files. * 2515 ********************************************************************************** 2516 00000839 2517 CCBINFPROT BASE R0 00160800 0 BASE 2518 CCBPERMIT LABEL beginning of restriction block 00080050 0 ZBM 2519 CCBRSTCTG1 BSSB 5 who set restriction group 1 override (limit change) 00080A50 0 ZBM 2520 CCBRSTCTG2 BSSB 5 " group 2 " (catalog fetch) 00081450 0 ZBM 2521 CCBRSTCTG3 BSSB 5 " group 3 " (account attribute change) 00081E50 0 ZBM 2522 CCBRSTCTG4 BSSB 5 " group 4 " (unassigned) 00082850 0 ZBM 2523 CCBRSTCTG5 BSSB 5 " group 5 " (unassigned) 00083210 0 ZBM 2524 CCBMAINTR BSSB 1 allowed maintenance read 00083410 0 ZBM 2525 CCBMAINTW BSSB 1 allowed maintenance write 00083620 0 ZBM 2526 CCBOPREQ BSSB 2 allowed operator requests 00083A40 0 ZBM 2527 CCBMANAGR BSSB 4 allowed manager requests 00080211 0 ZBM 2528 CCBOWNDIR BSSB 1 use own directory pointers when run 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 131 (DISKDEFS) F 8 Disk Data Structures 00080421 0 ZBM 2529 CCBBACKUP BSSB 2 allowed backup requests 00003E10 BYTE 2530 CCBALWFRC EQU BIT 31 restriction/privilege forced always 00003C10 BYTE 2531 CCBOWNFRC EQU BIT 30 restriction/privilege forced by owner 00003A10 BYTE 2532 CCBDIVFRC EQU BIT 29 restriction/privilege forced by division 00003810 BYTE 2533 CCBPRJFRC EQU BIT 28 restriction/privilege forced by project 00003610 BYTE 2534 CCBUSRFRC EQU BIT 27 restriction/privilege forced by user 2535 BSS 0 force word alignment 2536 BSS 8-(DISPW CCBPERMIT) allow 8 words for restrictions 00160808 0 BASE 2537 CCBPREGS BSS 16 initial program registers, same form as CA 00081F18 0 ZBM 2538 CCBPTRANS EQU CCBPREGS/CAPC primary transfer address (same as PC) 0016080A 0 BASE 2539 CCB2TRANS EQU CCBPREGS/CAR0 secondary transfer address (same as R0) 2540 DRCT 00000018 ABS 2541 CCBINFOL EQU DISPW CCBINFPROT length of info for code file 2542 ORG CCBINFPROT 2543 2544 BASE 000003E8 ABS 2545 CCBMAXPAGE EQU WPP-CCBINFOL maximum number of page pointers in CCB 00000000 DISP 2546 CCBPAGE0 LABEL location of the first page pointer 2547 BSS CCBMAXPAGE each word controls a page 2548 * within each word, 2549 * the upper bits are control information 2550 * the lower MSBLKLOG bits are the block number 00000010 BYTE 2551 CCBPROTECT EQU BIT 0 bit indicates page is protected 000003E8 DISP 2552 CCBINFO LABEL CCB info block starts here 2553 DRCT 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 132 (DISKDEFS) F 8 Disk Data Structures 2555 2556 ********************************************************************************** 2557 * * 2558 * The following tables are present only on the system volume. * 2559 * * 2560 ********************************************************************************** 2561 2562 ********************************************************************************** 2563 * * 2564 * SYSTEM CONFIGURATION TABLE (SCT) * 2565 * This table contains all of the data concerning all * 2566 * I/O devices on the system. It contains the map between * 2567 * device number and descriptor (this mapping must be * 2568 * determined at run time). * 2569 * * 2570 * It may be wise to make this table a user file so * 2571 * that a given system volume could run on either of two * 2572 * hardware configurations, as determined at load time. * 2573 * This might save a lot of field service time * 2574 * when distributing new systems. * 2575 * * 2576 * CRASH RESISTANCE * 2577 * Not applicable * 2578 * * 2579 * MASS STORAGE ERRORS * 2580 * Pointer in volume label. May be substituted. * 2581 * Recovery will be complete except that maintenance will * 2582 * be required to re-establish the SCT. * 2583 * * 2584 ********************************************************************************** 2585 2586 ********************************************************************************** 2587 * * 2588 * ACCOUNT FINDER TABLE (AFT) * 2589 * This table is provided to determine what volume a given * 2590 * account name is on. It is updated at the same time as * 2591 * the user index. It must also be updated when volumes are * 2592 * mounted or dismounted. It is essentially a scratch * 2593 * table set up for the convenience of the system. This table * 2594 * is rebuilt each time the system is booted. This helps avoid * 2595 * problems with UDIR's moving around if one of the volumes is * 2596 * backed up. * 2597 * * 2598 * The table is indexed by account name (in the case of * 2599 * foreign volume entries, by volume name and account name) * 2600 * and provides the logical unit number (which must be * 2601 * decoded to hardware descriptor elsewhere) and the UDIR * 2602 * block number. * 2603 * * 2604 * This table has the same format as the IDX, * 2605 * which see for further information. * 2606 * * 2607 * CRASH RESISTANCE * 2608 * This table should be updated only after the IDX * 2609 * has received a new entry and before an entry is * 2610 * removed from an IDX. This table is rebuilt when * 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 133 (DISKDEFS) F 8 Disk Data Structures 2611 * the system is initialized after a crash so as to * 2612 * ensure that it matches the data in the IDXs. * 2613 * * 2614 * MASS STORAGE ERRORS * 2615 * Pointer in volume label. May be substituted. * 2616 * Recovery will be complete. * 2617 * * 2618 ********************************************************************************** 2619 2620 * exactly the same format as the IDX (except for FBI type) 2621 2622 2623 ********************************************************************************** 2624 * * 2625 * Several other desirable table structures are * 2626 * implemented as SAFs or RAFs on the maintenance, * 2627 * manager, or operator accounts, as appropriate. These * 2628 * files and their location are: * 2629 * 1.) system code file. File = SYSTEM.!!!:SYSTEM.CODE * 2630 * Previous system = SYSTEM.!!!:OLDSYSTEM.CODE * 2631 * Experimental system = SYSTEM.!!!:EXPSYSTEM.CODE * 2632 * 2.) system crash file. File = SYSTEM.!!!:CRASHDUMP.CODE * 2633 * 3.) error log file. File = SYSTEM.!!!:ERRORLOG.LOGFIL * 2634 * 4.) supported library account. Manufacturers * 2635 * library = .!!! (referencable as +) * 2636 * 5.) system library account = .SYS (referencable as * 2637 * $$$. This account is the responsibility * 2638 * of the system owner (manager). * 2639 * * 2640 ********************************************************************************** 2641 2642 ORG CRANDALL recapture all of the lost space 14 INPUT VIRTDEFS virtual machine definitions 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 134 (VIRTDEFS) F 9 Error codes of all kinds 4 5 ********************************************************************************** 6 * * 7 * Any changes to this file (additions, deletions of * 8 * codes) should be made also to the appropriate section(s) of * 9 * .SYS:VIRTDEFS.PASCAL. * 10 * * 11 ********************************************************************************** 12 13 ********************************************************************************** 14 * * 15 * ERROR CODES * 16 * As sure as the sun shines, there will be errors and * 17 * these errors need to be reported to users and the system. * 18 * The following is a list of the error codes broken down into * 19 * groups: * 20 * * 21 * 001-01F These errors are generated by the machine in * 22 * response to illegal instruction usage * 23 * (undefined opcodes, CALL/ENTR mismatch, etc.). * 24 * The error is reported to the operating system * 25 * using this error code and the error code * 26 * is either passed on to the program causing * 27 * the error (if the program has notified the * 28 * system of its ability to handle such errors) * 29 * or to the overprocess controlling that * 30 * program. * 31 * 020-07F These errors are conditions noticed by the * 32 * system software and are passed on to the * 33 * program or to the overprocess. Some of these * 34 * codes are notifications of events in the * 35 * system that the user wished to know about * 36 * (break from terminal, time interval completed, * 37 * receipt of a message from another session, etc.). * 38 * 080-... These error codes are returned by the XREQs * 39 * to give notification of illegal usage, bad * 40 * parameters, or other unacceptable conditions. * 41 * If an error occurs on an XREQ, the error code * 42 * is always returned in R0 with the sign bit * 43 * set to indicate that an error has occurred. * 44 * Note that these error codes apply to any * 45 * XREQ, they are not segregated by FREQ, * 46 * UREQ, or OPREQ. * 47 * * 48 ********************************************************************************** 49 50 * 0 no error 51 * 001-01F machine generated errors 00000001 ABS 52 UINTUOP EQU 001 undefined opcode 00000002 ABS 53 UINTUMODE EQU 002 undefined address mode 00000003 ABS 54 UINTIMS EQU 003 illegal addr. mode for store inst. 00000004 ABS 55 UINTUMP EQU 004 undefined addr. mode in pointer 56 * EQU 005 unassigned (was 'illegal pointer for indexing') 00000006 ABS 57 UINTIMI EQU 006 illegal addr. mode for instruction 00000007 ABS 58 UINTXTI EQU 007 execute target illegal 00000008 ABS 59 UINTCEM EQU 008 CALL/ENTR mismatch 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 135 (VIRTDEFS) F 9 Error codes of all kinds 00000009 ABS 60 UINTPARL EQU 009 PAR/STP mismatch 0000000A ABS 61 UINTIONOV EQU 00A ION/IOFF overflow/underflow 0000000B ABS 62 UINTUOP2 EQU 00B unimplemented instruction 0000000C ABS 63 UINTCKB EQU 00C check bounds failure 0000000D ABS 64 UINTSTNG EQU 00D undefined number or illegal data 0000000E ABS 65 UINTSTKO EQU 00E stack overflow 0000000F ABS 66 UINTBCDO EQU 00F decimal overflow 00000010 ABS 67 UINTARTHOV EQU 010 arithmetic overflow 00000011 ABS 68 UINTDIV0 EQU 011 divide by zero 00000012 ABS 69 UINTFIXOVP EQU 012 fixing overflow positive 00000013 ABS 70 UINTFIXOVN EQU 013 fixing overflow negative 00000014 ABS 71 UINTFLTOVN EQU 014 floating overflow negative 00000015 ABS 72 UINTFLTUFN EQU 015 floating underflow negative 00000016 ABS 73 UINTFLTOVP EQU 016 floating overflow positive 00000017 ABS 74 UINTFLTUFP EQU 017 floating underflow positive 00000018 ABS 75 UINTUNDEF EQU 018 reference to undefined number 00000018 ABS 76 UINTINST EQU 018 this and below codes are instruction failures 0000001F ABS 77 UINTTRACEI EQU 01F instruction trace interrupt 78 * 020-07F software generated errors 00000020 ABS 79 UINTBREAK EQU 020 terminal BREAK request 00000021 ABS 80 UINTTIMCUT EQU 021 time cut interrupt 00000022 ABS 81 UINTNETERM EQU 022 non-empty term 00000023 ABS 82 UINTNEPATH EQU 023 non-empty path 00000024 ABS 83 UINTTDISC EQU 024 terminal disconnect 00000025 ABS 84 UINTTIMINT EQU 025 time interrupt 00000026 ABS 85 UINTMSG EQU 026 inter-session message received 00000027 ABS 86 UINTOPRQA EQU 027 operator abort 00000028 ABS 87 UINTGUNIT EQU 028 received a gift unit 88 * 060-07F codes that enter next higher program level 00000070 ABS 89 UINTVMFPE EQU 070 virtual memory failure - parity error 00000071 ABS 90 UINTVMFDE EQU 071 virtual memory failure - disk error 00000072 ABS 91 UINTVMFIDS EQU 072 virtual memory failure - insufficient disk space 00000073 ABS 92 UINTVMFISR EQU 073 virtual memory failure - insufficient system resources 00000074 ABS 93 UINTMPV EQU 074 memory protect violation 00000075 ABS 94 UINTATTACH EQU 075 request to attach to session 00000079 ABS 95 UINTBRKINS EQU 079 "break" instruction 0000007A ABS 96 UINTLOGOFF EQU 07A request to log off session 0000007B ABS 97 UINTCHAIN EQU 07B request to chain 0000007C ABS 98 UINTVAR EQU 07C request for variable 0000007D ABS 99 UINTOPRQ EQU 07D operator request (sub-code in R1) 00000001 ABS 100 UINTOPRQL EQU 1 do a logoff 00000002 ABS 101 UINTOPRQT EQU 2 do a terminate 00000003 ABS 102 UINTOPRQW EQU 3 give a warning 00000004 ABS 103 UINTOPRQUL EQU 4 user logoff 00000005 ABS 104 UINTOPRQP EQU 5 abort parallel session 0000007E ABS 105 UINTPTERM EQU 07E program termination (sub-code in R1) 106 * (right 4 bits of URSTOPxx) 0000007F ABS 107 UINTLOGIN EQU 07F initial creation entry 108 * 080-... errors made by XREQs 00000080 ABS 109 XREQERILR EQU 080 illegal request 110 * a catch-all error code 00000081 ABS 111 XREQERLNE EQU 081 *unit not equipped 00000082 ABS 112 XREQERPOB EQU 082 parameter out of bounds 00000083 ABS 113 XREQERLAE EQU 083 unit already equipped 00000084 ABS 114 XREQERPFM EQU 084 protected from modification 00000085 ABS 115 XREQERRNA EQU 085 read not allowed 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 136 (VIRTDEFS) F 9 Error codes of all kinds 00000086 ABS 116 XREQERMWNA EQU 086 multiple write not allowed 00000087 ABS 117 XREQERDSKL EQU 087 *exceeding disk limits 00000088 ABS 118 XREQERISAV EQU 088 *insufficient save file space 00000089 ABS 119 XREQERFAU EQU 089 *file abnormal/unavailable 120 * a MS error has occurred on users data 0000008A ABS 121 XREQERFBZ EQU 08A file busy 0000008B ABS 122 XREQERLAS EQU 08B unit already saved 0000008C ABS 123 XREQERLNS EQU 08C unit not saved 0000008D ABS 124 XREQERFNF EQU 08D file not found 125 * this error is given without elaboration for 126 * files that the user is not authorized to 127 * access 0000008E ABS 128 XREQERNAE EQU 08E name already exists 0000008F ABS 129 XREQERBFN EQU 08F bad filename 00000090 ABS 130 XREQERFHBD EQU 090 file has been destroyed 00000091 ABS 131 XREQERILOP EQU 091 illegal operation on device 00000092 ABS 132 XREQERFPRG EQU 092 file was purged 00000093 ABS 133 XREQERISYR EQU 093 *insufficient system resources 134 * the system has run out of MS table 135 * space or monitor free space 00000094 ABS 136 XREQERPNS EQU 094 privilege not sufficient 00000095 ABS 137 XREQERLPE EQU 095 lock protocol error 00000096 ABS 138 XREQERPWW EQU 096 password wrong 139 * this error is given without elaboration 140 * for attempts to log on to non-existant 141 * accounts or with an improper password 00000097 ABS 142 XREQERBVAR EQU 097 bad variable (genned by control mode) 00000098 ABS 143 XREQERWPT EQU 098 wrong parameter terminator 00000099 ABS 144 XREQERSIU EQU 099 system/resource in use 0000009A ABS 145 XREQERUAM EQU 09A unknown access mode 0000009B ABS 146 XREQERVLB EQU 09B volume label bad 0000009C ABS 147 XREQERVNMR EQU 09C volume not mountable by this revision 0000009D ABS 148 XREQERNFSV EQU 09D no free storage on volume 0000009E ABS 149 XREQERBSBL EQU 09E bad substitution list 0000009F ABS 150 XREQERDSE EQU 09F disk structure error 151 * a MS error has occurred on system tables 152 * or data. The users data is probably 153 * intact (if it exists) and may be 154 * recovered by a recovery program. 000000A0 ABS 155 XREQEROFC EQU 0A0 write off end of CODE file 000000A1 ABS 156 XREQERVIU EQU 0A1 volume in use 000000A2 ABS 157 XREQERMNRP EQU 0A2 may not reference other process/session 000000A3 ABS 158 XREQERNSPP EQU 0A3 no such process/session 000000A4 ABS 159 XREQERREOD EQU 0A4 *reread at end-of-data 000000A5 ABS 160 XREQERWANA EQU 0A5 must not have write access 000000A6 ABS 161 XREQERNSV EQU 0A6 no such volume 000000A7 ABS 162 XREQERIAUT EQU 0A7 insufficient authorization 000000A8 ABS 163 XREQERFIP EQU 0A8 freeing in progress (to OPR only) 000000A9 ABS 164 XREQERINHI EQU 0A9 access inhibited 165 * return given to login saying 166 * port/system is inhibited 000000AA ABS 167 XREQERNSL EQU 0AA no such unit 000000AB ABS 168 XREQERNSE EQU 0AB no such entry 000000AC ABS 169 XREQERNR EQU 0AC no room for entry 000000AD ABS 170 XREQERSUSP EQU 0AD item/access not available -- did not suspend 000000AE ABS 171 XREQERDNR EQU 0AE device not ready 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 137 (VIRTDEFS) F 9 Error codes of all kinds 000000AF ABS 172 XREQERDNA EQU 0AF device not assigned to caller 000000B0 ABS 173 XREQERDAA EQU 0B0 device already assigned 000000B1 ABS 174 XREQERDNC EQU 0B1 device not callers 000000B2 ABS 175 XREQERUKS EQU 0B2 unknown shift 000000B3 ABS 176 XREQERUKC EQU 0B3 unknown class 000000B4 ABS 177 XREQERUKF EQU 0B4 unknown forms 000000B5 ABS 178 XREQERNSS EQU 0B5 no such site 000000B6 ABS 179 XREQERNDS EQU 0B6 no device of specified name at site 000000B7 ABS 180 XREQERNDT EQU 0B7 no device of specified type at site 000000B8 ABS 181 XREQERRIB EQU 0B8 "ROUTE" illegal for batch jobs (spooler) 000000B9 ABS 182 XREQEROIO EQU 0B9 "OUT" illegal for output jobs (spooler) 000000BA ABS 183 XREQERAIR EQU 0BA "ATTR" illegal for batch jobs (spooler) 000000BB ABS 184 XREQERSIO EQU 0BB "SEQ" illegal for output jobs (spooler) 000000BC ABS 185 XREQERUKP EQU 0BC unknown parameter 000000BD ABS 186 XREQERSIB EQU 0BD "SITE" illegal for batch jobs (spooler) 000000BE ABS 187 XREQERUIB EQU 0BE "UNIT" illegal for batch jobs (spooler) 000000BF ABS 188 XREQERSPB EQU 0BF "SUPPRESS" illegal for batch jobs (spooler) 000000C0 ABS 189 XREQERSDE EQU 0C0 "SPOOLED" and "DIRECT" may not appear together (spooler) 000000C1 ABS 190 XREQERULT EQU 0C1 unknown logical device type (spooler) 000000C2 ABS 191 XREQERTMD EQU 0C2 too many different devices for batch job (spooler) 000000C3 ABS 192 XREQERDCM EQU 0C3 some device count appears >1 times for 193 * batch job (spooler) 000000C4 ABS 194 XREQERDIO EQU 0C4 "DEVICE" illegal for output job 195 000000C5 ABS 196 XREQERESDL EQU 0C5 exceeding session disk limits 000000C6 ABS 197 XREQERLBZ EQU 0C6 lock busy 000000C7 ABS 198 XREQERSCU EQU 0C7 spooler is currently unavailable 000000C8 ABS 199 XREQERVBB EQU 0C8 "VERBATIM" illegal for batch jobs (spooler) 000000C9 ABS 200 XREQERITK EQU 0C9 "TRACK" parameter out of bounds (spooler) 000000CA ABS 201 XREQERITM EQU 0CA "TIME" parameter out of bounds (spooler) 202 203 ********************************************************************************** 204 * * 205 * Error codes 0E0:0FF are reserved for device dependent * 206 * codes. * 207 * * 208 ********************************************************************************** 209 000000E0 ABS 210 DEVERPFE EQU 0E0 port framing error 000000E1 ABS 211 DEVERPPE EQU 0E1 port parity error 000000E2 ABS 212 DEVERPIBO EQU 0E2 port input buffer overflow 213 000000E3 ABS 214 DEVERTRE EQU 0E3 tape read error 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 138 (VIRTDEFS) F 9 Executive Request (XREQ) codes 217 218 ********************************************************************************** 219 * * 220 * A unit is an unsigned 8 bit integer used to refer to a * 221 * 'logical unit'. These logical units may be 'equipped' to * 222 * mass storage files or to pseudo device types. The * 223 * following are special unit assignments. * 224 * * 225 ********************************************************************************** 226 227 * unit 0 does not exist 00000001 ABS 228 LUNSIN EQU 1 standard input 00000002 ABS 229 LUNSOUT EQU 2 standard output 00000003 ABS 230 LUNSERR EQU 3 error output 00000064 ABS 231 MAXLOCAL EQU 100 highest possible local unit number 000000C9 ABS 232 LUNAIN EQU 201 absolute input 000000CA ABS 233 LUNAOUT EQU 202 absolute output 234 000000C9 ABS 235 LUNCMLOW EQU 201 any unit above this is not the user's 000000D2 ABS 236 LUNCMCNTL EQU 210 above this, only CM may diddle 237 238 ********************************************************************************** 239 * * 240 * Below are defined the codes for the requests that a * 241 * user may make to the system to do useful things for him. * 242 * The requests are grouped into file requests (FREQs) which * 243 * begin with the characters "FR", user requests (UREQs) which * 244 * begin with the characters "UR", and operator, manager, and * 245 * control mode requests which begin with the characters "OR". * 246 * A table containing the current maximum request code * 247 * values for each request type is kept with the XREQ call * 248 * monitor definitions (XREQMAXTAB). That table must be kept * 249 * up to date as greater numbers are used. * 250 * * 251 * The machine hardware traps the XREQ opcode to the * 252 * monitor after calculating the operand. The operand is * 253 * calculated using the 22 bit address field in the same * 254 * manner as a normal mem ref instruction (e.g. LD). The * 255 * monitor further decodes the R field to distinguish the type * 256 * of request. * 257 * The XREQ opcode is 08000000. The valid subops are * 258 * FREQ=2 (088xxxxx), UREQ=4 (090xxxxx), and OPREQ=5 * 259 * (094xxxxx). * 260 * Each request code is preceeded by a brief description * 261 * of the calling register setup, the request and operand, and * 262 * the registers returned. * 263 * * 264 ********************************************************************************** 265 00002CA0 BYTE 266 XRFLDCODE EQU BITS 22:31 XREQ request field 00003840 BYTE 267 XRFLDSUBOP EQU BITS 28:31 sub-operation part 00002C60 BYTE 268 XRFLDREQ EQU BITS 22:27 operation part 269 * EQU BIT 18:21 unused - reserved 00002210 BYTE 270 XRFLDNRWD EQU BIT 17 skip rewind if xreq attempts to do so 00004000 ABS 271 XRNOREWND EQU 1*XRFLDNRWD 00001E20 BYTE 272 XRFLDSUSP EQU BITS 15:16 suspension control field 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 139 (VIRTDEFS) F 9 Executive Request (XREQ) codes 00000000 ABS 273 XRSUSPNORM EQU 0*XRFLDSUSP suspend if request must wait 00008000 ABS 274 XRSUSPERR EQU 1*XRFLDSUSP give error if request must wait 275 * EQU 2*XRFLDSUSP suspend level above if request must wait 276 * EQU 3*XRFLDSUSP not used 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 140 (VIRTDEFS) F 9 Executive Request (XREQ) codes 278 279 ********************************************************************************** 280 * * 281 * FREQs * 282 * The file requests (FREQs) perform operations on a * 283 * unit. The unit is specified by the operand of the * 284 * instruction. Note that the unit number is actually the * 285 * operand of the FREQ and not the effective address, as in * 286 * some other systems! * 287 * * 288 ********************************************************************************** 289 290 * (R0:=request|FREQ unit|R0=dynamic status|R1=static status) 00000010 ABS 291 FRSTATUS EQU 0010 device status 00000011 ABS 292 FRCLEAR EQU 0011 clear errors 00000012 ABS 293 FRREWIND EQU 0012 rewind 00000013 ABS 294 FRRELEASE EQU 0013 release data 00000014 ABS 295 FRSEOD EQU 0014 search for EOD 00000015 ABS 296 FRFWSP EQU 0015 forward-space 00000016 ABS 297 FRBKSP EQU 0016 backspace 00000017 ABS 298 FRSEFF EQU 0017 search EOF forward 00000018 ABS 299 FRSEFB EQU 0018 search EOF backward 00000019 ABS 300 FRWFM EQU 0019 write file mark 0000001A ABS 301 FRFORCE EQU 001A force write modified file pages 0000001C ABS 302 FRWRITEMOD EQU 001C write out modified file pages 0000001D ABS 303 FRCYCLE EQU 001D cycle cartridge tape 0000001E ABS 304 FREPP EQU 001E return EPP (in R1) 0000001F ABS 305 FRDEVSTAT EQU 001F return device status (R1 = PPU status 306 * R2 = controller status) 307 308 * (R0:=request|R1:= 0(MFM), 1(GCR)|FREQ unit|R0=dynamic status) 309 * unstable due to possible controller micro-code problems 310 *FRDENSITY EQU 001B select recording density on cartridge tape 311 312 * (R0:=request|R1:=count|R2:=buffer-addr|FREQ unit|R0=dynamic status) 00000020 ABS 313 FRRWRITE EQU 0020 text rewrite 00000020 ABS 314 FRRWRITET EQU 0020 text rewrite 00000021 ABS 315 FRRWRITETF EQU 0021 text with forms control rewrite 00000022 ABS 316 FRRWRITEB EQU 0022 binary rewrite 00000023 ABS 317 FRRWRITEF EQU 0023 forms rewrite 00000024 ABS 318 FRRWRITEL EQU 0024 label rewrite 00000025 ABS 319 FRRWRITEC EQU 0025 comment rewrite 320 321 * (R0:=request|R1:=count|R2:=buffer-addr|FREQ unit|R0=dynamic status| 322 * R1=count-bytes remaining|R2=terminating character ) 00000030 ABS 323 FRREAD EQU 0030 read 00000031 ABS 324 FRREADB EQU 0031 read binary 00000032 ABS 325 FRSREAD EQU 0032 sequential read 00000033 ABS 326 FRSREADB EQU 0033 sequential binary read 327 328 * (R0:=request|R1:=count|R2:=buffer-addr|FREQ unit|R0=dynamic status) 00000040 ABS 329 FRWRITE EQU 0040 text write 00000040 ABS 330 FRWRITET EQU 0040 text write 00000041 ABS 331 FRWRITETF EQU 0041 text with forms control write 00000042 ABS 332 FRWRITEB EQU 0042 binary write 00000043 ABS 333 FRWRITEF EQU 0043 forms write 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 141 (VIRTDEFS) F 9 Executive Request (XREQ) codes 00000044 ABS 334 FRWRITEL EQU 0044 label write 00000045 ABS 335 FRWRITEC EQU 0045 comment write 336 337 * (R0:=request|R1:=count|R2:=buffer-addr|FREQ unit|R0=dynamic status) 338 * (R1 = number of bytes not written|R2 = advanced source pointer) 000002A0 ABS 339 FRSWRITE EQU 02A0 sequential write 000002A0 ABS 340 FRSWRITET EQU 02A0 sequential text write 000002A1 ABS 341 FRSWRITETF EQU 02A1 sequential text with forms control write 000002A2 ABS 342 FRSWRITEB EQU 02A2 sequential binary write 000002A3 ABS 343 FRSWRITEF EQU 02A3 sequential forms write 344 345 * (R0:=request|R1:=pntr-to-param-block|FREQ unit| 346 * R0=error-code or static-status ) 00000050 ABS 347 FREQUIP EQU 0050 equip + access 00000050 ABS 348 FREQUIPW EQU 0050 equip read-write 00000051 ABS 349 FREQUIPR EQU 0051 equip read-only 00000054 ABS 350 FREQUIPMW EQU 0054 equip multiple-write 00000057 ABS 351 FREQUIPNA EQU 0057 equip with no data access 352 00000050 ABS 353 FROPEN EQU 0050 open + access 00000050 ABS 354 FROPENW EQU 0050 open read-write 00000051 ABS 355 FROPENR EQU 0051 open read-only 00000054 ABS 356 FROPENMW EQU 0054 open multiple-write 00000057 ABS 357 FROPENNA EQU 0057 open with no data access 358 359 * (R0:=request | R1=length | R2:=string addr | FREQ unit | 360 * R0=error code or static status) 00000260 ABS 361 FRNOPEN EQU 0260 use FRNOPEN+access to open 00000260 ABS 362 FRNOPENW EQU 0260 open for write 00000261 ABS 363 FRNOPENR EQU 0261 open for read 00000264 ABS 364 FRNOPENMW EQU 0264 open for multiple write 00000267 ABS 365 FRNOPENNA EQU 0267 open for no data access 00000268 ABS 366 FRNOPENC EQU 0268 use FRNOPENC+access to open, create if necessary 00000268 ABS 367 FRNOPENCW EQU 0268 open for write, create if necessary 00000269 ABS 368 FRNOPENCR EQU 0269 open for read, create if necessary 0000026C ABS 369 FRNOPENCMW EQU 026C open for multiple write, create if necessary 0000026F ABS 370 FRNOPENCNA EQU 026F open for no data access, create if necessary 371 372 * (R0:=request | R1:=length | R2:=string addr | FREQ unit | 373 * R0:=error code or static status) 00000280 ABS 374 FRUOPEN EQU 0280 use FRUOPEN+access to open 00000280 ABS 375 FRUOPENW EQU 0280 open for write 00000281 ABS 376 FRUOPENR EQU 0281 open for read 00000284 ABS 377 FRUOPENMW EQU 0284 open for multiple write 00000287 ABS 378 FRUOPENNA EQU 0287 open for no data access 00000288 ABS 379 FRUOPENC EQU 0288 use FRUOPENC+access to open, create if necessary 00000288 ABS 380 FRUOPENCW EQU 0288 open for write, create if necessary 00000289 ABS 381 FRUOPENCR EQU 0289 open for read, create if necessary 0000028C ABS 382 FRUOPENCMW EQU 028C open for multiple write, create if necessary 0000028F ABS 383 FRUOPENCNA EQU 028F open for no data access, create if necessary 384 385 * (R0:=request|FREQ unit|R0=dynamic-status) 00000060 ABS 386 FRUNEQUIP EQU 0060 unequip unit 387 00000060 ABS 388 FRCLOSE EQU 0060 close unit 389 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 142 (VIRTDEFS) F 9 Executive Request (XREQ) codes 390 * (R0:=request|R1:=extension|R2,R3:=name|FREQ unit| 391 * R0=error-code or dynamic-status ) 00000070 ABS 392 FRSAVE EQU 0070 save in catalog 393 394 * (R0:=request|FREQ unit| 395 * R0=error-code or dynamic-status ) 00000080 ABS 396 FRUNSAVE EQU 0080 remove from catalog 397 398 * (R0:=request|R1:=position|FREQ unit|R0=dynamic-status| 399 * R1=zero if RAF now positioned in hole ) 00000090 ABS 400 FRPOSITION EQU 0090 position a RAF or CODE 401 * (R0:=request|R1:=RAFpage|R2:=memory-page|FREQ unit| 402 * R0=dynamic-status) 403 * note that R1 and R2 both contain page numbers (not addresses) 00000091 ABS 404 FRMAPIN EQU 0091 map RAF page into memory 00000092 ABS 405 FRMAPINR EQU 0092 map in with read-only access 00000094 ABS 406 FRMAPINOC EQU 0094 map in with own copy access 407 * (R0:=request|FREQ unit|R0=dynamic-status|R1=last-char-in-RAF ) 00000093 ABS 408 FRRAFLAST EQU 0093 get last addr in RAF 409 * (R0:=request|FREQ unit|R0=dynamic status|R1=current position) 00000095 ABS 410 FRRAFCPOS EQU 0095 get the RAF/CODE current position 411 * (R0:=request|R1:=page num|FREQ unit|R0=dynamic status| 412 * R2=non-zero if protected) 00000096 ABS 413 FRPGPROTG EQU 0096 get protected status of page 414 * (R0:=request|R1:=page number|R2:=new protect bit| 415 * FREQ unit|R0=dynamic status) 00000097 ABS 416 FRPGPROTS EQU 0097 set protected status of a page 417 * (R0:=request|R1:=byte address in page|FREQ unit| 418 * R0=dynamic status) 00000098 ABS 419 FRDELPAGE EQU 0098 delete page in RAF or CODE 420 * (R0:=request|FREQ unit|R0=dynamic status|R1=new position) 00000099 ABS 421 FRRAFNEXT EQU 0099 position to next non-hole 422 423 * (R0:=request+access|R1:=pntr-to-param-block|FREQ unit| 424 * R0=error-code or dynamic-status ) 000000A0 ABS 425 FRSHARE EQU 00A0 share file 426 427 * (R0:=request+access|R1:=pntr-to-param-block|FREQ unit| 428 * R0=error-code or dynamic-status ) 000000B0 ABS 429 FRUNSHARE EQU 00B0 unshare file 430 431 * (R0:=request|R1:= requested code|FREQ unit|R0=dynamic-status) 000000C0 ABS 432 FRCACCESS EQU 00C0 change equip access 000000C1 ABS 433 FRCHGTRANS EQU 00C1 modify transaction in progress flag (FCB) 434 435 * (R0:=request|FREQ unit|R0=dynamic-status|R1=transaction flag) 000000C2 ABS 436 FRGETTRANS EQU 00C2 get transaction in progress flag (FCB) 437 438 * (R0:=request|R1:=new value|FREQ unit|R0=dynamic status) 000000D0 ABS 439 FRMODACS EQU 00D0 modify access code 440 * EQU 00D1 unused - was modify access lock (unimp) 000000D2 ABS 441 FRMODPRGI EQU 00D2 modify purge interval 000000D3 ABS 442 FRMODNBKUP EQU 00D3 modify no-backup flag 000000D4 ABS 443 FRMODFWWSC EQU 00D4 modify FWWSC flag 000000D5 ABS 444 FRMODUSRN EQU 00D5 modify user value 000000D6 ABS 445 FRMODLBKU EQU 00D6 modify last backup date 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 143 (VIRTDEFS) F 9 Executive Request (XREQ) codes 000000D7 ABS 446 FRMODGHOST EQU 00D7 modify ghost flag 000000D8 ABS 447 FRMODLWD EQU 00D8 modify last write date 000000D9 ABS 448 FRMODLRD EQU 00D9 modify last read date 000000DA ABS 449 FRMODTRANS EQU 00DA modify transaction in progress flag (DIR) 000000DB ABS 450 FRMODFLOG EQU 00DB modify file log flag 451 452 * (R0:=request|R1:=count|R2:=buffadr|FREQ unit|R0=dynamic-status| 453 * R1=count - chars-copied) 000000E0 ABS 454 FRCATALOG EQU 00E0 catalog info fetch 000000E1 ABS 455 FRREADSHL EQU 00E1 read shared list 456 457 * EQU 00F0 unused (reserved for file info fetch) 458 459 * (R0:=request|R1:=extension|R2,R3:=new name|FREQ unit|R0=error-code or 460 * dynamic-status) 00000100 ABS 461 FRRENAMER EQU 0100 rename saved file 462 463 * (R0:=request|R1,R2:=value|FREQ unit|R0=dynamic-status|R1,R2=old value) 00000110 ABS 464 FRTSETTYPE EQU 0110 set terminal type 465 * (R0:=request|R1:=value|FREQ unit|R0=dynamic-status|R1=old value) 00000111 ABS 466 FRTSETCRD EQU 0111 set CR delay (MS) 00000112 ABS 467 FRTSETLFD EQU 0112 set LF delay (MS) 00000113 ABS 468 FRTSETFFD EQU 0113 set FF delay (MS) 00000114 ABS 469 FRTSETBKSP EQU 0114 set backspace char 00000115 ABS 470 FRTSETKILL EQU 0115 set line kill char 00000116 ABS 471 FRTSETCW EQU 0116 set carriage width 00000117 ABS 472 FRTSETSH EQU 0117 set screen height 00000118 ABS 473 FRTSETECHO EQU 0118 set echo (on/off) 00000119 ABS 474 FRTSETRATE EQU 0119 set input and output baud rate 0000011A ABS 475 FRTSETTCG EQU 011A set terminating char group 0000011C ABS 476 FRTSETIRAT EQU 011C set input baud rate 0000011D ABS 477 FRTSETORAT EQU 011D set output baud rate 0000011F ABS 478 FRTSETTRNS EQU 011F set transmitters 00000220 ABS 479 FRTSETMODE EQU 0220 set interface mode 00000221 ABS 480 FRTSETOPT EQU 0221 set CIA options 00000222 ABS 481 FRTSETHTD EQU 0222 set HT delay (MS) 00000223 ABS 482 FRTSETBRCH EQU 0223 set 'break' character 00000224 ABS 483 FRTSETXOIQ EQU 0224 set XOFF on port's input buffer full 484 * (R0:=request|R1:=pntr-to-def-block|FREQ unit|R0=dynamic-status) 0000011B ABS 485 FRTSETTCS EQU 011B set user defined term chars 486 487 * (R0:=request|FREQ unit|R0=dynamic-status|R1,R2=value) 00000120 ABS 488 FRTGETTYPE EQU 0120 get terminal type 489 * (R0:=request|FREQ unit|R0=dynamic-status|R1=value) 00000121 ABS 490 FRTGETCRD EQU 0121 get CR delay (MS) 00000122 ABS 491 FRTGETLFD EQU 0122 get LF delay (MS) 00000123 ABS 492 FRTGETFFD EQU 0123 get FF delay (MS) 00000124 ABS 493 FRTGETBKSP EQU 0124 get backspace char 00000125 ABS 494 FRTGETKILL EQU 0125 get line kill char 00000126 ABS 495 FRTGETCW EQU 0126 get carriage width 00000127 ABS 496 FRTGETSH EQU 0127 get screen height 00000128 ABS 497 FRTGETECHO EQU 0128 get echo mode 00000129 ABS 498 FRTGETRATE EQU 0129 get output baud rate 0000012A ABS 499 FRTGETTCG EQU 012A get terminating char group 0000012C ABS 500 FRTGETIRAT EQU 012C get input baud rate 0000012E ABS 501 FRTGETPORT EQU 012E get port number 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 144 (VIRTDEFS) F 9 Executive Request (XREQ) codes 0000012F ABS 502 FRTGETRCVR EQU 012F get receiver states 00000230 ABS 503 FRTGETMODE EQU 0230 get interface mode 00000231 ABS 504 FRTGETOPT EQU 0231 get selected CIA options 00000232 ABS 505 FRTGETHTD EQU 0232 get HT delay (MS) 00000233 ABS 506 FRTGETBRCH EQU 0233 get 'break' character 00000235 ABS 507 FRTGETXOIQ EQU 0235 get XOFF on port's input buffer full 508 * (R0:=request|R1:=buffer size|R2:=buffer address|FREQ unit| 509 * R0=dynamic status|R1=buffer remaining) 00000234 ABS 510 FRTGETINFO EQU 0234 get all port info 511 * (R0:=request|R1:=pntr-to-block|FREQ unit| R0=dynamic-status) 0000012B ABS 512 FRTGETTCS EQU 012B get characters that terminate 513 514 * (R0:=request|FREQ unit|R0=error-code|R1=process serial number) 00000130 ABS 515 FRCHAIN EQU 0130 chain, run program 00000131 ABS 516 FRSETUPP EQU 0131 set up under program 00000132 ABS 517 FRINSRTP EQU 0132 insert under program 00000134 ABS 518 FRCREATP EQU 0134 create another underprocess 519 * (R0:=request|R1:=input-unit|R2:=output-unit|FREQ program-unit| 520 * R0=error code or session number) 00000133 ABS 521 FRCONCP EQU 0133 create concurrent session 522 523 * (R0:=request|R1:=unit-of-saved-file|FREQ unit-of-new-data| 524 * R0=dynamic-status) 00000140 ABS 525 FRXSAVE EQU 0140 exchange saved file data 526 527 * (R0:=request|FREQ unit|R0=error-code|R1=hard-limit|R2=soft-limit| 528 * R3=saved-limit) 00000150 ABS 529 FRBLKLIM EQU 0150 get block limits 530 * (R0:=request|FREQ unit|R0=error-code|R1=blocks-used|R2=soft-limit| 531 * R3=saved-limit) 00000151 ABS 532 FRBLKUSED EQU 0151 get blocks used 533 534 * (R0:=request|FREQ unit|R0=dynamic-status) 00000170 ABS 535 FRDESTROY EQU 0170 destroy a saved file 536 537 * (R0:=request|FREQ unit|R0=dynamic status|R1=value) 00000180 ABS 538 FRCGPTRANS EQU 0180 get primary transfer address 00000181 ABS 539 FRCG2TRANS EQU 0181 get secondary transfer address 00000182 ABS 540 FRCGOWND EQU 0182 get to use own directory when run 00000183 ABS 541 FRCGRG1 EQU 0183 get restriction group 1 override 00000184 ABS 542 FRCGRG2 EQU 0184 get restriction group 2 override 00000185 ABS 543 FRCGRG3 EQU 0185 get restriction group 3 override 00000186 ABS 544 FRCGRG4 EQU 0186 get restriction group 4 override 00000187 ABS 545 FRCGRG5 EQU 0187 get restriction group 5 override 00000188 ABS 546 FRCGOPREQ EQU 0188 get operator requests 00000189 ABS 547 FRCGMANAGR EQU 0189 get manager request priv 0000018A ABS 548 FRCGMANTR EQU 018A get maintenance read 0000018B ABS 549 FRCGMANTW EQU 018B get maintenance write 0000018C ABS 550 FRCGBCKUP EQU 018C get backup priv 551 * (R0:=request|R1:=field-number|FREQ unit| 552 * R0=dynamic status|R2=value of field) 0000018F ABS 553 FRGETCCB EQU 018F get field from CCB 00000000 ABS 554 CCBFLDR0 EQU 0 field number for R0 00000001 ABS 555 CCBFLDR1 EQU 1 00000002 ABS 556 CCBFLDR2 EQU 2 00000003 ABS 557 CCBFLDR3 EQU 3 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 145 (VIRTDEFS) F 9 Executive Request (XREQ) codes 00000004 ABS 558 CCBFLDR4 EQU 4 00000005 ABS 559 CCBFLDR5 EQU 5 00000006 ABS 560 CCBFLDR6 EQU 6 00000007 ABS 561 CCBFLDR7 EQU 7 00000008 ABS 562 CCBFLDPC EQU 8 field number for PC 00000009 ABS 563 CCBFLDPSR EQU 9 field number for PSR 0000000A ABS 564 CCBFLDIMR EQU 10 field for interrupt mask register 0000000B ABS 565 CCBFLDIAR EQU 11 field for interrupt address 00000010 ABS 566 CCBFLDOWND EQU 16 field for own directory privilege 00000011 ABS 567 CCBFLDRG1 EQU 17 field for restriction group 1 00000012 ABS 568 CCBFLDRG2 EQU 18 field for restriction group 2 00000013 ABS 569 CCBFLDRG3 EQU 19 field for restriction group 3 00000014 ABS 570 CCBFLDRG4 EQU 20 field for restriction group 4 00000015 ABS 571 CCBFLDRG5 EQU 21 field for restriction group 5 00000016 ABS 572 CCBFLDMNTR EQU 22 field for maintenance read 00000017 ABS 573 CCBFLDMNTW EQU 23 field for maintenance write 00000018 ABS 574 CCBFLDOPR EQU 24 field for operator privilege 00000019 ABS 575 CCBFLDMGR EQU 25 field for manager privilege 0000001A ABS 576 CCBFLDBKUP EQU 26 field for backup privilege 00000008 ABS 577 CCBFLDPTRN EQU CCBFLDPC primary transfer address 00000000 ABS 578 CCBFLD2TRN EQU CCBFLDR0 secondary transfer address 579 * (R0:=request|R1:=new value|FREQ unit|R0=dynamic status) 00000190 ABS 580 FRCSPTRANS EQU 0190 set primary transfer address 00000191 ABS 581 FRCS2TRANS EQU 0191 set secondary transfer address 00000192 ABS 582 FRCSOWND EQU 0192 set to use own directory when run 00000193 ABS 583 FRCSRG1 EQU 0193 set restriction group 1 override 00000194 ABS 584 FRCSRG2 EQU 0194 set restriction group 2 override 00000195 ABS 585 FRCSRG3 EQU 0195 set restriction group 3 override 00000196 ABS 586 FRCSRG4 EQU 0196 set restriction group 4 override 00000197 ABS 587 FRCSRG5 EQU 0197 set restriction group 5 override 00000198 ABS 588 FRCSOPREQ EQU 0198 set operator requests 00000199 ABS 589 FRCSMANAGR EQU 0199 set manager request priv 0000019A ABS 590 FRCSMANTR EQU 019A set maintenance read 0000019B ABS 591 FRCSMANTW EQU 019B set maintenance write 0000019C ABS 592 FRCSBCKUP EQU 019C set backup priv 593 * (R0:=request|R1:=field-number|R2:=new-value|FREQ unit| 594 * R0=dynamic status) 0000019F ABS 595 FRSETCCB EQU 019F set field in CCB 596 597 * (R0:=request|FREQ unit|R0=dynamic status) 000001A0 ABS 598 FRALIAS EQU 01A0 set default directory 599 600 * (R0:=request|FREQ unit|R0=error code) 000001B0 ABS 601 FRTFLSHO EQU 01B0 flush output queue 000001B1 ABS 602 FRTFLSHI EQU 01B1 flush input queue 000001B2 ABS 603 FRTFLSHIO EQU 01B2 flush both input and output queues 000001B3 ABS 604 FRTRESET EQU 01B3 restore term to 'default' configuration 605 * (R0:=request|R1=delay in Ms|FREQ unit|R0=error code) 000001B4 ABS 606 FRTDELAY EQU 01B4 delay terminal outputting 607 * (R0:=request|R1:=character times|FREQ unit|R0=error code) 000001B5 ABS 608 FRTBREAK EQU 01B5 send 'break' 609 * (R0:=request|FREQ unit|R0=error code) 000001B6 ABS 610 FRTCLRXOFF EQU 01B6 clears xoff 611 612 * (R0:=request|FREQ unit|R0=error code|R1=value) 000001C0 ABS 613 FRAGCPUL EQU 01C0 get acct CPU limit (in sec) 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 146 (VIRTDEFS) F 9 Executive Request (XREQ) codes 000001C1 ABS 614 FRAGCPUU EQU 01C1 get acct CPU time used 000001C2 ABS 615 FRAGWLCKL EQU 01C2 get acct wallclock limit (in min) 000001C3 ABS 616 FRAGWLCKU EQU 01C3 get acct wallclock time used 000001C4 ABS 617 FRAGDSKL EQU 01C4 get acct disk block limit 000001C5 ABS 618 FRAGDSKU EQU 01C5 get acct saved disk blocks used 000001C6 ABS 619 FRAGWARN EQU 01C6 get acct soft disk limit 000001C7 ABS 620 FRAGSAVL EQU 01C7 get acct saved disk limit 000001C8 ABS 621 FRAGSSCF EQU 01C8 get acct subsystem control flags 000001C9 ABS 622 FRAGBUSY EQU 01C9 get acct busy counter 000001CA ABS 623 FRAGFAC EQU 01CA get acct file access control 000001CB ABS 624 FRAGPWAC EQU 01CB get acct password access control 000001CD ABS 625 FRAGACCT EQU 01CD get acct accounting control 626 * (R0:=request|R1:=ptr to filename|FREQ unit|R0=error code) 000001CE ABS 627 FRAGINITP EQU 01CE get acct initial program 628 * (R0:=request|R1:=buffer size|R2:=ptr to buffer|FREQ unit| 629 * R0=error code|R1=buffer remaining) 000001CF ABS 630 FRAGACCTT EQU 01CF get account title 000001D1 ABS 631 FRAGSHAD EQU 01D1 get account shadow flag 000001D2 ABS 632 FRAGDFLTR EQU 01D2 get acct default restriction 633 634 * (R0:=request | FREQ unit | R0:=error code | R1:R2:=value) 000001D0 ABS 635 FRAGSERNO EQU 01D0 get account serial number 636 637 * (R0:=request | FREQ unit | R0:=error code | R1:=value) 000001D3 ABS 638 FRAGENCF EQU 01D3 get account encryption flag 639 640 * (R0:=request|R1:=new value|FREQ unit|R0=error code|R1=set value) 000001E0 ABS 641 FRASCPUL EQU 01E0 set acct CPU limit (in sec) 000001E1 ABS 642 FRASCPUU EQU 01E1 set acct CPU time used 000001E2 ABS 643 FRASWLCKL EQU 01E2 set acct wallclock limit (in min) 000001E3 ABS 644 FRASWLCKU EQU 01E3 set acct wallclock time used 000001E4 ABS 645 FRASDSKL EQU 01E4 set acct disk block limit 000001E6 ABS 646 FRASWARN EQU 01E6 set acct soft block limit 000001E7 ABS 647 FRASSAVL EQU 01E7 set acct saved disk limit 000001E8 ABS 648 FRASSSCF EQU 01E8 set acct subsystem control flags 000001EA ABS 649 FRASFAC EQU 01EA set acct file access control 000001EB ABS 650 FRASPWAC EQU 01EB set acct password access control 000001ED ABS 651 FRASACCT EQU 01ED set acct accounting control 652 * (R0:=request|R1:=ptr to filename buffer|FREQ unit|R0=error code) 000001EE ABS 653 FRASINITP EQU 01EE set account initial program 654 * (R0:=request|R1:=string len|R2:=ptr to string|FREQ unit| 655 * R0=error code) 000001EF ABS 656 FRASACCTT EQU 01EF set account title 657 * (R0:=request|R1:=ptr passwords|FREQ unit|R0=error code) 000001F0 ABS 658 FRASPASS EQU 01F0 set account logon password 659 * (R0:=request|R1:=new value|FREQ unit|R0=error code) 000001F2 ABS 660 FRASDFLTR EQU 01F2 set acct default restrictions 661 662 * (R0:=request | R1:= 1 or 0 | FREQ unit | R0:=error code) 000001F3 ABS 663 FRASENCF EQU 01F3 set account encryption flag 664 665 * (R0:=request | FREQ unit | R0:=error code or dynamic status) 00000200 ABS 666 FRFILELOCK EQU 0200 lock files implicit .LOCK 00000201 ABS 667 FRFILEULOK EQU 0201 unlock files implicit .LOCK 668 * (R0:=request | R1:=resource# | FREQ unit | R0:=error code or dynamic status) 00000203 ABS 669 FRRESLOCKR EQU 0203 lock file resource lock for read 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 147 (VIRTDEFS) F 9 Executive Request (XREQ) codes 00000204 ABS 670 FRRESLOCKW EQU 0204 lock file resource lock for write 00000205 ABS 671 FRRESULOCK EQU 0205 unlock files resource lock 672 * (R0:=request|FREQ unit|R0=error code or dynamic status| 673 * R1=0 (no lock), 1 (unlocked lock), or 2 (locked lock)) 00000202 ABS 674 FRFILELOKT EQU 0202 test state of files implicit .LOCK 675 * (R0:=request|R1:=resource#|FREQ unit|R0=error code or dynamic status| 676 * R1=0 (no lock), 1 (write locked), or 2 (read locked)| 677 * R2=session number of a locker, if R1=1 or 2) 00000206 ABS 678 FRRESLOKT EQU 0206 test state of files resource lock 00000206 ABS 679 FRRESLOCKT EQU 0206 test state of files resource lock 680 681 * (R0:=request|FREQ unit|R0=errorcode or dynamic status) 00000210 ABS 682 FRUNITID EQU 0210 unit interrupt disable 00000211 ABS 683 FRUNITIE EQU 0211 unit interrupt enable 684 * (R0:=request|FREQ unit|R0=error code|R1=non-zero if enabled) 00000212 ABS 685 FRUNITIGET EQU 0212 unit interrupt flag state get 686 687 * (R0:=request|R1:=echo unit|FREQ unit|R0=errorcode or dynamic status) 00000240 ABS 688 FRECHOUNIT EQU 0240 enable echoing of read lines 689 * (R0:=request|FREQ unit|R0=errorcode or dynamic status) 00000241 ABS 690 FRECHOOFF EQU 0241 disable echoing of read lines 691 * (R0:=request|FREQ unit|R0=errorcode or dynamic status|R1=unit) 00000242 ABS 692 FRECHOGET EQU 0242 get the echo unit (zero if none) 693 * (R0:=request|R1:=buffer length|R2:=buffer address|FREQ unit| 694 * R0=dynamic status or error code) 00000250 ABS 695 FRSETVVFU EQU 0250 load and enable line printer VVFU 696 * (R0:=request|FREQ unit|R0=dynamic status or error code) 00000251 ABS 697 FRCLRVVFU EQU 0251 disable line printer VVFU 698 699 * (R0:=request|R1:=read-unit|FREQ write-unit|R0=error-code) 00000270 ABS 700 FRMAKEPATH EQU 0270 create path, opening both ends 701 702 * (R0:=request|R1:=unit|FREQ unit|R0=error code or static status of unit) 00000290 ABS 703 FRRESSWTCH EQU 0290 switch resources associated with units 704 705 ********************************************************************************** 706 * * 707 * When extending the range of FREQ constants, please * 708 * update the table of maximum values, XREQMAXTAB. * 709 * * 710 ********************************************************************************** 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 148 (VIRTDEFS) F 9 Executive Request (XREQ) codes 712 713 ********************************************************************************** 714 * * 715 * UREQs * 716 * The user requests (UREQs) perform operations related * 717 * to the users session ( or to sessions that it controls ). * 718 * The operand of the UREQ is usually not used, but it may * 719 * contain either a session number or a process serial number. * 720 * A process serial number or session number of 0 refers to * 721 * the process/session itself. Negative process serial * 722 * numbers refer to under processes in the process tree * 723 * relative to the position of the current process. Positive * 724 * process serial numbers refer directly to another * 725 * underprocess. A positive session number refers directly to * 726 * a session on the system. The user must, of course, have * 727 * the proper privileges to access other sessions. Negative * 728 * session numbers are undefined. * 729 * * 730 ********************************************************************************** 731 732 * (R0:=request|R1:=value|R2,R3:=variable-name|UREQ 0| 733 * R0=error-code) 00000010 ABS 734 URVARSET EQU 0010 set variable 735 * for string: (R0:=request|R1:=char addr of string| 736 * R2,R3:=variable-name|UREQ buffer length| 737 * R0:=error-code) 00000011 ABS 738 URVARSETS EQU 0011 set string variable 739 740 * (R0:=request|R2,R3:=variable-name|UREQ 0|R0=error-code| 741 * R1=value) 00000020 ABS 742 URVARGET EQU 0020 get variable 743 * for string: (R0:=request|R1:=buffer address| 744 * R2,R3:=variable-name|UREQ buffer length| 745 * R0=error-code [or 0=number, 1=string]| 746 * R1=value or bufferlen-stringlen) 00000021 ABS 747 URVARGETS EQU 0021 get string variable 748 749 * (R0:=request|R1:=buffer addr|R2:=error number|UREQ bufferlen| 750 * R0=error code|R1=buffer remaining) 00000028 ABS 751 URERRORGET EQU 0028 get string for error number 752 753 * (R0:=request|UREQ|R0=error-code|R1=number-of-terms-on| 754 * R2=number-of-sessions) 00000050 ABS 755 URTRAFFIC EQU 0050 get system traffic 00000051 ABS 756 URLOADFACT EQU 0051 get system load factor in R1 757 * (R0:=request|R1:=buffer size|R2:=buffer address| 758 * UREQ -1, 0, or session number|R0=error code|R1=buffer remaining) 00000052 ABS 759 URSESSINFO EQU 0052 get session information 00000052 ABS 760 URPROCINFO EQU 0052 (old name for URSESSINFO) 761 * (R0:=request|UREQ 0|R1=system serial number|R2=system name in PAK6) 00000053 ABS 762 URGETSSN EQU 0053 return system serial number and name 763 * (R0:=request|UREQ 0|R2,R3=system version in ASCII) 00000054 ABS 764 URGETVERS EQU 0054 return system version in ASCII 765 * (R0:=request|R1:=program number|UREQ 0|R0=0 if ok to run, non-zero otherwise) 00000055 ABS 766 URMAYIRUN EQU 0055 see if proprietary program may run 767 * (R0:=request|R1:=buffer size|R2:=buffer address|UREQ 0| 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 149 (VIRTDEFS) F 9 Executive Request (XREQ) codes 768 * R0=error code|R1=buffer remaining) 00000056 ABS 769 URUDRPINFO EQU 0056 get under process information 770 * (R0:=request|R1:=buffer size|R2:=buffer address|UREQ | 771 * R0=error code|R1=buffer remaining) 00000057 ABS 772 URLUNITS EQU 0057 get local unit information 773 * (R0:=request|UREQ 0|R0=error code|R1=process level(CM=0)) 00000058 ABS 774 URPROCLVL EQU 058 get level in process tree 775 776 * (R0:=request|UREQ|R0=error-code|R1=timezone|R2,R3=system-date) 777 * The timezone word contains the three letter abb. for 778 * the local time zone in chars 0-2 and char 3 holds 779 * a signed 8 bit integer that is the offset (in hours) 780 * from UT for the specified time zone. 00000060 ABS 781 URRAWDATE EQU 0060 get date and time 00000061 ABS 782 URFSERNO EQU 0061 same except has uniqueness property 783 * (R0:=request|UREQ|R0=error-code if negative| 784 * R0/BITS 11:22=year|R0/BITS 23:26=month| 785 * R0/BITS 27:31=date|R1=timezone|R2=time of day| 786 * R3=day of week) 00000062 ABS 787 URUNRDATE EQU 0062 unpack rawdate 00000063 ABS 788 URUNLDATE EQU 0063 make rawdate local, unpack 789 * (R0:=request|R2,R3:=time to unpack|UREQ|R0=error-code 790 * if negative|R0/BITS 11:22=year|R0/BITS 23:26=month| 791 * R0/BITS 27:31=date|R1=timezone|R2=time of day| 792 * R3=day of week) 00000064 ABS 793 URUGDATE EQU 0064 unpack time given 00000065 ABS 794 URULDATE EQU 0065 make time given local, unpack 795 796 * (R0:=request|R1:=timezone (not needed for local conversion)| 797 * R2:=time of day|R3/bits 0:22:=year|R3/bits 23:26:=month| 798 * R3/bits 27:31:=date|UREQ|R0,R1=system time) 0000006C ABS 799 URPAKTIME EQU 006C pack time, given time zone 0000006D ABS 800 URPAKTIML EQU 006D pack time, given local time 801 802 * (R0:=request|UREQ) 00000070 ABS 803 URSTOP EQU 0070 program termination 00000071 ABS 804 URSTOPZ EQU 0071 stop and zero virtual memory 00000072 ABS 805 URSTOPR EQU 0072 stop and reset units 00000073 ABS 806 URSTOPZR EQU 0073 stop. zero and reset 00000074 ABS 807 URSTOPI EQU 0074 stop and increment PC 00000078 ABS 808 URSTOPA EQU 0078 stop and set abort status 00000079 ABS 809 URSTOPAZ EQU 0079 stop. abort and zero 0000007A ABS 810 URSTOPAR EQU 007A stop. abort and reset 0000007B ABS 811 URSTOPAZR EQU 007B stop. abort,zero,reset 0000007C ABS 812 URSTOPIA EQU 007C stop, increment PC, and set abort 813 814 * (R0:=request|R1:=bit mask|UREQ psn|R1=new contents) 00000080 ABS 815 URSSINTARM EQU 0080 selectively set interrupt arming mask 00000081 ABS 816 URSCINTARM EQU 0081 selectively clear interrupt arming mask 817 * (R0:=request|UREQ ADR regarea|R0=error-code) 00000082 ABS 818 URINTRTN EQU 0082 return from interrupt 819 820 * (R0:=request|UREQ 0|R0:=error code) 00000085 ABS 821 URSETDEBUG EQU 0085 set flag saying process is a debugger 00000086 ABS 822 URCLRDEBUG EQU 0086 clear flag saying whether debugger 823 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 150 (VIRTDEFS) F 9 Executive Request (XREQ) codes 824 * (R0:=request|R1=error code|R2=param|UREQ 825 * |R0:=error code or termination code|R1=sub-code|R3:=psn ) 00000087 ABS 826 URSENDERR EQU 0087 send error to specified underprocess 827 828 * (R0:=request|UREQ |R0:=zero|error code) 00000088 ABS 829 URSERPROC EQU 0088 receive errors from specified underprocess 00000089 ABS 830 URCERPROC EQU 0089 clear receiving errors from underprocess 831 832 * (R0:=request|R1:= psn|UREQ ADR regarea|R0=error-code) 0000008A ABS 833 URINTRGO EQU 008A return from interrupt to underprocess 834 835 * (R0:=request|UREQ|R0=error-code) 00000090 ABS 836 URBYE EQU 0090 logoff request 837 838 * (R0:=request|R1:=new-limit|UREQ psn|R0=error-code| 839 * R1=CPU-limit|R2=CPU-time-used) 000000A0 ABS 840 URCPTIMES EQU 00A0 CPU time limit set 841 * (R0:=request|UREQ psn|R0=error-code| 842 * R1=CPU-limit|R2=CPU-time-used) 000000A1 ABS 843 URCPTIMEG EQU 00A1 CPU time use/limit get 844 * (R0:=request|UREQ psn|R0=error-code|R0,1=sessiom-WC-limit| 845 * R2=session-WC-used) 000000A7 ABS 846 URSESWCLK EQU 00A7 session wallclock used and limit get 847 * (R0:=request|UREQ psn|R0=error-code|R0,1=session-WC-limit| 848 * R2=session-WC-used) 000000A8 ABS 849 URACCTCPUL EQU 00A8 limiting acct CPU time use/limit get 850 * (R0:=request|UREQ psn|R0=error-code|R1=account-WC-limit| 851 * R2=account-WC-used) 000000A9 ABS 852 URACCTWCL EQU 00A9 limiting acct WC time used/limit get 853 854 * (R0:=request|R1=new-limit|UREQ psn|R0=error-code| 855 * R1=session-limit|R2=session-in-use) 000000B0 ABS 856 URSESBLKS EQU 00B0 session limit set 857 858 * (R0:=request|UREQ psn|R0=error-code| 859 * R1=session-limit|R2=session-used) 000000B1 ABS 860 URSESBLKG EQU 00B1 session limit get 861 862 * (R0:=request|UREQ 0|R1=hard-limit|R2=soft-limit|R3=saved-limit) 000000B2 ABS 863 URBLKLIM EQU 00B2 get account's block limits 864 865 * (R0:=request|UREQ 0|R1=blocks-used|R2=soft-limit|R3=saved-limit) 000000B3 ABS 866 URBLKUSED EQU 00B3 get account's block usage 867 868 * (R0:=request|UREQ pagenum|R0=error-code) 000000C0 ABS 869 URFREEPAGE EQU 00C0 release memory page 870 * (R0:=request|R1=pagenum|UREQ psn|R0=pagetype or errorcode| 871 * R1=other info) 000000C1 ABS 872 URPAGETYPE EQU 00C1 get association of page in memory 873 * (R0:=request|UREQ pagenum|R0=error code) 000000C2 ABS 874 UREXCLPAGE EQU 00C2 make page unreferencable 000000C4 ABS 875 URFORCEP EQU 00C4 force write this page, wait for xfer 000000C5 ABS 876 URWRITEP EQU 00C5 force write this page, don't wait for xfer 877 878 * (R0:=request|UREQ process-serial-number| 879 * R0=termination-code|R1=subcode|R2=process-serial-number) 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 151 (VIRTDEFS) F 9 Executive Request (XREQ) codes 880 * (if R0=UINTPTERM, then R1=right 4 bits of URSTOPxx) 000000D0 ABS 881 URPGO EQU 00D0 set a program running 000000D4 ABS 882 URPSTEP EQU 00D4 single step a program 883 * (R0:=request|UREQ -1,0, or session number|R0=error-code) 000000D2 ABS 884 URPDSTRY EQU 00D2 destroy a session or the 885 immediate under process 886 * (R0:=request|UREQ -1 |R0=error-code) 000000D3 ABS 887 URPDSTRYA EQU 00D3 destroy all under processes 888 * (R0:=request|UREQ psn |R0=error-code) 000000D5 ABS 889 URPDSTRYP EQU 00D5 destroy an under process 000000D6 ABS 890 URPDSTRYAP EQU 00D6 destroy all under processes 891 of a given under process 892 893 * (R0:=request+register|R1:=new-contents|UREQ process-serial-number| 894 * R0=error-code|R1=previous-register-contents) 895 * registers: 896 * 0 => R0 ... 7 => R7, 8 = PC 897 * 9 => PSR, 10 => int mask 898 * 11 => interrupt address. 12:15 => errors 000000E0 ABS 899 URPSETREG EQU 00E0 set a process register 900 901 * (R0:=request+register|UREQ psn|R0=error-code| 902 * R1=register-contents) 000000F0 ABS 903 URPGETREG EQU 00F0 get a process register 904 905 * (R0:=request|R1:=char-pointer|UREQ 0|R0=item-type or error-code| 906 * R1=pntr-to-terminator|(R2,R3)=packed-item) 00000100 ABS 907 URPACKI EQU 0100 pack an item 908 * (R0:=request|R1:=char-pointer|R2:=pointer-to-block|UREQ 0| 909 * R0=error-code|R1=pntr-to-terminator) 00000101 ABS 910 URPACKFI EQU 0101 pack a file specifier item 00000102 ABS 911 URPACKFS EQU 0102 pack a complete file specifier 912 913 * (R0:=request|R1:=requester page|R2:=others page| 914 * UREQ psn|R0=error code) 00000110 ABS 915 URMAPINAS EQU 0110 mapin other address space 916 917 * (R0:=request|UREQ psn|R0=error-code or run unit if no error) 00000120 ABS 918 URGRUNLUN EQU 0120 get the run unit number 919 * (R0:=request|UREQ unit|R0=error code|R1=next unit) 00000121 ABS 920 URNEXTLUN EQU 0121 find next higher in use unit 921 * (R0:=request|UREQ unit|R0=error code|R1=next free unit) 00000122 ABS 922 URFREELUN EQU 0122 find next lower free unit 923 * (R0:=request|R1:=current #|R2:=target unit #|UREQ psn|R0=error code) 00000123 ABS 924 URGIVELUN EQU 0123 pass unit to an underprocess 925 926 * (R0:=request|R1:=mode to load|UREQ psn| 927 * R0=error code|R1=-1 or effective address) 00000130 ABS 928 URLEA EQU 0130 do LEA in other address space 00000131 ABS 929 URLEA2 EQU 0131 do LEA2 in other address space 930 931 * (R0:=request|R1:=seconds|R2:=event mask|UREQ 0|R0=error code| 932 * R1=seconds remaining|R2=event|R3=event parameter) 00000140 ABS 933 URDELAY EQU 0140 delay for the given seconds 00000143 ABS 934 URDELAYR EQU 0143 restore console terminal 935 * (R0:=request|R1:=seconds|UREQ 0|R0=error code|R1=seconds remaining 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 152 (VIRTDEFS) F 9 Executive Request (XREQ) codes 936 * on previous request) 00000141 ABS 937 URSETTIMIN EQU 0141 set timer interrupt 938 * (R0:=request|UREQ 0|R0=error code|R1=seconds remaining) 00000142 ABS 939 URCLRTIMIN EQU 0142 clear timer interrupt 940 941 * (R0:=request|R1:=message size|R2:=address|UREQ 0| 942 * R0=error code) 00000150 ABS 943 URGENOPMSG EQU 0150 generate message to operator 944 * (R0:=request|UREQ 0|R0=error code) 00000151 ABS 945 URCANOPMSG EQU 0151 cancel message to operator 946 947 * (R0:=request|R1:=message-size|R2:=address|UREQ 0|R0=error code) 00000160 ABS 948 URSENDMSG EQU 0160 send message to other session 949 * (R0:=request|R1:=buffer-size|R2:=address|UREQ message-class-mask| 950 * R0=error-code|R1=buffer-remaining) 00000161 ABS 951 URGETMSG EQU 0161 receive message from other session 952 * (R0:=request|UREQ 0|R0=error-code|R1=message-class-mask) 00000162 ABS 953 URGETMSGA EQU 0162 get mask of acceptable messages 954 * (R0:=request|R1=bits-to-set/clear|UREQ 0|R0=error-code|R1=bits-changed) 00000163 ABS 955 URSSMSGA EQU 0163 sets bits in mask of acceptable messages 00000164 ABS 956 URSCMSGA EQU 0164 clear bits in mask of acceptable messages 957 958 * (R0:=request|R1:=length-of-name|R2:=address-of-name|UREQ 0| 959 * R0=error-code|R1=session-number) 00000170 ABS 960 URGETPNUM EQU 0170 lookup server name 961 962 * (R0=request|R2,3:=new-program-name|UREQ 0| 963 * R0:=error-code|R2,3:=old-program-name) 00000180 ABS 964 URCNAME EQU 0180 change program name 965 * (R0:=request|UREQ |R0=error-code) 00000181 ABS 966 URSETLGFSES EQU 0181 set session to give message at logoff 967 * (R0:=request|R1:=privs-to-release|UREQ 0|R0=error-code) 00000182 ABS 968 URDROPPRIV EQU 0182 relinquish program privileges 969 970 * (R0=request|R1=unit number|R2=privilege|UREQ ) 00000190 ABS 971 URGIVEUNIT EQU 0190 give a unit to another session 972 * (R0=request|UREQ | 973 * R0=error-code|R1=|R2=) 00000191 ABS 974 URRCVUNIT EQU 0191 receive a unit from another session 975 976 ********************************************************************************** 977 * * 978 * When extending the range of UREQ constants, please * 979 * update the table of maximum values, XREQMAXTAB. * 980 * * 981 ********************************************************************************** 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 153 (VIRTDEFS) F 9 Executive Request (XREQ) codes 983 984 ********************************************************************************** 985 * * 986 * OPREQs * 987 * Operator requests (OPREQs) are provided for operator, * 988 * manager, and control mode functions. Processes must have * 989 * the proper privileges to do OPREQs. * 990 * * 991 ********************************************************************************** 992 993 * (R0:=request|R1:=pntr-to-PAK12 name,PAK6 proj,PAK12 pwd|OPREQ 0| 994 * R0=error-code) 00000010 ABS 995 ORHELLO EQU 0010 logon request 996 * (R0:=request|OPREQ|R0=error-code|R1=wall clock time used) 00000011 ABS 997 ORGOODBYE EQU 0011 disassign user and do accounting 998 * (R0:=request|R1=>equip name buffer|OPREQ 0|R0=error code) 00000012 ABS 999 ORLOGONP EQU 0012 fetch logon program name 1000 * (R0:=request|R1:=options|OPREQ |R0=error-code) 00000013 ABS 1001 ORATTACH EQU 0013 attach to a session 1002 * (R0:=request|OPREQ |R0=error-code) 00000014 ABS 1003 ORRESETVM EQU 0014 reset virtual memory 1004 1005 * (R0:=request|OPREQ) 00000020 ABS 1006 ORVANISH EQU 0020 vanish request 1007 1008 * (R0:=request|OPREQ) 00000030 ABS 1009 ORSLEEP EQU 0030 sleep request 1010 1011 * (R0:=request|R2,R3:=password|OPREQ =pak6 drive name| 1012 * R0=error code|R0=number of accounts|R1=number of shadows| 1013 * R2,R3=volume name) 00000040 ABS 1014 ORMOUNT EQU 0040 mount a volume given drive name 1015 * (R0:=request|R2,R3:=volume name|OPREQ|R0=error code) 00000041 ABS 1016 ORDISMOUNT EQU 0041 dismount a volume given volume name 1017 * (R0:=request|R1:=non-zero to inhibit|R2,R3:=volume name| 1018 * OPREQ|R0=error code) 00000042 ABS 1019 ORINHIBVOL EQU 0042 inhibit/allow volume access 1020 * (R0:=request|R1:=buffer size|R2:=buffer adr|OPREQ 0| 1021 * R0=error code|R1=buffer remaining) 00000043 ABS 1022 ORVINFO EQU 0043 get volume information 1023 * (R0:=request|R1:=buffer size|R2:=buffer adr|OPREQ unit (.vol)| 1024 * R0=error code|R1=buffer remaining) 00000044 ABS 1025 ORVOLINFO EQU 0044 get volume information 1026 * (R0:=request|OPREQ drivename|R0=error code) 00000045 ABS 1027 ORDISMTDRV EQU 0045 dismount volume given drive name 1028 * (R0:=request|R2,R3:=volume name|OPREQ| 1029 * R0=error code|R0=number of accounts|R1=number of shadows| 1030 * R2,R3=volume name) 00000046 ABS 1031 ORMOUNTVOL EQU 0046 mount volume given volume name 1032 * (R0:=request|R1:=buffer size|R2:=buffer adr|OPREQ unit (.vol)| 1033 * R0=dynstat or errorcode|R1=buffer remaining) 00000047 ABS 1034 ORBUSYVOL EQU 0047 get accounts busy on a volume 1035 1036 * (R0:=request|R1:=pntr-to-param-block|OPREQ 0| 1037 * R0=error-code) 00000050 ABS 1038 ORCREACCT EQU 0050 manager create account 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 154 (VIRTDEFS) F 9 Executive Request (XREQ) codes 00000051 ABS 1039 ORBKCACCT EQU 0051 backup create account 1040 1041 * (R0:=request|OPREQ unit (.dir)|R0=error-code) 00000060 ABS 1042 ORDESACCT EQU 0060 destroy an account 1043 1044 * (R0:=request|OPREQ portnum|R0=error code) 00000070 ABS 1045 ORPINHIB EQU 0070 inhibit port access 00000071 ABS 1046 ORPALLOW EQU 0071 allow port access 1047 * (R0:=request|R1:=buffer size|R2=buffer adr| 1048 * OPREQ -1, 0, or portnum|R0=error code|R1=buffer remaining) 00000072 ABS 1049 ORPINFO EQU 0072 port information fetch 1050 * (R0:=request|OPREQ portnum|R0=error code) 00000073 ABS 1051 ORPWARN EQU 0073 warn port is inhibited 1052 * (R0:=request|OPREQ portnum|R0=error code) 00000074 ABS 1053 ORPRESET EQU 0074 reset a ports configuration 1054 1055 * (R0:=request|R1:=zone name|OPREQ GMT difference|R0=error code) 00000080 ABS 1056 ORTZONE EQU 0080 set system local time zone 1057 * (R0:=request|R1:=time correction|OPREQ 0|R0:=error code) 00000081 ABS 1058 ORTADJUST EQU 0081 correct system time by gradual adjustment 1059 1060 * (R0:=request|OPREQ 0|R0,R1:=time of last correction| 1061 * R2=current clock error (ms), + sez slow|R3=drift 1062 * (ppb), + sez clock loses time) 00000082 ABS 1063 ORTIMPAR EQU 0082 get clock adjustment variables 1064 1065 * (R0:=request|OPREQ |R0=error code) 00000090 ABS 1066 ORPTERMIN EQU 0090 "terminate" a session 00000091 ABS 1067 ORPEVICT EQU 0091 "evict" a session 00000092 ABS 1068 ORSESSINFO EQU 0092 fetch session information (see URSESSINFO) 00000092 ABS 1069 ORPROCINFO EQU 0092 (old name for ORSESSINFO) 00000093 ABS 1070 ORPABORT EQU 0093 "abort" a session 1071 1072 * (R0:=request|R1:=buffer size|R2:=buffer address|OPREQ 0| 1073 * R0=dynstat or errorcode|R1=buffer remaining) 000000A0 ABS 1074 ORREADAFT EQU 00A0 read account finder table 1075 * (R0:=request|R1:=buffer size|R2:=buffer address| 1076 * OPREQ unit (.vol)|R0=error code|R1=buffer remaining) 000000A1 ABS 1077 ORREADIDX EQU 00A1 read IDX from a volume 1078 * (R0:=request|OPREQ unit (.dir)|R0=dynstat or errorcode) 000000A2 ABS 1079 ORADDAFT EQU 00A2 add entry to the AFT 000000A3 ABS 1080 ORDELAFT EQU 00A3 delete entry from the AFT 1081 1082 * (R0:=request|R1:=pak6 device name|OPREQ unit(unused)| 1083 * R0=error code|R2,3=volume name) 000000B0 ABS 1084 ORMOUNTMAI EQU 00B0 maint mount pack(no IDX AFT) 000000B1 ABS 1085 ORVOLHANDLE EQU 00B1 fully maint mount a pack 1086 1087 * (R0:=request|R1:=buffer size|R2:=buffer addr|OPREQ unit (.vol)| 1088 * R0=dynstat or errorcode|R1=buffer remaining) 000000C0 ABS 1089 ORBKUPVOL EQU 00C0 get volume backup information 000000C1 ABS 1090 ORBKUPACT EQU 00C1 get account backup information 000000C2 ABS 1091 ORBKUPFIL EQU 00C2 get file backup information 000000C3 ABS 1092 ORGETFP EQU 00C3 get file data to backup 1093 1094 * (R0:=request | R1:=time stamp | OPREQ unit (.vol) | 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 155 (VIRTDEFS) F 9 Executive Request (XREQ) codes 1095 * R0:=error code) 000000C4 ABS 1096 ORBKUPDONE EQU 00C4 place time stamp on disk 1097 1098 * (R0:=request|R1:=buffer size|R2:=buffer addr|R3:=page #| 1099 * OPREQ unit (.vol)|R0=dynstat or errorcode|R1=buffer remaining) 000000C5 ABS 1100 ORMAPFP EQU 00C5 mapin file data to backup 1101 1102 * (R0:=request|R1:=buffer size|R2:=buffer addr|OPREQ unit (.vol)| 1103 * R0=dynstat or errorcode) 000000D0 ABS 1104 ORINITVOL EQU 00D0 initialize volume for recovery 000000D1 ABS 1105 ORRCVRACT EQU 00D1 initialize account for recovery 000000D2 ABS 1106 ORRCVRFIL EQU 00D2 initialize file for recovery 000000D3 ABS 1107 ORPUTFP EQU 00D3 output file recovery data (old style) 000000D6 ABS 1108 ORRCVRACTL EQU 00D6 account recovery/limits adjustments 1109 1110 * (R0:=request|OPREQ unit (.vol)|R0=errorcode or dynstat) 000000D4 ABS 1111 ORINITEND EQU 00D4 say recovery done 1112 1113 * (R0:=request|R1:=buffer size|R2:=buffer addr|R3:=page #| 1114 * OPREQ unit (.vol)|R0=dynstat or errorcode) 000000D5 ABS 1115 ORPUTPFP EQU 00D5 recover paged recovery data 1116 1117 * (R0:=request|R1:=CPU time allocatable|OPREQ unit (.dir)|R0=errorcode) 000000E0 ABS 1118 ORCREAUTHL EQU 00E0 create auth list 1119 * (R0:=request|R1:=CPU time allocatable|OPREQ unit (.dir)|R0=errorcode| 1120 * R1=prev CPU time allocatable|R2=CPU time allocated) 000000E1 ABS 1121 ORCHGAUTHL EQU 00E1 change auth list 1122 * (R0:=request|OPREQ unit (.dir)|R0=errorcode|R1=prev CPU time allocatable| 1123 * R2=CPU time allocated) 000000E8 ABS 1124 ORDESAUTHL EQU 00E8 destroy auth list 000000E9 ABS 1125 ORGETAUTHL EQU 00E9 get auth list values 1126 1127 * (R0:=request|R2,R3:=volume name|OPREQ unit (.dir)|R0=errorcode) 000000F0 ABS 1128 ORCREAUTHE EQU 00F0 create auth list entry 000000F8 ABS 1129 ORDESAUTHE EQU 00F8 destroy auth list entry 1130 1131 * (R0:=request|R1:=new value|R2,R3:=volume name|OPREQ unit (.dir)|R0=errorcode| 1132 * R1=old allocatable value|R2=value allocated) 000000F2 ABS 1133 ORCAUTHDL EQU 00F2 change auth entry disk space allocatable 000000F3 ABS 1134 ORCAUTHSL EQU 00F3 change auth entry saved allocatable 1135 * (R0:=request|R2,R3:=volume name|OPREQ unit (.dir)|R0=errorcode| 1136 * R1=amount allocatable|R2=amount allocated) 000000FA ABS 1137 ORGAUTHDL EQU 00FA get disk space allocatable 000000FB ABS 1138 ORGAUTHSL EQU 00FB get saved allocatable 1139 * (R0:=request|R1:=buffer size|R2:=buffer addr|OPREQ unit (.dir)| 1140 * R0=error code|R1=buffer remaining) 000000FF ABS 1141 ORGAUTENS EQU 00FF get auth list entries (the whole thing) 1142 1143 * (R0:=request|R1:=ADR buffer|OPREQ 0|R0=error-code|R2,3=44-bit UT date) 00000101 ABS 1144 ORREADCNT EQU 0101 fetch block read counts 00000102 ABS 1145 ORWRITECNT EQU 0102 fetch block write counts 00000103 ABS 1146 ORRWCOUNTS EQU 0103 fetch both read and write counts 1147 1148 * (R0:=request|R1:=buffersize|R2:=bufferaddr|OPREQ 0| 1149 * R0=errorcode|R1=buffer remaining) 00000110 ABS 1150 ORDEVINFO EQU 0110 fetch system device information 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 156 (VIRTDEFS) F 9 Executive Request (XREQ) codes 1151 1152 * (R0:=request|R1=trace classes|OPREQ 0|R0=errorcode) 00000120 ABS 1153 ORSTRTTRC EQU 0120 start system trace 1154 * (R0:=request|OPREQ 0|R0=errorcode) 00000121 ABS 1155 ORSTRTMON EQU 0121 start system instruction monitor 00000122 ABS 1156 ORSTRTDYNW EQU 0122 start system dynamic wait monitor 00000123 ABS 1157 ORSTRTXMON EQU 0123 start system XREQ call monitor 1158 1159 * (R0:=request|R1:=buffersize|R2:=bufferaddr|OPREQ 0| 1160 * R0=errorcode|R1=buffer remaining) 00000130 ABS 1161 ORSTOPTRC EQU 0130 stop system trace and return results 00000131 ABS 1162 ORSTOPMON EQU 0131 stop system instruction monitor and give results 00000132 ABS 1163 ORSTOPDYNW EQU 0132 stop dynamic wait monitor and give results 00000133 ABS 1164 ORSTOPXMON EQU 0133 stop XREQ call monitor and give results 00000138 ABS 1165 ORGETTRC EQU 0138 return trace info (but don't stop trace) 1166 1167 * definition of control field in R0 for ORMAINTR and ORMAINTW 00002630 BYTE 1168 XRMAIFLD EQU BITS 19:21 field holding maintenance information 00001000 ABS 1169 XRNOSUB EQU 4*XRMAIFLD indicates no substitutions 00000800 ABS 1170 XRNOERRS EQU 2*XRMAIFLD indicates no error recovery/retries 00000400 ABS 1171 XRWWCHK EQU 1*XRMAIFLD indicates to perform write-check 1172 1173 * (R0:=request + control|R1:=ADR block buffer|R2:=ADR FBI buffer| 1174 * R3:=MS address|OPREQ unit (.vol)|R0=error code) 00000140 ABS 1175 ORMAINTR EQU 0140 maintenance read 00000142 ABS 1176 ORMAINTRSUB EQU 0142 maintenance read and substitute 1177 * (R0:=request|R1:=address|OPREQ 0|R0=error code|R2=data) 00000141 ABS 1178 ORREADNVM EQU 0141 get data from NVM 1179 * (R0:=request + control|R1:=ADR block buffer|R2:=ADR FBI buffer| 1180 * R3:=MS address|OPREQ unit (.vol)|R0=error code) 00000150 ABS 1181 ORMAINTW EQU 0150 maintenance write 1182 * (R0:=request|R1:=address|R2:=data|OPREQ 0|R0=error code) 00000151 ABS 1183 ORWRITENVM EQU 0151 write data into NVM 1184 * (R0:=request|R1:=MS address|OPREQ unit (.vol)|R0=dynstat| 1185 * R1=PPU status|R2=BFD Controller status) 00000152 ABS 1186 ORFORMAT EQU 0152 format a track 1187 * (R0:=request|R1:=sec/trk|R2:=trk/cyl|OPREQ |R0=error-code) 00000153 ABS 1188 ORSECTRK EQU 0153 set sec/trk and trk/cyl 1189 * (R0:=request|R1:=new state|OPREQ |R0=error-code|R1=old state) 00000154 ABS 1190 ORHEADCHK EQU 0154 start/inhibit head checker 1191 * (R0:=request|OPREQ |R0=error-code 00000155 ABS 1192 ORINITFMT EQU 0155 prepare volume for formatting 00000156 ABS 1193 ORRESETDRV EQU 0156 reinitialize drive information 1194 * (R0:=request|R1:=message size|R2:=message address|OPREQ 0| 1195 * R0=message serial number or error code) 00000160 ABS 1196 ORGENOPMSG EQU 0160 generate message to operator 1197 * (R0:=request|R1:=buffer size|R2:=buffer address|OPREQ anything| 1198 * R0=error code|R1=buffer remaining) 00000161 ABS 1199 ORGETOPMSG EQU 0161 get messages to operator 1200 * (R0:=request|R1:=message serial number|OPREQ 0|R0=error code) 00000162 ABS 1201 ORCANOPMSG EQU 0162 cancel message to operator 1202 1203 * (R0:=request|R1:=name-length|R2:=name-address|OPREQ 0|R0=error-code) 00000170 ABS 1204 ORSETPNUM EQU 0170 set entry in server name table 00000171 ABS 1205 ORCLRPNUM EQU 0171 clear entry in server name table 1206 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 157 (VIRTDEFS) F 9 Executive Request (XREQ) codes 1207 * (R0:=request|R1:=length-of-output-file-name|R2:=addr-of-output-file-name| 1208 * R3:=addr-of-logon-info|OPREQ input-unit-number|R0=error-code-or- 1209 * session-number) 00000180 ABS 1210 ORSTRTBAT EQU 0180 start spooled batch job 1211 * (R0:=request|R1:=length-of-logon-string|R2:=addr-of-logon-string 1212 * R3:=terminal-output-unit|OPREQ terminal-input-unit| 1213 * R0=error-code-or-session-number) 00000181 ABS 1214 ORSTRTTERM EQU 0181 remote port startup 1215 * (R0:=request|OPREQ unit|R0=error-code-or-session-number) 00000182 ABS 1216 ORSTRTJOB EQU 0182 start spooler-less batch job 1217 * (R0:=request|OPREQ 0|R0=error-code-or-session-number) 00000183 ABS 1218 ORSTRTSPLR EQU 0183 start spooler session 1219 1220 * (R0:=request|R2,3:=new volume name|OPREQ unit (a .vol)| 1221 * R0=error code) 00000190 ABS 1222 ORCVOLNAME EQU 0190 change volume name 1223 * (R0:=request|R2,3:=new volume password|OPREQ unit (a .vol)| 1224 * R0=error code) 00000191 ABS 1225 ORCVOLPWD EQU 0191 change volume password 1226 * (R0:=request|R1:=new customer number|R2:=new system serial number| 1227 * OPREQ unit (a .vol)|R0=error code) 00000192 ABS 1228 ORCVOLSSN EQU 0192 change volume SSN 1229 * (R0:=request|R1:=new value|OPREQ unit (a .vol)| 1230 * R0=error code) 00000193 ABS 1231 ORCVOLNEWO EQU 0193 change volume new owner flag 1232 * (R0:=request|R1:=buffer len|R2:=ptr to string|OPREQ unit (a .vol)| 1233 * R0=error code) 00000194 ABS 1234 ORCVOLTITLE EQU 0194 change volume title 1235 * (R0:=request|OPREQ unit (a .vol)|R0=error code| 1236 * R2,3=volume name) 00000198 ABS 1237 ORGVOLNAME EQU 0198 get volume name 1238 * (R0:=request|OPREQ unit (a .vol)|R0=error code| 1239 * R1=customer number|R2=system number) 0000019A ABS 1240 ORGVOLSSN EQU 019A get system serial number 1241 * (R0:=request|OPREQ unit (a .vol)|R0=error code| 1242 * R1=new owner flag) 0000019B ABS 1243 ORGVOLNEWO EQU 019B get volume new owner flag 1244 * (R0:=request|R1:=buffer size|R2:=buffer ptr|OPREQ unit (a .vol)| 1245 * R0:=error code|R1:=buffer remaining) 0000019C ABS 1246 ORGVOLTITLE EQU 019C get volume title 1247 1248 * (R0:=request|R1:=info value index|OPREQ 0|R0=error-code|R2=value requested) 000001A0 ABS 1249 ORGSYSINFO EQU 01A0 fetch system information 1250 1251 * (R0:=request|R1:=CPU number|OPREQ process number (0 means me)|R0=error-code| 1252 * R1:=original CPU number (0 if none)) 000001B0 ABS 1253 ORSETCPU EQU 01B0 assign a process to a particular CPU 1254 * (R0:=request|R1:=CPU number|OPREQ 0|R0=error-code| 1255 * R1:=CPU number 000001B1 ABS 1256 ORCPUSTOP EQU 01B1 stop a CPU from active service 000001B2 ABS 1257 ORCPUSTRT EQU 01B2 restart a stopped CPU 1258 * (R0:=request|R1:=number of pages|OPREQ 0|R0=error-code) 000001C0 ABS 1259 ORTAKEPAGS EQU 01C0 remove physical memory from use 1260 * (R0:=request|OPREQ |R0=error code) 000001D0 ABS 1261 ORPSTOP EQU 01D0 "stop" a session 000001D1 ABS 1262 ORPGO EQU 01D1 restart a session 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 158 (VIRTDEFS) F 9 Executive Request (XREQ) codes 1263 1264 ********************************************************************************** 1265 * * 1266 * When extending the range of OPREQ constants, please * 1267 * update the table of maximum values, XREQMAXTAB. * 1268 * * 1269 ********************************************************************************** 16 INPUT XREQINFOMACS format for info returned by XREQs 2 * System variable definition macros version 4.7 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 159 (XREQINFOMACS) F 10 Macro Definitions 4 5 * 4.7 890120 Added VT. RC. 6 * 4.6 870815 Added FSSTATABS. DH. 7 * 4.5 860523 Added PILGFSESS field (PROCINFORD). JB. 8 * 4.4 851017 Addition of PISYSPROC field (PROCINFORD). JB. 9 * 4.3 C8504 Addition of DIRFLOG field. MH 10 * 4.2 C8411 Addition of macro LUINFORD. JB. 11 * 4.1 C8410 DIRSERNO(1) now DIRUNITNM for hardware devices. JB. 12 * 4.0 C8409 Addition of macro UNDRPINFORD. JB. 13 * 3.7 C8407 Removed LOCK RC 14 * 3.6 Addition of DTYPECT and DTYPEVOL. DH 15 * 3.5 Addition of BCD overflow detect enable and floating 16 * point reduced precision enable in PSRDEFS. DH 17 * 3.4 Addition of DIRTRANS field. JB. 18 * 3.4 Addition of length field to share list read data RC 19 * 3.3 Addition of DIRGHOST field RC 20 * 2.1 Change of FSSTATPRW and addition of FSPRIVBKUP,XO,NOT 21 * 1.3 New field in DIRINFORD. JL. 22 * A8110 New field in PROCINFORD. JL. 23 * A8109 New field in FILESTAT, new macro MSGDEFS. JL. 24 * A8104 New field in DIRINFORD, PROCINFORD. JL. 25 * A8102 Minor changes to PROCINFORD. JL. 26 * A8007 Minor changes to DIRINFORD and PROCINFORD. JL. 27 * A7909 Initial release. RA. 28 29 ********************************************************************************** 30 * * 31 * This is the definition of macros that define symbols * 32 * that are required in communication with the system. This * 33 * file is INPUT in assembly language programs and it defines * 34 * macros that, when invoked, define the requested group of * 35 * symbols. The macro invocation is of the form: * 36 * * 37 * macname [list] * 38 * * 39 * where "macname" is the name of the requested macro and "list" is * 40 * optionally included (the square brackets denote optionality) if the * 41 * body of the macro (i.e., the definition of the symbols) is to * 42 * be listed. * 43 * * 44 * Macros that are defined herein are: * 45 * * 46 * DIRINFORD Format of data returned by directory information reads. * 47 * FILESTAT Fields and values in the static and dynamic file status * 48 * words. * 49 * FLDDEFS Definitions of instruction and address field names. * 50 * MSGDEFS Definitions of messages passed via URSENDMSG. * 51 * PSRDEFS Fields and values in the Process Status Register. * 52 * PROCINFORD Format of data returned by session information request. * 53 * SHLINFORD Format of data returned by shared list read request. * 54 * UNDRPINFORD Format of data of the underprocess tree structure. * 55 * LUINFORD Format of data returned by the local unit request. * 56 * * 57 ********************************************************************************** 58 59 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 160 (XREQINFOMACS) F 10 Macro Definitions 60 DIRINFORD MACRO 61 NOLIST 62 $P 63 BOX 64 65 This is the format of information that is returned to 66 the user when he requests directory information. The 67 header is returned only when the .DIR is at load point. 68 After that the buffer is filled with an integral number of 69 entries, one for each file. 70 When the directory is exhausted, an end-of-data status 71 is returned. 72 73 EBOX 74 75 DIRHINFO BASE R0 Header giving account information 76 DIRHLNTH BSS 1 Length of entry in words (now 8) 77 DIRFLAGS BSS 1 Flags 78 DIRSHADOW EQU DIRFLAGS/BIT 0 On if a shadow account 79 DIRFOREIGN EQU DIRFLAGS/BIT 1 On if account not at home here 80 DIRNETWORK EQU DIRFLAGS/BIT 2 On if account accessed via network 81 DIRVOLUME BSS2 1 Volume account is on (PAK12) 82 DIRSYSTEM BSS 1 System account is on (PAK6) 83 DIRACCOUNT BSS2 1 Account name (PAK12) 84 DIRPROJECT BSS 1 Project of account (PAK6) 85 DRCT 86 DIRHWIDE EQU DISPW DIRHINFO Template length 87 ORG DIRHINFO Recover template space 88 89 90 BOX 91 92 Template for .DIR file entry block 93 94 EBOX 95 96 DIREINFO BASE R0 Entry for individual file 97 DIRENTLEN BSS 1 Entry length in words 98 DIRNAME BSS2 1 Name of file (PAK12) 99 DIREXT BSS 1 File name extension (PAK6) 100 DIRCREATD BSS 1 Creation date 101 DIRLACSD BSS 1 Last access date 102 DIRLMODD BSS 1 Last modified date 103 DIRLBKUPD BSS 1 Last backup date 104 105 DIRTOTRACS BSSB 16 Total read accesses 106 DIRTOTWACS BSSB 16 Total write accesses 107 108 DIRRACS BSSB 16 Currently active EQUIPs for RO 109 DIRWACS BSSB 16 Currently active EQUIPs for RW 110 111 DIRMWACS BSSB 16 Currently active EQUIPs for MW 112 DIRTFL BSSB 24 Total file length (in blocks) 113 DIRROOTBLK BSSB 24 Root block (or 0 if not GOD) 114 115 DIRTYPE BSSB 8 Type of file (see FSSTATDTYP) 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 161 (XREQINFOMACS) F 10 Macro Definitions 116 DIRACCESS BSSB 4 Access allowed (see FSSTATACS) 117 DIRRAFTYPE BSSB 2 Empty, Tiny, Small, Large 118 BSSB 2 filler 119 DIRPRGINT BSSB 8 Purge interval 120 DIRPRGFLG BSSB 1 On if file was purged 121 DIRNOBKUP BSSB 1 On if file should not be backed up 122 DIRRCVRD BSSB 1 On if file recovered from backup 123 DIRFWWSC BSSB 1 On if file EQUIPed for W at crash 124 DIRFBC BSSB 1 On if file being closed 125 DIRGHOST BSSB 1 On if file not yet recovered from backup 126 DIRTRANS BSSB 1 On if file opened when user program crashed 127 DIRFLOG BSSB 1 On if file access should be logged 128 129 BSSB 1 unused filler 130 DIRLRAF BSSB 1 On if a large (2 level) .RAF 131 DIRCUSE BSSB 16 current use count 132 133 DIRUSRFLD BSS 1 user-definable field 134 DIRSERNO BSS2 1 file serial number 135 DIRUNITNM EQU DIRSERNO(1) unit number for hardware devices 136 BSS 0 *** filler *** 137 DRCT 138 DIRENTWIDE EQU DISPW DIREINFO Template size in words 139 ORG DIREINFO Recover template space 140 EMAC end of DIRINFORD 141 142 143 FILESTAT MACRO 144 NOLIST 145 $P 146 BOX 147 148 Definition of the fields and values for the static and 149 dynamic statuses of a file. 150 151 EBOX 152 153 * Format of File static status 154 * 155 * EQU BIT 0 always zero 156 FSSTATPRIV EQU BITS 14:17 privilege to access device 157 FSSTATCRT EQU BIT 18 file was created by OPEN 158 FSSTATACS EQU BITS 19:21 access allowed to device 159 * EQU BIT 22 unused - reserved 160 FSSTATABS EQU BIT 23 on if unit is absolute I/O 161 FSSTATWSC EQU BIT 24 on if file writing when system crashed 162 FSSTATSAV EQU BIT 25 on if device in directory somewhere 163 FSSTATDTYP EQU BITS 26:31 type code for the device 164 165 * Values for FSSTATPRIV 166 * (privilege implies what you would be allowed to have) 167 FSPRIVRW EQU 0 read/write 168 FSPRIVRO EQU 1 read only 169 FSPRIVMOD EQU 2 modify 170 FSPRIVXO EQU 3 execute only 171 FSPRIVBKUP EQU 8 backup 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 162 (XREQINFOMACS) F 10 Macro Definitions 172 FSPRIVNOT EQU 0F no privilege 173 FSPRIVNWB EQU BIT 31 bit, if on, implies no write possible 174 * Values for FSSTATACS 175 * (access implies what you actually requested and have) 176 FSACSRW EQU 0 read/write 177 FSACSRO EQU 1 read only 178 FSACSAO EQU 2 append only 179 FSACSXO EQU 3 execute only 180 FSACSMW EQU 4 multiple write 181 FSACSDR EQU FSACSMW+1 multiple write 182 FSACSNDA EQU 7 no data access 183 FSACSNWB EQU BIT 31 bit, if on, sez no write possible 184 * Values for FSSTATDTYP 185 DTYPEUNDEF EQU 0 undefined and illegal 186 DTYPESAF EQU 1 sequential access file 187 DTYPERAF EQU 2 random access file 188 DTYPECODE EQU 3 code file 189 DTYPEPATH EQU 4 communication path 190 DTYPEDIR EQU 5 directory 191 DTYPENULL EQU 6 output eater 192 DTYPETERM EQU 7 interactive terminal 193 * EQU 8 unused (was lock) 194 DTYPETASK EQU 9 "batch" job submission unit 195 DTYPECDR EQU 10 card reader 196 DTYPELP EQU 11 line printer 197 DTYPEMT EQU 12 magnetic tape 198 DTYPECT EQU 13 cartridge magnetic tape 199 DTYPEVOL EQU 14 a volume 200 DTYPEVT EQU 15 video tape 201 DTYPELAST EQU 16 last code plus one 202 203 204 * Format of a file's dynamic status 205 FDSTATAERR EQU BIT 0 on if error code not zero 206 FDSTATLUN EQU BITS 4:11 lun having this status 207 FDSTATRTYP EQU BITS 16:19 type of last record read 208 FDSTATLP EQU BIT 20 on if device positioned at beginning 209 FDSTATERR EQU BITS 21:31 error code 210 211 * Values for FDSTATRTYP - record types 212 FDRTYPSYSB EQU BIT 28 if on, record is either EOD or EOF 213 FDRTYPEODB EQU BIT 31 if FDRTYPSYSB also, then EOD 214 FDRTYPTEXT EQU 0 text record 215 FDRTYPTXTF EQU 1 text with forms control 216 FDRTYPBIN EQU 2 binary record 217 FDRTYPLBL EQU 4 label record 218 FDRTYPCOMM EQU 5 comment record 219 FDRTYPFM EQU 8 file mark (end of file, EOF) 220 FDRTYPEOD EQU 9 end of data (EOD) 221 FDRTYPAEOD EQU 11 abnormal end of date (AEOD) 222 EMAC of FILESTAT 223 224 225 FLDDEFS MACRO 226 NOLIST 227 $P 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 163 (XREQINFOMACS) F 10 Macro Definitions 228 BOX 229 230 Definition of useful instruction and address fields. 231 232 EBOX 233 234 FLDADRS EQU BITS 15:31 word address in a pointer 235 FLDCHARS EQU BITS 15:1 character address in a pointer 236 FLDBITS EQU BITS 15:4 bit address in a pointer 237 FLDPAGE EQU BITS 15:21 page number in word address 238 FLDRAFPAGE EQU BITS 0:19 page number in RAF byte address 239 FLDUPR15 EQU BITS 0:14 upper 15 bits of a word 240 FLDCH0 EQU BITS 0:7 character 0 in a word 241 FLDCH1 EQU BITS 8:15 character 1 in a word 242 FLDCH2 EQU BITS 16:23 character 2 in a word 243 FLDCH3 EQU BITS 24:31 character 3 in a word 244 FLDMODE EQU BITS 10:14 mode part of an operand 245 FLDIMMED EQU BITS 14:31 immediate part of operand 246 FLDOPND EQU FLDMODE+FLDADRS instruction operand 247 248 EMAC end of FLDDEFS 249 250 251 MSGDEFS MACRO 252 NOLIST 253 $P 254 BOX 255 256 Definition of messages sent by URSENDMSG and received 257 by URGETMSG. 258 259 EBOX 260 261 MSGPROTO BASE R0 262 MSGPROC BSSB 16 when sending: session number of receiver 263 * when receiving: session number of sender 264 MSGCLASS BSSB 16 class number of this message (0..31) 265 MSGPRIVS BSS 1 privileges associated with this message 266 * (see below for format) 267 MSGSTEXT BSS 0 when sending: start of message text 268 MSGACCT BSSC 20 when receiving: account name of sender, 269 * in ASCII, padded with blanks, or blank 270 * if account name not given. 271 MSGRTEXT BSS 0 when receiving: start of message text 272 273 * Definition of bits MSGPRIVS: 274 275 MSGPRIVID EQU BIT 0 Sender's Privilege Account name will be put into MSGACCT. 276 MSGPRIVOS EQU BIT 1 Sender is the operating system. 277 MSGPRIVLID EQU BIT 2 Sender's Logged On Account name will be put into MSGACCT. 278 MSGPRIVCM EQU BIT 20 Sender is Control Mode 279 MSGPRIVNXO EQU BIT 21 Sender is NOT Execute Only. 280 MSGPRIVMGR EQU BIT 22 Sender can execute MANAGER requests. 281 MSGPRIVBKP EQU BIT 23 Sender can execute BACKUP requests. 282 MSGPRIVMW EQU BIT 24 . . . MAINTENANCE WRITE requests. 283 MSGPRIVMR EQU BIT 25 . . . MAINTENANCE READ requests. 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 164 (XREQINFOMACS) F 10 Macro Definitions 284 MSGPRIVOPR EQU BIT 26 . . . OPERATOR requests. 285 MSGPRIVG5 EQU BIT 27 . . . GROUP 5 (currently unused) requests. 286 MSGPRIVG4 EQU BIT 28 . . . GROUP 4 (message and batch) requests. 287 MSGPRIVG3 EQU BIT 29 . . . GROUP 3 (attribute change) requests. 288 MSGPRIVG2 EQU BIT 30 . . . GROUP 2 (catalog fetch) requests. 289 MSGPRIVG1 EQU BIT 31 . . . GROUP 1 (limit change) requests. 290 291 * Some message classes are pre defined (or at least usually used for...) 292 MSGCLSRESP EQU 0 response message 293 MSGCLSVERB EQU 1 verbal communication between users 294 MSGCLSOPR EQU 2 urgent communication from OPR 295 MSGCLSSPLR EQU 3 messages to the spooler 296 MSGCLSTERM EQU 4 concurrent session termination message 297 * EQU 5:15 reserved for BTI 298 * EQU 16:31 available to implementors 299 300 DRCT 301 ORG MSGPROTO recover lost space 302 EMAC of MSGDEFS 303 304 305 PSRDEFS MACRO 306 NOLIST 307 $P 308 BOX 309 310 Definition of Process Status Register. 311 312 EBOX 313 314 PSRBCDTRPB EQU BIT 22 BCD overflow trap enable 315 PSRFLTRPEB EQU BIT 23 floating point reduced precision enable 316 PSRFIXTRPB EQU BIT 24 fixed point arith error trap enable 317 PSRFLTTRPB EQU BIT 25 floating point arith error trap enable 318 PSRUNDTRPB EQU BIT 26 undefined number error trap enable 319 PSRMODIFB EQU BIT 27 modify arithmetic enable 320 PSROVERFB EQU BIT 28 overflow indication 321 PSRCARRYB EQU BIT 29 carry indication 322 PSRCONDB EQU BITS 30:31 condition (30-EQ, 31-LT) 323 * values used in changing PSR 324 PSRBCDTRP EQU 1*PSRBCDTRPB 325 PSRFLTRPE EQU 1*PSRFLTRPEB 326 PSRFIXTRP EQU 1*PSRFIXTRPB 327 PSRFLTTRP EQU 1*PSRFLTTRPB 328 PSRUNDTRP EQU 1*PSRUNDTRPB 329 PSRMODIF EQU 1*PSRMODIFB 330 PSROVERF EQU 1*PSROVERFB 331 PSRCARRY EQU 1*PSRCARRYB 332 333 EMAC end of PSRDEFS 334 335 336 PROCINFORD MACRO 337 NOLIST 338 $P 339 BOX 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 165 (XREQINFOMACS) F 10 Macro Definitions 340 341 The session information read request returns the 342 following block of information for each session. 343 344 EBOX 345 346 * Format of session information returned 347 PIPROTO BASE R0 348 PIPROCNUM BSSB 32-17 session number 349 PIENTLEN BSSB 17 length of this entry in words 350 PIWORDZ BSSB 32/2 bits giving more information 351 PIBATCH EQU PIWORDZ/BIT 31 on if a "batch" session 352 PIINTER EQU PIWORDZ/BIT 30 on if "interactive" session 353 PIDIALUP EQU PIWORDZ/BIT 29 on if a dialup port 354 PIINHIB EQU PIWORDZ/BIT 28 on if this port is inhibited 355 PIRFP EQU PIWORDZ/BIT 27 on if this is the special RFP term 356 PISHADL EQU PIWORDZ/BIT 26 on if logged on acct is shadow 357 PISHADA EQU PIWORDZ/BIT 25 on if alias acct is a shadow 358 PISPECPROC EQU PIWORDZ/BIT 24 on if job is special (started by ORSTRTJOB) 359 PISYSPROC EQU PIWORDZ/BIT 23 on if job is system process 360 361 PIPORTNUM BSSB 32/2 terminal port associated (-1 if none) 362 PISHORT EQU DISPW PIPROCNUM size of short element 363 * The above information is given for all sessions. The 364 * below information is only given if privileged. 365 PILOGACCT BSS 6 account logged on 366 PILAVOL EQU PILOGACCT(0) volume name 367 PILASYS EQU PILOGACCT(2) system name 368 PILAACCT EQU PILOGACCT(3) account name 369 PILAPROJ EQU PILOGACCT(5) division-project 370 PIALIASACT BSS 6 account aliased to 371 PIAAVOL EQU PIALIASACT(0) volume name 372 PIAASYS EQU PIALIASACT(2) system name 373 PIAAACCT EQU PIALIASACT(3) account name 374 PIAAPROJ EQU PIALIASACT(5) division-project 375 PIPROGNAME BSS 2 name of program (PAK12) 376 PISTATE BSS 2 program execution state (PAK12) 377 PIWCTIME BSS 1 wall clock time on (in minutes) 378 PICPUUSED BSS 1 cpu time used (in seconds) 379 PICPULIM BSS 1 cpu limit (in seconds) 380 PIDSKLIM BSS 1 disk space hard limit 381 PIDSKUSD BSS 1 disk space used 382 PISESUSD BSS 1 session space used 383 PISESLIM BSS 1 session space limit 384 PIWSSIZE BSS 1 working set size 385 PIDSKWARN BSS 1 disk block soft limit 386 PIPARENT BSS 1 session number of parent (or zero if none) 387 PISITE BSS 2 site name for this session 388 PILGFSESS BSS 1 session to send logoff message to 389 DRCT 390 PILONG EQU DISPW PIPROTO length of long information 391 PILOG EQU PILONG LOG 2 log length for getmem 392 ORG PIPROTO recover the space 393 EMAC end of PROCINFORD 394 395 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 166 (XREQINFOMACS) F 10 Macro Definitions 396 SHLINFORD MACRO 397 NOLIST 398 $P 399 BOX 400 401 Shared list information read format. 402 403 EBOX 404 405 SHRPROTO BASE R0 406 SHRACCESS BSSB 8 access given (codes for FSPRIVxx) 407 SHRPW BSSB 1 on if password present 408 BSSB 6 filler 409 SHRENLEN BSSB 17 contains length of this entry 410 SHRSYS BSS 1 system shared with 411 SHRACCT BSS 2 account shared with 412 SHRPROJ BSS 1 project shared with 413 DRCT 414 SHRLNTH EQU DISPW SHRPROTO length of an entry 415 ORG SHRPROTO 416 EMAC of SHLINFORD 417 418 419 UNDRPINFORD MACRO 420 NOLIST 421 $P 422 BOX 423 424 The under process structure read request returns the 425 following block of information for each process. 426 427 EBOX 428 429 UNDRPROTO BASE R0 430 UNDRRSTR BSSB 15 process restrictions 431 UNDRELEN BSSB 17 length of this entry, in words 432 UNDRLEVEL BSSB 9 level number of this under process 433 UNDRPSN BSSB 23 process serial number of this process 434 UNDRDPSN BSSB 23 process serial number of father 435 UNDRDBG BSSB 23 process serial number of debugger process 436 BSSB 18 reserved for future expansion 437 UNDRNAME BSS 2 process name 438 439 UNDRSTCTG1 EQU UNDRRSTR/BIT 31 on if group 1 restrictions (limit change) 440 UNDRSTCTG2 EQU UNDRRSTR/BIT 30 on if group 2 restrictions (catalog fetch) 441 UNDRSTCTG3 EQU UNDRRSTR/BIT 29 on if group 3 restrictions (acct att. chng) 442 UNDRSTCTG4 EQU UNDRRSTR/BIT 28 on if group 4 restrictions (unassigned) 443 UNDRSTCTG5 EQU UNDRRSTR/BIT 27 on if group 5 restrictions (unassigned) 444 UNDROPREQ EQU UNDRRSTR/BIT 26 on if operator requests restricted 445 UNDRMAINTR EQU UNDRRSTR/BIT 25 on if maintenance read restricted 446 UNDRMAINTW EQU UNDRRSTR/BIT 24 on if maintenance write restricted 447 UNDRBACKUP EQU UNDRRSTR/BIT 23 on if backup requests restricted 448 UNDRMANAGR EQU UNDRRSTR/BIT 22 on if manager requests restricted 449 UNDREXO EQU UNDRRSTR/BIT 21 on if address space is execute only 450 UNDRCNTLM EQU UNDRRSTR/BIT 20 on if in Control Mode 451 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 167 (XREQINFOMACS) F 10 Macro Definitions 452 DRCT 453 UNDRPLONG EQU DISPW UNDRPROTO 454 UNDRPLOG EQU UNDRPLONG LOG 2 455 ORG UNDRPROTO recover lost space 456 EMAC 457 458 459 LUINFORD MACRO 460 NOLIST 461 $P 462 BOX 463 464 The request that returns information on the local 465 units for a specific underprocess conforms to the following 466 format. 467 468 EBOX 469 470 LUPROTO BASE R0 471 LUEQUIVS BSSB 8 number of units opened to this device 472 LULASTREC BSSB 4 type of last record read 473 LULOADPT BSSB 1 unit is currently position at the load point 474 LUTRANS BSSB 1 on if unit has transaction in progress 475 BSSB 1 reserved for future expansion 476 LUELEN BSSB 17 length of this entry (words) 477 478 LUUNIT BSSB 8 unit number having this status 479 LUSSTAT BSSB 18 unit static status 480 BSSB 6 reserved for future expansion 481 482 LUPRIV EQU LUSSTAT/BITS 14:17 privilege to access this device 483 LUCRT EQU LUSSTAT/BIT 18 file created by OPEN 484 LUACS EQU LUSSTAT/BITS 19:21 access allowed to device 485 LUWWC EQU LUSSTAT/BIT 24 on if file writing when system crashed 486 LUSAVE EQU LUSSTAT/BIT 25 on if device in directory somewhere 487 LUTYPE EQU LUSSTAT/BITS 26:31 type of device 488 489 LUVOLNM BSS 2 volume name for device 490 LUSYSNM BSS 1 system name for device 491 LUACCT BSS 2 account name for device 492 LUACCPROJ BSS 1 div/proj name for device 493 LUFILENM BSS 2 filename for device 494 LUEXT BSS 1 filename extension for device 495 496 DRCT 497 LULONG EQU DISPW LUPROTO 498 LULOG EQU LULONG LOG 2 499 ORG LUPROTO recover lost space 500 501 EMAC 17 INPUT OPRQINFOMACS format for info returned by OPREQs 2 * Operator variable definition macros. 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 168 (OPRQINFOMACS) F 11 4 5 * A9107 Added ERLCSCSIDE, ERLCSCSIID and ERLCSCSIRS. JB. 6 * A9105 Modifications of trace event format. RC 7 * A8901 Addition of VT defs to DEVINFORD. RC 8 * A8805 Addition of disk name to several ERRORFILE entries. DH 9 * A8602 Addition of exchange save record types for accounting record. MH 10 * A8511 Addition of STOP and GO record types for accounting record. MH 11 * A8510 Addition LOAD and UNLOAD record types for accounting record. JB. 12 * A8508 Addition of SMU error code. MH. 13 * A8507 Changes to PORTFILE macro, PCFUNCT contains additional info. JB. 14 * A8504 Addition of new fields and record types for accounting record. MH. 15 * 3.6 Addition of VBSYINFORD. JB. 16 * 3.5 Added DIUNIT, DICHAN, and DISLOT to DEVINFORD. DH. 17 * 3.4 Added POTERMTYPE to PORTINFORD, PCTERMTYPE to PORTFILE. JB. 18 * 3.3 AUTHGDSK and AUTHGDSKA changed to AUTHS... RC. 19 * 2.0 New field in VOLINFORD. BB. 20 * 1.3 Addition of BKUPINFORD. BB. 21 * A8110 New fields in PORTFILE, PORTINFORD. JL. 22 * A8104a Changes to ERRORFILE. JL. 23 * A8104 Changes to ERRORFILE. JL. 24 * A8102 Addition of OPMSGINFO. Change PROCINFORD and ERRORFILE. JL. 25 * A8012a Addition of AUTHINFORD. Change DEVINFORD. New error codes. JL. 26 * A8008 Change of accounting record format. RA. 27 * A8007 Addition of DEVINFORD and TRINFORD. VOLINFORD changed. JL. 28 * A8005a Addition of ACCTFILE and ERRORFILE. RA. 29 * A8005 Addition of CONFINFRD. RA. 30 * A7912 Initial release. RA. 31 32 ********************************************************************************** 33 * * 34 * This is the definition of macros that define symbols * 35 * that are required in communication with the system. This * 36 * file is INPUT in assembly language programs and it defines * 37 * macros that, when invoked, define the requested group of * 38 * symbols. The macro invocation is of the form: * 39 * * 40 * macname [list] * 41 * * 42 * where "macname" is the name of the requested macro and "list" is * 43 * optionally included (the square brackets denote optionality) if the * 44 * body of the macro (i.e., the definition of the symbols) is to * 45 * be listed. * 46 * * 47 * Macros that are defined herein are: * 48 * * 49 * ACCTFILE Format of accounting file. * 50 * AFTINFORD Format of data returned by AFT information request. * 51 * AUTHINFORD Format of data returned by auth list information reads. * 52 * CONFINFORD Format of data returned by configuration request. * 53 * DEVINFORD Format of data returned by device information request. * 54 * ERRORFILE Format of error log file. * 55 * OPMSGINFO Format of data returned by operator message request. * 56 * PORTFILE Format of port configuration file. * 57 * PORTINFORD Format of data returned by port information request. * 58 * TRINFORD Format of data returned by stop trace request. * 59 * VOLINFORD Format of data returned by volume information request. * 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 169 (OPRQINFOMACS) F 11 60 * VBSYINFORD Format of data returned by volume busy request. * 61 * * 62 ********************************************************************************** 63 64 65 ACCTFILE MACRO 66 NOLIST 67 $P 68 BOX 69 70 Accounting files. 71 A system session writes records into accounting files 72 whenever certain events occur. The events and the format 73 of the files are described below. The files where log 74 entries are made are determined by a bit mask in the 75 ULLIMITS block called LIMLOGSPOT. Each accounting record is 76 written to as many as 4 log files: 77 78 user.divprj:ACCOUNTING.LOGFIL 79 MANAGER.divprj:ACCOUNTING.LOGFIL 80 MANAGER.div:ACCOUNTING.LOGFIL 81 MANAGER.SYS:ACCOUNTING.LOGFIL 82 83 The manufacturers account logging may go to himself, 84 MANAGER.!!!, or MANAGER.SYS. 85 These files should be opened as empty .RAFs. The 86 accounting session will add records to the end of the file 87 and advance the end pointer. The begin pointer is provided 88 for the benefit of the reading process. It is the 89 responsibility of the reading process to free blocks when 90 they are no longer needed, otherwise, the log file will 91 grow until it occupies all available space. Note that 92 block 0 should never be freed. 93 If AFEND is in the range of -AFRSIZE to 2*CPW, then it 94 is set to 2*CPW. The reading routine should do the same 95 for AFBEGIN. 96 97 It should be noted that for file entries being logged 98 the primary account name and project is for the account 99 owning the file and the secondary one is for the account 100 accessing the file. Also for aliases and unaliases the 101 file name and extension field is used to hold the logon 102 account name and project of the user performing the alias. 103 104 EBOX 105 106 AFBEGIN EQU 0 RAF char position of read pointer 107 AFEND EQU 1*4 RAF char position of write pointer 108 * (points to next records location) 109 110 AFRPROTO BASE R0 111 AFRTYPE BSSB 5 type of record 112 APTSLEEP EQU 0 sleep record (tested with JEQZ!) 113 APTSTARTUP EQU 1 system startup 114 APTON EQU 2 successful logon 115 APTPWW EQU 3 unsuccessful logon 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 170 (OPRQINFOMACS) F 11 116 APTALIAS EQU 4 alias 117 APTALIER EQU 5 alias failure 118 APTOFF EQU 6 logoff 119 APTALOFF EQU 7 unalias 120 APTPWRFAIL EQU 8 power failure 121 APTPWRUP EQU 9 power up restart 122 APTCONCP EQU 10 concurrent session startup 123 APTABORT EQU 11 opr abort 124 APTTERMIN EQU 12 opr terminate 125 APTEVICT EQU 13 opr evict 126 APTFILOP EQU 14 file open 127 APTFILCL EQU 15 file close 128 APTFBC EQU 16 file being destroyed 129 APTLOAD EQU 17 volume mount 130 APTUNLOAD EQU 18 volume dismount 131 APTSTOP EQU 19 stop process 132 APTGO EQU 20 start process 133 APTXSAVE EQU 21 file exchange save 134 APTMAX EQU 21 largest type 135 * Bit array of those APTs that are long 136 AFRSZLONG EQU 1*(BIT APTON)+1*(BIT APTALIAS)+1*(BIT APTOFF)+1*(BIT APTALOFF) 137 138 AFRPORTNUM BSSB 10 port number of activity 139 AFRLEN BSSB 17 character size of record 140 AFRPROCN BSSB 12 session number 141 AFRSHADOW BSSB 1 on if mentioned acct shadow 142 AFRFOREIGN BSSB 1 on if mentioned acct foreign 143 AFRFILLER BSSB 32-14 filler 144 AFRACCT BSS2 1 account name 145 AFRPROJ BSS 1 division-project 146 AFRTIME BSS2 1 time of occurrence 147 AFRSHORT EQU DISPC AFRTYPE size of short acct file record 148 AFRCPUTIME BSS 1 CPU time used (sec) 149 AFRSVDUSD BSS 1 saved file space (fb) 150 AFRSESMAX BSS 1 session output max (high water mark) 151 AFRACCT2 EQU AFRCPUTIME second account name in record 152 AFRPROJ2 EQU AFRSESMAX second project in record 153 154 AFRSIZE EQU DISPC AFRTYPE size of account file record 155 AFRWORDA BSS 1 156 AFRPORT2 EQU AFRWORDA/BITS 0:9 second port in record 157 AFRPROC2 EQU AFRWORDA/BITS 10:21 second session number in record 158 AFRLONG EQU DISPC AFRTYPE size of long account record 159 BSS 1 second word of file name 160 AFRFILNAM EQU AFRWORDA file name 161 AFRFILEXT BSS 1 file extention 162 AFRFILLEN EQU DISPC AFRTYPE size of record with file info in it 163 AFRMAXLEN EQU AFRFILLEN max length of an accounting record 164 DRCT 165 ORG AFRPROTO reclaim area 166 EMAC 167 168 169 AFTINFORD MACRO 170 NOLIST 171 $P 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 171 (OPRQINFOMACS) F 11 172 BOX 173 174 Format of each entry returned by the read AFT request. 175 176 EBOX 177 AIPROTO BASE R0 178 AIVOL BSS 2 volume name (PAK12) 179 AIACCT BSS 2 account name (PAK12) 180 AIPROJ BSS 1 account project (PAK6) 181 DRCT 182 AILEN EQU DISPW AIPROTO length of the entry in words 183 ORG AIPROTO 184 EMAC end of AFTINFORD 185 186 187 AUTHINFORD MACRO 188 NOLIST 189 $P 190 BOX 191 192 Authorization list read request results. 193 194 EBOX 195 196 AUTLPROTO BASE R0 197 AUTVNAME BSS2 1 volume name 198 BSS 2 unused 199 AUTDSK BSS 1 disk space authorized 200 AUTDSKA BSS 1 disk space delegated 201 AUTSDSK BSS 1 saved space authorized 202 AUTSDSKA BSS 1 saved space delegated 203 BSS 4 unused - reserved for future expansion 204 DRCT 205 AUTLLNTH EQU DISPW AUTLPROTO length of entry 206 ORG AUTLPROTO 207 EMAC 208 209 210 CONFINFORD MACRO 211 NOLIST 212 $P 213 BOX 214 215 Format of each entry returned by the read system 216 configuration request. 217 218 EBOX 219 220 SCPROTO BASE R0 221 SCSLOT BSSB 15 slot of device 222 SCLENGTH BSSB 17 length of the entry in words 223 SCTYPE BSS 1 PAK6 device type name 224 SCWRU BSS 1 WRU response of the device 225 SCCHAN BSS 1 channel number of device (-1 if none) 226 SCDTYPE BSS 1 PAK6 name of device on chan(-1 if none) 227 SCDWRU BSS 1 device WRU response (-1 if none) 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 172 (OPRQINFOMACS) F 11 228 SCDUNIT BSS 1 unit on device controller (-1 if none) 229 SCDUSIZE BSS 1 size of device (-1 if no size) 230 SCDUUNIT BSS 1 PAK6 units of device size 231 DRCT 232 SCLEN EQU DISPW SCPROTO length of the entry in words 233 ORG SCPROTO 234 EMAC end of CONFINFORD 235 236 237 DEVINFORD MACRO 238 NOLIST 239 $P 240 BOX 241 242 Information returned by the device information 243 request. 244 245 EBOX 246 247 DIPROTO BASE R0 248 DISTART BSS 0 beginning of entry 249 DITYPE BSSB 15 device type: 250 DIDISK EQU 1 disk 251 DIMT EQU 2 magnetic tape (standard 9 track) 252 DICT EQU 3 cartridge tape (DEI) 253 DILP EQU 4 line printer 254 DIVT EQU 5 video tape (exabyte) 255 * others to be defined 256 DIENTLEN BSSB 17 length of this entry in words 257 DIDNAME BSS 1 device name (pak6) 258 DIHARDADR BSSB 16:1 hardware address 259 DIUNIT EQU BITS 28:31 unit number in hardware address 260 DICHAN EQU BITS 24:27 channel number in hardware address 261 DISLOT EQU BITS 20:23 slot number in hardware address 262 DIDEVINFO BSS 0 start of device-specific info 263 264 * For disks only: 265 DIDRVNUM BSSB 8 drive number (cable position) 266 DISPT BSSB 8 sectors per track 267 DITPC BSSB 16 tracks per cylinder 268 DIDISKLEN EQU DISPW DISTART length of disk entry 269 270 * For mag tapes only: 271 ORG DIPROTO/DIDEVINFO 272 DIMTPROC BSS 1 session number of owner (or zero if none) 273 DIMTLEN EQU DISPW DISTART length of mag tape entry 274 275 * For cart tapes only: 276 ORG DIPROTO/DIDEVINFO 277 DICTPROC BSS 1 session number of owner (or zero if none) 278 DICTLEN EQU DISPW DISTART length of cart tape entry 279 280 * For video tapes only: 281 ORG DIPROTO/DIDEVINFO 282 DIVTPROC BSS 1 session number of owner (or zero if none) 283 DIVTLEN EQU DISPW DISTART length of video tape entry 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 173 (OPRQINFOMACS) F 11 284 285 * For line printers only: 286 ORG DIPROTO/DIDEVINFO 287 DILPPROC BSS 1 session number of owner (or zero if none) 288 DILPLEN EQU DISPW DISTART length of line printer entry 289 290 DRCT 291 ORG DIPROTO recover space 292 EMAC 293 294 295 ERRORFILE MACRO 296 NOLIST 297 $P 298 BOX 299 300 The system logs in a file IO and other errors that 301 occur while the system is running. This file is of the 302 format given. The errors consist of a code and a variable 303 number of parameters. Defined error codes are ("|" 304 separates words): 305 306 ERLCEND | dummy parameter 307 ERLCTS ( no longer used ) 308 ERLCTEXT | variable length string (blank filled) 309 ERLCBFBI ( new code below ) 310 ERLCCKFBI ( new code below ) 311 ERLCBKFBI ( new code below ) 312 ERLCPFFBI ( no longer used ) 313 ERLCBLNK | MS address expected | found 314 ERLCFSAF | MS address 315 ERLCFUD1 | MS address 316 ERLCFUD2 | MS address 317 ERLCPPUBT | PF for channel | PPU status 318 ERLCCIAE | PF for channel | CIA status 319 ERLCCIATO | PF for channel 320 ERLCDSKTO | PF for channel | unit 321 ERLCSSUTO | PF for SSU 322 ERLCSUB ( new code below ) 323 ERLCNOSUB ( new code below ) 324 ERLCUNSUB ( new code below ) 325 ERLCPPUTO (no longer used) 326 ERLCBOOT | system version (upper) | system version (lower) | boot switches 327 ERLCMOUNT | volume number | drive name | volume name (upper) | 328 volume name (lower) 329 ERLCDMOUNT | volume number 330 ERLCMPE | status + virtual address | PF | block 331 ERLCMPED | PF | block 332 ERLCDNRDY ( new code below ) 333 ERLCRMNT | volume number | drive name 334 ERLCCTC (no longer used) 335 ERLCCTCTO (no longer used) 336 ERLCDSKRD ( new code below ) 337 ERLCDCNT | drive name | cable number | read count | write count 338 ERLCDSKRW ( new code below ) 339 ERLCLPERR | LP name | LP status 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 174 (OPRQINFOMACS) F 11 340 ERLCLPIFPE ( no longer used ) 341 ERLCLPTO | LP name 342 ERLCPPUBAD | PPU slot number 343 ERLCPPUOK | PPU slot number 344 ERLCCTLBAD | PPU slot number | channel number 345 ERLCCTLOK | PPU slot number | channel number 346 ERLCDATBAD | target date | current date 347 ERLCNVMTIM | dummy parm 348 ERLCMTC (no longer used) 349 ERLCMTCTO | page map value 350 ERLCMTCERR | drive name | operation | tape status | PPU status 351 ERLCDSKID | drive name | drive id (3 words) | 352 pack mfg | pack s/n | fmt date (2 words) | 353 volume name (2 words) 354 ERLCUNLOAD | drive name 355 ERLCDE | drive name | block number | seek address | 356 operation | BFD status | PPU status 357 ERLCPWFAIL | dummy parameter 358 ERLCPWRUP | dummy parameter 359 ERLCBFBI | drive name | MS address | expected | found 360 ERLCCKFBI | drive name | MS address | difference | found 361 ERLCBKFBI | drive name | MS address | found 362 ERLCRDGCS | drive name | MS address | segment# 363 ERLCSUB | drive name | bad MS address | substitute address 364 ERLCNOSUB | drive name | bad MS address | reason 365 ERLCUNSUB | drive name | bad MS address | substitute MS address 366 ERLCDNRDY | drive name | volume number 367 ERLCDSKRD | drive name | MS address | seek address 368 ERLCDSKRW | drive name | MS address | seek address 369 ERLCSCSIRS | drive name | MS address | seek address | operation | 370 SCSI status | PPU status | sense key | sense code 371 ERLCSCSIDE | drive name | block number | seek address | 372 operation | SCSI status | PPU status 373 ERLCSCSIID | drive name | vendor id (2 words) | 374 product id (3 words) | firmware rev (2 words) | 375 fmt date (2 words) | volume name (2 words) 376 377 The error logging file is SYSTEM.!!!:ERRORLOG.LOGFIL. 378 This file should be opened as an empty .RAF. The error 379 logging session will add records to the end of the file and 380 advance the end pointer. The begin pointer is provided for 381 the benefit of the reading process. It is the 382 responsibility of the reading process to free blocks when 383 they are no longer needed, otherwise, the log file will 384 grow until it occupies all available mass storage space. 385 Note that block 0 should never be freed ( except possibly 386 to release the entire file ). 387 If EFEND is in the range of -EFRSIZE to 2*CPW, then it 388 is set to 2*CPW. The reading routine should do the same 389 for EFBEGIN. 390 391 EBOX 392 393 * These addresses are used to get the pointers from the error log file 394 EFBEGIN EQU 0 pointer to first error entry 395 EFEND EQU 1*4 pointer to end of error entries 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 175 (OPRQINFOMACS) F 11 396 397 EFPROTO BASE R0 prototype of error entry 398 EFWORDA BSS 1 399 EFLEN EQU BITS 17:21 number of parameters for this error 400 EFERROR EQU BIT 22 0 => routine log entry, 1 => error 401 EFCODE EQU BITS 23:31 code for this error 402 EFTYPE EQU EFWORDA/BITS 0:14 code for this error 403 EFLENGTH EQU EFWORDA/BITS 15:31 length of this entry in words 404 EFDATE BSS 2 system time word when error happened 405 EFPARAMS LABEL first word of parameters 406 DRCT 407 ORG EFPROTO reclaim space 408 409 * The actual codes 410 ERLCEND EQU 1*EFLEN+0*EFERROR+01*EFCODE end system 411 *ERLCTS EQU 1*EFLEN+0*EFERROR+02*EFCODE time stamp 412 ERLCTEXT EQU 1*EFLEN+1*EFERROR+03*EFCODE text record 413 *ERLCBFBI EQU 3*EFLEN+1*EFERROR+04*EFCODE unused - was FBI type mismatch 414 *ERLCCKFBI EQU 3*EFLEN+1*EFERROR+05*EFCODE unused - was FBI checksum bad 415 *ERLCBKFBI EQU 2*EFLEN+1*EFERROR+06*EFCODE unused - was FBI DA mismatch 416 * EQU 6*EFLEN+1*EFERROR+07*EFCODE unused - was old format MS error 417 *ERLCPFFBI EQU 3*EFLEN+1*EFERROR+08*EFCODE bad FBI in PFPROC 418 ERLCBLNK EQU 3*EFLEN+1*EFERROR+09*EFCODE bad backward link while freeing 419 ERLCFSAF EQU 1*EFLEN+1*EFERROR+10*EFCODE bad block while freeing SAF 420 ERLCFUD1 EQU 1*EFLEN+1*EFERROR+11*EFCODE bad UD1 block while freeing DIR 421 ERLCFUD2 EQU 1*EFLEN+1*EFERROR+12*EFCODE bad UD2 block while freeing DIR 422 ERLCPPUBT EQU 2*EFLEN+1*EFERROR+13*EFCODE bad transfer status from PPU 423 ERLCCIAE EQU 2*EFLEN+1*EFERROR+14*EFCODE error code from CIA 424 ERLCCIATO EQU 1*EFLEN+1*EFERROR+15*EFCODE CIA deadman timeout 425 ERLCDSKTO EQU 2*EFLEN+1*EFERROR+16*EFCODE Disk deadman timeout 426 ERLCSSUTO EQU 1*EFLEN+1*EFERROR+17*EFCODE SSU timeout 427 *ERLCSUB EQU 2*EFLEN+1*EFERROR+18*EFCODE unused - was MS block substituted 428 *ERLCNOSUB EQU 2*EFLEN+1*EFERROR+19*EFCODE unused - was MS block not substituted 429 *ERLCUNSUB EQU 2*EFLEN+0*EFERROR+20*EFCODE unused - was MS block unsubstituted 430 *ERLCPPUTO EQU 1*EFLEN+1*EFERROR+21*EFCODE PPU timeout, PPU not talking 431 ERLCBOOT EQU 3*EFLEN+0*EFERROR+22*EFCODE system boot 432 ERLCMOUNT EQU 4*EFLEN+0*EFERROR+23*EFCODE volume mount 433 ERLCDMOUNT EQU 1*EFLEN+0*EFERROR+24*EFCODE volume dismount 434 ERLCMPE EQU 3*EFLEN+1*EFERROR+25*EFCODE memory parity error 435 ERLCMPED EQU 2*EFLEN+1*EFERROR+26*EFCODE memory parity error 436 *ERLCDNRDY EQU 2*EFLEN+1*EFERROR+27*EFCODE unused - was disk dropped ready 437 ERLCRMNT EQU 2*EFLEN+0*EFERROR+28*EFCODE volume remounted 438 *ERLCCTC EQU 4*EFLEN+1*EFERROR+29*EFCODE CTC operation error 439 *ERLCCTCTO EQU 2*EFLEN+1*EFERROR+30*EFCODE CTC deadman timeout 440 * EQU 5*EFLEN+1*EFERROR+31*EFCODE unused - was MS error 441 *ERLCDSKRD EQU 3*EFLEN+1*EFERROR+32*EFCODE unused - was perm read error 442 ERLCDCNT EQU 4*EFLEN+0*EFERROR+33*EFCODE disk activity count 443 *ERLCDSKRW EQU 2*EFLEN+0*EFERROR+34*EFCODE unused - was rewrite after read 444 ERLCLPERR EQU 2*EFLEN+1*EFERROR+35*EFCODE line printer error 445 *ERLCLPIFPE EQU 2*EFLEN+1*EFERROR+36*EFCODE line printer interface parity error (obsolete) 446 ERLCLPTO EQU 1*EFLEN+1*EFERROR+37*EFCODE line printer timeout 447 ERLCPPUBAD EQU 1*EFLEN+1*EFERROR+38*EFCODE PPU doesn't respond 448 ERLCPPUOK EQU 1*EFLEN+0*EFERROR+39*EFCODE PPU started talking again 449 ERLCCTLBAD EQU 2*EFLEN+1*EFERROR+40*EFCODE controller doesn't respond 450 ERLCCTLOK EQU 2*EFLEN+0*EFERROR+41*EFCODE controller is OK again 451 ERLCDATBAD EQU 2*EFLEN+1*EFERROR+42*EFCODE SSU clock is bad 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 176 (OPRQINFOMACS) F 11 452 ERLCNVMTIM EQU 1*EFLEN+1*EFERROR+43*EFCODE NVM time is bad 453 *ERLCMTC EQU 4*EFLEN+1*EFERROR+44*EFCODE MTC operation error 454 *ERLCMTCTO EQU 2*EFLEN+1*EFERROR+45*EFCODE MTC deadman timeout 455 ERLCMTCTO EQU 1*EFLEN+1*EFERROR+46*EFCODE MTC deadman timeout 456 ERLCMTCERR EQU 4*EFLEN+1*EFERROR+47*EFCODE MTC tape error 457 ERLCDSKID EQU 10*EFLEN+0*EFERROR+48*EFCODE drive and pack id 458 ERLCUNLOAD EQU 1*EFLEN+1*EFERROR+49*EFCODE unload disk heads 459 ERLCDE EQU 6*EFLEN+1*EFERROR+50*EFCODE disk I/O error 460 ERLCPWFAIL EQU 1*EFLEN+1*EFERROR+51*EFCODE power failure 461 ERLCPWRUP EQU 1*EFLEN+0*EFERROR+52*EFCODE power up restart 462 ERLCSMU EQU 2*EFLEN+1*EFERROR+53*EFCODE SMU error 463 ERLCBFBI EQU 4*EFLEN+1*EFERROR+54*EFCODE FBI type mismatch 464 ERLCCKFBI EQU 4*EFLEN+1*EFERROR+55*EFCODE FBI checksum bad 465 ERLCBKFBI EQU 3*EFLEN+1*EFERROR+56*EFCODE FBI MS block didn't match 466 ERLCRDGCS EQU 3*EFLEN+0*EFERROR+57*EFCODE reading MS correction segment 467 ERLCSUB EQU 3*EFLEN+1*EFERROR+58*EFCODE MS block substituted 468 ERLCNOSUB EQU 3*EFLEN+1*EFERROR+59*EFCODE MS block not substituted 469 ERLCUNSUB EQU 3*EFLEN+0*EFERROR+60*EFCODE MS block unsubstituted 470 ERLCDNRDY EQU 2*EFLEN+1*EFERROR+61*EFCODE disk dropped ready 471 ERLCDSKRD EQU 3*EFLEN+1*EFERROR+62*EFCODE permanent disk read error (data lost) 472 ERLCDSKRW EQU 3*EFLEN+0*EFERROR+63*EFCODE rewrite disk block after read 473 ERLCSCSIRS EQU 8*EFLEN+1*EFERROR+64*EFCODE request sense data for disk error 474 ERLCSCSIDE EQU 6*EFLEN+1*EFERROR+65*EFCODE SCSI disk I/O error 475 ERLCSCSIID EQU 13*EFLEN+0*EFERROR+66*EFCODE SCSI device identification 476 477 ERLMAXLEN EQU 13 maximum number of parameters 478 EMAC 479 480 481 OPMSGINFO MACRO 482 NOLIST 483 $P 484 BOX 485 486 Format of data returned by ORGETOPMSG. 487 488 EBOX 489 490 OMIPROTO BASE R0 491 OMISTART LABEL 492 OMIPROCNUM BSSB 15 session number originating message (or 0) 493 OMIENTLEN BSSB 17 length of this entry, in words 494 OMISERIAL BSSB 24 message serial number 495 OMILENGTH BSSB 8 length of this message, in characters 496 OMIMESSAGE BSSC 0 beginning of message text 497 DRCT 498 ORG OMIPROTO 499 EMAC 500 501 502 PORTFILE MACRO 503 NOLIST 504 $P 505 BOX 506 507 There is a file from which the system reads the 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 177 (OPRQINFOMACS) F 11 508 initial port configuration. That files format is described 509 herein. 510 The file is a RAF and the first words of it describe 511 the location of the entries for each port. Word zero of 512 the RAF (chars 0-3) is always zero so the file is not 513 mangled by other RAF users. Word 1 (PCPLENGTH) contains 514 the length of each port entry in characters and word 2 515 (PCPBASE) gives the character base for the information for 516 port zero. Therefore, to find the information of a 517 particular port, a program positions to *+. 519 Each of the entries are considered "not specified" if 520 the sign bit of its word is not on. This excludes PCTERMA 521 and PCTERMT which are always there. 522 523 EBOX 524 525 PCPLENGTH EQU 4 position of 4 chars giving length 526 PCPBASE EQU 8 position of 4 chars giving base 527 528 PCPROTO BASE R0 529 PCIBAUD BSS 1 input baud rate 530 PCOBAUD BSS 1 output baud rate 531 PCFUNCT BSS 1 532 PCFCTSP EQU BIT 24 clear to send processing 533 PCFXOFF EQU BIT 25 XON/XOFF processing 534 PCFBRKOUT EQU BIT 26 don't output when recieving break 535 PCFRDE EQU BIT 27 receive data enable 536 PCCHKIP EQU BIT 28 1 sez check parity of input character 537 PCPGEN EQU BITS 29:30 parity generation of output characters 538 PCFSTOPB EQU BIT 31 stop bits (0=>1, 1=>2) 539 PCCARW BSS 1 carriage width 540 PCHEIGHT BSS 1 height of a page 541 PCCRD BSS 1 carriage return delay (MS) 542 PCLFD BSS 1 line feed delay (MS) 543 PCFFD BSS 1 form feed delay (MS) 544 PCBKSPC BSS 1 backspace character 545 PCLKILLC BSS 1 line kill character 546 PCECHOM BSS 1 echo mode 547 PCTERMT BSS 1 terminal type code (pak6) 548 PCTERMG BSS 1 terminating character group 549 PCTERMA BSS 8 terminating character array 550 PCLOCATION BSSC 30 text describing terminal location 551 PCAUTOLOG BSS 10 auto logon account 552 PCIXOFF BSS 1 1 sez xoff port on input buffer full 553 PCFPROTO BSS 1 interface protocal 554 PCPNONE EQU 0 none 555 PCPDISC EQU 1 disconnect on DTR drop 556 PCP103H EQU 2 103 handshake 557 PCTSMTR BSS 1 initial state of our transmitters 558 PCTRI EQU BIT 24 ring indicator 559 PCTCARD EQU BIT 25 carrier detect 560 PCTDTR EQU BIT 26 data terminal ready/data set ready 561 PCTRTS EQU BIT 28 request to send/clear to send 562 PCHTD BSS 1 horizontal tab delay (MS) 563 PCBRCH BSS 1 'break' character 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 178 (OPRQINFOMACS) F 11 564 PCSITE BSS 2 site name for terminal (pak12) 565 PCTERMTYPE BSS 2 terminal type (pak12) 566 BSS 12 expansion 567 DRCT 568 PCLENGTH EQU DISPW PCPROTO 569 ORG PCPROTO 570 EMAC end of PORTFILE 571 572 573 PORTINFORD MACRO 574 NOLIST 575 $P 576 BOX 577 578 Information returned by the port information request. 579 580 EBOX 581 582 POPROTO BASE R0 583 POPORTNUM BSSB 32-17 the port being considered 584 POENTLEN BSSB 17 length of this entry in words 585 POWORDZ BSSB 32/2 586 * EQU POWORDZ/BIT 31 unused 587 POINTER EQU POWORDZ/BIT 30 "interactive terminal" 588 PODIALUP EQU POWORDZ/BIT 29 dialup port 589 POINHIB EQU POWORDZ/BIT 28 port is inhibited 590 PORFP EQU POWORDZ/BIT 27 remote front panel port 591 POPROCNUM BSSB 32/2 session number (zero if none) 592 POIBAUD BSS 1 input baud rate 593 POOBAUD BSS 1 output baud rate 594 POTTYPE BSS 1 *old* terminal "type" (use POTERMTYPE) 595 POICNT BSS 1 input character count 596 POOCNT BSS 1 output character count 597 POINTSTATE BSSC 1 interface state 598 POLASTST BSSC 1 last status from PORT 599 POLASTCOM BSSC 1 last command sent to PORT 600 POCIAPORT BSSC 1 actual port number on CIA 601 POTIMECNT BSS 1 timing count 602 POSITE BSS 2 site name for terminal (pak12) 603 POTERMTYPE BSS 2 terminal type (pak12) 604 DRCT 605 POLENGTH EQU DISPW POPROTO 606 POLOG EQU POLENGTH LOG 2 607 ORG POPROTO reclaim the space 608 EMAC end of PORTINFORD 609 610 611 TRINFORD MACRO 612 NOLIST 613 $P 614 BOX 615 616 Information returned by the stop trace request. 617 618 EBOX 619 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 179 (OPRQINFOMACS) F 11 620 TIPROTO BASE R0 621 TISLOT BSSB 4 slot number of CPU creating this entry 622 TIEVENT BSSB 10 class and event number 623 TITIME BSSB 18 right bits of clock 624 TIR0 BSS 1 contents of R0 at time of event 625 TIR1 BSS 1 contents of R1 at time of event 626 TIR2 BSS 1 contents of R2 at time of event 627 DRCT 628 TILENGTH EQU DISPW TIPROTO entry length 629 ORG TIPROTO 630 EMAC 631 632 633 VOLINFORD MACRO 634 NOLIST 635 $P 636 BOX 637 638 Information returned on volumes by the volume 639 information request. 640 641 EBOX 642 643 VIPROTO BASE R0 644 VIWORDZ BSSB 32-17 645 VIINHIB EQU VIWORDZ/BIT 31 on if access inhibited 646 VINOTMNT EQU VIWORDZ/BIT 30 on if not completely mounted 647 VISYSVOL EQU VIWORDZ/BIT 29 on if the system volume 648 VIQDW EQU VIWORDZ/BIT 27 on if writes queued 649 VIQDR EQU VIWORDZ/BIT 26 on if reads queued 650 VIADTBZY EQU VIWORDZ/BIT 25 on if ADT access busy 651 VIMAIM EQU VIWORDZ/BIT 24 on if maintenance mounted only 652 VIENTLEN BSSB 17 length of this entry in words 653 VIDNAME BSS 1 "name" of the drive (PAK6) 654 VIVNAME BSS 2 volume name (PAK12) 655 VIVNUM BSSB 8 system volume index number 656 VIBUSY BSSB 32-8 volume busy counter 657 VIFREEBLK BSS 1 free blocks on the volume 658 VITOTBLK BSS 1 total blocks on volume 659 VIACCTNUM BSS 1 number of accounts on the volume 660 VIREALNAME BSS 2 real name on volume label 661 DRCT 662 VILENGTH EQU DISPW VIPROTO 663 VILOG EQU VILENGTH LOG 2 664 ORG VIPROTO reclaim space 665 EMAC end of VOLINFORD 666 667 668 BKUPINFORD MACRO 669 NOLIST 670 $P 671 BOX 672 673 Definition of system header made in backup. 674 675 EBOX 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 180 (OPRQINFOMACS) F 11 676 677 HDRPROTO BASE R0 678 BKUPHDRW1 BSS 1 first word of header 679 FILEINFOT EQU BITS 0:14 type of backup information 680 FILEINFOTV EQU 0 volume information 681 FILEINFOTA EQU 1 account information 682 FILEINFOTF EQU 2 file information 683 FILEINFOTD EQU 3 file page information 684 FILEINFOTM EQU 4 mapped file page information 685 BKUPREV EQU BITS 15:31 revision number 686 BKUPHDRW2 BSS 1 second word of header 687 FSTBKUPLEN EQU BITS 0:14 first optional length 688 SNDBKUPLEN EQU BITS 15:31 second optional length 689 DRCT 690 BKUPHDRLEN EQU DISPW HDRPROTO length of header 691 ORG HDRPROTO reclaim space 692 EMAC end of BKUPINFORD 693 694 695 VBSYINFORD MACRO 696 NOLIST 697 $P 698 BOX 699 700 Format of information returned by the volume busy 701 request. 702 703 EBOX 704 705 VBPROTO BASE R0 706 BSSB 15 filler 707 VBLENFLD BSSB 17 length of this entry, in words 708 VBACCTNM BSS 2 account name 709 VBDIVPRJ BSS 1 division/project name 710 DRCT 711 VBLNTH EQU DISPW VBPROTO 712 ORG VBPROTO reclaim space 713 EMAC end of VBSYINFORD 714 18 INPUT MACROINVOK invocation of used macros 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 181 (MACROINVOK) F 12 3 ********************************************************************************** 4 * * 5 * Invocation of macros that are used globally. * 6 * * 7 ********************************************************************************** 8 9 PORTFILE LIST 9 ********************************************************************************** 9 * * 9 * There is a file from which the system reads the * 9 * initial port configuration. That files format is described * 9 * herein. * 9 * The file is a RAF and the first words of it describe * 9 * the location of the entries for each port. Word zero of * 9 * the RAF (chars 0-3) is always zero so the file is not * 9 * mangled by other RAF users. Word 1 (PCPLENGTH) contains * 9 * the length of each port entry in characters and word 2 * 9 * (PCPBASE) gives the character base for the information for * 9 * port zero. Therefore, to find the information of a * 9 * particular port, a program positions to *+. * 9 * Each of the entries are considered "not specified" if * 9 * the sign bit of its word is not on. This excludes PCTERMA * 9 * and PCTERMT which are always there. * 9 * * 9 ********************************************************************************** 9 00000004 ABS 9 PCPLENGTH EQU 4 position of 4 chars giving length 00000008 ABS 9 PCPBASE EQU 8 position of 4 chars giving base 9 00000000 9 PCPROTO BASE R0 00160800 0 BASE 9 PCIBAUD BSS 1 input baud rate 00160801 0 BASE 9 PCOBAUD BSS 1 output baud rate 00160802 0 BASE 9 PCFUNCT BSS 1 00003010 BYTE 9 PCFCTSP EQU BIT 24 clear to send processing 00003210 BYTE 9 PCFXOFF EQU BIT 25 XON/XOFF processing 00003410 BYTE 9 PCFBRKOUT EQU BIT 26 don't output when recieving break 00003610 BYTE 9 PCFRDE EQU BIT 27 receive data enable 00003810 BYTE 9 PCCHKIP EQU BIT 28 1 sez check parity of input character 00003A20 BYTE 9 PCPGEN EQU BITS 29:30 parity generation of output characters 00003E10 BYTE 9 PCFSTOPB EQU BIT 31 stop bits (0=>1, 1=>2) 00160803 0 BASE 9 PCCARW BSS 1 carriage width 00160804 0 BASE 9 PCHEIGHT BSS 1 height of a page 00160805 0 BASE 9 PCCRD BSS 1 carriage return delay (MS) 00160806 0 BASE 9 PCLFD BSS 1 line feed delay (MS) 00160807 0 BASE 9 PCFFD BSS 1 form feed delay (MS) 00160808 0 BASE 9 PCBKSPC BSS 1 backspace character 00160809 0 BASE 9 PCLKILLC BSS 1 line kill character 0016080A 0 BASE 9 PCECHOM BSS 1 echo mode 0016080B 0 BASE 9 PCTERMT BSS 1 terminal type code (pak6) 0016080C 0 BASE 9 PCTERMG BSS 1 terminating character group 0016080D 0 BASE 9 PCTERMA BSS 8 terminating character array 00160054 0 CACH 9 PCLOCATION BSSC 30 text describing terminal location 0016081D 0 BASE 9 PCAUTOLOG BSS 10 auto logon account 00160827 0 BASE 9 PCIXOFF BSS 1 1 sez xoff port on input buffer full 00160828 0 BASE 9 PCFPROTO BSS 1 interface protocal 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 182 (MACROINVOK) F 12 00000000 ABS 9 PCPNONE EQU 0 none 00000001 ABS 9 PCPDISC EQU 1 disconnect on DTR drop 00000002 ABS 9 PCP103H EQU 2 103 handshake 00160829 0 BASE 9 PCTSMTR BSS 1 initial state of our transmitters 00003010 BYTE 9 PCTRI EQU BIT 24 ring indicator 00003210 BYTE 9 PCTCARD EQU BIT 25 carrier detect 00003410 BYTE 9 PCTDTR EQU BIT 26 data terminal ready/data set ready 00003810 BYTE 9 PCTRTS EQU BIT 28 request to send/clear to send 0016082A 0 BASE 9 PCHTD BSS 1 horizontal tab delay (MS) 0016082B 0 BASE 9 PCBRCH BSS 1 'break' character 0016082C 0 BASE 9 PCSITE BSS 2 site name for terminal (pak12) 0016082E 0 BASE 9 PCTERMTYPE BSS 2 terminal type (pak12) 9 BSS 12 expansion 9 DRCT 0000003C ABS 9 PCLENGTH EQU DISPW PCPROTO 9 ORG PCPROTO 10 11 DIRINFORD LIST 11 ********************************************************************************** 11 * * 11 * This is the format of information that is returned to * 11 * the user when he requests directory information. The * 11 * header is returned only when the .DIR is at load point. * 11 * After that the buffer is filled with an integral number of * 11 * entries, one for each file. * 11 * When the directory is exhausted, an end-of-data status * 11 * is returned. * 11 * * 11 ********************************************************************************** 11 00000000 11 DIRHINFO BASE R0 Header giving account information 00160800 0 BASE 11 DIRHLNTH BSS 1 Length of entry in words (now 8) 00160801 0 BASE 11 DIRFLAGS BSS 1 Flags 00080011 0 ZBM 11 DIRSHADOW EQU DIRFLAGS/BIT 0 On if a shadow account 00080211 0 ZBM 11 DIRFOREIGN EQU DIRFLAGS/BIT 1 On if account not at home here 00080411 0 ZBM 11 DIRNETWORK EQU DIRFLAGS/BIT 2 On if account accessed via network 00160802 0 BASE 11 DIRVOLUME BSS2 1 Volume account is on (PAK12) 00160804 0 BASE 11 DIRSYSTEM BSS 1 System account is on (PAK6) 00160805 0 BASE 11 DIRACCOUNT BSS2 1 Account name (PAK12) 00160807 0 BASE 11 DIRPROJECT BSS 1 Project of account (PAK6) 11 DRCT 00000008 ABS 11 DIRHWIDE EQU DISPW DIRHINFO Template length 11 ORG DIRHINFO Recover template space 11 11 11 ********************************************************************************** 11 * * 11 * Template for .DIR file entry block * 11 * * 11 ********************************************************************************** 11 00000000 11 DIREINFO BASE R0 Entry for individual file 00160800 0 BASE 11 DIRENTLEN BSS 1 Entry length in words 00160801 0 BASE 11 DIRNAME BSS2 1 Name of file (PAK12) 00160803 0 BASE 11 DIREXT BSS 1 File name extension (PAK6) 00160804 0 BASE 11 DIRCREATD BSS 1 Creation date 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 183 (MACROINVOK) F 12 00160805 0 BASE 11 DIRLACSD BSS 1 Last access date 00160806 0 BASE 11 DIRLMODD BSS 1 Last modified date 00160807 0 BASE 11 DIRLBKUPD BSS 1 Last backup date 11 00080108 0 ZBM 11 DIRTOTRACS BSSB 16 Total read accesses 00082108 0 ZBM 11 DIRTOTWACS BSSB 16 Total write accesses 11 00080109 0 ZBM 11 DIRRACS BSSB 16 Currently active EQUIPs for RO 00082109 0 ZBM 11 DIRWACS BSSB 16 Currently active EQUIPs for RW 11 0008010A 0 ZBM 11 DIRMWACS BSSB 16 Currently active EQUIPs for MW 0008218A 0 ZBM 11 DIRTFL BSSB 24 Total file length (in blocks) 0008118B 0 ZBM 11 DIRROOTBLK BSSB 24 Root block (or 0 if not GOD) 11 00160030 0 CACH 11 DIRTYPE BSSB 8 Type of file (see FSSTATDTYP) 0008104C 0 ZBM 11 DIRACCESS BSSB 4 Access allowed (see FSSTATACS) 0008182C 0 ZBM 11 DIRRAFTYPE BSSB 2 Empty, Tiny, Small, Large 11 BSSB 2 filler 00160032 0 CACH 11 DIRPRGINT BSSB 8 Purge interval 0008301C 0 ZBM 11 DIRPRGFLG BSSB 1 On if file was purged 0008321C 0 ZBM 11 DIRNOBKUP BSSB 1 On if file should not be backed up 0008341C 0 ZBM 11 DIRRCVRD BSSB 1 On if file recovered from backup 0008361C 0 ZBM 11 DIRFWWSC BSSB 1 On if file EQUIPed for W at crash 0008381C 0 ZBM 11 DIRFBC BSSB 1 On if file being closed 00083A1C 0 ZBM 11 DIRGHOST BSSB 1 On if file not yet recovered from backup 00083C1C 0 ZBM 11 DIRTRANS BSSB 1 On if file opened when user program crashed 00083E1C 0 ZBM 11 DIRFLOG BSSB 1 On if file access should be logged 11 11 BSSB 1 unused filler 0008021D 0 ZBM 11 DIRLRAF BSSB 1 On if a large (2 level) .RAF 0008050D 0 ZBM 11 DIRCUSE BSSB 16 current use count 11 0016080E 0 BASE 11 DIRUSRFLD BSS 1 user-definable field 0016080F 0 BASE 11 DIRSERNO BSS2 1 file serial number 00160810 0 BASE 11 DIRUNITNM EQU DIRSERNO(1) unit number for hardware devices 11 BSS 0 *** filler *** 11 DRCT 00000011 ABS 11 DIRENTWIDE EQU DISPW DIREINFO Template size in words 11 ORG DIREINFO Recover template space 12 13 FILESTAT LIST 13 ********************************************************************************** 13 * * 13 * Definition of the fields and values for the static and * 13 * dynamic statuses of a file. * 13 * * 13 ********************************************************************************** 13 13 * Format of File static status 13 * 13 * EQU BIT 0 always zero 00001C40 BYTE 13 FSSTATPRIV EQU BITS 14:17 privilege to access device 00002410 BYTE 13 FSSTATCRT EQU BIT 18 file was created by OPEN 00002630 BYTE 13 FSSTATACS EQU BITS 19:21 access allowed to device 13 * EQU BIT 22 unused - reserved 00002E10 BYTE 13 FSSTATABS EQU BIT 23 on if unit is absolute I/O 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 184 (MACROINVOK) F 12 00003010 BYTE 13 FSSTATWSC EQU BIT 24 on if file writing when system crashed 00003210 BYTE 13 FSSTATSAV EQU BIT 25 on if device in directory somewhere 00003460 BYTE 13 FSSTATDTYP EQU BITS 26:31 type code for the device 13 13 * Values for FSSTATPRIV 13 * (privilege implies what you would be allowed to have) 00000000 ABS 13 FSPRIVRW EQU 0 read/write 00000001 ABS 13 FSPRIVRO EQU 1 read only 00000002 ABS 13 FSPRIVMOD EQU 2 modify 00000003 ABS 13 FSPRIVXO EQU 3 execute only 00000008 ABS 13 FSPRIVBKUP EQU 8 backup 0000000F ABS 13 FSPRIVNOT EQU 0F no privilege 00003E10 BYTE 13 FSPRIVNWB EQU BIT 31 bit, if on, implies no write possible 13 * Values for FSSTATACS 13 * (access implies what you actually requested and have) 00000000 ABS 13 FSACSRW EQU 0 read/write 00000001 ABS 13 FSACSRO EQU 1 read only 00000002 ABS 13 FSACSAO EQU 2 append only 00000003 ABS 13 FSACSXO EQU 3 execute only 00000004 ABS 13 FSACSMW EQU 4 multiple write 00000005 ABS 13 FSACSDR EQU FSACSMW+1 multiple write 00000007 ABS 13 FSACSNDA EQU 7 no data access 00003E10 BYTE 13 FSACSNWB EQU BIT 31 bit, if on, sez no write possible 13 * Values for FSSTATDTYP 00000000 ABS 13 DTYPEUNDEF EQU 0 undefined and illegal 00000001 ABS 13 DTYPESAF EQU 1 sequential access file 00000002 ABS 13 DTYPERAF EQU 2 random access file 00000003 ABS 13 DTYPECODE EQU 3 code file 00000004 ABS 13 DTYPEPATH EQU 4 communication path 00000005 ABS 13 DTYPEDIR EQU 5 directory 00000006 ABS 13 DTYPENULL EQU 6 output eater 00000007 ABS 13 DTYPETERM EQU 7 interactive terminal 13 * EQU 8 unused (was lock) 00000009 ABS 13 DTYPETASK EQU 9 "batch" job submission unit 0000000A ABS 13 DTYPECDR EQU 10 card reader 0000000B ABS 13 DTYPELP EQU 11 line printer 0000000C ABS 13 DTYPEMT EQU 12 magnetic tape 0000000D ABS 13 DTYPECT EQU 13 cartridge magnetic tape 0000000E ABS 13 DTYPEVOL EQU 14 a volume 0000000F ABS 13 DTYPEVT EQU 15 video tape 00000010 ABS 13 DTYPELAST EQU 16 last code plus one 13 13 13 * Format of a file's dynamic status 00000010 BYTE 13 FDSTATAERR EQU BIT 0 on if error code not zero 00000880 BYTE 13 FDSTATLUN EQU BITS 4:11 lun having this status 00002040 BYTE 13 FDSTATRTYP EQU BITS 16:19 type of last record read 00002810 BYTE 13 FDSTATLP EQU BIT 20 on if device positioned at beginning 00002AB0 BYTE 13 FDSTATERR EQU BITS 21:31 error code 13 13 * Values for FDSTATRTYP - record types 00003810 BYTE 13 FDRTYPSYSB EQU BIT 28 if on, record is either EOD or EOF 00003E10 BYTE 13 FDRTYPEODB EQU BIT 31 if FDRTYPSYSB also, then EOD 00000000 ABS 13 FDRTYPTEXT EQU 0 text record 00000001 ABS 13 FDRTYPTXTF EQU 1 text with forms control 00000002 ABS 13 FDRTYPBIN EQU 2 binary record 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 185 (MACROINVOK) F 12 00000004 ABS 13 FDRTYPLBL EQU 4 label record 00000005 ABS 13 FDRTYPCOMM EQU 5 comment record 00000008 ABS 13 FDRTYPFM EQU 8 file mark (end of file, EOF) 00000009 ABS 13 FDRTYPEOD EQU 9 end of data (EOD) 0000000B ABS 13 FDRTYPAEOD EQU 11 abnormal end of date (AEOD) 14 15 BKUPINFORD LIST 15 ********************************************************************************** 15 * * 15 * Definition of system header made in backup. * 15 * * 15 ********************************************************************************** 15 00000000 15 HDRPROTO BASE R0 00160800 0 BASE 15 BKUPHDRW1 BSS 1 first word of header 000000F0 BYTE 15 FILEINFOT EQU BITS 0:14 type of backup information 00000000 ABS 15 FILEINFOTV EQU 0 volume information 00000001 ABS 15 FILEINFOTA EQU 1 account information 00000002 ABS 15 FILEINFOTF EQU 2 file information 00000003 ABS 15 FILEINFOTD EQU 3 file page information 00000004 ABS 15 FILEINFOTM EQU 4 mapped file page information 00001F10 BYTE 15 BKUPREV EQU BITS 15:31 revision number 00160801 0 BASE 15 BKUPHDRW2 BSS 1 second word of header 000000F0 BYTE 15 FSTBKUPLEN EQU BITS 0:14 first optional length 00001F10 BYTE 15 SNDBKUPLEN EQU BITS 15:31 second optional length 15 DRCT 00000002 ABS 15 BKUPHDRLEN EQU DISPW HDRPROTO length of header 15 ORG HDRPROTO reclaim space 16 17 UNDRPINFORD LIST 17 ********************************************************************************** 17 * * 17 * The under process structure read request returns the * 17 * following block of information for each process. * 17 * * 17 ********************************************************************************** 17 00000000 17 UNDRPROTO BASE R0 000800F0 0 ZBM 17 UNDRRSTR BSSB 15 process restrictions 00081F10 0 ZBM 17 UNDRELEN BSSB 17 length of this entry, in words 00080091 0 ZBM 17 UNDRLEVEL BSSB 9 level number of this under process 00081371 0 ZBM 17 UNDRPSN BSSB 23 process serial number of this process 00080172 0 ZBM 17 UNDRDPSN BSSB 23 process serial number of father 00082F72 0 ZBM 17 UNDRDBG BSSB 23 process serial number of debugger process 17 BSSB 18 reserved for future expansion 00160804 0 BASE 17 UNDRNAME BSS 2 process name 17 00081C10 0 ZBM 17 UNDRSTCTG1 EQU UNDRRSTR/BIT 31 on if group 1 restrictions (limit change) 00081A10 0 ZBM 17 UNDRSTCTG2 EQU UNDRRSTR/BIT 30 on if group 2 restrictions (catalog fetch) 00081810 0 ZBM 17 UNDRSTCTG3 EQU UNDRRSTR/BIT 29 on if group 3 restrictions (acct att. chng) 00081610 0 ZBM 17 UNDRSTCTG4 EQU UNDRRSTR/BIT 28 on if group 4 restrictions (unassigned) 00081410 0 ZBM 17 UNDRSTCTG5 EQU UNDRRSTR/BIT 27 on if group 5 restrictions (unassigned) 00081210 0 ZBM 17 UNDROPREQ EQU UNDRRSTR/BIT 26 on if operator requests restricted 00081010 0 ZBM 17 UNDRMAINTR EQU UNDRRSTR/BIT 25 on if maintenance read restricted 00080E10 0 ZBM 17 UNDRMAINTW EQU UNDRRSTR/BIT 24 on if maintenance write restricted 00080C10 0 ZBM 17 UNDRBACKUP EQU UNDRRSTR/BIT 23 on if backup requests restricted 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 186 (MACROINVOK) F 12 00080A10 0 ZBM 17 UNDRMANAGR EQU UNDRRSTR/BIT 22 on if manager requests restricted 00080810 0 ZBM 17 UNDREXO EQU UNDRRSTR/BIT 21 on if address space is execute only 00080610 0 ZBM 17 UNDRCNTLM EQU UNDRRSTR/BIT 20 on if in Control Mode 17 17 DRCT 00000006 ABS 17 UNDRPLONG EQU DISPW UNDRPROTO 00000003 ABS 17 UNDRPLOG EQU UNDRPLONG LOG 2 17 ORG UNDRPROTO recover lost space 18 19 LUINFORD LIST 19 ********************************************************************************** 19 * * 19 * The request that returns information on the local * 19 * units for a specific underprocess conforms to the following * 19 * format. * 19 * * 19 ********************************************************************************** 19 00000000 19 LUPROTO BASE R0 00160000 0 CACH 19 LUEQUIVS BSSB 8 number of units opened to this device 00081040 0 ZBM 19 LULASTREC BSSB 4 type of last record read 00081810 0 ZBM 19 LULOADPT BSSB 1 unit is currently position at the load point 00081A10 0 ZBM 19 LUTRANS BSSB 1 on if unit has transaction in progress 19 BSSB 1 reserved for future expansion 00081F10 0 ZBM 19 LUELEN BSSB 17 length of this entry (words) 19 00160004 0 CACH 19 LUUNIT BSSB 8 unit number having this status 00081121 0 ZBM 19 LUSSTAT BSSB 18 unit static status 19 BSSB 6 reserved for future expansion 19 00081041 0 ZBM 19 LUPRIV EQU LUSSTAT/BITS 14:17 privilege to access this device 00081811 0 ZBM 19 LUCRT EQU LUSSTAT/BIT 18 file created by OPEN 00081A31 0 ZBM 19 LUACS EQU LUSSTAT/BITS 19:21 access allowed to device 00082411 0 ZBM 19 LUWWC EQU LUSSTAT/BIT 24 on if file writing when system crashed 00082611 0 ZBM 19 LUSAVE EQU LUSSTAT/BIT 25 on if device in directory somewhere 00082861 0 ZBM 19 LUTYPE EQU LUSSTAT/BITS 26:31 type of device 19 00160802 0 BASE 19 LUVOLNM BSS 2 volume name for device 00160804 0 BASE 19 LUSYSNM BSS 1 system name for device 00160805 0 BASE 19 LUACCT BSS 2 account name for device 00160807 0 BASE 19 LUACCPROJ BSS 1 div/proj name for device 00160808 0 BASE 19 LUFILENM BSS 2 filename for device 0016080A 0 BASE 19 LUEXT BSS 1 filename extension for device 19 19 DRCT 0000000B ABS 19 LULONG EQU DISPW LUPROTO 00000004 ABS 19 LULOG EQU LULONG LOG 2 19 ORG LUPROTO recover lost space 19 19 INPUT HALTDEFS system halt definitions 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 187 (HALTDEFS) F 13 Definitions for operating system halts 4 5 ********************************************************************************** 6 * * 7 * Hardware provided displays * 8 * -------- -------- -------- * 9 * * 10 * The SSU and CPU may interact upon the discovery of * 11 * certain errors and display an appropriate error message in * 12 * the front panel display. This box contains a description * 13 * of those displays. * 14 * * 15 * POWER ON This display comes on when the SSU is cycling * 16 * MCLR and PFW after a power up start. * 17 * * 18 * BSE INIT This display comes on when BSE is already * 19 * asserted immediately after the SSU has * 20 * cycled MCLR and PFW. * 21 * * 22 * NO MEMORY This display comes on when the SSU finds no * 23 * MCU or SMU with memory at page zero. * 24 * * 25 * SELF TEST This display comes on while the SSU sends self * 26 * test commands to the other VRA modules, * 27 * waits two seconds and gets the WRU 15 (self * 28 * test responses). * 29 * * 30 * STF SLOTn This display comes on when the SSU gets either * 31 * a non-zero or a no response to a WRU 15. "n" * 32 * is the slot number of the offending module. * 33 * * 34 * NO CPU This display comes on when the SSU finds no CPU * 35 * in the system. * 36 * * 37 * BSE ACTIVE This display comes on when a module other than * 38 * the SSU is asserting BSE. * 39 * * 40 * ERRx SLOTn This display comes on when the SSU itself notices * 41 * a bus error. "x" is the error code (same as * 42 * the first digit of a WRU 1, and "n" is the slot * 43 * number of the offending module. * 44 * The codes for x are: * 45 * 1 - bus parity error * 46 * 2 - flags wrong or DBW bit wrong * 47 * 3 - bad command code * 48 * 4 - illegal address * 49 * 5 - RTO time out * 50 * 6 - response time out * 51 * 7 - illegal data * 52 * 8 - * 53 * 9 - data wrong during boot * 54 * A - bad WRU response * 55 * * 56 * CPUn ERRxx This display appears when a CPU sends the SSU a * 57 * CPU ERROR command. "n" is the slot number of * 58 * the CPU, and "xx" is the most significant byte * 59 * of the error data sent by the CPU. * 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 188 (HALTDEFS) F 13 Definitions for operating system halts 60 * * 61 * CPU ERROR CODES (Rev 12 and greater microcode) * 62 * * 63 * The CPU has two types of fatal errors: Bus errors * 64 * and CPU errors. When the CPU gets a Bus error, it asserts * 65 * BSE. When a CPU error occurs, a CPU error message is sent * 66 * to the SSU. In both cases, certain state information has * 67 * been saved by the CPU, and is accessable from the RFP. * 68 * * 69 * The state information is saved as follows: * 70 * * 71 * R11 (SP17) = Microstatus register 1 * 72 * R12 (SP18) = Microstatus register 2 ([28:31]=From register)* 73 * R13 (SP19) = Microstatus register 3 * 74 * R14 (SP20) = Input register 1 * 75 * R15 (SP21) = Input register 2 * 76 * R16 (SP22) = Output register 1 * 77 * R17 (SP23) = Output register 2 * 78 * R19 (SP24) [0:3] = Error code * 79 * [4:7] = Error parameter * 80 * [20:31] = ucode address where error was * 81 * detected * 82 * * 83 * The error codes are listed below. Error codes 1 * 84 * through 7 are Bus error codes and codes 8 through A are * 85 * CPU error codes. * 86 * * 87 * 1 --> Parity error on the Bus. * 88 * 2 --> Bad flags on the Bus. * 89 * 3 --> Bad command code on the Bus. * 90 * 4 --> Bad command address on the Bus. * 91 * 5 --> RTO timeout on the Bus. * 92 * 6 --> IBF timeout on the Bus. * 93 * 7 --> Parity and flag error on the Bus (same as * 94 * codes 1 and 2) * 95 * 8 --> Page fault during trap setup * 96 * 9 --> Page fault when trying to store console * 97 * area * 98 * A --> Hardware error * 99 * * 100 * The second digit of the error message is the error * 101 * parameter. These are used to indicate the type of word * 102 * which caused a flag or parity error. * 103 * * 104 * 0 --> No information * 105 * 1 --> Error in command word of received command * 106 * 2 --> Error in data word of received command * 107 * 3 --> Error in instruction fetch data * 108 * 4 --> Error in operand fetch data * 109 * 5 --> Error in pointer fetch data * 110 * 6 --> Error in interrupt poll data * 111 * 7 --> Error in trap fetch data * 112 * * 113 * POWER OFF This display comes on when the SSU sees the * 114 * Control Panel Power switch turned off. * 115 * * 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 189 (HALTDEFS) F 13 Definitions for operating system halts 116 * acdctempPF This display comes on when the SSU sees a power * 117 * failure of some kind. * 118 * AC PF AC Power Fail warning (detected by the AC * 119 * Power Fail Detector board or from memory power * 120 * failure). * 121 * DC PF Bad +5 VDC on the SSU. * 122 * TEMPPF Overtemperature in the main cardcage. * 123 * Note: more than one of these may be active at * 124 * a time. * 125 * * 126 * SSU ERR ps This display comes on when the SSU fails its own * 127 * self test. "p" is the primary error code, and * 128 * "s" is the secondary error code. The error codes * 129 * are listed below: * 130 * 1 -- Real Time Clock not ticking * 131 * 2 -- SSU Ram Error 0 -- Zeros test error * 132 * 1 -- #FF test error * 133 * 2 -- Address test error * 134 * 3 -- Complement address test error * 135 * 3 -- SSU Bus Error 1 -- Reset logic error * 136 * 2 -- WBTOR/status error * 137 * 3 -- Call back logic error * 138 * 4 -- Data path error * 139 * 5 -- Parity error when good * 140 * parity expected * 141 * 6 -- No parity error when bad * 142 * parity forced * 143 * 4 -- Control Panel Switch read/write error * 144 * 5 -- Bootstrap Eprom checksum error * 145 * 6 -- Bus Control Register read/write error * 146 * * 147 * SSU HALTxx This code is displayed when the SSU microcode * 148 * has detected an internal inconsistency that * 149 * makes it unlikely to be able to continue. * 150 * xx gives the reason (see list below). * 151 * * 152 * SSU HALT CODE LIST FOR REV 14 MICROCODE * 153 * This is a list of SSU halt codes for SSU * 154 * microcode rev 14. (The halt code lists for * 155 * earlier microcode revisions are different.) * 156 * There are only two ways to restart an SSU that * 157 * has halted. One way is to manipulate the SSU's * 158 * program counter with a hardware debugger. The * 159 * other way to restart a halted SSU is to power * 160 * down the VRA cardcage and then power it up * 161 * again. (This is done by cycling the front panel * 162 * power switch.) * 163 * * 164 * HALT CODE EXPLANATION * 165 * * 166 * SSU HALT01 CreateProc called with all Process blocks in use * 167 * SSU HALT02 DestroyProc called with no process to destroy * 168 * SSU HALT03 Timer.Wait called with too low of a base address * 169 * SSU HALT04 Timer in use when Timer.Wait called * 170 * SSU HALT05 Cancel.Timer called with no timer in use * 171 * SSU HALT06 Event.Wait called with both events in use * 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 190 (HALTDEFS) F 13 Definitions for operating system halts 172 * SSU HALT07 Cancel.Event called with no event in use * 173 * SSU HALT08 Cancel.Event called with incorrect event return index* 174 * SSU HALT09 PFW interrupt reached as general interrupt * 175 * SSU HALT0A CBN asserted with IBF unasserted * 176 * SSU HALT0B RFP.State = WF.Modem when starting from RXR interrupt* 177 * SSU HALT0C RFP.State = Send.Output when starting from RXR interrupt* 178 * SSU HALT0D RFP.State = Send.WF.CP when starting from RXR interrupt* 179 * SSU HALT0E RFP.State = WF.CP when starting from RXR interrupt * 180 * SSU HALT0F RFP.State = WF.Ring when entering from Txr Interrupt* 181 * SSU HALT10 RFP.State = WF.Modem when entering from Txr Interrupt* 182 * SSU HALT11 RFP.State = WF.Break when entering from Txr Interrupt* 183 * SSU HALT12 RFP.State = WF.CP when entering from Txr Interrupt * 184 * SSU HALT13 RFP.State = WF.Input.SOM when entering from Txr Interrupt* 185 * SSU HALT14 RFP.State = WF.InputChar when entering from Txr Interrupt* 186 * SSU HALT15 RFP.State = WF.Ring when entering from CP Interrupt * 187 * SSU HALT16 RFP.State = WF.Modem when entering from CP Interrupt* 188 * SSU HALT17 RFP.State = WF.Break when entering from CP Interrupt* 189 * SSU HALT18 RFP.State = Send.Output when entering from CP Interrupt* 190 * SSU HALT19 RFP.State = WF.Input.SOM when entering from CP Interrupt* 191 * SSU HALT1A RFP.State = WF.InputChar when entering from CP Interrupt* 192 * SSU HALT1B RFP.State = Send.Output when entering * 193 * SSU HALT1C RFP.State = Send.WF.CP when entering * 194 * SSU HALT1D RFP.State = WF.CP when entering from Short Timer interrupt* 195 * SSU HALT1E RFP.State = WF.Input.SOM when entering * 196 * SSU HALT1F RFP.State = WF.Ring when entering * 197 * SSU HALT20 RFP.State = Send.Output when entering * 198 * SSU HALT21 RFP.State = Send.WF.CP when entering * 199 * SSU HALT22 RFP.State = WF.CP when entering from Long Timer Interrupt* 200 * SSU HALT23 Trap for possible bugs, ReturnA with return index of 0* 201 * SSU HALT24 Trap for possible bugs, ReturnB with return index of 0* 202 * * 203 * HLTn ahhhh This display comes on when the CPU sends a CPU HALT * 204 * command to the SSU. "n" is the slot number of * 205 * the CPU. "ahhhh" is the halt code in the least * 206 * significant 22 bits of data from the CPU. Note: * 207 * if the halt code is all ones, the SSU will not * 208 * change the Control Panel display. * 209 * See the following descriptions of these codes. * 210 * * 211 * STPn ahhhh This display comes on when the CPU sends a CPU STOP * 212 * command to the SSU. "n" is the slot number of * 213 * the CPU. "ahhhh" is the stop code in the least * 214 * significant 22 bits of data from the CPU. Note: * 215 * if the stop code is all ones, the SSU will not * 216 * change the Control Panel display. * 217 * See the following descriptions of these codes. * 218 * * 219 * BOOT n This display comes on when the boot switch is * 220 * pushed. "n" is the value of the switches 1-4. * 221 * * 222 * FP RUNNING This display comes on when the Front Panel (RDU or * 223 * RITA) has control of the system. * 224 * * 225 * @@@@@@@@ These displays (and other similar ones) occur * 226 * ???????? when the logic driving the control panel * 227 * @ has failed or is not being clocked. * 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 191 (HALTDEFS) F 13 Definitions for operating system halts 228 * * 229 ********************************************************************************** 230 231 ********************************************************************************** 232 * * 233 * Other text displays * 234 * ----- ---- -------- * 235 * * 236 * See PROMBOOT for a description of its text error * 237 * messages. * 238 * During normal system operation, the front panel is * 239 * driven by the FPFLASHER routine in TIMER. That routine will * 240 * display one of the normal displays (selected by the FP * 241 * switches) alternating with any error messages. See the * 242 * timer routine for a description of the normal displays. * 243 * See the operator code for a description of the error * 244 * displays. * 245 * * 246 ********************************************************************************** 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 192 (HALTDEFS) F 13 Definitions for operating system halts 248 249 ********************************************************************************** 250 * * 251 * Operating System Halts * 252 * --------- ------ ----- * 253 * * 254 * The operating system is absolutely riddled with halts. * 255 * This is so that errors show up at the earliest possible * 256 * moment and give us a chance to find the source of the * 257 * problem. * 258 * In case bugs escape to the field, or a system has an * 259 * intermittant hardware problem, each halt has a unique code * 260 * associated with it. * 261 * The instruction word is sent to the SSU on a halt or a * 262 * stop. The SSU displays the HALT information on the front * 263 * panel. The left 3 characters on the display are "HLT" or * 264 * "STP" as appropriate. The next character is the slot * 265 * number of the CPU that sent the HALT or STOP. The next * 266 * character is a blank and the remaining 5 characters are * 267 * filled with the rightmost 22 bits of the instruction. The * 268 * left 6 bits are displayed as a 6 bit ASCII character and * 269 * the remaining 16 bits as 4 hex digits. * 270 * There are only a few STOP instructions. They are used * 271 * in those cases where a remedial course of action is readily * 272 * apparent and the cause of the error is at least partially * 273 * anticipated. A good example is that of a table filling up * 274 * where the extra entries can be safely discarded. The * 275 * operator may press run and the system will do its best to * 276 * continue operation. Even these STOPs, however, really * 277 * should not appear and their cause should be investigated. * 278 * * 279 ********************************************************************************** 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 193 (HALTDEFS) F 13 Definitions for operating system halts 281 282 ********************************************************************************** 283 * * 284 * Diagnostic actions * 285 * ---------- ------- * 286 * * 287 * When a halt or stop occurs, the appropriate code * 288 * should be found in the listing. To find them, use the * 289 * front panel display to produce a symbol of the form * 290 * 'HALTS10D1' or 'STOPF10A7'. This symbol may then be found * 291 * in the CREF for the OS. The definition will be found here * 292 * in the HALTDEFS file, and there will be one use of the * 293 * symbol. That place where the symbol is used often contains * 294 * commentary about what is in the registers, etc. * 295 * Any of these halts represents some problem discovered * 296 * by the system, generally quite a serious one. The notes in * 297 * this file give only a cursory feeling of what is happening. * 298 * In many cases, a HALT was inserted into the operating * 299 * system because it was easy to do, but we don't really * 300 * expect to see one. The 'bogus return from LIMITCHECK' is a * 301 * good example of this. Checking in the listing will just * 302 * show the HALT surrounded by relatively normal code and * 303 * commentary. * 304 * However, there are a number of halts that were * 305 * designed into the system to detect a specific class of * 306 * error. A check in the listing will reveal a more complete * 307 * description of the problem, and what registers mean what, * 308 * etc. These halts often get associated with a particular * 309 * bug, especially when the bug is not fixed right away. This * 310 * has the particular danger of causing that halt to assume a * 311 * low importance even after the bug is fixed. A good example * 312 * of this is the HLT S0007 that became intimately associated * 313 * with COMM input buffer overflows. This bug is now fixed, * 314 * yet anyone encountering a S0007 halt still thinks of it as * 315 * a known but not yet fixed COMM bug. Any new S0007 halts * 316 * now indicate some entirely different problem, or (ecch) * 317 * evidence that the bug is not really fixed. * 318 * Generally, the register readings should be recorded by * 319 * issuing a STATUS command to the RDU. In those cases where * 320 * the commentary indicates that a particular register * 321 * (generally R4) points to the console area (CA) of the * 322 * offending process, a dump of that CA is necessary (although * 323 * it is included in the crash dump, it is extremely helpful * 324 * to have without redialling the site to look at the crash * 325 * dump). * 326 * * 327 ********************************************************************************** 328 329 * HALT letter codes and meaning 00001460 BYTE 330 LETTERSPOT EQU BITS 10:15 position in HALT of letter 00020000 ABS 331 BHALT EQU ("B" AND 03F)*LETTERSPOT for bootstrap and power fail problems 00030000 ABS 332 CHALT EQU ("C" AND 03F)*LETTERSPOT control mode and system process errors 00040000 ABS 333 DHALT EQU ("D" AND 03F)*LETTERSPOT disk structure problem 00060000 ABS 334 FHALT EQU ("F" AND 03F)*LETTERSPOT a table has filled up 00080000 ABS 335 HHALT EQU ("H" AND 03F)*LETTERSPOT hardware problems 00090000 ABS 336 IHALT EQU ("I" AND 03F)*LETTERSPOT interrupt code error 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 194 (HALTDEFS) F 13 Definitions for operating system halts 000D0000 ABS 337 MHALT EQU ("M" AND 03F)*LETTERSPOT memory failure 00100000 ABS 338 PHALT EQU ("P" AND 03F)*LETTERSPOT for peripheral equipment problems 00130000 ABS 339 SHALT EQU ("S" AND 03F)*LETTERSPOT for system errors 00170000 ABS 340 WHALT EQU ("W" AND 03F)*LETTERSPOT errors from an offline utility 001A0000 ABS 341 ZHALT EQU ("Z" AND 03F)*LETTERSPOT for shutdown (sleep) errors 342 343 ********************************************************************************** 344 * * 345 * Important Notice!!! * 346 * All errors flagged with a star ("*") are security * 347 * violations. Exercise due caution in dealing with these * 348 * halts to avoid: * 349 * 1) offending customers who have accidently encountered one * 350 * 2) defeating the purpose of protecting BTI & proprietary * 351 * account owners. * 352 * * 353 ********************************************************************************** 354 002A0000 ABS 355 SVHLT EQU ("*" AND 03F)*LETTERSPOT for security violations 356 003FFFFF ABS 357 NOHALTCODE EQU -1/BITS 10:31 do not display HALT/STOP code in lights 358 359 * individual halt codes 360 361 * Power fail restart 362 * BHALT+01000 memory battery exhausted. Stored by SMU microcode 00021001 ABS 363 HALTB1001 EQU BHALT+01001 power up without corresponding power down processing 364 * This is the normal halt if power is 365 * cycled following a sleep. 00021004 ABS 366 HALTB1004 EQU BHALT+01004 VRA module missing at power up time 367 * This happens if someone changes the configuration 368 * of the system while it is powered down, e.g. by 369 * removing a CPU. 370 371 * PROMBOOT routine 00021002 ABS 372 HALTB1002 EQU BHALT+01002 power up, offline stuff not restartable 373 * B1002 is the normal halt if power is 374 * cycled following completion of off-line work. 00021003 ABS 375 STOPB1003 EQU BHALT+01003 recoverable error reading boot block 00022000 ABS 376 STOPB2XXX EQU BHALT+02000 disk DSKxxx failed self-test 377 378 * TAPEBOOT routine 00023010 ABS 379 HALTB3010 EQU BHALT+03010 invalid front panel switches for boot 00023011 ABS 380 HALTB3011 EQU BHALT+03011 *** to be determined *** 381 382 * TAPERECOVER routine 00023100 ABS 383 HALTB3100 EQU BHALT+03100 ran out of disk space in unusual circumstance 00023101 ABS 384 HALTB3101 EQU BHALT+03101 ran out of disk space allocating first sec block 00023102 ABS 385 HALTB3102 EQU BHALT+03102 ran out of disk space allocating second sec block 00023103 ABS 386 HALTB3103 EQU BHALT+03103 disk error reading IDX 00023104 ABS 387 HALTB3104 EQU BHALT+03104 disk error reading IDX 00023106 ABS 388 HALTB3106 EQU BHALT+03106 disk error reading IDX 00023107 ABS 389 HALTB3107 EQU BHALT+03107 disk error reading IDX 00023108 ABS 390 HALTB3108 EQU BHALT+03108 disk error reading IDX 00023109 ABS 391 HALTB3109 EQU BHALT+03109 duplicate account found 0002310A ABS 392 HALTB310A EQU BHALT+0310A duplicate file found 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 195 (HALTDEFS) F 13 Definitions for operating system halts 0002310B ABS 393 HALTB310B EQU BHALT+0310B in DUMMYACCT without a file or file page logical rec 0002310C ABS 394 HALTB310C EQU BHALT+0310C UDIR block overflow 0002310D ABS 395 HALTB310D EQU BHALT+0310D Illegal hardware type 0002310E ABS 396 HALTB310E EQU BHALT+0310E record miscompare on read twice option 0002310F ABS 397 HALTB310F EQU BHALT+0310F not recoverable tape error on reread 00023110 ABS 398 HALTB3110 EQU BHALT+03110 disk error reading UDIR 00023111 ABS 399 HALTB3111 EQU BHALT+03111 account not present for latecomer 00023112 ABS 400 HALTB3112 EQU BHALT+03112 excessive tape errors 00023113 ABS 401 HALTB3113 EQU BHALT+03113 excessive tape errors 402 403 * DISKCOPY routine 00023200 ABS 404 HALTB3200 EQU BHALT+03200 internal table error 00023201 ABS 405 HALTB3201 EQU BHALT+03201 internal table error 406 407 * DISKBOOT routine 00024004 ABS 408 HALTB4004 EQU BHALT+04004 no SSU found 00024011 ABS 409 HALTB4011 EQU BHALT+04011 disk error: volume label 00024012 ABS 410 HALTB4012 EQU BHALT+04012 disk error: security block 00024013 ABS 411 HALTB4013 EQU BHALT+04013 disk error: IDX 00024014 ABS 412 HALTB4014 EQU BHALT+04014 disk error: directory 00024015 ABS 413 HALTB4015 EQU BHALT+04015 system account not found 00024016 ABS 414 HALTB4016 EQU BHALT+04016 system or crashdump code file not found 00024017 ABS 415 HALTB4017 EQU BHALT+04017 crash dump file is not a code file 00024018 ABS 416 HALTB4018 EQU BHALT+04018 disk error: system file's CCB or data 00024019 ABS 417 HALTB4019 EQU BHALT+04019 system file not a CODE file 00024021 ABS 418 HALTB4021 EQU BHALT+04021 crashdump file not readable 00024022 ABS 419 HALTB4022 EQU BHALT+04022 crashdump file not writable 00024023 ABS 420 HALTB4023 EQU BHALT+04023 segment error status reading check segment 00024024 ABS 421 HALTB4024 EQU BHALT+04024 segment error status while writing 00024025 ABS 422 STOPB4025 EQU BHALT+04025 seek error while doing rezero operation 00024100 ABS 423 HALTB4100 EQU BHALT+04100 offline call to non-existent routine 424 425 * SALON (offline disk driver) 00024031 ABS 426 STOPB4031 EQU BHALT+04031 timeout during seek operation 427 428 * OPL (Offline Program Loader) 00025000 ABS 429 HALTB5000 EQU BHALT+05000 no PPU with comm found by OPL 00025001 ABS 430 HALTB5001 EQU BHALT+05001 no port boards found in first comm. 00025002 ABS 431 HALTB5002 EQU BHALT+05002 no EOP from read operation 00025003 ABS 432 HALTB5003 EQU BHALT+05003 comm not responding to output 00025004 ABS 433 HALTB5004 EQU BHALT+05004 boot switches too high for OPL 00025005 ABS 434 HALTB5005 EQU BHALT+05005 boot switches were too low for OPL 00025006 ABS 435 HALTB5006 EQU BHALT+05006 impossible fall out of IRJ loop 00025007 ABS 436 HALTB5007 EQU BHALT+05007 impossible fall out of JDR loop 437 438 * Halt definitions for DiskToTape. 439 * Halts in the packing process 00173210 ABS 440 HALTW3210 EQU WHALT+03210 first element in PRPQ was not volume name 00173211 ABS 441 HALTW3211 EQU WHALT+03211 wrong type encountered in PRPQ element 00173212 ABS 442 HALTW3212 EQU WHALT+03212 one of the disk blocks required for 443 * building a volume record is missing 00173213 ABS 444 HALTW3213 EQU WHALT+03213 bad PRPQ entry, wrong FBI type 445 446 * Halts in the encryption process 00173220 ABS 447 HALTW3220 EQU WHALT+03220 bad encryption format code 00173221 ABS 448 HALTW3221 EQU WHALT+03221 bad encrypt buffer size 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 196 (HALTDEFS) F 13 Definitions for operating system halts 449 450 * Halts in the tape writing process 00173230 ABS 451 HALTW3230 EQU WHALT+03230 could not write on tape, die for now 00173231 ABS 452 HALTW3231 EQU WHALT+03231 first record on TWQ was not fileset 00173232 ABS 453 HALTW3232 EQU WHALT+03232 could not write file mark 00173233 ABS 454 HALTW3233 EQU WHALT+03233 could not write end of tape record 00173234 ABS 455 HALTW3234 EQU WHALT+03234 could not write end of file set record 456 457 * 458 * Halt definitions for PieInTheSky volume rebuilder 459 * 00173300 ABS 460 HALTW3300 EQU WHALT+03300 Insufficient physical memory 00173301 ABS 461 HALTW3301 EQU WHALT+03301 Volume too large for program 462 463 464 * INITIAL 00026000 ABS 465 STOPB600X EQU BHALT+06000 memory is cabled wrong in slot X - RUN to ignore 00026040 ABS 466 HALTB6040 EQU BHALT+06040 PPL FBI table has filled up 00026044 ABS 467 HALTB6044 EQU BHALT+06044 no free pages for the initial process 468 * must rebuild or diskcopy system volume 469 470 * page fault processor 471 *** This batch of halts always represents errors in 472 *** OTHER parts of the system. Rather than getting 473 *** the CPU registers, remember that R4 of the CPU 474 *** that halted contains the console area address 475 *** for the failing process. Dump out the console 476 *** area (use DL in RDU) or execute the LDCA R4 477 *** instruction provided then dump the registers. 00130000 ABS 478 HALTS0000 EQU SHALT+0000 page fault with no user process running 00130001 ABS 479 HALTS0001 EQU SHALT+0001 monitor memory protect violation 00130002 ABS 480 HALTS0002 EQU SHALT+0002 VPAGE element not found 00130004 ABS 481 HALTS0004 EQU SHALT+0004 write into monitor memory 00130005 ABS 482 HALTS0005 EQU SHALT+0005 stop for unknown monitor page 00130007 ABS 483 HALTS0007 EQU SHALT+0007 reference to an unmapped window 00130008 ABS 484 HALTS0008 EQU SHALT+0008 wrong or not mapped virtual free storage 485 486 * MAPOUTFBI subroutine 0013001A ABS 487 STOPS001A EQU SHALT+001A PPLWINDOW is already mapped, check 488 * MFBILAST to see where last call was made from 489 490 * FINDVP routine 00130010 ABS 491 HALTS0010 EQU SHALT+00010 VM list changed out from under us 492 493 * memory parity error processing 000D00C0 ABS 494 HALTM00C0 EQU MHALT+000C0 another PE occurred while processing PE 000800C1 ABS 495 HALTH00C1 EQU HHALT+000C1 meaningless interrupt code (R2) on PE int 00080D00 ABS 496 HALTH0DSC EQU HHALT+00D00 a bus device is dead (gave no response) 000800C3 ABS 497 HALTH00C3 EQU HHALT+000C3 bus device giving repeated spurious errors 00080C00 ABS 498 HALTH0CSC EQU HHALT+00C00 abnormal data from device other than memory 499 * this normally means that a controller has 500 * failed to answer to some type of fetch. 501 * look for a dead controller in slot S, channel C. 000D00C5 ABS 502 HALTM00C5 EQU MHALT+000C5 parity error in OS tables 000D00C6 ABS 503 HALTM00C6 EQU MHALT+000C6 uncorrectable PE in resident OS 000D00C7 ABS 504 HALTM00C7 EQU MHALT+000C7 PE in resident OS while checksums not valid 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 197 (HALTDEFS) F 13 Definitions for operating system halts 001300C8 ABS 505 HALTS00C8 EQU SHALT+000C8 PAL not found 506 507 * dispatcher 00080021 ABS 508 HALTH0021 EQU HHALT+0021 mass storage error on required page 00130022 ABS 509 HALTS0022 EQU SHALT+0022 no PPL corresponding to recombined free storage page 00130023 ABS 510 HALTS0023 EQU SHALT+0023 used all of monitor memory 511 512 * scheduler 00130040 ABS 513 HALTS0040 EQU SHALT+0040 PCB not found on SQRUNNING 514 515 * liquidate a process 00130030 ABS 516 HALTS0030 EQU SHALT+0030 no PCB found for this process 00130031 ABS 517 HALTS0031 EQU SHALT+0031 no PCB found for this process 00130032 ABS 518 HALTS0032 EQU SHALT+0032 improper vanish call 00130033 ABS 519 HALTS0033 EQU SHALT+0033 improper vanish call 00130035 ABS 520 HALTS0035 EQU SHALT+0035 PPL busy count went negative 00130037 ABS 521 HALTS0037 EQU SHALT+0037 PPAGE list went bad 522 523 * ULBTWIDDLE routines 001300E0 ABS 524 HALTS00E0 EQU SHALT+00E0 fetchdir on a non-ULB 001300E1 ABS 525 HALTS00E1 EQU SHALT+00E1 freedir on a non-ULB 001300E2 ABS 526 HALTS00E2 EQU SHALT+00E2 freedir on already free directory 527 528 * WINDOW routines 00130062 ABS 529 HALTS0062 EQU SHALT+0062 attempted DUALWRITE of unlocked page 00130063 ABS 530 HALTS0063 EQU SHALT+0063 block not found in PPAGE list 00130064 ABS 531 STOPS0064 EQU SHALT+0064 window #1 not grubbed before XREQ return 00130065 ABS 532 STOPS0065 EQU SHALT+0065 window #2 not grubbed before XREQ return 533 534 * PROCINOUT routines 001300D0 ABS 535 HALTS00D0 EQU SHALT+00D0 PCB not found on SQxxxxx 001300D1 ABS 536 HALTS00D1 EQU SHALT+00D1 destroying UPC. VASP list didn't empty 001300D2 ABS 537 HALTS00D2 EQU SHALT+00D2 UERRSETY. Wrong PSA mapped. 538 539 * BLDPROCESS 00130070 ABS 540 HALTS0070 EQU SHALT+0070 no legal process number found for new process 00130071 ABS 541 HALTS0071 EQU SHALT+0071 could not initialize user free memory 00130072 ABS 542 HALTS0072 EQU SHALT+0072 could not reserve emergency user free memory 543 544 * GETMEM, FREEMEM 00130080 ABS 545 HALTS0080 EQU SHALT+0080 no free storage available 00130081 ABS 546 HALTS0081 EQU SHALT+0081 illegal block freed (low order bits) 00130082 ABS 547 HALTS0082 EQU SHALT+0082 illegal block freed (high order bits) 00130083 ABS 548 HALTS0083 EQU SHALT+0083 request for block larger than a page 00130084 ABS 549 HALTS0084 EQU SHALT+0084 request to free block larger than a page 550 551 * VGETMEM, VFREEMEM 00130086 ABS 552 HALTS0086 EQU SHALT+0086 wrong mapping while getting user memory 00130087 ABS 553 HALTS0087 EQU SHALT+0087 wrong mapping while freeing user memory 00130088 ABS 554 HALTS0088 EQU SHALT+0088 request for a block larger than a page 00130089 ABS 555 HALTS0089 EQU SHALT+0089 tried to free a block larger than a page 0013008A ABS 556 HALTS008A EQU SHALT+008A lost page out of the PSA 0013008B ABS 557 HALTS008B EQU SHALT+008B user ran out of free storage 0013008C ABS 558 HALTS008C EQU SHALT+008C completely out of physical primary storage 0013008D ABS 559 HALTS008D EQU SHALT+008D couldn't supply user any virtual pages 0013008E ABS 560 HALTS008E EQU SHALT+008E no idle pages for user memory lists 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 198 (HALTDEFS) F 13 Definitions for operating system halts 0013008F ABS 561 HALTS008F EQU SHALT+008F PPL not in FSPPLIST where it should be 562 563 * STACKER 00130090 ABS 564 HALTS0090 EQU SHALT+0090 stack overflow found by DROPCA 00130091 ABS 565 HALTS0091 EQU SHALT+0091 stack overflow found by FREESTACK 566 567 * GETPUTADT 001300A0 ABS 568 HALTS00A0 EQU SHALT+00A0 bad voln table 001300A1 ABS 569 HALTS00A1 EQU SHALT+00A1 duplicate entry while moving entries to disk 570 * THIS IS SERIOUS!!! Run REBUILD on the volume! 001300A3 ABS 571 HALTS00A3 EQU SHALT+00A3 no free lists in use, contrary indication 001300A4 ABS 572 HALTS00A4 EQU SHALT+00A4 no ADT list busy - which list was I using? 000400A5 ABS 573 HALTD00A5 EQU DHALT+00A5 error in both security blocks 001300A6 ABS 574 HALTS00A6 EQU SHALT+00A6 attempt to create too many ADT lists 575 576 * I/O interrupt processor 00090800 ABS 577 HALTI0800 EQU IHALT+0800 SLOTTABLE was garbage or 578 * interrupt from unbelievable slot 00090801 ABS 579 HALTI0801 EQU IHALT+0801 channel table garbage or interrupt 580 * from unbelievable device 581 582 * interrupt sorter 00080050 ABS 583 HALTH0050 EQU HHALT+0050 bad instruction from monitor 00080051 ABS 584 HALTH0051 EQU HHALT+0051 instruction trap from monitor 585 586 * MS driver 00130101 ABS 587 HALTS0101 EQU SHALT+0101 write: FBIDA and PPBLOCK disagree 00130102 ABS 588 HALTS0102 EQU SHALT+0102 remount: matched VOLN HCB <> 0 00100103 ABS 589 HALTP0103 EQU PHALT+0103 error writing non-substitutable block 00130104 ABS 590 HALTS0104 EQU SHALT+0104 MDV element not found in MDV list 00130105 ABS 591 HALTS0105 EQU SHALT+0105 bad segment number in segment reconstructor 592 593 * clock driver routine 00080700 ABS 594 STOPH0700 EQU HHALT+0700 clock moved backwards 595 596 * CIA driver 00100200 ABS 597 STOPP0200 EQU PHALT+0200 CIA board magically appeared 598 599 * CIA utility 00130210 ABS 600 HALTS0210 EQU SHALT+0210 terminator not found in block that claims it 00130213 ABS 601 HALTS0213 EQU SHALT+0213 bad command code passed 00130214 ABS 602 HALTS0214 EQU SHALT+0214 empty PSPROCLIST in CHECKLOGD 603 604 * CPUPATCH process 001310A0 ABS 605 HALTS10A0 EQU SHALT+010A0 patch for this rev level disappeared 606 607 * FREEFILE process 001310B0 ABS 608 HALTS10B0 EQU SHALT+010B0 passed garbage for type to free 001310B1 ABS 609 HALTS10B1 EQU SHALT+010B1 quit when error log file really bad 001310B2 ABS 610 HALTS10B2 EQU SHALT+010B2 called to free a swapping block 611 612 * accounting process 001310C0 ABS 613 HALTS10C0 EQU SHALT+010C0 couldn't unequip work unit 614 615 * substitution process 001010D1 ABS 616 STOPP10D1 EQU PHALT+010D1 multiple disk errors. go tries to continue 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 199 (HALTDEFS) F 13 Definitions for operating system halts 001010D2 ABS 617 HALTP10D2 EQU PHALT+010D2 error on bad trax block 001010D3 ABS 618 HALTP10D3 EQU PHALT+010D3 error on substitution block 000610D4 ABS 619 STOPF10D4 EQU FHALT+010D4 bad trax block is full. go to continue 001310D5 ABS 620 HALTS10D5 EQU SHALT+010D5 PPL not found 001310D6 ABS 621 HALTS10D6 EQU SHALT+010D6 substitution list entry not found 000610D7 ABS 622 STOPF10D7 EQU FHALT+010D7 substitution block is full 001310D8 ABS 623 HALTS10D8 EQU SHALT+010D8 substitution list element not found 624 625 * ULB manager 001310E0 ABS 626 HALTS10E0 EQU SHALT+010E0 bad ULB pointer given to FREEULB 001310E1 ABS 627 HALTS10E1 EQU SHALT+010E1 bad ULB pointer given to USEULB 001310E2 ABS 628 HALTS10E2 EQU SHALT+010E2 bad ULB pointer given to FREEULBLK 629 630 * DIOSETUP 00131300 ABS 631 HALTS1300 EQU SHALT+01300 locked page not found in VASP list 632 633 * Utility subroutines for logical units 001311F0 ABS 634 HALTS11F0 EQU SHALT+011F0 bad use count when linking FCB 635 636 * INITDEVACS 00131128 ABS 637 HALTS1128 EQU SHALT+01128 GFC use count went negative 00131129 ABS 638 HALTS1129 EQU SHALT+01129 GFC disappeared 639 640 * NOPEN code 00131131 ABS 641 HALTS1131 EQU SHALT+01131 illegal access for the file privilege 00131132 ABS 642 HALTS1132 EQU SHALT+01132 LIMITCHECK gave bogus return 00131133 ABS 643 HALTS1133 EQU SHALT+01133 LIMITCHECK gave bogus return 00131134 ABS 644 HALTS1134 EQU SHALT+01134 LIMITCHECK gave bogus return 00131135 ABS 645 HALTS1135 EQU SHALT+01135 LIMITCHECK gave bogus return 646 647 * SAF write code 00131108 ABS 648 HALTS1108 EQU SHALT+01108 LIMITCHECK gave bogus return 649 650 * RAF write code 00131110 ABS 651 HALTS1110 EQU SHALT+01110 existing DIR entry disappeared 00131111 ABS 652 HALTS1111 EQU SHALT+01111 LIMITCHECK gave bogus return 00131112 ABS 653 HALTS1112 EQU SHALT+01112 LIMITCHECK gave bogus return 00131113 ABS 654 HALTS1113 EQU SHALT+01113 LIMITCHECK gave bogus return 00131114 ABS 655 HALTS1114 EQU SHALT+01114 LIMITCHECK gave bogus return 00131115 ABS 656 HALTS1115 EQU SHALT+01115 LIMITCHECK gave bogus return 00131116 ABS 657 HALTS1116 EQU SHALT+01116 LIMITCHECK gave bogus return 658 00131118 ABS 659 HALTS1118 EQU SHALT+01118 existing DIR entry disappeared 0013111A ABS 660 HALTS111A EQU SHALT+0111A LIMITCHECK gave bogus return 0013111B ABS 661 HALTS111B EQU SHALT+0111B LIMITCHECK gave bogus return 0013111C ABS 662 HALTS111C EQU SHALT+0111C existing DIR entry disappeared 663 664 * terminal read code 00131120 ABS 665 HALTS1120 EQU SHALT+01120 no terminator in character list 666 667 * FRQCNTL 00131140 ABS 668 HALTS1140 EQU SHALT+01140 saved file not found by SRCHDIRSN 00131141 ABS 669 HALTS1141 EQU SHALT+01141 LIMITCHECK gave a bogus return 00131142 ABS 670 HALTS1142 EQU SHALT+01142 saved file not found by SRCHDIRSN 671 672 * FRQRAFCNTL 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 200 (HALTDEFS) F 13 Definitions for operating system halts 00131148 ABS 673 HALTS1148 EQU SHALT+01148 LIMITCHECK gave a bogus return 00131149 ABS 674 HALTS1149 EQU SHALT+01149 saved file directory entry disappeared 675 676 * implicit lock code 00131150 ABS 677 HALTS1150 EQU SHALT+01150 a lock control element disappeared 00131151 ABS 678 HALTS1151 EQU SHALT+01151 empty lock user ID list 679 680 * change file access 00131160 ABS 681 HALTS1160 EQU SHALT+01160 saved file not found in DIR 00131161 ABS 682 HALTS1161 EQU SHALT+01161 bogus access type 00131162 ABS 683 HALTS1162 EQU SHALT+01162 bogus access type 00131163 ABS 684 HALTS1163 EQU SHALT+01163 saved file not found in DIR 00131164 ABS 685 HALTS1164 EQU SHALT+01164 bogus access type 00131165 ABS 686 HALTS1165 EQU SHALT+01165 bogus access type 00131166 ABS 687 HALTS1166 EQU SHALT+01166 bogus access type 00131167 ABS 688 HALTS1167 EQU SHALT+01167 bogus access type 00131168 ABS 689 HALTS1168 EQU SHALT+01168 bogus access type 00131169 ABS 690 HALTS1169 EQU SHALT+01169 bogus access type 0013116A ABS 691 HALTS116A EQU SHALT+0116A bogus access type 0013116B ABS 692 HALTS116B EQU SHALT+0116B bogus access type 0013116C ABS 693 HALTS116C EQU SHALT+0116C bogus access type 0013116D ABS 694 HALTS116D EQU SHALT+0116D bogus access type 695 696 * SAVE code 00131170 ABS 697 HALTS1170 EQU SHALT+01170 saved file was not found in DIR 00131171 ABS 698 HALTS1171 EQU SHALT+01171 bogus access code 00131172 ABS 699 HALTS1172 EQU SHALT+01172 bogus access code 700 701 * unsave code 00131180 ABS 702 HALTS1180 EQU SHALT+01180 saved file no longer in DIR 00131181 ABS 703 HALTS1181 EQU SHALT+01181 bogus return from LIMITCHECK 704 705 * UNEQUIP code 00131191 ABS 706 HALTS1191 EQU SHALT+01191 FCB use count went negative 00131192 ABS 707 HALTS1192 EQU SHALT+01192 saved file no longer in DIR 00131193 ABS 708 HALTS1193 EQU SHALT+01193 disk error while closing unit list 00131198 ABS 709 HALTS1198 EQU SHALT+01198 UCE not found either global or local 00131199 ABS 710 HALTS1199 EQU SHALT+01199 list went bad 0013119A ABS 711 HALTS119A EQU SHALT+0119A couldn't find path control element 0013119C ABS 712 HALTS119C EQU SHALT+0119C file use count went negative 713 714 * RENAME code 001311A0 ABS 715 HALTS11A0 EQU SHALT+011A0 saved file no longer in directory 716 717 * SHARE/UNSHARE 001311B0 ABS 718 HALTS11B0 EQU SHALT+011B0 saved file disappeared 001311B1 ABS 719 HALTS11B1 EQU SHALT+011B1 LIMITCHECK returned impossible error 001311B2 ABS 720 HALTS11B2 EQU SHALT+011B2 LIMITCHECK returned impossible error 721 722 * catalog information request 001311C0 ABS 723 HALTS11C0 EQU SHALT+011C0 serious error, saved file not in DIR 001311C1 ABS 724 HALTS11C1 EQU SHALT+011C1 serious error, saved file not in DIR 001311C2 ABS 725 HALTS11C2 EQU SHALT+011C2 garbage in share list 726 727 * set account attribute 001311D0 ABS 728 HALTS11D0 EQU SHALT+011D0 bad index, was okay 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 201 (HALTDEFS) F 13 Definitions for operating system halts 729 730 * XRQUREQ1, XRQUREQ2, XRQUREQ3, and XRQUREQ4 001311E0 ABS 731 HALTS11E0 EQU SHALT+011E0 couldn't find under program 001311E1 ABS 732 HALTS11E1 EQU SHALT+011E1 stop if under program disappeared 001311E2 ABS 733 HALTS11E2 EQU SHALT+011E2 couldn't get back to over program 001311E3 ABS 734 HALTS11E3 EQU SHALT+011E3 underprogram disappeared 001311E5 ABS 735 HALTS11E5 EQU SHALT+011E5 run unit not found 736 737 * user interrupt processor 00031200 ABS 738 HALTC1200 EQU CHALT+01200 control mode error 00031201 ABS 739 HALTC1201 EQU CHALT+01201 system process error 00031202 ABS 740 HALTC1202 EQU CHALT+01202 mem error giving int to CM 741 742 * Operator requests 00031210 ABS 743 HALTC1210 EQU CHALT+01210 attempt to log off nobody 00131211 ABS 744 HALTS1211 EQU SHALT+01211 FCBs left in PSA 001A1212 ABS 745 HALTZ1212 EQU ZHALT+01212 can't get rid of volume 001A1213 ABS 746 HALTZ1213 EQU ZHALT+01213 system was sleeping and another request came in 00131214 ABS 747 HALTS1214 EQU SHALT+01214 volume went busy when not possible 00031215 ABS 748 HALTC1215 EQU CHALT+01215 erroneous parameter from CM 00031216 ABS 749 HALTC1216 EQU CHALT+01216 underprocesses left at logoff 00131218 ABS 750 HALTS1218 EQU SHALT+01218 giveaway unit disappeared 751 752 * auth list requests 00131224 ABS 753 HALTS1224 EQU SHALT+01224 LIMITCHECK returned impossible error 00131225 ABS 754 HALTS1225 EQU SHALT+01225 test indicates big account after known not 00131226 ABS 755 HALTS1226 EQU SHALT+01226 now sez big account, previously not 00131227 ABS 756 HALTS1227 EQU SHALT+01227 LIMITCHECK returned impossible error 00131228 ABS 757 HALTS1228 EQU SHALT+01228 previous manager account now super account 00131229 ABS 758 HALTS1229 EQU SHALT+01229 previous manager account now super account 759 760 * process creation 00131230 ABS 761 HALTS1230 EQU SHALT+01230 illegal device type in FCB 00131231 ABS 762 HALTS1231 EQU SHALT+01231 illegal device type in FCB 763 764 * AFTMANGLE 00061250 ABS 765 HALTF1250 EQU FHALT+01250 quit for full AFT or IDX 00131251 ABS 766 HALTS1251 EQU SHALT+01251 table overflow while expanding, impossible 00131252 ABS 767 HALTS1252 EQU SHALT+01252 dup entry while expanding table, impossible 00041253 ABS 768 STOPD1253 EQU DHALT+01253 disk error 00041254 ABS 769 HALTD1254 EQU DHALT+01254 both security blocks bad 00131255 ABS 770 HALTS1255 EQU SHALT+01255 new table too small while expanding IDX or AFT 771 772 * HOURPROC 00041261 ABS 773 HALTD1261 EQU DHALT+01261 both security blocks bad 002A1270 ABS 774 HLTSV1270 EQU SVHLT+01270 authorization to use system has expired 775 776 * Backup and Recovery requests 00131280 ABS 777 HALTS1280 EQU SHALT+01280 file gone when expanding to large RAF 00041281 ABS 778 HALTD1281 EQU DHALT+01281 could read neither copy of security block 00131282 ABS 779 HALTS1282 EQU SHALT+01282 file gone when expanding to large RAF 780 781 * Initial process 00027001 ABS 782 HALTB7001 EQU BHALT+07001 couldn't mount pack label 00027002 ABS 783 HALTB7002 EQU BHALT+07002 system volume could not be mounted 00027003 ABS 784 HALTB7003 EQU BHALT+07003 account finder table is bad 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 202 (HALTDEFS) F 13 Definitions for operating system halts 00027004 ABS 785 HALTB7004 EQU BHALT+07004 could not fit IDX into brand new AFT 00027007 ABS 786 HALTB7007 EQU BHALT+07007 no CM corresponding to system 787 * This stop is only temporary 00027008 ABS 788 STOPB7008 EQU BHALT+07008 couldn't write to terminal.config file 00027009 ABS 789 HALTB7009 EQU BHALT+07009 error on control mode file 0002700A ABS 790 HALTB700A EQU BHALT+0700A lun no longer in list 0002700B ABS 791 HALTB700B EQU BHALT+0700B could not unequip CM file 0002700C ABS 792 HALTB700C EQU BHALT+0700C not enough free space on system volume 0013700D ABS 793 HALTS700D EQU SHALT+0700D device type not in table when building HARDWARE.SYS 0013700E ABS 794 HALTS700E EQU SHALT+0700E could not find file in UDIR 795 796 * unauthorized resource module halts in initial. 797 * Form is SVHLT + 07000 + * 100 + 798 * * 10 + <0 for controller, 1 for units> 002A7000 ABS 799 HLTSV7000 EQU SVHLT+07000 system operation is no longer authorized 002A7100 ABS 800 HLTSV7100 EQU SVHLT+07100 unauthorized MCU 002A7101 ABS 801 HLTSV7101 EQU SVHLT+07101 more memory than authorized 002A7200 ABS 802 HLTSV7200 EQU SVHLT+07200 unauthorized CPU 002A7300 ABS 803 HLTSV7300 EQU SVHLT+07300 unauthorized PPU 002A7310 ABS 804 HLTSV7310 EQU SVHLT+07310 unauthorized disk controller 002A7311 ABS 805 HLTSV7311 EQU SVHLT+07311 unauthorized disk unit 002A7320 ABS 806 HLTSV7320 EQU SVHLT+07320 unauthorized line printer (controller & unit) 002A7380 ABS 807 HLTSV7380 EQU SVHLT+07380 unauthorized comm controller 002A7381 ABS 808 HLTSV7381 EQU SVHLT+07381 unauthorized comm port board 002A7390 ABS 809 HLTSV7390 EQU SVHLT+07390 unauthorized mag tape controller 002A7391 ABS 810 HLTSV7391 EQU SVHLT+07391 unauthorized mag tape unit 002A73A0 ABS 811 HLTSV73A0 EQU SVHLT+073A0 unauthorized cartridge tape controller 002A73A1 ABS 812 HLTSV73A1 EQU SVHLT+073A1 unauthorized cartridge tape unit 002A73B0 ABS 813 HLTSV73B0 EQU SVHLT+073B0 unauthorized video tape controller 002A73B1 ABS 814 HLTSV73B1 EQU SVHLT+073B1 unauthorized video tape unit 20 INPUT PAGEDEFS definitions for memory allocation 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 203 (PAGEDEFS) F 14 Virtual Page Definitions 4 5 ********************************************************************************** 6 * * 7 * Monitor Virtual Pages * 8 * * 9 * Page 0 [00000] * 10 * Physical page zero is mapped into monitor virtual page * 11 * zero during bootstrap and power fail recovery operations and * 12 * contains the code (either bootstrap or power up) and * 13 * appropriate tables. This page file entry is cleared by the * 14 * system at the end of the initial code and remains excluded * 15 * during normal system operation except when it is * 16 * specifically mapped in for the updating of the page map on * 17 * physical page zero (PFMAP). Because this virtual page is * 18 * illegal to reference (in general) any bug that causes a * 19 * reference to this page will be trapped in the page fault * 20 * processer rather than continuing to trash monitor memory. * 21 * Page 1 [00400] (CPUPAGE) * 22 * This virtual page is used only for variables local to a * 23 * single CPU including the Interrupt Vector Table (IVT). Each * 24 * CPU must have its own distinct physical page. However, * 25 * since a CPU needs only a small number of local variables, * 26 * the remainder of the physical page is available for other * 27 * use. Therefore, each physical page used as a CPU page is * 28 * also mapped into the page file in another virtual memory * 29 * location common to all CPUs and the remaining space in the * 30 * physical page is used for other tables or free storage by * 31 * using the virtual addresses that are common to all CPUs. * 32 * This page should not be pre-initialized by assembling * 33 * anything into it since it is not loaded by initial. * 34 * * * * * 35 * Window pages are pages in the monitor address space * 36 * that are treated like user virtual pages. That is, they * 37 * have their page file locations loaded and unloaded along * 38 * with the rest of the users pages, and page faults cause a * 39 * swap in. They are provided so that the virtual monitor has * 40 * virtual buffer space for each user. * 41 * Page 2 [00800] (WNDO1) * 42 * Page 3 [00C00] (WNDO2) * 43 * These virtual pages are used for the executive request * 44 * processor windows. * 45 * Page 4 [01000] (WNDO3) * 46 * This is the window used by any routines that might run * 47 * under the XREQ processor, such as the ADT manager. The XREQ * 48 * processor windows must not be disturbed by subsidiary * 49 * routines, so this window is provided as a scratch location * 50 * for them. * 51 * Page 5 [01400] (WNDO4) * 52 * This window is used by the mass storage driver routines * 53 * that deal with error correction and page copying. It may * 54 * also be used by other I/O devices. * 55 * Page 6 [01800] (CIX) * 56 * This virtual page is used as a temporary page file * 57 * location for conversations with the I/O devices. * 58 * * * * * 59 * Each resident page from 7 on is mapped to * 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 204 (PAGEDEFS) F 14 Virtual Page Definitions 60 * exactly the same physical page by the page * 61 * map in all of the CPUs. * 62 * Page 7 [01C00] (HEADPAGE) * 63 * This virtual page is used for inter-CPU communication * 64 * (the system variable area). Each CPU maps the same physical * 65 * page into this location. Since the system variable area * 66 * does not use the entire area, the remainder of this physical * 67 * page is available for other use. In order to waste as * 68 * little space as possible, the physical page used here * 69 * contains a block of CPU local variables (mapped into page 1 * 70 * of only one CPU), the block of system variables (mapped into * 71 * page 7 of all CPUs), and the remaining space is used for * 72 * free storage (using the page 7 virtual addresses which are * 73 * common to all CPUs). * 74 * Page 8 [02000] (INITIAL) * 75 * This virtual page contains the initialization routines. * 76 * After system initialization, it is set excluded and the * 77 * physical page is available for use. The virtual page bit * 78 * in the AVPAGES array is set so that the monitor virtual * 79 * page may be subsequently used for free space. * 80 * * * * * 81 * Resident Pages * 82 * The resident monitor consists of code that must be * 83 * available at all times to service interrupts. This * 84 * includes: * 85 * I/O drivers and support routines * 86 * Interrupt handlers for PF, XREQ, parity error, IAPR * 87 * Code associated with the scheduling and dispatching * 88 * of processes. * 89 * During the bootstrap operation, the page file is * 90 * loaded so that each virtual page needed by the operating * 91 * system (as determined from the CCB) is allocated in the * 92 * next available page in the first memory. The bootstrap * 93 * then reads in the operating system. In initialization, * 94 * the system code may be spread between the available * 95 * memories (see the routine SPREADSYS in INITIAL). Once * 96 * this (potential) move is completed the physical pages are * 97 * completely locked in for the duration of the system * 98 * operation. The page files of each CPU are all set to * 99 * point to the physical memory as appropriate and this * 100 * mapping remains throughout system operation. A table is * 101 * maintained on page zero so that this mapping may be * 102 * restored following a power failure. * 103 * Page 9 [02400] * 104 * This is the first page of resident code. * 105 * * * * * 106 * "Virtual Monitor" * 107 * The original plan for the operating system was for much * 108 * of the OS code to be swappable. There was no particular * 109 * problem in the page fault processor since the mechanism to * 110 * load a page was essentially the same as for any user page. * 111 * However, in order for this to work there can be no locks * 112 * held during execution of any code that might page fault. We * 113 * originally attempted to move the code requiring locks into * 114 * the resident part of the system and deal with the critical * 115 * region problem by calling the code that was guaranteed to be * 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 205 (PAGEDEFS) F 14 Virtual Page Definitions 116 * resident. Even this proved to be troublesome, however, * 117 * since a page fault could occur during the calling sequence. * 118 * Certain code (such as xGETMEM) has already locked a critical * 119 * region before returning for parameters. * 120 * In the end, the advent of 8 MB SMUs obviated the need * 121 * to expend any more energy on an intractable problem with, at * 122 * best, marginal improvement of the memory situation. * 123 * * * * * 124 * Monitor Table Space * 125 * The operating system constructs essentially all of its * 126 * "tables" in the form of linked lists. Routines called * 127 * xGETMEM and xFREEMEM are used to allocate storage for use * 128 * in these linked lists. See those routines for a description * 129 * of the methods used to manage the monitor free space. This * 130 * free space is divided into two major subdivisions. First, * 131 * that which is global and which must be present at essentially * 132 * all times that operating system code is running. This space * 133 * is limited by the size of the monitor address space. Second, * 134 * that space which is required only while the operating system * 135 * is dealing with a particular user. We have allocated four * 136 * pages of virtual address space that are mapped and unmapped * 137 * as required. See the description which follows labeled * 138 * "user table space". * 139 * The initial process only runs when the system is first * 140 * booted. This code may occupy up to two pages. Since * 141 * monitor address space is scarce, the last operation of the * 142 * initial process is to make the pages that it occupies * 143 * available in the AVPAGES array. * 144 * The virtual addresses from the end of the initial process * 145 * pages to the start of the user memory lists are all available * 146 * for allocation as free storage addresses. A bit array called * 147 * AVPAGES indicates whether a virtual page is in use or not. * 148 * These virtual pages are all managed by the dispatcher code * 149 * FSXPAND (or the initial code FREECHECK). When a physical * 150 * page is allocated to a particular monitor virtual page, the * 151 * appropriate page map value is loaded into the PFMAP array * 152 * on page zero (which is especially mapped and unmapped for * 153 * this update), and the appropriate monitor page file location * 154 * is loaded in all CPUs (and remains loaded during normal * 155 * system operation). * 156 * FBI Window * 157 * This window is used for any references to a resident * 158 * FBI. * 159 * There exists an FBI for each page. These FBIs are read * 160 * on disk reads, possibly modified while the page is resident, * 161 * and written on disk writes. Each FBI must be allocated * 162 * space for the entire time that the corresponding page is * 163 * resident. In order to avoid consuming monitor address space * 164 * for these FBIs they are mapped only as needed. That is, a * 165 * single virtual page is reserved to point to the physical * 166 * page containing the FBI currently of interest. The initial * 167 * code allocates an FBI each time it generates a PPL for a * 168 * page. The PPL indexes a table of page map values (rather * 169 * than attempting to store PMVs in each PPL) and provides the * 170 * offset into the physical page. * 171 * There are special provisions in crashdump to save the * 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 206 (PAGEDEFS) F 14 Virtual Page Definitions 172 * pages containing the FBIs. * 173 * User Memory Lists * 174 * In order to allow the best use of the available monitor * 175 * address space, we have segregrated the system lists into two * 176 * groups, those that must be addressable at all times and * 177 * those that may be unmapped when the associated user is not * 178 * dispatched. Four pages of monitor address are reserved for * 179 * these mappable user lists and special GETMEM and FREEMEM * 180 * routines are provided to manage the free space. The * 181 * routines MAPINMEM and MAPOUTMEM are provided to load and * 182 * unload the appropriate page file locations. A map-in is * 183 * normally done when the user page file is loaded and a * 184 * map-out is done when the page file is unloaded. A few * 185 * routines (such as WHICHHUNT) need access to the user lists * 186 * while the user is not dispatched so they call MAPINMEM and * 187 * MAPOUTMEM directly. * 188 * There are special provisions in crashdump to save the 4 * 189 * pages from each CPU. * 190 * * * * * 191 * Monitor Page File Appearance * 192 * 1) Everything not explicitly mentioned is marked * 193 * 'illegal to reference'. * 194 * 2) The monitor CPU pages are always loaded in * 195 * PF81 RW. Each CPU has a different physical * 196 * page. They are assigned during boot and do * 197 * not move. * 198 * 3) The headpage is always loaded in PF87 RW. * 199 * 4) All monitor code is loaded RO. * 200 * 5) All monitor table space is always loaded RW. * 201 * * * * * 202 * The following pages are subject to memory management, * 203 * which means that a page might not be loaded into the page * 204 * file even though its process has been dispatched. * 205 * * 206 * 6) Monitor windows are loaded RO or RW as appropriate * 207 * only when a process having them mapped has been * 208 * dispatched. * 209 * 7) User pages are loaded RO or RW as appropriate only * 210 * when a process having them mapped has been dispatched. * 211 * * 212 ********************************************************************************** 213 214 ORG ZERO(WPP) virtual page zero is not used 215 * except for boot and power up processing 216 00000400 217 CPUPAGE BSS WPP individual CPU information page 00000081 ABS 218 PNCPUPAGE EQU MONPF+(CPUPAGE DISPW ZERO)/WPP page number 219 00000800 220 WNDO1 BSS WPP primary window for xreq buffer system 00000082 ABS 221 PNWNDO1 EQU MONPF+(WNDO1 DISPW ZERO)/WPP page number 222 00000C00 223 WNDO2 BSS WPP secondary window 00003070 BYTE 224 PASIGBITS EQU BITS 24:30 all but low order bit of PAVPN 00000083 ABS 225 PNWNDO2 EQU MONPF+(WNDO2 DISPW ZERO)/WPP page number 00000041 ABS 226 PNWNDO12 EQU PNWNDO2/PASIGBITS bits shared by PNWNDO1, PNWNDO2 227 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 207 (PAGEDEFS) F 14 Virtual Page Definitions 00001000 228 WNDO3 BSS WPP window for ADT routines 00000084 ABS 229 PNWNDO3 EQU MONPF+(WNDO3 DISPW ZERO)/WPP page number 230 00001400 231 WNDO4 BSS WPP mass storage driver window 00000085 ABS 232 PNWNDO4 EQU MONPF+(WNDO4 DISPW ZERO)/WPP page number 233 00001800 234 CIX BSS WPP channel index page 00000086 ABS 235 PNCIX EQU MONPF+(CIX DISPW ZERO)/WPP page number 236 00001C00 237 HEADPAGE BSS WPP inter-cpu variable page 00000087 ABS 238 PNHEADPAGE EQU MONPF+(HEADPAGE DISPW ZERO)/WPP page number 00001C80 239 FBIPOINTRS EQU HEADPAGE(080) table of PMVs for pages holding FBIs 240 00002000 241 INITPAGE BSS WPP this whole page is reserved for initialization 00000088 ABS 242 PNINITPAGE EQU MONPF+(INITPAGE DISPW ZERO)/WPP page number 243 244 ORG NPS*WPP-(MAXMAPVALS+1)*WPP FBI window 0001EC00 245 PPLWINDOW BSS WPP for mapping in pages of FBIs for PPLs 000000FB ABS 246 PNPPLWNDO EQU MONPF+(PPLWINDOW DISPW ZERO)/WPP page number 247 248 ORG NPS*WPP-(MAXMAPVALS*WPP) first "user virtual" page 0001F000 249 USERMEM LABEL page reserved for user memory lists 000000FC ABS 250 PNUSERMEM EQU MONPF+(USERMEM DISPW ZERO)/WPP page number 251 BSS WPP LOG 2 area for free memory lists 0000000A ABS 252 UMEMSIZE EQU DISPW USERMEM number of lists 253 BSS 3 filler 0001F00D 254 UMEMXTRA BSS 1 pointer to reserve memory 00000007 ABS 255 XALOG EQU 7 log size of reserve memory 0001F00E 256 UMEMPSA BSS 1 PSA associated with this storage 0001F00F 257 UMEMLOCK BSS 1 lock word for user free storage 258 * BSS (WPP-DISPW USERMEM)+(MAXMAPVALS-1)*WPP the rest of the area 259 260 ORG CPUPAGE restore LC to safe place 22 INPUT CPUPAGE definitions of CPUs variables 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 208 (CPUPAGE) F 15 CPU Page Definitions 3 4 ********************************************************************************** 5 * * 6 * RESIDENT TABLE DEFINITIONS * 7 * * 8 ********************************************************************************** 9 10 11 ********************************************************************************** 12 * * 13 * CPUPAGE * 14 * Due to the nature of this multi-processor system, each * 15 * CPU requires a small number of private variables for use * 16 * during interrupt processing, etc. This is provided by * 17 * having each CPU page file location CPUPAGE point to a * 18 * different physical page. Each CPU then has temporary * 19 * storage areas that are totally isolated from any other CPU, * 20 * but the exact same code will run properly on any CPU * 21 * without indexing tables by CPU number. Following are * 22 * definitions for this page. * 23 * * 24 ********************************************************************************** 25 26 ********************************************************************************** 27 * * 28 * Interrupting Devices Mask * 29 * This word is defined by the hardware. It is read up * 30 * by each CPU. Bits 0:15 contain a one bit for each * 31 * corresponding slot that may interrupt. This tells the CPU * 32 * what slots to poll when the bus interrupt line is asserted. * 33 * This word also contains in bits 28:31 the slot number of * 34 * the SSU that is running the front panel. This is so that * 35 * the CPU microcode knows where to send notice of any * 36 * problems that it might encounter. * 37 * * 38 ********************************************************************************** 39 40 ORG CPUPAGE(1) machine defined locations 00000401 41 INTABLSLOT BSS 1 mask of slots that may interrupt 42 * and SSU slot number 43 44 ********************************************************************************** 45 * * 46 * Interrupt Vector Table * 47 * In each entry, the first word is the new console area * 48 * pointer. The second is the new program counter. Each is * 49 * right justified. The rest is unused. * 50 * When an interrupt occurs, the CPU stores the registers * 51 * according to its current console register, picks up a new * 52 * CA and PC from the IVT, fixes the MSR and PSR, and sets * 53 * several other registers as described in the comments. * 54 * * 55 ********************************************************************************** 56 00000402 57 IVTPWFL BSS 2 POWER FAILURE 58 * R2:=why 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 209 (CPUPAGE) F 15 CPU Page Definitions 59 * 1 - power fail 60 * 2 - temp fault 61 * R4:=previous CA address 00000404 62 IVTMEMPAR BSS 2 MEMORY ERROR 63 * R2:=why 64 * 0 - no response, inst fetch 65 * 1 - abnormal data, inst fetch 66 * 2 - no response, opnd fetch 67 * 3 - abnormal data, opnd fetch 68 * 4 - no response, interrupt poll 69 * 5 - abnormal data, interrupt poll 70 * R3:=where (18 bit virtual address) 71 * ( or slot number if R2 = 4 or 5 ) 72 * R4:=previous CA address 00000406 73 IVTPAGE BSS 2 PAGE FAULT 74 * R2:=why 75 * 1 - read from excluded 76 * 2 - write on read-only 77 * 3 - write on excluded 78 * R3:=where (8 bit page file address) 79 * R4:=previous CA address 00000408 80 IVTIOINT BSS 2 I/O INTERRUPTS 81 * R2:=IP response 82 * R3:=interrupting slot number 83 * R4:=previous CA address 0000040A 84 IVTIAPR BSS 2 ASSOCIATED PROCESSOR INTERRUPT 85 * no data is remembered, only the 86 * fact that an IAPR was requested 87 * R4:=previous CA address 0000040C 88 IVTXREQ BSS 2 XREQ INSTRUCTION 89 * R2:=trapping opcode ( 08 ) 90 * R3:=operand of instruction 91 * R4:=previous CA address 0000040E 92 IVTUERR BSS 2 USER ERROR CONDITIONS 93 * R2:=why (see the UINT codes) 94 * R3:=parameter to why 95 * R4:=previous CA address 00000410 96 IVTXCALL BSS 2 XCALL TRAPS 97 * R2:=instruction image 98 * R3:=operand 99 * R4:=previous CA address 100 101 * end of IVT 102 00000412 103 CPPSA BSS 1 pointer to PSA of session being 104 * run by this CPU (zero if none) 00000413 105 CMAPPSA BSS 1 pointer to the PSA whose virtual free 106 * storage is currently mapped (zero if 107 * none). 00000414 108 CPCUPC BSS 1 pointer to UPC of process being 109 * run by this CPU (zero if none) 00000415 110 OURSLOT BSS 1 this CPUs slot number 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 210 (CPUPAGE) F 15 CPU Page Definitions 112 113 ********************************************************************************** 114 * * 115 * The following array is used to save the page map * 116 * values for the virtual free storage required by this user * 117 * on this CPU. The reason we need to save this away is so * 118 * that during a crashdump we can find each of these pages and * 119 * write them out to the crashdump file. Each time that a new * 120 * user is run and his free storage mapped in we update this * 121 * array. CAUTION!!! Warning, the boot code expects, nay, * 122 * demands, that this array begin at a particular word * 123 * address. If this changes this then the boot code must also * 124 * be modified or beware the consequences. Currently this * 125 * address is #41A. * 126 * * 127 ********************************************************************************** 128 129 BSS 4 allow a little room 0000041A 130 UMAPVALS BSS MAXMAPVALS array to store the free storage page 131 * map values. 132 133 * Console area used by this processor for the dispatcher. 134 0000041E 135 PCONSOLE BSS CALNTH 136 0000042D 137 RESSTAKTOP BSS 32 stack area for some resident routines 0000044D 138 RESSTAK LABEL 139 0000044D 140 CPXTRACA BSS 1 extra CA/Stack for this CPU 141 142 * Flag to indicate successful power fail execution 143 0000044E 144 POWERFLAG BSS 1 0 during normal operation, 145 * if positive, powerfail shutdown was completed, 146 * and this word points to the interrupted CA 147 * if negative, power fail restart is in progress. 0000044F 148 POWERUPLOC BSS 1 At power-fail time, where to resume interrupted routine 00000450 149 POWERRTNPC BSS 1 At power-up time, location where routine was interrupted 150 151 * Temps used by the page file routines 152 00000451 153 VMTSSLA BSS 1 00000452 154 VMTSSLB BSS 1 155 156 * Temps used by getmem and freemem routines. Please note 157 * that these variables MUST NOT be altered without holding MEMLOCK. 158 00000453 159 GETMR2 BSS 2 00000454 160 GETMR3 EQU GETMR2(1) 00000455 161 GETMREGS BSS 2 00000457 162 GETMR7 BSS 1 163 00000453 164 FREMR2 EQU GETMR2 00000454 165 FREMR3 EQU GETMR3 00000455 166 FREMR4 EQU GETMREGS 00000457 167 FREMR7 EQU GETMR7 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 211 (CPUPAGE) F 15 CPU Page Definitions 168 169 170 * These variables are for routines that are called by getmem and freemem 171 * so that we do not need to use the stack. This is because various 172 * callers may not have a stack during system startup, most notably 173 * the I/O drivers. 174 00000458 175 MEMVAR1 BSS 1 used by CPUPFLOAD routine 00000459 176 MEMVARPC BSS 1 place to store return address 0000045A 177 MEMVARPC2 BSS 1 additional storage for return addresses 0000045B 178 MEMVAREG1 BSS 1 additional area to save away registers 0000045C 179 MEMVAREG2 BSS 1 ditto!!! 180 181 * Variable locations used by the FINDVP routine 182 0000045D 183 FNDVPLPSA BSS 1 => PSA of eventual VM list 0000045E 184 FNDVPFPN BSS 1 page number originally searched for 0000045F 185 FNDVPPN BSS 1 final page number looked for 00000460 186 FNDVPVMR BSS 1 => root of VM list containing found VM element 00000461 187 FNDVPUPC BSS 1 => UPC where VM element was found 0 means not indirect reference 188 189 * Variable for memory parity error routine 190 00000462 191 MEMERRFLAG BSS 1 1 sez processing parity error 192 193 * Temps used by performance monitors 194 00000463 195 DYNLINK BSS 1 return link for DYNMON 00000464 196 DYNTEMP BSS 1 temp for DYNMON 197 198 * Temp used by MAPINFBI to save away return address 199 00000465 200 MFBILAST BSS 1 last call to MAPINFBI 00000466 201 MOFBILAST BSS 1 last call to MAPOUTFBI 202 203 BSS 4 room to patch in additional CPU temps 204 0000006B DISP 205 CPULNTH EQU DISP CPUPAGE amount of this page needed for 206 * the variables local to a CPU 207 208 ********************************************************************************** 209 * * 210 * The range of virtual addresses represented by the * 211 * remainder of this page is never used. In order not to * 212 * waste the physical memory, each physical page used as a * 213 * CPUPAGE is mapped into another location in the address * 214 * space: one that may be shared by all of the CPUs. The * 215 * remaining unused space on the physical page is then used * 216 * through that alias. * 217 * * 218 ********************************************************************************** 23 INPUT COREDEFS in-core structure definitions 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 212 (COREDEFS) F 16 Resident Data Structure Definitions 3 4 ********************************************************************************** 5 * * 6 * HEADPAGE * 7 * This page contains constants, variables, and list * 8 * control elements that are accessable to every CPU on the * 9 * system at the same address. * 10 * Since this physical page is also mapped into the page * 11 * file at another virtual address by one CPU and used as its * 12 * CPU page, we skip over the variables that we reference * 13 * through that alias. * 14 * * 15 ********************************************************************************** 16 17 ORG HEADPAGE(CPULNTH) skip over CPU #1 private variables 18 19 ********************************************************************************** 20 * * 21 * The following flag is set to zero when the system is * 22 * totally together and ready to accept useful work. * 23 * * 24 ********************************************************************************** 25 01C6B 00000001 26 BOOTFLAG VFD 1+STORE booting in progress 27 28 ********************************************************************************** 29 * * 30 * Pointers for system free storage * 31 * The system builds most of its tables from system free * 32 * storage elements. The space is managed by a binary buddy * 33 * system. The blocks are arranged carefully on power of 2 * 34 * address boundaries so that the address tells whether any * 35 * given block is the first half or last half of its parent. * 36 * Note that these lists are terminated by a word which * 37 * has zeros in the link field (a legal list terminator) but * 38 * has a high bit on. This is so that the search for a buddy * 39 * in FREEMEM (via RLSHLE) will never fall off the end of the * 40 * list, but will stop at the insertion point, even if the * 41 * insertion point is at the end of the list. * 42 * There are no whole pages placed into the whole page * 43 * lists. Instead, FREEMEM will place such pages into the * 44 * systems idle page list. When GETMEM needs a whole page to * 45 * break up, it finds it in the idle page list. GETMEM has no * 46 * provisions for failure on an attempt to find a whole page * 47 * list. Therefore, the system must ensure that the idle page * 48 * list always contains sufficient pages for GETMEM. * 49 * * 50 ********************************************************************************** 51 01C6C 00000000 52 MEMLOCK VFD STORE lock word for the FS lists 53 01C6D 01000000 54 MEMLIST VFD 01000000 1 word blocks 01C6E 01000000 55 VFD 01000000 2 01C6F 01000000 56 VFD 01000000 4 01C70 01000000 57 VFD 01000000 8 01C71 01000000 58 VFD 01000000 16 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 213 (COREDEFS) F 16 Resident Data Structure Definitions 01C72 01000000 59 VFD 01000000 32 01C73 01000000 60 VFD 01000000 64 01C74 01000000 61 VFD 01000000 128 01C75 01000000 62 VFD 01000000 256 01C76 01000000 63 VFD 01000000 512 0000000A DISP 64 MEMLISTMAX EQU DISP MEMLIST indicate largest allowable request 65 * The following must be true so storage handlers can share code 66 ASSERTEQ MEMLISTMAX,UMEMSIZE 66 BSS MEMLISTMAX-UMEMSIZE error if MEMLISTMAX < UMEMSIZE 66 BSS UMEMSIZE-MEMLISTMAX error if UMEMSIZE < MEMLISTMAX 67 68 69 ********************************************************************************** 70 * * 71 * Physical Page Element List for Pages Being Used for Free Storage. * 72 * When a whole page is to be used the PPL is first * 73 * removed from the whole page list and placed into this list. * 74 * If a whole page is ever recombined, it is first found in * 75 * this list and then moved to the whole page list. * 76 * This list does not contain a PPL for any of the * 77 * CPUPAGEs, since they obviously may not be recombined. * 78 * Also, during INITIAL, PPLs are generated and use up a * 79 * substantial amount of free storage. Since PPLs are not * 80 * freed, these pages can never be recombined. The PPLs for * 81 * those pages are therefore removed from this list and freed. * 82 * They are then almost certainly re-used as a PPL * 83 * immediately. * 84 * * 85 ********************************************************************************** 86 01C77 00000000 87 FSPPLIST VFD STORE inuse free storage PPL holder 88 89 ********************************************************************************** 90 * * 91 * Physical page elements for whole available free pages. * 92 * The reason this list exists is for the VGETMEM and * 93 * VFREEMEM routines. Since these routines give free storage * 94 * to one user only, we had to separate pages to be used by * 95 * the system as a whole and those by a user. You will note * 96 * that MEMLIST no longer contains pointers to whole pages, * 97 * the pointer should always be null. Now whenever a whole * 98 * page is needed we come here and get one for the user. A * 99 * special note, when the system needs a whole page for the * 100 * BLDPROCESS routine we get it directly from the idle page * 101 * list. The lock, WPAGELOCK, must be held when searching * 102 * and/or modifying the whole page list. * 103 * * 104 ********************************************************************************** 105 01C78 00000000 106 WPAGELOCK VFD STORE lock for the whole page list 01C79 00000000 107 WHOLEPAGE VFD STORE whole page PPL holder 108 109 ********************************************************************************** 110 * * 111 * FREE STORAGE PAGE COUNT * 112 * This count word is the excess (positive) or deficiency * 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 214 (COREDEFS) F 16 Resident Data Structure Definitions 113 * (negative) of whole pages in the whole page list. A count * 114 * of zero causes no action. Otherwise, the dispatcher * 115 * attempts to move pages between the idle page list and the * 116 * whole page list to ensure the proper amount of free * 117 * storage. * 118 * The count word is decremented by GETMEM when a whole * 119 * page is split up. It is incremented by FREEMEM when a * 120 * whole page is produced. It is adjusted by the dispatcher * 121 * when a page is moved to or from the idle list. The count * 122 * may also be adjusted by a process (such as the comm. * 123 * processor) in order to alter the amount of available free * 124 * memory. * 125 * Some special circumstances exist during initial. * 126 * Since the DISPATCHER is not running, INITIAL must * 127 * occasionally put another idle page into WHOLEPAGE. GETMEM * 128 * busily decrements this count whenever it breaks one up. * 129 * After INITIAL has run to completion, it sets this word to * 130 * indicate to the DISPATCHER how many more whole pages are * 131 * needed for the system operation. * 132 * * 133 ********************************************************************************** 134 01C7A 00000000 135 FSXCOUNT VFD STORE - 136 137 ********************************************************************************** 138 * * 139 * PPL FBI PAGE MAP TABLE * 140 * To conserve monitor virtual address space, the FBIs * 141 * associated with Physical Page Elements (PPLs) are kept * 142 * apart from the the PPLs themselves in resident blocks that * 143 * are not always mapped. Access to an FBI is gained by * 144 * mapping in the appropriate block using the PM values in * 145 * PPLPFMAP and using a displacement into that block to locate * 146 * the FBI itself. * 147 * INITIAL sets up PPLPFMAP when it processes a memory * 148 * board. PPLPMINDX is the index into PPLPFMAP that is * 149 * currently being used. If non-zero, the number in that * 150 * table location is the PM value of the block currently being * 151 * allocated for FBIs. PPLPMDISP is the displacement into that * 152 * block of the next allocatable FBILNTH words. INITIAL * 153 * stores into each PPL it builds the index and displacement * 154 * for that PPLs FBI. The PPLWINDOW virtual page is used to * 155 * map in the blocks. * 156 * * 157 ********************************************************************************** 158 159 ORG FBIPOINTRS(-2) force map to defined location 160 01C7E 00000000 161 PPLPMINDX VFD 0 current index into PPLPFMAP 01C7F 00000000 162 PPLPMDISP VFD 0 current disp into current block 000003F4 ABS 163 PPLMAXDISP EQU ((WPP/FBILNTH)-1)*FBILNTH last FBI in block 00000042 ABS 164 PPLMAPSIZE EQU 66 66 blocks = 24 MB 00001C80 165 PPLPFMAP BSS PPLMAPSIZE table of PM values for PPL FBIs 166 167 ********************************************************************************** 168 * * 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 215 (COREDEFS) F 16 Resident Data Structure Definitions 169 * USED ADDRESS SPACE ARRAY * 170 * This array has one bit for every monitor virtual page. * 171 * Set bits indicate that the virtual page address is * 172 * available for use ( usually as a free storage address ). * 173 * Pages omitted in the assembled words are: * 174 * page 0, CPUPAGE, WNDO1, WNDO2, * 175 * WNDO3, WNDO4, CIX, HEADPAGE, * 176 * INITPAGE, PPLWINDOW, and the USERPAGES * 177 * Other pages are removed by the initial routines. * 178 * MAXMAPVALS controls the number of pages available for user * 179 * virtual free storage. This value also controls the area * 180 * reserved in the PSA for page map values that map virtual * 181 * pages to physical pages. * 182 * * 183 ********************************************************************************** 184 00401CC2 185 AVPAGES BSSB 0 set up array of 1 bit elements 01CC2 FFFFFFFF 186 VFDB 9:0,23:-1 01CC4 FFFFFFFF 187 VFD -1,-1 01CC5 00000000 188 VFDB (WORDLNTH-1)-MAXMAPVALS:-1,1:0,MAXMAPVALS:0 01CC6 00481CBE 189 PAVPAGES PTR AVPAGES(-MONPF) pointer to above bit array 190 191 ********************************************************************************** 192 * * 193 * The monitor from time to time must load up the * 194 * physical page zero page file location in order to adjust * 195 * the power fail tables. The page map value is stored here. * 196 * * 197 ********************************************************************************** 198 01CC7 00000000 199 PAGEZERO VFD STORE page map value for physical/virtual page zero 01CC8 00000000 200 TOTALPAGES VFD STORE total pages of memory in system 201 202 ********************************************************************************** 203 * * 204 * Parity error recovery information * 205 * Each page of the resident operating system has a * 206 * checksum word stored into the following table. Therefore, * 207 * if only one word goes bad, we can reconstruct it from the * 208 * checksum and the other words on the page. The checksum is * 209 * the XOR of all of the words on the page. * 210 * There are also a number of circumstances that cause * 211 * "flakey" parity error interrupts, for which recovery is * 212 * neither possible nor necessary. When we get one of these, * 213 * we save the page file value and the time of the interrupt * 214 * below. If we get a second one with the same page file * 215 * value within 10 seconds of the first one, we declare the * 216 * device to be very flakey and halt. * 217 * * 218 ********************************************************************************** 219 00000028 ABS 220 MAXMEMCKS EQU 40 maximum words of memory checksums 01CC9 00000000 221 MEMCHKLOCK VFD STORE 1 iff a CPU attempting an XOR recovery 00001CCA 222 MEMCKSUM BSS MAXMEMCKS checksum words 223 * WARNING! Must have at least as 224 * many words here as there are 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 216 (COREDEFS) F 16 Resident Data Structure Definitions 225 * pages in the resident operating 226 * system. 01CF2 00000000 227 MPEPFILE VFD STORE page file of last flakey interrupt 01CF4 00000000 228 MPEDATE VFD STORE,STORE date and time of last flakey interrupt 229 230 ********************************************************************************** 231 * * 232 * CPU COMMUNICATIONS LOCK * 233 * In order to prevent awkward hangups, any STTB/LDFB * 234 * operation addressed to another CPU must be interlocked by * 235 * this word so that 2 CPUs never simultaneously try to * 236 * communicate with one another. * 237 * This applies to LDFB and STTB in any combination, * 238 * including STTB/STTB due to a subtle timing possibility (the * 239 * CPUs wait for RTO to go away before they will answer a * 240 * CBN). * 241 * Surprise! This also applies to regular loads and * 242 * stores if they are addressed to another CPU. Same reason * 243 * applies. * 244 * * 245 ********************************************************************************** 246 01CF5 00000000 247 CPUCOMLOCK VFD STORE communications lock 248 249 ********************************************************************************** 250 * * 251 * Bits are set in this word to indicate system tasks * 252 * that must be completed. See DISPATCHER for bit definitions * 253 * * 254 ********************************************************************************** 255 01CF6 00000000 256 FLAGS VFD STORE 257 258 * counters for CPUs on the system. 01CF7 00000000 259 CPUCOUNT VFD 0+STORE total number of CPUs 01CF8 00000000 260 CPUCOUNT1 VFD 0+STORE count of non-frozen CPUs 01CF9 00000000 261 CPUCOUNT2 VFD 0+STORE count of CPUs after power fail 01CFA 00000000 262 CPUINIT VFD 0+STORE count of CPUs on initial page 263 00001CFB 264 CPUSLOTS BSS NUMSLOTS slot numbers of all CPUs 265 01D0B 00000000 266 BUSYCPUS VFD STORE number of CPUs that are 267 * currently running a process 268 269 ********************************************************************************** 270 * * 271 * Flag to say that the system wishes to sleep. Zero sez * 272 * running, non-zero means halt when I/O finished. If * 273 * non-zero, PSA pointer for session doing sleep. * 274 * * 275 ********************************************************************************** 276 01D0C 00000000 277 SLEEPFLAG VFD 0+STORE non-zero sez sleep 278 279 ********************************************************************************** 280 * * 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 217 (COREDEFS) F 16 Resident Data Structure Definitions 281 * If non-zero: the system will not answer the telephone, * 282 * processes will not be created by the CIA driver, and logon * 283 * requests will be refused. Initialized as one so that nothing * 284 * will happen until the system is together. Also set by SLEEP. * 285 * * 286 ********************************************************************************** 287 01D0D 00000001 288 ALLINHIBIT VFD 1+STORE non-zero sez inhibit 289 290 ********************************************************************************** 291 * * 292 * Every time that PLOCK is required to loop while * 293 * waiting for a lock, this location is incremented. * 294 * * 295 ********************************************************************************** 296 01D0E 00000000 297 DYNWAIT VFD 0+STORE dynamic wait count 298 299 ********************************************************************************** 300 * * 301 * The following lock controls the searching of and * 302 * suspending in SQFILEWAIT. That list's lock itself is not * 303 * sufficient since it gets locked and unlocked while being * 304 * searched and entered (the marvels of structured code). * 305 * This lock insures that the searching of the file wait list * 306 * and then the subsequent possible suspension does not allow * 307 * other processes to sneak through. * 308 * * 309 ********************************************************************************** 310 01D0F 00000000 311 FILEWAITL VFD STORE access to SQFILEWAIT controller 312 313 ********************************************************************************** 314 * * 315 * OPEN (and anybody else), when talking to the spooler, * 316 * sends an ID so that the response can be verified to be a * 317 * response to the sent request. This thing is referenced * 318 * with an INCL. We only wait so long for responses from the * 319 * spooler. The time-out value (in seconds) is kept here. * 320 * * 321 ********************************************************************************** 322 01D10 00000000 323 SPLRMSGID VFD 0 message ID to the spooler 01D11 00000258 324 SPLRTIME VFD 600 seconds to wait for response 325 326 ********************************************************************************** 327 * * 328 * Process Serial Number. Whenever a new underprocess is created * 329 * we need to give it a process serial number. The following * 330 * variable is incremented and the low-order 23 bits are used * 331 * as the serial number. Overflow is ignored because it * 332 * provides wrap-around. Duplicates are inevitable, however * 333 * they are unlikely between successive system boots. * 334 * * 335 ********************************************************************************** 336 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 218 (COREDEFS) F 16 Resident Data Structure Definitions 00000017 ABS 337 PSNFLDLN EQU 23 PSN field length 01D12 00000000 338 PROCSERNM VFD STORE process serial number 339 340 ********************************************************************************** 341 * * 342 * TSMSAGE is a counter that is incremented each time the * 343 * clock scheduling interrupt (TICK) occurs. This count is * 344 * used in determining if the processes waiting in MSWAIT * 345 * should have their pages aged or not. The reason being, * 346 * that we want to keep from aging pages away from processes * 347 * in MSWAIT. Note that if we do take pages away then a * 348 * certain percentage will almost certainly be requested * 349 * again. * 350 * TSMSTIME indicates how many times we go through the * 351 * TICK routine before we age pages in the MSWAIT queue. If * 352 * this number is increased, pages will age more slowly. If * 353 * decreased, pages age more rapidly. Since TICK is called * 354 * every two seconds pages held by processes in MSWAIT will * 355 * hang around for quite sometime, unless TSMSTIME is * 356 * exceedingly small (1 or 2). * 357 * * 358 ********************************************************************************** 359 0000000F ABS 360 TSMSTIME EQU 0F age pages every 30 seconds 01D13 0000000F 361 TSMSAGE VFD TSMSTIME MSWAIT age counter 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 219 (COREDEFS) F 16 Resident Data Structure Definitions 363 364 * PERFORMANCE MONITORS: 365 366 ********************************************************************************** 367 * * 368 * DYNAMIC WAIT - A table may be allocated that will have * 369 * entries counted each time a CPU has to loop while waiting * 370 * for a lock. This will tell us where we have lock * 371 * contention. * 372 * * 373 ********************************************************************************** 374 01D14 00000000 375 DYNBLOCK VFD 0+STORE address of monitoring block, if any 00001EC0 BYTE 376 DYNBITS EQU BITS 15:26 bits of PC to use as index 00000100 ABS 377 DYNBASE EQU 02000/DYNBITS below this we don't account 00000400 ABS 378 DYNMAX EQU WPP number of entries in table (02000 - 0A000) 379 380 ********************************************************************************** 381 * * 382 * INSTRUCTION HISTOGRAM - One of the CPU's in a * 383 * multi-CPU system may be captured to spend all of its time * 384 * sampling the PC's of other CPU's and creating a histogram * 385 * of the instruction usage within the monitor. In this way, * 386 * we can find out where we are spending our time, and where * 387 * to concentrate on improvements. * 388 * * 389 ********************************************************************************** 390 01D15 00000000 391 IHBUSY VFD 0+STORE 0 => no monitoring in progress, 392 * 1 => some CPU is collecting data, 393 * -1=> request CPU to stop collecting data. 394 395 * Header for returned information 00001D16 396 MONHDR LABEL 00001D16 397 IHBASE BSS 1 lowest PC to track 00001D17 398 IHBUKSIZE BSS 1 bits of PC to use as index 00000008 ABS 399 MONHDRLEN EQU DISPC MONHDR 400 00000800 ABS 401 IHMAX EQU 2048 number of entries in table 00000002 ABS 402 IHBLOCKN EQU (IHMAX+WPP-1)/WPP number of pages to allocate 00001D18 403 IHBLOCKS BSS IHBLOCKN pointers to the allocated pages 404 405 406 ********************************************************************************** 407 * * 408 * XREQ CALL HISTOGRAM - A subroutine in the XREQ * 409 * interrupt processor can be enabled to tabulate in histogram * 410 * form the number of times each request is used. Note that * 411 * this information is gathered VERY early in the XREQ game, * 412 * therefore the table will include entries for illegal (or * 413 * non-existent) requests as well as for the legal ones. * 414 * * 415 ********************************************************************************** 416 01D1A 00000000 417 XHBUSY VFD 0+STORE 0 => no monitoring in progress, 418 * 1 => someone is collecting data 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 220 (COREDEFS) F 16 Resident Data Structure Definitions 419 01D1B FEC00000 420 XHCHECK NOP 0 inst executed by XREQ processor 00000800 ABS 421 XHMAX EQU 2048 number of entries in table 00000002 ABS 422 XHBLOCKN EQU (XHMAX+WPP-1)/WPP number of pages to allocate 00001D1C 423 XHBLOCKS BSS XHBLOCKN pointers to the allocated pages 424 425 * header to give back with the info, mimics LOWPC and BUCKSIZE 426 * of instruction and dynwait monitors 01D1E 00000000 427 XMONHDR VFD 0 lowest XREQ recorded 01D1F 00000001 428 VFD 1 "increment" (we record all XREQs) 00000008 ABS 429 XMONHDRLEN EQU DISPC XMONHDR length of header 430 431 * table of table heads by XREQ type 01D20 00000000 432 XHTABLCK VFD 0 lock for table (list type) 00001D21 433 XHTABTAB LABEL 01D21 00000000 434 VFD 0 unimplemented 01D22 00000000 435 VFD 0 unimplemented 01D23 00000000 436 FREQTAB VFD 0 FREQs 01D24 00000000 437 VFD 0 unimplemented 01D25 00000000 438 UREQTAB VFD 0 UREQs 01D26 00000000 439 OPREQTAB VFD 0 OPREQs 01D27 00000000 440 VFD 0 unimplemented 01D28 00000000 441 BREAKTAB VFD 0 BREAK instruction 00000020 ABS 442 XHTABLEN EQU DISPC XHTABTAB char length of table 443 444 445 ********************************************************************************** 446 * * 447 * TRACE TABLE - a block may be allocated to record the * 448 * most recent 256 events that have occurred. This is most * 449 * useful for system dubugging. * 450 * * 451 ********************************************************************************** 452 01D29 00000000 453 TRACEADDR VFD 0+STORE address of trace table page 01D2A 00000000 454 TRACEINDEX VFD STORE index of last entry in table 01D2B 00000000 455 TRACEGIVEN VFD STORE index of last entry returned to user 456 00001D2C 457 TRACECALL BASE table of instructions executed by TRACE macro 01D2C FEC00000 458 MSTRACE NOP 0 class 00 - MS driver 01D2D FEC00000 459 CIATRACE NOP 0 class 01 - CIA driver 01D2E FEC00000 460 ULBTRACE NOP 0 class 02 - ULB manager 01D2F FEC00000 461 NOP 0 class 03 - unassigned 01D30 FEC00000 462 MTTRACE NOP 0 class 04 - mag tape driver 01D31 FEC00000 463 LPTRACE NOP 0 class 05 - line printer driver 01D32 FEC00000 464 SUBSTRACE NOP 0 class 06 - substitution process 01D33 FEC00000 465 NOP 0 class 07 - unassigned 01D34 FEC00000 466 NOP 0 class 08 - unassigned 01D35 FEC00000 467 NOP 0 class 09 - unassigned 01D36 FEC00000 468 NOP 0 class 10 - unassigned 01D37 FEC00000 469 NOP 0 class 11 - unassigned 01D38 FEC00000 470 NOP 0 class 12 - unassigned 01D39 FEC00000 471 NOP 0 class 13 - unassigned 01D3A FEC00000 472 NOP 0 class 14 - unassigned 01D3B FEC00000 473 NOP 0 class 15 - unassigned 01D3C FEC00000 474 NOP 0 class 16 - unassigned 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 221 (COREDEFS) F 16 Resident Data Structure Definitions 01D3D FEC00000 475 NOP 0 class 17 - unassigned 01D3E FEC00000 476 NOP 0 class 18 - unassigned 01D3F FEC00000 477 NOP 0 class 19 - unassigned 01D40 FEC00000 478 NOP 0 class 20 - unassigned 01D41 FEC00000 479 NOP 0 class 21 - unassigned 01D42 FEC00000 480 NOP 0 class 22 - unassigned 01D43 FEC00000 481 NOP 0 class 23 - unassigned 01D44 FEC00000 482 NOP 0 class 24 - unassigned 01D45 FEC00000 483 NOP 0 class 25 - unassigned 01D46 FEC00000 484 NOP 0 class 26 - unassigned 01D47 FEC00000 485 NOP 0 class 27 - unassigned 01D48 FEC00000 486 NOP 0 class 28 - unassigned 01D49 FEC00000 487 NOP 0 class 29 - unassigned 01D4A FEC00000 488 NOP 0 class 30 - unassigned 01D4B FEC00000 489 NOP 0 class 31 - unassigned 490 DRCT 491 492 ********************************************************************************** 493 * * 494 * READ/WRITE COUNTS BY BLOCK TYPE - The following * 495 * vectors are used to accumulate the numbers of reads and * 496 * writes for each FBI type. These vectors are indexed * 497 * starting with zero. FBI type 0 is undefined, so the 0th * 498 * word holds the table size since it should never be * 499 * incremented (!). * 500 * * 501 ********************************************************************************** 502 00000016 ABS 503 MAXFBITYPE EQU 016 largest index in table 01D4C 00000017 504 READCOUNTS VFD MAXFBITYPE+1 size of table 505 BSS MAXFBITYPE counters of READS 01D63 00000017 506 WRITCOUNTS VFD MAXFBITYPE+1 size of table 507 BSS MAXFBITYPE counters of WRITES 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 222 (COREDEFS) F 16 Resident Data Structure Definitions 509 510 ********************************************************************************** 511 * * 512 * Generalized system process template. * 513 * All the system processes that may be started have * 514 * control blocks that conform to the following format. The * 515 * lock word is used when adding to or deleting from the list * 516 * of elements. The busy word tells us that a process of this * 517 * type has been or is about to be started except for free * 518 * file, which uses a special mechanism. Only interlocked * 519 * instructions should be used to set the busyword. * 520 * * 521 ********************************************************************************** 522 00001D7A 523 FFCPCPROT BASE R4 00170800 4 BASE 524 FFCPCLOCK BSS 1 lock word for the list 00170801 4 BASE 525 FFCPCLIST BSS 1 root of list of elements 00170802 4 BASE 526 FFCPCBUSY BSS 1 zero or non-zero if process started 00170803 4 BASE 527 FFCPCNAME BSS2 1 name to give process 00170805 4 BASE 528 FFCPCPC BSS 1 initial PC for process 00170806 4 BASE 529 FFCPCPROC BSS 1 process to start 530 DRCT 531 ORG FFCPCPROT 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 223 (COREDEFS) F 16 Resident Data Structure Definitions 533 534 ********************************************************************************** 535 * * 536 * File Freer Queue * 537 * List of disk structures being freed. A process is in * 538 * charge of freeing the disk structures and when something is * 539 * placed in the queue the freeing process is started if it is * 540 * idle. The lock on the free list locks the list of free * 541 * file elements. The FFCPCBUSY word (marked unused) is not * 542 * used for the free file process since a special mechanism is * 543 * used for free file to allow multiple freefile processes to * 544 * run simultaneously. The word must be included here so that * 545 * this control block matches the others. Free file processes * 546 * are started based on the number of elements in the list and * 547 * the number of free file processes that currently exists. * 548 * * 549 ********************************************************************************** 550 01D7A 00000000 551 FFLOCK VFD STORE one if FF list locked 01D7B 00000000 552 FFLIST VFD STORE root of the freeing list 01D7C 00000000 553 VFD STORE (unused. makes structure match) 01D7D B674F85C 554 PAK12 SYS_FREEFILE name of the FF process 01D7F 000050B5 555 VFD ADR FFPRESTART place to start the process 01D80 00000100 556 VFD 1*BIT FLFREEFL process to start is free file 557 01D81 00000000 558 FFLISTSIZ VFD STORE+0 num elements in FF list 01D82 00000000 559 FFPROCS VFD STORE+0 num of FF processes going 560 00001D83 561 FFPROT BASE R0 element in the free file list 00160800 0 BASE 562 FFWORDA BSS 1 00080080 0 ZBM 563 FFTYPE EQU FFWORDA/BITS 0:7 FBI type of structure being freed 00081F10 0 ZBM 564 FFLINK EQU FFWORDA/FLDADRS link to the next element in list 00160801 0 BASE 565 FFBLOCK BSS 1 MS address of structure head 00080081 0 ZBM 566 FFDRIVE EQU FFBLOCK/VOLFIELD drive where structure resides 00081181 0 ZBM 567 FFMSBLK EQU FFBLOCK/MSBLKFIELD root block of the structure 00160802 0 BASE 568 FFVOLBPTR BSS 1 pointer to the busy counter in the VOLN element 569 DRCT 00000003 DISP 570 FFLNTH EQU DISP FFPROT length of a FF list element 00000002 ABS 571 FFLOG EQU FFLNTH LOG 2 size of element for free memory routines 572 ORG FFPROT recover lost space 573 574 * extra codes for FFTYPE, since no FBITYPE corresponding 575 00000000 ABS 576 FFTUNKNOWN EQU 0 a single block of unknown type 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 224 (COREDEFS) F 16 Resident Data Structure Definitions 578 579 ********************************************************************************** 580 * * 581 * Queue of Elements to be put into the ADT * 582 * A process is in charge of consuming these elements and * 583 * calling the PUTFREEBLK routine to cause them to be placed * 584 * into the ADT for that volume. This process is started if * 585 * it is idle when a new element is queued. The lock on the * 586 * list locks only the list of elements. The busy word * 587 * indicates whether the ADT process has been started or not. * 588 * * 589 ********************************************************************************** 590 01D83 00000000 591 PADTLOCK VFD STORE one if PADT list locked 01D84 00000000 592 PADTLIST VFD STORE root of the list 01D85 00000000 593 PADTBUSY VFD STORE flag indicating ADT started 01D86 B674F9EF 594 PAK12 SYS_PUTADT name of this process 01D88 00005201 595 VFD ADR PADTRSTRT place to start the process 01D89 00000080 596 VFD 1*BIT FLADT process to start is ADT 597 00001D8A 598 PADTPROT BASE R0 element in the put adt list 00160800 0 BASE 599 PADTWORDA BSS 1 00081F10 0 ZBM 600 PADTLINK EQU PADTWORDA/FLDADRS link to next element 00160801 0 BASE 601 PADTBLOCK BSS 1 MS address of structure head 00080081 0 ZBM 602 PADTDRIVE EQU PADTBLOCK/VOLFIELD drive where block resides 00081181 0 ZBM 603 PADTMSBLK EQU PADTBLOCK/MSBLKFIELD MS address 604 DRCT 00000002 DISP 605 PADTLNTH EQU DISP PADTPROT length of a put adt list element 00000001 ABS 606 PADTLOG EQU PADTLNTH LOG 2 size of element for free memory routines 607 ORG PADTPROT recover lost space 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 225 (COREDEFS) F 16 Resident Data Structure Definitions 609 610 ********************************************************************************** 611 * * 612 * List of elements that contain volume numbers that have * 613 * been maintenance mounted and need to be dismounted. The * 614 * VOLN element has been marked as unusable and once the busy * 615 * count hits zero we can do our thing. One reason we have a * 616 * separate process is to save stack space, since the dismount * 617 * routines use quite a bit of it. * 618 * * 619 ********************************************************************************** 620 01D8A 00000000 621 DMNTLOCK VFD STORE lock for this list 01D8B 00000000 622 DMNTLIST VFD STORE root of the element list 01D8C 00000000 623 DMNTBUSY VFD STORE flag indicating dismounter started 01D8D B674F803 624 PAK12 SYS_DISMOUNT name of this process 01D8F 00005221 625 VFD ADR DMNTSTRT place to start this process 01D90 00000400 626 VFD 1*BIT FLDISMNT flag to start dismount process 627 00001D91 628 DMNTPROTO BASE R0 element for the volume dismounter 00160800 0 BASE 629 DMNTWORDA BSS 1 00081F10 0 ZBM 630 DMNTLINK EQU DMNTWORDA/FLDADRS link to next element in the list 00160801 0 BASE 631 DMNTVOLN BSS 1 volume number to dismount 632 DRCT 00000001 ABS 633 DMNTLOG EQU (DISPW DMNTPROTO) LOG 2 log of the block size 634 ORG DMNTPROTO recover lost space 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 226 (COREDEFS) F 16 Resident Data Structure Definitions 636 637 ********************************************************************************** 638 * * 639 * ERROR LOG QUEUE * 640 * Error log process and queue. Errors generated by the * 641 * system are placed in the below defined queue and then a * 642 * process will consume this queue and write the errors onto * 643 * the error log. The ERRLOGLOCK locks only the list of * 644 * elements. The busyword indicates whether the error log * 645 * process has been started or not. * 646 * * 647 ********************************************************************************** 648 01D91 00000000 649 ERRLOGLOCK VFD STORE lock for list ( one if locked ) 01D92 00000000 650 ERRLOGLIST VFD 0+STORE root of element list 01D93 00000000 651 ERRLOGBUSY VFD 0+STORE flag indicating error log started 01D94 B674F834 652 PAK12 SYS_ERRORLOG name of this process 01D96 00005241 653 VFD ADR ELPRESTART place to start this process 01D97 00000040 654 VFD 1*BIT FLERRLOG process to start is error log 655 01D98 00000000 656 ERRLOGCNT VFD 0+STORE number of logged errors 657 00001D99 658 ERLPROT BASE R0 00160800 0 BASE 659 ERLWORDA BSS 1 000800F0 0 ZBM 660 ERLTYPE EQU ERLWORDA/UPR15 type of error (fields below) 661 ERLLEN EQU EFLEN length of error params in words 662 * (does not include this word) 663 ERERROR EQU EFERROR flag saying count ECNT 664 ERLCODE EQU EFCODE type of error 00081F10 0 ZBM 665 ERLLINK EQU ERLWORDA/FLDADRS link to next element 00160801 0 BASE 666 ERLDATE BSS 2 time of the error 00160803 0 BASE 667 ERLPARAMS LABEL variable size parameter list 668 * the rest of the message is ERLTYPE/ERLLEN 669 * words long 670 DRCT 671 ORG ERLPROT recover the space 672 00000002 ABS 673 ERLFUNK EQU (ERLPARAMS DISPW ERLWORDA)-1 674 675 ERRORFILE LIST 675 ********************************************************************************** 675 * * 675 * The system logs in a file IO and other errors that * 675 * occur while the system is running. This file is of the * 675 * format given. The errors consist of a code and a variable * 675 * number of parameters. Defined error codes are ("|" * 675 * separates words): * 675 * * 675 * ERLCEND | dummy parameter * 675 * ERLCTS ( no longer used ) * 675 * ERLCTEXT | variable length string (blank filled) * 675 * ERLCBFBI ( new code below ) * 675 * ERLCCKFBI ( new code below ) * 675 * ERLCBKFBI ( new code below ) * 675 * ERLCPFFBI ( no longer used ) * 675 * ERLCBLNK | MS address expected | found * 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 227 (COREDEFS) F 16 Resident Data Structure Definitions 675 * ERLCFSAF | MS address * 675 * ERLCFUD1 | MS address * 675 * ERLCFUD2 | MS address * 675 * ERLCPPUBT | PF for channel | PPU status * 675 * ERLCCIAE | PF for channel | CIA status * 675 * ERLCCIATO | PF for channel * 675 * ERLCDSKTO | PF for channel | unit * 675 * ERLCSSUTO | PF for SSU * 675 * ERLCSUB ( new code below ) * 675 * ERLCNOSUB ( new code below ) * 675 * ERLCUNSUB ( new code below ) * 675 * ERLCPPUTO (no longer used) * 675 * ERLCBOOT | system version (upper) | system version (lower) | boot switches* 675 * ERLCMOUNT | volume number | drive name | volume name (upper) | * 675 * volume name (lower) * 675 * ERLCDMOUNT | volume number * 675 * ERLCMPE | status + virtual address | PF | block * 675 * ERLCMPED | PF | block * 675 * ERLCDNRDY ( new code below ) * 675 * ERLCRMNT | volume number | drive name * 675 * ERLCCTC (no longer used) * 675 * ERLCCTCTO (no longer used) * 675 * ERLCDSKRD ( new code below ) * 675 * ERLCDCNT | drive name | cable number | read count | write count * 675 * ERLCDSKRW ( new code below ) * 675 * ERLCLPERR | LP name | LP status * 675 * ERLCLPIFPE ( no longer used ) * 675 * ERLCLPTO | LP name * 675 * ERLCPPUBAD | PPU slot number * 675 * ERLCPPUOK | PPU slot number * 675 * ERLCCTLBAD | PPU slot number | channel number * 675 * ERLCCTLOK | PPU slot number | channel number * 675 * ERLCDATBAD | target date | current date * 675 * ERLCNVMTIM | dummy parm * 675 * ERLCMTC (no longer used) * 675 * ERLCMTCTO | page map value * 675 * ERLCMTCERR | drive name | operation | tape status | PPU status * 675 * ERLCDSKID | drive name | drive id (3 words) | * 675 * pack mfg | pack s/n | fmt date (2 words) | * 675 * volume name (2 words) * 675 * ERLCUNLOAD | drive name * 675 * ERLCDE | drive name | block number | seek address | * 675 * operation | BFD status | PPU status * 675 * ERLCPWFAIL | dummy parameter * 675 * ERLCPWRUP | dummy parameter * 675 * ERLCBFBI | drive name | MS address | expected | found * 675 * ERLCCKFBI | drive name | MS address | difference | found * 675 * ERLCBKFBI | drive name | MS address | found * 675 * ERLCRDGCS | drive name | MS address | segment# * 675 * ERLCSUB | drive name | bad MS address | substitute address * 675 * ERLCNOSUB | drive name | bad MS address | reason * 675 * ERLCUNSUB | drive name | bad MS address | substitute MS address * 675 * ERLCDNRDY | drive name | volume number * 675 * ERLCDSKRD | drive name | MS address | seek address * 675 * ERLCDSKRW | drive name | MS address | seek address * 675 * ERLCSCSIRS | drive name | MS address | seek address | operation | * 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 228 (COREDEFS) F 16 Resident Data Structure Definitions 675 * SCSI status | PPU status | sense key | sense code * 675 * ERLCSCSIDE | drive name | block number | seek address | * 675 * operation | SCSI status | PPU status * 675 * ERLCSCSIID | drive name | vendor id (2 words) | * 675 * product id (3 words) | firmware rev (2 words) | * 675 * fmt date (2 words) | volume name (2 words) * 675 * * 675 * The error logging file is SYSTEM.!!!:ERRORLOG.LOGFIL. * 675 * This file should be opened as an empty .RAF. The error * 675 * logging session will add records to the end of the file and * 675 * advance the end pointer. The begin pointer is provided for * 675 * the benefit of the reading process. It is the * 675 * responsibility of the reading process to free blocks when * 675 * they are no longer needed, otherwise, the log file will * 675 * grow until it occupies all available mass storage space. * 675 * Note that block 0 should never be freed ( except possibly * 675 * to release the entire file ). * 675 * If EFEND is in the range of -EFRSIZE to 2*CPW, then it * 675 * is set to 2*CPW. The reading routine should do the same * 675 * for EFBEGIN. * 675 * * 675 ********************************************************************************** 675 675 * These addresses are used to get the pointers from the error log file 00000000 ABS 675 EFBEGIN EQU 0 pointer to first error entry 00000004 ABS 675 EFEND EQU 1*4 pointer to end of error entries 675 00001D99 675 EFPROTO BASE R0 prototype of error entry 00160800 0 BASE 675 EFWORDA BSS 1 00002250 BYTE 675 EFLEN EQU BITS 17:21 number of parameters for this error 00002C10 BYTE 675 EFERROR EQU BIT 22 0 => routine log entry, 1 => error 00002E90 BYTE 675 EFCODE EQU BITS 23:31 code for this error 000800F0 0 ZBM 675 EFTYPE EQU EFWORDA/BITS 0:14 code for this error 00081F10 0 ZBM 675 EFLENGTH EQU EFWORDA/BITS 15:31 length of this entry in words 00160801 0 BASE 675 EFDATE BSS 2 system time word when error happened 00160803 0 BASE 675 EFPARAMS LABEL first word of parameters 675 DRCT 675 ORG EFPROTO reclaim space 675 675 * The actual codes 00000401 ABS 675 ERLCEND EQU 1*EFLEN+0*EFERROR+01*EFCODE end system 675 *ERLCTS EQU 1*EFLEN+0*EFERROR+02*EFCODE time stamp 00000603 ABS 675 ERLCTEXT EQU 1*EFLEN+1*EFERROR+03*EFCODE text record 675 *ERLCBFBI EQU 3*EFLEN+1*EFERROR+04*EFCODE unused - was FBI type mismatch 675 *ERLCCKFBI EQU 3*EFLEN+1*EFERROR+05*EFCODE unused - was FBI checksum bad 675 *ERLCBKFBI EQU 2*EFLEN+1*EFERROR+06*EFCODE unused - was FBI DA mismatch 675 * EQU 6*EFLEN+1*EFERROR+07*EFCODE unused - was old format MS error 675 *ERLCPFFBI EQU 3*EFLEN+1*EFERROR+08*EFCODE bad FBI in PFPROC 00000E09 ABS 675 ERLCBLNK EQU 3*EFLEN+1*EFERROR+09*EFCODE bad backward link while freeing 0000060A ABS 675 ERLCFSAF EQU 1*EFLEN+1*EFERROR+10*EFCODE bad block while freeing SAF 0000060B ABS 675 ERLCFUD1 EQU 1*EFLEN+1*EFERROR+11*EFCODE bad UD1 block while freeing DIR 0000060C ABS 675 ERLCFUD2 EQU 1*EFLEN+1*EFERROR+12*EFCODE bad UD2 block while freeing DIR 00000A0D ABS 675 ERLCPPUBT EQU 2*EFLEN+1*EFERROR+13*EFCODE bad transfer status from PPU 00000A0E ABS 675 ERLCCIAE EQU 2*EFLEN+1*EFERROR+14*EFCODE error code from CIA 0000060F ABS 675 ERLCCIATO EQU 1*EFLEN+1*EFERROR+15*EFCODE CIA deadman timeout 00000A10 ABS 675 ERLCDSKTO EQU 2*EFLEN+1*EFERROR+16*EFCODE Disk deadman timeout 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 229 (COREDEFS) F 16 Resident Data Structure Definitions 00000611 ABS 675 ERLCSSUTO EQU 1*EFLEN+1*EFERROR+17*EFCODE SSU timeout 675 *ERLCSUB EQU 2*EFLEN+1*EFERROR+18*EFCODE unused - was MS block substituted 675 *ERLCNOSUB EQU 2*EFLEN+1*EFERROR+19*EFCODE unused - was MS block not substituted 675 *ERLCUNSUB EQU 2*EFLEN+0*EFERROR+20*EFCODE unused - was MS block unsubstituted 675 *ERLCPPUTO EQU 1*EFLEN+1*EFERROR+21*EFCODE PPU timeout, PPU not talking 00000C16 ABS 675 ERLCBOOT EQU 3*EFLEN+0*EFERROR+22*EFCODE system boot 00001017 ABS 675 ERLCMOUNT EQU 4*EFLEN+0*EFERROR+23*EFCODE volume mount 00000418 ABS 675 ERLCDMOUNT EQU 1*EFLEN+0*EFERROR+24*EFCODE volume dismount 00000E19 ABS 675 ERLCMPE EQU 3*EFLEN+1*EFERROR+25*EFCODE memory parity error 00000A1A ABS 675 ERLCMPED EQU 2*EFLEN+1*EFERROR+26*EFCODE memory parity error 675 *ERLCDNRDY EQU 2*EFLEN+1*EFERROR+27*EFCODE unused - was disk dropped ready 0000081C ABS 675 ERLCRMNT EQU 2*EFLEN+0*EFERROR+28*EFCODE volume remounted 675 *ERLCCTC EQU 4*EFLEN+1*EFERROR+29*EFCODE CTC operation error 675 *ERLCCTCTO EQU 2*EFLEN+1*EFERROR+30*EFCODE CTC deadman timeout 675 * EQU 5*EFLEN+1*EFERROR+31*EFCODE unused - was MS error 675 *ERLCDSKRD EQU 3*EFLEN+1*EFERROR+32*EFCODE unused - was perm read error 00001021 ABS 675 ERLCDCNT EQU 4*EFLEN+0*EFERROR+33*EFCODE disk activity count 675 *ERLCDSKRW EQU 2*EFLEN+0*EFERROR+34*EFCODE unused - was rewrite after read 00000A23 ABS 675 ERLCLPERR EQU 2*EFLEN+1*EFERROR+35*EFCODE line printer error 675 *ERLCLPIFPE EQU 2*EFLEN+1*EFERROR+36*EFCODE line printer interface parity error (obsolete) 00000625 ABS 675 ERLCLPTO EQU 1*EFLEN+1*EFERROR+37*EFCODE line printer timeout 00000626 ABS 675 ERLCPPUBAD EQU 1*EFLEN+1*EFERROR+38*EFCODE PPU doesn't respond 00000427 ABS 675 ERLCPPUOK EQU 1*EFLEN+0*EFERROR+39*EFCODE PPU started talking again 00000A28 ABS 675 ERLCCTLBAD EQU 2*EFLEN+1*EFERROR+40*EFCODE controller doesn't respond 00000829 ABS 675 ERLCCTLOK EQU 2*EFLEN+0*EFERROR+41*EFCODE controller is OK again 00000A2A ABS 675 ERLCDATBAD EQU 2*EFLEN+1*EFERROR+42*EFCODE SSU clock is bad 0000062B ABS 675 ERLCNVMTIM EQU 1*EFLEN+1*EFERROR+43*EFCODE NVM time is bad 675 *ERLCMTC EQU 4*EFLEN+1*EFERROR+44*EFCODE MTC operation error 675 *ERLCMTCTO EQU 2*EFLEN+1*EFERROR+45*EFCODE MTC deadman timeout 0000062E ABS 675 ERLCMTCTO EQU 1*EFLEN+1*EFERROR+46*EFCODE MTC deadman timeout 0000122F ABS 675 ERLCMTCERR EQU 4*EFLEN+1*EFERROR+47*EFCODE MTC tape error 00002830 ABS 675 ERLCDSKID EQU 10*EFLEN+0*EFERROR+48*EFCODE drive and pack id 00000631 ABS 675 ERLCUNLOAD EQU 1*EFLEN+1*EFERROR+49*EFCODE unload disk heads 00001A32 ABS 675 ERLCDE EQU 6*EFLEN+1*EFERROR+50*EFCODE disk I/O error 00000633 ABS 675 ERLCPWFAIL EQU 1*EFLEN+1*EFERROR+51*EFCODE power failure 00000434 ABS 675 ERLCPWRUP EQU 1*EFLEN+0*EFERROR+52*EFCODE power up restart 00000A35 ABS 675 ERLCSMU EQU 2*EFLEN+1*EFERROR+53*EFCODE SMU error 00001236 ABS 675 ERLCBFBI EQU 4*EFLEN+1*EFERROR+54*EFCODE FBI type mismatch 00001237 ABS 675 ERLCCKFBI EQU 4*EFLEN+1*EFERROR+55*EFCODE FBI checksum bad 00000E38 ABS 675 ERLCBKFBI EQU 3*EFLEN+1*EFERROR+56*EFCODE FBI MS block didn't match 00000C39 ABS 675 ERLCRDGCS EQU 3*EFLEN+0*EFERROR+57*EFCODE reading MS correction segment 00000E3A ABS 675 ERLCSUB EQU 3*EFLEN+1*EFERROR+58*EFCODE MS block substituted 00000E3B ABS 675 ERLCNOSUB EQU 3*EFLEN+1*EFERROR+59*EFCODE MS block not substituted 00000C3C ABS 675 ERLCUNSUB EQU 3*EFLEN+0*EFERROR+60*EFCODE MS block unsubstituted 00000A3D ABS 675 ERLCDNRDY EQU 2*EFLEN+1*EFERROR+61*EFCODE disk dropped ready 00000E3E ABS 675 ERLCDSKRD EQU 3*EFLEN+1*EFERROR+62*EFCODE permanent disk read error (data lost) 00000C3F ABS 675 ERLCDSKRW EQU 3*EFLEN+0*EFERROR+63*EFCODE rewrite disk block after read 00002240 ABS 675 ERLCSCSIRS EQU 8*EFLEN+1*EFERROR+64*EFCODE request sense data for disk error 00001A41 ABS 675 ERLCSCSIDE EQU 6*EFLEN+1*EFERROR+65*EFCODE SCSI disk I/O error 00003442 ABS 675 ERLCSCSIID EQU 13*EFLEN+0*EFERROR+66*EFCODE SCSI device identification 675 0000000D ABS 675 ERLMAXLEN EQU 13 maximum number of parameters 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 230 (COREDEFS) F 16 Resident Data Structure Definitions 677 678 ********************************************************************************** 679 * * 680 * System Accounting Process Queue * 681 * This is a list of accounting records that must be * 682 * written to the various accounting files. A process is in * 683 * charge of writing the records to mass storage. If it is * 684 * not already running, it is started when an entry is placed * 685 * into the queue. The APLOCK locks only the list of * 686 * elements. The busyword indicates whether the accounting * 687 * process has been started or not. * 688 * * 689 ********************************************************************************** 690 01D99 00000000 691 APLOCK VFD STORE one if AP list locked 01D9A 00000000 692 APLIST VFD STORE root of the accounting list - top bit is lock 01D9B 00000000 693 APBUSY VFD STORE flag indicating accounting started 01D9C B674F785 694 PAK12 SYS_ACCOUNT name for this process 01D9E 00005316 695 VFD ADR ACCTRESTRT place to start this process 01D9F 00000200 696 VFD 1*BIT FLACCTNG process to start is accounting 697 01DA0 00000000 698 APREQUE VFD 0*STORE incremented for every requeued accounting element 699 700 ACCTFILE LIST 700 ********************************************************************************** 700 * * 700 * Accounting files. * 700 * A system session writes records into accounting files * 700 * whenever certain events occur. The events and the format * 700 * of the files are described below. The files where log * 700 * entries are made are determined by a bit mask in the * 700 * ULLIMITS block called LIMLOGSPOT. Each accounting record is * 700 * written to as many as 4 log files: * 700 * * 700 * user.divprj:ACCOUNTING.LOGFIL * 700 * MANAGER.divprj:ACCOUNTING.LOGFIL * 700 * MANAGER.div:ACCOUNTING.LOGFIL * 700 * MANAGER.SYS:ACCOUNTING.LOGFIL * 700 * * 700 * The manufacturers account logging may go to himself, * 700 * MANAGER.!!!, or MANAGER.SYS. * 700 * These files should be opened as empty .RAFs. The * 700 * accounting session will add records to the end of the file * 700 * and advance the end pointer. The begin pointer is provided * 700 * for the benefit of the reading process. It is the * 700 * responsibility of the reading process to free blocks when * 700 * they are no longer needed, otherwise, the log file will * 700 * grow until it occupies all available space. Note that * 700 * block 0 should never be freed. * 700 * If AFEND is in the range of -AFRSIZE to 2*CPW, then it * 700 * is set to 2*CPW. The reading routine should do the same * 700 * for AFBEGIN. * 700 * * 700 * It should be noted that for file entries being logged * 700 * the primary account name and project is for the account * 700 * owning the file and the secondary one is for the account * 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 231 (COREDEFS) F 16 Resident Data Structure Definitions 700 * accessing the file. Also for aliases and unaliases the * 700 * file name and extension field is used to hold the logon * 700 * account name and project of the user performing the alias. * 700 * * 700 ********************************************************************************** 700 00000000 ABS 700 AFBEGIN EQU 0 RAF char position of read pointer 00000004 ABS 700 AFEND EQU 1*4 RAF char position of write pointer 700 * (points to next records location) 700 00001DA1 700 AFRPROTO BASE R0 00080050 0 ZBM 700 AFRTYPE BSSB 5 type of record 00000000 ABS 700 APTSLEEP EQU 0 sleep record (tested with JEQZ!) 00000001 ABS 700 APTSTARTUP EQU 1 system startup 00000002 ABS 700 APTON EQU 2 successful logon 00000003 ABS 700 APTPWW EQU 3 unsuccessful logon 00000004 ABS 700 APTALIAS EQU 4 alias 00000005 ABS 700 APTALIER EQU 5 alias failure 00000006 ABS 700 APTOFF EQU 6 logoff 00000007 ABS 700 APTALOFF EQU 7 unalias 00000008 ABS 700 APTPWRFAIL EQU 8 power failure 00000009 ABS 700 APTPWRUP EQU 9 power up restart 0000000A ABS 700 APTCONCP EQU 10 concurrent session startup 0000000B ABS 700 APTABORT EQU 11 opr abort 0000000C ABS 700 APTTERMIN EQU 12 opr terminate 0000000D ABS 700 APTEVICT EQU 13 opr evict 0000000E ABS 700 APTFILOP EQU 14 file open 0000000F ABS 700 APTFILCL EQU 15 file close 00000010 ABS 700 APTFBC EQU 16 file being destroyed 00000011 ABS 700 APTLOAD EQU 17 volume mount 00000012 ABS 700 APTUNLOAD EQU 18 volume dismount 00000013 ABS 700 APTSTOP EQU 19 stop process 00000014 ABS 700 APTGO EQU 20 start process 00000015 ABS 700 APTXSAVE EQU 21 file exchange save 00000015 ABS 700 APTMAX EQU 21 largest type 700 * Bit array of those APTs that are long 2B000000 ABS 700 AFRSZLONG EQU 1*(BIT APTON)+1*(BIT APTALIAS)+1*(BIT APTOFF)+1*(BIT APTALOFF) 700 00080AA0 0 ZBM 700 AFRPORTNUM BSSB 10 port number of activity 00081F10 0 ZBM 700 AFRLEN BSSB 17 character size of record 000800C1 0 ZBM 700 AFRPROCN BSSB 12 session number 00081811 0 ZBM 700 AFRSHADOW BSSB 1 on if mentioned acct shadow 00081A11 0 ZBM 700 AFRFOREIGN BSSB 1 on if mentioned acct foreign 00081D21 0 ZBM 700 AFRFILLER BSSB 32-14 filler 00160802 0 BASE 700 AFRACCT BSS2 1 account name 00160804 0 BASE 700 AFRPROJ BSS 1 division-project 00160805 0 BASE 700 AFRTIME BSS2 1 time of occurrence 0000001C ABS 700 AFRSHORT EQU DISPC AFRTYPE size of short acct file record 00160807 0 BASE 700 AFRCPUTIME BSS 1 CPU time used (sec) 00160808 0 BASE 700 AFRSVDUSD BSS 1 saved file space (fb) 00160809 0 BASE 700 AFRSESMAX BSS 1 session output max (high water mark) 00160807 0 BASE 700 AFRACCT2 EQU AFRCPUTIME second account name in record 00160809 0 BASE 700 AFRPROJ2 EQU AFRSESMAX second project in record 700 00000028 ABS 700 AFRSIZE EQU DISPC AFRTYPE size of account file record 0016080A 0 BASE 700 AFRWORDA BSS 1 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 232 (COREDEFS) F 16 Resident Data Structure Definitions 000800AA 0 ZBM 700 AFRPORT2 EQU AFRWORDA/BITS 0:9 second port in record 000814CA 0 ZBM 700 AFRPROC2 EQU AFRWORDA/BITS 10:21 second session number in record 0000002C ABS 700 AFRLONG EQU DISPC AFRTYPE size of long account record 700 BSS 1 second word of file name 0016080A 0 BASE 700 AFRFILNAM EQU AFRWORDA file name 0016080C 0 BASE 700 AFRFILEXT BSS 1 file extention 00000034 ABS 700 AFRFILLEN EQU DISPC AFRTYPE size of record with file info in it 00000034 ABS 700 AFRMAXLEN EQU AFRFILLEN max length of an accounting record 700 DRCT 700 ORG AFRPROTO reclaim area 701 00001DA1 702 APPROT BASE R4 element in the accounting list 00170800 4 BASE 703 APWORDA BSS 1 00090050 4 ZBM 704 APWHOGETS EQU APWORDA/BITS 0:4 bit mask of whose acct. file 00091F10 4 ZBM 705 APLINK EQU APWORDA/FLDADRS 00170801 4 BASE 706 APRECORD BSS (AFRMAXLEN+3)/CPW holds the accounting entry (round up) 707 DRCT 0000000E DISP 708 APLNTH EQU DISP APPROT length of accounting list element 00000004 ABS 709 APLOG EQU APLNTH LOG 2 log size of element for free storage 710 ORG APPROT recover lost space 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 233 (COREDEFS) F 16 Resident Data Structure Definitions 712 713 ********************************************************************************** 714 * * 715 * CPU4s can load microcode patches into their RAM from a * 716 * predefined patch file. We read in any patch files at boot * 717 * time and keep them linked in a list. At power up and boot * 718 * we tell the CPUs to load the microcode patches. * 719 * * 720 ********************************************************************************** 721 01DA1 00000000 722 PATCHLIST VFD STORE list of CPU microcode patches 01DA2 B674F7E2 723 CPUPROCNAM PAK12 SYS_CPUPATCH 724 00001DA4 725 CPUPPROTO BASE R3 0016C000 3 CACH 726 CPUPREV BSSB 8 rev level this patch is for 727 BSSB 7 filler 0008DF10 3 ZBM 728 CPUPLINK BSSB ADDRESS link to next patch 00000001 ABS 729 CPUPSIZE EQU DISPW CPUPREV length of the control stuff 0016C801 3 BASE 730 CPUPLNTH BSS 1 length of actual CPU patch 0016C802 3 BASE 731 CPUPSTRT BSS 0 where the rest of the patch goes 732 DRCT 733 ORG CPUPPROTO recover space 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 234 (COREDEFS) F 16 Resident Data Structure Definitions 735 736 ********************************************************************************** 737 * * 738 * When a CPU is removed from service for load testing, * 739 * etc. we need to keep track of it. The following is a list, * 740 * lock, and element which is used for this purpose * 741 * * 742 ********************************************************************************** 743 01DA4 00000000 744 IDLECPULCK VFD STORE 01DA5 00000000 745 IDLECPULST VFD STORE 01DA6 00000000 746 IDLECPUCNT VFD STORE number of idle CPUs 01DA7 B674FA66 747 IDLENAME PAK12 SYS_STOPCPU 00002710 ABS 748 IDLETIME EQU 10000 time to wait between seeing if it 749 * is time to resume normal work 750 00001DA9 751 ICPROTO BASE R2 752 BSSB 4 some filler 00088840 2 ZBM 753 ICSLOT BSSB 4 slot number of idle CPU 00089010 2 ZBM 754 ICNOTBUILT BSSB 1 1 sez this process has been built 00089210 2 ZBM 755 ICSTART BSSB 1 when set sez we should start back to work 756 BSSB 5 some more filler 00089F10 2 ZBM 757 ICLINK BSSB ADDRESS link to next element 758 DRCT 00000000 ABS 759 ICBLKLOG EQU (DISPW ICPROTO) LOG 2 760 ORG ICPROTO 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 235 (COREDEFS) F 16 Resident Data Structure Definitions 762 763 ********************************************************************************** 764 * * 765 * PROCESS IOBOUND QUEUES * 766 * The PCB for each process not currently running appears * 767 * in exactly one of these queues. * 768 * The PCQPARM word in each PCB contains a parameter that * 769 * usually indicates in some way what releases the user from * 770 * the queue that he is in. * 771 * Usually, users are placed onto the distal end of these * 772 * queues and removed when appropriate or from the proximal * 773 * end ( first on, first off ). However, the runnable queue * 774 * is kept in run priority order (calculated by the * 775 * scheduler). * 776 * SQLOCKS is an array of lock words corresponding to the * 777 * queues. At least one routine (SHUTDOWN) relies on the fact * 778 * that this array immediately follows the array of queue * 779 * heads. * 780 * The appropriate number from the SDPARM array is used * 781 * to determine the pre-aging of pages when a process is * 782 * entered into that queue. * 783 * * 784 ********************************************************************************** 785 786 ********************************************************************************** 787 * * 788 * When entries are added to or removed from this table * 789 * of queues, the SDPARM, LFWEIGHTAB, and STATENAME arrays * 790 * must be altered to match! * 791 * * 792 ********************************************************************************** 793 00001DA9 794 SQBEGIN LABEL start of the user wait queues 795 00000000 ABS 796 NQRUNNING EQU DISPW SQBEGIN number of this queue 01DA9 00000000 797 SQRUNNING VFD FLDADRS*STORE currently running users 798 * PCQPARM contains the CPU slot number 799 00000001 ABS 800 NQRUNNABLE EQU DISPW SQBEGIN number of this queue 01DAA 00000000 801 SQRUNNABLE VFD FLDADRS*STORE users ready but waiting ( not IOBOUND ) 802 * PCQPARM contains this elements queue priority 803 00000002 ABS 804 NQMSWAIT EQU DISPW SQBEGIN 01DAB 00000000 805 SQMSWAIT VFD FLDADRS*STORE waiting for page from MS 806 * PCQPARM contains the MS block number 807 * PCQPARM2 contains the virtual page number 808 00000003 ABS 809 NQDIOWAIT EQU DISPW SQBEGIN 01DAC 00000000 810 SQDIOWAIT VFD FLDADRS*STORE waiting for a direct I/O transfer 811 * PCQPARM contains address of an I/O control block 812 00000004 ABS 813 NQDIRWAIT EQU DISPW SQBEGIN 01DAD 00000000 814 SQDIRWAIT VFD FLDADRS*STORE waiting for directory 815 * PCQPARM contains the ULB pointer 816 00000005 ABS 817 NQADTWAIT EQU DISPW SQBEGIN 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 236 (COREDEFS) F 16 Resident Data Structure Definitions 01DAE 00000000 818 SQADTWAIT VFD FLDADRS*STORE waiting for ADT blocks 819 * PCQPARM contains the volume number 820 00000006 ABS 821 NQIDXWAIT EQU DISPW SQBEGIN 01DAF 00000000 822 SQIDXWAIT VFD FLDADRS*STORE waiting for IDX 823 * PCQPARM contains volume number, or zero if waiting for AFT 824 00000007 ABS 825 NQLOCKWAIT EQU DISPW SQBEGIN 01DB0 00000000 826 SQLOCKWAIT VFD FLDADRS*STORE waiting for access to file resource lock 827 * PCQPARM = vol num, resource number, 828 and file serial number 829 * PCQPARM2 = requested access 830 00000008 ABS 831 NQFILEWAIT EQU DISPW SQBEGIN 01DB1 00000000 832 SQFILEWAIT VFD FLDADRS*STORE waiting for file access 833 * PCQPARM = vol num and file serial number waiting for 834 * PCQPARM2 = requested access 835 00000009 ABS 836 NQPATHWAIT EQU DISPW SQBEGIN 01DB2 00000000 837 SQPATHWAIT VFD FLDADRS*STORE waiting for info to/from .PATH 838 * PCQPARM => path control block waiting on (sign if writing) 839 0000000A ABS 840 NQMSGWAIT EQU DISPW SQBEGIN 01DB3 00000000 841 SQMSGWAIT VFD FLDADRS*STORE waiting to send/receive MSG 842 * PCQPARAM => my PSA if, receiving, other PSA with sign set 843 * if waiting to send 844 0000000B ABS 845 NQUNITWAIT EQU DISPW SQBEGIN 01DB4 00000000 846 SQUNITWAIT VFD FLDADRS*STORE waiting to send/receive UNIT 847 * PCQPARAM => my PSA if, receiving, other PSA with sign set 848 * if waiting to send 849 0000000C ABS 850 NQTERMWAIT EQU DISPW SQBEGIN 01DB5 00000000 851 SQTERMWAIT VFD FLDADRS*STORE waiting for terminal input 852 * PCQPARM => TCB waiting on 853 0000000D ABS 854 NQTRMOWAIT EQU DISPW SQBEGIN 01DB6 00000000 855 SQTRMOWAIT VFD FLDADRS*STORE waiting for terminal output 856 * PCQPARM => TCB waiting on 857 0000000E ABS 858 NQTIMEWAIT EQU DISPW SQBEGIN 01DB7 00000000 859 SQTIMEWAIT VFD FLDADRS*STORE waiting for the clock to move 860 * PCQPARM = event bits waiting for 861 0000000F ABS 862 NQSTOPWAIT EQU DISPW SQBEGIN 01DB8 00000000 863 SQSTOPWAIT VFD FLDADRS*STORE process stopped by another 864 00000010 ABS 865 NQTROUBLE EQU DISPW SQBEGIN 01DB9 00000000 866 SQTROUBLE VFD FLDADRS*STORE troublemaker 867 * PCQPARM contains jail term 868 00000011 ABS 869 NQUEUES EQU DISPW SQBEGIN number of user wait queues 870 00001DBA 871 SQLOCKS BSS NQUEUES locks for the SQs 872 873 * define a bit array to indicate the queues on which new elements 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 237 (COREDEFS) F 16 Resident Data Structure Definitions 874 * must be added at the end (i.e. queues for resources) 4C000000 ABS 875 FIRSTPART EQU (1*BIT NQRUNNABLE)+(1*BIT NQDIRWAIT)+(1*BIT NQADTWAIT) 03800000 ABS 876 SECONDPART EQU (1*BIT NQIDXWAIT)+(1*BIT NQLOCKWAIT)+(1*BIT NQFILEWAIT) 00700000 ABS 877 THIRDPART EQU (1*BIT NQPATHWAIT)+(1*BIT NQMSGWAIT)+(1*BIT NQUNITWAIT) 01DCB 00481DCC 878 SQAPPENDIT PTR SQENDARRAY/BIT 0 01DCC 4FF00000 879 SQENDARRAY VFD FIRSTPART+SECONDPART+THIRDPART 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 238 (COREDEFS) F 16 Resident Data Structure Definitions 881 882 ********************************************************************************** 883 * * 884 * SDPARM array * 885 * When a process is placed into a queue, its pages are * 886 * all aged by the number extracted from this table, then the * 887 * TAKEOLD routine is called to remove any ancient pages. * 888 * When a user gets suspended, we can assume that he will * 889 * stay suspended for a short length of time. During this * 890 * time, the pages that he owns might more profitably be used * 891 * by other running processes. These parameter values are * 892 * adjusted based on the expected length of time that the * 893 * process will spend suspended in the corresponding queue. * 894 * If a parameter is decreased, it has the effect of * 895 * leaving more pages in the users working set when he enters * 896 * the queue. If he remains in the queue for a short time * 897 * only, he will have more pages available when he is * 898 * restarted. * 899 * If a parameter is increased, it has the effect of * 900 * removing more pages from the users working set when he * 901 * enters the queue. He will therefore have fewer pages * 902 * available when he leaves the queue, even if he stays * 903 * suspended for a very short time. * 904 * Note that on a heavily loaded system, a parameter * 905 * greater that MMAGE means that essentially no pages will be * 906 * left in this users working set when he is suspended. * 907 * Note also, that the IDLSPEED parameter controls * 908 * additional periodic aging of a suspended users working set. * 909 * The value for the sizewait (trouble maker) queue is * 910 * set to the largest value that can be added to an existing * 911 * PAGEAGE without overflowing the field. This ensures that * 912 * during the shutdown of a troublemaker we remove all of his * 913 * pages. * 914 * * 915 ********************************************************************************** 916 01DCC 00000000 917 SDPARM VFDB 16:0 running (never used) 01DCD 00000000 918 VFDB 16:0 runnable 01DCE 00000000 919 VFDB 16:0,0 mswait, diowait 01DD0 00000004 920 VFDB 16:4,4,4,4 dirwait, adtwait, idxwait, lockwait 01DD0 0000000C 921 VFDB 16:00C filewait 01DD2 00000008 922 VFDB 16:008,008,008 pathwait, msgwait, unitwait 01DD3 00000010 923 VFDB 16:010,010 termwait, termowait 01DD3 00000010 924 VFDB 16:010 timewait 01DD4 00001FFF 925 VFDB 16:01FFF stopwait 01DD4 00001FFF 926 VFDB 16:01FFF trouble 00000011 ABS 927 SDPARMNUM EQU (DISPB SDPARM)/16 number of entries in this table 928 ASSERTEQ NQUEUES,SDPARMNUM make sure it's right number 928 BSS NQUEUES-SDPARMNUM error if NQUEUES < SDPARMNUM 928 BSS SDPARMNUM-NQUEUES error if SDPARMNUM < NQUEUES 01DD6 04081DCD 929 PSDPARM PTR SDPARM pointer to above table 930 931 ********************************************************************************** 932 * * 933 * Load factor parameters. * 934 * The load factor algorithm calculates a number based on * 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 239 (COREDEFS) F 16 Resident Data Structure Definitions 935 * the number of users waiting for system resources (NOT user * 936 * controllable resources). The LFWEIGHT table controls the * 937 * the amount of weight given for each user in a given SQ. In * 938 * order to smooth out the variations in this value, the newly * 939 * calculated value is combined with the old value using a * 940 * weighted averaging scheme. Here live the parameters that * 941 * get changed controlling the load factor algorithm. The * 942 * constants used are defined in TICK. * 943 * * 944 ********************************************************************************** 945 01DD7 00000000 946 LOADFACT VFD STORE current integer load factor 01DD8 00000000 947 SCALEDLF VFD STORE the raw (scaled) version of the load factor 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 240 (COREDEFS) F 16 Resident Data Structure Definitions 949 950 ********************************************************************************** 951 * * 952 * PHYSICAL PAGE ELEMENTS (PPL) * 953 * Exactly one PPL exists for each swappable physical * 954 * page on the system. This element may be in: the chain of * 955 * available pages (PPIDLE), one of the chains of active pages * 956 * (PPAGELIST), or held by the mass storage driver during a * 957 * transfer in. Also, if a physical page is reserved for free * 958 * storage, the PPL is placed in a special holding area by the * 959 * free storage manager ( so that if the page is later * 960 * recombined, its PPL may be returned to the idle list ). * 961 * The PPAGELIST actually consists of multiple list heads * 962 * in order to reduce search time. A hash code on PPBLOCK * 963 * determines which list head is used. Due to the uniform * 964 * distribution and unsystematic use of block numbers, the * 965 * rightmost bits of PPBLOCK are used directly as the hash * 966 * code. * 967 * A copy of the file block identifier for the disk block * 968 * is kept associated with the PPL. FBIs for PPLs are always * 969 * accessed via the PPLWINDOW virtual page. Page map values * 970 * for pages containing PPL FBI's are kept in the PPLPFMAP * 971 * table. Each PPL has an index into this table (PPFBIBLK) in * 972 * which location the PM value for its FBI is kept. Another * 973 * field, PPFBIDISP is the displacement into the virtual page * 974 * of the first word of the FBI. PPLWINDOW is kept generally * 975 * unmapped. Access to it is acquired by first mapping in the * 976 * page. Interrupts must be off throughout access, as the * 977 * interrupt system is not smart enough to re-map this window * 978 * should it destroy it. Watch out for page fault interrupts! * 979 * The PPMODIFIED bit is set to indicate that this * 980 * physical page ( or its FBI ) has been altered. Implicitly, * 981 * the altered page must be written to mass storage. * 982 * The PPPUTADT bit indicates that this block is being * 983 * written to mass storage because it has been freed. After * 984 * the prior users MS data is safely destroyed (by this * 985 * write), the PPL is set to indicate that no MS block is * 986 * present. This is so that a subsequent zeropage request for * 987 * this block will not cause two main memory pages to be * 988 * images of the same MS block (this would be fatal!). * 989 * Afterwards, the block is made available in the ADT. We also * 990 * move this PPL to the head of the clean IDLE list (where it * 991 * will be used next). * 992 * The PPFWIP bit indicates that this page is being * 993 * forced out to Mass Storage, generally because of a * 994 * crashproofing requirement. This bit forces any new * 995 * reference to this page to wait for the forcewrite to * 996 * finish. * 997 * The PPBUSYWORD is incremented for each PAL that exists * 998 * and for each MSQ write element that exists. If this count * 999 * goes to zero on a dirty page, a MSQ write element is * 1000 * created. If this count goes to zero on a clean page, the * 1001 * PPL is moved to the IDLE list. * 1002 * * 1003 ********************************************************************************** 1004 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 241 (COREDEFS) F 16 Resident Data Structure Definitions 00000006 ABS 1005 LOGHASHTSZ EQU 6 number of bits used for hash 00000040 ABS 1006 HASHTSIZ EQU 2 POWER LOGHASHTSZ number of page table headers 00003460 BYTE 1007 PPHASHFLD BITS (32-LOGHASHTSZ):31 field in MS address which 1008 * is used for hashing 01DD9 00000000 1009 PPIDLOCK VFD STORE lock for idle lists (clean and used) 01DDA 00000000 1010 PPIDLCOUNT VFD STORE count of idle pages (clean and used) 01DDB 00000000 1011 PPLASTL VFD STORE last chain searched for used idle pages 1012 00000005 ABS 1013 LIDLHASHSZ EQU 5 number of bits used for hash 00000020 ABS 1014 IDLETBSZ EQU 2 POWER LIDLHASHSZ size of used idle tables 00003650 BYTE 1015 IDLHASHFLD BITS (32-LIDLHASHSZ):31 field in MS address used 1016 * for hashing 01DDC 00000000 1017 PPCLNIDLE VFD STORE list of 'clean' idle pages 00001DDD 1018 PPUSDIDLE BSS IDLETBSZ chain of 'used' idle pages 00001DFD 1019 PPENDIDLE BSS IDLETBSZ ends of 'used' idle page chains 1020 1021 * ( PPLs in PPIDLE ) 1022 01E1D 00000000 1023 PPLINIT VFD STORE list of PPLs generated for INITIAL and 1024 * INITPROC pages. These get added to the 1025 * clean idle list after INITPROC has run. 1026 01E1E 00000000 1027 PPERRLOCK VFD STORE lock used for the following list 01E1F 00000000 1028 PPERRLIST VFD STORE list of "retired" pages (usually due 1029 * to parity errors) PPLs 01E20 00000000 1030 PPERRCOUNT VFD 0+STORE count of retired pages 1031 00001E21 1032 PPAGELOCK BSS HASHTSIZ locks for PPAGE lists 00001E61 1033 PPAGELIST BSS HASHTSIZ chain of physical pages 1034 1035 1036 NOLIST CREF 00130000 4 REG 1037 PPL EQU R4 pointer to PPAGE element 1038 LIST CREF 00001EA1 1039 PPAGEPROT BASE PPL PHYSICAL PAGE ELEMENT 1040 BSSB 2 for readability 000904A0 4 ZBM 1041 PPFBIDISP BSSB WPP LOG 2 displacement part of FBI location 00091810 4 ZBM 1042 DUALWPPL BSSB 1 indicates second PPL in dualwrite 1043 BSSB 2 for readability 00091F10 4 ZBM 1044 PPLINK BSSB ADDRESS link to next element 1045 00170801 4 BASE 1046 PPBLOCK BSS 1 drive and MS block number 1047 00170802 4 BASE 1048 PPBUSYWORD BSS 1 count of page access elements pointing here 00090052 4 ZBM 1049 PPCNTL EQU PPBUSYWORD/BITS 0:4 control field 00090012 4 ZBM 1050 PPMODIFIED EQU PPCNTL/BIT 27 page modified flag 00090212 4 ZBM 1051 PPDISKERR EQU PPCNTL/BIT 28 on if mass storage error reading in block 00090412 4 ZBM 1052 PPPUTADT EQU PPCNTL/BIT 29 when page is written out, MS driver 1053 * should place block into ADT and 1054 * prevent block from being found resident. 00090612 4 ZBM 1055 PPFWIP EQU PPCNTL/BIT 30 indicates a force write is in progress 00090812 4 ZBM 1056 PPMEMERR EQU PPCNTL/BIT 31 a parity error has occurred on this page 00090C62 4 ZBM 1057 PPFBIBLK EQU PPBUSYWORD/BITS 6:11 index into PPLPFMAP for FBI 00001E10 BYTE 1058 PPBSYHIBIT EQU BIT 15 highest bit still in the count field 1059 * the busy count is tested with a JZA 1060 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 242 (COREDEFS) F 16 Resident Data Structure Definitions 00170803 4 BASE 1061 PPPMVALUE BSS 1 page map value, always read/write here 1062 * the copy of this value that 1063 * goes into a PAL will be made 1064 * read-only there if needed. 1065 DRCT 00000004 ABS 1066 PPLNTH EQU DISPW PPAGEPROT length of a PPAGE element 00000002 ABS 1067 PPLOG EQU PPLNTH LOG 2 1068 ORG PPAGEPROT 1069 1070 ********************************************************************************** 1071 * * 1072 * PPFB elements. * 1073 * For a few special cases, a PPL and a corresponding FBI * 1074 * are placed into a single block of free storage. This * 1075 * definition serves to format a block of this form. * 1076 * * 1077 ********************************************************************************** 1078 00001EA1 1079 PPFBPROTO BASE PPL 1080 BSS PPLNTH allot room for the PPL 00170804 4 BASE 1081 PPFBFBI BSS FBILNTH and room for the FBI 1082 DRCT 0000000F ABS 1083 PPFBLNTH EQU DISPW PPFBPROTO length of the element 00000004 ABS 1084 PPFBLOG EQU PPFBLNTH LOG 2 1085 ORG PPFBPROTO 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 243 (COREDEFS) F 16 Resident Data Structure Definitions 1087 1088 ********************************************************************************** 1089 * * 1090 * For doing system load testing pages are sometimes * 1091 * taken out of service from the system. We keep track of * 1092 * these pages on the TAKELIST. TAKENUM is set to indicate the * 1093 * number of pages we want removed from the system, and * 1094 * TAKECOUNT is the number actually removed. The dispatcher * 1095 * checks to see if these are equal and if not will do what * 1096 * ever is necessary to make them equal. * 1097 * * 1098 ********************************************************************************** 1099 01EA1 00000000 1100 TAKELOCK VFD STORE lock for the following list 01EA2 00000000 1101 TAKELIST VFD STORE list of pages taken from system 01EA3 00000000 1102 TAKENUM VFD STORE number of pages requested to be taken 01EA4 00000000 1103 TAKECOUNT VFD STORE number of pages actually taken 1104 00000014 ABS 1105 TAKEFUDGE EQU 20 number of extra pages needed beyond 1106 * the amount used by the system and 1107 * a set amount for each user 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 244 (COREDEFS) F 16 Resident Data Structure Definitions 1109 ********************************************************************************** 1110 * * 1111 * Session Name/Number Table * 1112 * This table associates server names (like "!SPOOLER") * 1113 * with session numbers. It is manipulated with the * 1114 * URGETPNUM, ORSETPNUM and ORCLRPNUM requests. * 1115 * * 1116 ********************************************************************************** 1117 01EA5 00000000 1118 PNAMELOCK VFD STORE lock for this list (LOCKLIST & SRCHLIST) 01EA6 00000000 1119 PNAMELIST VFD STORE root for this list 1120 00001EA7 1121 PNAMEPROT BASE R0 one for each server name 00160800 0 BASE 1122 PNAMELINK BSS 1 link to next PNAME element 00160801 0 BASE 1123 PNAMEPROC BSS 1 session number responsible for this entry 00160802 0 BASE 1124 PNAMELEN BSS 1 length of the following name 00000028 ABS 1125 PNAMEMAXLN EQU 40 maximum name length 0016000C 0 CACH 1126 PNAMENAME BSSC PNAMEMAXLN the actual name 1127 DRCT 00000004 ABS 1128 PNAMELOG EQU (DISPW PNAMEPROT) LOG 2 log size of this block 1129 ORG PNAMEPROT 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 245 (COREDEFS) F 16 Resident Data Structure Definitions 1131 1132 ********************************************************************************** 1133 * * 1134 * Operator Message List * 1135 * The following list describes the pending messages to * 1136 * the operator. These can be automatically generated by the * 1137 * system (eg, for device not ready errors) or by XREQs. The * 1138 * first 10 characters of each message will be displayed in * 1139 * the front panel lights and the rest is available for output * 1140 * to the operator via an XREQ. * 1141 * Each message has a unique serial number (assigned * 1142 * sequentially from 1 after boot) which is never re-used. * 1143 * The serial number is needed to cancel a message. * 1144 * * 1145 ********************************************************************************** 1146 01EA7 00000000 1147 OPMSGLOCK VFD STORE lock for the operator message list 01EA8 00000000 1148 OPMSGLIST VFD STORE head of the list 1149 00001EA9 1150 OPMSGPROTO BASE R0 prototype of message 00160800 0 BASE 1151 OPMSGWORDA BSS 0 word label for beginning 00080010 0 ZBM 1152 OPMSGHORN BSSB 1 sound horn when displaying this message 000802E0 0 ZBM 1153 OPMSGPROC BSSB 14 session originating message 00081F10 0 ZBM 1154 OPMSGLINK BSSB ADDRESS link to next element 00080181 0 ZBM 1155 OPMSGID BSSB 24 message serial number 00160007 0 CACH 1156 OPMSGLEN BSSB 8 length of this message 00160802 0 BASE 1157 OPMSGTEXT LABEL 00160008 0 CACH 1158 OPMSGTEXTC BSSC 0 1159 BSS 32-(DISPW OPMSGWORDA) room for message text 00000077 ABS 1160 OPMSGMAXLN EQU (DISPC OPMSGTEXT)-1 max message length, 1161 * with room for final null 1162 DRCT 00000005 ABS 1163 OPMSGLOG EQU (DISPW OPMSGPROTO) LOG 2 log size of block 1164 ORG OPMSGPROTO recover lost space 1165 01EA9 00000000 1166 OPMSGSER VFD STORE last serial number assigned 01EAA 00000000 1167 OPMSGDISP VFD STORE serial number of message being displayed 1168 * (zero if normal display) 24 INPUT VIRTCOREDEFS virtual system in-core structure definitions 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 246 (VIRTCOREDEFS) F 17 Virtual System Data Structure Definitions 3 4 ********************************************************************************** 5 * * 6 * USER LIMIT LIST * 7 * This list contains the limits for accounts that are in * 8 * use. When a file is referenced or an account is logged * 9 * onto the system its limit block is copied into a resident * 10 * ULB. This allows all usage of an account to be accounted * 11 * and limited by one copy of that accounts limits. * 12 * ULLOCK is incremented by one when someone is searching * 13 * the list and decremented once the searcher has incremented * 14 * the busy counter on his entry. The top bit of ULLOCK goes * 15 * on when someone wishes to modify the links of the list - * 16 * any new searchers must wait and the modifier must wait * 17 * until all searching is finished. * 18 * Note that ULLOCK locks all changing of the first word * 19 * of the ULB. A failure may occur if the first word is * 20 * changed without the lock held, even if the change is by a * 21 * RMW instruction. Especially note the individual bits in * 22 * the upper part of the word. * 23 * The ULLIMITS part of this block is a bit by bit copy * 24 * of the UDLIMITS area in the directory corresponding to this * 25 * entry. Whenever one wants to update any of these fields in * 26 * the ULB they should hold the lock ULLIMLOCK. For whole word * 27 * entries RMW instructions will be sufficient. Note that * 28 * some of these fields are cleared with a STZ, this is not a * 29 * RMW instruction. Since the limits are not critical fields * 30 * ( not likely to cause a system crash ) this is an * 31 * acceptable risk. * 32 * * 33 ********************************************************************************** 34 01EAB 00000000 35 ULLIST VFD FLDADRS*STORE root of user limit list 01EAC 00000000 36 ULLOCK VFD STORE lock word for user limit list 01EAD 00000000 37 DIRLOCKING VFD STORE in the process of locking or unlocking a ULB 01EAE 00000000 38 SYSTEMULB VFD FLDADRS*STORE pointer to system overhead ULB 01EAF 00000000 39 ULLIMLOCK VFD STORE lock for updating ULB limits 40 41 NOLIST CREF 00130000 4 REG 42 ULB EQU R4 43 LIST CREF 00001EB0 44 USERLIMITS BASE ULB USER LIMITS BLOCK 00170800 4 BASE 45 ULWORDA BSS 1 00090010 4 ZBM 46 ULSHADOW EQU ULWORDA/BIT 0 on if account is a shadow 00090210 4 ZBM 47 ULFOREIGN EQU ULWORDA/BIT 1 on if account volume is foreign 00090410 4 ZBM 48 ULRAFDIR EQU ULWORDA/BIT 2 1 sez directory is two level indexed 00090610 4 ZBM 49 ULNOTHERE EQU ULWORDA/BIT 3 on if ULB is only partially here 50 * ( being destroyed ) 10000000 ABS 51 ULNOTHING EQU 1*BIT 3 to set above bit 000908B0 4 ZBM 52 ULIDENT EQU ULWORDA/BITS 4:14 constant value identifying a ULB 00000765 ABS 53 ULIDVAL EQU 0765 value in ULIDENT (looks like xECA) 00091F10 4 ZBM 54 ULLINK EQU ULWORDA/FLDADRS pointer to next limit block 00170801 4 BASE 55 ULBLOCK BSS 1 MS address of directory 00090081 4 ZBM 56 ULDRIVE EQU ULBLOCK/VOLFIELD drive dir. on 00091181 4 ZBM 57 ULMSBLK EQU ULBLOCK/MSBLKFIELD drive address of dir. 00170802 4 BASE 58 ULACCNM BSS2 1 programmer name of account 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 247 (VIRTCOREDEFS) F 17 Virtual System Data Structure Definitions 00170804 4 BASE 59 ULACCPROJ BSS 1 division-project of account 60 * NOTE: CAUTION, HAZARD, DANGER, DANGER. The following 61 * word may not be modified at any time, in any way shape 62 * or form, by any operation that is not a RMW. No 63 * ZBMs will do. 00170805 4 BASE 64 ULBUSYWORD BSS 1 80000000 ABS 65 ULBLOCKING EQU 1*BIT 0 bit set in busy word to indicate dir in use 66 * The following symbol may only be used to examine 67 * the current count. It may not be modified. 00091F15 4 ZBM 68 ULBUSYCTR EQU ULBUSYWORD/FLDADRS count of people using this ULB 69 * UDLIMITS -- copy of directory information 00170806 4 BASE 70 ULLIMITS BSS LIMITSIZE user limits 00170806 4 BASE 71 ULRWORD EQU ULLIMITS/RESTRWORD restrictions word 00090816 4 ZBM 72 ULRSTRG1 EQU ULRWORD/XREQRSTR/BIT 31 00090616 4 ZBM 73 ULRSTRG2 EQU ULRWORD/XREQRSTR/BIT 30 00090416 4 ZBM 74 ULRSTRG3 EQU ULRWORD/XREQRSTR/BIT 29 00090216 4 ZBM 75 ULRSTRG4 EQU ULRWORD/XREQRSTR/BIT 28 00090016 4 ZBM 76 ULRSTRG5 EQU ULRWORD/XREQRSTR/BIT 27 00170807 4 BASE 77 ULPWORD EQU ULLIMITS/PRIVWORD privilege word 00090047 4 ZBM 78 ULFACCESS EQU ULPWORD/LIMFACCESS file access control 00090847 4 ZBM 79 ULPACCESS EQU ULPWORD/LIMPACCESS password access control 00091A57 4 ZBM 80 ULLOGSPOT EQU ULPWORD/LIMLOGSPOT where to write accounting info 00170808 4 BASE 81 ULTIMLIM EQU ULLIMITS/TIMLIM time limit ( in seconds ) 00170809 4 BASE 82 ULTIMUSD EQU ULLIMITS/TIMUSD time used ( in seconds ) 0017080A 4 BASE 83 ULWLCKLIM EQU ULLIMITS/WLCKLIM wall clock limit ( in minutes ) 0017080B 4 BASE 84 ULWLCKUSD EQU ULLIMITS/WLCKUSD wall clock time used ( in minutes ) 0009018C 4 ZBM 85 ULDSKSAVL EQU ULLIMITS/DSKSAVL saved disk blocks limit 0009318C 4 ZBM 86 ULDSKWARN EQU ULLIMITS/DSKWARN disk block warning limit 0009218D 4 ZBM 87 ULDSKLIM EQU ULLIMITS/DSKLIM disk block hard limit 0009118E 4 ZBM 88 ULDSKUSD EQU ULLIMITS/DSKUSD disk blocks used 89 * end of copy of directory information 0017080F 4 BASE 90 ULSCRDSK BSS 1 scratch disk space 91 DRCT 00000004 ABS 92 ULLOG EQU (DISP USERLIMITS) LOG 2 length of limit block 93 ORG USERLIMITS 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 248 (VIRTCOREDEFS) F 17 Virtual System Data Structure Definitions 95 96 ********************************************************************************** 97 * * 98 * PROCESS CONTROL BLOCK * 99 * One PCB is associated with each session. This block * 100 * holds the suspension information for a process. The reason * 101 * these exist and the information is not just kept in the PSA * 102 * is that it is planned that someday the PSA would be in * 103 * virtual memory and that the PCBs would be the only * 104 * guaranteed resident part of a user. Thus it holds his * 105 * running/suspended information. * 106 * The first three words of this list element are locked * 107 * by the lock word for the SQ. The remainder is locked by * 108 * PCNTLLOCK. * 109 * * 110 ********************************************************************************** 111 01EB0 00000000 112 PCCOUNT VFD STORE number of entries in PCONTROL list 01EB1 00000000 113 PCONTROL VFD FLDADRS*STORE list of process control blocks 114 * non-standard links 01EB2 00000000 115 PCNTLLOCK VFD STORE lock for above and PCNUMARRAY 116 * incremented when searching, 117 * sign on when changing 01EB3 00481EB4 118 PPCNUMARR PTR PCNUMARRAY/BIT 0 bit pointer to pnum array 01EB4 7FFFFFFF 119 PCNUMARRAY VFD 07FFFFFFF array of available process numbers 01EB6 FFFFFFFF 120 VFD -1,-1 (0 is not available) 01EB8 FFFFFFFF 121 VFD -1,-1 ARRAY SIZE MUST BE POWER OF TWO, 01EBA FFFFFFFF 122 VFD -1,-1 GREATER THAN TWO (for FINDSESSNM 01EBC FFFFFFFF 123 VFD -1,-1 to work) 01EBE FFFFFFFF 124 VFD -1,-1 array is locked by PCNTLLOCK 01EC0 FFFFFFFF 125 VFD -1,-1 01EC2 FFFFFFFF 126 VFD -1,-1 01EC3 FFFFFFFF 127 VFD -1 16 words = 511 possible numbers 00000010 ABS 128 PCNUMARRSZ EQU DISPW PCNUMARRAY size of table 129 00130000 4 REG 130 PCB EQU R4 00001EC4 131 PCBPROT BASE PCB 00170000 4 CACH 132 PCQPARM2 BSSB 8 extra reason field for shutdown 00091010 4 ZBM 133 PCQCLNMARK BSSB 1 marker used by WHICHHUNT 00091260 4 ZBM 134 PCQUEUE BSSB 6 'name' of queue this session is in 00091F10 4 ZBM 135 PCQLINK BSSB ADDRESS link in queue 00170801 4 BASE 136 PCQPARM BSS 2 reason that user is in this queue 137 138 * Above locked by SQLOCKS, below by PCNTLLOCK 139 0000000C ABS 140 PROCNUMSIZ EQU 12 size of session number in bits 141 * ( may have 4096 sessions ) 00001000 ABS 142 MAXPROCNUM EQU 2 POWER PROCNUMSIZ highest session number (+1) 000900C3 4 ZBM 143 PCPROCNUM BSSB PROCNUMSIZ identifying session number 00091813 4 ZBM 144 PCSYSPROC BSSB 1 one sez this is a system process 00091A13 4 ZBM 145 PCSPECPROC BSSB 1 this guy is special (not an ALL for the OPR) 146 BSSB 1 filler to make things easier to read 00091F13 4 ZBM 147 PCPSADRS BSSB ADDRESS pointer to associated PSA 000900C4 4 ZBM 148 PCPARENT BSSB PROCNUMSIZ session number of parent session 149 BSSB 3 filler to make things readable 00091F14 4 ZBM 150 PCNXTCB BSSB ADDRESS pointer to next PCB 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 249 (VIRTCOREDEFS) F 17 Virtual System Data Structure Definitions 00170805 4 BASE 151 PCBSITE BSS 2 site name for this session 152 153 DRCT 00000007 DISP 154 PCBLNTH EQU DISP PCBPROT length of a PCB 00000003 ABS 155 PCBLOG EQU PCBLNTH LOG 2 size for memory routines 156 ORG PCBPROT reclaim lost space 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 250 (VIRTCOREDEFS) F 17 Virtual System Data Structure Definitions 158 159 ********************************************************************************** 160 * * 161 * VIRTUAL TABLES * 162 * * 163 ********************************************************************************** 164 165 ********************************************************************************** 166 * * 167 * PROCESS STATUS AREA * 168 * A PSA is created for each user session. It contains * 169 * the chain heads for all of the lists associated with the * 170 * session, pointers to other items associated with the * 171 * session, and any other miscellaneous items required. * 172 * * 173 * PSLOCK and foreign access to a PSA. * 174 * * 175 * A PSA may be safely accessed by either the process * 176 * that is running from that PSA or by a properly cautious * 177 * process via the PCB list. These cases are explained * 178 * separately: * 179 * * 180 * 1) The session data structures are designed to allow free access to * 181 * the process running out of the PSA. That is, nearly no locking * 182 * is required to diddle the structures. The only exceptions being, * 183 * creation, destruction, and modification of those structures that * 184 * are required by the asynchronous interrupts. * 185 * Creation: since access is gained to the PSA via its PCB, a * 186 * session is created by building the PSA and all associated * 187 * tables and then lastly placing the PCB into the PCB list. * 188 * Destruction: since someone could be looking at the PSA while * 189 * it is being destroyed, the PCB is first removed from its * 190 * list and the destroyer waits until PSLOCK is unlocked. * 191 * That is, the session is removed so no one else may find it * 192 * and then you wait until all of the lookers are gone. * 193 * Session data structure examination: the process running from * 194 * the PSA may examine any data structure associated with that * 195 * PSA without any locking since only that process modifies * 196 * the structures and any transient modifiers only add to * 197 * the ends of lists. The exceptions to this are the UPCVASP * 198 * and UPCWSX lists that may be altered by the core scheduler * 199 * on any interrupt. Examination and/or modification of * 200 * these lists may only occur in the resident system with the * 201 * interrupts off. * 202 * Session data structure modification: the process running * 203 * from the PSA may modify list links freely except for the * 204 * following lists that require that PSLOCK be locked: * 205 * PSUERROR, PSGIFTUNIT * 206 * In general, though, all lists should be added to and deleted * 207 * from "cleanly". That is, at every instant the list should * 208 * be searchable. * 209 * NOTE: An interlocking problem exists in relation to * 210 * PSDFLTDIR. The current UPC (PSCURRPROC) may change * 211 * this pointer (in FRALIAS and ORBYE) and call FREEULB * 212 * or FREEULBC. If this is the only user of the ULB, * 213 * the ULB space is freed. Another session doing a * 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 251 (VIRTCOREDEFS) F 17 Virtual System Data Structure Definitions 214 * URSESSINFO or ORSESSINFO request against this session * 215 * may get a 'bad ULB' halt (HALT10E1) if it (in STATPI) * 216 * grabs the ULB being freed. A semaphore is impossible * 217 * since it would have to to be locked (IOFF) across the * 218 * FREEULB or FREEULBC, but the latter subroutines may * 219 * result in a page fault. We settle for minimizing the * 220 * critical region by expanding, slightly, the time * 221 * between changing the pointer and freeing the ULB. * 222 * * 223 * * 224 * 2) For the posting of asynchronous events, one process is required * 225 * to examine and add entries to another session's PSA lists. * 226 * The PSA is found via its PCB so, to protect the looker from * 227 * having the PSA destroyed out from under it, either the PCB * 228 * list should be locked (so that it and its PSA cannot be * 229 * removed) or the wait queue that it's in should be locked * 230 * (so that the process cannot run to destroy itself) until * 231 * PSLOCK is locked. For a foreign looker, PSLOCK must * 232 * be locked to either look at or to modify anything in * 233 * the PSA. The only foreign accessors are * 234 * those that are either posting an event interrupt or * 235 * examining the current interrupt mask to see if it should * 236 * post one. These examine the registers in the console area (the * 237 * "bottom most" one) or add to the error list. * 238 * * 239 ********************************************************************************** 240 00001EC4 241 PSAPROT BASE R2 PROGRAM STATUS AREA 00088010 2 ZBM 242 PSWAITED BSSB 1 1 sez job released from wait queue 243 (SQLOCKWAIT or SQFILEWAIT) 244 * scheduling variables 00088230 2 ZBM 245 PSLOCKCNTR BSSB 3 count for each resource locked 246 BSSB 8 filler 00089830 2 ZBM 247 PSPRIORITY BSSB 3 priority for this session 248 * 0 is highest priority, 7 least valuable 00089F10 2 ZBM 249 PSCACHN BSSB ADDRESS pntr to chain of console areas 250 00168004 2 CACH 251 PSGRACE BSSB 8 grace for ex-trouble-makers 00089071 2 ZBM 252 PSPFFREQ BSSB 7 disk xfers frequency parameter 00089F11 2 ZBM 253 PSCACHNP1 BSSB ADDRESS pntr to 2nd console area in chain 254 000880F2 2 ZBM 255 PSWSSIZE BSSB 15 working set size (oversized) 00089F12 2 ZBM 256 PSPROCCB BSSB ADDRESS pntr to process control block 257 00088043 2 ZBM 258 PSOURCPU BSSB 4 CPU that we want to run on (0=>don't care) 000888B3 2 ZBM 259 PSLGFSESS BSSB 11 session to send logoff message to 00089F13 2 ZBM 260 PSUSERLIMP BSSB ADDRESS pntr to user limit block (logged on) 261 00088044 2 ZBM 262 PSDDIRPRIV BSSB 4 privilege to access default dir. 00088854 2 ZBM 263 PSPRIVMASK BSSB 5 bits for current restrictions enforced 264 * by user, same bits as UPCPRIV 00089214 2 ZBM 265 PSCNTLMODE BSSB 1 bit indicating current UPC is CM 00089414 2 ZBM 266 PSENDRUN BSSB 1 says to put guy at end of SQRUNNABLE 267 BSSB 4 filler 00089F14 2 ZBM 268 PSDFLTDIR BSSB ADDRESS pntr to ULB of directory used as default (alias) 269 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 252 (VIRTCOREDEFS) F 17 Virtual System Data Structure Definitions 270 BSSB 15 filler 00089F15 2 ZBM 271 PSPROCLIST BSSB ADDRESS ptr to all UPC blocks 272 00088116 2 ZBM 273 PSCURRPROC BSSB ADDRESS ptr to current UPC block 0008A316 2 ZBM 274 PSUNITS BSSB ADDRESS list of global UCEs for this session 275 BSSB 13 filler 00089F17 2 ZBM 276 PSFCBLIST BSSB ADDRESS list of all FCBs for this session 277 00168808 2 BASE 278 EVENTLOCK BSS 1 event lock for URDELAY and GIVEUINT 279 00168809 2 BASE 280 PSGIFTUNIT BSS 1 list of gift units 281 BSS 0 the following words are not implicitly interlocked 0008810A 2 ZBM 282 PSSUMCPU BSSB 16 sum of CPU time used 0008A10A 2 ZBM 283 PSSUMSDT BSSB 16 sum of shut down time 0000FFFF ABS 284 PSSUMMAX EQU (2 POWER 16)-1 max possible value for above fields. 0008810B 2 ZBM 285 PSLASTQUAN BSSB 16 size of last quantum 0016880C 2 BASE 286 PSLOCK BSS 1 lock controlling foreign access 287 * to these fields: PSUERROR, PSGIFTUNIT 0016880D 2 BASE 288 PSUERROR BSS 1 list of pending user error codes 289 * error list locked by PSLOCK 290 * Following fields define the format of both PSUERROR and UPCUERROR, 291 * the 'root' words of the user error lists for the session and for 292 * individual underprocesses. Some fields are not used by both, and 293 * the non-user should leave such fields 0. 00001610 BYTE 294 RTVMFISRB EQU BIT 11 on if session should get UINTVMFISR 00001810 BYTE 295 RTSTOPB EQU BIT 12 on if session is to go to STOPWAIT 00001A10 BYTE 296 RTSWITCHB EQU BIT 13 on if to switch this session out 00001C10 BYTE 297 RTVERYBADB EQU BIT 14 1 sez a monitor interruptable condition in list 00001750 BYTE 298 RTUERRORZ EQU RTVMFISRB+RTSTOPB+RTSWITCHB+RTVERYBADB+FLDADRS 299 0016880E 2 BASE 300 PSSHUTTIME BSS 1 time of last shutdown 0016880F 2 BASE 301 PSQUANTPTR BSS 1 serial number of quantum timer element 00168810 2 BASE 302 PSTIMEUSED BSS 1 cpu time used ( in ms. ) 00168811 2 BASE 303 PSTIMLIM BSS 1 limit for PSTIMEUSED ( in ms. ) 00168812 2 BASE 304 PSSESUSD BSS 1 session output blocks created 00168813 2 BASE 305 PSSESLIM BSS 1 session output blocks limit 00168814 2 BASE 306 PSSESMAX BSS 1 session output blocks maximum (high water mark) 00168815 2 BASE 307 PSHELDATE BSS2 1 wall clock time of hello 00168817 2 BASE 308 PSOPMSGID BSS 1 id of most recent message to operator 00168818 2 BASE 309 PSMSGALLOW BSS 1 mask for message classes allowed 00168819 2 BASE 310 PSMSGINT BSS 1 mask for msg classes causing interrupt 0016881A 2 BASE 311 PSMSGLIST BSS 1 list of pending messages 0016881B 2 BASE 312 PSMAPVALS BSS MAXMAPVALS PM values for free storage pages, 313 * defined with page file definintions. 314 DRCT 00000005 ABS 315 PSLOG EQU (DISPW PSAPROT) LOG 2 length of PSA 316 ORG PSAPROT 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 253 (VIRTCOREDEFS) F 17 Virtual System Data Structure Definitions 318 319 ********************************************************************************** 320 * * 321 * Temporary area used in the processing of file name * 322 * parameters. * 323 * * 324 ********************************************************************************** 325 326 NOLIST CREF 00134000 5 REG 327 EQT EQU R5 328 LIST CREF 00001EC4 329 EQTEMPPROT BASE EQT 00174800 5 BASE 330 EQWORDA BSS 1 00094010 5 ZBM 331 CNTLPKFLG EQU EQWORDA/BIT 0 on if control chars to pack as letters 00174801 5 BASE 332 EQVOLUME BSS2 1 volume name 00174803 5 BASE 333 EQSYSTEM BSS 1 system name 00174804 5 BASE 334 EQVOLPW BSS2 1 password (not used as yet) 00000005 ABS 335 EQELSIZE EQU DISPW EQVOLUME words in each part 00174806 5 BASE 336 EQACCT BSS2 1 account name 00174808 5 BASE 337 EQACCTPROJ BSS 1 account project 00174809 5 BASE 338 EQACCTPW BSS2 1 account directory password 0017480B 5 BASE 339 EQFILENM BSS2 1 filename 0017480D 5 BASE 340 EQFILEEXT BSS 1 file name extension 0017480E 5 BASE 341 EQFILEPW BSS2 1 file access password 342 DRCT 00000004 ABS 343 EQTEMPLOG EQU (DISPW EQTEMPPROT) LOG 2 344 ORG EQTEMPPROT 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 254 (VIRTCOREDEFS) F 17 Virtual System Data Structure Definitions 346 347 ********************************************************************************** 348 * * 349 * GLOBAL FILE CONTROL BLOCK * 350 * All files opened for multiple write get a global file * 351 * control block to coordinate the actions between users. The * 352 * GFCs are kept in a linked list which must be locked * 353 * whenever searching for an element in the list. A pointer * 354 * to a GFC is kept in the FCB of any unit opened to a MW * 355 * file. * 356 * * 357 ********************************************************************************** 358 01EC4 00000000 359 GFCLIST VFD STORE linked list of GFCs 01EC5 00000000 360 GFCLOCK VFD STORE lock for the above list 361 00001EC6 362 GFCPROT BASE R3 0008C0F0 3 ZBM 363 GFUSECNT BSSB 15 count of users using this file 0008DF10 3 ZBM 364 GFLINK BSSB ADDRESS link to next GFC in the list 365 0008C021 3 ZBM 366 GFRAFTYPE BSSB 2 type of RAF 367 * 0 -> empty RAF 368 * 1 -> tiny RAF 369 * 2 -> small RAF 370 * 3 -> large RAF 371 BSSB 30 filler 372 0016C802 3 BASE 373 GFBLOCK BSS 1 root block of the file 0008C082 3 ZBM 374 GFVOL EQU GFBLOCK/VOLFIELD volume number portion of MS address 0008D182 3 ZBM 375 GFMSBLK EQU GFBLOCK/MSBLKFIELD actual block number 376 0016C803 3 BASE 377 GFFSN BSS 2 file serial number 0008C083 3 ZBM 378 GFFSNVOL EQU GFFSN/VOLFIELD 379 0016C805 3 BASE 380 GFXPNDLOCK BSS 1 lock held whenever a user is expanding 381 * the file 382 DRCT 00000003 ABS 383 GFCLOG EQU (DISPW GFCPROT) LOG 2 384 ORG GFCPROT recover wasted space 385 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 255 (VIRTCOREDEFS) F 17 Virtual System Data Structure Definitions 387 388 ********************************************************************************** 389 * * 390 * PATH CONTROL BLOCK * 391 * All the .PATHs in the system have an element in the * 392 * below list. These elements contain the queue elements for * 393 * the messages in the queue and the count of how many readers * 394 * and writers there are currently. * 395 * * 396 ********************************************************************************** 397 01EC6 00000000 398 PATHLOCK VFD 0 search and modify lock for list 01EC7 00000000 399 PATHLIST VFD 0 list of PATH control blocks 400 00001EC8 401 PTHPROT BASE R0 .PATH control block 00160800 0 BASE 402 PTHWORDA BSS 1 00081F10 0 ZBM 403 PTHLINK EQU PTHWORDA/FLDADRS link to next control block 404 00160801 0 BASE 405 PTHWORDB BSS 1 00080011 0 ZBM 406 PTHRDR EQU PTHWORDB/BIT 0 on if a reader exists 00080211 0 ZBM 407 PTHUSED EQU PTHWORDB/BIT 1 on if path hookup was once complete 00080411 0 ZBM 408 PTHINTE EQU PTHWORDB/BIT 2 ints enabled by reader 000808B1 0 ZBM 409 PTHSIZE EQU PTHWORDB/BITS 4:14 words used for messages 00000200 ABS 410 MAXPATHCORE EQU 2 POWER 9 max core use for message buffers 00081F11 0 ZBM 411 PTHQUE EQU PTHWORDB/FLDADRS root of message queue 412 00080112 0 ZBM 413 PTHREADER BSSB ADDRESS => PCB of path reader 00082312 0 ZBM 414 PTHREADFCB BSSB ADDRESS FCB pointer for reader of path 415 BSSB 7 filler 00081373 0 ZBM 416 PTHEXCWR BSSB PSNFLDLN UPC PSN with exclusive write access 417 00160804 0 BASE 418 PTHID BSS 2 creation date of path (unique identifier) 00080084 0 ZBM 419 PTHVOL EQU PTHID(0)/BITS 0:7 volume path is from 000810C4 0 ZBM 420 PTHBUSY EQU PTHID(0)/BITS 8:19 number of people equipped to path 000828C4 0 ZBM 421 PTHIDTOP EQU PTHID(0)/BITS 20:31 top 12 bits of date code 422 00160806 0 BASE 423 PTHWRTRS BSS 1 number of writers using this 00160807 0 BASE 424 PTHLOCK BSS 1 locks WORDB through end 425 DRCT 00000008 ABS 426 PTHLNTH EQU DISPW PTHPROT 00000003 ABS 427 PTHLOG EQU PTHLNTH LOG 2 428 ORG PTHPROT 429 430 * Proto-type for path message queue elements 00001EC8 431 PTHEPROT BASE R0 00160800 0 BASE 432 PTHEWORDA BSS 1 000800B0 0 ZBM 433 PTHENCHARS EQU PTHEWORDA/BITS 0:10 number of characters in record 00081640 0 ZBM 434 PTHELOGL EQU PTHEWORDA/BITS 11:14 word length of block log 2 00081F10 0 ZBM 435 PTHELINK EQU PTHEWORDA/BITS 15:31 pointer to next record 00160004 0 CACH 436 PTHECHARB BSSC 1 00080011 0 ZBM 437 PTHECONTN EQU PTHECHARB/BIT 24 indicates continued record 00080271 0 ZBM 438 PTHERTYPE EQU PTHECHARB/BITS 25:31 record type 00000005 ABS 439 PTHEHDR EQU DISPC PTHEWORDA fixed header size, in characters 00160005 0 CACH 440 PTHECHARS BSSC 0 user record starts here 441 DRCT 442 ORG PTHEPROT 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 256 (VIRTCOREDEFS) F 17 Virtual System Data Structure Definitions 443 000000FB ABS 444 MAXRECWR EQU 64*CPW-PTHEHDR longest chunk allowed in path queue 445 * (user record size to use 64 words) 446 447 ********************************************************************************** 448 * * 449 * The next three sections define the structures used to * 450 * implement locks on file resources. The general structure * 451 * is that DLOCKLIST holds the list of Lock Control Blocks * 452 * (LOKs). Each LOK holds a list of Resource Control Elements * 453 * (RCEs). Each RCE holds a list of Lock Identifiers. (LIDs). * 454 * The first word of LOK elements in DLOCKLIST are locked by * 455 * DLOCKLOCK. Everything else (rest of LOKs, RCEs, and LIDs) * 456 * are locked by LOKLOCK. * 457 * * 458 ********************************************************************************** 459 ********************************************************************************** 460 * * 461 * LOCK CONTROL BLOCK * 462 * One of these elements exists for each of the files for * 463 * which there is at least one resource in use. They are * 464 * created when a locking a resource of a file for which there * 465 * are no current resources. They are destroyed when * 466 * LOKRCELIST becomes empty. A lock bit is provided for * 467 * access to LOKRCELIST and any structure or data therein. * 468 * Processes that attempt to lock a resource already held by * 469 * someone else are suspended if either one wants/has write or * 470 * if someone else is already suspended waiting for that * 471 * resource. Waiting processes suspend in SQLOCKWAIT. The * 472 * shutdown parameter is the LOKSERIAL number with the * 473 * resource number plugged into LOCKRESFIELD of the first word * 474 * (a tight fit!). The "additional reason" field in the PCB * 475 * holds the type of access the guy wants. * 476 * * 477 ********************************************************************************** 478 01EC8 00000000 479 DLOCKLOCK VFD STORE search and modify lock for list 01EC9 00000000 480 DLOCKLIST VFD STORE list of LOK control blocks 000010C0 BYTE 481 LOCKRESFLD EQU BITS 8:19 extra bits in PCB to ID resource 482 00001ECA 483 LOKPROT BASE R0 lock control block 00160800 0 BASE 484 LOKLINK BSS 1 link to next LOK 00160801 0 BASE 485 LOKLOCK BSS 1 lock for sublists and data 00160802 0 BASE 486 LOKRCELIST BSS 1 full word pointer to resources 00160803 0 BASE 487 LOKRCECNT BSS 1 number of RCEs on this LOK 488 BSS 2 filler 00160806 0 BASE 489 LOKSERIAL BSS2 1 serial number of this file 00080086 0 ZBM 490 LOKVOL EQU LOKSERIAL/VOLFIELD volume that file is from 491 * (to catch duplicate serial numbers) 492 DRCT 00000008 ABS 493 LOKLNTH EQU DISPW LOKPROT length of an element 00000003 ABS 494 LOKLOG EQU LOKLNTH LOG 2 log length for GETMEM 495 ORG LOKPROT recover lost space 496 497 ********************************************************************************** 498 * * 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 257 (VIRTCOREDEFS) F 17 Virtual System Data Structure Definitions 499 * RESOURCE CONTROL ELEMENT * 500 * Each of these elements holds the list of users for a * 501 * particular "resource" from the file. They are created when * 502 * locking a resource for which there are no users. They are * 503 * destroyed when RCELIDLIST becomes empty. They can only be * 504 * accessed when the corresponding LOK element is locked. * 505 * * 506 ********************************************************************************** 507 00001ECA 508 RCEPROT BASE R0 resource control element 00160800 0 BASE 509 RCELINK BSS 1 link to next RCE 00160801 0 BASE 510 RCERESRCE BSS 1 resource number 511 BSS 1 filler 00160803 0 BASE 512 RCELIDLIST BSS 1 full word list head for users 513 DRCT 00000002 ABS 514 RCELOG EQU (DISP RCEPROT) LOG 2 515 ORG RCEPROT 516 517 ********************************************************************************** 518 * * 519 * LOCK IDENTIFIER * 520 * These elements identify a resource user. The * 521 * existence of one of these elements on the RCE list * 522 * signifies that the named session currently locks the * 523 * resource. LIDs are created and destroyed as the user locks * 524 * and unlocks the resource . LIDFCB identifies the logical * 525 * unit which was used to lock the file. When that unit is * 526 * closed all LIDs associated with it are destroyed. * 527 * LIDREADING indicates whether the lock is for reading * 528 * access. * 529 * * 530 ********************************************************************************** 531 00001ECA 532 LIDPROT BASE R0 Lock IDentifier 00080010 0 ZBM 533 LIDREADING BSSB 1 1 says for read access, 0 for write 534 BSSB 14 filler 00081F10 0 ZBM 535 LIDLINK BSSB ADDRESS link to next LID 00160801 0 BASE 536 LIDTAG LABEL labels word identifying user 000800C1 0 ZBM 537 LIDSESSION BSSB PROCNUMSIZ session number of user 538 BSSB WORDLNTH-ADDRESS-PROCNUMSIZ filler for readability 00081F11 0 ZBM 539 LIDFCB BSSB ADDRESS users unit used to lock 540 DRCT 00000001 ABS 541 LIDLOG EQU (DISP LIDPROT) LOG 2 542 ORG LIDPROT 543 544 ********************************************************************************** 545 * * 546 * USER ERROR ENTRY * 547 * One of these blocks get associated with the user * 548 * whenever an error occurs requiring a User Interrupt or * 549 * an entry to Control Mode. Elements specific to a UPC * 550 * (e.g. instruction failure) go on the UPC, all others * 551 * go on the PSA. The lists are maintained FIFO, except * 552 * that "serious" errors leap to the front. They are * 553 * checked whenever the session is associated with a CPU * 554 * that is passing through the dispatcher. * 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 258 (VIRTCOREDEFS) F 17 Virtual System Data Structure Definitions 555 * In addition to an error code and subcode, each * 556 * element has a modest control field to help us internally. * 557 * The 'Control Mode error' flag indicates whether the error * 558 * is directed toward the Control Mode process (e.g. Evict). * 559 * The 'very bad' flag indicates whether the error is * 560 * particularly serious. These errors are processed ahead * 561 * of all others in the list, and can not be "held off". * 562 * Also, they are the only errors that are processed even * 563 * if the process is in monitor state. The 'skip debug' * 564 * flag says whether the error was explicitly generated by * 565 * a debugger and so should not be given back to that * 566 * debugger. * 567 * * 568 ********************************************************************************** 569 00001ECA 570 UERPROT BASE R0 00160800 0 BASE 571 UERWORDA BSS 1 000800D0 0 ZBM 572 UERCODEZ EQU UERWORDA/BITS 0:12 control bits and code 00002610 BYTE 573 CMERRB EQU BIT 19 sez error is destined for CM 00001000 ABS 574 CMERR EQU 1*CMERRB 00002810 BYTE 575 VERYBADB EQU BIT 20 sez error is serious 00000800 ABS 576 VERYBAD EQU 1*VERYBADB 00002A10 BYTE 577 SKIPDEBUGB EQU BIT 21 sez miss debugger on pass up 00002CA0 BYTE 578 CODEPART EQU BITS 22:31 error code itself 00080210 0 ZBM 579 UERVERYBAD EQU UERCODEZ/VERYBADB 00080410 0 ZBM 580 UERCSKIPDB EQU UERCODEZ/SKIPDEBUGB 000806A0 0 ZBM 581 UERCODE EQU UERCODEZ/CODEPART 00081F10 0 ZBM 582 UERLINK EQU UERWORDA/FLDADRS link to next error 00160801 0 BASE 583 UERPARAM BSS 1 extra information on error 584 DRCT 00000001 ABS 585 UERLOG EQU (DISP UERPROT) LOG 2 size of UER element 586 ORG UERPROT 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 259 (VIRTCOREDEFS) F 17 Virtual System Data Structure Definitions 588 589 ********************************************************************************** 590 * * 591 * Message Queue Element * 592 * Each of these elements describes a message sent via * 593 * URSENDMSG. They are chained off of the PSA of the receiving * 594 * session in chronological order. All of the message lists * 595 * are locked by MSGLOCK. * 596 * * 597 ********************************************************************************** 598 01ECA 00000000 599 MSGLOCK VFD STORE lock for these lists - PLOCK and PUNLOCK 600 00001ECB 601 MQEPROT BASE R0 message queue element 00160800 0 BASE 602 MQESTART BSS 0 beginning of element 00080040 0 ZBM 603 MQELOGSIZ BSSB 4 log size of this block 000808B0 0 ZBM 604 MQELENGTH BSSB 11 length of message, in characters 00081F10 0 ZBM 605 MQELINK BSSB ADDRESS link to next message 606 00160801 0 BASE 607 MQEBUF BSS 0 start of message buffer 00080101 0 ZBM 608 MQEPROC BSSB 16 session number of sender 00082101 0 ZBM 609 MQECLASS BSSB 16 class of this message (0..31) 00160802 0 BASE 610 MQEPRIVS BSS 1 privileges asserted with this message 00000008 ABS 611 MQEHEADLEN EQU DISPC MQEBUF size of preceeding header 612 00000014 ABS 613 MQEACCTLEN EQU 20 number of characters in account name 0016000C 0 CACH 614 MQEACCT BSSC MQEACCTLEN privilege account of sender 00160020 0 CACH 615 MQETEXT BSSC 0 beginning of message text 616 00000200 ABS 617 MQEMAXCORE EQU WPP/2 maximum core occupied by all MQEs for 1 session 00000018 ABS 618 MQEOVHDLEN EQU (MQEBUF DISPC MQESTART)+MQEACCTLEN overhead on message length 000007E8 ABS 619 MQEMAXLEN EQU MQEMAXCORE*CPW-MQEOVHDLEN length of longest allowed message 620 621 DRCT 622 ORG MQEPROT 623 624 * Define message format for user buffer. 625 MSGDEFS LIST 625 ********************************************************************************** 625 * * 625 * Definition of messages sent by URSENDMSG and received * 625 * by URGETMSG. * 625 * * 625 ********************************************************************************** 625 00001ECB 625 MSGPROTO BASE R0 00080100 0 ZBM 625 MSGPROC BSSB 16 when sending: session number of receiver 625 * when receiving: session number of sender 00082100 0 ZBM 625 MSGCLASS BSSB 16 class number of this message (0..31) 00160801 0 BASE 625 MSGPRIVS BSS 1 privileges associated with this message 625 * (see below for format) 00160802 0 BASE 625 MSGSTEXT BSS 0 when sending: start of message text 00160008 0 CACH 625 MSGACCT BSSC 20 when receiving: account name of sender, 625 * in ASCII, padded with blanks, or blank 625 * if account name not given. 00160807 0 BASE 625 MSGRTEXT BSS 0 when receiving: start of message text 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 260 (VIRTCOREDEFS) F 17 Virtual System Data Structure Definitions 625 625 * Definition of bits MSGPRIVS: 625 00000010 BYTE 625 MSGPRIVID EQU BIT 0 Sender's Privilege Account name will be put into MSGACCT. 00000210 BYTE 625 MSGPRIVOS EQU BIT 1 Sender is the operating system. 00000410 BYTE 625 MSGPRIVLID EQU BIT 2 Sender's Logged On Account name will be put into MSGACCT. 00002810 BYTE 625 MSGPRIVCM EQU BIT 20 Sender is Control Mode 00002A10 BYTE 625 MSGPRIVNXO EQU BIT 21 Sender is NOT Execute Only. 00002C10 BYTE 625 MSGPRIVMGR EQU BIT 22 Sender can execute MANAGER requests. 00002E10 BYTE 625 MSGPRIVBKP EQU BIT 23 Sender can execute BACKUP requests. 00003010 BYTE 625 MSGPRIVMW EQU BIT 24 . . . MAINTENANCE WRITE requests. 00003210 BYTE 625 MSGPRIVMR EQU BIT 25 . . . MAINTENANCE READ requests. 00003410 BYTE 625 MSGPRIVOPR EQU BIT 26 . . . OPERATOR requests. 00003610 BYTE 625 MSGPRIVG5 EQU BIT 27 . . . GROUP 5 (currently unused) requests. 00003810 BYTE 625 MSGPRIVG4 EQU BIT 28 . . . GROUP 4 (message and batch) requests. 00003A10 BYTE 625 MSGPRIVG3 EQU BIT 29 . . . GROUP 3 (attribute change) requests. 00003C10 BYTE 625 MSGPRIVG2 EQU BIT 30 . . . GROUP 2 (catalog fetch) requests. 00003E10 BYTE 625 MSGPRIVG1 EQU BIT 31 . . . GROUP 1 (limit change) requests. 625 625 * Some message classes are pre defined (or at least usually used for...) 00000000 ABS 625 MSGCLSRESP EQU 0 response message 00000001 ABS 625 MSGCLSVERB EQU 1 verbal communication between users 00000002 ABS 625 MSGCLSOPR EQU 2 urgent communication from OPR 00000003 ABS 625 MSGCLSSPLR EQU 3 messages to the spooler 00000004 ABS 625 MSGCLSTERM EQU 4 concurrent session termination message 625 * EQU 5:15 reserved for BTI 625 * EQU 16:31 available to implementors 625 625 DRCT 625 ORG MSGPROTO recover lost space 25 INPUT USERCOREDEFS user in-core structure definitions 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 261 (USERCOREDEFS) F 18 User Data Structure Definitions 3 4 ********************************************************************************** 5 * * 6 * OVER/UNDER PROGRAM CONTROL * 7 * These blocks keep the variables that are associated * 8 * with a particular program ( memory, restrictions, * 9 * registers, ... etc ). Programs in a session are organized * 10 * as a tree with CM being at the top, with sons, * 11 * grandchildren, etc below it. * 12 * The PSA has one pointer to the tree head and another * 13 * pointer to the current program. Normally, there are only * 14 * two programs in any session: control mode at the top level * 15 * and the users program below it. A debugger may be inserted * 16 * between them. * 17 * A note on memory management. As discussed in the * 18 * scheduler notes, a PAL present in any UPC will prevent a * 19 * page from being removed from memory. However, a PAL does * 20 * not by itself make a volume busy. Therefore, PALs in the * 21 * working set must always be associated with a volume busy * 22 * count, otherwise the volume may be dismounted while pages * 23 * from it are still present in the PPAGE list. As a practical * 24 * matter, we must prevent any page that is part of the volume * 25 * structure (label, sec, idx) from being placed into the WSX * 26 * list. If a page is present and associated with any type of * 27 * file, it is okay to place it into the WSX. * 28 * * 29 ********************************************************************************** 30 00001ECB 31 UPCPROT BASE R0 00160800 0 BASE 32 UPCWORDA BSS 1 00081F10 0 ZBM 33 UPCSONPTR EQU UPCWORDA/FLDADRS pointer to son process 000800F0 0 ZBM 34 UPCPRIV EQU UPCWORDA/UPR15 35 00003E10 BYTE 36 UPRSTCTG1B EQU BIT 31 on if group 1 restrictions (limit change) 00003C10 BYTE 37 UPRSTCTG2B EQU BIT 30 on if group 2 restrictions (catalog fetch) 00003A10 BYTE 38 UPRSTCTG3B EQU BIT 29 on if group 3 restrictions (acct att. chng) 00003810 BYTE 39 UPRSTCTG4B EQU BIT 28 on if group 4 restrictions (unassigned) 00003610 BYTE 40 UPRSTCTG5B EQU BIT 27 on if group 5 restrictions (unassigned) 00003410 BYTE 41 UPOPREQB EQU BIT 26 on if operator requests restricted 00003210 BYTE 42 UPMAINTRB EQU BIT 25 on if maintenance read restricted 00003010 BYTE 43 UPMAINTWB EQU BIT 24 on if maintenance write restricted 00002E10 BYTE 44 UPBACKUPB EQU BIT 23 on if backup requests restricted 00002C10 BYTE 45 UPMANAGRB EQU BIT 22 on if manager requests restricted 00002A10 BYTE 46 UPEXECUTOB EQU BIT 21 on if address space is execute only 00002810 BYTE 47 UPCNTLMODB EQU BIT 20 on if in CONTROL MODE 000003E0 ABS 48 UPDFLTREST EQU 1*UPMANAGRB+1*UPMAINTWB+1*UPMAINTRB+1*UPBACKUPB+1*UPOPREQB 49 * default restrictions 50 00081C10 0 ZBM 51 UPRSTCTG1 EQU UPCPRIV/UPRSTCTG1B 00081A10 0 ZBM 52 UPRSTCTG2 EQU UPCPRIV/UPRSTCTG2B 00081810 0 ZBM 53 UPRSTCTG3 EQU UPCPRIV/UPRSTCTG3B 00081610 0 ZBM 54 UPRSTCTG4 EQU UPCPRIV/UPRSTCTG4B 00081410 0 ZBM 55 UPRSTCTG5 EQU UPCPRIV/UPRSTCTG5B 00081210 0 ZBM 56 UPOPREQ EQU UPCPRIV/UPOPREQB 00081010 0 ZBM 57 UPMAINTR EQU UPCPRIV/UPMAINTRB 00080E10 0 ZBM 58 UPMAINTW EQU UPCPRIV/UPMAINTWB 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 262 (USERCOREDEFS) F 18 User Data Structure Definitions 00080C10 0 ZBM 59 UPBACKUP EQU UPCPRIV/UPBACKUPB 00080A10 0 ZBM 60 UPMANAGR EQU UPCPRIV/UPMANAGRB 00080810 0 ZBM 61 UPEXECUTO EQU UPCPRIV/UPEXECUTOB 00080610 0 ZBM 62 UPCNTLMODE EQU UPCPRIV/UPCNTLMODB 63 00080041 0 ZBM 64 UPCTERMGRP BSSB 4 terminating character set 65 BSSB 3 filler 00080E11 0 ZBM 66 UPCIMDBUG BSSB 1 says whether prog thinks its debugging 00081011 0 ZBM 67 UPCNETINTE BSSB 1 non-empty term unit interrupt enable 00081371 0 ZBM 68 UPCSERNM BSSB PSNFLDLN underprocess serial number 69 BSSB 15 filler to make things easy to read 00081F12 0 ZBM 70 UPCCONSOLE BSSB ADDRESS => CCA at this level 71 BSSB 15 filler to make things easy to read 00081F13 0 ZBM 72 UPCPRIVULB BSSB ADDRESS => ULB giving privilege 000800F4 0 ZBM 73 UPCMAGEV BSSB 15 maximum age of PAL in VASP list 00081F14 0 ZBM 74 UPCRUNFCB BSSB ADDRESS unit this is executing from 000800F5 0 ZBM 75 UPCMAGEW BSSB 15 maximum age of PAL in WSX list 00081F15 0 ZBM 76 UPCUNITS BSSB ADDRESS => local unit list 000800F6 0 ZBM 77 UPXAGEVASP BSSB 15 extra page age for VASP list 00081F16 0 ZBM 78 UPCBROPTR BSSB ADDRESS pointer to brother process 000800F7 0 ZBM 79 UPXAGEWSX BSSB 15 extra page age for WSX list 00081F17 0 ZBM 80 UPCDADPTR BSSB ADDRESS pointer to father, our creator 81 BSSB 9 filler 00081378 0 ZBM 82 UPCERRPSN BSSB PSNFLDLN process to pass our errors to 00160809 0 BASE 83 UPCPROCNM BSS2 1 "name" of process 84 * PSLOCK of sponsoring PSA must be locked 85 * during ANY alteration of UPCUERROR or 86 * the associated UER list. Format of 87 * this word is exactly the same as that 88 * of PSUERROR (though some fields aren't 89 * actually used by both, and must remain 90 * 0 when "unused"). 0016080B 0 BASE 91 UPCUERROR BSS 1 error list root (see PSUERROR format) 0016080C 0 BASE 92 UPCINTTIME BSS 1 time for time interrupt 93 * The virtual monitor may examine UPCVMLIST 94 * with the interrupts on, since it is the only 95 * code allowed to modify the UPCVMLIST. 96 * ----- THESE MUST BE FULL WORD FIELDS ----- 0016080D 0 BASE 97 UPCVMLIST BSS 1 => virtual memory list of this level 0016080E 0 BASE 98 UPCWVMLIST BSS 1 => virtual memory list for windows 99 * The UPCVASP and UPCWSX may be altered on 100 * any interrupt, so the process looking 101 * or altering must not page fault and must 102 * have interrupts off. These list heads must 103 * be full words. 0016080F 0 BASE 104 UPCVASP BSS 1 => list of currently mapped or mappable pages 00160810 0 BASE 105 UPCWSX BSS 1 => working set extension 106 * (list of recently mapped pages) 00160811 0 BASE 107 UPCTIMESER BSS 1 serial number of time interrupt request 00160812 0 BASE 108 UPCTERMA BSS 256/WORDLNTH terminating character array 109 DRCT 0000001A ABS 110 UPCLNTH EQU DISPW UPCPROT size of an element 00000005 ABS 111 UPCLOG EQU UPCLNTH LOG 2 log size for free memory routines 112 ORG UPCPROT reclaim lost space 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 263 (USERCOREDEFS) F 18 User Data Structure Definitions 114 115 ********************************************************************************** 116 * * 117 * UNIT CONTROL ELEMENT * 118 * A unit control element (UCE) is created for each open * 119 * logical unit. It contains the number of that unit and the * 120 * address of the FCB corresponding to the device. UCEs for * 121 * local units (1:100) are kept in the UPC (UPCUNITS) of the * 122 * process. UCEs for global units (101:200) are kept in the * 123 * PSA (PSUNITS). * 124 * * 125 ********************************************************************************** 126 00001ECB 127 UCEPROT BASE R0 00160800 0 BASE 128 UCWORDA BSS 1 00080080 0 ZBM 129 UCEUNIT EQU UCWORDA/BITS 0:7 logical unit # for this element 000000FF ABS 130 MAXUNIT EQU 255 largest unit number allowed 00081F10 0 ZBM 131 UCELINK EQU UCWORDA/FLDADRS link to next element 132 BSSB 15 filler 00081F11 0 ZBM 133 UCEFCB BSSB ADDRESS address of FCB for this element 134 DRCT 00000001 ABS 135 UCELOG EQU (DISPW UCEPROT) LOG 2 size of UCE element 136 137 ORG UCEPROT 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 264 (USERCOREDEFS) F 18 User Data Structure Definitions 139 140 ********************************************************************************** 141 * * 142 * FILE CONTROL BLOCK * 143 * A file control block (FCB) is created for each opened * 144 * device. The FCB contains all of the resident controlling * 145 * information for that unit. * 146 * These elements are chained together in a PSA list * 147 * (PSFCBLIST). They are pointed to by UCEs in the global * 148 * list (PSUNITS) and UCEs in the local unit lists of the * 149 * underprocesses (UPCUNITS). The use count FCBUSYCNT * 150 * indicates the number of UCEs sharing this FCB (i.e. by unit * 151 * equivalence). UCEs come and go, but the FCB is freed when * 152 * its use count goes to zero. * 153 * * 154 ********************************************************************************** 155 156 NOLIST CREF 00134000 5 REG 157 FCB EQU R5 pointer to file control block 158 LIST CREF 00001ECB 159 FCBPROT BASE FCB FILE CONTROL BLOCK 160 00174800 5 BASE 161 FCWORDA BSS 1 00094080 5 ZBM 162 FCBUSYCNT EQU FCWORDA/BITS 0:7 number of UCEs using this FCB 00095040 5 ZBM 163 FCREQUEST EQU FCWORDA/BITS 8:11 sub-op of request being made 164 * EQU FCWORDA/BIT 12 unused 00095A10 5 ZBM 165 FCRELOC EQU FCWORDA/BIT 13 store relocation (used in some XREQs) 00095C10 5 ZBM 166 FCDIRINUSE EQU FCWORDA/BIT 14 on if directory locked by 167 * this FCBs process 00095F10 5 ZBM 168 FCLINK EQU FCWORDA/FLDADRS link to next element 169 00174801 5 BASE 170 FCBLOCK BSS 1 the current mass storage address 00094081 5 ZBM 171 FCDRIVE EQU FCBLOCK/VOLFIELD drive containing this file 00095181 5 ZBM 172 FCMSBLK EQU FCBLOCK/MSBLKFIELD block number on this drive 173 00094182 5 ZBM 174 FCTFL BSSB MSBLKLOG total file length 00097182 5 ZBM 175 FCLPBLK BSSB MSBLKLOG load point block (minor access block if RAF) 00096183 5 ZBM 176 FCMABLK BSSB MSBLKLOG if RAF, addr of major access block (0 if small) 00095114 5 ZBM 177 FCLIMITPTR BSSB ADDRESS pntr to limit block for this file 00097214 5 ZBM 178 FCSRCHSN BSSB 1 used by the directory searchers 179 * 1 sez look for serial number 00097484 5 ZBM 180 FCECHOLUN BSSB MAXUNIT LOG 2 unit to echo read lines on (zero if none) 181 * The dynamic status word in the FCB 00094455 5 ZBM 182 FCDYNSTAT BSSB 5 00094445 5 ZBM 183 FCLASTREAD EQU FCDYNSTAT/BITS 27:30 00094C15 5 ZBM 184 FCLOADPT EQU FCDYNSTAT/BIT 31 00002050 BYTE 185 FCDSTATPLC EQU FDSTATRTYP+FDSTATLP place for these bits in status 186 * The static status word in the FCB 00094F25 5 ZBM 187 FCSTATSTAT BSSB 18 00094E45 5 ZBM 188 FCPRIV EQU FCSTATSTAT/FSSTATPRIV 00095615 5 ZBM 189 FCCRT EQU FCSTATSTAT/FSSTATCRT 00095835 5 ZBM 190 FCACCESS EQU FCSTATSTAT/FSSTATACS 00096015 5 ZBM 191 FCABSIO EQU FCSTATSTAT/FSSTATABS 00096215 5 ZBM 192 FCFEWSC EQU FCSTATSTAT/FSSTATWSC 00096415 5 ZBM 193 FCSAVED EQU FCSTATSTAT/FSSTATSAV 00096665 5 ZBM 194 FCHTYPE EQU FCSTATSTAT/FSSTATDTYP 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 265 (USERCOREDEFS) F 18 User Data Structure Definitions 195 00097215 5 ZBM 196 FCOPWRITE BSSB 1 on iff last operation was WRITE 00097415 5 ZBM 197 FCSPOOLED BSSB 1 non zero if executed with the spooler 00097615 5 ZBM 198 FCTRANS BSSB 1 on if file opened when user program crashed 00097815 5 ZBM 199 FCFBD BSSB 1 bit OR'd into FDFBD when the FCB is freed 200 * indicates file is being destroyed 00097A15 5 ZBM 201 FCCMUNIT BSSB 1 says that unit number is in Control Mode range 00097CA5 5 ZBM 202 FCQUEUEID BSSB 10 ID of file from spooler (1023 max) 203 204 * These two fields are used to define the end of file 205 * for SAFs (FCEND is used to avoid the chain search) 206 * and for RAFs (FCEPP is the last byte pointer). 207 * For other devices, these words contain other fields. 00095186 5 ZBM 208 FCEND BSSB MSBLKLOG last block disk address 00174807 5 BASE 209 FCEPP BSS 1 last block byte position pointer 210 00174808 5 BASE 211 FCCPP BSS 1 current position pointer 00094148 5 ZBM 212 FCCBLK EQU FCCPP/PGNUMFLD current block number minus one 000968C8 5 ZBM 213 FCCBYTE EQU FCCPP/BYTEDISP current byte in current block 214 00095F16 5 ZBM 215 FCDCBPTR EQU FCEND/BITS 15:31 pointer to hardware control block 00095C16 5 ZBM 216 FCRESEEK EQU FCEND/BIT 14 1 sez must go through RAF structure 00095826 5 ZBM 217 FCRAFTYPE EQU FCEND/BITS 12:13 RAF type field 218 00174809 5 BASE 219 FCSERIAL BSS2 1 file serial number/account serial number 0017480B 5 BASE 220 FCNAME BSS2 1 name of file if saved 0017480D 5 BASE 221 FCNAMEEXT BSS 1 extension of filename 222 223 * These two symbols are used in .DIRs 00174807 5 BASE 224 FCANAME EQU FCEPP account name (with FCCPP) 0017480D 5 BASE 225 FCAPROJ EQU FCNAMEEXT and extension 226 227 * This symbol is used in .VOLs 0017480B 5 BASE 228 FCVNAME EQU FCNAME volume name 229 230 * What follows is the non-permanent part of the FCB 0017480E 5 BASE 231 FCPWORD BSS2 1 password while EQUIPing file 0017480E 5 BASE 232 FCJCXH EQU FCPWORD(0) pointer to current index entry 0017480F 5 BASE 233 FCJCDE EQU FCPWORD(1) pointer to current directory entry 234 BSS 0 235 DRCT 00000004 ABS 236 FCLOG EQU (DISPW FCBPROT) LOG 2 SIZE OF AN FCB ELEMENT 237 * 238 239 ORG FCBPROT 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 266 (USERCOREDEFS) F 18 User Data Structure Definitions 241 242 ********************************************************************************** 243 * * 244 * PAGE ACCESS ELEMENTS * 245 * Page access elements exist whenever a page is resident * 246 * and a user is actively using it. A page access element * 247 * will be in the users UPCVASP list if it is currently mapped * 248 * into virtual memory, or in the UPCWSX list if it has been * 249 * recently referenced but is no longer mapped. * 250 * When a user is set up to run, his virtual address * 251 * space list (UPCVASP) is scanned and the page file is loaded * 252 * according to the page access elements found. * 253 * * 254 ********************************************************************************** 255 0000000E ABS 256 PALRTLOG EQU 14 length of the page age fields 257 258 NOLIST CREF 00130000 4 REG 259 PAL EQU R4 used for pointer to PALs 260 LIST CREF 261 00001ECB 262 PALMNT BASE PAL PAGE ACCESS ELEMENT 00170800 4 BASE 263 PAWORDA BSS 0 word label for following fields 00170000 4 CACH 264 PAVPN BSSB 8 page number in users virtual memory 00091010 4 ZBM 265 PAINDVP BSSB 1 PAL associated with indirect VP element 00091210 4 ZBM 266 PALOCK BSSB 1 locked into main memory 267 * See definition of MDVMAIFLD for description of the following field 00091430 4 ZBM 268 PAMAIFLD BSSB 3 maintenance field 269 BSSB 2 filler 00091F10 4 ZBM 270 PALINK BSSB ADDRESS link to next element 271 00170801 4 BASE 272 PAPMVALUE BSS 1 page map value 273 00170802 4 BASE 274 PAWORDC BSS 0 (for clearing on initialization) 000900E2 4 ZBM 275 PAGEAGE BSSB PALRTLOG time since last reference 00091C12 4 ZBM 276 PAMODIFIED BSSB 1 page modified flag 00091F12 4 ZBM 277 PAFCB BSSB ADDRESS FCB that page is mapped from, zero if not 00170803 4 BASE 278 PAPPLPTR BSS 1 pointer to associated PPL 279 DRCT 280 00000004 DISP 281 PALNTH EQU DISP PALMNT length of a PAL 00000002 ABS 282 PALOG EQU PALNTH LOG 2 block size indicator 283 ORG PALMNT recover lost space 284 285 286 ********************************************************************************** 287 * * 288 * VIRTUAL PAGE ELEMENTS * 289 * Each virtual page element contains the information * 290 * required to find a page whether or not it is resident. * 291 * Often, the FBI type indicator on a block is being * 292 * changed. The VPFBIOLD field is then used to hold the type * 293 * that should have been on the volume. The operation of * 294 * VPFBIOLD & VPFBINEW is as follows: if OLD = 0 and NEW = * 295 * then a block is read in and checked to ensure * 296 * that it is of that type. If OLD = and NEW = * 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 267 (USERCOREDEFS) F 18 User Data Structure Definitions 297 * then a block of type OLD is read in and it is * 298 * converted to type NEW. If both OLD and NEW = 0, then no FBI * 299 * type checking is done. * 300 * Virtual pages that have no VPAGE element are presumed * 301 * to be zero pages. VPAGE elements are built whenever the * 302 * contents of a page is specified, such as when a zero page * 303 * is referenced or a RAF or CODE page is mapped in. * 304 * The lock bit is copied into the PAL for the associated * 305 * page. This bit must be cleared by doing: 1) a SETWNDOx on * 306 * the page. 2) an ULKPAGE. 3) A GRUBPAGE (or GRUBWNDO). 4) a * 307 * FORCEWRITE or DUALWRITE. * 308 * Indirect VP elements allow a debugging type process to * 309 * look at the memory of some other process. The VP element * 310 * specifies a process and page number. Please note also, * 311 * that VPFBITYPE in an indirect VP element must be a 0. A * 312 * particular problem with this structure is that a VP element * 313 * may be used to construct a PAL for the VASP list. The PAL * 314 * will then continue to refer to that page until it ages out, * 315 * even though a process has been inserted or destroyed. When * 316 * a page fault occurs after the ageing, PFPROC goes to the * 317 * new process to construct the PAL. This can manifest itself * 318 * as a timing dependent bug, since the end result depends on * 319 * page aging algorithms invisible to the user. * 320 * Each UPC has a list (UPCVMLIST) of all of its user * 321 * virtual pages that have been allocated. * 322 * The monitor also has a list (MONVM) of all of its * 323 * virtual (not resident) pages. The MONVM list is set up by * 324 * system initialization. * 325 * * 326 ********************************************************************************** 327 328 NOLIST CREF 00134000 5 REG 329 VPP EQU R5 normal ptr register for VPAGE 330 LIST CREF 331 00001ECB 332 VPAGEPROT BASE VPP virtual page element 333 BSSB 7 filler 00094E80 5 ZBM 334 VPCNTL BSSB 8 control field 00003010 BYTE 335 VPNOSUBB EQU BIT 24 ignore substitution process 00003210 BYTE 336 VPNOERRB EQU BIT 25 do not perform error recovery/retries 00003410 BYTE 337 VPWWCHKB EQU BIT 26 if set write check this page 00003030 BYTE 338 VPMAIFLD EQU BITS 24:26 bits indicating maintenance functions 00003610 BYTE 339 VPEXCLUDEB EQU BIT 27 page is excluded, access gives trap 00003810 BYTE 340 VPZEROPGB EQU BIT 28 request for zero page bit 00003620 BYTE 341 VPCNTLSRF EQU VPEXCLUDEB+VPZEROPGB magic combined field 342 * Field decoded by jump table in PFPROC. Codes are: 343 * 00 - normal 344 * 01 - zero page 345 * 10 - excluded 346 * 11 - zero page or resident copy 00003A10 BYTE 347 VPCNTLOCB EQU BIT 29 own copy bit 348 * 0 sez give error on write 349 * protect violation. 350 * 1 sez make a copy on write 351 * protect violation. 00003C10 BYTE 352 VPCNTLLKB EQU BIT 30 marks page as locked in core 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 268 (USERCOREDEFS) F 18 User Data Structure Definitions 00003E10 BYTE 353 VPCNTLROB EQU BIT 31 marks page as read only 00003650 BYTE 354 VPCNTLFLD EQU BITS 27:31 actual control field 355 00000000 ABS 356 VPCNTLW EQU 0*VPCNTLROB value of VPCNTL if writeable 00000001 ABS 357 VPCNTLRO EQU 1*VPCNTLROB value of VPCNTL if read only 00000002 ABS 358 VPCNTLLK EQU 1*VPCNTLLKB value of VPCNTL if locked 00000004 ABS 359 VPCNTLOC EQU 1*VPCNTLOCB value of VPCNTL if user allowed impure copy 360 * EQU 0*VPCNTLSRF value of VPCNTL for normal page 00000008 ABS 361 VPZEROPG EQU 1*VPCNTLSRF value of VPCNTL if zero page requested 00000010 ABS 362 VPEXCLUDE EQU 2*VPCNTLSRF value of VPCNTL if illegal to reference 00000018 ABS 363 VPCNTLNR EQU 3*VPCNTLSRF value sez no read 00000020 ABS 364 VPWWCHK EQU 1*VPWWCHKB value of VPCNTL if to write check page 00000040 ABS 365 VPNOERR EQU 1*VPNOERRB value of VPCNTL if errors ignored 00000080 ABS 366 VPNOSUB EQU 1*VPNOSUBB value of VPCNTL if substitutions ignored 367 00095F10 5 ZBM 368 VPLINK BSSB ADDRESS link to next element 369 00174004 5 CACH 370 VPVPN BSSB 8 virtual page number 000000FF ABS 371 NOSUCHVPN EQU 0FF an impossible number for this field 00095011 5 ZBM 372 VPINDRCT BSSB 1 flag saying indirect reference 373 BSSB 6 space filler 00000000 ABS 374 VPNOFCB EQU 0 code indicating no FCB associated with this page 00095F11 5 ZBM 375 VPFCB BSSB ADDRESS FCB address (if .CODE or .RAF page) 376 00174802 5 BASE 377 VPWORDC BSS 1 has same format as MSQWORDC 00002470 BYTE 378 VPFBIOLDB EQU BITS 18:24 type to read in if type changing 00003270 BYTE 379 VPFBINEWB EQU BITS 25:31 ultimate type of block 00094272 5 ZBM 380 VPFBIOLD EQU VPP,VPWORDC/UPR15/VPFBIOLDB 00095072 5 ZBM 381 VPFBINEW EQU VPP,VPWORDC/UPR15/VPFBINEWB 000942E2 5 ZBM 382 VPFBITYPE EQU VPP,VPWORDC/UPR15/(VPFBIOLDB+VPFBINEWB) 00095F12 5 ZBM 383 VPERAD EQU VPP,VPWORDC/FLDADRS error address 384 00174803 5 BASE 385 VPBLOCK BSS 1 volume number and MS block number 00094083 5 ZBM 386 VPDRIVE EQU VPBLOCK/VOLFIELD drive index number 00095183 5 ZBM 387 VPMSBLK EQU VPBLOCK/MSBLKFIELD relative MS block number 388 * VPBLOCK contains the following info if this VP element 389 * is an indirect reference: 00094083 5 ZBM 390 VPINDPN EQU VPBLOCK/BITS 0:7 page number in other address space 00001370 BYTE 391 UPCSRLFLD EQU BITS (WORDLNTH-PSNFLDLN):(WORDLNTH-1) process serial number field 00095373 5 ZBM 392 VPUPCSERL EQU VPBLOCK/UPCSRLFLD UPC serial number of page owner 393 DRCT 00000004 DISP 394 VPAGELNTH EQU DISP VPAGEPROT length of VPAGE element 00000002 ABS 395 VPLOG EQU VPAGELNTH LOG 2 size for memory routines 396 ORG VPAGEPROT 397 00000085 ABS 398 HIUSERPAGE EQU PNWNDO4 highest page in user VM list 399 01ECB 00000000 400 MONVM VFD FLDADRS*STORE root for monitor virtual memory list 401 402 ********************************************************************************** 403 * * 404 * Control Mode Virtual Page List * 405 * The initializer equips the control mode file and uses * 406 * the code control block to build this list. Each page in * 407 * the CCB produces a VPAGE element prototype for this list. * 408 * These VPAGE elements have user memory page numbers and are * 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 269 (USERCOREDEFS) F 18 User Data Structure Definitions 409 * set up to give own copies when written on. These elements * 410 * are copied and used in the VM list of the users in control * 411 * mode. * 412 * * 413 ********************************************************************************** 414 01ECC 00000000 415 CMODEVP VFD STORE list of CM VPAGE elements 01ECD 00000000 416 CMODECA VFD STORE copy of CM CA from CCB 0000003E ABS 417 CMCHAR EQU ">" prompt char for control mode 418 419 420 ********************************************************************************** 421 * * 422 * Initial Control-Mode Entry Code Definitions * 423 * These codes appear in R1 when Control-Mode is * 424 * initially entered to tell it how the new session came into * 425 * existance. * 426 * * 427 ********************************************************************************** 428 00000010 BYTE 429 CMSKAPPL EQU BIT 0 on if CM should set skill=application 00000210 BYTE 430 CMBATCHJOB EQU BIT 1 on if this is a batch job 00000410 BYTE 431 CMERRIDS EQU BIT 2 on if insufficient disk space for logon 00000610 BYTE 432 CMERRINH EQU BIT 3 on if terminal inhibited 000009C0 BYTE 433 CMENTRYCD EQU BITS 4:31 entry code: 00000000 ABS 434 CMNLOGIO EQU 0 not logged on, std input and output exist 00000001 ABS 435 CMNLOGI EQU 1 not logged on, std input only exists 00000002 ABS 436 CMLOGIO EQU 2 logged on, std input and output exist 00000003 ABS 437 CMLOGI EQU 3 logged on, std input only exists 00000004 ABS 438 CMCONCP EQU 4 concurrent session creation 26 INPUT COREIOTABS in-core I/O tables 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 270 (COREIOTABS) F 19 Resident I/O tables 3 4 ********************************************************************************** 5 * * 6 * Tables describing the configuration of this system. * 7 * * 8 ********************************************************************************** 9 10 ********************************************************************************** 11 * * 12 * SLOTTABLE * 13 * This table contains one word for each device address on * 14 * the mousebus. The upper 3 bits of each word indicate the type * 15 * of device that the bootstrap found in that slot. Zero * 16 * indicates nobody home. The address of each word corresponding * 17 * to a channel points to a channel control element. The lower * 18 * bits in each CPU's entry contain WRU0 info for that CPU. This * 19 * prevents having to reference IBSLOTS on zero page for CPU * 20 * microcode patching. * 21 * * 22 ********************************************************************************** 23 00001ECE 24 SLOTTABLE BSS NUMSLOTS channel descriptor block pointers 00000030 BYTE 25 SLOTTYPE EQU BITS 0:2 type of device in this slot 00001F10 BYTE 26 SLOTPTR EQU FLDADRS pointer to channel element 00000DA0 BYTE 27 SLOTCPUI EQU BITS 6:31 CPU WRU0 info 28 29 ********************************************************************************** 30 * * 31 * Location to hold the page map value for the active SSU. * 32 * * 33 ********************************************************************************** 34 01EDE 00000000 35 CLOCKPF VFD 0+STORE holds page map value for SSU 36 00001EDF 37 FPSWITCH BSS 1 current state of the FP switches 00001EE0 38 FPSWITCHB BSS 1 switches at boot time 39 40 ********************************************************************************** 41 * * 42 * The SSU provides a .TERM for maintenance use through * 43 * the RDU. This terminal behaves pretty much like one on the * 44 * COMM, except that essentially all configuration items (baud * 45 * rate, DTR, etc.) are controlled by SSU microcode. We have * 46 * here a pointer to the TCB so that the read/write code, and * 47 * even a lot of COMM driver code can be used to drive this * 48 * special diagnostic terminal. * 49 * A flag is provided for output so that we know whether * 50 * the SSU is busy processing output characters. If the flag * 51 * is set, we must wait for an output ready interrupt. If the * 52 * flag is not set, we can output a new character immediately * 53 * (but must set the flag). * 54 * A lock is provided for input so that we don't have the * 55 * problem of multiple CPUs each picking up an input character * 56 * thus causing them to be inserted in the order that the CPUs * 57 * get through the TCLOCK wait. * 58 * * 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 271 (COREIOTABS) F 19 Resident I/O tables 59 ********************************************************************************** 60 00001EE1 61 FPTCB BSS 1 => terminal control block for front panel 01EE2 00000000 62 FPTERMBZY VFD 0+STORE busy flag for FP output 01EE3 00000000 63 FPCHARINLK VFD 0+STORE indicates CPU busy processing input char 64 65 ********************************************************************************** 66 * * 67 * This word is set to one if the SSU is a new enough * 68 * version (MINVERSION) to support break and dwell processing * 69 * with port 0. We also define here the first version of the * 70 * SSU that contains a working new 2K NVM. * 71 * * 72 ********************************************************************************** 73 00001EE4 74 SSUVER BSS 1 1 sez new version of SSU 0000000D ABS 75 MINVERSION EQU 13 oldest SSU version that is compatible 0000000F ABS 76 NVMVERSION EQU 15 version with new 2K NVM 77 78 ********************************************************************************** 79 * * 80 * The date word is updated on each clock interrupt. In * 81 * order that it may be used to provide unique file serial * 82 * numbers, it is also incremented whenever it is fetched for * 83 * use as a file serial number. Also, it may never be set * 84 * back by a clock interrupt. * 85 * The newer SSUs update FDATE constantly for us. To * 86 * insure unique serial numbers we keep the last serial number * 87 * given in FSNDATE and make sure FDATE is larger than * 88 * FSNDATE. If FDATE is not larger we increment FSNDATE and * 89 * hand that back as the serial number. * 90 * FDATE is assembled as zeros. This is so that the * 91 * initial startup code will run no matter what is in the real * 92 * time clock. That is, FDATE will never have to be set back * 93 * in time by the simple minded routines that normally deal * 94 * with it. * 95 * Initproc is responsible for ensuring that the SSU * 96 * clock is reasonable before it lets the system run. Among * 97 * other things, it ensures that the SSU clock is not earlier * 98 * than: * 99 * 1) the time of the last system assembly * 100 * 2) the time stored in the NVM * 101 * 3) the time stored in the security block * 102 * Also, times too far into the future are caught. * 103 * * 104 ********************************************************************************** 105 01EE6 00000000 106 FDATE VFD 00,00 the clock is 44 bits, right justified 01EE7 A0081EE5 107 FDATEPTR PTR FDATE/DATEHORD field in time with 32 bit date 01EE8 00000000 108 FDATELOCK VFD 0 lock for date field modification 01EEA 00000000 109 FSNDATE VFD 00,00 last serial number dispensed 110 111 ********************************************************************************** 112 * * 113 * The following variables are used to control the accuracy * 114 * of the system SSU clock. * 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 272 (COREIOTABS) F 19 Resident I/O tables 115 * FDATERROR contains the number of milliseconds that the * 116 * operator told us the clock was in error, + indicates that the * 117 * clock is slow, - indicates fast. The SSU clock will be * 118 * adjusted at a rate of 1000 ppm so as not to shock accounting * 119 * routines or user benchmarks. * 120 * FDATEDRFT is the parts per billion that the clock seems * 121 * to drift, + indicates that the clock is slow, - indicates * 122 * fast. This is calculated from the successive error * 123 * corrections that the operator makes. It should be noted that * 124 * this error correction scheme runs only when the system is * 125 * running. This shouldn't be any hardship, since it should be * 126 * unusual for the system to be shut down for any appreciable * 127 * length of time. * 128 * The drift correction is vitally dependant on the * 129 * accuracy of the adjustments made by the operator. The * 130 * ultimate accuracy of the clocks in the BTI lab has been * 131 * better than one second a month. This means that the operator * 132 * should use a time reference that is close to WWV in * 133 * stability. * 134 * LASTCORR is the time that the clock was last * 135 * corrected. * 136 * Ideally, all of these variables would be stored in the * 137 * NVM to ensure that they remain with the particular clock * 138 * whose values they represent. However, since the NVM is * 139 * space limited, only the drift value is stored there. It is * 140 * placed into the NVM when a new value is calculated and read * 141 * out during system boot. * 142 * The correction date is not crucial to proper * 143 * functioning of the algorithms, since once it is set by a * 144 * new correction all future corrections will be evaluated * 145 * properly. The current error in the clock is zero almost * 146 * all of the time, and when set will most likely be nulled * 147 * out before a system sleep. Therefore, these values are * 148 * relegated to the security block. These values are stored * 149 * during the hour interrupt processing and during sleep * 150 * processing, and are restored at system boot. * 151 * * 152 ********************************************************************************** 153 00001EEB 154 LASTCORR BSS2 1 date clock last corrected 01EED 00000000 155 FDATERROR VFD STORE ms that the clock is off 01EEE 00000000 156 FDATEDRFT VFD STORE ppb that the clock drifts 157 158 ********************************************************************************** 159 * * 160 * TIMEZONE * 161 * This word contains the 3 letter abb. for the systems * 162 * local time zone in the left three characters. The * 163 * rightmost character is an 8 bit signed number indicating * 164 * the difference from UT. If you live where the local time is * 165 * not an even hour off from UT, you're tough out of luck. * 166 * * 167 ********************************************************************************** 168 00001EEF 169 TIMEZONE BSS 0 01EEF FFFFFFF8 170 VFDC "P","S","T",-8 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 273 (COREIOTABS) F 19 Resident I/O tables 171 172 ********************************************************************************** 173 * * 174 * TIMER QUEUE * 175 * All work with the queue or with the I/O device is * 176 * interlocked with this lock word. TIMESERIAL is used to * 177 * provide unique identifiers for use by the TIMEKILL routine. * 178 * The available codes may be used at rates up to about 100 * 179 * each second. With a 32 bit field, nothing over 1 year is * 180 * safe. One month is a reasonable maximum delay! The queue * 181 * is kept in order by time. * 182 * Note that TMRLINK is made a full word since we have * 183 * no use for the upper 15 bits and this makes the loads and * 184 * stores use the faster base mode addressing. * 185 * * 186 ********************************************************************************** 187 01EF0 00000000 188 TIMESERIAL VFD 0+STORE serial number for queue elements 01EF1 00000000 189 TIMERLOCK VFD STORE queue and device lock word 01EF2 00000000 190 TIMERQ VFD STORE list head 00130000 4 REG 191 TMR EQU R4 register used for timer element pointer 192 00001EF3 193 TMRPROT BASE TMR timer queue element prototype 00170800 4 BASE 194 TMRLINK BSS 1 link to next element 00170801 4 BASE 195 TMRTIME BSS2 1 time at which interrupt is scheduled to occur 00090043 4 ZBM 196 TMRCPU BSSB 4 slot number of cpu to get this interrupt 197 * zero cannot be a cpu, so that number 198 * indicates that any cpu can take it 199 BSSB 11 filler 00091F13 4 ZBM 200 TMRPC BSSB ADDRESS location to go to on time out 00170804 4 BASE 201 TMRSERIAL BSS 1 this elements serial number 00170805 4 BASE 202 TMRPARAM BSS 1 parameter to interrupt 203 DRCT 00000006 ABS 204 TMRLNTH EQU DISPW TMRPROT length of timer element 00000003 ABS 205 TMRLOG EQU TMRLNTH LOG 2 log of element length 206 ORG TMRPROT recover space 207 00001EF3 208 DEADMANTMR BSS 1 serial number of DEADMAN's timer request 209 210 ********************************************************************************** 211 * * 212 * Non Volatile memory * 213 * The non-volatile memory (NVM) in the SSU is a slow * 214 * memory taking some 120 milliseconds (sic) to erase and write * 215 * a location. The new 2K NVM is faster, but it still requires * 216 * several milliseconds to complete a write. Worse yet, the * 217 * state of a location if the power fails during an erase/write * 218 * operation is completely undefined. We therefore store most * 219 * data twice and alternate a flag to indicate which copy is to * 220 * be used. This is relatively crashproof. * 221 * Here are the locks for operations on the NVM. Any * 222 * write operation makes the NVM busy. If the NVM is busy, * 223 * any operation causes the requesting process to be queued. * 224 * Last are the values that control the clock values in the * 225 * NVM. They currently are variable because it is possible to * 226 * have two different NVM sizes. The old SSUs have 128 bytes * 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 274 (COREIOTABS) F 19 Resident I/O tables 227 * while the new SSUs have 2048 bytes. The base value, count * 228 * and mask word are set dynamically during each boot. * 229 * Since there are multiple clock values the latest date * 230 * is assumed to be the good date iff another clock value is * 231 * within an hour or so, else the dates are all assumed to be * 232 * bogus. * 233 * * 234 ********************************************************************************** 235 01EF4 00000000 236 NVMBSYLOCK VFD STORE lock word for NVM 01EF5 00000000 237 NVMBSYFLAG VFD STORE flag indicating NVM busy 238 239 * DO NOT rearrange the following four words!!!!!!! 01EF6 00000000 240 NVMCLOCKS VFD STORE base address of the clocks 01EF7 00000000 241 NVMCLKNUM VFD STORE number of legtimate clock values 01EF8 00000000 242 NVMCLKMASK VFD STORE mask for clock index 01EF9 00000000 243 NVMCLKINDX VFD STORE last good NVM clock index 244 245 246 ********************************************************************************** 247 * * 248 * The following is this system's serial number that is * 249 * fetched from the SSU. It consists of two halves, the upper * 250 * being the 'customer number' and the lower being the * 251 * 'customers system number'. Customer 0 is BTI. The system * 252 * name is either this number in PAK6 if not in a network, or * 253 * the net node name if networking. * 254 * * 255 ********************************************************************************** 256 01EFA 00000001 257 SYSTEMSN VFD 00001 customer 0, system 1 01EFB 0BE8D400 258 SYSTEMNM PAK6 0&1 the 'name' of the system 259 260 ********************************************************************************** 261 * * 262 * The following word is the start up number which is * 263 * incremented every time the system is booted. It is a full * 264 * word number, but the bottom 8 bits are never zero. These * 265 * are used to validate file use counts in case of system * 266 * crashes. * 267 * * 268 ********************************************************************************** 269 00001EFC 270 SYSTEMSUN BSS 1 01EFD C20C1EFC 271 FILESUNP PTR SYSTEMSUN/BITS 24:31 00101EFD @ 272 FILESUN EQU @FILESUNP 273 274 ********************************************************************************** 275 * * 276 * SMU ELEMENT * 277 * This block is used to keep track of all SMUs on the * 278 * system. * 279 * * 280 ********************************************************************************** 281 01EFE 00000000 282 SMULIST VFD 0 pointer to first element in this list 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 275 (COREIOTABS) F 19 Resident I/O tables 283 00000006 ABS 284 SMUCHKINTV EQU 6 number of times though DEADMAN between reading 285 * SMU error log 01EFF 00000006 286 SMUCHKCNT VFD SMUCHKINTV we decrement this count each time 287 * through DEADMAN. When it equals 0 we reset it 288 * and read the SMU error log. 289 00001F00 290 SMUPROT BASE R3 0008C040 3 ZBM 291 SMUSLOT BSSB 4 slot containing this SMU 292 BSSB 11 filler 0008DF10 3 ZBM 293 SMULINK BSSB ADDRESS pointer to next in list 294 DRCT 00000000 ABS 295 SMUBLKLOG EQU (DISPW SMUPROT) LOG 2 log size of this block 296 ORG SMUPROT recover lost space 297 298 ********************************************************************************** 299 * * 300 * PPU CONTROL ELEMENT * 301 * This block contains a pointer to a control block for * 302 * each operational peripheral controller. * 303 * * 304 ********************************************************************************** 305 00001F00 306 PPUPROT BASE R5 descriptor for an individual PPU 00174800 5 BASE 307 PPUPF BSS 1 page file to get to the PPU 00174801 5 BASE 308 PPUOPMSGID BSS 1 id of msg to operator saying PPU is bad 00174802 5 BASE 309 PPULASTST BSS 1 internal status on last interrupt 00174803 5 BASE 310 PPU3WORD BSS 1 1 sez this PPU can do triple word transfers 00174804 5 BASE 311 PPUCNTLPTR BSS PPUCHANS pointers to controller tables 00000080 BYTE 312 DEVTYPE EQU CH0 field contains the type of device here 00001F10 BYTE 313 DEVPTR EQU FLDADRS field contains pointer to device control element 314 DRCT 00000003 ABS 315 PPULOG EQU (DISP PPUPROT) LOG 2 length of PPU element 316 ORG PPUPROT recover the lost space 317 01F00 00006540 318 PPUBADSTAT VFD 1*PPUIBCNR+1*PPUIMPE+1*PPUICONF+1*PPUIDPPE+1*PPUIXTRA 319 * bits in the PPU channel status 320 * signifying transfer error 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 276 (COREIOTABS) F 19 Resident I/O tables 322 323 ********************************************************************************** 324 * * 325 * COMM CONTROL ELEMENT * 326 * * 327 ********************************************************************************** 328 00001F01 329 COMLIST BSS 1 root of list of COM elements 330 00001F02 331 COMPROT BASE R0 descriptor for a CIA 00160800 0 BASE 332 COMLINK BSS 1 link to next COM element 00160801 0 BASE 333 COMWRU BSS 1 WRU response from controller 00160802 0 BASE 334 COMPF BSS 1 PF to access this CIA 00160803 0 BASE 335 COMOPMSGID BSS 1 id of message saying controller not talking 00160804 0 BASE 336 COMLASTST BSS 1 status word 1 on last interrupt 00160805 0 BASE 337 COMWORDC BSS 1 00080215 0 ZBM 338 COMTIMEOUT EQU COMWORDC/BIT 1 1 sez CIA timed out 00083085 0 ZBM 339 COMSTATE EQU COMWORDC/BITS 24:31 state of driver 00000000 ABS 340 COMSTIDLE EQU 0 idle (must be zero) 00000001 ABS 341 COMSTREAD EQU 1 doing read 00000002 ABS 342 COMSTWRITE EQU 2 doing write 00000003 ABS 343 COMSTWRIT2 EQU 3 doing continuation write 00000004 ABS 344 COMSTDREAD EQU 4 'delayed' read 00160806 0 BASE 345 COMINBUF BSS 1 comm input buffer pointer 00160807 0 BASE 346 COMINBUFS BSS 1 size of input buffer 00160808 0 BASE 347 COMOUTBUF BSS 1 comm output buffer pointer 00160809 0 BASE 348 COMOUTBUFS BSS 1 size of output buffer 0016080A 0 BASE 349 COMTRMTMNG BSS 1 count of terminals timing on this CIA 0016080B 0 BASE 350 COMFRSTTRM BSS 1 first terminal in list of TCBs for this CIA 0016080C 0 BASE 351 COMTERMS BSS 8 one pointer for each of the 8 boards 352 DRCT 00000005 ABS 353 COMLOG EQU (DISPW COMPROT) LOG 2 log size of COM element 354 ORG COMPROT recover the lost space 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 277 (COREIOTABS) F 19 Resident I/O tables 356 357 ********************************************************************************** 358 * * 359 * TERMINAL CONTROL BLOCK * 360 * Each terminal has a TCB associated with it to control * 361 * the console output and input and to hold a PCB pointer. * 362 * * 363 * A terminal is not associated with any process in * 364 * particular, but supposedly only one PSA points to each * 365 * active TCB. A TCPCADRS of zero sez no process associated * 366 * with this terminal, otherwise it points to the process * 367 * control block of the process. * 368 * * 369 * TCB elements are an unusual size (not near a multiple * 370 * of 2) and are never destroyed, so while they behave like a * 371 * normal linked list, the elements are constructed from much * 372 * larger chunks of free memory and the excess is freed. * 373 * * 374 * LOCKING * 375 * There are many fields in a TCB that may be updated by * 376 * asynchronously running processes, such as the user process * 377 * and the driver. There are basicly three critical regions * 378 * in use here. These critical regions are as follows... * 379 * 1) The section at the beginning. This section is * 380 * interlocked by the implicit fact that only the * 381 * current user process can modify fields therein. * 382 * 2) There is a section that is only altered by the * 383 * driver. This section includes the fields in * 384 * line and also TCTIMECNT which has been moved * 385 * to the end of the TCB so as to not interfere * 386 * with ZBM addressing range. * 387 * 3) The remaining section may be altered by either * 388 * the driver or the user process. Anyone altering * 389 * any field in this section must hold TCLOCK. * 390 * * 391 * Special note should be made of the fields TCPCADRS, * 392 * TCINTE, and TCFCB. These fields are set by CHECKLOGD which * 393 * is in the driver. However, this can only happen if no user * 394 * process is currently attached to this TCB. These fields, * 395 * which otherwise are only modified by the implicit process * 396 * part, are therefore placed there. * 397 * * 398 ********************************************************************************** 399 01F02 00000000 400 TERMCOUNT VFD STORE number of logged on terminals 01F03 00000001 401 TERMNUM VFD 1 number of terminals found 402 * (first terminal is number 1) 01F04 00000000 403 TERMBASE VFD FLDADRS*STORE => base of real terminal TCBs 01F05 00000000 404 TERMWBUSY VFD STORE number of terminals busy writing 00000200 ABS 405 MAXTERMNUM EQU 512 number of terminals possible 000007BA ABS 406 MAXINQUE EQU (80+2)*24+10 max number of chars in input queue 000003DD ABS 407 MAXIXOFF EQU MAXINQUE/2 max in input queue before getting XOFFed 00000004 ABS 408 TCCMNDBURD EQU 4 each command in output counts this many 409 * characters toward suspending the process 410 * for terminal output wait 411 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 278 (COREIOTABS) F 19 Resident I/O tables 00130000 4 REG 412 TCB EQU R4 POINTER TO TERMINAL CONTROL BLOCK 413 00001F06 414 TCBPROT BASE TCB TERMINAL CONTROL BLOCK 00090040 4 ZBM 415 TCRT BSSB 4 current record type 00090890 4 ZBM 416 TCTNUM BSSB (MAXTERMNUM LOG 2) logical terminal number field 00091A10 4 ZBM 417 TCRFP BSSB 1 on if special SSU terminal 00091C10 4 ZBM 418 TCINHIB BSSB 1 on if logon access inhibited 00091F10 4 ZBM 419 TCLINK BSSB ADDRESS link to next element 420 * (fills first word) 000900F1 4 ZBM 421 TCIRATE BSSB 15 input baud rate 00091EF1 4 ZBM 422 TCORATE BSSB 15 output baud rate 00093C21 4 ZBM 423 TCECHO BSSB 2 echo status 00000000 ABS 424 ECHOMOFF EQU 0 no echo 00000001 ABS 425 ECHOMCIA EQU 1 echo done by controller 00000002 ABS 426 ECHOMSOFT EQU 2 echo done by me 00000003 ABS 427 ECHOMREAD EQU 3 echo done on read 428 000900A2 4 ZBM 429 TCMAXCHAR BSSB 10 number of chars before suspend (funct of baud) 000914A2 4 ZBM 430 TCUNSUSP BSSB 10 number of output chars to unsuspend 000928C2 4 ZBM 431 TCCRDELAY BSSB 12 carriage return delay 432 000900C3 4 ZBM 433 TCLFDELAY BSSB 12 line feed delay 000918C3 4 ZBM 434 TCFFDELAY BSSB 12 form feed delay 0017000F 4 CACH 435 TCCIAPORT BSSB 8 hardware port number on CIA 436 00170010 4 CACH 437 TCCRWIDTH BSSB 8 carriage width 00170011 4 CACH 438 TCSCRNHTH BSSB 8 screen height 00170012 4 CACH 439 TCLASTCOM BSSB 8 last transmitter setting command 00170013 4 CACH 440 TCLASTCOM2 BSSB 8 last CIA option selected 441 00170014 4 CACH 442 TCBAUDROOM BSSB 8 how much to remove from TCOUTSPACE to 443 * keep the output buffer from overfilling 00091015 4 ZBM 444 TCXOFFIQ BSSB 1 1 sez we XOFF the terminal if input buffer overfills 00091225 4 ZBM 445 TCACS BSSB 2 bits indicating access to this terminal 00091215 4 ZBM 446 TCACSRO EQU TCACS/BIT 30 on sez this terminal is accessed RO 00091415 4 ZBM 447 TCACSRW EQU TCACS/BIT 31 on sez this terminal is accessed RW 00091615 4 ZBM 448 TCINTTCG BSSB 1 sez TCG/TCS is for a NE terminal trapper 00091815 4 ZBM 449 TCRDRTCG BSSB 1 sez TCG/TCS is for a terminal reader (CPCUPC) 450 BSSB 2 filler 00091F15 4 ZBM 451 TCFCB BSSB ADDRESS FCB address of terminal user 452 00170018 4 CACH 453 TCBRCH BSSB 8 'break' character 00091076 4 ZBM 454 TCLKILLC BSSB 7 line kill character 00091F16 4 ZBM 455 TCCIABLOCK BSSB ADDRESS => CIA control block 456 457 BSSB 8 filler 00091077 4 ZBM 458 TCBKSPC BSSB 7 backspace character 00091F17 4 ZBM 459 TCPCADRS BSSB ADDRESS pointer to associated process control block 460 461 BSS 0 ensure word boundary, see box below 000900C8 4 ZBM 462 TCHTDELAY BSSB 12 horizontal tab delay 00091838 4 ZBM 463 TCPVC BSSB 3 previous line print control 00091E18 4 ZBM 464 TCINTE BSSB 1 interrupts enabled by term user 00092018 4 ZBM 465 TCINECHOD BSSB 1 on if chars in line echoed 466 467 ********************************************************************************** 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 279 (COREIOTABS) F 19 Resident I/O tables 468 * * 469 * The field TCCONTROL has three components. TCINTPROTO * 470 * and TCMODEM are locked by the implicit process lock. They * 471 * consequently are made to fall into the last word of the * 472 * implicitly locked region of the TCB. TCINTSTATE however, * 473 * is locked by the CIA driver lock. We fiddle to make that * 474 * component of TCCONTROL fall into the word reserved for * 475 * control by this driver lock. * 476 * The fields TCOUTSPACE, TCLASTST, TCTIMERTN, and * 477 * TCTIMECNT are also interlocked by the driver lock. * 478 * * 479 ********************************************************************************** 480 481 482 BSSB 13 filler to make word boundary between ... 483 * ...TCMODEM and TCINTSTATE 00093C78 4 ZBM 484 TCCONTROL BSSB 7 control for phones stuff 00093C28 4 ZBM 485 TCINTPROTO EQU TCCONTROL/BITS 25:26 interface protocol 486 * EQU 0 no interface control 487 * EQU 1 DTR/DSR disconnect 488 * EQU 2 modem handling 00090019 4 ZBM 489 TCMODEM EQU TCCONTROL/BIT 27 1 iff modem on port 00090249 4 ZBM 490 TCINTSTATE EQU TCCONTROL/BITS 28:31 current state of interface 491 * EQU 0 initialize 492 * EQU 1 restart 00000002 ABS 493 TCINTSNORM EQU 2 normal state 494 * and many more 00090A39 4 ZBM 495 TCTIMERTN BSSB 3 routine to process timeout 496 BSSB 1 filler to make easier to read 00091289 4 ZBM 497 TCOUTSPACE BSSB 256 LOG 2 space available in hardware output buffer 00092289 4 ZBM 498 TCLASTST BSSB 8 last port status 499 500 ********************************************************************************** 501 * * 502 * Beware that the following fields may only be changed * 503 * when TCLOCK is held. This is because all of the fields * 504 * here are ZBMs and they are not interlocked. * 505 * I assure you that this is true and it has been * 506 * discovered and re-discovered many, many times the hard way. * 507 * This applies down to the lock word itself. Several * 508 * whole words are placed down at the end (since ZBMs must be * 509 * within 15 words of the beginning) that need not be * 510 * interlocked. * 511 * * 512 ********************************************************************************** 513 514 BSS 0 force word boundary 000900FA 4 ZBM 515 TCTTOCNT BSSB (WORDLNTH-ADDRESS) number of chars in output queue 00091F1A 4 ZBM 516 TCTTOBP BSSB ADDRESS POINTER TO OUTPUT BUFFER BEGINNING 0009011B 4 ZBM 517 TCTTOEP BSSB ADDRESS POINTER TO OUTPUT BUFFER END 000922FB 4 ZBM 518 TCTTICNT BSSB (WORDLNTH-ADDRESS) number of chars in input queue 0009011C 4 ZBM 519 TCTTIEP BSSB ADDRESS POINTER TO INPUT BUFFER END 0009231C 4 ZBM 520 TCTTIBP BSSB ADDRESS POINTER TO INPUT BUFFER BEGINNING 0009041D 4 ZBM 521 TCREADIP BSSB 1 on if read in progress 0009061D 4 ZBM 522 TCINQFILL BSSB 1 on if input queue overflow, cleared by read 0009083D 4 ZBM 523 TCTERMGRP BSSB 3 terminating character group 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 280 (COREIOTABS) F 19 Resident I/O tables 00000000 ABS 524 TCTERMGRP0 EQU 0 standard term set 0 00000001 ABS 525 TCTERMGRP1 EQU 1 standard term set 1 00000002 ABS 526 TCTERMGRP2 EQU 2 standard term set 2 00000003 ABS 527 TCTERMGRPU EQU 3 user defined term set 00090E1D 4 ZBM 528 TCINECHO BSSB 1 on if to echo character input 0009101D 4 ZBM 529 TCIQXOFFED BSSB 1 on if input has been XOFFed 530 0017080E 4 BASE 531 TCTERMLOC BSS 1 holds location of terminator, 0 iff none 00091F1E 4 ZBM 532 TCTERMTCQ EQU TCTERMLOC/FLDADRS holds pointer to TCQ of terminator 000900FE 4 ZBM 533 TCTERMCHLC EQU TCTERMLOC/UPR15 holds index to terminator 534 535 ********************************************************************************** 536 * * 537 * End of the items that must be modified only when * 538 * TCLOCK is held, except for TCLOCK itself, which was moved * 539 * after TCTERMA so that TCTERMA could have a ZBM pointer made * 540 * easily. * 541 * * 542 ********************************************************************************** 543 0017080F 4 BASE 544 TCTERMA BSS 256/WORDLNTH user terminating character set 545 0017005C 4 CACH 546 TCTIMEFLAG BSSC 0 we keep a negative count so this char 547 * should be all 1's when terminal is timing 00170817 4 BASE 548 TCTIMECNT BSS 1 timing counter, counted up 00170818 4 BASE 549 TCLOCK BSS 1 on sez pointers being changed 00170819 4 BASE 550 TCTERMTYPE BSS 2 terminal type 0017081B 4 BASE 551 TCSITE BSS 2 terminal site name 552 DRCT 0000001D ABS 553 TCBLNTH EQU DISPW TCBPROT length of a TCB entry 554 ORG TCBPROT 555 556 ********************************************************************************** 557 * * 558 * A character input/output queue element looks like: * 559 * * 560 ********************************************************************************** 561 0012C000 3 REG 562 TCQ EQU R3 00001F06 563 TCQPROT BASE TCQ 0016C000 3 CACH 564 TCQFIRST BSSB 8 index to first character minus one 0008D060 3 ZBM 565 TCQLOG BSSB 6 log size of this block 0008DC10 3 ZBM 566 TCQCOMND BSSB 1 in output Q: on if second word a command 567 * in input Q: 0008DF10 3 ZBM 568 TCQLINK BSSB ADDRESS link to next element 0016C801 3 BASE 569 TCQWORDB BSS 0 second word 0016C004 3 CACH 570 TCQLAST BSSC 1 index to last character 0016C005 3 CACH 571 TCQSIZE BSSC 1 size of block in characters 00000006 ABS 572 TCQUSED EQU DISPC TCQFIRST num of chars used in block before info 0016C005 3 CACH 573 TCQCHARS EQU TCQSIZE characters (first index = 1) 574 BSS 0 variable length block 575 DRCT 576 ORG TCQPROT 577 578 * If carrying a command (output list) or an error (input list) 579 * the following format is used: 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 281 (COREIOTABS) F 19 Resident I/O tables 0008C081 3 ZBM 580 TCQCCODE EQU TCQWORDB/CH0 the command code 0008D181 3 ZBM 581 TCQCPARMS EQU TCQWORDB/(CH1+CH2+CH3) the parameter to the command 582 * or the error code 0016C000 3 CACH 583 TCQCLNTH EQU TCQFIRST the length of command in characters 000000FF ABS 584 TCQMXDELAY EQU (2 POWER 8)-1 maximum delay value that fits here 585 586 ********************************************************************************** 587 * * 588 * Table of number of characters that go into the various * 589 * queue element sizes. Indexed by log(2) of size. * 590 * * 591 ********************************************************************************** 592 00001F06 593 TCQSIZES LABEL 01F06 00000000 594 VFD 0 01F07 00000002 595 VFD (2 POWER (DISPW TCQSIZES))*CPW-TCQUSED 01F08 0000000A 596 VFD (2 POWER (DISPW TCQSIZES))*CPW-TCQUSED 01F09 0000001A 597 VFD (2 POWER (DISPW TCQSIZES))*CPW-TCQUSED 01F0A 0000003A 598 VFD (2 POWER (DISPW TCQSIZES))*CPW-TCQUSED 00001F0B 599 TCQMAXSIZE LABEL 01F0B 0000007A 600 VFD (2 POWER (DISPW TCQSIZES))*CPW-TCQUSED 601 602 ********************************************************************************** 603 * * 604 * Each of the CIA commands have a length and here is a * 605 * table of same indexed by command code. A length of zero * 606 * sez that this code is not a command. * 607 * * 608 ********************************************************************************** 609 01F0D 00000002 610 TCQCLENS VFDC 0,3,3,2,1,1,2,2 80-87 01F0F 00000002 611 VFDC 1,1,2,2,1,2,2,2 88-8F 01F11 00000000 612 VFDC 1,4,0,0,0,0,0,0 90-97 (pseudo-commands) 01F12 020C1EEC 613 TCQCLEN PTR TCQCLENS(-080) 614 615 ********************************************************************************** 616 * * 617 * Char used inside comm routines to indicate break. * 618 * * 619 ********************************************************************************** 620 00000100 ABS 621 BREAKMARK EQU 0100 indicates incoming break 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 282 (COREIOTABS) F 19 Resident I/O tables 623 624 ********************************************************************************** 625 * * 626 * MASS STORAGE CONTROLLER ELEMENT * 627 * This block contains the information for each mass * 628 * storage controller. * 629 * * 630 ********************************************************************************** 631 00000003 ABS 632 LOGUPC EQU 3 size of unit number field 00000008 ABS 633 UPC EQU 2 POWER LOGUPC number of units on a controller 634 01F13 00000000 635 MCTLIST VFD STORE list of all MS controllers 0013C000 7 REG 636 MCT EQU R7 637 00001F14 638 MCTPROT BASE MCT mass storage controller table proto 0017C800 7 BASE 639 MCTLINK BSS 1 link to next controller element 0017C801 7 BASE 640 MCTPMVALUE BSS 1 page file value to access this controller 0017C802 7 BASE 641 MCTOPMSGID BSS 1 id of message saying BFD not talking 0017C803 7 BASE 642 MCTELOCK BSS 1 lock word to prevent two processors 643 * from talking to one BFD simultaneously 0009C014 7 ZBM 644 MCTBUSY BSSB 1 indicates data transfer going 0009C234 7 ZBM 645 MCTUNIT BSSB LOGUPC indicates which unit going 0009C814 7 ZBM 646 MCTTIMEOUT BSSB 1 timeout flag: set by DEADMAN 0009CA34 7 ZBM 647 MCTMAXUNIT BSSB LOGUPC largest unit on this controller 0009D014 7 ZBM 648 MCTDEAD BSSB 1 on if PPU or BFD is not talking 649 BSSB 16 filler 0017C805 7 BASE 650 MCTDRIVE BSS UPC pointers to drive elements 651 DRCT 0000000D DISP 652 MCTLNTH EQU DISP MCTPROT length of controller table 00000004 ABS 653 MCTLOG EQU MCTLNTH LOG 2 log of element length 654 ORG MCTPROT 655 656 ********************************************************************************** 657 * * 658 * MASS STORAGE DEVICE LIST * 659 * Each separately addressable mass storage device has * 660 * an entry in this list. Each entry has its own queue of * 661 * requests. This allows the mass storage driver to keep the * 662 * greatest possible number of requests going at all times. * 663 * This list is locked by MDVLOCK (using LOCKLIST and * 664 * SRCHLIST). * 665 * * 666 ********************************************************************************** 667 01F14 00000000 668 MDVLOCK VFD STORE lock word for MDVLIST 01F15 00000000 669 MDVLIST VFD FLDADRS*STORE list of all MS devices 00134000 5 REG 670 MDV EQU R5 671 00001F16 672 MDVPROT BASE MDV MASS STORAGE DRIVE TABLE 00174800 5 BASE 673 MDVWORDA BSS 1 first word of MDV. All store-type 674 * references to this word MUST be 675 * read-modify-writes. 00000080 BYTE 676 MDVVOLFLD EQU BITS 0:7 field for volume number 00094080 5 ZBM 677 MDVVOLUME EQU MDVWORDA/MDVVOLFLD volume residing here (0 if none) 00095010 5 ZBM 678 MDVREADY EQU MDVWORDA/BIT 8 1 => drive is ready (mount is allowed) 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 283 (COREIOTABS) F 19 Resident I/O tables 00095210 5 ZBM 679 MDVCHKSTAT EQU MDVWORDA/BIT 9 1 => must check drive status for offline 00095410 5 ZBM 680 MDVLOGCNT EQU MDVWORDA/BIT 10 1 => must log activity counts 00095610 5 ZBM 681 MDVCHKHEAD EQU MDVWORDA/BIT 11 1 => must check for head crash 00095830 5 ZBM 682 MDVUNIT EQU MDVWORDA/BITS 12:(12+LOGUPC-1) unit number of this drive 00095F10 5 ZBM 683 MDVLINK EQU MDVWORDA/FLDADRS link for volume list 684 00094011 5 ZBM 685 MDVDIDXFER BSSB 1 a request has been completed 00094231 5 ZBM 686 MDVSTATE BSSB 3 current state of unit 687 * use caution if you feel a need to reassign 688 * states because several jump tables use them 689 * code state 00000000 ABS 690 MDVSTINIT EQU 0 drive must be initialized 00000001 ABS 691 MDVSTRUN EQU 1 drive code is runnable 00000002 ABS 692 MDVSTSEEK EQU 2 awaiting seek end 00000003 ABS 693 MDVSTONCYL EQU 3 waiting our turn to start data transfer 00000004 ABS 694 MDVSTDT EQU 4 transferring data - awaiting interrupt 00000005 ABS 695 MDVSTKILL EQU 5 MDV should be destroyed 00000006 ABS 696 MDVSTPFAIL EQU 6 interrupted by power failure 00000007 ABS 697 MDVSTIDLE EQU 7 delaying for IDLETIME milliseconds 698 00094811 5 ZBM 699 MDVWPROT BSSB 1 last known BFDSSWPROT (write-protect) 700 BSSB 4 filler 00095231 5 ZBM 701 MDVCABLE BSSB LOGUPC cable position of drive 702 BSSB 3 filler 00095F11 5 ZBM 703 MDVCNTL BSSB ADDRESS address of controller block (MCT) 704 00094012 5 ZBM 705 MDVBADDISK BSSB 1 1 => heads have been unloaded because of crash 00094212 5 ZBM 706 MDVBADSKS BSSB 1 1 => disk can't seek, should go offline 707 BSSB 14 filler 0017400A 5 CACH 708 MDVTRKPCYL BSSB 8 number of tracks per cylinder 0017400B 5 CACH 709 MDVSECPTRK BSSB 8 number of sectors per track 00174803 5 BASE 710 MDVERRWORD BSS 1 error control word 00000010 BYTE 711 MDVNOSUBB EQU BIT 0 on if substitution procedure ignored 00094013 5 ZBM 712 MDVNOSUB EQU MDVERRWORD/MDVNOSUBB on if substitution procedure ignored 00000210 BYTE 713 MDVNOERRSB EQU BIT 1 on if error recovery/retries skipped 00094213 5 ZBM 714 MDVNOERRS EQU MDVERRWORD/MDVNOERRSB on if error recovery/retries skipped 00000410 BYTE 715 MDVWWCHKB EQU BIT 2 on if block should be write checked 00094413 5 ZBM 716 MDVWWCHK EQU MDVERRWORD/MDVWWCHKB on if block should be write checked 00094023 5 ZBM 717 MDVSPECDA EQU MDVERRWORD/(MDVNOSUBB+MDVNOERRSB) non-zero skips PPL/FBI DA mismatch HALT 00094033 5 ZBM 718 MDVMAIFLD EQU MDVERRWORD/(MDVNOSUBB+MDVNOERRSB+MDVWWCHKB) bits for maintenance functions 00000610 BYTE 719 MDVNOLOGB EQU BIT 3 on if error logging disabled 00094613 5 ZBM 720 MDVNOLOG EQU MDVERRWORD/MDVNOLOGB on if error logging disabled 00094813 5 ZBM 721 MDVREWRITE EQU MDVERRWORD/BIT 4 on if block should be rewritten 00094A13 5 ZBM 722 MDVSUB EQU MDVERRWORD/BIT 5 on if block should be substituted 723 * BITS 6:7 unused 00095043 5 ZBM 724 MDVFLTERRS EQU MDVERRWORD/BITS 8:11 fault errors 00000005 ABS 725 MDVFLERLIM EQU 5 limit for fault errors 00095843 5 ZBM 726 MDVSKERRS EQU MDVERRWORD/BITS 12:15 seek error counter 00000005 ABS 727 MDVSKERLIM EQU 5 maximum number allowed 00096083 5 ZBM 728 MDVCHERRS EQU MDVERRWORD/BITS 16:23 channel error counter 00000032 ABS 729 MDVCHERLIM EQU 50 limit for channel errors 00097083 5 ZBM 730 MDVDKERRS EQU MDVERRWORD/BITS 24:31 disk media error counter 00000014 ABS 731 MDVDKERLIM EQU 20 maximum number allowed 000949C3 5 ZBM 732 MDVERRFLDS EQU MDVERRWORD/BITS 4:31 field indicating errors, if any 733 00000005 ABS 734 MDVRZRTLIM EQU 5 limit of immediate re-zero retries 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 284 (COREIOTABS) F 19 Resident I/O tables 00000005 ABS 735 MDVRZERLIM EQU 5 limit of times we can hit MDVRZRTLIM 736 00174804 5 BASE 737 MDVMAXSEEK BSS 1 first illegal seek address (hardware format) 00174805 5 BASE 738 MDVNAME BSS 1 PAK6 name of drive 739 00174806 5 BASE 740 MDVCOUNTS BSS2 1 activity counters 00174806 5 BASE 741 MDVREADCNT EQU MDVCOUNTS(0) number of read operations performed 00174807 5 BASE 742 MDVWRITCNT EQU MDVCOUNTS(1) number of write operations performed 743 00174808 5 BASE 744 MDVSEEKADR BSS 1 most recent seek address 745 746 * The following two words must be contiguous! 00174809 5 BASE 747 MDVBFDSTAT BSS 2 BFD status at transfer end 0017480A 5 BASE 748 MDVPPUSTAT EQU MDVBFDSTAT(1) PPU status at transfer end 0017480B 5 BASE 749 MDVLOPSTAT BSS 2 last operation status 750 0017480D 5 BASE 751 MDVTIMCODE BSS 1 time code used on write operation 0017480E 5 BASE 752 MDVVOLNAME BSS 2 name of volume mounted here 00174810 5 BASE 753 MDVFMTDAT BSS 2 formatted date of pack here 00174812 5 BASE 754 MDVTIMESER BSS 1 serial number of timer reset for next head-crash check 00174813 5 BASE 755 MDVIDLESER BSS 1 serial number of timer reset for coroutine delay 00174814 5 BASE 756 MDVCHKCYL BSS 1 cylinder last used for head-crash check 00174815 5 BASE 757 MDVRZPROBS BSS 1 number of times REZERO failed 00174816 5 BASE 758 MDVBTRXDA BSS 1 disk address of bad tracks block 00174817 5 BASE 759 MDVBTRXPPL BSS 1 addr of PPL containing bad tracks block 00174818 5 BASE 760 MDVSUBSDA BSS 1 disk address of substitution block 00174819 5 BASE 761 MDVSUBSPPL BSS 1 addr of PPL containing substitution block 0017481A 5 BASE 762 MDVSIZE BSS 1 size of drive in blocks 763 0017481B 5 BASE 764 MDVPC BSS 1 save area for PC in coroutine call 0017481C 5 BASE 765 MDVSAVER34 BSS 2 save area for R3-R4 in coroutine call 0017481E 5 BASE 766 MDVSAVER67 BSS 2 save area for R6-R7 in coroutine call 767 DRCT 00000020 DISP 768 MDVLNTH EQU DISP MDVPROT LENGTH OF DRIVE INFORMATION 00000005 ABS 769 MDVLOG EQU MDVLNTH LOG 2 log of element length 770 ORG MDVPROT 771 772 ********************************************************************************** 773 * * 774 * MASS STORAGE QUEUE ELEMENT * 775 * When MS blocks are requested, an element of this form * 776 * is created for each such block. * 777 * When a block becomes resident, its PPL is entered into * 778 * the PPAGELIST or PPIDLE and the MSQ element is discarded. * 779 * Whenever any page comes in, the SQMSWAIT queue is * 780 * searched for ALL users requesting this page. * 781 * Requests for writes of a page also fetch blocks of * 782 * this general form, but only the MSQXPTR and MSQPPPTR words * 783 * are significant. MSQXPTR may contain a pointer to a * 784 * temporary, duplicate PPL used to cause a write of the page * 785 * to two different locations on mass storage. The write * 786 * represented by the duplicate PPL is done first, then that * 787 * duplicate PPL is freed. MSQXPTR is set to zero. The MSQ * 788 * element then represents a normal write. * 789 * Note that the mass storage driver looks at the queue * 790 * head elements with the queues unlocked ( although it locks * 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 285 (COREIOTABS) F 19 Resident I/O tables 791 * the queue before removing an element ). In other words, * 792 * the inserting routines must complete the queue elements * 793 * before they are inserted into the queue ( which must be * 794 * locked by the inserting routine ) and new elements may not * 795 * be added to the beginning of the queue (unless the queue is * 796 * empty). * 797 * * 798 ********************************************************************************** 799 01F16 00000000 800 MSQINLOCK VFD STORE lock word for the mass storage input queues 01F17 00000000 801 MSQOUTLOCK VFD STORE lock for the MS output queues 802 0012C000 3 REG 803 MSQ EQU R3 pointer to read request element 804 00001F18 805 MSQPROT BASE MSQ request queue element proto 0016C800 3 BASE 806 MSQWORDA BSS 1 first word 0008C0F0 3 ZBM 807 MSQTYPE EQU MSQWORDA/UPR15 R contains control info 00003010 BYTE 808 MSQREINIT EQU BIT 24 R read is actually an MDV re-init 00003210 BYTE 809 MSQFORMAT EQU BIT 25 R read is actually a format operation 00003430 BYTE 810 MSQMAIFLD EQU BITS 26:28 RW maintenance field (see MDVMAIFLD) 00003C10 BYTE 811 MSQZPAGE EQU BIT 30 R provide a zero page ( no MS read ) 812 * the new address bit must also be 813 * set for a zero page request. 00003E10 BYTE 814 MSQSNEWAD EQU BIT 31 R indicate a block number switch 00003C20 BYTE 815 MSQTYPFLD EQU BITS 30:31 non maintenance part of the field 0008DF10 3 ZBM 816 MSQLINK EQU MSQWORDA/FLDADRS RW link to next element 817 0016C801 3 BASE 818 MSQBLOCK BSS 1 R drive and MS block number 0016C802 3 BASE 819 MSQACTAD BSS 1 R actual MS address to be read 0016C802 3 BASE 820 MSQPPPTR EQU MSQACTAD W points to the PPL 0016C803 3 BASE 821 MSQXPTR BSS 1 RW points to a secondary PPL-FBI, 0 if none 822 DRCT 00000004 ABS 823 MSQLNTH EQU DISPW MSQPROT 00000002 ABS 824 MSQLOG EQU MSQLNTH LOG 2 825 ORG MSQPROT recover lost space 826 827 ********************************************************************************** 828 * * 829 * Busy words which note if I/O devices are still busy. * 830 * Used mainly to know when to halt after a sleep, and also * 831 * for the front panel display. * 832 * * 833 ********************************************************************************** 834 01F18 00000000 835 DISKRBUSY VFD 0+STORE increment for element in a MS read queue 01F19 00000000 836 DISKWBUSY VFD 0+STORE increment for element in a MS write queue 837 838 ********************************************************************************** 839 * * 840 * The following two values are used in the insertion of * 841 * disk read elements into the MS read queue. All elements that * 842 * are placed onto the disk read queue are place at the head of * 843 * the list (right behind the first one). This is done in an * 844 * attempt to push users through MSWAIT more rapidly. To * 845 * prevent starvation of some poor guy we put every DISKRENDth * 846 * element onto the end of the list, DISKCOUNT is our count to * 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 286 (COREIOTABS) F 19 Resident I/O tables 847 * tell us when to do this. * 848 * * 849 ********************************************************************************** 850 01F1A 00000000 851 DISKCOUNT VFD 0 count of disk reads up to DISKREND 01F1B 0000001E 852 DISKREND VFD 30 every 30th element goes onto the end. 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 287 (COREIOTABS) F 19 Resident I/O tables 854 855 ********************************************************************************** 856 * * 857 * Magnetic Tape Controller Element * 858 * This block contains all control information associated * 859 * with a given tape controller. * 860 * * 861 ********************************************************************************** 862 0013C000 7 REG 863 MTC EQU R7 register normally holds pointer to MTC 01F1C 00000000 864 MTCLIST VFD STORE head of MT controller list 865 00001F1D 866 MTCPROT BASE MTC tape controller element 0017C800 7 BASE 867 MTCLINK BSS 1 link to next element 0017C801 7 BASE 868 MTCPMVALUE BSS 1 page file value to access this controller 0017C802 7 BASE 869 MTCOPMSGID BSS 1 id of message saying MTC not talking 0017C803 7 BASE 870 MTCELOCK BSS 1 lock word to prevent two processors 871 * from talking to the one controller, also locks 872 * flags and lists 873 874 * The following two words are referenced and altered without 875 * holding any locks. They therefore need their own words. 0017C804 7 BASE 876 MTCTIMEOUT BSS 1 number of intervals remaining before timeout 0017C805 7 BASE 877 MTCREQUEST BSS 1 set by user when he wants something done 878 879 BSSB 2 filler 0009C426 7 ZBM 880 MTCTYPE BSSB 2 0 if CT, 1 if MT, 2 if VT 0009C816 7 ZBM 881 MTCDEAD BSSB 1 on if controller or PPU not talking 0009CA36 7 ZBM 882 MTCUNIT BSSB 3 unit number to start scan from 883 BSSB 7 filler 0009DF16 7 ZBM 884 MTCBUSY BSSB 17 => MTU element that has controller busy 885 00000004 ABS 886 MTCUPC EQU 4 units per tape controller 00000003 ABS 887 MTUNITMASK EQU MTCUPC-1 mask to isolate low bits 0017C807 7 BASE 888 MTCDRIVE BSS MTCUPC pointers to MTU elements for each unit 889 DRCT 00000004 ABS 890 MTCLOG EQU (DISPW MTCPROT) LOG 2 size for getmem 891 ORG MTCPROT recover lost space 892 893 894 ********************************************************************************** 895 * * 896 * Magnetic Tape Unit Element * 897 * Each tape unit has an element in one of these queues. * 898 * This element contains all status and control information * 899 * for that unit, including the queue of user buffer space * 900 * elements. * 901 * * 902 ********************************************************************************** 903 01F1D 00000000 904 MTULIST VFD STORE list head for MT units 01F1E 00000000 905 CTULIST VFD STORE list head for CT units 01F1F 00000000 906 VTULIST VFD STORE list head for VT units 00134000 5 REG 907 MTU EQU R5 register normally holds MT unit pointer 908 00001F20 909 MTUPROT BASE MTU 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 288 (COREIOTABS) F 19 Resident I/O tables 00174800 5 BASE 910 MTUSTART LABEL beginning of MTU element 911 912 * The following words may only be altered while MTCELOCK is held. 00094020 5 ZBM 913 MTUSTATE BSSB 2 current drive state 00000000 ABS 914 MTUSTRUN EQU 0 runnable 00000001 ABS 915 MTUSTWAIT EQU 1 waiting to start data transfer 00000002 ABS 916 MTUSTBUSY EQU 2 busy with data transfer 00000003 ABS 917 MTUSTPFAIL EQU 3 interrupted by power failure 00094460 5 ZBM 918 MTUDNUM BSSB 6 drive number (sequential from 0) 00095040 5 ZBM 919 MTUUNIT BSSB 4 unit number on controller 00095810 5 ZBM 920 MTUEOF BSSB 1 last record read was a file mark 00095A20 5 ZBM 921 MTUDENSITY BSSB 2 density value (0=lowest, 3=highest) 00095F10 5 ZBM 922 MTULINK BSSB 17 link to next element 923 00094021 5 ZBM 924 MTUTYPE BSSB 2 0 => CT unit, 1 => MT unit, 2 => VT unit, 000944A1 5 ZBM 925 MTUERRCODE BSSB 10 error code from last operation 00095831 5 ZBM 926 MTUTRACK BSSB 3 track number (for CT's) 00095F11 5 ZBM 927 MTUCNTL BSSB 17 pointer to MTC element 928 929 * The following word may be altered by both the user and the 930 * tape driver, hence you must hold MTREQLOCK when trying to 931 * change one of these fields. 00174008 5 CACH 932 MTUREQUEST BSSB 8 request code from user 00000001 ABS 933 MTURQREW EQU 1 do rewind 00000002 ABS 934 MTURQSEFF EQU 2 do skip to EOF forward 00000003 ABS 935 MTURQSEFB EQU 3 do skip to EOF backward 00000004 ABS 936 MTURQFWSP EQU 4 do forward space 00000005 ABS 937 MTURQBKSP EQU 5 do back space 00000006 ABS 938 MTURQREAD EQU 6 do read 00000007 ABS 939 MTURQWRITE EQU 7 do write 00000008 ABS 940 MTURQWFM EQU 8 do write file mark 00000009 ABS 941 MTURQGAP EQU 9 do erase gap 0000000A ABS 942 MTURQSET EQU 10 do select track and density 0000000B ABS 943 MTURQCYCLE EQU 11 cycle tape 944 BSSB 24 filler 945 946 * The following word is changed only by the user, therefore 947 * no lock need be held when changing its value. 00174803 5 BASE 948 MTUPCADRS BSS 1 pointer to PCB of user 949 950 * The following, being full word fields, do not get us 951 * into nearly so much trouble with interlocks. 00174804 5 BASE 952 MTUNAME BSS 1 name of this drive 00174805 5 BASE 953 MTUMSGID BSS 1 id of message about drive not ready 00174806 5 BASE 954 MTURECLEN BSS 1 record length (set by user before 955 * write request, set by driver 956 * during read request) 00174807 5 BASE 957 MTUREQLEN BSS 1 requested length for read 00174808 5 BASE 958 MTUUBS BSS 1 pointer to head of UBS chain (set by user) 00174809 5 BASE 959 MTUNUBS BSS 1 pointer to next UBS element to use 960 961 * The following two words MUST be contiguous (referenced by LD2, etc.) 0017480A 5 BASE 962 MTUPPUSTAT BSS 1 PPU status from last transfer 0017480B 5 BASE 963 MTUMTCSTAT BSS 1 tape controller status from last transfer 964 0017480C 5 BASE 965 MTUSAVER34 BSS 2 save area for R3,R4 for drive coroutine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 289 (COREIOTABS) F 19 Resident I/O tables 0017480E 5 BASE 966 MTUSAVER67 BSS 2 save area for R6,R7 for drive coroutine 00174810 5 BASE 967 MTUPC BSS 1 save area for PC for drive coroutine 968 969 * Stack area is currently 15 words in length 970 BSS 32-(DISPW MTUSTART) stack for drive coroutine 00174820 5 BASE 971 MTUSTACK LABEL label for top of stack 972 DRCT 00000005 ABS 973 MTULOG EQU (DISPW MTUPROT) LOG 2 size for getmem 974 ORG MTUPROT recover lost space 975 976 977 ********************************************************************************** 978 * * 979 * The following lock is held by users while requesting a * 980 * tape operation. It is held by the driver while awakening a * 981 * user. * 982 * * 983 ********************************************************************************** 984 01F20 00000000 985 MTREQLOCK VFD STORE tape request lock 986 987 988 ********************************************************************************** 989 * * 990 * User Buffer Space elements * 991 * These elements are set up whenever the user specifies * 992 * a buffer that is to be locked in and be used by a direct * 993 * I/O device. They are created as the pages are locked in by * 994 * DIOSETUP. * 995 * * 996 ********************************************************************************** 997 00001F21 998 UBSPROT BASE R0 00160000 0 CACH 999 UBSVPN BSSB 8 virtual page number locked in here 1000 BSSB 7 filler 00081F10 0 ZBM 1001 UBSLINK BSSB ADDRESS link to next element 00160801 0 BASE 1002 UBSMAW BSS 1 memory address word (in format for PPU) 00160802 0 BASE 1003 UBSBCW BSS 1 byte count word (in format for PPU) 1004 DRCT 00000002 ABS 1005 UBSLOG EQU (DISPW UBSPROT) LOG 2 size of UBS elements for GETMEM 1006 ORG UBSPROT recover lost space 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 290 (COREIOTABS) F 19 Resident I/O tables 1008 1009 ********************************************************************************** 1010 * * 1011 * The following element describes a line printer * 1012 * controller. * 1013 * * 1014 ********************************************************************************** 1015 0012C000 3 REG 1016 LPC EQU R3 register for accessing this 01F21 00000000 1017 LPCLIST VFD STORE list of all line printers 00001F22 1018 LPCPROT BASE LPC 0016C800 3 BASE 1019 LPCLINK BSS 1 link to next LPC element 0016C801 3 BASE 1020 LPCPMVALUE BSS 1 page map value for controller 0016C802 3 BASE 1021 LPCMSGID1 BSS 1 id of message saying LPC not talking 0016C803 3 BASE 1022 LPCMSGID2 BSS 1 id of message saying LPC not ready 0016C804 3 BASE 1023 LPCNAME BSS 1 device name (pak6) 0016C805 3 BASE 1024 LPCELOCK BSS 1 lock to prevent 2 CPU's from diddling 0016C806 3 BASE 1025 LPCBUFPTR BSS 1 pointer to line buffer block 0016C807 3 BASE 1026 LPCFLAGS BSS 1 flags - change via RMW 0008C017 3 ZBM 1027 LPCTIMEOUT EQU LPCFLAGS/BIT 0 time out flag 0008C217 3 ZBM 1028 LPCBUSY EQU LPCFLAGS/BIT 1 write operation (or load VVFU) in progress 0008C417 3 ZBM 1029 LPCOPEN EQU LPCFLAGS/BIT 2 someone has this LP open 0008C617 3 ZBM 1030 LPCWAITING EQU LPCFLAGS/BIT 3 someone is suspended in DIO wait 0008C847 3 ZBM 1031 LPCUNIT EQU LPCFLAGS/BITS 4:7 unit number of LP (from dip switches) 0008D017 3 ZBM 1032 LPCLDVVFU EQU LPCFLAGS/BIT 8 on if load VVFU in progress 0008D217 3 ZBM 1033 LPCVVFUON EQU LPCFLAGS/BIT 9 on if VVFU should be enabled 0008D417 3 ZBM 1034 LPCDEAD EQU LPCFLAGS/BIT 10 on if PPU or controller not talking 0016C808 3 BASE 1035 LPCPCADRS BSS 1 addr of PCB of current user (if LPCOPEN) 0016C809 3 BASE 1036 LPCVVFULNS BSS 1 number of lines of VVFU data 0000005A ABS 1037 LPCVVFUMAX EQU 90 max number of lines of VVFU data 0016C80A 3 BASE 1038 LPCVVFUDAT BSS (LPCVVFUMAX+1)/2 data for VVFU 1039 DRCT 00000037 ABS 1040 LPCLNTH EQU DISPW LPCPROT length of entry 00000006 ABS 1041 LPCLOG EQU LPCLNTH LOG 2 1042 ORG LPCPROT 1043 1044 1045 ********************************************************************************** 1046 * * 1047 * Format of line printer buffer block. This block * 1048 * exists only while the line printer is open. * 1049 * * 1050 ********************************************************************************** 1051 00001F22 1052 LPBPROT BASE R0 00160800 0 BASE 1053 LPBPHYSADR BSS 1 physical address of page containing this block 00160801 0 BASE 1054 LPBLINECNT BSS 1 number of lines currently in buffer 00160802 0 BASE 1055 LPBFIRSTLN BSS 1 index of first line to output 00160803 0 BASE 1056 LPBNEXTLN BSS 1 index of next line to put into buffer 00000007 ABS 1057 LPBMAXCNT EQU 7 max number of lines in buffer 00000024 ABS 1058 LPBLINESZ EQU 36 number of words per line 00160804 0 BASE 1059 LPBLINES BSS LPBMAXCNT*LPBLINESZ buffer space 1060 * The first word of each line is the data 1061 * to store into LPC to cause the write. 1062 * The actual line starts at the second word. 1063 DRCT 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 291 (COREIOTABS) F 19 Resident I/O tables 00000008 ABS 1064 LPBLOG EQU (DISPW LPBPROT) LOG 2 size log 2 1065 ORG LPBPROT 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 292 (COREIOTABS) F 19 Resident I/O tables 1067 1068 ********************************************************************************** 1069 * * 1070 * VOLUME NAME ELEMENT * 1071 * Each volume mounted on the system has one of the * 1072 * following blocks associated with it. This gives the name * 1073 * of the volume, a list of some free blocks, and pointers to * 1074 * the disk routines for this volume. * 1075 * The VOLNTABLE, indexed by the volume number, contains * 1076 * a pointer to the VOLN element. When adding an element, * 1077 * deleting an element, or searching the entire table, it is * 1078 * necessary to hold VOLNLOCK (which is really index zero in * 1079 * the table). However, if you have a volume number and are * 1080 * looking for the VOLN element, and you are sure that the * 1081 * VOLN element is not about to go away, you can directly * 1082 * index into the table without locking it. VOLNLOCK is * 1083 * acquired using LOCKLIST or SRCHLIST, and release with * 1084 * UNLOCKLIST or UNSRCHLIST. * 1085 * Some of the VOLN entries have funny names. If the * 1086 * name is not printable, then the volume is not completely * 1087 * mounted or is maintenance mounted. If you mount a volume * 1088 * with the same name as one that is already mounted, it is * 1089 * given the name "!", where is the * 1090 * actual name of the volume and is the smallest * 1091 * integer that will make the name unique. will be * 1092 * truncated from the right if necessary. * 1093 * * 1094 ********************************************************************************** 1095 00000001 ABS 1096 SYSVOLNUM EQU 1 number assigned to system volume 00000040 ABS 1097 MAXVOLNUM EQU 64 maximum volume number (+1) 00001F22 1098 VOLNTABLE BSS MAXVOLNUM pointers to VOLN elements 00001F22 1099 VOLNLOCK EQU VOLNTABLE(0) lockword is index zero in table 1100 00000080 ABS 1101 VOLNLEN EQU 128 length of volume table elements 00130000 4 REG 1102 VLN EQU R4 1103 00001F62 1104 VOLNPROT BASE VLN 00170800 4 BASE 1105 VOLNSTART BSS 0 00090010 4 ZBM 1106 VOLNSYS BSSB 1 on if this be the system volume 00090210 4 ZBM 1107 VOLNNEWLST BSSB 1 on if creating a new ADT list 00090410 4 ZBM 1108 VOLNCLNUP BSSB 1 causes PUTFREEBLK to force out ADT 00090610 4 ZBM 1109 VOLNSBFLAG BSSB 1 on if substitution process exists 00090840 4 ZBM 1110 VOLNNOUSE BSSB 4 field sez volume not available 00090810 4 ZBM 1111 VOLNAWAY EQU VOLNNOUSE/BIT 28 volume in process of being dismounted 00090A10 4 ZBM 1112 VOLNMOUNT EQU VOLNNOUSE/BIT 29 on if not completely mounted 00090C10 4 ZBM 1113 VOLNINHIB EQU VOLNNOUSE/BIT 30 all new accesses to this volume 1114 * are inhibited 00090E10 4 ZBM 1115 VOLNMAIM EQU VOLNNOUSE/BIT 31 on if maintenance mounted 00091180 4 ZBM 1116 VOLNMSGID BSSB 24 id of message about volume 1117 00090181 4 ZBM 1118 VOLNBTRXBK BSSB MSBLKLOG address of bad trax block 00093181 4 ZBM 1119 VOLNSUBBLK BSSB MSBLKLOG address of substitution block 00092182 4 ZBM 1120 VOLNSECBK1 BSSB MSBLKLOG address of primary security block 00091183 4 ZBM 1121 VOLNSECBK2 BSSB MSBLKLOG address of secondary security block 1122 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 293 (COREIOTABS) F 19 Resident I/O tables 00090184 4 ZBM 1123 VOLNADTPT BSSB MSBLKLOG current ADT block 1124 BSSB 1 FILLER 00093274 4 ZBM 1125 VOLNADTFBX BSSB (PPLMAPSIZE LOG 2) index into PPLPFMAP for FBI 1126 00090015 4 ZBM 1127 VOLNHDCK BSSB 1 on if head checker is inhibited 00090215 4 ZBM 1128 VOLNFOREN BSSB 1 on if volume is foreign 000904A5 4 ZBM 1129 VOLNADTDSP BSSB (WPP LOG 2) disp into PPLWINDOW for FBI 1130 BSSB 3 FILLER 00091F15 4 ZBM 1131 VOLNHCB BSSB ADDRESS => hardware control block 1132 00170806 4 BASE 1133 VOLNBLOCK BSS 1 word used in setting windows 00090086 4 ZBM 1134 VOLNNUM EQU VOLNBLOCK/VOLFIELD number of this volume 00091186 4 ZBM 1135 VOLNMSBLK EQU VOLNBLOCK/MSBLKFIELD temp block pointer 1136 00170807 4 BASE 1137 VOLNSECAD BSS 1 MS address for security block 00090087 4 ZBM 1138 VOLNSNUM EQU VOLNSECAD/VOLFIELD volume number 00091187 4 ZBM 1139 VOLNSMSBLK EQU VOLNSECAD/MSBLKFIELD displacement 1140 00170808 4 BASE 1141 VOLNIDXLK BSS 1 lock for these two counters 1142 00090019 4 ZBM 1143 VOLNIDXMOD BSSB 1 counted if table modifier around 000902D9 4 ZBM 1144 VOLNIDXLOK BSSB 13 counted for each searching table 1145 BSSB 1 FILLER 00091F19 4 ZBM 1146 VOLNIDXPTR BSSB ADDRESS pointer to IDXT block for table 1147 0017080A 4 BASE 1148 VOLNSUBQ BSS 1 queue of substitution requests 0017080B 4 BASE 1149 VOLNSUBQL BSS 1 lock for substitution request queue 0017080C 4 BASE 1150 VOLNFBZY BSS 1 set if resident lists busy 0017080D 4 BASE 1151 VOLNADTF BSS 1 set if MS ADT tables busy 1152 * ( a process is already running to 1153 * empty/fill the resident table ) 1154 0017080E 4 BASE 1155 VOLNSSN BSS 1 system serial number of this volume 0009010E 4 ZBM 1156 VOLNCUST EQU VOLNSSN/CUSTNUM customer number part 0017080F 4 BASE 1157 VOLNRNAME BSS2 1 real name of volume 00170811 4 BASE 1158 VOLNNAME BSS2 1 the RAD packed name of this volume 00170813 4 BASE 1159 VOLNMNTDAT BSS2 1 date when pack was mounted 00170815 4 BASE 1160 VOLNBUSY BSS 1 the count of processes referencing this volume 1161 * one for each ULB and for each non-user process 1162 * (file freer, device queuer, etc.) 1163 1164 ********************************************************************************** 1165 * * 1166 * Following are the queues of I/O requests pending for * 1167 * this volume. These must remain contiguous and in this order. * 1168 * * 1169 ********************************************************************************** 1170 00170816 4 BASE 1171 VOLNREADQ BSS 1 read requests 00170817 4 BASE 1172 VOLNWRITEQ BSS 1 write requests 1173 1174 ********************************************************************************** 1175 * * 1176 * The following two variables are used when a volume is * 1177 * being initialized and recovered onto. VOLNINLIST contains * 1178 * a pointer to a list of elements representing bad tracks * 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 294 (COREIOTABS) F 19 Resident I/O tables 1179 * with the end element representing the size of the pack. * 1180 * VOLNBCNTR is successively incremented to provide all MS * 1181 * addresses on the volume. * 1182 * * 1183 ********************************************************************************** 1184 00170818 4 BASE 1185 VOLNINLIST BSS 1 initialization list 00170819 4 BASE 1186 VOLNBCNTR BSS 1 block counter 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 295 (COREIOTABS) F 19 Resident I/O tables 1188 ********************************************************************************** 1189 * * 1190 * Resident ADT section of the volume name list element. * 1191 * * 1192 ********************************************************************************** 1193 0017081A 4 BASE 1194 VOLNFRECNT BSS 1 number of free blocks in the below list 0017081B 4 BASE 1195 VOLNFRELST BSS 1 number of free blocks in this ADT chain 0017081C 4 BASE 1196 VOLNFREBLK BSS 1 number of free blocks on the volume 1197 * (excludes count of entries in below list) 0017081D 4 BASE 1198 VOLNSIZE BSS 1 number of blocks on this volume 1199 1200 ********************************************************************************** 1201 * * 1202 * When disk space gets low an operator message is sent. * 1203 * Its serial number is saved here so that when disk space * 1204 * goes above the critical level the message can be cancelled. * 1205 * * 1206 ********************************************************************************** 1207 0017081E 4 BASE 1208 VOLNLOMSN BSS 1 low disk space message serial number 00000100 ABS 1209 BLKWRNMIN EQU 256 number of blocks at which to give warning 00000118 ABS 1210 BLKWRNMAX EQU 280 number of blocks at which to remove warning 1211 00000008 ABS 1212 VOLNFREDSP EQU 8 displacement from middle for fill or empty 00000005 ABS 1213 VOLNFREMIN EQU 5 displacement from end for starting action 00000061 ABS 1214 VOLNFREEN EQU VOLNLEN-(DISP VOLNSTART) number of free block 1215 * pointers herein 1216 0017081F 4 BASE 1217 VOLNFREE BSS VOLNFREEN area for free block addresses 1218 DRCT 00000007 ABS 1219 VOLNLOG EQU VOLNLEN LOG 2 size for free memory routines 1220 ORG VOLNPROT recover the space 1221 1222 ********************************************************************************** 1223 * * 1224 * VINLIST * 1225 * This is the format for the small elements linked * 1226 * together in the VOLNINLIST chain. * 1227 * * 1228 ********************************************************************************** 1229 00001F62 1230 VINPROT BASE R0 volume initializer element 00160800 0 BASE 1231 VINLINK BSS 1 link to next element 00160801 0 BASE 1232 VINBLOCK BSS 1 bad block MS address 1233 * (note that the last list element 1234 * contains the pack size which is 1235 * the first address that doesn't exist) 1236 DRCT 00000002 ABS 1237 VINLEN EQU DISPW VINPROT element length 00000001 ABS 1238 VINLOG EQU VINLEN LOG 2 log size for GETMEM 1239 ORG VINPROT recover lost space 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 296 (COREIOTABS) F 19 Resident I/O tables 1241 1242 ********************************************************************************** 1243 * * 1244 * Substitution Queue Element * 1245 * This is the list of requests to substitute or * 1246 * unsubstitute mass storage blocks. The disk driver requests * 1247 * that a block be substituted when it encounters a soft error * 1248 * reading a block, and the ADT manager requests that a block * 1249 * be unsubstituted when that block is finally freed. Since * 1250 * it is inconvenient for either of them to do the * 1251 * substitutions themselves, they just put one of these * 1252 * elements onto a queue and let the substitution process * 1253 * worry about it. * 1254 * There is one of these lists for each volume, anchored * 1255 * at VOLNSUBQ, and locked by VOLNSUBQL. Elements are appended * 1256 * to the list by SUBSTITUTE and UNSUBS, and removed by * 1257 * SUBSPROC. * 1258 * * 1259 ********************************************************************************** 1260 00001F62 1261 SUBQUEUE BASE R0 substitution queue element 00160800 0 BASE 1262 SUBQWORDA BSS 1 first word 00080080 0 ZBM 1263 SUBQREQ EQU SUBQWORDA/CH0 0 => substitute, 1 => unsubstitute 00081F10 0 ZBM 1264 SUBQLINK EQU SUBQWORDA/FLDADRS link to next element 00160801 0 BASE 1265 SUBQBLOCK BSS 1 block number to substitute or 1266 unsubstitute (includes volume number) 1267 DRCT 00000001 ABS 1268 SUBQLOG EQU (DISPW SUBQUEUE) LOG 2 size log 2 1269 ORG SUBQUEUE 1270 1271 ********************************************************************************** 1272 * * 1273 * Substitution List Element * 1274 * This is the list of substituted blocks on the system. * 1275 * There is one chain containing any substitutions that have * 1276 * been made on any mounted volume. * 1277 * This list is created by MOUNTSUBS, destroyed by * 1278 * DISMTSUBS and altered by SUBSPROC. * 1279 * * 1280 ********************************************************************************** 1281 01F62 00000000 1282 SUBSLOCK VFD STORE lock word for substitution list 01F63 00000000 1283 SUBSLIST VFD STORE list of substitution elements 1284 00001F64 1285 SUBLIST BASE R0 substitution list element 00160800 0 BASE 1286 SUBLLINK BSS 1 link to next element 00160801 0 BASE 1287 SUBLBAD BSS 1 bad block number (includes volume number) 00160802 0 BASE 1288 SUBLGOOD BSS 1 substitute block number (includes volume number) 1289 DRCT 00000002 ABS 1290 SUBLLOG EQU (DISPW SUBLIST) LOG 2 size log 2 1291 ORG SUBLIST 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 297 (COREIOTABS) F 19 Resident I/O tables 1293 1294 ********************************************************************************** 1295 * * 1296 * Account Finder Table head * 1297 * This points to a block of free storage that contains * 1298 * an array of block numbers of the account finder table. * 1299 * This is fetched from the system volume when the system is * 1300 * initialized. * 1301 * * 1302 ********************************************************************************** 1303 01F64 00000000 1304 AFTINDEX VFD FLDADRS*STORE pointer to resident AFT 01F65 00000000 1305 AFTLOCK VFD STORE lock word for next two counters 01F66 00000000 1306 AFTLOOKERS VFD STORE number of folk looking at AFT 01F67 00000000 1307 AFTMODIFY VFD STORE number of folk wishing to modify AFT 1308 00000000 ABS 1309 AFTACSRO EQU 0 indicates read only access requested 00000001 ABS 1310 AFTACSMO EQU 1 indicates modify access requested 1311 1312 ********************************************************************************** 1313 * * 1314 * User InDeX Table Head * 1315 * Entries that point at the blocks in IDX's or the AFT. * 1316 * The IDXT blocks of the IDX's are pointed to from the volume * 1317 * name entry while the AFT is pointed to from the head page. * 1318 * The block is of variable length. * 1319 * IDXTBNUM should never be zero, but buckets within the * 1320 * range of IDXTBNUM may have zero for pointers (in which * 1321 * case, they are created as needed). * 1322 * * 1323 ********************************************************************************** 1324 00001F68 1325 IDXTABPROT BASE R4 00170800 4 BASE 1326 IDXTBLOCK BSS 1 current block number 00090080 4 ZBM 1327 IDXTVOL EQU IDXTBLOCK/VOLFIELD volume that table is on 00091180 4 ZBM 1328 IDXTMSBLK EQU IDXTBLOCK/MSBLKFIELD relative disk address 00170004 4 CACH 1329 IDXTFBIT BSSB 8 type of table 00170005 4 CACH 1330 IDXTBNUM BSSB 8 number of buckets in below lists 00092101 4 ZBM 1331 IDXTENTS BSSB 16 total number of entries in buckets 00170802 4 BASE 1332 IDXTTEMP3 BSS 1 holds insert point - block number 00170803 4 BASE 1333 IDXTTEMP4 BSS 1 holds insert point - memory address 00000004 ABS 1334 IDXTPWR2 EQU DISPW IDXTVOL difference of number of buckets from 1335 * power of two 00170804 4 BASE 1336 IDXTBUCKET LABEL one word entry for each bucket 1337 * (holds MS address of corresponding 1338 * bucket. zero indicates bucket was 1339 * empty, so it was not created) 1340 * ... (variable length) 1341 DRCT 1342 ORG IDXTABPROT recover lost space 1343 00001F68 1344 PATCHAREA BSS 80 area for system patches 01FB8 FFFFFFFF 1345 VFD ONEBITS so that we notice the end of the area 00001FB9 1346 HEADPAGEND LABEL first unused word of head page 1347 28 INPUT IBLOCK definitions for initialization 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 298 (IBLOCK) F 20 Initialization information block 4 5 ********************************************************************************** 6 * * 7 * Physical page zero is reserved for bootstrap and power * 8 * fail. While this page is in use, it is mapped into virtual * 9 * page zero of the monitors address space. Otherwise, * 10 * monitor virtual page zero is illegal to reference ( to help * 11 * catch various errors ). * 12 * This file (IBLOCK) defines all locations in the second * 13 * half (200:3FF) of page zero and is assembled with each * 14 * program that uses that area. * 15 * * 16 * Page zero has the following map: * 17 * locs contents * 18 * ---- -------- * 19 * 0000-01ff code copied from PROM in SSU that does * 20 * booting, etc. During system operation * 21 * this bootstrap area is overlaid by the * 22 * power fail restart code. * 23 * 0200:02ff 16 16-word blocks, one for each slot on * 24 * the bus. Each contains the responses * 25 * for WRUs 0 thru 15 on that slot. * 26 * 0300:030f currently unused. Reserved for * 27 * hardware features. * 28 * * * * end of hardware dependent area * 29 * 0310:031E communication area between PROMBOOT, * 30 * DISKBOOT, and the Operating System * 31 * *** this boundary is approximate * 32 * 031F:032F variable area * 33 * 0330:035F stack area for PROMBOOT and DISKBOOT * 34 * 0360:03ff Information saved by the system to * 35 * allow rebuilding of the page file after * 36 * a power failure. * 37 * * 38 ********************************************************************************** 39 40 ORG MA (WPP/2) start in second half of page 00000200 41 IBLOCK LABEL 00000200 42 WRUIPROTO BASE 00000000 DISP 43 WRU0 BSS 1 identity and revision 00000001 DISP 44 WRU1 BSS 1 bus error info 00000002 DISP 45 WRU2 BSS 1 bus error info 00000003 DISP 46 WRU3 BSS 1 bus error info 00000004 DISP 47 WRU4 BSS 1 device dependent info 00000005 DISP 48 WRU5 BSS 1 device dependent info 00000006 DISP 49 WRU6 BSS 1 device dependent info 00000007 DISP 50 WRU7 BSS 1 device dependent info 00000008 DISP 51 WRU8 BSS 1 device dependent info 00000009 DISP 52 WRU9 BSS 1 device dependent info 0000000A DISP 53 WRU10 BSS 1 device dependent info 0000000B DISP 54 WRU11 BSS 1 device dependent info 0000000C DISP 55 WRU12 BSS 1 device dependent info 0000000D DISP 56 WRU13 BSS 1 device dependent info 0000000E DISP 57 WRU14 BSS 1 device dependent info 0000000F DISP 58 WRU15 BSS 1 self test results 59 DRCT 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 299 (IBLOCK) F 20 Initialization information block 00000010 ABS 60 WRUIMAX EQU DISPW WRUIPROTO size of WRU info block 61 ORG WRUIPROTO recover the lost space 62 00000200 63 WRUINFO BSS NUMSLOTS*WRUIMAX WRU info blocks, 1 per slot 00000300 64 EWRUINFO LABEL 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 300 (IBLOCK) F 20 Initialization information block 66 67 ********************************************************************************** 68 * * 69 * Reserved for future feature. * 70 * This area was assigned as the communication area * 71 * between macro code and micro code for a debugging feature. * 72 * * 73 ********************************************************************************** 74 75 BSS 16 76 77 ********************************************************************************** 78 * * 79 * End of hardware assigned area. * 80 * * 81 ********************************************************************************** 82 83 ********************************************************************************** 84 * * 85 * Variable area * 86 * The area between here and the tables at the end is * 87 * available for assignment as: * 88 * 1) variables to be communicated between PROMBOOT, * 89 * DISKBOOT, and the SYSTEM. * 90 * 2) variables to be communicated between CPUs * 91 * during system initialization. * 92 * 3) variables local to PROMBOOT or DISKBOOT. * 93 * * 94 ********************************************************************************** 95 96 ********************************************************************************** 97 * * 98 * PROMBOOT constructs a page map value for the SSU with * 99 * the SSU command offset and saves it in SSUPF for future use * 100 * by DISKBOOT, OPL, and the Operating System. * 101 * PROMBOOT uses several pages of memory. When control * 102 * is passed on, PHPNAV may be used to determine the next * 103 * available memory page. * 104 * * 105 ********************************************************************************** 106 00000310 107 SSUPF BSS 1 page map value for SSU control 00000311 108 PHPNAV BSS 1 PF contents for last used page 109 110 ********************************************************************************** 111 * * 112 * This is the contents of the CPU interrupt polling word * 113 * built by initial. It is here so that the many CPUs may * 114 * each load it. * 115 * * 116 ********************************************************************************** 117 00000312 118 INTDEVICES BSS 1 interrupt polling word 119 120 ********************************************************************************** 121 * * 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 301 (IBLOCK) F 20 Initialization information block 122 * PROMBOOT recovers from the SSU the contents of the * 123 * front panel switches at boot time and stores the value * 124 * here. * 125 * DISKBOOT and the system get the switches from here * 126 * so that everyone is using the same data. * 127 * * 128 ********************************************************************************** 129 00000313 130 FPSWITCHX BSS 1 131 132 ********************************************************************************** 133 * This holds the filename of the routine loaded. The * 134 * system can thus find its name here. * 135 ********************************************************************************** 136 00000314 137 CALLNAME BSS2 1 the name of the system loaded 138 139 ********************************************************************************** 140 * * 141 * This block contains the information from DISKBOOT * 142 * about the disk from which it booted the system. It is used * 143 * by the system to ensure that the "system volume" is the * 144 * same one used by DISKBOOT. This vector must be in the same * 145 * format as an offline device control block. * 146 * During TAPEBOOT this same vector is used to describe * 147 * the tape unit that we have booted from. * 148 * * 149 ********************************************************************************** 150 00000316 151 BOOTDEVCB BSS 0 control block for booted device 00000316 152 BOOTDEVPF BSS 1 page file for boot device 00000317 153 BOOTUNIT BSS 1 unit number for boot unit 154 00000318 155 BOOTSCPTRK BSS 1 sectors per track 00000319 156 BOOTRKPCYL BSS 1 tracks per cylinder 157 BSS 4 remainder of disk control block 158 159 ********************************************************************************** 160 * During initialization, one processor is chosen as a * 161 * master and the other processors wait on this flag until it * 162 * is cleared by the "master" processor. * 163 ********************************************************************************** 164 0000031E 165 RELESEFLAG BSS 1 multi-proc control during initial 166 167 ********************************************************************************** 168 * This is the FBI buffer for use by PROMBOOT, * 169 * DISKBOOT, and TAPEBOOT. * 170 ********************************************************************************** 171 0000031F 172 BOOTFBIBF BSS FBILNTH FBI buffer for DISKBOOT 173 174 ********************************************************************************** 175 * * 176 * Definitions for tape boot reading and decryption. * 177 * * 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 302 (IBLOCK) F 20 Initialization information block 178 * A tape suitable for the tape boot operation contains a * 179 * TAPEBOOT record after the first file mark on the tape. The * 180 * TAPEBOOT record must be followed by TOPL and other offline * 181 * utility programs. The second file mark on the tape * 182 * indicates the end of the boot utility programs, and the * 183 * beginning of the +BACKUP info. The format for these tape * 184 * records are all the same, and are all (TPHDRLNTH+WPP)*CPW * 185 * characters long, with the first TPHDRLNTH*CPW characters a * 186 * label for convenience in identifying the record. The * 187 * remainder of the record consists of the encrypted TAPEBOOT, * 188 * or offline utility program code. * 189 * * 190 ********************************************************************************** 191 0000000B ABS 192 TPHDRLNTH EQU FBILNTH length of header on tapeboot record 0000031F 193 TPHDRBF EQU BOOTFBIBF buffer for tapeboot record header 0000032A 194 TPHDR BASE 00000000 DISP 195 TPHDRTAG BSS 2 block identifier (name) 00000002 DISP 196 TPHDRIND BSS 1 word for decryptor to use 00000003 DISP 197 TPHDRDATE BSS 2 date backup tape was made 198 BSS 4 (reserved) 00000009 DISP 199 TPHDRDCKS BSS 1 checksum of data block 0000000A DISP 200 TPHDRHCKS BSS 1 checksum of header 201 DRCT 202 ORG TPHDR 0000000C ABS 203 SIZELOG2 EQU 12 log of decrypt buffer size 00001000 ABS 204 L EQU 2 POWER SIZELOG2 size of the decrypt buffer (in characters) 00000003 ABS 205 ROUNDS EQU 3 number of rounds of encryption 206 207 ********************************************************************************** 208 * * 209 * The following area is used for variables that are * 210 * local to PROMBOOT, DISKBOOT, TAPEBOOT, or INITIAL. These * 211 * variables may, of course, have different definitions for * 212 * each user. * 213 * * 214 ********************************************************************************** 215 0000032A 216 VARAREA LABEL marks beginning of re-usable area 217 218 ********************************************************************************** 219 * Definitions for PROMBOOT. * 220 ********************************************************************************** 221 0400032A 222 KEYH BSS 16:0 describe key by half words 0000032A 223 KEYIND BSS 1 holds the indicator (read from tape) 0000032B 224 KEYPWDATE BSS2 1 holds XOR of PW and backup date 0000032D 225 APROGBC BSS 1 data pointer for decrypting 0000032E 226 APROGB5S BSS 1 data pointer for decrypting 227 228 ********************************************************************************** 229 * * 230 * The IZONEWORD is used to hold the local time zone * 231 * information. This word is picked up by the SRCHDIR routine * 232 * of DISKBOOT and TAPEBOOT from the security block * 233 * (SECTZONE). It is used by OPL utilities to enable printing * 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 303 (IBLOCK) F 20 Initialization information block 234 * of local times. * 235 * * 236 ********************************************************************************** 237 0000032F 238 IZONEWORD BSS 1 holds time zone word 00000330 239 BOOTYPE BSS 1 boot type for PROMBOOT 00000331 240 BOOTCLOC BSS 1 control location for PROMBOOT 241 00000332 242 IBLKPATCH BSS 0 patch area, may be used for variables 243 244 ********************************************************************************** 245 * * 246 * This ORG is the beginning of the power fail table * 247 * area. The tables that follow are (in addition to acting * 248 * as bootstrap variables) also passed to the power fail * 249 * restart code. * 250 * Note that simple variables should not overlay these * 251 * tables unless a careful determination is made that no * 252 * conflict exists. * 253 * These tables should be zeroed to start. * 254 * Since the stacks grow toward low memory, the stack * 255 * top label is defined here. * 256 * * 257 ********************************************************************************** 258 259 ORG MA (WPP-2*NUMSLOTS-NPS) place flush with end of page 00000360 260 IBSTACK LABEL 261 262 ********************************************************************************** 263 * * 264 * The initial boot into memory containing parity errors * 265 * requires that a fill operation be done to clear out the * 266 * parity errors. This label marks the limit of the area * 267 * that must be filled. * 268 * * 269 ********************************************************************************** 270 00000360 271 EVARCLEAR LABEL 272 273 ********************************************************************************** 274 * * 275 * This table holds the page map value for each page that * 276 * was assigned as a CPUPAGE. The HEADPAGE also becomes the * 277 * CPUPAGE for the 'master' CPU. However, that entry is not * 278 * made until well into the system initialization. That way, * 279 * the HEADPAGE doesn't get freed twice. After that is * 280 * resolved, CPUPT contains all of the CPUPAGES so that all * 281 * CPUs get their brains back during a power fail recovery. * 282 * Each CPUPAGE is mapped into another monitor virtual * 283 * page where it is used for the free storage addresses. This * 284 * occurrence of the page map value appears in the PFMAP * 285 * table. * 286 * * 287 ********************************************************************************** 288 00000360 289 CPUPT BSS NUMSLOTS page file contents for each CPU page 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 304 (IBLOCK) F 20 Initialization information block 290 291 ********************************************************************************** 292 * This table will be loaded up with the information * 293 * about each slot on the bus. Each entry is the WRU 0 * 294 * response for that slot. This table is constructed by * 295 * PROMBOOT using the information in WRUINFO (above). * 296 ********************************************************************************** 297 00000370 298 IBSLOTS BSS NUMSLOTS one for each slot on system 299 300 ********************************************************************************** 301 * * 302 * This table contains one word for each monitor virtual * 303 * page. That word contains the page map value for the * 304 * physical page corresponding (zero if none). This table * 305 * is initialized by DISKBOOT and kept up to date by the * 306 * dispatcher. It is used by the power fail routine to * 307 * recover the monitor page files. * 308 * * 309 ********************************************************************************** 310 00000380 311 PFMAP BSS NPS page map for monitor virtual address space 00000387 312 HEADPMV EQU PFMAP(PNHEADPAGE-MONPF) head page location 30 INPUT INITIAL first system executed code 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 305 (INITIAL) F 21 Initialization Routine 3 4 ORG INITPAGE 5 6 BLOCK System Initialization Routine 7 ENTRY INITIAL primary entry for CPU doing the work 8 ENTRY SUCKERS secondary entry for lazy CPUs 9 10 * Some global constants used in the initial code 02000 0F000FFF 11 PFCLNMASK VFD ONEBITS/PFSLOT*PFSLOT+ONEBITS/PFPAGENUM*PFPAGENUM clear page file mask 02001 00480312 12 PTRINTDEV PTR INTDEVICES/BIT 0 pntr to mask of slots that interrupt 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 306 (INITIAL) F 21 Initialization Routine 14 15 ********************************************************************************** 16 * * 17 * INITIAL - System Initialization * 18 * This is the primary entry point for the system * 19 * overlay. The 'master' CPU enters here from the bootstrap. * 20 * This CPU is the one that uses HEADPAGE as its CPUPAGE. We * 21 * start by loading up the page file for the CPUPAGE. * 22 * * 23 * Stack required = 19 * 24 * 1 + max ( BLDPROCESS(2), BUILDIVT (3), BUILDPPL (1), * 25 * FREEAFTER (2), FREECHECK (2), GENPPL (2), * 26 * GETIDLE (1), GETMAD (0), HAVEMEMORY(8), * 27 * HAVEPPU (19), HAVESSU (6), MAPOUTMEM (1), * 28 * MERGEPPLS (1), SETRUNNING (2), SGETMEM (0), * 29 * SPREADSYS (5), ZEROIT (1) ) * 30 * * 31 ********************************************************************************** 32 33 JB1 BLOCK INITIAL routine 34 ENTRY INITIAL 35 36 BEGFRAME2 00178800 6 BASE 37 SLOTNUM BSS 1 slot being initialized 38 ENDFRAME 39 40 00002002 41 INITIAL LABEL 02002 FE0E201C 42 JMP OVERVERSN jump over version id 43 * --- 44 45 ********************************************************************************** 46 * * 47 * This version is normally not updated when the system * 48 * is patched, only the version field labeled 'VERSION' is * 49 * patched up to the current rev. This spot allows us to know * 50 * for sure what version this system started as. The * 51 * copyright notice should protect our rights to the code. * 52 * * 53 ********************************************************************************** 54 02003 43393330 55 VFD REVNAMEH high half of name 02004 33202020 56 VFD REVNAMEL low half of name 02005 434F5059 57 TEXTZ "COPYRIGHT 1982, 1983, 1984, 1985, 1986, 1987, 1988, 1989, 1990 BTI Computer Systems, Inc." 58 0000201C 59 OVERVERSN LABEL 0201C D0001CF7 60 INC CPUCOUNT count number of CPUs 0201D D0001CFA 61 INC CPUINIT say we are on the initial page 0201E BC001CF8 0 62 INCL R0 CPUCOUNT1 ...twice since we need two counts 63 * and this gives us an index 0201F D9124000 1 REG 64 STMSR R1 pick up a copy of our MSR 02020 604A7840 1 1 CBM 65 LD R1 R1/MSRSLOT and extract the slot number of this CPU 02021 E4601CFA 1 0 66 ST R1 CPUSLOTS(R0-1) store CPU slot number into table using index 67 02022 60C40081 3 IMM 68 LD PFPTR PNCPUPAGE get CPUPAGE PF index 02023 00C00387 69 LDPF HEADPMV load our CPUPAGE 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 307 (INITIAL) F 21 Initialization Routine 02024 E4400415 1 70 ST R1 OURSLOT save CPU slot number for ourselves 02025 60002832 0 71 LD R0 STACKIDENT get stack marker and 02026 E400042D 0 72 ST R0 RESSTAKTOP identify this stack 02027 6184044D 6 IMM 73 LD SP ADR RESSTAK initialize stack pointer 02028 EC1F8001 6 STAK 74 STZ PUSH allocate stack area 02029 EC000462 75 STZ MEMERRFLAG indicate not processing memory error 76 * \ / 77 78 ********************************************************************************** 79 * * 80 * Save PM value of bootstrap so that others may use it. * 81 * This must be done before any calls to GETMEM routines that * 82 * get a new page. * 83 * * 84 ********************************************************************************** 85 86 * \ / 0202A 60C40080 3 IMM 87 LD PFPTR MONPF+0 point to bootstrap page 0202B 80801CC7 88 PFRD PAGEZERO save reloc for it 89 90 ********************************************************************************** 91 * * 92 * The first order of business is to free up the unused * 93 * space on HEADPAGE. Since this page is mapped into the same * 94 * location in every CPU, we may free it up with no addressing * 95 * problems. * 96 * * 97 ********************************************************************************** 98 99 * \ / 0202C 6044000A 1 IMM 100 LD R1 LWPP a whole page 0202D 60841FB9 2 IMM 101 LD R2 ADR HEADPAGEND load the first address available 0202E DC402328 102 CALLNP FREEAFTER call this handy routine 103 * \ / 104 105 ********************************************************************************** 106 * * 107 * Defer freeing the other CPU pages until after we have * 108 * generated the MONVM list and know the first address * 109 * available for free memory. * 110 * * 111 ********************************************************************************** 112 113 ********************************************************************************** 114 * * 115 * Generate the MONVM list, excluding those pages that * 116 * must remain resident. The physical page for the * 117 * initializer (this code!) will have a PPAGE element * 118 * generated and entered into the idle list. We'll be done * 119 * with it before it is missed (used!). * 120 * The DISKBOOT routine has left the code control block * 121 * for the SYSTEM.CODE file in window 1. * 122 * * 123 ********************************************************************************** 124 125 * \ / 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 308 (INITIAL) F 21 Initialization Routine 0202F 61040088 4 IMM 126 LD R4 PNINITPAGE start checking here 00002030 127 CRAVP LABEL 02030 60A80780 2 4 128 LD R2 WNDO1(CCBPAGE0-MONPF+R4) check the MS address 02031 FA822042 2 129 JEQZ R2 ENDLOOP jump if no page corresponding 02032 EC381CC6 4 @ 130 STZ @PAVPAGES(R4) remove page from virtual monitor address 02033 F6802042 2 131 JBT R2/CCBPROTECT ENDLOOP jump if a permanent page 132 * \ / 133 134 ********************************************************************************** 135 * * 136 * The page is not flagged as protected. During the * 137 * bootstrap operation, this means that the page was not * 138 * loaded and is not part of the resident code. * 139 * Therefore, we now create a VPAGE element for this page * 140 * and place it into the MONVM list. * 141 * * 142 ********************************************************************************** 143 144 * \ / 02034 DC002ED0 145 CALL SGETMEM get a chunk of memory 02035 40440002 IMM 146 PARVL VPLOG indicate its length 02036 61520000 5 0 REG 147 LD VPP R0 copy the pointer 02037 60001ECB 0 148 LD R0 MONVM get pointer to current list 02038 E4095F10 0 5 ZBM 149 ST R0 VPP,VPLINK hook it behind this element 02039 E5401ECB 5 150 ST VPP MONVM make this element the new head 0203A E5174004 4 5 CACH 151 ST R4 VPP,VPVPN set the page number 0203B 60040001 0 IMM 152 LD R0 VPCNTLRO get read-only marker and 0203C E4094E80 0 5 ZBM 153 ST R0 VPP,VPCNTL indicate that this page is read only 0203D 60040014 0 IMM 154 LD R0 FBITCODED get FBI type for code data page 0203E E40942E2 0 5 ZBM 155 ST R0 VPP,VPFBITYPE and set the page type expected 0203F EDC94083 5 ZBM 156 STW VPP,VPDRIVE indicate on system drive 02040 EC095F11 5 ZBM 157 STZ VPP,VPFCB say no associated lun 02041 E4895183 2 5 ZBM 158 ST R2 VPP,VPMSBLK set block address 159 00002042 160 ENDLOOP LABEL 02042 19040001 4 IMM 161 ADD R4 1 up to next address in CCB 02043 65040100 4 IMM 162 CPR R4 MONPF+NPS check for beyond usable memory 02044 FE082030 163 JLT CRAVP jump if still in allowable area 02045 60040002 0 IMM 164 LD R0 1*BIT FLCHKSUM 02046 FC001CF6 0 165 IORM R0 FLAGS say we need to recalculate checksums 166 * \ / 167 168 ********************************************************************************** 169 * * 170 * Free the remaining CPUPAGEs. * 171 * The HEADPAGE (CPUPAGE for master CPU) has already been * 172 * freed. We must be careful not to free it twice. This is * 173 * accomplished by omitting it from the CPUPT table until all * 174 * other CPUPAGEs are freed (this loop). * 175 * * 176 ********************************************************************************** 177 178 * \ / 02047 6107FFF0 4 IMM 179 LD R4 -NUMSLOTS load count 00002048 180 CCPUPLD LABEL 02048 60280370 0 4 181 LD R0 CPUPT(NUMSLOTS)(R4) see if another CPU has loaded a CPUPAGE 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 309 (INITIAL) F 21 Initialization Routine 02049 FA022051 0 182 JEQZ R0 CLPEND jump if none here 183 * MEMLOCK need not be locked since we are the only CPU 0204A DC40301D 184 CALLNP GETMAD get an available monitor address 0204B 00D20000 0 REG 185 LDPF R0 setup this address in PF 0204C E4260300 0 3 186 ST R0 PFMAP(-MONPF)(PFPTR) save in table 0204D 608AE960 2 3 CBM 187 LD R2 PFPTR/BITS 20:9 make memory address of page 0204E 1884006B 2 IMM 188 ADD R2 CPULNTH make first freeable address 0204F 6044000A 1 IMM 189 LD R1 LWPP a whole page 02050 DC402328 190 CALLNP FREEAFTER free the rest of the page 00002051 191 CLPEND LABEL 02051 FB202048 4 192 IRJ R4 CCPUPLD continue for all slots 193 * \ / 194 195 ********************************************************************************** 196 * * 197 * The HEADPAGE is also used as the 'master' CPUs * 198 * CPUPAGE. It now gets placed into the CPUPT table so that * 199 * power fail will properly restore our brains. * 200 * * 201 ********************************************************************************** 202 203 * \ / 02052 60000415 0 204 LD R0 OURSLOT get our slot number 02053 60800387 2 205 LD R2 HEADPMV load the page map value 02054 E4A00360 2 0 206 ST R2 CPUPT(R0) plug into the CPUPT table 207 * \ / 208 209 ********************************************************************************** 210 * * 211 * Clean out the VOLN table. * 212 * * 213 ********************************************************************************** 214 215 * \ / 02055 38801F22 2 216 LEA R2 VOLNTABLE pointer to start of the table 02056 60440100 1 IMM 217 LD R1 MAXVOLNUM*CPW length of table in characters 02057 FE580000 218 CFILL 0 nothing remains 219 * \ / 220 221 ********************************************************************************** 222 * * 223 * Make PPAGEs for the following special cases: * 224 * - the bootstrap code itself, * 225 * - the three windows used by the bootstrap, * 226 * - the page used by the initial routine, and * 227 * - the pages used by INITPROC. * 228 * * 229 * Note that the first call to GENPPL uses that page for * 230 * FBIs for the following pages. Thus we call GENPPL once * 231 * before calling BUILDPPL so that there will be a page * 232 * allocated for the FBIs. We then build PPLs for the initial * 233 * page and initial process pages and tuck them away in a safe * 234 * place. When INITPROC has finished running it places these * 235 * PPLs in the idle lists for mass consumption. * 236 * Also note that the first page of INITPROC gets its PPL * 237 * built first (of the initial PPLs) so that it will be on the * 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 310 (INITIAL) F 21 Initialization Routine 238 * bottom of the list. This must be this way or else when * 239 * INITPROC is giving the PPLs to the idle lists it will give * 240 * the one its finishing up code is running on before it is * 241 * finished and die a horrible death. * 242 * * 243 ********************************************************************************** 244 245 * \ / 02058 60C40082 3 IMM 246 LD PFPTR PNWNDO1 points to window 1 02059 80D34000 5 REG 247 PFRC R5 read physical page number 0205A DC40235E 248 CALLNP GENPPL make a PPAGE element for this page 249 0205B 60C400AC 3 IMM 250 LD PFPTR PNINITPROC index to INITPROC page 0205C 60840000 2 IMM 251 LD R2 0 no PPLs built yet 0000205D 252 GENINITPPL LABEL 0205D 80934000 5 REG 253 PFRD R5 read page file contents 0205E DC402374 254 CALLNP BUILDPPL build a PPL for this page 0205F E4891F10 2 4 ZBM 255 ST R2 PPL,PPLINK link previous PPLs onto us 02060 60930000 2 4 REG 256 LD R2 PPL R2 -> list of initial PPLs 02061 18C40001 3 IMM 257 ADD PFPTR 1 move to next page 02062 64C400AD 3 IMM 258 CPR PFPTR ENDOFSYS/WPP+MONPF have we done the last of the system? 02063 FE0A205D 259 JLE GENINITPPL if not, then keep building PPLs 260 * \ / 261 02064 60C40088 3 IMM 262 LD PFPTR PNINITPAGE the index to this page 02065 80934000 5 REG 263 PFRD R5 read my page file contents 02066 79402000 5 264 AND R5 PFCLNMASK mask off read-only bits 02067 DC402374 265 CALLNP BUILDPPL make a PPL for the initializer page 02068 E4891F10 2 4 ZBM 266 ST R2 PPL,PPLINK link previous list onto new PPL 02069 E5001E1D 4 267 ST PPL PPLINIT save pointer to entire list 0206A EC000388 268 STZ PFMAP(PNINITPAGE-NPS) clear out of the page file map 269 0206B 60C40083 3 IMM 270 LD PFPTR PNWNDO2 points to window 2 0206C 80D34000 5 REG 271 PFRC R5 read physical page number 0206D DC40235E 272 CALLNP GENPPL make a PPAGE element for this page 273 0206E 60C40084 3 IMM 274 LD PFPTR PNWNDO3 points to bootstrap page 0206F 80D34000 5 REG 275 PFRC R5 read physical page number 02070 DC40235E 276 CALLNP GENPPL make PPAGE element for this page 277 02071 60C40085 3 IMM 278 LD PFPTR PNWNDO4 another window used by the booter 02072 80D34000 5 REG 279 PFRC R5 get where he is 02073 DC40235E 280 CALLNP GENPPL generate control element 281 * \ / 282 02074 60000313 0 283 LD R0 FPSWITCHX get the boot time FP switches passed 02075 E4001EE0 0 284 ST R0 FPSWITCHB from PROMBOOT and save on headpage 02076 EC000312 285 STZ INTDEVICES initialize mask of devices that can interrupt 286 * \ / 287 288 ********************************************************************************** 289 * * 290 * Scan the slot table looking for memory, and if found * 291 * initialize it. We do this in a separate loop from the * 292 * initializing loop for PPUs and SSUs since they require a * 293 * fair amount of memory to build their control elements. * 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 311 (INITIAL) F 21 Initialization Routine 294 * Also, this way when we get to the PPUs we know for sure * 295 * whether there are any old MCUs around and will (or will * 296 * not) enable the PPU to do triple word transfers * 297 * accordingly. * 298 * Note that we use R7 as a flag to indicate whether * 299 * there are any MCUs on the system. (0 means all SMUs, 1 * 300 * means at least one MCU.) * 301 * * 302 ********************************************************************************** 303 304 * \ / 02077 60C40000 3 IMM 305 LD R3 0 slot loop counter 02078 61C40000 7 IMM 306 LD R7 0 assume all SMUs 00002079 307 NEXTMEM LABEL 02079 60260370 0 3 308 LD R0 IBSLOTS(R3) get this slots data word 0207A FA022088 0 309 JEQZ R0 NEXTONE jump if nobody home there 0207B 604A0040 1 0 CBM 310 LD R1 R0/WRU0TYPE fetch the type of the device 0207C 64440001 1 IMM 311 CPR R1 SLTTMEM is this a memory device? 0207D FE022084 312 JEQ DOMEM jump if so 0207E 64440004 1 IMM 313 CPR R1 SLTTSSU is it an SSU? 0207F FE0C2088 314 JNE NEXTONE jump if not 315 * \ / 316 317 * SSU in slot R3 02080 E4D78800 3 6 BASE 318 ST R3 SP,SLOTNUM save the slot number 02081 DC402172 319 CALLNP HAVESSU initialize our SSU 02082 60D78800 3 6 BASE 320 LD R3 SP,SLOTNUM get back the slot number 02083 FE0E2088 321 JMP NEXTONE move on 322 * --- 323 324 * MCU or SMU in slot R3 00002084 325 DOMEM LABEL 02084 E4D78800 3 6 BASE 326 ST R3 SP,SLOTNUM save the slot number 02085 DC402133 327 CALLNP HAVEMEMORY initialize our memory 02086 7DD20000 7 0 REG 328 IOR R7 R0 say if we are SMU or MCU 02087 60D78800 3 6 BASE 329 LD R3 SP,SLOTNUM get back the slot number 330 * \ / 331 00002088 332 NEXTONE LABEL 02088 18C40001 3 IMM 333 ADD R3 1 advance to next slot 02089 64C40010 3 IMM 334 CPR R3 NUMSLOTS see if we're done 0208A FE082079 335 JLT NEXTMEM jump if not, on to next device 336 * \ / 337 338 ********************************************************************************** 339 * * 340 * Scan the slot table and initialize PPUs and SSUs. We * 341 * also set the corresponding bit in INTDEVICES for any PPU or * 342 * SSU found since they may interrupt us. * 343 * * 344 ********************************************************************************** 345 0208B 60C40000 3 IMM 346 LD R3 0 loop slot counter 0000208C 347 NEXTDEVICE LABEL 0208C 60260370 0 3 348 LD R0 IBSLOTS(R3) get this slots data word 0208D FA02209B 0 349 JEQZ R0 EMPTYSLOTX jump if nobody home there 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 312 (INITIAL) F 21 Initialization Routine 0208E 604A0040 1 0 CBM 350 LD R1 R0/WRU0TYPE fetch the type of the device 0208F 60840000 2 IMM 351 LD R2 0 02090 E44A8030 1 2 CBM 352 ST R1 R2/SLOTTYPE make system table format 02091 64440002 1 IMM 353 CPR R1 SLTTCPU is this one a CPU? 02092 FE0C2094 354 JNE NOTACPU jump if not 02093 E40A8DA0 0 2 CBM 355 ST R0 R2/SLOTCPUI keep extra info about CPU 00002094 356 NOTACPU LABEL 02094 E4A61ECE 2 3 357 ST R2 SLOTTABLE(R3) place as what's in this slot 02095 64440003 1 IMM 358 CPR R1 SLTTPPU is it a PPU? 02096 FE0C209B 359 JNE EMPTYSLOTX jump if not 02097 E4D78800 3 6 BASE 360 ST R3 SP,SLOTNUM save the slot number 02098 6153C000 5 7 REG 361 LD R5 R7 let callee know if there are SMUs 02099 DC4021A4 362 CALLNP HAVEPPU call the initializer 0209A 60D78800 3 6 BASE 363 LD R3 SP,SLOTNUM get back the slot number 364 * \ / 365 0000209B 366 EMPTYSLOTX LABEL 0209B 18C40001 3 IMM 367 ADD R3 1 advance to next slot 0209C 64C40010 3 IMM 368 CPR R3 NUMSLOTS see if we're done 0209D FE08208C 369 JLT NEXTDEVICE jump if not, on to next device 0209E FE0E209F 370 JMP DONESLOTS jump when all slots initialized 371 * --- 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 313 (INITIAL) F 21 Initialization Routine 373 374 ********************************************************************************** 375 * * 376 * At this point we need enough whole pages in the * 377 * wholepage list until we go virtual. If we ever run out * 378 * during this initial processes I suggest that more pages be * 379 * given to the wholepage list. Note: be sure to adjust the * 380 * FSXCOUNT word appropriately. * 381 * Until now, the PPLs that have been created were hashed * 382 * into the PPUSDIDLE table, indexed by the slot number of the * 383 * corresponding MCU. We can now merge them into PPCLNIDLE to * 384 * produce a list that is evenly ordered with respect to MCU. * 385 * This results in a more distributed usage of MCUs. We assume * 386 * that we do not have to mess with the end-pointers in * 387 * PPENDIDLE. * 388 * The call to FREECHECK ensures that we have at least * 389 * (exactly?) one page in the WHOLEPAGE list. From there we * 390 * put one more page into the wholepage list. This should be * 391 * enough until we go virtual. * 392 * * 393 ********************************************************************************** 394 0000209F 395 DONESLOTS LABEL 0209F DC402396 396 CALLNP MERGEPPLS make one idle list from many 020A0 DC4023A6 397 CALLNP SPREADSYS distribute monitor pages to other MCUs 020A1 DC402387 398 CALLNP FREECHECK ensure presence of one page 020A2 DC402D1C 399 CALLNP GETIDLE request a free PPL 020A3 00026044 400 HALT HALTB6044 no pages for initial process 401 * No locks need be held since we are alone 020A4 60001C79 0 402 LD R0 WHOLEPAGE get the current head element 020A5 E4091F10 0 4 ZBM 403 ST R0 PPL,PPLINK link this additional page into the list 020A6 E5001C79 4 404 ST PPL WHOLEPAGE and make him the head cheese 405 * \ / 406 407 ********************************************************************************** 408 * * 409 * GETMEM has been setting the flags bit for free storage * 410 * expansion and decrementing the count word. At this point * 411 * we know there are at least two pages available in the * 412 * wholepage list. Here we want to set our equilibrium value * 413 * for the number of pages on the wholepage list. Since every * 414 * CPU could request a page and this could happen before * 415 * anyone reaches the dispatcher, we need at least one page * 416 * for every CPU. Here we calculate the number of pages needed * 417 * and alert the dispatcher. Good Luck!!! * 418 * * 419 ********************************************************************************** 420 421 * \ / 020A7 70001CF7 0 422 LDN R0 CPUCOUNT number of CPUs ( - ) 020A8 5007FFFE 0 IMM 423 MIN R0 -2 two pages is the minimum allocation 020A9 18040002 0 IMM 424 ADD R0 2 adjust for pages already there 020AA E4001C7A 0 425 ST R0 FSXCOUNT set equilibrium value (-) 020AB 60040004 0 IMM 426 LD R0 1*BIT FLFSX flag to start free storage routine 020AC FC001CF6 0 427 IORM R0 FLAGS let the dispatcher know 428 * \ / 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 314 (INITIAL) F 21 Initialization Routine 429 430 ********************************************************************************** 431 * * 432 * We need to initialize the tail pointers for the idle * 433 * page list. This is done here so we don't have to do any * 434 * fancy checking when PUTIDLE is first called. * 435 * * 436 ********************************************************************************** 437 438 * \ / 020AD 6044001F 1 IMM 439 LD R1 IDLETBSZ-1 size of the idle page table 000020AE 440 INITIDLE LABEL 020AE 38221DDD 0 1 441 LEA R0 PPUSDIDLE(R1) create the tail address 020AF E4221DFD 0 1 442 ST R0 PPENDIDLE(R1) set it where it needs to be 020B0 FA6620AE 1 443 JDR R1 INITIDLE jump until zero done 444 * \ / 445 446 ********************************************************************************** 447 * * 448 * We now build a TCB for the SSU. Port 0. * 449 * * 450 ********************************************************************************** 451 452 * \ / 020B1 DC002ED0 453 CALL SGETMEM get area for a TCB 020B2 40440005 IMM 454 PARVL (TCBLNTH LOG 2) indicate size 020B3 61120000 4 0 REG 455 LD R4 R0 R4 => TCB 020B4 DC003090 456 CALL ZEROIT make it clean 020B5 41170800 4 BASE 457 PAR R4,0 pass address and 020B6 4044001D IMM 458 PARVL TCBLNTH length 020B7 60440005 1 IMM 459 LD R1 TCBLNTH LOG 2 020B8 6097101D 2 4 REG 460 LD R2 R4+TCBLNTH 020B9 DC402328 461 CALLNP FREEAFTER give back the unused area after 020BA E5001EE1 4 462 ST R4 FPTCB save pointer to SSU tcb 020BB EC090890 4 ZBM 463 STZ R4,TCTNUM terminal number zero 020BC EDC91A10 4 ZBM 464 STW R4,TCRFP this is the front panel term 020BD 60040002 0 IMM 465 LD R0 TCINTSNORM 020BE E4090249 0 4 ZBM 466 ST R0 R4,TCINTSTATE the front panel is always normal 020BF 60001F04 0 467 LD R0 TERMBASE pick up existing list 020C0 E4091F10 0 4 ZBM 468 ST R0 R4,TCLINK link it behind us and 020C1 E5001F04 4 469 ST R4 TERMBASE put onto list of TCB's 470 * \ / 471 472 ********************************************************************************** 473 * * 474 * Memory and the system is now together enough to * 475 * operate with some interrupts. We herein initialize the * 476 * vectors. * 477 * * 478 ********************************************************************************** 479 480 * \ / 020C2 DC402336 481 CALLNP BUILDIVT set up the interrupt vectors 482 * \ / 483 484 ********************************************************************************** 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 315 (INITIAL) F 21 Initialization Routine 485 * * 486 * Physical page zero ( the prom boot page ) is also used * 487 * by power fail restart. The power up routine must be loaded * 488 * into the physical page. The power fail routine must be * 489 * able to restore all page file locations, so pointers to all * 490 * physical pages are saved on physical page zero. * 491 * The power up routine is moved in two pieces so that a * 492 * HALT for unable to restart is always present. * 493 * * 494 ********************************************************************************** 495 496 * \ / 020C3 600420F7 0 IMM 497 LD R0 ADR PFCODE(1) 020C4 6044004C 1 IMM 498 LD R1 (PFCODELEN-1)*CPW 020C5 60840001 2 IMM 499 LD R2 ADR PWRUPADDR(1) 020C6 FE400000 500 CMOVE 020C7 600020F6 0 501 LD R0 PFCODE move over the first word 020C8 E4000000 0 502 ST R0 PWRUPADDR 503 * \ / 504 505 ********************************************************************************** 506 * * 507 * This code is most definitely temporary. * 508 * Unfortunately, the current PROMBOOT does not initialize * 509 * parts of page 0. Until PROMBOOT changes this code must * 510 * remain lest the crashdump routine die in the middle and * 511 * other anomalies occur. * 512 * The current version of PROMBOOT is B2.1 8412. * 513 * * 514 ********************************************************************************** 515 516 * \ / 020C9 60840300 2 IMM 517 LD R2 0300 zap locations 300:310 020CA 60440040 1 IMM 518 LD R1 16*CPW 16 words worth 020CB FE580000 519 CFILL 000 fill with zeros 020CC 6084031A 2 IMM 520 LD R2 031A zap locations 31A:35F 020CD 60440114 1 IMM 521 LD R1 69*CPW 46 words worth 020CE FE580000 522 CFILL 000 fill with zeros 523 * \ / 524 525 ********************************************************************************** 526 * * 527 * The dispatcher needs to map in page zero from time to * 528 * time to update the page map table, so we save the page map * 529 * value for physical page zero. * 530 * * 531 ********************************************************************************** 532 533 * \ / 020CF EC00031E 534 STZ RELESEFLAG let other processors go 020D0 60C40080 3 IMM 535 LD PFPTR MONPF+0 point to bootstrap page 020D1 80920000 0 REG 536 PFRD R0 get the page zero PF value 020D2 E4000380 0 537 ST R0 PFMAP(0) save in the power fail page map 020D3 80D20000 0 REG 538 PFRC R0 zap page zero for now 539 * \ / 540 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 316 (INITIAL) F 21 Initialization Routine 541 ********************************************************************************** 542 * * 543 * Create a user limit block (ULB) for an account that * 544 * doesn't exist in the system (!!!!!!!!!!!!.!!!!!!) but that * 545 * is used by this initial routine, by assorted overhead * 546 * routines, and by PSAs when logging on or off users. * 547 * * 548 ********************************************************************************** 549 550 * \ / 020D4 DC002ED0 551 CALL SGETMEM allocate the ULB space 020D5 40440004 IMM 552 PARVL ULLOG indicate desired size 020D6 E4001EAE 0 553 ST R0 SYSTEMULB save pointer to same 020D7 DC003090 554 CALL ZEROIT clear it out 020D8 41160800 0 BASE 555 PAR R0,0 020D9 40440010 IMM 556 PARVL 2 POWER ULLOG 020DA 61001EAE 4 557 LD ULB SYSTEMULB 020DB 620023D2 01 558 LD2 R0 SYSACTNAM set system account name 020DC E6170802 014 BASE 559 ST2 R0 ULB,ULACCNM 020DD 600023D4 0 560 LD R0 SYSACTPROJ 020DE E4170804 0 4 BASE 561 ST R0 ULB,ULACCPROJ 562 * 020DF D1570808 4 BASE 563 STMW ULB,ULTIMLIM set no limits upon us 020E0 D157080A 4 BASE 564 STMW ULB,ULWLCKLIM 020E1 D149318C 4 ZBM 565 STMW ULB,ULDSKWARN 020E2 D149018C 4 ZBM 566 STMW ULB,ULDSKSAVL 020E3 D149218D 4 ZBM 567 STMW ULB,ULDSKLIM 020E4 60040800 0 IMM 568 LD R0 0800 020E5 E4170805 0 4 BASE 569 ST R0 ULB,ULBUSYWORD set it busy enough to not go away 020E6 EDC90081 4 ZBM 570 STW ULB,ULDRIVE say system disk is home 020E7 60040765 0 IMM 571 LD R0 ULIDVAL get the marker indicating ULB 020E8 E40908B0 0 4 ZBM 572 ST R0 ULB,ULIDENT say this is really a ULB 573 * \ / 574 575 ********************************************************************************** 576 * * 577 * Create a process to do the rest of the system * 578 * initialization. There should be at least one page * 579 * available since we call GETPAGE from within BLDPROCESS. * 580 * * 581 ********************************************************************************** 582 583 * \ / 020E9 DC0035D2 584 CALL BLDPROCESS build the process 020EA 4144F1F0 IMM 585 PARV MONMSR indicate monitor relocation 020EB 43440000 IMM 586 PARV2 0 name of process 020EC 4144B01B IMM 587 PARV ADR INITPROC PC of initial process 020ED 40440001 IMM 588 PARVL 1 indicate system process 589 * \ / 590 * R3 => PSA, PCB 591 592 ********************************************************************************** 593 * * 594 * Give our process enough privileges so it can do all * 595 * sorts of useful (and dangerous) things. ( Notice that * 596 * these fields are assumed zero when we arrive here which * 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 317 (INITIAL) F 21 Initialization Routine 597 * disables restrictions ) * 598 * * 599 ********************************************************************************** 600 601 * \ / 020EE 6088C116 2 3 ZBM 602 LD R2 R3,PSCURRPROC get pointer to UPC 020EF EDC8D214 3 ZBM 603 STW R3,PSCNTLMODE non virtual control mode semaphore 020F0 EDC88610 2 ZBM 604 STW R2,UPCNTLMODE in control mode 020F1 EC089210 2 ZBM 605 STZ R2,UPOPREQ operator functions OK too 020F2 EC088A20 2 ZBM 606 STZ R2,UPCPRIV/(UPMANAGRB+UPBACKUPB) manager and backup requests 607 * \ / 608 609 ********************************************************************************** 610 * * 611 * Set our process up to run and then let the other * 612 * processors in the system go. * 613 * * 614 ********************************************************************************** 615 616 * \ / 020F3 DC402B99 617 CALLNP SETRUNNING set the process runnable 020F4 DC4025FC 618 CALLNP MAPOUTMEM no one should be mapped in at this point 619 020F5 FE0E2885 620 JMP STARTUP clear page file and into the dispatcher 621 * --- 622 623 ********************************************************************************** 624 * * 625 * Power up code. This code is loaded over the PROMBOOT * 626 * code in memory page zero. It gains control in the power up * 627 * restart. * 628 * * 629 ********************************************************************************** 630 000020F6 631 PFCODE DRCT PWRUPADDR produce code that loads at 0 632 020F6 FE0E0003 633 JMP REALSTART jump over the identifier 634 * --- 635 020F7 50462043 636 TEXTZ "PF CODE" 637 638 ********************************************************************************** 639 * * 640 * The page file is full of self test results (garbage). * 641 * Make every user page (except ours) illegal to reference. * 642 * * 643 ********************************************************************************** 644 00000003 645 REALSTART LABEL 020F9 60C400FF 3 IMM 646 LD PFPTR PFSIZE-1 number of PF locations 647 00000004 648 CLEARLOOP LABEL 020FA 64C40080 3 IMM 649 CPR PFPTR PNPAGEZERO check for page that we're in 020FB FE020007 650 JEQ SKIPCLEAR skip self 020FC 80D28000 2 REG 651 PFRC R2 Read and clear PF location 00000007 652 SKIPCLEAR LABEL 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 318 (INITIAL) F 21 Initialization Routine 020FD FAE60004 3 653 JDR PFPTR CLEARLOOP repeat for all pages 654 * \ / 655 020FE 60C400FF 3 IMM 656 LD PFPTR MONPF+NPS-1 load address of last monitor page 00000009 657 LOADLOOP LABEL 020FF 64C40080 3 IMM 658 CPR PFPTR PNPAGEZERO we are done after arrival... 02100 FE0A000F 659 JLE LOADDONE ... at our own page 02101 60260300 0 3 660 LD R0 PFMAP(PFPTR-MONPF) get the map value 02102 FA02000E 0 661 JEQZ R0 LOADEND see if unloaded 02103 00D20000 0 REG 662 LDPF R0 otherwise, restore PF location 0000000E 663 LOADEND LABEL 02104 FAE60009 3 664 JDR PFPTR LOADLOOP do all monitor pages, 665 * --- stopped before fallout 666 0000000F 667 LOADDONE LABEL 668 * Now map in CPU page for this CPU 02105 D9124000 1 REG 669 STMSR R1 Fetch MSR to find who we are 02106 604A7840 1 1 CBM 670 LD R1 R1/MSRSLOT isolate our slot number 02107 60C40081 3 IMM 671 LD PFPTR PNCPUPAGE get CPU page number 02108 00E20360 1 672 LDPF CPUPT(R1) load up PF for individual CPU page 673 * \ / 674 02109 FE0E278F 675 JMP POWERUP now into the system to continue 676 * --- 677 678 DRCT don't forget to restore symbol defs 00000014 ABS 679 PFCODELEN EQU DISPW PFCODE 680 681 END JB1 INITIAL routine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 319 (INITIAL) F 21 Initialization Routine 683 684 ********************************************************************************** 685 * * 686 * SUCKERS - All of the other CPUs enter here. * 687 * This is the secondary entry point for the system * 688 * overlay. Basicly, these clods twiddle their bits until * 689 * it's time to run the system. They then load up their page * 690 * files and scratch off. * 691 * * 692 * Stack required = 3. * 693 * 0 + max ( BUILDIVT (3) ) * 694 * * 695 ********************************************************************************** 696 697 BLOCK SUCKERS routine 698 ENTRY SUCKERS 699 0000210A 700 SUCKERS LABEL 0210A D0001CF7 701 INC CPUCOUNT count number of CPUs 0210B D0001CFA 702 INC CPUINIT say another CPU on initial page 0210C BC001CF8 0 703 INCL R0 CPUCOUNT1 ...twice since we need two counts 704 * and this gives us an index 0210D D9130000 4 REG 705 STMSR R4 get a copy of our MSR 0210E 610B3840 4 4 CBM 706 LD R4 R4/MSRSLOT extract our slot number 0210F E5201CFA 4 0 707 ST R4 CPUSLOTS(R0-1) store CPU slot number into table using index 708 * \ / 709 710 ********************************************************************************** 711 * * 712 * Fetch a page for the CPUPAGE for this machine. We are * 713 * racing with the primary CPU and other secondary CPUs but * 714 * the INCLs are interlocked instructions. We make an entry * 715 * in CPUPT so that all CPUs end up knowing where the pages * 716 * are. * 717 * * 718 ********************************************************************************** 719 720 * \ / 02110 60C40081 3 IMM 721 LD PFPTR PNCPUPAGE load the virtual page number 02111 BC000311 0 722 INCL R0 PHPNAV get next available physical page 02112 00D20000 0 REG 723 LDPF R0 load up the page file 02113 E4280360 0 4 724 ST R0 CPUPT(R4) save page map value for other CPUs 02114 60441000 1 IMM 725 LD R1 CPP 02115 60840400 2 IMM 726 LD R2 ADR CPUPAGE 02116 FE580000 727 CFILL 0 clear out the CPU page 02117 E5000415 4 728 ST R4 OURSLOT save this CPUs slot number 02118 EC000462 729 STZ MEMERRFLAG indicate not processing memory error 02119 60002832 0 730 LD R0 STACKIDENT 0211A E400042D 0 731 ST R0 RESSTAKTOP set stack identifier 0211B 6184044D 6 IMM 732 LD SP ADR RESSTAK initialize stack pointer 733 * \ / 734 735 ********************************************************************************** 736 * * 737 * Unmap the windows that were left mapped by DISKBOOT. * 738 * * 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 320 (INITIAL) F 21 Initialization Routine 739 ********************************************************************************** 740 741 * \ / 0211C 60C40082 3 IMM 742 LD PFPTR PNWNDO1 unmap window1 0211D 80D20000 0 REG 743 PFRC R0 0211E 60C40083 3 IMM 744 LD PFPTR PNWNDO2 unmap window2 0211F 80D20000 0 REG 745 PFRC R0 02120 60C40084 3 IMM 746 LD PFPTR PNWNDO3 unmap window3 02121 80D20000 0 REG 747 PFRC R0 02122 60C40085 3 IMM 748 LD PFPTR PNWNDO4 unmap window4 02123 80D20000 0 REG 749 PFRC R0 750 * \ / 751 00002124 752 WAITRELESE LABEL 02124 5C00031E 753 CMZ RELESEFLAG check for OK to go 02125 FE0C2124 754 JNE WAITRELESE jump back if not 755 * \ / 756 757 ********************************************************************************** 758 * * 759 * Load up the page file with all of the permanently * 760 * resident pages. DISKBOOT has already loaded our page file * 761 * to map the pages that it loaded, however, the primary CPU * 762 * has mapped some more pages since then. So we do it all * 763 * again. * 764 * * 765 ********************************************************************************** 766 767 * \ / 02126 60C40087 3 IMM 768 LD PFPTR PNHEADPAGE load page number 00002127 769 MORELOAD LABEL 02127 64C40100 3 IMM 770 CPR PFPTR PFSIZE see if we've gone too far 02128 FE06212D 771 JGE PLOADED exit if so 02129 60A60300 2 3 772 LD R2 PFMAP(-MONPF)(PFPTR) load the map word 0212A FA82212C 2 773 JEQZ R2 NOLOAD jump if nothing here 0212B 00D28000 2 REG 774 LDPF R2 load up the page file 0000212C 775 NOLOAD LABEL 0212C FAE02127 3 776 IRJ PFPTR MORELOAD advance to next page, 777 * --- stopped by compare test 778 779 0000212D 780 PLOADED LABEL 781 * Now set up the interrupt vectors for each 782 * individual processor 783 0212D DC402336 784 CALLNP BUILDIVT set up the interrupt vectors 785 * get rid of the boot pages 0212E 60C40080 3 IMM 786 LD PFPTR MONPF+0 points to the prom boot page 0212F 80D20000 0 REG 787 PFRC R0 zap the page file entry 02130 60C40084 3 IMM 788 LD PFPTR PNBOOTLOC points to the disk boot page 02131 80D20000 0 REG 789 PFRC R0 zap the page file entry 790 791 02132 FE0E2885 792 JMP STARTUP off to see the wizard (we must be) 793 * --- 794 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 321 (INITIAL) F 21 Initialization Routine 795 END SUCKERS routine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 322 (INITIAL) F 21 Initialization Routine 797 798 ********************************************************************************** 799 * * 800 * HAVEMEMORY - Generate PPAGE Elements for a Memory * 801 * We scan through the slot table. Each memory is carved * 802 * up into pages and a PPL is generated for each page. As * 803 * this is going on, we are using up free memory like mad (for * 804 * the PPLs). In order not to die a horrible death (use up * 805 * more free storage than was provided by the freeing of the * 806 * CPUPAGEs), we check every time around the loop and keep * 807 * replenishing the supply of whole pages in the free storage * 808 * list. * 809 * Several pages are taken by the boot routine to read * 810 * the resident system into. The location PHPNAV has the PF * 811 * contents for the last such allocated page. If the memory * 812 * box being configured here is the memory that was booted * 813 * into (known by comparing against the slot number in the * 814 * PHPNAV), we do not generate PPL's for those pages up to and * 815 * including PHPNAV. Call: * 816 * * 817 * LD R0 * 818 * LD R3 * 819 * CALLNP HAVEMEMORY * 820 * R0 = 0 if this is SMU * 821 * * 822 * Eats R0:R5. * 823 * Stack required = 8 * 824 * 6 + max ( FREECHECK (2), GENPPL (2), MAYBESMU (2) ) * 825 * * 826 ********************************************************************************** 827 828 BLOCK HAVEMEMORY subroutine 829 ENTRY HAVEMEMORY 830 831 BEGFRAME 00178801 6 BASE 832 MEMMASK BSS 1 number of pages described by each bit 833 * of WRUMEMHERE, less one. 00178802 6 BASE 834 MEMBITS BSS 1 bits for memory addresses present, 835 * from WRUMEMHERE. 00178803 6 BASE 836 MEMPFILE BSS 1 running page file value. 00178804 6 BASE 837 LASTSYS BSS 1 lowest page in memory used by system, or -1 if none 00178805 6 BASE 838 SMUFLAG BSS 1 0 sez this is an SMU 839 ENDFRAME 840 02133 DD5F8006 6 STAK 841 HAVEMEMORY ENTRNP PUSH 02134 DC402161 842 CALLNP MAYBESMU see if SMU and build element if so 02135 E4578805 1 6 BASE 843 ST R1 SP,SMUFLAG save indication of SMU or not 02136 EC178803 6 BASE 844 STZ SP,MEMPFILE clean out page file 02137 D1578804 6 BASE 845 STMW SP,LASTSYS assume we didn't boot from this mem 02138 E4C98843 3 6 ZBM 846 ST R3 SP,MEMPFILE/PFSLOT save slot number in page file 02139 60400311 1 847 LD R1 PHPNAV last page used by boot routine 0213A 64CA4840 3 1 CBM 848 CPR R3 R1/PFSLOT did we use this memory? 0213B FE0C213E 849 JNE NOTBOOTMEM jump if not 0213C 78402000 1 850 AND R1 PFCLNMASK clean out garbage bits in page file 0213D E4578804 1 6 BASE 851 ST R1 SP,LASTSYS last used system page 0000213E 852 NOTBOOTMEM LABEL 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 323 (INITIAL) F 21 Initialization Routine 853 0213E 600A2040 0 0 CBM 854 LD R0 R0/WRUMEMINC description of size of blocks of mem 855 * (see WRUMEMINC description) 0213F 60440010 1 IMM 856 LD R1 16 00002140 857 MEMDOUBLE LABEL 02140 18524000 1 1 REG 858 ADD R1 R1 double piece size each time around 02141 FA262140 0 859 JDR R0 MEMDOUBLE 860 * \ / 861 * Now, R1 has the number of pages that are described by 862 * each bit of the memory's WRU4 response. 863 * \ / 02142 10440001 1 IMM 864 SUB R1 1 turn into mask of lower bits 02143 E4578801 1 6 BASE 865 ST R1 MEMMASK save it 02144 6012C000 0 3 REG 866 LD R0 R3 slot number 02145 1C040010 0 IMM 867 MUL R0 WRUIMAX index for array 02146 60200204 0 0 868 LD R0 WRUIPROTO/WRU4(R0) get WRU4 response 02147 F62C215F 0 869 JBT R0/WRUMEMNONE RETURN jump if no memory connected 02148 F22E214D 0 870 JBF R0/WRUMEMBAD SETUPBLOCK jump if memory is useable 871 * \ / 872 * This memory is not useable. Let's say so. 873 * \ / 02149 18C0214C 3 874 ADD R3 STOPINST build a stop instruction 0214A 5D52C000 3 REG 875 XCT R3 do it. 0214B FE0E215F 876 JMP RETURN if he wants to RUN, skip this MCU 877 * --- 878 0214C 00826000 879 STOPINST STOP STOPB600X memory cabled wrong to MCU 880 0000214D 881 SETUPBLOCK LABEL 0214D 600A3080 0 0 CBM 882 LD R0 R0/WRUMEMHERE get bits for addresses present 883 * \ / 884 * Each time through the following loop builds the PPL's for 885 * one contiguous chunk of memory (MEMMASK+1 pages). 886 * \ / 0000214E 887 BUILDBLOCK LABEL 0214E E4178802 0 6 BASE 888 ST R0 SP,MEMBITS save the bits 0214F F63E2154 0 889 JBT R0/BIT 31 BUILDPAGE jump if the memory is really here 890 * \ / 891 * Here, the block doesn't exist. Just increment the page number. 892 * \ / 02150 60178801 0 6 BASE 893 LD R0 SP,MEMMASK 02151 60161001 0 0 REG 894 LD R0 R0+1 number of pages per chunk 02152 98178803 0 6 BASE 895 ADDM R0 SP,MEMPFILE increment counter 02153 FE0E215D 896 JMP NEXTBLOCK 897 * --- 898 00002154 899 BUILDPAGE LABEL 02154 D0001CC8 900 INC TOTALPAGES say one more page exists 02155 61578803 5 6 BASE 901 LD R5 SP,MEMPFILE page file value for first page 02156 65578804 5 6 BASE 902 CPR R5 SP,LASTSYS page used by boot? 02157 FE0A215A 903 JLE NOREGENSYS if so, no PPL wanted 02158 DC40235E 904 CALLNP GENPPL build a PPL for it 02159 DC402387 905 CALLNP FREECHECK check for free storage availability 0000215A 906 NOREGENSYS LABEL 0215A BC178803 0 6 BASE 907 INCL R0 SP,MEMPFILE increment to next page 0215B 78178801 0 6 BASE 908 AND R0 SP,MEMMASK are we done with one block? 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 324 (INITIAL) F 21 Initialization Routine 0215C FA0C2154 0 909 JNEZ R0 BUILDPAGE jump if not 910 * \ / 0000215D 911 NEXTBLOCK LABEL 0215D 600981F2 0 6 ZBM 912 LD R0 SP,MEMBITS/BITS 0:30 remove bit for work done 0215E FA0C214E 0 913 JNEZ R0 BUILDBLOCK jump if more to do 914 * \ / 915 0000215F 916 RETURN LABEL 0215F 60178805 0 6 BASE 917 LD R0 SP,SMUFLAG return 0 if SMU, 1 if not 02160 5D1F8006 6 STAK 918 LEAVE POP all done 919 * --- 920 921 END HAVEMEMORY subroutine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 325 (INITIAL) F 21 Initialization Routine 923 924 ********************************************************************************** 925 * * 926 * Here we check to see if this memory unit is a SMU and * 927 * if so build an element for it and link it into the SMULIST. * 928 * Call: * 929 * * 930 * LD R0 * 931 * LD R3 * 932 * CALLNP MAYBESMU * 933 * R1 = 0 if SMU, 1 if not * 934 * * 935 * Eats R1. * 936 * Stack required = 2. * 937 * 2 + max (SGETMEM (0) ) * 938 * * 939 ********************************************************************************** 940 941 BLOCK MAYBESMU subroutine 942 ENTRY MAYBESMU 943 944 BEGFRAME 00178801 6 BASE 945 SAVER0 BSS 1 temp for R0 946 ENDFRAME 947 02161 DD5F8002 6 STAK 948 MAYBESMU ENTRNP PUSH 02162 604A1040 1 0 CBM 949 LD R1 R0/WRUMEMDEVT get memory device type bits 02163 64440001 1 IMM 950 CPR R1 WRU0SMUDEV is it a SMU? 02164 FE0C2170 951 JNE NOTSMU if not then leave 952 * \ / 953 02165 E4178801 0 6 BASE 954 ST R0 SP,SAVER0 save this register 02166 DC002ED0 955 CALL SGETMEM get a chunk for the element 02167 40440000 IMM 956 PARVL SMUBLKLOG how big of a piece to get 02168 EC160800 0 BASE 957 STZ R0,0 make it empty 02169 E4C80040 3 0 ZBM 958 ST R3 R0,SMUSLOT put in the slot number 0216A 60401EFE 1 959 LD R1 SMULIST get pointer to list 0216B E4481F10 1 0 ZBM 960 ST R1 R0,SMULINK link it to the new element 0216C E4001EFE 0 961 ST R0 SMULIST make ours the new list head 0216D 60178801 0 6 BASE 962 LD R0 SP,SAVER0 restore R0 0216E 60440000 1 IMM 963 LD R1 0 say we are an SMU 0216F 5D1F8002 6 STAK 964 LEAVE POP 965 * --- 966 00002170 967 NOTSMU LABEL 02170 60440001 1 IMM 968 LD R1 1 say we are an MCU 02171 5D1F8002 6 STAK 969 LEAVE POP 970 * --- 971 972 END of MAYBESMU subroutine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 326 (INITIAL) F 21 Initialization Routine 974 975 ********************************************************************************** 976 * * 977 * HAVESSU - Initialize the SSU. * 978 * The SSU was found in slot R3. Here we initialize it by * 979 * getting the information from the real time clock and the * 980 * front panel and then setting up the basic timer interrupts. * 981 * The initial process will verify the reasonableness of * 982 * the real time clock. Until then, we will use whatever * 983 * value is in the SSU clock without verification. The * 984 * interval timing will work fine no matter what value happens * 985 * to be in the clock. Call: * 986 * * 987 * LD R0 * 988 * LD R3 * 989 * CALLNP HAVESSU * 990 * * 991 * Eats R0:R5. * 992 * Stack required = 6. * 993 * 1 + max ( SSU_RESET (5), TIMESET (2) ) * 994 * * 995 ********************************************************************************** 996 997 BLOCK HAVESSU subroutine 998 ENTRY HAVESSU 999 1000 BEGFRAME 1001 ENDFRAME 1002 02172 DD5F8001 6 STAK 1003 HAVESSU ENTRNP PUSH 02173 EDF62001 3 @ 1004 STW @PTRINTDEV(R3) say this slot interrupts 02174 604A3080 1 0 CBM 1005 LD R1 R0/WRU0MREV SSU version number 02175 6444000D 1 IMM 1006 CPR R1 MINVERSION new enough for BREAK and DWELL handling? 02176 ECC01EE4 1007 STLGE SSUVER set flag 1008 * \ / 02177 60040005 0 IMM 1009 LD R0 SSUCOFFSET/FLDABSPG get displacement part 02178 E4CA0840 3 0 CBM 1010 ST R3 R0/PFSLOT make PF to get at SSU 02179 64000310 0 1011 CPR R0 SSUPF is this the same one as used by DISKBOOT? 0217A FE0C219C 1012 JNE NOTACTIVE jump if not, must be hot spare 1013 * (later, may have special processing for it) 0217B E4001EDE 0 1014 ST R0 CLOCKPF save for later use by system 0217C E4D0219D 3 @ 1015 ST R3 @PTRSSUCONT remember the SSU place 1016 * \ / 0217D 3800219E 0 1017 LEA R0 OCLKPARAMS old NVM clock parameter values 0217E 6444000F 1 IMM 1018 CPR R1 NVMVERSION check if SSU has new NVM 0217F FE082181 1019 JLT SETCLKPARMS jump if not 02180 380021A1 0 1020 LEA R0 NCLKPARAMS new NVM clock parameter values 00002181 1021 SETCLKPARMS LABEL 02181 6044000C 1 IMM 1022 LD R1 CLKPARMLEN*CPW need to set three words 02182 38801EF6 2 1023 LEA R2 NVMCLOCKS move values to the head page 02183 FE400000 1024 CMOVE that should do it 1025 * \ / 02184 DC4044C9 1026 CALLNP SSU_RESET call to initialize the SSU 1027 * \ / 02185 0CC00000 1028 IOFF for calls to TIMESET 02186 DC0044F8 1029 CALL TIMESET set up the one second events 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 327 (INITIAL) F 21 Initialization Routine 02187 434403E8 IMM 1030 PARV2 1*MSECSS one second events 02188 41440000 IMM 1031 PARV 0 any CPU okay 02189 4100472B 1032 PAR ONCEASEC address of routine to call 0218A 40440000 IMM 1033 PARVL 0 1034 * \ / 0218B DC0044F8 1035 CALL TIMESET set up deadman I/O timer 0218C 43442710 IMM 1036 PARV2 10*MSECSS use 10 second interval 0218D 41440000 IMM 1037 PARV 0 don't care which CPU 0218E 41004E5E 1038 PAR DEADMAN who to call 0218F 40440000 IMM 1039 PARVL 0 parameter unused 02190 E5001EF3 4 1040 ST TMR DEADMANTMR save serial number for power fail 1041 * \ / 02191 DC0044F8 1042 CALL TIMESET core scheduler interrupt 02192 434407D0 IMM 1043 PARV2 2*MSECSS two seconds for now 02193 41440000 IMM 1044 PARV 0 no CPU in particular 02194 41002C91 1045 PAR TICK 02195 40440000 IMM 1046 PARVL 0 1047 * \ / 02196 DC0044F8 1048 CALL TIMESET file wait unqueuer 02197 4344EA60 IMM 1049 PARV2 60*MSECSS once per minute 02198 41440000 IMM 1050 PARV 0 no CPU in particular 02199 4100474D 1051 PAR UNFILEWAIT who to call 0219A 40440000 IMM 1052 PARVL 0 parameter 1053 * \ / 0219B 0C800000 1054 ION restore interrupts 0000219C 1055 NOTACTIVE LABEL 0219C 5D1F8001 6 STAK 1056 LEAVE POP then return 1057 * --- 1058 0219D E1080312 1059 PTRSSUCONT PTR INTDEVICES/BITS 28:31 SSU location 1060 0000219E 1061 OCLKPARAMS LABEL 0219E 00000050 1062 VFD ONVMCLOCKS base address for start of clock values 0219F 00000004 1063 VFD 04 number of clock values (must be power of two) 021A0 00000003 1064 VFD 03 mask used to wrap around clock value index 00000003 ABS 1065 CLKPARMLEN EQU DISPW OCLKPARAMS 1066 000021A1 1067 NCLKPARAMS LABEL 021A1 00000300 1068 VFD NNVMCLOCKS base address for start of clock values 021A2 00000040 1069 VFD 040 number of clock values (must be power of two) 021A3 0000003F 1070 VFD 03F mask used to wrap around clock value index 1071 1072 END HAVESSU subroutine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 328 (INITIAL) F 21 Initialization Routine 1074 1075 ********************************************************************************** 1076 * * 1077 * HAVEPPU - Configure a PPU * 1078 * A PPU is on the bus. We create the control element * 1079 * for it that contains the PF pointer to the PPU and then * 1080 * check out and configure the devices that are on the * 1081 * channels. * 1082 * Call: * 1083 * LD R0 WRU response * 1084 * LD R3 slot number * 1085 * R5 = 0 if no MCUs on system * 1086 * CALLNP HAVEPPU * 1087 * * 1088 * Eats R0:R5. * 1089 * Stack required = 19. * 1090 * 2 + max ( COMMDEV (9), CTCDEV (17), DISKDEV (12), * 1091 * FREECHECK (2), LPCDEV (11), MTCDEV (17), * 1092 * SETPPU3WRD (1), SGETMEM (0), VTCDEV (17), * 1093 * ZEROIT (1) ) * 1094 * * 1095 ********************************************************************************** 1096 1097 BLOCK HAVEPPU subroutine 1098 ENTRY HAVEPPU 1099 1100 BEGFRAME 00178801 6 BASE 1101 TEMPWRU0 BSS 1 temp place for WRU0 00178801 6 BASE 1102 PPUELEMENT EQU TEMPWRU0 holds PPU element address 1103 ENDFRAME 1104 021A4 DD5F8002 6 STAK 1105 HAVEPPU ENTRNP PUSH 021A5 EDF62001 3 @ 1106 STW @PTRINTDEV(R3) say this slot interrupts 021A6 E4178801 0 6 BASE 1107 ST R0 SP,TEMPWRU0 save the WRU0 response for later 1108 * R3=slot number 021A7 DC002ED0 1109 CALL SGETMEM get the control block 021A8 40440003 IMM 1110 PARVL PPULOG indicate desired size 021A9 61120000 4 0 REG 1111 LD R4 R0 R4 => PPU control block 021AA DC003090 1112 CALL ZEROIT clean it out 021AB 41170800 4 BASE 1113 PAR R4,0 021AC 40440008 IMM 1114 PARVL 2 POWER PPULOG 021AD 604AF000 1 3 CBM 1115 LD R1 R3*PFSLOT produce page map value from slot # 021AE E4570800 1 4 BASE 1116 ST R1 R4,PPUPF remember addressing PF 021AF 7D02C000 4 IMM 1117 IOR R4 SLTTPPU*SLOTTYPE 021B0 E5261ECE 4 3 1118 ST R4 SLOTTABLE(R3) place block in slot table 1119 * \ / 1120 1121 ********************************************************************************** 1122 * * 1123 * Due to ever improving hardware and a certain lack of * 1124 * compatibilty between some of the new features and the old * 1125 * hardware we are forced to keep close track of what versions * 1126 * of various hardware types are on the system and enable * 1127 * certain capabilities accordingly. * 1128 * In particular, if it has been determined that all * 1129 * memory modules on the system are SMUs then we may enable * 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 329 (INITIAL) F 21 Initialization Routine 1130 * new versions of PPUs to perform triple word transfers. * 1131 * Note that if we were to enable all PPUs, regardless of * 1132 * rev, old PPUs would bus error as we would be doing a store * 1133 * to a non-defined location on the PPU. Similarly if we were * 1134 * to enable all new PPUs, regardless of types of memory, the * 1135 * MCUs would bus error as they are not designed to handle * 1136 * triple word transfers. * 1137 * To add to the complexity, the microcode revisions * 1138 * leapfrog, with varying revisions being for PPU3 or PPU4, as * 1139 * needed. The test is done using a bit map for the * 1140 * revisions, so it can be patched if needed. * 1141 * * 1142 ********************************************************************************** 1143 1144 * R5 = 0 if no MCUs on system 1145 * \ / 021B1 FB4C21B8 5 1146 JNEZ R5 NOTRIPLES if not zero then there are MCUs 021B2 6009B081 0 6 ZBM 1147 LD R0 SP,TEMPWRU0/WRU0MREV get microcode revision 021B3 5C3021D4 0 @ 1148 CMZ @PPUREV3MP(R0) is it new enough for 3 word transfers? 021B4 FE0221B8 1149 JEQ NOTRIPLES no triples for this PPU 1150 * \ / 1151 021B5 7905FFFF 4 IMM 1152 AND R4 ONEBITS/FLDADRS get rid of unnecessary crap 021B6 EDD70803 4 BASE 1153 STW R4,PPU3WORD set flag saying we can do triple worders 021B7 DC404F0B 1154 CALLNP SETPPU3WRD now enable this PPU to do triplers 1155 * \ / 000021B8 1156 NOTRIPLES LABEL 021B8 61440000 5 IMM 1157 LD R5 0 start with channel zero 021B9 E5178801 4 6 BASE 1158 ST R4 SP,PPUELEMENT save address 1159 * \ / 1160 1161 ********************************************************************************** 1162 * * 1163 * Loop through all of the channels and initialize the * 1164 * devices there. * 1165 * * 1166 ********************************************************************************** 1167 1168 * \ / 000021BA 1169 CHANGETI LABEL 021BA DC402387 1170 CALLNP FREECHECK ensure enough memory available 021BB 61178801 4 6 BASE 1171 LD R4 SP,PPUELEMENT restore address 021BC 60C40086 3 IMM 1172 LD PFPTR PNCIX page file for IO 021BD 60170800 0 4 BASE 1173 LD R0 R4,PPUPF 021BE 7C0B4C00 0 5 CBM 1174 IOR R0 R5*PPUCHAN create the PF value to address the device 021BF 00D20000 0 REG 1175 LDPF R0 set addressing to the channel 021C0 EC001801 1176 STZ CIX(PPUABORT) zap any foolishness 021C1 FEC00000 1177 NOP 0 waste time for PPU 021C2 D1401803 1178 STMW CIX(PPUSCSTAT) clear any status bits we can 021C3 FEC00000 1179 NOP 0 waste time for PPU 021C4 60001800 0 1180 LD R0 CIX(PPUCABLED) get WRU of who's there (0 if none) 021C5 E41D2804 0 45 BASE 1181 ST R0 R4,PPUCNTLPTR(R5) save for later processing 021C6 604A0080 1 0 CBM 1182 LD R1 R0/DWRUTYPE get the type of device 021C7 6844000C 1 IMM 1183 UCPR R1 DEVJMPMAX within range? 021C8 FE0621CD 1184 JGE FORGETDEV jump if not 021C9 606221D5 1 1 1185 LD R1 DEVJMPTAB(R1) R1 -> device initializer 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 330 (INITIAL) F 21 Initialization Routine 021CA FA7021CD 1 1186 JZA R1 FORGETDEV jump if unknown device 021CB DC564400 1 @R 1187 CALLNP @R1 call the initializer 021CC FE0E21CF 1188 JMP AFTERDEV 1189 * --- 1190 000021CD 1191 FORGETDEV LABEL 021CD 60440000 1 IMM 1192 LD R1 0 unknown so forget about it 021CE EC1D2804 45 BASE 1193 STZ R4,PPUCNTLPTR(R5) 1194 * \ / 000021CF 1195 AFTERDEV LABEL 021CF 19440001 5 IMM 1196 ADD R5 1 advance to next channel 021D0 65440004 5 IMM 1197 CPR R5 PPUCHANS check for done 021D1 FE0821BA 1198 JLT CHANGETI jump if another channel 021D2 5D1F8002 6 STAK 1199 LEAVE POP else return 1200 * --- 1201 021D3 00000AAA 1202 PPUREV3MSK VFD 00000AAA mask of PPU revs that can handle triple word transfers 021D4 004821D3 1203 PPUREV3MP PTR PPUREV3MSK/BIT 0 pointer to mask word 1204 1205 ********************************************************************************** 1206 * * 1207 * Device initialization routines are entered with: * 1208 * R4 => PPU control element * 1209 * R5 = channel number * 1210 * R6 => stack * 1211 * These registers must be restored by the controller * 1212 * configuration routines. They should exit to CNTLCNFIG. * 1213 * * 1214 ********************************************************************************** 1215 000021D5 1216 DEVJMPTAB LABEL 021D5 00000000 1217 VFD 0 00 - empty slot 021D6 000021E1 1218 VFD ADR DISKDEV 01 - disk controller 021D7 00002282 1219 VFD ADR LPCDEV 02 - line printer controller 021D8 00000000 1220 VFD 0 03 - unknown 021D9 00000000 1221 VFD 0 04 - unknown 021DA 00000000 1222 VFD 0 05 - unknown 021DB 00000000 1223 VFD 0 06 - unknown 021DC 00000000 1224 VFD 0 07 - unknown 021DD 00002217 1225 VFD ADR COMMDEV 08 - async. comm. controller 021DE 000022B3 1226 VFD ADR MTCDEV 09 - mag tape controller 021DF 0000229D 1227 VFD ADR CTCDEV 0A - cartridge mag tape controller 021E0 000022CA 1228 VFD ADR VTCDEV 0B - video tape controller 0000000C ABS 1229 DEVJMPMAX EQU DISPW DEVJMPTAB 1230 1231 END HAVEPPU subroutine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 331 (INITIAL) F 21 Initialization Routine 1233 1234 ********************************************************************************** 1235 * * 1236 * DISKDEV - Initialization for a Mass Storage Controller. * 1237 * First, create a controller element. Call MS_RESET to * 1238 * build drive elements, we create a VOLN entry for the system * 1239 * volume using the information passed by DISKBOOT. * 1240 * Call: * 1241 * LD R4 => PPU control element * 1242 * LD R5 channel number * 1243 * CALLNP DISKDEV * 1244 * * 1245 * Eats R0:R3. * 1246 * Stack required = 12. * 1247 * 4 + max ( LOCKWAIT (0), MS_RESET (8), SGETMEM (0), * 1248 * ZEROIT (1) ) * 1249 * * 1250 ********************************************************************************** 1251 1252 BLOCK DISKDEV subroutine 1253 ENTRY DISKDEV 1254 1255 BEGFRAME 00178801 6 BASE 1256 SAVER7 BSS 1 save area for R7 00178802 6 BASE 1257 SAVER45 BSS 2 save area for R4,R5 1258 ENDFRAME 1259 021E1 DD5F8004 6 STAK 1260 DISKDEV ENTRNP PUSH 021E2 E5D78801 7 6 BASE 1261 ST R7 SP,SAVER7 save this register 021E3 DC002ED0 1262 CALL SGETMEM fetch memory for a controller element 021E4 40440004 IMM 1263 PARVL MCTLOG indicate its length 021E5 61D20000 7 0 REG 1264 LD MCT R0 copy the pointer 021E6 7C020200 0 IMM 1265 IOR R0 DVCTBFD*DEVTYPE insert device type 021E7 E41D2804 0 45 BASE 1266 ST R0 R4,PPUCNTLPTR(R5) place type and block addr into PPU table 021E8 DC003090 1267 CALL ZEROIT clear out the element 021E9 41160800 0 BASE 1268 PAR R0,0 indicate its address 021EA 4044000D IMM 1269 PARVL MCTLNTH and the length to clear 021EB 60170800 0 4 BASE 1270 LD R0 R4,PPUPF get the PPU page map value 021EC 7C0B4C00 0 5 CBM 1271 IOR R0 R5*PPUCHAN get this channel number 021ED E417C801 0 7 BASE 1272 ST R0 MCT,MCTPMVALUE set up access address 021EE 60001F13 0 1273 LD R0 MCTLIST get ptr to current list 021EF E417C800 0 7 BASE 1274 ST R0 MCT,MCTLINK place current list after us 021F0 E5C01F13 7 1275 ST MCT MCTLIST this element is new list head 021F1 E7178802 456 BASE 1276 ST2 R4 SP,SAVER45 save these registers 1277 1278 PLOCK (MCT,MCTELOCK) lock the controller 021F2 0CC00000 1278 IOFF 021F3 D1D7C803 7 BASE 1278 SETT (MCT,MCTELOCK) 021F4 FE0C21F6 1278 JNE MA(2+DISPW MA 0) 021F5 DC40308B 1278 CALLNP LOCKWAIT 021F6 60040001 0 IMM 1279 LD R0 1 PPU is talking 021F7 6153C000 5 7 REG 1280 LD R5 MCT parm for MS_RESET 021F8 DC4039A9 1281 CALLNP MS_RESET reset the controller 021F9 FEC00000 1282 NOP 0 (ignore no skip return) 1283 PUNLOCK (MCT,MCTELOCK) unlock the controller 021FA EC17C803 7 BASE 1283 STZ (MCT,MCTELOCK) 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 332 (INITIAL) F 21 Initialization Routine 021FB 0C800000 1283 ION 1284 021FC 6017C801 0 7 BASE 1285 LD R0 MCT,MCTPMVALUE 021FD 64000316 0 1286 CPR R0 BOOTDEVPF is this our boot controller? 021FE FE0C2214 1287 JNE DISKDONE jump if not 1288 1289 * set up a drive control element for the system disk 021FF 60000317 0 1290 LD R0 BOOTUNIT get unit number of sys disk 02200 615DC005 5 70 BASE 1291 LD MDV MCT,MCTDRIVE(R0) get MDV of system disk 1292 02201 60000318 0 1293 LD R0 BOOTSCPTRK get number of sectors on each track 02202 E417400B 0 5 CACH 1294 ST R0 MDV,MDVSECPTRK set sectors per track 02203 60000319 0 1295 LD R0 BOOTRKPCYL get tracks (heads) per cylinder 02204 E417400A 0 5 CACH 1296 ST R0 MDV,MDVTRKPCYL set tracks per cylinder 02205 EDC94080 5 ZBM 1297 STW MDV,MDVVOLUME fake like the system volume is here 02206 DC002ED0 1298 CALL SGETMEM get a VOLN for the system volume 02207 40440007 IMM 1299 PARVL VOLNLOG indicate desired size 02208 61120000 4 0 REG 1300 LD VLN R0 save pointer to it 02209 E5001F23 4 1301 ST VLN VOLNTABLE(1) put into table as volume 1 0220A DC003090 1302 CALL ZEROIT clean it out 0220B 41170800 4 BASE 1303 PAR VLN,0 0220C 40440080 IMM 1304 PARVL VOLNLEN 0220D EDC90A10 4 ZBM 1305 STW VLN,VOLNMOUNT say mounting in progress 0220E EDC90010 4 ZBM 1306 STW VLN,VOLNSYS say is system volume 0220F EDD7080C 4 BASE 1307 STW VLN,VOLNFBZY lock the lists 02210 EDD70811 4 BASE 1308 STW VLN,VOLNNAME impossible name 02211 EDC90086 4 ZBM 1309 STW VLN,VOLNNUM volume number 02212 EDC90087 4 ZBM 1310 STW VLN,VOLNSNUM second occurrence of number 02213 E5491F15 5 4 ZBM 1311 ST MDV VLN,VOLNHCB pointer to associated MDV 1312 * \ / 00002214 1313 DISKDONE LABEL 02214 63178802 456 BASE 1314 LD2 R4 SP,SAVER45 restore these registers 02215 61D78801 7 6 BASE 1315 LD R7 SP,SAVER7 restore this register 02216 5D1F8004 6 STAK 1316 LEAVE POP and return 1317 * --- 1318 1319 END DISKDEV subroutine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 333 (INITIAL) F 21 Initialization Routine 1321 1322 ********************************************************************************** 1323 * * 1324 * COMMDEV - Initialization for an ACC. * 1325 * Async. Comm. Controller. This code sets up the * 1326 * resident tables for this controller and initializes the * 1327 * device. This involves setting up the controller element, * 1328 * fetching the permanent input and output buffers, and * 1329 * building a TCB for each port present on this CIA. The port * 1330 * numbers are assigned based on physical location so that * 1331 * addition or deletion of a port board does not require * 1332 * reconfiguration. * 1333 * We do the I/O initialization. * 1334 * The tables involved here are: * 1335 * 1) PPU control table. Gets a pointer to the CIA * 1336 * controller element * 1337 * 2) CIA controller element. Describes this CIA. * 1338 * Contains pointers to each block of 8 TCBs. * 1339 * 3) TCBs. TCBs are allocated in blocks of 8. There * 1340 * is one TCB for each port on the CIA. * 1341 * * 1342 * LD R4 => PPU control element * 1343 * LD R5 channel number * 1344 * CALLNP COMMDEV * 1345 * * 1346 * Eats R0:R3. * 1347 * Stack required = 9. * 1348 * 7 + max ( FREEAFTER (2), FREECHECK (2), SGETMEM (0), * 1349 * ZEROIT (1) ) * 1350 * * 1351 ********************************************************************************** 1352 1353 BLOCK COMMDEV subroutine 1354 ENTRY COMMDEV 1355 1356 BEGFRAME 00178801 6 BASE 1357 SAVER45 BSS 2 save area for R4,R5 00178803 6 BASE 1358 COMSTKBLK BSS 1 => control block 00178804 6 BASE 1359 COMSTKBITS BSS 1 bits for boards from CIA 00178805 6 BASE 1360 COMSTKTRM BSS 1 terminal number 00178806 6 BASE 1361 COMBRDBLK BSS 1 => block for boards TCBs 1362 ENDFRAME 1363 02217 DD5F8007 6 STAK 1364 COMMDEV ENTRNP PUSH 02218 E7178801 456 BASE 1365 ST2 R4 SP,SAVER45 save these registers 02219 60D20000 3 0 REG 1366 LD R3 R0 save the WRU response 0221A DC002ED0 1367 CALL SGETMEM get the comm controller block 0221B 40440005 IMM 1368 PARVL COMLOG indicate desired size 0221C E4178803 0 6 BASE 1369 ST R0 SP,COMSTKBLK remember the control block location 0221D 60920000 2 0 REG 1370 LD R2 R0 copy the pointer 0221E DC003090 1371 CALL ZEROIT clear out the element 0221F 41168800 2 BASE 1372 PAR R2,0 pass the address... 02220 40440020 IMM 1373 PARVL 2 POWER COMLOG ... and length 02221 E4D68801 3 2 BASE 1374 ST R3 R2,COMWRU save the WRU response 02222 60C40086 3 IMM 1375 LD PFPTR PNCIX get page number for PFRD 02223 80968802 2 BASE 1376 PFRD R2,COMPF place page map value into control element 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 334 (INITIAL) F 21 Initialization Routine 02224 60D28000 3 2 REG 1377 LD R3 R2 copy control block pointer 02225 7C821000 2 IMM 1378 IOR R2 DVCTCOMM*DEVTYPE combine address with type 02226 E49D2804 2 45 BASE 1379 ST R2 R4,PPUCNTLPTR(R5) type and block into PPU table 02227 60001F01 0 1380 LD R0 COMLIST get head of COM list 02228 E4168800 0 2 BASE 1381 ST R0 R2,COMLINK link existing list behind us 02229 E4801F01 2 1382 ST R2 COMLIST put us on head of list 1383 * \ / 0222A 60040000 0 IMM 1384 LD R0 CIAMODEN set the CIA to "normal" operation mode 0222B E4001A09 0 1385 ST R0 CIX(CIAMODE) 0222C EC001A02 1386 STZ CIX(CIAINTMASK) clear interrupt mask for now 0222D D1401A01 1387 STMW CIX(CIAINTACK) acknowledge any prior interrupts so we get new ones 0222E 6004002D 0 IMM 1388 LD R0 CIATICKTIME interrupt approx every 20th of sec 0222F E4001A06 0 1389 ST R0 CIX(CIASETTICK) 02230 60040000 0 IMM 1390 LD R0 COMSTIDLE get idle state value... 02231 E408F085 0 3 ZBM 1391 ST R0 R3,COMSTATE ... and set as initial state 1392 * \ / 1393 1394 ********************************************************************************** 1395 * * 1396 * Allocate buffers for this CIA * 1397 * The input and output buffers are held permanently by * 1398 * this CIA after being allocated here. We allocate 512 words * 1399 * for output and 128 words for input. * 1400 * * 1401 ********************************************************************************** 1402 1403 * \ / 02232 DC402387 1404 CALLNP FREECHECK ensure adequate free memory 02233 60D78803 3 6 BASE 1405 LD R3 SP,COMSTKBLK get pointer to CIA control block 02234 DC002ED0 1406 CALL SGETMEM get an output buffer 02235 40440009 IMM 1407 PARVL 512 LOG 2 02236 E416C808 0 3 BASE 1408 ST R0 R3,COMOUTBUF 02237 600407F8 0 IMM 1409 LD R0 512*CPW-8 size of output buffer minus fudge 02238 E416C809 0 3 BASE 1410 ST R0 R3,COMOUTBUFS 02239 DC002ED0 1411 CALL SGETMEM get an input buffer 1412 * PARVL 128 LOG 2 specify its length 0223A 40440008 IMM 1413 PARVL 256 LOG 2 (allow for CIA microcode bug) 0223B E416C806 0 3 BASE 1414 ST R0 R3,COMINBUF place addr of input buffer 1415 * LD R0 128*CPW get character size of input buffer 0223C 60040400 0 IMM 1416 LD R0 256*CPW (allow for CIA microcode bug) 0223D E416C807 0 3 BASE 1417 ST R0 R3,COMINBUFS size of input buffer in chars 0223E DC402387 1418 CALLNP FREECHECK ensure adequate free memory 1419 * \ / 1420 1421 ********************************************************************************** 1422 * * 1423 * Allocate TCBs * 1424 * The CIA can have only multiples of 8 ports, since it * 1425 * can only have whole port boards. Therefore, we scan the * 1426 * CIA and for each port board proceed to build the necessary * 1427 * TCBs. Since the TCBs are an odd size, we fetch a block of * 1428 * free storage big enough for 8, then free the excess. This * 1429 * cuts down on the amount of free storage lost to internal * 1430 * fragmentation. * 1431 * Each board causes an entry in the CIA control block. * 1432 * We later use these entries to enable a quick lookup for a * 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 335 (INITIAL) F 21 Initialization Routine 1433 * given ports TCB. We also rely on all TCBs on a board being * 1434 * sequential from the base entry for that board. i.e. there * 1435 * is no searching for a given ports TCB, the address * 1436 * calculation is a lookup and multiply. * 1437 * * 1438 ********************************************************************************** 1439 1440 * \ / 0223F 60D78803 3 6 BASE 1441 LD R3 SP,COMSTKBLK get pointer to CIA control block 02240 6008E081 0 3 ZBM 1442 LD R0 R3,COMWRU/DWRUDD get the configuration info 02241 E4178804 0 6 BASE 1443 ST R0 SP,COMSTKBITS save mask of boards present 02242 61440000 5 IMM 1444 LD R5 0 root of the list is null 1445 * R5 contains the running pointer to 1446 * the already built list of TCBs. 1447 1448 * Find and configure the block for one board 00002243 1449 NEXTBOARD LABEL 02243 5C578804 6 BASE 1450 HIB SP,COMSTKBITS find next board bit 02244 F6342271 0 1451 JBT R0/BIT 26 ALLPORTSC jump if all boards done 02245 38498014 1 6 ZBM 1452 LEA R1 SP,COMSTKBITS/BIT 0 get bit pointer 02246 EC1A4400 10 @R 1453 STZ @R1(R0) clear bit just processed 02247 3004001F 0 IMM 1454 RSB R0 31 convert to board number 02248 60D78803 3 6 BASE 1455 LD R3 SP,COMSTKBLK get control block addr 02249 38DCC00C 3 30 BASE 1456 LEA R3 R3,COMTERMS(R0) => to place for these TCBs 0224A 1C040008 0 IMM 1457 MUL R0 CIABOARDS R0=first port number 0224B 18001F03 0 1458 ADD R0 TERMNUM R0 now equals real first term num 0224C E4178805 0 6 BASE 1459 ST R0 SP,COMSTKTRM save terminal number 0224D DC002ED0 1460 CALL SGETMEM get a block to hold the TCBs 0224E 40440008 IMM 1461 PARVL (TCBLNTH*CIAPPBRD) LOG 2 specify length sufficient... 1462 * ...for all ports on one board 0224F 61120000 4 0 REG 1463 LD R4 R0 make R4 point to the TCBs 02250 E5178806 4 6 BASE 1464 ST R4 SP,COMBRDBLK save addr 02251 E516C400 4 3 @R 1465 ST R4 @R3 store address in device control table 02252 DC003090 1466 CALL ZEROIT make it clean 02253 41170800 4 BASE 1467 PAR R4,0 pass address 02254 404400E8 IMM 1468 PARVL TCBLNTH*CIAPPBRD ... and amount to clear 02255 60440008 1 IMM 1469 LD R1 (TCBLNTH*CIAPPBRD) LOG 2 log size of original block for FREEAFTER 02256 389708E8 2 4 BASE 1470 LEA R2 R4,(TCBLNTH*CIABOARDS) R2=first unused address 02257 DC402328 1471 CALLNP FREEAFTER let others use unused part of block 02258 DC402387 1472 CALLNP FREECHECK check available free 1473 * \ / 1474 1475 ********************************************************************************** 1476 * * 1477 * Loop to build TCBs for each of the 8 ports on this * 1478 * board. We build these 8 TCBs in sequential locations in * 1479 * this block of memory. * 1480 * * 1481 ********************************************************************************** 1482 1483 * \ / 02259 61178806 4 6 BASE 1484 LD R4 SP,COMBRDBLK R4 => top of block 1485 * Configure one port TCB 0000225A 1486 NEXTPORT LABEL 0225A 60978805 2 6 BASE 1487 LD R2 SP,COMSTKTRM get the port number 0225B E4890890 2 4 ZBM 1488 ST R2 R4,TCTNUM set the port into the TCB 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 336 (INITIAL) F 21 Initialization Routine 0225C 6017101D 0 4 REG 1489 LD R0 R4+TCBLNTH make pointer to next TCB in this block 0225D E4091F10 0 4 ZBM 1490 ST R0 R4,TCLINK point this block at it 0225E 10801F03 2 1491 SUB R2 TERMNUM R2=port on this controller 0225F 60578803 1 6 BASE 1492 LD R1 SP,COMSTKBLK pick up control block pointer 02260 E4491F16 1 4 ZBM 1493 ST R1 R4,TCCIABLOCK save control block pointer in TCB 02261 E497000F 2 4 CACH 1494 ST R2 R4,TCCIAPORT store the port number 02262 60241A80 0 2 1495 LD R0 CIX(CIAPORT+R2) get state information 02263 5C0A3E10 0 CBM 1496 CMZ R0/CIAPMODM is this to be configured for modem control? 02264 ED890019 4 ZBM 1497 STLNE R4,TCMODEM remember if modem configuration 02265 6004012C 0 IMM 1498 LD R0 300 default baud rates 02266 E40900F1 0 4 ZBM 1499 ST R0 R4,TCIRATE set input baud rate 02267 E4091EF1 0 4 ZBM 1500 ST R0 R4,TCORATE also set output baud rate 02268 BC178805 0 6 BASE 1501 INCL R0 SP,COMSTKTRM count up the port number 02269 10001F03 0 1502 SUB R0 TERMNUM 0226A 78040007 0 IMM 1503 AND R0 CIAPPBRD-1 check for the next power of two 0226B FA02226E 0 1504 JEQZ R0 BRDDONE jump if all boards done 0226C 1904001D 4 IMM 1505 ADD R4 TCBLNTH move pointer to next TCB 0226D FE0E225A 1506 JMP NEXTPORT 1507 * --- 1508 1509 ********************************************************************************** 1510 * * 1511 * The board is configured, link in the 8 TCBs for this * 1512 * one and move to next. * 1513 * R5 points to the previous block of 8 TCBs, * 1514 * R4 points to the most recent TCB made. * 1515 * * 1516 ********************************************************************************** 1517 0000226E 1518 BRDDONE LABEL 0226E E5491F10 5 4 ZBM 1519 ST R5 R4,TCLINK link previous list behind current TCB 0226F E51750CB 4 5 REG 1520 ST R4 R5+((CIABOARDS-1)*TCBLNTH) set R5 to point to this block of 8 TCBs 02270 FE0E2243 1521 JMP NEXTBOARD do the next one 1522 * --- 1523 1524 * All ports configured for this controller. Enable the comm 1525 * to interrupt after placing the built tables in the terminal lists. 1526 * We arrive here with R5 pointing to the last block 1527 * of 8 TCBs. 1528 00002271 1529 ALLPORTSC LABEL 02271 FB70227E 5 1530 JZA R5 NOPORTSC nothing there - odd but possible 02272 60040000 0 IMM 1531 LD R0 0 02273 60534000 1 5 REG 1532 LD R1 R5 copy pointer to our list 02274 3C085F10 0 1 ZBM 1533 LSRCH R0 R1,TCLINK find the end of our list 02275 60001F04 0 1534 LD R0 TERMBASE pick up head of existing list 02276 E4085F10 0 1 ZBM 1535 ST R0 R1,TCLINK link the existing list after our end 02277 E5401F04 5 1536 ST R5 TERMBASE and make our list the new head 02278 60178803 0 6 BASE 1537 LD R0 SP,COMSTKBLK get pointer to comm block 02279 E556080B 5 0 BASE 1538 ST R5 R0,COMFRSTTRM keep pointer to the first one 1539 * \ / 0227A 60040013 0 IMM 1540 LD R0 1*CIATICK+1*CIAERR+1*CIAFULL 0227B E4001A02 0 1541 ST R0 CIX(CIAINTMASK) enable the interrupts 0227C 60040800 0 IMM 1542 LD R0 1*PPUICIA 0227D E4001802 0 1543 ST R0 CIX(PPUSSSTAT) allow the controller to interrupt 1544 * \ / 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 337 (INITIAL) F 21 Initialization Routine 0000227E 1545 NOPORTSC LABEL 0227E 60040040 0 IMM 1546 LD R0 CIABOARDS*CIAPPBRD number of ports on controller 0227F 98001F03 0 1547 ADDM R0 TERMNUM 02280 63178801 456 BASE 1548 LD2 R4 SP,SAVER45 restore R4 and R5 02281 5D1F8007 6 STAK 1549 LEAVE POP and return 1550 * --- 1551 1552 END COMMDEV subroutine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 338 (INITIAL) F 21 Initialization Routine 1554 1555 ********************************************************************************** 1556 * * 1557 * LPCDEV - Initialization for line printer controller. * 1558 * * 1559 * LD R4 => PPU control element * 1560 * LD R5 channel number * 1561 * CALLNP LPCDEV * 1562 * * 1563 * Eats R0:R3. * 1564 * Stack required = 11. * 1565 * 1 + max ( MAKEDEVNAME (10), SGETMEM (0), ZEROIT (1) ) * 1566 * * 1567 ********************************************************************************** 1568 1569 BLOCK LPCDEV subroutine 1570 ENTRY LPCDEV 1571 1572 BEGFRAME 1573 ENDFRAME 1574 02282 DD5F8001 6 STAK 1575 LPCDEV ENTRNP PUSH 02283 DC002ED0 1576 CALL SGETMEM get an LPC element 02284 40440006 IMM 1577 PARVL LPCLOG indicate desired size 02285 60D20000 3 0 REG 1578 LD LPC R0 set pointer to it 02286 7C020400 0 IMM 1579 IOR R0 DVCTLPC*DEVTYPE merge in device type with address 02287 E41D2804 0 45 BASE 1580 ST R0 R4,PPUCNTLPTR(R5) save pointer in PPU block 02288 DC003090 1581 CALL ZEROIT clear out the block 02289 41160800 0 BASE 1582 PAR R0,0 address 0228A 40440037 IMM 1583 PARVL LPCLNTH length 0228B 60170800 0 4 BASE 1584 LD R0 R4,PPUPF get page file for PPU 0228C E54A3020 5 0 CBM 1585 ST R5 R0/PPUCHAN get page file for LPC 0228D E416C801 0 3 BASE 1586 ST R0 LPC,LPCPMVALUE save page map value 0228E 60001F21 0 1587 LD R0 LPCLIST get head of list 0228F E416C800 0 3 BASE 1588 ST R0 LPC,LPCLINK link behind us 02290 E4C01F21 3 1589 ST LPC LPCLIST save us as new head 02291 60401A20 1 1590 LD R1 CIX(LPSTATUS) get current status 02292 600A5840 0 1 CBM 1591 LD R0 R1/LPSTUNIT get unit number 02293 E408C847 0 3 ZBM 1592 ST R0 LPC,LPCUNIT save it 02294 DC002316 1593 CALL MAKEDEVNAME construct the device name 02295 4140229C 1594 PARV LPTNAME prefix 02296 4048C847 3 ZBM 1595 PARVL LPC,LPCUNIT unit number 02297 E416C804 0 3 BASE 1596 ST R0 LPC,LPCNAME save device name 02298 EC001A80 1597 STZ CIX(LPNOP+LPINT) enable interrupts 02299 60040800 0 IMM 1598 LD R0 1*PPUICIA get bit for controller interrupt enable 0229A E4001802 0 1599 ST R0 CIX(PPUSSSTAT) enable the interrupts 0229B 5D1F8001 6 STAK 1600 LEAVE POP then return 1601 * --- 1602 0229C 4C500000 1603 LPTNAME TEXTZ "LP" prototype name 1604 1605 END LPCDEV subroutine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 339 (INITIAL) F 21 Initialization Routine 1607 1608 ********************************************************************************** 1609 * * 1610 * CTCDEV - Initialization for a Cartridge Tape Controller. * 1611 * * 1612 * LD R4 => PPU control element * 1613 * LD R5 channel number * 1614 * CALLNP CTCDEV * 1615 * * 1616 * Eats R0:R3. * 1617 * Stack required = 17. * 1618 * 2 + max ( DOMTUNIT (15), SGETMEM (0), ZEROIT (1) ) * 1619 * * 1620 ********************************************************************************** 1621 1622 BLOCK CTCDEV subroutine 1623 ENTRY CTCDEV 1624 1625 BEGFRAME 00178801 6 BASE 1626 SAVER7 BSS 1 save area for R7 1627 ENDFRAME 1628 0229D DD5F8002 6 STAK 1629 CTCDEV ENTRNP PUSH 0229E E5D78801 7 6 BASE 1630 ST R7 SP,SAVER7 save this register 0229F DC002ED0 1631 CALL SGETMEM fetch memory for a controller element 022A0 40440004 IMM 1632 PARVL MTCLOG indicate its length 022A1 61D20000 7 0 REG 1633 LD MTC R0 copy the pointer 022A2 7C021400 0 IMM 1634 IOR R0 DVCTCTC*DEVTYPE insert device type 022A3 E41D2804 0 45 BASE 1635 ST R0 R4,PPUCNTLPTR(R5) place type and block addr into PPU table 022A4 DC003090 1636 CALL ZEROIT clear out the element 022A5 41160800 0 BASE 1637 PAR R0,0 indicate its address 022A6 40440010 IMM 1638 PARVL (2 POWER MTCLOG) and the length to clear 022A7 60170800 0 4 BASE 1639 LD R0 R4,PPUPF get the PPU page map value 022A8 7C0B4C00 0 5 CBM 1640 IOR R0 R5*PPUCHAN get this channel number 022A9 E417C801 0 7 BASE 1641 ST R0 MTC,MTCPMVALUE set up access address 1642 * STZ MTC,MTCTYPE indicate that this is a CT 022AA 60001F1C 0 1643 LD R0 MTCLIST get pointer to current list 022AB E417C800 0 7 BASE 1644 ST R0 MTC,MTCLINK place current list after us 022AC E5C01F1C 7 1645 ST MTC MTCLIST and make this element new list head 1646 022AD DC0022E2 1647 CALL DOMTUNIT set up element for individual unit 022AE 41001F1E 1648 PAR CTULIST indicate which list to place element into 022AF 404022B2 1649 PARVL CTNAME and indicate device name substrate 1650 022B0 61D78801 7 6 BASE 1651 LD R7 SP,SAVER7 restore this register 022B1 5D1F8002 6 STAK 1652 LEAVE POP then all done 1653 * --- 1654 022B2 43540000 1655 CTNAME TEXTZ "CT" skeleton name for CT units 1656 1657 END CTCDEV subroutine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 340 (INITIAL) F 21 Initialization Routine 1659 1660 ********************************************************************************** 1661 * * 1662 * MTCDEV - Initialization for a Mag Tape Controller * 1663 * * 1664 * LD R4 => PPU control element * 1665 * LD R5 channel number * 1666 * CALLNP MTCDEV * 1667 * * 1668 * Eats R0:R3. * 1669 * Stack required = 17. * 1670 * 2 + max ( DOMTUNIT (15), SGETMEM (0), ZEROIT (1) ) * 1671 * * 1672 ********************************************************************************** 1673 1674 BLOCK MTCDEV subroutine 1675 ENTRY MTCDEV 1676 1677 BEGFRAME 00178801 6 BASE 1678 SAVER7 BSS 1 save area for R7 1679 ENDFRAME 1680 022B3 DD5F8002 6 STAK 1681 MTCDEV ENTRNP PUSH 022B4 E5D78801 7 6 BASE 1682 ST R7 SP,SAVER7 save this register 022B5 DC002ED0 1683 CALL SGETMEM fetch memory for a controller element 022B6 40440004 IMM 1684 PARVL MTCLOG indicate its length 022B7 61D20000 7 0 REG 1685 LD MTC R0 copy the pointer 022B8 7C021200 0 IMM 1686 IOR R0 DVCTMTC*DEVTYPE insert device type 022B9 E41D2804 0 45 BASE 1687 ST R0 R4,PPUCNTLPTR(R5) place type and block addr into PPU table 022BA DC003090 1688 CALL ZEROIT clear out the element 022BB 41160800 0 BASE 1689 PAR R0,0 indicate its address 022BC 40440010 IMM 1690 PARVL (2 POWER MTCLOG) and the length to clear 022BD 60170800 0 4 BASE 1691 LD R0 R4,PPUPF get the PPU page map value 022BE 7C0B4C00 0 5 CBM 1692 IOR R0 R5*PPUCHAN get this channel number 022BF E417C801 0 7 BASE 1693 ST R0 MTC,MTCPMVALUE set up access address 022C0 EDC9C426 7 ZBM 1694 STW MTC,MTCTYPE indicate that this is a 9 track tape 022C1 60001F1C 0 1695 LD R0 MTCLIST get pointer to current list 022C2 E417C800 0 7 BASE 1696 ST R0 MTC,MTCLINK place current list after us 022C3 E5C01F1C 7 1697 ST MTC MTCLIST and make this element new list head 1698 022C4 DC0022E2 1699 CALL DOMTUNIT set up element for individual unit 022C5 41001F1D 1700 PAR MTULIST indicate where to place unit 022C6 404022C9 1701 PARVL MTNAME and indicate device name base 1702 022C7 61D78801 7 6 BASE 1703 LD R7 SP,SAVER7 restore this register 022C8 5D1F8002 6 STAK 1704 LEAVE POP all done 1705 * --- 1706 022C9 4D540000 1707 MTNAME TEXTZ "MT" skeleton name for MT units 1708 1709 END MTCDEV subroutine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 341 (INITIAL) F 21 Initialization Routine 1711 1712 ********************************************************************************** 1713 * * 1714 * VTCDEV - Initialization for a Video Tape Controller * 1715 * * 1716 * LD R4 => PPU control element * 1717 * LD R5 channel number * 1718 * CALLNP VTCDEV * 1719 * * 1720 * Eats R0:R3. * 1721 * Stack required = 17. * 1722 * 2 + max ( DOMTUNIT (15), SGETMEM (0), ZEROIT (1) ) * 1723 * * 1724 ********************************************************************************** 1725 1726 BLOCK VTCDEV subroutine 1727 ENTRY VTCDEV 1728 1729 BEGFRAME 00178801 6 BASE 1730 SAVER7 BSS 1 save area for R7 1731 ENDFRAME 1732 022CA DD5F8002 6 STAK 1733 VTCDEV ENTRNP PUSH 022CB E5D78801 7 6 BASE 1734 ST R7 SP,SAVER7 save this register 022CC DC002ED0 1735 CALL SGETMEM fetch memory for a controller element 022CD 40440004 IMM 1736 PARVL MTCLOG indicate its length 022CE 61D20000 7 0 REG 1737 LD MTC R0 copy the pointer 022CF 7C021600 0 IMM 1738 IOR R0 DVCTVTC*DEVTYPE insert device type 022D0 E41D2804 0 45 BASE 1739 ST R0 R4,PPUCNTLPTR(R5) place type and block addr into PPU table 022D1 DC003090 1740 CALL ZEROIT clear out the element 022D2 41160800 0 BASE 1741 PAR R0,0 indicate its address 022D3 40440010 IMM 1742 PARVL (2 POWER MTCLOG) and the length to clear 022D4 60170800 0 4 BASE 1743 LD R0 R4,PPUPF get the PPU page map value 022D5 7C0B4C00 0 5 CBM 1744 IOR R0 R5*PPUCHAN get this channel number 022D6 E417C801 0 7 BASE 1745 ST R0 MTC,MTCPMVALUE set up access address 022D7 60040002 0 IMM 1746 LD R0 2 022D8 E409C426 0 7 ZBM 1747 ST R0 MTC,MTCTYPE indicate that this is a video tape 022D9 60001F1C 0 1748 LD R0 MTCLIST get pointer to current list 022DA E417C800 0 7 BASE 1749 ST R0 MTC,MTCLINK place current list after us 022DB E5C01F1C 7 1750 ST MTC MTCLIST and make this element new list head 1751 022DC DC0022E2 1752 CALL DOMTUNIT set up element for individual unit 022DD 41001F1F 1753 PAR VTULIST indicate where to place unit 022DE 404022E1 1754 PARVL VTNAME and indicate device name base 1755 022DF 61D78801 7 6 BASE 1756 LD R7 SP,SAVER7 restore this register 022E0 5D1F8002 6 STAK 1757 LEAVE POP all done 1758 * --- 1759 022E1 56540000 1760 VTNAME TEXTZ "VT" skeleton name for VT units 1761 1762 END VTCDEV subroutine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 342 (INITIAL) F 21 Initialization Routine 1764 1765 ********************************************************************************** 1766 * * 1767 * Routine to do a single mag tape controller. * 1768 * Call: * 1769 * LD MTC => MTC element * 1770 * CALL DOMTUNIT * 1771 * PAR MTULIST or CTULIST * 1772 * PARL drive name prefix (TEXTZ "MT" or "CT") * 1773 * * 1774 * Eats R0:R3. * 1775 * Stack required = 15. * 1776 * 5 + max ( LOCKWAIT (0), MAKEDEVNAME (10), MT_RESET (7), * 1777 * SGETMEM (0), ZEROIT (1) ) * 1778 * * 1779 ********************************************************************************** 1780 1781 BLOCK DOMTUNIT subroutine 1782 ENTRY DOMTUNIT 1783 1784 BEGFRAME 00178801 6 BASE 1785 REGSAVE BSS2 1 to save some registers 00178803 6 BASE 1786 LISTHEAD BSS 1 pointer to the list head 00178804 6 BASE 1787 NAMEPROTO BSS 1 prototype for the device name 1788 ENDFRAME 1789 022E2 DD1F8005 6 STAK 1790 DOMTUNIT ENTR PUSH 022E3 C1178803 6 BASE 1791 STP SP,LISTHEAD save the list head address 022E4 C0578804 6 BASE 1792 STPVL SP,NAMEPROTO save the device name prototype 022E5 E7178801 456 BASE 1793 ST2 R4 SP,REGSAVE save R4 and R5 022E6 E1D78800 7 6 BASE 1794 EXCH R7 SP,0 put MTC pointer back into MTC 022E7 61040000 4 IMM 1795 LD R4 0 start with unit 0 022E8 60C01A40 3 1796 LD R3 CIX(MTLDDRVST) fetch all drive statuses 000022E9 1797 NEXTMTUNIT LABEL 022E9 60CAD000 3 3 CBM 1798 LD R3 R3/BITS 8:7 shift to next unit 022EA F2FC2306 3 1799 JBF R3/MTDSTPRS NOMTUNIT jump if no drive present 022EB DC002ED0 1800 CALL SGETMEM get memory for MTU element 022EC 40440005 IMM 1801 PARVL MTULOG indicate required size 022ED 61520000 5 0 REG 1802 LD MTU R0 copy the pointer 022EE E41DE007 0 74 BASE 1803 ST R0 MTC,MTCDRIVE(R4) make controller element point here 022EF DC003090 1804 CALL ZEROIT clear out new element 022F0 41160800 0 BASE 1805 PAR R0,0 indicate address 022F1 40440020 IMM 1806 PARVL 2 POWER MTULOG and how much to clear 022F2 60178C03 0 6 FPVR 1807 LD R0 @(SP,LISTHEAD) get pointer to current list 022F3 E4095F10 0 5 ZBM 1808 ST R0 MTU,MTULINK put list behind us 022F4 FA3022F7 0 1809 JZA R0 FIRSTMT jump if this is first unit 022F5 60080460 0 0 ZBM 1810 LD R0 R0,MTUDNUM else get previous drive number 022F6 60161001 0 0 REG 1811 LD R0 R0+1 and make us one more 000022F7 1812 FIRSTMT LABEL 022F7 E4094460 0 5 ZBM 1813 ST R0 MTU,MTUDNUM and give next number to current element 022F8 E5578C03 5 6 FPVR 1814 ST MTU @(SP,LISTHEAD) and this element new list head 022F9 E5095040 4 5 ZBM 1815 ST R4 MTU,MTUUNIT save the unit number 022FA E5C95F11 7 5 ZBM 1816 ST MTC MTU,MTUCNTL save pointer to controller element 022FB 6009C426 0 7 ZBM 1817 LD R0 MTC,MTCTYPE get indicator for 9 track tape 022FC E4094021 0 5 ZBM 1818 ST R0 MTU,MTUTYPE and copy to unit element 022FD 6004426E 0 IMM 1819 LD R0 ADR MTDRIVE 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 343 (INITIAL) F 21 Initialization Routine 022FE E4174810 0 5 BASE 1820 ST R0 MTU,MTUPC initialize the coroutine PC 022FF 60040000 0 IMM 1821 LD R0 MTUSTRUN 02300 E4094020 0 5 ZBM 1822 ST R0 MTU,MTUSTATE initialize the state 02301 60178804 0 6 BASE 1823 LD R0 SP,NAMEPROTO get name prototype 02302 DC002316 1824 CALL MAKEDEVNAME construct the device name 02303 41520000 0 REG 1825 PARV R0 name prefix 02304 40494460 5 ZBM 1826 PARVL MTU,MTUDNUM device number 02305 E4174804 0 5 BASE 1827 ST R0 MTU,MTUNAME save the name 1828 * \ / 00002306 1829 NOMTUNIT LABEL 02306 19040001 4 IMM 1830 ADD R4 1 advance to next possible unit 02307 65040004 4 IMM 1831 CPR R4 MTCUPC check against max possible on controller 02308 FE0822E9 1832 JLT NEXTMTUNIT return to do next unit 1833 * \ / 1834 PLOCK (MTC,MTCELOCK) lock the controller 02309 0CC00000 1834 IOFF 0230A D1D7C803 7 BASE 1834 SETT (MTC,MTCELOCK) 0230B FE0C230D 1834 JNE MA(2+DISPW MA 0) 0230C DC40308B 1834 CALLNP LOCKWAIT 0230D 6153C000 5 7 REG 1835 LD R5 MTC parm for MT_RESET 0230E 60040001 0 IMM 1836 LD R0 1 parm for MT_RESET 0230F DC4041CB 1837 CALLNP MT_RESET reset the controller 02310 FEC00000 1838 NOP 0 ignore skip return 1839 PUNLOCK (MTC,MTCELOCK) unlock the controller 02311 EC17C803 7 BASE 1839 STZ (MTC,MTCELOCK) 02312 0C800000 1839 ION 1840 02313 E1D78800 7 6 BASE 1841 EXCH R7 SP,0 restore R7 values 02314 63178801 456 BASE 1842 LD2 R4 SP,REGSAVE restore R4 and R5 02315 5D1F8005 6 STAK 1843 LEAVE POP return to caller 1844 * --- 1845 1846 END DOMTUNIT subroutine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 344 (INITIAL) F 21 Initialization Routine 1848 1849 ********************************************************************************** 1850 * * 1851 * MAKEDEVNAME - Construct a device name. * 1852 * * 1853 * CALL MAKEDEVNAME * 1854 * PARV name prefix (1-3 chars, left justified, zero filled) * 1855 * PARVL unit number * 1856 * ST R0 pak6 device name * 1857 * * 1858 * Eats R0:R2. * 1859 * Stack required = 10. * 1860 * 4 + max ( CHARTOP6 (1), INTTOCHAR (6) ) * 1861 * * 1862 ********************************************************************************** 1863 1864 BLOCK MAKEDEVNAME subroutine 1865 ENTRY MAKEDEVNAME 1866 1867 BEGFRAME 00178801 6 BASE 1868 SAVER3 BSS 1 save area for this reg 00178802 6 BASE 1869 NAMEBUF BSS 2 buffer to build name in 1870 ENDFRAME 1871 02316 DD1F8004 6 STAK 1872 MAKEDEVNAME ENTR PUSH 02317 C1578802 6 BASE 1873 STPV SP,NAMEBUF save prefix of name 02318 C0520000 0 REG 1874 STPVL R0 save unit number 02319 E4D78801 3 6 BASE 1875 ST R3 SP,SAVER3 save this register 0231A 38978802 2 6 BASE 1876 LEA R2 SP,NAMEBUF R2 -> first char of name 1877 * \ / 1878 0000231B 1879 LOOP LABEL 0231B 5C168000 2 CACH 1880 CMZ CACH R2,0 at end of prefix? 0231C FE02231F 1881 JEQ GOTEND jump if so 0231D 38968001 2 2 CACH 1882 LEA R2 CACH R2,1 else point to next char 0231E FE0E231B 1883 JMP LOOP and try again 1884 * --- 1885 0000231F 1886 GOTEND LABEL 0231F DC005903 1887 CALL INTTOCHAR convert unit number to characters 02320 41520000 0 REG 1888 PARV R0 number to convert 02321 40168000 2 CACH 1889 PARL CACH R2,0 where to put it 02322 38178802 0 6 BASE 1890 LEA R0 SP,NAMEBUF R0 -> name, in characters 02323 DC005898 1891 CALL CHARTOP6 pack it up 02324 40160000 0 CACH 1892 PARL CACH R0,0 thing to pack 02325 60124000 0 1 REG 1893 LD R0 R1 R0 = packed name 02326 60D78801 3 6 BASE 1894 LD R3 SP,SAVER3 restore this register 02327 5D1F8004 6 STAK 1895 LEAVE POP and all done 1896 * --- 1897 1898 END MAKEDEVNAME subroutine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 345 (INITIAL) F 21 Initialization Routine 1900 1901 ********************************************************************************** 1902 * * 1903 * This routine frees all of a memory block beyond a * 1904 * specified location. * 1905 * * 1906 * R1 = log size of block * 1907 * R2 => first available word * 1908 * CALLNP FREEAFTER * 1909 * * 1910 * Eats R0:R3. * 1911 * Stack required = 2 * 1912 * 2 + max ( SFREEMEM (0) ) * 1913 * * 1914 ********************************************************************************** 1915 1916 BLOCK FREEAFTER subroutine 1917 ENTRY FREEAFTER 1918 1919 BEGFRAME 00178801 6 BASE 1920 LOGMAX BSS 1 log of max block size 1921 ENDFRAME 1922 1923 * R2=current first available word, 1924 * R3=log 2 block size being considered 1925 02328 DD5F8002 6 STAK 1926 FREEAFTER ENTRNP PUSH 02329 E4578801 1 6 BASE 1927 ST R1 SP,LOGMAX save max log size 0232A 60C40000 3 IMM 1928 LD R3 0 start with block size of 1 0000232B 1929 FREENEXT LABEL 0232B 60128000 0 2 REG 1930 LD R0 R2 copy the address being considered 0232C 7826255E 0 3 1931 AND R0 BITTAB(R3) check to see if address odd here 0232D FA022332 0 1932 JEQZ R0 ENDCHECK jump if no block starting here 0232E DC002F5D 1933 CALL SFREEMEM free up a piece 0232F 4152C000 3 REG 1934 PARV R3 indicate the length (log) 02330 40528000 2 REG 1935 PARVL R2 and address 02331 18A6255E 2 3 1936 ADD R2 BITTAB(R3) skip over piece just freed 00002332 1937 ENDCHECK LABEL 02332 18C40001 3 IMM 1938 ADD R3 1 double size being checked 02333 64D78801 3 6 BASE 1939 CPR R3 SP,LOGMAX check for beyond block or page end 02334 FE08232B 1940 JLT FREENEXT not yet, continue 02335 5D1F8002 6 STAK 1941 LEAVE POP return to caller 1942 * --- 1943 1944 END FREEAFTER subroutine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 346 (INITIAL) F 21 Initialization Routine 1946 1947 ********************************************************************************** 1948 * * 1949 * Routine to set up the interrupt vector table for the * 1950 * current CPU. Gets a console area for each actual interrupt * 1951 * level that requires one. * 1952 * Sets up pointers to the CAs in the IVT and sets up the * 1953 * new program counter information. Unused interrupts are set * 1954 * to stop the machine. * 1955 * * 1956 * Eats R0:R1. * 1957 * Stack required = 3. * 1958 * 1 + max ( BUILDCA (2) ) * 1959 * * 1960 ********************************************************************************** 1961 1962 BLOCK BUILDIVT subroutine 1963 ENTRY BUILDIVT 1964 1965 BEGFRAME 1966 ENDFRAME 1967 02336 DD5F8001 6 STAK 1968 BUILDIVT ENTRNP PUSH 02337 EC000412 1969 STZ CPPSA also indicate no process now 02338 EC000414 1970 STZ CPCUPC indicate no UPC now 02339 EC00044D 1971 STZ CPXTRACA indicate no CA/Stack present 0233A EC00044E 1972 STZ POWERFLAG initialize power fail marker 1973 0233B DC402833 1974 CALLNP BUILDCA 0233C E4000402 0 1975 ST R0 IVTPWFL set address into IVT 0233D 6004277A 0 IMM 1976 LD R0 ADR POWERFAIL load the interrupt routine address 0233E E4000403 0 1977 ST R0 IVTPWFL(1) and set into the IVT 1978 0233F DC402833 1979 CALLNP BUILDCA 02340 E4000404 0 1980 ST R0 IVTMEMPAR set address into IVT 02341 600426C6 0 IMM 1981 LD R0 ADR PARITYERR load the interrupt routine address 02342 E4000405 0 1982 ST R0 IVTMEMPAR(1) and set into the IVT 1983 02343 DC402833 1984 CALLNP BUILDCA 02344 E400040A 0 1985 ST R0 IVTIAPR set address into IVT 02345 60044E54 0 IMM 1986 LD R0 ADR OTHERTALK load the interrupt routine address 02346 E400040B 0 1987 ST R0 IVTIAPR(1) and set into the IVT 1988 02347 DC402833 1989 CALLNP BUILDCA 02348 E4000408 0 1990 ST R0 IVTIOINT set the address into the IVT 02349 60043908 0 IMM 1991 LD R0 ADR IOINTPROC load the address of the interrupt routine 0234A E4000409 0 1992 ST R0 IVTIOINT(1) and set into the IVT 1993 0234B DC402833 1994 CALLNP BUILDCA 0234C E4000406 0 1995 ST R0 IVTPAGE 0234D 60042402 0 IMM 1996 LD R0 ADR PFPROC 0234E E4000407 0 1997 ST R0 IVTPAGE(1) 1998 0234F DC402833 1999 CALLNP BUILDCA 02350 E400040C 0 2000 ST R0 IVTXREQ 02351 600438BD 0 IMM 2001 LD R0 ADR XREQTRAP 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 347 (INITIAL) F 21 Initialization Routine 02352 E400040D 0 2002 ST R0 IVTXREQ(1) 2003 02353 DC402833 2004 CALLNP BUILDCA 02354 E400040E 0 2005 ST R0 IVTUERR 02355 600438E8 0 IMM 2006 LD R0 ADR UERRTRAP 02356 E400040F 0 2007 ST R0 IVTUERR(1) 2008 02357 DC402833 2009 CALLNP BUILDCA 02358 E4000410 0 2010 ST R0 IVTXCALL 02359 600438E5 0 IMM 2011 LD R0 ADR XCALLTRAP 0235A E4000411 0 2012 ST R0 IVTXCALL(1) 2013 2014 ********************************************************************************** 2015 * * 2016 * Interrupting Devices Mask * 2017 * This word is defined by the hardware. It is read up * 2018 * by the CPU and tells that CPU what slots to poll when the * 2019 * bus interrupt line is asserted. It also contains the slot * 2020 * number of the SSU that is running the front panel. This is * 2021 * so that the CPU microcode knows where to send notice of any * 2022 * problems that it might encounter. * 2023 * * 2024 ********************************************************************************** 2025 0235B 60000312 0 2026 LD R0 INTDEVICES 0235C E4000401 0 2027 ST R0 INTABLSLOT say which devices interrupt 2028 0235D 5D1F8001 6 STAK 2029 LEAVE PUSH return to caller 2030 * --- 2031 2032 END BUILDIVT subroutine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 348 (INITIAL) F 21 Initialization Routine 2034 2035 ********************************************************************************** 2036 * * 2037 * GENPPL - Generate a PPAGE element. * 2038 * We create the PPL for the specified page. The FBI for * 2039 * the page is kept in a virtual area that must be mapped in * 2040 * whenever access to the FBI is needed. We keep track of the * 2041 * available places for FBIs and store in the PPL the unique * 2042 * location it may use. * 2043 * The MCU slot number of the new PPL is used as an index * 2044 * into the PPUSDIDLE array and the PPL is placed as the head * 2045 * of the corresponding 'unclean' idle page list. This * 2046 * separates the PPLs by MCU. * 2047 * Since PPLs created here are never destroyed, we * 2048 * allocate FBI space in a linear fashion and without worrying * 2049 * about ever recovering the space. The array PPLPFMAP * 2050 * contains the page map values for each of the pages used to * 2051 * store the FBIs. Into any particular PPL we store an index * 2052 * (PPFBIBLK) into this array and a displacement (PPFBIDISP) * 2053 * into the associated page. The virtual page PPLWINDOW is * 2054 * used to map in the page when the FBI is to be accessed. * 2055 * We keep track of allocations with the head page * 2056 * variables PPLINDX and PPLDISP. They are the next assignable * 2057 * values for PPFBIBLK and PPFBIDISP. If PPLPFMAP(PPFBIBLK) is * 2058 * 0, no page has yet been assigned for this location and we * 2059 * use the passed page for this purpose. * 2060 * * 2061 * R5 contains the PF entry for this page * 2062 * CALLNP GENPPL * 2063 * * 2064 * Eats R0:R2,PPL * 2065 * Stack usage = 2 * 2066 * 1 + max ( BUILDPPL (1) ) * 2067 * * 2068 ********************************************************************************** 2069 2070 BLOCK GENPPL subroutine 2071 ENTRY GENPPL 2072 2073 BEGFRAME 2074 ENDFRAME 2075 0235E DD5F8001 6 STAK 2076 GENPPL ENTRNP PUSH 0235F 60001C7E 0 2077 LD R0 PPLPMINDX get current index into PPLPFMAP 02360 68040042 0 IMM 2078 UCPR R0 PPLMAPSIZE off ends of table? 02361 FE082363 2079 JLT INDEXOK jump if not 02362 00026040 2080 HALT HALTB6040 out of table space (or negative index) 2081 * \ / 2082 00002363 2083 INDEXOK LABEL 02363 5C201C80 0 2084 CMZ PPLPFMAP(R0) do we have a page allocated? 02364 FE02236C 2085 JEQ USETHISONE jump if not 02365 DC402374 2086 CALLNP BUILDPPL build the PPL 2087 2088 ********************************************************************************** 2089 * * 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 349 (INITIAL) F 21 Initialization Routine 2090 * Place the new PPL into list in PPUSDIDLE array * 2091 * corresponding to the PPLs MCU. The end-pointer array, * 2092 * PPENDIDLE, is not changed. This is intentional, to make * 2093 * merging these lists easier. Note that GETIDLE will look in * 2094 * this array for free PPLs and does not need the end-pointers * 2095 * set (in fact, it sets them). * 2096 * * 2097 ********************************************************************************** 2098 02366 608B4840 2 5 CBM 2099 LD R2 R5/PFSLOT get slot number of mother MCU 02367 60641DDD 1 2 2100 LD R1 PPUSDIDLE(R2) use as index to get list head 02368 E4491F10 1 4 ZBM 2101 ST R1 PPL,PPLINK link list behind us 02369 E5241DDD 4 2 2102 ST PPL PPUSDIDLE(R2) make us the new list head 2103 0236A D0001DDA 2104 INC PPIDLCOUNT count each idle page available 2105 0000236B 2106 EXIT2 LABEL 0236B 5D1F8001 6 STAK 2107 LEAVE POP return 2108 * --- 2109 2110 ********************************************************************************** 2111 * * 2112 * There is no block allocated for storing the FBIs from * 2113 * the PPLs. Allocate one without creating a PPL. Note also * 2114 * that we initialize the page with all zeros, this is to * 2115 * prevent the OS from ever reading from uninitialized memory. * 2116 * * 2117 ********************************************************************************** 2118 0000236C 2119 USETHISONE LABEL 0236C E5601C80 5 0 2120 ST R5 PPLPFMAP(R0) 0236D 60C400FB 3 IMM 2121 LD R3 PNPPLWNDO page number for virtual FBIs 0236E 00D34000 5 REG 2122 LDPF R5 associate virtual page with memory page 0236F 3881EC00 2 2123 LEA R2 PPLWINDOW generate destination address 02370 60441000 1 IMM 2124 LD R1 WPP*CPW page length in characters 02371 FE580000 2125 CFILL 0 the page is now initialized 02372 80D20000 0 REG 2126 PFRC R0 undo the mapping 02373 FE0E236B 2127 JMP EXIT2 2128 * --- 2129 2130 END GENPPL subroutine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 350 (INITIAL) F 21 Initialization Routine 2132 2133 ********************************************************************************** 2134 * * 2135 * BUILDPPL * 2136 * The PPL is built here. The FBI for the page is kept * 2137 * in a virtual area that must be mapped in whenever access to * 2138 * the FBI is needed. We keep track of the available places * 2139 * for FBIs and store in the PPL the unique location it may * 2140 * use. * 2141 * Since PPLs created here are never destroyed, we * 2142 * allocate FBI space in a linear fashion and without worrying * 2143 * about ever recovering the space. The array PPLPFMAP * 2144 * contains the page map values for each of the pages used to * 2145 * store the FBIs. Into any particular PPL we store an index * 2146 * (PPFBIBLK) into this array and a displacement (PPFBIDISP) * 2147 * into the associated page. The virtual page PPLWINDOW is * 2148 * used to map in the page when the FBI is to be accessed. * 2149 * It is assumed that some one else is checking that * 2150 * PPLPFMAP(PPFBIBLK) contains a page map value for a page of * 2151 * FBIs. Call: * 2152 * * 2153 * R5 contains PF entry for this page * 2154 * CALLNP BUILDPPL * 2155 * PPL -> PPL * 2156 * * 2157 * Eats R0. * 2158 * Stack usage = 1 * 2159 * 1 + max ( SGETMEM (0) ) * 2160 * * 2161 ********************************************************************************** 2162 2163 BLOCK BUILDPPL subroutine 2164 ENTRY BUILDPPL 2165 2166 BEGFRAME 2167 ENDFRAME 2168 02374 DD5F8001 6 STAK 2169 BUILDPPL ENTRNP PUSH 02375 DC002ED0 2170 CALL SGETMEM call for a chunk of memory 02376 40440002 IMM 2171 PARVL PPLOG indicate its length 02377 61120000 4 0 REG 2172 LD PPL R0 copy the pointer 02378 EE170800 4 BASE 2173 STZ2 PPL,0 clear out top half 02379 EE170802 4 BASE 2174 STZ2 PPL,2 clear out bottom half 2175 * \ / 2176 2177 * PPL => zeroed physical page element, fill in the details 0237A E5570803 5 4 BASE 2178 ST R5 PPL,PPPMVALUE set page map value 0237B EC091A33 4 ZBM 2179 STZ PPL,PPPMVALUE/(PFROBIT+PFALTBIT+PFREFBIT) clear this garbage 0237C 60001C7E 0 2180 LD R0 PPLPMINDX get index back 0237D E4090C62 0 4 ZBM 2181 ST R0 PPL,PPFBIBLK say where to find FBI 0237E 60001C7F 0 2182 LD R0 PPLPMDISP get loc for FBI 0237F E40904A0 0 4 ZBM 2183 ST R0 PPL,PPFBIDISP save displacement into indexed block 2184 * \ / 2185 2186 ********************************************************************************** 2187 * * 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 351 (INITIAL) F 21 Initialization Routine 2188 * The following instruction causes all the FBIs to start * 2189 * on even word boundaries. This is required for all systems * 2190 * with pre-rev 012 PPU micro-code. It is in the source so we * 2191 * don't forget! The code file can be patched to ADD R0 * 2192 * FBILNTH to produce an odd/even mix for systems with rev 012 * 2193 * and above for tests, but the source should not be changed * 2194 * until all sites have appropriate microcode. * 2195 * * 2196 ********************************************************************************** 2197 2198 * label for patchers 00002380 2199 ODDFBI LABEL 02380 1804000C 0 IMM 2200 ADD R0 FBILNTH+1 R0:=next available displacement 02381 640403F4 0 IMM 2201 CPR R0 PPLMAXDISP is it too big? 02382 FE0A2385 2202 JLE EXIT jump if not 02383 D0001C7E 2203 INC PPLPMINDX otherwise, we must use next index 02384 60040000 0 IMM 2204 LD R0 0 from the beginning 00002385 2205 EXIT LABEL 02385 E4001C7F 0 2206 ST R0 PPLPMDISP set next disp 02386 5D1F8001 6 STAK 2207 LEAVE POP 2208 * --- 2209 2210 END of BUILDPPL subroutine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 352 (INITIAL) F 21 Initialization Routine 2212 2213 ********************************************************************************** 2214 * * 2215 * FREECHECK - See whether more free storage is needed. * 2216 * Routine to check to see whether a whole page is * 2217 * present in the free storage lists or not. If not, the PPL * 2218 * that is now in the FSPPLIST is freed and a new whole page * 2219 * is acquired from PPCLNIDLE. The first time that this * 2220 * routine is called, there will be lots of free storage * 2221 * because all of the extra space on the CPUPAGEs will have * 2222 * been freed. However, there will be no whole pages in the * 2223 * list, so this code will proceed to acquire an idle page and * 2224 * enter it into the whole page memory list (WHOLEPAGE). Once * 2225 * that is done, we will go for quite a while before fetching * 2226 * another. * 2227 * Call: * 2228 * CALLNP FREECHECK * 2229 * * 2230 * Registers Used: R0:R3. * 2231 * Stack Required: 2. * 2232 * 1 + max ( GETIDLE (1), SFREEMEM (0) ) * 2233 * * 2234 ********************************************************************************** 2235 2236 BLOCK FREECHECK subroutine 2237 ENTRY FREECHECK 2238 2239 BEGFRAME 2240 ENDFRAME 2241 02387 DD5F8001 6 STAK 2242 FREECHECK ENTRNP PUSH 02388 5C001C79 2243 CMZ WHOLEPAGE check for whole pages in list 02389 FE0C2395 2244 JNE STILPAGS jump if still some there 2245 * \ / 2246 2247 ********************************************************************************** 2248 * * 2249 * The last PPL that was fetched caused a whole page to * 2250 * break up. Since PPLs are never freed ( except right here * 2251 * for this reason only ), this page will never be put back * 2252 * together. Therefore, its PPL (which is now in FSPPLIST) * 2253 * will never be needed and it may be returned to free * 2254 * storage. It will of course, never cause any recombination * 2255 * because its buddy was part of a prior page and is now (and * 2256 * forevermore) a PPL. * 2257 * The free storage lists are initialized to empty ( with * 2258 * FSPPLIST empty also ). The unused part of the CPUPAGES * 2259 * will have been freed ( using alias addresses ) but no whole * 2260 * pages are entered by the initializer prior to this point. * 2261 * Therefore, the first time we come here there will be no PPL * 2262 * in the list. * 2263 * * 2264 ********************************************************************************** 2265 2266 * \ / 0238A 60801C77 2 2267 LD R2 FSPPLIST get pointer to this PPL 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 353 (INITIAL) F 21 Initialization Routine 0238B FA822390 2 2268 JEQZ R2 NOFREE jump if no whole page in existing list 0238C EC001C77 2269 STZ FSPPLIST get rid of the old pointer 0238D DC002F5D 2270 CALL SFREEMEM call to free this PPL 0238E 41440002 IMM 2271 PARV PPLOG indicate length 0238F 40528000 2 REG 2272 PARVL R2 and memory address 2273 * \ / 2274 2275 ********************************************************************************** 2276 * * 2277 * We must now get an idle page from the idle page list * 2278 * and stick it into the wholepage list, so it may be used as * 2279 * free storage. Since the other CPUs are off spining their * 2280 * wheels somewhere no inlocking for the idle list is needed. * 2281 * * 2282 ********************************************************************************** 2283 2284 * \ / 00002390 2285 NOFREE LABEL 02390 DC402D1C 2286 CALLNP GETIDLE fwtxh an idle page 02391 FE0E2395 2287 JMP STILPAGS fails on very first PPL 02392 60001C79 0 2288 LD R0 WHOLEPAGE list head of available whole pages 02393 E4091F10 0 4 ZBM 2289 ST R0 PPL,PPLINK this now becomes the head of the list 02394 E5001C79 4 2290 ST PPL WHOLEPAGE that is all there is to it 2291 * \ / 00002395 2292 STILPAGS LABEL 02395 5D1F8001 6 STAK 2293 LEAVE POP return 2294 * --- 2295 2296 END FREECHECK subroutine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 354 (INITIAL) F 21 Initialization Routine 2298 2299 ********************************************************************************** 2300 * * 2301 * MERGEPPLS * 2302 * Cycle through the PPUSDIDLE array to merge the PPLs * 2303 * from those lists (indexed by MCU slot number) into one * 2304 * master PPCLNIDLE list. This shuffled ordering gives an * 2305 * even distribution of page usage across the MCUs. The order * 2306 * of slot numbers in the resulting list is cyclic from * 2307 * highest through lowest. * 2308 * * 2309 * For a number of reasons, we create this list by adding * 2310 * at the end. Primarily, it is done so that the PPLs * 2311 * that were first created get buried deeply under the * 2312 * newer ones. See the comments regarding GENPPLing the * 2313 * INITIAL page, WNDO pages, etc. Also, this keeps the * 2314 * pages from all MCUs nicely shuffled at the beginning * 2315 * of the list (regardless of relative memory sizes or * 2316 * page availability). Finally, it fulfills the requirement * 2317 * of SPREADSYS that the first PPL not correspond to the * 2318 * first MCU. * 2319 * * 2320 * N.B. We assume that we do not have to mess with the * 2321 * end-pointer array, PPENDIDLE. * 2322 * * 2323 * We loop through the array, moving the first PPL off each * 2324 * list until all lists are empty. Each non-empty list sets * 2325 * a flag (R2) to 1. After every NUMSLOT cycles, we check this * 2326 * flag to see whether anything was moved since the last check, * 2327 * and exit if not. Note that we do not clear the flag before * 2328 * cycling the first time. This was a practical decision based * 2329 * on the fact that not finding any non-empty lists the first * 2330 * time through would imply that no MCUs exist. Hardly likely. * 2331 * We couldn't even get as far as this subroutine if there were * 2332 * no MCUs! If it is true, however, we find this out in the * 2333 * next cycle (because the JDR R2 resets the flag). * 2334 * * 2335 * Call: CALLNP MERGEPPLS * 2336 * * 2337 * Eats R0:R3, PPL * 2338 * Stack usage: 1 * 2339 * * 2340 ********************************************************************************** 2341 2342 BLOCK MERGEPPLS subroutine 2343 ENTRY MERGEPPLS 2344 2345 BEGFRAME 2346 ENDFRAME 2347 02396 DD5F8001 6 STAK 2348 MERGEPPLS ENTRNP PUSH 02397 60040000 0 IMM 2349 LD R0 0 value of null pointer 02398 38C01DDC 3 2350 LEA R3 PPCLNIDLE get address of 'clean' unused PPLS list 02399 3C08DF10 0 3 ZBM 2351 LSRCH R0 R3,PPLINK find list end 0000239A 2352 NOTDONEYET LABEL 0239A 6044000F 1 IMM 2353 LD R1 NUMSLOTS-1 counter for done check 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 355 (INITIAL) F 21 Initialization Routine 0000239B 2354 MPLOOP LABEL 0239B 61221DDD 4 1 2355 LD PPL PPUSDIDLE(R1) get PPL from slot 0239C FB3023A3 4 2356 JZA PPL GOROUND jump if list is empty 2357 * \ / 2358 2359 * PPL points to an element, move it to PPCLNIDLE 0239D 60840001 2 IMM 2360 LD R2 1 say a non-empty slot was found 0239E 60091F10 0 4 ZBM 2361 LD R0 PPL,PPLINK get forward pointer 0239F E4221DDD 0 1 2362 ST R0 PPUSDIDLE(R1) shrink the list 023A0 EC091F10 4 ZBM 2363 STZ PPL,PPLINK make suitable null pointer 023A1 E508DF10 4 3 ZBM 2364 ST PPL R3,PPLINK give transient a home 023A2 60D30000 3 4 REG 2365 LD R3 PPL save as new end 2366 * \ / 2367 000023A3 2368 GOROUND LABEL 023A3 FA66239B 1 2369 JDR R1 MPLOOP try next slot, or do done check 2370 * \ / 2371 2372 * Test our flag to see whether the lists are empty 023A4 FAA6239A 2 2373 JDR R2 NOTDONEYET jump if non-empty list was found 2374 * \ / 2375 023A5 5D1F8001 6 STAK 2376 LEAVE POP 2377 * --- 2378 2379 END MERGEPPLS subroutine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 356 (INITIAL) F 21 Initialization Routine 2381 2382 ********************************************************************************** 2383 * * 2384 * SPREADSYS * 2385 * This routine moves the first few pages of the resident * 2386 * operating system into MCUs other than the one we've been * 2387 * using up to now. This is intended to further distribute * 2388 * the workload of the MCUs. * 2389 * We assume that this subroutine is called immediately * 2390 * after perfectly shuffling the PPLs from all the MCUs, and * 2391 * that, if there is more than one MCU, that the first PPL * 2392 * does not correspond to the first MCU. The second assumption * 2393 * is made because we wish to place the first monitor page * 2394 * (which is very heavily used) on another MCU, and a check * 2395 * for this is awkward. * 2396 * * 2397 * Call: CALLNP SPREADSYS * 2398 * * 2399 * Eats R0:R3, PPL * 2400 * Stack usage: 5 * 2401 * 3 + SWAPPMVS (2) * 2402 * * 2403 ********************************************************************************** 2404 2405 BLOCK SPREADSYS subroutine 2406 ENTRY SPREADSYS 2407 2408 BEGFRAME 00178801 6 BASE 2409 PRIMESLOT BSS 1 slot number of primary MCU 00178802 6 BASE 2410 CURRPAGE BSS 1 current page in loop 2411 ENDFRAME 2412 023A6 DD5F8003 6 STAK 2413 SPREADSYS ENTRNP PUSH 023A7 60C40088 3 IMM 2414 LD PFPTR PNINITPAGE get our own page's number 023A8 80920000 0 REG 2415 PFRD R0 get the relocation 023A9 600A0840 0 0 CBM 2416 LD R0 R0/PFSLOT get the primary MCU's slot # 023AA E4178801 0 6 BASE 2417 ST R0 SP,PRIMESLOT save on stack 2418 2419 * Do the work. 2420 023AB 61001DDC 4 2421 LD PPL PPCLNIDLE get first available PPL 023AC FB3023B7 4 2422 JZA PPL ALLDONE jump if list is empty 2423 * \ / 2424 2425 ********************************************************************************** 2426 * * 2427 * Loop around until we run out of monitor pages to swap, * 2428 * or until there's only one MCU supplying us with PPLs, or * 2429 * until we run out of PPLs. * 2430 * * 2431 ********************************************************************************** 2432 * \ / 2433 023AD D1578802 6 BASE 2434 STMW SP,CURRPAGE initialize loop counter 000023AE 2435 SPREADLOOP LABEL 023AE BC578802 1 6 BASE 2436 INCL R1 SP,CURRPAGE increment loop counter 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 357 (INITIAL) F 21 Initialization Routine 023AF 6440253E 1 2437 CPR R1 MONSPREAD have we done enough? 023B0 FE0623B7 2438 JGE ALLDONE jump, finished our job 023B1 60090843 0 4 ZBM 2439 LD R0 PPL,PPPMVALUE/PFSLOT get current PPLs PMV 023B2 64178801 0 6 BASE 2440 CPR R0 SP,PRIMESLOT PPL from original MCU? 023B3 FE0223B6 2441 JEQ CYCLE jump if swizzle would be NOP 023B4 DC0023B8 2442 CALL SWAPPMVS swizzle this page 023B5 40565009 1 REG 2443 PARVL R1+RESIDENT/FLDPAGE pass page number 000023B6 2444 CYCLE LABEL 023B6 FB3623AE 4 2445 LJNA PPL SPREADLOOP fall through if no more PPLs 2446 * \ / 2447 000023B7 2448 ALLDONE LABEL 023B7 5D1F8003 6 STAK 2449 LEAVE POP return 2450 * --- 2451 2452 END SPREADSYS subroutine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 358 (INITIAL) F 21 Initialization Routine 2454 2455 ********************************************************************************** 2456 * * 2457 * SWAPPMVS * 2458 * Copies a monitor resident page to the page in PPL, and * 2459 * swaps page map values between same. Preserves the PF * 2460 * control bits in the monitor page and zeroes them in the PPL * 2461 * page. Since the has-been monitor page is now free for * 2462 * general consumption, we also zero its contents to preserve * 2463 * propriety. Updates the PFMAP. * 2464 * * 2465 * Call: PPL => physical page element * 2466 * CALL SWAPPMVS * 2467 * PARVL * 2468 * * 2469 * Eats R0:R3 * 2470 * Window usage: WNDO1, virtual page of parm * 2471 * Stack usage: 2 * 2472 * * 2473 ********************************************************************************** 2474 2475 BLOCK SWAPPMVS subroutine 2476 ENTRY SWAPPMVS 2477 2478 BEGFRAME 00178801 6 BASE 2479 HASBEEN BSS 1 number of page being replaced 2480 ENDFRAME 2481 023B8 DD1F8002 6 STAK 2482 SWAPPMVS ENTR PUSH 023B9 C0578801 6 BASE 2483 STPVL SP,HASBEEN save monitor page number 2484 2485 * Copy monitor page into PPLs page 023BA 60C40082 3 IMM 2486 LD PFPTR PNWNDO1 grab on to WNDO1 023BB 00D70803 4 BASE 2487 LDPF PPL,PPPMVALUE map in page from PPL 023BC 600A1400 0 0 CBM 2488 LD R0 R0*FLDPAGE make address out of parameter 023BD 60441000 1 IMM 2489 LD R1 CPW*WPP size of page in chars 023BE 60840800 2 IMM 2490 LD R2 ADR WNDO1 address of new guy 023BF FE400000 2491 CMOVE copy monitor page into PPLs page 2492 * \ / 2493 2494 * Swap pagemap values cleanly 023C0 60D78801 3 6 BASE 2495 LD PFPTR SP,HASBEEN get monitor page 023C1 7CC40080 3 IMM 2496 IOR PFPTR MONPF find monitor half of PF 023C2 80924000 1 REG 2497 PFRD R1 get page's relocation 023C3 600A5A30 0 1 CBM 2498 LD R0 R1/PFCNTL get the control bits 023C4 EC0A5A30 1 CBM 2499 STZ R1/PFCNTL now clear them 023C5 E0570803 1 4 BASE 2500 EXCH R1 PPL,PPPMVALUE get/set PPL's PMV 023C6 E40A5A30 0 1 CBM 2501 ST R0 R1/PFCNTL restore mon pages control 023C7 28450000 1 IMM 2502 BSUB R1 1*PFREFBIT clear "referenced" flag 023C8 60978801 2 6 BASE 2503 LD R2 SP,HASBEEN retrieve relative page in monitor space 023C9 E4640380 1 2 2504 ST R1 PFMAP(R2) save new PMV in PFMAP 023CA 00D24000 1 REG 2505 LDPF R1 and put in this CPUs PF 2506 * \ / 2507 2508 * PMVs are switched, finish by zeroing old page 023CB 60C40082 3 IMM 2509 LD PFPTR PNWNDO1 map-over WNDO1 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 359 (INITIAL) F 21 Initialization Routine 023CC 00D70803 4 BASE 2510 LDPF PPL,PPPMVALUE with has-beens PMV 023CD 60441000 1 IMM 2511 LD R1 CPW*WPP get char size of page 023CE 60840800 2 IMM 2512 LD R2 ADR WNDO1 make destination addr 023CF FE580000 2513 CFILL 00 clear the page 023D0 80D20000 0 REG 2514 PFRC R0 must unmap get window faults later 2515 023D1 5D1F8002 6 STAK 2516 LEAVE POP return 2517 * --- 2518 2519 END SWAPPMVS subroutine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 360 (INITIAL) F 21 Initialization Routine 2521 2522 ********************************************************************************** 2523 * * 2524 * Constants * 2525 * * 2526 ********************************************************************************** 2527 2528 023D2 E79EDF2D 2529 SYSACTNAM PAK12 !!!!!!!!!!!! 023D4 E79EDF2D 2530 SYSACTPROJ PAK6 !!!!!! account and project for dummy ULB 2531 2532 ********************************************************************************** 2533 * * 2534 * These goodies are put in here so that system * 2535 * programmers can see the PAK6 representions of the commonly * 2536 * needed stuff without going very far. They serve no other * 2537 * purpose. * 2538 * * 2539 ********************************************************************************** 2540 023D5 B674BFEF 2541 PAK6 SYSTEM 023D6 E79DF200 2542 PAK6 !!! 023D7 60D7BED5 2543 PAK6 EXPSYS 023D8 B97B6600 2544 PAK6 TEM 023D9 533719C0 2545 PAK6 CODE 023DA 9B17AC90 2546 PAK6 OFFLINE 023DB 8A28910E 2547 PAK6 LOGFIL 023DC 52DAF000 2548 PAK6 CM 023DD 60D758D8 2549 PAK6 EXPCM 023DE 9BFFE0D8 2550 PAK6 OLDCM 023DF 9C0046D5 2551 PAK6 OLDSYS 023E0 9CA39C00 2552 PAK6 OPL 2553 2554 END SYSINIT System Initialization Routine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 361 F 0 Initialization Routine 32 33 ********************************************************************************** 34 * * 35 * Place to break the listing. * 36 * This is the beginning of the resident operating system. * 37 * * 38 ********************************************************************************** 39 40 ORG ((DISPW MA 0)+WPP-1) AND (-WPP) get off initializer page 00002400 ABS 41 RESIDENT EQU DISPW MA 0 beginning of resident nucleus 42 00002400 43 VERSION LABEL 02400 43393330 44 VFD REVNAMEH insert the system version (in ascii) 02401 33202020 45 VFD REVNAMEL and low half 46 47 INPUT PFPROC page fault processor 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 362 (PFPROC) F 22 Page Fault Processor - Overview 3 4 PFPROCESS BLOCK Page Fault Processor - Main Block 5 ENTRY PFPROC only job of this routine 6 7 ********************************************************************************** 8 * * 9 * PAGE FAULT PROCESSING * 10 * The page fault processor is the man on the spot who * 11 * implements the schedulers desires. See the scheduling * 12 * routines and the list element prototypes for further * 13 * information concerning their operation. * 14 * * 15 * HARDWARE * 16 * The access privilege to each virtual page belonging to * 17 * a process is controlled by an entry in the page file. The * 18 * page file hardware recognizes the following privileges: * 19 * * 20 * 1) Read/Write. The process is allowed complete * 21 * access to the page. * 22 * 2) Read Only. The process is allowed only read * 23 * operations on this page. Any attempt to alter * 24 * the page causes a page fault interrupt. * 25 * 3) Excluded. Any attempt to access this page causes * 26 * a page fault interrupt. * 27 * * 28 * A process may have privileges that don't correspond * 29 * exactly to these hardware supplied protections. These * 30 * privileges are controlled by the page fault processor based * 31 * on control information set up by the scheduling or memory * 32 * management code. * 33 * * 34 * OPERATION * 35 * The functions of the page fault processor is, for each * 36 * page fault interrupt, to determine what actions to take to * 37 * make the requested page available to the process. If the * 38 * user has requested an operation that he is not allowed, an * 39 * appropriate error entry to his overprocess is initiated. * 40 * Otherwise, the necessary table changes are made and the * 41 * user restarted, or the necessary mass storage transfers are * 42 * requested and the user is shutdown to wait for them. * 43 * * 44 ********************************************************************************** 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 363 (PFPROC) F 22 Page Fault Processor - PFPROC routine 47 48 ********************************************************************************** 49 * * 50 * HERE ABIDE MONSTERS * 51 * * 52 * PFPROC - Enter here on a page fault. * 53 * The page fault interrupt sets up the registers as follows: * 54 * R2 = 1 if excluded, * 55 * 2 if protect violation, * 56 * 3 if write attempted on excluded page * 57 * R3 = page number where violation occurred * 58 * R4 => previous console area * 59 * * 60 * We do a bunch of messy logic to sort out the * 61 * following cases: * 62 * * 63 * The normal case. A process is attempting to access an * 64 * existing page that is not in its working set. * 65 * The zeropage case. A process is attempting to access * 66 * an unmapped page. He must be supplied with a new page of * 67 * zeros. * 68 * The own copy case. A process is attempting to write to * 69 * a page that is already in its working set read only, and he * 70 * should be given his own copy of the page to dirty. * 71 * The protection violation case. A process is * 72 * attempting to reference a page which has been explicitly * 73 * excluded from his working set, or is attempting to write a * 74 * page which has been explicitly marked read only. The * 75 * process will suffer an error. * 76 * * 77 * Error conditions. * 78 * The page fault processor also recognizes a number of * 79 * error conditions. Usually, somebody in the monitor screwed * 80 * up and attempted to reference a page that he shouldn't * 81 * have. These are recognizable because, while the user can * 82 * reference unmapped memory (and just gets a zero page) this * 83 * is not allowed for the monitor. * 84 * This category of HALTS represents problems elsewhere in * 85 * the monitor. They can sometimes be restarted by using the * 86 * "LDCA R4" conveniently supplied to restore the interrupted * 87 * process registers, then fixing whatever is wrong before * 88 * resuming execution. * 89 * * 90 * Exits to ZEROPAGE, OWNCOPY, NORMALPAGE, or PROTECTED. * 91 * * 92 * Stack required = 15. * 93 * 0 + max ( FINDVP (4), NOREADPAGE (15), NORMALPAGE (15), * 94 * PROTECTED (1), ZEROPAGE (15) ) * 95 * * 96 ********************************************************************************** 97 98 BLOCK PFPROC routine 99 ENTRY PFPROC 100 00002402 101 PFPROC LABEL 02402 5C000412 102 CMZ CPPSA check pointer for current user 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 364 (PFPROC) F 22 Page Fault Processor - PFPROC routine 02403 FE0C2406 103 JNE PFHVPSA jump if a valid PSA pointer 104 * \ / 105 106 ********************************************************************************** 107 * * 108 * A page fault has occurred while no session is running. * 109 * This is a definite no-no. It means that we were executing a * 110 * piece of the kernal that MUST run without suspension. * 111 * If you wish to attempt a repair, execute the "LDCA R4" * 112 * (R4 points to the console area of the interrupted routine). * 113 * You are then back at the instruction that caused the trap and * 114 * may take whatever actions are required to repair the system. * 115 * * 116 ********************************************************************************** 117 118 * \ / 02404 00130000 119 HALT HALTS0000 page fault with no user session running 120 * --- 02405 01130000 4 REG 121 LDCA R4 for system debuggers, P.T. Barnum was right! 122 * --- 123 00002406 124 PFHVPSA LABEL 02406 6001F00E 0 125 LD R0 UMEMPSA do the mapped in virtual tables 02407 64000413 0 126 CPR R0 CMAPPSA ... match the current process? 02408 FE02240A 127 JEQ PFMAPOK jump if we've got the right guy mapped in 128 * \ / 129 130 ********************************************************************************** 131 * * 132 * The virtual free storage we have mapped in is not for * 133 * the guy who page faulted. All I can say is to back track * 134 * through the subroutine calls in an attempt to find the mix * 135 * up. * 136 * * 137 ********************************************************************************** 138 139 * \ / 02409 00130008 140 HALT HALTS0008 wrong memory lists mapped in 141 * --- 142 0000240A 143 PFMAPOK LABEL 144 * get stack associated with the new CA 145 SETSP 0240A 81538000 6 REG 145 STCAR SP 0240B 6197880D 6 6 BASE 145 LD SP SP,CASTACKPTR 0240C 61979020 6 6 REG 145 LD SP SP+(2 POWER STAKLOG) 0240D 61D2C000 7 3 REG 146 LD R7 R3 copy page number where violation occurred 0240E F6BE2419 2 147 JBT R2/BIT 31 PFEXCLUDED excluded memory, different treatment 148 * \ / 149 150 ********************************************************************************** 151 * * 152 * PROTECT VIOLATION * 153 * This code is entered when a page already exists, but is * 154 * read only. The normal treatment of this condition is to give * 155 * the user a protect violation. However, if the VPCNTLOCB bit * 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 365 (PFPROC) F 22 Page Fault Processor - PFPROC routine 156 * is set, we give the user a copy of the page to dabble with. * 157 * * 158 ********************************************************************************** 159 160 * R2=REASON, R3=fault page number, R4 => old CA, SP, R7=VPN 161 162 * \ / 0240F 65C40085 7 IMM 163 CPR R7 HIUSERPAGE above highest in user VM list? 02410 FE0A2412 164 JLE USERVI jump if in user memory 165 * \ / 166 167 ********************************************************************************** 168 * * 169 * A store reference has been made to a monitor page. * 170 * This is definitely a no-no. This probably means that some * 171 * free storage points off into the night (monitor). If the * 172 * problem can be repaired (lists fixed or whatever), the * 173 * system may be restarted by doing a LDCA R4. R4 points to * 174 * the console area of the program that attempted the store. * 175 * Good luck. * 176 * * 177 ********************************************************************************** 178 179 * \ / 02411 00130001 180 HALT HALTS0001 monitor memory protect violation 181 * --- 182 00002412 183 USERVI LABEL 02412 6013C000 0 7 REG 184 LD R0 R7 copy the virtual page number 02413 60400412 1 185 LD R1 CPPSA and the PSA pointer 02414 DC40265F 186 CALLNP FINDVP look for the virtual page element 02415 00130002 187 HALT HALTS0002 VPAGE element not found 188 * (this was a store reference to a RO page. 189 * It MUST already exist!) 190 191 * R3=fault page number, R4 => old CA, VPP=>VPAGE, SP, R7=VPN 192 02416 5C095810 5 ZBM 193 CMZ VPP,VPCNTL/VPCNTLOCB is the user allowed a copy? 02417 FE0224BD 194 JEQ PROTECTED jump if not, protect violation 02418 FE0E246A 195 JMP OWNCOPY else it's an own-copy page 196 * --- 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 366 (PFPROC) F 22 Page Fault Processor - PFPROC routine 198 199 ********************************************************************************** 200 * * 201 * EXCLUDED PAGE * 202 * The user has referenced a page that is not mapped at all. * 203 * There are three possibilities: * 204 * 1) The page has never been referenced or specified. * 205 * We will supply a zeropage. * 206 * 2) The page has been specified as 'excluded'. We * 207 * give the user a protect violation. * 208 * 3) Otherwise, it is a normal page request. * 209 * * 210 ********************************************************************************** 211 00002419 212 PFEXCLUDED LABEL 213 214 * R2=REASON, R3=fault page number, R4 => old CA, SP, R7=VPN 215 02419 65C40085 7 IMM 216 CPR R7 HIUSERPAGE above highest in user VM list? 0241A FE0A2422 217 JLE PFUPAGE jump if a user page 218 * \ / 219 220 ********************************************************************************** 221 * * 222 * The page was a monitor page. Ensure that the * 223 * reference was not for a store, and search the MONVM list * 224 * for its VP element. * 225 * * 226 ********************************************************************************** 227 228 * \ / 0241B F2BC241D 2 229 JBF R2/BIT 30 MONREAD jump if read operation 230 231 ********************************************************************************** 232 * * 233 * A store reference has been make to a monitor page not * 234 * presently mapped. Look for bad monitor free storage. * 235 * If the problem can be fixed, the system may be restarted * 236 * with a LDCA R4. R4 points to the bad guys console area. * 237 * * 238 ********************************************************************************** 239 0241C 00130004 240 HALT HALTS0004 write into monitor memory 241 * --- 242 0000241D 243 MONREAD LABEL 0241D E4C0045E 3 244 ST R3 FNDVPFPN save this users page number 0241E 61401ECB 5 245 LD VPP MONVM get pointer to monitor VM list 0241F 3DD74004 7 5 CACH 246 LSRCH R7 VPP,VPVPN look for the proper page 02420 FE022426 247 JEQ PFUVIRT process a known monitor page 248 * \ / 249 250 ********************************************************************************** 251 * * 252 * A reference has been made to a monitor page that does * 253 * not exist. The most likely cause is a zero base register * 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 367 (PFPROC) F 22 Page Fault Processor - PFPROC routine 254 * (i.e. screwed up list pointers or, even worse, mangled free * 255 * storage). If the problem can be fixed (lists repaired or * 256 * whatever) the process may be restarted by a LDCA R4. R4 * 257 * points to the console area of he who tried the reference. * 258 * Good luck. * 259 * * 260 ********************************************************************************** 261 262 * \ / 02421 00130005 263 HALT HALTS0005 stop for unknown monitor page 264 * --- 265 266 ********************************************************************************** 267 * * 268 * USER PAGE * 269 * The page is a user page. Look for it in his VMLIST. * 270 * If not present, supply a zeropage. * 271 * * 272 ********************************************************************************** 273 00002422 274 PFUPAGE LABEL 02422 6013C000 0 7 REG 275 LD R0 R7 copy the virtual page number 02423 60400412 1 276 LD R1 CPPSA and the PSA pointer 02424 DC40265F 277 CALLNP FINDVP find the VP element 02425 FE0E242C 278 JMP PFMAKENEW jump if not mapped 279 * \ / 280 281 ********************************************************************************** 282 * * 283 * The VP element was found. We examine it and decode the * 284 * VPCNTL field which indicates one of the following items.. * 285 * 1) A normal page. The MS address is present in the * 286 * VP element and we use that. * 287 * 2) A zero page. We call the ADT manager to get us * 288 * an available page of mass storage. * 289 * 3) A protected page. We give back the error to the user. * 290 * 4) A no-read page. If we can find the page resident, * 291 * we give it to the requesting process. If it is no * 292 * longer resident, we treat this request as a zero * 293 * page request. * 294 * After that decode, if the requested page was not found * 295 * resident, we call the MS driver to make the indicated page * 296 * available. In the case of zero page, we still call the MS * 297 * driver, since it must also manage the acquisition of * 298 * available resident pages of memory. * 299 * After the call to the MS driver, we suspend this * 300 * process in the MSWAIT scheduler queue. * 301 * * 302 ********************************************************************************** 303 304 * \ / 00002426 305 PFUVIRT LABEL the virtual page is known 306 307 * R4 => old CA, VPP=VPAGE, SP, R7=VPN 308 02426 60095420 0 5 ZBM 309 LD R0 VPP,VPCNTL/VPCNTLSRF get zeropage, excluded, no read field 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 368 (PFPROC) F 22 Page Fault Processor - PFPROC routine 02427 5CA02428 0 310 LDPC VPUVITAB(R0) 311 * --- 312 00002428 313 VPUVITAB LABEL 02428 000024C1 314 ADR NORMALPAGE 02429 0000242E 315 ADR ZEROPAGE 0242A 000024BD 316 ADR PROTECTED 0242B 000024CF 317 ADR NOREADPAGE 318 319 ********************************************************************************** 320 * * 321 * The corresponding virtual page is unknown to this * 322 * user. We will make a VM list entry for a zeropage and put * 323 * a request for a zeropage into the MSQ. * 324 * * 325 ********************************************************************************** 326 327 * SP, R7=VPN 328 0000242C 329 PFMAKENEW LABEL 0242C F3F0242E 7 330 JBF R7/MONBIT ZEROPAGE jump if not a user window ref 331 * \ / 332 333 ********************************************************************************** 334 * * 335 * The page referenced by the process is in the range * 336 * from 80 to HIUSERPAGE. Of these pages, page faults are only * 337 * allowed on the windows, which must be mapped prior to any * 338 * reference. * 339 * If the problem can be fixed, the process may be restarted * 340 * with a LDCA R4. * 341 * R4 => CA of the offending process * 342 * * 343 ********************************************************************************** 344 345 * \ / 0242D 00130007 346 HALT HALTS0007 reference to an unmapped window, die 347 * --- 348 349 END PFPROC routine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 369 (PFPROC) F 22 Page Fault Processor - ZEROPAGE Routine 352 353 ********************************************************************************** 354 * * 355 * Routine to handle zero-page requests. We: * 356 * 1. Check for trouble-maker and shut this guy down if necessary. * 357 * 2. Create a VPP if we don't already have one. * 358 * 3. Allocate a disk block for the new page. * 359 * 4. Shut down the user and ask the disk driver to supply * 360 * the page of zeros. * 361 * * 362 * R5 => VPP, or zero if none * 363 * FNDVPFPN = original page number * 364 * FNDVPPN = page number after equivalencing * 365 * FNDVPLPSA = ptr to PSA owning page after equivalencing * 366 * FNDVPVMR = ptr to root of VM list after equivalencing * 367 * JMP ZEROPAGE * 368 * * 369 * Exits to DISPATCH. * 370 * * 371 * Stack required = 15 * 372 * 0 + max ( ADDSWAP (1), DROPCA (3), FCGETMEM (0), * 373 * GETFREEBLK (15), GRABCA (4), LOCKWAIT (0), * 374 * MSREADREQ (1), MSSHUTDOWN (14), TESTTRUBL (13), * 375 * UERRSET (1) ) * 376 * * 377 ********************************************************************************** 378 379 BLOCK ZEROPAGE routine 380 ENTRY ZEROPAGE 381 0000242E 382 ZEROPAGE LABEL 0242E DC402BF3 383 CALLNP TESTTRUBL check for this user a trouble maker 0242F FB722442 5 384 JNZA VPP HAVEVPP jump if we already have a VP element 385 02430 DC002F0A 386 CALL VGETMEM get a piece of storage 02431 40440002 IMM 387 PARVL VPLOG indicate its length 388 02432 61520000 5 0 REG 389 LD VPP R0 make the index point at the new block 02433 EE174800 5 BASE 390 STZ2 VPP,0 clear the element 02434 EE174802 5 BASE 391 STZ2 VPP,2 02435 6000045F 0 392 LD R0 FNDVPPN load the virtual page number 02436 E4174004 0 5 CACH 393 ST R0 VPP,VPVPN set the virtual page number 02437 60040008 0 IMM 394 LD R0 VPZEROPG get the value for zero page request 02438 E4094E80 0 5 ZBM 395 ST R0 VPP,VPCNTL set control field to indicate zero page 02439 6000045D 0 396 LD R0 FNDVPLPSA get the PSA containing the VPP 0243A 60081F13 0 0 ZBM 397 LD R0 R0,PSUSERLIMP get the user limit block 0243B 60080081 0 0 ZBM 398 LD R0 R0,ULDRIVE get the volume number 0243C E4094083 0 5 ZBM 399 ST R0 VPP,VPDRIVE indicate where the page is 0243D 60043F8B 0 IMM 400 LD R0 FBITSYS*VPFBINEWB+FBITFREE*VPFBIOLDB 0243E E40942E2 0 5 ZBM 401 ST R0 VPP,VPFBITYPE indicate swapping memory 0243F 60100460 0 @ 402 LD R0 @FNDVPVMR get pointer to VM list 02440 E4095F10 0 5 ZBM 403 ST R0 VPP,VPLINK set forward link 02441 E5500460 5 @ 404 ST VPP @FNDVPVMR place new entry at list head 00002442 405 HAVEVPP LABEL 406 * \ / 407 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 370 (PFPROC) F 22 Page Fault Processor - ZEROPAGE Routine 02442 60095072 0 5 ZBM 408 LD R0 VPP,VPFBITYPE/VPFBINEWB 02443 6404000B 0 IMM 409 CPR R0 FBITSYS is this to be a swapping page? 02444 FE0C2447 410 JNE NOTSWAP jump if not 02445 DC40257E 411 CALLNP ADDSWAP check for excessive disk space used 02446 FE0E2467 412 JMP LIMEXCEED give error if too much space in use 413 * \ / 00002447 414 NOTSWAP LABEL 415 416 ********************************************************************************** 417 * * 418 * Request a free MS block ( from the ADT ) * 419 * * 420 ********************************************************************************** 421 422 * \ / 02447 DC00284A 423 CALL GRABCA get a new console area 02448 40000406 424 PARL IVTPAGE for the IVT 425 02449 61C0045E 7 426 LD R7 FNDVPFPN get the page number that we were looking for 0244A DC003654 427 CALL GETFREEBLK call for a MS block 0244B 41495072 5 ZBM 428 PARV VPP,VPFBINEW pass the type it will become 0244C 40494083 5 ZBM 429 PARVL VPP,VPDRIVE specify volume to be used 0244D E5C0045E 7 430 ST R7 FNDVPFPN save original page number 0244E FE042461 431 JGT NODISKSPC out of storage 0244F E4174803 0 5 BASE 432 ST R0 VPP,VPBLOCK save the newly acquired block 433 * \ / 02450 DC40285A 434 CALLNP DROPCA remove extra console area 435 * \ / 02451 EC095420 5 ZBM 436 STZ VPP,VPCNTL/VPCNTLSRF clear the zero page request 02452 60974803 2 5 BASE 437 LD R2 VPP,VPBLOCK get the new MS address 02453 61C94E30 7 5 ZBM 438 LD R7 VPP,VPCNTL/VPMAIFLD save maintenance field 02454 DC402533 439 CALLNP MSSHUTDOWN shut down user to wait for page 440 * \ / 441 442 ********************************************************************************** 443 * * 444 * The user may be inserted into the MSWAIT queue with * 445 * the MSQIN having been unlocked because no other CPU may * 446 * have a existing request for this block. * 447 * * 448 ********************************************************************************** 449 450 * \ / 451 PLOCK MSQINLOCK call to lock the mass storage input queue 02455 0CC00000 451 IOFF 02456 D1C01F16 451 SETT MSQINLOCK 02457 FE0C2459 451 JNE MA(2+DISPW MA 0) 02458 DC40308B 451 CALLNP LOCKWAIT 02459 61128000 4 2 REG 452 LD R4 R2 and the 'actual' ms address (same) 0245A 61440003 5 IMM 453 LD R5 1*MSQZPAGE+1*MSQSNEWAD request type 0245B E5CB7430 7 5 CBM 454 ST R7 R5/MSQMAIFLD and combine the two 0245C DC003936 455 CALL MSREADREQ call for a MS transfer 0245D 40534000 5 REG 456 PARVL R5 indicate nature of request 457 PUNLOCK MSQINLOCK call to release the mass storage input queue 0245E EC001F16 457 STZ MSQINLOCK 0245F 0C800000 457 ION 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 371 (PFPROC) F 22 Page Fault Processor - ZEROPAGE Routine 02460 FE0E28B7 458 JMP DISPATCH look for a new user 459 * --- 460 461 ********************************************************************************** 462 * * 463 * Here, we ran out of disk space. The poor user will * 464 * get an error. * 465 * * 466 ********************************************************************************** 467 00002461 468 NODISKSPC LABEL 02461 DC402596 469 CALLNP DELSWAP restore space used totals 02462 DC40285A 470 CALLNP DROPCA remove the extra console area 02463 60840872 2 IMM 471 LD R2 UINTVMFIDS+VERYBAD error code 00002464 472 PUTERROR LABEL 02464 60C0045E 3 473 LD R3 FNDVPFPN block number 02465 DC403589 474 CALLNP UERRSET place the error 02466 FE0E28B7 475 JMP DISPATCH and all done 476 * --- 477 00002467 478 LIMEXCEED LABEL 02467 60920000 2 0 REG 479 LD R2 R0 put error code into R2 02468 7C840800 2 IMM 480 IOR R2 VERYBAD error must not be put off 02469 FE0E2464 481 JMP PUTERROR share code 482 * --- 483 484 END ZEROPAGE routine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 372 (PFPROC) F 22 Page Fault Processor - OWNCOPY Routine 487 488 ********************************************************************************** 489 * * 490 * Routine to give a user his own copy of a page that he * 491 * already has read/only. * 492 * * 493 * R5 => VPP for page (after equivalencing) * 494 * FNDVPFPN = page number of original fault * 495 * FNDVPLPSA = ptr to PSA of process owning page * 496 * JMP OWNCOPY * 497 * * 498 * Exit to DISPATCH. * 499 * * 500 * Actions: * 501 * 1. Check for trouble-makers. * 502 * 2. Get new disk block number to give as own copy. * 503 * 3. Remove PAL for read-only page, if any. * 504 * 4. Remove PAL from original owner of page, if any. * 505 * 5. Shut down the user and tell MSPROC to perform an address switch. * 506 * * 507 * Stack required = 19 * 508 * 4 + max ( ADDSWAP (1), DISCARDPAL (4), DMOTINDPAL (2), * 509 * DROPCA (3), GETFREEBLK (15), GRABCA (4), * 510 * LOCKWAIT (0), MSREADREQ (1), MSSHUTDOWN (14), * 511 * TESTTRUBL (13), UERRSET (1), UNLOPAL (0) ) * 512 * * 513 ********************************************************************************** 514 515 BLOCK OWNCOPY routine 516 ENTRY OWNCOPY 517 518 BEGFRAME2 00178800 6 BASE 519 SAVEAREA BSS 2 save area for FNDVPFPN and FNDVPLPSA 00178802 6 BASE 520 SAVEUPC BSS 1 save area for UPC pointer 00178803 6 BASE 521 SAVEOBLK BSS 1 save area for old block number 522 ENDFRAME 523 0000246A 524 OWNCOPY LABEL 0246A EC1F8004 6 STAK 525 STZ PUSH allocate a stack frame 526 527 ********************************************************************************** 528 * * 529 * We must check for system overload before we have * 530 * altered the lists controlling memory. If the user is a * 531 * troublemaker and is put in jail, we must be able to restart * 532 * him and have him reappear at this point in the page fault * 533 * processor with exactly the same situation reflected by his * 534 * PSA and lists. This way, we need not store all sorts of * 535 * bizarre information to ensure a correct restart. * 536 * Note that this call to TESTTRUBL may take pages away * 537 * from us (either VASP or WSX), including possibly the page * 538 * that we faulted on. * 539 * * 540 ********************************************************************************** 541 0246B DC402BF3 542 CALLNP TESTTRUBL check for system overload 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 373 (PFPROC) F 22 Page Fault Processor - OWNCOPY Routine 0246C 60174803 0 5 BASE 543 LD R0 VPP,VPBLOCK find corresponding MS address 0246D E4178803 0 6 BASE 544 ST R0 SP,SAVEOBLK save for later use 545 * \ / 546 547 ********************************************************************************** 548 * * 549 * Request a free MS block ( from the ADT ) We fetch a * 550 * free console area and swap it with the current one so that * 551 * we can get another page fault. * 552 * * 553 ********************************************************************************** 554 0246E DC40257E 555 CALLNP ADDSWAP do accounting for the MS space 0246F FE0E24BA 556 JMP LIMEXCEED return for limit error 557 * \ / 02470 DC00284A 558 CALL GRABCA 02471 40000406 559 PARL IVTPAGE 560 * \ / 02472 6000045E 0 561 LD R0 FNDVPFPN get the page number that we were looking for 02473 6040045D 1 562 LD R1 FNDVPLPSA and the PSA where we found it 02474 E6178800 016 BASE 563 ST2 R0 SP,SAVEAREA save info required to find page owner 02475 60000461 0 564 LD R0 FNDVPUPC get pointer to owners UPC 02476 E4178802 0 6 BASE 565 ST R0 SP,SAVEUPC save this also 02477 60085F13 0 1 ZBM 566 LD R0 R1,PSUSERLIMP get the users ULB 02478 60480081 1 0 ZBM 567 LD R1 R0,ULDRIVE get this users volume for swapping pages 02479 DC003654 568 CALL GETFREEBLK call for a MS block 0247A 4144000B IMM 569 PARV FBITSYS indicate the new block type 0247B 40524000 1 REG 570 PARVL R1 specify volume to be used 0247C 62978800 236 BASE 571 LD2 R2 SP,SAVEAREA retrieve FINDVP info from the stack 0247D E480045E 2 572 ST R2 FNDVPFPN save back the page number 0247E E4C0045D 3 573 ST R3 FNDVPLPSA and PSA pointer 0247F FE0424B5 574 JGT NODISKSPC out of storage 02480 E4174803 0 5 BASE 575 ST R0 VPP,VPBLOCK save the newly acquired block 02481 60978802 2 6 BASE 576 LD R2 SP,SAVEUPC recover pointer to owners UPC 02482 E4800461 2 577 ST R2 FNDVPUPC save back in correct location 02483 EC095F12 5 ZBM 578 STZ VPP,VPERAD user default error address for swapping pages 02484 6004000B 0 IMM 579 LD R0 FBITSYS load code that sez system use 02485 E0095072 0 5 ZBM 580 EXCH R0 VPP,VPFBINEW change type and retrieve old type 02486 E4094272 0 5 ZBM 581 ST R0 VPP,VPFBIOLD save expected old type for error check 02487 EC095F11 5 ZBM 582 STZ VPP,VPFCB indicate not part of lun 02488 6047FFFA 1 IMM 583 LD R1 NOT (VPCNTLRO+VPCNTLOC) read only and own copy bits 02489 F8494E80 1 5 ZBM 584 ANDM R1 VPP,VPCNTL remove bits from VPAGE element 585 0248A DC40285A 586 CALLNP DROPCA give back the console area in use 587 * \ / 588 589 ********************************************************************************** 590 * * 591 * We will take away the access that this user currently * 592 * has and put in a mass storage request for the desired page * 593 * with the right kind of access. * 594 * Note that if the page should happen to be locked, the * 595 * new one will be also, and the old PAL will be unlocked by * 596 * virtue of being destroyed. * 597 * Find the PAL, unload the page file, and discard the * 598 * PAL. * 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 374 (PFPROC) F 22 Page Fault Processor - OWNCOPY Routine 599 * * 600 ********************************************************************************** 601 0248B 60C00414 3 602 LD R3 CPCUPC get the current pointer 0248C 6000045E 0 603 LD R0 FNDVPFPN get the virtual page number 0248D 6056C80F 1 3 BASE 604 LD R1 R3,UPCVASP R1 => first element 0248E 3896C80F 2 3 BASE 605 LEA R2 R3,UPCVASP R2 => root of the list 0248F 48164000 0 1 CACH 606 RLSRCH R0 R1,PAVPN find the element for this 02490 FE0C24A5 607 JNE PFWTTX not found means it has aged out 02491 60085F10 0 1 ZBM 608 LD R0 R1,PALINK get pointer to what's after found 02492 E4089F10 0 2 ZBM 609 ST R0 R2,PALINK remove this element 02493 61124000 4 1 REG 610 LD PAL R1 PAL => found element 02494 DC402623 611 CALLNP UNLOPAL call to unload the page file location 02495 DC402E15 612 CALLNP DISCARDPAL get rid of the PAL 02496 60C00412 3 613 LD R3 CPPSA get the current PSA pointer 02497 D048C0F2 3 ZBM 614 DEC R3,PSWSSIZE indicate working set just shrunk 615 * \ / 616 617 ********************************************************************************** 618 * * 619 * See if this page is an indirect VP reference and, if * 620 * so, we must remove the old block from the working set of * 621 * the real pages owner over/under process. * 622 * * 623 ********************************************************************************** 624 625 * R3 => PSA, VPP => VPAGE, SP 626 627 * \ / 02498 60C00461 3 628 LD R3 FNDVPUPC copy the owners UPC pointer 02499 FAC224A6 3 629 JEQZ R3 NOTINDIRCT jump if not indirect page 0249A 60174004 0 5 CACH 630 LD R0 VPP,VPVPN get the virtual page number 0249B 6056C80F 1 3 BASE 631 LD R1 R3,UPCVASP R1 => first element 0249C 3896C80F 2 3 BASE 632 LEA R2 R3,UPCVASP R2 => root of the list 0249D 48164000 0 1 CACH 633 RLSRCH R0 R1,PAVPN find the element for this 0249E FE0C24A5 634 JNE PFWTTX not found means it has aged out 0249F 60085F10 0 1 ZBM 635 LD R0 R1,PALINK get pointer to what's after found 024A0 E4089F10 0 2 ZBM 636 ST R0 R2,PALINK remove this element 024A1 61124000 4 1 REG 637 LD PAL R1 PAL => found element 024A2 DC402E15 638 CALLNP DISCARDPAL remove it from the working set 024A3 60C00412 3 639 LD R3 CPPSA get the current PSA pointer 024A4 D048C0F2 3 ZBM 640 DEC R3,PSWSSIZE indicate working set just shrunk 000024A5 641 PFWTTX LABEL 024A5 DC403165 642 CALLNP DMOTINDPAL move all PAL's for indirect pages to WSX 000024A6 643 NOTINDIRCT LABEL 644 * \ / 645 646 * VPP=>VPAGE, SP 647 648 * \ / 649 ********************************************************************************** 650 * * 651 * Note that we have already ensured that this user is * 652 * not a troublemaker. We must not call TESTTRUBL here, since * 653 * it would not be possible to restart the user correctly if * 654 * he were put in jail. * 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 375 (PFPROC) F 22 Page Fault Processor - OWNCOPY Routine 655 * The user may be shut down with MSQIN unlocked. The * 656 * mass storage queuer can not find a duplicate because a free * 657 * block is being requested. * 658 * * 659 ********************************************************************************** 660 661 * \ / 024A6 60974803 2 5 BASE 662 LD R2 VPP,VPBLOCK fetch new MS address 024A7 61C94E30 7 5 ZBM 663 LD R7 VPP,VPCNTL/VPMAIFLD maintenance field 024A8 DC402533 664 CALLNP MSSHUTDOWN shut down user to wait for page 665 666 * SP, R7=maintenance bits 667 668 PLOCK MSQINLOCK call to lock the mass storage input queue 024A9 0CC00000 668 IOFF 024AA D1C01F16 668 SETT MSQINLOCK 024AB FE0C24AD 668 JNE MA(2+DISPW MA 0) 024AC DC40308B 668 CALLNP LOCKWAIT 024AD 61178803 4 6 BASE 669 LD R4 SP,SAVEOBLK copy parameter (actual (or old) MS address) 024AE 61440001 5 IMM 670 LD R5 1*MSQSNEWAD request type 024AF E5CB7430 7 5 CBM 671 ST R7 R5/MSQMAIFLD and combine the two 024B0 DC003936 672 CALL MSREADREQ call for a MS transfer 024B1 40534000 5 REG 673 PARVL R5 indicate nature of request 674 PUNLOCK MSQINLOCK call to release the mass storage input queue 024B2 EC001F16 674 STZ MSQINLOCK 024B3 0C800000 674 ION 024B4 FE0E28B7 675 JMP DISPATCH look for someone to run 676 * --- 677 000024B5 678 NODISKSPC LABEL 024B5 DC40285A 679 CALLNP DROPCA remove the extra console area 024B6 60840872 2 IMM 680 LD R2 UINTVMFIDS+VERYBAD error code: insufficient disk space 000024B7 681 PUTERROR LABEL 024B7 60C0045E 3 682 LD R3 FNDVPFPN error parm: page number 024B8 DC403589 683 CALLNP UERRSET set the error 024B9 FE0E28B7 684 JMP DISPATCH and all done 685 * --- 000024BA 686 LIMEXCEED LABEL 024BA 60920000 2 0 REG 687 LD R2 R0 put error code into R2 024BB 7C840800 2 IMM 688 IOR R2 VERYBAD error must not be put off 024BC FE0E24B7 689 JMP PUTERROR share code 690 * --- 691 692 END OWNCOPY routine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 376 (PFPROC) F 22 Page Fault Processor - PROTECTED Routine 695 696 ********************************************************************************** 697 * * 698 * Routine to handle access to a user excluded page. * 699 * It's easy: We just give the poor slob an error. * 700 * * 701 * FNDVPFPN = page number of original fault * 702 * JMP PROTECTED * 703 * * 704 * Exits to DISPATCH. * 705 * Stack required = 1. * 706 * 0 + max ( UERRSET (1) ) * 707 * * 708 ********************************************************************************** 709 710 BLOCK PROTECTED routine 711 ENTRY PROTECTED 712 000024BD 713 PROTECTED LABEL 024BD 60840874 2 IMM 714 LD R2 UINTMPV+VERYBAD memory protect violation 024BE 60C0045E 3 715 LD R3 FNDVPFPN param is the page number 024BF DC403589 716 CALLNP UERRSET give the guy the error 024C0 FE0E28B7 717 JMP DISPATCH return to user to process error 718 * --- 719 720 END PROTECTED routine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 377 (PFPROC) F 22 Page Fault Processor - NORMALPAGE Routine 723 724 ********************************************************************************** 725 * * 726 * Routine to handle a normal page request (i.e., not * 727 * zero page or own copy). We proceed as follows: * 728 * * 729 * 1. Try to find the page resident. * 730 * 2. Otherwise, shut the user down and tell MSPROC that * 731 * we need the page. * 732 * * 733 * R5 => VPP element (after equivalencing) * 734 * FNDVPFPN = original page number * 735 * JMP NORMALPAGE * 736 * * 737 * Exits to DISPATCH. * 738 * * 739 * Stack required = 15. * 740 * 0 + max ( FINDRESPAG (15), MSREADREQ (1), MSSHUTDOWN (14), * 741 * TESTTRUBL (13) ) * 742 * * 743 ********************************************************************************** 744 745 BLOCK NORMALPAGE routine 746 ENTRY NORMALPAGE 747 000024C1 748 NORMALPAGE LABEL 024C1 DC402BF3 749 CALLNP TESTTRUBL check for any troublemakers 024C2 DC4024ED 750 CALLNP FINDRESPAG check if the page is still resident 024C3 FE0E28B7 751 JMP DISPATCH yes, we found it 752 * \ / 753 754 ********************************************************************************** 755 * * 756 * The desired page is unavailable. We put in a request * 757 * for this page and move this user into the MSWAIT queue. * 758 * * 759 ********************************************************************************** 760 761 * VPP =>VPAGE, SP 762 * lists locked: MSQIN 763 024C4 60974803 2 5 BASE 764 LD R2 VPP,VPBLOCK fetch the old MS address 024C5 61C94E30 7 5 ZBM 765 LD R7 VPP,VPCNTL/VPMAIFLD maintenance field 024C6 DC402533 766 CALLNP MSSHUTDOWN shut down user to wait for page 024C7 61128000 4 2 REG 767 LD R4 R2 re-fetch MS address 024C8 61440000 5 IMM 768 LD R5 0 request type, normal 024C9 E5CB7430 7 5 CBM 769 ST R7 R5/MSQMAIFLD and combine the two 024CA DC003936 770 CALL MSREADREQ call for a MS transfer 024CB 40534000 5 REG 771 PARVL R5 indicate nature of request 772 PUNLOCK MSQINLOCK release MS input queue 024CC EC001F16 772 STZ MSQINLOCK 024CD 0C800000 772 ION 024CE FE0E28B7 773 JMP DISPATCH go to pick up a new user 774 * --- 775 776 END NORMALPAGE routine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 378 (PFPROC) F 22 Page Fault Processor - NOREADPAGE routine 779 780 ********************************************************************************** 781 * * 782 * Routine to handle a no read page request (i.e., if * 783 * resident, give to user, otherwise, supply zeropage). We * 784 * proceed as follows: * 785 * * 786 * 1. Try to find the page resident. * 787 * 2. Otherwise, shut the user down and tell MSPROC that * 788 * we need a zero page. * 789 * * 790 * R5 => VPP element (after equivalencing) * 791 * FNDVPFPN = original page number * 792 * JMP NOREADPAGE * 793 * * 794 * Exits to DISPATCH. * 795 * * 796 * Stack required = 15. * 797 * 0 + max ( FINDRESPAGE (15), MSREADREQ (1), MSSHUTDOWN (14), * 798 * TESTTRUBL (13) ) * 799 * * 800 ********************************************************************************** 801 802 BLOCK NOREADPAGE 803 ENTRY NOREADPAGE 804 000024CF 805 NOREADPAGE LABEL 024CF DC402BF3 806 CALLNP TESTTRUBL check for troublemakers 024D0 EC095420 5 ZBM 807 STZ VPP,VPCNTL/VPCNTLSRF clear the request field 024D1 DC4024ED 808 CALLNP FINDRESPAG check if page is still resident 024D2 FE0E28B7 809 JMP DISPATCH yes, it was resident 810 * \ / 811 812 ********************************************************************************** 813 * * 814 * The desired page seems to be unavailable. We put in a * 815 * request for this page and move this user into the MSWAIT * 816 * queue. * 817 * * 818 ********************************************************************************** 819 820 * VPP =>VPAGE, SP 821 * lists locked: MSQIN 822 024D3 60974803 2 5 BASE 823 LD R2 VPP,VPBLOCK get the new MS address 024D4 61C94E30 7 5 ZBM 824 LD R7 VPP,VPCNTL/VPMAIFLD maintenance field 024D5 DC402533 825 CALLNP MSSHUTDOWN shut down user to wait for page 024D6 61128000 4 2 REG 826 LD R4 R2 and the 'actual' ms address (same) 024D7 61440003 5 IMM 827 LD R5 1*MSQZPAGE+1*MSQSNEWAD indicate nature of request 024D8 E5CB7430 7 5 CBM 828 ST R7 R5/MSQMAIFLD and combine the two 024D9 DC003936 829 CALL MSREADREQ call for a MS transfer 024DA 40534000 5 REG 830 PARVL R5 indicate nature of request 831 PUNLOCK MSQINLOCK call to release the MS input queue 024DB EC001F16 831 STZ MSQINLOCK 024DC 0C800000 831 ION 024DD FE0E28B7 832 JMP DISPATCH look for a new user 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 379 (PFPROC) F 22 Page Fault Processor - NOREADPAGE routine 833 * --- 834 835 END NOREADPAGE routine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 380 (PFPROC) F 22 Page Fault Processor - SRCHWSX routine 838 839 ********************************************************************************** 840 * * 841 * This routine only searches the working set extension * 842 * list to see if the page is resident. If so we reuse the * 843 * PAL, otherwise we must look elsewhere for the page, in the * 844 * hopes that the page may still be resident. Call: * 845 * * 846 * PPL * 847 * R5 => VPP * 848 * FNDVPFPN = original page # * 849 * FNDVPUPC = indirect VP UPC, if any * 850 * CALLNP SRCHWSX * 851 * JMP * 852 * * 853 * * 854 * Eats R0:R3. PAL ptr returned in R3. * 855 * Stack required = 9 * 856 * 1 + max ( REUSEPAL (8) ) * 857 * * 858 ********************************************************************************** 859 860 BLOCK SRCHWSX routine 861 ENTRY SRCHWSX 862 863 BEGFRAME 864 ENDFRAME 865 024DE DD5F8001 6 STAK 866 SRCHWSX ENTRNP PUSH 024DF 60800414 2 867 LD R2 CPCUPC get the current UPC pointer 024E0 38D68810 3 2 BASE 868 LEA R3 R2,UPCWSX point to the root of WSX list 024E1 60968810 2 2 BASE 869 LD R2 R2,UPCWSX point to first element of WSX 024E2 49168803 4 2 BASE 870 RLSRCH PPL R2,PAPPLPTR look for a matching PAL 024E3 FE0C24EC 871 JNE PFNOTWSX jump if not found in WSX 872 * \ / 873 874 * The page is in the working-set extension list. Use it. 875 876 * \ / 024E4 60089F10 0 2 ZBM 877 LD R0 R2,PALINK get pointer to stuff after 024E5 E408DF10 0 3 ZBM 878 ST R0 R3,PALINK remove found element from list 024E6 60D28000 3 2 REG 879 LD R3 R2 R3 => unlinked PAL 880 * \ / 881 882 * R3 => PAL, PPL, VPP, SP 883 884 * \ / 024E7 DC002643 885 CALL REUSEPAL set up to reuse this PAL 024E8 41400461 886 PARV FNDVPUPC pass indirect VP UPC 024E9 4140045E 887 PARV FNDVPFPN actual page number 024EA 40400412 888 PARVL CPPSA pointer to PSA 889 * \ / 890 000024EB 891 TAKEOFF LABEL 024EB 5D1F8001 6 STAK 892 LEAVE POP and go run this guy 893 * --- 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 381 (PFPROC) F 22 Page Fault Processor - SRCHWSX routine 894 000024EC 895 PFNOTWSX LABEL 024EC FBE024EB 7 896 IRJ R7 TAKEOFF the page is not in the WSX list 897 * --- 898 899 END SRCHWSX routine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 382 (PFPROC) F 22 Page Fault Processor - FINDRESPAG routine 902 903 ********************************************************************************** 904 * * 905 * This routine will look to see if the block is resident * 906 * at this time. We will lock all lists where the page might * 907 * be in order to prevent another processor from moving a page * 908 * around our search. These locks always take place in the * 909 * same order to prevent deadlock. This order is: * 910 * * 911 * MSQIN * 912 * any SQ * 913 * PPAGE * 914 * PPIDLE * 915 * MSQOUT * 916 * * 917 * If the page is found we will make a PAL for the page * 918 * and allow the user to continue on his way. However if the * 919 * page is not found, or is being force written, then we must * 920 * shut the user down and request the page from the disk * 921 * driver. (This subroutine should really call BLKREADIN). * 922 * Call: * 923 * R5 => VPP * 924 * CALLNP FINDRESPAG * 925 * JMP * 926 * * 927 * * 928 * Eats R0:R4. * 929 * Stack required = 15 * 930 * 1 + max ( LOCKWAIT (0), LOPFPAL (0), MAKEPAL (8), * 931 * MSSHUTDOWN (14), SRCHWSX (9) ) * 932 * * 933 ********************************************************************************** 934 935 BLOCK FINDRESPAG routine 936 ENTRY FINDRESPAG 937 938 BEGFRAME 939 ENDFRAME 940 941 024ED DD5F8001 6 STAK 942 FINDRESPAG ENTRNP PUSH 024EE 60D74803 3 5 BASE 943 LD R3 VPP,VPBLOCK retrieve the block number 024EF 608AF460 2 3 CBM 944 LD R2 R3/PPHASHFLD leave lower bits for hash code 945 946 * R2 = hash code, R3 = block number, VPP, SP 947 948 PLOCK MSQINLOCK call to lock the mass storage input queue 024F0 0CC00000 948 IOFF 024F1 D1C01F16 948 SETT MSQINLOCK 024F2 FE0C24F4 948 JNE MA(2+DISPW MA 0) 024F3 DC40308B 948 CALLNP LOCKWAIT 949 PLOCK PPAGELOCK(R2) call to lock the appropriate PPAGELIST head 024F4 0CC00000 949 IOFF 024F5 D1E41E21 2 949 SETT PPAGELOCK(R2) 024F6 FE0C24F8 949 JNE MA(2+DISPW MA 0) 024F7 DC40308B 949 CALLNP LOCKWAIT 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 383 (PFPROC) F 22 Page Fault Processor - FINDRESPAG routine 950 PLOCK PPIDLOCK call to lock the idle list 024F8 0CC00000 950 IOFF 024F9 D1C01DD9 950 SETT PPIDLOCK 024FA FE0C24FC 950 JNE MA(2+DISPW MA 0) 024FB DC40308B 950 CALLNP LOCKWAIT 024FC 61241E61 4 2 951 LD PPL PPAGELIST(R2) make pointer to first element 024FD 3CD70801 3 4 BASE 952 LSRCH R3 PPL,PPBLOCK look for the proper block 024FE FE0C250F 953 JNE PFNISHARD jump if not present in page list 954 PUNLOCK PPIDLOCK call to release the idle list 024FF EC001DD9 954 STZ PPIDLOCK 02500 0C800000 954 ION 955 * \ / 956 957 ********************************************************************************** 958 * * 959 * The desired page was found in the PPAGE list. Check * 960 * the PPL to see if this is a page being forcewritten. If it * 961 * is, we shut the user down to await completion of the force * 962 * write operation. This is done so that we may ensure that a * 963 * write is actually done before continuing a process. We * 964 * also check whether the physical page in memory is bad * 965 * (memory error). If so, we shut down the user until * 966 * recovery is complete. * 967 * * 968 ********************************************************************************** 969 970 * \ / 971 * R2 = hash code, R3 = block number, PPL, VPP, SP 972 * lists locked: MSQIN, PPAGE 973 02501 60090612 0 4 ZBM 974 LD R0 PPL,PPFWIP check the forcewrite flag 02502 7C090812 0 4 ZBM 975 IOR R0 PPL,PPMEMERR check the memory error flag 02503 FA02250A 0 976 JEQZ R0 PFNFW jump if no difficulty 977 PUNLOCK PPAGELOCK(R2) release the appropriate PPAGELIST head 02504 EC241E21 2 977 STZ PPAGELOCK(R2) 02505 0C800000 977 ION 02506 DC402533 978 CALLNP MSSHUTDOWN shut down this user 979 PUNLOCK MSQINLOCK release the mass storage input queue 02507 EC001F16 979 STZ MSQINLOCK 02508 0C800000 979 ION 02509 FE0E252C 980 JMP HAPPYEXIT go run a different user 981 * --- 982 0000250A 983 PFNFW LABEL 984 PUNLOCK MSQINLOCK call to release the mass storage input queue 0250A EC001F16 984 STZ MSQINLOCK 0250B 0C800000 984 ION 0250C DC4024DE 985 CALLNP SRCHWSX see if a PAL already exists 0250D FE0E2527 986 JMP FOUNDWSX jump if found 0250E FE0E2523 987 JMP HAVEPAGE otherwise, go build a PAL 988 * --- 989 990 ********************************************************************************** 991 * * 992 * The page was not in the page list. Check the list of * 993 * idle pages before we give up. * 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 384 (PFPROC) F 22 Page Fault Processor - FINDRESPAG routine 994 * * 995 ********************************************************************************** 996 997 * R2 = hash value, R3 = block number, VPP, SP 998 * lists locked: PPAGE, PPIDLE, MSQIN 999 0000250F 1000 PFNISHARD LABEL 0250F 608AF650 2 3 CBM 1001 LD R2 R3/IDLHASHFLD make index to proper list 02510 60241DDD 0 2 1002 LD R0 PPUSDIDLE(R2) get head element of idle list 02511 38641DDD 1 2 1003 LEA R1 PPUSDIDLE(R2) the root of the list 02512 48D60801 3 0 BASE 1004 RLSRCH R3 R0,PPBLOCK look for our block 02513 FE0C252D 1005 JNE PFNIDLE jump if not in idle list 1006 1007 * entry found in the idle page list 1008 1009 PUNLOCK MSQINLOCK call to release the mass storage input queue 02514 EC001F16 1009 STZ MSQINLOCK 02515 0C800000 1009 ION 02516 61081F10 4 0 ZBM 1010 LD PPL R0,PPLINK get pointer to what follows 02517 E5085F10 4 1 ZBM 1011 ST PPL R1,PPLINK remove this element from the queue 02518 FB32251A 4 1012 JNZA PPL PFIDJE check for removing end element from list 02519 E4641DFD 1 2 1013 ST R1 PPENDIDLE(R2) yes, we did, fix up the end pointer 1014 * \ / 1015 0000251A 1016 PFIDJE LABEL 0251A 61120000 4 0 REG 1017 LD PPL R0 PPL => found element 0251B D0401DDA 1018 DEC PPIDLCOUNT one less idle page 1019 PUNLOCK PPIDLOCK call to release the idle list 0251C EC001DD9 1019 STZ PPIDLOCK 0251D 0C800000 1019 ION 0251E 608AF460 2 3 CBM 1020 LD R2 R3/PPHASHFLD restore the proper index value 0251F 38641E61 1 2 1021 LEA R1 PPAGELIST(R2) => proper list head 02520 60085F10 0 1 ZBM 1022 LD R0 R1,PPLINK get forward pointer 02521 E4091F10 0 4 ZBM 1023 ST R0 PPL,PPLINK make this element point to list 02522 E5085F10 4 1 ZBM 1024 ST PPL R1,PPLINK set new forward pointer 1025 * \ / 1026 1027 * R3 = block number, PPL, VPP, SP 1028 * lists locked: PPAGE 1029 00002523 1030 HAVEPAGE LABEL 02523 DC002631 1031 CALL MAKEPAL make a PAL for the user 02524 41400461 1032 PARV FNDVPUPC pass indirect VP UPC 02525 4140045E 1033 PARV FNDVPFPN his page number 02526 40400412 1034 PARVL CPPSA his PSA pointer 00002527 1035 FOUNDWSX LABEL 02527 60893461 2 4 ZBM 1036 LD R2 PPL,PPBLOCK/PPHASHFLD recover the hash code 1037 PUNLOCK PPAGELOCK(R2) unlock the PPAGE list 02528 EC241E21 2 1037 STZ PPAGELOCK(R2) 02529 0C800000 1037 ION 0252A 6112C000 4 3 REG 1038 LD PAL R3 move PAL pointer to right register 0252B DC40262D 1039 CALLNP LOPFPAL load it into the page file 1040 * \ / 1041 0000252C 1042 HAPPYEXIT LABEL 0252C 5D1F8001 6 STAK 1043 LEAVE POP and go run this guy 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 385 (PFPROC) F 22 Page Fault Processor - FINDRESPAG routine 1044 * --- 1045 1046 * R3 = block number, VPP, SP 1047 * lists locked: PPAGE, PPIDLE, MSQIN 1048 0000252D 1049 PFNIDLE LABEL 0252D 608AF460 2 3 CBM 1050 LD R2 R3/PPHASHFLD restore the proper index 1051 PUNLOCK PPAGELOCK(R2) call to release the appropriate PPAGELIST head 0252E EC241E21 2 1051 STZ PPAGELOCK(R2) 0252F 0C800000 1051 ION 1052 PUNLOCK PPIDLOCK call to release the idle list 02530 EC001DD9 1052 STZ PPIDLOCK 02531 0C800000 1052 ION 02532 FBE0252C 7 1053 IRJ R7 HAPPYEXIT advance to skip return 1054 * --- 1055 1056 END FINDRESPAG routine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 386 (PFPROC) F 22 Page Fault Processor - MSSHUTDOWN routine 1059 1060 ********************************************************************************** 1061 * * 1062 * Routine to shut down a user into the MSWAIT queue. We * 1063 * will also add a little bit to his counter of CPU time used, * 1064 * so that people who do lots of disk requests and use no CPU * 1065 * time won't drive the system wild. (The CPU time used * 1066 * counter is used only for CPU scheduling.) * 1067 * * 1068 * R5 => VPP element * 1069 * FNDVPFPN = original page number * 1070 * CALLNP MSSHUTDOWN * 1071 * * 1072 * Eats R0:R1, R3:R4. * 1073 * Stack required = 14. * 1074 * 2 + max ( SHUTDOWN (12) ) * 1075 * * 1076 ********************************************************************************** 1077 1078 BLOCK MSSHUTDOWN subroutine 1079 ENTRY MSSHUTDOWN 1080 1081 BEGFRAME 00178801 6 BASE 1082 SAVER2 BSS 1 place to save Register 2 1083 ENDFRAME 1084 02533 DD5F8002 6 STAK 1085 MSSHUTDOWN ENTRNP PUSH 02534 E4978801 2 6 BASE 1086 ST R2 SP,SAVER2 into safe hiding 02535 60400412 1 1087 LD R1 CPPSA R1 -> PSA of user 02536 6000254D 0 1088 LD R0 TSMSEQUIV CPU time charged per disk xfer 02537 9808410A 0 1 ZBM 1089 ADDM R0 R1,PSSUMCPU add it in 1090 02538 60C41DAB 3 IMM 1091 LD R3 ADR SQMSWAIT R3 -> scheduler queue 02539 6040045E 1 1092 LD R1 FNDVPFPN R1 = parm2 (page number) 0253A DC002B58 1093 CALL SHUTDOWN shut him down 0253B 40574803 5 BASE 1094 PARVL VPP,VPBLOCK parm1 (disk block number) 0253C 60978801 2 6 BASE 1095 LD R2 SP,SAVER2 back to normal 0253D 5D1F8002 6 STAK 1096 LEAVE POP return to caller 1097 * --- 1098 1099 END MSSHUTDOWN subroutine 1100 1101 1102 END PFPROCESS Page Fault Processor - Main Block 48 INPUT CONSTANTS system constants 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 387 (CONSTANTS) F 23 Resident Operating System Constants 3 4 ********************************************************************************** 5 * * 6 * CONSTANTS DEFINITIONS * 7 * * 8 ********************************************************************************** 9 10 11 ********************************************************************************** 12 * DISKBOOT allocates resident pages for the operating system off * 13 * of a single MCU. This would cause undo burden on this MCU if there * 14 * were others to share the load. The INITIAL code, after creating * 15 * PPLs for all the MCUs, redistributes a few of the more heavily used * 16 * OS pages to the other MCUs. Beginning with the RESIDENT page, the * 17 * number of pages that are redistributed is set by MONSPREAD. * 18 ********************************************************************************** 19 0253E 00000008 20 MONSPREAD VFD 8 number of monitor pages to distribute 21 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 388 (CONSTANTS) F 23 Resident Operating System Constants 23 24 ********************************************************************************** 25 * * 26 * MEMORY SCHEDULING CONSTANTS * 27 * These constants determine the characteristics of the * 28 * memory scheduling system. If the algorithms work anything * 29 * like expected, the system performance will be relatively * 30 * insensitive to variations in these parameters. * 31 * See the scheduler for more discussion of the algorithms. * 32 * * 33 ********************************************************************************** 34 35 ********************************************************************************** 36 * * 37 * MMAGE * 38 * Pages younger than this will not be removed from the * 39 * users working set. They may only be removed by TESTTRUBL * 40 * (usually only when making a user a troublemaker). * 41 * In pragmatic terms, we are ensuring that no program * 42 * is ever forced to run with a working set below the * 43 * threshold where useful work is accomplished. Of course, * 44 * not every program is the same, but this number was picked * 45 * to represent a typical job (P. Dennings graphs were used * 46 * as an aid). * 47 * If this number is decreased, a process will more * 48 * readily lose pages. Thrashing may set in more easily * 49 * because pages will be removed from a working set before * 50 * enough 'evidence' has accumulated to indicate that they * 51 * have truly left the working set. We will be able to * 52 * pack in more processes, but not without a heightened * 53 * possibility of thrashing. * 54 * If this number is increased, a process will hold * 55 * more tightly onto pages. The possibility of thrashing * 56 * will be reduced, but pages will stay in a users working * 57 * set much longer after they are no longer being used, and * 58 * users will more readily be made troublemakers (in order * 59 * to acquire enough free pages). * 60 * * 61 ********************************************************************************** 62 0253F 00000007 63 MMAGE VFD 7 no page younger than this will be 64 * removed from a users working set 65 * by the normal scheduling code 66 67 ********************************************************************************** 68 * * 69 * MMAGEINC/MMAGEINCD * 70 * If the system has more memory than is being actively * 71 * used, we shouldn't need to remove pages from users working * 72 * sets so readily (although we still keep track of just how * 73 * old these pages are). * 74 * This constant is used to determine the additional time * 75 * that a page is allowed to spend in a users working set given * 76 * that there exist unused pages. * 77 * If this number is decreased, the equilibrium will be * 78 * toward more idle pages and a shorter lifetime in a users * 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 389 (CONSTANTS) F 23 Resident Operating System Constants 79 * working set. This may cause a users working set to be smaller * 80 * than it needs to be, with a consequent increase in the number * 81 * of pages faults (though not necessarily swaps, because the * 82 * idle pages are recovered from main memory when needed). * 83 * If this number is increased, there will be fewer * 84 * idle pages and pages will remain in a users working set * 85 * longer. This will allow more pages to remain in users * 86 * working sets thereby decreasing the number of page * 87 * faults. However, this causes the pool of idle pages to * 88 * shrink. If it becomes too small, pages that are not * 89 * normally placed into the working set extension list * 90 * (the system uses simplifying assumptions about pages * 91 * unlikely to be used again soon) will pass through the * 92 * idle list too quickly and be needlessly swapped. Also, if * 93 * this number is increased too much, an increase in page * 94 * demand, such as a process activation will deplete the * 95 * pool of idle pages with the effects that 1) the pages can * 96 * not be gotten away from processes holding them fast * 97 * enough to prevent the new process from running out, and * 98 * 2) the processes checked first will be harshly depleted * 99 * to fill the idle list, whereas subsequently scheduled * 100 * processes won't be under the same urgency. * 101 * * 102 ********************************************************************************** 103 02540 0000001E 104 MMAGEINC VFD 30 numerator 02541 00000010 105 MMAGEINCD VFD 16 and denominator 106 * of multiplier for amount added to 107 * MMAGE for each available idle 108 * page or 4 dirty idle pages. 02542 0000015E 109 MMAXWSX VFD 350 maximum working set size 110 111 ********************************************************************************** 112 * * 113 * MMIDLETTMIN * 114 * This parameter controls the troublemaker algorithm * 115 * invocation. If the number of idle pages is above this * 116 * number (plus users priority) trouble maker checking is * 117 * skipped. A higher number makes the system keep a * 118 * higher number of idle pages. * 119 * Note that "idle" pages are not necessarily an unused * 120 * resource. They provide a holding buffer for pages that don't * 121 * otherwise stay in users working sets due to the systems * 122 * simplifying assumptions. * 123 * * 124 ********************************************************************************** 125 02543 00000008 126 MMIDLETTMIN VFD 8 cutoff for test-trouble processing 127 128 ********************************************************************************** 129 * * 130 * MMIDLABSMIN * 131 * This parameter is the minimum number of idle pages * 132 * that the scheduler will allow. If there are fewer idle * 133 * pages than this, any user calling TESTTROUBLE (i.e. adding * 134 * to his working set) will be shutdown as a troublemaker * 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 390 (CONSTANTS) F 23 Resident Operating System Constants 135 * (in the SIZEWAIT queue). * 136 * This minimum number of pages serves two purposes.. * 137 * 1) certain system functions require an available idle * 138 * page. Currently, such known system functions are * 139 * power up recovery processing and calls from the * 140 * GETMEM routines. * 141 * 2) a minimum size holding buffer for recently used, but * 142 * not held in WSX lists, pages. * 143 * * 144 ********************************************************************************** 145 02544 00000004 146 MMIDLABSMIN VFD 4 minimum allowed idle list size 147 148 ********************************************************************************** 149 * * 150 * MMIDLSPEED * 151 * This parameter is used to control the aging rate of * 152 * pages in the working sets of suspended users. * 153 * Note that the values from the SDPARM array are used * 154 * to pre-age all pages in the working set of a user being * 155 * suspended. That removes pages as early as possible * 156 * when a user is going to wait for a while. We don't * 157 * take all of the pages because of the possibility that * 158 * the suspension is for a short wait, such as for terminal * 159 * I/O. This parameter (MMIDLSPEED) is used to cause * 160 * additional aging so that any remaining pages will age * 161 * out if the user fails to leave the suspended queue * 162 * in a timely manner. * 163 * If this parameter is made smaller, pages will age * 164 * more slowly. When the user leaves suspension, he will * 165 * get better response and cause fewer swaps because of the * 166 * greater likelihood of finding his pages. However, these * 167 * pages FOR SURE are not being used by this user, so we * 168 * strongly desire to make them available to reduce page * 169 * contention elsewhere. * 170 * If this parameter is made larger, pages will age * 171 * more rapidly and leave the working set of a suspended * 172 * user sooner. As the parameter gets larger, an interactive * 173 * user will lose his working set unless he responds * 174 * correspondingly faster. * 175 * A special note concerning the MSWAIT queue... it * 176 * must be aged for the following reasons: * 177 * 1) To prevent deadlocking with no idle pages for * 178 * the reads, but everyone suspended in MSWAIT * 179 * waiting for a read. (This is extremely unlikely * 180 * in the current system). * 181 * 2) To ensure that a user waiting for a disk that * 182 * is no longer ready will not hold other pages * 183 * forever. * 184 * However, it must not be aged nearly so often as the * 185 * other queues. If it were, a user could have essentially * 186 * all of his pages removed while waiting for one more. * 187 * This is likely only when the read queue gets excessively * 188 * long, but it causes an unpleasant phenomonon known as * 189 * convoying. * 190 * * 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 391 (CONSTANTS) F 23 Resident Operating System Constants 191 * * 192 ********************************************************************************** 193 02545 00000004 194 MMIDLSPEED VFD 4 number of units added to page 195 * ages each tick by WHICHHUNT 196 197 ********************************************************************************** 198 * * 199 * PRRATIO * 200 * This parameter is used to control the magnitude of the * 201 * help given to higher priority users. * 202 * Priorities are not completely implemented!! * 203 * * 204 ********************************************************************************** 205 00000014 ABS 206 PRRATIO EQU 20 priority ratio constant 02546 00000014 207 MMPRRATIO VFD PRRATIO each increment in user priority 208 * is equivalent to this many 'points' 209 210 ********************************************************************************** 211 * * 212 * MMLOCKPARM * 213 * Each time that a process locks a resource such as * 214 * a directory or an ADT, PSLOCKCNTR is incremented. We * 215 * try to avoid setting those guys troublemaker by using * 216 * this multiplier to remove a little badness from the * 217 * troublemaker calculation. * 218 * * 219 ********************************************************************************** 220 02547 FFFFFFFD 221 MMLOCKPARM VFD -60/PRRATIO we allow this many points for 222 * each critical region that this user 223 * has locked (later multiplied by MMPRRATIO) 224 02548 0000000C 225 MMHYSPARM VFD 12 the current running user looks 226 * this much worse than any other 227 * to avoid repeated finger pointing 228 229 ********************************************************************************** 230 * * 231 * CPU Time Scheduling Variables * 232 * The CPU time management involves a single queue of * 233 * runnable processes. This queue is formed in numerical * 234 * order by a "queue insertion value". The basic idea is * 235 * that the more CPU time that a user has been receiving, * 236 * the longer he waits in the runnable queue. This means * 237 * that heavily I/O bound jobs aren't required to go * 238 * through the whole queue for each I/O operation. * 239 * The "queue insertion values" range from 256 to * 240 * 1024. * 241 * * 242 ********************************************************************************** 243 244 ********************************************************************************** 245 * * 246 * TSAGEVAL * 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 392 (CONSTANTS) F 23 Resident Operating System Constants 247 * The clock scheduling interrupt (TICK) causes this * 248 * much to be subtracted from the SQPARM word of everybody * 249 * in the runnable queue. This prevents starvation of any * 250 * process by a series of other processes always jumping * 251 * in ahead of it. * 252 * A larger value here causes more of a disturbing * 253 * influence on every tick interrupt, whereas too small * 254 * a value means that a process may have to wait inordinate * 255 * amounts of time to get a single quantum. * 256 * * 257 ********************************************************************************** 258 02549 00000014 259 TSAGEVAL VFD 20 SQPARM ages this much on each TICK interrupt 260 261 ********************************************************************************** 262 * * 263 * TSHISTLOSS * 264 * This factor is used on every TICK interrupt to reduce * 265 * the PSSUMCPU and PSSUMSDT values by a factor so that, 1) * 266 * They may be contained within reasonable sized fields, and * 267 * 2) So that older history fades away. * 268 * This value is in terms of 1/256 so that it can be an * 269 * integer. The theoretical range is from 0 to 255. However, * 270 * values that are too small cause the history to be forgotten * 271 * rather suddenly at the tick interrupt. Therefore, any value * 272 * under about 64 (really 1/4) is probably too small. * 273 * Values that are too large cause the past history to * 274 * remain to plague a new pattern of activity. Additionally, * 275 * for any value greater than or equal to 256 (really 1), the * 276 * numbers in PSSUMCPU and PSSUMSDT can grow without bound. * 277 * For PSSUMSDT, it might be possible for it to grow even larger * 278 * (like when someone comes out of a four-hour terminal wait). * 279 * Therefore, PSSUMSDT is explicitly checked for overflow and * 280 * set to the maximum possible value. * 281 * For values less than 256, the upper bound of PSSUMCPU * 282 * is 256 / (256-n) * TickTime. Since PSSUMCPU occupies * 283 * a 16-bit field, we must have 256 / (256-n) * 2000 < 2^16. * 284 * This implies that n < 250. * 285 * The allowable range of values, then, is * 286 * 64 <= TSHISTLOSS <= 249. * 287 * * 288 ********************************************************************************** 289 0254A 000000C8 290 TSHISTLOSS VFD 200 controls ratio of history to current data 291 * in the PSSUMCPU and PSSUMSDT variables. 292 293 ********************************************************************************** 294 * * 295 * TSPRIORVAL * 296 * This factor controls how much weight the priority * 297 * field has in runnable queue insertion point calculations. * 298 * This number must be upper bounded to control the maximum * 299 * possible queue insertion values. * 300 * * 301 ********************************************************************************** 302 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 393 (CONSTANTS) F 23 Resident Operating System Constants 0254B 00000040 303 TSPRIORVAL VFD 64 value of each priority level 304 * in runnable queue insertion value calculations 305 306 ********************************************************************************** 307 * * 308 * TSBASEVAL * 309 * This minimum queue insertion value is provided to * 310 * aid in starvation prevention. * 311 * * 312 ********************************************************************************** 313 0254C 00000100 314 TSBASEVAL VFD 256 minimum value for queue insert 315 316 ********************************************************************************** 317 * * 318 * TSMSEQUIV * 319 * Each time a process requests a MS transfer, we make * 320 * that equivalent to TSMSEQUIV msec of CPU time in PSSUMCPU. * 321 * This allows us to give heavy MS users a little lower * 322 * priority than we give to heavy users of direct I/O devices. * 323 * * 324 ********************************************************************************** 325 0254D 00000014 326 TSMSEQUIV VFD 20 each MS transfer equiv to this many MSEC 327 328 ********************************************************************************** 329 * * 330 * TSQUANMIN * 331 * The quantum calculation starts from this base. * 332 * * 333 ********************************************************************************** 334 0254E 00000064 335 TSQUANMIN VFD 100 smallest quantum 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 394 (CONSTANTS) F 23 Resident Operating System Constants 337 338 ********************************************************************************** 339 * * 340 * Useful constants reside here * 341 * * 342 ********************************************************************************** 343 0254F 00FFFFFF 344 MSBLKMASK VFD ONEBITS/MSBLKFIELD mask for a disk address 02550 003E8000 345 MAXSRAF VFD CCBMAXPAGE*CPP last char +1 allowable in small RAF 346 * values for the extensions and account names of 347 * the privileged accounts on the system 02551 E79DF200 348 DOTBTI PAK6 !!! ".!!!" our division 02552 EDE07C00 349 DOTAMPER PAK6 &&& proprietary account 02553 6FA664B3 350 HARDSYS PAK12 HARDWARE HARDWARE.SYS account name 02555 B6740200 351 DOTSYS PAK6 SYS ".SYS" owners division 02556 8E26E777 352 RADMANAGER PAK12 MANAGER the project/division/system top dog 02558 46954340 353 ALLVOLUMES PAK12 ALL! wildcard for all volume names 0255B 0036EE80 354 ONEHOUR2 VFD 0,MSECSH milliseconds in an hour 0000255B 355 ONEHOUR EQU ONEHOUR2(1) same for single word 0255C 05265C00 356 ONEDAY VFD MSECSD length of a day, in milliseconds 0255D 00000080 357 MAXRESRCE VFD 128 maximum number of RCEs per file 358 0000255E 359 BITTAB LABEL 0255E 00000001 360 BIT31 VFD 000000001 0255F 00000002 361 BIT30 VFD 000000002 02560 00000004 362 BIT29 VFD 000000004 02561 00000008 363 BIT28 VFD 000000008 02562 00000010 364 BIT27 VFD 000000010 02563 00000020 365 BIT26 VFD 000000020 02564 00000040 366 BIT25 VFD 000000040 02565 00000080 367 BIT24 VFD 000000080 02566 00000100 368 BIT23 VFD 000000100 02567 00000200 369 BIT22 VFD 000000200 02568 00000400 370 BIT21 VFD 000000400 02569 00000800 371 BIT20 VFD 000000800 0256A 00001000 372 BIT19 VFD 000001000 0256B 00002000 373 BIT18 VFD 000002000 0256C 00004000 374 BIT17 VFD 000004000 0256D 00008000 375 BIT16 VFD 000008000 0256E 00010000 376 BIT15 VFD 000010000 0256F 00020000 377 BIT14 VFD 000020000 02570 00040000 378 BIT13 VFD 000040000 02571 00080000 379 BIT12 VFD 000080000 02572 00100000 380 BIT11 VFD 000100000 02573 00200000 381 BIT10 VFD 000200000 02574 00400000 382 BIT09 VFD 000400000 02575 00800000 383 BIT08 VFD 000800000 02576 01000000 384 BIT07 VFD 001000000 02577 02000000 385 BIT06 VFD 002000000 02578 04000000 386 BIT05 VFD 004000000 02579 08000000 387 BIT04 VFD 008000000 0257A 10000000 388 BIT03 VFD 010000000 0257B 20000000 389 BIT02 VFD 020000000 0257C 40000000 390 BIT01 VFD 040000000 0257D 80000000 391 BIT00 VFD 080000000 49 INPUT PFPUTIL utilities for page fault processor 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 395 (PFPUTIL) F 24 Page Fault Processor - Utility routines 3 ********************************************************************************** 4 * * 5 * This routine is to be called whenever a swapping page * 6 * is being added to the users control. It checks to ensure * 7 * that the session disk limit and disk limit totals will not * 8 * be exceeded. However, control mode will get his requests. * 9 * Call: * 10 * * 11 * CALLNP ADDSWAP * 12 * * 13 * * 14 * * 15 * Eats R0:R2. * 16 * Stack required = 1 * 17 * * 18 ********************************************************************************** 19 20 BLOCK ADDSWAP subroutine 21 ENTRY ADDSWAP 22 23 BEGFRAME 24 ENDFRAME 25 0257E DD5F8001 6 STAK 26 ADDSWAP ENTRNP PUSH 0257F 60800412 2 27 LD R2 CPPSA current user PSA ptr 02580 60000414 0 28 LD R0 CPCUPC get current UPC pointer 02581 5C080610 0 ZBM 29 CMZ R0,UPCNTLMODE is he running control mode? 02582 FE0C258B 30 JNE DOADD jump if control mode, he gets his swaps 02583 60168812 0 2 BASE 31 LD R0 R2,PSSESUSD get current session used 02584 68168813 0 2 BASE 32 UCPR R0 R2,PSSESLIM compare against limit 02585 FE062592 33 JGE SESSOVER (if its = now, it will be over) 02586 60489F13 1 2 ZBM 34 LD R1 R2,PSUSERLIMP get pointer to ULB 02587 6008518E 0 1 ZBM 35 LD R0 R1,ULDSKUSD get current disk space total 02588 1816480F 0 1 BASE 36 ADD R0 R1,ULSCRDSK add in the scratch total 02589 6808618D 0 1 ZBM 37 UCPR R0 R1,ULDSKLIM compare against limit 0258A FE062594 38 JGE ACCTOVER (if it's = now, it will be over) 39 * \ / 40 0000258B 41 DOADD LABEL 0258B BC168812 0 2 BASE 42 INCL R0 R2,PSSESUSD update session used 0258C 54168814 0 2 BASE 43 MAX R0 R2,PSSESMAX set the high water mark 0258D E4168814 0 2 BASE 44 ST R0 R2,PSSESMAX 0258E 60489F13 1 2 ZBM 45 LD R1 R2,PSUSERLIMP get ULB ptr 0258F D016480F 1 BASE 46 INC R1,ULSCRDSK and update the scratch total 02590 19C40001 7 IMM 47 ADD R7 1 skip error return 48 * \ / 49 00002591 50 XITSWAP LABEL 02591 5D1F8001 6 STAK 51 LEAVE POP 52 * --- 53 00002592 54 SESSOVER LABEL 02592 600400C5 0 IMM 55 LD R0 XREQERESDL exceeded session disk limit 02593 FE0E2591 56 JMP XITSWAP return error 57 * --- 58 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 396 (PFPUTIL) F 24 Page Fault Processor - Utility routines 00002594 59 ACCTOVER LABEL 02594 60040087 0 IMM 60 LD R0 XREQERDSKL exceeded account disk limit 02595 FE0E2591 61 JMP XITSWAP return error 62 * --- 63 64 END ADDSWAP subroutine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 397 (PFPUTIL) F 24 Page Fault Processor - Utility routines 66 67 ********************************************************************************** 68 * * 69 * Routine to return space to user when a swapping page * 70 * is freed. Call: * 71 * * 72 * CALLNP DELSWAP * 73 * * 74 * Eats R0. * 75 * Stack required = 1 * 76 * * 77 ********************************************************************************** 78 79 BLOCK DELSWAP subroutine 80 ENTRY DELSWAP 81 82 BEGFRAME 83 ENDFRAME 84 02596 DD5F8001 6 STAK 85 DELSWAP ENTRNP PUSH 02597 60000412 0 86 LD R0 CPPSA 02598 D0560812 0 BASE 87 DEC R0,PSSESUSD count down total session space 02599 FE06259B 88 JGE NOTNEG jump if still positive 0259A D0160812 0 BASE 89 INC R0,PSSESUSD put back to zero or positive 0000259B 90 NOTNEG LABEL 0259B 60081F13 0 0 ZBM 91 LD R0 R0,PSUSERLIMP get pointer to ULB 0259C D056080F 0 BASE 92 DEC R0,ULSCRDSK count down scratch used 0259D FE06259F 93 JGE NOTNEGA jump if still positive 0259E EC16080F 0 BASE 94 STZ R0,ULSCRDSK put back to zero or positive 0000259F 95 NOTNEGA LABEL 0259F 5D1F8001 6 STAK 96 LEAVE POP 97 * --- 98 99 END DELSWAP subroutine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 398 (PFPUTIL) F 24 Page File Manipulation Routines 102 103 BLOCK Page File Manipulation Routines 104 ENTRY LOPFPAL to load a single page file element 105 ENTRY MAKEPAL make a PAL for a page 106 ENTRY MAPINFBI map in FBI block for PPL 107 ENTRY MAPINMEM mapin user free storage lists 108 ENTRY MAPOUTFBI map out FBI block for PPL 109 ENTRY MAPOUTMEM mapout user free storage lists 110 ENTRY PFAGEWSX distribute age to WSX list 111 ENTRY PFEMPTY unload page file without aging 112 ENTRY PFLOAD to load the entire page file 113 ENTRY PFUNLOAD to unload entire page file 114 ENTRY PFUPCAGE apply aging values to all UPCs 115 ENTRY REUSEPAL reuse PAL from working set extension 116 ENTRY UNLOPAL to unload a single page file element 117 118 ********************************************************************************** 119 * * 120 * This block contains several routines to manipulate * 121 * PALs and page file entries. These routines are called by * 122 * both the page-fault handler and the scheduler. * 123 * * 124 ********************************************************************************** 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 399 (PFPUTIL) F 24 Page File Manipulation Routines 126 127 ********************************************************************************** 128 * * 129 * Unload the Page File * 130 * Routine to unload the page file and window pages. * 131 * Updates all page ages. * 132 * * 133 * * 134 * CALLNP PFUNLOAD * 135 * * 136 * Eats:R0:R1, R3:R4. * 137 * Stack required = 2 * 138 * 1 + max ( PFUPCAGE (1) ) * 139 * * 140 ********************************************************************************** 141 142 BLOCK PFEMPTY & PFUNLOAD subroutine 143 ENTRY PFEMPTY 144 ENTRY PFUNLOAD 145 146 BEGFRAME 147 ENDFRAME 148 025A0 DD5F8001 6 STAK 149 PFUNLOAD ENTRNP PUSH 025A1 60040001 0 IMM 150 LD R0 1 get aging value to apply 025A2 DC4025B6 151 CALLNP PFUPCAGE and apply it to all UPCs 025A3 60000414 0 152 LD R0 CPCUPC get current UPC pointer 025A4 D04800F6 0 ZBM 153 DEC R0,UPXAGEVASP and remove aging value from current VASP 025A5 FE0E25A8 154 JMP PFUNLOSHR now, go unload current PF 155 * --- 156 157 ********************************************************************************** 158 * * 159 * Empty the Page File * 160 * Routine to unload the page file while changing between * 161 * under processes. Updates only the age of referenced pages. * 162 * The UNLOPAL code is duplicated here to save time and temps. * 163 * Call: * 164 * interrupts must be off! * 165 * CALLNP PFEMPTY * 166 * * 167 * Eats R0, R3:R4. * 168 * Stack required = 1 * 169 * * 170 ********************************************************************************** 171 025A6 DD5F8001 6 STAK 172 PFEMPTY ENTRNP PUSH 025A7 60000414 0 173 LD R0 CPCUPC get pointer to current UPC 000025A8 174 PFUNLOSHR LABEL entry for PFUNLOAD 025A8 D00800F4 0 ZBM 175 INC R0,UPCMAGEV increment maximum PAL age in VASP list 025A9 D00800F5 0 ZBM 176 INC R0,UPCMAGEW increment maximum PAL age in WSX list 025AA 6116080F 4 0 BASE 177 LD PAL R0,UPCVASP get pointer to current VASP list 025AB 81C10000 4 178 LUPF PAL scan the VASP list unloading the page file 179 ********************** 180 * Temporarily leave this code in case we have to go back to it. 10/29/84 025AC FE0E25B5 181 JMP PFEMNOPA jump around old code 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 400 (PFPUTIL) F 24 Page File Manipulation Routines 182 * --- 183 025AD FB3025B5 4 184 JZA PAL PFEMNOPA jump if VASP list empty 000025AE 185 PFEMNXTP LABEL 025AE 60D70000 3 4 CACH 186 LD PFPTR PAL,PAVPN get page number 025AF 80D2C000 3 REG 187 PFRC PFPTR unload page file 025B0 F2DE25B4 3 188 JBF PFPTR/PFREFBIT PFEMNOREF jump if page not referenced 025B1 F2DC25B3 3 189 JBF PFPTR/PFALTBIT PFEMNOALT jump if page not altered 025B2 EDC91C12 4 ZBM 190 STW PAL,PAMODIFIED set page modified flag 000025B3 191 PFEMNOALT LABEL 025B3 EC0900E2 4 ZBM 192 STZ PAL,PAGEAGE set page age to zero 000025B4 193 PFEMNOREF LABEL 025B4 FB3625AE 4 194 LJNA PAL PFEMNXTP loop through VASP list 195 * \ / 000025B5 196 PFEMNOPA LABEL 197 ********************** 198 025B5 5D1F8001 6 STAK 199 LEAVE POP 200 * --- 201 202 END PFEMPTY & PFUNLOAD subroutine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 401 (PFPUTIL) F 24 Page File Manipulation Routines 204 205 ********************************************************************************** 206 * * 207 * PFUPCAGE * 208 * This routine takes a given aging value and distributes * 209 * it to all of the UPCs. This is as good as distributing it * 210 * to each PAL, and a whole lot faster. Call: * 211 * * 212 * R0 = aging value * 213 * R5 => PSA * 214 * CALLNP PFUPCAGE * 215 * * 216 * Eats R1, PAL * 217 * Stack required = 1 * 218 * * 219 ********************************************************************************** 220 221 BLOCK Age distributer 222 ENTRY PFUPCAGE age distributer 223 224 BEGFRAME 225 ENDFRAME 226 025B6 DD5F8001 6 STAK 227 PFUPCAGE ENTRNP PUSH 025B7 61095F15 4 5 ZBM 228 LD R4 R5,PSPROCLIST get pointer to list of UPCs 229 * \ / 230 000025B8 231 PFUPCABIGL LABEL 025B8 60530000 1 4 REG 232 LD R1 R4 place UPC pointer in save place 025B9 980840F6 0 1 ZBM 233 ADDM R0 R1,UPXAGEVASP add to this vasp list age 025BA 980840F7 0 1 ZBM 234 ADDM R0 R1,UPXAGEWSX and to WSX list age 025BB 61085F10 4 1 ZBM 235 LD R4 R1,UPCSONPTR any children to take care of? 025BC FB3225B8 4 236 JNZA R4 PFUPCABIGL jump if there are 237 * \ / 238 000025BD 239 PFUPCABRO LABEL 025BD 61085F16 4 1 ZBM 240 LD R4 R1,UPCBROPTR get any brother we might have 025BE FB3225B8 4 241 JNZA R4 PFUPCABIGL do a number on them also 025BF 60485F17 1 1 ZBM 242 LD R1 R1,UPCDADPTR move up to the immediate overprocess 025C0 FA7225BD 1 243 JNZA R1 PFUPCABRO jump if more UPCs to update 244 * \ / 245 025C1 5D1F8001 6 STAK 246 LEAVE POP done here, return 247 * --- 248 249 END of age distributer 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 402 (PFPUTIL) F 24 Page File Manipulation Routines 251 252 ********************************************************************************** 253 * * 254 * Load the Page File * 255 * Routine to load the page file. Enter with the PSA * 256 * pointer in register R5. * 257 * * 258 * * 259 * R5 => PSA * 260 * CALLNP PFLOAD * 261 * * 262 * Eats R0:R1, R3:R4. * 263 * Stack required = 3 * 264 * 0 + max ( MAPINMEM (3), PFAGEVASP (0) ) * 265 * * 266 ********************************************************************************** 267 268 BLOCK PFLOAD subroutine 269 ENTRY PFLOAD 270 025C2 DD400451 271 PFLOAD ENTRNP VMTSSLA 025C3 DC0025EB 272 CALL MAPINMEM map in user's free storage lists 025C4 40534000 5 REG 273 PARVL R5 pointer to the PSA 025C5 DC4025CF 274 CALLNP PFAGEVASP apply any saved aging to PALs 025C6 61094116 4 5 ZBM 275 LD R4 R5,PSCURRPROC get pointer to current UPC 025C7 6117080F 4 4 BASE 276 LD PAL R4,UPCVASP get pointer to memory chain 277 025C8 81810000 4 278 LLPF PAL scan the VASP list loading the page file 279 ********************** 280 * Temporarily leave this code in case we have to go back to it. 10/29/84 025C9 FE0E25CE 281 JMP LOPFNOPA jump around old code 282 * --- 283 025CA FB3025CE 4 284 JZA PAL LOPFNOPA jump if no pages 000025CB 285 LOPFLP LABEL 025CB 60D70000 3 4 CACH 286 LD PFPTR PAL,PAVPN set up page file index 025CC 00D70801 4 BASE 287 LDPF PAL,PAPMVALUE load up this PF location 025CD FB3625CB 4 288 LJNA PAL LOPFLP follow the entire chain 000025CE 289 LOPFNOPA LABEL all pages loaded 290 ********************** 291 025CE 5D000451 292 LEAVE VMTSSLA return 293 * --- 294 295 END PFLOAD subroutine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 403 (PFPUTIL) F 24 Page File Manipulation Routines 297 298 ********************************************************************************** 299 * * 300 * Age VASP list * 301 * This routine takes the page aging value saved in the * 302 * current UPC and applies it to the individual PALs. This must * 303 * be done so that the new ages in the PALs are kept up to date. * 304 * We normally do this when we load the page file, because there * 305 * is more than one unloader routine. Call: * 306 * * 307 * (interrupts should be off!) * 308 * CALLNP PFAGEVASP * 309 * * 310 * Eats R0:R1, R3. * 311 * Stack required = 0 * 312 * * 313 ********************************************************************************** 314 315 BLOCK PFAGEVASP subroutine 316 ENTRY PFAGEVASP 317 025CF DD400452 318 PFAGEVASP ENTRNP VMTSSLB 025D0 60400414 1 319 LD R1 CPCUPC get current UPC pointer 025D1 600840F6 0 1 ZBM 320 LD R0 R1,UPXAGEVASP pick up the saved aging 025D2 FA0225DC 0 321 JEQZ R0 PFLAGE test for trivial update 025D3 60D6480F 3 1 BASE 322 LD R3 R1,UPCVASP get pointer to VASP list 025D4 EC124000 1 REG 323 STZ R1 initial max age value 025D5 FAF025D9 3 324 JZA R3 PFANVP jump if empty VASP 000025D6 325 PFAVLP LABEL 025D6 9808C0E2 0 3 ZBM 326 ADDM R0 R3,PAGEAGE increase the page age 025D7 5448C0E2 1 3 ZBM 327 MAX R1 R3,PAGEAGE looking for the maximum age 025D8 FAF625D6 3 328 LJNA R3 PFAVLP scan the entire list 329 * \ / 000025D9 330 PFANVP LABEL 025D9 60000414 0 331 LD R0 CPCUPC get back the UPC pointer 025DA E44800F4 1 0 ZBM 332 ST R1 R0,UPCMAGEV this is the maximum PAL age 025DB EC0800F6 0 ZBM 333 STZ R0,UPXAGEVASP now clear out the already used value 000025DC 334 PFLAGE LABEL 025DC 5D000452 335 LEAVE VMTSSLB return to caller 336 * --- 337 338 END PFAGEVASP subroutine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 404 (PFPUTIL) F 24 Page File Manipulation Routines 340 341 ********************************************************************************** 342 * * 343 * Age Working Set List * 344 * This routine takes the page aging value saved in the * 345 * current UPC and applies it to the individual PALs in the WSX * 346 * list. This is done each time a new entry is added to the * 347 * WSX list, so that the page ages are kept properly up to date. * 348 * Call: * 349 * (interrupts must be off!) * 350 * CALLNP PFAGEWSX * 351 * * 352 * Eats R0:R1. * 353 * Stack required = 0 * 354 * * 355 ********************************************************************************** 356 357 BLOCK PFAGEWSX subroutine 358 ENTRY PFAGEWSX 359 025DD DD400452 360 PFAGEWSX ENTRNP VMTSSLB 025DE 60400414 1 361 LD R1 CPCUPC get current UPC pointer 025DF 600840F7 0 1 ZBM 362 LD R0 R1,UPXAGEWSX pick up the saved aging 025E0 FA0225EA 0 363 JEQZ R0 PFWSXIT test for trivial update 025E1 60D64810 3 1 BASE 364 LD R3 R1,UPCWSX get pointer to PAL in WSX list 025E2 EC124000 1 REG 365 STZ R1 initial maximum age value 025E3 FAF025E7 3 366 JZA R3 PFWSXNOPAL jump if empty WSX 367 * \ / 368 000025E4 369 PFWSXLP LABEL 025E4 9808C0E2 0 3 ZBM 370 ADDM R0 R3,PAGEAGE increase the page age 025E5 5448C0E2 1 3 ZBM 371 MAX R1 R3,PAGEAGE look for the maximum page age 025E6 FAF625E4 3 372 LJNA R3 PFWSXLP scan the entire list 373 * \ / 374 000025E7 375 PFWSXNOPAL LABEL 025E7 60000414 0 376 LD R0 CPCUPC get pointer to current UPC 025E8 E44800F5 1 0 ZBM 377 ST R1 R0,UPCMAGEW max PAL age in WSX list 025E9 EC0800F7 0 ZBM 378 STZ R0,UPXAGEWSX now clear out the already used value 379 * \ / 380 000025EA 381 PFWSXIT LABEL 025EA 5D000452 382 LEAVE VMTSSLB return to caller 383 * --- 384 385 END PFAGEWSX subroutine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 405 (PFPUTIL) F 24 Page File Manipulation Routines 387 388 ********************************************************************************** 389 * * 390 * Routine to map in the memory containing the users free * 391 * storage lists. The page map values are kept in the PSA, so * 392 * the PSA pointer is passed as a parameter. Note if the PSA * 393 * pointer is bogus we zap CMAPPSA to indicate that there was * 394 * no one to map in. Call: * 395 * * 396 * * 397 * CALL MAPINMEM * 398 * PARVL * 399 * * 400 * Eats R0:R1. * 401 * Stack required = 3 * 402 * * 403 ********************************************************************************** 404 405 BLOCK MAPINMEM subroutine 406 ENTRY MAPINMEM 407 408 BEGFRAME 00178801 6 BASE 409 SAVEREGS BSS 2 save area for R2 and R3 410 ENDFRAME 411 025EB DD1F8003 6 STAK 412 MAPINMEM ENTR PUSH 025EC C0520000 0 REG 413 STPVL R0 current user process status area 025ED E4000413 0 414 ST R0 CMAPPSA set this PSA as the one being mapped 025EE FA0225FB 0 415 JEQZ R0 RETURN if null, get out now! 025EF E6978801 236 BASE 416 ST2 R2 SP,SAVEREGS stuff some registers here temporarily 417 418 * loop to LDPF each value from PSMAPVALS 025F0 60440003 1 IMM 419 LD R1 MAXMAPVALS-1 initialize our counter 000025F1 420 MAPINLOOP LABEL 025F1 5C1C081B 01 BASE 421 CMZ R0,PSMAPVALS(R1) anything here to map in? 025F2 FE0225F5 422 JEQ SKIPMAPIN jump if no value to map 025F3 60D650FC 3 1 REG 423 LD PFPTR PNUSERMEM+R1 corresponding user page number 025F4 00DC081B 01 BASE 424 LDPF R0,PSMAPVALS(R1) page is now available to the CPU 000025F5 425 SKIPMAPIN LABEL 025F5 FA6625F1 1 426 JDR R1 MAPINLOOP back for more 427 * \ / 428 429 * save copies elsewhere, too 025F6 3816081B 0 0 BASE 430 LEA R0 R0,PSMAPVALS generate pointer to page map values 025F7 3880041A 2 431 LEA R2 UMAPVALS save these on the CPU page 025F8 60440010 1 IMM 432 LD R1 MAXMAPVALS*CPW convert the length to characters 025F9 FE400000 433 CMOVE save them for crashdump (in diskboot) 025FA 62978801 236 BASE 434 LD2 R2 SP,SAVEREGS restore values of the registers 435 * \ / 436 000025FB 437 RETURN LABEL 025FB 5D1F8003 6 STAK 438 LEAVE POP back to the caller 439 * --- 440 441 END MAPINMEM subroutine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 406 (PFPUTIL) F 24 Page File Manipulation Routines 443 444 ********************************************************************************** 445 * * 446 * This routine unloads the page file where the user free * 447 * storage list is mapped. This routine ensures that the page * 448 * file is illegal to reference for bug catching. It's not * 449 * strictly needed, because a MAPINMEM will overlay the values * 450 * in the page map. If this routine is ever trashed be sure * 451 * that the MAPINMEM routine stores illegal to reference in * 452 * page file locations that are unused. * 453 * Call: * 454 * CALLNP MAPOUTMEM * 455 * * 456 * Eats R0:R1, R3. * 457 * Stack required = 1 * 458 * * 459 ********************************************************************************** 460 461 BLOCK MAPOUTMEM subroutine 462 ENTRY MAPOUTMEM 463 464 BEGFRAME 465 ENDFRAME 466 025FC DD5F8001 6 STAK 467 MAPOUTMEM ENTRNP PUSH 025FD 0CC00000 468 IOFF we can not be interrupted! 025FE 60040003 0 IMM 469 LD R0 MAXMAPVALS-1 initialize our counter 025FF 60C400FC 3 IMM 470 LD PFPTR PNUSERMEM start at the bottom and work up 471 * \ / 472 00002600 473 MAPOUTLOOP LABEL 02600 80D24000 1 REG 474 PFRC R1 zap that page file location 02601 18C40001 3 IMM 475 ADD PFPTR 1 move up one page file location 02602 FA262600 0 476 JDR R0 MAPOUTLOOP jump if more to do 477 * \ / 478 02603 EC000413 479 STZ CMAPPSA zap the mapped PSA pointer 02604 0C800000 480 ION restore interrupts 02605 5D1F8001 6 STAK 481 LEAVE POP return 482 * --- 483 484 END MAPOUTMEM subroutine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 407 (PFPUTIL) F 24 Page File Manipulation Routines 486 487 ********************************************************************************** 488 * * 489 * MAPINFBI. This routine maps into PPLWINDOW the * 490 * resident page containing the FBI for the specified PPL. It * 491 * turns off and leaves the interrupts off because they must * 492 * be off when using PPLWINDOW. We halt if the PPLWINDOW is * 493 * already (still) mapped when we get here. Each user is * 494 * responsible for calling MAPOUTFBI to unmap the window after * 495 * use. There is a special case concerning dualwrite. Because * 496 * the secondary PPLs FBI is in system storage MAPINFBI and is * 497 * placed right after the FBI, we just hand back the address. * 498 * * 499 * Call: CALL MAPINFBI * 500 * PARVL * 501 * FBI, IOFF> * 502 * * 503 * Eats R0, Sets R1. * 504 * Stack required = 2 * 505 * * 506 ********************************************************************************** 507 508 BLOCK MAPINFBI subroutine 509 ENTRY MAPINFBI 510 511 BEGFRAME 00178801 6 BASE 512 SAVEPFPTR BSS 1 a must-use register 513 ENDFRAME 514 02606 DD1F8002 6 STAK 515 MAPINFBI ENTR PUSH 02607 C0520000 0 REG 516 STPVL R0 get PPL address 02608 E4D78801 3 6 BASE 517 ST PFPTR SP,SAVEPFPTR save this reg 02609 60C400FB 3 IMM 518 LD PFPTR PNPPLWNDO get virtual page number for PPL FBIs 0260A 80924000 1 REG 519 PFRD R1 read the page file contents 0260B 6440261A 1 520 CPR R1 ILLTOREF this must be illegal to reference! 0260C FE02260E 521 JEQ FBINOTMAP jump if nothing currently mapped here 0260D 0093001A 522 STOP STOPS001A check MFBILAST to see where last called 523 * --- 524 0000260E 525 FBINOTMAP LABEL 0260E 0CC00000 526 IOFF interrupts off! 0260F 5C081810 0 ZBM 527 CMZ R0,DUALWPPL is this a dualwrite PPL 02610 FE0C2618 528 JNE FAKEMAPIN if so, fake the mapping process 02611 604804A0 1 0 ZBM 529 LD R1 R0,PPFBIDISP get disp for later 02612 60080C62 0 0 ZBM 530 LD R0 R0,PPFBIBLK get our index into PPLPFMAP 531 * LD PFPTR PNPPLWNDO get virtual page number for PPL FBIs 02613 00E01C80 0 532 LDPF PPLPFMAP(R0) get reloc for our block 02614 3863EC00 1 1 533 LEA R1 PPLWINDOW(R1) get address of FBI 534 * \ / 535 00002615 536 SHAREMFBI LABEL 02615 60D78801 3 6 BASE 537 LD PFPTR SP,SAVEPFPTR restore this reg 02616 E5C00465 7 538 ST R7 MFBILAST save our return address 02617 5D1F8002 6 STAK 539 LEAVE POP return with interrupts off 540 * --- 541 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 408 (PFPUTIL) F 24 Page File Manipulation Routines 00002618 542 FAKEMAPIN LABEL 02618 38560804 1 0 BASE 543 LEA R1 R0,PPFBFBI generate FBI address 02619 FE0E2615 544 JMP SHAREMFBI jump to share code 545 * --- 546 0261A 00060000 547 ILLTOREF VFD PFNOREFVAL PF contents for illegal to reference 548 549 END MAPINFBI subroutine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 409 (PFPUTIL) F 24 Page File Manipulation Routines 551 552 ********************************************************************************** 553 * * 554 * MAPOUTFBI. Unmap the virtual page we use to access * 555 * FBIs from PPLs. Turn interrupts back on. * 556 * * 557 * Call: * 558 * CALLNP MAPOUTFBI * 559 * * 560 * * 561 * Registers Used: None * 562 * Stack Required: 2 * 563 * * 564 ********************************************************************************** 565 566 BLOCK MAPOUTFBI subroutine 567 ENTRY MAPOUTFBI 568 569 BEGFRAME 00178801 6 BASE 570 KEEPPFPTR BSS 1 store for needed register 571 ENDFRAME 572 0261B DD5F8002 6 STAK 573 MAPOUTFBI ENTRNP PUSH 0261C E4D78801 3 6 BASE 574 ST PFPTR SP,KEEPPFPTR save a register 0261D 60C400FB 3 IMM 575 LD PFPTR PNPPLWNDO virtual page number to clear 0261E 80D2C000 3 REG 576 PFRC PFPTR clear it out 0261F E5C00466 7 577 ST R7 MOFBILAST save address where called from 02620 0C800000 578 ION bump counter up one 02621 60D78801 3 6 BASE 579 LD PFPTR SP,KEEPPFPTR restore register 02622 5D1F8002 6 STAK 580 LEAVE POP return, interrupts up one 581 * --- 582 583 END MAPOUTFBI subroutine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 410 (PFPUTIL) F 24 Page File Manipulation Routines 585 586 ********************************************************************************** 587 * * 588 * Unload the Page File for a Given PAL * 589 * This code is entered with register PAL pointing to a * 590 * page access element (PAL). * 591 * The page file location for this element is unloaded. * 592 * The page age is either incremented if the page was not * 593 * referenced, or cleared if the page was referenced. The * 594 * modified bit is set if the page was modified. Both read * 595 * only and modified means that the page is actually excluded * 596 * and that it could not have been modified or successfully * 597 * referenced. * 598 * Illegal access pages should not come here (there * 599 * should not be a PAL). * 600 * * 601 * (interrupts off!) * 602 * PAL => PAL for page to unload * 603 * CALLNP UNLOPAL * 604 * * 605 * Eats PFPTR. * 606 * Stack required = 0 * 607 * * 608 ********************************************************************************** 609 610 BLOCK UNLOPAL subroutine 611 ENTRY UNLOPAL 612 02623 DD400451 613 UNLOPAL ENTRNP VMTSSLA 02624 60D70000 3 4 CACH 614 LD PFPTR PAL,PAVPN set up page file pointer 02625 80D2C000 3 REG 615 PFRC PFPTR read out the location, destroy index 02626 F2DE262B 3 616 JBF PFPTR/PFREFBIT UNLONOREF jump if not even referenced 02627 F2DC2629 3 617 JBF PFPTR/PFALTBIT UNLONOALT page not altered, skip setting bit 02628 EDC91C12 4 ZBM 618 STW PAL,PAMODIFIED indicate dirty page 00002629 619 UNLONOALT LABEL 02629 EC0900E2 4 ZBM 620 STZ PAL,PAGEAGE accessed, set age to zero 0262A 5D000451 621 LEAVE VMTSSLA return 622 * --- 623 0000262B 624 UNLONOREF LABEL 0262B D00900E2 4 ZBM 625 INC PAL,PAGEAGE age page by one unit 0262C 5D000451 626 LEAVE VMTSSLA return 627 * --- 628 629 END UNLOPAL subroutine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 411 (PFPUTIL) F 24 Page File Manipulation Routines 631 632 ********************************************************************************** 633 * * 634 * Load the Page File for a Given PAL * 635 * This code is entered with register PAL pointing to a * 636 * page access element. The page file for this element is * 637 * loaded. * 638 * * 639 * (interrupts off!) * 640 * PAL => PAL for page * 641 * CALLNP LOPFPAL * 642 * * 643 * Eats PFPTR. * 644 * Stack required = 0 * 645 * * 646 ********************************************************************************** 647 648 BLOCK LOPFPAL subroutine 649 ENTRY LOPFPAL 650 0262D DD400451 651 LOPFPAL ENTRNP VMTSSLA 0262E 60D70000 3 4 CACH 652 LD PFPTR PAL,PAVPN set up page file index 0262F 00D70801 4 BASE 653 LDPF PAL,PAPMVALUE load up this PF location 02630 5D000451 654 LEAVE VMTSSLA return 655 * --- 656 657 END LOPFPAL subroutine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 412 (PFPUTIL) F 24 Page File Manipulation Routines 659 660 ********************************************************************************** 661 * * 662 * Routine to make a PAL and link it into a user's * 663 * working set. This routine will do all necessary error * 664 * checking and logging. There are two different calls: * 665 * * 666 * To create a new PAL: * 667 * R5 => VPP element * 668 * R4 => PPL element * 669 * interrupts off! * 670 * CALL MAKEPAL * 671 * PARV indirect VP UPC * 672 * PARV virtual page number * 673 * PARVL address of PSA * 674 * * 675 * To reuse a PAL from the working-set extension: * 676 * R5 => VPP element * 677 * R4 => PPL element * 678 * R3 => already unlinked PAL element * 679 * interrupts off! * 680 * CALL REUSEPAL * 681 * PARV indirect VP UPC * 682 * PARV virtual page number * 683 * PARVL address of PSA * 684 * * 685 * Eats R0:R2, Sets R3 <= PAL. * 686 * Stack required = 8 * 687 * 3 + max ( FBICHECK (5), PGETMEM (0), UERRSETY (1) ) * 688 * * 689 ********************************************************************************** 690 691 BLOCK MAKEPAL and REUSEPAL subroutines 692 ENTRY MAKEPAL 693 ENTRY REUSEPAL 694 695 BEGFRAME 00178801 6 BASE 696 PSAPTR BSS 1 address of PSA to receive page 00178008 6 CACH 697 PAGENUM BSSB 8 virtual page number for page 00099112 6 ZBM 698 PAGEUPC BSSB ADDRESS indirect VP UPC 699 ENDFRAME 700 02631 DD1F8003 6 STAK 701 MAKEPAL ENTR PUSH 02632 C1499112 6 ZBM 702 STPV SP,PAGEUPC 02633 C1578008 6 CACH 703 STPV SP,PAGENUM 02634 C0578801 6 BASE 704 STPVL SP,PSAPTR 705 02635 60578801 1 6 BASE 706 LD R1 SP,PSAPTR R1 -> PSA 02636 D00840F2 1 ZBM 707 INC R1,PSWSSIZE say working set is getting bigger 02637 D0170802 4 BASE 708 INC PPL,PPBUSYWORD say PPL is being used once more 709 02638 DC002F0A 710 CALL PGETMEM get space for a new PAL 02639 40440002 IMM 711 PARVL PALOG 0263A 60D20000 3 0 REG 712 LD R3 R0 R3 -> new PAL 0263B EC16C800 3 BASE 713 STZ R3,PAWORDA clean it up 0263C EC16C802 3 BASE 714 STZ R3,PAWORDC 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 413 (PFPUTIL) F 24 Page File Manipulation Routines 0263D E516C803 4 3 BASE 715 ST PPL R3,PAPPLPTR set PPL pointer 0263E 60170803 0 4 BASE 716 LD R0 PPL,PPPMVALUE and the page map value 0263F E416C801 0 3 BASE 717 ST R0 R3,PAPMVALUE 02640 60178008 0 6 CACH 718 LD R0 SP,PAGENUM 02641 E416C000 0 3 CACH 719 ST R0 R3,PAVPN set page number for PAL 02642 FE0E2647 720 JMP COMMON 721 * --- 722 02643 DD1F8003 6 STAK 723 REUSEPAL ENTR PUSH 02644 C1499112 6 ZBM 724 STPV SP,PAGEUPC 02645 C156C000 3 CACH 725 STPV R3,PAVPN 02646 C0578801 6 BASE 726 STPVL SP,PSAPTR 727 * \ / 728 00002647 729 COMMON LABEL 02647 60095F11 0 5 ZBM 730 LD R0 VPP,VPFCB pickup FCB of responsible file 02648 E408DF12 0 3 ZBM 731 ST R0 R3,PAFCB set FCB address, if any 02649 5C099112 6 ZBM 732 CMZ SP,PAGEUPC check if indirect VP reference 0264A ED88D010 3 ZBM 733 STLNE R3,PAINDVP store indirect VP flag 0264B 60095A10 0 5 ZBM 734 LD R0 VPP,VPCNTL/VPCNTLLKB 0264C E408D210 0 3 ZBM 735 ST R0 R3,PALOCK set lock bit 0264D 60095C10 0 5 ZBM 736 LD R0 VPP,VPCNTL/VPCNTLROB 0264E E408DA11 0 3 ZBM 737 ST R0 R3,PAPMVALUE/PFROBIT set read/only bit 0264F 60094E30 0 5 ZBM 738 LD R0 VPP,VPCNTL/VPMAIFLD get maintenance bits 02650 E408D430 0 3 ZBM 739 ST R0 R3,PAMAIFLD 02651 60578801 1 6 BASE 740 LD R1 SP,PSAPTR 02652 60884116 2 1 ZBM 741 LD R2 R1,PSCURRPROC get current UPC pointer 02653 6016880F 0 2 BASE 742 LD R0 R2,UPCVASP 02654 E408DF10 0 3 ZBM 743 ST R0 R3,PALINK 02655 E4D6880F 3 2 BASE 744 ST R3 R2,UPCVASP put new element on front of VASP list 745 02656 DC40413F 746 CALLNP FBICHECK check (and possibly convert) FBI 02657 FA82265E 2 747 JEQZ R2 NOERROR jump if guy doesn't get a memory error 748 * \ / 749 02658 E4C99112 3 6 ZBM 750 ST R3 SP,PAGEUPC save PAL 02659 60D6C000 3 3 CACH 751 LD R3 R3,PAVPN get the page number 0265A E1578801 5 6 BASE 752 EXCH R5 SP,PSAPTR get PSA pointer, save R5 0265B DC4035B5 753 CALLNP UERRSETY give error to process 0265C E1578801 5 6 BASE 754 EXCH R5 SP,PSAPTR restore R5, PSAPTR 0265D 60C99112 3 6 ZBM 755 LD R3 SP,PAGEUPC restore PAL pointer 756 0000265E 757 NOERROR LABEL 0265E 5D1F8003 6 STAK 758 LEAVE POP 759 * --- 760 761 END MAKEPAL and REUSEPAL subroutines 762 763 764 END Page File Manipulation Routines 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 414 (PFPUTIL) F 24 Find Virtual Page Element 767 768 ********************************************************************************** 769 * * 770 * FINDVP. This routine searches the virtual memory list * 771 * of the current UPC of the selected PSA for the specified * 772 * page. If the element found is an indirect page element * 773 * (refers to a different page in a different process) then * 774 * the indicated page is searched for. Pointed to processes * 775 * are looked for in the tree of under processes because we * 776 * may not look at another session. * 777 * The page pointed to may again point off somewhere so * 778 * this routine may search for a while to find the final * 779 * virtual page element that refers to a real page. If a * 780 * pointed to process does not exist or is execute-only, then * 781 * the indirect virtual page element is taken out of the * 782 * original UPC's VM list and we return saying that the VM * 783 * element was not found. * 784 * Also, for now, we can't point to process zero * 785 * (ourself). If this is ever fixed, a loop problem will * 786 * exist. * 787 * This routine is called with the interrupts off and * 788 * without the chance of a page fault. It uses variables on * 789 * the CPUPAGE and they contain the original PSA looked at, * 790 * the PSA that finally contained the VM element, the root of * 791 * the VM list that the VM element was finally found in, and * 792 * other interesting results. Call: * 793 * * 794 * IOFF interrupts off!!! * 795 * LD R0 page number * 796 * LD R1 * 797 * CALLNP FINDVP * 798 * JMP not found (VPP = 0) * 799 * ST VPP => final VP element * 800 * * 801 * Sets the following global variables: * 802 * FNDVPLPSA (last PSA) => PSA where VP element was eventually found * 803 * FNDVPFPN (first page num) page num originally looked for * 804 * FNDVPPN (page num) page number searched for most recently * 805 * FNDVPVMR (virtual mem root) => root of VP list containing found element * 806 * FNDVPUPC (last UPC ) => UPC where VP element was found, 0 if direct * 807 * * 808 * Eats R0:R2, Sets R5 <= VPP. * 809 * Stack required = 4 * 810 * 4 + max ( FCFREEMEM (0), UNLOPAL (0) ) * 811 * * 812 ********************************************************************************** 813 814 BLOCK FINDVP subroutine 815 ENTRY FINDVP find a virtual page element 816 817 BEGFRAME 00178801 6 BASE 818 FINDVPPSA BSS 1 pointer to original PSA 00178802 6 BASE 819 HIDEOUT BSS 2 place to stuff R3 and R4 820 ENDFRAME 821 0265F DD5F8004 6 STAK 822 FINDVP ENTRNP PUSH 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 415 (PFPUTIL) F 24 Find Virtual Page Element 02660 E440045D 1 823 ST R1 FNDVPLPSA set "last" PSA (owner of final VP element) 02661 E4578801 1 6 BASE 824 ST R1 SP,FINDVPPSA set original PSA address 02662 E400045E 0 825 ST R0 FNDVPFPN set original page number 02663 E400045F 0 826 ST R0 FNDVPPN and page number currently looking for 02664 EC000461 827 STZ FNDVPUPC clear UPC pointer 02665 60484116 1 1 ZBM 828 LD R1 R1,PSCURRPROC get pointer to current UPC 829 * \ / 830 831 ********************************************************************************** 832 * * 833 * Search the VP list of the current UPC. * 834 * * 835 ********************************************************************************** 836 837 * \ / 00002666 838 FNDVPSRCH LABEL 02666 3956480E 5 1 BASE 839 LEA VPP R1,UPCWVMLIST generate root of the window list 02667 F6302669 0 840 JBT R0/MONBIT FNDSWL jump if we are to search window list 02668 3956480D 5 1 BASE 841 LEA VPP R1,UPCVMLIST generate root of the list 00002669 842 FNDSWL LABEL 02669 E5400460 5 843 ST VPP FNDVPVMR save same for the caller 0266A 61574800 5 5 BASE 844 LD VPP VPP,0 advance to the first actual element 0266B 3C174004 0 5 CACH 845 LSRCH R0 VPP,VPVPN search for the element 0266C FE0C269E 846 JNE NOTFNDRTN if not there, return the error 0266D 5C095011 5 ZBM 847 CMZ VPP,VPINDRCT is this an indirect element? 0266E FE0226A0 848 JEQ ENTRYFND jump if not -- the end is here 849 * \ / 850 851 ********************************************************************************** 852 * * 853 * The search has resulted in finding an indirect * 854 * element. We check the underprocess serial number in order * 855 * to find the correct underprogram that this element points * 856 * to. Because each underprogram has a unique serial number * 857 * there is no way that indirect VP elements can point to * 858 * underprograms that they were not intended to point to. * 859 * If a user does a URMAPINAS to process 0 (that is, * 860 * pointing one of his pages to another of his pages) it * 861 * doesn't work, because the URMAPINAS request forbids this. * 862 * * 863 ********************************************************************************** 864 865 * \ / 0266F 60094083 0 5 ZBM 866 LD R0 VPP,VPINDPN get the pointed to page number 02670 E400045F 0 867 ST R0 FNDVPPN save as the page number to look for next 02671 6000045D 0 868 LD R0 FNDVPLPSA pointer to the PSA 02672 60081F15 0 0 ZBM 869 LD R0 R0,PSPROCLIST pointer to the whole underprocess list 02673 60895373 2 5 ZBM 870 LD R2 VPP,VPUPCSERL get the UPC serial number 871 * \ / 872 00002674 873 FNDVPLOOP LABEL 02674 60520000 1 0 REG 874 LD R1 R0 move pointer to a safe register 02675 64885371 2 1 ZBM 875 CPR R2 R1,UPCSERNM found the UPC we were looking for 02676 FE0226A1 876 JEQ FNDINDPROC found the next UPC to search 02677 60085F10 0 1 ZBM 877 LD R0 R1,UPCSONPTR check if any processes below us 02678 FA322674 0 878 JNZA R0 FNDVPLOOP see if this one matches 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 416 (PFPUTIL) F 24 Find Virtual Page Element 879 * \ / 880 00002679 881 FNDVPBRO LABEL 02679 60085F16 0 1 ZBM 882 LD R0 R1,UPCBROPTR get our brother if he exists 0267A FA322674 0 883 JNZA R0 FNDVPLOOP see if our brother matches 0267B 60485F17 1 1 ZBM 884 LD R1 R1,UPCDADPTR move up in the process tree 0267C FA722679 1 885 JNZA R1 FNDVPBRO if zero then we are done 886 * \ / 887 888 ********************************************************************************** 889 * * 890 * No such process. We remove the indirect pointer from * 891 * the caller's memory list and return a not found status. * 892 * This will clean up mappings left if for some reason the * 893 * pointed to process goes away ( actually, most often under * 894 * programs that get zapped ). * 895 * * 896 ********************************************************************************** 897 898 * \ / 0267D 6000045E 0 899 LD R0 FNDVPFPN set the original page number searched for 0267E E400045F 0 900 ST R0 FNDVPPN set up as if no searching was done 0267F 60578801 1 6 BASE 901 LD R1 SP,FINDVPPSA get the original PSA searched 02680 E440045D 1 902 ST R1 FNDVPLPSA 02681 EC000461 903 STZ FNDVPUPC clear => UPC for indirect reference 904 * \ / 905 02682 60484116 1 1 ZBM 906 LD R1 R1,PSCURRPROC get pointer to current UPC 02683 3896480E 2 1 BASE 907 LEA R2 R1,UPCWVMLIST => root of the window list 02684 F6302686 0 908 JBT R0/MONBIT FNDRMSWL jump if looking in window list 02685 3896480D 2 1 BASE 909 LEA R2 R1,UPCVMLIST => root of the list 00002686 910 FNDRMSWL LABEL 02686 60568400 1 2 @R 911 LD R1 @R2 => first element of the list 02687 48164004 0 1 CACH 912 RLSRCH R0 R1,VPVPN find the offending element 02688 FE0C26A4 913 JNE LOSTVPP it was there on the last search 914 * R2 => element before, R1 => indirect element 02689 60085F10 0 1 ZBM 915 LD R0 R1,VPLINK unlink the element that... 0268A E4089F10 0 2 ZBM 916 ST R0 R2,VPLINK ...points to nothing 0268B DC002F8F 917 CALL VFREEMEM free the offending element 0268C 41440002 IMM 918 PARV VPLOG indicate its length 0268D 40524000 1 REG 919 PARVL R1 920 * Remove the PAL if the thing is mapped in. 0268E E6D78802 346 BASE 921 ST2 R3 SP,HIDEOUT save these register values 0268F 60978801 2 6 BASE 922 LD R2 SP,FINDVPPSA get pointer to users PSA 02690 60888116 2 2 ZBM 923 LD R2 R2,PSCURRPROC get current UPC pointer 02691 6116880F 4 2 BASE 924 LD PAL R2,UPCVASP make PAL point to users VASP list 02692 6000045F 0 925 LD R0 FNDVPPN get the page number specified 02693 48170000 0 4 CACH 926 RLSRCH R0 PAL,PAVPN see if the page is in the PAL list 02694 FE0C269D 927 JNE NOTMAPPED if not we don't work 928 * R0 <= page number, R2 <= UPC, PAL <= PA element, R5 <= previous PA element 02695 DC402623 929 CALLNP UNLOPAL unmap the page from page file 02696 60091F10 0 4 ZBM 930 LD R0 PAL,PALINK get forward link to rest of list 02697 E4095F10 0 5 ZBM 931 ST R0 R5,PALINK remove element from the PA list 02698 EC091F10 4 ZBM 932 STZ PAL,PALINK clear the forward pointer in our element 933 * Now place the PAL into the working set extension list 02699 38168810 0 2 BASE 934 LEA R0 R2,UPCWSX get ptr to WSX 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 417 (PFPUTIL) F 24 Find Virtual Page Element 0269A 60440000 1 IMM 935 LD R1 0 get a null forward pointer 0269B 3C481F10 1 0 ZBM 936 LSRCH R1 R0,PALINK look for the end of the list 0269C E5081F10 4 0 ZBM 937 ST PAL R0,PALINK hook new element onto the list 938 * \ / 939 0000269D 940 NOTMAPPED LABEL 0269D 62D78802 346 BASE 941 LD2 R3 SP,HIDEOUT restore registers 942 * \ / 943 944 ********************************************************************************** 945 * * 946 * The VP element could not be found for one reason or * 947 * another. Store zero in the VPP register pointer and do not * 948 * advance the return address. * 949 * * 950 ********************************************************************************** 951 952 * \ / 0000269E 953 NOTFNDRTN LABEL 0269E 61440000 5 IMM 954 LD VPP 0 no VPP found 0000269F 955 FNDEXIT LABEL 0269F 5D1F8004 6 STAK 956 LEAVE POP return 957 * --- 958 959 ********************************************************************************** 960 * * 961 * Good entry has been found, VPP points to it. Make good return. * 962 * * 963 ********************************************************************************** 964 000026A0 965 ENTRYFND LABEL 026A0 FBE0269F 7 966 IRJ R7 FNDEXIT advance the return address 967 * --- 968 969 ********************************************************************************** 970 * * 971 * After encountering an indirect VP element we attempted * 972 * and succeeded in finding the next UPC to search for another * 973 * VP element. First we initialize some local CPU variables * 974 * and then back to the search. * 975 * * 976 ********************************************************************************** 977 000026A1 978 FNDINDPROC LABEL 026A1 E4400461 1 979 ST R1 FNDVPUPC store the UPC pointer 026A2 6000045F 0 980 LD R0 FNDVPPN get the page number to look for 026A3 FE0E2666 981 JMP FNDVPSRCH see if we can find this VP element 982 * --- 983 984 ********************************************************************************** 985 * * 986 * This error occurs when the page that we originally * 987 * looked for has disappeared. Possible causes are temp * 988 * sharing (if this routine is getting interrupted out of and * 989 * the FNDVPxxx locations are getting used by someone else * 990 * [power fail???]), or there is a way for another processor * 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 418 (PFPUTIL) F 24 Find Virtual Page Element 991 * to mangle the VM list of a process that is running. Good * 992 * luck finding the problem. * 993 * * 994 ********************************************************************************** 995 000026A4 996 LOSTVPP LABEL 026A4 00130010 997 HALT HALTS0010 VM list changed out from under us 998 * --- 999 1000 END FINDVP subroutine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 419 (PFPUTIL) F 24 Find out whether MS block is resident 1003 1004 ********************************************************************************** 1005 * * 1006 * BLKREADIN. Function to say whether copy of specified * 1007 * MS block already exists in physical memory. Leaves * 1008 * MSQINLOCK locked if the block was not spotted in either the * 1009 * list of active pages or in the list of unused, dirty, * 1010 * pages. * 1011 * * 1012 * Call: * 1013 * LD R4 * 1014 * CALLNP BLKREADIN * 1015 * JMP * 1016 * * 1017 * * 1018 * Eats R0:R1 * 1019 * Stack required = 1 * 1020 * 0 + max ( LOCKWAIT (0) ) * 1021 * * 1022 ********************************************************************************** 1023 1024 BLOCK BLKREADIN subroutine 1025 ENTRY BLKREADIN 1026 1027 BEGFRAME 1028 ENDFRAME 1029 026A5 DD5F8001 6 STAK 1030 BLKREADIN ENTRNP PUSH 026A6 604B3460 1 4 CBM 1031 LD R1 R4/PPHASHFLD get index part 1032 PLOCK MSQINLOCK 026A7 0CC00000 1032 IOFF 026A8 D1C01F16 1032 SETT MSQINLOCK 026A9 FE0C26AB 1032 JNE MA(2+DISPW MA 0) 026AA DC40308B 1032 CALLNP LOCKWAIT 1033 PLOCK PPAGELOCK(R1) 026AB 0CC00000 1033 IOFF 026AC D1E21E21 1 1033 SETT PPAGELOCK(R1) 026AD FE0C26AF 1033 JNE MA(2+DISPW MA 0) 026AE DC40308B 1033 CALLNP LOCKWAIT 1034 PLOCK PPIDLOCK 026AF 0CC00000 1034 IOFF 026B0 D1C01DD9 1034 SETT PPIDLOCK 026B1 FE0C26B3 1034 JNE MA(2+DISPW MA 0) 026B2 DC40308B 1034 CALLNP LOCKWAIT 026B3 60221E61 0 1 1035 LD R0 PPAGELIST(R1) 026B4 3D160801 4 0 BASE 1036 LSRCH R4 R0,PPBLOCK scan down in-use pages 026B5 FE0C26BD 1037 JNE NOTDONEYET keep looking 1038 * \ / 1039 1040 * found the page, clean up and leave 1041 * R1 has hash field 000026B6 1042 FOUNDRES LABEL 1043 PUNLOCK PPIDLOCK 026B6 EC001DD9 1043 STZ PPIDLOCK 026B7 0C800000 1043 ION 1044 PUNLOCK PPAGELOCK(R1) 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 420 (PFPUTIL) F 24 Find out whether MS block is resident 026B8 EC221E21 1 1044 STZ PPAGELOCK(R1) 026B9 0C800000 1044 ION 1045 PUNLOCK MSQINLOCK 026BA EC001F16 1045 STZ MSQINLOCK 026BB 0C800000 1045 ION 000026BC 1046 NOWHERE LABEL 026BC 5D1F8001 6 STAK 1047 LEAVE POP return to caller 1048 * --- 1049 1050 * not found in use, try idle list 000026BD 1051 NOTDONEYET LABEL 026BD 600B3650 0 4 CBM 1052 LD R0 R4/IDLHASHFLD make index to proper list 026BE 60201DDD 0 0 1053 LD R0 PPUSDIDLE(R0) try unused, but read, pages 026BF 3D160801 4 0 BASE 1054 LSRCH R4 R0,PPBLOCK scan them 026C0 FE0226B6 1055 JEQ FOUNDRES jump if success 1056 PUNLOCK PPIDLOCK 026C1 EC001DD9 1056 STZ PPIDLOCK 026C2 0C800000 1056 ION 1057 PUNLOCK PPAGELOCK(R1) 026C3 EC221E21 1 1057 STZ PPAGELOCK(R1) 026C4 0C800000 1057 ION 026C5 FBE026BC 7 1058 IRJ R7 NOWHERE do skip, leave MSQINLOCK locked, IOFF 1059 * --- 1060 1061 END BLKREADIN subroutine 50 INPUT PARITYERROR parity error interrupt handler 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 421 (PARITYERROR) F 25 Memory Parity Error Interrupt Handler 3 4 BLOCK Memory Error Interrupt Routine 5 6 ENTRY PARITYERR 7 8 ********************************************************************************** 9 * * 10 * This routine is the memory parity error interrupt handler. * 11 * On entry the hardware has set up the registers as follows: * 12 * R2 = reason * 13 * 0 = no response, instruction fetch * 14 * 1 = abnormal data, instruction fetch * 15 * 2 = no response, operand fetch * 16 * 3 = abnormal data, operand fetch * 17 * 4 = no response, interrupt poll * 18 * 5 = abnormal data, interrupt poll * 19 * R3 = 18-bit virtual address (if R2 is 0, 1, 2, or 3) * 20 * offending slot number (if R2 is 4 or 5) * 21 * R4 = console area of offending routine * 22 * * 23 * The following actions are possible: * 24 * * 25 * If the error is a memory failure in read-only resident operating * 26 * system code, the bad word is re-constructed using checksums generated * 27 * at boot time. The system continues operation normally. * 28 * * 29 * If the error is a memory failure in pageable memory, then the * 30 * page is marked as unusable and then removed from the working sets * 31 * of all processes using that page. If the page is clean, the system * 32 * will continue normally. If the page is dirty, then the system will * 33 * continue, but any process that attempts to reference that page will * 34 * receive a virtual memory failure interrupt. Note that we cannot remove * 35 * any PAL's that are locked. If the process that suffered the parity * 36 * error has the page locked, we will give him a virtual memory failure * 37 * error. If any other user has the page locked, we will not disturb the * 38 * PAL, and hope that he finishes using the page without tripping over * 39 * the bad word (if he does trip over it, he will get an error, too). * 40 * * 41 * If the error is a memory failure elsewhere (such as in read/write * 42 * operating system tables), the system will halt. * 43 * * 44 * If the error is an abnormal data response from a device other * 45 * than memory, the system will halt. In the future, we may want to * 46 * add code to the device drivers to recover from this situation. * 47 * This halt is coded with the slot and channel number in the right * 48 * two digits displayed. The channel number will be meaningless if * 49 * the device is not a PPU. * 50 * * 51 * If the error is a "no response" error, then we will do a WRU * 52 * to determine whether the device is still alive. If it is dead, the * 53 * system will halt. If it is still alive, the error will be deemed * 54 * to be a fluke, and the system will attempt to continue. However, * 55 * if we get a second such flakey error within one second of the first, * 56 * the system will halt. This halt is coded with the slot and channel * 57 * number in the right two digits displayed. The channel number will * 58 * be meaningless if the device is not a PPU. * 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 422 (PARITYERROR) F 25 Memory Parity Error Interrupt Handler 59 * * 60 * The following halts are possible: * 61 * * 62 * M00C0 - another parity error occurred while processing a parity error * 63 * H00C1 - meaningless code in R2 on parity error interrupt * 64 * H0Dsc - a bus device has died (will not answer "who are you") * 65 * H00C3 - a bus device is very flakey (two errors within one second) * 66 * H0Csc - abnormal data from a device other than memory * 67 * M00C5 - parity error in operating system tables * 68 * M00C6 - uncorrectable parity error in resident system. * 69 * M00C7 - parity error in resident system before checksums were generated * 70 * S00Cx - various system errors that should never happen * 71 * * 72 * Stack required = 20 * 73 * 6 + max ( ERRORLOG (3), FREEZE (14), LOCKWAIT (0), * 74 * MAPINMEM (3), MAPOUTMEM (1), REMOVEALL (8), * 75 * UERRSET (1), UNFREEZE (1), * 76 * * 77 ********************************************************************************** 78 79 BLOCK PARITYERR routine 80 ENTRY PARITYERR 81 82 * Highest stack frame in interrupt handler 83 84 BEGFRAME2 00178800 6 BASE 85 MERRWORDA BSS 1 first word of error log info 00098040 6 ZBM 86 MERRCODE EQU MERRWORDA/BITS 0:3 reason code (from R2) 00000000 ABS 87 MERRNRIF EQU 0 no response, instruction fetch 00000001 ABS 88 MERRABIF EQU 1 abnormal data, instruction fetch 00000002 ABS 89 MERRNROF EQU 2 no response, operand fetch 00000003 ABS 90 MERRABOF EQU 3 abnormal data, operand fetch 00000004 ABS 91 MERRNRIP EQU 4 no response, interrupt poll 00000005 ABS 92 MERRABIP EQU 5 abnormal data, interrupt poll 00000005 ABS 93 MERRCODEMAX EQU 5 max value for this field 00098610 6 ZBM 94 MERRABDATA EQU MERRCODE/BIT 31 1 => abnormal data, 0 => no response 00098840 6 ZBM 95 MERRACTION EQU MERRWORDA/BITS 4:7 action taken for error: 00000000 ABS 96 MERRFLUKE EQU 0 fluke: interrupt ignored 00000001 ABS 97 MERRFIX EQU 1 data reconstructed from cksum 00000002 ABS 98 MERRPAGE EQU 2 page marked bad 00099180 6 ZBM 99 MERRVADR EQU MERRWORDA/BITS 8:31 18-bit virtual address 00178801 6 BASE 100 MERRPFILE BSS 1 page file for error location 00178802 6 BASE 101 MERRBLOCK BSS 1 block number for this page 00178803 6 BASE 102 MERRPPL BSS 1 PPL pointer for bad page 00178804 6 BASE 103 MERRCAR BSS 1 console area register of interrupted rtn 00178805 6 BASE 104 TEMP BSS 1 105 ENDFRAME 106 107 * R2=reason (see box), R3=where (see box), R4= old console area 108 000026C6 109 PARITYERR LABEL 110 SETSP set stack pointer 026C6 81538000 6 REG 110 STCAR SP 026C7 6197880D 6 6 BASE 110 LD SP SP,CASTACKPTR 026C8 61979020 6 6 REG 110 LD SP SP+(2 POWER STAKLOG) 026C9 EC1F8006 6 STAK 111 STZ PUSH allocate stack frame 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 423 (PARITYERROR) F 25 Memory Parity Error Interrupt Handler 026CA D1C00462 112 SETT MEMERRFLAG say we are processing error 026CB FE0C26CD 113 JNE FLAGOK jump if not already set 026CC 000D00C0 114 HALT HALTM00C0 memory error in memory error routine 115 * --- 116 000026CD 117 FLAGOK LABEL 026CD 68840005 2 IMM 118 UCPR R2 MERRCODEMAX see if code is reasonable 026CE FE0A26D0 119 JLE CODEOK jump if so 026CF 000800C1 120 HALT HALTH00C1 meaningless interrupt code on mem error 121 * --- 122 000026D0 123 CODEOK LABEL 026D0 E4898040 2 6 ZBM 124 ST R2 SP,MERRCODE save the error code 026D1 E4C99180 3 6 ZBM 125 ST R3 SP,MERRVADR save virtual address 026D2 EC178802 6 BASE 126 STZ SP,MERRBLOCK say no block number known 026D3 E5178804 4 6 BASE 127 ST R4 SP,MERRCAR save old CAR 026D4 64840004 2 IMM 128 CPR R2 MERRNRIP is this error on interrupt poll? 026D5 FE06274E 129 JGE INTPOLL jump if interrupt poll problem 026D6 60CADC80 3 3 CBM 130 LD PFPTR R3/PAGEFIELD get 8-bit virtual page number 026D7 80978801 6 BASE 131 PFRD SP,MERRPFILE get the page file value 026D8 60498841 1 6 ZBM 132 LD R1 SP,MERRPFILE/PFSLOT get slot number of device 133 * \ / 134 135 ********************************************************************************** 136 * * 137 * MCUs will respond with bad data in the second word of * 138 * a double word transfer after receiving a WRU(0). This problem * 139 * turns up in systems that have CPU4s and MCUs. The work around * 140 * is to instead of doing a WRU(0) to do a read to location 0, then * 141 * pick up the slot type from SLOTTABLE. This can be done by * 142 * replacing the LDFB BUSCWRU with LDFB BUSCREAD, then picking * 143 * the slottype out of the SLOTTABLE. The original instructions * 144 * are preceded by 2 stars (**). The replaced instructions have * 145 * 2 stars in their comment field. * 146 * * 147 ********************************************************************************** 148 149 * \ / 150 ** LDFB BUSCWRU get WRU response 026D9 0C024000 IMM 151 LDFB BUSCREAD ** perform a data read 026DA FE1226E8 152 JCS SLOTDEAD jump if no response to WRU 026DB FE1626E8 153 JOS SLOTDEAD jump if abnormal response to WRU 154 * \ / normal response in R0 155 156 ********************************************************************************** 157 * * 158 * Now, we know that the bus device is alive. * 159 * R0 = normal response * 160 *** R0 = WRU response. * 161 * * 162 ********************************************************************************** 163 164 * \ / 026DC 5C098610 6 ZBM 165 CMZ SP,MERRABDATA is this problem abnormal data? 026DD FE02274F 166 JEQ FLUKE jump if problem was no response 167 ** LD R0 R0/WRU0TYPE get slot device type 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 424 (PARITYERROR) F 25 Memory Parity Error Interrupt Handler 026DE 60221ECE 0 1 168 LD R0 SLOTTABLE(R1) ** pick up the slot info 026DF 600A0030 0 0 CBM 169 LD R0 R0/BITS 0:2 ** extract the type 026E0 64040001 0 IMM 170 CPR R0 SLTTMEM is it a memory? 026E1 FE0226EE 171 JEQ MEMSLOT jump if it is 172 * \ / 173 174 ********************************************************************************** 175 * * 176 * We arrive at this halt when we have an abnormal data * 177 * interrupt and the VRA device denies being an MCU when we * 178 * poll it. This means one of several things: * 179 * 1) An I/O driver has attempted to talk to a * 180 * controller that will not respond. * 181 * 2) The offending process did a load to a * 182 * PPU or SSU that is outside of the range * 183 * where such an operation is legal. * 184 * 3) We got an abnormal data from an SSU or PPU * 185 * in error (hardware problem). * 186 * 4) A memory failed to properly answer the WRU * 187 * that we just tried. * 188 * * 189 * When we arrive here: * 190 * R0 = type code extracted from the WRU response. * 191 * R1 = the slot number that we blame. * 192 * ... the reason, where, and CA are on the stack at * 193 * SP,MERRCODE, SP,MERRVADR, and SP,MERRCAR, respectively. * 194 * R4 => CA for offending process. * 195 * * 196 ********************************************************************************** 197 198 * \ / 026E2 614A7880 5 1 CBM 199 LD R5 R1/BITS 28:3 get slot number into next up hex digit 026E3 1949B021 5 6 ZBM 200 ADD R5 SP,MERRPFILE/PPUCHAN pick up the channel number 026E4 194026E7 5 201 ADD R5 CHALTPROTO turn info into a halt command 026E5 5D534000 5 REG 202 XCT R5 stop and display error 203 * HALT HALTS0Csc abnormal data from non-memory device 026E6 FE0E274F 204 JMP FLUKE where to go to retry operation 205 * --- 206 026E7 00080C00 207 CHALTPROTO HALT HALTH0CSC abnormal data from non-memory device 208 * SC is offending slot/channel if PPU 209 * note that the PC at halt time is 210 * actually at the XCT instruction. 211 212 ********************************************************************************** 213 * * 214 * Dead Slot * 215 * We come here when our LDFB failed to get any response. * 216 * This is serious stuff. * 217 * R1 = slot number (slot number also in HALT code) * 218 * ... the reason, where, and CA are on the stack at * 219 * SP,MERRCODE, SP,MERRVADR, and SP,MERRCAR, respectively. * 220 * R4 => CA for offending process * 221 * * 222 ********************************************************************************** 223 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 425 (PARITYERROR) F 25 Memory Parity Error Interrupt Handler 000026E8 224 SLOTDEAD LABEL bus device has died 026E8 614A7880 5 1 CBM 225 LD R5 R1/BITS 28:3 get slot number into next up hex digit 026E9 1949B021 5 6 ZBM 226 ADD R5 SP,MERRPFILE/PPUCHAN pick up the channel number 026EA 194026ED 5 227 ADD R5 DHALTPROTO turn info into a halt command 026EB 5D534000 5 REG 228 XCT R5 stop and display error 229 * HALT HALTH0DSC no response from bus device 026EC FE0E274F 230 JMP FLUKE where to go to retry 231 * --- 232 026ED 00080D00 233 DHALTPROTO HALT HALTH0DSC no response from bus device 234 * SC is offending slot/channel if PPU 235 * note that the PC at halt time is 236 * actually at the XCT instruction. 237 238 ********************************************************************************** 239 * * 240 * Now, we have an abnormal data response from a memory. * 241 * (This means a parity error.) We will fetch the word and see * 242 * if this is for real. * 243 * * 244 ********************************************************************************** 245 000026EE 246 MEMSLOT LABEL 026EE 60824000 2 IMM 247 LD R2 BUSCREAD build read command in R2 026EF 6009A8C1 0 6 ZBM 248 LD R0 SP,MERRPFILE/PFPAGENUM 026F0 E40A94C0 0 2 CBM 249 ST R0 R2/FLDABSPG save page number 026F1 6009ACA0 0 6 ZBM 250 LD R0 SP,MERRVADR/DISPFIELD 026F2 E40AACA0 0 2 CBM 251 ST R0 R2/DISPFIELD save offset in page 026F3 0C128000 2 REG 252 LDFB R2 issue a read command 026F4 FE1226E8 253 JCS SLOTDEAD jump if no response 026F5 FE14274F 254 JOC FLUKE jump if good data 255 * \ / abnormal response (parity error is repeatable) 256 257 ********************************************************************************** 258 * * 259 * Now, we know that the error is for real. Decide what * 260 * to do about it. * 261 * * 262 ********************************************************************************** 263 264 * \ / 026F6 64C40080 3 IMM 265 CPR PFPTR MONPF 026F7 FE082721 266 JLT BADPAGE jump if a user page 026F8 64C40082 3 IMM 267 CPR PFPTR PNWNDO1 026F9 FE082700 268 JLT NOHOPE jump if below window 1 026FA 64C40085 3 IMM 269 CPR PFPTR PNWNDO4 026FB FE082721 270 JLT BADPAGE jump if a window 026FC 64C40089 3 IMM 271 CPR PFPTR MONPF+(RESIDENT/FLDPAGE) 026FD FE082700 272 JLT NOHOPE jump if below resident 026FE 64C400AB 3 IMM 273 CPR PFPTR MONPF+(ENDOFRES/FLDPAGE) 026FF FE0A2701 274 JLE FIXRES jump if read/only resident 275 * \ / 276 277 ********************************************************************************** 278 * * 279 * In the original system design, provision was made for * 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 426 (PARITYERROR) F 25 Memory Parity Error Interrupt Handler 280 * parts of the operating system to be virtual. This feature * 281 * was never implemented due to certain difficulties with * 282 * subroutine calls, locks, and the like. At the present time, * 283 * all system (except for the abandoned start-up code) is * 284 * considered to be resident, and all addresses beyond ENDOFRES * 285 * are now table space. * 286 * Here are the two instructions that were provided to * 287 * properly classify the virtual parts of the system. * 288 * * 289 * CPR PFPTR MONPF+(ENDOFSYS/FLDPAGE) * 290 * JLE BADPAGE jump if virtual system * 291 * * 292 ********************************************************************************** 293 294 * \ / 02700 000D00C5 295 NOHOPE HALT HALTM00C5 parity error in OS tables 296 * --- 297 298 ********************************************************************************** 299 * * 300 * Here, we have an error in the resident nucleus. We will * 301 * correct it using checksums that were generated at boot time. * 302 * The only tricky thing is that we will map the page into address * 303 * zero, since the mapping at its usual address is read/only. * 304 * * 305 ********************************************************************************** 306 00002701 307 FIXRES LABEL 02701 5C001C6B 308 CMZ BOOTFLAG check for still in bootstrap 02702 FE022704 309 JEQ FIXRES1 jump if checksums exist 00002703 310 NOFIXRES LABEL 02703 000D00C7 311 HALT HALTM00C7 error while boot in progress 312 * --- 313 00002704 314 FIXRES1 LABEL 02704 60001CF6 0 315 LD R0 FLAGS get the dispatcher flags word 02705 F63C2703 0 316 JBT R0/BIT FLCHKSUM NOFIXRES jump if checksum words are bad 317 PLOCK MEMCHKLOCK exclude other CPU's 02706 0CC00000 317 IOFF 02707 D1C01CC9 317 SETT MEMCHKLOCK 02708 FE0C270A 317 JNE MA(2+DISPW MA 0) 02709 DC40308B 317 CALLNP LOCKWAIT 0270A 60C40080 3 IMM 318 LD PFPTR MONPF 0270B 80D78805 6 BASE 319 PFRC SP,TEMP save old page file value 0270C 60178801 0 6 BASE 320 LD R0 SP,MERRPFILE get page map value of page in error 0270D 28020008 0 IMM 321 BSUB R0 1*PFROBIT remove the read-only bit 0270E 00D20000 0 REG 322 LDPF R0 map the page into address zero 0270F 6089ACA0 2 6 ZBM 323 LD R2 SP,MERRVADR/DISPFIELD R2 = failing address location 02710 D1568800 2 BASE 324 STMW R2,0 set all bits of bad word to one 02711 D0168800 2 BASE 325 INC R2,0 verify, then set all bits to zero 02712 5C168800 2 BASE 326 CMZ R2,0 see if it worked 02713 FE022715 327 JEQ FIXRES2 jump if all is ok 02714 000D00C6 328 HALT HALTM00C6 uncorrectable error in resident system 329 * --- 330 00002715 331 FIXRES2 LABEL 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 427 (PARITYERROR) F 25 Memory Parity Error Interrupt Handler 02715 60499E70 1 6 ZBM 332 LD R1 SP,MERRVADR/FLDPAGE page number, without high bit 02716 60621CC1 1 1 333 LD R1 MEMCKSUM(R1-RESIDENT/FLDPAGE) checksum value 02717 600403FF 0 IMM 334 LD R0 WPP-1 loop index 00002718 335 CKSUMLOOP LABEL 02718 74560800 1 0 BASE 336 XOR R1 R0,0 calculate XOR of all words 02719 FA262718 0 337 JDR R0 CKSUMLOOP do all words in page 0271A E4568800 1 2 BASE 338 ST R1 R2,0 save correct value in word 0271B 00D78805 6 BASE 339 LDPF SP,TEMP restore page file location 340 PUNLOCK MEMCHKLOCK allow other CPU's 0271C EC001CC9 340 STZ MEMCHKLOCK 0271D 0C800000 340 ION 0271E 60040001 0 IMM 341 LD R0 MERRFIX 0271F E4098840 0 6 ZBM 342 ST R0 SP,MERRACTION say we fixed it 02720 FE0E2751 343 JMP FLUKE1 but treat like fluke 344 * --- 345 346 ********************************************************************************** 347 * * 348 * Here, we have a parity error on a pageable page. We will * 349 * remove that page from everybody's working set. But first, scan * 350 * the current process's VASP list to find the block number, then * 351 * find the PPL and mark the page as bad. When we call DISCARDPAL * 352 * for the last PAL, the DONEPPL routine will notice that the page * 353 * is bad and quarantine it. * 354 * * 355 ********************************************************************************** 356 00002721 357 BADPAGE LABEL 02721 EC178804 6 BASE 358 STZ SP,MERRCAR make sure we will exit to dispatcher 02722 60000414 0 359 LD R0 CPCUPC R0 -> current UPC 02723 6116080F 4 0 BASE 360 LD PAL R0,UPCVASP PAL -> working set list 02724 3CD70000 3 4 CACH 361 LSRCH PFPTR PAL,PAVPN find our PAL 02725 FE022727 362 JEQ BADPAGE1 jump if found 02726 001300C8 363 HALT HALTS00C8 PAL not found (R3 = virtual page number) 364 * --- 365 00002727 366 BADPAGE1 LABEL 02727 5C091210 4 ZBM 367 CMZ PAL,PALOCK is the PAL locked? 02728 FE02272B 368 JEQ NOTLOCKED jump if not 02729 60840870 2 IMM 369 LD R2 UINTVMFPE+VERYBAD else get error code 370 * R3 = page number 0272A DC403589 371 CALLNP UERRSET and give the user an error 0000272B 372 NOTLOCKED LABEL 0272B 61170803 4 4 BASE 373 LD PPL PAL,PAPPLPTR pick up PPL pointer 0272C E5178803 4 6 BASE 374 ST PPL SP,MERRPPL and save for later use 0272D 60570801 1 4 BASE 375 LD R1 PPL,PPBLOCK pick up disk block address 0272E E4578802 1 6 BASE 376 ST R1 SP,MERRBLOCK save it 377 SETTBIT PPL,PPMEMERR flag this page as bad 0272F 60021000 0 IMM 377 LD R0 1*BIT(((PPL,PPMEMERR) DISP (PPL,0))/BITS 0:4) 02730 FC170802 0 4 BASE 377 IORM R0 PPL,(((PPL,PPMEMERR) DISP (PPL,0))/BITS 15:31) 378 * \ / 379 02731 DC402D79 380 CALLNP FREEZE freeze the system 02732 61001EB1 4 381 LD PCB PCONTROL PCB -> first process in system 382 * \ / 383 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 428 (PARITYERROR) F 25 Memory Parity Error Interrupt Handler 00002733 384 PROCLOOP LABEL 02733 E5178805 4 6 BASE 385 ST PCB SP,TEMP save this reg 02734 61491F13 5 4 ZBM 386 LD R5 PCB,PCPSADRS R5 -> PSA for this process 02735 DC0025EB 387 CALL MAPINMEM map in this user virtual free storage 02736 40534000 5 REG 388 PARVL R5 pointer to the PSA 02737 61178803 4 6 BASE 389 LD R4 SP,MERRPPL address of PPL for bad page 02738 60895F15 2 5 ZBM 390 LD R2 R5,PSPROCLIST get pointer to list of UPC's 391 * \ / 392 00002739 393 MPEUPCLP LABEL 02739 60D28000 3 2 REG 394 LD R3 R2 move pointer to appropriate register 0273A DC002766 395 CALL REMOVEALL remove all guilty PAL's 0273B 4016C80F 3 BASE 396 PARL R3,UPCVASP from VASP list 0273C DC002766 397 CALL REMOVEALL 0273D 4016C810 3 BASE 398 PARL R3,UPCWSX from WSX list 399 * \ / 400 0273E 6088DF10 2 3 ZBM 401 LD R2 R3,UPCSONPTR get our the son pointer 0273F FAB22739 2 402 JNZA R2 MPEUPCLP jump to process son UPC 403 * \ / 404 00002740 405 MPEBROLP LABEL 02740 6088DF16 2 3 ZBM 406 LD R2 R3,UPCBROPTR get pointer to brother process 02741 FAB22739 2 407 JNZA R2 MPEUPCLP jump to process brother UPC 408 * \ / 409 02742 60C8DF17 3 3 ZBM 410 LD R3 R3,UPCDADPTR move up to our overprocess 02743 FAF22740 3 411 JNZA R3 MPEBROLP see if any brother process to check 412 * \ / 413 02744 61178805 4 6 BASE 414 LD PCB SP,TEMP restore PCB pointer 02745 61091F14 4 4 ZBM 415 LD PCB PCB,PCNXTCB point to next PCB 02746 FB322733 4 416 JNZA PCB PROCLOOP jump if more processes exist 417 * \ / the page is probably quarantined now 418 02747 DC402D95 419 CALLNP UNFREEZE unfreeze the system 02748 DC4025FC 420 CALLNP MAPOUTMEM unmap the last guy processed 02749 DC0025EB 421 CALL MAPINMEM remap interrupted session, if any 0274A 40400412 422 PARVL CPPSA process status area 0274B 60040002 0 IMM 423 LD R0 MERRPAGE 0274C E4098840 0 6 ZBM 424 ST R0 SP,MERRACTION say we retired a page 0274D FE0E275C 425 JMP LOGERR and go log it 426 * --- 427 0000274E 428 INTPOLL LABEL error on interrupt poll 0274E E4D78801 3 6 BASE 429 ST R3 SP,MERRPFILE save slot number as page file 430 * \ / 431 0000274F 432 FLUKE LABEL flakey type error 0274F 60040000 0 IMM 433 LD R0 MERRFLUKE 02750 E4098840 0 6 ZBM 434 ST R0 SP,MERRACTION claim we had a fluke 435 * \ / 436 437 ********************************************************************************** 438 * * 439 * Here, we have what should be a non-repeatable error. See * 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 429 (PARITYERROR) F 25 Memory Parity Error Interrupt Handler 440 * if the same one has occurred recently. If so, things are getting * 441 * sick and we should halt. Otherwise continue. * 442 * * 443 ********************************************************************************** 444 445 * \ / 00002751 446 FLUKE1 LABEL 02751 60178801 0 6 BASE 447 LD R0 SP,MERRPFILE get page file of error 02752 2802000E 0 IMM 448 BSUB R0 1*PFROBIT+1*PFALTBIT+1*PFREFBIT 02753 E0001CF2 0 449 EXCH R0 MPEPFILE swap with previous one 02754 62401EE5 12 450 LD2 R1 FDATE get current time (close enough) 02755 E2401CF3 12 451 EXCH2 R1 MPEDATE swap with previous one 02756 64001CF2 0 452 CPR R0 MPEPFILE same error as previous? 02757 FE0C275C 453 JNE LOGERR jump if not 02758 32401CF3 12 454 RSB2 R1 MPEDATE R1,R2 = time since last error 02759 664403E8 12 IMM 455 CPR2 R1 1*MSECSS within previous second? 0275A FE04275C 456 JGT LOGERR jump if not 0275B 000800C3 457 HALT HALTH00C3 bus device is very flakey 458 * --- 459 460 ********************************************************************************** 461 * * 462 * Here, we have done any necessary recovery. Log the error * 463 * and return. * 464 * * 465 ********************************************************************************** 466 0000275C 467 LOGERR LABEL 0275C 61538000 5 6 REG 468 LD R5 SP 0275D DC005048 469 CALL ERRORLOG 0275E 41440E19 IMM 470 PARV ERLCMPE memory parity error 0275F 41574800 5 BASE 471 PARV R5,MERRWORDA code, action, virt adr 02760 41574801 5 BASE 472 PARV R5,MERRPFILE page file value 02761 40574802 5 BASE 473 PARVL R5,MERRBLOCK block number 474 * \ / 475 476 ********************************************************************************** 477 * * 478 * Time to return. If MERRCAR is non-zero, we return via LDCA. * 479 * Else we jump to the dispatcher. * 480 * * 481 ********************************************************************************** 482 483 * \ / 02762 EC000462 484 STZ MEMERRFLAG no longer processing memory error 02763 5C178804 6 BASE 485 CMZ SP,MERRCAR 02764 FE0228B7 486 JEQ DISPATCH jump if no active process 02765 01178804 6 BASE 487 LDCA SP,MERRCAR else return to interrupted place 488 * --- 489 490 END PARITYERR routine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 430 (PARITYERROR) F 25 Memory Parity Error Interrupt Handler 492 493 ********************************************************************************** 494 * * 495 * REMOVEALL * 496 * Routine to remove all PAL's for a particular page from * 497 * a PAL list. * 498 * Call: * 499 * SP = stack pointer * 500 * PPL * 501 * R5 -> PSA of process owning list * 502 * CALL REMOVEALL * 503 * PARL head of list (R5,PSVASP for example) * 504 * * 505 * Eats R0:R2. * 506 * Stack required = 8. * 507 * 4 + max ( DISCARDPAL (4) ) * 508 * * 509 ********************************************************************************** 510 511 BLOCK REMOVEALL subroutine 512 ENTRY REMOVEALL 513 514 BEGFRAME 00178801 6 BASE 515 REMLIST BSS 1 list header 00178802 6 BASE 516 REMR3R4 BSS 2 for saving R3 & R4 00178803 6 BASE 517 REMPPL EQU REMR3R4(1) address of relevent PPL 518 ENDFRAME 519 02766 DD1F8004 6 STAK 520 REMOVEALL ENTR PUSH 02767 C0178801 6 BASE 521 STPL SP,REMLIST save pointer to list head 02768 E6D78802 346 BASE 522 ST2 R3 SP,REMR3R4 save R3 and R4 523 00002769 524 LOOP LABEL 02769 60178803 0 6 BASE 525 LD R0 SP,REMPPL PPL pointer 0276A 61178C01 4 6 FPVR 526 LD PAL @(SP,REMLIST) PAL -> first PAL 0000276B 527 SEARCH LABEL 0276B 3C170803 0 4 BASE 528 LSRCH R0 PAL,PAPPLPTR find interesting PAL 0276C FE0C2778 529 JNE RETURN jump if none 0276D 5C091210 4 ZBM 530 CMZ PAL,PALOCK is PAL locked? 0276E FE022771 531 JEQ FOUND jump if not 0276F FB36276B 4 532 LJNA PAL SEARCH else ignore it and find next one 02770 FE0E2778 533 JMP RETURN jump if no more pages 534 * --- 535 00002771 536 FOUND LABEL PAL -> page to remove 02771 60178801 0 6 BASE 537 LD R0 SP,REMLIST R0 -> list header 02772 3D081F10 4 0 ZBM 538 LSRCH PAL R0,PALINK find previous element 02773 60491F10 1 4 ZBM 539 LD R1 PAL,PALINK 02774 E4481F10 1 0 ZBM 540 ST R1 R0,PALINK unlink the element 02775 D04940F2 5 ZBM 541 DEC R5,PSWSSIZE correct the working set size 02776 DC402E15 542 CALLNP DISCARDPAL discard this PAL 02777 FE0E2769 543 JMP LOOP and try another 544 * --- 545 00002778 546 RETURN LABEL 02778 62D78802 346 BASE 547 LD2 R3 SP,REMR3R4 restore registers 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 431 (PARITYERROR) F 25 Memory Parity Error Interrupt Handler 02779 5D1F8004 6 STAK 548 LEAVE POP 549 * --- 550 551 END REMOVEALL subroutine 552 553 554 END Memory Error Interrupt Routine 51 INPUT POWERDOWN power down handler 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 432 (POWERDOWN) F 26 Power fail routine 3 4 BLOCK Power Fail Shutdown and Restart Routines 5 ENTRY POWERFAIL power fail interrupt handler 6 ENTRY POWERUP power up routine 7 ENTRY POWERUP2 power up reinitializer 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 433 (POWERDOWN) F 26 Power fail routine 9 10 ********************************************************************************** 11 * * 12 * This routine is provided to get the volatile registers * 13 * of each CPU saved. When we arrive here, the CA already * 14 * contains all of the console registers. However, the page * 15 * file referenced/altered bits are not yet saved. If the * 16 * SHDEQUE routine is too slow for the job, all that is needed * 17 * is to save the altered bits. * 18 * After each CPU has finished, it sets a flag to indicate * 19 * to the power up routine that this was successfully completed. * 20 * The CPU then hangs on a WAIT instruction (a HALT or STOP would * 21 * stop all of the other CPUs). * 22 * * 23 * On entry: * 24 * R2 = 1 if power fail, 2 if temp fault * 25 * R4 => previous CCA * 26 * * 27 * Stack required = 3. * 28 * 0 + max ( LOCKWAIT (0), SETRUNNING (2), SHDEQUE (3) ) * 29 * * 30 ********************************************************************************** 31 32 BLOCK POWERFAIL routine 33 ENTRY POWERFAIL entry for power fail interrupt 34 0000277A 35 POWERFAIL LABEL 36 SETSP 0277A 81538000 6 REG 36 STCAR SP 0277B 6197880D 6 6 BASE 36 LD SP SP,CASTACKPTR 0277C 61979020 6 6 REG 36 LD SP SP+(2 POWER STAKLOG) 0277D 61D30000 7 4 REG 37 LD R7 R4 copy the console area pointer 38 * of the interrupted process 0277E 61400412 5 39 LD R5 CPPSA get the current PSA pointer 0277F FB422787 5 40 JEQZ R5 NOUSER take easy path out if no one loaded up 41 PLOCK SQLOCKS(NQRUNNING) lock the queue 02780 0CC00000 41 IOFF 02781 D1C01DBA 41 SETT SQLOCKS(NQRUNNING) 02782 FE0C2784 41 JNE MA(2+DISPW MA 0) 02783 DC40308B 41 CALLNP LOCKWAIT 02784 DC402BBD 42 CALLNP SHDEQUE unload page file and remove user from queue 02785 61095F12 4 5 ZBM 43 LD R4 R5,PSPROCCB get pointer to PCB 02786 DC402B99 44 CALLNP SETRUNNING put user back where we will find him 00002787 45 NOUSER LABEL 02787 E5C0044E 7 46 ST R7 POWERFLAG indicate that we successfully completed 00002788 47 REWAIT LABEL 02788 00420008 IMM 48 WAIT WAITCOUNT stop here on power fail 02789 FE0E2788 49 JMP REWAIT in case we fall out (no MCLR) 50 * --- 51 52 BSS 5 room for patches such as re-enable power up interrupt 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 434 (POWERDOWN) F 26 Power fail routine 54 55 ********************************************************************************** 56 * * 57 * POWERUP - Power-fail restart routine * 58 * * 59 * This routine runs at power-fail restart time. It receives * 60 * control from the skeleton routine on page zero (which initializes * 61 * the page file then jumps to POWERUP). * 62 * * 63 * If POWERFLAG is zero or negative, then the power-fail * 64 * shutdown routine never completed, and we must halt. Otherwise, * 65 * POWERFLAG is the address of the interrupted routine's console area. * 66 * * 67 * If the power-fail interrupt enable bit is on in the interrupted * 68 * routine's MSR, then it is a system routine that explicitly * 69 * requested power fail interrupts, and we must return to it so * 70 * that it can clean itself up before we re-initialize the system. * 71 * Such a routine leaves the desired restart location in POWERUPLOC. * 72 * We go to that location, leaving in POWERUPLOC the address where * 73 * it got interrupted. We expect the routine to finish and go to * 74 * DISPATCH. In this case, we get to POWERUP2 after the interrupted * 75 * routine returns to DISPATCH. * 76 * * 77 * If the power-fail interrupt enable bit is not on in the * 78 * interrupted routine's MSR, we exit directly to POWERUP2 to * 79 * re-initialize the system. * 80 * * 81 ********************************************************************************** 82 83 BLOCK POWERUP routine 84 ENTRY POWERUP 85 0000278F 86 POWERUP LABEL 0278F 6100044E 4 87 LD R4 POWERFLAG R4 => interrupted CA 02790 FB042792 4 88 JGTZ R4 OK jump if shutdown worked 02791 00021001 89 HALT HALTB1001 power-fail shutdown failed 90 * --- 91 00002792 92 OK LABEL 93 CLRTBIT R4,CAMSR/MSRPFINTEB clear PF int. enable in interrupted routine 02792 60040800 0 IMM 93 LD R0 1*BIT(((R4,CAMSR/MSRPFINTEB) DISP (R4,0))/BITS 0:4) 02793 A8170801 0 4 BASE 93 BRSBM R0 R4,(((R4,CAMSR/MSRPFINTEB) DISP (R4,0))/BITS 15:31) 02794 FE022799 94 JEQ POWERUP2 jump if PF int. was not enabled 02795 6000044F 0 95 LD R0 POWERUPLOC else get restart location 02796 E0091F10 0 4 ZBM 96 EXCH R0 R4,CAPC put it into the CA 02797 E4000450 0 97 ST R0 POWERRTNPC store old PC 02798 01130000 4 REG 98 LDCA R4 and go to interrupted routine 99 * --- 100 101 END POWERUP routine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 435 (POWERDOWN) F 26 Power fail routine 103 104 ********************************************************************************** 105 * * 106 * POWERUP2 - Initialize System after Power Failure. * 107 * * 108 * Note that when calls are made to ACCOUNT and ERRORLOG to log * 109 * the power failure, the time has not been updated. Once these * 110 * routines have been called, SSU_RESET actually updates the clock * 111 * in memory at which time the power up records are created with * 112 * the correct time. Exits to DISPATCH. * 113 * * 114 * Stack required = 16. * 115 * 0 + max ( ACCOUNT (2), ACCTQUE (3), DEADMAN (16), * 116 * ERRORLOG (3), RECONFIG (16), SSU_RESET (5), * 117 * TIMEKILL (2) ) * 118 * * 119 ********************************************************************************** 120 121 BLOCK POWERUP2 routine 122 ENTRY POWERUP2 123 00002799 124 POWERUP2 LABEL 02799 0144041E IMM 125 LDCAR ADR PCONSOLE set our CAR 0279A 6184044D 6 IMM 126 LD SP ADR RESSTAK set our SP 127 0279B EC00044F 128 STZ POWERUPLOC clear interrupt address 0279C BC001CF9 0 129 INCL R0 CPUCOUNT2 count live CPU's 0279D FA2227BB 0 130 DRJ R0 OTHERWAY jump if we are not the first one 131 0279E DC005048 132 CALL ERRORLOG log the power failure 0279F 41440633 IMM 133 PARV ERLCPWFAIL power failure 027A0 40040000 IMM 134 PARL 0 dummy 135 027A1 DC00505F 136 CALL ACCOUNT log the power failure in the system 137 * managers accounting log file 027A2 41440008 IMM 138 PARV APTPWRFAIL type code 027A3 4144001C IMM 139 PARV AFRSHORT length of record 027A4 40440003 IMM 140 PARVL 3 log in master accounts 027A5 DC405025 141 CALLNP ACCTQUE send it to the queue 142 027A6 DC4044C9 143 CALLNP SSU_RESET reset the SSU (makes time correct) 144 027A7 61001EF3 4 145 LD TMR DEADMANTMR get deadman timer element SN 027A8 DC404517 146 CALLNP TIMEKILL kill the deadman timer 027A9 FEC00000 147 NOP 0 (ignore skip return) 148 027AA DC005048 149 CALL ERRORLOG log the power up 027AB 41440434 IMM 150 PARV ERLCPWRUP power up restart 027AC 40440000 IMM 151 PARVL 0 dummy 152 027AD DC00505F 153 CALL ACCOUNT put into accounting file 027AE 41440009 IMM 154 PARV APTPWRUP type code 027AF 4144001C IMM 155 PARV AFRSHORT length of record 027B0 40440003 IMM 156 PARVL 3 log in master accounts 027B1 DC405025 157 CALLNP ACCTQUE send it to the queue as is 158 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 436 (POWERDOWN) F 26 Power fail routine 027B2 DC4027C1 159 CALLNP RECONFIG reconfigure the system 027B3 60040800 0 IMM 160 LD R0 1*BIT FLPCPU bit sez reload CPU microcode patches 027B4 FC001CF6 0 161 IORM R0 FLAGS set it in FLAGS word 162 163 * Wait for the other CPU's to finish their restart routines. 164 000027B5 165 WAIT1 LABEL 027B5 60001CF9 0 166 LD R0 CPUCOUNT2 number of CPU's restarted 027B6 64001CF7 0 167 CPR R0 CPUCOUNT check against the expected number 027B7 FE0827B5 168 JLT WAIT1 jump if not there yet 169 027B8 EC001CF9 170 STZ CPUCOUNT2 let the other CPU's go 171 027B9 DC404E5E 172 CALLNP DEADMAN restart the deadman routine 027BA FE0E27BD 173 JMP FINISH then clean up mapping and leave 174 * --- 175 176 * Other CPU's come here. Wait for the first one to do 177 * its thing. 178 000027BB 179 OTHERWAY LABEL 027BB 5C001CF9 180 CMZ CPUCOUNT2 can we go yet? 027BC FE0C27BB 181 JNE OTHERWAY jump if not 182 * \ / 183 000027BD 184 FINISH LABEL 027BD EC00044E 185 STZ POWERFLAG say restart no longer in progress 027BE 60C40080 3 IMM 186 LD PFPTR PNPAGEZERO 027BF 80D20000 0 REG 187 PFRC R0 unmap the boot page 027C0 FE0E28B7 188 JMP DISPATCH then all done 189 * --- 190 191 END POWERUP2 routine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 437 (POWERDOWN) F 26 Power fail routine 193 194 ********************************************************************************** 195 * * 196 * RECONFIG - Reconfigure the system. * 197 * Make sure that it has all of the boards that it should, and * 198 * reset all of the device controllers. * 199 * Call: * 200 * CALLNP RECONFIG * 201 * * 202 * Eats R0:R5. * 203 * Stack required = 16. * 204 * 2 + max ( CONFIGDISK (10), CONFIGCIA (14), CONFIGLPC (13), * 205 * CONFIGMTC (9) ) * 206 * * 207 ********************************************************************************** 208 209 BLOCK RECONFIG subroutine 210 ENTRY RECONFIG 211 212 BEGFRAME 00178004 6 CACH 213 SLOTNUM BSSC 1 slot number looking at 00178005 6 CACH 214 CHANNUM BSSC 1 channel number looking at 215 ENDFRAME 216 027C1 DD5F8002 6 STAK 217 RECONFIG ENTRNP PUSH 027C2 6144000F 5 IMM 218 LD R5 NUMSLOTS-1 start at highest slot number 219 * \ / 220 000027C3 221 SLOTLOOP LABEL 027C3 60134000 0 5 REG 222 LD R0 R5 copy current slot number 027C4 1C040010 0 IMM 223 MUL R0 WRUIMAX R0 = index into WRU table 027C5 61200200 4 0 224 LD R4 WRUINFO/WRU0(R0) R4 = current WRU0 response 027C6 60EA1ECE 3 5 225 LD R3 SLOTTABLE(R5) R3 = slot table entry 027C7 600AC030 0 3 CBM 226 LD R0 R3/SLOTTYPE R0 = type of board originally here 027C8 640B0040 0 4 CBM 227 CPR R0 R4/WRU0TYPE is it the same? 027C9 FE0227CF 228 JEQ ISSAME jump if so 027CA 64040003 0 IMM 229 CPR R0 SLTTPPU should a PPU be here? 027CB FE0C27CE 230 JNE BADSLOT error if not 027CC 5C0B0040 4 CBM 231 CMZ R4/WRU0TYPE is the slot now empty? 027CD FE0227D1 232 JEQ HAVEPPU jump if so - PPU's can disappear 233 * \ / 234 027CE 00021004 235 BADSLOT HALT HALTB1004 VRA board missing at power up time 236 * --- 237 000027CF 238 ISSAME LABEL 027CF 64040003 0 IMM 239 CPR R0 SLTTPPU is this a PPU? 027D0 FE0C27E7 240 JNE NEXTSLOT jump if not - no initialization needed 241 * \ / 242 000027D1 243 HAVEPPU LABEL 027D1 61040003 4 IMM 244 LD R4 PPUCHANS-1 start at highest channel number 245 * \ / 246 000027D2 247 CHANLOOP LABEL 027D2 602A1ECE 0 5 248 LD R0 SLOTTABLE(R5) R0 -> PPU control element 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 438 (POWERDOWN) F 26 Power fail routine 027D3 605C2004 1 04 BASE 249 LD R1 R0,PPUCNTLPTR(R4) R1 = controller description 027D4 608A4080 2 1 CBM 250 LD R2 R1/DEVTYPE R2 = device type 027D5 60A427E9 2 2 251 LD R2 RESETTAB(R2) R2 -> reset routine 027D6 FAB027E2 2 252 JZA R2 NEXTCHAN jump if no reset routine 027D7 60040000 0 IMM 253 LD R0 0 prepare prototype 027D8 E54A0840 5 0 CBM 254 ST R5 R0/PFSLOT put slot number in 027D9 E50A3020 4 0 CBM 255 ST R4 R0/PPUCHAN and channel number 027DA 60C40086 3 IMM 256 LD PFPTR PNCIX 027DB 00D20000 0 REG 257 LDPF R0 make CIX point to the device 027DC E5178005 4 6 CACH 258 ST R4 SP,CHANNUM save channel number 027DD E5578004 5 6 CACH 259 ST R5 SP,SLOTNUM save slot number 027DE DC168400 2 @R 260 CALL @R2 reconfigure the device 027DF 404A5F10 1 CBM 261 PARVL R1/DEVPTR the pointer to control element 027E0 61178005 4 6 CACH 262 LD R4 SP,CHANNUM restore channel number 027E1 61578004 5 6 CACH 263 LD R5 SP,SLOTNUM restore slot number 264 * \ / 265 000027E2 266 NEXTCHAN LABEL 027E2 FB2627D2 4 267 JDR R4 CHANLOOP do all channels on PPU 027E3 602A1ECE 0 5 268 LD R0 SLOTTABLE(R5) get PPU element 027E4 5C160801 0 BASE 269 CMZ R0,PPUOPMSGID PPU msg there? 027E5 FE0C27E7 270 JNE NEXTSLOT jump if PPU funky (preserve msdid) 027E6 D1560801 0 BASE 271 STMW R0,PPUOPMSGID claim PPU is off for DEADMAN 272 * \ / 273 000027E7 274 NEXTSLOT LABEL 027E7 FB6627C3 5 275 JDR R5 SLOTLOOP do all slots 276 * \ / 277 027E8 5D1F8002 6 STAK 278 LEAVE POP then all done 279 * --- 280 000027E9 281 RESETTAB LABEL 027E9 00000000 282 VFD 0 00 - empty slot 027EA 000027F9 283 ADR CONFIGDISK 01 - mass storage controller 027EB 00002809 284 ADR CONFIGLPC 02 - line printer controller 027EC 00000000 285 VFD 0 03 - not used 027ED 00000000 286 VFD 0 04 - not used 027EE 00000000 287 VFD 0 05 - not used 027EF 00000000 288 VFD 0 06 - not used 027F0 00000000 289 VFD 0 07 - not used 027F1 00002819 290 ADR CONFIGCIA 08 - communications controller 027F2 00002823 291 ADR CONFIGMTC 09 - magnetic tape controller 027F3 00002823 292 ADR CONFIGMTC 0A - cartridge tape controller 027F4 00002823 293 ADR CONFIGMTC 0B - video tape controller 027F5 000027F9 294 ADR CONFIGDISK 0C - SCSI disk controller 027F6 00000000 295 VFD 0 0D - not used 027F7 00000000 296 VFD 0 0E - not used 027F8 00000000 297 VFD 0 0F - not used 298 299 END RECONFIG subroutine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 439 (POWERDOWN) F 26 Power fail routine 301 302 ********************************************************************************** 303 * * 304 * CONFIGDISK. Reconfigure a BFD. * 305 * Call: * 306 * CALL CONFIGDISK * 307 * PARVL pointer to MCT element * 308 * * 309 * Eats R0:R5. * 310 * Stack required = 10. * 311 * 2 + max ( LOCKWAIT (0), MS_RESET (8) ) * 312 * * 313 ********************************************************************************** 314 315 BLOCK CONFIGDISK routine 316 ENTRY CONFIGDISK 317 318 BEGFRAME 00178801 6 BASE 319 MCTPNTR BSS 1 pointer to the MCT element 320 ENDFRAME 321 027F9 DD1F8002 6 STAK 322 CONFIGDISK ENTR PUSH 027FA C0578801 6 BASE 323 STPVL SP,MCTPNTR 324 027FB 61578801 5 6 BASE 325 LD R5 SP,MCTPNTR R5 => MCT element 326 PLOCK (R5,MCTELOCK) lock the controller 027FC 0CC00000 326 IOFF 027FD D1D74803 5 BASE 326 SETT (R5,MCTELOCK) 027FE FE0C2800 326 JNE MA(2+DISPW MA 0) 027FF DC40308B 326 CALLNP LOCKWAIT 02800 60040000 0 IMM 327 LD R0 0 claim PPU is dead 02801 DC4039A9 328 CALLNP MS_RESET reset the controller 02802 FEC00000 329 NOP 0 ignore skip return 330 02803 61578801 5 6 BASE 331 LD R5 SP,MCTPNTR R5 => MCT element 332 SETTBIT R5,MCTTIMEOUT set the timeout bit 02804 60021000 0 IMM 332 LD R0 1*BIT(((R5,MCTTIMEOUT) DISP (R5,0))/BITS 0:4) 02805 FC174804 0 5 BASE 332 IORM R0 R5,(((R5,MCTTIMEOUT) DISP (R5,0))/BITS 15:31) 333 PUNLOCK (R5,MCTELOCK) unlock the controller 02806 EC174803 5 BASE 333 STZ (R5,MCTELOCK) 02807 0C800000 333 ION 334 02808 5D1F8002 6 STAK 335 LEAVE POP 336 * --- 337 338 END CONFIGDISK subroutine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 440 (POWERDOWN) F 26 Power fail routine 340 341 ********************************************************************************** 342 * * 343 * CONFIGLPC. Reconfigure a LPC. * 344 * Call: * 345 * CALL CONFIGLPC * 346 * PARVL pointer to LPC element * 347 * * 348 * Eats R0:R5. * 349 * Stack required = 13. * 350 * 2 + max ( LOCKWAIT (0), LPCRESET (11) ) * 351 * * 352 ********************************************************************************** 353 354 BLOCK CONFIGLPC routine 355 ENTRY CONFIGLPC 356 357 BEGFRAME 00178801 6 BASE 358 LPCPNTR BSS 1 pointer to the LPC element 359 ENDFRAME 360 02809 DD1F8002 6 STAK 361 CONFIGLPC ENTR PUSH 0280A C0578801 6 BASE 362 STPVL SP,LPCPNTR 363 0280B 61578801 5 6 BASE 364 LD R5 SP,LPCPNTR R5 => LPC element 365 PLOCK (R5,LPCELOCK) lock the controller 0280C 0CC00000 365 IOFF 0280D D1D74805 5 BASE 365 SETT (R5,LPCELOCK) 0280E FE0C2810 365 JNE MA(2+DISPW MA 0) 0280F DC40308B 365 CALLNP LOCKWAIT 02810 60040000 0 IMM 366 LD R0 0 claim PPU is dead 02811 DC404DA8 367 CALLNP LPCRESET reset the controller 02812 FEC00000 368 NOP 0 ignore skip return 369 02813 61578801 5 6 BASE 370 LD R5 SP,LPCPNTR R5 => LPC element 371 SETTBIT R5,LPCTIMEOUT set the timeout bit 02814 60030000 0 IMM 371 LD R0 1*BIT(((R5,LPCTIMEOUT) DISP (R5,0))/BITS 0:4) 02815 FC174807 0 5 BASE 371 IORM R0 R5,(((R5,LPCTIMEOUT) DISP (R5,0))/BITS 15:31) 372 PUNLOCK (R5,LPCELOCK) unlock the controller 02816 EC174805 5 BASE 372 STZ (R5,LPCELOCK) 02817 0C800000 372 ION 373 02818 5D1F8002 6 STAK 374 LEAVE POP 375 * --- 376 377 END CONFIGLPC subroutine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 441 (POWERDOWN) F 26 Power fail routine 379 380 ********************************************************************************** 381 * * 382 * CONFIGCIA. Reconfigure a CIA. * 383 * Call: * 384 * CALL CONFIGCIA * 385 * PARVL pointer to COM element * 386 * * 387 * Eats R0:R5. * 388 * Stack required = 14. * 389 * 2 + max ( CIA_RESET (12) ) * 390 * * 391 ********************************************************************************** 392 393 BLOCK CONFIGCIA routine 394 ENTRY CONFIGCIA 395 396 BEGFRAME 00178801 6 BASE 397 COMPNTR BSS 1 pointer to the COM element 398 ENDFRAME 399 02819 DD1F8002 6 STAK 400 CONFIGCIA ENTR PUSH 0281A C0578801 6 BASE 401 STPVL SP,COMPNTR 402 0281B 61578801 5 6 BASE 403 LD R5 SP,COMPNTR R5 => COM element 0281C 60040000 0 IMM 404 LD R0 0 claim PPU is dead 0281D DC40494C 405 CALLNP CIA_RESET reset the controller 0281E FEC00000 406 NOP 0 ignore skip return 407 0281F 61578801 5 6 BASE 408 LD R5 SP,COMPNTR R5 => COM element 409 SETTBIT R5,COMTIMEOUT set the timeout bit 02820 60028000 0 IMM 409 LD R0 1*BIT(((R5,COMTIMEOUT) DISP (R5,0))/BITS 0:4) 02821 FC174805 0 5 BASE 409 IORM R0 R5,(((R5,COMTIMEOUT) DISP (R5,0))/BITS 15:31) 410 02822 5D1F8002 6 STAK 411 LEAVE POP 412 * --- 413 414 END CONFIGCIA subroutine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 442 (POWERDOWN) F 26 Power fail routine 416 417 ********************************************************************************** 418 * * 419 * CONFIGMTC. Reconfigure a MTC. * 420 * Call: * 421 * CALL CONFIGMTC * 422 * PARVL pointer to MTC element * 423 * * 424 * Eats R0:R5. * 425 * Stack required = 9. * 426 * 2 + max ( LOCKWAIT (0), MT_RESET (7) ) * 427 * * 428 ********************************************************************************** 429 430 BLOCK CONFIGMTC routine 431 ENTRY CONFIGMTC 432 433 BEGFRAME 00178801 6 BASE 434 MTCPNTR BSS 1 pointer to the MTC element 435 ENDFRAME 436 02823 DD1F8002 6 STAK 437 CONFIGMTC ENTR PUSH 02824 C0578801 6 BASE 438 STPVL SP,MTCPNTR 439 02825 61578801 5 6 BASE 440 LD R5 SP,MTCPNTR R5 => MTC element 441 PLOCK (R5,MTCELOCK) lock the controller 02826 0CC00000 441 IOFF 02827 D1D74803 5 BASE 441 SETT (R5,MTCELOCK) 02828 FE0C282A 441 JNE MA(2+DISPW MA 0) 02829 DC40308B 441 CALLNP LOCKWAIT 0282A 60040000 0 IMM 442 LD R0 0 claim PPU is dead 0282B DC4041CB 443 CALLNP MT_RESET reset the controller 0282C FEC00000 444 NOP 0 ignore skip return 445 0282D 61578801 5 6 BASE 446 LD R5 SP,MTCPNTR R5 => MTC element 0282E EC174804 5 BASE 447 STZ R5,MTCTIMEOUT clear timeout counter 448 PUNLOCK (R5,MTCELOCK) unlock the controller 0282F EC174803 5 BASE 448 STZ (R5,MTCELOCK) 02830 0C800000 448 ION 449 02831 5D1F8002 6 STAK 450 LEAVE POP 451 * --- 452 453 END CONFIGMTC subroutine 454 455 END Power Fail Shutdown and Restart Routines 456 457 END POWERFAIL routine 52 INPUT STACKER console area and stack manager 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 443 (STACKER) F 27 Stack and Console Area Managers 3 BLOCK Stack and Console Area Managers 4 5 ENTRY BUILDCA create a new CA + Stack 6 ENTRY FREECA destroy a CA + Stack 7 ENTRY GRABCA attach CA to current process 8 ENTRY DROPCA detach CA from current process 9 ENTRY GETSTACK allocate a stack 10 ENTRY FREESTACK free a stack 11 ENTRY STAKLOG log size of CA stacks 12 ENTRY STACKIDENT identifying word at bottom of all stacks 13 00000005 ABS 14 STAKLOG EQU 5 CA's come with 32-word stacks 15 02832 5354414B 16 STACKIDENT TEXT "STAK" this word occurs at bottom of all stacks 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 444 (STACKER) F 27 Stack and Console Area Managers 18 19 ********************************************************************************** 20 * * 21 * BUILDCA - Build New Console Area with Stack. * 22 * * 23 * This routine will allocate a new console area with an * 24 * attached stack and initialize them. * 25 * * 26 * CALLNP BUILDCA * 27 * ST R0 => new CA * 28 * * 29 * Eats R0:R1. * 30 * Stack required = 2. * 31 * 2 + max ( SGETMEM (0) ) * 32 * * 33 ********************************************************************************** 34 35 BLOCK BUILDCA subroutine 36 ENTRY BUILDCA 37 38 BEGFRAME 00178801 6 BASE 39 STACKPTR BSS 1 address of associated stack 40 ENDFRAME 41 02833 DD5F8002 6 STAK 42 BUILDCA ENTRNP PUSH 02834 DC002ED0 43 CALL SGETMEM get a stack 02835 40440005 IMM 44 PARVL STAKLOG indicate its length 02836 60402832 1 45 LD R1 STACKIDENT get the "STAK" marker 02837 E4560800 1 0 BASE 46 ST R1 R0,0 set stack identifier 02838 E4178801 0 6 BASE 47 ST R0 SP,STACKPTR save pointer to stack 02839 DC002ED0 48 CALL SGETMEM get a console area 0283A 40440004 IMM 49 PARVL CALOG indicate its length 0283B 60578801 1 6 BASE 50 LD R1 SP,STACKPTR pick up the saved stack pointer 0283C E456080D 1 0 BASE 51 ST R1 R0,CASTACKPTR and make CA point to stack 0283D 5D1F8002 6 STAK 52 LEAVE POP return 53 * ---- 54 55 END BUILDCA subroutine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 445 (STACKER) F 27 Stack and Console Area Managers 57 58 ********************************************************************************** 59 * * 60 * FREECA - Free Console Area with Stack * 61 * * 62 * This routine will free a console area and the * 63 * associated stack. * 64 * * 65 * CALL FREECA * 66 * PARVL => CA * 67 * * 68 * Eats R0:R1. * 69 * Stack required = 2. * 70 * 2 + max ( SFREEMEM (0) ) * 71 * * 72 ********************************************************************************** 73 74 BLOCK FREECA subroutine 75 ENTRY FREECA 76 77 BEGFRAME 00178801 6 BASE 78 STACKPTR BSS 1 address of CA's stack 79 ENDFRAME 80 0283E DD1F8002 6 STAK 81 FREECA ENTR PUSH 0283F C0524000 1 REG 82 STPVL R1 R1 -> the CA 02840 6016480D 0 1 BASE 83 LD R0 R1,CASTACKPTR R0 -> the stack 02841 E4178801 0 6 BASE 84 ST R0 SP,STACKPTR save it 02842 DC002F5D 85 CALL SFREEMEM free the console area 02843 41440004 IMM 86 PARV CALOG indicate its length 02844 40524000 1 REG 87 PARVL R1 and address 02845 60578801 1 6 BASE 88 LD R1 SP,STACKPTR R1 -> the stack 02846 DC002F5D 89 CALL SFREEMEM free the stack 02847 41440005 IMM 90 PARV STAKLOG indicate its length 02848 40524000 1 REG 91 PARVL R1 and address 02849 5D1F8002 6 STAK 92 LEAVE POP and all done 93 * ---- 94 95 END FREECA subroutine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 446 (STACKER) F 27 Stack and Console Area Managers 97 98 ********************************************************************************** 99 * * 100 * GRABCA - Grab a console area. * 101 * * 102 * This routine will grab a console area from the * 103 * Interrupt Vector Table and attach it to the current * 104 * process. We pick up and replace the CA from the IVT * 105 * because the CPU has already loaded that address into * 106 * its CAR. * 107 * An interrupt routine must call GRABCA before allowing * 108 * any other interrupts (including page faults) to occur. * 109 * * 110 * CALL GRABCA * 111 * PARL * 112 * * 113 * Eats R0:R1. * 114 * Stack required = 4. * 115 * 2 + max ( BUILDCA (2) ) * 116 * * 117 ********************************************************************************** 118 119 BLOCK GRABCA subroutine 120 ENTRY GRABCA 121 122 BEGFRAME 00178801 6 BASE 123 IVTLOC BSS 1 pointer to CA ptr in IVT 124 ENDFRAME 125 0284A DD1F8002 6 STAK 126 GRABCA ENTR PUSH 0284B C0178801 6 BASE 127 STPL SP,IVTLOC save ptr to ptr to CA 0284C 60400412 1 128 LD R1 CPPSA R1 -> our PSA 0284D 60040000 0 IMM 129 LD R0 0 make a nil pointer 0284E E000044D 0 130 EXCH R0 CPXTRACA R0 -> extra CA, clear extra CA ptr 0284F FA322852 0 131 JNZA R0 HAVECA jump if we got one 02850 DC402833 132 CALLNP BUILDCA else get a fresh one 02851 60400412 1 133 LD R1 CPPSA restore ptr to PSA 00002852 134 HAVECA LABEL 02852 E0178C01 0 6 FPVR 135 EXCH R0 @(SP,IVTLOC) R0 -> our CA, put new one into IVT 02853 60485F10 1 1 ZBM 136 LD R1 R1,PSCACHN R1 -> pointer CA list 02854 E456080C 1 0 BASE 137 ST R1 R0,CALINK store pointer into new CA 02855 EE16080A 0 BASE 138 STZ2 R0,CAINTADR clear interrupt address and int mask 02856 60400412 1 139 LD R1 CPPSA R1 -> pointer to PSA 02857 E0085F10 0 1 ZBM 140 EXCH R0 R1,PSCACHN PSA -> new CA,R0 -> old CA 02858 E4085F11 0 1 ZBM 141 ST R0 R1,PSCACHNP1 set pointer to old one 02859 5D1F8002 6 STAK 142 LEAVE POP all done 143 * ---- 144 145 END GRABCA subroutine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 447 (STACKER) F 27 Stack and Console Area Managers 147 148 ********************************************************************************** 149 * * 150 * DROPCA - Release current console area * 151 * * 152 * This routine will remove the current console area from * 153 * the process's console area chain. * 154 * After calling this routine, no further interrupts are * 155 * allowed until changing the hardware Console Area Register. * 156 * The console area being dropped invariably ends up as * 157 * the process's extra console area. This means that you can * 158 * continue to use the stack in the console area until the * 159 * next process-switch or return from interrupt. * 160 * * 161 * CALLNP DROPCA * 162 * * 163 * Eats R0:R1. * 164 * Stack required = 3. * 165 * 1 + max ( FREECA (2) ) * 166 * * 167 ********************************************************************************** 168 169 BLOCK DROPCA subroutine 170 ENTRY DROPCA 171 172 BEGFRAME 173 ENDFRAME 174 0285A DD5F8001 6 STAK 175 DROPCA ENTRNP PUSH 0285B 60400412 1 176 LD R1 CPPSA R1 -> current PSA 0285C 60085F11 0 1 ZBM 177 LD R0 R1,PSCACHNP1 R0 -> previous CA 0285D 6016080C 0 0 BASE 178 LD R0 R0,CALINK R0 -> second previous 0285E E0085F11 0 1 ZBM 179 EXCH R0 R1,PSCACHNP1 set PSCACHNP1, R0 -> previous CA 0285F E0085F10 0 1 ZBM 180 EXCH R0 R1,PSCACHN set PSCACHN, R0 -> one to get rid of 02860 60560C0D 1 0 FPVR 181 LD R1 @(R0,CASTACKPTR) get bottom word of stack 02861 64402832 1 182 CPR R1 STACKIDENT has it been clobbered? 02862 FE0C2869 183 JNE BADSTACK jump if so 02863 60400412 1 184 LD R1 CPPSA R1 -> PSA again 02864 E000044D 0 185 EXCH R0 CPXTRACA save old CA as extra, get previous extra 02865 FA302868 0 186 JZA R0 RETURN jump if none 02866 DC00283E 187 CALL FREECA else free the old one 02867 40520000 0 REG 188 PARVL R0 189 * \ / 190 00002868 191 RETURN LABEL 02868 5D1F8001 6 STAK 192 LEAVE POP all done 193 * ---- 194 02869 00130090 195 BADSTACK HALT HALTS0090 stack overflow 196 * --- 197 198 END DROPCA subroutine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 448 (STACKER) F 27 Stack and Console Area Managers 200 201 ********************************************************************************** 202 * * 203 * GETSTACK - Acquire a stack. * 204 * * 205 * This routine will allocate a stack, and set SP to point * 206 * to the top of it (last word plus 1). The parameter is the * 207 * number of words of stack required. The actual number of * 208 * words given back is the next larger power of 2, less one. * 209 * (The "less one" is for an identifying word.) * 210 * * 211 * You do not need a stack to call this routine. * 212 * * 213 * CALL GETSTACK * 214 * PARVL * 215 * * 216 * Eats R0:R3, Sets SP. * 217 * Stack required = 0. * 218 * 0 + max ( SGETMEM (0) ) * 219 * * 220 ********************************************************************************** 221 222 BLOCK GETSTACK subroutine 223 ENTRY GETSTACK 224 0286A DD12C000 3 REG 225 GETSTACK ENTR R3 0286B C0520000 0 REG 226 STPVL R0 R0 = requested size 0286C 5C520000 0 REG 227 HIB R0 0286D 30040020 0 IMM 228 RSB R0 32 R0 = log (size + 1) 0286E 60A0255E 2 0 229 LD R2 BITTAB(R0) R2 = size of block 0286F DC002ED0 230 CALL SGETMEM get storage for stack 02870 40520000 0 REG 231 PARVL R0 02871 60402832 1 232 LD R1 STACKIDENT get identifying word for stack 02872 E4560800 1 0 BASE 233 ST R1 R0,0 put at bottom of stack 02873 399C1000 6 02 BASE 234 LEA SP R0,0(R2) point SP at end of stack 02874 5D12C000 3 REG 235 LEAVE R3 236 * ---- 237 238 END GETSTACK subroutine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 449 (STACKER) F 27 Stack and Console Area Managers 240 241 ********************************************************************************** 242 * * 243 * FREESTACK - Free a stack * 244 * * 245 * This routine will free a stack that was acquired by * 246 * GETSTACK. If the identifier at the end of the stack * 247 * has been clobbered, we will halt. (This means that * 248 * the caller overflowed his stack.) * 249 * * 250 * CALL FREESTACK * 251 * PARVL STACKSIZE * 252 * * 253 * Eats R0:R2. * 254 * Stack required = 0. * 255 * 0 + max ( SFREEMEM (0) ) * 256 * * 257 ********************************************************************************** 258 259 BLOCK FREESTACK subroutine 260 ENTRY FREESTACK 261 02875 DD128000 2 REG 262 FREESTACK ENTR R2 02876 C0520000 0 REG 263 STPVL R0 R0 = requested size 02877 5C520000 0 REG 264 HIB R0 02878 30040020 0 IMM 265 RSB R0 32 R0 = log (size + 1) 02879 60520000 1 0 REG 266 LD R1 R0 R1 = log (size + 1) 0287A 7022255E 0 1 267 LDN R0 BITTAB(R1) R0 = -(size of block) 0287B 11840001 6 IMM 268 SUB SP 1 0287C 79920000 6 0 REG 269 AND SP R0 SP=>bottom of stack 0287D 60178800 0 6 BASE 270 LD R0 SP,0 get bottom word 0287E 64002832 0 271 CPR R0 STACKIDENT is it good? 0287F FE0C2884 272 JNE HALT jump if not 02880 DC002F5D 273 CALL SFREEMEM else free the stack 02881 41524000 1 REG 274 PARV R1 log size 02882 40538000 6 REG 275 PARVL SP address 02883 5D128000 2 REG 276 LEAVE R2 all done 277 * ---- 278 02884 00130091 279 HALT HALT HALTS0091 OS stack overflow 280 * --- 281 282 END FREESTACK subroutine 283 284 285 286 END Stack and Console Area Managers 53 INPUT DISPATCH queue manager and dispatcher 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 450 (DISPATCH) F 28 Dispatcher 3 4 DISPATCHER BLOCK 5 6 ENTRY DISPATCH routine to get new user 7 ENTRY FLACCTNG start the accounting process 8 ENTRY FLADT start the ADT process 9 ENTRY FLCHKSUM re-checksum the resident nucleous 10 ENTRY FLDISMNT dismount maintenance mounted volumes 11 ENTRY FLERRLOG start the error log process 12 ENTRY FLFREEFL start the free file process 13 ENTRY FLFREEZE tell system to cool it 14 ENTRY FLFSX to calculate bit for free storage expansion 15 ENTRY FLMONITOR to capture CPU for monitoring 16 ENTRY FLMSPROC to calculate bit for mass storage request 17 ENTRY FLMTPROC to calculate bit for mag tape request 18 ENTRY FLPCPU to calculate bit for CPU patching process 19 ENTRY FLSTOPCPU to stop a CPU 20 ENTRY FSXPAND free storage expansion/contraction routine 21 ENTRY GETTRAPPER subroutine to find user interrupt trapper 22 ENTRY INTMASKB user intmask bit number table 23 ENTRY INTASSOCB user int code PSA/UPC association 24 ENTRY LASTINTC last code in INTMASKB 25 ENTRY STARTUP routine used at system startup 26 27 ********************************************************************************** 28 * * 29 * Each processor comes here from the code in INITIAL. * 30 * We unload the page file location that we used for the * 31 * INITIAL code (since we're done with it forever). Since * 32 * a PPL has already been created for the physical memory * 33 * that INITIAL is in, the page can now be used for * 34 * anything as soon as we start the system by jumping to * 35 * DISPATCH. We also set the bit in AVPAGES to indicate * 36 * that this virtual page may be used for free storage. * 37 * We only want to set this bit once (in case it is used * 38 * real quick) and only after all CPUs are through with * 39 * the INITIAL code. We use CPUINIT to keep count of * 40 * how many CPUs are on the INITIAL page. When this reaches * 41 * zero, the page is available. * 42 * At this point in time, the only runnable * 43 * process is the initial PROCESS, and the dispatcher * 44 * will immediately run it. * 45 * * 46 ********************************************************************************** 47 00002885 48 STARTUP LABEL 02885 60C40088 3 IMM 49 LD PFPTR PNINITPAGE initializer page can go 02886 80D20000 0 REG 50 PFRC R0 clear out page file entry 02887 D0401CFA 51 DEC CPUINIT we are now off of initial page 02888 FE0428B7 52 JGT DISPATCH off to dispatch if not last 53 PLOCK MEMLOCK get lock of memory lists 02889 0CC00000 53 IOFF 0288A D1C01C6C 53 SETT MEMLOCK 0288B FE0C288D 53 JNE MA(2+DISPW MA 0) 0288C DC40308B 53 CALLNP LOCKWAIT 0288D EDF61CC6 3 @ 54 STW @PAVPAGES(PFPTR) say initial page is available 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 451 (DISPATCH) F 28 Dispatcher 55 PUNLOCK MEMLOCK release memory lists 0288E EC001C6C 55 STZ MEMLOCK 0288F 0C800000 55 ION 56 * \ / 57 02890 FE0E28B7 58 JMP DISPATCH off we go 59 * --- 60 61 ********************************************************************************** 62 * There is no user ready to run, waste time. * 63 ********************************************************************************** 64 00002891 65 THINKIDLE LABEL 66 PUNLOCK SQLOCKS(NQRUNNABLE) release the scheduler runnable queue 02891 EC001DBB 66 STZ SQLOCKS(NQRUNNABLE) 02892 0C800000 66 ION 02893 5C001D0C 67 CMZ SLEEPFLAG are we trying to get asleep? 02894 FE0228A9 68 JEQ WAIT4WORK if not check for work 02895 FE08289D 69 JLT CRUNCH check to see if to stop no matter what 70 * \ / 71 72 ********************************************************************************** 73 * * 74 * We think we should be trying to terminate system operation. * 75 * We check to see if volumes are present (thus checking for * 76 * logged on users and busy files) and if the IO devices * 77 * are finished. If both are safe we halt. * 78 * * 79 ********************************************************************************** 80 81 * \ / 02896 60001EB0 0 82 LD R0 PCCOUNT number of processes still running 02897 7C001F18 0 83 IOR R0 DISKRBUSY are the disks still reading? 02898 7C001F19 0 84 IOR R0 DISKWBUSY are the disks still writing? 02899 7C001F05 0 85 IOR R0 TERMWBUSY wait until output done 0289A 7C001D92 0 86 IOR R0 ERRLOGLIST any error elements need writing 0289B 7C001D9A 0 87 IOR R0 APLIST any accounting entries need writing 0289C FA0C28A9 0 88 JNEZ R0 WAIT4WORK jump if can't sleep yet 0000289D 89 CRUNCH LABEL 0289D 0CC00000 90 IOFF prevent further happenings 0289E 60C40086 3 IMM 91 LD PFPTR PNCIX get page number for I/O window 0289F 00C01EDE 92 LDPF CLOCKPF get access to the SSU 028A0 620028A6 01 93 LD2 R0 SLEEPMES get the left 8 characters of FP display 028A1 E400180A 0 94 ST R0 CIX(SSUDISP03) tell the world we're down 028A2 E440180B 1 95 ST R1 CIX(SSUDISP47) 028A3 600028A8 0 96 LD R0 SLEEPMES(2) 028A4 E400180C 0 97 ST R0 CIX(SSUDISP89) 028A5 003FFFFF 98 HALT NOHALTCODE halt, leaving ZZZs displayed 99 * --- 100 000028A6 101 SLEEPMES LABEL 028A6 5A5A5A5A 102 TEXTZ "ZZZZZZ... " 103 104 ********************************************************************************** 105 * * 106 * We have nothing to do so we wait for work. * 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 452 (DISPATCH) F 28 Dispatcher 107 * We stop at the WAIT instruction to wait for an interrupt to * 108 * cause us to queue up work. * 109 * * 110 ********************************************************************************** 111 000028A9 112 WAIT4WORK LABEL 028A9 59C4F000 IMM 113 IORMSR INTSON turn on the interrupts 028AA 60401EF0 1 114 LD R1 TIMESERIAL get the current timer queue serial pointer 028AB 00420008 IMM 115 WAIT WAITCOUNT wait for an interrupt 116 * \ / fell out of WAIT instruction 117 118 ********************************************************************************** 119 * * 120 * If we come here because the wait instruction timed out, * 121 * we want to check to see if interrupts are happening at all. * 122 * In a multiple CPU system, all interrupts may have gone to a * 123 * different CPU, so we check to see if the clock is being used. * 124 * * 125 ********************************************************************************** 126 127 * \ / 128 PLOCK TIMERLOCK lock the timer queue 028AC 0CC00000 128 IOFF 028AD D1C01EF1 128 SETT TIMERLOCK 028AE FE0C28B0 128 JNE MA(2+DISPW MA 0) 028AF DC40308B 128 CALLNP LOCKWAIT 028B0 64401EF0 1 129 CPR R1 TIMESERIAL see if the clock is living 028B1 FE0C28B5 130 JNE SKIPSSURST if so, skip the reset 028B2 D0001EF0 131 INC TIMESERIAL ensure that only one CPU finds this 028B3 60040008 0 IMM 132 LD R0 1*BIT FLSSURST it looks as if no timer queue interrupts 028B4 FC001CF6 0 133 IORM R0 FLAGS so do a SSU reset 000028B5 134 SKIPSSURST LABEL 135 PUNLOCK TIMERLOCK release this queue 028B5 EC001EF1 135 STZ TIMERLOCK 028B6 0C800000 135 ION 136 * \ / 137 138 ********************************************************************************** 139 * * 140 * DISPATCH * 141 * The dispatcher controls the actual assignment of * 142 * processors to processes. Actually, each processor * 143 * executes this code to assign itself to a new * 144 * process. We make this work by making most interrupt * 145 * returns go through the dispatcher. While here, * 146 * the processor determines what task should be * 147 * executed next. * 148 * When we get here, we load a local console area * 149 * pointer and allow interrupts. This allows interrupt * 150 * processing to get started before we do the dispatch * 151 * task. Since the dispatch task would have been * 152 * redone at the completion of another interrupt, * 153 * this slightly reduces the number of times * 154 * that we go through the dispatch code. Power fail * 155 * interrupts may also occur at this point, so no * 156 * further checking is needed to ensure their * 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 453 (DISPATCH) F 28 Dispatcher 157 * recognition. * 158 * We then check for system level tasks that need * 159 * execution (the FLAGS word). If no such task is * 160 * required, we check to see if the current process is * 161 * healthy. If it is okay, we return to its execution. If * 162 * it has errors queued against it, we take appropriate * 163 * action. If no current process exists, we pick the next * 164 * available process. * 165 * * 166 * stack required = 15 * 167 * 0 + max ( ACCOUNT (2), ACCTALIAS (4), ACCTPSA (2), * 168 * ACCTQUE (3), ACCTULB (1), BLDPROCESS (2), * 169 * CHECKNOINT (2), CHKINTCODE (4), CLRMEMTRAP (1), * 170 * DELINKUERR (1), DOACCTNG (3), DOADT (3), * 171 * DODISMNT (3), DOERRLOG (3), DOFREEFL (3), * 172 * DROPCA (3), ERRORLOG (3), FCGETMEM (0), * 173 * FREEZEWAIT (12), FSXPAND (2), GETTRAPPER (3), * 174 * GRABCA (4), LOCKWAIT (0), MAPINMEM (3), * 175 * MONITRPROC (15), MOVETRMGX (5), MSPROC (6), * 176 * MTPROC (5), OVPDOWNONE (11), OVPUPONE (11), * 177 * PFLOAD (3), SETMEMTRAP (1), SETRUNNING (2), * 178 * SFREEMEM (0), SGETMEM (0), SHUTDOWN (12), * 179 * SHUTRUN (11), SRCHPSNM (3), SSU_RESET (5), * 180 * TESTTRUBL (13), TIMESET (2), UERRSET (1) ) * 181 * * 182 ********************************************************************************** 183 184 * \ / 000028B7 185 DISPATCH LABEL this is the dispatcher entry 028B7 0144041E IMM 186 LDCAR ADR PCONSOLE load up a good console area pointer 028B8 59C4F000 IMM 187 IORMSR ONEBITS/MSRINTCNT*MSRINTCNT allow interrupts, including power fail. 188 * we can't just reload the MSR since 189 * we would lose interrupts from 190 * other processors. 028B9 FEC00000 191 NOP 0 ** allow time for external event interrupt 028BA 0CC00000 192 IOFF interrupts off for the remainder of our work 028BB 5C00044E 193 CMZ POWERFLAG power-fail restart in progress? 028BC FE0C2799 194 JNE POWERUP2 jump if so 028BD 6184044D 6 IMM 195 LD SP ADR RESSTAK set up the stack pointer 028BE 5C401CF6 196 HIB FLAGS check for stuff to do 028BF F23428F5 0 197 JBF R0/BIT 26 PROCFL jump if work has been requested 028C0 61400412 5 198 LD R5 CPPSA load the current users PSA pointer 028C1 FB7228EF 5 199 JNZA R5 DISPLIT fall through if no current user 200 * \ / 201 028C2 60841DAA 2 IMM 202 LD R2 ADR SQRUNNABLE set up for RLJNA 203 PLOCK SQLOCKS(NQRUNNABLE) 028C3 0CC00000 203 IOFF 028C4 D1C01DBB 203 SETT SQLOCKS(NQRUNNABLE) 028C5 FE0C28C7 203 JNE MA(2+DISPW MA 0) 028C6 DC40308B 203 CALLNP LOCKWAIT 028C7 60401DAA 1 204 LD R1 SQRUNNABLE get the root of the list 028C8 FA702891 1 205 JZA R1 THINKIDLE jump if nothing to do 000028C9 206 TRYAGAIN LABEL 028C9 61485F13 5 1 ZBM 207 LD R5 R1,PCPSADRS R5 -> PSA 028CA 60094043 0 5 ZBM 208 LD R0 R5,PSOURCPU pick up the desired CPU 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 454 (DISPATCH) F 28 Dispatcher 028CB FA0228D0 0 209 JEQZ R0 PROCOK if none specified, then we are ok 028CC 64000415 0 210 CPR R0 OURSLOT do they want us? 028CD FE0228D0 211 JEQ PROCOK if so, then run them 028CE FA7A28C9 12 212 RLJNA R1 TRYAGAIN go around again 028CF FE0E2891 213 JMP THINKIDLE could not find a process for us to run 214 * --- 215 000028D0 216 PROCOK LABEL 028D0 60085F10 0 1 ZBM 217 LD R0 R1,PCQLINK get link to remainder of list 028D1 E4089F10 0 2 ZBM 218 ST R0 R2,PCQLINK remove our element from the list 219 PUNLOCK SQLOCKS(NQRUNNABLE) call to release the runnable queue 028D2 EC001DBB 219 STZ SQLOCKS(NQRUNNABLE) 028D3 0C800000 219 ION 220 * set up PCB information for new queue 028D4 60000415 0 221 LD R0 OURSLOT get our CPU slot number 028D5 E4164801 0 1 BASE 222 ST R0 R1,PCQPARM save as our parm 028D6 60040000 0 IMM 223 LD R0 NQRUNNING get new queue number 028D7 E4085260 0 1 ZBM 224 ST R0 R1,PCQUEUE set our new queue number 225 226 PLOCK SQLOCKS(NQRUNNING) lock the list of running processes 028D8 0CC00000 226 IOFF 028D9 D1C01DBA 226 SETT SQLOCKS(NQRUNNING) 028DA FE0C28DC 226 JNE MA(2+DISPW MA 0) 028DB DC40308B 226 CALLNP LOCKWAIT 028DC 60001DA9 0 227 LD R0 SQRUNNING get pointer to head of list 028DD E4085F10 0 1 ZBM 228 ST R0 R1,PCQLINK put existing queue behind us 028DE E4401DA9 1 229 ST R1 SQRUNNING put us at head of queue 230 PUNLOCK SQLOCKS(NQRUNNING) unlock the queue 028DF EC001DBA 230 STZ SQLOCKS(NQRUNNING) 028E0 0C800000 230 ION 231 028E1 60094116 0 5 ZBM 232 LD R0 R5,PSCURRPROC get current UPC pointer for this user 028E2 E4000414 0 233 ST R0 CPCUPC assign as current UPC for this CPU 028E3 E5400412 5 234 ST R5 CPPSA indicate new current user 028E4 D0001D0B 235 INC BUSYCPUS indicate that another CPU is running 028E5 DC4025C2 236 CALLNP PFLOAD load up this users page file 028E6 6000254E 0 237 LD R0 TSQUANMIN get minimum quantum value 028E7 180940F2 0 5 ZBM 238 ADD R0 R5,PSWSSIZE give bigger guys longer quanta 028E8 E409410B 0 5 ZBM 239 ST R0 R5,PSLASTQUAN and save for billing 028E9 DC0044F8 240 CALL TIMESET set up the quantum for the user 028EA 4309410B 5 ZBM 241 PAR2 R5,PSLASTQUAN pass the time interval 028EB 41400415 242 PARV OURSLOT indicate which processor 028EC 41002B4D 243 PAR SETSWITCH routine to end a quantum 028ED 40534000 5 REG 244 PARVL R5 parm is debugging aid 028EE E517480F 4 5 BASE 245 ST TMR R5,PSQUANTPTR save for eventual TIMEKILL 246 000028EF 247 DISPLIT LABEL 028EF 6089575D 2 5 ZBM 248 LD R2 R5,PSUERROR/RTUERRORZ check for session errors 028F0 FA8C2970 2 249 JNEZ R2 DOPSAERR jump if one exists 000028F1 250 TRYUPC LABEL 028F1 61000414 4 251 LD R4 CPCUPC get current underprocess 028F2 6089175B 2 4 ZBM 252 LD R2 R4,UPCUERROR/RTUERRORZ check for process errors 028F3 FA8C2973 2 253 JNEZ R2 DOUPCERR jump if one exists 000028F4 254 REDISP LABEL 028F4 01095F10 5 ZBM 255 LDCA R5,PSCACHN run this user 256 * --- 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 455 (DISPATCH) F 28 Dispatcher 257 000028F5 258 PROCFL LABEL 028F5 FA02292A 0 259 JEQZ R0 DOFREEZE handle freeze request 028F6 70520000 1 0 REG 260 LDN R1 R0 get -( the bit number ) 028F7 6062257D 1 1 261 LD R1 BITTAB(31)(R1) get a clearing mask 028F8 A8401CF6 1 262 BRSBM R1 FLAGS clear the bit that got us here 028F9 FE0228B7 263 JEQ DISPATCH jump back if someone else got it 028FA 5CA028FB 0 264 LDPC FLAGJTB(R0) go visit the proper routine 265 * --- 266 000028FB 267 FLAGJTB LABEL 268 BASE 028FB 0000292A 269 FLFREEZE ADR DOFREEZE freeze system - must be flag number zero 028FC 000028B7 270 ADR DISPATCH improper bit, no corresponding routine 028FD 000028B7 271 ADR DISPATCH improper bit, no corresponding routine 028FE 000028B7 272 ADR DISPATCH improper bit, no corresponding routine 028FF 000028B7 273 ADR DISPATCH improper bit, no corresponding routine 02900 000028B7 274 ADR DISPATCH improper bit, no corresponding routine 02901 000028B7 275 ADR DISPATCH improper bit, no corresponding routine 02902 000028B7 276 ADR DISPATCH improper bit, no corresponding routine 02903 000028B7 277 ADR DISPATCH improper bit, no corresponding routine 02904 000028B7 278 ADR DISPATCH improper bit, no corresponding routine 02905 000028B7 279 ADR DISPATCH improper bit, no corresponding routine 02906 000028B7 280 ADR DISPATCH improper bit, no corresponding routine 02907 000028B7 281 ADR DISPATCH improper bit, no corresponding routine 02908 000028B7 282 ADR DISPATCH improper bit, no corresponding routine 02909 000028B7 283 ADR DISPATCH improper bit, no corresponding routine 0290A 000028B7 284 ADR DISPATCH improper bit, no corresponding routine 0290B 000028B7 285 ADR DISPATCH improper bit, no corresponding routine 0290C 000028B7 286 ADR DISPATCH improper bit, no corresponding routine 0290D 000028B7 287 ADR DISPATCH improper bit, no corresponding routine 0290E 00002953 288 FLSTOPCPU ADR DOSTOPCPU stop a CPU from running 0290F 00002931 289 FLPCPU ADR DOCPUPATCH reload CPU microcode patches 02910 00002AFB 290 FLDISMNT ADR DODISMNT dismount maintenance mounted volume 02911 00002AFD 291 FLACCTNG ADR DOACCTNG start the accounting process 02912 00002AFF 292 FLFREEFL ADR DOFREEFL start the free file process 02913 00002B02 293 FLADT ADR DOADT start the ADT process 02914 00002B04 294 FLERRLOG ADR DOERRLOG start the error log process 02915 00004184 295 FLMTPROC ADR MTPROC start MT/CT 02916 00002928 296 FLMONITOR ADR DOMONITOR start the histogram data gatherer 02917 0000292C 297 FLSSURST ADR DOSSURST no clock - reset SSU 02918 0000291B 298 FLFSX ADR DOFSX adjust free storage expansion/contraction 02919 0000291D 299 FLCHKSUM ADR DOCHKSUM re-calculate the resident system checksums 0291A 0000396B 300 FLMSPROC ADR MSPROC start the mass storage driver 301 DRCT 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 456 (DISPATCH) F 28 Dispatcher 303 304 ********************************************************************************** 305 * * 306 * FREE STORAGE EXPANSION/CONTRACTION * 307 * The free storage routines have added or used a * 308 * whole page of free storage. We come here to adjust * 309 * the number of whole pages by moving them into or from * 310 * the idle page list. * 311 * * 312 ********************************************************************************** 313 0000291B 314 DOFSX LABEL 0291B DC402B0E 315 CALLNP FSXPAND adjust pages on the wholepage list 0291C FE0E28B7 316 JMP DISPATCH 317 * --- 318 319 ********************************************************************************** 320 * * 321 * Regenerate checksums of the resident system for memory * 322 * error recovery. * 323 * * 324 ********************************************************************************** 325 0000291D 326 DOCHKSUM LABEL 0291D 60842400 2 IMM 327 LD R2 RESIDENT get address of first page 328 * \ / 329 0000291E 330 CKSUMLOOP1 LABEL 0291E 60040000 0 IMM 331 LD R0 0 initialize checksum 0291F 604403FF 1 IMM 332 LD R1 WPP-1 loop index 333 * \ / 334 00002920 335 CKSUMLOOP2 LABEL 02920 741C8800 0 21 BASE 336 XOR R0 R2,0(R1) xor in the next word 02921 FA662920 1 337 JDR R1 CKSUMLOOP2 generate a checksum in R0 02922 604A9E70 1 2 CBM 338 LD R1 R2/FLDPAGE R1 = page number 02923 E4221CC1 0 1 339 ST R0 MEMCKSUM(R1-RESIDENT/FLDPAGE) save checksum for this page 02924 18840400 2 IMM 340 ADD R2 WPP advance to next whole page 02925 6484AD51 2 IMM 341 CPR R2 ENDOFRES are we done with the resident system? 02926 FE08291E 342 JLT CKSUMLOOP1 jump if another page to do 02927 FE0E28B7 343 JMP DISPATCH else go do some useful work 344 * --- 345 346 ********************************************************************************** 347 * * 348 * Routine to set up the performance monitoring process. * 349 * * 350 ********************************************************************************** 351 00002928 352 DOMONITOR LABEL 02928 DC403870 353 CALLNP MONITRPROC call for performance monitor 02929 FE0E28B7 354 JMP DISPATCH 355 * --- 356 357 ********************************************************************************** 358 * * 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 457 (DISPATCH) F 28 Dispatcher 359 * Someone wants to freeze the system so that he can * 360 * do all sorts of strange and wonderous things without * 361 * worrying about locks. Wait for him to finish perpetrating * 362 * his dastardly deeds. * 363 * * 364 ********************************************************************************** 365 0000292A 366 DOFREEZE LABEL 0292A DC402D9A 367 CALLNP FREEZEWAIT call routine to do the wait 0292B FE0E28B7 368 JMP DISPATCH holiday's over, go back to work 369 * --- 370 371 ********************************************************************************** 372 * * 373 * The clock doesn't seem to be interrupting. Do * 374 * a reset on the SSU and hope for the best. * 375 * * 376 ********************************************************************************** 377 0000292C 378 DOSSURST LABEL 0292C DC005048 379 CALL ERRORLOG call for an error log entry 0292D 41440611 IMM 380 PARV ERLCSSUTO indicate what kind of error 0292E 40401EDE 381 PARVL CLOCKPF indicate where the device is 0292F DC4044C9 382 CALLNP SSU_RESET call for re-initialization of SSU 02930 FE0E28B7 383 JMP DISPATCH 384 * --- 385 386 ********************************************************************************** 387 * * 388 * Power up happened (or we just booted). Set up * 389 * processes to load CPU microcode patches. * 390 * * 391 ********************************************************************************** 392 00002931 393 DOCPUPATCH LABEL 02931 5C001DA1 394 CMZ PATCHLIST any patches out there? 02932 FE0228B7 395 JEQ DISPATCH skip this if not 396 * \ / 397 02933 61401CF7 5 398 LD R5 CPUCOUNT number of CPUs to do 00002934 399 DOCPULOOP LABEL 02934 602A1CFA 0 5 400 LD R0 CPUSLOTS(R5-1) get a cpu slot number 02935 60201ECE 0 0 401 LD R0 SLOTTABLE(R0) get its WRU0 info 02936 604A1040 1 0 CBM 402 LD R1 R0/WRU0CPUSUB get the CPU type subcode 02937 64440001 1 IMM 403 CPR R1 CPU4 is this a CPU4? 02938 FE0C294F 404 JNE DOCPULEND go to the loop's end if not 02939 600A3080 0 0 CBM 405 LD R0 R0/WRU0MREV pick up the revision of this CPU's u-code 0293A 60401DA1 1 406 LD R1 PATCHLIST point to the list of patches 0293B 3C164000 0 1 CACH 407 LSRCH R0 R1,CPUPREV look for the right revision level 0293C FE0C294F 408 JNE DOCPULEND no patches for this CPU 409 * \ / 410 0293D DC0035D2 411 CALL BLDPROCESS build a process to load this CPU's u-code 0293E 4144F1F0 IMM 412 PARV MONMSR MSR for process 0293F 43401DA2 413 PARV2 CPUPROCNAM name of the process 02940 414452B5 IMM 414 PARV ADR PATCHPROC PC to start process at 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 458 (DISPATCH) F 28 Dispatcher 02941 40440001 IMM 415 PARVL 1 this is a system process 416 02942 EDD70801 4 BASE 417 STW R4,PCQPARM give it a very low QIV 02943 EDC91A13 4 ZBM 418 STW R4,PCSPECPROC say we are a special process 02944 602A1CFA 0 5 419 LD R0 CPUSLOTS(R5-1) get our slot number 02945 E408C043 0 3 ZBM 420 ST R0 R3,PSOURCPU so the right CPU runs us 421 422 * We link this process on the head of the runnable queue so that it 423 * will be the first process to run on the designated CPU. 424 PLOCK SQLOCKS(NQRUNNABLE) 02946 0CC00000 424 IOFF 02947 D1C01DBB 424 SETT SQLOCKS(NQRUNNABLE) 02948 FE0C294A 424 JNE MA(2+DISPW MA 0) 02949 DC40308B 424 CALLNP LOCKWAIT 0294A 60001DAA 0 425 LD R0 SQRUNNABLE get first element in runnable queue 0294B E4091F10 0 4 ZBM 426 ST R0 R4,PCQLINK link onto us 0294C E5001DAA 4 427 ST R4 SQRUNNABLE put us on the head of the queue 428 PUNLOCK SQLOCKS(NQRUNNABLE) call to release the runnable queue 0294D EC001DBB 428 STZ SQLOCKS(NQRUNNABLE) 0294E 0C800000 428 ION 0000294F 429 DOCPULEND LABEL 0294F FB622934 5 430 DRJ R5 DOCPULOOP do this for each CPU 431 * \ / 02950 DC0025EB 432 CALL MAPINMEM re-map original caller, if any 02951 40400412 433 PARVL CPPSA pointer to his PSA 02952 FE0E28B7 434 JMP DISPATCH 435 * --- 436 437 ********************************************************************************** 438 * * 439 * A user wants to try running the system with one less * 440 * CPU. Build a process to take a CPU out of service. * 441 * * 442 ********************************************************************************** 443 00002953 444 DOSTOPCPU LABEL 445 PLOCK IDLECPULCK 02953 0CC00000 445 IOFF 02954 D1C01DA4 445 SETT IDLECPULCK 02955 FE0C2957 445 JNE MA(2+DISPW MA 0) 02956 DC40308B 445 CALLNP LOCKWAIT 02957 61401DA5 5 446 LD R5 IDLECPULST R5 -> list of idle CPUs 02958 60040001 0 IMM 447 LD R0 1 what we will look for 02959 3C095010 0 5 ZBM 448 LSRCH R0 R5,ICNOTBUILT scan for an unbuilt CPU stop process 0295A FE0C2968 449 JNE ALLBUILT jump if they have all been built 0295B EC095010 5 ZBM 450 STZ R5,ICNOTBUILT say we have built this process 451 PUNLOCK IDLECPULCK 0295C EC001DA4 451 STZ IDLECPULCK 0295D 0C800000 451 ION 0295E DC0035D2 452 CALL BLDPROCESS build a process 0295F 4144F1F0 IMM 453 PARV MONMSR make it a monitor process 02960 43401DA7 454 PARV2 IDLENAME 02961 414452CC IMM 455 PARV ADR REMOVECPU where it should start 02962 40440001 IMM 456 PARVL 1 system process 02963 EDC91A13 4 ZBM 457 STW R4,PCSPECPROC say we are a special process 02964 60094840 0 5 ZBM 458 LD R0 R5,ICSLOT pick up the slot number 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 459 (DISPATCH) F 28 Dispatcher 02965 E408C043 0 3 ZBM 459 ST R0 R3,PSOURCPU put in the PSA 02966 DC402B99 460 CALLNP SETRUNNING into the runnable queue 02967 FE0E2953 461 JMP DOSTOPCPU see if there is another CPU to stop 462 * --- 463 00002968 464 ALLBUILT LABEL 465 PUNLOCK IDLECPULCK 02968 EC001DA4 465 STZ IDLECPULCK 02969 0C800000 465 ION 0296A DC0025EB 466 CALL MAPINMEM re-map original caller, if any 0296B 40400412 467 PARVL CPPSA pointer to his PSA 0296C FE0E28B7 468 JMP DISPATCH 469 * --- 470 471 ********************************************************************************** 472 * Routine called at the end of a users quantum. We * 473 * call TESTTRUBL here to ensure that users who have all * 474 * of their working set resident (and therefore are never * 475 * taking a trip through the page fault processor) will * 476 * be made troublemaker if needed. We switch * 477 * this process out using SHUTRUN. This is done * 478 * even if there is no other user ready to run so that * 479 * page ages can be properly kept (among other things). * 480 * must come here with the interrupts off * 481 ********************************************************************************** 482 0000296D 483 SWITCH LABEL 0296D DC402BF3 484 CALLNP TESTTRUBL check for this guy a trouble maker 0296E DC402B88 485 CALLNP SHUTRUN shutdown this user and place back in runnable queue 0296F FE0E28B7 486 JMP DISPATCH done with this job 487 * --- 488 489 ********************************************************************************** 490 * An execution error has occurred. We classify the error * 491 * and set up the process to run the appropriate error handler * 492 * (either back to the user error handler, or to Control Mode). * 493 ********************************************************************************** 494 00002970 495 DOPSAERR LABEL 02970 F69A296D 2 496 JBT R2/RTSWITCHB SWITCH jump for process switch 02971 3917480D 4 5 BASE 497 LEA R4 R5,PSUERROR address of session error root 02972 FE0E2974 498 JMP DOUERR jump in 499 * --- 500 00002973 501 DOUPCERR LABEL 02973 3917080B 4 4 BASE 502 LEA R4 R4,UPCUERROR address of process error root 503 * \ / 504 00002974 505 DOUERR LABEL 02974 60C00414 3 506 LD R3 CPCUPC locate current underprocess 507 PLOCK R5,PSLOCK get access to the PSA lists 02975 0CC00000 507 IOFF 02976 D1D7480C 5 BASE 507 SETT R5,PSLOCK 02977 FE0C2979 507 JNE MA(2+DISPW MA 0) 02978 DC40308B 507 CALLNP LOCKWAIT 02979 60495F10 1 5 ZBM 508 LD R1 R5,PSCACHN get console area pointer 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 460 (DISPATCH) F 28 Dispatcher 0297A 5C087611 1 ZBM 509 CMZ R1,CAMSR/MSRIRELOCB is the requester running in monitor state? 0297B FE0229AF 510 JEQ DPRUER jump if error was a user program 0297C F29C2A22 2 511 JBF R2/RTVERYBADB CANTTOUCH back if unable to disturb this process 512 * \ / 513 514 ********************************************************************************** 515 * The error is "verybad" and within the monitor. That * 516 * means virtual memory failure (UINTVMFPE, UINTVMFDE, * 517 * UINTVMFIDS, or UINTMPV). Return to the window error * 518 * routine or to the error routine indicated. If no recovery * 519 * is specified, all we can do is halt. * 520 ********************************************************************************** 521 522 * \ / 0297D 60040001 0 IMM 523 LD R0 1 flag for very bad 0297E 61491F10 5 4 ZBM 524 LD R5 R4,0/FLDADRS => first element 0297F 3C094210 0 5 ZBM 525 LSRCH R0 R5,UERVERYBAD find a very bad error 02980 FE0C29A1 526 JNE NONEVB not found, sweep under rug 02981 DC402AA9 527 CALLNP DELINKUERR excise it 02982 60800412 2 528 LD R2 CPPSA R2 => PSA 529 PUNLOCK R2,PSLOCK no more access to the PSA 02983 EC16880C 2 BASE 529 STZ R2,PSLOCK 02984 0C800000 529 ION 02985 61C89F10 7 2 ZBM 530 LD R7 R2,PSCACHN get pointer to registers 02986 EDC9F011 7 ZBM 531 STW R7,CAMSR/MSRSRELOCB restore store relocation to monitor space 02987 EDC9F211 7 ZBM 532 STW R7,CAMSR/MSRFRELOCB restore fetch relocation to monitor space 02988 EDC9F411 7 ZBM 533 STW R7,CAMSR/MSRPRELOCB restore pointer relocation to monitor space 02989 60C400FB 3 IMM 534 LD PFPTR PNPPLWNDO page map loc where FBI for page is kept 0298A 80D20000 0 REG 535 PFRC R0 unmap that window 0298B 600946A0 0 5 ZBM 536 LD R0 R5,UERCODE get the error code 0298C E417C802 0 7 BASE 537 ST R0 R7,CAR0 error handler finds it in R0 0298D 60174801 0 5 BASE 538 LD R0 R5,UERPARAM the extra parameter (page number) 0298E E417C803 0 7 BASE 539 ST R0 R7,CAR1 is found in R1 540 * \ / 541 542 ********************************************************************************** 543 * Errors that go to monitor routines (ones with verybad * 544 * set) are only virtual memory failure. The extra param is * 545 * the virtual address. We here check to see if it's a window. * 546 * If so, we zap to window error address else we go to the * 547 * general failure address. * 548 ********************************************************************************** 549 550 * R0 = page number (error param) 0298F 60C00414 3 551 LD R3 CPCUPC current process 02990 6096C80E 2 3 BASE 552 LD R2 R3,UPCWVMLIST get pointer to window VM list 02991 F6302993 0 553 JBT R0/MONBIT DISPMVP jump if we should search the window list 02992 6096C80D 2 3 BASE 554 LD R2 R3,UPCVMLIST get pointer to VM list 00002993 555 DISPMVP LABEL 02993 3C168004 0 2 CACH 556 LSRCH R0 R2,VPVPN look for this page 02994 FE0C2999 557 JNE DNOPG jump if page is not mapped 02995 60089F12 0 2 ZBM 558 LD R0 R2,VPERAD get the window error address 02996 FA32299B 0 559 JNZA R0 DSETINTAD fall thru if no window recovery specified 02997 6017C803 0 7 BASE 560 LD R0 R7,CAR1 if the page was monitor . . . 02998 F63029A6 0 561 JBT R0/MONBIT DNOERRADR . . . we can only stop 00002999 562 DNOPG LABEL 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 461 (DISPATCH) F 28 Dispatcher 02999 6017C80A 0 7 BASE 563 LD R0 R7,CAINTADR not a window, use general error vector address 0299A FA3029A6 0 564 JZA R0 DNOERRADR jump off to die if no error address specified 0000299B 565 DSETINTAD LABEL 0299B E409DF10 0 7 ZBM 566 ST R0 R7,CAPC that's where we restart 0299C DC002F5D 567 CALL UFREEMEM free the error block 0299D 41440001 IMM 568 PARV UERLOG indicate its length 0299E 40534000 5 REG 569 PARVL R5 and its address 0299F 61400412 5 570 LD R5 CPPSA get pointer to current PSA 029A0 FE0E28F4 571 JMP REDISP go run this process 572 * --- 573 574 ********************************************************************************** 575 * Root says we should find a very bad element, but * 576 * we didn't. Clear up, and try again. * 577 ********************************************************************************** 578 000029A1 579 NONEVB LABEL 029A1 EC091C10 4 ZBM 580 STZ R4,0/RTVERYBADB say no more 029A2 61400412 5 581 LD R5 CPPSA get session 582 PUNLOCK R5,PSLOCK release PSA 029A3 EC17480C 5 BASE 582 STZ R5,PSLOCK 029A4 0C800000 582 ION 029A5 FE0E28EF 583 JMP DISPLIT try again 584 * --- 585 586 ********************************************************************************** 587 * We arrive at this halt whenever the VERYBAD bit was * 588 * set on a user error occurring in monitor code, and the * 589 * process turns out to have no error recovery address. * 590 * The most likely cause is that we had a mass storage error * 591 * while reading a section of the monitor. This is bad news. * 592 ********************************************************************************** 593 000029A6 594 DNOERRADR LABEL 029A6 00080021 595 HALT HALTH0021 mass storage error on required page 596 * --- R7 -> console area, CAR0=error code 597 * CAR1=virtual page number 598 599 ********************************************************************************** 600 * * 601 * The session is being stopped. Put it on SQSTOPWAIT, * 602 * then try to dispatch a different session. * 603 * * 604 ********************************************************************************** 605 000029A7 606 STOPSESS LABEL 029A7 EC09581D 5 ZBM 607 STZ R5,PSUERROR/RTSTOPB clear stop bit for this session 608 PUNLOCK R5,PSLOCK release the lock 029A8 EC17480C 5 BASE 608 STZ R5,PSLOCK 029A9 0C800000 608 ION 029AA 60440000 1 IMM 609 LD R1 0 no parameters for this 029AB 60C41DB8 3 IMM 610 LD R3 ADR SQSTOPWAIT indicate which queue 029AC DC002B58 611 CALL SHUTDOWN shut down the session 029AD 40440000 IMM 612 PARVL 0 no parameter 029AE FE0E28B7 613 JMP DISPATCH see if we can run something else 614 * --- 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 462 (DISPATCH) F 28 Dispatcher 615 616 ********************************************************************************** 617 * * 618 * A reason to interrupt a user process is found. * 619 * * 620 ********************************************************************************** 621 622 * R2 = Z part of root word, R3 = CPCUPC, R4 => root word 000029AF 623 DPRUER LABEL 029AF F69829A7 2 624 JBT R2/RTSTOPB STOPSESS session stop requested 029B0 F6962A0B 2 625 JBT R2/RTVMFISRB OUTOFVA jump if to int for user space shortage 029B1 614A9F10 5 2 CBM 626 LD R5 R2/FLDADRS => first element 029B2 F29C29B6 2 627 JBF R2/RTVERYBADB FIRSTERROR jump if nothing major 029B3 60040001 0 IMM 628 LD R0 1 flag for very bad 029B4 3C094210 0 5 ZBM 629 LSRCH R0 R5,UERVERYBAD find a very bad error 029B5 FE0C29A1 630 JNE NONEVB not found, forget 631 * \ / 632 633 * We have an error to look at. 000029B6 634 FIRSTERROR LABEL 029B6 600946A0 0 5 ZBM 635 LD R0 R5,UERCODE get error 029B7 64040025 0 IMM 636 CPR R0 UINTTIMINT timer interrupt? 029B8 FE0C29BA 637 JNE FINDTRAP if not, no special treatment 029B9 EC16C80C 3 BASE 638 STZ R3,UPCINTTIME prevent further time ints 639 * \ / 640 641 * Big decisions! Who wants/gets the interrupt? 000029BA 642 FINDTRAP LABEL 029BA 60800414 2 643 LD R2 CPCUPC pass UPC address 029BB DC002AB3 644 CALL GETTRAPPER anyone out there? 029BC 414946A0 5 ZBM 645 PARV R5,UERCODE pass error code 029BD 40574801 5 BASE 646 PARVL R5,UERPARAM pass error subcode 029BE FE0E2A16 647 JMP NOTRAPS no one wants interrupt 648 * \ / 649 650 ********************************************************************************** 651 * * 652 * UPC in R2 wants interrupt for error. If it is the current * 653 * underprocess, we must ensure that the TCG/TCS in the console * 654 * terminal are set up correctly. If R2 is not the current * 655 * underprocess, we must switch to it. * 656 * * 657 ********************************************************************************** 658 659 * \ / 029BF DC402AA9 660 CALLNP DELINKUERR remove element from list 029C0 60000412 0 661 LD R0 CPPSA session 662 PUNLOCK R0,PSLOCK allow access to error lists 029C1 EC16080C 0 BASE 662 STZ R0,PSLOCK 029C2 0C800000 662 ION 029C3 0140040C 663 LDCAR IVTXREQ new CAR 029C4 DC00284A 664 CALL GRABCA new CA 029C5 4000040C 665 PARL IVTXREQ from XREQ stock 029C6 60089F12 0 2 ZBM 666 LD R0 R2,UPCCONSOLE new guys registers 029C7 64800414 2 667 CPR R2 CPCUPC is trapper the current process? 029C8 FE0229CE 668 JEQ TOCURR if so, no process switch required 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 463 (DISPATCH) F 28 Dispatcher 029C9 EC08001B 0 ZBM 669 STZ R0,CAINTENABL turn off his ints 029CA DC003330 670 CALL OVPDOWNONE make R2 into CPCUPC, R3 has old 029CB 40528000 2 REG 671 PARVL R2 pass UPC address 029CC FEC00000 672 NOP 0 how could we miss? 029CD FE0E29D4 673 JMP GIVEINT sock it to him 674 * --- 675 676 * int to CPCUPC (in R2), ensure TCG/TCS 677 * R0 = trappers CA, R3 = errant UPC, R5 = error element 000029CE 678 TOCURR LABEL 029CE EC08001B 0 ZBM 679 STZ R0,CAINTENABL turn off his ints 029CF 61D2C000 7 3 REG 680 LD R7 R3 copy UPC to safe reg 029D0 60D6080B 3 0 BASE 681 LD R3 R0,CAINTMASK for call 029D1 DC40343C 682 CALLNP CHECKNOINT dump regenerable errors now to be held off 029D2 60D3C000 3 7 REG 683 LD R3 R7 restore reg 029D3 DC40337E 684 CALLNP MOVETRMGX play with absio 685 * \ / 686 687 ********************************************************************************** 688 * * 689 * Give CPCUPC an interrupt. A section of this is executed * 690 * in a "virtual" environment to allow page faults trying * 691 * to get to the user's interrupt register buffer. * 692 * * 693 ********************************************************************************** 694 695 * \ / 696 * R3 => errant UPC, R5 => error element 000029D4 697 GIVEINT LABEL 029D4 60574801 1 5 BASE 698 LD R1 R5,UERPARAM get subcode 029D5 FA4229DA 1 699 JEQZ R1 GETVIRTUAL no subcode, no check 029D6 DC0034EA 700 CALL CHKINTCODE maybe convert subcode 029D7 41400412 701 PARV CPPSA pass session 029D8 404946A0 5 ZBM 702 PARVL R5,UERCODE and interrupt code 029D9 E4574801 1 5 BASE 703 ST R1 R5,UERPARAM save away real subcode 000029DA 704 GETVIRTUAL LABEL 029DA 59C4F000 IMM 705 IORMSR INTSON turn on the interrupts 706 SETSP set our stack pointer 029DB 81538000 6 REG 706 STCAR SP 029DC 6197880D 6 6 BASE 706 LD SP SP,CASTACKPTR 029DD 61979020 6 6 REG 706 LD SP SP+(2 POWER STAKLOG) 029DE 61C8D371 7 3 ZBM 707 LD R7 R3,UPCSERNM PSN of errant 029DF 60C00412 3 708 LD R3 CPPSA session 029E0 60C8DF11 3 3 ZBM 709 LD R3 R3,PSCACHNP1 => registers of error handling UPC 029E1 6116C80A 4 3 BASE 710 LD R4 R3,CAINTADR => interrupt vector 029E2 DC005BCF 711 CALL SETMEMTRAP enable recovery from bad user error 029E3 40002A01 712 PARL UERRBMEM pass recovery address 029E4 5C08F611 3 ZBM 713 CMZ R3,CAMSR/MSRIRELOCB is UPC in monitor code? 029E5 FE0C29E7 714 JNE MONZA jump if so 029E6 59840040 IMM 715 CLBMSR MSRFRELOC select user space for data fetch 000029E7 716 MONZA LABEL 717 * \ / 718 719 * First instructions to access user memory, could get 720 * memory hardware error (e.g. bad parity), but not 721 * UINTVMIDS or limit errors since page should already 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 464 (DISPATCH) F 28 Dispatcher 722 * have a disk block (from the CODE file). 029E7 60570801 1 4 BASE 723 LD R1 R4,1 R1=new PC 029E8 60891F10 2 4 ZBM 724 LD R2 R4,0/FLDADRS R2=>place for the registers 029E9 59C40040 IMM 725 IORMSR MSRFRELOC restore monitor data fetch 029EA E048DF10 1 3 ZBM 726 EXCH R1 R3,CAPC exchange old PC with new 727 * CMZ R3,CAMSR/MSRIRELOCB again check relocation 029EB FE0C29ED 728 JNE MONTVERNIN jump if UPC in monitor 029EC 59840080 IMM 729 CLBMSR MSRSRELOC select user space data store 000029ED 730 MONTVERNIN LABEL 731 * \ / 732 733 * Look out! First instructions that touch user's buffer page. 029ED E4568808 1 2 BASE 734 ST R1 R2,DISPPC save the old PC in user's memory 029EE 6048C0F0 1 3 ZBM 735 LD R1 R3,CAPSR get user's status 029EF 6008C081 0 3 ZBM 736 LD R0 R3,CAMSR/MSRRSTRT get the instruction restart code 029F0 E40A4080 0 1 CBM 737 ST R0 R1/CH0 save it with the PSR 029F1 E4568809 1 2 BASE 738 ST R1 R2,DISPPSR save the PSR in the user's memory 029F2 60440020 1 IMM 739 LD R1 8*CPW there are 8 general registers 029F3 3816C802 0 3 BASE 740 LEA R0 R3,CAR0 make source address 029F4 FE400000 741 CMOVE move the registers into the user's memory 029F5 59C40080 IMM 742 IORMSR MSRSRELOC back to monitor storing 029F6 DC405BD4 743 CALLNP CLRMEMTRAP relinquish error handling 029F7 EC08C0F0 3 ZBM 744 STZ R3,CAPSR no PSR bits in interrupt routine 029F8 E5D6C803 7 3 BASE 745 ST R7 R3,CAR1 R1 := errant underprocess PSN 029F9 600946A0 0 5 ZBM 746 LD R0 R5,UERCODE fetch interrupt code 029FA E416C804 0 3 BASE 747 ST R0 R3,CAR2 R2 := error code 029FB 60574801 1 5 BASE 748 LD R1 R5,UERPARAM fetch interrupt subcode 029FC E456C805 1 3 BASE 749 ST R1 R3,CAR3 R3 := error parameter 000029FD 750 GOAWAY LABEL 029FD DC002F5D 751 CALL UFREEMEM free the error element 029FE 41440001 IMM 752 PARV UERLOG pass size 029FF 40534000 5 REG 753 PARVL R5 pass address 02A00 FE0E38DF 754 JMP XREQRTNX go run the user, no inc PC 755 * --- 756 757 ********************************************************************************** 758 * * 759 * Memory error handler for our virtual code (GETVIRTUAL). The * 760 * user's memory went bad while we tried to copy his regs to * 761 * his int buffer (memory protect, limit exceed, or full disk). * 762 * The original error will be lost (may well get regenerated * 763 * later on, tho). We must now post a new error. Since we just * 764 * turned off CAINTENABL in CPCUPC, the error (a serious one) * 765 * will PASSUP to an overprocess. Slight problem is that this * 766 * will be hard for the user to figure out, especially since * 767 * our present fellow will probably not get his ints turned back * 768 * on (not unreasonable, since the virt page for his reg buffer * 769 * is screwed up). Anyway, post the new error, free the old * 770 * element, and go try again. Once burned, twice shy. * 771 * * 772 * To make OUR life easier, tho, we halt right now if the * 773 * process has no overprocess. Otherwise the error would just * 774 * go straight to a C1200, where we would have lost all this * 775 * nice information. R0 = code, R1 = subcode for memory error, * 776 * R5 -> original UER element, R3 -> PSCACHNP1 = CM's CA with * 777 * mods up to mem error, R2 -> PSCACHN = our CA in GETVIRTUAL * 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 465 (DISPATCH) F 28 Dispatcher 778 * (CAPC may have been set to interrupt handler. If so, * 779 * original could still be in CAR1 of PSCACHN). Of course, * 780 * CM's interrupt buffer is probably still inaccessible, and * 781 * wouldn't have any current info in it anyway. * 782 * * 783 ********************************************************************************** 784 785 * R0 = memory error code, R1 = subcode, R3 -> CPPSA,PSCACHNP1 (the CM CA). 00002A01 786 UERRBMEM LABEL 02A01 60800412 2 787 LD R2 CPPSA PSA of user 02A02 5C089214 2 ZBM 788 CMZ R2,PSCNTLMODE are we in Control Mode? 02A03 FE022A06 789 JEQ PASSON if not, error will take 02A04 60889F10 2 2 ZBM 790 LD R2 R2,PSCACHN R2 -> our CA in GETVIRTUAL 02A05 00031202 791 HALT HALTC1202 error giving int to CM 792 * --- 793 00002A06 794 PASSON LABEL 02A06 62940000 2301 PAIR 795 LD2 R2 PAIR R0 move the error codes 02A07 7C840800 2 IMM 796 IOR R2 VERYBAD mark as disasterous 02A08 DC405BD4 797 CALLNP CLRMEMTRAP relinquish error handling 02A09 DC403589 798 CALLNP UERRSET set the error in the list 02A0A FE0E29FD 799 JMP GOAWAY finish out 800 * --- 801 802 ********************************************************************************** 803 * * 804 * User previously caused attempt to acquire more free storage in * 805 * USERMEM area than was available. We now create and process an * 806 * error element for the problem. This error is to go straight to CM. * 807 * We get here the first time through DISPATCH after the illfated * 808 * memory fetch. This is the only time he gets the interrupt, even * 809 * though he'll probably remain low for many subsequent DISPATCHes * 810 * (i.e. this interrupt indicates the crossing of the threshold, not * 811 * the current low memory state). * 812 * * 813 * This error is processed before we look for "very bad" errors. * 814 * * 815 ********************************************************************************** 816 00002A0B 817 OUTOFVA LABEL 02A0B EC09561D 5 ZBM 818 STZ R5,PSUERROR/RTVMFISRB remove indication of problem 02A0C DC002ED0 819 CALL UGETMEM get a UERR element from SYSTEM memory 02A0D 40440001 IMM 820 PARVL UERLOG log size 02A0E 60441073 1 IMM 821 LD R1 UINTVMFISR+CMERR error to go to CM 02A0F E44800D0 1 0 ZBM 822 ST R1 R0,UERCODEZ save it 02A10 EC160801 0 BASE 823 STZ R0,UERPARAM no subcode 02A11 60495F1D 1 5 ZBM 824 LD R1 R5,PSUERROR/FLDADRS get current list 02A12 E4481F10 1 0 ZBM 825 ST R1 R0,UERLINK tack after us 02A13 E4095F1D 0 5 ZBM 826 ST R0 R5,PSUERROR/FLDADRS set new root 02A14 61520000 5 0 REG 827 LD R5 R0 move pointer to good register 02A15 FE0E29B6 828 JMP FIRSTERROR rejoin code, w/o checking for other errors 829 * --- 830 831 ********************************************************************************** 832 * * 833 * No UPC is specifically trapping the error. If R2 = 0, the * 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 466 (DISPATCH) F 28 Dispatcher 834 * error is untrappable or is not being trapped. The error goes * 835 * to CM if it is a CM type error ... otherwise it goes to the * 836 * debugger or overprocess. If R2 <> 0, it is the UPC of the * 837 * underprocess that would receive the error, except that it has * 838 * interrupts in general disabled. If it looks like a pretty * 839 * serious error, we give it to the debugger or overprocess as an * 840 * XREQ error. Otherwise, we "hold off" by leaving the element in * 841 * the list for later (this should not happen very much, because * 842 * we don't UERRSET unless we think the guy wants the error at the * 843 * moment). * 844 * We can never give an error to a process that is already in * 845 * an interrupt routine (because the new interrupt would write * 846 * over the interrupt buffer). This is even true of Control Mode. * 847 * It's a little tricky though, because CM receives (traps!) * 848 * the "untrappable" (no IMR bit) errors. We let the CAINTENABL * 849 * bit tell us whether CM is already in an interrupt. If it's * 850 * "off", mild errors are held off, serious errors cause a C1200 * 851 * (PASSUP to nobody). * 852 * * 853 ********************************************************************************** 854 855 * R2 = trapping UPC or 0, R3 = errant UPC 856 * R4 => root, R5 => UER element 00002A16 857 NOTRAPS LABEL 02A16 600946A0 0 5 ZBM 858 LD R0 R5,UERCODE get code 02A17 64040018 0 IMM 859 CPR R0 UINTINST instruction failure of any kind? 02A18 FE0A2A29 860 JLE PASSUP they have to be done 02A19 5C094210 5 ZBM 861 CMZ R5,UERVERYBAD urgent error? 02A1A FE0C2A29 862 JNE PASSUP if so, give it higher 02A1B 6008DF12 0 3 ZBM 863 LD R0 R3,UPCCONSOLE get current CA 02A1C 5C08001B 0 ZBM 864 CMZ R0,CAINTENABL interrupts off? 02A1D EC520000 0 REG 865 STLEQ R0 save answer 02A1E 7808C610 0 3 ZBM 866 AND R0 R3,UPCNTLMODE combine with CM flag 02A1F FA0C2A21 0 867 JNEZ R0 HOLDOFF jump if CM can't process a CMERR now 02A20 FAB02A29 2 868 JZA R2 PASSUP can give error higher if no traps at all 00002A21 869 HOLDOFF LABEL 02A21 FB7629BA 5 870 LJNA R5 FINDTRAP try next error in list 871 * \ / 872 873 * no errors we can give from this list, 874 * try other list if we haven't already 00002A22 875 CANTTOUCH LABEL 02A22 61400412 5 876 LD R5 CPPSA => session 877 PUNLOCK R5,PSLOCK allow access 02A23 EC17480C 5 BASE 877 STZ R5,PSLOCK 02A24 0C800000 877 ION 02A25 3817480D 0 5 BASE 878 LEA R0 R5,PSUERROR => session error root word 02A26 64130000 0 4 REG 879 CPR R0 R4 what we've been using? 02A27 FE0228F1 880 JEQ TRYUPC if so, move to other list 02A28 FE0E28F4 881 JMP REDISP else, give session a go 882 * --- 883 884 ********************************************************************************** 885 * * 886 * Error is to go up the tree. Special CM type errors go right * 887 * up to CM. All others go to the debugger (if any) or to the * 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 467 (DISPATCH) F 28 Dispatcher 888 * immediate overprocess. The error appears as an XREQ error to * 889 * the URPGO or URPSTEP that got the errant process going the * 890 * last time. Note: CM errors go to CM as an interrupt if CM * 891 * is the current process, otherwise they go as XREQ errors. * 892 * * 893 * A debugger can "re-generate" errors in an underprocess * 894 * using URSENDERR, to let the normal error handling by the * 895 * overprocess take place. Regenerated errors have a flag * 896 * (UERCSKIPDB) to ensure they are not also picked up by the * 897 * debugger! Also, since these errors must skip the debugger * 898 * in the event that the debugger is also the immediate over- * 899 * process, a debugger UPC has an identifying flag (UPCIMDEBUG). * 900 * A simple PSN compare is no good since there may be more than * 901 * one debugger. What a kludge! * 902 * * 903 * * 904 ********************************************************************************** 905 906 * R4 => root, R5 => UER element 00002A29 907 PASSUP LABEL 02A29 DC402AA9 908 CALLNP DELINKUERR loosen tethers on element 02A2A 60000412 0 909 LD R0 CPPSA get session 910 PUNLOCK R0,PSLOCK release grip 02A2B EC16080C 0 BASE 910 STZ R0,PSLOCK 02A2C 0C800000 910 ION 02A2D 0140040C 911 LDCAR IVTXREQ new CAR 02A2E DC00284A 912 CALL GRABCA new CA 02A2F 4000040C 913 PARL IVTXREQ from XREQ stock 02A30 5C094010 5 ZBM 914 CMZ R5,UERCODEZ/CMERRB error to go to CM? 02A31 FE0C2A4F 915 JNE PASS2CM jump if so 916 * \ / 917 02A32 6008DF12 0 3 ZBM 918 LD R0 R3,UPCCONSOLE => current's console area 02A33 EC082C11 0 ZBM 919 STZ R0,CAMSR/MSRTRACEIB kill traces 02A34 5C094410 5 ZBM 920 CMZ R5,UERCSKIPDB error to bypass debugger? 02A35 FE0C2A38 921 JNE INVISPROC jump if so 02A36 6048D378 1 3 ZBM 922 LD R1 R3,UPCERRPSN get debugger PSN 02A37 FA722A60 1 923 JNZA R1 PASS2PROC and give error to him 924 * \ / 925 926 * Either the error is to skip debuggers, or UPCERRPSN = 0, 927 * or no UPC actually exists with UPCERRPSN. Use first 928 * overprocess w/o UPCIMDEBUG set. 00002A38 929 INVISPROC LABEL 02A38 DC40331B 930 CALLNP OVPUPONE make UPCDADPTR into CPCUPC 02A39 FE0E2A70 931 JMP UERRCMMK jump if none such 02A3A 60000414 0 932 LD R0 CPCUPC underprocess 02A3B 5C080E11 0 ZBM 933 CMZ R0,UPCIMDBUG is this a debugger? 02A3C FE0C2A38 934 JNE INVISPROC debuggers invisible on way up 935 * \ / 936 937 ********************************************************************************** 938 * * 939 * We have moved up to the correct overprocess, now * 940 * in CPCUPC. Give an error to the XREQ. * 941 * * 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 468 (DISPATCH) F 28 Dispatcher 942 ********************************************************************************** 943 944 * \ / 945 * R3 => errant UPC, R5 => error element 00002A3D 946 GIVEXREQER LABEL 02A3D 60000412 0 947 LD R0 CPPSA session 02A3E 61081F11 4 0 ZBM 948 LD R4 R0,PSCACHNP1 get registers of error taker 02A3F 600946A0 0 5 ZBM 949 LD R0 R5,UERCODE get code back 02A40 E4170802 0 4 BASE 950 ST R0 R4,CAR0 R0 := error code 02A41 60574801 1 5 BASE 951 LD R1 R5,UERPARAM error subcode 02A42 DC0034EA 952 CALL CHKINTCODE possibly convert it 02A43 41400412 953 PARV CPPSA pass session 02A44 404946A0 5 ZBM 954 PARVL R5,UERCODE pass error code 02A45 E4570803 1 4 BASE 955 ST R1 R4,CAR1 R1 := error subcode 02A46 6008D371 0 3 ZBM 956 LD R0 R3,UPCSERNM more info for trapper 02A47 E4170804 0 4 BASE 957 ST R0 R4,CAR2 R2 := errant underprocess PSN 02A48 D0091F10 4 ZBM 958 INC R4,CAPC bump his PC past XREQ 00002A49 959 UERECOVER LABEL 02A49 DC002F5D 960 CALL UFREEMEM free up the error element 02A4A 41440001 IMM 961 PARV UERLOG pass log size 02A4B 40534000 5 REG 962 PARVL R5 pass address 02A4C DC40285A 963 CALLNP DROPCA make new CPCUPC CA the PSCACHN 02A4D 61400412 5 964 LD R5 CPPSA get session 02A4E FE0E28F4 965 JMP REDISP give it a go 966 * --- 967 968 * error is a CM special 00002A4F 969 PASS2CM LABEL 02A4F 60800412 2 970 LD R2 CPPSA get session 02A50 60889F15 2 2 ZBM 971 LD R2 R2,PSPROCLIST => CM's UPC 02A51 60089F12 0 2 ZBM 972 LD R0 R2,UPCCONSOLE => CA 02A52 64800414 2 973 CPR R2 CPCUPC is CM running? 02A53 FE0229CE 974 JEQ TOCURR if so, give as interrupt 02A54 DC003330 975 CALL OVPDOWNONE else, just go there 02A55 40528000 2 REG 976 PARVL R2 pass UPC address 02A56 FEC00000 977 NOP 0 how could we miss? 02A57 FE0E2A3D 978 JMP GIVEXREQER give as XREQ error 979 * --- 980 981 ********************************************************************************** 982 * * 983 * No over program, and not an initial entry. * 984 * Check to see if control mode failure * 985 * * 986 ********************************************************************************** 987 00002A58 988 UERRNINIT LABEL 02A58 60000414 0 989 LD R0 CPCUPC get pointer to current UPC 02A59 5C080610 0 ZBM 990 CMZ R0,UPCNTLMODE are we in control mode already? 02A5A FE022A5F 991 JEQ UERRNCM jump if not 02A5B 60000412 0 992 LD R0 CPPSA get pointer to PSA 02A5C 60881F11 2 0 ZBM 993 LD R2 R0,PSCACHNP1 point R2 to the registers 994 * \ / 995 996 ********************************************************************************** 997 * * 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 469 (DISPATCH) F 28 Dispatcher 998 * We come here for serious problems affecting control mode. * 999 * R0 points to the users PSA, R1 contains the error code that * 1000 * we were trying to inflict, and R2 points to the console * 1001 * area for control mode. * 1002 * The major types of things that seem to come here are the * 1003 * following... * 1004 * 1) virtual memory failure. Check for out of disk space. * 1005 * Check for memory parity errors. Check for read errors * 1006 * in the file System.!!!:Cm.Code (or ExpCm, or OldCm). * 1007 * 2) a user may have found a bug in CM. Examine the registers * 1008 * and the relevant code in CM to see if this is the case. * 1009 * * 1010 * In order to restart the system, you must be able to fix * 1011 * the registers (pointed to by R2) so that control mode will not * 1012 * encounter a repeat of the problem. If this is possible, you * 1013 * may continue from here (GO). * 1014 * Please note that a crashdump will quite often not contain * 1015 * enough information to see what control mode was doing, since * 1016 * the virtual memory of CM will not be dumped. * 1017 * * 1018 ********************************************************************************** 1019 1020 * \ / 02A5D 00031200 1021 HALT HALTC1200 stop with code in R1 1022 * \ / 02A5E FE0E2A49 1023 JMP UERECOVER ignore error 1024 * --- 1025 1026 ********************************************************************************** 1027 * * 1028 * Not a control mode error, so it must be the failure of * 1029 * a system support process. For now, do nothing intelligent, * 1030 * but someday do a log, restart, and recover. * 1031 * * 1032 ********************************************************************************** 1033 00002A5F 1034 UERRNCM LABEL 02A5F 00031201 1035 HALT HALTC1201 stop with code in R1 1036 * --- 1037 1038 ********************************************************************************** 1039 * * 1040 * We have a condition where we need to pass this error to * 1041 * someone other than our immediate overprocess. We have the * 1042 * process serial number of the process to pass control to. * 1043 * Our search starts at the very top to make sure we check * 1044 * every possible UPC. If we don't find the process to pass * 1045 * the error we clear the UPCERRPSN field and pass the error * 1046 * to our immediate overprocess. * 1047 * * 1048 ********************************************************************************** 1049 00002A60 1050 PASS2PROC LABEL 02A60 60800412 2 1051 LD R2 CPPSA pointer to the current PSA 02A61 DC008805 1052 CALL SRCHPSNM look for the process to pass the error up to 02A62 41524000 1 REG 1053 PARV R1 process serial number we need to find 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 470 (DISPATCH) F 28 Dispatcher 02A63 40489F15 2 ZBM 1054 PARVL R2,PSPROCLIST start at the top 02A64 6012C000 0 3 REG 1055 LD R0 R3 make room in R3 02A65 60C00414 3 1056 LD R3 CPCUPC restore R3 02A66 FA302A6B 0 1057 JZA R0 CLRERRPROC clear the error process serial number field 02A67 DC003330 1058 CALL OVPDOWNONE move up in the process tree 02A68 40520000 0 REG 1059 PARVL R0 pass UPC address from search 02A69 FEC00000 1060 NOP 0 how can we miss? 02A6A FE0E2A3D 1061 JMP GIVEXREQER found the guy to take care of matters 1062 * --- 1063 00002A6B 1064 CLRERRPROC LABEL 02A6B 60000414 0 1065 LD R0 CPCUPC get the current UPC pointer 02A6C EC081378 0 ZBM 1066 STZ R0,UPCERRPSN our error handler has disappeared 02A6D FE0E2A38 1067 JMP INVISPROC move to another overprocess 1068 * --- 1069 1070 ********************************************************************************** 1071 * * 1072 * An error is being passed to a higher program level and that * 1073 * upper level does not exist. If the reason entry is for the * 1074 * initial job creation, then we place a control mode in its * 1075 * place. * 1076 * Break (and possibly other errors such as operator * 1077 * termination) may come here if CM hasn't had a chance to * 1078 * set up trap processing yet (the first few milliseconds * 1079 * after it is created). * 1080 * Anything else is an error. * 1081 * * 1082 ********************************************************************************** 1083 02A6E 53413FF9 1084 RADCM PAK12 CONTROL_MODE 1085 00002A70 1086 UERRCMMK LABEL 02A70 604946A0 1 5 ZBM 1087 LD R1 R5,UERCODE get the code for the error 02A71 64440020 1 IMM 1088 CPR R1 UINTBREAK check for a break request 02A72 FE022A49 1089 JEQ UERECOVER jump if CM hasn't yet set up trap processing 02A73 6444007F 1 IMM 1090 CPR R1 UINTLOGIN check for initial entry 02A74 FE0C2A58 1091 JNE UERRNINIT jump if not 1092 * \ / 1093 1094 * make a copy of the control mode virtual memory list 02A75 60C01ECC 3 1095 LD R3 CMODEVP points to CM virtual memory list 02A76 61040000 4 IMM 1096 LD R4 0 R4 will point to the list we build 00002A77 1097 UERRCMVPP LABEL 02A77 DC002F0A 1098 CALL VGETMEM fetch a new VP element 02A78 40440002 IMM 1099 PARVL VPLOG indicate its length 1100 02A79 60840003 2 IMM 1101 LD R2 VPAGELNTH-1 get length of element 00002A7A 1102 UERRCMVP LABEL 02A7A 605CD000 1 32 BASE 1103 LD R1 R3,0(R2) get the original data 02A7B E45C1000 1 02 BASE 1104 ST R1 R0,0(R2) build a copy of the VM element 02A7C FAA62A7A 2 1105 JDR R2 UERRCMVP loop for its length 1106 * \ / 1107 02A7D E5081F10 4 0 ZBM 1108 ST R4 R0,VPLINK place it at the end of the created list 02A7E 61120000 4 0 REG 1109 LD R4 R0 we now point to this element 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 471 (DISPATCH) F 28 Dispatcher 02A7F FAF62A77 3 1110 LJNA R3 UERRCMVPP traverse original list until all copied 1111 * \ / 1112 02A80 60000414 0 1113 LD R0 CPCUPC get the current UPC pointer 02A81 E516080D 4 0 BASE 1114 ST R4 R0,UPCVMLIST the list we built is the VM list 1115 1116 * set process name and CM identifier 02A82 62402A6E 12 1117 LD2 R1 RADCM name of Control Mode 02A83 E6560809 120 BASE 1118 ST2 R1 R0,UPCPROCNM set initial process name 02A84 EDC80610 0 ZBM 1119 STW R0,UPCNTLMODE say we are in Control Mode 1120 1121 * flag session as "in Control Mode" 02A85 60C00412 3 1122 LD R3 CPPSA get pointer to PSA 02A86 EDC8D214 3 ZBM 1123 STW R3,PSCNTLMODE non-virtual CM semaphore 1124 1125 * set up the console area from CCB prototype 02A87 6088DF11 2 3 ZBM 1126 LD R2 R3,PSCACHNP1 get pointer to CA 02A88 60001ECD 0 1127 LD R0 CMODECA get prototype CA for CM 02A89 60481F10 1 0 ZBM 1128 LD R1 R0,CAPC get address of control mode start 02A8A 10440001 1 IMM 1129 SUB R1 1 account for XREQRETURN increment 02A8B E4489F10 1 2 ZBM 1130 ST R1 R2,CAPC set start address 1131 02A8C 38160802 0 0 BASE 1132 LEA R0 R0,CAR0 get first of user registers 02A8D 60440028 1 IMM 1133 LD R1 CANUMUREGS*CPW get total size thereof 02A8E 38968802 2 2 BASE 1134 LEA R2 R2,CAR0 get destination in fetal CMs CA 02A8F FE400000 1135 CMOVE transfer our knowledge 1136 1137 * log the logon, if appropriate 02A90 6108DF13 4 3 ZBM 1138 LD ULB R3,PSUSERLIMP ULB => logged on account 02A91 65001EAE 4 1139 CPR ULB SYSTEMULB are we logged on 02A92 FE022AA2 1140 JEQ NOTLOGGED jump if not 02A93 604949C1 1 5 ZBM 1141 LD R1 R5,UERPARAM/CMENTRYCD get entry code 02A94 64440004 1 IMM 1142 CPR R1 CMCONCP concurrent process creation? 02A95 FE022AA4 1143 JEQ ACCTCONC jump if so 1144 * \ / 02A96 DC00505F 1145 CALL ACCOUNT log the logon 02A97 41440002 IMM 1146 PARV APTON type code 02A98 41440028 IMM 1147 PARV AFRSIZE long record size 02A99 40491A57 4 ZBM 1148 PARVL ULB,ULLOGSPOT place to give logging info to 1149 * \ / 1150 00002A9A 1151 JOINLOGON LABEL 02A9A 60800412 2 1152 LD R2 CPPSA R2 -> PSA of current process 02A9B DC405C0D 1153 CALLNP ACCTPSA put this info into record 02A9C DC405C1E 1154 CALLNP ACCTULB in goes the ULB stuff 02A9D DC405025 1155 CALLNP ACCTQUE send it to be queued 1156 * \ / 1157 02A9E 60000412 0 1158 LD R0 CPPSA process status area 02A9F 61081F14 4 0 ZBM 1159 LD ULB R0,PSDFLTDIR ULB => alias account 02AA0 DC005C2A 1160 CALL ACCTALIAS log the alias 02AA1 40440004 IMM 1161 PARVL APTALIAS type code 1162 * \ / 1163 00002AA2 1164 NOTLOGGED LABEL 02AA2 60C00414 3 1165 LD R3 CPCUPC get "UPC having error" 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 472 (DISPATCH) F 28 Dispatcher 02AA3 FE0E2A3D 1166 JMP GIVEXREQER set Control Mode going 1167 * --- 1168 00002AA4 1169 ACCTCONC LABEL 02AA4 DC00505F 1170 CALL ACCOUNT log the logon 02AA5 4144000A IMM 1171 PARV APTCONCP type code 02AA6 4144001C IMM 1172 PARV AFRSHORT short record size 02AA7 40491A57 4 ZBM 1173 PARVL ULB,ULLOGSPOT place to give logging info to 02AA8 FE0E2A9A 1174 JMP JOINLOGON 1175 * --- 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 473 (DISPATCH) F 28 Dispatcher 1177 1178 ********************************************************************************** 1179 * * 1180 * DELINKUERR. Remove the given error element from the * 1181 * list of the specified root. Resets RTVERYBADB, as * 1182 * necessary. * 1183 * * 1184 * Call: CPPSA locked! * 1185 * LD R4 * 1186 * LD R5 * 1187 * CALLNP DELINKUERR * 1188 * * 1189 * Eats R0,R1 * 1190 * Stack Usage = 1 * 1191 * * 1192 ********************************************************************************** 1193 1194 BLOCK DELINKUERR subroutine 1195 1196 ENTRY DELINKUERR 1197 1198 BEGFRAME 1199 ENDFRAME 1200 02AA9 DD5F8001 6 STAK 1201 DELINKUERR ENTRNP PUSH 02AAA 60130000 0 4 REG 1202 LD R0 R4 copy of root address 02AAB 3D481F10 5 0 ZBM 1203 LSRCH R5 R0,UERLINK find previous 02AAC 60495F10 1 5 ZBM 1204 LD R1 R5,UERLINK => next 02AAD E4481F10 1 0 ZBM 1205 ST R1 R0,UERLINK delink 02AAE 60091F10 0 4 ZBM 1206 LD R0 R4,0/FLDADRS => first element 02AAF 60440001 1 IMM 1207 LD R1 1 flag for bad 02AB0 3C480210 1 0 ZBM 1208 LSRCH R1 R0,UERVERYBAD look for evil 02AB1 EC491C10 4 ZBM 1209 STLEQ R4,0/RTVERYBADB save answer 02AB2 5D1F8001 6 STAK 1210 LEAVE POP return 1211 * --- 1212 1213 END DELINKUERR subroutine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 474 (DISPATCH) F 28 Dispatcher 1215 1216 ********************************************************************************** 1217 * * 1218 * * 1219 * GETTRAPPER. This routine scans the given UPC and up * 1220 * through its parents to find the first UPC, if any, that * 1221 * is interested in the specified error (i.e. has * 1222 * the corresponding IMR bit turned on). Since the status * 1223 * of "unit interrupt enable" on the absolute I/O terminal * 1224 * can vary from underprocess to underprocess, we must * 1225 * check the controlling UPCNETINTE bit if the error is * 1226 * from such a unit. * 1227 * * 1228 * There are 3 possibilities: * 1229 * * 1230 * 1) No one is trapping the error, or the error * 1231 * is untrappable. * 1232 * 2) A UPC is trapping the error, but has * 1233 * interrupts in general disabled. * 1234 * 3) A UPC is trapping the error, and has * 1235 * interrupts in general enabled. * 1236 * * 1237 * In case 1, we return 0, take normal return. * 1238 * In case 2, we return the trapper's UPC, take the * 1239 * normal return. * 1240 * In case 3, we return the trapper's UPC, take the * 1241 * skip return. * 1242 * * 1243 * Call: LD R2 * 1244 * CALLNP GETTRAPPER * 1245 * PARV error code * 1246 * PARVL subcode * 1247 * JMP * 1248 * * 1249 * * 1250 * Eats R0:R1 * 1251 * Sets R2 * 1252 * Stack usage = 3 * 1253 * * 1254 ********************************************************************************** 1255 1256 BLOCK GETTRAPPER subroutine 1257 1258 ENTRY GETTRAPPER 1259 1260 BEGFRAME 00000010 BYTE 1261 IBIT EQU BIT 0 whether to check unit interrupt enable 00000210 BYTE 1262 UBIT EQU BIT 1 whether to check for unit existence 00178801 6 BASE 1263 ECODE BSS 1 code for error 00178802 6 BASE 1264 SCODE BSS 1 subcode for error 1265 ENDFRAME 1266 02AB3 DD1F8003 6 STAK 1267 GETTRAPPER ENTR PUSH 02AB4 C1578801 6 BASE 1268 STPV SP,ECODE save error code 02AB5 C0578802 6 BASE 1269 STPVL SP,SCODE save subcode 02AB6 60178801 0 6 BASE 1270 LD R0 SP,ECODE get the error code 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 475 (DISPATCH) F 28 Dispatcher 02AB7 68040080 0 IMM 1271 UCPR R0 LASTINTC is it in range? 02AB8 FE062ADF 1272 JGE ZRETURN jump if not 02AB9 60702AF5 1 0 @ 1273 LD R1 @INTMASKB(R0) R1 = IMR bit number (see below box) 02ABA FA422ADF 1 1274 JEQZ R1 ZRETURN jump if untrappable 1275 * \ / 1276 1277 ********************************************************************************** 1278 * * 1279 * See whether to check unit int enable. SCCONPTR points to bit array * 1280 * indexed by UINT code yielding whether interrupt subcode is an FCB * 1281 * address (which we convert to unit number). We use it to decide * 1282 * whether int enable applies to the UINT in R0. Not all "unit * 1283 * interrupts" are controlled by int enable (namely, UINTTDISC and * 1284 * UINTCHAIN). The check is valid, however, since we have already * 1285 * ensured that R0 is not a code that can be trapped (with the above * 1286 * @INTMASKB(R0) check). The implication, therefore, is that all * 1287 * trappable ints with an FCB for a subcode are controllable by the * 1288 * unit interrupt enable flag. If this ever changes, the cheap check * 1289 * below will have to be reworked. * 1290 * * 1291 ********************************************************************************** 1292 1293 * \ / 02ABB EC0BC020 7 CBM 1294 STZ R7/(IBIT+UBIT) clear checking flags 02ABC 5C3034E9 0 @ 1295 CMZ @SCCONPTR(R0) cheap check for FCB subcode 02ABD FE022AC8 1296 JEQ LOOKHERE jump if not unit interrupt 02ABE 60178802 0 6 BASE 1297 LD R0 SP,SCODE get FCB address 02ABF 5C082015 0 ZBM 1298 CMZ R0,FCABSIO absolute I/O unit? 02AC0 EC4BC210 7 CBM 1299 STLEQ R7/UBIT save answer 02AC1 FE022AC8 1300 JEQ LOOKHERE jump if not 02AC2 60082665 0 0 ZBM 1301 LD R0 R0,FCHTYPE get type 02AC3 64040007 0 IMM 1302 CPR R0 HTYPETERM terminal I/O? 02AC4 EC4BC010 7 CBM 1303 STLEQ R7/IBIT 1 sez check, 0 sez don't 02AC5 FE0E2AC8 1304 JMP LOOKHERE start looking 1305 * --- 1306 1307 * loop to find an interested UPC 00002AC6 1308 LOOKLOOP LABEL 02AC6 60889F17 2 2 ZBM 1309 LD R2 R2,UPCDADPTR get next one up 02AC7 FAB02AE0 2 1310 JZA R2 RETURN jump if no more to check 1311 * \ / 1312 00002AC8 1313 LOOKHERE LABEL 02AC8 60089F12 0 2 ZBM 1314 LD R0 R2,UPCCONSOLE => console area 02AC9 5C16080A 0 BASE 1315 CMZ R0,CAINTADR have a vector yet? 02ACA FE022AC6 1316 JEQ LOOKLOOP jump if not 02ACB 3808001B 0 0 ZBM 1317 LEA R0 R0,CAINTMASK/BIT 0 R0 => enable bit array 02ACC 5C1A0C00 01 @R 1318 CMZ @R0(R1) type enabled? 02ACD FE022AC6 1319 JEQ LOOKLOOP jump if not 02ACE F7C22AD5 7 1320 JBT R7/UBIT MUSTHAVEIT jump to check for unit 02ACF F3C02AD2 7 1321 JBF R7/IBIT AFTERCK skip INTE check 02AD0 5C089011 2 ZBM 1322 CMZ R2,UPCNETINTE ints allowed on abs I/O? 02AD1 FE022AC6 1323 JEQ LOOKLOOP jump if not 1324 * \ / 1325 1326 * R2 has trapping UPC 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 476 (DISPATCH) F 28 Dispatcher 00002AD2 1327 AFTERCK LABEL 02AD2 5C160400 0 @R 1328 CMZ @R0 interrupts enabled? 02AD3 FE022AE0 1329 JEQ RETURN jump if errors held off for now 1330 * \ / 1331 02AD4 FBE02AE0 7 1332 IRJ R7 RETURN take skip 1333 * --- 1334 1335 ********************************************************************************** 1336 * Error is for a logical unit (FCB address in ECODE). Make * 1337 * sure the UPC in R2 can see this FCB (else, unit is local * 1338 * to another process). We already know FCB is not FCABSIO, * 1339 * so our "found" logic jumps right to AFTERCK without looking * 1340 * at IBIT. * 1341 ********************************************************************************** 1342 00002AD5 1343 MUSTHAVEIT LABEL 02AD5 E0178802 0 6 BASE 1344 EXCH R0 SP,SCODE save pointer, get FCB address 02AD6 60489F15 1 2 ZBM 1345 LD R1 R2,UPCUNITS get local UCE list 02AD7 3C085F11 0 1 ZBM 1346 LSRCH R0 R1,UCEFCB scan it 02AD8 FE022ADD 1347 JEQ HAVEIT jump if found as local unit 02AD9 60400413 1 1348 LD R1 CMAPPSA else, get session 02ADA 60486316 1 1 ZBM 1349 LD R1 R1,PSUNITS to get global UCE list 02ADB 3C085F11 0 1 ZBM 1350 LSRCH R0 R1,UCEFCB scan it 02ADC FE0C2AC6 1351 JNE LOOKLOOP jump if unit inaccessible 00002ADD 1352 HAVEIT LABEL 02ADD 60178802 0 6 BASE 1353 LD R0 SP,SCODE restore pointer 02ADE FE0E2AD2 1354 JMP AFTERCK check other things 1355 * --- 1356 00002ADF 1357 ZRETURN LABEL 02ADF 60840000 2 IMM 1358 LD R2 0 say no UPC at all 00002AE0 1359 RETURN LABEL 02AE0 5D1F8003 6 STAK 1360 LEAVE POP 1361 * --- 1362 END GETTRAPPER subroutine 1363 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 477 (DISPATCH) F 28 Dispatcher 1365 1366 ********************************************************************************** 1367 * * 1368 * Table of bit numbers in the interrupt arming register as * 1369 * indexed by the error code. ZAP (zero) means that the error * 1370 * always is processed. Good for values 0:07F. * 1371 * * 1372 ********************************************************************************** 1373 00000000 ABS 1374 ZAP EQU 0 02AE0 00000000 1375 INTMASKBT VFD 5:ZAP 000 - illegal code, pass up 02AE0 00000001 1376 VFDB 5:CAIMINST 001 - undefined opcode 02AE0 00000001 1377 VFDB 5:CAIMINST 002 - undefined address mode 02AE0 00000001 1378 VFDB 5:CAIMINST 003 - illegal addr. mode for store 02AE0 00000001 1379 VFDB 5:CAIMINST 004 - undefined addr. mode in pointer 02AE0 00000001 1380 VFDB 5:CAIMINST 005 - unassigned error code 02AE1 00000001 1381 VFDB 5:CAIMINST 006 - illegal addr. mode for instruction 02AE1 00000001 1382 VFDB 5:CAIMINST 007 - execute target illegal 02AE1 00000002 1383 VFDB 5:CAIMCALL 008 - CALL/ENTR mismatch 02AE1 00000002 1384 VFDB 5:CAIMCALL 009 - PAR/STP mismatch 02AE1 00000000 1385 VFDB 5:ZAP 00A - ION/IOFF overflow/underflow 02AE1 00000001 1386 VFDB 5:CAIMINST 00B - unimplemented instruction 02AE2 00000004 1387 VFDB 5:CAIMCKBDS 00C - check bounds failure 02AE2 00000003 1388 VFDB 5:CAIMARITH 00D - undefined number or illegal data type 02AE2 00000001 1389 VFDB 5:CAIMINST 00E - stack overflow 02AE2 00000003 1390 VFDB 5:CAIMARITH 00F - decimal overflow 02AE2 00000003 1391 VFDB 5:CAIMARITH 010 - arithmetic overflow 02AE2 00000003 1392 VFDB 5:CAIMARITH 011 - divide by zero 02AE2 00000003 1393 VFDB 5:CAIMARITH 012 - fixing overflow positive 02AE3 00000003 1394 VFDB 5:CAIMARITH 013 - fixing overflow negative 02AE3 00000003 1395 VFDB 5:CAIMARITH 014 - floating overflow negative 02AE3 00000003 1396 VFDB 5:CAIMARITH 015 - floating underflow negative 02AE3 00000003 1397 VFDB 5:CAIMARITH 016 - floating overflow positive 02AE3 00000003 1398 VFDB 5:CAIMARITH 017 - floating underflow positive 02AE3 00000003 1399 VFDB 5:CAIMARITH 018 - reference to undefined number 02AE5 00000000 1400 VFDB 5:ZAP,ZAP,ZAP,ZAP,ZAP,ZAP,ZAP 019-01F 02AE5 00000009 1401 VFDB 5:CAIMBREAK,ZAP,CAIMNETERM,CAIMNEPATH 020-023 02AE6 0000000D 1402 VFDB 5:ZAP,CAIMTIME,CAIMMSG,CAIMABORT 024-027 02AE7 00000000 1403 VFDB 5:CAIMGUNIT,ZAP,ZAP,ZAP,ZAP,ZAP,ZAP,ZAP 028-02F 02AE8 00000000 1404 VFDB 5:ZAP,ZAP,ZAP,ZAP,ZAP,ZAP,ZAP,ZAP 030-037 02AEA 00000000 1405 VFDB 5:ZAP,ZAP,ZAP,ZAP,ZAP,ZAP,ZAP,ZAP 038-03F 02AEB 00000000 1406 VFDB 5:ZAP,ZAP,ZAP,ZAP,ZAP,ZAP,ZAP,ZAP 040-047 02AEC 00000000 1407 VFDB 5:ZAP,ZAP,ZAP,ZAP,ZAP,ZAP,ZAP,ZAP 048-04F 02AED 00000000 1408 VFDB 5:ZAP,ZAP,ZAP,ZAP,ZAP,ZAP,ZAP,ZAP 050-057 02AEF 00000000 1409 VFDB 5:ZAP,ZAP,ZAP,ZAP,ZAP,ZAP,ZAP,ZAP 058-05F 02AF0 00000000 1410 VFDB 5:ZAP,ZAP,ZAP,ZAP,ZAP,ZAP,ZAP,ZAP 060-067 02AF1 00000000 1411 VFDB 5:ZAP,ZAP,ZAP,ZAP,ZAP,ZAP,ZAP,ZAP 068-06F 02AF2 00000000 1412 VFDB 5:CAIMVMF,CAIMVMF,CAIMVMF,ZAP 070-073 02AF2 00000000 1413 VFDB 5:CAIMMPV,ZAP,ZAP,ZAP 074-077 02AF4 00000000 1414 VFDB 5:ZAP,ZAP,ZAP,ZAP,ZAP,ZAP,ZAP,ZAP 078-07F 1415 BSS 0 00000080 ABS 1416 LASTINTC EQU 080 codes above this are all ZAP 1417 02AF5 01482AE1 1418 INTMASKB PTR INTMASKBT pointer to above table 1419 1420 ********************************************************************************** 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 478 (DISPATCH) F 28 Dispatcher 1421 * * 1422 * Table of booleans indicating the association of interrupt * 1423 * codes with either the PSA or the UPC, indexed by error code. * 1424 * 0 means interrupt goes on session, 1 means interrupt goes * 1425 * on process. Good for values 0:07F * 1426 * * 1427 ********************************************************************************** 1428 00000000 ABS 1429 SINT EQU 0 sez error belongs on PSA 00000001 ABS 1430 PINT EQU 1 sez error belongs on UPC 1431 02AF5 00000001 1432 INTASSOCBT VFDB SINT,PINT,PINT,PINT,PINT,SINT,PINT,PINT 000:007 02AF5 00000001 1433 VFDB PINT,PINT,PINT,PINT,PINT,PINT,PINT,PINT 008:00F 02AF5 00000001 1434 VFDB PINT,PINT,PINT,PINT,PINT,PINT,PINT,PINT 010:017 02AF6 00000001 1435 VFDB PINT,PINT,PINT,PINT,PINT,PINT,PINT,PINT 018:01F 02AF6 00000000 1436 VFDB SINT,SINT,SINT,SINT,SINT,SINT,SINT,SINT 020:027 02AF6 00000001 1437 VFDB SINT,PINT,PINT,PINT,PINT,PINT,PINT,PINT 028:02F 02AF6 00000001 1438 VFDB PINT,PINT,PINT,PINT,PINT,PINT,PINT,PINT 030:037 02AF7 00000001 1439 VFDB PINT,PINT,PINT,PINT,PINT,PINT,PINT,PINT 038:03F 02AF7 00000001 1440 VFDB PINT,PINT,PINT,PINT,PINT,PINT,PINT,PINT 040:047 02AF7 00000001 1441 VFDB PINT,PINT,PINT,PINT,PINT,PINT,PINT,PINT 048:04F 02AF7 00000001 1442 VFDB PINT,PINT,PINT,PINT,PINT,PINT,PINT,PINT 050:057 02AF8 00000001 1443 VFDB PINT,PINT,PINT,PINT,PINT,PINT,PINT,PINT 058:05F 02AF8 00000001 1444 VFDB PINT,PINT,PINT,PINT,PINT,PINT,PINT,PINT 060:067 02AF8 00000001 1445 VFDB PINT,PINT,PINT,PINT,PINT,PINT,PINT,PINT 068:06F 02AF8 00000001 1446 VFDB PINT,PINT,PINT,PINT,PINT,SINT,PINT,PINT 070:077 02AF9 00000000 1447 VFDB PINT,PINT,SINT,PINT,PINT,SINT,PINT,SINT 078:07F 02AFA 00482AF6 1448 INTASSOCB PTR INTASSOCBT mouse pointer to table 1449 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 479 (DISPATCH) F 28 Dispatcher 1451 1452 ********************************************************************************** 1453 * * 1454 * This is where the system process are started. * 1455 * Only one process at a time is started because it takes * 1456 * much less code to do it this way. Basically we call * 1457 * BLDPROCESS to begin, from there the process consumes its * 1458 * respective list of elements (see COREDEFS). All the system * 1459 * processes run until no more work is required of them. * 1460 * * 1461 ********************************************************************************** 1462 00002AFB 1463 DODISMNT LABEL 02AFB 61441D8A 5 IMM 1464 LD R5 ADR DMNTLOCK pointer to the accounting control block 02AFC FE0E2B05 1465 JMP STARTPROC go share some code 1466 * --- 1467 00002AFD 1468 DOACCTNG LABEL 02AFD 61441D99 5 IMM 1469 LD R5 ADR APLOCK pointer to the accounting control block 02AFE FE0E2B05 1470 JMP STARTPROC go share some code 1471 * --- 1472 00002AFF 1473 DOFREEFL LABEL 02AFF D0001D82 1474 INC FFPROCS count another free file process created 02B00 61441D7A 5 IMM 1475 LD R5 ADR FFLOCK pointer to the free filer control block 02B01 FE0E2B05 1476 JMP STARTPROC go share some code 1477 * --- 1478 00002B02 1479 DOADT LABEL 02B02 61441D83 5 IMM 1480 LD R5 ADR PADTLOCK pointer to the ADT control block 02B03 FE0E2B05 1481 JMP STARTPROC go share some code 1482 * --- 1483 00002B04 1484 DOERRLOG LABEL 02B04 61441D91 5 IMM 1485 LD R5 ADR ERRLOGLOCK pointer to the error log control block 1486 * \ / 1487 00002B05 1488 STARTPROC LABEL 02B05 DC0035D2 1489 CALL BLDPROCESS build the process 02B06 4144F1F0 IMM 1490 PARV MONMSR initial MSR value 02B07 43574803 5 BASE 1491 PARV2 R5,FFCPCNAME name of the process 02B08 41574805 5 BASE 1492 PARV R5,FFCPCPC the initial PC value 02B09 40440001 IMM 1493 PARVL 1 indicate a system process 02B0A DC402B99 1494 CALLNP SETRUNNING put it in the runnable queue 1495 * Interrupts had better be off here! 02B0B DC0025EB 1496 CALL MAPINMEM re-map original caller, if any 02B0C 40400412 1497 PARVL CPPSA pointer to his PSA 02B0D FE0E28B7 1498 JMP DISPATCH off to run the next guy 1499 * --- 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 480 (DISPATCH) F 28 Dispatcher 1501 1502 ********************************************************************************** 1503 * * 1504 * This routine is called to rebalance the number of * 1505 * pages on the wholepage list. The number of pages we * 1506 * need/release is determined by the FSXCOUNT word. If * 1507 * negative we get pages from the idle list, if positive * 1508 * we return pages to the idle list. BEWARE deadlocks!!! * 1509 * This routine may need to lock the idle list lock * 1510 * (PPIDLOCK). * 1511 * * 1512 * Eats R0:R1, PPL * 1513 * Stack required = 2 * 1514 * 1 + max ( GETIDLE (1), LOCKWAIT (0), PUTIDLE (1) ). * 1515 * * 1516 ********************************************************************************** 1517 1518 BLOCK FSXPAND subroutine 1519 ENTRY FSXPAND 1520 1521 BEGFRAME 1522 ENDFRAME 1523 02B0E DD5F8001 6 STAK 1524 FSXPAND ENTRNP PUSH 1525 * \ / 1526 00002B0F 1527 ADJUSTFSX LABEL 02B0F 5C001C7A 1528 CMZ FSXCOUNT examine the excess count 02B10 FE022B2E 1529 JEQ ADJUSTTAKE jump if on target 02B11 FE082B20 1530 JLT FSXGETIDLE jump if deficient 1531 * \ / 1532 1533 ********************************************************************************** 1534 * * 1535 * We have more pages in the wholepage list than we really * 1536 * need. What we do is take the PPLs off the WHOLEPAGE list and * 1537 * place them onto the PPIDLE list. * 1538 * * 1539 ********************************************************************************** 1540 1541 * \ / 02B12 5C001C79 1542 CMZ WHOLEPAGE check if any pages to free 02B13 FE022B2E 1543 JEQ ADJUSTTAKE jump if someone else got to them 1544 PLOCK WPAGELOCK grab lock to the free storage lists 02B14 0CC00000 1544 IOFF 02B15 D1C01C78 1544 SETT WPAGELOCK 02B16 FE0C2B18 1544 JNE MA(2+DISPW MA 0) 02B17 DC40308B 1544 CALLNP LOCKWAIT 02B18 61001C79 4 1545 LD PPL WHOLEPAGE head pointer of the WHOLEPAGE list 02B19 60091F10 0 4 ZBM 1546 LD R0 PPL,PPLINK get the next PPL in the list 02B1A E4001C79 0 1547 ST R0 WHOLEPAGE remove this one from the list 1548 PUNLOCK WPAGELOCK release lock to the free storage lists 02B1B EC001C78 1548 STZ WPAGELOCK 02B1C 0C800000 1548 ION 02B1D D0401C7A 1549 DEC FSXCOUNT say we removed one page 02B1E DC402D51 1550 CALLNP PUTIDLE put free storage idle page onto idle list 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 481 (DISPATCH) F 28 Dispatcher 02B1F FE0E2B0F 1551 JMP ADJUSTFSX back to check for more adjustment 1552 * --- 1553 1554 ********************************************************************************** 1555 * * 1556 * We need more pages in the WHOLEPAGE list. What we do * 1557 * is get one from the IDLE page list and place it onto the * 1558 * WHOLEPAGE list. The free storage managers will use it as * 1559 * needed. * 1560 * If no idle page is available, we just go away. The * 1561 * goody that frees up idle pages checks FSXCOUNT and makes * 1562 * sure that we will run when an idle page becomes available. * 1563 * * 1564 ********************************************************************************** 1565 00002B20 1566 FSXGETIDLE LABEL 02B20 DC402D1C 1567 CALLNP GETIDLE call for an idle page 02B21 FE0E2B32 1568 JMP FSXDONE no more idle pages left 1569 PLOCK WPAGELOCK lock the whole page list 02B22 0CC00000 1569 IOFF 02B23 D1C01C78 1569 SETT WPAGELOCK 02B24 FE0C2B26 1569 JNE MA(2+DISPW MA 0) 02B25 DC40308B 1569 CALLNP LOCKWAIT 02B26 EC170801 4 BASE 1570 STZ PPL,PPBLOCK indicate nothing here anymore 02B27 60001C79 0 1571 LD R0 WHOLEPAGE head pointer to the free whole page list 02B28 E4091F10 0 4 ZBM 1572 ST R0 PPL,PPLINK this guy now points to the first element 02B29 E5001C79 4 1573 ST PPL WHOLEPAGE presto, we are now the head element 1574 PUNLOCK WPAGELOCK release the whole page list 02B2A EC001C78 1574 STZ WPAGELOCK 02B2B 0C800000 1574 ION 02B2C D0001C7A 1575 INC FSXCOUNT indicate we just added a whole page 02B2D FE0E2B0F 1576 JMP ADJUSTFSX go check for further developments 1577 * --- 1578 1579 * Free space expansion is done. See if pages should be taken 1580 * out of service. 00002B2E 1581 ADJUSTTAKE LABEL 02B2E 60001EA3 0 1582 LD R0 TAKENUM how many pages should be out of service 02B2F 64001EA4 0 1583 CPR R0 TAKECOUNT see if that many has been taken 02B30 FE082B33 1584 JLT GIVEBACK to many have been taken, return some 02B31 FE042B3F 1585 JGT TAKEMORE need more pages removed 00002B32 1586 FSXDONE LABEL 00002B32 1587 TAKEDONE LABEL 02B32 5D1F8001 6 STAK 1588 LEAVE POP a job well done 1589 * --- 1590 1591 ********************************************************************************** 1592 * * 1593 * More pages are taken out of service than is desired. * 1594 * Return some of them back to active service. * 1595 * * 1596 ********************************************************************************** 1597 00002B33 1598 GIVEBACK LABEL 1599 PLOCK TAKELOCK grab lock to take list 02B33 0CC00000 1599 IOFF 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 482 (DISPATCH) F 28 Dispatcher 02B34 D1C01EA1 1599 SETT TAKELOCK 02B35 FE0C2B37 1599 JNE MA(2+DISPW MA 0) 02B36 DC40308B 1599 CALLNP LOCKWAIT 02B37 61001EA2 4 1600 LD PPL TAKELIST head pointer of the TAKE list 02B38 60091F10 0 4 ZBM 1601 LD R0 PPL,PPLINK get the next PPL in the list 02B39 E4001EA2 0 1602 ST R0 TAKELIST remove this one from the list 1603 PUNLOCK TAKELOCK release lock 02B3A EC001EA1 1603 STZ TAKELOCK 02B3B 0C800000 1603 ION 02B3C D0401EA4 1604 DEC TAKECOUNT say we removed one page 02B3D DC402D51 1605 CALLNP PUTIDLE put free storage idle page onto idle list 02B3E FE0E2B2E 1606 JMP ADJUSTTAKE back to check for more adjustment 1607 * --- 1608 1609 ********************************************************************************** 1610 * * 1611 * We want to take some more pages out of system usage. * 1612 * We call GETIDLE to pick up pages and if there are not * 1613 * enough just go away. Next time an idle page is added * 1614 * things get set to return us to here. * 1615 * * 1616 ********************************************************************************** 1617 00002B3F 1618 TAKEMORE LABEL 02B3F DC402D1C 1619 CALLNP GETIDLE call for an idle page 02B40 FE0E2B32 1620 JMP TAKEDONE no more idle pages left 1621 PLOCK TAKELOCK 02B41 0CC00000 1621 IOFF 02B42 D1C01EA1 1621 SETT TAKELOCK 02B43 FE0C2B45 1621 JNE MA(2+DISPW MA 0) 02B44 DC40308B 1621 CALLNP LOCKWAIT 02B45 EC170801 4 BASE 1622 STZ PPL,PPBLOCK indicate nothing here anymore 02B46 60001EA2 0 1623 LD R0 TAKELIST head pointer to the free whole page list 02B47 E4091F10 0 4 ZBM 1624 ST R0 PPL,PPLINK this guy now points to the first element 02B48 E5001EA2 4 1625 ST PPL TAKELIST presto, we are now the head element 1626 PUNLOCK TAKELOCK release the whole page list 02B49 EC001EA1 1626 STZ TAKELOCK 02B4A 0C800000 1626 ION 02B4B D0001EA4 1627 INC TAKECOUNT indicate we just added a whole page 02B4C FE0E2B2E 1628 JMP ADJUSTTAKE go check for further developments 1629 * --- 1630 1631 END FSXPAND subroutine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 483 (DISPATCH) F 28 Dispatcher 1633 1634 ********************************************************************************** 1635 * * 1636 * Routine that is called on a clock interrupt to set * 1637 * process switching. PSLOCK must be held since there are * 1638 * other fields in PSUERROR that are changed by other * 1639 * interrupt routines. * 1640 * * 1641 * CALLNP SETSWITCH * 1642 * * 1643 * Registers Used: R0:R1 * 1644 * Stack required = 1 * 1645 * 1 + max ( LOCKWAIT (0) ). * 1646 * * 1647 ********************************************************************************** 1648 1649 BLOCK SETSWITCH subroutine 1650 ENTRY SETSWITCH 1651 1652 BEGFRAME 1653 ENDFRAME 1654 02B4D DD5F8001 6 STAK 1655 SETSWITCH ENTRNP PUSH 02B4E 60400412 1 1656 LD R1 CPPSA get the current PSA pointer 02B4F FA702B57 1 1657 JZA R1 SETSWXIT if none, do nothing 1658 PLOCK R1,PSLOCK lock for PSUERROR field 02B50 0CC00000 1658 IOFF 02B51 D1D6480C 1 BASE 1658 SETT R1,PSLOCK 02B52 FE0C2B54 1658 JNE MA(2+DISPW MA 0) 02B53 DC40308B 1658 CALLNP LOCKWAIT 02B54 EDC85A1D 1 ZBM 1659 STW R1,PSUERROR/RTSWITCHB set switch bit in PSA 1660 PUNLOCK R1,PSLOCK release lock 02B55 EC16480C 1 BASE 1660 STZ R1,PSLOCK 02B56 0C800000 1660 ION 1661 * \ / 1662 00002B57 1663 SETSWXIT LABEL 02B57 5D1F8001 6 STAK 1664 LEAVE POP 1665 * --- 1666 1667 END SETSWITCH subroutine 1668 1669 END DISPATCHER 54 INPUT SCHED scheduling routines 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 484 (SCHED) F 29 Scheduler 3 4 BLOCK misc scheduling routines 5 6 ENTRY SETRUNNING routine to start a user 7 ENTRY SHACCT do the shutdown accounting of a process 8 ENTRY SHUTDOWN routine to turn off user, put in wait queue 9 ENTRY SHDEQUE turn off user, don't put anywhere 10 ENTRY SHUTRUN turn off user, but re-insert in SQRUNNABLE 11 ENTRY TICK one second tick 12 ENTRY TESTTRUBL to check for a trouble maker 13 14 15 ********************************************************************************** 16 * * 17 * MEMORY MANAGEMENT * 18 * Memory management is based on the idea that main * 19 * memory is merely a holding area (cache) for mass storage * 20 * blocks. This cache, if a given block is loaded, is used * 21 * exclusively for all access to that block, both read and * 22 * write. Any time that the cache is modified, the system * 23 * notes that the cache block must be re-written before the * 24 * cache page may be re-used. In order to make this work, a * 25 * number of rules must be followed. For example, every * 26 * allocated physical page of main memory must be an image of * 27 * an already assigned MS block. For example, if a user wants * 28 * a zeropage, both a MS block and a main memory block (page) * 29 * will be acquired. The main memory page will be set to * 30 * zeroes and marked as modified. The MS block will be held * 31 * for the swapping area for the memory page. The page fault * 32 * processor will ensure that all accesses will be to the main * 33 * memory page until the swap out has been done. * 34 * * 35 * If many processes are accessing the same MS address, * 36 * whether it is a part of a file or a system table, there * 37 * will be only one copy of the MS block in main memory and * 38 * all users will refer to it. In fact, it is very important * 39 * that there never be two resident copies of the same MS * 40 * block! This means, for example, that the sharing of * 41 * re-entrant code is automatic. (Data structures are locked * 42 * when necessary to avoid having more than one process trying * 43 * to update a common data area. This locking occurs at the * 44 * level of the data structure, not at the level of individual * 45 * blocks.) * 46 * * 47 * An "own copy" facility is provided to allow a normally * 48 * re-entrant page to contain pre-initialized variables. When * 49 * a user process attempts to modify a re-entrant page, we * 50 * check for 'own copy'. If 'own copy' is set, a copy of the * 51 * page is acquired. (We leave this work up to the mass * 52 * storage driver, which may copy the page already resident, * 53 * or reassign the physical page and its data if no other * 54 * process is using it. The mass storage driver gets this job * 55 * because it is also, in effect, the allocator of all idle * 56 * pages.) The copy of the page is set up (by changing PPBLOCK * 57 * and FBIDA) to swap to an MS block acquired as a swapping * 58 * (temporary) block. * 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 485 (SCHED) F 29 Scheduler 59 * * 60 * DEMAND PAGING * 61 * This system operates strictly on a demand paging * 62 * basis. That is, the only way in which a process may * 63 * request that a page not currently resident be made resident * 64 * is by actually accessing that page for a read or write. * 65 * The process is then suspended until the requested page * 66 * becomes available. * 67 * Allowing a process to specify pre-fetching was not * 68 * even considered due to the working set and multi-process * 69 * concepts governing the design of the system. However, * 70 * there may be some justification to pre-fetching for a user * 71 * just leaving the troublemaker queue. One must compare the * 72 * cost of multiple starts and trips through the page fault * 73 * processor (which ensure that the pages are read in exactly * 74 * the order in which they are needed, reads in only the pages * 75 * really needed, and gets the process running as soon as * 76 * possible) with the cost of just blindly loading the entire * 77 * working set (which avoids any problems with the process * 78 * spending large amounts of time in the MSWAIT queue while a * 79 * lot of memory is tied up in the already loaded pages). * 80 * * 81 * TABLE STRUCTURE - SYSTEM * 82 * The lists that control the allocation of main memory * 83 * are the following: * 84 * * 85 * system wide: idle page list (PPIDLE) * 86 * physical page list (PPAGELIST) * 87 * also, see the mass storage queues * 88 * and the FSPPLIST * 89 * * 90 * During system startup, each physical page of main * 91 * memory that is available for swapping has a physical page * 92 * element (PPL) generated which is placed on the idle list * 93 * when generated. That PPL is never destroyed and always * 94 * represents the same physical page. See the description of * 95 * the PPL. * 96 * * 97 * When a mass storage block is to be read in, the main * 98 * memory page represented by the PPL at the head of the idle * 99 * page list is selected. When the new MS block is read in, * 100 * the PPL indicates where in physical memory the incoming * 101 * data is to go, indicates where the incoming FBI is to go, * 102 * and receives any other information required to manage that * 103 * page as long as it is resident. The PPL is placed into the * 104 * PPAGELIST (The PPAGELIST consists of multiple lists to * 105 * reduce search time. The appropriate list head is chosen by * 106 * hashing on the MS block number) and remains there until it * 107 * is no longer in use. * 108 * * 109 * A PPL representing a clean page that no longer seems to * 110 * be in active use is returned to the idle page list (PPIDLE). * 111 * The physical page still contains a copy of the MS block * 112 * (unless this page represents a mass storage block being * 113 * returned to the pool of free blocks or one with a mass * 114 * storage error) and may be returned to active service (that * 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 486 (SCHED) F 29 Scheduler 115 * is, re-entered in the PPAGELIST) if the block that it * 116 * contains is again requested. Otherwise, it will eventually * 117 * work its way to the beginning of the idle list (i.e. become * 118 * the oldest entry) and be used to receive a different MS * 119 * block. * 120 * * 121 * The idle page list (PPIDLE) is not allowed to hold * 122 * dirty (modified) pages. Therefore, if a dirty page is no * 123 * longer required, a Mass Storage Queue (MSQ) element is made * 124 * for that page and the MSQ element is placed into the * 125 * appropriate device's write queue. The page may not be moved * 126 * to PPIDLE until the write is done (the page is clean). * 127 * * 128 * In addition to appearing in PPIDLE or PPAGELIST, a PPL * 129 * for a page currently in the middle of a swap in may be held * 130 * by the mass storage driver. When required mass storage * 131 * transfers are completed, the PPL is deposited in PPIDLE (if * 132 * no user remains who has a request pending for that page) or * 133 * PPAGELIST. * 134 * * 135 * All system tables are built from a pool of available * 136 * space that is managed by the binary buddy system. The * 137 * largest blocks are half pages whole pages are fetched from * 138 * the idle list as needed. When a whole page is fetched, its * 139 * PPL is saved in a list called FSPPLIST. When FREEMEM * 140 * recombines a whole page, it finds its PPL in FSPPLIST and * 141 * returns it to the idle page list. * 142 * * 143 * TABLE STRUCTURE - PROCESS * 144 * The lists that control the allocation of main memory * 145 * are the following: * 146 * * 147 * each process: virtual memory list (UPCVMLIST) * 148 * virtual address space list (UPCVASP) * 149 * working set extension list (UPCWSX) * 150 * * 151 * Each process may use up to 128 virtual pages (plus * 152 * virtual monitor pages plus a few associated with XREQ * 153 * processing). As long as a virtual page has not been * 154 * specified or referenced, it is implicitly a zero page and * 155 * there are no process list elements associated with it. * 156 * Referencing an unspecified page causes a page fault and the * 157 * page fault processor adjusts the lists and puts in a MS * 158 * request for a zero page (a page containing all zero bits). * 159 * Pages may also be specified by explicitly mapping in a * 160 * specific MS block (such as from a code file). * 161 * * 162 * Whenever a page is specified, a virtual page element * 163 * is created. These elements contain control information and * 164 * specify the MS block whose image occupies the specified * 165 * virtual page. All of these elements are kept in the * 166 * virtual memory list pointed to by the UPCVMLIST word in the * 167 * Under Program Control block (UPC). These virtual page * 168 * elements remain until the process is destroyed or until a * 169 * request affecting one or more is encountered. This list, * 170 * then, always contains a map of the users entire current * 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 487 (SCHED) F 29 Scheduler 171 * virtual address space. * 172 * * 173 * The UPCVMLIST accounts only for the pages in the users * 174 * virtual address space. A list of similar format, called the * 175 * MONVM list, contains the map of the entire monitor virtual * 176 * address space. This list is shared by all processes. * 177 * * 178 * When a physical page is made available to a process, a * 179 * page access element (PAL) is created and placed into the * 180 * processes virtual address space list (UPCVASP). PALs may * 181 * exist only for a page that is resident and consequently are * 182 * closely associated with a corresponding PPL (the * 183 * association is by MS block number. Hence the requirement * 184 * of only one resident copy of a MS block). Each PAL that is * 185 * created causes a use counter to be incremented in the * 186 * corresponding PPL (different processes may share a page or * 187 * one process may map in the same page multiple times, so a * 188 * counter is used). Destroying a PAL causes the use count in * 189 * the PPL to be decremented. If that use count goes to zero * 190 * and the page is clean, the PPL is moved to PPIDLE. If the * 191 * page was dirty, a write queue element is created for it * 192 * (also incrementing the use count) and the PPL remains in * 193 * the PPAGE list until the write has occurred. A PPL is not * 194 * returned to the idle list until all PALs and write queue * 195 * elements referring to it have been destroyed. * 196 * * 197 * When a process is to be run, its page map is loaded * 198 * from the information in the PALs of the UPCVASP list. When a * 199 * process is shut down, the page usage statistics are recorded * 200 * in the PALs as the page file is unloaded. Also, at the time * 201 * that a user is shut down, the scheduling routines will look * 202 * at this users page ages and the system load and decide * 203 * whether a page has fallen into disuse or not. Pages that * 204 * seem to have left the users working set will have their PALs * 205 * destroyed. * 206 * * 207 * Another possibility that we provide for is that of a * 208 * virtual page having different blocks successively mapped * 209 * into it. A PAL for a page not currently mapped may not * 210 * remain in UPCVASP because it would interfere with the page * 211 * file management. However, we don't want to destroy the PAL * 212 * since it is likely to be mapped back in relatively soon. * 213 * Therefore, we provide a list called the Working Set * 214 * Extension list (UPCWSX) to temporarily hold PALs. * 215 * * 216 * Note that a PAL in a working set extension list cannot * 217 * be used directly. However, its presence there prevents the * 218 * physical page from being discarded in the idle list. This * 219 * causes the pages comprising the working set for that process * 220 * to remain resident. For example, file pages may be quite * 221 * frequently mapped and unmapped from the users address space. * 222 * The UPCWSX supplies a holding buffer for those pages in * 223 * between the processes requests for them. The page fault * 224 * processor searches the UPCWSX list just before it looks in * 225 * the PPAGE list. If an already built PAL is discovered * 226 * there, it is moved into the VASP list (after adjusting the * 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 488 (SCHED) F 29 Scheduler 227 * virtual page number, etc). * 228 * * 229 * During shutdown, the scheduler searches both the * 230 * UPCVASP and the UPCWSX lists to remove old PALs. The * 231 * scheduler searches the UPCWSX list first. The threshold * 232 * page age is then recalculated (but using the same formula) * 233 * and the UPCVASP list is searched. This helps preserve the * 234 * (probably) more valuable pages in the UPCVASP list. * 235 * * 236 * Some of the virtual system that moves PALs into the * 237 * UPCWSX list knows that the page has a low probability of * 238 * being used in the near future, but a sufficient probability * 239 * so that just grubbing the page is not justified. These * 240 * callers may insert the PALs pre-aged so that they will not * 241 * spend an excessive amount of time resident. * 242 * * 243 * MEMORY SCHEDULING ALGORITHMS * 244 * GENERAL * 245 * We wish to remove any pages that a user will not use * 246 * again in the near future. Ideally, we compare the cost of * 247 * occupying a page of physical memory until it is needed again * 248 * to the cost of retrieving the page from mass storage. * 249 * Unfortunately, without an operational crystal ball, we don't * 250 * know the future reference string of the processes. However, * 251 * there exists a strong positive correlation between the time * 252 * since last reference and the time to next reference. We * 253 * exploit this in our memory management algorithms with the * 254 * caveat that it is always possible to build pathological * 255 * reference strings. * 256 * * 257 * Our job of determining which physical page to re-use is * 258 * complicated by the possibility of many processes using the * 259 * same page. The only provision for extracting a particular * 260 * physical page is reserved for the parity error processor. * 261 * It involves freezing all of the CPUs, so it is not intended * 262 * for normal use. Instead of trying to identify which * 263 * physical page should be used next, scheduling proceeds from * 264 * the opposite direction. That is, a process is only allowed * 265 * to keep PALs for pages that the scheduler decides the * 266 * process is actually using. * 267 * * 268 * The scheduler makes every effort to destroy unneeded * 269 * PALs. This drives unused physical pages into the idle list. * 270 * Therefore, when the system runs out of idle pages, every * 271 * remaining page is actually in use to one extent or another. * 272 * * 273 * One fairly common (and poor) technique at this point * 274 * has been to further squeeze the active processes by taking * 275 * away still more pages from them. This is folly. The * 276 * scheduler already knows that each process needs all of the * 277 * pages that it has been left with. If any more are taken * 278 * away, they will be required again almost immediately. * 279 * * 280 * Instead, the schedulers action at this point is to pick * 281 * a user (some effort is made to pick the 'most offensive' * 282 * user), take ALL of his pages, and set that user aside for a * 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 489 (SCHED) F 29 Scheduler 283 * length of time in the trouble maker queue (SQTROUBLE) where * 284 * he creates no further demand until released. This is * 285 * described in the section called 'trouble makers'. * 286 * * 287 * PARAMETERS * 288 * The scheduler memory management code uses several * 289 * parameters (MMparname). These parameters were determined in * 290 * a relatively objective manner by calculating ratios of * 291 * 'cost' for various operations. For example, the 'cost' of * 292 * leaving a trouble maker resident may be compared with the * 293 * 'cost' of swapping out all of his pages and later swapping * 294 * them back in. Each parameter definition is preceeded by a * 295 * description of how it was derived and the effects of * 296 * altering it. These parameters are not available for * 297 * alteration by the customers! Moderate variations in the * 298 * values of these parameters should have a low influence on * 299 * system operation. (A large effect would indicate a defect in * 300 * the scheduling algorithm). * 301 * * 302 * PAL MANAGEMENT * 303 * The age (time since last reference) of each PAL is * 304 * monitored. The units are 'number of times this process * 305 * switched'. That is, an unreferenced page will age by one * 306 * unit every time that its process is suspended and the page * 307 * file unloaded (such as for page fault, quantum completion, * 308 * and etc.). Notice that this measure is (to the first order) * 309 * independent of the number of users on the system. * 310 * * 311 * Two constants exist for determining when a PAL should * 312 * be destroyed. The first, MMAGE, is the youngest page that * 313 * will ever be removed from a users working set. This * 314 * minimum age is set to avoid thrashing by preventing the * 315 * scheduler from squeezing a process below the minimum * 316 * practical working set. If we run out of IDLE pages, we * 317 * must conclude that we are trying to run too many jobs. The * 318 * second, MMAGEINC/MMAGEINCD, is the additional age allowed * 319 * for each idle page available to the system. This allows * 320 * processes to occupy more physical memory when the demand is * 321 * low. We also allow some credit for dirty idle pages. * 322 * This age determination is done in a routine called * 323 * TAKEOLD. Any PAL with an excessive age is discarded. * 324 * At one time we used MMAGE without the increment iff we * 325 * discovered that there were users present in the SIZEWAIT * 326 * queue. This was found to have some serious problems. We * 327 * would release hundreds of pages when even one process had * 328 * been shut down as troublemaker, causing a severe hitch in * 329 * the operation of the scheduler. * 330 * * 331 * OTHER PAL AGING * 332 * When processes are entered into SQs all pages are aged * 333 * by an amount determined from the SDPARM array. This is so * 334 * that pages are captured as soon as possible when a process * 335 * STARTS its wait for a resource (terminal I/O, etc.). * 336 * All of the queues representing processes not actively * 337 * contending for memory are scanned periodicly and all pages * 338 * present are aged, with the older PALs being destroyed. * 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 490 (SCHED) F 29 Scheduler 339 * This aging is currently done every two seconds in a * 340 * routine called TICK. The WHICHHUNT routine is called for * 341 * each SQ. The aging value is called MMIDLSPEED. It is added * 342 * to the page ages of every page in the VASP and WSX lists. * 343 * Then the TAKEOLD routine is called to release any PALs that * 344 * have gotten too old. * 345 * The MSWAIT queue is an interesting special case. * 346 * Originally it was not aged, as it seemed counter-productive * 347 * to be removing pages from a user waiting for another page. * 348 * We discovered, however, that the system could deadlock with * 349 * no available pages for a disk read and every other page held * 350 * by a user in MSWAIT. So the MSWAIT queue was aged just like * 351 * any other queue. Then we discovered the convoy phenomenon... * 352 * 80 or more users would be waiting for MS transfers. While * 353 * waiting, all pages would be removed by WHICHHUNT. As soon * 354 * as their transfer came through, they would page fault on one * 355 * of the recently removed pages and return to the end of the * 356 * queue to repeat the cycle forever. The MSWAIT queue is now * 357 * aged at 1/15 the rate of the other queues to prevent this * 358 * problem. * 359 * We have now ensured in TESTTRUBL that we always have * 360 * sufficient IDLE pages, but we recognize that not ready disks * 361 * and other similar problems would always make some aging of * 362 * the MSWAIT queue desirable. * 363 * * 364 * PROCESS MANAGEMENT * 365 * Each process is controlled by a Process Control Block * 366 * (PCB). All PCBs are linked together in the PCONTROL list * 367 * with non-standard links. Additionally, PCBs may appear in * 368 * one of the Scheduler Queues (SQs) with normal links. A PCB * 369 * will appear in the SQRUNNABLE queue if it is waiting only * 370 * for a processor, a PCB will appear in SQMSWAIT if it is * 371 * waiting for a mass storage operation, etc. See the HEADPAGE * 372 * SQ definitions for further information. * 373 * The PCB for a process that is actually being run * 374 * appears in SQRUNNING. However, the CPU that is currently * 375 * running that process is presumed to have an implicit lock * 376 * over most of the variables in the PCB and PSA (and all * 377 * attached lists for that matter). Therefore, other CPUs * 378 * that are concerned with global scheduling operations must * 379 * be cautious in modifying these lists. It is the * 380 * responsibility of the CPU running the process to do all * 381 * updating of the lists in such a manner that the lists can * 382 * be searched at any time without encountering bad links. * 383 * This is so that other CPUs who have need of information do * 384 * not have to co-ordinate their operations with the active * 385 * CPU through locks. It is deemed an unnecessary overhead to * 386 * require locks just for the purpose of information * 387 * gathering. The UERRSET routines must always be able to get * 388 * to the error control word in the PSA. Therefore, PSLOCK * 389 * is provided to lock access for this purpose. * 390 * * 391 * TROUBLE MAKERS * 392 * The TESTTRUBL routine is called for every page fault * 393 * and quantum completion. It normally returns to the caller. * 394 * However, if the system has fewer idle pages than * 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 491 (SCHED) F 29 Scheduler 395 * MMIDLETTMIN, then the user is evaluated at this time. Low * 396 * priority jobs are picked first in order to get background * 397 * jobs out of the way of interactive users. When the 'worst' * 398 * user is about to be suspended, his resources (especially * 399 * memory) are taken from him and he is sent to the * 400 * troublemaker queue (jail) where he remains for a while (not * 401 * competing for system resources). * 402 * * 403 * A user is sent to jail if: * 404 * 1) The system has fewer creditable idle pages than this * 405 * users PSPRIORITY value, and, * 406 * 2) He is deemed more offensive than any other * 407 * runnable user. (Special note: If there * 408 * are other RUNNING users, their offensiveness * 409 * cannot be readily calculated because of the * 410 * interlocking that would be required. We * 411 * therefore assume that any other RUNNING * 412 * process is less offensive that the one being * 413 * examined. This is not ideal, but acceptable. * 414 * Remember that this only happens when we run * 415 * out of idle pages.) * 416 * * 417 * A user is given 'points' for offensiveness as follows: * 418 * 1) One point for each page in his working set. * 419 * 2) One point for each page fault in the preceeding * 420 * 100 MS of his cpu time (running average). * 421 * 3) MMPRRATIO for each lower priority level (higher number) * 422 * 4) MMLOCKPARM (a negative parameter) for each * 423 * critical region that this process has locked. * 424 * 5) Points are deducted for the grace that was * 425 * assigned to aid in rehabilitation upon * 426 * release. * 427 * 6) A hysteresis factor to make the user just * 428 * suspended a worse offender (the bird in the * 429 * hand theory. Lets wipe out this guy now * 430 * rather than wait for someone with about * 431 * the same value. Also, another user, only * 432 * slightly worse, may improve so that he does * 433 * not get shut down either because he became * 434 * less of a trouble maker than this guy. This * 435 * would lead to a very unpleasant game of * 436 * ping-pong if not stopped in this manner.) * 437 * * 438 * A user being incarcerated has all of his pages removed * 439 * except any pages that are locked. We ensure that processes * 440 * never have so many pages locked that we'd be dangerously * 441 * hurt by having them held during a jail term. * 442 * A length of time is calculated based on his nuisance * 443 * value and he is placed into the trouble maker queue * 444 * (SQTROUBLE). When he is paroled, he is given a certain * 445 * amount of grace to allow him to recover his working set * 446 * without being branded a recidivist. This grace is a * 447 * function of his nuisance value at the time of his arrest * 448 * (bigger trouble makers [mafiosi] wait longer but are more * 449 * resistant to re-arrest). * 450 * * 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 492 (SCHED) F 29 Scheduler 451 * LOCKING * 452 * On a uni-processor system, updating of some table * 453 * structures must be done with the interrupt system disabled * 454 * because the interrupt routine might also attempt to modify * 455 * the table structures. If this were allowed to happen, the * 456 * table could be completely trashed. Because this system may * 457 * contain multiple processors, locking of critical regions is * 458 * also necessary. This prevents one processor from * 459 * interfering with the table updates of another processor. * 460 * The critical region locks are all associated with the * 461 * access and altering of tables (lists). Because some updates * 462 * require co-ordinated updating of more than one table (list), * 463 * they require more than one lock to be set by that process. * 464 * This suggests the possibility of deadlocking (all processors * 465 * waiting for resources locked by another processor). Several * 466 * algorithms are available to either prevent or detect * 467 * deadlocking. Deadlock detection, in order to be useful, * 468 * must be coupled with a mechanism to back out one of the * 469 * processors. The potential complexity of this caused us to * 470 * not even consider it. Of the algorithms available for * 471 * deadlock prevention, most require extensive computations. * 472 * However, a very simple algorithm requires no calculation * 473 * at all. Deadlock may be prevented by ordering all resources * 474 * to be locked and ensuring that all processes needing * 475 * simultaneous access to more than one resource always acquire * 476 * all resources in the designated order. * 477 * The specified order for certain lists is: * 478 * MSQIN * 479 * any SQ (no process may have more than one locked) * 480 * any PPAGE list (no process may have more than one locked) * 481 * the PPIDLE list * 482 * MSQOUT * 483 * A list may be locked only if all lists following that * 484 * list in this ordering are not locked by the requesting * 485 * process. For example, MSQOUT must be unlocked when any * 486 * locking is tried, PPIDLE and MSQOUT must be unlocked when * 487 * any higher list is needed, etc. * 488 * For the most part, resources not mentioned in the * 489 * about ordering must not be held simultaneously with any * 490 * other resource. * 491 * A processor must never have interrupts enabled while * 492 * it has anything locked! The PLOCK, and PUNLOCK macros are * 493 * provided for locking and unlocking these lists and PLOCK has * 494 * an IOFF to disable the interrupts and PUNLOCK has a * 495 * corresponding ION to restore them. * 496 * Processes locking these lists are responsible for * 497 * avoiding page faults while the lists are locked! * 498 * PSAs are not explicitly locked: rather, the process * 499 * altering the PSA must be the only process holding a pointer * 500 * to that PSA. This is accomplished by just plain removing the * 501 * PCB and PSA pointers from everywhere except CPPSA (available * 502 * to only one CPU) and the PCONTROL list (very restricted * 503 * usage!). * 504 * The page fault processor, mass storage driver, and * 505 * similar routines that move pages from one list to another * 506 * must lock both lists while a physical page element is being * 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 493 (SCHED) F 29 Scheduler 507 * moved. This is so that someone searching the lists for a * 508 * particular block will not have that block moved around its * 509 * search, thereby causing a spurious not-found condition. * 510 * An exception to this is a block number change that * 511 * moves a page between two PPAGE lists. The new block number * 512 * cannot be known to any other CPU at the time of a change, so * 513 * no conflict can result. (also, not more than one PPAGE list * 514 * may be simultaneously locked by a process) * 515 * * 516 * "VIRTUAL" CRITICAL REGIONS * 517 * Certain critical regions involve updating on mass * 518 * storage. These critical regions involve a queue where * 519 * users may be shut down if the resource is unavailable. * 520 * This means that a user waiting for this type of resource * 521 * waits quiescently. We try to avoid sending to jail users * 522 * with such resources locked. * 523 * * 524 * LOCKED PAGES * 525 * In order to implement the crashproofing strategies, * 526 * the memory manager allows the virtual system to lock pages * 527 * into resident memory. This is so that partially updated * 528 * tables such as directories don't get swapped back to the * 529 * volume: they would be total garbage in the case of a crash. * 530 * (An alternative is to request a free block and to swap the * 531 * partially updated table to that block. This was not deemed * 532 * reasonable: far better to allocate the system resources to * 533 * completing the update!) * 534 * In order to avoid system deadlock, no process may * 535 * have more than one page locked (except for direct I/O). * 536 * The system must prohibit direct I/O from locking more * 537 * pages than are available. * 538 * * 539 * CPU time scheduling algorithm * 540 * This algorithm attempts to separate the interactive * 541 * users, IOBOUND jobs, and similar short response jobs from * 542 * the real CPU hogs. Just like in memory management, we wish * 543 * for a crystal ball. Also, just like in memory management, * 544 * we survive with recent history only. * 545 * The idea is based on a single runnable queue that we * 546 * sort (that is, we insert each new user into his proper * 547 * sorted location) into order by "queue insertion value" * 548 * (QIV). The QIV is determined by using the ratio of CPU time * 549 * used (with an additional term for MS transfers) to total * 550 * time. This provides low values of QIV to interactive users * 551 * and the like, while a heavily CPU bound user gets a higher * 552 * QIV and therefore defers to those other jobs. We also * 553 * include a term in the QIV to represent the priority of the * 554 * process. * 555 * We prevent starvation by setting a minimum QIV or * 556 * TSBASEVAL for users being inserted into the queue. Once * 557 * in the queue, everyones QIV is decreased periodicly so * 558 * that they are ultimately guaranteed to run. * 559 * * 560 * IMPLEMENTATION * 561 * The following components of the algorithm are in * 562 * place: * 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 494 (SCHED) F 29 Scheduler 563 * PFPROC Adds TSMSEQUIV to PSSUMCPU for each call to MSPROC. * 564 * DISPATCH Calculate the QUANTUM to be used for this user. * 565 * SHUTDOWN add the amount of quantum used to PSSUMCPU. Save current * 566 * time in PSSHUTTIME. * 567 * SETRUNNING Add the time difference between now and * 568 * PSSHUTTIME to PSSUMSDT. This tells us the length of * 569 * time that he spent in whatever wait queue he was in. * 570 * Note that the amount of time spent in SQRUNNABLE does * 571 * not enter into this algorithm, so to first order, it * 572 * will be independent of system load. Calculate QIV and * 573 * insert into the queue by order. * 574 * TICK For runnable queue, reduce each PSSUMCPU and PSSUMSDT * 575 * by the TSHISTLOST factor and subtract TSAGEVAL from every * 576 * SDPARM. * 577 * * 578 * Quantum Calculation * 579 * We should like to minimize the amount of wall clock * 580 * time that large users take in order to reduce the * 581 * time.memory product as much as possible. We therefore * 582 * lengthen out the quantum according to the users working * 583 * set size. * 584 * Therefore, once a large user is dispatched, he * 585 * will be run for a significant period of time. When * 586 * he is rescheduled, however, he will go clear to the * 587 * end of the runnable queue and he will have a high * 588 * QIV so that interactive users, even though scheduled * 589 * afterwards, will be run first. * 590 * * 591 ********************************************************************************** 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 495 (SCHED) F 29 Scheduler 593 594 ********************************************************************************** 595 * * 596 * SHUTDOWN. Routine to shut down a user and place him * 597 * in the appropriate scheduler queue. * 598 * The PCB is placed into the list at either the beginning * 599 * or end depending upon which queue it is being placed in. * 600 * * 601 * Call: The interrupts MUST be off * 602 * Only MSQIN may be locked when SHUTDOWN * 603 * is called * 604 * Assumes that the page file is still * 605 * loaded for this user * 606 * R3 points to the head word of the queue * 607 * R1 contains the PCQPARM2 * 608 * PSA pointer in CPPSA * 609 * SP = stack pointer * 610 * CALL SHUTDOWN * 611 * PARVL * 612 * OR * 613 * PAR2L NOT PARV2L since this * 614 * destroys PARM2 out of R1 * 615 * * 616 * Eats R0:R4. * 617 * Stack required = 12. * 618 * 3 + max ( LOCKWAIT (0), MAPINMEM (3), MAPOUTMEM (1), * 619 * PFUPCAGE (1), SHACCT (3), SHDEQUE (3), * 620 * TAKEPAGES (9) ) * 621 * * 622 ********************************************************************************** 623 624 BLOCK SHUTDOWN subroutine 625 ENTRY SHUTDOWN 626 627 BEGFRAME 00178801 6 BASE 628 SHUTR5SAV BSS 1 00178802 6 BASE 629 SHUTQSAV BSS 1 queue pointer save 630 ENDFRAME 631 02B58 DD1F8003 6 STAK 632 SHUTDOWN ENTR PUSH 02B59 E4178801 0 6 BASE 633 ST R0 SP,SHUTR5SAV save this register 634 PLOCK SQLOCKS(NQRUNNING) lock the running queue 02B5A 0CC00000 634 IOFF 02B5B D1C01DBA 634 SETT SQLOCKS(NQRUNNING) 02B5C FE0C2B5E 634 JNE MA(2+DISPW MA 0) 02B5D DC40308B 634 CALLNP LOCKWAIT 02B5E 60178801 0 6 BASE 635 LD R0 SP,SHUTR5SAV restore this register (has param) 02B5F E5578801 5 6 BASE 636 ST R5 SP,SHUTR5SAV save the callers R5 02B60 61400412 5 637 LD R5 CPPSA get a pointer to the PSA 02B61 60895F12 2 5 ZBM 638 LD R2 R5,PSPROCCB => process control block 02B62 F3CC2B65 7 639 JBF R7/STPDUBL NOTDUBL jump if single word PAR 02B63 C2568801 2 BASE 640 STPV2L R2,PCQPARM otherwise, save double parameter 02B64 FE0E2B66 641 JMP NOWSHUTHIM 642 * --- 643 00002B65 644 NOTDUBL LABEL 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 496 (SCHED) F 29 Scheduler 02B65 C0568801 2 BASE 645 STPVL R2,PCQPARM save the shutdown parameter 00002B66 646 NOWSHUTHIM LABEL 02B66 E4568000 1 2 CACH 647 ST R1 R2,PCQPARM2 save the secondary parameter 02B67 E4D78802 3 6 BASE 648 ST R3 SP,SHUTQSAV save the queue head pointer 02B68 10C41DA9 3 IMM 649 SUB R3 ADR SQBEGIN produce the queue number 02B69 E4C89260 3 2 ZBM 650 ST R3 R2,PCQUEUE indicate which queue we will be in 02B6A DC402BBD 651 CALLNP SHDEQUE call to switch out 02B6B DC0025EB 652 CALL MAPINMEM map in this users virtual free memory lists 02B6C 40534000 5 REG 653 PARVL R5 pointer to the PSA 02B6D 60089260 0 2 ZBM 654 LD R0 R2,PCQUEUE retrieve the number of the new queue 02B6E 60301DD6 0 0 @ 655 LD R0 @PSDPARM(R0) get the aging value 656 02B6F DC4025B6 657 CALLNP PFUPCAGE call to distribute aging to all UPCs 658 02B70 DC402C56 659 CALLNP TAKEPAGES take away unused pages 660 02B71 DC402BD4 661 CALLNP SHACCT do the shut down accounting 662 663 ********************************************************************************** 664 * * 665 * Important. For some queues, we must place the element at * 666 * the end in order to prevent starvation (e.g SQFILEWAIT, * 667 * SQDIRWAIT). We consult a bit array as to the particular queue. * 668 * * 669 ********************************************************************************** 670 02B72 DC4025FC 671 CALLNP MAPOUTMEM map out the users virtual memory 02B73 60D78802 3 6 BASE 672 LD R3 SP,SHUTQSAV retrieve the queue pointer 673 PLOCK R3,0(NQUEUES) call to lock the appropriate queue 02B74 0CC00000 673 IOFF 02B75 D1D6C811 3 BASE 673 SETT R3,0(NQUEUES) 02B76 FE0C2B78 673 JNE MA(2+DISPW MA 0) 02B77 DC40308B 673 CALLNP LOCKWAIT 02B78 60895F12 2 5 ZBM 674 LD R2 R5,PSPROCCB restore the PCB pointer 02B79 60089260 0 2 ZBM 675 LD R0 R2,PCQUEUE get queue # 02B7A 3856C800 1 3 BASE 676 LEA R1 R3,0 produce address of list head 02B7B 5C301DCB 0 @ 677 CMZ @SQAPPENDIT(R0) check whether to place new at end 02B7C FE022B85 678 JEQ INSERTIT jump if we can do less work than that 679 680 * add element to end of queue 02B7D EC089F10 2 ZBM 681 STZ R2,PCQLINK clear our elements forward pointer 02B7E 60040000 0 IMM 682 LD R0 0 a null forward link 02B7F 3C085F10 0 1 ZBM 683 LSRCH R0 R1,PCQLINK find the last element in the list 684 * \ / 685 00002B80 686 SHUTDONE LABEL 02B80 E4885F10 2 1 ZBM 687 ST R2 R1,PCQLINK link in our element 688 PUNLOCK R3,0(NQUEUES) call to unlock the appropriate queue 02B81 EC16C811 3 BASE 688 STZ R3,0(NQUEUES) 02B82 0C800000 688 ION 02B83 61578801 5 6 BASE 689 LD R5 SP,SHUTR5SAV restore R5 for the caller 02B84 5D1F8003 6 STAK 690 LEAVE POP 691 * --- 692 693 * add element at queue head 00002B85 694 INSERTIT LABEL 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 497 (SCHED) F 29 Scheduler 02B85 60085F10 0 1 ZBM 695 LD R0 R1,PCQLINK get address of first element 02B86 E4089F10 0 2 ZBM 696 ST R0 R2,PCQLINK tack list after us 02B87 FE0E2B80 697 JMP SHUTDONE 698 * --- 699 700 END SHUTDOWN subroutine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 498 (SCHED) F 29 Scheduler 702 703 ********************************************************************************** 704 * * 705 * SHUTRUN * 706 * This routine shuts down the current user and places * 707 * him into the runnable queue. SETRUNNING computes a QIV and * 708 * inserts the user into the list in order. This normally * 709 * causes the user to be inserted at an "appropriate" place in * 710 * the queue. Should a caller of SHUTRUN wish the guy to go * 711 * to the end, he can set the PSSUMSDT to 0 to make it look * 712 * like the guy has never been shut down before. We set * 713 * PSSHUTTIME right before calling SETRUNNING so that this * 714 * shutdown appears very short (0). * 715 * Call: * 716 * interrupts must be off. * 717 * only MSQIN may be locked. * 718 * assumes that the page file is still loaded for this user. * 719 * PSA pointer in CPPSA. * 720 * CALLNP SHUTRUN * 721 * * 722 * Eats R0:R2, PFPTR, PAL. * 723 * Stack required = 11. * 724 * 2 + max ( LOCKWAIT (0), MAPINMEM (3), MAPOUTMEM (1), * 725 * SETRUNNING (2), SHACCT (3), SHDEQUE (3), * 726 * TAKEPAGES (9) ) * 727 * * 728 ********************************************************************************** 729 730 BLOCK SHUTRUN subroutine 731 ENTRY SHUTRUN 732 733 BEGFRAME 00178801 6 BASE 734 SHRUNR5 BSS 1 stack save for R5 735 ENDFRAME 736 02B88 DD5F8002 6 STAK 737 SHUTRUN ENTRNP PUSH 738 PLOCK SQLOCKS(NQRUNNING) lock the running queue 02B89 0CC00000 738 IOFF 02B8A D1C01DBA 738 SETT SQLOCKS(NQRUNNING) 02B8B FE0C2B8D 738 JNE MA(2+DISPW MA 0) 02B8C DC40308B 738 CALLNP LOCKWAIT 02B8D E5578801 5 6 BASE 739 ST R5 SP,SHRUNR5 save callers R5 02B8E 61400412 5 740 LD R5 CPPSA get pointer to PSA 02B8F DC402BBD 741 CALLNP SHDEQUE unload this guy 02B90 DC0025EB 742 CALL MAPINMEM map in users virtual free storage lists 02B91 40534000 5 REG 743 PARVL R5 pointer to the PSA 744 * \ / all desired page aging is done in SHDEQUE 745 02B92 DC402C56 746 CALLNP TAKEPAGES take away unused pages 747 02B93 DC402BD4 748 CALLNP SHACCT call for the shut down accounting 749 02B94 DC4025FC 750 CALLNP MAPOUTMEM unmap users virtual free storage 02B95 61095F12 4 5 ZBM 751 LD R4 R5,PSPROCCB => PCB 02B96 DC402B99 752 CALLNP SETRUNNING now place him into the runnable queue 02B97 61578801 5 6 BASE 753 LD R5 SP,SHRUNR5 restore callers register 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 499 (SCHED) F 29 Scheduler 02B98 5D1F8002 6 STAK 754 LEAVE POP and return 755 * --- 756 757 END SHUTRUN subroutine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 500 (SCHED) F 29 Scheduler 759 760 ********************************************************************************** 761 * * 762 * SETRUNNING * 763 * Routine to place a user into the runnable queue. We * 764 * calculate his queue insertion value (QIV) and place him * 765 * into the runnable queue by order of PCQPARM and QIV. We * 766 * check the PSA to see whether we should put the guy on the * 767 * end of the queue. If the flag is on, we give the guy a * 768 * very high QIV in the hopes that he will gravitate there. * 769 * This could be done by the caller by setting the PSSUMSDT * 770 * value to 0 (saying the process has never suspended), but it * 771 * can take too long for this the value to reaccumulate * 772 * (especially if done often). * 773 * Call: * 774 * only MSQIN may be locked when we come here. * 775 * R4 => PCB * 776 * CALLNP SETRUNNING * 777 * * 778 * Eats R0:R2. * 779 * Stack required = 2. * 780 * 1 + max ( GETDATE (1), LOCKWAIT (0) ) * 781 * * 782 ********************************************************************************** 783 784 BLOCK SETRUNNING subroutine 785 ENTRY SETRUNNING 786 787 BEGFRAME 788 ENDFRAME 789 00000100 ABS 790 MAXQIV EQU 256 791 02B99 DD5F8001 6 STAK 792 SETRUNNING ENTRNP PUSH 02B9A 60040001 0 IMM 793 LD R0 NQRUNNABLE get number of queue 02B9B E4091260 0 4 ZBM 794 ST R0 PCB,PCQUEUE indicate what queue this user will be in 02B9C 60891F13 2 4 ZBM 795 LD R2 PCB,PCPSADRS get pointer to PSA 02B9D DC404549 796 CALLNP GETDATE get the current clock 02B9E 1056880E 1 2 BASE 797 SUB R1 R2,PSSHUTTIME find how long since he was shutdown 798 * this gives the amount of time 799 * that he spent waiting to be unsuspended 02B9F 1848A10A 1 2 ZBM 800 ADD R1 R2,PSSUMSDT so make total of shut down time 02BA0 5044FFFF 1 IMM 801 MIN R1 PSSUMMAX make sure we don't overflow 02BA1 E448A10A 1 2 ZBM 802 ST R1 R2,PSSUMSDT save it away 02BA2 60040100 0 IMM 803 LD R0 MAXQIV get biggest possible QIV 02BA3 D1889414 2 ZBM 804 CLRT R2,PSENDRUN test, clear end-queue flag 02BA4 FE0C2BAE 805 JNE SOCKHIM give out big QIV 02BA5 6008810A 0 2 ZBM 806 LD R0 R2,PSSUMCPU get the amount of CPU time 02BA6 18520000 1 0 REG 807 ADD R1 R0 make R1 contain total elapsed time 808 * (not counting time spent in SQRUNNABLE) 02BA7 54440001 1 IMM 809 MAX R1 1 avoid division by 0 02BA8 1C040100 0 IMM 810 MUL R0 MAXQIV make integer arithmetic work out 02BA9 14124000 0 1 REG 811 DIV R0 R1 find the ratio 02BAA 60489830 1 2 ZBM 812 LD R1 R2,PSPRIORITY get this users priority 02BAB 1C40254B 1 813 MUL R1 TSPRIORVAL and convert to QIV units 02BAC 18124000 0 1 REG 814 ADD R0 R1 combine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 501 (SCHED) F 29 Scheduler 02BAD 1800254C 0 815 ADD R0 TSBASEVAL and add the base to form QIV 00002BAE 816 SOCKHIM LABEL 02BAE E4170801 0 4 BASE 817 ST R0 PCB,PCQPARM save in the parameter field 818 PLOCK SQLOCKS(NQRUNNABLE) get access to the runnable queue 02BAF 0CC00000 818 IOFF 02BB0 D1C01DBB 818 SETT SQLOCKS(NQRUNNABLE) 02BB1 FE0C2BB3 818 JNE MA(2+DISPW MA 0) 02BB2 DC40308B 818 CALLNP LOCKWAIT 02BB3 60170801 0 4 BASE 819 LD R0 PCB,PCQPARM recover QIV 02BB4 60441DAA 1 IMM 820 LD R1 ADR SQRUNNABLE get pointer to list head 00002BB5 821 MOVEON LABEL 02BB5 FA782BB8 12 822 RLJZA R1 ENDOFLIST jump at end of list 02BB6 64164801 0 1 BASE 823 CPR R0 R1,PCQPARM compare against this elements QIV 02BB7 FE062BB5 824 JGE MOVEON move to next if not to proper point yet 00002BB8 825 ENDOFLIST LABEL 02BB8 E4491F10 1 4 ZBM 826 ST R1 PCB,PCQLINK put the forward link into our element 02BB9 E5089F10 4 2 ZBM 827 ST PCB R2,PCQLINK and make previous element point to us 828 PUNLOCK SQLOCKS(NQRUNNABLE) release the queue 02BBA EC001DBB 828 STZ SQLOCKS(NQRUNNABLE) 02BBB 0C800000 828 ION 02BBC 5D1F8001 6 STAK 829 LEAVE POP 830 * --- 831 832 END SETRUNNING subroutine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 502 (SCHED) F 29 Scheduler 834 835 ********************************************************************************** 836 * * 837 * SHDEQUE * 838 * Unloads the page file and dequeues the PCB. * 839 * Call: * 840 * R5 => PSA * 841 * SQRUNNING queue locked * 842 * CALLNP SHDEQUE * 843 * We unlock SQRUNNING * 844 * R2 => PCB * 845 * * 846 * Eats R0:R4. * 847 * Stack required = 3. * 848 * 1 + max ( LOCKWAIT (0), MAPOUTMEM (1), PFUNLOAD (2) ) * 849 * * 850 ********************************************************************************** 851 852 BLOCK SHDEQUE subroutine 853 ENTRY SHDEQUE 854 855 BEGFRAME 856 ENDFRAME 857 02BBD DD5F8001 6 STAK 858 SHDEQUE ENTRNP PUSH 02BBE DC4025A0 859 CALLNP PFUNLOAD free up the page file 860 * and produce current page ages 02BBF 60895F12 2 5 ZBM 861 LD R2 R5,PSPROCCB get the PCB pointer 02BC0 60441DA9 1 IMM 862 LD R1 ADR SQRUNNING R1 -> front of queue 02BC1 3C885F10 2 1 ZBM 863 LSRCH R2 R1,PCQLINK find our predecessor in queue 02BC2 FE022BC4 864 JEQ FOUND jump if found 02BC3 00130040 865 HALT HALTS0040 PCB not found in running queue (shutdown) 866 * --- 867 00002BC4 868 FOUND LABEL 02BC4 60089F10 0 2 ZBM 869 LD R0 R2,PCQLINK R0 -> one after us 02BC5 E4085F10 0 1 ZBM 870 ST R0 R1,PCQLINK remove us from queue 871 PUNLOCK SQLOCKS(NQRUNNING) unlock the list 02BC6 EC001DBA 871 STZ SQLOCKS(NQRUNNING) 02BC7 0C800000 871 ION 872 PLOCK R5,PSLOCK lock for access to PSUERROR word 02BC8 0CC00000 872 IOFF 02BC9 D1D7480C 5 BASE 872 SETT R5,PSLOCK 02BCA FE0C2BCC 872 JNE MA(2+DISPW MA 0) 02BCB DC40308B 872 CALLNP LOCKWAIT 02BCC EC095A1D 5 ZBM 873 STZ R5,PSUERROR/RTSWITCHB clear switch bit 874 PUNLOCK R5,PSLOCK clear lock 02BCD EC17480C 5 BASE 874 STZ R5,PSLOCK 02BCE 0C800000 874 ION 02BCF DC4025FC 875 CALLNP MAPOUTMEM unmap virtual monitor tables for this user 02BD0 EC000412 876 STZ CPPSA indicate no PSA running 02BD1 EC000414 877 STZ CPCUPC indicate no current UPC for this CPU 02BD2 D0401D0B 878 DEC BUSYCPUS say this CPU no longer busy 02BD3 5D1F8001 6 STAK 879 LEAVE POP return 880 * --- 881 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 503 (SCHED) F 29 Scheduler 882 END SHDEQUE subroutine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 504 (SCHED) F 29 Scheduler 884 885 ********************************************************************************** 886 * * 887 * SHACCT * 888 * Does the accounting part of shutdown. * 889 * Call: * 890 * R5 => PSA * 891 * CALLNP SHACCT * 892 * * 893 * * 894 * Eats R0:R4. * 895 * Stack required = 3. * 896 * 1 + max ( GETDATE (1), TIMEKILL (2), UERRSETY (1) ) * 897 * * 898 ********************************************************************************** 899 900 BLOCK SHACCT subroutine 901 ENTRY SHACCT 902 903 BEGFRAME 904 ENDFRAME 905 02BD4 DD5F8001 6 STAK 906 SHACCT ENTRNP PUSH 907 * Account CPU time used and give error if limit exceeded 02BD5 6117480F 4 5 BASE 908 LD TMR R5,PSQUANTPTR 02BD6 DC404517 909 CALLNP TIMEKILL remove the end of quantum interrupt 02BD7 60840000 2 IMM 910 LD R2 0 RTN1 - element not found 02BD8 3089410B 2 5 ZBM 911 RSB R2 R5,PSLASTQUAN R2=quantum used 02BD9 9889410A 2 5 ZBM 912 ADDM R2 R5,PSSUMCPU accumulate CPU time used (for scheduling) 02BDA B8974810 2 5 BASE 913 ADDB R2 R5,PSTIMEUSED account the time used (for billing) 02BDB 68974811 2 5 BASE 914 UCPR R2 R5,PSTIMLIM over the limit? 02BDC FE0A2BF0 915 JLE SDTIMEOK jump if within time limit 02BDD 60094116 0 5 ZBM 916 LD R0 R5,PSCURRPROC get current UPC pointer 02BDE 5C080610 0 ZBM 917 CMZ R0,UPCNTLMODE is he running in control mode? 02BDF FE0C2BF0 918 JNE SDTIMEOK CM doesn't get cuts 02BE0 60095F12 0 5 ZBM 919 LD R0 R5,PSPROCCB get the PCB pointer 02BE1 5C081813 0 ZBM 920 CMZ R0,PCSYSPROC is this a system process? 02BE2 FE0C2BF0 921 JNE SDTIMEOK if so, no time outs. 02BE3 60840021 2 IMM 922 LD R2 UINTTIMCUT 02BE4 60C40000 3 IMM 923 LD R3 0 02BE5 DC4035B5 924 CALLNP UERRSETY tell the user his error 925 * \ / 926 927 ********************************************************************************** 928 * * 929 * So that one getting a time cut can programatically * 930 * recover and set another limit, we here give a little grace * 931 * by allowing one more second after a time cut. This is * 932 * usually used by a program monitor to recover from the error * 933 * and either continue the program (after the monitoring * 934 * sample has been taken) or stop the program and converse * 935 * with the user. * 936 * * 937 ********************************************************************************** 938 939 * \ / 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 505 (SCHED) F 29 Scheduler 02BE6 60C95F13 3 5 ZBM 940 LD R3 R5,PSUSERLIMP R3=>ULB we are using 02BE7 6096C808 2 3 BASE 941 LD R2 R3,ULTIMLIM R2=account time limit 02BE8 FA882BEE 2 942 JLTZ R2 NOLIMACCT jump if the account has no limit 02BE9 1096C809 2 3 BASE 943 SUB R2 R3,ULTIMUSD R2=time available to account 02BEA 60574811 1 5 BASE 944 LD R1 R5,PSTIMLIM R1=time used so far in this session 02BEB 144403E8 1 IMM 945 DIV R1 MSECSS R1=time used in session in seconds 02BEC 64528000 1 2 REG 946 CPR R1 R2 is there more time left on the account? 02BED FE062BF0 947 JGE SDTIMEOK jump if no more time to give out 00002BEE 948 NOLIMACCT LABEL 02BEE 600403E8 0 IMM 949 LD R0 1*MSECSS give him one more second 02BEF 98174811 0 5 BASE 950 ADDM R0 R5,PSTIMLIM 951 * \ / 952 00002BF0 953 SDTIMEOK LABEL 02BF0 DC404549 954 CALLNP GETDATE get the current time 02BF1 E457480E 1 5 BASE 955 ST R1 R5,PSSHUTTIME and save to see how long he stays shut down 956 02BF2 5D1F8001 6 STAK 957 LEAVE POP return 958 * --- 959 960 END SHACCT subroutine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 506 (SCHED) F 29 Scheduler 962 963 ********************************************************************************** 964 * * 965 * TESTTRUBL * 966 * This routine may be entered when a user is about to be * 967 * suspended. It decreases any grace that the user might * 968 * have, then attempts to check for thrashing or impending * 969 * thrashing. We compare this users priority to the count of * 970 * idle pages less MMIDLETTMIN. We do nothing if this users * 971 * priority is smaller. This means that low priority (bigger * 972 * number!) users get turned off early so that background jobs * 973 * get out ot the way of interactive jobs as the system load * 974 * increases. If there is still sufficient memory available, * 975 * we exit immediately, otherwise, we calculate a badness * 976 * level for this user. We now check to see if the number of * 977 * idle pages has fallen below MMIDLABSMIN. If so, we * 978 * unconditionally shut down this user. This is to prevent * 979 * exhausting the idle page list. If we still have enough * 980 * idle pages, we compare this users badness level to all * 981 * other users in the runnable queue. If our guy is the * 982 * worst, we take away his pages and place him into the * 983 * trouble maker queue. If someone exists in the runnable * 984 * queue who is much worse, we let our current guy go. Also, * 985 * even if there is no one in the runnable queue, we will shut * 986 * down the current user if another CPU is running a process. * 987 * Callers should allow for testtrubl taking away pages. * 988 * The current version does not. * 989 * TESTTRUBL might not return to the caller, but can go * 990 * directly to the dispatcher. You'd better have your last * 991 * will and testament all in order before calling us. Abandon * 992 * all hope, ye who enter here. * 993 * Call with: * 994 * No lists locked! Interrupts off! * 995 * CPPSA => current process PSA * 996 * SP = stack pointer * 997 * CALLNP TESTTRUBL * 998 * * 999 * Eats R0:R4. * 1000 * Stack required = 13. * 1001 * 1 + max ( HOWBAD (1), LOCKWAIT (0), PFUPCAGE (1), * 1002 * SHUTDOWN (12), SHUTRUN (11) ) * 1003 * * 1004 ********************************************************************************** 1005 1006 BLOCK TESTTRUBL subroutine 1007 ENTRY TESTTRUBL 1008 1009 BEGFRAME 1010 ENDFRAME 1011 02BF3 DD5F8001 6 STAK 1012 TESTTRUBL ENTRNP PUSH 02BF4 60800412 2 1013 LD R2 CPPSA get the current PSA pointer 02BF5 5C168004 2 CACH 1014 CMZ R2,PSGRACE check for a zero grace 02BF6 FE022BF8 1015 JEQ HOWBGOK jump if grace exhausted 02BF7 D0568004 2 CACH 1016 DEC R2,PSGRACE reduce the amount of grace 00002BF8 1017 HOWBGOK LABEL 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 507 (SCHED) F 29 Scheduler 02BF8 60089830 0 2 ZBM 1018 LD R0 R2,PSPRIORITY fetch this users priority 02BF9 18002543 0 1019 ADD R0 MMIDLETTMIN ensure minimum number of idle pages 02BFA 18001F18 0 1020 ADD R0 DISKRBUSY reads are going to use idle pages 02BFB 64001DDA 0 1021 CPR R0 PPIDLCOUNT check for enough clean idle pages 02BFC FE082C1D 1022 JLT TESTTEXIT if more idle pages, no problem 1023 1024 * We are short of idle pages. We calculate this users 1025 * badness level. Even if we skip the comparison with other 1026 * system users and shut down this user directly, we need 1027 * the badness level to determine a sentence. 1028 1029 * current users PSA pointer in R2 02BFD DC402C2A 1030 CALLNP HOWBAD check to see how bad he is 02BFE 18002548 0 1031 ADD R0 MMHYSPARM add a hysteresis factor 02BFF 61120000 4 0 REG 1032 LD R4 R0 copy to a holding register 1033 1034 * We already know that we are running a little short 1035 * of memory. We have now calculated this users badness 1036 * level. Check to see if our memory shortage is to the 1037 * desperation stage. 1038 02C00 60001DDA 0 1039 LD R0 PPIDLCOUNT get number of idle pages 02C01 10001F18 0 1040 SUB R0 DISKRBUSY subtract the disk read count 02C02 64002544 0 1041 CPR R0 MMIDLABSMIN compare against absolute minimum allowed 02C03 FE0A2C11 1042 JLE TTRLOCKUP if too few, just do the shutdown 1043 1044 * Now check for a user who is a worse offender 1045 1046 PLOCK SQLOCKS(NQRUNNABLE) call to lock the runnable queue 02C04 0CC00000 1046 IOFF 02C05 D1C01DBB 1046 SETT SQLOCKS(NQRUNNABLE) 02C06 FE0C2C08 1046 JNE MA(2+DISPW MA 0) 02C07 DC40308B 1046 CALLNP LOCKWAIT 02C08 38401DAA 1 1047 LEA R1 SQRUNNABLE pointer to runnable queue 02C09 FA742C1E 1 1048 LJZA R1 TTRODD jump if no one in queue 00002C0A 1049 TTXAMLOP LABEL 02C0A 60885F13 2 1 ZBM 1050 LD R2 R1,PCPSADRS get PSA pointer 02C0B DC402C2A 1051 CALLNP HOWBAD see how bad this guy is 02C0C 64130000 0 4 REG 1052 CPR R0 R4 do the comparison 02C0D FE062C1B 1053 JGE TESTAEXIT jump if guy in runnable queue worse 02C0E FA762C0A 1 1054 LJNA R1 TTXAMLOP go examine the entire queue 1055 PUNLOCK SQLOCKS(NQRUNNABLE) call to release the runnable queue 02C0F EC001DBB 1055 STZ SQLOCKS(NQRUNNABLE) 02C10 0C800000 1055 ION 1056 * \ / 1057 1058 ********************************************************************************** 1059 * Come here to turn off this guy. We adjust his trouble * 1060 * maker history data. * 1061 * The INC and ADDM instructions may overflow the fields * 1062 * available. This is tough. This means that the system is so * 1063 * loaded that the errors in these parameters will have a * 1064 * negligible effect on overall system performance. * 1065 ********************************************************************************** 1066 1067 * R4 = badness level 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 508 (SCHED) F 29 Scheduler 1068 * \ / 00002C11 1069 TTRLOCKUP LABEL 02C11 60800412 2 1070 LD R2 CPPSA get the current PSA pointer 02C12 60089830 0 2 ZBM 1071 LD R0 R2,PSPRIORITY get this users priority level 02C13 1C002546 0 1072 MUL R0 MMPRRATIO adjust by priority ratio 02C14 180880F2 0 2 ZBM 1073 ADD R0 R2,PSWSSIZE get number of pages 02C15 18089071 0 2 ZBM 1074 ADD R0 R2,PSPFFREQ add page fault frequency 1075 * this number represents the amount of 1076 * grace that we think that this user 1077 * needs to get going. 02C16 98168004 0 2 CACH 1078 ADDM R0 R2,PSGRACE assign grace for next try 1079 * \ / 1080 1081 ********************************************************************************** 1082 * Shutdown knows enough to rip off virtually all of * 1083 * this guys pages. * 1084 ********************************************************************************** 1085 1086 * \ / 02C17 60C41DB9 3 IMM 1087 LD R3 ADR SQTROUBLE pointer to queue head 02C18 DC002B58 1088 CALL SHUTDOWN turn off this guy 02C19 40530000 4 REG 1089 PARVL R4 length of sentence equivalent to 1090 * amount of trouble 02C1A FE0E28B7 1091 JMP DISPATCH exit directly to the dispatcher 1092 * --- sure hope we got some pages 1093 00002C1B 1094 TESTAEXIT LABEL 1095 PUNLOCK SQLOCKS(NQRUNNABLE) call to release the runnable queue 02C1B EC001DBB 1095 STZ SQLOCKS(NQRUNNABLE) 02C1C 0C800000 1095 ION 00002C1D 1096 TESTTEXIT LABEL 02C1D 5D1F8001 6 STAK 1097 LEAVE POP return to the caller 1098 * --- 1099 1100 ********************************************************************************** 1101 * We arrive here with a user who has no runnable * 1102 * competition. If MSWAIT competition exists, we turn this * 1103 * guy off. If another CPU is running, we turn this guy off. * 1104 * Otherwise, we just turn him loose. * 1105 ********************************************************************************** 1106 00002C1E 1107 TTRODD LABEL 1108 PUNLOCK SQLOCKS(NQRUNNABLE) call to release the runnable queue 02C1E EC001DBB 1108 STZ SQLOCKS(NQRUNNABLE) 02C1F 0C800000 1108 ION 02C20 5C001DAB 1109 CMZ SQMSWAIT check for users waiting for MS 02C21 FE0C2C11 1110 JNE TTRLOCKUP jump if so, lock up this guy 02C22 60001D0B 0 1111 LD R0 BUSYCPUS check for other CPUs 02C23 64040001 0 IMM 1112 CPR R0 1 check for just us 02C24 FE0C2C11 1113 JNE TTRLOCKUP some other CPU is accomplishing something, 1114 * let that CPU have priority 1115 * \ / 1116 1117 ********************************************************************************** 1118 * * 1119 * This is the only user on the system, but he is * 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 509 (SCHED) F 29 Scheduler 1120 * encountering memory problems. We allow him to go back * 1121 * to running. If he keeps requesting pages, he will get * 1122 * shutdown when the number of idle pages hits MMIDLABSMIN. * 1123 * We don't let him go directly. Instead, we age some of * 1124 * his pages and send him through a shutdown to remove any * 1125 * pages that look even slightly unused. * 1126 * * 1127 ********************************************************************************** 1128 1129 * \ / 02C25 61400412 5 1130 LD R5 CPPSA get PSA pointer 02C26 60040008 0 IMM 1131 LD R0 8 get age value 02C27 DC4025B6 1132 CALLNP PFUPCAGE call to distribute aging to all UPCs 02C28 DC402B88 1133 CALLNP SHUTRUN requeue in runnable queue 02C29 FE0E28B7 1134 JMP DISPATCH and let the dispatcher run him 1135 * --- 1136 1137 END TESTTRUBL subroutine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 510 (SCHED) F 29 Scheduler 1139 1140 ********************************************************************************** 1141 * * 1142 * HOWBAD. * 1143 * This routine calculates the offensiveness of the user * 1144 * whose PSA pointer is in R2. Bigger numbers are more * 1145 * offensive. MMLOCKPARM is intended to be negative and PSGRACE * 1146 * is subtracted. Other items are positive. * 1147 * * 1148 * LD R2 => PSA * 1149 * CALLNP HOWBAD * 1150 * ST R0 offensiveness level * 1151 * * 1152 * Eats R0. * 1153 * Stack required = 1. * 1154 * * 1155 ********************************************************************************** 1156 1157 BLOCK HOWBAD subroutine 1158 ENTRY HOWBAD 1159 1160 BEGFRAME 1161 ENDFRAME 1162 02C2A DD5F8001 6 STAK 1163 HOWBAD ENTRNP PUSH 02C2B 60088230 0 2 ZBM 1164 LD R0 R2,PSLOCKCNTR get count of critical regions locked 02C2C 1C002547 0 1165 MUL R0 MMLOCKPARM scale up to size 02C2D 18089830 0 2 ZBM 1166 ADD R0 R2,PSPRIORITY check the users priority 02C2E 1C002546 0 1167 MUL R0 MMPRRATIO convert to page equivalent 02C2F 180880F2 0 2 ZBM 1168 ADD R0 R2,PSWSSIZE add actual working set size 02C30 18089071 0 2 ZBM 1169 ADD R0 R2,PSPFFREQ add the page fault frequency 02C31 10168004 0 2 CACH 1170 SUB R0 R2,PSGRACE allow for grace 02C32 54040000 0 IMM 1171 MAX R0 0 ensure negs don't go through 02C33 5D1F8001 6 STAK 1172 LEAVE POP exit 1173 * --- 1174 1175 END HOWBAD subroutine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 511 (SCHED) F 29 Scheduler 1177 1178 ********************************************************************************** 1179 * * 1180 * TAKEOLD * 1181 * This search removes unused pages from a user who does * 1182 * not have the page file loaded. What we do is calculate two * 1183 * ages, one based on working set size and the second based on * 1184 * system resources, and from there we use the smallest value. * 1185 * The threshold age based on system resources is calculated * 1186 * as follows: (.25*+ * 1187 * )*MMAGEINC/MMAGEINCD+MMAGE- * 1188 * . The threshold age based on working set * 1189 * size is calculated as (MMAXWSX-)*2. It * 1190 * then removes any older PAL from the list it was given. * 1191 * Note also that the greatest PAL age for the given list is a * 1192 * passed parameter, this prevents unnecessary scans. * 1193 * Call: * 1194 * Interrupts off! * 1195 * Only MSQIN and an SQ may be locked * 1196 * R1 => pre-aging applied to this list * 1197 * R5 => PSA * 1198 * SP => stack pointer * 1199 * page file must be unloaded * 1200 * list pointer in PAL ( ADR WSX or ADR VASP ) * 1201 * CALL TAKEOLD * 1202 * PARL
* 1203 * * 1204 * Eats R0:R2, PAL. * 1205 * Stack required = 8. * 1206 * 4 + max ( DISCARDPAL(4) ) * 1207 * * 1208 ********************************************************************************** 1209 1210 BLOCK TAKEOLD subroutine 1211 ENTRY TAKEOLD 1212 1213 BEGFRAME 00178801 6 BASE 1214 TAKEPSA BSS 1 holds PSA pointer 00178802 6 BASE 1215 TAKEAGE BSS 1 age criteria value 00178803 6 BASE 1216 TAKER3 BSS 1 holds callers R3 1217 ENDFRAME 1218 02C34 DD1F8004 6 STAK 1219 TAKEOLD ENTR PUSH 02C35 C0128000 2 REG 1220 STPL R2 address of the max PAL age 1221 * \ / calculate threshold value 02C36 60001F19 0 1222 LD R0 DISKWBUSY load the count of pages on their way out 02C37 600A01E0 0 0 CBM 1223 LD R0 R0/BITS 0:29 credit one forth as available 02C38 18001DDA 0 1224 ADD R0 PPIDLCOUNT add in the count of available clean pages 02C39 1C002540 0 1225 MUL R0 MMAGEINC more lenient if more pages 02C3A 14002541 0 1226 DIV R0 MMAGEINCD allow for fractional values 02C3B 1800253F 0 1227 ADD R0 MMAGE and add in the minimum that we will take 02C3C 10124000 0 1 REG 1228 SUB R0 R1 allow for extra age 1229 * note that the allowable age 1230 * may now be negative! This 1231 * is acceptable and causes all 1232 * PALs to be removed. 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 512 (SCHED) F 29 Scheduler 02C3D 60402542 1 1233 LD R1 MMAXWSX largest possible working set size 02C3E 104940F2 1 5 ZBM 1234 SUB R1 R5,PSWSSIZE subtract off current working set size 02C3F 500A4200 0 1 CBM 1235 MIN R0 R1/BITS 1:0 use lesser of two values 02C40 64168400 0 2 @R 1236 CPR R0 @R2 compare to the largest age 02C41 FE042C55 1237 JGT TAKEDONE jump if no PALs to discard 02C42 E4168400 0 2 @R 1238 ST R0 @R2 this age now becomes the max 02C43 E4178802 0 6 BASE 1239 ST R0 SP,TAKEAGE save away for later 02C44 E4D78803 3 6 BASE 1240 ST R3 SP,TAKER3 save callers register 02C45 E5578801 5 6 BASE 1241 ST R5 SP,TAKEPSA save PSA pointer 1242 * \ / 00002C46 1243 TADVANCE LABEL 02C46 FB382C53 45 1244 RLJZA PAL TAKEEXIT link to next, exit if done 00002C47 1245 TALOOK LABEL 02C47 640900E2 0 4 ZBM 1246 CPR R0 PAL,PAGEAGE check the age of this element 02C48 FE062C46 1247 JGE TADVANCE jump back if this element stays 02C49 5C091210 4 ZBM 1248 CMZ PAL,PALOCK check the locked bit 02C4A FE0C2C46 1249 JNE TADVANCE MUST not remove locked pages! 1250 * \ / remove this element 02C4B 60091F10 0 4 ZBM 1251 LD R0 PAL,PALINK get the continuing link 02C4C E4095F10 0 5 ZBM 1252 ST R0 R5,PALINK jumper list around this element 02C4D DC402E15 1253 CALLNP DISCARDPAL get rid of this PAL 02C4E 60178801 0 6 BASE 1254 LD R0 SP,TAKEPSA get PSA pointer for victim process 02C4F D04800F2 0 ZBM 1255 DEC R0,PSWSSIZE indicate working set just shrunk 02C50 61095F10 4 5 ZBM 1256 LD PAL R5,PALINK get pointer to next element 02C51 60178802 0 6 BASE 1257 LD R0 SP,TAKEAGE get back the age value 02C52 FB322C47 4 1258 JNZA PAL TALOOK jump back if good element 1259 * \ / end of list 00002C53 1260 TAKEEXIT LABEL 02C53 60D78803 3 6 BASE 1261 LD R3 SP,TAKER3 restore callers register 02C54 61578801 5 6 BASE 1262 LD R5 SP,TAKEPSA restore register 1263 * \ / 00002C55 1264 TAKEDONE LABEL 02C55 5D1F8004 6 STAK 1265 LEAVE POP return to caller 1266 * --- 1267 1268 END TAKEOLD subroutine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 513 (SCHED) F 29 Scheduler 1270 1271 ********************************************************************************** 1272 * * 1273 * This routine loops through all VASP and WSX lists * 1274 * for a user that's not running and takes unused pages. * 1275 * This calls TAKEOLD to perform the calculation for each * 1276 * list. We do the working set extension list first because * 1277 * it is less important to the process and pages freed up * 1278 * from it may increase the age allowed in the VASP list! * 1279 * Call: * 1280 * (Interrupts off!) * 1281 * Only MSQIN and an SQ can be locked * 1282 * R5 => PSA * 1283 * SP = stack pointer * 1284 * page file must be unloaded * 1285 * CALLNP TAKEPAGES * 1286 * * 1287 * Eats R0:R3, PAL. * 1288 * Stack required = 9. * 1289 * 1 + max ( TAKEOLD (8) ) * 1290 * * 1291 ********************************************************************************** 1292 1293 BLOCK TAKEPAGES subroutine 1294 ENTRY TAKEPAGES 1295 1296 BEGFRAME 1297 ENDFRAME 1298 02C56 DD5F8001 6 STAK 1299 TAKEPAGES ENTRNP PUSH 02C57 60895F15 2 5 ZBM 1300 LD R2 R5,PSPROCLIST get pointer to list of UPC's 00002C58 1301 TAKEWSXLP LABEL 02C58 60D28000 3 2 REG 1302 LD R3 R2 put UPC pointer in appropriate register 02C59 3916C810 4 3 BASE 1303 LEA PAL R3,UPCWSX get pointer to WSX list 02C5A 6048C0F7 1 3 ZBM 1304 LD R1 R3,UPXAGEWSX get extra age for WSX list 02C5B DC002C34 1305 CALL TAKEOLD try to take some pages 02C5C 4008C0F5 3 ZBM 1306 PARL R3,UPCMAGEW max age of PAL in WSX list 02C5D 6088DF10 2 3 ZBM 1307 LD R2 R3,UPCSONPTR any under process to rip off 02C5E FAB22C58 2 1308 JNZA R2 TAKEWSXLP attempt to get more pages 00002C5F 1309 TWSXBROLP LABEL 02C5F 6088DF16 2 3 ZBM 1310 LD R2 R3,UPCBROPTR any brother processes to check 02C60 FAB22C58 2 1311 JNZA R2 TAKEWSXLP jump if they exists 02C61 60C8DF17 3 3 ZBM 1312 LD R3 R3,UPCDADPTR get our immediate overprocess 02C62 FAF22C5F 3 1313 JNZA R3 TWSXBROLP if not zero then not finished 1314 * \ / 1315 02C63 60895F15 2 5 ZBM 1316 LD R2 R5,PSPROCLIST get pointer to list of UPC's 00002C64 1317 TAKEVASPLP LABEL 02C64 60D28000 3 2 REG 1318 LD R3 R2 move UPC pointer into register 3 02C65 3916C80F 4 3 BASE 1319 LEA PAL R3,UPCVASP get pointer to VASP list 02C66 6048C0F6 1 3 ZBM 1320 LD R1 R3,UPXAGEVASP get extra age for VASP list 02C67 DC002C34 1321 CALL TAKEOLD try to take some pages 02C68 4008C0F4 3 ZBM 1322 PARL R3,UPCMAGEV max age of PAL in VASP list 02C69 6088DF10 2 3 ZBM 1323 LD R2 R3,UPCSONPTR any under process to rip off 02C6A FAB22C64 2 1324 JNZA R2 TAKEVASPLP attempt to get more pages 00002C6B 1325 TVASPBROLP LABEL 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 514 (SCHED) F 29 Scheduler 02C6B 6088DF16 2 3 ZBM 1326 LD R2 R3,UPCBROPTR any brother processes to check 02C6C FAB22C64 2 1327 JNZA R2 TAKEVASPLP jump if they exists 02C6D 60C8DF17 3 3 ZBM 1328 LD R3 R3,UPCDADPTR get our immediate overprocess 02C6E FAF22C6B 3 1329 JNZA R3 TVASPBROLP if not zero then not finished 1330 * \ / 1331 02C6F 5D1F8001 6 STAK 1332 LEAVE POP 1333 * --- 1334 1335 END 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 515 (SCHED) F 29 Scheduler 1337 1338 ********************************************************************************** 1339 * * 1340 * WHICHHUNT * 1341 * Routine to clean up a single queue. It removes aged * 1342 * pages from the VASP and WSX lists of each user in the * 1343 * indicated queue. * 1344 * Call: * 1345 * SP = stack pointer * 1346 * CALLNP WHICHHUNT call to free up pages * 1347 * ADR
* 1348 * * 1349 * * 1350 * Eats R0:R5. * 1351 * Stack required = 10. * 1352 * 1 + max ( LOCKWAIT (0), MAPINMEM (3), MAPOUTMEM (1), * 1353 * PFUPCAGE (1), TAKEPAGES (9) ) * 1354 * * 1355 ********************************************************************************** 1356 1357 BLOCK WHICHHUNT subroutine 1358 ENTRY WHICHHUNT 1359 1360 BEGFRAME 1361 ENDFRAME 1362 02C70 DD5F8001 6 STAK 1363 WHICHHUNT ENTRNP PUSH 02C71 6157C800 5 7 BASE 1364 LD R5 R7,0 get the SQ head pointer 1365 PLOCK R5,0(NQUEUES) call to lock the appropriate queue 02C72 0CC00000 1365 IOFF 02C73 D1D74811 5 BASE 1365 SETT R5,0(NQUEUES) 02C74 FE0C2C76 1365 JNE MA(2+DISPW MA 0) 02C75 DC40308B 1365 CALLNP LOCKWAIT 02C76 FB742C8C 5 1366 LJZA R5 WHMLTQ jump out if no queue entries 1367 * \ / 1368 1369 * mark all PCBs as cleanable 00002C77 1370 WHMLXU LABEL 02C77 EDC95010 5 ZBM 1371 STW R5,PCQCLNMARK mark this PCB to be cleaned 02C78 FB762C77 5 1372 LJNA R5 WHMLXU scan on in the queue 1373 * \ / 1374 1375 * clean all cleanable PCBs 00002C79 1376 WHPNXU LABEL 02C79 6157C800 5 7 BASE 1377 LD R5 R7,0 retrieve the queue head pointer 1378 PUNLOCK R5,0(NQUEUES) call to unlock the lock array 02C7A EC174811 5 BASE 1378 STZ R5,0(NQUEUES) 02C7B 0C800000 1378 ION 1379 * \ / 1380 1381 * (leave queue unlocked for a bit so others can 1382 * [if they're fast] get in and we don't hog the queue) 02C7C 60440001 1 IMM 1383 LD R1 1 marker that we will look for 1384 1385 PLOCK R5,0(NQUEUES) call to lock the appropriate queue 02C7D 0CC00000 1385 IOFF 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 516 (SCHED) F 29 Scheduler 02C7E D1D74811 5 BASE 1385 SETT R5,0(NQUEUES) 02C7F FE0C2C81 1385 JNE MA(2+DISPW MA 0) 02C80 DC40308B 1385 CALLNP LOCKWAIT 02C81 3C495010 1 5 ZBM 1386 LSRCH R1 R5,PCQCLNMARK look for a not yet cleaned user 02C82 FE0C2C8B 1387 JNE WHCLDONE jump if entire queue now cleaned 02C83 EC095010 5 ZBM 1388 STZ R5,PCQCLNMARK indicate user now cleaned 1389 02C84 61495F13 5 5 ZBM 1390 LD R5 R5,PCPSADRS fetch pointer to associated PSA 02C85 DC0025EB 1391 CALL MAPINMEM map in the users virtual free storage 02C86 40534000 5 REG 1392 PARVL R5 pointer to the PSA 02C87 60002545 0 1393 LD R0 MMIDLSPEED see how fast pages age 02C88 DC4025B6 1394 CALLNP PFUPCAGE call to distribute aging to all UPCs 1395 02C89 DC402C56 1396 CALLNP TAKEPAGES take away unused pages 02C8A FE0E2C79 1397 JMP WHPNXU go do another scan of the queue 1398 * --- 1399 00002C8B 1400 WHCLDONE LABEL done with entire queue 02C8B DC4025FC 1401 CALLNP MAPOUTMEM map out users free storage 1402 * \ / 1403 00002C8C 1404 WHMLTQ LABEL 02C8C 6157C800 5 7 BASE 1405 LD R5 R7,0 retrieve the queue head pointer 1406 PUNLOCK R5,0(NQUEUES) call to unlock the lock array 02C8D EC174811 5 BASE 1406 STZ R5,0(NQUEUES) 02C8E 0C800000 1406 ION 02C8F 19C40001 7 IMM 1407 ADD R7 1 advance return over the parameter 02C90 5D1F8001 6 STAK 1408 LEAVE POP go on home 1409 * --- 1410 1411 END WHICHHUNT subroutine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 517 (SCHED) F 29 Scheduler 1413 1414 ********************************************************************************** 1415 * * 1416 * TICK - SHORT INTERVAL TIME INTERRUPT CODE * 1417 * This code is to be activated at regular intervals * 1418 * (tentatively set at two seconds). It: * 1419 * 1) ages pages of users in inactive queues, * 1420 * 2) adjust the CPU scheduling variables in the runnable queue * 1421 * 3) examines the trouble maker queue and releases * 1422 * processes at the end of their jail term. * 1423 * Terms are normally fixed at the time of incarceration * 1424 * but may be reduced in the case of record harvests. * 1425 * 4) do I/O timeouts * 1426 * * 1427 * Eats R0:R3, PAL, R5. * 1428 * Stack required = 11. * 1429 * 1 + max ( FIXSKVARS (1), LOCKLIST (1), LOCKWAIT (0), * 1430 * MAPINMEM (3), SETRUNNING (2), TIMESET (2), * 1431 * UNLOCKLIST(1), WHICHHUNT (10) ) * 1432 * * 1433 ********************************************************************************** 1434 1435 BLOCK TICK subroutine 1436 ENTRY TICK 1437 1438 BEGFRAME 1439 ENDFRAME 1440 02C91 DD5F8001 6 STAK 1441 TICK ENTRNP PUSH 02C92 DC0044F8 1442 CALL TIMESET set up the next tick 02C93 434407D0 IMM 1443 PARV2 2*MSECSS pass time interval 02C94 41440000 IMM 1444 PARV 0 no particular CPU 02C95 41002C91 1445 PAR TICK code to process ticks 02C96 40440000 IMM 1446 PARVL 0 parameter is don't care 1447 1448 ********************************************************************************** 1449 * * 1450 * WHICH hunt begins here. * 1451 * The Grim Reaper * 1452 * Call the WHICHHUNT for all allowable queues. * 1453 * Note that since each call may free a few pages, * 1454 * thereby modifying the oldest age allowed, we do last the * 1455 * queues likely to contain the more valuable processes. * 1456 * All queues that may contain stopped processes with * 1457 * pages must be cleaned in order to avoid deadlocks ( no idle * 1458 * pages available, but no one able to free up what they have * 1459 * until they get a MS transfer ). This especially includes * 1460 * the MSWAIT queue. * 1461 * * 1462 ********************************************************************************** 1463 02C97 DC402C70 1464 CALLNP WHICHHUNT call for cleanup 02C98 00001DB8 1465 ADR SQSTOPWAIT all stopped processes 1466 02C99 DC402C70 1467 CALLNP WHICHHUNT call for cleanup of 02C9A 00001DB7 1468 ADR SQTIMEWAIT all processes waiting on timer 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 518 (SCHED) F 29 Scheduler 1469 02C9B DC402C70 1470 CALLNP WHICHHUNT call for cleanup of 02C9C 00001DB1 1471 ADR SQFILEWAIT all processes waiting on files 1472 02C9D DC402C70 1473 CALLNP WHICHHUNT call for cleanup of 02C9E 00001DB0 1474 ADR SQLOCKWAIT all processes waiting on a .LOCK 1475 02C9F DC402C70 1476 CALLNP WHICHHUNT call for cleanup of 02CA0 00001DB4 1477 ADR SQUNITWAIT all processes waiting on a unit 1478 02CA1 DC402C70 1479 CALLNP WHICHHUNT call for cleanup of 02CA2 00001DB3 1480 ADR SQMSGWAIT all processes waiting on a message 1481 02CA3 DC402C70 1482 CALLNP WHICHHUNT call for cleanup of 02CA4 00001DB2 1483 ADR SQPATHWAIT all processes waiting on a .PATH 1484 02CA5 DC402C70 1485 CALLNP WHICHHUNT call for cleanup of 02CA6 00001DAC 1486 ADR SQDIOWAIT this queue 1487 02CA7 DC402C70 1488 CALLNP WHICHHUNT call for cleanup of 02CA8 00001DB5 1489 ADR SQTERMWAIT this queue 1490 02CA9 DC402C70 1491 CALLNP WHICHHUNT call for cleanup of 02CAA 00001DB6 1492 ADR SQTRMOWAIT this queue 1493 02CAB DC402C70 1494 CALLNP WHICHHUNT call for cleanup of 02CAC 00001DAD 1495 ADR SQDIRWAIT this queue 1496 02CAD DC402C70 1497 CALLNP WHICHHUNT call for cleanup of 02CAE 00001DAF 1498 ADR SQIDXWAIT this queue 1499 02CAF DC402C70 1500 CALLNP WHICHHUNT call for cleanup of 02CB0 00001DAE 1501 ADR SQADTWAIT this queue 1502 02CB1 D0401D13 1503 DEC TSMSAGE time to age pages in MSWAIT 02CB2 FE0C2CB7 1504 JNE NOAGEMS jump if not time 02CB3 DC402C70 1505 CALLNP WHICHHUNT call for cleanup of 02CB4 00001DAB 1506 ADR SQMSWAIT this queue 02CB5 6004000F 0 IMM 1507 LD R0 TSMSTIME time wait before aging MSWAIT queue 02CB6 E4001D13 0 1508 ST R0 TSMSAGE reset out counter 1509 * \ / 1510 00002CB7 1511 NOAGEMS LABEL 02CB7 0CC00000 1512 IOFF we can not be interrupt here 02CB8 DC0025EB 1513 CALL MAPINMEM map in the last guys virtual free storage lists 02CB9 40400412 1514 PARVL CPPSA PSA pointer, if any 02CBA 0C800000 1515 ION restore interrupts 1516 1517 ********************************************************************************** 1518 * Calculate the current load factor and combine it with * 1519 * the previous load factor to create a running average value. * 1520 ********************************************************************************** 1521 02CBB DC003096 1522 CALL LOCKLIST lock for scan of PCBs 02CBC 40001EB2 1523 PARL PCNTLLOCK 02CBD 61001EB1 4 1524 LD PCB PCONTROL get the list head 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 519 (SCHED) F 29 Scheduler 02CBE EC128000 2 REG 1525 STZ R2 initialize accumulator 02CBF FB302CC4 4 1526 JZA PCB LFDONE jump out if no more to scan 00002CC0 1527 LFLOOP LABEL 02CC0 60091260 0 4 ZBM 1528 LD R0 PCB,PCQUEUE get the queue number of this process 02CC1 18B02CFC 2 0 @ 1529 ADD R2 @LFWEIGHTS(R0) give it appropriate importance 02CC2 61091F14 4 4 ZBM 1530 LD PCB PCB,PCNXTCB get the (non-standard) forward pointer 02CC3 FB322CC0 4 1531 JNZA PCB LFLOOP go back to process all processes 00002CC4 1532 LFDONE LABEL 02CC4 DC0030A4 1533 CALL UNLOCKLIST release the list 02CC5 40001EB2 1534 PARL PCNTLLOCK 02CC6 1C802CF8 2 1535 MUL R2 LFNVS multiply by 'new' weight 02CC7 60401DD8 1 1536 LD R1 SCALEDLF get previous value 02CC8 EC120000 0 REG 1537 STZ R0 make double word 02CC9 1E002CF6 01 1538 MUL2 R0 LFOVS multiply by 'old' (decaying) weight 02CCA 18128000 0 2 REG 1539 ADD R0 R2 combine old and new 02CCB E4001DD8 0 1540 ST R0 SCALEDLF and save the newly found value 02CCC D00A0110 0 CBM 1541 INC R0/BITS 0:16 round it up 02CCD 600A0100 0 0 CBM 1542 LD R0 R0/BITS 0:15 extract integer part 02CCE E4001DD7 0 1543 ST R0 LOADFACT and save as real load factor 1544 * \ / 1545 1546 ********************************************************************************** 1547 * Adjust the CPU time scheduling variables in the * 1548 * running and runnable queues. * 1549 ********************************************************************************** 1550 02CCF 60C41DA9 3 IMM 1551 LD R3 ADR SQRUNNING => runnable queue 1552 PLOCK SQLOCKS(NQRUNNING) get access to the runnable queue 02CD0 0CC00000 1552 IOFF 02CD1 D1C01DBA 1552 SETT SQLOCKS(NQRUNNING) 02CD2 FE0C2CD4 1552 JNE MA(2+DISPW MA 0) 02CD3 DC40308B 1552 CALLNP LOCKWAIT 02CD4 DC402CFD 1553 CALLNP FIXSKVARS call to fix the run queue priority 1554 PUNLOCK SQLOCKS(NQRUNNING) release the queue 02CD5 EC001DBA 1554 STZ SQLOCKS(NQRUNNING) 02CD6 0C800000 1554 ION 1555 02CD7 60C41DAA 3 IMM 1556 LD R3 ADR SQRUNNABLE => runnable queue 1557 PLOCK SQLOCKS(NQRUNNABLE) get access to the runnable queue 02CD8 0CC00000 1557 IOFF 02CD9 D1C01DBB 1557 SETT SQLOCKS(NQRUNNABLE) 02CDA FE0C2CDC 1557 JNE MA(2+DISPW MA 0) 02CDB DC40308B 1557 CALLNP LOCKWAIT 02CDC DC402CFD 1558 CALLNP FIXSKVARS call to fix the run queue priority 1559 PUNLOCK SQLOCKS(NQRUNNABLE) release the queue 02CDD EC001DBB 1559 STZ SQLOCKS(NQRUNNABLE) 02CDE 0C800000 1559 ION 1560 1561 ********************************************************************************** 1562 * Scan the troublemaker queue. We look to see how many * 1563 * idle pages we have. If we have so few that the testtrouble * 1564 * routine is still shutting users down, we will just let the * 1565 * jailbirds rot. This has the effect of preventing the * 1566 * release of troublemakers into a known thrashing situation. * 1567 * Otherwise, the sentence remaining (PCQPARM) is decremented * 1568 * by half of the excess count. This has the effect of * 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 520 (SCHED) F 29 Scheduler 1569 * rapidly removing troublemakers when a large number of idle * 1570 * pages have become available. * 1571 * A few interesting effects should be noted. When a * 1572 * very large user is shut down in SQTROUBLE, any dirty pages * 1573 * that he may have are queued up for write. They don't show * 1574 * up in the idle queue until the mass storage driver has had * 1575 * a chance to write them out. Therefore, the count of idle * 1576 * pages will not immediately jump to the higher value, which * 1577 * means that we don't start reducing his sentence immediately * 1578 * either. Just the effect that one may have wanted. * 1579 ********************************************************************************** 1580 1581 * \ / 02CDF 60C41DB9 3 IMM 1582 LD R3 ADR SQTROUBLE => to trouble maker PCB list 1583 PLOCK SQLOCKS(NQTROUBLE) call to lock the trouble maker queue 02CE0 0CC00000 1583 IOFF 02CE1 D1C01DCA 1583 SETT SQLOCKS(NQTROUBLE) 02CE2 FE0C2CE4 1583 JNE MA(2+DISPW MA 0) 02CE3 DC40308B 1583 CALLNP LOCKWAIT 02CE4 60001DDA 0 1584 LD R0 PPIDLCOUNT get idle page count 02CE5 10002543 0 1585 SUB R0 MMIDLETTMIN give no credit for minimum 02CE6 10001F18 0 1586 SUB R0 DISKRBUSY if system busy, let him rot longer 02CE7 54040001 0 IMM 1587 MAX R0 1 limit to positive 02CE8 600A01F0 0 0 CBM 1588 LD R0 R0/BITS 0:30 take half of excess count 00002CE9 1589 NEXTGUY LABEL 02CE9 FAF82CF3 34 1590 RLJZA R3 LISTEND jump at end of list 02CEA B016C801 0 3 BASE 1591 RSBM R0 R3,PCQPARM count down the length of sentence 02CEB FE042CE9 1592 JGT NEXTGUY jump if not down to zero yet 1593 * \ / 1594 1595 ********************************************************************************** 1596 * * 1597 * This user has served his sentence. We put him into * 1598 * the runnable queue and exit. Exitting directly avoids * 1599 * releasing two known troublemakers simultaneously. It also * 1600 * eases meeting the requirement that SQs may only be locked * 1601 * one at a time by a process. It also has the side effect of * 1602 * extending the sentence of users that we didn't get to on * 1603 * this scan. * 1604 * * 1605 ********************************************************************************** 1606 1607 * \ / 02CEC 6008DF10 0 3 ZBM 1608 LD R0 R3,PCQLINK load this guys forward pointer 02CED E4091F10 0 4 ZBM 1609 ST R0 R4,PCQLINK patch list around this guy 1610 PUNLOCK SQLOCKS(NQTROUBLE) call to release the trouble maker queue 02CEE EC001DCA 1610 STZ SQLOCKS(NQTROUBLE) 02CEF 0C800000 1610 ION 02CF0 6112C000 4 3 REG 1611 LD PCB R3 copy the PCB pointer 02CF1 DC402B99 1612 CALLNP SETRUNNING place this user into the running queue 02CF2 5D1F8001 6 STAK 1613 LEAVE POP 1614 * --- 1615 00002CF3 1616 LISTEND LABEL we have reached the end of the queue 1617 PUNLOCK SQLOCKS(NQTROUBLE) call to release the trouble maker queue 02CF3 EC001DCA 1617 STZ SQLOCKS(NQTROUBLE) 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 521 (SCHED) F 29 Scheduler 02CF4 0C800000 1617 ION 02CF5 5D1F8001 6 STAK 1618 LEAVE POP 1619 * --- 1620 1621 * Constants used to compute the load factor. 02CF7 F3330000 1622 LFOVS VFD 0,0F3330000 scaled .95 02CF8 00000CCD 1623 LFNVS VFD 000000CCD scaled .05 02CF9 00000000 1624 LFWEIGHTAB VFDB 4:0,0A,0A,0,0A,0A,0A,0 table of weights 02CFA 00000000 1625 VFDB 4:0,0,0,0,0,0,0,0 02CFA 0000000A 1626 VFDB 4:0A 02CFC 01082CF9 1627 LFWEIGHTS PTR LFWEIGHTAB pointer to table 1628 1629 1630 END TICK subroutine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 522 (SCHED) F 29 Scheduler 1632 1633 ********************************************************************************** 1634 * * 1635 * FIXSKVARS * 1636 * This routine adjusts the scheduling values and * 1637 * increases the queue insertion value for each user in the * 1638 * indicated queue. * 1639 * Call: * 1640 * SP * 1641 * R3 => head of queue to be adjusted * 1642 * queue must be locked * 1643 * CALLNP FIXSKVARS * 1644 * * 1645 * * 1646 * Eats R0:R3. * 1647 * Stack required = 1. * 1648 * * 1649 ********************************************************************************** 1650 1651 BLOCK FIXSKVARS routine 1652 1653 ENTRY FIXSKVARS 1654 1655 BEGFRAME 1656 ENDFRAME 1657 02CFD DD5F8001 6 STAK 1658 FIXSKVARS ENTRNP PUSH 02CFE FAF42D0D 3 1659 LJZA R3 ENDCPUSC jump if at end of list 00002CFF 1660 PROCNEXT LABEL 02CFF 6088DF13 2 3 ZBM 1661 LD R2 R3,PCPSADRS get the PSA pointer 1662 02D00 6008810A 0 2 ZBM 1663 LD R0 R2,PSSUMCPU get the sum of the CPU time used recently 02D01 1C00254A 0 1664 MUL R0 TSHISTLOSS adjust by the aging factor 02D02 600A8180 0 2 CBM 1665 LD R0 R2/BITS 0:23 DIV 256 02D03 E408810A 0 2 ZBM 1666 ST R0 R2,PSSUMCPU and store back 1667 02D04 6008A10A 0 2 ZBM 1668 LD R0 R2,PSSUMSDT get the sum of the time spent shutdown 02D05 1C00254A 0 1669 MUL R0 TSHISTLOSS adjust by the aging factor 02D06 600A8180 0 2 CBM 1670 LD R0 R2/BITS 0:23 DIV 256 02D07 E408A10A 0 2 ZBM 1671 ST R0 R2,PSSUMSDT and store back 1672 02D08 70002549 0 1673 LDN R0 TSAGEVAL get the ageing value used to prevent starvation 02D09 9816C801 0 3 BASE 1674 ADDM R0 R3,PCQPARM reduce the QIV 02D0A FE062D0C 1675 JGE OKTOLINK jump if didn't count negative 02D0B EC16C801 3 BASE 1676 STZ R3,PCQPARM make stop at zero 00002D0C 1677 OKTOLINK LABEL 02D0C FAF62CFF 3 1678 LJNA R3 PROCNEXT go do next process 1679 * \ / 00002D0D 1680 ENDCPUSC LABEL 02D0D 5D1F8001 6 STAK 1681 LEAVE POP return to caller 1682 * --- 1683 1684 END of FIXSKVARS 1685 1686 1687 END misc scheduling routines 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 523 (PPLTWIDDLE) F 30 Scheduler 55 INPUT PPLTWIDDLE PPL manipulation routines 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 524 (PPLTWIDDLE) F 30 PPL List Manipulation Routines 3 4 ********************************************************************************** 5 * * 6 * This block contains several routines for manipulating * 7 * the PPL lists. It will find pages on PPAGE or IDLE lists, * 8 * remove pages, and insert pages. * 9 * * 10 ********************************************************************************** 11 12 BLOCK PPL List Manipulation Routines 13 14 ENTRY FINDPPAGE Find a Page on the PPage List 15 ENTRY GETIDLE find any idle page 16 ENTRY GETIDLEPG Find Specific Idle Page 17 ENTRY PUTPPAGE Put a Page onto the PPage List 18 ENTRY PUTIDLE Put a Page onto the Idle List 19 ENTRY PUTIDLNL Put a Page onto the Idle List, don't lock PPIDLOCK 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 525 (PPLTWIDDLE) F 30 PPL List Manipulation Routines 21 22 ********************************************************************************** 23 * * 24 * FINDPPAGE - Find a Page on the PPage List * 25 * * 26 * This routine will find a requested page on the PPage * 27 * list, and return a pointer to the PPL if it exists. * 28 * * 29 * CALL FINDPPAGE * 30 * PARVL block number * 31 * * 32 * * 33 * * 34 * Eats R0:R2, Sets PPL. * 35 * Stack required = 1. * 36 * 1 + max ( LOCKWAIT (0) ) * 37 * * 38 ********************************************************************************** 39 40 BLOCK FINDPPAGE subroutine 41 42 ENTRY FINDPPAGE 43 44 BEGFRAME 45 ENDFRAME 46 02D0E DD1F8001 6 STAK 47 FINDPPAGE ENTR PUSH 02D0F C0524000 1 REG 48 STPVL R1 R1 = block number 02D10 608A7460 2 1 CBM 49 LD R2 R1/PPHASHFLD get hash field 50 PLOCK PPAGELOCK(R2) lock the right PPage list 02D11 0CC00000 50 IOFF 02D12 D1E41E21 2 50 SETT PPAGELOCK(R2) 02D13 FE0C2D15 50 JNE MA(2+DISPW MA 0) 02D14 DC40308B 50 CALLNP LOCKWAIT 02D15 61241E61 4 2 51 LD PPL PPAGELIST(R2) PPL -> first one on list 02D16 3C570801 1 4 BASE 52 LSRCH R1 PPL,PPBLOCK find right one 02D17 FE022D1B 53 JEQ FOUND jump if found 54 PUNLOCK PPAGELOCK(R2) unlock the list if not found 02D18 EC241E21 2 54 STZ PPAGELOCK(R2) 02D19 0C800000 54 ION 55 * \ / 00002D1A 56 RETURN LABEL 02D1A 5D1F8001 6 STAK 57 LEAVE POP 58 * --- 59 00002D1B 60 FOUND LABEL 02D1B FBE02D1A 7 61 IRJ R7 RETURN page found, make skip return 62 * --- 63 64 END FINDPPAGE subroutine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 526 (PPLTWIDDLE) F 30 PPL List Manipulation Routines 66 67 ********************************************************************************** 68 * * 69 * GETIDLE * 70 * Acquire an idle page. This routine will first attempt * 71 * to get a page from the clean idle list. If this list is * 72 * empty then we must get an idle page that already contains a * 73 * disk block. The so called 'unclean' IDLE lists are * 74 * searched in a round robin order as needed. * 75 * Call: * 76 * * 77 * CALLNP GETIDLE * 78 * * 79 * unlinked PPL for an available page> * 80 * * 81 * Eats R0:R1 Sets PPL. * 82 * Stack required = 1. * 83 * 1 + max ( LOCKWAIT (0) ) * 84 * * 85 ********************************************************************************** 86 87 BLOCK GETIDLE subroutine 88 89 ENTRY GETIDLE 90 91 BEGFRAME 92 ENDFRAME 93 02D1C DD5F8001 6 STAK 94 GETIDLE ENTRNP PUSH 95 PLOCK PPIDLOCK call to lock the idle page list 02D1D 0CC00000 95 IOFF 02D1E D1C01DD9 95 SETT PPIDLOCK 02D1F FE0C2D21 95 JNE MA(2+DISPW MA 0) 02D20 DC40308B 95 CALLNP LOCKWAIT 02D21 61001DDC 4 96 LD PPL PPCLNIDLE => idle page list head element 02D22 FB302D26 4 97 JZA PPL CHKUSDPPL if no clean PPLs, look at the used lists 02D23 60091F10 0 4 ZBM 98 LD R0 PPL,PPLINK get forward link in idle page list 02D24 E4001DDC 0 99 ST R0 PPCLNIDLE remove the current element from the list 02D25 FE0E2D38 100 JMP DECIDLCNT jump to adjust idle page count 101 * --- 102 00002D26 103 CHKUSDPPL LABEL 02D26 BC401DDB 1 104 INCL R1 PPLASTL get list to start searching 02D27 7844001F 1 IMM 105 AND R1 ONEBITS/IDLHASHFLD make count from 31 to 0 02D28 E4401DDB 1 106 ST R1 PPLASTL remember where we started 107 * \ / 108 00002D29 109 PPLOOP LABEL 02D29 61221DDD 4 1 110 LD PPL PPUSDIDLE(R1) get PPL from this list 02D2A FB322D33 4 111 JNZA PPL HAVEPPL looks like we have a live one 02D2B 18440001 1 IMM 112 ADD R1 1 increment our list index value 02D2C 7844001F 1 IMM 113 AND R1 ONEBITS/IDLHASHFLD make count from 31 to 0 02D2D 64401DDB 1 114 CPR R1 PPLASTL is this where we started? 02D2E FE0C2D29 115 JNE PPLOOP try another list if not 02D2F EC001DDA 116 STZ PPIDLCOUNT no idle pages left 117 * \ / give no-skip return 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 527 (PPLTWIDDLE) F 30 PPL List Manipulation Routines 118 00002D30 119 RETURN0 LABEL 120 PUNLOCK PPIDLOCK call to release the idle page list 02D30 EC001DD9 120 STZ PPIDLOCK 02D31 0C800000 120 ION 02D32 5D1F8001 6 STAK 121 LEAVE POP return 122 * --- 123 00002D33 124 HAVEPPL LABEL 02D33 60091F10 0 4 ZBM 125 LD R0 PPL,PPLINK get pointer to remaining list 02D34 E4221DDD 0 1 126 ST R0 PPUSDIDLE(R1) and unlink us from the list 02D35 FA322D38 0 127 JNZA R0 DECIDLCNT jump if not the last one 02D36 38221DDD 0 1 128 LEA R0 PPUSDIDLE(R1) make a pointer to the head 02D37 E4221DFD 0 1 129 ST R0 PPENDIDLE(R1) adjust the end pointer 130 * \ / 131 00002D38 132 DECIDLCNT LABEL 02D38 D0401DDA 133 DEC PPIDLCOUNT decrease count of available pages 02D39 EC090052 4 ZBM 134 STZ PPL,PPCNTL ensure control bits cleared (insurance) 02D3A FBE02D30 7 135 IRJ R7 RETURN0 advance to success return 136 * --- 137 138 END GETIDLE subroutine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 528 (PPLTWIDDLE) F 30 PPL List Manipulation Routines 140 141 ********************************************************************************** 142 * * 143 * * 144 * GETIDLEPG. * 145 * This routine will find and remove a specific page from * 146 * the idle page list. This routine locks the IDLE list. * 147 * Call: * 148 * CALL GETIDLEPG * 149 * PARVL block number * 150 * * 151 * * 152 * * 153 * Eats R0:R2, Sets PPL. * 154 * Stack required = 2. * 155 * 2 + max ( LOCKWAIT (0) ) * 156 * * 157 ********************************************************************************** 158 159 BLOCK GETIDLEPG subroutine 160 161 ENTRY GETIDLEPG 162 163 BEGFRAME 00178801 6 BASE 164 SAVEREG BSS 1 place to save a register 165 ENDFRAME 166 02D3B DD1F8002 6 STAK 167 GETIDLEPG ENTR PUSH 02D3C C0524000 1 REG 168 STPVL R1 R1 = block number 02D3D 608A7650 2 1 CBM 169 LD R2 R1/IDLHASHFLD generate list index 170 PLOCK PPIDLOCK lock the idle list 02D3E 0CC00000 170 IOFF 02D3F D1C01DD9 170 SETT PPIDLOCK 02D40 FE0C2D42 170 JNE MA(2+DISPW MA 0) 02D41 DC40308B 170 CALLNP LOCKWAIT 02D42 E5578801 5 6 BASE 171 ST R5 SP,SAVEREG need to save away this register 02D43 61241DDD 4 2 172 LD PPL PPUSDIDLE(R2) PPL -> first page on idle list 02D44 39641DDD 5 2 173 LEA R5 PPUSDIDLE(R2) address of the list head 02D45 48570801 1 4 BASE 174 RLSRCH R1 PPL,PPBLOCK find right page 02D46 FE0C2D4D 175 JNE RETURN jump if not found 02D47 60091F10 0 4 ZBM 176 LD R0 PPL,PPLINK get the PPL we point to 02D48 E4095F10 0 5 ZBM 177 ST R0 R5,PPLINK remove us from the list 02D49 FA322D4B 0 178 JNZA R0 NOTLAST jump if not removing the last PPL 02D4A E5641DFD 5 2 179 ST R5 PPENDIDLE(R2) do a fixup on the tail pointer 180 * \ / 181 00002D4B 182 NOTLAST LABEL 02D4B D0401DDA 183 DEC PPIDLCOUNT say one fewer idle page 02D4C 19C40001 7 IMM 184 ADD R7 1 skip return 185 * \ / 186 00002D4D 187 RETURN LABEL 02D4D 61578801 5 6 BASE 188 LD R5 SP,SAVEREG need to restore this register 189 PUNLOCK PPIDLOCK unlock the list 02D4E EC001DD9 189 STZ PPIDLOCK 02D4F 0C800000 189 ION 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 529 (PPLTWIDDLE) F 30 PPL List Manipulation Routines 02D50 5D1F8002 6 STAK 190 LEAVE POP 191 * --- 192 193 END GETIDLEPG subroutine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 530 (PPLTWIDDLE) F 30 PPL List Manipulation Routines 195 196 ********************************************************************************** 197 * * 198 * PUTIDLE. * 199 * This routine will put a page onto one of the idle page * 200 * lists. If the PPBLOCK field is zero, it will go onto the * 201 * head of the PPCLNIDLE list. If the field is not zero it * 202 * will be place on the appropriate PPIDLE list. Which list * 203 * depends on the hash value defined by IDLEHASHFLD (see * 204 * COREDEFS). If the lists were empty prior to putting this * 205 * element on, then we set the dispatcher flags for MSPROC and * 206 * free storage expansion, since either of these may have been * 207 * waiting on idle pages. A second entry to this routine * 208 * exists for those callers who already have PPIDLOCK held. * 209 * Call: * 210 * LD PPL => PPL for page * 211 * CALLNP PUTIDLE * 212 * * 213 * Eats R0:R1. * 214 * Stack required = 1. * 215 * 1 + max ( LOCKWAIT (0) ) * 216 * * 217 ********************************************************************************** 218 219 BLOCK PUTIDLE subroutine 220 221 ENTRY PUTIDLE 222 ENTRY PUTIDLNL 223 224 BEGFRAME 225 ENDFRAME 226 02D51 DD5F8001 6 STAK 227 PUTIDLE ENTRNP PUSH 228 PLOCK PPIDLOCK lock the idle list 02D52 0CC00000 228 IOFF 02D53 D1C01DD9 228 SETT PPIDLOCK 02D54 FE0C2D56 228 JNE MA(2+DISPW MA 0) 02D55 DC40308B 228 CALLNP LOCKWAIT 229 * \ / 230 00002D56 231 SHAREIDLE LABEL 02D56 6005FFFF 0 IMM 232 LD R0 ONEBITS/FLDADRS mask to clean out busy count 02D57 A8170802 0 4 BASE 233 BRSBM R0 PPL,PPBUSYWORD clear the busy count 02D58 60170801 0 4 BASE 234 LD R0 PPL,PPBLOCK get the disk address 02D59 FA0C2D5E 0 235 JNEZ R0 HAVEDATA jump if something in this block 02D5A 60001DDC 0 236 LD R0 PPCLNIDLE get pointer to list of clean pages 02D5B E4091F10 0 4 ZBM 237 ST R0 PPL,PPLINK add this one in 02D5C E5001DDC 4 238 ST PPL PPCLNIDLE this one head of the list 02D5D FE0E2D63 239 JMP PUTDONE jump for finishing touches 240 * --- 241 00002D5E 242 HAVEDATA LABEL 02D5E EC091F10 4 ZBM 243 STZ PPL,PPLINK clear link field 02D5F 604A3650 1 0 CBM 244 LD R1 R0/IDLHASHFLD get the list index 02D60 60221DFD 0 1 245 LD R0 PPENDIDLE(R1) get last PPL in this list 02D61 E5081F10 4 0 ZBM 246 ST PPL R0,PPLINK place this PPL in the rear 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 531 (PPLTWIDDLE) F 30 PPL List Manipulation Routines 02D62 E5221DFD 4 1 247 ST PPL PPENDIDLE(R1) this one is new tail 248 * \ / 249 00002D63 250 PUTDONE LABEL 02D63 BC401DDA 1 251 INCL R1 PPIDLCOUNT one more idle page 252 PUNLOCK PPIDLOCK unlock the list 02D64 EC001DD9 252 STZ PPIDLOCK 02D65 0C800000 252 ION 253 02D66 FA622D69 1 254 DRJ R1 RETURN jump if list was not empty 02D67 60040005 0 IMM 255 LD R0 1*BIT FLMSPROC+1*BIT FLFSX 02D68 FC001CF6 0 256 IORM R0 FLAGS set flags for storage expand & msproc 257 * \ / 258 00002D69 259 RETURN LABEL 02D69 5D1F8001 6 STAK 260 LEAVE POP 261 * --- 262 263 ********************************************************************************** 264 * * 265 * PUTIDLNL. * 266 * This routine will put a page onto one of the idle page * 267 * lists. The following version of the call requires PPIDLOCK * 268 * to be acquired before the call. * 269 * Call: * 270 * LD PPL => PPL for page * 271 * * 272 * CALLNP PUTIDLNL * 273 * * 274 ********************************************************************************** 275 02D6A DD5F8001 6 STAK 276 PUTIDLNL ENTRNP PUSH 02D6B FE0E2D56 277 JMP SHAREIDLE jump to share some code 278 * --- 279 280 END PUTIDLE subroutine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 532 (PPLTWIDDLE) F 30 PPL List Manipulation Routines 282 283 ********************************************************************************** 284 * * 285 * PUTPPAGE. * 286 * This routine will put a PPL onto the appropriate * 287 * PPage list. PPBLOCK and PPBUSYWORD must be correct. * 288 * Call: * 289 * LD PPL => PPL for page * 290 * CALLNP PUTPPAGE * 291 * * 292 * Eats R0:R2. * 293 * Stack required = 1. * 294 * 1 + max ( LOCKWAIT (0) ) * 295 * * 296 ********************************************************************************** 297 298 BLOCK PUTPPAGE subroutine 299 300 ENTRY PUTPPAGE 301 302 BEGFRAME 303 ENDFRAME 304 02D6C DD5F8001 6 STAK 305 PUTPPAGE ENTRNP PUSH 02D6D 60893461 2 4 ZBM 306 LD R2 PPL,PPBLOCK/PPHASHFLD get hash value for block 307 PLOCK PPAGELOCK(R2) lock the list 02D6E 0CC00000 307 IOFF 02D6F D1E41E21 2 307 SETT PPAGELOCK(R2) 02D70 FE0C2D72 307 JNE MA(2+DISPW MA 0) 02D71 DC40308B 307 CALLNP LOCKWAIT 02D72 60241E61 0 2 308 LD R0 PPAGELIST(R2) get pointer to head of list 02D73 E4091F10 0 4 ZBM 309 ST R0 PPL,PPLINK put current list after us 02D74 E5241E61 4 2 310 ST PPL PPAGELIST(R2) put us at head of list 311 PUNLOCK PPAGELOCK(R2) unlock the list 02D75 EC241E21 2 311 STZ PPAGELOCK(R2) 02D76 0C800000 311 ION 02D77 5D1F8001 6 STAK 312 LEAVE POP 313 * --- 314 315 END PUTPPAGE subroutine 316 317 318 END PPL List Manipulation Routines 56 INPUT FREEZER routines to cool the system 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 533 (FREEZER) F 31 FREEZER - System Freeze and Unfreeze Routines 3 4 FREEZER BLOCK System Freeze Routines 5 6 ENTRY FREEZE freeze the system 7 ENTRY UNFREEZE unfreeze the system 8 ENTRY FREEZEWAIT wait for someone else to unfreeze 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 534 (FREEZER) F 31 FREEZER - System Freeze and Unfreeze Routines 10 11 ********************************************************************************** 12 * * 13 * FREEZE * 14 * Call FREEZE when you need to do something strange to the * 15 * system, and there is no lock to protect what you need to do. * 16 * When FREEZE returns, all other CPU's in the system are idling, * 17 * waiting for you to call UNFREEZE. Also, all active processes * 18 * (including the one on the CPU that called FREEZE) are shut down. * 19 * This is so that: * 20 * 1) Every process is on some SQ, so they are easy to find. * 21 * 2) All of the page files are unloaded, so you can play with * 22 * people's VASP lists without much hassle. * 23 * 3) Processes are not charged for the time that they are frozen * 24 * by someone else. * 25 * * 26 * When FREEZE returns, the interrupts are off, and you MUST NOT * 27 * (under penalty of hanging) fault, or do anything else that might * 28 * cause the dispatcher to be entered. * 29 * Call: * 30 * NO LOCKS HELD! * 31 * SP = stack pointer * 32 * CALLNP FREEZE * 33 * * 34 * Eats R0:R3. * 35 * Stack required = 14. * 36 * 2 + max ( FREEZEWAIT (12), LOCKWAIT (0), SHUTRUN (11) ) * 37 * * 38 ********************************************************************************** 39 40 BLOCK FREEZE subroutine 41 ENTRY FREEZE 42 43 BEGFRAME 00178801 6 BASE 44 FREEZER4 BSS 1 temp for register save 45 ENDFRAME 46 02D78 00030004 47 IAPRPROTO VFD BUSCWRITE+CPUCOFFSET+CPUIAPR IAPR command 48 02D79 DD5F8002 6 STAK 49 FREEZE ENTRNP PUSH 02D7A E5178801 4 6 BASE 50 ST R4 SP,FREEZER4 save some registers 02D7B 0CC00000 51 IOFF 52 00002D7C 53 FREEZELOOP LABEL 02D7C 60030000 0 IMM 54 LD R0 1*BIT FLFREEZE get the freeze bit 02D7D FC001CF6 0 55 IORM R0 FLAGS set in dispatcher flags 02D7E FE0C2D81 56 JNE MYTURN jump if not already set 02D7F DC402D9A 57 CALLNP FREEZEWAIT some else is freezing -- 58 * let him go first 02D80 FE0E2D7C 59 JMP FREEZELOOP try again when he is done 60 * --- 61 00002D81 62 MYTURN LABEL 02D81 60000412 0 63 LD R0 CPPSA R0 -> my PSA, if any 02D82 FA302D84 0 64 JZA R0 TELLOTHERS jump if none 02D83 DC402B88 65 CALLNP SHUTRUN suspend process back on runnable queue 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 535 (FREEZER) F 31 FREEZER - System Freeze and Unfreeze Routines 66 * \ / 67 68 ********************************************************************************** 69 * * 70 * Interrupt all other processors so that they will go through * 71 * the dispatcher and notice that they should freeze. * 72 * * 73 ********************************************************************************** 74 75 * \ / 00002D84 76 TELLOTHERS LABEL 02D84 60801CF7 2 77 LD R2 CPUCOUNT get number of CPU's 00002D85 78 TELLONE LABEL 02D85 60641CFA 1 2 79 LD R1 CPUSLOTS(R2-1) get a CPU slot number 02D86 64400415 1 80 CPR R1 OURSLOT is it us? 02D87 FE022D8F 81 JEQ TELLNEXT skip if yes 82 PLOCK CPUCOMLOCK reserve this critical region 02D88 0CC00000 82 IOFF 02D89 D1C01CF5 82 SETT CPUCOMLOCK 02D8A FE0C2D8C 82 JNE MA(2+DISPW MA 0) 02D8B DC40308B 82 CALLNP LOCKWAIT 02D8C 0C402D78 83 STTB IAPRPROTO else send him an IAPR 84 PUNLOCK CPUCOMLOCK release the critical region 02D8D EC001CF5 84 STZ CPUCOMLOCK 02D8E 0C800000 84 ION 00002D8F 85 TELLNEXT LABEL 02D8F FAA22D85 2 86 DRJ R2 TELLONE loop through all CPU's 87 * \ / 88 89 ********************************************************************************** 90 * * 91 * Wait for all other CPU's to freeze. * 92 * * 93 ********************************************************************************** 94 95 * \ / 00002D90 96 WAIT4OTHER LABEL 02D90 60001CF8 0 97 LD R0 CPUCOUNT1 number of unfrozen CPU's 02D91 64040001 0 IMM 98 CPR R0 1 02D92 FE042D90 99 JGT WAIT4OTHER jump if more than us 100 * \ / 02D93 61178801 4 6 BASE 101 LD R4 FREEZER4 restore some registers 02D94 5D1F8002 6 STAK 102 LEAVE POP return 103 * --- (many are cold, but few are frozen) 104 105 END FREEZE subroutine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 536 (FREEZER) F 31 FREEZER - System Freeze and Unfreeze Routines 107 108 ********************************************************************************** 109 * * 110 * UNFREEZE * 111 * Routine to undo the effect of FREEZE, and let the system run again. * 112 * Call: * 113 * SP = stack pointer * 114 * CALLNP UNFREEZE * 115 * * 116 * Eats R0. * 117 * Stack required = 1. * 118 * * 119 ********************************************************************************** 120 121 BLOCK UNFREEZE subroutine 122 ENTRY UNFREEZE 123 124 BEGFRAME 125 ENDFRAME 126 02D95 DD5F8001 6 STAK 127 UNFREEZE ENTRNP PUSH 02D96 60030000 0 IMM 128 LD R0 1*BIT FLFREEZE 02D97 A8001CF6 0 129 BRSBM R0 FLAGS turn off the freeze flag 02D98 0C800000 130 ION undo IOFF in FREEZE 02D99 5D1F8001 6 STAK 131 LEAVE POP 132 * --- 133 134 END UNFREEZE subroutine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 537 (FREEZER) F 31 FREEZER - System Freeze and Unfreeze Routines 136 137 ********************************************************************************** 138 * * 139 * FREEZEWAIT * 140 * Routine to idle while some other CPU has the system frozen. * 141 * We are called by the dispatcher (normal case) or by FREEZE (when * 142 * two CPU's simultaneously try to freeze the system). Call: * 143 * Interrupts off, no locks held * 144 * SP = stack pointer * 145 * CALLNP FREEZEWAIT * 146 * * 147 * Eats R0:R4. * 148 * Stack required = 12. * 149 * 1 + max ( SHUTRUN (11) ) * 150 * * 151 ********************************************************************************** 152 153 BLOCK FREEZEWAIT subroutine 154 ENTRY FREEZEWAIT 155 156 BEGFRAME 157 ENDFRAME 158 02D9A DD5F8001 6 STAK 159 FREEZEWAIT ENTRNP PUSH 02D9B 60000412 0 160 LD R0 CPPSA get current PSA, if any 02D9C FA302D9E 0 161 JZA R0 NOSHUTDOWN skip shutdown in no PSA 02D9D DC402B88 162 CALLNP SHUTRUN put back onto SQRUNNABLE 163 * \ / 00002D9E 164 NOSHUTDOWN LABEL 02D9E D0401CF8 165 DEC CPUCOUNT1 say we are idling 02D9F 60041CF6 0 IMM 166 LD R0 ADR FLAGS 00002DA0 167 WAITLOOP LABEL 02DA0 5C080010 0 ZBM 168 CMZ R0,0/BIT FLFREEZE are we still frozen? 02DA1 FE0C2DA0 169 JNE WAITLOOP jump if yes 170 * \ / 02DA2 D0001CF8 171 INC CPUCOUNT1 say we are no longer frozen 02DA3 59840400 IMM 172 CLBMSR 1*MSRIAPRB clear IAPR pending 02DA4 5D1F8001 6 STAK 173 LEAVE POP and return 174 * --- 175 176 END FREEZEWAIT subroutine 177 178 179 END FREEZER System Freeze Routines 57 INPUT LIQUID PSA destroyer 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 538 (LIQUID) F 32 Liquidate a process 3 4 LIQUID BLOCK discard routines 5 6 ENTRY DISCARDPAL to discard a single PAL 7 ENTRY LIQUIDATE destroy a PSA 8 ENTRY LIQUIDINIT destroy initial process 9 ENTRY PAGEREADY a page has become ready 10 ENTRY QDISK to queue up a disk transfer 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 539 (LIQUID) F 32 Liquidate a process 12 13 ********************************************************************************** 14 * * 15 * Routine to destroy the current PSA. It assumes the following * 16 * things have been done: * 17 * - user limit block has been released * 18 * - over-process VP list is empty * 19 * - lunlist is empty * 20 * * 21 * JMP LIQUIDATE * 22 * * 23 * * 24 * Stack required = 7. * 25 * 0 + max ( CPUPFLOAD (0), DISCARDPAL (4), FCFREEMEM (0), * 26 * FREECA (2), FREEMEMPAGE (1), GRUBPAGE (7), * 27 * LOCKLIST (1), LOCKWAIT (0), MAPINMEM (3), * 28 * PUTIDLE (1), SFREEMEM (0), SHACCT (3), * 29 * SHDEQUE (3), UNLOCKLIST (1) ) * 30 * * 31 ********************************************************************************** 32 33 BLOCK LIQUIDATE routine 34 ENTRY LIQUIDATE 35 ENTRY LIQUIDINIT 36 37 ********************************************************************************** 38 * * 39 * Special entry for finishing up INITPROC and freeing its * 40 * page. * 41 * * 42 * PPL -> INITPROC's final PPL * 43 * PFPTR = INITPROC's final page number * 44 * JMP LIQUIDINIT * 45 * * 46 ********************************************************************************** 47 00002DA5 48 LIQUIDINIT LABEL 02DA5 0CC00000 49 IOFF no interrupts while doing this 02DA6 DC002FCB 50 CALL CPUPFLOAD unload for all CPUs 02DA7 41440000 IMM 51 PARV 0 sez to exclude page 02DA8 4052C000 3 REG 52 PARVL PFPTR pass PF location 02DA9 6184044D 6 IMM 53 LD SP ADR RESSTAK need a stack for PUTIDLE 02DAA DC402D51 54 CALLNP PUTIDLE give up INITPROC page 02DAB EDF61CC6 3 @ 55 STW @PAVPAGES(PFPTR) make page available for free storage 56 00002DAC 57 LIQUIDATE LABEL 02DAC 0CC00000 58 IOFF no interrupts while doing this 02DAD 0144041E IMM 59 LDCAR ADR PCONSOLE 02DAE 6184044D 6 IMM 60 LD SP ADR RESSTAK 02DAF 61400412 5 61 LD R5 CPPSA R5 -> our PSA 02DB0 61094116 4 5 ZBM 62 LD R4 R5,PSCURRPROC get current UPC pointer 63 * \ / 64 65 ********************************************************************************** 66 * Release the VP list. Grubpage also gets rid of the * 67 * page access elements in the PSVASP list. * 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 540 (LIQUID) F 32 Liquidate a process 68 * We run this loop for both the window list and the regular * 69 * VM list. * 70 ********************************************************************************** 71 72 * \ / 00002DB1 73 DOVMLIST LABEL 02DB1 60D7080D 3 4 BASE 74 LD R3 R4,UPCVMLIST => first element in the VPAGE list 02DB2 FAF02DB6 3 75 JZA R3 DOWVMLIST jump if the list is now empty 02DB3 6016C004 0 3 CACH 76 LD R0 R3,VPVPN get the virtual page number 02DB4 DC4030E4 77 CALLNP GRUBPAGE get rid of this page 02DB5 FE0E2DB1 78 JMP DOVMLIST back to do another element 79 * --- 80 81 * \ / 00002DB6 82 DOWVMLIST LABEL 02DB6 60D7080E 3 4 BASE 83 LD R3 R4,UPCWVMLIST => first element in the window VP list 02DB7 FAF02DBB 3 84 JZA R3 VMLISTDN jump if the list is now empty 02DB8 6016C004 0 3 CACH 85 LD R0 R3,VPVPN get the virtual page number 02DB9 DC4030E4 86 CALLNP GRUBPAGE get rid of this page 02DBA FE0E2DB1 87 JMP DOVMLIST back to do another element 88 * --- 89 90 ********************************************************************************** 91 * * 92 * Release the remainder of the VASP list. Since we have * 93 * grubbed all user pages, what remains here are the monitor * 94 * pages. * 95 * We call SHACCT primarily to kill the quantum interrupt * 96 * request so that it doesn't come back to haunt the chunk of * 97 * free storage that contained the PSA. While SHACCT performs * 98 * other, yet extraneous, tasks we still use it for the sake * 99 * of generality. * 100 * * 101 ********************************************************************************** 102 00002DBB 103 VMLISTDN LABEL 104 PLOCK SQLOCKS(NQRUNNING) lock the running queue 02DBB 0CC00000 104 IOFF 02DBC D1C01DBA 104 SETT SQLOCKS(NQRUNNING) 02DBD FE0C2DBF 104 JNE MA(2+DISPW MA 0) 02DBE DC40308B 104 CALLNP LOCKWAIT 02DBF DC402BBD 105 CALLNP SHDEQUE unload PF and remove PCB from queue 02DC0 DC0025EB 106 CALL MAPINMEM re-map users virtual free storage lists 02DC1 40534000 5 REG 107 PARVL R5 pointer to the PSA 02DC2 DC402BD4 108 CALLNP SHACCT kill timer quantum, etc. 02DC3 61C94116 7 5 ZBM 109 LD R7 R5,PSCURRPROC get current UPC pointer 110 * \ / 00002DC4 111 DOVASPLIST LABEL 02DC4 6117C80F 4 7 BASE 112 LD PAL R7,UPCVASP => first element in the VASP list 02DC5 FB302DCA 4 113 JZA PAL VASPLISTDN jump if list is now empty 02DC6 60091F10 0 4 ZBM 114 LD R0 PAL,PALINK get the link to the rest of the list 02DC7 E417C80F 0 7 BASE 115 ST R0 R7,UPCVASP remove us from the list 02DC8 DC402E15 116 CALLNP DISCARDPAL get rid of this page 02DC9 FE0E2DC4 117 JMP DOVASPLIST back to do another element 118 * --- 119 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 541 (LIQUID) F 32 Liquidate a process 120 ********************************************************************************** 121 * Release the working set extension list. It may have * 122 * all sorts of leftovers in it. * 123 ********************************************************************************** 124 00002DCA 125 VASPLISTDN LABEL 00002DCA 126 DOWSXLIST LABEL 02DCA 6117C810 4 7 BASE 127 LD PAL R7,UPCWSX => first element in the WSX list 02DCB FB302DD0 4 128 JZA PAL WSXLISTDN jump if list is now empty 02DCC 60091F10 0 4 ZBM 129 LD R0 PAL,PALINK get the link to the rest of the list 02DCD E417C810 0 7 BASE 130 ST R0 R7,UPCWSX remove us from the list 02DCE DC402E15 131 CALLNP DISCARDPAL get rid of this page 02DCF FE0E2DCA 132 JMP DOWSXLIST back to do another element 133 * --- 134 135 * Release PCB associated herewith 136 00002DD0 137 WSXLISTDN LABEL 02DD0 DC003096 138 CALL LOCKLIST grab the PCB list 02DD1 40001EB2 139 PARL PCNTLLOCK 02DD2 61001EB1 4 140 LD PCB PCONTROL load pointer to first element 02DD3 60440000 1 IMM 141 LD R1 0 indicate at beginning of list 02DD4 FE0E2DD9 142 JMP FINDPCBX enter loop 143 * --- 144 00002DD5 145 FINDPCB LABEL 02DD5 60530000 1 4 REG 146 LD R1 PCB copy the current element pointer 02DD6 61085F14 4 1 ZBM 147 LD PCB R1,PCNXTCB advance down the (non-standard) list 02DD7 FB322DD9 4 148 JNZA PCB FINDPCBX jump if another element in list 02DD8 00130030 149 HALT HALTS0030 no PCB found for this process 150 * --- 151 00002DD9 152 FINDPCBX LABEL 02DD9 65491F13 5 4 ZBM 153 CPR R5 PCB,PCPSADRS is this our element? 02DDA FE0C2DD5 154 JNE FINDPCB jump if more looking needed 02DDB 60091F14 0 4 ZBM 155 LD R0 PCB,PCNXTCB 02DDC FA422DDF 1 156 JEQZ R1 FNDPCBFRST jump if our PCB first in list 02DDD E4085F14 0 1 ZBM 157 ST R0 R1,PCNXTCB unlink our element 02DDE FE0E2DE0 158 JMP FNDPCBNFST 159 * --- 160 00002DDF 161 FNDPCBFRST LABEL 02DDF E4001EB1 0 162 ST R0 PCONTROL our PCB was first, remove from list 00002DE0 163 FNDPCBNFST LABEL 02DE0 D0401EB0 164 DEC PCCOUNT count one removal 02DE1 600900C3 0 4 ZBM 165 LD R0 PCB,PCPROCNUM get process # 02DE2 EDF01EB3 0 @ 166 STW @PPCNUMARR(R0) say # is available 02DE3 DC0030A4 167 CALL UNLOCKLIST release this list 02DE4 40001EB2 168 PARL PCNTLLOCK 02DE5 DC002F5D 169 CALL SFREEMEM destroy this PCB 02DE6 41440003 IMM 170 PARV PCBLOG 02DE7 40530000 4 REG 171 PARVL PCB 172 * \ / 173 174 ********************************************************************************** 175 * * 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 542 (LIQUID) F 32 Liquidate a process 176 * Wait for transient lookers to go away. * 177 * * 178 ********************************************************************************** 179 180 * \ / 00002DE8 181 WAIT4LOK LABEL 02DE8 5C17480C 5 BASE 182 CMZ R5,PSLOCK wait for him to be done 02DE9 FE0C2DE8 183 JNE WAIT4LOK busy wait 184 * \ / 185 186 ********************************************************************************** 187 * Here we return the console areas to free storage. * 188 ********************************************************************************** 189 190 * \ / 00002DEA 191 CAZOTLOOP LABEL 02DEA 60095F10 0 5 ZBM 192 LD R0 R5,PSCACHN get head pointer 02DEB 6056080C 1 0 BASE 193 LD R1 R0,CALINK get pointer to second in chain 02DEC FA702DF1 1 194 JZA R1 DOLASTCA jump if R0 => last CA 02DED E4495F10 1 5 ZBM 195 ST R1 R5,PSCACHN delink head 02DEE DC00283E 196 CALL FREECA free old head and stack 02DEF 40520000 0 REG 197 PARVL R0 pass address 02DF0 FE0E2DEA 198 JMP CAZOTLOOP continue 199 * --- 200 201 ********************************************************************************** 202 * * 203 * This last console area does NOT have a stack associated * 204 * with it. The console area was created in BLDPROCESS and its * 205 * only purpose in life was to initialize registers and status * 206 * registers for a virgin process. Once this process suspends * 207 * execution for the first and any subsequent times a new console * 208 * area with stack is acquired. * 209 * * 210 ********************************************************************************** 211 00002DF1 212 DOLASTCA LABEL 02DF1 DC002F5D 213 CALL SFREEMEM free just the CA memory 02DF2 41440004 IMM 214 PARV CALOG pass size 02DF3 40495F10 5 ZBM 215 PARVL R5,PSCACHN and location 216 217 * Remove any leftover error elements. No lock needed because PCB unlinked. 00002DF4 218 ZOTUERROR LABEL 02DF4 60C95F1D 3 5 ZBM 219 LD R3 R5,PSUERROR/FLDADRS get the error list pointer 02DF5 FAF02DFC 3 220 JZA R3 NOMOREERR jump if no more in list 02DF6 6008DF10 0 3 ZBM 221 LD R0 R3,UERLINK get link to the next error element 02DF7 E4095F1D 0 5 ZBM 222 ST R0 R5,PSUERROR/FLDADRS remove this one from list 02DF8 DC002F5D 223 CALL UFREEMEM call to release memory 02DF9 41440001 IMM 224 PARV UERLOG indicate the blocks length 02DFA 4052C000 3 REG 225 PARVL R3 and address 02DFB FE0E2DF4 226 JMP ZOTUERROR jump to try for another 227 * --- 228 00002DFC 229 NOMOREERR LABEL 230 * \ / 231 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 543 (LIQUID) F 32 Liquidate a process 232 ********************************************************************************** 233 * * 234 * Remove the program control block that should be in * 235 * the PSA for the program that was running in this process * 236 * and asked to do a VANISH. To keep the system on its * 237 * toes, we go to the trouble of checking to make sure that * 238 * the UPC block that we are freeing is indeed the one and * 239 * only UPC block on this PSA. * 240 * * 241 ********************************************************************************** 242 243 * \ / 02DFC 60C94116 3 5 ZBM 244 LD R3 R5,PSCURRPROC get pointer to current block 02DFD FAF22DFF 3 245 JNZA R3 YESCURR there should be one, so jump 02DFE 00130031 246 HALT HALTS0031 someone flushed our PCB 247 * --- 248 00002DFF 249 YESCURR LABEL 02DFF 64C95F15 3 5 ZBM 250 CPR R3 R5,PSPROCLIST are we on the top? 02E00 FE022E02 251 JEQ YESONTOP yes, CM is the one doing it 02E01 00130032 252 HALT HALTS0032 multiple levels flushing? 253 * --- 254 00002E02 255 YESONTOP LABEL 02E02 5C08DF10 3 ZBM 256 CMZ R3,UPCSONPTR are we the only level? 02E03 FE022E05 257 JEQ FLUSHUERRS is so, zap us 02E04 00130033 258 HALT HALTS0033 VANISH request with under levels 259 * --- 260 00002E05 261 FLUSHUERRS LABEL 02E05 6088DF1B 2 3 ZBM 262 LD R2 R3,UPCUERROR/FLDADRS get the error list pointer 02E06 FAB02E0D 2 263 JZA R2 FREEUPC jump if no more in list 02E07 60089F10 0 2 ZBM 264 LD R0 R2,UERLINK get link to the next error element 02E08 E408DF1B 0 3 ZBM 265 ST R0 R3,UPCUERROR/FLDADRS remove this one from list 02E09 DC002F5D 266 CALL UFREEMEM call to release memory 02E0A 41440001 IMM 267 PARV UERLOG indicate the blocks length 02E0B 40528000 2 REG 268 PARVL R2 and address 02E0C FE0E2E05 269 JMP FLUSHUERRS jump to try for another 270 * --- 271 00002E0D 272 FREEUPC LABEL 02E0D DC002F8F 273 CALL UPCFREEMEM call to release the block 02E0E 41440005 IMM 274 PARV UPCLOG indicate its length 02E0F 40494116 5 ZBM 275 PARVL R5,PSCURRPROC and address 276 * \ / 277 278 ********************************************************************************** 279 * * 280 * Discard the PSA. * 281 * There must be no other lists attached to the PSA at this point. * 282 * Since this process is about to go away we can also free the users free * 283 * memory lists. We unmap the page and return the page back to the idle * 284 * page list. * 285 * * 286 ********************************************************************************** 287 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 544 (LIQUID) F 32 Liquidate a process 288 * \ / 02E10 DC402FEA 289 CALLNP FREEMEMPAGE release the free storage lists page 290 * At this point all of the users virtual free storage lists should have 291 * been returned to the system. No attempt is made to make sure that 292 * all elements have been properly freed. No doubt that there should 293 * be. 02E11 DC002F5D 294 CALL UFREEMEM call to free up a block of free storage 02E12 41440005 IMM 295 PARV PSLOG this long 02E13 40534000 5 REG 296 PARVL R5 at this location 02E14 FE0E28B7 297 JMP DISPATCH go run some user 298 * --- 299 300 END LIQUIDATE routine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 545 (LIQUID) F 32 Liquidate a process 302 303 ********************************************************************************** 304 * * 305 * DISCARDPAL (should auld acquaintance be forgot?) * 306 * Routine to dispose of an unlinked Page Access eLement. * 307 * If the page has been modified, it remains in the PPAGE list * 308 * and has a write queue element produced for it. The write * 309 * queue element will be placed into the write queue for the * 310 * appropriate MS unit. It is the callers responsibility to * 311 * decrement PSWSSIZE, because we don't have a PSA pointer. * 312 * This routine shares code with DONEPPL. * 313 * Call with: * 314 * page file unloaded! * 315 * no lists locked except MSQIN and an SQ * 316 * SP = stack pointer * 317 * CALLNP DISCARDPAL PAL => unlinked page access element * 318 * * 319 * Eats R0:R3, PAL. * 320 * Stack required = 4. * 321 * 1 + max ( DISMOUNT (3), FCFREEMEM (0), LOCKWAIT (0), * 322 * MSREADREQ (1), PUTADT (3), PUTIDLNL (1), * 323 * QDISK (1), SGETMEM (0) ) * 324 * * 325 ********************************************************************************** 326 327 BLOCK DISCARDPAL and DONEPPL subroutines 328 ENTRY DISCARDPAL 329 ENTRY DONEPPL 330 331 BEGFRAME 332 ENDFRAME 333 02E15 DD5F8001 6 STAK 334 DISCARDPAL ENTRNP PUSH 02E16 60D70803 3 4 BASE 335 LD R3 PAL,PAPPLPTR pick up PPL pointer 336 337 * R3 => PPAGE element, PAL 338 02E17 5C091C12 4 ZBM 339 CMZ PAL,PAMODIFIED did this user alter the page? 02E18 ED8AC010 3 CBM 340 STLNE R3/BIT 0 save in R3/bit 0 02E19 DC002F8F 341 CALL PFREEMEM discard the old PAL 02E1A 41440002 IMM 342 PARV PALOG indicate the block size 02E1B 40530000 4 REG 343 PARVL PAL and block address 02E1C 610ADF10 4 3 CBM 344 LD PPL R3/FLDADRS copy the PPAGE element pointer 02E1D FE0E2E1F 345 JMP DONEPPLJ enter the PPL destroyer 346 * --- 347 348 ********************************************************************************** 349 * * 350 * DONEPPL * 351 * This routine is called when a use count is to be removed * 352 * from a PPL. The cleanliness of the page is checked and a * 353 * write queue element is made if needed. Otherwise, the use * 354 * count is decremented and the PPL moved to the idle list if * 355 * the use count went to zero. * 356 * Call: * 357 * R3/BIT 0 = * 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 546 (LIQUID) F 32 Liquidate a process 358 * PPL => PPAGE element * 359 * CALLNP DONEPPL * 360 * * 361 * Eats R0:R3, PPL. * 362 * Stack required = 4. * 363 * 1 + max ( DISMOUNT (3), FCFREEMEM (0), LOCKWAIT (0), * 364 * MSREADREQ (1), PUTADT (3), PUTIDLNL (1), * 365 * QDISK (1), SGETMEM (0) ) * 366 * * 367 ********************************************************************************** 368 02E1E DD5F8001 6 STAK 369 DONEPPL ENTRNP PUSH 00002E1F 370 DONEPPLJ LABEL R3/BIT 0 contains the modified bit 02E1F F2C02E2A 3 371 JBF R3/BIT 0 WHNPMOD jump if not a modified page 372 * \ / 373 374 ********************************************************************************** 375 * * 376 * We retain the busy count caused by the now defunct PAL, * 377 * because we are building a write queue element (which also * 378 * causes the busy count to be incremented). * 379 * * 380 ********************************************************************************** 381 02E20 DC002ED0 382 CALL SGETMEM call for a piece of memory 02E21 40440002 IMM 383 PARVL MSQLOG indicate its length 02E22 EC160800 0 BASE 384 STZ R0,MSQWORDA clear forward pointer and type field 02E23 EC160803 0 BASE 385 STZ R0,MSQXPTR indicate not dual write 02E24 E5160802 4 0 BASE 386 ST PPL R0,MSQPPPTR save the PPL pointer 02E25 60D20000 3 0 REG 387 LD R3 R0 make a copy of the pointer 02E26 60170801 0 4 BASE 388 LD R0 PPL,PPBLOCK get disk address 02E27 E416C801 0 3 BASE 389 ST R0 R3,MSQBLOCK and place into MSQ element 02E28 DC402E70 390 CALLNP QDISK call to queue up the disk transfer 02E29 5D1F8001 6 STAK 391 LEAVE POP write now assured, exit 392 * --- 393 394 ********************************************************************************** 395 * * 396 * We come here for a clean PPL. We check to see if it * 397 * is still in use. * 398 * * 399 ********************************************************************************** 400 00002E2A 401 WHNPMOD LABEL 02E2A 60893461 2 4 ZBM 402 LD R2 PPL,PPBLOCK/PPHASHFLD load the PPAGELIST hash value 403 PLOCK PPAGELOCK(R2) call to lock the appropriate PPAGELIST head 02E2B 0CC00000 403 IOFF 02E2C D1E41E21 2 403 SETT PPAGELOCK(R2) 02E2D FE0C2E2F 403 JNE MA(2+DISPW MA 0) 02E2E DC40308B 403 CALLNP LOCKWAIT 02E2F 6007FFFF 0 IMM 404 LD R0 -1 02E30 B8170802 0 4 BASE 405 ADDB R0 PPL,PPBUSYWORD decrease the use count 02E31 FA302E37 0 406 JZA R0 DONEPPLE jump if no longer in use 02E32 F21E2E34 0 407 JBF R0/PPBSYHIBIT DISCNTOK jump if the count is OK 02E33 00130035 408 HALT HALTS0035 somebody counted down busy too many times 409 * --- 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 547 (LIQUID) F 32 Liquidate a process 410 00002E34 411 DISCNTOK LABEL 412 PUNLOCK PPAGELOCK(R2) release the appropriate PPAGE head 02E34 EC241E21 2 412 STZ PPAGELOCK(R2) 02E35 0C800000 412 ION 02E36 5D1F8001 6 STAK 413 LEAVE POP return 414 * --- 415 416 ********************************************************************************** 417 * * 418 * We come here for an unused and clean PPL. We move the * 419 * PPL to the end of the appropriate idle list. We pick up the * 420 * hash code from R2 because PPBLOCK may have been destroyed to * 421 * indicate that nothing usable remains in this page. * 422 * Come here with: * 423 * appropriate PPAGELIST locked * 424 * interrupts off * 425 * R2 = PPHASHFLD * 426 * PPL => PPAGE element * 427 * SP = stack pointer * 428 * unlocks PPAGELIST * 429 * * 430 ********************************************************************************** 431 00002E37 432 DONEPPLE LABEL entry from DISCARDPAL 02E37 38641E61 1 2 433 LEA R1 PPAGELIST(R2) get pointer to list head 02E38 3D085F10 4 1 ZBM 434 LSRCH PPL R1,PPLINK see who points to us 02E39 FE022E3B 435 JEQ GOODLINK jump if a good link found 02E3A 00130037 436 HALT HALTS0037 stop if we aren't in the list 437 * --- 438 00002E3B 439 GOODLINK LABEL 02E3B 60091F10 0 4 ZBM 440 LD R0 PPL,PPLINK load this elements forward pointer 02E3C E4085F10 0 1 ZBM 441 ST R0 R1,PPLINK remove this element from the list 02E3D 5C090812 4 ZBM 442 CMZ PPL,PPMEMERR check for a memory error 02E3E FE0C2E59 443 JNE BADPAGE jump if page of memory is bad 444 PLOCK PPIDLOCK call to lock the idle page list 02E3F 0CC00000 444 IOFF 02E40 D1C01DD9 444 SETT PPIDLOCK 02E41 FE0C2E43 444 JNE MA(2+DISPW MA 0) 02E42 DC40308B 444 CALLNP LOCKWAIT 445 PUNLOCK PPAGELOCK(R2) call to unlock the appropriate PPAGE list 02E43 EC241E21 2 445 STZ PPAGELOCK(R2) 02E44 0C800000 445 ION 446 * \ / 447 448 ********************************************************************************** 449 * * 450 * See if this block should go into the ADT. Newly * 451 * freed blocks must be destroyed on mass storage before * 452 * they may be re-assigned. This ensures that the MS * 453 * structures retain the crashproofing characteristics * 454 * designed in. The destruction must make the block * 455 * into a free block (preferred) or a swapping block * 456 * (which are not included in any legitimate MS structure). * 457 * The PPUTADT bit, if set, indicates that this is such * 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 548 (LIQUID) F 32 Liquidate a process 458 * a block. When we get here, the write has been accomplished * 459 * and we should place this block into the ADT list. * 460 * Furthermore, the page fault processor assumes that * 461 * a free MS block cannot be found resident. This is not * 462 * a hardship, since we will never read in a free block * 463 * anyway (they are always referenced as a zeropage first). * 464 * Therefore, at this point, we indicate in the PPL that * 465 * there is nothing occupying the physical page. * 466 * * 467 ********************************************************************************** 468 469 * \ / 02E45 5C090412 4 ZBM 470 CMZ PPL,PPPUTADT check for a free block 02E46 FE022E53 471 JEQ NOTADT jump if not to go to ADT 472 * \ / 473 474 ********************************************************************************** 475 * * 476 * Check for a disk error. We wish to avoid putting these * 477 * blocks into the ADT list, but we must remember to decrement * 478 * the volume busy count. * 479 * * 480 ********************************************************************************** 481 482 * \ / 02E47 5C090212 4 ZBM 483 CMZ PPL,PPDISKERR check to see if this is a bad block 02E48 FE022E50 484 JEQ OKAYTOFREE jump if it's okay 02E49 60C90081 3 4 ZBM 485 LD R3 PPL,PPBLOCK/VOLFIELD get the volume number 02E4A 60E61F22 3 3 486 LD R3 VOLNTABLE(R3) and convert to VOLN pointer 02E4B D056C815 3 BASE 487 DEC R3,VOLNBUSY decrement the volume busy 02E4C FE0C2E55 488 JNE BADBLOKP jump if volume busy, share bad block proc. 02E4D DC005034 489 CALL DISMOUNT clean up any potential leftovers 02E4E 4052C000 3 REG 490 PARVL R3 pass VOLN address 02E4F FE0E2E55 491 JMP BADBLOKP and process as for bad block 492 * --- 493 494 ********************************************************************************** 495 * * 496 * This section calls the PUTADT routine to start a * 497 * process that is capable of handling suspension during * 498 * calls to PUTFREEBLK. * 499 * * 500 ********************************************************************************** 501 00002E50 502 OKAYTOFREE LABEL 02E50 DC00502C 503 CALL PUTADT call to create a queue element 02E51 40570801 4 BASE 504 PARVL PPL,PPBLOCK pass the now free block number 02E52 FE0E2E55 505 JMP BADBLOKP and clear the block number and control bits 506 * --- 507 508 ********************************************************************************** 509 * * 510 * Check to see if this page had a mass storage error. * 511 * If so, we indicate that no MS block is present in this * 512 * physical page. * 513 * * 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 549 (LIQUID) F 32 Liquidate a process 514 ********************************************************************************** 515 00002E53 516 NOTADT LABEL 02E53 5C090212 4 ZBM 517 CMZ PPL,PPDISKERR check to see if this is a bad block 02E54 FE022E57 518 JEQ NODISKERR jump if good 00002E55 519 BADBLOKP LABEL 02E55 EC170801 4 BASE 520 STZ PPL,PPBLOCK indicate no good data in this page 02E56 EC090052 4 ZBM 521 STZ PPL,PPCNTL clear out the control bits 00002E57 522 NODISKERR LABEL 523 * \ / 524 525 ********************************************************************************** 526 * * 527 * Here the PPL is completely free from any ties (PALs). If * 528 * it was a free block an element has been made so the ADT manager * 529 * will be called at the dispatchers convenience. What we have * 530 * left to do is place the PPL into the appropriate list. NOTE * 531 * that the following routine unlocks the idle page list. * 532 * * 533 ********************************************************************************** 534 535 * PPIDLOCK locked 536 * \ / 02E57 DC402D6A 537 CALLNP PUTIDLNL find a home for the PPL 02E58 5D1F8001 6 STAK 538 LEAVE POP return to caller 539 * --- 540 541 ********************************************************************************** 542 * * 543 * We come here when we are done with a page containing a * 544 * memory parity error. We put the page onto the PPERRLIST * 545 * so that it will never be used again, then we create a MSREADQ * 546 * entry in case anybody is waiting to get access to the data * 547 * that was on the page. * 548 * * 549 ********************************************************************************** 550 00002E59 551 BADPAGE LABEL 552 PUNLOCK PPAGELOCK(R2) unlock the PPAGE list 02E59 EC241E21 2 552 STZ PPAGELOCK(R2) 02E5A 0C800000 552 ION 553 PLOCK PPERRLOCK lock the error page list 02E5B 0CC00000 553 IOFF 02E5C D1C01E1E 553 SETT PPERRLOCK 02E5D FE0C2E5F 553 JNE MA(2+DISPW MA 0) 02E5E DC40308B 553 CALLNP LOCKWAIT 02E5F 60001E1F 0 554 LD R0 PPERRLIST get the list pointer 02E60 E4091F10 0 4 ZBM 555 ST R0 PPL,PPLINK put existing list behind new element 02E61 E5001E1F 4 556 ST PPL PPERRLIST put new page at head of list 02E62 D0001E20 557 INC PPERRCOUNT count it 558 PUNLOCK PPERRLOCK unlock the list 02E63 EC001E1E 558 STZ PPERRLOCK 02E64 0C800000 558 ION 559 PLOCK MSQINLOCK lock so we can call MSREADREQ 02E65 0CC00000 559 IOFF 02E66 D1C01F16 559 SETT MSQINLOCK 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 550 (LIQUID) F 32 Liquidate a process 02E67 FE0C2E69 559 JNE MA(2+DISPW MA 0) 02E68 DC40308B 559 CALLNP LOCKWAIT 02E69 60970801 2 4 BASE 560 LD R2 PPL,PPBLOCK get the block number 02E6A 61170801 4 4 BASE 561 LD R4 PPL,PPBLOCK ...for the call 02E6B DC003936 562 CALL MSREADREQ put in request for the block from MS 02E6C 40440000 IMM 563 PARVL 0 pass type of request 564 *** this may need to be changed! 565 PUNLOCK MSQINLOCK release the list 02E6D EC001F16 565 STZ MSQINLOCK 02E6E 0C800000 565 ION 02E6F 5D1F8001 6 STAK 566 LEAVE POP return 567 * --- 568 569 END DISCARDPAL and DONEPPL subroutines 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 551 (LIQUID) F 32 Liquidate a process 571 572 ********************************************************************************** 573 * * 574 * QDISK * 575 * Routine to place a mass storage write element onto the * 576 * mass storage write queue. We check to see if the * 577 * block which we are about to queue up for a write is already in * 578 * the write queue. If it is, we just discard the MSQ * 579 * element and return. This prevents having dozens * 580 * (or even two) writes queued up for the same page. We may * 581 * remove the extra busy count from the PPL because we know that * 582 * it can not go to zero (since there is another write queue * 583 * element and we still have the write queue locked). * 584 * Note that we cannot avoid the requested write if the existing * 585 * write is now represented by the element at the head of the * 586 * write queue. This is because the disk driver may already have * 587 * gotten it written, but just not gotten the completion interrupt * 588 * and removed the entry. * 589 * Call: * 590 * PPBUSYWORD already incremented for this element * 591 * R3 => MSQ element * 592 * PPL * 593 * CALLNP QDISK put element into write queue * 594 * * 595 * * 596 * Eats R0:R1, and maybe R3. * 597 * Stack required = 1 * 598 * 1 + max ( LOCKWAIT (0), PFREEMEM (0) ) * 599 * * 600 ********************************************************************************** 601 602 BLOCK 603 ENTRY QDISK to place MSQ into disk write queue 604 605 BEGFRAME 606 ENDFRAME 607 02E70 DD5F8001 6 STAK 608 QDISK ENTRNP PUSH 609 PLOCK MSQOUTLOCK call to lock the mass storage output queues 02E71 0CC00000 609 IOFF 02E72 D1C01F17 609 SETT MSQOUTLOCK 02E73 FE0C2E75 609 JNE MA(2+DISPW MA 0) 02E74 DC40308B 609 CALLNP LOCKWAIT 02E75 60090081 0 4 ZBM 610 LD R0 PPL,PPBLOCK/VOLFIELD get the volume number 02E76 60201F22 0 0 611 LD R0 VOLNTABLE(R0) R0 => VOLN element 02E77 60560817 1 0 BASE 612 LD R1 R0,VOLNWRITEQ get initial pointer from the list 02E78 FA722E7D 1 613 JNZA R1 LISTNOTMT jump if the list is not empty 02E79 E4D60817 3 0 BASE 614 ST R3 R0,VOLNWRITEQ put this new element into the list 02E7A 60040001 0 IMM 615 LD R0 1*BIT FLMSPROC get the appropriate bit 02E7B FC001CF6 0 616 IORM R0 FLAGS indicate to the dispatcher to run MS proc 02E7C FE0E2E84 617 JMP UPCOUNTERS now go and add to counters 618 * --- 619 00002E7D 620 LISTNOTMT LABEL there is at least one entry in write q 02E7D 60085F10 0 1 ZBM 621 LD R0 R1,MSQLINK get pointer to second element 02E7E FA322E81 0 622 JNZA R0 DODUPCHECK jump if list long enough to do checking 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 552 (LIQUID) F 32 Liquidate a process 623 * \ / first element does not count, since it may 624 * be already essentially written out. 02E7F E4C85F10 3 1 ZBM 625 ST R3 R1,MSQLINK put this element right behind first 02E80 FE0E2E84 626 JMP UPCOUNTERS now go and add to counters 627 * --- 628 00002E81 629 DODUPCHECK LABEL list is long enough to check 02E81 49160802 4 0 BASE 630 RLSRCH PPL R0,MSQPPPTR look for another pointer to this PPL 02E82 FE022E88 631 JEQ RELGO if another write already in queue, skip this one 02E83 E4C85F10 3 1 ZBM 632 ST R3 R1,MSQLINK hook on our new element 633 * the forward link is already cleared 00002E84 634 UPCOUNTERS LABEL 02E84 D0001F19 635 INC DISKWBUSY indicate another write scheduled 636 PUNLOCK MSQOUTLOCK call to release the mass storage output queues 02E85 EC001F17 636 STZ MSQOUTLOCK 02E86 0C800000 636 ION 02E87 5D1F8001 6 STAK 637 LEAVE POP return to caller 638 * --- 639 640 ********************************************************************************** 641 * * 642 * We found that a write for the current page is already * 643 * in the write queue. Remove the count corresponding to this * 644 * write queue element. We may do this because the write queue * 645 * is still locked with at least one other write queue element * 646 * for this page. We feel free to remove the dualwrite element * 647 * (if one exists), since dualwrite pairings are constant. We * 648 * then release the list and give back the space for the MSQ. * 649 * * 650 ********************************************************************************** 651 00002E88 652 RELGO LABEL 02E88 D0570802 4 BASE 653 DEC PPL,PPBUSYWORD decrement busy count 654 PUNLOCK MSQOUTLOCK release mass storage output queue 02E89 EC001F17 654 STZ MSQOUTLOCK 02E8A 0C800000 654 ION 02E8B 5C16C803 3 BASE 655 CMZ R3,MSQXPTR check for a dual write control element 02E8C FE022E90 656 JEQ RELNOXTRA exit if none 02E8D DC002F5D 657 CALL SFREEMEM free up the secondary write control element 02E8E 41440004 IMM 658 PARV (PPLNTH+FBILNTH) LOG 2 indicate size of PPL and FBI 02E8F 4056C803 3 BASE 659 PARVL R3,MSQXPTR and address 00002E90 660 RELNOXTRA LABEL 02E90 DC002F5D 661 CALL SFREEMEM call to return the space 02E91 41440002 IMM 662 PARV MSQLOG indicate its size 02E92 4052C000 3 REG 663 PARVL R3 and address 02E93 5D1F8001 6 STAK 664 LEAVE POP return 665 * --- 666 667 END of Qdisk routine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 553 (LIQUID) F 32 Liquidate a process 669 670 ********************************************************************************** 671 * * 672 * A mass storage request relating to the given MS block * 673 * has completed. Release all processes in SQMSWAIT for this * 674 * block. Nothing more is done is the request did not involve * 675 * a physical memory page (i.e. PPL = 0). * 676 * If a PPL is involved, it is in the PPAGE list. Prior * 677 * to release, users awaiting the block receive a PAL for the * 678 * corresponding VP element. If no such user exists, the PPL * 679 * is discarded to the idle list with DONEPPL (it was the * 680 * object of an idle page write, or the operator killed the * 681 * user who requested the block, etc). * 682 * We should enter here with PPBUSYWORD including a * 683 * count for the caller. * 684 * Call: * 685 * SP = stack pointer * 686 * PPL => PPL (0 if none) * 687 * interrupts off! * 688 * CALL PAGEREADY * 689 * PARVL * 690 * * 691 * * 692 * Eats R0:R5. * 693 * Stack required = 11 * 694 * 3 + max ( DONEPPL (4), FINDVP (4), FSXPAND (2), * 695 * LOCKWAIT (0), MAKEPAL (8), MAPINMEM (3), * 696 * MAPOUTMEM (1), SETRUNNING (2) ) * 697 * * 698 ********************************************************************************** 699 700 BLOCK PAGEREADY subroutine 701 702 ENTRY PAGEREADY called when a block has been handled 703 704 BEGFRAME 00178801 6 BASE 705 PCBPTR BSS 1 holds pointer to PCB 00178802 6 BASE 706 PAGENUM BSS 1 holds disk address 707 ENDFRAME 708 02E94 DD1F8003 6 STAK 709 PAGEREADY ENTR PUSH 02E95 C0578802 6 BASE 710 STPVL SP,PAGENUM get block number 02E96 FB302E99 4 711 JZA PPL PAGEAGAIN jump if no PPL pointer 02E97 5C090812 4 ZBM 712 CMZ PPL,PPMEMERR does this page have a memory error? 02E98 FE0C2EC8 713 JNE SRCHFML1 if so, don't give it to anyone 714 * \ / 715 00002E99 716 PAGEAGAIN LABEL 717 PLOCK SQLOCKS(NQMSWAIT) call to lock the scheduler mass storage wait 02E99 0CC00000 717 IOFF 02E9A D1C01DBC 717 SETT SQLOCKS(NQMSWAIT) 02E9B FE0C2E9D 717 JNE MA(2+DISPW MA 0) 02E9C DC40308B 717 CALLNP LOCKWAIT 02E9D 60178802 0 6 BASE 718 LD R0 SP,PAGENUM get the block number 02E9E 60801DAB 2 719 LD R2 SQMSWAIT pointer to the first queue element 02E9F 60C41DAB 3 IMM 720 LD R3 ADR SQMSWAIT pointer to the head pointer 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 554 (LIQUID) F 32 Liquidate a process 02EA0 48168801 0 2 BASE 721 RLSRCH R0 R2,PCQPARM look for any interested users 02EA1 FE0C2EC5 722 JNE SRCHFML jump if none left 723 * \ / 724 725 ********************************************************************************** 726 * * 727 * There was a user queued up for this block. Remove him * 728 * from the MSWAIT queue and place him into the RUNNABLE queue. * 729 * * 730 ********************************************************************************** 731 732 * \ / 02EA2 60089F10 0 2 ZBM 733 LD R0 R2,PCQLINK get the link to the next PCB in MSWAIT 02EA3 E408DF10 0 3 ZBM 734 ST R0 R3,PCQLINK remove this element from MSWAIT queue 735 PUNLOCK SQLOCKS(NQMSWAIT) call to release scheduler mass storage wait 02EA4 EC001DBC 735 STZ SQLOCKS(NQMSWAIT) 02EA5 0C800000 735 ION 736 * \ / 02EA6 E4978801 2 6 BASE 737 ST R2 SP,PCBPTR save PCB pointer 02EA7 FB302EBE 4 738 JZA PPL PAGEDONE jump if no PPL pointer 02EA8 DC0025EB 739 CALL MAPINMEM map in this users memory 02EA9 40489F13 2 ZBM 740 PARVL R2,PCPSADRS pointer to the PSA 02EAA 60D28000 3 2 REG 741 LD R3 R2 save PCB pointer through FINDVP 02EAB 6048DF13 1 3 ZBM 742 LD R1 R3,PCPSADRS get pointer to PSA 02EAC 6016C000 0 3 CACH 743 LD R0 R3,PCQPARM2 fetch the users page number 744 * search for the VP element 02EAD DC40265F 745 CALLNP FINDVP find the VP element 02EAE FE0E2EB1 746 JMP TRYMONVP jump if not found 02EAF 60400461 1 747 LD R1 FNDVPUPC get UPC of indirect VP reference 02EB0 FE0E2EB6 748 JMP HAVEVP jump if found 749 * --- 750 00002EB1 751 TRYMONVP LABEL 02EB1 61401ECB 5 752 LD VPP MONVM get head of monitor page list 02EB2 6016C000 0 3 CACH 753 LD R0 R3,PCQPARM2 get the page number requested 02EB3 3C174004 0 5 CACH 754 LSRCH R0 VPP,VPVPN search monitor VP list 02EB4 FE0C2EBE 755 JNE PAGEDONE if not found, don't create a PAL 02EB5 60440000 1 IMM 756 LD R1 0 indicate that this is not an indirect VP reference 757 * \ / 758 00002EB6 759 HAVEVP LABEL 02EB6 DC002631 760 CALL MAKEPAL create PAL for page 02EB7 41524000 1 REG 761 PARV R1 pass indirect VP UPC 02EB8 4156C000 3 CACH 762 PARV R3,PCQPARM2 indicate page number 02EB9 4048DF13 3 ZBM 763 PARVL R3,PCPSADRS pass PSA pointer 764 * \ / 765 CLRTBIT PPL,PPMODIFIED test and clear PPL modified bit 02EBA 60030000 0 IMM 765 LD R0 1*BIT(((PPL,PPMODIFIED) DISP (PPL,0))/BITS 0:4) 02EBB A8170802 0 4 BASE 765 BRSBM R0 PPL,(((PPL,PPMODIFIED) DISP (PPL,0))/BITS 15:31) 02EBC FE022EBE 766 JEQ PAGEDONE jump if already clear 02EBD EDC8DC12 3 ZBM 767 STW R3,PAMODIFIED transfer modified bit to new victim 768 * \ / 769 00002EBE 770 PAGEDONE LABEL 02EBE E1178801 4 6 BASE 771 EXCH R4 SP,PCBPTR set PCB pointer, save R4 02EBF DC402B99 772 CALLNP SETRUNNING put this user into SQRUNNABLE 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 555 (LIQUID) F 32 Liquidate a process 02EC0 5C001C7A 773 CMZ FSXCOUNT check the count of pages available 02EC1 FE062EC3 774 JGE FSXNOTLOW still plenty in the wholepage list 02EC2 DC402B0E 775 CALLNP FSXPAND looks like we have used a few, replenish 776 * \ / 777 00002EC3 778 FSXNOTLOW LABEL 02EC3 61178801 4 6 BASE 779 LD R4 SP,PCBPTR restore R4 02EC4 FE0E2E99 780 JMP PAGEAGAIN look for other interested users 781 * --- 782 783 ********************************************************************************** 784 * * 785 * All users requesting this page have been taken care of. * 786 * The PPL should include a busy count of one for the caller. * 787 * We remove this count, and call DONEPPL if no other user * 788 * is referencing this page. Note that if a user had previously * 789 * been running then we must restore his free storage pointers. * 790 * * 791 ********************************************************************************** 792 00002EC5 793 SRCHFML LABEL 02EC5 DC4025FC 794 CALLNP MAPOUTMEM unmap user's memory 795 PUNLOCK SQLOCKS(NQMSWAIT) call to release the scheduler mass storage 02EC6 EC001DBC 795 STZ SQLOCKS(NQMSWAIT) 02EC7 0C800000 795 ION 796 * \ / 797 00002EC8 798 SRCHFML1 LABEL 02EC8 FB302ECD 4 799 JZA PPL PAGEXIT just leave if no PPL 800 * \ / 801 802 ********************************************************************************** 803 * * 804 * Call to remove the use count attributable to the * 805 * old MSQ element. * 806 * * 807 ********************************************************************************** 808 809 * \ / PPHASHFLD, PPL => PPAGE element 810 02EC9 70C90012 3 4 ZBM 811 LDN R3 PPL,PPMODIFIED get the modified bit (everywhere in R3) 812 CLRTBIT PPL,PPMODIFIED remove indication of modification 02ECA 60030000 0 IMM 812 LD R0 1*BIT(((PPL,PPMODIFIED) DISP (PPL,0))/BITS 0:4) 02ECB A8170802 0 4 BASE 812 BRSBM R0 PPL,(((PPL,PPMODIFIED) DISP (PPL,0))/BITS 15:31) 02ECC DC402E1E 813 CALLNP DONEPPL call to discard the page 814 * \ / 815 00002ECD 816 PAGEXIT LABEL 02ECD DC0025EB 817 CALL MAPINMEM call to mapin user free storage pointers 02ECE 40400412 818 PARVL CPPSA pointer to his process status area 02ECF 5D1F8003 6 STAK 819 LEAVE POP return to the caller 820 * --- 821 822 END PAGEREADY subroutine 823 824 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 556 (LIQUID) F 32 Liquidate a process 825 END LIQUID discard routines 58 INPUT GETFREEMEM free memory managers 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 557 (GETFREEMEM) F 33 Resident Free Space Managers 3 4 GETFREEMEM BLOCK free memory management routines 5 6 ENTRY FCFREEMEM free virtual free storage (FCB's) 7 ENTRY FCGETMEM fetch virtual free storage (FCB's) 8 ENTRY PFREEMEM free virtual free storage (PAL's) 9 ENTRY PGETMEM fetch virtual free storage (PAL's) 10 ENTRY SFREEMEM free system free storage 11 ENTRY SGETMEM fetch a piece of system free storage 12 ENTRY UCFREEMEM free virtual free storage (UCE's) 13 ENTRY UCGETMEM fetch virtual free storage (UCE's) 14 ENTRY UFREEMEM free user free storage 15 ENTRY UGETMEM fetch a piece of user free storage 16 ENTRY UPCFREEMEM free virtual free storage (UPC's) 17 ENTRY UPCGETMEM fetch virtual free storage (UPC's) 18 ENTRY USERGETMEM fetch virtual free storage (generic) 19 ENTRY VFREEMEM free virtual free storage (VPP's) 20 ENTRY VGETMEM fetch virtual free storage (VPP's) 21 ENTRY GETMEMPAGE get user memory page 22 ENTRY FREEMEMPAGE free user memory page 23 ENTRY GETMAD fetch available monitor page number 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 558 (GETFREEMEM) F 33 Resident Free Space Managers 25 26 ********************************************************************************** 27 * * 28 * UGETMEM/SGETMEM * 29 * User/system get memory. This routine gets a block of free * 30 * memory and returns the address in R0. If unable to acquire a page, * 31 * we halt. Note that this routine and routines that it calls must * 32 * NOT use the stack/stack pointer in any way, shape or form. * 33 * The parameter may not be passed from R1. * 34 * Call: * 35 * Eats R1 before parameters are passed * 36 * CALL SGETMEM/UGETMEM * 37 * PARVL LOG 2 * 38 * ST R0
* 39 * * 40 * Eats R1, Sets R0. * 41 * Stack required = 0. * 42 * 0 + Max ( CPUPFLOAD (0), GETMAD (0), GETWHOLEPG (0), * 43 * LOCKWAIT (0) ) * 44 * * 45 ********************************************************************************** 46 47 BLOCK SGETMEM/UGETMEM subroutines 48 ENTRY SGETMEM 49 ENTRY UGETMEM 50 51 00002ED0 52 UGETMEM LABEL 02ED0 DD124000 1 REG 53 SGETMEM ENTR R1 02ED1 0CC00000 54 IOFF disallow any interrupts 02ED2 E4400457 1 55 ST R1 GETMR7 save away callers R7 02ED3 E6800453 23 56 ST2 R2 GETMR2 save registers R2 and R3 02ED4 C0524000 1 REG 57 STPVL R1 log of the block size in R1 58 * \ / 59 60 PLOCK MEMLOCK get access to free storage lists 02ED5 0CC00000 60 IOFF 02ED6 D1C01C6C 60 SETT MEMLOCK 02ED7 FE0C2ED9 60 JNE MA(2+DISPW MA 0) 02ED8 DC40308B 60 CALLNP LOCKWAIT 02ED9 6844000A 1 IMM 61 UCPR R1 MEMLISTMAX how close to a page is the request 02EDA FE082EDE 62 JLT SIZEOK if smaller, no special checking 02EDB FE042F09 63 JGT ILSIZEHALT if larger, something is broken 02EDC D1528000 2 REG 64 STMW R2 indicate a whole page is requested 02EDD FE0E2EEE 65 JMP GMNDPAGE off to get that page 66 * --- 67 00002EDE 68 SIZEOK LABEL 02EDE 60221C6D 0 1 69 LD R0 MEMLIST(R1) get root of this size 02EDF FA302EE9 0 70 JZA R0 GMSHUFFL jump if nothing there 02EE0 60960800 2 0 BASE 71 LD R2 R0,0 02EE1 E4A21C6D 2 1 72 ST R2 MEMLIST(R1) remove the block from free usage 73 * \ / 74 00002EE2 75 GMBYEBYE LABEL 02EE2 EC160800 0 BASE 76 STZ R0,0 zap what pointer was there 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 559 (GETFREEMEM) F 33 Resident Free Space Managers 02EE3 60400457 1 77 LD R1 GETMR7 restore callers R7 02EE4 62800453 23 78 LD2 R2 GETMR2 restore the used registers 79 PUNLOCK MEMLOCK release access to free storage lists 02EE5 EC001C6C 79 STZ MEMLOCK 02EE6 0C800000 79 ION 02EE7 0C800000 80 ION restore interrupts 02EE8 5D124000 1 REG 81 LEAVE R1 return to user 82 * --- 83 84 ********************************************************************************** 85 * * 86 * We must shuffle up the lists to get freeness from larger freeness * 87 * * 88 ********************************************************************************** 89 00002EE9 90 GMSHUFFL LABEL 02EE9 60840000 2 IMM 91 LD R2 0 this counter will tell which level we're on 00002EEA 92 GMSHUFUP LABEL 02EEA 18840001 2 IMM 93 ADD R2 1 remember we moved up one level 02EEB 18440001 1 IMM 94 ADD R1 1 try the next higher block size 02EEC 6444000A 1 IMM 95 CPR R1 MEMLISTMAX are we at the top? 02EED FE082EFC 96 JLT GETNOPAGE jump if current size less than a page 97 * \ / 98 99 ********************************************************************************** 100 * * 101 * We are now requesting a full page, the process is to get one from * 102 * the wholepage list. Find an available virtual address and map the page * 103 * into ALL CPU's page files. * 104 * * 105 ********************************************************************************** 106 107 * \ / 00002EEE 108 GMNDPAGE LABEL 02EEE E6400455 12 109 ST2 R1 GETMREGS we need to save these counter values 02EEF DC403031 110 CALLNP GETWHOLEPG get a page from the whole page list 02EF0 FE0E2F08 111 JMP NOMEMPAGE jump if completely out of free space 02EF1 DC40301D 112 CALLNP GETMAD get an available virtual address 02EF2 DC002FCB 113 CALL CPUPFLOAD load up all the CPU's page files 02EF3 41520000 0 REG 114 PARV R0 pass the PM value 02EF4 4052C000 3 REG 115 PARVL PFPTR and pass the monitor virtual page number 02EF5 608AD400 2 3 CBM 116 LD R2 R3*PAGEFIELD produce virtual address 02EF6 600A9F10 0 2 CBM 117 LD R0 R2/FLDADRS copy the address to save it 02EF7 60441000 1 IMM 118 LD R1 CPP number of characters per page 02EF8 FE580000 119 CFILL 000 zap the whole thing 02EF9 62400455 12 120 LD2 R1 GETMREGS restore these valuable registers 02EFA FA882EE2 2 121 JLTZ R2 GMBYEBYE if request for a page, all done here 02EFB FE0E2F00 122 JMP GMSHUFDN adjust to the size we need 123 * --- 124 00002EFC 125 GETNOPAGE LABEL 02EFC 60221C6D 0 1 126 LD R0 MEMLIST(R1) get the pointer for this level 02EFD FA302EEA 0 127 JZA R0 GMSHUFUP jump if none here either 02EFE 60D60800 3 0 BASE 128 LD R3 R0,0 02EFF E4E21C6D 3 1 129 ST R3 MEMLIST(R1) remove the found memory 130 * \ / 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 560 (GETFREEMEM) F 33 Resident Free Space Managers 131 00002F00 132 GMSHUFDN LABEL 02F00 1847FFFF 1 IMM 133 ADD R1 -1 move down with our free block 02F01 7422255E 0 1 134 XOR R0 BITTAB(R1) form half free block address 02F02 60E21C6D 3 1 135 LD R3 MEMLIST(R1) get current list end marker 02F03 E4D60800 3 0 BASE 136 ST R3 R0,0 and mark new list end 02F04 E4221C6D 0 1 137 ST R0 MEMLIST(R1) free half of the block 02F05 7422255E 0 1 138 XOR R0 BITTAB(R1) restore block address 02F06 FAA22F00 2 139 DRJ R2 GMSHUFDN jump if not to our size yet 02F07 FE0E2EE2 140 JMP GMBYEBYE leave this routine 141 * --- 142 143 ********************************************************************************** 144 * * 145 * No Storage Available. The FSXCOUNT word has been crying to the * 146 * system that pages were needed for free storage. The scheduler seems * 147 * to have been unable to respond fast enough to prevent completely * 148 * running out. This is most likely caused by a tight loop which includes * 149 * a request for free storage. * 150 * * 151 ********************************************************************************** 152 00002F08 153 NOMEMPAGE LABEL 02F08 00130080 154 HALT HALTS0080 no free storage available 155 * --- 156 157 ********************************************************************************** 158 * * 159 * Request for a piece of storage larger then a page. Someone * 160 * is not playing by the rules. * 161 * * 162 ********************************************************************************** 163 00002F09 164 ILSIZEHALT LABEL 02F09 00130083 165 HALT HALTS0083 request for bigger than a page 166 * --- 167 168 END SGETMEM and UGETMEM subroutines 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 561 (GETFREEMEM) F 33 Resident Free Space Managers 170 171 ********************************************************************************** 172 * * 173 * USERGETMEM/VGETMEM/FCGETMEM/UCGETMEM/UPCGETMEM/PGETMEM. * 174 * Get user a chunk of memory. This routine gets a block of * 175 * virtual free memory and returns the address in R0. If we are * 176 * unable to satisfy the request there are two possibilities, 1) * 177 * we ran out physical memory in which case we halt, or 2) the * 178 * user has used up his allocated virtual free storage, in which * 179 * case we also halt. We can do some recovery the first time the * 180 * user exceeds his storage allocation: When the session was * 181 * built, a chunk of its virtual storage was set aside. We now * 182 * free that chunk (temporarily satisfying the user), but then * 183 * give him an interrupt that can only be handled by Control Mode. * 184 * CM will limit what the user can do until we say everything's * 185 * OK again (i.e. until we have enough memory to reserve another * 186 * chunk). If the user exceeds his limit while we have no reserve, * 187 * we have no choice but to halt. * 188 * Currently we give the user four pages of monitor virtual * 189 * memory for some of his free storage needs. When each user is * 190 * to be run we map his physical memory into the same virtual * 191 * address space. The requirements for physical memory increases * 192 * with system load but the limiting factor, monitor virtual * 193 * address space, we are attempting to conserve. * 194 * The parameter may not be passed in R1. * 195 * Call: * 196 * eats R1 before passing parameters * 197 * CALL USERGETMEM/VGETMEM/FCGETMEM/UCGETMEM/UPCGETMEM/PGETMEM * 198 * PARVL LOG 2 * 199 * ST R0
* 200 * * 201 * Eats R1, Sets R0. * 202 * Stack required = 0. * 203 * 0 + Max ( GETVPAGE (0), GETWHOLEPG (0), LOCKWAIT (0) ) * 204 * * 205 ********************************************************************************** 206 207 BLOCK USERGETMEM/VGETMEM/FCGETMEM/UCGETMEM/UPCGETMEM/PGETMEM routine 208 ENTRY USERGETMEM 209 ENTRY FCGETMEM 210 ENTRY PGETMEM 211 ENTRY UCGETMEM 212 ENTRY UPCGETMEM 213 ENTRY VGETMEM 214 00002F0A 215 USERGETMEM LABEL 00002F0A 216 FCGETMEM LABEL 00002F0A 217 PGETMEM LABEL 00002F0A 218 UCGETMEM LABEL 00002F0A 219 UPCGETMEM LABEL 02F0A DD124000 1 REG 220 VGETMEM ENTR R1 02F0B 0CC00000 221 IOFF CPU can not be interrupted 02F0C E4400457 1 222 ST R1 GETMR7 save away callers R7 02F0D E6800453 23 223 ST2 R2 GETMR2 scratch registers, save original contents 02F0E C0524000 1 REG 224 STPVL R1 log of the block size 225 * \ / 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 562 (GETFREEMEM) F 33 Resident Free Space Managers 226 227 * check for proper mapping 00002F0F 228 USERGM2 LABEL 02F0F 6001F00E 0 229 LD R0 UMEMPSA PSA owner of this memory list 02F10 64000413 0 230 CPR R0 CMAPPSA is this the one mapped in? 02F11 FE022F13 231 JEQ RIGHTGUY giving memory to the right guy? 02F12 00130086 232 HALT HALTS0086 wrong mapping while getting user memory 233 * --- 234 00002F13 235 RIGHTGUY LABEL 236 PLOCK UMEMLOCK get access to user's free storage lists 02F13 0CC00000 236 IOFF 02F14 D1C1F00F 236 SETT UMEMLOCK 02F15 FE0C2F17 236 JNE MA(2+DISPW MA 0) 02F16 DC40308B 236 CALLNP LOCKWAIT 02F17 6844000A 1 IMM 237 UCPR R1 MEMLISTMAX how close to a page is the request? 02F18 FE082F1C 238 JLT SIZEOK if smaller, no special checking 02F19 FE042F5C 239 JGT BADSIZEHALT if larger, someone is broken 02F1A D1528000 2 REG 240 STMW R2 indicate a whole page is requested 02F1B FE0E2F2C 241 JMP NEEDPAGE off to get that page 242 * --- 243 00002F1C 244 SIZEOK LABEL 02F1C 6023F000 0 1 245 LD R0 USERMEM(R1) get root of this size 02F1D FA302F27 0 246 JZA R0 VMSHUFFL jump if nothing there 02F1E 60960800 2 0 BASE 247 LD R2 R0,0 02F1F E4A3F000 2 1 248 ST R2 USERMEM(R1) remove the block from free usage 249 * \ / 250 00002F20 251 VMBYEBYE LABEL 02F20 EC160800 0 BASE 252 STZ R0,0 zap what pointer was there 02F21 60400457 1 253 LD R1 GETMR7 restore the contents 02F22 62800453 23 254 LD2 R2 GETMR2 restore the used registers 255 PUNLOCK UMEMLOCK release access to free storage lists 02F23 EC01F00F 255 STZ UMEMLOCK 02F24 0C800000 255 ION 02F25 0C800000 256 ION allow interrupts to the CPU 02F26 5D124000 1 REG 257 LEAVE R1 return to user 258 * --- 259 260 ********************************************************************************** 261 * * 262 * We must shuffle up the lists to get freeness from larger freeness * 263 * * 264 ********************************************************************************** 265 00002F27 266 VMSHUFFL LABEL 02F27 60840000 2 IMM 267 LD R2 0 this counter will tell which level we're on 00002F28 268 VMSHUFUP LABEL 02F28 18840001 2 IMM 269 ADD R2 1 remember we moved up one level 02F29 18440001 1 IMM 270 ADD R1 1 try the next higher block size 02F2A 6444000A 1 IMM 271 CPR R1 MEMLISTMAX are we at the top? 02F2B FE082F3B 272 JLT NOPAGEYET jump if current size less than a page 273 * \ / 274 275 ********************************************************************************** 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 563 (GETFREEMEM) F 33 Resident Free Space Managers 276 * * 277 * We are now requesting a full page. We proceed as * 278 * follows: first we check if the user has used up all his * 279 * virtual pages available for free storage use. If not we * 280 * then get a page from the whole page list, making sure that * 281 * we lock MEMLIST. Then we load the page file with the page * 282 * map value and store that value into the users PSA for later * 283 * use. * 284 * * 285 ********************************************************************************** 286 287 * \ / 00002F2C 288 NEEDPAGE LABEL 02F2C E6400455 12 289 ST2 R1 GETMREGS we need to save these counter values 02F2D DC403027 290 CALLNP GETVPAGE get virtual page for a user, if any 02F2E FE0E2F47 291 JMP UEXCDLIM user exceeded his limit 02F2F DC403031 292 CALLNP GETWHOLEPG get an available physical page 02F30 FE0E2F5B 293 JMP NOMEMPAGE jump if completely out of free space 294 * \ / 295 296 ********************************************************************************** 297 * R0 = page map value returned by GETWHOLEPG, * 298 * R2 = index into PSMAPVALS set by GETVPAGE, * 299 * R3 = virtual page number set by GETVPAGE * 300 ********************************************************************************** 301 02F31 60400413 1 302 LD R1 CMAPPSA need to store away the PM value 02F32 E41C501B 0 12 BASE 303 ST R0 R1,PSMAPVALS(R2) that should do it 02F33 00D20000 0 REG 304 LDPF R0 allow the CPU to get at it 02F34 608AD400 2 3 CBM 305 LD R2 R3*PAGEFIELD produce virtual address 02F35 600A9F10 0 2 CBM 306 LD R0 R2/FLDADRS copy the address to save it 02F36 60441000 1 IMM 307 LD R1 CPP number of characters per page 02F37 FE580000 308 CFILL 000 zap the whole thing 02F38 62400455 12 309 LD2 R1 GETMREGS restore these valuable registers 02F39 FA882F20 2 310 JLTZ R2 VMBYEBYE if request for a page, all done here 02F3A FE0E2F3F 311 JMP VMSHUFDN adjust to the size we need 312 * --- 313 00002F3B 314 NOPAGEYET LABEL 02F3B 6023F000 0 1 315 LD R0 USERMEM(R1) get the pointer for this level 02F3C FA302F28 0 316 JZA R0 VMSHUFUP jump if none here either 02F3D 60D60800 3 0 BASE 317 LD R3 R0,0 02F3E E4E3F000 3 1 318 ST R3 USERMEM(R1) remove the found memory 319 * \ / 320 00002F3F 321 VMSHUFDN LABEL 02F3F 1847FFFF 1 IMM 322 ADD R1 -1 move down with our free block 02F40 7422255E 0 1 323 XOR R0 BITTAB(R1) form half free block address 02F41 60E3F000 3 1 324 LD R3 USERMEM(R1) get current list end marker 02F42 E4D60800 3 0 BASE 325 ST R3 R0,0 and mark new list end 02F43 E423F000 0 1 326 ST R0 USERMEM(R1) free half of the block 02F44 7422255E 0 1 327 XOR R0 BITTAB(R1) restore block address 02F45 FAA22F3F 2 328 DRJ R2 VMSHUFDN jump if not to our size yet 02F46 FE0E2F20 329 JMP VMBYEBYE leave this routine 330 * --- 331 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 564 (GETFREEMEM) F 33 Resident Free Space Managers 332 ********************************************************************************** 333 * * 334 * A user has asked for more free storage than we can give him. * 335 *Let him die gracefully by giving him the space we reserved in * 336 *UMEMXTRA. We hope that this will be enough to get him back to * 337 *the dispatcher and handle the error we send to CM (UINTVMFISR). * 338 *CM is to then disallow operations that might use up more space * 339 *(e.g. underprocess creation, opening files, etc.). We reach the * 340 *halt if we didn't free enough to get the process back to the * 341 *dispatcher (look for loops or a series of GETMEMs), or if we get * 342 *back to CM, but enough operations (most likely page faults) slip * 343 *through the cracks to exceed the XALOG chunk. Note that the * 344 *user gets to keep the space he needs to get to the dispatcher * 345 *(we don't want him to fail), so this reduces the amount that he * 346 *can use afterwards. * 347 * * 348 ********************************************************************************** 349 00002F47 350 UEXCDLIM LABEL 02F47 6041F00D 1 351 LD R1 UMEMXTRA see if we still have leeway 02F48 FA722F4A 1 352 JNZA R1 HAVEXA jump if so 02F49 0013008B 353 HALT HALTS008B else, user out of virtual free storage 354 * --- 355 356 * phew! We have some space to give him 00002F4A 357 HAVEXA LABEL 02F4A EC01F00D 358 STZ UMEMXTRA say area no longer available 02F4B 6001F007 0 359 LD R0 USERMEM(XALOG) "free" the reserved area 02F4C E4164800 0 1 BASE 360 ST R0 R1,0 by tacking (empty) list onto us 02F4D E441F007 1 361 ST R1 USERMEM(XALOG) and putting new head on 362 PUNLOCK UMEMLOCK avoid deadlock 02F4E EC01F00F 362 STZ UMEMLOCK 02F4F 0C800000 362 ION 363 364 * cripple the user 02F50 60400413 1 365 LD R1 CMAPPSA get users session 366 PLOCK R1,PSLOCK get access to PSA 02F51 0CC00000 366 IOFF 02F52 D1D6480C 1 BASE 366 SETT R1,PSLOCK 02F53 FE0C2F55 366 JNE MA(2+DISPW MA 0) 02F54 DC40308B 366 CALLNP LOCKWAIT 02F55 EDC8561D 1 ZBM 367 STW R1,PSUERROR/RTVMFISRB say there's a no memory 368 PUNLOCK R1,PSLOCK release access to PSA 02F56 EC16480C 1 BASE 368 STZ R1,PSLOCK 02F57 0C800000 368 ION 369 370 * retry the current request for space 02F58 6044000A 1 IMM 371 LD R1 MEMLISTMAX calculate requested size 02F59 10400456 1 372 SUB R1 GETMREGS(1) as max - difference 02F5A FE0E2F0F 373 JMP USERGM2 try again 374 * --- 375 376 ********************************************************************************** 377 * * 378 * We are totally out of free storage, crash and burn. * 379 * * 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 565 (GETFREEMEM) F 33 Resident Free Space Managers 380 ********************************************************************************** 381 00002F5B 382 NOMEMPAGE LABEL 02F5B 0013008C 383 HALT HALTS008C out of free storage 384 * --- 385 386 387 ********************************************************************************** 388 * * 389 * Request for a piece of storage larger then a page. Someone * 390 * is not playing by the rules. * 391 * * 392 ********************************************************************************** 393 00002F5C 394 BADSIZEHALT LABEL 02F5C 00130088 395 HALT HALTS0088 request for bigger than a page 396 * --- 397 398 END VGETMEM/FCGETMEM/UCGETMEM/UPCGETMEM/PGETMEM routine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 566 (GETFREEMEM) F 33 Resident Free Space Managers 400 401 ********************************************************************************** 402 * * 403 * UFREEMEM/SFREEMEM. * 404 * User/system free memory. This routine simply returns * 405 * a free block of memory to the system. If we happen to * 406 * recombine a whole page, then we place the page on the * 407 * wholepage list and alert the dispatcher that an extra * 408 * page is available for other uses. * 409 * Note that this routine and all routines that it may * 410 * call must NOT use the stack/stack pointer in any way, * 411 * shape or form since some callers do not have a stack. * 412 * Warning! Do not attempt to receive parameters in * 413 * registers due to the ENTRS. It will cause problems!!! * 414 * Call: * 415 * CALL SFREEMEM/UFREEMEM * 416 * PARV LOG 2 * 417 * PARVL
* 418 * Note: neither parameter may be in R0. * 419 * * 420 * Eats R0:R1. * 421 * Stack required = 0. * 422 * 0 + max ( CPUPFLOAD (0), LOCKWAIT (0), OVERLAPCK (0), * 423 * PUTWHOLEPG (0) ) * 424 * * 425 ********************************************************************************** 426 427 BLOCK SFREEMEM/UFREEMEM subroutine 428 ENTRY SFREEMEM 429 ENTRY UFREEMEM 430 00002F5D 431 UFREEMEM LABEL 02F5D DD920000 0 REG 432 SFREEMEM ENTRS R0 02F5E 5C17C802 7 BASE 433 CMZ R7,2 take page faults now (KLUDGE!!!) 02F5F 0CC00000 434 IOFF disallow any interrupts 02F60 E4000457 0 435 ST R0 FREMR7 save the callers R7 02F61 DCD3C000 7 REG 436 EXPCS R7 back to get the parameters 02F62 C1400454 437 STPV FREMR3 fetch the size of block 02F63 C0400453 438 STPVL FREMR2 get the block address 439 * \ / 440 02F64 E2800453 23 441 EXCH2 R2 FREMR2 R2 = address, R3 = log size 02F65 7885FFFF 2 IMM 442 AND R2 ONEBITS/FLDADRS remove extraneous garbage 443 PLOCK MEMLOCK get access to free storage lists 02F66 0CC00000 443 IOFF 02F67 D1C01C6C 443 SETT MEMLOCK 02F68 FE0C2F6A 443 JNE MA(2+DISPW MA 0) 02F69 DC40308B 443 CALLNP LOCKWAIT 02F6A FE0E2F6D 444 JMP FREEM00 default to no checking 445 * NOP the previous instruction to run the overlap memory checker 02F6B DC003045 446 CALL OVERLAPCK check for freeing illegal pieces of memory 02F6C 40441C6D IMM 447 PARVL ADR MEMLIST pointer to the memory list 448 * \ / 449 00002F6D 450 FREEM00 LABEL 02F6D EC168800 2 BASE 451 STZ R2,0 remove extraneous pointers 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 567 (GETFREEMEM) F 33 Resident Free Space Managers 02F6E 38261C6D 0 3 452 LEA R0 MEMLIST(R3) load effective address of list head 02F6F 68C4000A 3 IMM 453 UCPR R3 MEMLISTMAX are we all the way up to a page? 02F70 FE082F87 454 JLT FREEM10 jump if not 02F71 FE042F8E 455 JGT ILSIZFREED caller attempted to free piece larger than page 456 * \ / 457 458 ********************************************************************************** 459 * * 460 * Whole pages have no buddies so we are through with the recombining * 461 * algorithm. What we need to do is place the page onto the whole page * 462 * list and make sure that no CPU's can access it, we therefore unmap * 463 * the page from ALL the CPU's. Sometimes life is tough all over. * 464 * * 465 ********************************************************************************** 466 467 * \ / 02F72 608A9C80 2 2 CBM 468 LD R2 R2/PAGEFIELD pick up the virtual page number 02F73 7C840080 2 IMM 469 IOR R2 MONPF make it a monitor page number 02F74 60D28000 3 2 REG 470 LD PFPTR R2 put the pointer into the right register 02F75 80D2C000 3 REG 471 PFRC R3 we need the page map value in R3 02F76 EC0ADC20 3 CBM 472 STZ R3/(PFALTBIT+PFREFBIT) be sure we find it 02F77 EDF41CC6 2 @ 473 STW @PAVPAGES(R2) indicate this page is now available 02F78 DC002FCB 474 CALL CPUPFLOAD request to unload all page files 02F79 41440000 IMM 475 PARV 0 flag indicating unloading request 02F7A 40528000 2 REG 476 PARVL R2 virtual page number to unload 02F7B DC403074 477 CALLNP PUTWHOLEPG put page into the whole page list 02F7C FE0E2F81 478 JMP FREMDONE finished with this guy 479 * --- 480 00002F7D 481 FREEM05 LABEL 02F7D 74A6255E 2 3 482 XOR R2 BITTAB(R3) restore address of block 02F7E 60560800 1 0 BASE 483 LD R1 R0,0 get ptr to remainder of list 02F7F E4568800 1 2 BASE 484 ST R1 R2,0 place behind this element 02F80 E4960800 2 0 BASE 485 ST R2 R0,0 insert us into the list 486 * \ / 487 00002F81 488 FREMDONE LABEL 02F81 60000457 0 489 LD R0 FREMR7 restore the callers R7 02F82 62800453 23 490 LD2 R2 FREMR2 restore these registers before leaving 491 PUNLOCK MEMLOCK release access to free storage lists 02F83 EC001C6C 491 STZ MEMLOCK 02F84 0C800000 491 ION 02F85 0C800000 492 ION restore interrupt capabilities 02F86 5D120000 0 REG 493 LEAVE R0 return to caller 494 * --- 495 496 ********************************************************************************** 497 * * 498 * Search the list for this blocks buddy and combine if * 499 * found. At one time, this recombination was done with an * 500 * LSRCH and new entries were added to the head of the list. * 501 * However, the technique that we are now using produces * 502 * ordered lists which work much better. This is because new * 503 * requests are always assigned from the lowest address. * 504 * Therefore, all unused space tends to be at the higher * 505 * addresses and it has a much better chance of getting * 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 568 (GETFREEMEM) F 33 Resident Free Space Managers 506 * recombined into larger blocks. The ordered lists * 507 * therefore stay much shorter and this more than * 508 * compensates for the slower insertion speed. Also, in a * 509 * system whose load has decreased considerably, the excess * 510 * free storage will tend to gather where it is isolated * 511 * until its buddy comes along. This improves considerably * 512 * the ability of the system to recover whole pages. * 513 * Note that these lists are terminated by a word which has * 514 * zeros in the link field (a legal list terminator) but has a * 515 * high bit on. This is so that the search for a buddy * 516 * (via RLSHLE) will never fall off the end of the list, but * 517 * will stop at the insertion point, even if the insertion * 518 * point is at the end of the list. * 519 * * 520 * R0 -> list header, R2 -> block, R3 = log size * 521 * * 522 ********************************************************************************** 523 00002F87 524 FREEM10 LABEL 02F87 74A6255E 2 3 525 XOR R2 BITTAB(R3) calculate address of buddy 02F88 4C960800 2 0 BASE 526 RLSHLE R2 R0,0 find buddy in list 02F89 FE0C2F7D 527 JNE FREEM05 jump if past possible buddy 02F8A 60968800 2 2 BASE 528 LD R2 R2,0 get buddys ptr to the remainder of his list 02F8B E0960800 2 0 BASE 529 EXCH R2 R0,0 remove the buddy from the list 530 * (and get back pointer to him!) 02F8C 28A6255E 2 3 531 BSUB R2 BITTAB(R3) make address of next larger block 02F8D FAE02F6D 3 532 IRJ R3 FREEM00 move to next higher level 533 * --- 534 535 ********************************************************************************** 536 * * 537 * The caller tried to free a piece of storage larger than * 538 * a page. This is a bad screw up. * 539 * * 540 ********************************************************************************** 541 00002F8E 542 ILSIZFREED LABEL 02F8E 00130084 543 HALT HALTS0084 freeing piece larger than a page 544 * --- 545 546 END SFREEMEM/UFREEMEM subroutine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 569 (GETFREEMEM) F 33 Resident Free Space Managers 548 549 ********************************************************************************** 550 * * 551 * VFREEMEM/FCFREEMEM/UCFREEMEM/UPCFREEMEM/PFREEMEM * 552 * Give back user/system free memory. This routine * 553 * simply returns a block of free memory to the system. If * 554 * we happen to recombine a whole page, then we place that * 555 * page on the wholepage list and alert the dispatcher that * 556 * an extra page is available for other uses. If we happen * 557 * to give back a whole page then we clear the PM value in * 558 * the PSA, if we can't find it then something screwed up * 559 * and we halt. To clean up the last of the users free * 560 * storage all that should be necessary is to free the * 561 * first 16 words of usermem. * 562 * Call: * 563 * CALL VFREEMEM/FCFREEMEM/UCFREEMEM/UPCFREEMEM/PFREEMEM * 564 * PARV LOG 2 * 565 * PARVL
* 566 * Note: neither parameter may be in R0. * 567 * * 568 * Eats R0:R1. * 569 * Stack required = 0. * 570 * 0 + max ( CLEARVPAGE (0), LOCKWAIT (0), OVERLAPCK (0), * 571 * PUTWHOLEPG (0) ) * 572 * * 573 ********************************************************************************** 574 575 BLOCK VFREEMEM/FCFREEMEM/UCFREEMEM/UPCFREEMEM/PFREEMEM subroutine 576 ENTRY FCFREEMEM 577 ENTRY PFREEMEM 578 ENTRY UCFREEMEM 579 ENTRY UPCFREEMEM 580 ENTRY VFREEMEM 581 00002F8F 582 FCFREEMEM LABEL 00002F8F 583 PFREEMEM LABEL 00002F8F 584 UCFREEMEM LABEL 00002F8F 585 UPCFREEMEM LABEL 02F8F DD920000 0 REG 586 VFREEMEM ENTRS R0 02F90 5C17C802 7 BASE 587 CMZ R7,2 take page faults now (KLUDGE!!!) 02F91 0CC00000 588 IOFF disallow any interrupts 02F92 E4000457 0 589 ST R0 FREMR7 save the callers R7 02F93 DCD3C000 7 REG 590 EXPCS R7 back to get the parameters 02F94 C1400454 591 STPV FREMR3 fetch the size of block 02F95 C0400453 592 STPVL FREMR2 get the block address 593 * \ / 594 595 * check for proper mapping 02F96 6001F00E 0 596 LD R0 UMEMPSA PSA owner of this memory list 02F97 64000413 0 597 CPR R0 CMAPPSA is this the one mapped in? 02F98 FE022F9A 598 JEQ RIGHTGUY freeing memory to the right guy 02F99 00130087 599 HALT HALTS0087 wrong mapping while freeing user memory 600 * --- 601 00002F9A 602 RIGHTGUY LABEL 02F9A E2800453 23 603 EXCH2 R2 FREMR2 R2 = address, R3 = log size 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 570 (GETFREEMEM) F 33 Resident Free Space Managers 02F9B 7885FFFF 2 IMM 604 AND R2 ONEBITS/FLDADRS remove extraneous garbage 605 PLOCK UMEMLOCK get access to free storage lists 02F9C 0CC00000 605 IOFF 02F9D D1C1F00F 605 SETT UMEMLOCK 02F9E FE0C2FA0 605 JNE MA(2+DISPW MA 0) 02F9F DC40308B 605 CALLNP LOCKWAIT 02FA0 FE0E2FA3 606 JMP VFREEM00 default to no checking 607 * NOP the previous instruction to run the overlap memory checker 02FA1 DC003045 608 CALL OVERLAPCK check for freeing illegal pieces of memory 02FA2 4045F000 IMM 609 PARVL ADR USERMEM pointer to memory lists 610 * \ / 611 00002FA3 612 VFREEM00 LABEL 02FA3 EC168800 2 BASE 613 STZ R2,0 remove extraneous pointers 02FA4 3827F000 0 3 614 LEA R0 USERMEM(R3) load effective address of list head 02FA5 68C4000A 3 IMM 615 UCPR R3 MEMLISTMAX are we all the way up to a page? 02FA6 FE082FBA 616 JLT VFREEM10 jump if not 02FA7 FE042FC1 617 JGT BADSIZFREED caller attempted to free piece larger than page 618 * \ / 619 620 ********************************************************************************** 621 * * 622 * Whole pages have no buddies so we are through with the recombining * 623 * algorithm. What we need to do is place the page onto the whole page * 624 * list and make sure that no CPU's can access it. We therefore unmap * 625 * the page from ALL the CPU's. Sometimes life is tough all over. * 626 * * 627 ********************************************************************************** 628 629 * \ / 02FA8 608A9C80 2 2 CBM 630 LD R2 R2/PAGEFIELD pick up the virtual page number 02FA9 7C840080 2 IMM 631 IOR R2 MONPF make it a monitor page number 02FAA 60D28000 3 2 REG 632 LD PFPTR R2 put the pointer into the right register 02FAB 80D2C000 3 REG 633 PFRC R3 put the page file value in R3 02FAC EC0ADC20 3 CBM 634 STZ R3/(PFALTBIT+PFREFBIT) make sure we find it 02FAD DC403074 635 CALLNP PUTWHOLEPG put page into the whole page list 02FAE DC402FC2 636 CALLNP CLEARVPAGE clear the PM value from the PSA 02FAF FE0E2FB4 637 JMP VFREMDONE finished with this guy 638 * --- 639 00002FB0 640 VFREEM05 LABEL 02FB0 74A6255E 2 3 641 XOR R2 BITTAB(R3) restore address of block 02FB1 60560800 1 0 BASE 642 LD R1 R0,0 get ptr to remainder of list 02FB2 E4568800 1 2 BASE 643 ST R1 R2,0 place behind this element 02FB3 E4960800 2 0 BASE 644 ST R2 R0,0 insert us into the list 645 * \ / 646 00002FB4 647 VFREMDONE LABEL 02FB4 60000457 0 648 LD R0 FREMR7 restore the callers R7 02FB5 62800453 23 649 LD2 R2 FREMR2 restore these registers before leaving 650 PUNLOCK UMEMLOCK release access to free storage lists 02FB6 EC01F00F 650 STZ UMEMLOCK 02FB7 0C800000 650 ION 02FB8 0C800000 651 ION restore interrupt capabilities 02FB9 5D120000 0 REG 652 LEAVE R0 return to caller 653 * --- 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 571 (GETFREEMEM) F 33 Resident Free Space Managers 654 655 ********************************************************************************** 656 * * 657 * Search the list for this blocks buddy and combine if * 658 * found. At one time, this recombination was done with an * 659 * LSRCH and new entries were added to the head of the list. * 660 * However, the technique that we are now using produces * 661 * ordered lists which work much better. This is because new * 662 * requests are always assigned from the lowest address. * 663 * Therefore, all unused space tends to be at the higher * 664 * addresses and it has a much better chance of getting * 665 * recombined into larger blocks. The ordered lists * 666 * therefore stay much shorter and this more than * 667 * compensates for the slower insertion speed. Also, in a * 668 * system whose load has decreased considerably, the excess * 669 * free storage will tend to gather where it is isolated * 670 * until its buddy comes along. This improves considerably * 671 * the ability of the system to recover whole pages. * 672 * Note that these lists are terminated by a word which has * 673 * zeros in the link field (a legal list terminator) but has a * 674 * high bit on. This is so that the search for a buddy * 675 * (via RLSHLE) will never fall off the end of the list, but * 676 * will stop at the insertion point, even if the insertion * 677 * point is at the end of the list. * 678 * * 679 * R0 -> list header, R2 -> block, R3 = log size * 680 * * 681 ********************************************************************************** 682 00002FBA 683 VFREEM10 LABEL 02FBA 74A6255E 2 3 684 XOR R2 BITTAB(R3) calculate address of buddy 02FBB 4C960800 2 0 BASE 685 RLSHLE R2 R0,0 find buddy in list 02FBC FE0C2FB0 686 JNE VFREEM05 jump if past possible buddy 02FBD 60968800 2 2 BASE 687 LD R2 R2,0 get buddys ptr to the remainder of his list 02FBE E0960800 2 0 BASE 688 EXCH R2 R0,0 remove the buddy from the list 689 * (and get back pointer to him!) 02FBF 28A6255E 2 3 690 BSUB R2 BITTAB(R3) make address of next larger block 02FC0 FAE02FA3 3 691 IRJ R3 VFREEM00 move to next higher level 692 * --- 693 694 ********************************************************************************** 695 * * 696 * The caller tried to free a piece of storage larger than * 697 * a page. This is a bad screw up. * 698 * * 699 ********************************************************************************** 700 00002FC1 701 BADSIZFREED LABEL 02FC1 00130089 702 HALT HALTS0089 freeing piece larger than a page 703 * --- 704 705 END VFREEMEM/FCFREEMEM/UCFREEMEM/UPCFREEMEM/PFREEMEM subroutine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 572 (GETFREEMEM) F 33 Resident Free Space Managers 707 708 ********************************************************************************** 709 * * 710 * This routine is called to clear a page map value out of * 711 * the PSA mapvalues. The page map value to be cleared is in R3, and * 712 * it is assumed that the value has been unloaded from the page file. * 713 * The reason we do this is so the value is not accidentally mapped * 714 * back into the page file. * 715 * Call: * 716 * R3 := page map value looking for * 717 * * 718 * CALL CLEARVPAGE * 719 * * 720 * Eats R0:R1, R3. * 721 * Stack required = 0. * 722 * * 723 ********************************************************************************** 724 725 BLOCK CLEARVPAGE routine 726 ENTRY CLEARVPAGE 727 02FC2 DD400459 728 CLEARVPAGE ENTRNP MEMVARPC 02FC3 60400413 1 729 LD R1 CMAPPSA pointer to the currently mapped PSA 02FC4 60040003 0 IMM 730 LD R0 MAXMAPVALS-1 our index/counter 731 * \ / 732 00002FC5 733 CLRVPLOOP LABEL 02FC5 64DC401B 3 10 BASE 734 CPR R3 R1,PSMAPVALS(R0) is this the one we are looking for? 02FC6 FE022FC9 735 JEQ FOUND yes, we have found it 02FC7 FA262FC5 0 736 JDR R0 CLRVPLOOP see if more to look at 02FC8 0013008A 737 HALT HALTS008A can not find PM value 738 * --- 739 00002FC9 740 FOUND LABEL 02FC9 EC1C401B 10 BASE 741 STZ R1,PSMAPVALS(R0) no longer in existence 02FCA 5D000459 742 LEAVE MEMVARPC 743 * --- 744 745 END CLEARVPAGE routine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 573 (GETFREEMEM) F 33 Resident Free Space Managers 747 748 ********************************************************************************** 749 * * 750 * Routine to store a pmvalue into all CPUs and into the page 0 * 751 * page map. Note that the page map value for monitor virtual page 0 * 752 * is restored upon exit. * 753 * Call: * 754 * * 755 * CALL CPUPFLOAD * 756 * PARV * 757 * PARVL * 758 * * 759 * Eats R0:R2. * 760 * Stack required = 0. * 761 * 0 + max ( LOCKWAIT (0) ) * 762 * * 763 ********************************************************************************** 764 765 BLOCK CPUPFLOAD routine 766 ENTRY CPUPFLOAD 767 02FCB DD000459 768 CPUPFLOAD ENTR MEMVARPC 02FCC C140045C 769 STPV MEMVAREG2 this gets the PM value 02FCD C0528000 2 REG 770 STPVL R2 and this is the virtual page number 02FCE E2C0045B 34 771 EXCH2 R3 MEMVAREG1 store away R3 and R4 772 * R2 <= virtual page number, R4 <= PM value 773 * \ / 774 02FCF 60C40080 3 IMM 775 LD PFPTR MONPF+0 get page number for monitor page zero 02FD0 80800458 776 PFRD MEMVAR1 save away the page map value 02FD1 00C01CC7 777 LDPF PAGEZERO map in the power fail stuff 02FD2 E5240300 4 2 778 ST R4 PFMAP(-MONPF)(R2) store new value there 02FD3 FB0C2FD5 4 779 JNEZ R4 NOTUNLOAD jump if loading 02FD4 61002FE9 4 780 LD R4 PFILLREF load illegal to reference PF contents 00002FD5 781 NOTUNLOAD LABEL 02FD5 60C50000 3 IMM 782 LD R3 STOREPF get a command to hit the page file 02FD6 18D28000 3 2 REG 783 ADD R3 R2 add in the page number 02FD7 6044000F 1 IMM 784 LD R1 NUMSLOTS-1 get counter for slots 785 * \ / 786 00002FD8 787 THEPFLOOP LABEL 02FD8 60220370 0 1 788 LD R0 IBSLOTS(R1) check each slot in turn 02FD9 600A0040 0 0 CBM 789 LD R0 R0/WRU0TYPE isolate the type 02FDA 64040002 0 IMM 790 CPR R0 SLTTCPU check for a CPU 02FDB FE0C2FE4 791 JNE LOOPEND jump if not a CPU 792 PLOCK CPUCOMLOCK prevent collisions 02FDC 0CC00000 792 IOFF 02FDD D1C01CF5 792 SETT CPUCOMLOCK 02FDE FE0C2FE0 792 JNE MA(2+DISPW MA 0) 02FDF DC40308B 792 CALLNP LOCKWAIT 02FE0 60130000 0 4 REG 793 LD R0 R4 get the page file contents to store 02FE1 0C52C000 3 REG 794 STTB R3 do it to it 795 PUNLOCK CPUCOMLOCK 02FE2 EC001CF5 795 STZ CPUCOMLOCK 02FE3 0C800000 795 ION 00002FE4 796 LOOPEND LABEL 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 574 (GETFREEMEM) F 33 Resident Free Space Managers 02FE4 FA662FD8 1 797 JDR R1 THEPFLOOP scan all slots 798 * \ / 799 02FE5 60C40080 3 IMM 800 LD PFPTR MONPF+0 get page 0 page number 02FE6 00C00458 801 LDPF MEMVAR1 and restore the original contents 02FE7 62C0045B 34 802 LD2 R3 MEMVAREG1 back to original condition 02FE8 5D000459 803 LEAVE MEMVARPC return to caller 804 * --- 805 02FE9 00060000 806 PFILLREF VFD 1*PFROBIT+1*PFALTBIT in PF, this sez illegal to reference 00010000 ABS 807 STOREPF EQU BUSCWRITE+CPUPFOFSET command to write into CPUs PF 808 809 END CPUPFLOAD routine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 575 (GETFREEMEM) F 33 Resident Free Space Managers 811 812 ********************************************************************************** 813 * * 814 * This routine returns the page that a user has been using * 815 * for his free storage lists. The page is put directly into the * 816 * idle page list. Also the entries in the PSA are checked to make * 817 * sure that all the pages this user has used are properly returned, * 818 * if not we halt. Oh yes, the page file location pointing to this * 819 * page is marked illegal to reference in case anybody has any bright * 820 * ideas. * 821 * Call: * 822 * * 823 * CALLNP FREEMEMPAGE * 824 * * 825 * Eats R0:R3. * 826 * Stack required = 1. * 827 * 0 + max ( CLEARVPAGE (0), LOCKWAIT (0), PUTIDLE (0) ) * 828 * * 829 ********************************************************************************** 830 831 BLOCK FREEMEMPAGE routine 832 ENTRY FREEMEMPAGE 833 02FEA DD40045A 834 FREEMEMPAGE ENTRNP MEMVARPC2 02FEB E500045B 4 835 ST R4 MEMVAREG1 save away this register 02FEC 60C400FC 3 IMM 836 LD PFPTR PNUSERMEM page file pointer 02FED 80D2C000 3 REG 837 PFRC R3 mark that location as illegal to reference 02FEE EC0ADC20 3 CBM 838 STZ R3/(PFALTBIT+PFREFBIT) zero this field just in case 839 PLOCK WPAGELOCK gain access to the free storage PPL lists 02FEF 0CC00000 839 IOFF 02FF0 D1C01C78 839 SETT WPAGELOCK 02FF1 FE0C2FF3 839 JNE MA(2+DISPW MA 0) 02FF2 DC40308B 839 CALLNP LOCKWAIT 02FF3 60001C77 0 840 LD R0 FSPPLIST pointer to the first PPL 02FF4 38401C77 1 841 LEA R1 FSPPLIST in essence, this is his predecessor 02FF5 48D60803 3 0 BASE 842 RLSRCH R3 R0,PPPMVALUE look for this PPL in the list 02FF6 FE022FF8 843 JEQ FOUND no problem if he is there 02FF7 0013008F 844 HALT HALTS008F but we halt if he is gone 845 * --- 846 00002FF8 847 FOUND LABEL 02FF8 61081F10 4 0 ZBM 848 LD R4 R0,PPLINK pointer to the following PPL 02FF9 E5085F10 4 1 ZBM 849 ST R4 R1,PPLINK this unlinks us from the list 850 PUNLOCK WPAGELOCK so we may release the list 02FFA EC001C78 850 STZ WPAGELOCK 02FFB 0C800000 850 ION 02FFC 61120000 4 0 REG 851 LD PPL R0 put the pointer into the right register 02FFD DC402D51 852 CALLNP PUTIDLE return the PPL to the idle list 853 * R3 <- page map value to clear, set by the PFRC instruction 02FFE DC402FC2 854 CALLNP CLEARVPAGE clear the page map value from the PSA 02FFF EC000413 855 STZ CMAPPSA no one is mapped in here 03000 6100045B 4 856 LD R4 MEMVAREG1 restore the contents of this register 03001 5D00045A 857 LEAVE MEMVARPC2 return back to the caller 858 * --- 859 860 END FREEMEMPAGE routine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 576 (GETFREEMEM) F 33 Resident Free Space Managers 862 863 ********************************************************************************** 864 * * 865 * This routine gets a page for the user if he has not exceeded * 866 * his limit and maps the page into the page file. It also makes an * 867 * entry into the PSA. This is the guy that must get a page to set * 868 * up the users resident free storage lists. Note that this routine * 869 * gets its page directly from the idle list, so we better not run * 870 * out. The parameter we pass is stored directly into CMAPPSA so that * 871 * the routines we call can use this value when needed. * 872 * Call: * 873 * * 874 * CALL GETMEMPAGE * 875 * PARVL * 876 * ST R0 * 877 * * 878 * Eats R1:R2, Sets R0. * 879 * Stack required = 1. * 880 * 0 + max ( GETIDLE (1), GETVPAGE (0), LOCKWAIT (0) ) * 881 * * 882 ********************************************************************************** 883 884 BLOCK GETMEMPAGE routine 885 ENTRY GETMEMPAGE 886 03002 DD00045A 887 GETMEMPAGE ENTR MEMVARPC2 03003 C0400413 888 STPVL CMAPPSA put PSA pointer here 03004 E500045B 4 889 ST R4 MEMVAREG1 save away this register 03005 DC403027 890 CALLNP GETVPAGE request for virtual address 03006 0013008D 891 HALT HALTS008D couldn't even give the guy one page 03007 DC402D1C 892 CALLNP GETIDLE request for an idle page 03008 0013008E 893 HALT HALTS008E system ran out of PPLs 894 PLOCK WPAGELOCK get access to the FSPPLIST list 03009 0CC00000 894 IOFF 0300A D1C01C78 894 SETT WPAGELOCK 0300B FE0C300D 894 JNE MA(2+DISPW MA 0) 0300C DC40308B 894 CALLNP LOCKWAIT 0300D EC170801 4 BASE 895 STZ PPL,PPBLOCK indicate nothing here anymore 0300E 60001C77 0 896 LD R0 FSPPLIST get the head honcho 0300F E4091F10 0 4 ZBM 897 ST R0 PPL,PPLINK put him behind the new PPL 03010 E5001C77 4 898 ST PPL FSPPLIST he is now the head cheese 899 PUNLOCK WPAGELOCK done with the list for now 03011 EC001C78 899 STZ WPAGELOCK 03012 0C800000 899 ION 03013 60170803 0 4 BASE 900 LD R0 PPL,PPPMVALUE get the identifying page map value 03014 60400413 1 901 LD R1 CMAPPSA pointer to the current process 902 * R2 <- index into PSA mapvalues, set from GETVPAGE 03015 E41C501B 0 12 BASE 903 ST R0 R1,PSMAPVALS(R2) put this value in the PSA 03016 00D20000 0 REG 904 LDPF R0 let this CPU have access to it 03017 608AD400 2 3 CBM 905 LD R2 R3*PAGEFIELD shift page number into page field 03018 600A9F10 0 2 CBM 906 LD R0 R2/FLDADRS put the address into R0 03019 60441000 1 IMM 907 LD R1 CPP number of characters per page 0301A FE580000 908 CFILL 000 zero the whole page 0301B 6100045B 4 909 LD R4 MEMVAREG1 restore R4 0301C 5D00045A 910 LEAVE MEMVARPC2 return back to the caller 911 * --- 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 577 (GETFREEMEM) F 33 Resident Free Space Managers 912 913 END GETMEMPAGE routine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 578 (GETFREEMEM) F 33 Resident Free Space Managers 915 916 ********************************************************************************** 917 * * 918 * This routine fetches the next available virtual monitor * 919 * page number, and returns the virtual page number in R3. If * 920 * no monitor page numbers are available this routine will halt. * 921 * Call: * 922 * MEMLOCK * 923 * CALLNP GETMAD * 924 * ST R3 * 925 * * 926 * Sets R3. * 927 * Stack required = 0. * 928 * * 929 ********************************************************************************** 930 931 BLOCK GETMAD routine 932 ENTRY GETMAD 933 0301D DD400459 934 GETMAD ENTRNP MEMVARPC 0301E 60C40088 3 IMM 935 LD PFPTR PNINITPAGE starting page number 0000301F 936 FGTPNLP LABEL 0301F 5C361CC6 3 @ 937 CMZ @PAVPAGES(PFPTR) check on this page 03020 FE0C3022 938 JNE FGTHVNUM jump if this now good page number 03021 FAE0301F 3 939 IRJ PFPTR FGTPNLP up to next page and go back 940 * --- may wish overflow check! 941 00003022 942 FGTHVNUM LABEL 03022 64C40100 3 IMM 943 CPR PFPTR MONPF+NPS check against the max memory page 03023 FE063026 944 JGE MEMORYGONE jump if no more address space 03024 EC361CC6 3 @ 945 STZ @PAVPAGES(PFPTR) indicate this address used 03025 5D000459 946 LEAVE MEMVARPC return to caller 947 * --- 948 949 ********************************************************************************** 950 * * 951 * All of monitor virtual memory space has been used up * 952 * * 953 ********************************************************************************** 954 00003026 955 MEMORYGONE LABEL 03026 00130023 956 HALT HALTS0023 no more monitor memory 957 * --- 958 959 END GETMAD routine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 579 (GETFREEMEM) F 33 Resident Free Space Managers 961 962 ********************************************************************************** 963 * * 964 * This routine fetches the next available virtual monitor * 965 * page number that the user is allowed to use for free storage. * 966 * Be sure that virtual pages returned by this routine are not * 967 * available to the system, PAVPAGES value set to zero (currently * 968 * we use only four). * 969 * Note that this routine returns R2 as an index into the PSMAPVALS * 970 * in the PSA, this is used by some of the code so don't screw it up. * 971 * Call: * 972 * * 973 * CALLNP GETVPAGE * 974 * JMP * 975 * ST R2 * 976 * ST R3 * 977 * * 978 * Eats R1. Sets R2, R3. * 979 * Stack required = 0. * 980 * * 981 ********************************************************************************** 982 983 BLOCK GETVPAGE routine 984 ENTRY GETVPAGE 985 03027 DD400459 986 GETVPAGE ENTRNP MEMVARPC 03028 60400413 1 987 LD R1 CMAPPSA get pointer to the currently mapped PSA 03029 6087FFFC 2 IMM 988 LD R2 -MAXMAPVALS our index/counter 0000302A 989 GETVPLOOP LABEL 0302A 5C1C501F 12 BASE 990 CMZ R1,PSMAPVALS(MAXMAPVALS)(R2) is this virtual address available? 0302B FE02302E 991 JEQ FOUND success, give back the good news 0302C FAA0302A 2 992 IRJ R2 GETVPLOOP if not, try for the next one 993 * \ / 994 995 * no free pages available! 0000302D 996 RETURN LABEL 0302D 5D000459 997 LEAVE MEMVARPC back to the caller 998 * --- 999 1000 * a free page exists, set return values 0000302E 1001 FOUND LABEL 0302E 18840004 2 IMM 1002 ADD R2 MAXMAPVALS do a fixup on our index 0302F 60D690FC 3 2 REG 1003 LD R3 PNUSERMEM+R2 give corresponding PF page number 03030 FBE0302D 7 1004 IRJ R7 RETURN have a good return 1005 * --- 1006 1007 END GETVPAGE routine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 580 (GETFREEMEM) F 33 Resident Free Space Managers 1009 1010 ********************************************************************************** 1011 * * 1012 * GETWHOLEPG. This routine simply picks up a PPL from the WHOLEPAGE * 1013 * list and puts it into the FSPPLIST, while returning the page map * 1014 * value in R0, simple huh!!! * 1015 * Call: * 1016 * * 1017 * CALLNP GETWHOLEPG * 1018 * JMP * 1019 * ST R0 * 1020 * * 1021 * Eats R1, Sets R0. * 1022 * Stack required = 0. * 1023 * 0 + max ( LOCKWAIT (0) ) * 1024 * * 1025 ********************************************************************************** 1026 1027 BLOCK GETWHOLEPG routine 1028 ENTRY GETWHOLEPG 1029 03031 DD400459 1030 GETWHOLEPG ENTRNP MEMVARPC 1031 PLOCK WPAGELOCK lock the whole page list 03032 0CC00000 1031 IOFF 03033 D1C01C78 1031 SETT WPAGELOCK 03034 FE0C3036 1031 JNE MA(2+DISPW MA 0) 03035 DC40308B 1031 CALLNP LOCKWAIT 03036 60401C79 1 1032 LD R1 WHOLEPAGE pointer to the available whole pages 03037 FA703042 1 1033 JZA R1 RETURN sorry, but out of luck 03038 60085F10 0 1 ZBM 1034 LD R0 R1,PPLINK next PPL in the list 03039 E4001C79 0 1035 ST R0 WHOLEPAGE PPL is now removed from the WHOLEPAGE list 0303A 60001C77 0 1036 LD R0 FSPPLIST list of mapped free storage pages 0303B E4085F10 0 1 ZBM 1037 ST R0 R1,PPLINK this PPL is now in use 0303C E4401C77 1 1038 ST R1 FSPPLIST from one list to another 0303D 60164803 0 1 BASE 1039 LD R0 R1,PPPMVALUE most important, we need the page map value 0303E D0401C7A 1040 DEC FSXCOUNT indicate we used up another page 0303F 60440004 1 IMM 1041 LD R1 1*BIT FLFSX indicate the wholepage list shrunk 03040 FC401CF6 1 1042 IORM R1 FLAGS let the dispatcher know 03041 19C40001 7 IMM 1043 ADD R7 1 fix up a good return 1044 * \ / 1045 00003042 1046 RETURN LABEL 1047 PUNLOCK WPAGELOCK release the whole page list 03042 EC001C78 1047 STZ WPAGELOCK 03043 0C800000 1047 ION 03044 5D000459 1048 LEAVE MEMVARPC we are through for now 1049 * --- 1050 1051 END GETWHOLEPG routine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 581 (GETFREEMEM) F 33 Resident Free Space Managers 1053 1054 ********************************************************************************** 1055 * * 1056 * This is the OVERLAPCK routine. This code verifies that the block * 1057 * that we are freeing is legal, i.e., that enough low order bits of * 1058 * the address are zero, and that the block does not overlap any already * 1059 * free block. * 1060 * Call: * 1061 * R2 := address to check * 1062 * R3 := blocksize LOG 2 * 1063 * * 1064 * CALL OVERLAPCK * 1065 * PARVL
* 1066 * * 1067 * Eats R0:R1. * 1068 * Stack required = 0. * 1069 * * 1070 ********************************************************************************** 1071 1072 BLOCK OVERLAPCK routine 1073 ENTRY OVERLAPCK 1074 03045 DD000459 1075 OVERLAPCK ENTR MEMVARPC 03046 E7000455 45 1076 ST2 R4 FREMR4 save R4 03047 C0534000 5 REG 1077 STPVL R5 pointer to the memory lists 03048 6066255E 1 3 1078 LD R1 BITTAB(R3) 03049 10440001 1 IMM 1079 SUB R1 1 low order R3 bits of R1 are 1s 0304A 78528000 1 2 REG 1080 AND R1 R2 R1 = low order bits of address 0304B FA4C305C 1 1081 JNEZ R1 FREMHALT1 die if low-order bits non-zero 0304C 5D66305E 3 1082 XCT FREMLDTAB(R3) R1 := address shifted R3 bits right 1083 * \ / 1084 1085 ********************************************************************************** 1086 * * 1087 * Search each list of blocks whose size is less than or equal to * 1088 * the block that we have, looking for one whose address is the same as * 1089 * ours if you ignore the low-order R3 bits. If we find such a block, * 1090 * we die. * 1091 * * 1092 ********************************************************************************** 1093 1094 * \ / 0304D 6112C000 4 3 REG 1095 LD R4 R3 copy the size 0000304E 1096 FREM105 LABEL 0304E 381D6000 0 54 BASE 1097 LEA R0 R5,0(R4) start of R4th list 0304F 5D663069 3 1098 XCT FREMLSTAB(R3) search ignoring R3 low bits 03050 FE02305D 1099 JEQ FREMHALT2 die if found 03051 FB26304E 4 1100 JDR R4 FREM105 and same for each smaller list 03052 6116D001 4 3 REG 1101 LD R4 R3+1 start with first size larger 1102 * \ / 1103 1104 ********************************************************************************** 1105 * * 1106 * Now, search each list of larger blocks, ignoring one more address * 1107 * bit for each size. * 1108 * * 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 582 (GETFREEMEM) F 33 Resident Free Space Managers 1109 ********************************************************************************** 1110 1111 * \ / 00003053 1112 FREM110 LABEL 03053 6504000A 4 IMM 1113 CPR R4 MEMLISTMAX are we at the largest one? 03054 FE06305A 1114 JGE FREM120 jump if beyond largest 03055 604A41F0 1 1 CBM 1115 LD R1 R1/BITS 0:30 shift R1 right 1 03056 381D6000 0 54 BASE 1116 LEA R0 R5,0(R4) start of R4th list 03057 5D683069 4 1117 XCT FREMLSTAB(R4) search ignoring R4 low bits 03058 FE02305D 1118 JEQ FREMHALT2 die if found 03059 FB203053 4 1119 IRJ R4 FREM110 and same for each larger list 1120 * --- 1121 0000305A 1122 FREM120 LABEL 0305A 63000455 45 1123 LD2 R4 FREMR4 restore R4 and R5 0305B 5D000459 1124 LEAVE MEMVARPC back to mainline code 1125 * --- 1126 1127 ********************************************************************************** 1128 * * 1129 * This halt is if someone tried to free a block on the wrong boundary. * 1130 * R2 = address, R3 = size LOG 2. * 1131 * * 1132 ********************************************************************************** 1133 0000305C 1134 FREMHALT1 LABEL 0305C 00130081 1135 HALT HALTS0081 illegal block freed (low order bits) 1136 * --- 1137 1138 ********************************************************************************** 1139 * * 1140 * This halt is if someone tried to free a block that overlaps an * 1141 * already free one. R2 = address, R3 = size log 2. For the already * 1142 * free one, R0 = address, R4 = size log 2. * 1143 * * 1144 ********************************************************************************** 1145 0000305D 1146 FREMHALT2 LABEL 0305D 00130082 1147 HALT HALTS0082 illegal block freed (high order bits) 1148 * --- 1149 1150 ********************************************************************************** 1151 * * 1152 * The following table of instructions is the object of an indexed * 1153 * XCT instruction. The purpose is to load R1 with an address shifted to * 1154 * the right. * 1155 * * 1156 ********************************************************************************** 1157 0000305E 1158 FREMLDTAB LABEL 0305E 604A9F10 1 2 CBM 1159 LD R1 R2/BITS 15:31 shift 0 bits 0305F 604A9F00 1 2 CBM 1160 LD R1 R2/BITS 15:30 shift 1 bit 03060 604A9EF0 1 2 CBM 1161 LD R1 R2/BITS 15:29 shift 2 bits 03061 604A9EE0 1 2 CBM 1162 LD R1 R2/BITS 15:28 shift 3 bits 03062 604A9ED0 1 2 CBM 1163 LD R1 R2/BITS 15:27 shift 4 bits 03063 604A9EC0 1 2 CBM 1164 LD R1 R2/BITS 15:26 shift 5 bits 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 583 (GETFREEMEM) F 33 Resident Free Space Managers 03064 604A9EB0 1 2 CBM 1165 LD R1 R2/BITS 15:25 shift 6 bits 03065 604A9EA0 1 2 CBM 1166 LD R1 R2/BITS 15:24 shift 7 bits 03066 604A9E90 1 2 CBM 1167 LD R1 R2/BITS 15:23 shift 8 bits 03067 604A9E80 1 2 CBM 1168 LD R1 R2/BITS 15:22 shift 9 bits 03068 604A9E70 1 2 CBM 1169 LD R1 R2/BITS 15:21 shift 10 bits 1170 1171 ********************************************************************************** 1172 * * 1173 * The following table is the object of an indexed XCT instruction. * 1174 * The purpose is to search the list begining at R0 for an element whose * 1175 * address (with the low order bits dropped) matches the value in R1. * 1176 * * 1177 ********************************************************************************** 1178 00003069 1179 FREMLSTAB LABEL 03069 3C481F10 1 0 ZBM 1180 LSRCH R1 R0,0/BITS 15:31 drop 0 bits 0306A 3C481F00 1 0 ZBM 1181 LSRCH R1 R0,0/BITS 15:30 drop 1 bit 0306B 3C481EF0 1 0 ZBM 1182 LSRCH R1 R0,0/BITS 15:29 drop 2 bits 0306C 3C481EE0 1 0 ZBM 1183 LSRCH R1 R0,0/BITS 15:28 drop 3 bits 0306D 3C481ED0 1 0 ZBM 1184 LSRCH R1 R0,0/BITS 15:27 drop 4 bits 0306E 3C481EC0 1 0 ZBM 1185 LSRCH R1 R0,0/BITS 15:26 drop 5 bits 0306F 3C481EB0 1 0 ZBM 1186 LSRCH R1 R0,0/BITS 15:25 drop 6 bits 03070 3C481EA0 1 0 ZBM 1187 LSRCH R1 R0,0/BITS 15:24 drop 7 bits 03071 3C481E90 1 0 ZBM 1188 LSRCH R1 R0,0/BITS 15:23 drop 8 bits 03072 3C481E80 1 0 ZBM 1189 LSRCH R1 R0,0/BITS 15:22 drop 9 bits 03073 3C481E70 1 0 ZBM 1190 LSRCH R1 R0,0/BITS 15:21 drop 10 bits 1191 1192 END OVERLAPCK routine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 584 (GETFREEMEM) F 33 Resident Free Space Managers 1194 1195 ********************************************************************************** 1196 * * 1197 * PUTWHOLEPG. This routine is called to return a page to the * 1198 * whole page list, from there the dispatcher has the responsibility * 1199 * to put it into the idle page list. This routine is called with * 1200 * the page map value in R3, that way we can find the proper PPL. * 1201 * If the corresponding PPL is not found we halt, since we are the * 1202 * only ones that can move a PPL from the FSPPLIST. * 1203 * Call: * 1204 * R3 := pointer to page file entry to free * 1205 * * 1206 * CALLNP PUTWHOLEPG * 1207 * * 1208 * Eats R0:R1. * 1209 * Stack required = 0. * 1210 * 0 + max ( LOCKWAIT (0) ) * 1211 * * 1212 ********************************************************************************** 1213 1214 BLOCK PUTWHOLEPG routine 1215 ENTRY PUTWHOLEPG 1216 03074 DD400459 1217 PUTWHOLEPG ENTRNP MEMVARPC place onto the CPU page 1218 PLOCK WPAGELOCK lock the whole page list 03075 0CC00000 1218 IOFF 03076 D1C01C78 1218 SETT WPAGELOCK 03077 FE0C3079 1218 JNE MA(2+DISPW MA 0) 03078 DC40308B 1218 CALLNP LOCKWAIT 03079 60001C77 0 1219 LD R0 FSPPLIST address of the in use PPL's 0307A 38401C77 1 1220 LEA R1 FSPPLIST pointer to the head word 0307B 48D60803 3 0 BASE 1221 RLSRCH R3 R0,PPPMVALUE search for the PPL 0307C FE02307E 1222 JEQ FOUND looks like we found the one we wanted 0307D 00130022 1223 HALT HALTS0022 PPL somehow got freed up 1224 * --- 1225 0000307E 1226 FOUND LABEL 0307E E480045B 2 1227 ST R2 MEMVAREG1 put this register in a safe place 0307F 60881F10 2 0 ZBM 1228 LD R2 R0,PPLINK get the next PPL in the list 03080 E4885F10 2 1 ZBM 1229 ST R2 R1,PPLINK remove the PPL from the FSPPLIST 03081 60401C79 1 1230 LD R1 WHOLEPAGE head pointer of the whole page list 03082 E4481F10 1 0 ZBM 1231 ST R1 R0,PPLINK PPL points to the first one in the list 03083 E4001C79 0 1232 ST R0 WHOLEPAGE we now become the first one in the list 03084 6080045B 2 1233 LD R2 MEMVAREG1 restore this registers contents 1234 PUNLOCK WPAGELOCK unlock the whole page list 03085 EC001C78 1234 STZ WPAGELOCK 03086 0C800000 1234 ION 03087 D0001C7A 1235 INC FSXCOUNT indicate the whole page list grew 03088 60440004 1 IMM 1236 LD R1 1*BIT FLFSX we need to balance the whole page list 03089 FC401CF6 1 1237 IORM R1 FLAGS let the dispatcher in on it 0308A 5D000459 1238 LEAVE MEMVARPC back to where we were called from 1239 * --- 1240 1241 END PUTWHOLEPG routine 1242 1243 END GETFREEMEM free memory management routines 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 585 (LISTLOCK) F 34 Resident Free Space Managers 59 INPUT LISTLOCK list lockers and misc utility 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 586 (LISTLOCK) F 34 List Locking Utilities 3 4 BLOCK List Locking Utilities 5 6 ENTRY DYNMON monitor lock spins 7 ENTRY LOCKLIST routine to lock a list for modification 8 ENTRY LOCKWAIT list lock macro subroutine 9 ENTRY SRCHLIST routine to lock a list for searching 10 ENTRY UNLOCKLIST inverse of LOCKLIST 11 ENTRY UNSRCHLIST inverse of SRCHLIST 12 ENTRY ZEROIT this zeros things 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 587 (LISTLOCK) F 34 List Locking Utilities 14 15 ********************************************************************************** 16 * * 17 * LOCKWAIT. This routine is carefully constructed to * 18 * be used with the PLOCK macro. It relys heavily on the * 19 * internal structure of the macro, so excercise caution. * 20 * * 21 * Eats R0. * 22 * Stack required = 0. * 23 * 0 + max ( DYNMON (0) ) * 24 * * 25 ********************************************************************************** 26 27 BLOCK LOCKWAIT subroutine 28 ENTRY LOCKWAIT 29 0308B DD520000 0 REG 30 LOCKWAIT ENTRNP R0 0308C DC4030BC 31 CALLNP DYNMON monitor dynamic waits 0308D 0C800000 32 ION restore interrupts to their previous state 0308E 11C40004 7 IMM 33 SUB R7 4 back up the return address 0308F 5D120000 0 REG 34 LEAVE R0 then start the macro over 35 * --- 36 37 END LOCKWAIT subroutine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 588 (LISTLOCK) F 34 List Locking Utilities 39 40 ********************************************************************************** 41 * * 42 * ZEROIT * 43 * This routine zeros a continuous field of words of a specified * 44 * length. Return address is placed on the stack. * 45 * * 46 * CALL ZEROIT * 47 * PAR area to clear * 48 * PARVL number of words to clear * 49 * * 50 * Eats R0:R1. * 51 * Stack required = 1. * 52 * * 53 ********************************************************************************** 54 55 BLOCK ZEROIT subroutine 56 ENTRY ZEROIT 57 58 BEGFRAME 59 ENDFRAME 60 03090 DD1F8001 6 STAK 61 ZEROIT ENTR PUSH 03091 C1124000 1 REG 62 STP R1 03092 C0561001 0 REG 63 STPVL R0+1 R0=length-1 00003093 64 ZEROITLP LABEL 03093 EC1C4000 10 BASE 65 STZ R1,0(R0) zero a word 03094 FA263093 0 66 JDR R0 ZEROITLP 03095 5D1F8001 6 STAK 67 LEAVE POP 68 * --- 69 70 END ZEROIT subroutine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 589 (LISTLOCK) F 34 List Locking Utilities 72 73 74 ********************************************************************************** 75 * * 76 * Routines to control the access to certain lists * 77 * and disk tables. They do the interlock trip and maybe loop * 78 * or queue. * 79 * * 80 ********************************************************************************** 81 82 ********************************************************************************** 83 * * 84 * Routine to lock a list for modification. * 85 * SP = stack pointer * 86 * CALL LOCKLIST * 87 * PARL * 88 * LOCKLIST sets bit 0 of the list lock word, and waits until * 89 * it gets the list for modification, then it waits until all * 90 * processes are done searching the list (indicated by the count * 91 * of searchers in the low part of the word). * 92 * Returns with the interrupts off. * 93 * * 94 * Eats R0:R1. * 95 * Stack required = 1. * 96 * 1 + max ( DYNMON (0) ) * 97 * * 98 ********************************************************************************** 99 100 BLOCK LOCKLIST subroutine 101 ENTRY LOCKLIST 102 103 BEGFRAME 104 ENDFRAME 105 03096 DD1F8001 6 STAK 106 LOCKLIST ENTR PUSH 03097 C0124000 1 REG 107 STPL R1 save the list pointer 00003098 108 LOCKLIST1 LABEL 03098 60030000 0 IMM 109 LD R0 LOCKBIT get the bit which locks the list 03099 0CC00000 110 IOFF turn off the interrupts 0309A FC164800 0 1 BASE 111 IORM R0 R1,0 try to grab the list 0309B FE0C309F 112 JNE LOCKLIST2 jump if we got the lock 0309C DC4030BC 113 CALLNP DYNMON monitor dynamic wait 0309D 0C800000 114 ION allow interrupts while waiting 0309E FE0E3098 115 JMP LOCKLIST1 go back to try again 116 * --- 117 0000309F 118 LOCKLIST2 LABEL 0309F 64164800 0 1 BASE 119 CPR R0 R1,0 see if lockbit is unique 030A0 FE0230A3 120 JEQ LOCKLIST3 jump if it is, we have desired access 030A1 DC4030BC 121 CALLNP DYNMON else monitor waits 030A2 FE0E309F 122 JMP LOCKLIST2 and try again 123 * --- 124 000030A3 125 LOCKLIST3 LABEL 030A3 5D1F8001 6 STAK 126 LEAVE POP return to caller 127 * --- 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 590 (LISTLOCK) F 34 List Locking Utilities 128 129 END LOCKLIST subroutine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 591 (LISTLOCK) F 34 List Locking Utilities 131 132 ********************************************************************************** 133 * * 134 * Routine to unlock a list held for modification. Undoes * 135 * LOCKLIST. * 136 * SP = stack pointer * 137 * CALL UNLOCKLIST * 138 * PARL * 139 * Turns on the interrupts. * 140 * * 141 * Eats R0:R1. * 142 * Stack required = 1. * 143 * * 144 ********************************************************************************** 145 146 BLOCK UNLOCKLIST subroutine 147 ENTRY UNLOCKLIST 148 149 BEGFRAME 150 ENDFRAME 151 030A4 DD1F8001 6 STAK 152 UNLOCKLIST ENTR PUSH 030A5 C0124000 1 REG 153 STPL R1 save the list pointer 030A6 60030000 0 IMM 154 LD R0 LOCKBIT get the bit used for modify locking 030A7 A8164800 0 1 BASE 155 BRSBM R0 R1,0 remove this bit from the word 030A8 0C800000 156 ION restore the interrupts 030A9 5D1F8001 6 STAK 157 LEAVE POP return to caller 158 * --- 159 160 END UNLOCKLIST subroutine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 592 (LISTLOCK) F 34 List Locking Utilities 162 163 ********************************************************************************** 164 * * 165 * Routine to set a list to search. * 166 * SP = stack pointer * 167 * CALL SRCHLIST * 168 * PARL * 169 * Disables the interrupts. * 170 * * 171 * Eats R0. * 172 * Stack required = 1. * 173 * 1 + max ( DYNMON (0) ) * 174 * * 175 ********************************************************************************** 176 177 BLOCK SRCHLIST subroutine 178 ENTRY SRCHLIST 179 180 BEGFRAME 181 ENDFRAME 182 030AA DD1F8001 6 STAK 183 SRCHLIST ENTR PUSH 030AB C0120000 0 REG 184 STPL R0 save the lock word address 030AC 0CC00000 185 IOFF turn off the interrupts 000030AD 186 SRCHLIST1 LABEL 030AD D0160800 0 BASE 187 INC R0,0 count up the search busy count 030AE FE0630B6 188 JGE SRCHLIST3 jump if list not being modified 030AF D0560800 0 BASE 189 DEC R0,0 remove our count 000030B0 190 SRCHLIST2 LABEL 030B0 DC4030BC 191 CALLNP DYNMON monitor dynamic waits 030B1 0C800000 192 ION allow interrupts, if any 030B2 0CC00000 193 IOFF ... but not for long 030B3 5C160800 0 BASE 194 CMZ R0,0 is list still being modified? 030B4 FE0630AD 195 JGE SRCHLIST1 jump if not 030B5 FE0E30B0 196 JMP SRCHLIST2 jump to wait some more 197 * --- 198 000030B6 199 SRCHLIST3 LABEL 030B6 5D1F8001 6 STAK 200 LEAVE POP return 201 * --- 202 203 END SRCHLIST subroutine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 593 (LISTLOCK) F 34 List Locking Utilities 205 206 ********************************************************************************** 207 * * 208 * Routine to say that we're done searching. Inverse of * 209 * SRCHLIST. * 210 * SP = stack pointer * 211 * CALL UNSRCHLIST * 212 * PARL * 213 * Enables the interrupts. * 214 * * 215 * Eats R0. * 216 * Stack required = 1. * 217 * * 218 ********************************************************************************** 219 220 BLOCK UNSRCHLIST subroutine 221 ENTRY UNSRCHLIST 222 223 BEGFRAME 224 ENDFRAME 225 030B7 DD1F8001 6 STAK 226 UNSRCHLIST ENTR PUSH 030B8 C0120000 0 REG 227 STPL R0 save the lock word address 030B9 D0560800 0 BASE 228 DEC R0,0 remove our count 030BA 0C800000 229 ION restore interrupts 030BB 5D1F8001 6 STAK 230 LEAVE POP return to caller 231 * --- 232 233 END UNSRCHLIST subroutine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 594 (LISTLOCK) F 34 List Locking Utilities 235 236 ********************************************************************************** 237 * * 238 * Routine to monitor dynamic wait time. We will increment * 239 * the dynamic wait counter, and we will record who was trying * 240 * to wait ( if there is a buffer for this recording ). Call: * 241 * R7 = callers return address * 242 * CALLNP DYNMON * 243 * * 244 * Stack required = 0. * 245 * * 246 ********************************************************************************** 247 248 BLOCK DYNMON subroutine 249 ENTRY DYNMON 250 030BC DD400463 251 DYNMON ENTRNP DYNLINK 030BD D0001D0E 252 INC DYNWAIT advance the global counter 030BE 5C001D14 253 CMZ DYNBLOCK are we monitoring the PC? 030BF FE0230C7 254 JEQ DYNRET jump if not 030C0 E4000464 0 255 ST R0 DYNTEMP save this register 030C1 601030C8 0 @ 256 LD R0 @DYNLINKPTR get bucket number in which to accumulate count 030C2 10040100 0 IMM 257 SUB R0 DYNBASE no interest in addresses below 030C3 500403FF 0 IMM 258 MIN R0 DYNMAX-1 avoid numbers off end of monitor 030C4 54040001 0 IMM 259 MAX R0 1 and page 0 numbers 030C5 D0301D14 0 @ 260 INC @DYNBLOCK(R0) increment the counter 030C6 60000464 0 261 LD R0 DYNTEMP restore register 000030C7 262 DYNRET LABEL 030C7 5D000463 263 LEAVE DYNLINK return 264 * --- 265 030C8 7B080463 266 DYNLINKPTR PTR DYNLINK/DYNBITS bits from PC to monitor 267 268 END DYNMON subroutine 269 270 271 END List Locking Utilities 60 INPUT WINDOW XREQ virtual window handlers 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 595 (WINDOW) F 35 Resident User Window Routines 3 4 BLOCK user page table managers 5 ENTRY CHKWNDOS check for windows 6 ENTRY CREATEVP create a VP element 7 ENTRY DMOTEPAGE move PAL to WS list 8 ENTRY DMOTEWNDO1 move wndo1 PAL to WS list 9 ENTRY DMOTEWNDO2 (you can see the pattern by now) 10 ENTRY DMOTEWNDO3 11 ENTRY DMOTINDPAL move PAL's for indirect pages to WSX 12 ENTRY DUALWRITE accomplish write to two spots 13 ENTRY FINDPAL to find and remove a PAL 14 ENTRY FORCEWRW1 force write of window 1 15 ENTRY FORCEWRW2 force write of window 2 16 ENTRY FORCEWRW3 force write of window 3 17 ENTRY GRUBPAGE release a virtual page 18 ENTRY GRUBVPEL release virtual page element and page 19 ENTRY GRUBWNDO1 release grip on window 1 20 ENTRY GRUBWNDO2 release grip on window 2 21 ENTRY GRUBWNDO3 release grip on window 3 22 ENTRY LOCKPAGE lock an already mapped page 23 ENTRY RSTRWNDO restore window saved by SAVEWNDOx 24 ENTRY SAVEWNDO1 save the state of a window 25 ENTRY SAVEWNDO2 save the state of a window 26 ENTRY SAVEWNDO3 save the state of a window 27 ENTRY SETERRPG set error address for a page 28 ENTRY SETERRW1 set error address for window 1 29 ENTRY SETERRW2 set error address for window 2 30 ENTRY SETERRW3 set error address for window 3 31 ENTRY SETMODIFW1 set modified and clear locked 32 ENTRY SETMODIFW2 set modified and clear locked 33 ENTRY SETMODIFW3 set modified and clear locked 34 ENTRY SETWNDO1 set up window 1 for block access 35 ENTRY SETWNDO2 set up window 2 for block access 36 ENTRY SETWNDO3 set up window 3 for block access 37 ENTRY SETWNDOX set up window in R0 for block access 38 ENTRY SETPAGEX set up virt. page in R0 for block access 39 ENTRY ULKPAGE unlock a page (allow it to swap) 40 ENTRY ULKWNDO1 allow window 1 to be swapped 41 ENTRY ULKWNDO2 allow window 2 to be swapped 42 ENTRY ULKWNDO3 allow window 3 to be swapped 43 ENTRY VASPCLNALL to remove pages from a specified unit 44 ENTRY VOLFORGET to eliminate pages from a specified volume 45 ENTRY WSXCLNALL to remove specified PAL's from all WSX lists 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 596 (WINDOW) F 35 Resident User Window Routines 47 48 ********************************************************************************** 49 * * 50 * CREATEVP * 51 * Routine to create a VPAGE element and return a pointer * 52 * to it. This routine is intended for use by the XREQ * 53 * routines that add pages to the virtual memory ( FRMAPIN and * 54 * FRCREATEUP ). A memory entry for that page must not * 55 * already exist. * 56 * Call: * 57 * CALL CREATEVP call for new page * 58 * note: eats R0 and R1 before requesting parameters * 59 * PARV * 60 * PARV * 61 * PARV * 62 * PARV * 63 * PARVL * 64 * returns with R1 => the VP element. * 65 * * 66 * Eats R0. * 67 * Stack required = 2. * 68 * 1 + max ( FCGETMEM (0), ZEROIT (1) ) * 69 * * 70 ********************************************************************************** 71 72 BLOCK CREATEVP subroutine 73 ENTRY CREATEVP 74 75 BEGFRAME 76 ENDFRAME 77 030C9 DD9F8001 6 STAK 78 CREATEVP ENTRS PUSH 030CA DC002F0A 79 CALL VGETMEM get memory for the element 030CB 40440002 IMM 80 PARVL VPLOG indicate its size 030CC 60520000 1 0 REG 81 LD R1 R0 make a copy of the pointer 030CD DC003090 82 CALL ZEROIT call to clear the element 030CE 41164800 1 BASE 83 PAR R1,0 indicate its location 030CF 40440004 IMM 84 PARVL 2 POWER VPLOG and its length 030D0 DCD3C000 7 REG 85 EXPCS R7 go get the parameters 030D1 C1564004 1 CACH 86 STPV R1,VPVPN the virtual page number 030D2 C1564803 1 BASE 87 STPV R1,VPBLOCK the MS block number 030D3 C14842E2 1 ZBM 88 STPV R1,VPFBITYPE the type of block expected 030D4 C1485F11 1 ZBM 89 STPV R1,VPFCB address of FCB associated with this page 030D5 C0484E80 1 ZBM 90 STPVL R1,VPCNTL misc. control bits 030D6 5D1F8001 6 STAK 91 LEAVE POP return 92 * --- 93 94 END CREATEVP subroutine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 597 (WINDOW) F 35 Resident User Window Routines 96 97 ********************************************************************************** 98 * * 99 * GRUBPAGE * 100 * Routine to completely discombooberate a page. This * 101 * routine is called when we believe that this block is * 102 * unlikely to be referenced again in the near future. It * 103 * avoids waiting for pages to age enough to get ripped off. * 104 * The VMLIST element is destroyed, the page access element is * 105 * clobbered and the MS block is freed if the block type was * 106 * for swap. Note that the disk space must be accounted for * 107 * when we destroy the VPAGE element corresponding to a * 108 * swapping page because that is the only record that the * 109 * system has of the MS block assignment. The PPAGE element * 110 * is moved to the idle list if this was the only user of the * 111 * page. The effect on an indirect VP element is just to * 112 * remove the VP element and any page access element referring * 113 * to it and this does not affect the memory of the one being * 114 * pointed to. * 115 * * 116 * SP => return address stack * 117 * LD R0 * 118 * CALLNP GRUBPAGE * 119 * * 120 * Eats R0:R3. * 121 * Stack required = 7. * 122 * 3 + max ( DELSWAP (1), DISCARDPAL (4), FINDPAL (1), * 123 * LOCKWAIT (0), PFAGEWSX (0), PUTADT (3), * 124 * VFREEMEM (0) ) * 125 * * 126 ********************************************************************************** 127 128 ********************************************************************************** 129 * * 130 * GRUBVPEL * 131 * Routine accepts a pointer to an unlinked VP element. * 132 * Free's the block if it is a swapping type and returns the * 133 * VP element to free storage. The PAL is removed from the * 134 * VASP or WSX list pointed to in the specified UPC block. * 135 * Note: This cannot be used for the currently running UPC. * 136 * The disk space is accounted for when this routine destroys * 137 * the VPAGE element corresponding to a swapping page because * 138 * that is the only record the system keeps of the MS block * 139 * assignment. * 140 * * 141 * SP => stack * 142 * R2 => VP element * 143 * R4 => UPC block * 144 * CALLNP GRUBVPEL * 145 * * 146 * Eats R0:R3. * 147 * Stack required = 7. See GRUBPAGE. * 148 * * 149 ********************************************************************************** 150 151 BLOCK GRUBxxxx and DMOTExxxx subroutines 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 598 (WINDOW) F 35 Resident User Window Routines 152 ENTRY GRUBVPEL 153 ENTRY GRUBPAGE 154 ENTRY GRUBWNDO1 155 ENTRY GRUBWNDO2 156 ENTRY GRUBWNDO3 157 ENTRY DMOTEPAGE 158 ENTRY DMOTEWNDO1 159 ENTRY DMOTEWNDO2 160 ENTRY DMOTEWNDO3 161 162 BEGFRAME 00178801 6 BASE 163 GRUBPAGET BSS 1 R4 save 00178802 6 BASE 164 GRUBPAGPTR BSS 1 holds pointer to VP element 165 ENDFRAME 166 00000010 BYTE 167 DMOTEFLAG EQU BIT 0 bit in R7, if on, don't discard PAL 168 030D7 DD5F8003 6 STAK 169 GRUBVPEL ENTRNP PUSH 030D8 E5178801 4 6 BASE 170 ST R4 SP,GRUBPAGET save this bothersome register 030D9 E4978802 2 6 BASE 171 ST R2 SP,GRUBPAGPTR save the VP element pointer 030DA 60D68004 3 2 CACH 172 LD R3 R2,VPVPN get page number 030DB 3857080F 1 4 BASE 173 LEA R1 R4,UPCVASP pick up pointer to list head 030DC 0CC00000 174 IOFF interrupts off 030DD 6017080F 0 4 BASE 175 LD R0 R4,UPCVASP and pick up pointer to first element 030DE 48D60000 3 0 CACH 176 RLSRCH R3 R0,PAVPN see if this block is in VASP list 030DF FE0C3104 177 JNE GRUBVPWSX try WSX list 030E0 61120000 4 0 REG 178 LD PAL R0 copy address of found PAL 030E1 60091F10 0 4 ZBM 179 LD R0 PAL,PALINK load forward pointer from element to be removed 030E2 E4085F10 0 1 ZBM 180 ST R0 R1,PALINK remove element from list 030E3 FE0E30F6 181 JMP GRUBDUMP go check if swapping page 182 * --- 183 030E4 DD5F8003 6 STAK 184 GRUBPAGE ENTRNP PUSH 030E5 60D20000 3 0 REG 185 LD R3 R0 copy the page number 000030E6 186 GRUBPENTER LABEL 030E6 EC0BC010 7 CBM 187 STZ R7/DMOTEFLAG indicate to discard PAL 000030E7 188 DMOTEENTR LABEL 189 030E7 60000414 0 190 LD R0 CPCUPC get the current UPC pointer 030E8 3896080E 2 0 BASE 191 LEA R2 R0,UPCWVMLIST get effective address of list head 030E9 6056080E 1 0 BASE 192 LD R1 R0,UPCWVMLIST pointer to first element in window VP list 030EA F6F030ED 3 193 JBT R3/MONBIT GBSWL jump if search is in window list 030EB 3896080D 2 0 BASE 194 LEA R2 R0,UPCVMLIST get effective address of list head 030EC 6056080D 1 0 BASE 195 LD R1 R0,UPCVMLIST pointer to first element in virtual memory list 000030ED 196 GBSWL LABEL 030ED 48D64004 3 1 CACH 197 RLSRCH R3 R1,VPVPN search for the specified element 030EE FE0C314F 198 JNE GRUBPNFR jump if not found 030EF E5178801 4 6 BASE 199 ST R4 SP,GRUBPAGET save this bothersome register 030F0 60085F10 0 1 ZBM 200 LD R0 R1,VPLINK load forward pointer from victim element 030F1 E4089F10 0 2 ZBM 201 ST R0 R2,VPLINK remove victim from the list 030F2 E4578802 1 6 BASE 202 ST R1 SP,GRUBPAGPTR save the VP element pointer 030F3 60924000 2 1 REG 203 LD R2 R1 copy VP element pointer 030F4 DC40330C 204 CALLNP FINDPAL search VASP for the page access element 030F5 FE0E3101 205 JMP GRUBNOPAL no such PAL (already swapped out) 206 * \ / 207 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 599 (WINDOW) F 35 Resident User Window Routines 208 * R2 = VPAGE element, PAL => PAL, IOFF = 1 209 210 ********************************************************************************** 211 * * 212 * Check to see if discarding a swapping page. Please * 213 * note the special case where the VP element is an indirect * 214 * element: these elements were initialized with 0 in the * 215 * FBITYPE field, so they don't look like swapping pages * 216 * (which would be a disaster). * 217 * If this is a swapping page, we clear its dirty bit so * 218 * that it won't get written out, since its contents are being * 219 * forgotten. * 220 * * 221 ********************************************************************************** 222 223 * \ / 000030F6 224 GRUBDUMP LABEL 030F6 60C882E2 3 2 ZBM 225 LD R3 R2,VPFBITYPE get the block type 030F7 64C4000B 3 IMM 226 CPR R3 FBITSYS compare to swapping type 030F8 FE0C30FB 227 JNE LEAVEDIRT jump if not swapping page 030F9 EC091C12 4 ZBM 228 STZ PAL,PAMODIFIED fake like page never dirtied 030FA EC0BC010 7 CBM 229 STZ R7/DMOTEFLAG always discard this PAL 000030FB 230 LEAVEDIRT LABEL 231 030FB F7C03111 7 232 JBT R7/DMOTEFLAG GRUBPGDMOT jump if demoting page to WSX 030FC DC402E15 233 CALLNP DISCARDPAL we're done with the page for good 030FD 60400412 1 234 LD R1 CPPSA get the current PSA pointer 030FE D04840F2 1 ZBM 235 DEC R1,PSWSSIZE indicate that the working set shrunk 030FF 60978802 2 6 BASE 236 LD R2 SP,GRUBPAGPTR retrieve pointer to old VP element 03100 FE0E3119 237 JMP GRUBRISHAR go handle the page 238 * --- 239 240 ********************************************************************************** 241 * * 242 * We didn't find the page in the VASP list. Look in the * 243 * working set extension so that we really get rid of unused * 244 * pages. * 245 * * 246 ********************************************************************************** 247 00003101 248 GRUBNOPAL LABEL 03101 F7C0311A 7 249 JBT R7/DMOTEFLAG GRUBBYEVP don't look in WSX if we are 250 * demoting an element (avoid fancy NOP) 03102 0CC00000 251 IOFF turn off interrupts 03103 61000414 4 252 LD R4 CPCUPC get the current UPC pointer 253 00003104 254 GRUBVPWSX LABEL 03104 60170810 0 4 BASE 255 LD R0 R4,UPCWSX get pointer to first element 03105 FA303119 0 256 JZA R0 GRUBRISHAR continue if no WSX list 03106 38570810 1 4 BASE 257 LEA R1 R4,UPCWSX get pointer to list head 03107 60D68803 3 2 BASE 258 LD R3 R2,VPBLOCK get the block number being discarded 00003108 259 GRUBDOMORE LABEL 03108 61160803 4 0 BASE 260 LD R4 R0,PAPPLPTR pick up this elements PPL pointer 03109 64D70801 3 4 BASE 261 CPR R3 R4,PPBLOCK does it contain the block of interest? 0310A FE02310D 262 JEQ GRUBELFND jump if so 0310B FA3A3108 01 263 RLJNA R0 GRUBDOMORE scan through the list 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 600 (WINDOW) F 35 Resident User Window Routines 0310C FE0E3119 264 JMP GRUBRISHAR jump out without finding any 265 * --- 0000310D 266 GRUBELFND LABEL 0310D 61120000 4 0 REG 267 LD PAL R0 copy pointer to found element 0310E 60091F10 0 4 ZBM 268 LD R0 PAL,PALINK load forward pointer from element to be removed 0310F E4085F10 0 1 ZBM 269 ST R0 R1,PALINK remove element from list 03110 FE0E30F6 270 JMP GRUBDUMP go check if swapping page 271 * --- 272 273 ********************************************************************************** 274 * * 275 * This page is not being completely freed, but is only * 276 * being demoted into the working set extension list. Here we * 277 * link it into the WSX list and then free the VP element. * 278 * Note that UPCXAGEVASP is 0 when we get so that it need * 279 * not be added to the PAL age. Also, note that UPCMAGEW is * 280 * unlikely to be affected by this PAL, so we save time by * 281 * "forgetting" to update it. * 282 * * 283 ********************************************************************************** 284 00003111 285 GRUBPGDMOT LABEL 286 * this unlock is so that DMOTE may be 287 * called with pages still locked. 03111 EC091210 4 ZBM 288 STZ PAL,PALOCK unlock the page 03112 DC4025DD 289 CALLNP PFAGEWSX distribute age into WSX list 03113 60400414 1 290 LD R1 CPCUPC get the current UPC pointer 03114 60164810 0 1 BASE 291 LD R0 R1,UPCWSX get pointer to existing list 03115 E4091F10 0 4 ZBM 292 ST R0 PAL,PALINK link existing list after us 03116 E5164810 4 1 BASE 293 ST PAL R1,UPCWSX and make us new list head 03117 0C800000 294 ION restore interrupts 03118 FE0E314A 295 JMP GRUBDOVP go finish up 296 * --- 297 298 ********************************************************************************** 299 * * 300 * Okay, we have taken care of the lists attached to the * 301 * PSA and properly disposed of the PPAGE element. Now check * 302 * to see if the page that we are discarding has no roots. * 303 * That is, is this page strictly a swapping page? Please * 304 * note the special case where the VP element is an indirect * 305 * element: these elements were initialized with 0 in the * 306 * FBITYPE field, so they don't look like swapping pages * 307 * (which would be a disaster). If it is a swapping page, we * 308 * must return it to the ADT. * 309 * * 310 ********************************************************************************** 311 00003119 312 GRUBRISHAR LABEL 03119 0C800000 313 ION restore interrupts 0000311A 314 GRUBBYEVP LABEL 0311A 60C882E2 3 2 ZBM 315 LD R3 R2,VPFBITYPE get the type of this block 0311B 64C4000B 3 IMM 316 CPR R3 FBITSYS check for system swapping 0311C FE0C314A 317 JNE GRUBDOVP jump if not 318 * \ / 0311D 60D68803 3 2 BASE 319 LD R3 R2,VPBLOCK get the block number in question 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 601 (WINDOW) F 35 Resident User Window Routines 0311E 608AF460 2 3 CBM 320 LD R2 R3/PPHASHFLD get its hash function 321 PLOCK PPAGELOCK(R2) lock the appropriate PPAGELIST 0311F 0CC00000 321 IOFF 03120 D1E41E21 2 321 SETT PPAGELOCK(R2) 03121 FE0C3123 321 JNE MA(2+DISPW MA 0) 03122 DC40308B 321 CALLNP LOCKWAIT 03123 60641E61 1 2 322 LD R1 PPAGELIST(R2) get the appropriate head pointer 03124 3CD64801 3 1 BASE 323 LSRCH R3 R1,PPBLOCK look for the PPL for this block 03125 FE0C312E 324 JNE NOTINCORE1 jump if not found 325 SETTBIT R1,PPPUTADT set the bit indicating to go to ADT 03126 60024000 0 IMM 325 LD R0 1*BIT(((R1,PPPUTADT) DISP (R1,0))/BITS 0:4) 03127 FC164802 0 1 BASE 325 IORM R0 R1,(((R1,PPPUTADT) DISP (R1,0))/BITS 15:31) 03128 60084081 0 1 ZBM 326 LD R0 R1,PPBLOCK/VOLFIELD volume number for this PPL 03129 60201F22 0 0 327 LD R0 VOLNTABLE(R0) get access to the VOLN element 0312A D0160815 0 BASE 328 INC R0,VOLNBUSY make volume busy for the ADT element to be created 329 PUNLOCK PPAGELOCK(R2) release the list 0312B EC241E21 2 329 STZ PPAGELOCK(R2) 0312C 0C800000 329 ION 0312D FE0E3149 330 JMP FREESWAPPG free space taken care of, finish off VP 331 * --- 332 0000312E 333 NOTINCORE1 LABEL block not found in busy PPLs 334 PLOCK PPIDLOCK lock the idle list 0312E 0CC00000 334 IOFF 0312F D1C01DD9 334 SETT PPIDLOCK 03130 FE0C3132 334 JNE MA(2+DISPW MA 0) 03131 DC40308B 334 CALLNP LOCKWAIT 335 PUNLOCK PPAGELOCK(R2) release the PPAGE list 03132 EC241E21 2 335 STZ PPAGELOCK(R2) 03133 0C800000 335 ION 03134 608AF650 2 3 CBM 336 LD R2 R3/IDLHASHFLD pick up hash value 03135 60241DDD 0 2 337 LD R0 PPUSDIDLE(R2) get the list head 03136 38641DDD 1 2 338 LEA R1 PPUSDIDLE(R2) get address list head 03137 48D60801 3 0 BASE 339 RLSRCH R3 R0,PPBLOCK look down it for the block 03138 FE0C3142 340 JNE NOTINCORE2 jump if block not resident at all 03139 61120000 4 0 REG 341 LD PPL R0 place the PPL pointer in this register 0313A 60091F10 0 4 ZBM 342 LD R0 PPL,PPLINK get the pointer from this element 0313B E4085F10 0 1 ZBM 343 ST R0 R1,PPLINK and remove us from the list 0313C FA32313E 0 344 JNZA R0 SKIPENDFIX if not null, don't fixup end pointer 0313D E4641DFD 1 2 345 ST R1 PPENDIDLE(R2) adjust the end pointer appropriately 346 * \ / 347 0000313E 348 SKIPENDFIX LABEL 0313E EC170801 4 BASE 349 STZ PPL,PPBLOCK destroy block number to prevent later duplicates 0313F 60001DDC 0 350 LD R0 PPCLNIDLE get pointer to head of list 03140 E4091F10 0 4 ZBM 351 ST R0 PPL,PPLINK put us in front of the list 03141 E5001DDC 4 352 ST PPL PPCLNIDLE we are now the new head honcho 353 * \ / 354 00003142 355 NOTINCORE2 LABEL 356 PUNLOCK PPIDLOCK release the idle list 03142 EC001DD9 356 STZ PPIDLOCK 03143 0C800000 356 ION 03144 600AC080 0 3 CBM 357 LD R0 R3/VOLFIELD get the volume number 03145 60201F22 0 0 358 LD R0 VOLNTABLE(R0) get pointer to the VOLN element 03146 D0160815 0 BASE 359 INC R0,VOLNBUSY busy volume for ADT element to be created 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 602 (WINDOW) F 35 Resident User Window Routines 03147 DC00502C 360 CALL PUTADT call to give back the block 03148 4052C000 3 REG 361 PARVL R3 pass the block number 362 * \ / 363 00003149 364 FREESWAPPG LABEL 03149 DC402596 365 CALLNP DELSWAP indicate the space returned 366 * \ / 367 0000314A 368 GRUBDOVP LABEL 0314A 60978802 2 6 BASE 369 LD R2 SP,GRUBPAGPTR retrieve the pointer to the old VP element 0314B DC002F8F 370 CALL VFREEMEM free this block of memory 0314C 41440002 IMM 371 PARV VPLOG indicate its length 0314D 40528000 2 REG 372 PARVL R2 and memory address 0314E 61178801 4 6 BASE 373 LD R4 SP,GRUBPAGET restore this register 0000314F 374 GRUBPNFR LABEL 0314F 5D1F8003 6 STAK 375 LEAVE POP 376 * --- 377 378 ********************************************************************************** 379 * * 380 * GRUBWNDOx * 381 * Specifies that the specified window will probably not * 382 * be used for a long time and thus need not be aged normally * 383 * but may be removed from the working set now. Note that * 384 * windows are not checked to see if they are swapping pages. * 385 * * 386 * SP => return address stack * 387 * CALLNP GRUBWNDOx * 388 * * 389 * Eats R0:R3. * 390 * Stack required = 7. See GRUBPAGE. * 391 * * 392 ********************************************************************************** 393 03150 DD5F8003 6 STAK 394 GRUBWNDO1 ENTRNP PUSH 03151 60C40082 3 IMM 395 LD R3 PNWNDO1 produce the page number 03152 FE0E30E6 396 JMP GRUBPENTER go share general code 397 * --- 398 03153 DD5F8003 6 STAK 399 GRUBWNDO2 ENTRNP PUSH 03154 60C40083 3 IMM 400 LD R3 PNWNDO2 produce the page number 03155 FE0E30E6 401 JMP GRUBPENTER go share general code 402 * --- 403 03156 DD5F8003 6 STAK 404 GRUBWNDO3 ENTRNP PUSH 03157 60C40084 3 IMM 405 LD R3 PNWNDO3 produce the page number 03158 FE0E30E6 406 JMP GRUBPENTER go share general code 407 * --- 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 603 (WINDOW) F 35 Resident User Window Routines 409 410 ********************************************************************************** 411 * * 412 * DMOTEPAGE * 413 * This routine will remove the VP element for the * 414 * specified page and then cause the PAL, if it exists, in the * 415 * VASP list to be demoted into the working set extension * 416 * list. If the page is a swapping page, though, it is * 417 * 'grubbed'. The lock bit is cleared when the PAL is moved * 418 * into the WSX list, so this routine may be called with * 419 * locked pages. * 420 * DMOTEPAGE is used when the page being removed from the * 421 * active working set may be used shortly and its main feature * 422 * is that if a modified page is 'grubbed', it is queued for * 423 * disk write. Demoting instead will delay this write until * 424 * the user is done with the program or I/O device. * 425 * Call: * 426 * SP => stack * 427 * LD R3 * 428 * CALLNP DMOTEPAGE * 429 * * 430 * Eats R0:R3. * 431 * Stack required = 7. See GRUBPAGE. * 432 * * 433 ********************************************************************************** 434 03159 DD5F8003 6 STAK 435 DMOTEPAGE ENTRNP PUSH 0000315A 436 DMOTESHARE LABEL 0315A EDCBC010 7 CBM 437 STW R7/DMOTEFLAG set flag saying only demoting 0315B FE0E30E7 438 JMP DMOTEENTR share a lot of code with GRUBPAGE 439 * --- 440 441 * Usually demote windows 0315C DD5F8003 6 STAK 442 DMOTEWNDO1 ENTRNP PUSH 0315D 60C40082 3 IMM 443 LD R3 PNWNDO1 page to do it to 0315E FE0E315A 444 JMP DMOTESHARE 445 * --- 446 0315F DD5F8003 6 STAK 447 DMOTEWNDO2 ENTRNP PUSH 03160 60C40083 3 IMM 448 LD R3 PNWNDO2 page to do it to 03161 FE0E315A 449 JMP DMOTESHARE 450 * --- 451 03162 DD5F8003 6 STAK 452 DMOTEWNDO3 ENTRNP PUSH 03163 60C40084 3 IMM 453 LD R3 PNWNDO3 page to do it to 03164 FE0E315A 454 JMP DMOTESHARE 455 * --- 456 457 END GRUBxxxx and DMOTExxxx subroutines 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 604 (WINDOW) F 35 Resident User Window Routines 459 460 ********************************************************************************** 461 * * 462 * DMOTINDPAL - discard indirect PAL's * 463 * This routine searches the VASP list for indirect PAL's * 464 * and moves any that are found to the WSX list. * 465 * Call: * 466 * CALLNP DMOTINDPAL * 467 * * 468 * Eats R0:R3. * 469 * Stack required = 2. * 470 * 2 + max ( UNLOPAL (0) ) * 471 * * 472 ********************************************************************************** 473 474 BLOCK DMOTINDPAL - discard indirect PAL's 475 ENTRY DMOTINDPAL 476 477 BEGFRAME 00178801 6 BASE 478 SAVER4 BSS 1 location for saving R4 479 ENDFRAME 480 03165 DD5F8002 6 STAK 481 DMOTINDPAL ENTRNP PUSH 03166 E5178801 4 6 BASE 482 ST PAL SP,SAVER4 save R4 03167 60000414 0 483 LD R0 CPCUPC get current UPC 03168 3896080F 2 0 BASE 484 LEA R2 R0,UPCVASP get pointer to head of VASP list 03169 0CC00000 485 IOFF 0316A 6056080F 1 0 BASE 486 LD R1 R0,UPCVASP get pointer to first VASP list entry 487 * \ / 488 0000316B 489 INDPALLOOP LABEL 0316B 60C40001 3 IMM 490 LD R3 1 get set flag 0316C 48C85010 3 1 ZBM 491 RLSRCH R3 R1,PAINDVP search for indirect pages 0316D FE0C3177 492 JNE NOINDPAL none found - exit 0316E 61124000 4 1 REG 493 LD PAL R1 set up PAL pointer for unloading PF 0316F DC402623 494 CALLNP UNLOPAL unload page file for this PAL 03170 60C85F10 3 1 ZBM 495 LD R3 R1,PALINK get forward link of PAL to be moved 03171 E4C89F10 3 2 ZBM 496 ST R3 R2,PALINK save in previous PAL - now unlinked 03172 60D60810 3 0 BASE 497 LD R3 R0,UPCWSX get address of first WSX element 03173 E4C85F10 3 1 ZBM 498 ST R3 R1,PALINK save as forward pointer of new element 03174 E4560810 1 0 BASE 499 ST R1 R0,UPCWSX save pointer to new element in head of list 03175 60489F10 1 2 ZBM 500 LD R1 R2,PALINK set up pointer for next search 03176 FE0E316B 501 JMP INDPALLOOP repeat until no indirect pages left 502 * --- 503 00003177 504 NOINDPAL LABEL 03177 0C800000 505 ION 03178 61178801 4 6 BASE 506 LD PAL SP,SAVER4 restore R4 03179 5D1F8002 6 STAK 507 LEAVE POP 508 * --- 509 510 END DMOTINDPAL subroutine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 605 (WINDOW) F 35 Resident User Window Routines 512 513 ********************************************************************************** 514 * * 515 * CHKWNDOS * 516 * This routine is used to check that no windows are in * 517 * the VM list. If a window is found, a STOP will be * 518 * executed. A restart (GO) from the STOP will cause * 519 * DMOTEWNDOs to be called and execution will continue. * 520 * Call: * 521 * CALLNP CHKWNDOS * 522 * * 523 * Eats R0:R3. * 524 * Stack required = 8. * 525 * 1 + max ( DMOTEWNDOx (7) ) * 526 * * 527 ********************************************************************************** 528 529 BLOCK CHKWNDOS subroutine 530 ENTRY CHKWNDOS 531 532 BEGFRAME 533 ENDFRAME 534 0317A DD5F8001 6 STAK 535 CHKWNDOS ENTRNP PUSH 0317B 0CC00000 536 IOFF prevent interference with list search 0317C 60400414 1 537 LD R1 CPCUPC get pointer to UPC 0317D 6096480E 2 1 BASE 538 LD R2 R1,UPCWVMLIST get pointer to 'window' VM list 0317E 60C40041 3 IMM 539 LD R3 PNWNDO12 get number to match window 1 or 2 0317F 3CC88071 3 2 ZBM 540 LSRCH R3 R2,VPVPN/PASIGBITS see if in VM list 03180 FE0C3188 541 JNE NOWNDOS jump if not found 03181 60168004 0 2 CACH 542 LD R0 R2,VPVPN get the page number 03182 F63E3185 0 543 JBT R0/BIT 31 ITSWINDOW2 03183 00930064 544 STOP STOPS0064 stop if window 1 mapped 03184 FE0E3186 545 JMP CONTINUE keep moving 546 * --- 547 00003185 548 ITSWINDOW2 LABEL 03185 00930065 549 STOP STOPS0065 stop if window 2 mapped 00003186 550 CONTINUE LABEL 03186 DC40315C 551 CALLNP DMOTEWNDO1 demote the window to the WSX list 03187 DC40315F 552 CALLNP DMOTEWNDO2 demote the window to the WSX list 00003188 553 NOWNDOS LABEL 03188 0C800000 554 ION restore interrupts 03189 5D1F8001 6 STAK 555 LEAVE POP return 556 * --- 557 558 END of CHKWNDOS 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 606 (WINDOW) F 35 Resident User Window Routines 560 561 ********************************************************************************** 562 * * 563 * SETERRWx * 564 * These routines change the error jump address for the * 565 * specified window or page. Nothing really fancy is done. * 566 * Call: * 567 * LD R0
* 568 * CALLNP SETERRWx * 569 * or * 570 * LD R0
* 571 * LD R1 * 572 * CALLNP SETERRPG * 573 * * 574 * Eats R1:R2. * 575 * Stack required = 1 * 576 * * 577 ********************************************************************************** 578 579 BLOCK SETERRWx/SETERRPG subroutines 580 ENTRY SETERRPG 581 ENTRY SETERRW1 582 ENTRY SETERRW2 583 ENTRY SETERRW3 584 585 BEGFRAME 586 ENDFRAME 587 0318A DD5F8001 6 STAK 588 SETERRW3 ENTRNP PUSH 0318B 60440084 1 IMM 589 LD R1 PNWNDO3 produce the page number 0318C FE0E3197 590 JMP SERRWEN go share code 591 * --- 592 0318D DD5F8001 6 STAK 593 SETERRW2 ENTRNP PUSH 0318E 60440083 1 IMM 594 LD R1 PNWNDO2 produce the page number 0318F FE0E3197 595 JMP SERRWEN go share code 596 * --- 597 03190 DD5F8001 6 STAK 598 SETERRW1 ENTRNP PUSH 03191 60440082 1 IMM 599 LD R1 PNWNDO1 produce the page number 03192 FE0E3197 600 JMP SERRWEN go share code 601 * --- 602 03193 DD5F8001 6 STAK 603 SETERRPG ENTRNP PUSH 03194 60800414 2 604 LD R2 CPCUPC get the current UPC pointer 03195 6096880D 2 2 BASE 605 LD R2 R2,UPCVMLIST get root of user pages virtual memory list 03196 F2703199 1 606 JBF R1/MONBIT SERRSNL jump to search normal list 607 * \ / 608 00003197 609 SERRWEN LABEL 03197 60800414 2 610 LD R2 CPCUPC get the current UPC pointer 03198 6096880E 2 2 BASE 611 LD R2 R2,UPCWVMLIST get pointer to window VM list 612 * \ / 613 00003199 614 SERRSNL LABEL 03199 3C568004 1 2 CACH 615 LSRCH R1 R2,VPVPN look for the specified page 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 607 (WINDOW) F 35 Resident User Window Routines 0319A FE0C319C 616 JNE SETERRWXIT if not found, fake innocence 0319B E4089F12 0 2 ZBM 617 ST R0 R2,VPERAD set the error address 618 * \ / 619 0000319C 620 SETERRWXIT LABEL 0319C 5D1F8001 6 STAK 621 LEAVE POP return to caller 622 * --- 623 624 END SETERRWx/SETERRPG subroutines 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 608 (WINDOW) F 35 Resident User Window Routines 626 627 ********************************************************************************** 628 * * 629 * FORCEWRWx * 630 * Causes the specified window to be forced to the disk * 631 * now. The specified page must be mapped in the VM list. * 632 * The page need not be locked. The primary difference * 633 * between this routine and GRUBWNDOx is that this routine * 634 * sets the PPFWIP bit to ensure that any new accesses to * 635 * this page will wait for the write completion. This * 636 * routine also leaves the VPP element intact in case another * 637 * reference to the page must be made, normally this would * 638 * only be done to force a wait for the write. * 639 * We search for the PAL. We destroy it if we find it, * 640 * leaving the busy count in the corresponding PPL. If we do * 641 * not find the PAL, we just leave, since that means that it * 642 * has already been removed from the VASP list. If it was * 643 * dirtied, it will have already been queued up for write. If * 644 * the data was not dirtied, but the FBI was altered, it would * 645 * have remained locked until either now, or until a * 646 * SETMODIFWx marked it as dirty. We don't worry about the * 647 * possibility of the PAL being in the WSX list, since it * 648 * shouldn't have gotten there if we were also asked to * 649 * forcewrite it. * 650 * We set the PPFWIP bit in this PPL so that any new * 651 * accesses to this page will wait for the write to complete. * 652 * There is still a busy count of 1 associated with the PAL that * 653 * we found (and destroyed). We make up a write queue element * 654 * and call QDISK to check for duplicates and queue it up for * 655 * write. Call: * 656 * * 657 * SP => return address stack * 658 * CALLNP FORCEWRWx * 659 * R3 return the MS address of the block being written * 660 * * 661 * Registers Used: R0:R3. * 662 * Stack Required: 5. * 663 * 3 + max ( FINDPAL (1), MAPINFBI (2), MAPOUTFBI (2), * 664 * PFREEMEM (0), QDISK (1), SGETMEM (0) ) * 665 * * 666 ********************************************************************************** 667 668 BLOCK FORCEWRWx and DUALWRITE subroutines 669 ENTRY FORCEWRW1 670 ENTRY FORCEWRW2 671 ENTRY FORCEWRW3 672 ENTRY DUALWRITE 673 674 BEGFRAME 00178801 6 BASE 675 FORCEWRB BSS 1 register save 676 BSSB 8 filler 00099182 6 ZBM 677 FORCEWRX BSSB MSBLKLOG MS address of secondary block for DUALWRITE 678 ENDFRAME 679 0319D DD5F8003 6 STAK 680 FORCEWRW1 ENTRNP PUSH 0319E 60C40082 3 IMM 681 LD R3 PNWNDO1 produce the page number 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 609 (WINDOW) F 35 Resident User Window Routines 0319F FE0E31A9 682 JMP FORCEN go share general code 683 * --- 684 031A0 DD5F8003 6 STAK 685 FORCEWRW2 ENTRNP PUSH 031A1 60C40083 3 IMM 686 LD R3 PNWNDO2 produce the page number 031A2 FE0E31A9 687 JMP FORCEN go share general code 688 * --- 689 031A3 DD5F8003 6 STAK 690 FORCEWRW3 ENTRNP PUSH 031A4 60C40084 3 IMM 691 LD R3 PNWNDO3 produce the page number 031A5 FE0E31A9 692 JMP FORCEN go share general code 693 * --- 694 695 ********************************************************************************** 696 * * 697 * DUALWRITE * 698 * Routine to set up for a write of the same physical * 699 * page to two different MS blocks. We create a duplicate of * 700 * the PPL to hold the information about the extra transfer. * 701 * Call: * 702 * * 703 * SP => return address stack * 704 * R3 = virtual page number * 705 * CALL DUALWRITE * 706 * PARVL * 707 * * 708 * R3 = MS address of (primary) block written * 709 * * 710 * Eats R0:R3. * 711 * Stack required = 5. See FORCEWRWx. * 712 * * 713 ********************************************************************************** 714 031A6 DD1F8003 6 STAK 715 DUALWRITE ENTR PUSH 031A7 C0499182 6 ZBM 716 STPVL SP,FORCEWRX save the extra block number 031A8 FE0E31AA 717 JMP FORCEDNTRY go enter forcewrite 718 * --- 719 000031A9 720 FORCEN LABEL 031A9 EC099182 6 ZBM 721 STZ SP,FORCEWRX indicate not DUALWRITE 722 * \ / 000031AA 723 FORCEDNTRY LABEL entry for DUALWRITE 031AA 0CC00000 724 IOFF turn off the interrupts 031AB E5178801 4 6 BASE 725 ST R4 SP,FORCEWRB save this register 031AC DC40330C 726 CALLNP FINDPAL look for a PAL 031AD FE0E31DB 727 JMP FORCNEXIT none found, just quietly leave 031AE DC002ED0 728 CALL SGETMEM get a block of memory 031AF 40440002 IMM 729 PARVL MSQLOG this long 031B0 60D20000 3 0 REG 730 LD R3 R0 copy the pointer 031B1 EC16C800 3 BASE 731 STZ R3,MSQWORDA clear the forward pointer and cntl field 031B2 EC16C803 3 BASE 732 STZ R3,MSQXPTR indicate no PPL for DUALWRITE (yet) 031B3 60091430 0 4 ZBM 733 LD R0 PAL,PAMAIFLD get maintenance bits 031B4 E408D230 0 3 ZBM 734 ST R0 R3,MSQTYPE/MSQMAIFLD and set into the control field 031B5 60970803 2 4 BASE 735 LD R2 PAL,PAPPLPTR get pointer to PPL 031B6 E496C802 2 3 BASE 736 ST R2 R3,MSQPPPTR set pointer to actual PPAGE element 031B7 60168801 0 2 BASE 737 LD R0 R2,PPBLOCK get disk address 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 610 (WINDOW) F 35 Resident User Window Routines 031B8 E416C801 0 3 BASE 738 ST R0 R3,MSQBLOCK and set into the MSQ element 031B9 DC002F8F 739 CALL PFREEMEM call to discard the PAL 031BA 41440002 IMM 740 PARV PALOG indicate its length 031BB 40530000 4 REG 741 PARVL PAL and address 031BC 60000412 0 742 LD R0 CPPSA get the current PSA pointer 031BD D04800F2 0 ZBM 743 DEC R0,PSWSSIZE indicate that the working set has shrunk 031BE 0C800000 744 ION restore the interrupts (matches FINDPAL) 031BF 61128000 4 2 REG 745 LD PPL R2 copy PPL pointer to normal register 746 * PPBUSYWORD is already counted for the now removed PAL 747 SETTBIT PPL,PPFWIP indicate force write in progress 031C0 60022000 0 IMM 747 LD R0 1*BIT(((PPL,PPFWIP) DISP (PPL,0))/BITS 0:4) 031C1 FC170802 0 4 BASE 747 IORM R0 PPL,(((PPL,PPFWIP) DISP (PPL,0))/BITS 15:31) 748 749 * PPL => PPL 750 031C2 60899182 2 6 ZBM 751 LD R2 SP,FORCEWRX load the secondary block number (if DUALWRITE) 031C3 FA8231D6 2 752 JEQZ R2 FORNODUAL jump if regular forcewrite 753 * \ / 754 755 ********************************************************************************** 756 * * 757 * DUALWRITE * 758 * Set up the secondary PPL to control the second write. To * 759 * prevent the likelyhood of a DA mismatch we build a whole new * 760 * PPL and FBI. The only oddity is that MAPINFBI must know the * 761 * difference. This is determined by the DUALWPPL bit. Currently, * 762 * the only block that is dualwritten is the security block. * 763 * * 764 ********************************************************************************** 765 766 * \ / 031C4 DC002ED0 767 CALL SGETMEM get a chunk for PPL-FBI 031C5 40440004 IMM 768 PARVL PPFBLOG pass the size 031C6 E416C803 0 3 BASE 769 ST R0 R3,MSQXPTR save pointer to extra PPL 031C7 60920000 2 0 REG 770 LD R2 R0 copy as destination for CMOVE 031C8 60130000 0 4 REG 771 LD R0 PPL orig PPL is source 031C9 60440010 1 IMM 772 LD R1 PPLNTH*CPW indicate length of copy 031CA DA880800 2 01 773 MOVE R2,R0,R1 make a copy of the old PPL 031CB DC002606 774 CALL MAPINFBI get access to FBI, IOFF 031CC 40530000 4 REG 775 PARVL PPL pass PPL address 031CD 60124000 0 1 REG 776 LD R0 R1 establish a source address 031CE 6044002C 1 IMM 777 LD R1 FBILNTH*CPW number of characters to copy 031CF DA880800 2 01 778 MOVE R2,R0,R1 031D0 DC40261B 779 CALLNP MAPOUTFBI free up window and ION 031D1 60099182 0 6 ZBM 780 LD R0 SP,FORCEWRX get secondary block address 031D2 6056C803 1 3 BASE 781 LD R1 R3,MSQXPTR pointer to new PPL-FBI 031D3 E4085181 0 1 ZBM 782 ST R0 R1,PPBLOCK/MSBLKFIELD fix up PPL disk address 031D4 EDC85810 1 ZBM 783 STW R1,DUALWPPL indicate this is a dualwrite PPL 031D5 E4085185 0 1 ZBM 784 ST R0 R1,PPFBFBI/FBIDA fix up this disk address 785 * \ / 786 000031D6 787 FORNODUAL LABEL 788 * R3 => MSQ element, PPL 031D6 DC402E70 789 CALLNP QDISK place MS write queue element 031D7 60D70801 3 4 BASE 790 LD R3 PPL,PPBLOCK pick up block number being written 000031D8 791 FORCEXIT LABEL 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 611 (WINDOW) F 35 Resident User Window Routines 031D8 0C800000 792 ION restore the interrupts 031D9 61178801 4 6 BASE 793 LD R4 SP,FORCEWRB restore this register 031DA 5D1F8003 6 STAK 794 LEAVE POP 795 * --- 796 000031DB 797 FORCNEXIT LABEL 031DB 5C099182 6 ZBM 798 CMZ SP,FORCEWRX check for a DUALWRITE 031DC FE0231D8 799 JEQ FORCEXIT jump if not 031DD 00130062 800 HALT HALTS0062 attempted DUALWRITE of unlocked page 801 * --- 802 803 END FORCEWRWx and DUALWRITE subroutines 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 612 (WINDOW) F 35 Resident User Window Routines 805 806 ********************************************************************************** 807 * * 808 * LOCKPAGE * 809 * Routine to lock a specified page. * 810 * Call: * 811 * LD R0 * 812 * CALLNP LOCKPAGE * 813 * * 814 * Eats R0:R1. * 815 * Stack required = 1 * 816 * * 817 ********************************************************************************** 818 819 BLOCK LOCKPAGE subroutine 820 ENTRY LOCKPAGE 821 822 BEGFRAME 823 ENDFRAME 824 031DE DD5F8001 6 STAK 825 LOCKPAGE ENTRNP PUSH 031DF 60400414 1 826 LD R1 CPCUPC get pointer to current UPC 031E0 6056480E 1 1 BASE 827 LD R1 R1,UPCWVMLIST get pointer to window virtual memory list 031E1 F63031E4 0 828 JBT R0/MONBIT LKSWL jump if search in window list 031E2 60400414 1 829 LD R1 CPCUPC get UPC back 031E3 6056480D 1 1 BASE 830 LD R1 R1,UPCVMLIST get pointer to virtual memory list 000031E4 831 LKSWL LABEL 031E4 3C164004 0 1 CACH 832 LSRCH R0 R1,VPVPN look for this page specifier 031E5 FE0C31EE 833 JNE LCKPNH no such page, return anyway 031E6 EDC85A10 1 ZBM 834 STW R1,VPCNTL/VPCNTLLKB set the lock bit 031E7 60400414 1 835 LD R1 CPCUPC get the current UPC pointer 031E8 0CC00000 836 IOFF interrupts off 031E9 6056480F 1 1 BASE 837 LD R1 R1,UPCVASP get pointer to VASP list 031EA 3C164000 0 1 CACH 838 LSRCH R0 R1,PAVPN look for the page resident 031EB FE0C31EF 839 JNE LCKFIP jump if not present now 031EC EDC85210 1 ZBM 840 STW R1,PALOCK set the lock bit 031ED 0C800000 841 ION turn the interrupts back on 000031EE 842 LCKPNH LABEL 031EE 5D1F8001 6 STAK 843 LEAVE POP return 844 * --- 845 000031EF 846 LCKFIP LABEL page not in, force it in 031EF 0C800000 847 ION turn the interrupts back on 848 * Note that R1 = 0 after LSRCH failure 031F0 E40A5C80 0 1 CBM 849 ST R0 R1/PAGEFIELD make a memory address 031F1 F63031F3 0 850 JBT R0/MONBIT LCKMMEM jump if monitor memory 031F2 59840040 IMM 851 CLBMSR MSRFRELOC otherwise, set user relocation 000031F3 852 LCKMMEM LABEL 031F3 5C164800 1 BASE 853 CMZ R1,0 reference the page to force it in 031F4 59C40040 IMM 854 IORMSR MSRFRELOC restore normal relocation 855 * since the lock bit was set in the 856 * VPAGE element, the page is now locked 031F5 5D1F8001 6 STAK 857 LEAVE POP so return 858 * --- 859 860 END LOCKPAGE subroutine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 613 (WINDOW) F 35 Resident User Window Routines 862 863 ********************************************************************************** 864 * * 865 * SETWNDOx * 866 * Leaves R4 through R7 unchanged. If the VPAGE control * 867 * bits say to lock the page in core, then on return, R2 = ADR * 868 * of FBI for that page and R3 => PPL. * 869 * If setwindow is called with a page still mapped, the * 870 * VP element is re-used. The PAL for any page previously * 871 * occupying this window is unlocked and moved to the WSX * 872 * list. When we enter here, the window must not already * 873 * contain a swapping block since it will not be properly * 874 * freed. * 875 * Returns with window x set up, and (except for R2 as * 876 * mentioned above) R0 through R3 and condition bits mangled. * 877 * The routine SETWNDOX is the same except that the page * 878 * number for the window is passed in R0. SETWNDO must only be * 879 * used for windows 1 through 3 (i.e. the ones that would * 880 * reside in the UPCWVMLIST). SETPAGEX does this pages in the * 881 * user side of page file. * 882 * Call: * 883 * CALL SETWNDOx (SP contains the stack pointer) * 884 * - or - * 885 * CALL SETPAGEx (SP contains the stack pointer) * 886 * R0, R1, R2, R3 are eaten before the * 887 * parameters are requested! * 888 * The caller must not alter R2 during * 889 * the parameter passing. * 890 * PARV * 891 * PARV * 892 * PAR * 893 * PARV * 894 * PARVL * 895 * if locked: PPLWINDOW mapped, * 896 * R2 => FBI, R3 => PPL, IOFF * 897 ** On arrival at the error routine: * 898 ** R0 = error code, R1 = page number, * 899 ** if locked, R2=>FBI (mapped, IOFF), R3=>PPL * 900 * * 901 * Eats R0:R3. * 902 * Stack required = 4. * 903 * 3 + max ( FINDPAL (1), LOCKWAIT (0), PFAGEWSX (0), * 904 * VGETMEM (0) ) * 905 * * 906 ********************************************************************************** 907 908 BLOCK SETWNDOx subroutines 909 ENTRY SETWNDO1 910 ENTRY SETWNDO2 911 ENTRY SETWNDO3 912 ENTRY SETWNDOX 913 ENTRY SETPAGEX 914 915 BEGFRAME 00178801 6 BASE 916 SETWNDOT BSS 1 R4 save 00178802 6 BASE 917 VMLISTADR BSS 1 address in UPC of VP list we use 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 614 (WINDOW) F 35 Resident User Window Routines 918 ENDFRAME 919 031F6 DD9F8003 6 STAK 920 SETPAGEX ENTRS PUSH 031F7 60D20000 3 0 REG 921 LD R3 R0 copy page number to correct register 031F8 60800414 2 922 LD R2 CPCUPC get the current process 031F9 3896880D 2 2 BASE 923 LEA R2 R2,UPCVMLIST get the non-window list 031FA EC0A8010 2 CBM 924 STZ R2/BIT 0 save type of reloc for fault 031FB FE0E320A 925 JMP SETWINDEX share code 926 * --- 927 031FC DD9F8003 6 STAK 928 SETWNDOX ENTRS PUSH 031FD 60D20000 3 0 REG 929 LD R3 R0 copy page number to correct register 031FE FE0E3207 930 JMP SETWINDEN share code 931 * --- 932 031FF DD9F8003 6 STAK 933 SETWNDO2 ENTRS PUSH 03200 60C40083 3 IMM 934 LD R3 PNWNDO2 get the page number 03201 FE0E3207 935 JMP SETWINDEN share code 936 * --- 937 03202 DD9F8003 6 STAK 938 SETWNDO3 ENTRS PUSH 03203 60C40084 3 IMM 939 LD R3 PNWNDO3 get the page number 03204 FE0E3207 940 JMP SETWINDEN share code 941 * --- 942 943 03205 DD9F8003 6 STAK 944 SETWNDO1 ENTRS PUSH 03206 60C40082 3 IMM 945 LD R3 PNWNDO1 produce page number 00003207 946 SETWINDEN LABEL entry for other windows 03207 60800414 2 947 LD R2 CPCUPC get current process 03208 3896880E 2 2 BASE 948 LEA R2 R2,UPCWVMLIST get window list 03209 EDCA8010 2 CBM 949 STW R2/BIT 0 save type of reloc for fault 0000320A 950 SETWINDEX LABEL 0320A E4978802 2 6 BASE 951 ST R2 SP,VMLISTADR save the list we use 0320B E5178801 4 6 BASE 952 ST R4 SP,SETWNDOT save this register 953 0320C 60968800 2 2 BASE 954 LD R2 R2,0 => head of appropriate VPAGE list 0320D 3CD68004 3 2 CACH 955 LSRCH R3 R2,VPVPN look for the window page 0320E FE0C3219 956 JNE SETNEWVP no VM list element, build one 957 0320F DC40330C 958 CALLNP FINDPAL search PSA for current status 03210 FE0E3222 959 JMP SETWNNO 960 * R2 => VPAGE, PAL => current PAL, move to UPCWSX 03211 EC091210 4 ZBM 961 STZ PAL,PALOCK clear out the lock bit 03212 DC4025DD 962 CALLNP PFAGEWSX distribute age to PALs in WSX list 03213 60400414 1 963 LD R1 CPCUPC get the current UPC pointer 03214 60164810 0 1 BASE 964 LD R0 R1,UPCWSX get pointer to head element 03215 E4091F10 0 4 ZBM 965 ST R0 PAL,PALINK hook the list behind us 03216 E5164810 4 1 BASE 966 ST PAL R1,UPCWSX we are now the head element 03217 0C800000 967 ION turn the interrupts back on (matches FINDPAL) 03218 FE0E3222 968 JMP SETWNNO done here, pick up parameters 969 * --- 970 00003219 971 SETNEWVP LABEL create a VM list element for this window 03219 DC002F0A 972 CALL VGETMEM fetch a piece of memory 0321A 40440002 IMM 973 PARVL VPLOG 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 615 (WINDOW) F 35 Resident User Window Routines 0321B E4D60004 3 0 CACH 974 ST R3 R0,VPVPN set the virtual page number 0321C EE160802 0 BASE 975 STZ2 R0,VPWORDC clear out these words 976 * Remember that the interrupts are on here. This 977 * is okay, since no interrupt processor (including 978 * page fault) alters this list. They may, however, 979 * search it, so make sure it's always clean. 0321D 60C99F12 3 6 ZBM 980 LD R3 SP,VMLISTADR/FLDADRS load address to UPC VM chain head 0321E 6056C400 1 3 @R 981 LD R1 @R3 get address of first element 0321F E4481F10 1 0 ZBM 982 ST R1 R0,VPLINK make this element point ahead 03220 E416C400 0 3 @R 983 ST R0 @R3 new element now head of list 03221 60920000 2 0 REG 984 LD R2 R0 copy pointer 985 * \ / 00003222 986 SETWNNO LABEL 987 * R2 => VPAGE element 03222 61178801 4 6 BASE 988 LD R4 SP,SETWNDOT restore this register for the caller 03223 DCD3C000 7 REG 989 EXPCS R7 pick up parameters 03224 C1488E80 2 ZBM 990 STPV R2,VPCNTL save control word 03225 C1489F11 2 ZBM 991 STPV R2,VPFCB save address of associated FCB 03226 C1089F12 2 ZBM 992 STP R2,VPERAD save error address 03227 C1568803 2 BASE 993 STPV R2,VPBLOCK save disk address 03228 C04882E2 2 ZBM 994 STPVL R2,VPFBITYPE save requested FBI type 03229 EC089011 2 ZBM 995 STZ R2,VPINDRCT windows are never indirect 0322A 5C089A10 2 ZBM 996 CMZ R2,VPCNTL/VPCNTLLKB checked for locked in memory 0322B FE023251 997 JEQ SETWNDOLV jump if not locked 998 * \ / 999 1000 ********************************************************************************** 1001 * * 1002 * The user has requested the page locked. We shuffle * 1003 * around the error address so that if a MS error occurs, we * 1004 * get control back and can fix the stack before returning to * 1005 * the callers error address. We then reference the page with * 1006 * a CMZ to cause a page fault and force the page in (before * 1007 * the fault, we clear the operand fetch relocation bit in the * 1008 * MSR, if the virtual page sits in user space). We may do * 1009 * this with the interrupts on because the lock bit is set in * 1010 * the VP element. This causes the PAL to be marked as * 1011 * locked, therefore, the occurrance of interrupts will not * 1012 * cause the page to go away or anything. It has to be this * 1013 * way, of course, because the user will be doing lots more * 1014 * work with the interrupts on. * 1015 * After we have come back with the page present, we * 1016 * search the PPAGE list to find the PPL, and by consequence, * 1017 * the FBI and we return the FBI address to the caller. * 1018 * * 1019 ********************************************************************************** 1020 1021 * \ / 0322C 60568004 1 2 CACH 1022 LD R1 R2,VPVPN get the virtual page number 0322D 604A7310 1 1 CBM 1023 LD R1 R1/BITS 25:9 generate the window address 0322E 60C43252 3 IMM 1024 LD R3 ADR SETWNDODE get MS error address 0322F E0C89F12 3 2 ZBM 1025 EXCH R3 R2,VPERAD a temporary exchange 1026 * in case this discovers a MS error 03230 5C098012 6 ZBM 1027 CMZ SP,VMLISTADR/BIT 0 are we not mon? 03231 FE0C3233 1028 JNE MONSIDE jump if no reloc needed 03232 59840040 IMM 1029 CLBMSR MSRFRELOC look on user side of page file 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 616 (WINDOW) F 35 Resident User Window Routines 00003233 1030 MONSIDE LABEL 03233 5C164800 1 BASE 1031 CMZ R1,0 force the page in ( page fault here ) 03234 59C40040 IMM 1032 IORMSR MSRFRELOC restore monitor fetches 1033 * \ / lucked out, we got the page 1034 00003235 1035 STFINDPPL LABEL 03235 E4C89F12 3 2 ZBM 1036 ST R3 R2,VPERAD restore callers error address 03236 E5178801 4 6 BASE 1037 ST R4 SP,SETWNDOT save this register 03237 61168803 4 2 BASE 1038 LD R4 R2,VPBLOCK get the block number 1039 1040 * look in the page list (note: R0 & R1 are not free herein) 1041 * (R0=possibly disk error code, R1=window address) 03238 60CB3460 3 4 CBM 1042 LD R3 R4/PPHASHFLD leave lower bits for hash code 03239 60920000 2 0 REG 1043 LD R2 R0 save reg from PLOCK 1044 PLOCK PPAGELOCK(R3) call to lock the appropriate PPAGELIST head 0323A 0CC00000 1044 IOFF 0323B D1E61E21 3 1044 SETT PPAGELOCK(R3) 0323C FE0C323E 1044 JNE MA(2+DISPW MA 0) 0323D DC40308B 1044 CALLNP LOCKWAIT 0323E 60128000 0 2 REG 1045 LD R0 R2 restore reg after PLOCK (R0 is out parameter) 0323F 60A61E61 2 3 1046 LD R2 PPAGELIST(R3) get pointer to first element 03240 3D168801 4 2 BASE 1047 LSRCH R4 R2,PPBLOCK look for the proper block 03241 FE023243 1048 JEQ SPGOKAY jump if block found 03242 00130063 1049 HALT HALTS0063 block not found in PPAGE list 1050 * --- 1051 00003243 1052 SPGOKAY LABEL 03243 61128000 4 2 REG 1053 LD R4 R2 save PPL address 03244 E4CB1260 3 4 CBM 1054 ST PFPTR R4/UPR15/PPHASHFLD save PPAGELOCK index 03245 60888C62 2 2 ZBM 1055 LD R2 R2,PPFBIBLK get index into PPLPFMAP 03246 60C400FB 3 IMM 1056 LD PFPTR PNPPLWNDO window to map FBI 03247 0CC00000 1057 IOFF interrupts off 03248 00E41C80 2 1058 LDPF PPLPFMAP(R2) map in the page containing FBI 03249 60CB1F10 3 4 CBM 1059 LD R3 R4/FLDADRS R3 => PPL 0324A 6088C4A0 2 3 ZBM 1060 LD R2 R3,PPFBIDISP get disp of FBI in page 0324B 38A5EC00 2 2 1061 LEA R2 PPLWINDOW(R2) R2 => FBI 0324C 610B1260 4 4 CBM 1062 LD R4 R4/UPR15/PPHASHFLD retrieve lock index 1063 PUNLOCK PPAGELOCK(R4) call to release the appropriate PPAGELIST head 0324D EC281E21 4 1063 STZ PPAGELOCK(R4) 0324E 0C800000 1063 ION 0324F 61178801 4 6 BASE 1064 LD R4 SP,SETWNDOT restore this register for the caller 03250 E5C00465 7 1065 ST R7 MFBILAST remember we mapped in the PPL window 1066 * R0=MS error code|0, R1=window addr, R2=>FBI, R3=>PPL 1067 * \ / 1068 00003251 1069 SETWNDOLV LABEL 03251 5D1F8003 6 STAK 1070 LEAVE POP leave this routine 1071 * --- 1072 1073 ********************************************************************************** 1074 * * 1075 * A mass storage error has occurred within the window * 1076 * routine. Set up so that we return to the users error * 1077 * location. Then go find the PPL so that the error routine * 1078 * has an FBI pointer also. * 1079 * * 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 617 (WINDOW) F 35 Resident User Window Routines 1080 ********************************************************************************** 1081 00003252 1082 SETWNDODE LABEL 03252 59C40040 IMM 1083 IORMSR MSRFRELOC restore monitor fetches 03253 E4CBDF10 3 7 CBM 1084 ST R3 R7/FLDADRS set callers error address as our return 03254 64040072 0 IMM 1085 CPR R0 UINTVMFIDS is this user out of disk space? 03255 FE0C3235 1086 JNE STFINDPPL if not, go find the PPL 03256 E4C89F12 3 2 ZBM 1087 ST R3 R2,VPERAD restore the error address 03257 60840000 2 IMM 1088 LD R2 0 say no FBI since no block 03258 0CC00000 1089 IOFF to imitate the IOFF when mapping PPLWINDOW 03259 5D1F8003 6 STAK 1090 LEAVE POP 1091 * --- 1092 1093 END SETWNDOx subroutines 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 618 (WINDOW) F 35 Resident User Window Routines 1095 1096 ********************************************************************************** 1097 * * 1098 * SETMODIFWx * 1099 * Removes the lock bit of a window so that it may leave * 1100 * resident memory. Forces the modified bit to be set so that * 1101 * this page is rewritten. This guarantees that alterations * 1102 * to the FBI are recognized. * 1103 * Call: * 1104 * SP => contains stack pointer * 1105 * CALLNP SETMODIFWx * 1106 * * 1107 * Eats R0:R1. * 1108 * Stack required = 1 * 1109 * * 1110 ********************************************************************************** 1111 1112 BLOCK SETMODIFWx subroutines 1113 ENTRY SETMODIFW1 1114 ENTRY SETMODIFW2 1115 ENTRY SETMODIFW3 1116 1117 BEGFRAME 1118 ENDFRAME 1119 0325A DD5F8001 6 STAK 1120 SETMODIFW2 ENTRNP PUSH 0325B 60040083 0 IMM 1121 LD R0 PNWNDO2 get the page number 0325C FE0E3262 1122 JMP SETMODSHR share code 1123 * --- 1124 0325D DD5F8001 6 STAK 1125 SETMODIFW3 ENTRNP PUSH 0325E 60040084 0 IMM 1126 LD R0 PNWNDO3 get the page number 0325F FE0E3262 1127 JMP SETMODSHR share code 1128 * --- 1129 03260 DD5F8001 6 STAK 1130 SETMODIFW1 ENTRNP PUSH 03261 60040082 0 IMM 1131 LD R0 PNWNDO1 get the page number 00003262 1132 SETMODSHR LABEL 03262 60400414 1 1133 LD R1 CPCUPC get the current UPC pointer 03263 6056480E 1 1 BASE 1134 LD R1 R1,UPCWVMLIST get pointer to window VM list 03264 3C164004 0 1 CACH 1135 LSRCH R0 R1,VPVPN look for this page 03265 FE0C326F 1136 JNE SMDNLV no find is unlikely, 1137 * mostly from error routine cleanups 03266 EC085A10 1 ZBM 1138 STZ R1,VPCNTL/VPCNTLLKB unlock the page 03267 0CC00000 1139 IOFF turn off the interrupts 03268 60400414 1 1140 LD R1 CPCUPC get the current UPC pointer 03269 6056480F 1 1 BASE 1141 LD R1 R1,UPCVASP get pointer to VASP list 0326A 3C164000 0 1 CACH 1142 LSRCH R0 R1,PAVPN look for the proper page 0326B FE0C326E 1143 JNE SMDNH page not originally locked, ok 0326C EDC85C12 1 ZBM 1144 STW R1,PAMODIFIED in case only the FBI was modified 0326D EC085210 1 ZBM 1145 STZ R1,PALOCK clear this lock bit 0000326E 1146 SMDNH LABEL 0326E 0C800000 1147 ION turn the interrupts back on 0000326F 1148 SMDNLV LABEL 0326F 5D1F8001 6 STAK 1149 LEAVE POP 1150 * --- 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 619 (WINDOW) F 35 Resident User Window Routines 1151 1152 END SETMODIFWx subroutines 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 620 (WINDOW) F 35 Resident User Window Routines 1154 1155 ********************************************************************************** 1156 * * 1157 * UNLOCK WINDOW * 1158 * Removes the lock bit of a page so that it may leave * 1159 * resident memory. The VPAGE element may be absent. The * 1160 * page need not have been locked. ULKWNDOx are special * 1161 * entries provided for the windows. * 1162 * Call: * 1163 * LD R0 * 1164 * CALLNP ULKPAGE SP contains stack pointer * 1165 * returns with R1 => PAL * 1166 * * 1167 * Eats R0, Sets R1. * 1168 * Stack required = 1 * 1169 * * 1170 ********************************************************************************** 1171 1172 BLOCK ULKWNDOx and ULKPAGE subroutines 1173 ENTRY ULKWNDO1 1174 ENTRY ULKWNDO2 1175 ENTRY ULKWNDO3 1176 ENTRY ULKPAGE 1177 1178 BEGFRAME 1179 ENDFRAME 1180 03270 DD5F8001 6 STAK 1181 ULKWNDO2 ENTRNP PUSH 03271 60040083 0 IMM 1182 LD R0 PNWNDO2 get the page number 03272 FE0E327D 1183 JMP ULKWEN go share general code 1184 * --- 1185 03273 DD5F8001 6 STAK 1186 ULKWNDO3 ENTRNP PUSH 03274 60040084 0 IMM 1187 LD R0 PNWNDO3 get the page number 03275 FE0E327D 1188 JMP ULKWEN go share general code 1189 * --- 1190 03276 DD5F8001 6 STAK 1191 ULKWNDO1 ENTRNP PUSH 03277 60040082 0 IMM 1192 LD R0 PNWNDO1 produce page number 03278 FE0E327D 1193 JMP ULKWEN go share general code 1194 * --- 1195 03279 DD5F8001 6 STAK 1196 ULKPAGE ENTRNP PUSH 0327A 60400414 1 1197 LD R1 CPCUPC get the current UPC pointer 0327B 6056480D 1 1 BASE 1198 LD R1 R1,UPCVMLIST get pointer to VM list 0327C F230327F 0 1199 JBF R0/MONBIT ULKSNL jump to search normal list 0000327D 1200 ULKWEN LABEL 0327D 60400414 1 1201 LD R1 CPCUPC get the current UPC pointer 0327E 6056480E 1 1 BASE 1202 LD R1 R1,UPCWVMLIST get pointer to window VM list 0000327F 1203 ULKSNL LABEL 0327F 3C164004 0 1 CACH 1204 LSRCH R0 R1,VPVPN look for this page 03280 FE0C3289 1205 JNE ULPNLV no find is unlikely, 1206 * mostly from error routine cleanups 03281 EC085A10 1 ZBM 1207 STZ R1,VPCNTL/VPCNTLLKB unlock the page 03282 0CC00000 1208 IOFF interrupts off 03283 60400414 1 1209 LD R1 CPCUPC get the current UPC pointer 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 621 (WINDOW) F 35 Resident User Window Routines 03284 6056480F 1 1 BASE 1210 LD R1 R1,UPCVASP get pointer to VASP list 03285 3C164000 0 1 CACH 1211 LSRCH R0 R1,PAVPN look for the proper page 03286 FE0C3288 1212 JNE ULPNH page not originally locked, ok 03287 EC085210 1 ZBM 1213 STZ R1,PALOCK clear this lock bit 00003288 1214 ULPNH LABEL 03288 0C800000 1215 ION interrupts back on 00003289 1216 ULPNLV LABEL 03289 5D1F8001 6 STAK 1217 LEAVE POP 1218 * --- 1219 1220 END ULKWNDOx and ULKPAGE subroutines 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 622 (WINDOW) F 35 Resident User Window Routines 1222 1223 ********************************************************************************** 1224 * * 1225 * SAVEWNDOx * 1226 * Save the mapping of the specified window so that * 1227 * RSTRWNDO can restore it. This things works by getting a * 1228 * piece of free storage and copying the window's VP element * 1229 * into it. The means that RSTRWNDO MUST be called after * 1230 * calling this routine (in order to claim the memory back). * 1231 * This routine must only be used for WNDO1 through * 1232 * WNDO3, since it only deals with the UPCWVMLIST). * 1233 * What is passed to this routine is a pointer to a * 1234 * location to place the pointer to the piece of memory. If * 1235 * no memory is fetched, zero is placed there so that RSTRWNDO * 1236 * will do nothing. * 1237 * Call: * 1238 * CALL SAVEWNDOx * 1239 * PARL address to save the pointer * 1240 * * 1241 * Eats R0:R3. * 1242 * Stack required = 2 * 1243 * 2 + max ( VGETMEM (0) ) * 1244 * * 1245 ********************************************************************************** 1246 1247 BLOCK Save Window routines 1248 ENTRY SAVEWNDO1 1249 ENTRY SAVEWNDO2 1250 ENTRY SAVEWNDO3 1251 1252 BEGFRAME 00178801 6 BASE 1253 PNTRPLACE BSS 1 pointer to pointer location 1254 ENDFRAME 1255 0328A DD1F8002 6 STAK 1256 SAVEWNDO1 ENTR PUSH 0328B 60440082 1 IMM 1257 LD R1 PNWNDO1 0328C FE0E3292 1258 JMP SAVWNDOSHR 1259 * --- 1260 0328D DD1F8002 6 STAK 1261 SAVEWNDO2 ENTR PUSH 0328E 60440083 1 IMM 1262 LD R1 PNWNDO2 0328F FE0E3292 1263 JMP SAVWNDOSHR 1264 * --- 1265 03290 DD1F8002 6 STAK 1266 SAVEWNDO3 ENTR PUSH 03291 60440084 1 IMM 1267 LD R1 PNWNDO3 1268 * \ / 1269 00003292 1270 SAVWNDOSHR LABEL 03292 C0178801 6 BASE 1271 STPL SP,PNTRPLACE place the pointer is to be 03293 EC178C01 6 FPVR 1272 STZ @(SP,PNTRPLACE) assume no state saved yet 03294 60C00414 3 1273 LD R3 CPCUPC 03295 60D6C80E 3 3 BASE 1274 LD R3 R3,UPCWVMLIST R3=>root of window VP list 03296 3C56C004 1 3 CACH 1275 LSRCH R1 R3,VPVPN find the VP element 03297 FE0C329F 1276 JNE NOWNDO jump if no such page 03298 DC002F0A 1277 CALL VGETMEM get storage for the state information 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 623 (WINDOW) F 35 Resident User Window Routines 03299 40440002 IMM 1278 PARVL VPLOG 0329A E4178C01 0 6 FPVR 1279 ST R0 @(SP,PNTRPLACE) return the pointer to the storage 0329B 60920000 2 0 REG 1280 LD R2 R0 where copying to 0329C 6012C000 0 3 REG 1281 LD R0 R3 where copying from 0329D 60440010 1 IMM 1282 LD R1 VPAGELNTH*CPW number of chars in a VP element 0329E DA880800 2 01 1283 MOVE R2,R0,R1 move the storage 1284 * \ / 1285 0000329F 1286 NOWNDO LABEL 0329F 5D1F8002 6 STAK 1287 LEAVE POP 1288 * --- 1289 1290 END of SAVEWNDOx 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 624 (WINDOW) F 35 Resident User Window Routines 1292 1293 ********************************************************************************** 1294 * * 1295 * RSTRWNDO * 1296 * This routine will restore the mapping of a window that * 1297 * was saved by SAVEWNDOx. If the location passed is zero, * 1298 * then nothing is done. Otherwise, the location passed is a * 1299 * pointer to the piece of memory where SAVEWNDOx saved the * 1300 * state of the window (we know which window because that was * 1301 * saved also). The particular window is than set up using * 1302 * SETWNDOx. * 1303 * This routine must only be used for WNDO1 through * 1304 * WNDO3, since it only deals with the UPCWVMLIST). * 1305 * Notice that, even though the lockedness of a window * 1306 * would be restored by these routines, the window could have * 1307 * been unlocked between the save and the restore. * 1308 * Call: * 1309 * CALL RSTRWNDO * 1310 * PARL location of zero or pointer to save block * 1311 * * 1312 * Eats R0:R3. * 1313 * Stack required = 7 * 1314 * 3 + max ( MAPOUTFBI (2), SETWNDOX (4), VFREEMEM (0) ) * 1315 * * 1316 ********************************************************************************** 1317 1318 BLOCK Restore Window routines 1319 ENTRY RSTRWNDO restore the state of a window 1320 1321 BEGFRAME 00178801 6 BASE 1322 PNTRPLACE BSS 1 pointer to memory block or zero 00178802 6 BASE 1323 R4SAVE BSS 1 1324 ENDFRAME 1325 032A0 DD1F8003 6 STAK 1326 RSTRWNDO ENTR PUSH 032A1 C0178801 6 BASE 1327 STPL SP,PNTRPLACE save pointer to pointer place 032A2 E5178802 4 6 BASE 1328 ST R4 SP,R4SAVE 032A3 61178C01 4 6 FPVR 1329 LD R4 @(SP,PNTRPLACE) get the pointer to the element 032A4 FB3032B4 4 1330 JZA R4 NOWNDO jump if nothing to restore 032A5 EC178C01 6 FPVR 1331 STZ @(SP,PNTRPLACE) remember the window is restored 032A6 E5178801 4 6 BASE 1332 ST R4 SP,PNTRPLACE remember location of block 032A7 60170004 0 4 CACH 1333 LD R0 R4,VPVPN get the page number 032A8 DC0031FC 1334 CALL SETWNDOX restore the window 032A9 41490E80 4 ZBM 1335 PARV R4,VPCNTL restore control information 032AA 41491F11 4 ZBM 1336 PARV R4,VPFCB address of FCB associated with this page 032AB 41091F12 4 ZBM 1337 PAR R4,VPERAD the error address for the page 032AC 41570803 4 BASE 1338 PARV R4,VPBLOCK the block for the page 032AD 404902E2 4 ZBM 1339 PARVL R4,VPFBITYPE the type of the page 032AE 5C091A10 4 ZBM 1340 CMZ R4,VPCNTL/VPCNTLLKB was this page locked 032AF FE0232B1 1341 JEQ RSTRNOMAP if not, no PPL window mapped in 032B0 DC40261B 1342 CALLNP MAPOUTFBI unmap the PPL window 1343 * \ / 1344 000032B1 1345 RSTRNOMAP LABEL 032B1 DC002F8F 1346 CALL VFREEMEM release the storage block 032B2 41440002 IMM 1347 PARV VPLOG 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 625 (WINDOW) F 35 Resident User Window Routines 032B3 40530000 4 REG 1348 PARVL R4 000032B4 1349 NOWNDO LABEL 032B4 61178802 4 6 BASE 1350 LD R4 SP,R4SAVE restore R4 032B5 5D1F8003 6 STAK 1351 LEAVE POP 1352 * --- 1353 1354 END of RSTRWNDO 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 626 (WINDOW) F 35 Resident User Window Routines 1356 1357 ********************************************************************************** 1358 * * 1359 * VOLFORGET * 1360 * Routine called to forget about pages in the idle list * 1361 * that belong to a given volume. This routine is provided so * 1362 * that when a disk unit goes off line, we forget what was on * 1363 * it, in case a different pack comes back up. * 1364 * Call: * 1365 * CALL VOLFORGET * 1366 * PARVL * 1367 * * 1368 * Eats R0:R2. * 1369 * Stack required = 3 * 1370 * 3 + max ( LOCKWAIT (0) ) * 1371 * * 1372 ********************************************************************************** 1373 1374 BLOCK VOLFORGET subroutine 1375 ENTRY VOLFORGET 1376 1377 BEGFRAME 00178801 6 BASE 1378 SAVEREGS BSS 2 place to save some registers 1379 ENDFRAME 1380 032B6 DD1F8003 6 STAK 1381 VOLFORGET ENTR PUSH 032B7 C0528000 2 REG 1382 STPVL R2 get the volume number 032B8 E6D78801 346 BASE 1383 ST2 R3 SP,SAVEREGS we need lots of registers 032B9 60C4001F 3 IMM 1384 LD R3 IDLETBSZ-1 number of lists we need to search 1385 PLOCK PPIDLOCK call to lock the idle list 032BA 0CC00000 1385 IOFF 032BB D1C01DD9 1385 SETT PPIDLOCK 032BC FE0C32BE 1385 JNE MA(2+DISPW MA 0) 032BD DC40308B 1385 CALLNP LOCKWAIT 1386 * \ / 1387 000032BE 1388 VOLFAGAIN LABEL 032BE 60261DDD 0 3 1389 LD R0 PPUSDIDLE(R3) get the pointer to the idle list 032BF 38661DDD 1 3 1390 LEA R1 PPUSDIDLE(R3) indicate where we started 1391 * \ / 1392 000032C0 1393 VOLFLOOP LABEL 032C0 48880081 2 0 ZBM 1394 RLSRCH R2 R0,PPBLOCK/VOLFIELD search on the volume 032C1 FE0C32CC 1395 JNE VOLFNXLST no more here try the next list 032C2 61081F10 4 0 ZBM 1396 LD R4 R0,PPLINK get the remainder of the list 032C3 E5085F10 4 1 ZBM 1397 ST R4 R1,PPLINK remove us from the list 032C4 FB3232C6 4 1398 JNZA R4 VOLFNLAST jump if more list to search 032C5 E4661DFD 1 3 1399 ST R1 PPENDIDLE(R3) adjust the end pointer 1400 * \ / 1401 000032C6 1402 VOLFNLAST LABEL 032C6 EC160801 0 BASE 1403 STZ R0,PPBLOCK nothing resides here any more 032C7 61001DDC 4 1404 LD R4 PPCLNIDLE pointer to 'clean' idle pages 032C8 E5081F10 4 0 ZBM 1405 ST R4 R0,PPLINK make us point to the list 032C9 E4001DDC 0 1406 ST R0 PPCLNIDLE put us in the list 032CA 60085F10 0 1 ZBM 1407 LD R0 R1,PPLINK get the place to start the search 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 627 (WINDOW) F 35 Resident User Window Routines 032CB FA3232C0 0 1408 JNZA R0 VOLFLOOP continue the search if anything left 1409 * \ / 1410 000032CC 1411 VOLFNXLST LABEL 032CC FAE632BE 3 1412 JDR R3 VOLFAGAIN jump to seach another list 1413 * \ / 1414 1415 PUNLOCK PPIDLOCK unlock the idle page list 032CD EC001DD9 1415 STZ PPIDLOCK 032CE 0C800000 1415 ION 032CF 62D78801 346 BASE 1416 LD2 R3 SP,SAVEREGS restore these registers 032D0 5D1F8003 6 STAK 1417 LEAVE POP return to caller 1418 * --- 1419 1420 END VOLFORGET subroutine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 628 (WINDOW) F 35 Resident User Window Routines 1422 1423 ********************************************************************************** 1424 * * 1425 * WSXCLEAN * 1426 * Routine to scan a WSX or VASP list and remove all * 1427 * pages that belong to a specified unit ( an FCB address of * 1428 * zero will clean out all pages ). * 1429 * The page file entry for a page will be unloaded iff * 1430 * this is a VASP list for the current UPC. Since this * 1431 * information is awkward to garner here, we have it passed in * 1432 * by the caller. * 1433 * Call: * 1434 * R3 = FCB address or 0 * 1435 * SP * 1436 * CALL WSXCLEAN * 1437 * PAR * 1438 * PARVL * 1439 * * 1440 * * 1441 * Eats R0:R2.. * 1442 * Stack required = 8 * 1443 * 4 + max ( DISCARDPAL (4), UNLOPAL (0) ) * 1444 * * 1445 ********************************************************************************** 1446 1447 BLOCK WSXCLEAN subroutine 1448 ENTRY WSXCLEAN 1449 1450 BEGFRAME 00178801 6 BASE 1451 WSXCLEANT BSS 1 temp for R4 save 00178802 6 BASE 1452 WSXCLEANF BSS 1 temp for FCB address 00178803 6 BASE 1453 WSXCLEANA BSS 1 ptr to address of first WSX element 1454 ENDFRAME 00000010 BYTE 1455 UNLOFLAG EQU BIT 0 bit in R7, 1 sez call UNLOPAL 1456 032D1 DD1F8004 6 STAK 1457 WSXCLEAN ENTR PUSH 032D2 C1178803 6 BASE 1458 STP SP,WSXCLEANA store pointer to WSX list 032D3 C04BC010 7 CBM 1459 STPVL R7/UNLOFLAG save current VASP marker 032D4 E5178801 4 6 BASE 1460 ST PAL SP,WSXCLEANT save R4 032D5 E4D78802 3 6 BASE 1461 ST R3 SP,WSXCLEANF save the FCB address 000032D6 1462 WSXCAGAIN LABEL 032D6 60578803 1 6 BASE 1463 LD R1 SP,WSXCLEANA get pointer to the WSX list 032D7 0CC00000 1464 IOFF interrupts off 000032D8 1465 WSXCLOOP LABEL 032D8 FA7832E7 12 1466 RLJZA R1 WSXCXIT jump at end of lists, no find this pass 032D9 FAC232DC 3 1467 JEQZ R3 DOANYWAY jump if to get all pages 032DA 64C85F12 3 1 ZBM 1468 CPR R3 R1,PAFCB this element wanted? 032DB FE0C32D8 1469 JNE WSXCLOOP jump back if not 000032DC 1470 DOANYWAY LABEL 032DC 60085F10 0 1 ZBM 1471 LD R0 R1,PALINK get the forward link from this element 032DD E4089F10 0 2 ZBM 1472 ST R0 R2,PALINK jumper the list around this element 032DE 61124000 4 1 REG 1473 LD PAL R1 copy the pointer 032DF F3C032E1 7 1474 JBF R7/UNLOFLAG NOUNLOAD jump if not current VASP 032E0 DC402623 1475 CALLNP UNLOPAL must be current VASP list, unload page file 000032E1 1476 NOUNLOAD LABEL 032E1 DC402E15 1477 CALLNP DISCARDPAL get rid of this element 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 629 (WINDOW) F 35 Resident User Window Routines 032E2 60800412 2 1478 LD R2 CPPSA get the current PSA pointer 032E3 D04880F2 2 ZBM 1479 DEC R2,PSWSSIZE indicate that the working set shrunk 032E4 0C800000 1480 ION turn on interrupts for a moment 032E5 60D78802 3 6 BASE 1481 LD R3 SP,WSXCLEANF restore the FCB address 032E6 FE0E32D6 1482 JMP WSXCAGAIN we've removed an element, look for more 1483 * --- 1484 000032E7 1485 WSXCXIT LABEL 032E7 0C800000 1486 ION interrupts back on 032E8 61178801 4 6 BASE 1487 LD PAL SP,WSXCLEANT restore R4 032E9 5D1F8004 6 STAK 1488 LEAVE POP return all better 1489 * --- 1490 1491 END WSXCLEAN subroutine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 630 (WINDOW) F 35 Resident User Window Routines 1493 1494 ********************************************************************************** 1495 * * 1496 * WSXCLNALL * 1497 * This routine cleans all working set extensions. It * 1498 * loops through all the WSX lists for a user, removing all * 1499 * pages that belong to a specified unit (an FCB address of * 1500 * zero will remove all pages). * 1501 * Call: * 1502 * R3 = FCB address or zero * 1503 * SP = stack pointer * 1504 * CALLNP WSXCLNALL * 1505 * * 1506 * * 1507 * Eats R0:R2. * 1508 * Stack required = 10 * 1509 * 2 + max ( WSXCLEAN (8) ) * 1510 * * 1511 ********************************************************************************** 1512 1513 BLOCK WSXCLNALL subroutine 1514 ENTRY WSXCLNALL 1515 1516 BEGFRAME 00178801 6 BASE 1517 WSXCLNT BSS 1 temp for saving R4 1518 ENDFRAME 1519 032EA DD5F8002 6 STAK 1520 WSXCLNALL ENTRNP PUSH 032EB E5178801 4 6 BASE 1521 ST R4 SP,WSXCLNT save R4 032EC 60000412 0 1522 LD R0 CPPSA get PSA pointer 032ED 60881F15 2 0 ZBM 1523 LD R2 R0,PSPROCLIST get pointer to list of UPC's 1524 * \ / 1525 000032EE 1526 WSXCLNLP LABEL 032EE 61128000 4 2 REG 1527 LD R4 R2 place this address in a safe place 032EF DC0032D1 1528 CALL WSXCLEAN clean out this list 032F0 41170810 4 BASE 1529 PAR R4,UPCWSX point at this WSX list 032F1 40440000 IMM 1530 PARVL 0 indicate never the current VASP 032F2 60891F10 2 4 ZBM 1531 LD R2 R4,UPCSONPTR see if any children to clean up 032F3 FAB232EE 2 1532 JNZA R2 WSXCLNLP jump if there are underprocesses 1533 * \ / 1534 000032F4 1535 WSXCLNBROS LABEL 032F4 60891F16 2 4 ZBM 1536 LD R2 R4,UPCBROPTR check if any brothers to clean 032F5 FAB232EE 2 1537 JNZA R2 WSXCLNLP jump if other processes exists 032F6 61091F17 4 4 ZBM 1538 LD R4 R4,UPCDADPTR move up one level, check if more 032F7 FB3232F4 4 1539 JNZA R4 WSXCLNBROS go clean up the brothers 1540 * \ / 1541 032F8 61178801 4 6 BASE 1542 LD R4 SP,WSXCLNT restore R4 032F9 5D1F8002 6 STAK 1543 LEAVE POP return 1544 * --- 1545 1546 END of WSXCLNALL 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 631 (WINDOW) F 35 Resident User Window Routines 1548 1549 ********************************************************************************** 1550 * * 1551 * VASPCLNALL * 1552 * This routine cleans all of the VASP lists. It loops * 1553 * through all the VASP lists for a user, removing all pages * 1554 * that belong to a specified unit (an FCB address of zero * 1555 * will remove all pages). * 1556 * Call: * 1557 * R3 = FCB address or zero * 1558 * SP = stack pointer * 1559 * CALLNP VASPCLNALL * 1560 * * 1561 * * 1562 * Eats R0:R2. * 1563 * Stack required = 10 * 1564 * 2 + max ( WSXCLEAN (8) ) * 1565 * * 1566 ********************************************************************************** 1567 1568 BLOCK VASPCLNALL subroutine 1569 ENTRY VASPCLNALL 1570 1571 BEGFRAME 00178801 6 BASE 1572 VASPCLNT BSS 1 temp for saving R4 1573 ENDFRAME 1574 032FA DD5F8002 6 STAK 1575 VASPCLNALL ENTRNP PUSH 032FB E5178801 4 6 BASE 1576 ST R4 SP,VASPCLNT save R4 032FC 60000412 0 1577 LD R0 CPPSA get PSA pointer 032FD 60881F15 2 0 ZBM 1578 LD R2 R0,PSPROCLIST get pointer to list of UPC's 1579 * \ / 1580 000032FE 1581 VASPCLNLP LABEL 032FE 61128000 4 2 REG 1582 LD R4 R2 place address in a safe register 032FF DC0032D1 1583 CALL WSXCLEAN clean out this list 03300 4117080F 4 BASE 1584 PAR R4,UPCVASP point at this VASP list 03301 65000414 4 1585 CPR R4 CPCUPC check for current UPC 03302 EC520000 0 REG 1586 STLEQ R0 R0 get 0 iff not current UPC 03303 40520000 0 REG 1587 PARVL R0 pass 0 if not current VASP, 1 if it is 03304 60891F10 2 4 ZBM 1588 LD R2 R4,UPCSONPTR check if any children to clean 03305 FAB232FE 2 1589 JNZA R2 VASPCLNLP loop through all UPC's 1590 * \ / 1591 00003306 1592 VASPCLNBROS LABEL 03306 60891F16 2 4 ZBM 1593 LD R2 R4,UPCBROPTR see if any brothers to clean 03307 FAB232FE 2 1594 JNZA R2 VASPCLNLP jump if others still exist 03308 61091F17 4 4 ZBM 1595 LD R4 R4,UPCDADPTR move up one level, check if more 03309 FB323306 4 1596 JNZA R4 VASPCLNBROS need to check this sub-tree 1597 * \ / 1598 0330A 61178801 4 6 BASE 1599 LD R4 SP,VASPCLNT restore R4 0330B 5D1F8002 6 STAK 1600 LEAVE POP return 1601 * --- 1602 1603 END of VASPCLNALL 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 632 (WINDOW) F 35 Resident User Window Routines 1605 1606 ********************************************************************************** 1607 * * 1608 * FINDPAL * 1609 * Given a virtual page number in R3, search the VASP * 1610 * list for the PAL, unmap it, and remove it from the list. * 1611 * Call: * 1612 * * 1613 * R3 => VPN * 1614 * SP * 1615 * CALLNP FINDPAL * 1616 * no PAL * 1617 * PAL => PAL, now unlinked, ints off * 1618 * * 1619 * Eats R0:R1, PFPTR iff found, Sets PAL. * 1620 * Stack required = 1 * 1621 * 1 + max ( UNLOPAL (0) ) * 1622 * * 1623 ********************************************************************************** 1624 1625 BLOCK FINDPAL subroutine 1626 ENTRY FINDPAL 1627 1628 BEGFRAME 1629 ENDFRAME 1630 0330C DD5F8001 6 STAK 1631 FINDPAL ENTRNP PUSH 1632 1633 * R3=VPN, SP=>stack 1634 0330D 60000414 0 1635 LD R0 CPCUPC load the current UPC pointer 0330E 3856080F 1 0 BASE 1636 LEA R1 R0,UPCVASP get head of VASP list 0330F 0CC00000 1637 IOFF interrupts off 03310 6016080F 0 0 BASE 1638 LD R0 R0,UPCVASP get ptr to first element 03311 48D60000 3 0 CACH 1639 RLSRCH R3 R0,PAVPN search for the specified page 03312 FE0C3319 1640 JNE FINDPEXIT jump if not in VASP 03313 19C40001 7 IMM 1641 ADD R7 1 advance return address 03314 61120000 4 0 REG 1642 LD PAL R0 move pointer to PAL into PAL 1643 * \ / 03315 60091F10 0 4 ZBM 1644 LD R0 PAL,PALINK get our forward pointer 03316 E4085F10 0 1 ZBM 1645 ST R0 R1,PALINK remove pointer to us and repair list 03317 DC402623 1646 CALLNP UNLOPAL unload the page file 03318 5D1F8001 6 STAK 1647 LEAVE POP return 1648 * --- 1649 00003319 1650 FINDPEXIT LABEL 03319 0C800000 1651 ION interrupts back on if not found 0331A 5D1F8001 6 STAK 1652 LEAVE POP 1653 * --- 1654 1655 END FINDPAL subroutine 1656 1657 1658 END user page table managers 61 INPUT PROCINOUT routines to handle processes 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 633 (PROCINOUT) F 36 Session ins and outs 3 4 BLOCK goodies to move sessions around 5 6 ENTRY CHECKEVENT see if an event has happened 7 ENTRY CHECKNOINT remove interrupt element if no longer selected 8 ENTRY CHECKUINT check for selected event interrupts 9 ENTRY CHKINTCODE check interrupt code for subcode conversion 10 ENTRY DQUEONE to remove one user from a queue 11 ENTRY DQUETHIS remove a specific session from the queue 12 ENTRY ELSRCHER remove error element 13 ENTRY FINDTERMCB locate sessions absolute terminal 14 ENTRY FINDUCE locate a UCE for a given FCB 15 ENTRY GIVEUINT routine to post user events 16 ENTRY MOVETRMGP call RESETTCG, call CALCTERMC if necessary 17 ENTRY MOVETRMGX find console TCB, call MOVETRMGP on it 18 ENTRY OVPDESTROY destroy an overprogram 19 ENTRY OVPDOWNONE move session state down one program 20 ENTRY OVPUPONE move session state up one program 21 ENTRY RESETTCG install correct TCG/TCA in TCB 22 ENTRY ROUST get a session out of wait 23 ENTRY SCCONPTR pointer to bit table of unit type UER codes 24 ENTRY SUSPENDCAL suspend the caller 25 ENTRY SUSPENDFRQ suspend a file request 26 ENTRY SUSPENDME to shut down a session 27 ENTRY UERRSET sic an error on a user 28 ENTRY UERRSETY another, different calling sequence 29 ENTRY USERTIMINT give user a time interrupt 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 634 (PROCINOUT) F 36 Session ins and outs 31 32 ********************************************************************************** 33 * * 34 * OVPUPONE * 35 * Over program up one. Moves the session state from * 36 * the current program to the one above. * 37 * Call: * 38 * LD SP => stack * 39 * CALLNP OVPUPONE * 40 * JMP * 41 * * 42 * Eats R0:R2, R4. * 43 * Stack required = 11 * 44 * 4 + max ( CHECKUINT (5), OVPPICKUP (3), OVPPUTDOWN (7), * 45 * PFLOAD (3) ) * 46 * * 47 ********************************************************************************** 48 49 BLOCK OVPUPONE subroutine 50 ENTRY OVPUPONE 51 52 BEGFRAME 00178801 6 BASE 53 OVPUPLAST BSS 1 => UPC for above 00178802 6 BASE 54 TEMPR3 BSS 1 temp for saving R3 00178803 6 BASE 55 TEMPR5 BSS 1 temp for saving R5 56 ENDFRAME 57 0331B DD5F8004 6 STAK 58 OVPUPONE ENTRNP PUSH 0331C 60000414 0 59 LD R0 CPCUPC the current process 0331D 60081F17 0 0 ZBM 60 LD R0 R0,UPCDADPTR move to the next higher level 0331E FA30332F 0 61 JZA R0 OVPUPONEX nothing to move up to 0331F E4D78802 3 6 BASE 62 ST R3 SP,TEMPR3 save away register 3 03320 E5578803 5 6 BASE 63 ST R5 SP,TEMPR5 save away register 5 03321 E4178801 0 6 BASE 64 ST R0 SP,OVPUPLAST save the pointer to him 65 * \ / 66 03322 0CC00000 67 IOFF disable the interrupts for the move 03323 DC403344 68 CALLNP OVPPICKUP pickup current status 03324 61400412 5 69 LD R5 CPPSA current session 03325 60178801 0 6 BASE 70 LD R0 SP,OVPUPLAST pointer to the one going to 03326 DC40334B 71 CALLNP OVPPUTDOWN place this as the next program 03327 DC4025C2 72 CALLNP PFLOAD load page file 03328 0C800000 73 ION restore the interrupt system 74 * \ / 75 03329 60C95F11 3 5 ZBM 76 LD R3 R5,PSCACHNP1 => CA of new process 0332A 60D6C80B 3 3 BASE 77 LD R3 R3,CAINTMASK mask of allowable interrupts 0332B DC4033C2 78 CALLNP CHECKUINT see if an interrupt event is to happen 0332C 19C40001 7 IMM 79 ADD R7 1 advance return address to success return 0332D 60D78802 3 6 BASE 80 LD R3 SP,TEMPR3 restore register 3 0332E 61578803 5 6 BASE 81 LD R5 SP,TEMPR5 restore register 5 82 * \ / 83 0000332F 84 OVPUPONEX LABEL 0332F 5D1F8004 6 STAK 85 LEAVE POP return 86 * --- 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 635 (PROCINOUT) F 36 Session ins and outs 87 88 END OVPUPONE subroutine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 636 (PROCINOUT) F 36 Session ins and outs 90 91 ********************************************************************************** 92 * * 93 * OVPDOWNONE * 94 * Over program down. Moves the session state from * 95 * the current program to the specified under process. * 96 * Call: * 97 * LD SP => stack * 98 * CALL OVPDOWNONE * 99 * PARVL * 100 * JMP * 101 * * 102 * Eats R0:R2,R4 * 103 * Stack required = 11 * 104 * 4 + max ( CHECKUINT (5), OVPPICKUP (3), OVPPUTDOWN (7), * 105 * PFLOAD (3) ) * 106 * * 107 ********************************************************************************** 108 109 BLOCK OVPDOWNONE subroutine 110 ENTRY OVPDOWNONE 111 112 BEGFRAME 00178801 6 BASE 113 TEMPR3 BSS 1 temp for saving R3 00178802 6 BASE 114 TEMPR5 BSS 1 temp for saving R5 00178803 6 BASE 115 OVPDNTMP BSS 1 save UPC to move down to 116 ENDFRAME 117 03330 DD1F8004 6 STAK 118 OVPDOWNONE ENTR PUSH 03331 C0520000 0 REG 119 STPVL R0 get the UPC address 03332 FA303343 0 120 JZA R0 OVPDNONEX jump if no process to move to 03333 E4178803 0 6 BASE 121 ST R0 SP,OVPDNTMP save the address away 03334 E4D78801 3 6 BASE 122 ST R3 SP,TEMPR3 save R3 03335 E5578802 5 6 BASE 123 ST R5 SP,TEMPR5 save R5 124 * \ / 125 03336 0CC00000 126 IOFF disable the interrupts for the move 03337 DC403344 127 CALLNP OVPPICKUP pickup the current state 03338 60178803 0 6 BASE 128 LD R0 SP,OVPDNTMP get back the UPC address 03339 61400412 5 129 LD R5 CPPSA get current PSA pointer 0333A DC40334B 130 CALLNP OVPPUTDOWN set up this programs status 0333B DC4025C2 131 CALLNP PFLOAD load page file 0333C 0C800000 132 ION restore the interrupt system 133 * \ / 134 0333D 60C95F11 3 5 ZBM 135 LD R3 R5,PSCACHNP1 => CA of new process 0333E 60D6C80B 3 3 BASE 136 LD R3 R3,CAINTMASK mask of allowable interrupts 0333F DC4033C2 137 CALLNP CHECKUINT see if a user interrupt is to happen 03340 19C40001 7 IMM 138 ADD R7 1 advance to successful return 03341 60D78801 3 6 BASE 139 LD R3 SP,TEMPR3 restore R3 03342 61578802 5 6 BASE 140 LD R5 SP,TEMPR5 restore R5 141 * \ / 142 00003343 143 OVPDNONEX LABEL 03343 5D1F8004 6 STAK 144 LEAVE POP return 145 * --- 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 637 (PROCINOUT) F 36 Session ins and outs 146 147 END OVPDOWNONE subroutine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 638 (PROCINOUT) F 36 Session ins and outs 149 150 ********************************************************************************** 151 * * 152 * OVPPICKUP * 153 * Over program pickup. Cleans up the current program * 154 * in the stack prior to the setting up of a different program. * 155 * Call: * 156 * LD SP => stack * 157 * CALLNP OVPPICKUP * 158 * * 159 * Eats R0:R4. * 160 * Stack required = 3. * 161 * 1 + max ( CHECKNOINT (2), DMOTINDPAL (2), PFEMPTY (2) ) * 162 * * 163 ********************************************************************************** 164 165 BLOCK OVPPICKUP subroutine 166 ENTRY OVPPICKUP 167 168 BEGFRAME 169 ENDFRAME 170 03344 DD5F8001 6 STAK 171 OVPPICKUP ENTRNP PUSH 172 * Note: CHKWNDOS is called to remove any pages that might still 173 * be mapped into the windows. The system is slowly being 174 * fixed to not leave any mapped when we get here, but it's 175 * not 100% yet. 176 * It is redundant in many cases to call CHKWNDOS here, so we NOP 177 * and let the XREQRETURN code do it instead. 03345 FEC00000 178 NOP 0 leave room to patch in following instruction 179 * CALLNP CHKWNDOS check if windows are in VM list 03346 DC403165 180 CALLNP DMOTINDPAL move all indirect pages to WSX list 03347 DC4025A6 181 CALLNP PFEMPTY empty the page file 03348 60C7FFFF 3 IMM 182 LD R3 -1 for safety, flush all regenerable errors ... 03349 DC40343C 183 CALLNP CHECKNOINT ... from session (no leftovers) 0334A 5D1F8001 6 STAK 184 LEAVE POP return 185 * --- 186 187 END OVPPICKUP subroutine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 639 (PROCINOUT) F 36 Session ins and outs 189 190 ********************************************************************************** 191 * * 192 * OVPPUTDOWN * 193 * Over program put down. Passed to us is the address * 194 * of the new UPC. This routine sets up the variables needed * 195 * for the new program to run. * 196 * Call: * 197 * LD SP => stack * 198 * LD R0 => UPC block to load * 199 * LD R5 => PSA * 200 * CALLNP OVPPUTDOWN * 201 * * 202 * Eats R0:R3. * 203 * Stack required = 7 * 204 * 2 + max ( MOVETRMGX (5) ) * 205 * * 206 ********************************************************************************** 207 208 BLOCK OVPPUTDOWN subroutine 209 ENTRY OVPPUTDOWN 210 211 BEGFRAME 00178801 6 BASE 212 SAVER4 BSS 1 register save location 213 ENDFRAME 214 0334B DD5F8002 6 STAK 215 OVPPUTDOWN ENTRNP PUSH 0334C E4094116 0 5 ZBM 216 ST R0 R5,PSCURRPROC this one is now current 0334D E4000414 0 217 ST R0 CPCUPC save as current UPC for this CPU 0334E 60480610 1 0 ZBM 218 LD R1 R0,UPCNTLMODE get virtual control mode semaphore 0334F E4495214 1 5 ZBM 219 ST R1 R5,PSCNTLMODE and make non-virtual 03350 60895F10 2 5 ZBM 220 LD R2 R5,PSCACHN get the current console area pointer 03351 60481F12 1 0 ZBM 221 LD R1 R0,UPCCONSOLE ptr to one down 03352 E4495F11 1 5 ZBM 222 ST R1 R5,PSCACHNP1 store in PSA 03353 E456880C 1 2 BASE 223 ST R1 R2,CALINK fix CA links 03354 E5178801 4 6 BASE 224 ST TCB SP,SAVER4 save this register 03355 DC40337E 225 CALLNP MOVETRMGX shuffle TCG/TCS 03356 61178801 4 6 BASE 226 LD TCB SP,SAVER4 restore register 03357 5D1F8002 6 STAK 227 LEAVE POP return 228 * --- 229 230 END OVPPUTDOWN subroutine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 640 (PROCINOUT) F 36 Session ins and outs 232 233 ********************************************************************************** 234 * * 235 * RESETTCG. Install a TCG and TCA based on the currently * 236 * eligible trapper. Return a flag saying whether the * 237 * input buffer ought to be rescanned for terminators. This * 238 * is to ensure that the CIA driver has the right terminating * 239 * character group to scan the input stream for terminators. * 240 * The return flag is 0 if the change is trivial (i.e. * 241 * UPCTERMGRP=TCTERMGRP and they are 0 or 1), no-zero otherwise. * 242 * This is only required for the absolute I/O .TERM. * 243 * * 244 * Call: R4 => TCB (locked) * 245 * CALLNP RESETTCG * 246 * R0 0 -> no scan required * 247 * not 0 -> scan is appropriate * 248 * * 249 * Eats R0:R3. * 250 * Stack required = 1 * 251 * * 252 ********************************************************************************** 253 254 BLOCK RESETTCG subroutine 255 ENTRY RESETTCG 256 257 BEGFRAME 258 ENDFRAME 259 03358 DD5F8001 6 STAK 260 RESETTCG ENTRNP PUSH 03359 60800414 2 261 LD R2 CPCUPC get current program 0335A EDC91615 4 ZBM 262 STW TCB,TCINTTCG say for now there is trapper 0000335B 263 LOOKHERE LABEL 0335B 60089F12 0 2 ZBM 264 LD R0 R2,UPCCONSOLE => console area 0335C 5C16080A 0 BASE 265 CMZ R0,CAINTADR vector address set up? 0335D ED924000 1 REG 266 STLNE R1 save answer 0335E 7848101B 1 0 ZBM 267 AND R1 R0,CAINTMASK/BIT CAIMNETERM NE term enabled? 0335F 78489011 1 2 ZBM 268 AND R1 R2,UPCNETINTE ints on for console unit? 03360 FA4C3364 1 269 JNEZ R1 LOOKSGOOD if all, R2 is a likely candidate 270 271 * follow up chain of overprocesses 03361 60889F17 2 2 ZBM 272 LD R2 R2,UPCDADPTR else, get next UPC up 03362 FAB2335B 2 273 JNZA R2 LOOKHERE jump if someone to check 274 * \ / 275 276 * no more overprocesses means no one is trapping 03363 FE0E3366 277 JMP USECURRENT use CPCUPC 278 * --- 279 280 ********************************************************************************** 281 * * 282 * R2 points to a UPC that is set up for trapping. Use it * 283 * unless it is currently "holding off" (else use CPCUPC). * 284 * * 285 ********************************************************************************** 286 00003364 287 LOOKSGOOD LABEL 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 641 (PROCINOUT) F 36 Session ins and outs 03364 5C16080B 0 BASE 288 CMZ R0,CAINTMASK ints enabled? 03365 FE083368 289 JLT GOTUPC jump if so 290 * \ / 291 292 ********************************************************************************** 293 * * 294 * No one at or above CPCUPC is currently getting interrupts. Use * 295 * CPCUPC TCG/TCS, and indicate it is for reading (TCRDRTCG=1) and * 296 * not for trapping (TCINTTCG=0). * 297 * * 298 ********************************************************************************** 299 300 * \ / 00003366 301 USECURRENT LABEL 03366 60800414 2 302 LD R2 CPCUPC current process 03367 EC091615 4 ZBM 303 STZ TCB,TCINTTCG indicate no trappers 304 * \ / 305 306 * R2 => UPC to use for TCG/TCS 00003368 307 GOTUPC LABEL 03368 64800414 2 308 CPR R2 CPCUPC trapper also reader? 03369 EC491815 4 ZBM 309 STLEQ TCB,TCRDRTCG whether TCG matches reader's 0336A 60488041 1 2 ZBM 310 LD R1 R2,UPCTERMGRP get the current term group ptr 0336B EDCBC010 7 CBM 311 STW R7/BIT 0 say check is needed 0336C 6449083D 1 4 ZBM 312 CPR R1 TCB,TCTERMGRP old and new the same? 0336D FE0C3370 313 JNE DONECHECK jump if not 0336E 64440001 1 IMM 314 CPR R1 TCTERMGRP1 were they normal, too? 0336F EC8BC010 7 CBM 315 STLGT R7/BIT 0 remember answer 316 * \ / 317 318 * move TCG and TCS 00003370 319 DONECHECK LABEL 03370 E449083D 1 4 ZBM 320 ST R1 TCB,TCTERMGRP store new into the TCB 03371 60489011 1 2 ZBM 321 LD R1 R2,UPCNETINTE get unit term int enable bit 03372 E4491E18 1 4 ZBM 322 ST R1 TCB,TCINTE copy it into the TCB 03373 38168812 0 2 BASE 323 LEA R0 R2,UPCTERMA get address of UPC term array 03374 60440020 1 IMM 324 LD R1 (256/WORDLNTH)*CPW get size to move 03375 3897080F 2 4 BASE 325 LEA R2 TCB,TCTERMA get destination address in TCB 03376 FE400000 326 CMOVE move new term group into TCB 03377 600BC010 0 7 CBM 327 LD R0 R7/BIT 0 1 sez CALCTERMC is appropriate 03378 5D1F8001 6 STAK 328 LEAVE POP back to caller 329 * --- 330 331 END RESETTCG subroutine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 642 (PROCINOUT) F 36 Session ins and outs 333 334 ********************************************************************************** 335 * * 336 * MOVETRMGP. Reset the TCG and TCS in the given TCB, rescan * 337 * the input buffer for terminators if it is indicated. This is * 338 * only required for the absoute I/O .TERM. Leaves TCB locked on * 339 * return. * 340 * Call: * 341 * R4 => TCB (locked) * 342 * CALLNP MOVETRMGP * 343 * * 344 * Eats R0:R3. * 345 * Stack required = 3 * 346 * 1 + max ( CALCTERMC (2), RESETTCG (1) ) * 347 * * 348 ********************************************************************************** 349 350 BLOCK MOVETRMGP subroutine 351 ENTRY MOVETRMGP 352 353 BEGFRAME 354 ENDFRAME 355 03379 DD5F8001 6 STAK 356 MOVETRMGP ENTRNP PUSH 0337A DC403358 357 CALLNP RESETTCG install appropriate TCG/TCS 0337B FA02337D 0 358 JEQZ R0 JUSTGO jump if no scan required 0337C DC404CA6 359 CALLNP CALCTERMC find any terminators 0000337D 360 JUSTGO LABEL 0337D 5D1F8001 6 STAK 361 LEAVE POP return to caller 362 * --- 363 364 END MOVETRMGP subroutine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 643 (PROCINOUT) F 36 Session ins and outs 366 367 ********************************************************************************** 368 * * 369 * MOVETRMGX. Locate session's console terminal and call * 370 * MOVETRMGP on it. * 371 * * 372 * Call: CALLNP MOVETRMGX * 373 * R4 => TCB (unlocked) * 374 * * 375 * Eats R0:R2, R4. * 376 * Sets R4 * 377 * Stack required = 5 * 378 * 1 + max ( FINDTERMCB (1), LOCKWAIT (0), MOVETRMGP (3) ) * 379 * * 380 ********************************************************************************** 381 382 BLOCK MOVETRMGX subroutine 383 ENTRY MOVETRMGX 384 385 BEGFRAME 00178801 6 BASE 386 SAVER3 BSS 1 a safe spot 387 ENDFRAME 388 0337E DD5F8002 6 STAK 389 MOVETRMGX ENTRNP PUSH 0337F E4D78801 3 6 BASE 390 ST R3 SP,SAVER3 save a reg 03380 DC0035C5 391 CALL FINDTERMCB get TCB for console term 03381 40400412 392 PARVL CPPSA current session 03382 61124000 4 1 REG 393 LD TCB R1 put in a normal place 03383 FB30338B 4 394 JZA TCB NOMOVE jump if none such 395 PLOCK TCB,TCLOCK lock it 03384 0CC00000 395 IOFF 03385 D1D70818 4 BASE 395 SETT TCB,TCLOCK 03386 FE0C3388 395 JNE MA(2+DISPW MA 0) 03387 DC40308B 395 CALLNP LOCKWAIT 03388 DC403379 396 CALLNP MOVETRMGP shuffle TCG/TCS 397 PUNLOCK TCB,TCLOCK unlock it 03389 EC170818 4 BASE 397 STZ TCB,TCLOCK 0338A 0C800000 397 ION 0000338B 398 NOMOVE LABEL 0338B 60D78801 3 6 BASE 399 LD R3 SP,SAVER3 restore a reg 0338C 5D1F8002 6 STAK 400 LEAVE POP return to caller 401 * --- 402 403 END MOVETRMGX subroutine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 644 (PROCINOUT) F 36 Session ins and outs 405 406 ********************************************************************************** 407 * * 408 * OVPDESTROY. This routine takes an unlinked UPC block * 409 * pointed to by R3 and destroys it and its contents. The * 410 * console area is freed, the memory is freed, and the UPC * 411 * block itself is returned. Note that PALs in the VASP * 412 * list are gone but the working set extension list may not * 413 * be empty. * 414 * * 415 * LD R3 => UPC block * 416 * CALLNP OVPDESTROY * 417 * * 418 * Registers Used: R0:R3 * 419 * * 420 * Stack Required: 14 * 421 * 3 + max ( DISCARDPAL (4), DMOTINDPAL (2), FREEULB (11), * 422 * GRUBVPEL (7), SFREEMEM (0), TIMEKILL (2), * 423 * UFREEMEM (0), UPCFREEMEM (0) ) * 424 * * 425 ********************************************************************************** 426 427 BLOCK OVPDESTROY subroutine 428 ENTRY OVPDESTROY 429 430 BEGFRAME 00178801 6 BASE 431 OVPDSTRYPT BSS2 1 pointer to UPC element 00178802 6 BASE 432 OVPDSTRYSV EQU OVPDSTRYPT(1) place to save R4 433 ENDFRAME 434 0338D DD5F8003 6 STAK 435 OVPDESTROY ENTRNP PUSH 0338E E6D78801 346 BASE 436 ST2 R3 SP,OVPDSTRYPT save pointer and R4 0338F 6116C811 4 3 BASE 437 LD R4 R3,UPCTIMESER get serial number of time interrupt 03390 FB303393 4 438 JZA R4 NOUPCTIME jump if none 03391 DC404517 439 CALLNP TIMEKILL kill the time interrupt 03392 FEC00000 440 NOP 0 not found return 00003393 441 NOUPCTIME LABEL 03393 61178801 4 6 BASE 442 LD R4 SP,OVPDSTRYPT R4 -> our UPC block 443 444 * dump user error list 00003394 445 OVPDRUERLP LABEL 03394 6057080B 1 4 BASE 446 LD R1 R4,UPCUERROR first UPC UER element 03395 FA70339C 1 447 JZA R1 OVPDRVMLP jump if no such 03396 60885F10 2 1 ZBM 448 LD R2 R1,UERLINK get next one 03397 E497080B 2 4 BASE 449 ST R2 R4,UPCUERROR save it 03398 DC002F5D 450 CALL UFREEMEM dump it 03399 41440001 IMM 451 PARV UERLOG size 0339A 40524000 1 REG 452 PARVL R1 address 0339B FE0E3394 453 JMP OVPDRUERLP try more 454 * --- 455 0000339C 456 OVPDRVMLP LABEL 0339C 6097080D 2 4 BASE 457 LD R2 R4,UPCVMLIST get an element from list 0339D FAB033A2 2 458 JZA R2 OVPDRWVMLP jump if none 0339E 60089F10 0 2 ZBM 459 LD R0 R2,VPLINK get pointer to next element in list 0339F E417080D 0 4 BASE 460 ST R0 R4,UPCVMLIST unlink this VP element 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 645 (PROCINOUT) F 36 Session ins and outs 033A0 DC4030D7 461 CALLNP GRUBVPEL release the use of the page 033A1 FE0E339C 462 JMP OVPDRVMLP try for another element 463 * --- 464 000033A2 465 OVPDRWVMLP LABEL 033A2 6097080E 2 4 BASE 466 LD R2 R4,UPCWVMLIST get an element from list 033A3 FAB033A8 2 467 JZA R2 OVPDRVMDN jump if none 033A4 60089F10 0 2 ZBM 468 LD R0 R2,VPLINK get pointer to next element in list 033A5 E417080E 0 4 BASE 469 ST R0 R4,UPCWVMLIST unlink this VP element 033A6 DC4030D7 470 CALLNP GRUBVPEL release the use of the page 033A7 FE0E33A2 471 JMP OVPDRWVMLP try for another element 472 * --- 473 000033A8 474 OVPDRVMDN LABEL 033A8 5C17080F 4 BASE 475 CMZ R4,UPCVASP check the VASP list 033A9 FE0233AB 476 JEQ OVVASPDN jump if VASP list is empty 033AA 001300D1 477 HALT HALTS00D1 UPCs VASP not empty after cleaning VMLIST 478 * --- 479 000033AB 480 OVVASPDN LABEL 000033AB 481 OVWSXLIST LABEL 033AB 60D78801 3 6 BASE 482 LD R3 SP,OVPDSTRYPT get pointer to UPC block 033AC 6116C810 4 3 BASE 483 LD PAL R3,UPCWSX get pointer to WSX list 033AD FB3033B4 4 484 JZA PAL OVWSXDN jump if WSX list empty 033AE 60091F10 0 4 ZBM 485 LD R0 PAL,PALINK get link to next element 033AF E416C810 0 3 BASE 486 ST R0 R3,UPCWSX remove element from list 033B0 DC402E15 487 CALLNP DISCARDPAL release PAL 033B1 60800412 2 488 LD R2 CPPSA get PSA pointer 033B2 D04880F2 2 ZBM 489 DEC R2,PSWSSIZE decrement working set size 033B3 FE0E33AB 490 JMP OVWSXLIST loop through WSX list 491 * --- 492 000033B4 493 OVWSXDN LABEL 033B4 61178801 4 6 BASE 494 LD R4 SP,OVPDSTRYPT R4 -> UPC block 033B5 DC002F5D 495 CALL SFREEMEM return the console area 033B6 41440004 IMM 496 PARV CALOG indicate its length 033B7 40491F12 4 ZBM 497 PARVL R4,UPCCONSOLE and location 033B8 61178801 4 6 BASE 498 LD ULB SP,OVPDSTRYPT fetch up the pointer 033B9 61091F13 4 4 ZBM 499 LD ULB ULB,UPCPRIVULB get the ptr of privileges 033BA DC405526 500 CALLNP FREEULB and release this one 033BB 61178801 4 6 BASE 501 LD R4 SP,OVPDSTRYPT and pick up the pointer again 033BC DC002F8F 502 CALL UPCFREEMEM release the UPC block 033BD 41440005 IMM 503 PARV UPCLOG indicate the length 033BE 40530000 4 REG 504 PARVL R4 and location 033BF DC403165 505 CALLNP DMOTINDPAL move all indirect pages to WSX list 033C0 61178802 4 6 BASE 506 LD R4 SP,OVPDSTRYSV restore R4 033C1 5D1F8003 6 STAK 507 LEAVE POP return 508 * --- 509 510 END OVPDESTROY subroutine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 646 (PROCINOUT) F 36 Session ins and outs 512 513 BLOCK Interrupt Checkers 514 ENTRY CHECKUINT 515 ENTRY CHECKEVENT 516 ENTRY CHECKNOINT 517 518 ********************************************************************************** 519 * * 520 * CHECKUINT. This routine checks the selected user interrupts and * 521 * if the device dependent ones are enabled it searches for the device * 522 * and sees if an interrupt is supposed to happen now. Normally devices * 523 * post their interrupts but they might not get posted for a particular * 524 * program if it is moving in and out of a debugger or a file system * 525 * handler or if the interrupt enable bits are just being turned on or * 526 * off. * 527 * Call: * 528 * * 529 * CPPSA => this CPUs pointer to current PSA * 530 * CPCUPC => this CPUs pointer to current UPC * 531 * R3 = mask of ints to check * 532 * CALLNP CHECKUINT * 533 * * 534 * Eats R0:R3. * 535 * Stack required = 5 * 536 * 2 + max ( FINDPATH (1), FINDTERM (1), GETTRAPPER (3), * 537 * UERRSET (1) ) * 538 * * 539 ********************************************************************************** 540 541 BLOCK CHECKUINT and CHECKEVENT subroutines 542 ENTRY CHECKUINT 543 ENTRY CHECKEVENT 544 545 BEGFRAME 00178801 6 BASE 546 CHKINTF BSS 1 save for the interrupt mask 547 ENDFRAME 548 00000010 BYTE 549 NOPOST EQU BIT 0 bit in R7 saying to not post int 550 033C2 DD5F8002 6 STAK 551 CHECKUINT ENTRNP PUSH 033C3 EC0BC010 7 CBM 552 STZ R7/NOPOST we are to post the interrupt 000033C4 553 CHKUINTSHR LABEL 033C4 E4D78801 3 6 BASE 554 ST R3 SP,CHKINTF save the int mask 033C5 F2D033D5 3 555 JBF R3/BIT CAIMNETERM NOTNETERM2 jump if not waiting for term 556 557 ********************************************************************************** 558 * * 559 * Search for non-empty terminals. We avoid the potentially * 560 * lengthy GETTRAPPER when FCABSIO = 1, since this FCB's * 561 * TCB already told us enough to know that someone is trapping * 562 * (TCINTTCG=1 on FCABSIO means someone's CAINTADR <> 0, and * 563 * CAINTMASK bit 0 = 1, bit CAIMNETERM = 1). * 564 * * 565 ********************************************************************************** 566 033C6 60C00412 3 567 LD R3 CPPSA get session 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 647 (PROCINOUT) F 36 Session ins and outs 033C7 38C8DF17 3 3 ZBM 568 LEA R3 R3,PSFCBLIST => unit list head 000033C8 569 TERMSCAN LABEL 033C8 DC403416 570 CALLNP FINDTERM try our luck! 033C9 FAF033D4 3 571 JZA R3 NOTNETERM1 jump if none 033CA F7C03402 7 572 JBT R7/NOPOST TERMPOST jump if not giving int 573 * \ / 574 033CB 5C08E015 3 ZBM 575 CMZ R3,FCABSIO is it the main thing? 033CC FE0C33D2 576 JNE POSTNETERM jump if so 033CD 60800414 2 577 LD R2 CPCUPC pass starting UPC 033CE DC002AB3 578 CALL GETTRAPPER see if anyone cares 033CF 41440022 IMM 579 PARV UINTNETERM pass int code 033D0 4052C000 3 REG 580 PARVL R3 pass int subcode 033D1 FE0E33C8 581 JMP TERMSCAN jump if no one cares 582 * \ / 583 584 * found someone, R3 => FCB 000033D2 585 POSTNETERM LABEL 033D2 60840022 2 IMM 586 LD R2 UINTNETERM code for int 033D3 DC403589 587 CALLNP UERRSET post the error 588 * \ / 589 590 ********************************************************************************** 591 * * 592 * Search for readable paths, starting with the local units. * 593 * * 594 ********************************************************************************** 595 596 * \ / 000033D4 597 NOTNETERM1 LABEL 033D4 60D78801 3 6 BASE 598 LD R3 SP,CHKINTF restore the int mask 000033D5 599 NOTNETERM2 LABEL 033D5 F2D233E3 3 600 JBF R3/BIT CAIMNEPATH NOTNEPATH2 jump if not doing PATH ints 601 * \ / 602 033D6 60C00412 3 603 LD R3 CPPSA get session 033D7 38C8DF17 3 3 ZBM 604 LEA R3 R3,PSFCBLIST => unit list head 000033D8 605 PATHSCAN LABEL 033D8 DC403427 606 CALLNP FINDPATH try our luck! 033D9 FAF033E2 3 607 JZA R3 NOTNEPATH1 jump if none 033DA F7C03405 7 608 JBT R7/NOPOST PATHPOST just checking? 609 * \ / 610 033DB 60800414 2 611 LD R2 CPCUPC pass starting UPC 033DC DC002AB3 612 CALL GETTRAPPER see if anyone cares 033DD 41440023 IMM 613 PARV UINTNEPATH pass int code 033DE 4052C000 3 REG 614 PARVL R3 pass int subcode 033DF FE0E33D8 615 JMP PATHSCAN jump if no one cares 616 * \ / 617 618 * found someone, R3 => FCB 033E0 60840023 2 IMM 619 LD R2 UINTNEPATH code for int 033E1 DC403589 620 CALLNP UERRSET post the error 621 * \ / 622 623 ********************************************************************************** 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 648 (PROCINOUT) F 36 Session ins and outs 624 * * 625 * Check to see if there are any messages pending for this user. * 626 * * 627 ********************************************************************************** 628 629 * \ / 000033E2 630 NOTNEPATH1 LABEL 033E2 60D78801 3 6 BASE 631 LD R3 SP,CHKINTF restore the interrupt mask 000033E3 632 NOTNEPATH2 LABEL 033E3 F2D633EC 3 633 JBF R3/BIT CAIMMSG NOTMSG jump if message ints not happening 033E4 60800412 2 634 LD R2 CPPSA fetch our current PSA address 033E5 6016881A 0 2 BASE 635 LD R0 R2,PSMSGLIST R0=>root of message list 033E6 FA3033EC 0 636 JZA R0 NOTMSG jump if no messages pending 033E7 60840026 2 IMM 637 LD R2 UINTMSG code for message int 033E8 60C82101 3 0 ZBM 638 LD R3 R0,MQECLASS param is class of message 033E9 F7C0340B 7 639 JBT R7/NOPOST MSGPOST jump if to not post, just return 033EA DC403589 640 CALLNP UERRSET post the error in the program 033EB 60D78801 3 6 BASE 641 LD R3 SP,CHKINTF restore the mask 642 * \ / 643 644 ********************************************************************************** 645 * * 646 * Check to see if there are any gift units waiting. * 647 * * 648 ********************************************************************************** 649 650 * \ / 000033EC 651 NOTMSG LABEL 033EC F2DC33F5 3 652 JBF R3/BIT CAIMGUNIT NOTUNIT jump if unit interrupts not enabled 033ED 60800412 2 653 LD R2 CPPSA fetch our current PSA address 033EE 60168809 0 2 BASE 654 LD R0 R2,PSGIFTUNIT get pointer to list of them 033EF FA3033F5 0 655 JZA R0 NOTUNIT jump if none here 033F0 60840028 2 IMM 656 LD R2 UINTGUNIT post a unit given interrupt 033F1 60D6080E 3 0 BASE 657 LD R3 R0,FCJCXH giver's session number is parameter 033F2 F7C0340E 7 658 JBT R7/NOPOST UNITPOST jump if not to post it 033F3 DC403589 659 CALLNP UERRSET post the unit given interrupt 033F4 60D78801 3 6 BASE 660 LD R3 SP,CHKINTF restore mask 661 * \ / 662 663 ********************************************************************************** 664 * * 665 * Check to see if a time interrupt should be given to this process. * 666 * * 667 ********************************************************************************** 668 669 * \ / 000033F5 670 NOTUNIT LABEL 033F5 F2D43400 3 671 JBF R3/BIT CAIMTIME NOTTIME jump if time ints not enabled 033F6 60800414 2 672 LD R2 CPCUPC get pointer to current UPC 033F7 6016880C 0 2 BASE 673 LD R0 R2,UPCINTTIME get the time for the interrupt 033F8 FA023400 0 674 JEQZ R0 NOTTIME jump if time not set 033F9 10001EE6 0 675 SUB R0 FDATE(1) R0 = (interrupt time) - (current time) 033FA FA043400 0 676 JGTZ R0 NOTTIME jump if not time yet 033FB EC16880C 2 BASE 677 STZ R2,UPCINTTIME allow no more ints for this 033FC 60840025 2 IMM 678 LD R2 UINTTIMINT post a time interrupt 033FD 60C40000 3 IMM 679 LD R3 0 no parameter 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 649 (PROCINOUT) F 36 Session ins and outs 033FE F7C03408 7 680 JBT R7/NOPOST TIMEPOST jump if not to post the interrupt 033FF DC403589 681 CALLNP UERRSET post the time interrupt 682 * \ / 683 00003400 684 NOTTIME LABEL 03400 60040000 0 IMM 685 LD R0 0 zero return for CHECKEVENT 00003401 686 BYE LABEL 03401 5D1F8002 6 STAK 687 LEAVE POP return 688 * --- 689 690 * Terminal event to happen 00003402 691 TERMPOST LABEL 03402 60840022 2 IMM 692 LD R2 UINTNETERM code for int 03403 60020100 0 IMM 693 LD R0 1*BIT CAIMNETERM R0 = int mask bit for the event 03404 FE0E3401 694 JMP BYE exit 695 * --- 696 697 * PATH event to happen 00003405 698 PATHPOST LABEL 03405 60840023 2 IMM 699 LD R2 UINTNEPATH code for int 03406 60020080 0 IMM 700 LD R0 1*BIT CAIMNEPATH R0 = int mask bit for the event 03407 FE0E3401 701 JMP BYE exit 702 * --- 703 704 * Time event to happen 00003408 705 TIMEPOST LABEL 03408 60840025 2 IMM 706 LD R2 UINTTIMINT code for int 03409 60020040 0 IMM 707 LD R0 1*BIT CAIMTIME R0 = int mask bit for the event 0340A FE0E3401 708 JMP BYE exit 709 * --- 710 711 * Message event to happen 0000340B 712 MSGPOST LABEL 0340B 60840026 2 IMM 713 LD R2 UINTMSG code for int 0340C 60020020 0 IMM 714 LD R0 1*BIT CAIMMSG R0 = int mask bit for the event 0340D FE0E3401 715 JMP BYE exit 716 * --- 717 718 * Unit received event to happen 0000340E 719 UNITPOST LABEL 0340E 60840028 2 IMM 720 LD R2 UINTGUNIT code for int 0340F 60020004 0 IMM 721 LD R0 1*BIT CAIMGUNIT R0 = int mask bit for the event 03410 FE0E3401 722 JMP BYE exit 723 * --- 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 650 (PROCINOUT) F 36 Session ins and outs 725 726 ********************************************************************************** 727 * * 728 * CHECKEVENT. Routine that examines the events specified in the * 729 * passed mask word and returns information on whether any of these * 730 * events are ready to happen and, if so, where. Call is: * 731 * * 732 * SP => stack top * 733 * CALL CHECKEVENT * 734 * PARVL CA interrupt mask bits for events * 735 * ST R0 int mask corresponding to found event (zero if none) * 736 * ST R2 int code to be given * 737 * ST R3 parameter for int code * 738 * * 739 * Eats R0:R3. * 740 * Stack required = 5, See CHECKUINT. * 741 * * 742 ********************************************************************************** 743 03411 DD1F8002 6 STAK 744 CHECKEVENT ENTR PUSH 03412 C052C000 3 REG 745 STPVL R3 R3 = events to check 03413 EDCBC010 7 CBM 746 STW R7/NOPOST don't give the ints -- tell me 03414 60800412 2 747 LD R2 CPPSA session 03415 FE0E33C4 748 JMP CHKUINTSHR share the looker code 749 * --- 750 751 END CHECKUINT and CHECKEVENT routines 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 651 (PROCINOUT) F 36 Session ins and outs 753 754 ********************************************************************************** 755 * * 756 * FINDTERM. This routine locates the first terminal unit on the * 757 * specified FCB list for which an interrupt is pending. It * 758 * checks that the TCB has interrupts enabled and that it indi- * 759 * cates the presence of a complete record. This does not mean * 760 * that anyone is actually trapping it, though, if the unit is * 761 * not the absolute input. * 762 * * 763 * Call: R3 => FCB list head pointer * 764 * CALLNP FINDTERM * 765 * * 766 * * 767 * Sets R3 => FCB for NE terminal or 0 * 768 * Eats R0:R1 * 769 * Stack usage: 1 * 770 * * 771 ********************************************************************************** 772 773 BLOCK FINDTERM 774 ENTRY FINDTERM 775 776 BEGFRAME 777 ENDFRAME 778 03416 DD5F8001 6 STAK 779 FINDTERM ENTRNP PUSH 03417 60440007 1 IMM 780 LD R1 HTYPETERM get type code for terminal 00003418 781 NEXTFCB LABEL 03418 FAF43426 3 782 LJZA R3 ALLOVER get first FCB, jump if none 03419 3C48E665 1 3 ZBM 783 LSRCH R1 R3,FCHTYPE find a terminal 0341A FE0C3426 784 JNE ALLOVER jump if no terminals 0341B 60040007 0 IMM 785 LD R0 FSACSNDA code for unwanted access 0341C 6408D835 0 3 ZBM 786 CPR R0 R3,FCACCESS must have access to terminal 0341D FE023418 787 JEQ NEXTFCB jump if not, loop 0341E 6008DF16 0 3 ZBM 788 LD R0 R3,FCDCBPTR get the TCB 789 * \ / 790 791 * R0 => TCB (maybe) 0341F FA303418 0 792 JZA R0 NEXTFCB jump if fake terminal 03420 5C16080E 0 BASE 793 CMZ R0,TCTERMLOC record here? 03421 FE023418 794 JEQ NEXTFCB jump if not, loop 03422 5C081E18 0 ZBM 795 CMZ R0,TCINTE interrupts enabled? 03423 FE023418 796 JEQ NEXTFCB jump if not, loop 03424 5C081615 0 ZBM 797 CMZ R0,TCINTTCG TCG/TCS for a trapper? 03425 FE023418 798 JEQ NEXTFCB if so, success! 799 * \ / 800 00003426 801 ALLOVER LABEL 03426 5D1F8001 6 STAK 802 LEAVE POP return 803 * --- 804 805 END FINDTERM subroutine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 652 (PROCINOUT) F 36 Session ins and outs 807 808 ********************************************************************************** 809 * * 810 * FINDPATH. This routine locates the first path logical unit for * 811 * which an interrupt is pending for the current session. FINDPATH * 812 * checks that the current session is the reader of the path, that * 813 * interrupts are enabled on the path, and that the path is non-empty. * 814 * Note that if the list is empty the content of R0 is left unchanged * 815 * (i.e. the non-address part is not cleared). * 816 * * 817 * Call: R3 => FCB list head pointer * 818 * CALLNP FINDPATH * 819 * * 820 * * 821 * Sets R3 => FCB for NE path or 0 * 822 * Eats R0:R2 * 823 * Stack usage: 1 * 824 * * 825 ********************************************************************************** 826 827 BLOCK FINDPATH subroutine 828 ENTRY FINDPATH 829 830 BEGFRAME 831 ENDFRAME 832 03427 DD5F8001 6 STAK 833 FINDPATH ENTRNP PUSH 03428 60800412 2 834 LD R2 CPPSA get the current session 03429 60889F12 2 2 ZBM 835 LD R2 R2,PSPROCCB get its PCB 836 0342A 60440004 1 IMM 837 LD R1 HTYPEPATH get type code for path 0000342B 838 NEXTFCB LABEL 0342B FAF4343B 3 839 LJZA R3 ALLOVER get first FCB, jump if none 0342C 3C48E665 1 3 ZBM 840 LSRCH R1 R3,FCHTYPE find a path 0342D FE0C343B 841 JNE ALLOVER jump if no paths 0342E 6008DF16 0 3 ZBM 842 LD R0 R3,FCDCBPTR get the control block 843 * \ / 844 845 * R0 => path control block 0342F 64880112 2 0 ZBM 846 CPR R2 R0,PTHREADER are we the reader? 03430 FE0C342B 847 JNE NEXTFCB jump if we can't get int 03431 5C08DC15 3 ZBM 848 CMZ R3,FCACCESS/FSACSNWB is this the reading unit? 03432 FE02342B 849 JEQ NEXTFCB jump if we can't read from here 03433 5C080411 0 ZBM 850 CMZ R0,PTHINTE are ints enabled? 03434 FE02342B 851 JEQ NEXTFCB jump if we can't get int 03435 5C081F11 0 ZBM 852 CMZ R0,PTHQUE record here? 03436 FE0C343B 853 JNE ALLOVER success! 03437 5C080211 0 ZBM 854 CMZ R0,PTHUSED has the PATH ever been used 03438 FE02342B 855 JEQ NEXTFCB jump if not 03439 5C160806 0 BASE 856 CMZ R0,PTHWRTRS are there any writer left 0343A FE0C342B 857 JNE NEXTFCB if not, need to give EOD interrupt 858 * \ / 859 0000343B 860 ALLOVER LABEL 0343B 5D1F8001 6 STAK 861 LEAVE POP return 862 * --- 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 653 (PROCINOUT) F 36 Session ins and outs 863 864 END FINDPATH subroutine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 654 (PROCINOUT) F 36 Session ins and outs 866 867 ********************************************************************************** 868 * * 869 * CHECKNOINT. This routine REMOVES elements from the * 870 * users error lists for interrupts whose bit are ON in the * 871 * given mask (same format as CAINTMASK). We actually only * 872 * check a selected few: i.e. "errors" that are actually * 873 * event notifications that can be regenerated by a call to * 874 * CHECKUINT. * 875 * * 876 * Call: LD SP => top of stack * 877 * LD R3 bit mask for ints to check * 878 * CALLNP CHECKNOINT * 879 * * 880 * Eats R0:R2. * 881 * Stack required = 2 * 882 * 1 + max ( ELSRCHER (1), LOCKWAIT (0) ) * 883 * * 884 ********************************************************************************** 885 886 BLOCK CHECKNOINT subroutine 887 ENTRY CHECKNOINT 888 889 BEGFRAME 890 ENDFRAME 891 0343C DD5F8001 6 STAK 892 CHECKNOINT ENTRNP PUSH 0343D 60800412 2 893 LD R2 CPPSA get the current PSA pointer 894 PLOCK R2,PSLOCK get access to the PSA 0343E 0CC00000 894 IOFF 0343F D1D6880C 2 BASE 894 SETT R2,PSLOCK 03440 FE0C3442 894 JNE MA(2+DISPW MA 0) 03441 DC40308B 894 CALLNP LOCKWAIT 03442 5C089F1D 2 ZBM 895 CMZ R2,PSUERROR/FLDADRS check for any errors in list 03443 FE023454 896 JEQ EMPTYERLIS jump if empty 897 * \ / 898 899 * Non-empty .PATH 03444 F2D23447 3 900 JBF R3/BIT CAIMNEPATH NOTPATH jump if to leave non-empty path 03445 60040023 0 IMM 901 LD R0 UINTNEPATH get user interrupt code for non-empty path 03446 DC4034F6 902 CALLNP ELSRCHER find and remove any such interrupt 00003447 903 NOTPATH LABEL 904 * \ / 905 906 * Non-empty .TERM 03447 F2D0344A 3 907 JBF R3/BIT CAIMNETERM NOTTERM jump if to leave non-empty terminal 03448 60040022 0 IMM 908 LD R0 UINTNETERM get user interrupt code for terminal input 03449 DC4034F6 909 CALLNP ELSRCHER find and remove any such interrupt 0000344A 910 NOTTERM LABEL 911 * \ / 912 913 * Intersession messages 0344A F2D6344D 3 914 JBF R3/BIT CAIMMSG NOTMSG jump if to leave message interrupt 0344B 60040026 0 IMM 915 LD R0 UINTMSG get user interrupt code for message receipt 0344C DC4034F6 916 CALLNP ELSRCHER find and remove any such interrupt 0000344D 917 NOTMSG LABEL 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 655 (PROCINOUT) F 36 Session ins and outs 918 * \ / 919 920 * Logical unit transfer 0344D F2DC3450 3 921 JBF R3/BIT CAIMGUNIT NOTUNIT jump if to leave unit interrupts 0344E 60040028 0 IMM 922 LD R0 UINTGUNIT get user interrupt code for unit receipt 0344F DC4034F6 923 CALLNP ELSRCHER find and remove any such interrupt 00003450 924 NOTUNIT LABEL 925 * \ / 926 927 * Timer interrupts 03450 F2D43453 3 928 JBF R3/BIT CAIMTIME NOTTIME jump if to leave timer interrupt 03451 60040025 0 IMM 929 LD R0 UINTTIMINT get user interrupt code for timer up 03452 DC4034F6 930 CALLNP ELSRCHER find and remove any such interrupt 00003453 931 NOTTIME LABEL 932 933 * All done, re-allow access to PSA 03453 60800412 2 934 LD R2 CPPSA get the current PSA pointer 00003454 935 EMPTYERLIS LABEL 936 PUNLOCK R2,PSLOCK release PSA for others 03454 EC16880C 2 BASE 936 STZ R2,PSLOCK 03455 0C800000 936 ION 03456 5D1F8001 6 STAK 937 LEAVE POP return 938 * --- 939 940 END CHECKNOINT subroutine 941 942 END Interrupt Checkers 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 656 (PROCINOUT) F 36 Session ins and outs 944 945 ********************************************************************************** 946 * * 947 * GIVEUINT. This routine shuffles through the tables of the * 948 * mentioned session to decode how to inform him of the requested event. * 949 * The events so posted are non-empty terminal, non-empty path, and * 950 * clock advance. In general, if the session is waiting on the event * 951 * then that session is set going. If he is timing and waiting for that * 952 * event, then the timing is completed and he is told of the event. If * 953 * those aren't satisfied, then if the event interrupt is enabled then * 954 * the interrupt is posted. If all that fails, the event is lost. * 955 * Call for this routine is: * 956 * * 957 * SP => stack top * 958 * CALL GIVEUINT * 959 * PARV pointer to PCB who gets the event * 960 * PARV[2] value of PCQPARM if he is waiting for event * 961 * PARV[2] mask for PCQPARM before comparing with value above * 962 * PARV queue number that session is in if waiting for event * 963 * PARV interrupt enable bit (like CAINTMASK) * 964 * PARV device interrupt enable bit (e.g., TCINTE) * 965 * PARV interrupt code (e.g., UINTBREAK) * 966 * PARVL interrupt sub code (e.g., unit number) * 967 * * 968 * Eats R0:R3 before passing parms. * 969 * Stack required = 8 * 970 * 4 + max ( CHKINTCODE (4), GETTRAPPER (3), LOCKWAIT (0), * 971 * MAPINMEM (3), SETRUNNING (2), UERRSETY (1) ) * 972 * * 973 * INTERNAL NOTES: * 974 * This routine does a bunch of stuff while fetching parms, * 975 * in an attempt not to use a huge amount of stack space. The * 976 * thing to remember is that before doing a STPV, the value of * 977 * the parameter is in R0 (or R0R1 if double-word). "STPV R0" * 978 * will put the old parm (or garbage if R0 has been modified) * 979 * into R0, then get the next parm, leaving it in R0. * 980 * * 981 ********************************************************************************** 982 983 BLOCK GIVEUINT subroutine 984 ENTRY GIVEUINT 985 986 BEGFRAME 00098011 6 ZBM 987 WAITING BSSB 1 session is waiting for event 00098211 6 ZBM 988 INTENABLE BSSB 1 device interrupt enable flag 00178005 6 CACH 989 INTCODE BSSC 1 interrupt code 00178802 6 BASE 990 INTSUBCODE BSS 1 interrupt subcode 00178803 6 BASE 991 INTMASK BSS 1 mask bit for enabling interrupt 992 ENDFRAME 993 03457 DD1F8004 6 STAK 994 GIVEUINT ENTR PUSH 03458 60CA1F10 3 0 CBM 995 LD R3 R0/FLDADRS R3 -> PCB (first parm) 03459 FAF034E2 3 996 JZA R3 NOPCB jump if no session 0345A 6088DF13 2 3 ZBM 997 LD R2 R3,PCPSADRS R2 -> PSA address 998 PLOCK R2,EVENTLOCK to coordinate with URDELAY 0345B 0CC00000 998 IOFF 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 657 (PROCINOUT) F 36 Session ins and outs 0345C D1D68808 2 BASE 998 SETT R2,EVENTLOCK 0345D FE0C345F 998 JNE MA(2+DISPW MA 0) 0345E DC40308B 998 CALLNP LOCKWAIT 999 * \ / 1000 * Find the queue that this session is in, and lock it 1001 * so that things don't change out from under us. 1002 * \ / 0000345F 1003 LOCKQUEUE LABEL 0345F 6088D260 2 3 ZBM 1004 LD R2 R3,PCQUEUE get current queue number 1005 PLOCK SQLOCKS(R2) lock that queue 03460 0CC00000 1005 IOFF 03461 D1E41DBA 2 1005 SETT SQLOCKS(R2) 03462 FE0C3464 1005 JNE MA(2+DISPW MA 0) 03463 DC40308B 1005 CALLNP LOCKWAIT 03464 38241DA9 0 2 1006 LEA R0 SQBEGIN(R2) R0 -> queue header 03465 3CC81F10 3 0 ZBM 1007 LSRCH R3 R0,PCQLINK find our predecessor 03466 FE02346E 1008 JEQ GOTQUEUE jump if we are in this queue 1009 PUNLOCK SQLOCKS(R2) else we moved, so try again 03467 EC241DBA 2 1009 STZ SQLOCKS(R2) 03468 0C800000 1009 ION 1010 * \ / 1011 1012 ********************************************************************************** 1013 * * 1014 * We come through here if we could not find the session in * 1015 * the queue that he said that he was in. * 1016 * This means that another CPU is actively messing with this session. * 1017 * We will therefore loop around and try again. But first, we must * 1018 * waste a little bit of time, so that there will be enough time between * 1019 * the PUNLOCK above and the PLOCK that we are about to do. The other * 1020 * guy is probably spinning on that lock waiting for us to let it go, * 1021 * but if we re-grab it very quickly he might never notice that we had * 1022 * let the lock go. (Yes, Virginia, this can happen. It DID happen * 1023 * in version A8103.) * 1024 * * 1025 * System debuggers take note: An endless loop here means that * 1026 * someone has a pointer that is not a real PCB pointer or that the * 1027 * PCB is not present in the queue that PCQUEUE indicates. * 1028 * Look for list screwups. * 1029 * * 1030 ********************************************************************************** 1031 1032 * \ / 03469 60440002 1 IMM 1033 LD R1 2 index for two trips through LOCKWAIT 0346A 10440001 1 IMM 1034 SUB R1 1 decrement counter 0346B FA48345F 1 1035 JLTZ R1 LOCKQUEUE jump if wait is done 0346C 0CC00000 1036 IOFF (undone by LOCKWAIT) 0346D DC40308B 1037 CALLNP LOCKWAIT waste some time, returns to "SUB R1" above 1038 * --- 1039 0000346E 1040 GOTQUEUE LABEL 0346E C1520000 0 REG 1041 STPV R0 consume parm -- next is value for PCQPARM 0346F F3CC3476 7 1042 JBF R7/STPDUBL NOTDUBL jump if single-word parm 03470 C3578801 6 BASE 1043 STPV2 SP,1 save double-word value, set up next parm 03471 7A16C801 013 BASE 1044 AND2 R0 R3,PCQPARM mask the actual PCQPARM value 03472 66178801 016 BASE 1045 CPR2 R0 SP,1 compare against expected value 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 658 (PROCINOUT) F 36 Session ins and outs 03473 EC498011 6 ZBM 1046 STLEQ SP,WAITING remember whether it matches 03474 C3520000 0 REG 1047 STPV2 R0 consume parm - get next (queue number) 03475 FE0E347B 1048 JMP AFTERMASK 1049 * --- 1050 00003476 1051 NOTDUBL LABEL 03476 C1578801 6 BASE 1052 STPV SP,1 save value, get next parm (mask) 03477 7816C801 0 3 BASE 1053 AND R0 R3,PCQPARM mask the actual PCQPARM value 03478 64178801 0 6 BASE 1054 CPR R0 SP,1 does it match? 03479 EC498011 6 ZBM 1055 STLEQ SP,WAITING remember our answer 0347A C1520000 0 REG 1056 STPV R0 consume parm - get next (queue number) 1057 * \ / 1058 0000347B 1059 AFTERMASK LABEL 0347B 6408D260 0 3 ZBM 1060 CPR R0 R3,PCQUEUE are we in right queue to be waiting? 0347C EC520000 0 REG 1061 STLEQ R0 R0 = 1 if yes, 0 if no 0347D F8098011 0 6 ZBM 1062 ANDM R0 SP,WAITING if not, can't be waiting for event 0347E C1520000 0 REG 1063 STPV R0 consume queue number 1064 0347F C1578803 6 BASE 1065 STPV SP,INTMASK save interrupt mask 03480 C1498211 6 ZBM 1066 STPV SP,INTENABLE save device interrupt enable bit 03481 C1578005 6 CACH 1067 STPV SP,INTCODE save interrupt code 03482 C0578802 6 BASE 1068 STPVL SP,INTSUBCODE save interrupt subcode 1069 03483 5C098011 6 ZBM 1070 CMZ SP,WAITING is he waiting for the event? 03484 FE0C34CF 1071 JNE UNLKFIRST if so, just make him run 03485 6008D260 0 3 ZBM 1072 LD R0 R3,PCQUEUE get his queue number 03486 6404000E 0 IMM 1073 CPR R0 NQTIMEWAIT is he in timewait? 03487 FE0C34A1 1074 JNE NOTTIMEWT jump if not 03488 6016C801 0 3 BASE 1075 LD R0 R3,PCQPARM get events he's waiting for 03489 78178803 0 6 BASE 1076 AND R0 SP,INTMASK is he waiting for us? 0348A FA0234A1 0 1077 JEQZ R0 NOTTIMEWT jump if not 1078 * \ / 1079 * The session is in a time wait that is satisfyable by 1080 * this event. Put the interrupt codes into his registers 1081 * and make him run. 1082 * \ / 0348B 6088DF13 2 3 ZBM 1083 LD R2 R3,PCPSADRS R2 -> PSA 1084 PUNLOCK R2,EVENTLOCK release lock 0348C EC168808 2 BASE 1084 STZ R2,EVENTLOCK 0348D 0C800000 1084 ION 0348E DC0025EB 1085 CALL MAPINMEM map in this guys virtual monitor memory 0348F 40528000 2 REG 1086 PARVL R2 pointer to the PSA 03490 60889F10 2 2 ZBM 1087 LD R2 R2,PSCACHN R2 -> his console area 03491 60178005 0 6 CACH 1088 LD R0 SP,INTCODE interrupt code 03492 E0168804 0 2 BASE 1089 EXCH R0 R2,CAR2 place it in users R2, get wait mask 03493 5C0A1010 0 CBM 1090 CMZ R0/BIT CAIMNETERM was looking for nonempty .TERM? 03494 FE023498 1091 JEQ INCPC jump if not 03495 60040143 0 IMM 1092 LD R0 URDELAYR get different XREQ (finish delay) 03496 E4168802 0 2 BASE 1093 ST R0 R2,CAR0 make user execute it 03497 FE0E3499 1094 JMP NOINCPC don't skip UREQ instruction 1095 * --- 1096 00003498 1097 INCPC LABEL 03498 D0089F10 2 ZBM 1098 INC R2,CAPC step him past the XREQ 00003499 1099 NOINCPC LABEL 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 659 (PROCINOUT) F 36 Session ins and outs 03499 60578802 1 6 BASE 1100 LD R1 SP,INTSUBCODE interrupt subcode 0349A DC0034EA 1101 CALL CHKINTCODE convert subcode 0349B 4148DF13 3 ZBM 1102 PARV R3,PCPSADRS pass the PSA 0349C 40568804 2 BASE 1103 PARVL R2,CAR2 pass the interrupt code 0349D E4568805 1 2 BASE 1104 ST R1 R2,CAR3 put it into his R3 0349E DC0025EB 1105 CALL MAPINMEM re-map original caller 0349F 40400412 1106 PARVL CPPSA pointer to the PSA 034A0 FE0E34D2 1107 JMP MAKERUN and make him run 1108 * --- 1109 1110 ********************************************************************************** 1111 * * 1112 * See whether it is appropriate to give this session * 1113 * an interrupt to notify him of the event. We scan * 1114 * up the process tree to see if anyone is trapping * 1115 * the condition. If so, we give the error unless * 1116 * Control Mode is the trapper and the condition is * 1117 * UINTBREAK not on FCABSIO. Otherwise, we ignore * 1118 * the condition for now unless it is UINTBREAK. * 1119 * UINTBREAK can not be regenerated later on, so we * 1120 * have to leave it. * 1121 * * 1122 ********************************************************************************** 1123 000034A1 1124 NOTTIMEWT LABEL 034A1 5C098211 6 ZBM 1125 CMZ SP,INTENABLE does this device cause interrupts? 034A2 FE0234C8 1126 JEQ NOINT if not, don't give interrupt 1127 * \ / 1128 034A3 E5578803 5 6 BASE 1129 ST R5 SP,INTMASK save useful register 034A4 6148DF13 5 3 ZBM 1130 LD R5 R3,PCPSADRS R5 -> PSA for user 034A5 DC0025EB 1131 CALL MAPINMEM get access to other session 034A6 40534000 5 REG 1132 PARVL R5 pass PSA address 034A7 60178005 0 6 CACH 1133 LD R0 SP,INTCODE interrupt code 034A8 60D78802 3 6 BASE 1134 LD R3 SP,INTSUBCODE interrupt subcode 034A9 60894116 2 5 ZBM 1135 LD R2 R5,PSCURRPROC starting UPC 034AA DC002AB3 1136 CALL GETTRAPPER find some interest? 034AB 41520000 0 REG 1137 PARV R0 pass code 034AC 4052C000 3 REG 1138 PARVL R3 pass subcode 034AD FE0E34C1 1139 JMP NOTRP jump if no trappers 1140 * \ / 1141 034AE 64895F15 2 5 ZBM 1142 CPR R2 R5,PSPROCLIST CM trap? 034AF FE0C34B5 1143 JNE SENDITX jump if not 034B0 60978005 2 6 CACH 1144 LD R2 SP,INTCODE get code 034B1 64840020 2 IMM 1145 CPR R2 UINTBREAK break interrupt? 034B2 FE0C34B6 1146 JNE SENDIT jump if not 034B3 5C08E015 3 ZBM 1147 CMZ R3,FCABSIO for absolute input? 034B4 FE0234C4 1148 JEQ NOINTUM jump if not 1149 * \ / 1150 1151 * post an interrupt for the condition 000034B5 1152 SENDITX LABEL 034B5 60978005 2 6 CACH 1153 LD R2 SP,INTCODE get code 000034B6 1154 SENDIT LABEL 034B6 DC4035B5 1155 CALLNP UERRSETY queue the interrupt 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 660 (PROCINOUT) F 36 Session ins and outs 1156 PUNLOCK R5,EVENTLOCK release lock 034B7 EC174808 5 BASE 1156 STZ R5,EVENTLOCK 034B8 0C800000 1156 ION 034B9 DC0025EB 1157 CALL MAPINMEM remap CPPSA 034BA 40400412 1158 PARVL CPPSA pass session 034BB 60C95F12 3 5 ZBM 1159 LD R3 R5,PSPROCCB restore pointer to PCB 034BC 61578803 5 6 BASE 1160 LD R5 SP,INTMASK restore R5 034BD 6008D260 0 3 ZBM 1161 LD R0 R3,PCQUEUE get queue number he is in 034BE 5C303572 0 @ 1162 CMZ @ROUSTQUES(R0) is user roustable? 034BF FE0C34D2 1163 JNE MAKERUN if so, make him run 034C0 FE0E34CB 1164 JMP RELQUEUE else, no get interrupt 1165 * --- 1166 1167 * don't let break go unnoticed 000034C1 1168 NOTRP LABEL 034C1 60978005 2 6 CACH 1169 LD R2 SP,INTCODE get code 034C2 64840020 2 IMM 1170 CPR R2 UINTBREAK break interrupt? 034C3 FE0234B6 1171 JEQ SENDIT jump if so 1172 * \ / 1173 1174 * don't give an interrupt 000034C4 1175 NOINTUM LABEL 034C4 DC0025EB 1176 CALL MAPINMEM remap CPPSA 034C5 40400412 1177 PARVL CPPSA pass session 034C6 60C95F12 3 5 ZBM 1178 LD R3 R5,PSPROCCB restore pointer to PCB 034C7 61578803 5 6 BASE 1179 LD R5 SP,INTMASK restore R5 000034C8 1180 NOINT LABEL 034C8 6088DF13 2 3 ZBM 1181 LD R2 R3,PCPSADRS PSA pointer 1182 PUNLOCK R2,EVENTLOCK 034C9 EC168808 2 BASE 1182 STZ R2,EVENTLOCK 034CA 0C800000 1182 ION 000034CB 1183 RELQUEUE LABEL 034CB 6008D260 0 3 ZBM 1184 LD R0 R3,PCQUEUE get queue user is in 1185 PUNLOCK SQLOCKS(R0) release the queue 034CC EC201DBA 0 1185 STZ SQLOCKS(R0) 034CD 0C800000 1185 ION 034CE FE0E34E4 1186 JMP RETURN and all done 1187 * --- 1188 1189 * Here, we make the session run. We have already diddled 1190 * him as necessary (like giving him an error). 1191 000034CF 1192 UNLKFIRST LABEL 034CF 6088DF13 2 3 ZBM 1193 LD R2 R3,PCPSADRS PSA address 1194 PUNLOCK R2,EVENTLOCK release lock 034D0 EC168808 2 BASE 1194 STZ R2,EVENTLOCK 034D1 0C800000 1194 ION 1195 * \ / 000034D2 1196 MAKERUN LABEL 034D2 0CC00000 1197 IOFF protect transfer between queues 034D3 6088D260 2 3 ZBM 1198 LD R2 R3,PCQUEUE get the queue he's in 034D4 38241DA9 0 2 1199 LEA R0 SQBEGIN(R2) R0 -> head of his queue 034D5 3CC81F10 3 0 ZBM 1200 LSRCH R3 R0,PCQLINK find previous one in queue 034D6 FE0234D8 1201 JEQ GOTPREV jump if found 034D7 001300D0 1202 HALT HALTS00D0 PCB not found on SQ 1203 * --- 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 661 (PROCINOUT) F 36 Session ins and outs 1204 000034D8 1205 GOTPREV LABEL 034D8 6048DF10 1 3 ZBM 1206 LD R1 R3,PCQLINK R1 -> following one 034D9 E4481F10 1 0 ZBM 1207 ST R1 R0,PCQLINK remove us from queue 1208 PUNLOCK SQLOCKS(R2) unlock the queue 034DA EC241DBA 2 1208 STZ SQLOCKS(R2) 034DB 0C800000 1208 ION 034DC E5178803 4 6 BASE 1209 ST PCB SP,INTMASK save a useful register 034DD 6112C000 4 3 REG 1210 LD PCB R3 PCB -> our session 034DE DC402B99 1211 CALLNP SETRUNNING make him runnable 034DF 61178803 4 6 BASE 1212 LD PCB SP,INTMASK restore this register 034E0 0C800000 1213 ION allow interrupts again 034E1 FE0E34E4 1214 JMP RETURN and all done 1215 * --- 1216 1217 * Here, we don't have a session to which to consider 1218 * giving an interrupt. So we throw away any remaining 1219 * parameters and go away happily. 1220 000034E2 1221 NOPCB LABEL 034E2 DCD3C000 7 REG 1222 EXPCS R7 go get another parameter 034E3 F7C834E2 7 1223 JBT R7/STPNLAST NOPCB repeat until we have the last one 1224 * \ / 1225 000034E4 1226 RETURN LABEL 034E4 5D1F8004 6 STAK 1227 LEAVE POP return to caller 1228 * --- 1229 1230 END GIVEUINT subroutine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 662 (PROCINOUT) F 36 Session ins and outs 1232 1233 ********************************************************************************** 1234 * * 1235 * CHKINTCODE. This subroutine is passed an interrupt * 1236 * code, an interrupt subcode, and a PSA address. The subcodes * 1237 * of some interrupts are actually FCB addresses even though * 1238 * the user will eventually see them as unit numbers. The * 1239 * subcode is converted at the very last minute before being * 1240 * handed to the user. This subroutine determines whether the * 1241 * given subcode must be converted. If it does, the conversion * 1242 * is made by checking the unit list for the current underprocess * 1243 * of the given PSA. If the unit is not available to that * 1244 * underprocess (unit has been closed, or is local to another * 1245 * underprocess) the value 0 is returned instead of a unit number. * 1246 * R1 is returned unchanged if the subcode is not an FCB address. * 1247 * * 1248 * Call: * 1249 * R1 = interrupt subcode * 1250 * CALL CHKINTCODE * 1251 * PARV * 1252 * PARVL * 1253 * * 1254 * * 1255 * Sets R1 * 1256 * Eats R0 * 1257 * Stack usage: 4 * 1258 * 2 + FINDUCE (2) * 1259 * * 1260 ********************************************************************************** 1261 1262 BLOCK CHKINTCODE subroutine 1263 ENTRY CHKINTCODE 1264 ENTRY SCCONPTR 1265 034E5 00000000 1266 SCCONTYP VFD 0 034E6 B8000000 1267 VFD 1*(BIT BREAK)+1*(BIT NETERM)+1*(BIT NEPATH)+1*(BIT DISC) 034E7 00000000 1268 VFD 0 034E8 00000010 1269 VFD 1*(BIT CHAIN) 00000000 ABS 1270 BREAK EQU UINTBREAK-WORDLNTH 00000002 ABS 1271 NETERM EQU UINTNETERM-WORDLNTH 00000003 ABS 1272 NEPATH EQU UINTNEPATH-WORDLNTH 00000004 ABS 1273 DISC EQU UINTTDISC-WORDLNTH 0000001B ABS 1274 CHAIN EQU UINTCHAIN-(3*WORDLNTH) 034E9 004834E5 1275 SCCONPTR PTR SCCONTYP/BIT 0 1276 1277 BEGFRAME 00178801 6 BASE 1278 THEPSA BSS 1 1279 ENDFRAME 1280 034EA DD1F8002 6 STAK 1281 CHKINTCODE ENTR PUSH 034EB C1578801 6 BASE 1282 STPV SP,THEPSA save PSA address 034EC C0520000 0 REG 1283 STPVL R0 save the interrupt code 1284 034ED 5C3034E9 0 @ 1285 CMZ @SCCONPTR(R0) need we convert subcode? 034EE FE0234F5 1286 JEQ OKDOKE if not, don't 1287 * \ / 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 663 (PROCINOUT) F 36 Session ins and outs 1288 1289 * R1 => FCB where interrupt occurred 034EF 60178801 0 6 BASE 1290 LD R0 SP,THEPSA retrieve the session 034F0 DC0035BB 1291 CALL FINDUCE find a UCE 034F1 40520000 0 REG 1292 PARVL R0 pass PSA address 034F2 60440000 1 IMM 1293 LD R1 0 always give a "unit number" 034F3 FA3034F5 0 1294 JZA R0 OKDOKE jump if unit not around for us 034F4 60480080 1 0 ZBM 1295 LD R1 R0,UCEUNIT get the unit number 1296 * \ / 1297 000034F5 1298 OKDOKE LABEL 034F5 5D1F8002 6 STAK 1299 LEAVE POP return 1300 * --- 1301 1302 END CHKINTCODE subroutine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 664 (PROCINOUT) F 36 Session ins and outs 1304 1305 ********************************************************************************** 1306 * * 1307 * ELSRCHER. This routine removes an error element * 1308 * corresponding to the specified user interrupt code from the * 1309 * list, if one exists. It does not remove the element if the * 1310 * element is being 'held'. N.B. This does not match up the * 1311 * subcodes, nor does it mess with the VERYBAD bits. Call: * 1312 * * 1313 * * 1314 * LD R0 => user interrupt code * 1315 * CALLNP ELSRCHER * 1316 * * 1317 * Registers Used: R0:R2 * 1318 * Stack Required: 1 * 1319 * 1 + max ( UFREEMEM (0) ) * 1320 * * 1321 ********************************************************************************** 1322 1323 BLOCK ELSRCHER subroutine 1324 ENTRY ELSRCHER 1325 1326 BEGFRAME 1327 ENDFRAME 1328 034F6 DD5F8001 6 STAK 1329 ELSRCHER ENTRNP PUSH 034F7 60800412 2 1330 LD R2 CPPSA get the current PSA pointer 034F8 3896880D 2 2 BASE 1331 LEA R2 R2,PSUERROR => PSA error root word 034F9 5C302AFA 0 @ 1332 CMZ @INTASSOCB(R0) session type error? 034FA FE0234FD 1333 JEQ HAVEROOT jump if so 034FB 60800414 2 1334 LD R2 CPCUPC get current underprocess 034FC 3896880B 2 2 BASE 1335 LEA R2 R2,UPCUERROR => UPC error root word 000034FD 1336 HAVEROOT LABEL 034FD 60489F10 1 2 ZBM 1337 LD R1 R2,UERLINK find head of error element list 034FE 480846A0 0 1 ZBM 1338 RLSRCH R0 R1,UERCODE find element containing specified user error code 034FF FE0C3505 1339 JNE NOSCHLMNT jump if no element of specified type exists 03500 60085F10 0 1 ZBM 1340 LD R0 R1,UERLINK get link to next element 03501 E4089F10 0 2 ZBM 1341 ST R0 R2,UERLINK remove the element that we found 03502 DC002F5D 1342 CALL UFREEMEM dump the error element 03503 41440001 IMM 1343 PARV UERLOG indicate its length 03504 40524000 1 REG 1344 PARVL R1 and address 00003505 1345 NOSCHLMNT LABEL 03505 5D1F8001 6 STAK 1346 LEAVE POP return 1347 * --- 1348 1349 END ELSRCHER subroutine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 665 (PROCINOUT) F 36 Session ins and outs 1351 1352 ********************************************************************************** 1353 * * 1354 * USERTIMINT * 1355 * This routine is called when a user time-interrupt request * 1356 * has expired. Attempt to give him an interrupt. NOTE: He might * 1357 * be running a different program than the one that requested the * 1358 * interrupt. In this case, we do nothing. If he ever restarts * 1359 * the program that requested the interrupt, we will give him the * 1360 * the interrupt at that time. * 1361 * * 1362 * LD R3 => PSA * 1363 * CALLNP USERTIMINT * 1364 * * 1365 * Eats R0:R5. * 1366 * Stack required = 9 * 1367 * 1 + max ( GETDATE (1), GIVEUINT (8), MAPINMEM (3) ) * 1368 * * 1369 ********************************************************************************** 1370 1371 BLOCK USERTIMINT subroutine 1372 ENTRY USERTIMINT 1373 1374 BEGFRAME 1375 ENDFRAME 1376 03506 DD5F8001 6 STAK 1377 USERTIMINT ENTRNP PUSH 03507 6152C000 5 3 REG 1378 LD R5 R3 R5 -> PSA of user 03508 DC0025EB 1379 CALL MAPINMEM map in this guys memory 03509 40534000 5 REG 1380 PARVL R5 pointer to the PSA 0350A 60C94116 3 5 ZBM 1381 LD R3 R5,PSCURRPROC get pointer to current UPC 0350B 5C16C80C 3 BASE 1382 CMZ R3,UPCINTTIME did this guy request an interrupt? 0350C FE023519 1383 JEQ RETURN jump if not 0350D DC404549 1384 CALLNP GETDATE get current time 0350E 1056C80C 1 3 BASE 1385 SUB R1 R3,UPCINTTIME R1 = (current time) - (interrupt time) 0350F FA483519 1 1386 JLTZ R1 RETURN jump if not time yet 03510 DC003457 1387 CALL GIVEUINT else give him an interrupt 03511 41495F12 5 ZBM 1388 PARV R5,PSPROCCB PCB of user 03512 41440001 IMM 1389 PARV 1 value of PCQPARM if waiting (can't) 03513 41440000 IMM 1390 PARV 0 mask of PCQPARM if waiting (can't) 03514 4147FFFF IMM 1391 PARV -1 queue number if waiting (can't) 03515 41420040 IMM 1392 PARV 1*BIT CAIMTIME interrupt mask bit 03516 41440001 IMM 1393 PARV 1 device interrupt enable bit 03517 41440025 IMM 1394 PARV UINTTIMINT interrupt code 03518 40440000 IMM 1395 PARVL 0 interrupt subcode 1396 * \ / 1397 00003519 1398 RETURN LABEL 03519 DC0025EB 1399 CALL MAPINMEM re-map original caller memory lists 0351A 40400412 1400 PARVL CPPSA PSA address if any 0351B 5D1F8001 6 STAK 1401 LEAVE POP return 1402 * --- 1403 1404 END USERTIMINT subroutine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 666 (PROCINOUT) F 36 Session ins and outs 1406 1407 ********************************************************************************** 1408 * * 1409 * SUSPENDME * 1410 * Routine to suspend the current session and have it * 1411 * restart in the same state as it was in when suspended. * 1412 * LD R2 (optional) * 1413 * CALL SUSPENDME * 1414 * PAR * 1415 * PARV(2) * 1416 * PAR * 1417 * PARL * 1418 * Note that R0, and R1 are chewed on before * 1419 * parameters are passed. All registers except R0 will * 1420 * be restored on restart. * 1421 * Note: This routine does the equivalent of an ION * 1422 * before going to the restart address. This is usually * 1423 * what you want since some resource is being unlocked by * 1424 * the last parameter. * 1425 * * 1426 * There is a problem with page faults occurring while * 1427 * the parameters are being passed. The CMZ near the beginning * 1428 * hopefully fixes the problem, but if it gets you, the * 1429 * problem is that you cannot get a fault with PCONSOLE * 1430 * as your console area. The problem can manifest itself * 1431 * as nearly anything. * 1432 * * 1433 ********************************************************************************** 1434 1435 BLOCK SUSPENDME, SHARESUSP routines 1436 ENTRY SUSPENDME 1437 ENTRY SHARESUSP 1438 1439 BEGFRAME 00178801 6 BASE 1440 PARM BSS 2 shutdown parameter 00178803 6 BASE 1441 LIST BSS 1 scheduler queue pointer 1442 ENDFRAME 1443 0351C DD920000 0 REG 1444 SUSPENDME ENTRS R0 0351D 0CC00000 1445 IOFF turn off the interrupts 0351E 5C17C804 7 BASE 1446 CMZ R7,4 have any page faults 0351F 0184041E IMM 1447 SCR ADR PCONSOLE store away the registers 1448 * and get new CCAR 03520 60400412 1 1449 LD R1 CPPSA get the current PSA pointer 03521 60485F10 1 1 ZBM 1450 LD R1 R1,PSCACHN get the CA chain pointer 03522 E4164809 0 1 BASE 1451 ST R0 R1,CAR7 save the callers R7 from 1452 * this non-standard location 03523 DCD3C000 7 REG 1453 EXPCS R7 go fetch the parameters 03524 D0086041 1 ZBM 1454 INC R1,CAMSR/MSRINTCNT restore int state from before my IOFF 03525 D0086041 1 ZBM 1455 INC R1,CAMSR/MSRINTCNT restore from lock on unlock parameter 03526 C1085F10 1 ZBM 1456 STP R1,CAPC set the restart address 00003527 1457 SHARESUSP LABEL 03527 61840449 6 IMM 1458 LD SP ADR RESSTAK(-ZZ!LEN) get a stack area 03528 F7CC3536 7 1459 JBT R7/STPDUBL DOUBLSTP check for double word parm 03529 C1578801 6 BASE 1460 STPV SP,PARM get the shutdown parameter 0352A EC178802 6 BASE 1461 STZ SP,PARM(1) make second parm word zero for single 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 667 (PROCINOUT) F 36 Session ins and outs 0000352B 1462 DOUBLGOT LABEL 0352B C1178803 6 BASE 1463 STP SP,LIST get the suspend list pointer 0352C C013C000 7 REG 1464 STPL R7 save the lock field pointer 0352D 60D78803 3 6 BASE 1465 LD R3 SP,LIST copy the suspend list pointer 0352E 64C41DAA 3 IMM 1466 CPR R3 ADR SQRUNNABLE is this guy going back to runnable? 0352F FE023538 1467 JEQ DOSHUTRUN jump if so, must make special call 03530 60138000 0 6 REG 1468 LD R0 SP make a copy of the stack pointer 03531 60528000 1 2 REG 1469 LD R1 R2 copy the optional secondary parameter 03532 DC002B58 1470 CALL SHUTDOWN call the suspend queuer 03533 42160801 0 BASE 1471 PAR2L R0,PARM pass the release parameter 03534 D057C400 7 @R 1472 DEC @R7 release the lock 03535 FE0E28B7 1473 JMP DISPATCH go run someone else 1474 * --- 1475 00003536 1476 DOUBLSTP LABEL 03536 C3578801 6 BASE 1477 STPV2 SP,PARM save a double word parm in R1, R2 03537 FE0E352B 1478 JMP DOUBLGOT and re-enter main line 1479 * --- 1480 00003538 1481 DOSHUTRUN LABEL 03538 DC402B88 1482 CALLNP SHUTRUN call to put user back into the runnable queue 03539 D057C400 7 @R 1483 DEC @R7 release the lock 0353A FE0E28B7 1484 JMP DISPATCH go run someone else 1485 * --- 1486 1487 END SUSPENDME, SHARESUSP routines 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 668 (PROCINOUT) F 36 Session ins and outs 1489 1490 ********************************************************************************** 1491 * * 1492 * SUSPENDCAL. Routine that may be called by an XREQ * 1493 * processor that suspends the caller in the specified queue * 1494 * in such a way that on restart the XREQ would be re-executed. * 1495 * This causes users to be suspended in a "clean" fashion so * 1496 * that timeouts, breaks, and such like don't have to extricate * 1497 * the user from the middle of an XREQ processor to do the * 1498 * interrupt. * 1499 * Call: * 1500 * LD R2 (optional) * 1501 * CALL SUSPENDCAL * 1502 * PARV(2) * 1503 * PAR * 1504 * PARL * 1505 ** --- * 1506 * The routine never returns and the state of the XREQ * 1507 * processor that called is lost. * 1508 * NOTE: The routine destroys R0 and R1 * 1509 * before fetching the parameters. * 1510 * * 1511 ********************************************************************************** 1512 1513 BLOCK SUSPENDCAL, SUSPCALSH routines 1514 ENTRY SUSPENDCAL 1515 ENTRY SUSPCALSH 1516 0353B DD920000 0 REG 1517 SUSPENDCAL ENTRS R0 loose the callers R7 0000353C 1518 SUSPCALSH LABEL 0353C 0CC00000 1519 IOFF 0353D 5C17C803 7 BASE 1520 CMZ R7,3 take page faults now 0353E DC40285A 1521 CALLNP DROPCA drop current console area 0353F DCD3C000 7 REG 1522 EXPCS R7 fetch the parameters 03540 FE0E3527 1523 JMP SHARESUSP share code to suspend 1524 * --- 1525 1526 END SUSPENDCAL, SUSPCALSH routines 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 669 (PROCINOUT) F 36 Session ins and outs 1528 1529 ********************************************************************************** 1530 * * 1531 * SUSPENDFRQ. Suspend a FREQ. This routine will suspend * 1532 * a FREQ as specified in the request code that was in R0 of the * 1533 * requester. R0 of the requester is examined for XRFLDSUSP * 1534 * and the operations done are: * 1535 * XRFLDSUSP OPERATION * 1536 * --------- --------- * 1537 * 0 The requesting FREQ is suspended with the * 1538 * PC and address space pointing at the * 1539 * requester (see comments on SUSPENDCAL). * 1540 * 1 The requester is supposed to * 1541 * give an error because suspension was not * 1542 * allowed. * 1543 * 2 unused, same as 1 * 1544 * 3 unused, same as 1 * 1545 * * 1546 * Invocation is: * 1547 * LD R2 (optional) * 1548 * CALL SUSPENDFRQ * 1549 * PARV(2) * 1550 * PAR * 1551 * PARL * 1552 * * 1553 * The routine destroys R0 and R1 before accepting * 1554 * the parameters. If the routine returns, R0 thru R2 have * 1555 * been mangled and the lock has NOT been unlocked. * 1556 * Stack required = 1 * 1557 * * 1558 ********************************************************************************** 1559 1560 BLOCK SUSPENDFRQ routine 1561 ENTRY SUSPENDFRQ 1562 1563 BEGFRAME 1564 ENDFRAME 1565 03541 DD9F8001 6 STAK 1566 SUSPENDFRQ ENTRS PUSH 03542 60400412 1 1567 LD R1 CPPSA get the current PSA pointer 03543 60485F11 1 1 ZBM 1568 LD R1 R1,PSCACHNP1 R1 => requesters console area 03544 60485E22 1 1 ZBM 1569 LD R1 R1,CAR0/XRFLDSUSP R1 = suspension control number 03545 5CA23546 1 1570 LDPC SPNDFRQTAB(R1) go to appropriate processing 1571 * --- 1572 00003546 1573 SPNDFRQTAB LABEL 03546 0000353C 1574 VFD ADR SUSPCALSH 0 - suspend the FREQ 03547 0000354A 1575 VFD ADR NOSUSPEND 1 - do not suspend 03548 0000354A 1576 VFD ADR NOSUSPEND 2 - unused 03549 0000354A 1577 VFD ADR NOSUSPEND 3 - unused 1578 1579 ********************************************************************************** 1580 * * 1581 * This request is not to be suspended. * 1582 * We return to our caller with the resource still * 1583 * locked in case he wants to try something funny. * 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 670 (PROCINOUT) F 36 Session ins and outs 1584 * The user request should just get the error 'could * 1585 * not suspend'. * 1586 * * 1587 ********************************************************************************** 1588 0000354A 1589 NOSUSPEND LABEL 0354A DCD3C000 7 REG 1590 EXPCS R7 pick up the parameters 0354B DCD3C000 7 REG 1591 EXPCS R7 throw away (may be single or double) 0354C C1120000 0 REG 1592 STP R0 throw away queue information 0354D C0120000 0 REG 1593 STPL R0 get address of unlocking item 0354E 5D1F8001 6 STAK 1594 LEAVE POP return to caller 1595 * --- 1596 1597 END SUSPENDFRQ routine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 671 (PROCINOUT) F 36 Session ins and outs 1599 1600 ********************************************************************************** 1601 * * 1602 * DQUEONE * 1603 * Resident routine to dequeue one person in the specified * 1604 * queue for the specified reason and set him running. * 1605 * Call: * 1606 * * 1607 * CALL DQUEONE SP => return address stack * 1608 * eats R1 during parameter passing. * 1609 * callers rely on R3 and up * 1610 * PAR * 1611 * PARVL * 1612 * returns with R0 # 0 if someone unqueued * 1613 * and zero if nothing set going. * 1614 * * 1615 * Eats R0:R2. * 1616 * Stack required = 4 * 1617 * 2 + max ( LOCKWAIT (0), SETRUNNING (2) ) * 1618 * * 1619 ********************************************************************************** 1620 1621 BLOCK DQUEONE subroutine 1622 ENTRY DQUEONE 1623 1624 BEGFRAME 00178801 6 BASE 1625 DQUEONET BSS 1 save for R4 1626 ENDFRAME 1627 0354F DD1F8002 6 STAK 1628 DQUEONE ENTR PUSH 03550 C1124000 1 REG 1629 STP R1 save the queue pointer 03551 C0528000 2 REG 1630 STPVL R2 acquire the parameter 03552 E5178801 4 6 BASE 1631 ST R4 SP,DQUEONET save R4 03553 39164811 4 1 BASE 1632 LEA R4 R1,0(NQUEUES) make pointer to queue lock word 1633 PLOCK @R4 call to lock the appropriate SQ 03554 0CC00000 1633 IOFF 03555 D1D70400 4 @R 1633 SETT @R4 03556 FE0C3558 1633 JNE MA(2+DISPW MA 0) 03557 DC40308B 1633 CALLNP LOCKWAIT 03558 60124000 0 1 REG 1634 LD R0 R1 copy the queue pointer 00003559 1635 DQUEONEL LABEL 03559 FA383565 01 1636 RLJZA R0 DQUEONENF advance through list and jump if end 0355A 64960801 2 0 BASE 1637 CPR R2 R0,PCQPARM does the parameter match 0355B FE0C3559 1638 JNE DQUEONEL jump back if not 1639 * \ / 1640 * the one we're looking for is found, delink it from 1641 * the list and set it running. 1642 0355C 60881F10 2 0 ZBM 1643 LD R2 R0,PCQLINK load the pointer out of this element 0355D E4885F10 2 1 ZBM 1644 ST R2 R1,PCQLINK delink the element that we found 1645 PUNLOCK @R4 call to release the SQ 0355E EC170400 4 @R 1645 STZ @R4 0355F 0C800000 1645 ION 03560 61120000 4 0 REG 1646 LD PCB R0 copy this PCB pointer 03561 DC402B99 1647 CALLNP SETRUNNING set this session going 03562 60040001 0 IMM 1648 LD R0 1 return flag indicating someone unqueued 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 672 (PROCINOUT) F 36 Session ins and outs 00003563 1649 DQUEONEXIT LABEL 03563 61178801 4 6 BASE 1650 LD R4 SP,DQUEONET restore R4 03564 5D1F8002 6 STAK 1651 LEAVE POP return 1652 * --- 1653 1654 * The entry was not found in the list - unlock the list 1655 * and just return. 1656 00003565 1657 DQUEONENF LABEL 1658 PUNLOCK @R4 call to release the SQ 03565 EC170400 4 @R 1658 STZ @R4 03566 0C800000 1658 ION 03567 60040000 0 IMM 1659 LD R0 0 return flag indicating no one unqueued 03568 FE0E3563 1660 JMP DQUEONEXIT finish housekeeping 1661 * --- 1662 1663 END DQUEONE subroutine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 673 (PROCINOUT) F 36 Session ins and outs 1665 1666 ********************************************************************************** 1667 * * 1668 * ROUST. Routine that puts a user into the runnable * 1669 * queue if he is in either terminal wait, path wait, or * 1670 * lock wait. This is used when trying to evict a session * 1671 * or get a programs attention (terminal break). * 1672 * Call: * 1673 * LD R3 => PCB * 1674 * CALLNP ROUST * 1675 * * 1676 * Eats R0:R3. * 1677 * Stack required = 4 * 1678 * 1 + max ( DQUETHIS (3) ) * 1679 * * 1680 ********************************************************************************** 1681 1682 BLOCK ROUST subroutine 1683 ENTRY ROUST 1684 ENTRY ROUSTQUES (bits for roustable queues) 1685 1686 BEGFRAME 1687 ENDFRAME 1688 03569 DD5F8001 6 STAK 1689 ROUST ENTRNP PUSH 0000356A 1690 ROUSTAGAIN LABEL 0356A 6008D260 0 3 ZBM 1691 LD R0 R3,PCQUEUE get the queue this fellow is in 0356B 5C303572 0 @ 1692 CMZ @ROUSTQUES(R0) do we roust from this queue? 0356C FE023570 1693 JEQ ROUSTLEAVE jump if not to touch 0356D DC003573 1694 CALL DQUETHIS set this fellow running 0356E 40201DA9 0 1695 PARL SQBEGIN(R0) pass head of assumed queue 0356F FA02356A 0 1696 JEQZ R0 ROUSTAGAIN if he moved, try to roust again 00003570 1697 ROUSTLEAVE LABEL 03570 5D1F8001 6 STAK 1698 LEAVE POP return 1699 * --- 1700 01700000 ABS 1701 ROUSTQUE1 EQU (1*BIT NQMSGWAIT)+(1*BIT NQPATHWAIT)+(1*BIT NQLOCKWAIT)+(1*BIT NQUNITWAIT) 00828000 ABS 1702 ROUSTQUE2 EQU (1*BIT NQTIMEWAIT)+(1*BIT NQTROUBLE)+(1*BIT NQFILEWAIT) 000C0000 ABS 1703 ROUSTQUE3 EQU (1*BIT NQTERMWAIT)+(1*BIT NQTRMOWAIT) 03571 01FE8000 1704 ROUSTQUET VFD ROUSTQUE1+ROUSTQUE2+ROUSTQUE3 03572 00483571 1705 ROUSTQUES PTR ROUSTQUET/BIT 0 1706 1707 END ROUST subroutine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 674 (PROCINOUT) F 36 Session ins and outs 1709 1710 ********************************************************************************** 1711 * * 1712 * DQUETHIS. Routine to set running a given session. * 1713 * Call: * 1714 * LD R3 => PCB * 1715 * CALL DQUETHIS * 1716 * PARL * 1717 * Returns R0=0 if nothing dequeued and non-zero if * 1718 * something dequeued. * 1719 * * 1720 * Eats R0:R2. * 1721 * Stack required = 3 * 1722 * 1 + max ( LOCKWAIT (0), SETRUNNING (2) ) * 1723 * * 1724 ********************************************************************************** 1725 1726 BLOCK DQUETHIS subroutine 1727 ENTRY DQUETHIS 1728 1729 BEGFRAME 1730 ENDFRAME 1731 03573 DD1F8001 6 STAK 1732 DQUETHIS ENTR PUSH 03574 C0128000 2 REG 1733 STPL R2 save the queue 03575 38568811 1 2 BASE 1734 LEA R1 R2,0(NQUEUES) R1 => queue lock word 1735 PLOCK @R1 call to lock the appropriate scheduler queue 03576 0CC00000 1735 IOFF 03577 D1D64400 1 @R 1735 SETT @R1 03578 FE0C357A 1735 JNE MA(2+DISPW MA 0) 03579 DC40308B 1735 CALLNP LOCKWAIT 1736 0357A 3CC89F10 3 2 ZBM 1737 LSRCH R3 R2,PCQLINK get the pointer to the one before 0357B FE0C3585 1738 JNE NOONE2Q jump if he's not there 0357C 6008DF10 0 3 ZBM 1739 LD R0 R3,PCQLINK get the link to the rest of the list 0357D E4089F10 0 2 ZBM 1740 ST R0 R2,PCQLINK remove us from the list 1741 PUNLOCK @R1 release the SQ 0357E EC164400 1 @R 1741 STZ @R1 0357F 0C800000 1741 ION 03580 E0D30000 3 4 REG 1742 EXCH R3 R4 move around some registers 03581 DC402B99 1743 CALLNP SETRUNNING set him into the runnable queue 03582 E0D30000 3 4 REG 1744 EXCH R3 R4 restore these registers 03583 60040001 0 IMM 1745 LD R0 1 indicate success 03584 5D1F8001 6 STAK 1746 LEAVE POP return 1747 * --- 1748 1749 * No one to dequeue 00003585 1750 NOONE2Q LABEL 1751 PUNLOCK @R1 release the SQ 03585 EC164400 1 @R 1751 STZ @R1 03586 0C800000 1751 ION 03587 60040000 0 IMM 1752 LD R0 0 indicate failure 03588 5D1F8001 6 STAK 1753 LEAVE POP return 1754 * --- 1755 1756 END DQUETHIS subroutine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 675 (PROCINOUT) F 36 Session ins and outs 1758 1759 ********************************************************************************** 1760 * * 1761 * UERRSET * 1762 * Routine to set an error on a user. Will put error onto * 1763 * the user's error list and return. It is assumed that the * 1764 * PSA user memory is mapped in if the error is UPC type. * 1765 * Frees the element if the error code is the same as that * 1766 * of an existing element. N.B. The subcodes are not checked, * 1767 * so a conflict may arise when the would-be duplicates are * 1768 * errors from different units. That is, an error from one * 1769 * unit being "held off" keeps any other units from posting * 1770 * the same error. Solution is to match subcodes before * 1771 * deciding ALREADYERR, but is this really desired? * 1772 * * 1773 * Call: * 1774 * * 1775 * SP = stack pointer * 1776 * CPPSA user memory mapped * 1777 * LD R2 * 1778 * LD R3 * 1779 * CALLNP UERRSET * 1780 * * 1781 * Eats R0:R3 * 1782 * Stack required = 1 * 1783 * 1 + max ( LOCKWAIT (0), UFREEMEM (0), UGETMEM (0) ) * 1784 * * 1785 ********************************************************************************** 1786 1787 BLOCK UERRSET and UERRSETY subroutines 1788 ENTRY UERRSET 1789 ENTRY UERRSETY 1790 1791 BEGFRAME 1792 ENDFRAME 1793 03589 DD5F8001 6 STAK 1794 UERRSET ENTRNP PUSH 0358A DC002ED0 1795 CALL UGETMEM get a chunk for error element 0358B 40440001 IMM 1796 PARVL UERLOG size 0358C E48800D0 2 0 ZBM 1797 ST R2 R0,UERCODEZ place code in block 0358D 60800412 2 1798 LD R2 CPPSA get pointer to the PSA 1799 * \ / 1800 1801 * start shared code 0000358E 1802 UERRSRTSHR LABEL entry from UERRSETY 0358E E4D60801 3 0 BASE 1803 ST R3 R0,UERPARAM place param in 0358F E4881F10 2 0 ZBM 1804 ST R2 R0,UERLINK save PSA for later 03590 60D20000 3 0 REG 1805 LD R3 R0 copy the block pointer 1806 1807 * determine correct list for error 1808 PLOCK R2,PSLOCK get access to the PSA 03591 0CC00000 1808 IOFF 03592 D1D6880C 2 BASE 1808 SETT R2,PSLOCK 03593 FE0C3595 1808 JNE MA(2+DISPW MA 0) 03594 DC40308B 1808 CALLNP LOCKWAIT 03595 6008C6A0 0 3 ZBM 1809 LD R0 R3,UERCODE get code (ignore flags) 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 676 (PROCINOUT) F 36 Session ins and outs 03596 5C302AFA 0 @ 1810 CMZ @INTASSOCB(R0) PSA or UPC error? 03597 FE0235AC 1811 JEQ USEPSA jump if PSA error 03598 64800413 2 1812 CPR R2 CMAPPSA make safety check 03599 FE02359B 1813 JEQ PSAOK jump if correct mapping 0359A 001300D2 1814 HALT HALTS00D2 need to map R2 0000359B 1815 PSAOK LABEL 0359B 60888116 2 2 ZBM 1816 LD R2 R2,PSCURRPROC error is underprocess type 0359C 3896880B 2 2 BASE 1817 LEA R2 R2,UPCUERROR => UPC error root word 1818 * \ / 1819 1820 * R2 => correct list root word, is error a duplicate? 0000359D 1821 GOTROOT LABEL 0359D 6008C0D0 0 3 ZBM 1822 LD R0 R3,UERCODEZ code + flags 0359E F62835A3 0 1823 JBT R0/VERYBADB DOANYWAY horrific errors always go on 0359F 780403FF 0 IMM 1824 AND R0 (ONEBITS*CODEPART)/CODEPART take off extras 035A0 60489F10 1 2 ZBM 1825 LD R1 R2,UERLINK => first error element in list 035A1 3C0846A0 0 1 ZBM 1826 LSRCH R0 R1,UERCODE search for same error (w/o flags) 035A2 FE0235AE 1827 JEQ ALREADYERR don't duplicate normal errors 1828 * \ / 1829 1830 * Hey! We can do it! Put error on end of the list. 1831 * R2 => list root word, R3 => new error, and R3,UERLINK => PSA 000035A3 1832 DOANYWAY LABEL 035A3 6008C210 0 3 ZBM 1833 LD R0 R3,UERVERYBAD fetch the bit indicating serious error 035A4 FC089C10 0 2 ZBM 1834 IORM R0 R2,0/RTVERYBADB set in the root 035A5 60040000 0 IMM 1835 LD R0 0 search target 035A6 3C089F10 0 2 ZBM 1836 LSRCH R0 R2,UERLINK find nil link 035A7 E008DF10 0 3 ZBM 1837 EXCH R0 R3,UERLINK append to ours (R0 gets errant's PSA) 035A8 E4C89F10 3 2 ZBM 1838 ST R3 R2,UERLINK make new element the list end 1839 PUNLOCK R0,PSLOCK release the PSA 035A9 EC16080C 0 BASE 1839 STZ R0,PSLOCK 035AA 0C800000 1839 ION 000035AB 1840 RETURN LABEL 035AB 5D1F8001 6 STAK 1841 LEAVE POP return 1842 * --- 1843 1844 * error is session type 000035AC 1845 USEPSA LABEL 035AC 3896880D 2 2 BASE 1846 LEA R2 R2,PSUERROR => PSA error root word 035AD FE0E359D 1847 JMP GOTROOT get back into it 1848 * --- 1849 1850 * error is duplicate, don't use it 000035AE 1851 ALREADYERR LABEL return free storage 035AE 6088DF10 2 3 ZBM 1852 LD R2 R3,UERLINK => errant PSA 1853 PUNLOCK R2,PSLOCK release the PSA 035AF EC16880C 2 BASE 1853 STZ R2,PSLOCK 035B0 0C800000 1853 ION 035B1 DC002F5D 1854 CALL UFREEMEM release the element 035B2 41440001 IMM 1855 PARV UERLOG indicate elements length 035B3 4052C000 3 REG 1856 PARVL R3 and location 035B4 FE0E35AB 1857 JMP RETURN make joint exit 1858 * --- 1859 1860 ********************************************************************************** 1861 * * 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 677 (PROCINOUT) F 36 Session ins and outs 1862 * Routine same as above except that R5 points to the * 1863 * PSA of the session that gets the error. It is assumed * 1864 * that the PSA user memory is mapped in if the error is * 1865 * a UPC type. Call: * 1866 * * 1867 * SP = stack pointer * 1868 * R5 PSA user memory mapped * 1869 * LD R5 * 1870 * LD R2 * 1871 * LD R3 * 1872 * CALLNP UERRSETY * 1873 * * 1874 * Eats R0:R3 * 1875 * Stack required = 1, See UERRSET. * 1876 * * 1877 ********************************************************************************** 1878 035B5 DD5F8001 6 STAK 1879 UERRSETY ENTRNP PUSH 035B6 DC002ED0 1880 CALL UGETMEM get an error block 035B7 40440001 IMM 1881 PARVL UERLOG this long 035B8 E48800D0 2 0 ZBM 1882 ST R2 R0,UERCODEZ place parameters into the error block 035B9 60934000 2 5 REG 1883 LD R2 R5 make a copy of the PSA pointer 035BA FE0E358E 1884 JMP UERRSRTSHR share the queueing code 1885 * --- 1886 1887 END UERRSET and UERRSETY subroutines 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 678 (PROCINOUT) F 36 Session ins and outs 1889 1890 ********************************************************************************** 1891 * * 1892 * FINDUCE. Routine to take an FCB pointer and return a * 1893 * UCE that corresponds. It checks the local unit list of the * 1894 * current underprocess and the global list of the given PSA. * 1895 * Note that equivalence units are implemented by having the * 1896 * UCEs point to a common FCB. Since the unit number is pulled * 1897 * from the first UCE which points to the specified FCB, this * 1898 * means that the number will be that of the most recently opened * 1899 * (and still existing) equivalence unit. * 1900 * Call: * 1901 * FCB ptr in R1 * 1902 * CALL FINDUCE * 1903 * PARVL * 1904 * * 1905 * * 1906 * Sets R0. * 1907 * Stack required = 2 * 1908 * * 1909 ********************************************************************************** 1910 1911 BLOCK FINDUCE 1912 1913 BEGFRAME 00178801 6 BASE 1914 PSADR BSS 1 passed PSA address 1915 ENDFRAME 1916 1917 ENTRY FINDUCE to get unit number 1918 035BB DD1F8002 6 STAK 1919 FINDUCE ENTR PUSH 035BC C0578801 6 BASE 1920 STPVL SP,PSADR remember the PSA! 035BD 60080116 0 0 ZBM 1921 LD R0 R0,PSCURRPROC get the current underprogram 035BE 60081F15 0 0 ZBM 1922 LD R0 R0,UPCUNITS get local unit list pointer 035BF 3C481F11 1 0 ZBM 1923 LSRCH R1 R0,UCEFCB look for the right unit 035C0 FE0235C4 1924 JEQ GOTUNIT jump if found in local list 035C1 60178801 0 6 BASE 1925 LD R0 SP,PSADR get the PSA address 035C2 60082316 0 0 ZBM 1926 LD R0 R0,PSUNITS get global unit list pointer 035C3 3C481F11 1 0 ZBM 1927 LSRCH R1 R0,UCEFCB look for the right unit 000035C4 1928 GOTUNIT LABEL 035C4 5D1F8002 6 STAK 1929 LEAVE POP return, UCE address in R0 1930 * --- 1931 1932 END FINDUCE 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 679 (PROCINOUT) F 36 Session ins and outs 1934 1935 ********************************************************************************** 1936 * * 1937 * FINDTERMCB. Subroutine to return the terminal control block of * 1938 * the absolute IO terminal (if it exists) for the current session. * 1939 * * 1940 * Call: CALL FINDTERMCB * 1941 * PARVL * 1942 * TCB or 0> * 1943 * * 1944 * Eats: R0, sets R1 * 1945 * Stack Usage: 1 * 1946 * * 1947 ********************************************************************************** 1948 1949 BLOCK FINDTERMCB subroutine 1950 ENTRY FINDTERMCB 1951 1952 BEGFRAME 1953 ENDFRAME 1954 035C5 DD1F8001 6 STAK 1955 FINDTERMCB ENTR PUSH 035C6 C0520000 0 REG 1956 STPVL R0 get the PSA address 035C7 60081F17 0 0 ZBM 1957 LD R0 R0,PSFCBLIST R0 => logical unit list 035C8 60440001 1 IMM 1958 LD R1 1 we want absolute unit 035C9 3C482015 1 0 ZBM 1959 LSRCH R1 R0,FCABSIO find one 035CA FE0C35D0 1960 JNE NOTHERE sys proc or vanisher 035CB 60440007 1 IMM 1961 LD R1 HTYPETERM get code for terminal units 035CC 64482665 1 0 ZBM 1962 CPR R1 R0,FCHTYPE is that what we have? 035CD FE0C35D0 1963 JNE NOTHERE jump if not terminal (batch?) 035CE 60481F16 1 0 ZBM 1964 LD R1 R0,FCDCBPTR TCB or 0 000035CF 1965 FTCBEXIT LABEL 035CF 5D1F8001 6 STAK 1966 LEAVE POP goodbye 1967 * --- 1968 000035D0 1969 NOTHERE LABEL 035D0 60440000 1 IMM 1970 LD R1 0 say no find 035D1 FE0E35CF 1971 JMP FTCBEXIT say goodbye 1972 * --- 1973 1974 END FINDTERMCB subroutine 1975 1976 1977 END goodies to move sessions around 62 INPUT PSACOMEGO PSA creaters and destroyers 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 680 (PSACOMEGO) F 37 Session makers and breakers 3 4 PSACOMEGO BLOCK PSA Makers and Breakers 5 6 ENTRY BLDPROCESS create a user session 7 ENTRY SETINITRUN setup created session to initial run 8 ENTRY BLKLIMCHK check for free storsage before session creation 9 ENTRY CREATEUCE create an initial UCE 10 11 ********************************************************************************** 12 * * 13 * BLDPROCESS. * 14 * Routine to create a virgin PSA. It is created zeroed except: * 15 * - PCB is pointed to and PCB points back * 16 * - a console area is added * 17 * - the console area is given the MSR and PC as passed * 18 * - the user limit block pointed to is !!!!!!!!!!!!.!!!!!! * 19 * - User free storage list are initialized. * 20 * The PSA is initialized first, then the PCB is created. * 21 * Some of the reasons for the creation order are: * 22 * 1) The PSA must be initialized before a PCB may point * 23 * to it. Otherwise, routines searching the PCB list * 24 * looking for a PSA meeting certain requirements may * 25 * use garbage pointers, etc. * 26 * 2) Several fields in the PCB may not be changed except * 27 * by read-modify-write operations because they share * 28 * a word with a locked field. PCPSADRS crosses a * 29 * word boundary, so it may not be updated while the * 30 * PCB is in the PCB list. * 31 * 3) The session number must be calculated and the PCB * 32 * inserted into the list while the PCB list is locked. * 33 * * 34 * CALL BLDPROCESS * 35 * PARV MSR bits for new session * 36 * PARV2 * 37 * PARV initial PC * 38 * PARVL * 39 * returns: R3 => new PSA (mapped in) * 40 * R4 => PCB associated with PSA * 41 * !!!! User virtual memory mapped in for NEW PSA !!!! * 42 * note that registers R0:R4 are mangled before the * 43 * parameters are passed. * 44 * * 45 * Eats R0:R2. * 46 * Stack required = 2 * 47 * 1 + max ( GETDATE (1), GETMEMPAGE (1), LOCKLIST (1), * 48 * SGETMEM (0), UNLOCKLIST (1), UPCGETMEM (0), * 49 * ZEROIT (1) ) * 50 * * 51 ********************************************************************************** 52 53 BLOCK BLDPROCESS subroutine 54 ENTRY BLDPROCESS 55 56 BEGFRAME 57 ENDFRAME 58 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 681 (PSACOMEGO) F 37 Session makers and breakers 035D2 DD9F8001 6 STAK 59 BLDPROCESS ENTRS PUSH 035D3 DC002ED0 60 CALL SGETMEM create the PSA 035D4 40440005 IMM 61 PARVL PSLOG 035D5 E412C000 0 3 REG 62 ST R0 R3 63 * \ / 64 65 ********************************************************************************** 66 * * 67 * The PCB may not point to the PSA until the PSA has been * 68 * initialized. This is because of session information * 69 * getting, etc. Also note that we are running with interrupts * 70 * off until the users free storage and associated pointers have * 71 * been initialized. * 72 * * 73 ********************************************************************************** 74 75 * \ / 035D6 DC003090 76 CALL ZEROIT initialize PSA 035D7 4116C800 3 BASE 77 PAR R3,0 address of new PSA 035D8 40440020 IMM 78 PARVL 2 POWER PSLOG length to zero 035D9 0CC00000 79 IOFF no interrupts allowed until finished 035DA E4C00458 3 80 ST R3 MEMVAR1 don't lose pointer to the PSA 035DB DC003002 81 CALL GETMEMPAGE get a page for the free memory lists 035DC 4052C000 3 REG 82 PARVL R3 pointer to newly created PSA 83 84 * This check is for debugging purposes only and may be removed 035DD 604A1C80 1 0 CBM 85 LD R1 R0/PAGEFIELD get the virtual page number 035DE 7C440080 1 IMM 86 IOR R1 MONPF convert to monitor page number 035DF 644400FC 1 IMM 87 CPR R1 PNUSERMEM if not first user virtual page, something is wrong 035E0 FE0235E2 88 JEQ GOODPN jump if page number is satisfactory 035E1 00130071 89 HALT HALTS0071 user memory list on wrong virtual page 90 * --- 91 000035E2 92 GOODPN LABEL 035E2 60400458 1 93 LD R1 MEMVAR1 get the PSA pointer back 035E3 E441F00E 1 94 ST R1 UMEMPSA indicate owner 035E4 60440009 1 IMM 95 LD R1 MEMLISTMAX-1 need to initialize all pointers 035E5 60802576 2 96 LD R2 BIT07 this is the initial value 000035E6 97 INITLOOP LABEL 035E6 E4A3F000 2 1 98 ST R2 USERMEM(R1) zap the usermem location 035E7 FA6635E6 1 99 JDR R1 INITLOOP back for more if not done 100 * \ / 101 035E8 18040400 0 IMM 102 ADD R0 WPP start at the end of the page 035E9 60440005 1 IMM 103 LD R1 ((WPP LOG 2)-(16 LOG 2))-1 initialize our counter 000035EA 104 IMEMLOOP LABEL 035EA 10222562 0 1 105 SUB R0 BITTAB(R1)(16 LOG 2) calculate available address 035EB 60A3F004 2 1 106 LD R2 USERMEM(R1)(16 LOG 2) get the current pointer there 035EC E423F004 0 1 107 ST R0 USERMEM(R1)(16 LOG 2) put it in the free memory lists 035ED E4960800 2 0 BASE 108 ST R2 R0,0 make new forward pointer 035EE FA6635EA 1 109 JDR R1 IMEMLOOP back up until we finish 110 * \ / 111 112 * Initialize UMEMXTRA from USERMEM(XALOG). Halt if we can't. 035EF 6041F007 1 113 LD R1 USERMEM(XALOG) get a piece of memory 035F0 FA7235F2 1 114 JNZA R1 HAVEXMEM jump if some available 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 682 (PSACOMEGO) F 37 Session makers and breakers 115 * \ / 116 035F1 00130072 117 HALT HALTS0072 unsable to acquire emergency user virtual memory 118 * --- 119 000035F2 120 HAVEXMEM LABEL 035F2 60002576 0 121 LD R0 BIT07 get empty link indicator 035F3 E0164800 0 1 BASE 122 EXCH R0 R1,0 get and empty forward link 035F4 E401F007 0 123 ST R0 USERMEM(XALOG) put remaining list back on 035F5 E441F00D 1 124 ST R1 UMEMXTRA put reserve area in special spot 125 035F6 60C00458 3 126 LD R3 MEMVAR1 restore pointer to the PSA 035F7 0C800000 127 ION that is all we need 035F8 DC002ED0 128 CALL SGETMEM get a console area 035F9 40440004 IMM 129 PARVL CALOG 035FA E408DF10 0 3 ZBM 130 ST R0 R3,PSCACHN 035FB DC003090 131 CALL ZEROIT initialize registers 035FC 41160800 0 BASE 132 PAR R0,0 pointer to console area 035FD 40440010 IMM 133 PARVL 2 POWER CALOG length to zero 134 035FE DC002F0A 135 CALL UPCGETMEM get a UPC block 035FF 40440005 IMM 136 PARVL UPCLOG indicate its length 03600 E408C116 0 3 ZBM 137 ST R0 R3,PSCURRPROC it is the current one 03601 E408DF15 0 3 ZBM 138 ST R0 R3,PSPROCLIST and the whole list 03602 E4130000 0 4 REG 139 ST R0 R4 save UPC pointer 03603 DC003090 140 CALL ZEROIT all zeros for safety 03604 41160800 0 BASE 141 PAR R0,0 indicate the address 03605 40440020 IMM 142 PARVL 2 POWER UPCLOG and size 143 03606 DCD3C000 7 REG 144 EXPCS R7 pick up parameters 03607 6088DF10 2 3 ZBM 145 LD R2 R3,PSCACHN 03608 E4891F12 2 4 ZBM 146 ST R2 R4,UPCCONSOLE save CA address in UPC 03609 C1568801 2 BASE 147 STPV R2,CAMSR set initial MSR 0360A C3570809 4 BASE 148 STPV2 R4,UPCPROCNM put program name into block 0360B C1489F10 2 ZBM 149 STPV R2,CAPC store initial PC 0360C C0528000 2 REG 150 STPVL R2 save system/user session flag 151 0360D 60001EAE 0 152 LD R0 SYSTEMULB 0360E E408DF13 0 3 ZBM 153 ST R0 R3,PSUSERLIMP use system limit area 0360F E408DF14 0 3 ZBM 154 ST R0 R3,PSDFLTDIR set the default dir info 03610 E4091F13 0 4 ZBM 155 ST R0 R4,UPCPRIVULB set the privileges 03611 6004000F 0 IMM 156 LD R0 FSPRIVNOT no access to system ULB 03612 E408C044 0 3 ZBM 157 ST R0 R3,PSDDIRPRIV aliased to 03613 600403E0 0 IMM 158 LD R0 UPDFLTREST get default restrictions 03614 E40900F0 0 4 ZBM 159 ST R0 R4,UPCPRIV set initial restrictions 03615 BC001D12 0 160 INCL R0 PROCSERNM get a new process serial number 03616 E4091371 0 4 ZBM 161 ST R0 R4,UPCSERNM and brand this UPC 03617 DC404549 162 CALLNP GETDATE get the current time 03618 E616C815 013 BASE 163 ST2 R0 R3,PSHELDATE save to keep port info legible 03619 600403E8 0 IMM 164 LD R0 1*1000 give him some time to get started 0361A E416C811 0 3 BASE 165 ST R0 R3,PSTIMLIM set into time limit word 0361B DC002ED0 166 CALL SGETMEM get a PCB for this session 0361C 40440003 IMM 167 PARVL PCBLOG 0361D E4130000 0 4 REG 168 ST R0 PCB 0361E DC003090 169 CALL ZEROIT initialize new PCB 0361F 41170800 4 BASE 170 PAR PCB,0 pointer to new PCB 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 683 (PSACOMEGO) F 37 Session makers and breakers 03620 40440008 IMM 171 PARVL 2 POWER PCBLOG length to zero 03621 E4C91F13 3 4 ZBM 172 ST R3 PCB,PCPSADRS now make PCB point to PSA 03622 E508DF12 4 3 ZBM 173 ST PCB R3,PSPROCCB store PCB pointer in PSA 03623 E4891813 2 4 ZBM 174 ST R2 PCB,PCSYSPROC indicate if system session 175 03624 DC003096 176 CALL LOCKLIST get access to PCB list 03625 40001EB2 177 PARL PCNTLLOCK 178 179 * search array for session number 180 * finds the lowest session number NOT in use 03626 70440010 1 IMM 181 LDN R1 PCNUMARRSZ load negative of array size 00003627 182 FINDSESSNM LABEL 03627 5C621EC4 1 183 HIB PCNUMARRAY(PCNUMARRSZ)(R1) check this word 03628 F234362B 0 184 JBF R0/BIT 26 THISWORD jump if a one bit found 03629 FA603627 1 185 IRJ R1 FINDSESSNM else, try next one 186 * \ / 187 188 * the words were all zero 0362A 00130070 189 HALT HALTS0070 no session numbers available 190 * --- 191 192 * we found a perfectly good session number 0000362B 193 THISWORD LABEL 0362B E44A2E40 1 0 CBM 194 ST R1 R0/BITS (27-(PCNUMARRSZ LOG 2)):26 add in word position 0362C EC301EB3 0 @ 195 STZ @PPCNUMARR(R0) say # is no longer available 0362D E40900C3 0 4 ZBM 196 ST R0 PCB,PCPROCNUM place new number in control block 0362E 60401EB1 1 197 LD R1 PCONTROL get first PCB in list 0362F E4491F14 1 4 ZBM 198 ST R1 PCB,PCNXTCB link list after us, too 03630 E5001EB1 4 199 ST PCB PCONTROL make us the new head 03631 D0001EB0 200 INC PCCOUNT indicate another session running 03632 DC0030A4 201 CALL UNLOCKLIST release grip on list 03633 40001EB2 202 PARL PCNTLLOCK 03634 5D1F8001 6 STAK 203 LEAVE POP return 204 * --- 205 206 END BLDPROCESS subroutine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 684 (PSACOMEGO) F 37 Session makers and breakers 208 209 ********************************************************************************** 210 * * 211 * CREATEUCE creates a new UCE element and initializes some of the * 212 * new element's fields. The unit number is set to the specified * 213 * value, the FCB address is set to the current FCB. * 214 * Call: * 215 * CALL CREATEUCE * 216 * PARV * 217 * PARVL * 218 * * 219 * Eats R1, returns R0 => new UCE. * 220 * Stack required = 2 * 221 * 2 + UCGETMEM (0) * 222 * * 223 ********************************************************************************** 224 225 BLOCK CREATEUCE subroutine 226 ENTRY CREATEUCE 227 228 BEGFRAME 00178801 6 BASE 229 CRUTEMP BSS 1 00098081 6 ZBM 230 UNO EQU CRUTEMP/CH0 00099F11 6 ZBM 231 FCBADDR EQU CRUTEMP/FLDADRS 232 ENDFRAME 233 03635 DD1F8002 6 STAK 234 CREATEUCE ENTR PUSH 03636 C1498081 6 ZBM 235 STPV SP,UNO save unit number 03637 C0499F11 6 ZBM 236 STPVL SP,FCBADDR save FCB address 03638 DC002F0A 237 CALL UCGETMEM get a chunk of memory 03639 40440001 IMM 238 PARVL UCELOG right size for UCE 0363A EE160800 0 BASE 239 STZ2 R0,0 zero the new thing 0363B 60498081 1 6 ZBM 240 LD R1 SP,UNO get the passed unit number 0363C E4480080 1 0 ZBM 241 ST R1 R0,UCEUNIT set unit number into UCE 0363D 60499F11 1 6 ZBM 242 LD R1 SP,FCBADDR get back the FCB address 0363E E4481F11 1 0 ZBM 243 ST R1 R0,UCEFCB associate FCB with UCE 0363F 5D1F8002 6 STAK 244 LEAVE POP return to caller 245 * --- 246 247 END CREATEUCE subroutine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 685 (PSACOMEGO) F 37 Session makers and breakers 249 250 ********************************************************************************** 251 * * 252 * SETINITRUN. Routine that adds an initial entry to * 253 * the PSA so that it will run control mode with initial * 254 * entry. * 255 * Call: * 256 * LD R3 => new PSA * 257 * CALL SETINITRUN * 258 * PARVL control mode entry value * 259 * * 260 * Eats R0:R2. * 261 * Stack required = 1 * 262 * 1 + max ( SGETMEM (0) ) * 263 * * 264 ********************************************************************************** 265 266 BLOCK SETINITRUN subroutine 267 ENTRY SETINITRUN 268 269 BEGFRAME 270 ENDFRAME 271 03640 DD1F8001 6 STAK 272 SETINITRUN ENTR PUSH 03641 C0528000 2 REG 273 STPVL R2 R2 = entry code 03642 DC002ED0 274 CALL SGETMEM get the error block 03643 40440001 IMM 275 PARVL UERLOG indicate length for UER block 03644 EE160800 0 BASE 276 STZ2 R0,0 clean out the block 03645 6044007F 1 IMM 277 LD R1 UINTLOGIN login code 03646 E44806A0 1 0 ZBM 278 ST R1 R0,UERCODE error code sez initial entry 03647 E4960801 2 0 BASE 279 ST R2 R0,UERPARAM param sez how to set up 03648 E408DF1D 0 3 ZBM 280 ST R0 R3,PSUERROR/FLDADRS add to PSA 03649 5D1F8001 6 STAK 281 LEAVE POP 282 * --- 283 284 END SETINITRUN subroutine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 686 (PSACOMEGO) F 37 Session makers and breakers 286 287 ********************************************************************************** 288 * * 289 * BLKLIMCHK. When Control Mode is initially entered it * 290 * most definitely requests some swapping pages. This routine * 291 * checks whether there seems to be enough free disk blocks * 292 * for Control Mode to proceed normally through the logon. * 293 * The threshold was chosen as the sum of the user swapping * 294 * threshold in GETFREEBLK (GFBSWAP=64) and a rough guess * 295 * of what CM itself needs. This ensures that at least a * 296 * minimum of user activity can occur. * 297 * * 298 * Call: LD ULB * 299 * CALLNP BLKLIMCHK * 300 * ST R0 * 301 * * 302 * Eats R0:R1. * 303 * Stack required = 1 * 304 * * 305 ********************************************************************************** 306 307 BLOCK BLKLIMCHK subroutine 308 ENTRY BLKLIMCHK 309 310 BEGFRAME 311 ENDFRAME 312 0364A DD5F8001 6 STAK 313 BLKLIMCHK ENTRNP PUSH 0364B 60090081 0 4 ZBM 314 LD R0 ULB,ULDRIVE drive where this account resides 0364C 60201F22 0 0 315 LD R0 VOLNTABLE(R0) get pointer to VOLN element 0364D 6056081C 1 0 BASE 316 LD R1 R0,VOLNFREBLK number of free blocks on this volume 0364E 1856081A 1 0 BASE 317 ADD R1 R0,VOLNFRECNT add in count of resident blocks 0364F 60040000 0 IMM 318 LD R0 0 assume no error is happening 03650 64440064 1 IMM 319 CPR R1 MINBLKLIM compare count against the minimum 03651 FE063653 320 JGE BLCEXIT jump if everything checks out 03652 6004009D 0 IMM 321 LD R0 XREQERNFSV no free storage on volume 00003653 322 BLCEXIT LABEL 03653 5D1F8001 6 STAK 323 LEAVE POP return 324 * --- 325 00000064 ABS 326 MINBLKLIM EQU 100 threshold minimum free block count 327 328 END BLKLIMCHK subroutine 329 330 331 END PSACOMEGO PSA Makers and Breakers 63 INPUT GETPUTADT free disk managers 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 687 (GETPUTADT) F 38 Disk Free Space Managers 3 4 GETPUTADTB BLOCK routines that get and put disk blocks 5 6 ENTRY GETFREEBLK get a free disk block 7 ENTRY PUTFREEBLK return a free block 8 ENTRY GPREADSEC read in the security block 9 ENTRY GPWRITSEC write out the security block 10 ENTRY REBUILDADT initialize or rebuild the ADT structures 11 12 ********************************************************************************** 13 * * 14 * ADT Routines * 15 * The following routines are a nightmare of code that * 16 * performs the, on the surface, simple operation of fetching * 17 * and returning free blocks on volumes. These routines run * 18 * with the I/O interrupts disabled, possibly queueing the * 19 * calling process, and using WNDO3 to access the disk. * 20 * * 21 * The lock "VOLNFBZY" controls the major critical region * 22 * consisting of assorted flags and counters and a resident * 23 * list of free blocks for that volume. This critical region * 24 * is entered/exited with PLOCK/PUNLOCK and runs with the * 25 * interrupts off (of course). Most calls to get or put * 26 * blocks will simply enter this region and remove or enter * 27 * blocks in the list. * 28 * * 29 * If the resident list has too few or too many entries, * 30 * then the major part of the code is entered. The lock * 31 * "VOLNADTF" controls its own "virtual" critical region. * 32 * This "virtual" critical region may be run with the * 33 * interrupts on and may get page faults. To enter or leave * 34 * this inside region the outside region must be closed but * 35 * once inside the inner region the outside region may be * 36 * opened. This code twiddles with the disk ADT ("Available * 37 * Disk Table") to either increase or decrease the number of * 38 * resident blocks. There are VOLFREEN resident block * 39 * addresses possible. If there are too many blocks resident * 40 * then the list is emptied until there are only VOLNFREEN/2- * 41 * VOLNFREDSP blocks resident (i.e., it is assumed the current * 42 * tendency is to free blocks). If there are too few blocks * 43 * resident then the list is filled until there are VOLNFREEN * 44 * /2+VOLNFREDSP blocks resident (i.e., it is assumed the * 45 * current tendency is to use blocks). The resident list is * 46 * considered nearly empty when there are fewer than * 47 * VOLNFREMIN blocks resident and too full if more than * 48 * VOLNFREEN-VOLNFREMIN are resident. * 49 * * 50 * GETFREEBLK is passed the FBI type that the requested * 51 * block will become. This is used strictly to know when to * 52 * pass back a 'disk full' error. We wish to stop file * 53 * creation and swapping first, but we must allow control mode * 54 * to get swapping pages so that the error can be reported. * 55 * * 56 * PUTFREEBLK may be called with a fake MS address of all * 57 * ones when the volume is being dismounted or the system shut * 58 * down. When this occurs, PUTFREEBLK will empty the resident * 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 688 (GETPUTADT) F 38 Disk Free Space Managers 59 * list into the MS ADT chain and fix up the pointers and * 60 * counts in the security block. The "system running" flag is * 61 * also cleared, so that each dismounted volume will look * 62 * clean. PUTFREEBLK and GETFREEBLK are put out of commission * 63 * by the cleanup call. The MOUNTNAME code must be run to * 64 * re-initialize the pointers. * 65 * * 66 * On each volume the ADT consists of up to eight lists * 67 * of blocks with each block holding up to ADTECNT free block * 68 * addresses. The volume's security block gives pointers to * 69 * the beginning and end of each of these lists and the number * 70 * of free blocks within each (the blocks of the lists * 71 * themselves are also counted as free). When an ADT list is * 72 * busy the pointer to the end of the list is destroyed in the * 73 * security block and the list is added to forward and used up * 74 * backward. If, while removing free blocks from the ADT, a * 75 * list is emptied, the security block is consulted and the * 76 * pointers for a new ADT list are fetched. If a list gets * 77 * more than one-eighth of the volume's total blocks in it, * 78 * the security block is consulted and a new ADT list is * 79 * begun. Hairyness is encountered if an error is found when * 80 * referencing an ADT block (mass storage or parity error). * 81 * The security block is consulted to find the beginning of * 82 * the current list and the list is searched forward until a * 83 * forward pointer is found which points to the (a) bad block. * 84 * The free blocks are counted during this search. Then, the * 85 * last good block is used as the new current ADT block. * 86 * * 87 * While the ADT mangler is waiting on the disk it * 88 * unlocks the resident list of free blocks. This may cause * 89 * some processes to discover that the list is either * 90 * completely empty or completely full. In this case the * 91 * process is placed in the ADT wait queue to wait for the ADT * 92 * mangler to finish getting or putting ADT blocks. * 93 * * 94 * Note that effectively all blocks get added to the ADT * 95 * by the PPUTADT mechanism. The freefile process maps in * 96 * each block to be freed, overwrites it with ones, and sets * 97 * the FBI to indicate free. The PPUTADT bit is set in the * 98 * PPL to indicate that this block is to be entered into the * 99 * ADT. The page is now removed from the working set of the * 100 * freefile process. However, another process may retain the * 101 * page in its working set extension list. The physical page * 102 * then, may remain resident for a considerable time. * 103 * * 104 * When the page finally ages out of everyones WSX, the * 105 * DONEPPL routine queues up an idle write request for the * 106 * page. After the write, DONEPPL detects the PPUTADT bit * 107 * (this time the page is clean ). The PPL is marked as * 108 * having unknown contents and the PUTADT routine is called. * 109 * It queues up an entry for the PADT process which finally * 110 * makes the ADT entry. This is all done because the block * 111 * number must not be entered into the ADT until the block is * 112 * no longer resident. If it were, the block number could be * 113 * given to a process that would request a zeropage. Since * 114 * the zeropage mechanism does not check for a page already * 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 689 (GETPUTADT) F 38 Disk Free Space Managers 115 * resident, we would end up with two physical pages of main * 116 * memory named for the same MS block. This is a bad show! * 117 * * 118 * One disaster may occur -- there are two copies of the * 119 * security block and if they both become unreadable the * 120 * volume is unusable and what am I to do? (PUNT!) * 121 * * 122 ********************************************************************************** 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 690 (GETPUTADT) F 38 Disk Free Space Managers 124 125 ********************************************************************************** 126 * * 127 * GETFREEBLK * 128 * Call this routine to acquire the MS address of an * 129 * available (unused) block. This unused block will be filled * 130 * with 0FFFFFFFF and the FBI will indicate type 'free'. This * 131 * prevents security breaches following crashes. It is not * 132 * intended, however, that these free blocks be read without * 133 * further initialization. * 134 * The first parameter (block type) is used only for * 135 * control in the event of disk space shortage. A table decode * 136 * produces a threshold by which we prioritize the request. * 137 * This allows vital system functions to continue while less * 138 * critical requests are denied (the latter receive "disk full"). * 139 * * 140 * Call: * 141 * no lists locked * 142 * SP = stack pointer * 143 * CALL GETFREEBLK * 144 * PARV * 145 * PARVL volume number * 146 * * 147 * returns with: * 148 * R0 = block number (volume*BITS 0:7+diskblock*BITS 8:31) * 149 * condition bits = EQ - success * 150 * GT - no free space * 151 * The calling process may be queued or might be used to access the * 152 * ADT blocks on the disk. * 153 * * 154 * Eats R1:R3. * 155 * Stack required = 15 * 156 * 4 + max ( CANOPMSG (1), DQUEONE (4), FORCEWRW3 (5), * 157 * FREEFILE (3), GENOPMSG (1), GPREADSEC (5), * 158 * GPWRITESEC (6), GRUBWNDO3 (7), LOCKWAIT (0), * 159 * MAPOUTFBI (2), MAPVOLNFBI(2), P12TOCHAR (6), * 160 * REBUILDADT(11), SAVEVLNFBI(1), SETWNDO3 (4), * 161 * SFREEMEM (0), SGETMEM (0), SUSPENDME (0), * 162 * TIMENOW (1), TRACEPROC (3), UNSUBS (7) ) * 163 * * 164 ********************************************************************************** 165 166 BLOCK GETFREEBLK and PUTFREEBLK subroutines 167 ENTRY GETFREEBLK 168 ENTRY PUTFREEBLK 169 170 BEGFRAME 00178801 6 BASE 171 GETFREBLKT BSS 1 temp location 00178802 6 BASE 172 GETBLKTMP BSS 1 holds head address when making new ADT chain 00178803 6 BASE 173 GETBLKLIM BSS 1 holds limit while going to mass storage 174 ENDFRAME 175 000BC010 7 CBM 176 VOLNADTGT EQU R7/BIT 0 0<=putting block, 1<=getting block 177 03654 DD1F8004 6 STAK 178 GETFREEBLK ENTR PUSH 03655 C152C000 3 REG 179 STPV R3 save block type requested 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 691 (GETPUTADT) F 38 Disk Free Space Managers 03656 C0528000 2 REG 180 STPVL R2 get volume number 03657 603636B8 0 3 @ 181 LD R0 @GFBDECP(R3) decode the FBI type 03658 6404003F 0 IMM 182 CPR R0 GFBSWP is the current program asking for a swap? 03659 FE0C365E 183 JNE GETNOTCM jump if not 0365A 60C00414 3 184 LD R3 CPCUPC get the current UPC pointer 0365B 5C08C610 3 ZBM 185 CMZ R3,UPCNTLMODE see if the program running is control mode 0365C FE02365E 186 JEQ GETNOTCM jump if not 0365D 60040002 0 IMM 187 LD R0 GFBSYS control mode MUST get his swaps! 188 * \ / 189 0000365E 190 GETNOTCM LABEL 0365E E4178803 0 6 BASE 191 ST R0 SP,GETBLKLIM save the limit for this caller 0365F 60E41F22 3 2 192 LD R3 VOLNTABLE(R2) get VOLN element pointer 193 * \ / 194 195 ********************************************************************************** 196 * * 197 * Lock resident list and see if there is a free block to * 198 * get. We come here after a trip to mass storage. * 199 * * 200 ********************************************************************************** 201 202 * \ / 00003660 203 GETFRFREW LABEL 204 PLOCK R3,VOLNFBZY wait for list of free blocks 03660 0CC00000 204 IOFF 03661 D1D6C80C 3 BASE 204 SETT R3,VOLNFBZY 03662 FE0C3664 204 JNE MA(2+DISPW MA 0) 03663 DC40308B 204 CALLNP LOCKWAIT 205 * \ / 206 207 ********************************************************************************** 208 * * 209 * This special code is for the disk initializer. If * 210 * this counter and list exist, then GETFREEBLK uses this * 211 * counter to assign sequential block numbers from the disk. * 212 * The list is used to skip the bad blocks. * 213 * If PUTFREEBLK is called, those blocks go back into the * 214 * regular list, so the counter and list head do not interfere * 215 * with the regular free block variables. * 216 * Note that while the initial disk space is in use, no * 217 * disk space overflow checking is done. We don't have a * 218 * counter anyway. * 219 * * 220 ********************************************************************************** 221 222 * \ / 223 * VOLNFBZY Plocked 03664 5C16C819 3 BASE 224 CMZ R3,VOLNBCNTR disk initializing? 03665 FE023672 225 JEQ NORMALGET jump if not 226 * \ / 227 228 * find next consecutive good block 03666 6096C818 2 3 BASE 229 LD R2 R3,VOLNINLIST ptr to head element of bad trax list 00003667 230 GETSPAGAIN LABEL 03667 BC16C819 0 3 BASE 231 INCL R0 R3,VOLNBCNTR get the next available block 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 692 (GETPUTADT) F 38 Disk Free Space Managers 03668 64168801 0 2 BASE 232 CPR R0 R2,VINBLOCK is this number bad? 03669 FE0C3685 233 JNE GIVEBLOCK jump if not, give out this number 0366A 60568800 1 2 BASE 234 LD R1 R2,VINLINK get link to next element 0366B E456C818 1 3 BASE 235 ST R1 R3,VOLNINLIST remove head element from list 0366C DC002F5D 236 CALL SFREEMEM free current element 0366D 41440001 IMM 237 PARV VINLOG indicate length 0366E 40528000 2 REG 238 PARVL R2 and location 0366F 6096C818 2 3 BASE 239 LD R2 R3,VOLNINLIST ptr to head element of bad trax list 03670 FAB23667 2 240 JNZA R2 GETSPAGAIN jump back if not list end 03671 EC16C819 3 BASE 241 STZ R3,VOLNBCNTR indicate special fetch done 242 * \ / 243 244 * check resident list level 00003672 245 NORMALGET LABEL 03672 6016C81A 0 3 BASE 246 LD R0 R3,VOLNFRECNT get size of resident list 03673 1816C81C 0 3 BASE 247 ADD R0 R3,VOLNFREBLK add total remaining on volume 03674 64178803 0 6 BASE 248 CPR R0 SP,GETBLKLIM check against allowed total 03675 FE04367A 249 JGT GETREQOK jump if sufficient space left to allow request 00003676 250 GPSOOS LABEL give out of storage error 251 PUNLOCK R3,VOLNFBZY clear the local list busy flag 03676 EC16C80C 3 BASE 251 STZ R3,VOLNFBZY 03677 0C800000 251 ION 03678 5C040001 IMM 252 CMZ 1 make condition bits GT 03679 FE0E368A 253 JMP GETFRRTN and return failure to caller 254 * --- 255 256 * resident list has a block, BUT warn operator if shortage appearing 0000367A 257 GETREQOK LABEL 0367A 64040100 0 IMM 258 CPR R0 BLKWRNMIN getting low on blocks? 0367B FE0A368C 259 JLE DISKLOW if so send warning 260 * \ / 261 262 * check whether resident list needs refreshing 0000367C 263 GETNUMRES LABEL 0367C 6056C81A 1 3 BASE 264 LD R1 R3,VOLNFRECNT get number of free blocks resident 0367D 64440005 1 IMM 265 CPR R1 VOLNFREMIN is there plenty for everyone? 0367E FE043682 266 JGT GETFRPLNTY jump if so 267 * \ / 268 269 ********************************************************************************** 270 * * 271 * Momentous decision! The resident list looks real close * 272 * to empty. Set-and-test the flag saying that blocks must * 273 * be moved from the disk ADT to the resident list. If the * 274 * flag was clear, we must do the chore ourselves. Else, * 275 * someone else is already doing it: if even one resident * 276 * entry exists, we can take it ... else we must suspend * 277 * the user until the ADT process gets something. * 278 * * 279 ********************************************************************************** 280 281 * \ / 0367F D1D6C80D 3 BASE 282 SETT R3,VOLNADTF someone already getting more blocks? 03680 FE0C36F7 283 JNE GETFRADT if not, handle disk ADT ourselves 03681 FA4236F2 1 284 JEQZ R1 GETFRQUE else, suspend user if nothing available 285 * \ / 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 693 (GETPUTADT) F 38 Disk Free Space Managers 286 287 ********************************************************************************** 288 * * 289 * There are enough resident entries to allow the current * 290 * request. Use the free block counter to form index to * 291 * resident list. * 292 * * 293 ********************************************************************************** 294 295 * \ / 296 * R1 = count resident free blocks (>0) 00003682 297 GETFRPLNTY LABEL 03682 601CC81E 0 31 BASE 298 LD R0 R3,VOLNFREE(R1-1) get a free block 03683 EC1CC81E 31 BASE 299 STZ R3,VOLNFREE(R1-1) destroy the old one (helps debugging) 03684 D056C81A 3 BASE 300 DEC R3,VOLNFRECNT decrement count of resident free 00003685 301 GIVEBLOCK LABEL 03685 6048C086 1 3 ZBM 302 LD R1 R3,VOLNNUM 03686 E44A0080 1 0 CBM 303 ST R1 R0/VOLFIELD place volume number with disk block 304 305 * VOLNFBZY Plocked 306 00003687 307 PUTFRRTN LABEL 308 PUNLOCK R3,VOLNFBZY say I'm no longer busy with the lists 03687 EC16C80C 3 BASE 308 STZ R3,VOLNFBZY 03688 0C800000 308 ION 309 * \ / 310 00003689 311 PUTRTN1 LABEL 03689 5C040000 IMM 312 CMZ 0 set condition equal 0000368A 313 GETFRRTN LABEL 0368A D80BDA20 7 CBM 314 STPSR R7/BITS 13:14 return condition bits 0368B 5D1F8004 6 STAK 315 LEAVE POP return 316 * --- 317 0000368C 318 DISKLOW LABEL 0368C 5C16C81E 3 BASE 319 CMZ R3,VOLNLOMSN is the message already sent 0368D FE0C367C 320 JNE GETNUMRES if so then don't resend it 321 * \ / 0368E E4D78802 3 6 BASE 322 ST R3 SP,GETBLKTMP save R3 0368F DC002ED0 323 CALL SGETMEM get an OPMSG block 03690 40440005 IMM 324 PARVL OPMSGLOG size to get 03691 60D20000 3 0 REG 325 LD R3 R0 R3 -> OPMSG block 326 03692 3896C802 2 3 BASE 327 LEA R2 R3,OPMSGTEXT 03693 600436A6 0 IMM 328 LD R0 ADR DSKSPAM where the message is 03694 60440028 1 IMM 329 LD R1 DSKSPAML how long it is 03695 FE400000 330 CMOVE and move the message in 331 03696 E4D78801 3 6 BASE 332 ST R3 SP,GETFREBLKT save pointer to message block 03697 60D78802 3 6 BASE 333 LD R3 SP,GETBLKTMP restore pointer to VOLN entry 03698 DC005926 334 CALL P12TOCHAR put the disk name in the message 03699 4356C811 3 BASE 335 PARV2 R3,VOLNNAME pass the name 0369A 40168400 2 @R 336 PARL @R2 and pointer to destination 0369B 60D78801 3 6 BASE 337 LD R3 SP,GETFREBLKT restore pointer to message block 0369C 3816C802 0 3 BASE 338 LEA R0 R3,OPMSGTEXT get the character address of the message 0369D 604A9F30 1 2 CBM 339 LD R1 R2/FLDCHARS R2 pointed to end of message 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 694 (GETPUTADT) F 38 Disk Free Space Managers 0369E 104A1F30 1 0 CBM 340 SUB R1 R0/FLDCHARS get the number of characters in message 0369F E456C007 1 3 CACH 341 ST R1 R3,OPMSGLEN and put into the message block 342 036A0 EC08C2E0 3 ZBM 343 STZ R3,OPMSGPROC no process associated with message 036A1 DC0046F3 344 CALL GENOPMSG send the message 036A2 4052C000 3 REG 345 PARVL R3 where the message can be found 036A3 60D78802 3 6 BASE 346 LD R3 SP,GETBLKTMP restore R3 036A4 E416C81E 0 3 BASE 347 ST R0 R3,VOLNLOMSN save the message serial number 036A5 FE0E367C 348 JMP GETNUMRES continue on our merry way 349 * --- 350 036A6 4449534B 351 DSKSPAM TEXT "DISK SPACE Disk space is getting low on " 00000028 ABS 352 DSKSPAML EQU 40 353 354 ********************************************************************************** 355 * * 356 * Table to decode FBI type to number of file blocks that * 357 * must be available on the volume before that type will be * 358 * allowed. * 359 * * 360 ********************************************************************************** 361 00000002 ABS 362 GFBSYS EQU 2 system gets highest priority 0000000C ABS 363 GFBUFC EQU 12 file control structures next 00000018 ABS 364 GFBUSR EQU 24 user data structures next 0000003F ABS 365 GFBSWP EQU 63 and swaps lose very early 00000006 ABS 366 GFL EQU GFBSWP LOG 2 the field size to hold these values 367 036AF 00000002 368 GFBITDEC VFD GFL:GFBSYS,GFBSYS,GFBSYS,GFBSYS 0-3 036B0 00000002 369 VFDB GFL:GFBSYS,GFBSYS,GFBSYS,GFBSYS 04-07 036B1 0000003F 370 VFDB GFL:GFBSYS,GFBSYS,GFBSYS,GFBSWP 08-0B 036B2 00000018 371 VFDB GFL:GFBUSR,GFBUFC,GFBUFC,GFBUSR 0C-0F 036B2 0000000C 372 VFDB GFL:GFBSYS,GFBUFC,GFBUFC,GFBUFC 10-13 036B3 00000002 373 VFDB GFL:GFBUSR,GFBSYS,GFBSYS,GFBSYS 14-17 036B4 00000002 374 VFDB GFL:GFBSYS,GFBSYS,GFBSYS,GFBSYS 18-1B 036B5 00000002 375 VFDB GFL:GFBSYS,GFBSYS,GFBSYS,GFBSYS 1C-1F 036B5 00000002 376 VFDB GFL:GFBSYS,GFBSYS,GFBSYS,GFBSYS 20-23 036B6 00000002 377 VFDB GFL:GFBSYS,GFBSYS,GFBSYS,GFBSYS 24-27 036B8 018836B0 378 GFBDECP PTR GFBITDEC ptr to above table 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 695 (GETPUTADT) F 38 Disk Free Space Managers 380 381 ********************************************************************************** 382 * * 383 * PUTFREEBLK * 384 * Call this routine to give up an available MS block by * 385 * putting its address into the ADT. The block must already * 386 * have been filled with 0ffffffff and the FBI set to indicate * 387 * type 'free'. In addition, there MUST NOT be a copy of the * 388 * block in main memory! * 389 * Call: * 390 * no lists locked * 391 * SP = stack pointer * 392 * CALL PUTFREEBLK * 393 * PAR block to free * 394 * PARL volume number * 395 * * 396 * A block number of all ones is a special clean up * 397 * request that causes the resident ADT list to be dumped * 398 * to mass storage. The security block is updated to the * 399 * normal shutdown state. * 400 * it mangles R0 thru R3 but leaves R4 thru R7 unchanged. The * 401 * calling process may be queued or may be used to get at the ADT * 402 * on the disk (a small price to pay). * 403 * * 404 * Stack required = 15, See GETFREEBLK. * 405 * * 406 ********************************************************************************** 407 036B9 DD1F8004 6 STAK 408 PUTFREEBLK ENTR PUSH 036BA C1524000 1 REG 409 STPV R1 get the block number 036BB C0528000 2 REG 410 STPVL R2 get the volume number 036BC 60E41F22 3 2 411 LD R3 VOLNTABLE(R2) get VOLN element pointer 412 * \ / 413 414 ********************************************************************************** 415 * * 416 * See if the block we are freeing is substituted, and, * 417 * if so, unsubstitute it. * 418 * * 419 ********************************************************************************** 420 421 * \ / 036BD FA6C36D3 1 422 JEQMW R1 NOTSUBD1 jump if cleanup request 036BE E4578801 1 6 BASE 423 ST R1 SP,GETFREBLKT save block number 036BF E4898081 2 6 ZBM 424 ST R2 SP,GETFREBLKT/VOLFIELD save volume number 425 PLOCK SUBSLOCK lock the substitution list 036C0 0CC00000 425 IOFF 036C1 D1C01F62 425 SETT SUBSLOCK 036C2 FE0C36C4 425 JNE MA(2+DISPW MA 0) 036C3 DC40308B 425 CALLNP LOCKWAIT 036C4 60178801 0 6 BASE 426 LD R0 SP,GETFREBLKT R0 = block number (with volume) 036C5 60401F63 1 427 LD R1 SUBSLIST R1 -> substitution list 036C6 3C164801 0 1 BASE 428 LSRCH R0 R1,SUBLBAD see if block is substituted 036C7 FE0C36D0 429 JNE NOTSUBD jump if not substituted 430 PUNLOCK SUBSLOCK unlock the substitution list 036C8 EC001F62 430 STZ SUBSLOCK 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 696 (GETPUTADT) F 38 Disk Free Space Managers 036C9 0C800000 430 ION 036CA 60178801 0 6 BASE 431 LD R0 SP,GETFREBLKT get block number 432 TRACE SUBSTRACE,SUBTCALLU 036CB 5D401D32 432 XCT TRACECALL(SUBSTRACE) 036CC FEC000C1 432 NOP (SUBSTRACE*BITS 22:26)+(SUBTCALLU*BITS 27:31) 036CD DC005082 433 CALL UNSUBS unsubstitute the block 036CE 40520000 0 REG 434 PARVL R0 036CF FE0E3689 435 JMP PUTRTN1 good exit, done freeing block 436 * --- 000036D0 437 NOTSUBD LABEL 438 PUNLOCK SUBSLOCK unlock the substitution list 036D0 EC001F62 438 STZ SUBSLOCK 036D1 0C800000 438 ION 036D2 60499181 1 6 ZBM 439 LD R1 SP,GETFREBLKT/MSBLKFIELD restore block number 000036D3 440 NOTSUBD1 LABEL 441 * \ / 442 443 ********************************************************************************** 444 * * 445 * Try to place our block into the resident list. * 446 * * 447 ********************************************************************************** 448 449 * \ / 000036D3 450 PUTFRFREW LABEL 451 PLOCK R3,VOLNFBZY get access to the resident lists 036D3 0CC00000 451 IOFF 036D4 D1D6C80C 3 BASE 451 SETT R3,VOLNFBZY 036D5 FE0C36D7 451 JNE MA(2+DISPW MA 0) 036D6 DC40308B 451 CALLNP LOCKWAIT 036D7 6016C81A 0 3 BASE 452 LD R0 R3,VOLNFRECNT get the number of blocks resident 036D8 64040061 0 IMM 453 CPR R0 VOLNFREEN is the list totally full? 036D9 FE0636ED 454 JGE PUTFRQUE jump if I must wait 036DA FA6C36FD 1 455 JEQMW R1 PUTFRCLN jump if ADT clean up 036DB 7840254F 1 456 AND R1 MSBLKMASK make a clean disk address 036DC E45CC01F 1 30 BASE 457 ST R1 R3,VOLNFREE(R0) make this a free element 036DD BC56C81A 1 3 BASE 458 INCL R1 R3,VOLNFRECNT count this new entry 036DE 5C16C81E 3 BASE 459 CMZ R3,VOLNLOMSN should we remove disk low message? 036DF FE0C36E5 460 JNE REMOVEMES if it exists at least check it 461 * \ / 000036E0 462 CHEKRESBLK LABEL 036E0 6404005C 0 IMM 463 CPR R0 VOLNFREEN-VOLNFREMIN are there too many blocks resident? 036E1 FE083687 464 JLT PUTFRRTN jump if no MS activity needed 465 * \ / 466 467 ********************************************************************************** 468 * * 469 * The ADT on the disk must be played with. Check for * 470 * someone already doing it. * 471 * * 472 ********************************************************************************** 473 474 * \ / 036E2 D1D6C80D 3 BASE 475 SETT R3,VOLNADTF anyone already doing it? 036E3 FE023687 476 JEQ PUTFRRTN jump if being done - I ignore it 036E4 FE0E3700 477 JMP PUTFRADTE go to play with MS 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 697 (GETPUTADT) F 38 Disk Free Space Managers 478 * --- 479 480 ********************************************************************************** 481 * * 482 * An operator message has been sent warning of low disk * 483 * space. See if it can now be removed, and if so do it. * 484 * * 485 ********************************************************************************** 486 000036E5 487 REMOVEMES LABEL 036E5 1856C81C 1 3 BASE 488 ADD R1 R3,VOLNFREBLK get total of free blocks 036E6 64440118 1 IMM 489 CPR R1 BLKWRNMAX are there enough to remove message? 036E7 FE0836E0 490 JLT CHEKRESBLK if not then go back 491 * \ / 036E8 DC004713 492 CALL CANOPMSG cancel the operator message 036E9 4056C81E 3 BASE 493 PARVL R3,VOLNLOMSN message serial number 036EA EC16C81E 3 BASE 494 STZ R3,VOLNLOMSN say no message is left 036EB 6016C81A 0 3 BASE 495 LD R0 R3,VOLNFRECNT restore R0 (This value was incremented 496 * since R0 was loaded but will at worse start 497 * the disk writer earlier. Big deal.) 036EC FE0E36E0 498 JMP CHEKRESBLK 499 * --- 500 501 ********************************************************************************** 502 * * 503 * Queue the process to wait for a place to put the new * 504 * free block. * 505 * * 506 ********************************************************************************** 507 000036ED 508 PUTFRQUE LABEL 036ED DC00351C 509 CALL SUSPENDME put this user out of his misery 036EE 410036D3 510 PAR PUTFRFREW indicate where to restart the user 036EF 4148C086 3 ZBM 511 PARV R3,VOLNNUM this is the shutdown parameter 036F0 41001DAE 512 PAR SQADTWAIT list to suspend the user in 036F1 4016C80C 3 BASE 513 PARL R3,VOLNFBZY this is the lock field 514 * --- 515 516 ********************************************************************************** 517 * * 518 * Queue the process to wait for a free block. * 519 * * 520 ********************************************************************************** 521 000036F2 522 GETFRQUE LABEL 036F2 DC00351C 523 CALL SUSPENDME put this user out of his misery 036F3 41003660 524 PAR GETFRFREW indicate where to restart the user 036F4 4148C086 3 ZBM 525 PARV R3,VOLNNUM this is the shutdown parameter 036F5 41001DAE 526 PAR SQADTWAIT list to suspend the user in 036F6 4016C80C 3 BASE 527 PARL R3,VOLNFBZY this is the lock field 528 * --- 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 698 (GETPUTADT) F 38 Disk Free Space Managers 530 531 ********************************************************************************** 532 * * 533 * MS section * 534 * We must consult the ADT chains on mass storage because * 535 * our small resident table of free blocks is about used up. * 536 * * 537 ********************************************************************************** 538 539 * VOLNFBZY Plocked, VOLNADTF locked, R1 = resident list size 540 000036F7 541 GETFRADT LABEL 036F7 EDCBC010 7 CBM 542 STW VOLNADTGT remember we were getting 543 * \ / 544 545 ********************************************************************************** 546 * * 547 * If getting, we don't go to the disk if it's empty. If * 548 * there are no blocks in the resident list either, we have * 549 * encountered some kind of serious error. Otherwise, we * 550 * return to the resident list manager so that he may dig into * 551 * our limited supply of remaining blocks. * 552 * * 553 ********************************************************************************** 554 555 * \ / 036F8 5C08C184 3 ZBM 556 CMZ R3,VOLNADTPT check for no current block 036F9 FE0C3701 557 JNE GETPUTADT jump if there's one to go to 036FA EC16C80D 3 BASE 558 STZ R3,VOLNADTF indicate MS tables not busy after all 036FB FA4C3682 1 559 JNEZ R1 GETFRPLNTY jump if still blocks in resident table 560 * ( but not very many! ) 561 * no space at all, should not have come this way, 562 * but give appropriate response. 036FC FE0E3676 563 JMP GPSOOS go give out of storage 564 * --- 565 566 ********************************************************************************** 567 * * 568 * We need to clean up the ADT. Set the flag then enter * 569 * the disker. This sees that we are the last one through by * 570 * suspending me until I get the disker. If I am the last * 571 * freeing call to this volume, I will be the last one through * 572 * and thus ADTs get written out correctly. * 573 * * 574 ********************************************************************************** 575 576 * VOLNFBZY Plocked 577 000036FD 578 PUTFRCLN LABEL 036FD D1D6C80D 3 BASE 579 SETT R3,VOLNADTF is somebody diddling the disk? 036FE FE0236ED 580 JEQ PUTFRQUE if so, jump to await his completion 036FF EDC8C410 3 ZBM 581 STW R3,VOLNCLNUP set flag to indicate last gasp 582 * \ / 583 584 ********************************************************************************** 585 * * 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 699 (GETPUTADT) F 38 Disk Free Space Managers 586 * Too few or too many free blocks -- off to the disk we * 587 * go. * 588 * * 589 ********************************************************************************** 590 591 * VOLNFBZY Plocked, VOLNADTF locked 592 593 * \ / 00003700 594 PUTFRADTE LABEL 03700 EC0BC010 7 CBM 595 STZ VOLNADTGT remember I was putting a block 596 * \ / 597 00003701 598 GETPUTADT LABEL 03701 60000412 0 599 LD R0 CPPSA get the current PSA pointer 03702 D0080230 0 ZBM 600 INC R0,PSLOCKCNTR indicate that we have a critical region locked 03703 E5178801 4 6 BASE 601 ST R4 SP,GETFREBLKT save R4 03704 6112C000 4 3 REG 602 LD VLN R3 (because SETWNDO gets R3) 603 PUNLOCK VLN,VOLNFBZY let others use the lists while we're on the disk 03705 EC17080C 4 BASE 603 STZ VLN,VOLNFBZY 03706 0C800000 603 ION 03707 60090184 0 4 ZBM 604 LD R0 VLN,VOLNADTPT get the current ADT block address 03708 FA0C3728 0 605 JNEZ R0 GETPLISTX jump if already a list on MS 606 * \ / 607 608 ********************************************************************************** 609 * * 610 * We come here if we were putting and there is no list * 611 * at all on mass storage. We get a block, make it into an * 612 * ADT block, make a security block entry, and proceed as * 613 * usual. * 614 * * 615 ********************************************************************************** 616 617 * VOLNADTF locked 618 619 * \ / 03709 6057081A 1 4 BASE 620 LD R1 VLN,VOLNFRECNT get current index to resident list 0370A FA423767 1 621 JEQZ R1 GPADTDN jump if nothing resident either 0370B 601D081E 0 41 BASE 622 LD R0 VLN,VOLNFREE(R1-1) get next block 0370C EC1D081E 41 BASE 623 STZ VLN,VOLNFREE(R1-1) clear address as aid to debugging 0370D D057081A 4 BASE 624 DEC VLN,VOLNFRECNT reduce count 0370E E4090184 0 4 ZBM 625 ST R0 VLN,VOLNADTPT save as current ADT block MS address 0370F E4091186 0 4 ZBM 626 ST R0 VLN,VOLNMSBLK and construct MS address 03710 DC003202 627 CALL SETWNDO3 map into the window 03711 4144001A IMM 628 PARV VPCNTLLK+VPCNTLW+VPCNTLNR locked writable and noread 03712 41440000 IMM 629 PARV VPNOFCB indicate no lun associated with this block 03713 41003726 630 PAR GETPNEWBAD error address 03714 41570806 4 BASE 631 PARV VLN,VOLNBLOCK indicate MS address 03715 40443F87 IMM 632 PARVL VPFBIOLDB*FBITFREE+VPFBINEWB*FBITADT 633 634 * VOLNADTF locked, IOFF = 1, R2 => FBI from PPL, R3 => PPL, VLN => volume element 635 03716 DC4037FD 636 CALLNP SAVEVLNFBI save location of FBI in VLN 03717 EC089180 2 ZBM 637 STZ R2,FBIFLINK clear the forward link 03718 EC089182 2 ZBM 638 STZ R2,FBIBLINK the backward link 03719 EE168805 2 BASE 639 STZ2 R2,FBIACCT the account number 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 700 (GETPUTADT) F 38 Disk Free Space Managers 0371A DC40261B 640 CALLNP MAPOUTFBI unmap window, ION 0371B EC001000 641 STZ WNDO3 initialize the block as empty 0371C DC4031A3 642 CALLNP FORCEWRW3 force the ADT block to this disk 0371D DC40380E 643 CALLNP GPREADSEC read in the security block 0371E 5C001008 644 CMZ WNDO3(SECADTTOP) check for protocol error! 0371F FE023721 645 JEQ GETPNOK jump if okay 03720 001300A0 646 HALT HALTS00A0 bad VOLN table 647 * --- 00003721 648 GETPNOK LABEL 03721 60090184 0 4 ZBM 649 LD R0 VLN,VOLNADTPT get the new ADT block address 03722 E4001008 0 650 ST R0 WNDO3(SECADTTOP) set into the SEC block 03723 EDD7081B 4 BASE 651 STW VLN,VOLNFRELST indicate the size of the chain 03724 DC40381E 652 CALLNP GPWRITSEC write out the security block 03725 FE0E3729 653 JMP GETPVMAP continue on with balancing act 654 * --- 655 656 ********************************************************************************** 657 * * 658 * We couldn't read a free block from mass storage. * 659 * We don't get too upset, since we have done nothing that * 660 * depends on it. Since we may have emptied the resident list * 661 * of blocks, we just terminate this process and set going * 662 * anyone queued for ADTWAIT. * 663 * * 664 ********************************************************************************** 665 00003726 666 GETPNEWBAD LABEL error reading new ADT block 03726 DC40261B 667 CALLNP MAPOUTFBI unmap FBI, ION 03727 FE0E3767 668 JMP GPADTDN go terminate this process 669 * --- 670 00003728 671 GETPLISTX LABEL 03728 E4091186 0 4 ZBM 672 ST R0 VLN,VOLNMSBLK construct the volume address 673 * \ / 674 675 * VOLNADTF locked 676 677 * \ / 00003729 678 GETPVMAP LABEL 03729 DC003202 679 CALL SETWNDO3 get the ADT block in 0372A 41440002 IMM 680 PARV VPCNTLW+VPCNTLLK indicate writable and locked 0372B 41440000 IMM 681 PARV VPNOFCB not part of a file 0372C 410037F8 682 PAR GPADTBAD indicate error address 0372D 41570806 4 BASE 683 PARV VLN,VOLNBLOCK pass MS address 0372E 40440007 IMM 684 PARVL FBITADT indicate type expected 685 686 * VOLNADTF locked, R2 => FBI from PPL, R3 => PPL, VLN => volume element 687 * IOFF = 1, Window 3 = current ADT block 688 0372F DC4037FD 689 CALLNP SAVEVLNFBI save mapping info for FBI 03730 DC40261B 690 CALLNP MAPOUTFBI unmap window, ION 691 692 * VOLNADTF locked, Window 3 = current ADT block 693 694 * \ / 00003731 695 GPADTFREW LABEL 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 701 (GETPUTADT) F 38 Disk Free Space Managers 696 PLOCK VLN,VOLNFBZY get the list of free blocks back 03731 0CC00000 696 IOFF 03732 D1D7080C 4 BASE 696 SETT VLN,VOLNFBZY 03733 FE0C3735 696 JNE MA(2+DISPW MA 0) 03734 DC40308B 696 CALLNP LOCKWAIT 03735 6057081A 1 4 BASE 697 LD R1 VLN,VOLNFRECNT get the number of resident blocks 03736 5C090410 4 ZBM 698 CMZ VLN,VOLNCLNUP check for a cleanup request 03737 FE0C375D 699 JNE GPADTCLN pretend too many blocks in memory 03738 64440030 1 IMM 700 CPR R1 VOLNFREEN/2 see whether high or low 03739 FE0837BE 701 JLT GPADTADDIT jump if we must add 702 * \ / 703 704 ********************************************************************************** 705 * * 706 * Too many free blocks are resident - copy some to the * 707 * disk. * 708 * * 709 ********************************************************************************** 710 711 * VOLNFBZY Plocked, VOLNADTF locked, Window 3 = current ADT block 712 713 * \ / 0000373A 714 GPADTANXT LABEL 715 * R1 = VOLNFRECNT 0373A 601D081E 0 41 BASE 716 LD R0 VLN,VOLNFREE(R1-1) load the next available block address 0373B EC1D081E 41 BASE 717 STZ VLN,VOLNFREE(R1-1) destroy the old block (helps debugging) 0373C D057081A 4 BASE 718 DEC VLN,VOLNFRECNT indicate one less in the list 719 PUNLOCK VLN,VOLNFBZY unlock the resident list for others 0373D EC17080C 4 BASE 719 STZ VLN,VOLNFBZY 0373E 0C800000 719 ION 0373F 7800254F 0 720 AND R0 MSBLKMASK make it a clean address 721 * search ADT block for insertion point 03740 60C40000 3 IMM 722 LD R3 0 initialize index for ADT block 723 * \ / 724 * VOLNADTF locked, Window 3 = current ADT block 725 00003741 726 GPADTSRCH LABEL 03741 60661000 1 3 727 LD R1 WNDO3(R3) get an entry from the disk block 03742 64124000 0 1 REG 728 CPR R0 R1 is this the place to put it? 03743 FE06374B 729 JGE GPADTPLCE jump if sort location is found 03744 FAE03741 3 730 IRJ R3 GPADTSRCH count and try next location 731 * --- 732 733 ********************************************************************************** 734 * * 735 * Duplicate entry found in the ADT while adding to the * 736 * disk block. * 737 * R0= block address, R3= index into WNDO3. * 738 * * 739 ********************************************************************************** 740 00003745 741 GPADTDUPA LABEL 03745 001300A1 742 HALT HALTS00A1 duplicate entry while moving entries to disk 743 PLOCK VLN,VOLNFBZY relock the resident list 03746 0CC00000 743 IOFF 03747 D1D7080C 4 BASE 743 SETT VLN,VOLNFBZY 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 702 (GETPUTADT) F 38 Disk Free Space Managers 03748 FE0C374A 743 JNE MA(2+DISPW MA 0) 03749 DC40308B 743 CALLNP LOCKWAIT 0374A FE0E3758 744 JMP GPADTDNX recover by ignoring block 745 * --- 746 747 ********************************************************************************** 748 * * 749 * Sort position found to place free block (within each * 750 * ADT block the free block addresses are kept in descending * 751 * order -- this localizes disk usage a little and allows for * 752 * checking of duplicate entries). * 753 * * 754 ********************************************************************************** 755 756 * VOLNADTF locked, Window 3 = current ADT block 757 0000374B 758 GPADTPLCE LABEL 0374B FE023745 759 JEQ GPADTDUPA jump if duplicate entry found 760 * \ / 761 0000374C 762 GPADTPLLP LABEL 0374C E0261000 0 3 763 EXCH R0 WNDO3(R3) insert the free block into the ADT 0374D 18C40001 3 IMM 764 ADD R3 1 advance the pointer 0374E FA0C374C 0 765 JNEZ R0 GPADTPLLP jump back if still rippling 0374F EC261000 3 766 STZ WNDO3(R3) put a zero adjacent to the end 767 * \ / 768 769 ********************************************************************************** 770 * * 771 * A free block has been inserted in the ADT -- check for * 772 * ADT block full. * 773 * * 774 ********************************************************************************** 775 776 * VOLNADTF locked, Window 3 = current ADT block 777 778 * \ / 779 PLOCK VLN,VOLNFBZY relock the resident lists 03750 0CC00000 779 IOFF 03751 D1D7080C 4 BASE 779 SETT VLN,VOLNFBZY 03752 FE0C3754 779 JNE MA(2+DISPW MA 0) 03753 DC40308B 779 CALLNP LOCKWAIT 03754 D017081C 4 BASE 780 INC VLN,VOLNFREBLK count another free block on the volume 03755 D017081B 4 BASE 781 INC VLN,VOLNFRELST count another free block in this chain 03756 64C400C9 3 IMM 782 CPR R3 ADTECNT+1 is the block full (plus one for next ADT block)? 03757 FE063773 783 JGE GPADTADD jump if so 784 * \ / 785 * VOLNFBZY Plocked, VOLNADTF locked, Window 3 = current ADT block 786 00003758 787 GPADTDNX LABEL (entry after error) 03758 6057081A 1 4 BASE 788 LD R1 VLN,VOLNFRECNT get number of resident blocks 03759 64440028 1 IMM 789 CPR R1 VOLNFREEN/2-VOLNFREDSP do we have enough out? 0375A FE04373A 790 JGT GPADTANXT jump if more records need moving 0375B 5C090410 4 ZBM 791 CMZ VLN,VOLNCLNUP check for a clean up request 0375C FE023763 792 JEQ GPADTDNY jump if normal operation 793 * \ / 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 703 (GETPUTADT) F 38 Disk Free Space Managers 794 795 ********************************************************************************** 796 * * 797 * This operation is a volume clean up. We ensure that * 798 * ALL blocks are forced out, then we fix up this chain in the * 799 * security block. * 800 * * 801 ********************************************************************************** 802 803 * VOLNFBZY Plocked, VOLNADTF locked, Window 3 = current ADT block 804 * R1 = VOLNFRECNT 805 806 * \ / 0000375D 807 GPADTCLN LABEL 0375D FA44373A 1 808 JGTZ R1 GPADTANXT jump if more records need moving 809 PUNLOCK VLN,VOLNFBZY release resident lists 0375E EC17080C 4 BASE 809 STZ VLN,VOLNFBZY 0375F 0C800000 809 ION 03760 DC4031A3 810 CALLNP FORCEWRW3 force out the current ADT block 03761 EC178802 6 BASE 811 STZ SP,GETBLKTMP indicate no new list (this is cleanup) 03762 FE0E37A4 812 JMP GPADTGSB go to fix up the security block 813 * --- 814 815 ********************************************************************************** 816 * * 817 * All of the resident table information has been copied * 818 * to the image of the MS block. Force the block to mass * 819 * storage, remove ourselves from this locked region, and set * 820 * going anyone queued. * 821 * * 822 ********************************************************************************** 823 824 * VOLNFBZY Plocked, VOLNADTF locked, Window 3 = current ADT block 825 00003763 826 GPADTDNY LABEL 827 PUNLOCK VLN,VOLNFBZY release resident lists 03763 EC17080C 4 BASE 827 STZ VLN,VOLNFBZY 03764 0C800000 827 ION 03765 DC4031A3 828 CALLNP FORCEWRW3 force the block to the disk 829 830 * VOLNADTF locked, Window 3 = current ADT block 831 00003766 832 GPADTDNZ LABEL 03766 5C001000 833 CMZ WNDO3 make process wait for forcewrite 834 835 * VOLNADTF locked, Window 3 = current ADT block 836 * \ / 00003767 837 GPADTDN LABEL 03767 DC403156 838 CALLNP GRUBWNDO3 now we are done with the window 03768 60000412 0 839 LD R0 CPPSA get the current PSA pointer 03769 D0480230 0 ZBM 840 DEC R0,PSLOCKCNTR indicate critical region now freed 0376A EC17080D 4 BASE 841 STZ VLN,VOLNADTF say I'm done with the ADT thing 842 * \ / 843 0000376B 844 GPDQMOR LABEL 0376B DC00354F 845 CALL DQUEONE set anyone queued going 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 704 (GETPUTADT) F 38 Disk Free Space Managers 0376C 41001DAE 846 PAR SQADTWAIT indicate which queue 0376D 40490086 4 ZBM 847 PARVL VLN,VOLNNUM who to set going 0376E FA0C376B 0 848 JNEZ R0 GPDQMOR loop until no one left 0376F 60D30000 3 4 REG 849 LD R3 VLN voln list ptr back to R3 03770 61178801 4 6 BASE 850 LD R4 SP,GETFREBLKT restore R4 03771 F3C03689 7 851 JBF VOLNADTGT PUTRTN1 return to putting a block 03772 FE0E3660 852 JMP GETFRFREW try getting a block again 853 * --- 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 705 (GETPUTADT) F 38 Disk Free Space Managers 855 856 ********************************************************************************** 857 * * 858 * ADT list extension * 859 * An ADT block is full so get another one and extend the * 860 * current list. If the size of the current list exceeds one * 861 * eighth of the volume then shuffle off to the security block * 862 * and begin a new list instead of extending the current one. * 863 * * 864 ********************************************************************************** 865 866 * VOLNFBZY Plocked, VOLNADTF locked, Window 3 = current ADT block 867 00003773 868 GPADTADD LABEL 03773 60C010C8 3 869 LD R3 WNDO3(ADTECNT) remove the last free block from the... 03774 EC0010C8 870 STZ WNDO3(ADTECNT) ... disk list to use for new ADT block 03775 6057081D 1 4 BASE 871 LD R1 VLN,VOLNSIZE get size of volume 03776 14440008 1 IMM 872 DIV R1 SECADTNUM 03777 18440008 1 IMM 873 ADD R1 SECADTNUM calculate blocks per list 03778 6457081B 1 4 BASE 874 CPR R1 VLN,VOLNFRELST see whether this list is full 03779 ED490210 4 ZBM 875 STLLE VLN,VOLNNEWLST remember whether we're adding to this list 0377A FE0A377E 876 JLE GPADTADDX jump if a new list is to be begun 0377B DC403803 877 CALLNP MAPVOLNFBI map in block containing FBI, IOFF 0377C E4C89180 3 2 ZBM 878 ST R3 R2,FBIFLINK set up forward link 0377D DC40261B 879 CALLNP MAPOUTFBI unmap window, ION 880 * \ / 881 0000377E 882 GPADTADDX LABEL 0377E E4C91186 3 4 ZBM 883 ST R3 VLN,VOLNMSBLK save the new block number 884 PUNLOCK VLN,VOLNFBZY lists not busy for now 0377F EC17080C 4 BASE 884 STZ VLN,VOLNFBZY 03780 0C800000 884 ION 03781 DC4031A3 885 CALLNP FORCEWRW3 force the old block to the disk 886 * \ / 887 888 ********************************************************************************** 889 * * 890 * We now need to get a physical page of memory so that * 891 * we can construct the next block of the chain. Normally, * 892 * one would call for a zeropage and let the page fault * 893 * processor supply one, but that can't be done here because * 894 * that calls this ADT manager again and a deadlock is * 895 * possible (although not likely). Therefore, we fetch the * 896 * block number of an available page from the current ADT and * 897 * go to read it in. We can't be too fussy about its type * 898 * when it comes in because it might be either free or * 899 * swapping (and maybe something else if we further shortcut * 900 * the free file process). * 901 * So far as I can think at the moment, the ADT manager * 902 * is the only place in the system where a free block is * 903 * intentionally read. Just don't check its type at all. * 904 * * 905 ********************************************************************************** 906 907 * VOLNADTF locked 908 * \ / 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 706 (GETPUTADT) F 38 Disk Free Space Managers 03782 DC003202 909 CALL SETWNDO3 get the new block in 03783 41440002 IMM 910 PARV VPCNTLLK+VPCNTLW locked with write access 03784 41440000 IMM 911 PARV VPNOFCB indicate not part of a file 03785 41003796 912 PAR GPADTXTENB error address 03786 41570806 4 BASE 913 PARV VLN,VOLNBLOCK indicate MS address 03787 40440000 IMM 914 PARVL 0 pass type expected (no expectations, so don't check) 03788 60040007 0 IMM 915 LD R0 FBITADT get type indicating ADT 03789 E4088080 0 2 ZBM 916 ST R0 R2,FBITYPE and turn block into ADT block 0378A DC4037FD 917 CALLNP SAVEVLNFBI save mapping info for FBI 0378B EC089180 2 ZBM 918 STZ R2,FBIFLINK no forward link 0378C 60090184 0 4 ZBM 919 LD R0 VLN,VOLNADTPT get ptr to ADT block just filled 0378D E4089182 0 2 ZBM 920 ST R0 R2,FBIBLINK point back to old block 0378E EE168805 2 BASE 921 STZ2 R2,FBIACCT no owner 0378F DC40261B 922 CALLNP MAPOUTFBI unmap FBI for PPL, ION 03790 EC001000 923 STZ WNDO3 initialize as empty 03791 60491186 1 4 ZBM 924 LD R1 VLN,VOLNMSBLK get the address of the new ADT block 03792 5C090210 4 ZBM 925 CMZ VLN,VOLNNEWLST are we creating a new list? 03793 FE0C379F 926 JNE GPADTNEWL jump if so 03794 E4490184 1 4 ZBM 927 ST R1 VLN,VOLNADTPT this is our new current block 03795 FE0E3731 928 JMP GPADTFREW balance the ADT again 929 * --- 930 931 ********************************************************************************** 932 * * 933 * We have gotten an error reading a free block that we * 934 * are going to make into an ADT block. The proper fix is to * 935 * use VOLNADTPT to map us back to the previous block and * 936 * start over. Since the block is bad we must decrement the * 937 * list count and volume count, ADT blocks are themselves free * 938 * blocks. * 939 * * 940 ********************************************************************************** 941 942 * VOLNADTF locked 00003796 943 GPADTXTENB LABEL 03796 DC40261B 944 CALLNP MAPOUTFBI eliminate FBI of bad block 03797 DC403156 945 CALLNP GRUBWNDO3 and make bad block go away 03798 D057081B 4 BASE 946 DEC VLN,VOLNFRELST decrement the count in the list 03799 D057081C 4 BASE 947 DEC VLN,VOLNFREBLK decrement the overall count 0379A EC090210 4 ZBM 948 STZ VLN,VOLNNEWLST we have no blocks to add 0379B DC403803 949 CALLNP MAPVOLNFBI get the FBI pointer, IOFF 0379C EC089180 2 ZBM 950 STZ R2,FBIFLINK the forward block is the bad one 0379D DC40261B 951 CALLNP MAPOUTFBI unmap FBI, ION 0379E FE0E37D8 952 JMP GPADTSUBY map in the previous block and continue 953 * --- 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 707 (GETPUTADT) F 38 Disk Free Space Managers 955 956 ********************************************************************************** 957 * * 958 * A new ADT list is being made -- the security block * 959 * needs updating. * 960 * * 961 ********************************************************************************** 962 963 * VOLNADTF locked, Window 3 = current ADT block 964 0000379F 965 GPADTNEWL LABEL 0379F DC403803 966 CALLNP MAPVOLNFBI map in FBI for VLN, ION 037A0 EC089182 2 ZBM 967 STZ R2,FBIBLINK no backward place 037A1 DC40261B 968 CALLNP MAPOUTFBI unmap FBI for PPL, ION 037A2 E4578802 1 6 BASE 969 ST R1 SP,GETBLKTMP save this block number, first in new list 037A3 D057081B 4 BASE 970 DEC VLN,VOLNFRELST this block is not in last list 971 972 * VOLNADTF locked, Window 3 = current ADT block 973 000037A4 974 GPADTGSB LABEL 037A4 DC40380E 975 CALLNP GPREADSEC read in the security block 037A5 60C7FFF8 3 IMM 976 LD R3 -SECADTNUM number of entries to check 977 * \ / 978 000037A6 979 GPADTNLP LABEL 037A6 5C261018 3 980 CMZ WNDO3(SECADTBTM+SECADTNUM+R3) 037A7 FE0237AA 981 JEQ GPADTNFND jump if empty found 037A8 FAE037A6 3 982 IRJ R3 GPADTNLP 037A9 001300A3 983 HALT HALTS00A3 no free lists in use? 984 * --- 985 986 ********************************************************************************** 987 * * 988 * Place for our new list found - finish old one and * 989 * begin our new one. * 990 * * 991 ********************************************************************************** 992 993 * VOLNADTF locked, Window 3 = security block 994 000037AA 995 GPADTNFND LABEL 037AA 60090184 0 4 ZBM 996 LD R0 VLN,VOLNADTPT get last block in prior chain 037AB E4261018 0 3 997 ST R0 WNDO3(SECADTBTM+SECADTNUM+R3) fix up old bottom 037AC 6017081B 0 4 BASE 998 LD R0 VLN,VOLNFRELST get number of free blocks in old list 037AD E4261020 0 3 999 ST R0 WNDO3(SECADTCNT+SECADTNUM+R3) store the number free in list 037AE 60178802 0 6 BASE 1000 LD R0 SP,GETBLKTMP get first block in new chain 037AF FA0237BA 0 1001 JEQZ R0 GPADTSGN jump if clean up request 037B0 FAC637B9 3 1002 JGEZ R3 GPADTTML jump if R3+1 greater than table size 037B1 E4261011 0 3 1003 ST R0 WNDO3(SECADTTOP+SECADTNUM+1+R3) new top 037B2 EC261019 3 1004 STZ WNDO3(SECADTBTM+SECADTNUM+1+R3) no bottom 037B3 EC261021 3 1005 STZ WNDO3(SECADTCNT+SECADTNUM+1+R3) only the block itself 037B4 E4091186 0 4 ZBM 1006 ST R0 VLN,VOLNMSBLK setup whole MS address for SETWNDO 037B5 E4090184 0 4 ZBM 1007 ST R0 VLN,VOLNADTPT indicate current ADT block 037B6 EDD7081B 4 BASE 1008 STW VLN,VOLNFRELST only the block itself in the list 037B7 DC40381E 1009 CALLNP GPWRITSEC write out the security blocks 1010 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 708 (GETPUTADT) F 38 Disk Free Space Managers 1011 * VOLNADTF locked 1012 037B8 FE0E3729 1013 JMP GETPVMAP go map in new block and balance ADT again 1014 * --- 1015 000037B9 1016 GPADTTML LABEL 037B9 001300A6 1017 HALT HALTS00A6 attempt to create too many ADT lists 1018 * --- 1019 1020 ********************************************************************************** 1021 * * 1022 * At this point, we put out the last slept time. The * 1023 * security block writer also puts out the last known time and * 1024 * the current time correction data. * 1025 * * 1026 ********************************************************************************** 1027 1028 * VOLNADTF locked, Window 3 = security block 1029 000037BA 1030 GPADTSGN LABEL 037BA DC404532 1031 CALLNP TIMENOW get the current time 037BB E600122B 01 1032 ST2 R0 WNDO3(SECLASTSL) save time of sleep or dismount 037BC DC40381E 1033 CALLNP GPWRITSEC write out the security blocks 037BD FE0E3766 1034 JMP GPADTDNZ just return when clean up done 1035 * --- 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 709 (GETPUTADT) F 38 Disk Free Space Managers 1037 1038 ********************************************************************************** 1039 * * 1040 * Not enough free blocks resident -- get some more from * 1041 * the disk. Scan forward through ADT entries until we're at * 1042 * an empty entry. Go backwards from previous entry to the * 1043 * beginning, moving entries to VOLN list until we have enough, * 1044 * or this ADT block is empty. Interesting that this reverses * 1045 * the order of the entries (shouldn't hurt, and it would be * 1046 * difficult to move in order in a safe manner). * 1047 * * 1048 * N.B. The first loop assumes that there is at least one * 1049 * empty entry in the ADT block. If there isn't, we will * 1050 * spin into the next WNDO (probably 'excluded') and beyond ... * 1051 * * 1052 ********************************************************************************** 1053 1054 * VOLNFBZY Plocked, VOLNADTF locked, WNDO3 = current ADT block 1055 000037BE 1056 GPADTADDIT LABEL 1057 * loop to find first unused (=0) location, 1058 * assuming that there is at least one 037BE 60C40000 3 IMM 1059 LD R3 0 initial index 000037BF 1060 GPADTFND0 LABEL 037BF 5C261000 3 1061 CMZ WNDO3(R3) check for an unused location 037C0 FE0237CA 1062 JEQ GPADTSBOT exit if found 037C1 FAE037BF 3 1063 IRJ R3 GPADTFND0 move and try another 1064 * --- 1065 1066 * loop to move nonzero entries from WNDO3 to resident list 000037C2 1067 GPADTSNXT LABEL 037C2 60261000 0 3 1068 LD R0 WNDO3(R3) fetch the last entry 037C3 EC261000 3 1069 STZ WNDO3(R3) mark this location as used 037C4 BC57081A 1 4 BASE 1070 INCL R1 VLN,VOLNFRECNT one more entry in the resident list 037C5 E41D081E 0 41 BASE 1071 ST R0 VLN,VOLNFREE(R1-1) place entry into table 037C6 D057081C 4 BASE 1072 DEC VLN,VOLNFREBLK decrease volume total of available blocks 037C7 D057081B 4 BASE 1073 DEC VLN,VOLNFRELST decrease total available blocks in this ADT chain 037C8 64440038 1 IMM 1074 CPR R1 VOLNFREEN/2+VOLNFREDSP do we have enough in resident list? 037C9 FE063763 1075 JGE GPADTDNY if so, unlock the window and start user 000037CA 1076 GPADTSBOT LABEL 037CA FAE637C2 3 1077 JDR R3 GPADTSNXT move back to previous entry 1078 * \ / 1079 1080 ********************************************************************************** 1081 * * 1082 * ADT list shrinkage * 1083 * The ADT block is empty, call the free file process to * 1084 * make it available. Follow its back pointer back to the * 1085 * prior block in the ADT chain. If none exists, we've used * 1086 * up this chain and we go to the security block to start * 1087 * working on a new chain. * 1088 * * 1089 ********************************************************************************** 1090 1091 * \ / 1092 * VOLNFBZY Plocked, VOLNADTF locked, WNDO3 = current ADT block 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 710 (GETPUTADT) F 38 Disk Free Space Managers 1093 037CB D057081B 4 BASE 1094 DEC VLN,VOLNFRELST count available in this list 037CC D057081C 4 BASE 1095 DEC VLN,VOLNFREBLK count available on volume 037CD DC403803 1096 CALLNP MAPVOLNFBI get pointer to current blocks FBI, IOFF 037CE 60489182 1 2 ZBM 1097 LD R1 R2,FBIBLINK get the pointer to the prior ADT block 037CF DC40261B 1098 CALLNP MAPOUTFBI unmap FBI, ION 037D0 E0490184 1 4 ZBM 1099 EXCH R1 VLN,VOLNADTPT make prior block into current block 037D1 E4491186 1 4 ZBM 1100 ST R1 VLN,VOLNMSBLK build a full MS address 037D2 DC403156 1101 CALLNP GRUBWNDO3 wave goodbye to page 037D3 DC004FEA 1102 CALL FREEFILE call to release that block 037D4 41570806 4 BASE 1103 PARV VLN,VOLNBLOCK pass MS address of just finished block 037D5 40440000 IMM 1104 PARVL FFTUNKNOWN indicate a single block 1105 PUNLOCK VLN,VOLNFBZY let people fool with the list 037D6 EC17080C 4 BASE 1105 STZ VLN,VOLNFBZY 037D7 0C800000 1105 ION 1106 1107 * VOLNADTF locked 1108 1109 * \ / 000037D8 1110 GPADTSUBY LABEL 037D8 60090184 0 4 ZBM 1111 LD R0 VLN,VOLNADTPT is there another block in the list? 037D9 FA0237E5 0 1112 JEQZ R0 GPADTSSEC jump if another ADT list is needed 037DA E4091186 0 4 ZBM 1113 ST R0 VLN,VOLNMSBLK combine MS address with volume number 037DB DC003202 1114 CALL SETWNDO3 get the ADT page in 037DC 41440002 IMM 1115 PARV VPCNTLW+VPCNTLLK indicate locked with write access 037DD 41440000 IMM 1116 PARV VPNOFCB indicate not part of a file 037DE 410037F8 1117 PAR GPADTBAD error address 037DF 41570806 4 BASE 1118 PARV VLN,VOLNBLOCK specify the MS address 037E0 40440007 IMM 1119 PARVL FBITADT indicate type of block expected 037E1 DC4037FD 1120 CALLNP SAVEVLNFBI save the FBI address 037E2 EC089180 2 ZBM 1121 STZ R2,FBIFLINK clear forward pointer (that block 1122 * is now a free block) 037E3 DC40261B 1123 CALLNP MAPOUTFBI unmap FBI block, ION 037E4 FE0E3731 1124 JMP GPADTFREW balance the ADT again 1125 * --- 1126 1127 ********************************************************************************** 1128 * * 1129 * Get the security block to remove the list in use and * 1130 * get a new one. * 1131 * * 1132 ********************************************************************************** 1133 1134 * VOLNADTF locked 1135 000037E5 1136 GPADTSSEC LABEL 037E5 DC40380E 1137 CALLNP GPREADSEC read in the security block 037E6 60C7FFF8 3 IMM 1138 LD R3 -SECADTNUM number of entries to look at 1139 * \ / 1140 000037E7 1141 GPADTSSECL LABEL 037E7 5C261018 3 1142 CMZ WNDO3(SECADTBTM+SECADTNUM+R3) 037E8 FE0237EB 1143 JEQ GPADTSSECF jump if busy entry found 037E9 FAE037E7 3 1144 IRJ R3 GPADTSSECL increment counter and loop 037EA 001300A4 1145 HALT HALTS00A4 no ADT list busy - what was I using? 1146 * --- 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 711 (GETPUTADT) F 38 Disk Free Space Managers 1147 000037EB 1148 GPADTSSECF LABEL 037EB EC261010 3 1149 STZ WNDO3(SECADTTOP+SECADTNUM+R3) remove old list 037EC EC261020 3 1150 STZ WNDO3(SECADTCNT+SECADTNUM+R3) 037ED 64C7FFF8 3 IMM 1151 CPR R3 -SECADTNUM is this the first entry? 037EE FE0237F6 1152 JEQ GPADTOOS yes - out of storage 037EF 60261017 0 3 1153 LD R0 WNDO3(SECADTBTM+SECADTNUM-1+R3) 037F0 E4090184 0 4 ZBM 1154 ST R0 VLN,VOLNADTPT get end of next list 037F1 6026101F 0 3 1155 LD R0 WNDO3(SECADTCNT+SECADTNUM-1+R3) 037F2 E417081B 0 4 BASE 1156 ST R0 VLN,VOLNFRELST save count of free blocks in list 037F3 EC261017 3 1157 STZ WNDO3(SECADTBTM+SECADTNUM-1+R3) say the list is busy 037F4 DC40381E 1158 CALLNP GPWRITSEC write out the security blocks 037F5 FE0E37D8 1159 JMP GPADTSUBY do it to this list 1160 * --- 1161 1162 ********************************************************************************** 1163 * * 1164 * Out of storage. Fix up the tables so that we * 1165 * recognize this situation. * 1166 * * 1167 ********************************************************************************** 1168 1169 * VOLNADTF locked 1170 000037F6 1171 GPADTOOS LABEL 037F6 DC40381E 1172 CALLNP GPWRITSEC write out the security blocks 037F7 FE0E3766 1173 JMP GPADTDNZ continue processing from here 1174 * --- 1175 1176 ********************************************************************************** 1177 * * 1178 * A block went bad in the ADT -- reconstruct it. * 1179 * * 1180 ********************************************************************************** 1181 1182 * VOLNADTF locked 1183 000037F8 1184 GPADTBAD LABEL 037F8 DC40261B 1185 CALLNP MAPOUTFBI unmap PPLWINDOW, ION 037F9 DC40380E 1186 CALLNP GPREADSEC read in the security block 037FA DC403830 1187 CALLNP REBUILDADT this will find the last ADT block 037FB DC40381E 1188 CALLNP GPWRITSEC write out the security block 037FC FE0E37D8 1189 JMP GPADTSUBY rebalance the ADT lists again 1190 * --- 1191 1192 END GETFREEBLK and PUTFREEBLK subroutines 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 712 (GETPUTADT) F 38 Disk Free Space Managers 1194 1195 ********************************************************************************** 1196 * * 1197 * SAVEVLNFBI. Copies mapping information for FBI from * 1198 * PPL in R3 to the volume element pointed to by VLN. * 1199 * Call: * 1200 * physical page element> * 1201 * volume name element> * 1202 * CALLNP MAPVOLFBI * 1203 * * 1204 * Eats R0 * 1205 * Stack usage: 1 * 1206 * * 1207 ********************************************************************************** 1208 1209 BLOCK SAVEVLNFBI subroutine 1210 1211 ENTRY SAVEVLNFBI 1212 1213 BEGFRAME 1214 ENDFRAME 1215 037FD DD5F8001 6 STAK 1216 SAVEVLNFBI ENTRNP PUSH 037FE 6008CC62 0 3 ZBM 1217 LD R0 R3,PPFBIBLK get loc of FBI PM in PFPMAP 037FF E4093274 0 4 ZBM 1218 ST R0 VLN,VOLNADTFBX save in VLN element 03800 6008C4A0 0 3 ZBM 1219 LD R0 R3,PPFBIDISP get loc of FBI in page 03801 E40904A5 0 4 ZBM 1220 ST R0 VLN,VOLNADTDSP save in VLN element 03802 5D1F8001 6 STAK 1221 LEAVE POP 1222 * --- 1223 1224 END SAVEVLNFBI subroutine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 713 (GETPUTADT) F 38 Disk Free Space Managers 1226 1227 ********************************************************************************** 1228 * * 1229 * MAPVOLFBI. Maps PPLWINDOW to the page containing the * 1230 * FBI for the specified VLN element. * 1231 * Call: * 1232 * volume name element> * 1233 * CALLNP MAPVOLFBI * 1234 * FBI> * 1235 * * 1236 * Sets R2 * 1237 * Stack usage: 2 * 1238 * * 1239 ********************************************************************************** 1240 1241 BLOCK MAPVOLNFBI subroutine 1242 1243 ENTRY MAPVOLNFBI 1244 1245 BEGFRAME 00178801 6 BASE 1246 SAVER3 BSS 1 1247 ENDFRAME 1248 03803 DD5F8002 6 STAK 1249 MAPVOLNFBI ENTRNP PUSH 03804 E4D78801 3 6 BASE 1250 ST PFPTR SP,SAVER3 save a reg 03805 60893274 2 4 ZBM 1251 LD R2 VLN,VOLNADTFBX get index to PPLPFMAP 03806 0CC00000 1252 IOFF interrupts off 03807 60C400FB 3 IMM 1253 LD PFPTR PNPPLWNDO virtual page to use 03808 00E41C80 2 1254 LDPF PPLPFMAP(R2) map the window 03809 608904A5 2 4 ZBM 1255 LD R2 VLN,VOLNADTDSP get loc in window 0380A 38A5EC00 2 2 1256 LEA R2 PPLWINDOW(R2) get address of FBI 0380B 60D78801 3 6 BASE 1257 LD PFPTR SP,SAVER3 restore a reg 0380C E5C00465 7 1258 ST R7 MFBILAST say where called from 0380D 5D1F8002 6 STAK 1259 LEAVE POP 1260 * --- 1261 1262 END MAPVOLNFBI subroutine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 714 (GETPUTADT) F 38 Disk Free Space Managers 1264 1265 ********************************************************************************** 1266 * * 1267 * GPREADSEC. Routine to read in a security block. * 1268 * Will attempt the secondary block if the first is found * 1269 * to be bad. * 1270 * Uses window 3 * 1271 * * 1272 * Eats R0:R3. * 1273 * Stack required = 5 * 1274 * 1 + max ( MAPOUTFBI (2), SETWNDO3 (4) ) * 1275 * * 1276 ********************************************************************************** 1277 1278 BLOCK GPREADSEC subroutine 1279 ENTRY GPREADSEC 1280 1281 BEGFRAME 1282 ENDFRAME 1283 0380E DD5F8001 6 STAK 1284 GPREADSEC ENTRNP PUSH 0380F 60092182 0 4 ZBM 1285 LD R0 VLN,VOLNSECBK1 get primary security block address 1286 * \ / 1287 00003810 1288 GPADTNSEC LABEL 03810 E4091187 0 4 ZBM 1289 ST R0 VLN,VOLNSMSBLK try this security block address 03811 DC003202 1290 CALL SETWNDO3 get the security block in 03812 41440002 IMM 1291 PARV VPCNTLLK+VPCNTLW locked with write access 03813 41440000 IMM 1292 PARV VPNOFCB indicate not part of a file 03814 41003819 1293 PAR GPADTSECE 03815 41570807 4 BASE 1294 PARV VLN,VOLNSECAD pass the security block address 03816 40440006 IMM 1295 PARVL FBITSEC and expected type 03817 DC40261B 1296 CALLNP MAPOUTFBI unmap FBI for PPL 03818 5D1F8001 6 STAK 1297 LEAVE POP return 1298 * --- 1299 1300 ********************************************************************************** 1301 * * 1302 * Mass storage error while reading in one of the * 1303 * security blocks. Try the secondary security block (if we * 1304 * haven't already). * 1305 * * 1306 ********************************************************************************** 1307 00003819 1308 GPADTSECE LABEL 03819 DC40261B 1309 CALLNP MAPOUTFBI release FBI mapping 0381A 60091183 0 4 ZBM 1310 LD R0 VLN,VOLNSECBK2 get secondary security block address 0381B 64091187 0 4 ZBM 1311 CPR R0 VLN,VOLNSMSBLK have we already tried this block? 0381C FE0C3810 1312 JNE GPADTNSEC jump if not 1313 * \ / fall through if double failure 1314 1315 ********************************************************************************** 1316 * * 1317 * Error in secondary security block after error in * 1318 * primary. This is a wipe out. Here we really need to * 1319 * somehow return a fatal volume error to the caller and * 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 715 (GETPUTADT) F 38 Disk Free Space Managers 1320 * dismount the volume (i.e., localize the problem to the * 1321 * users of this volume). * 1322 * * 1323 ********************************************************************************** 1324 1325 * \ / 0381D 000400A5 1326 HALT HALTD00A5 error in both security blocks 1327 * --- 1328 1329 END GPREADSEC subroutine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 716 (GETPUTADT) F 38 Disk Free Space Managers 1331 1332 ********************************************************************************** 1333 * * 1334 * GRWRITSEC. Routine calls DUALWRITE to force out the * 1335 * security blocks. * 1336 * * 1337 * Eats R0:R3. * 1338 * Stack required = 6 * 1339 * 1 + max ( DUALWRITE (5), TIMENOW (1) ) * 1340 * * 1341 ********************************************************************************** 1342 1343 BLOCK GPWRITSEC subroutine 1344 ENTRY GPWRITSEC 1345 1346 BEGFRAME 1347 ENDFRAME 1348 0381E DD5F8001 6 STAK 1349 GPWRITSEC ENTRNP PUSH 0381F DC404532 1350 CALLNP TIMENOW get the current time 03820 E6001229 01 1351 ST2 R0 WNDO3(SECLASTDT) save as last known date-time 03821 60001EEB 0 1352 LD R0 LASTCORR get the date of the last time correction 03822 E400122F 0 1353 ST R0 WNDO3(SECDATCOR) remember last date correction 03823 60001EED 0 1354 LD R0 FDATERROR get the current clock offset 03824 E400122D 0 1355 ST R0 WNDO3(SECDATERR) remember clock correction term 03825 60001EEE 0 1356 LD R0 FDATEDRFT get the current clock rate error 03826 E400122E 0 1357 ST R0 WNDO3(SECDATDRFT) remember clock drift factor 03827 60001EEF 0 1358 LD R0 TIMEZONE get the time zone info 03828 E4001226 0 1359 ST R0 WNDO3(SECTZONE) and remember that, too 03829 60C40084 3 IMM 1360 LD R3 PNWNDO3 get number of window with security block 0382A DC0031A6 1361 CALL DUALWRITE call to make two copies 0382B 60170807 0 4 BASE 1362 LD R0 VLN,VOLNSECAD get address where we found sec. block 0382C 74092182 0 4 ZBM 1363 XOR R0 VLN,VOLNSECBK1 flip - 0382D 74091183 0 4 ZBM 1364 XOR R0 VLN,VOLNSECBK2 flop to other address 0382E 40520000 0 REG 1365 PARVL R0 indicate where to write it out 0382F 5D1F8001 6 STAK 1366 LEAVE POP return 1367 * --- 1368 1369 END GPWRITSEC subroutine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 717 (GETPUTADT) F 38 Disk Free Space Managers 1371 1372 ********************************************************************************** 1373 * * 1374 * REBUILDADT. * 1375 * Routine to rebuild the ADT list whenever a MS error * 1376 * occurs on one of the ADT blocks. This routine searches * 1377 * through the chain of ADT blocks and sets VOLNADTPT to the * 1378 * end block or 0 if there is none. Note that VOLNMSBLK is * 1379 * destroyed by this routine. This routine must be called * 1380 * with the security block mapped and locked into window 3. * 1381 * The important storage locations used have the following * 1382 * meaning: VOLNADTPT contains the last known good ADT block, * 1383 * VOLNMSBLK contains the current ADT block we need to look * 1384 * at, and RBLDBLKTMP contains the the next block in the * 1385 * chain. The criteria used to determine the last good block * 1386 * is as follows: * 1387 * * 1388 * 1). Null forward pointer in FBI, current block last. * 1389 * 2). MS error, previous block last. * 1390 * 3). Not an ADT block, previous block last. * 1391 * 4). No non-zero entries, previous block last. * 1392 * * 1393 * CALL: * 1394 * WNDO3 = security block * 1395 * SP = stack pointer * 1396 * VLN = points to volume element * 1397 * CALLNP REBUILDADT * 1398 * * 1399 * Eats R0:R3. * 1400 * Stack required = 11 * 1401 * 4 + max ( GRUBWNDO2 (7), MAPOUTFBI (2), RSTRWNDO (7), * 1402 * SAVEWNDO2 (2), SETWNDO2 (4) ) * 1403 * * 1404 ********************************************************************************** 1405 1406 BLOCK REBUILDADT routine 1407 ENTRY REBUILDADT 1408 1409 BEGFRAME 00178801 6 BASE 1410 RBLDSECIND BSS 1 temp for security block index 00178802 6 BASE 1411 RBLDBLKTMP BSS 1 temp for last block looked at 00178803 6 BASE 1412 RBLDWNDO2 BSS 1 storage for call to SAVEWNDO2 1413 ENDFRAME 1414 03830 DD5F8004 6 STAK 1415 REBUILDADT ENTRNP PUSH 03831 60938000 2 6 REG 1416 LD R2 SP save the stack pointer 03832 DC00328D 1417 CALL SAVEWNDO2 save the state of window 2 03833 40168803 2 BASE 1418 PARL R2,RBLDWNDO2 address of duplicate VP element 03834 EC17081C 4 BASE 1419 STZ VLN,VOLNFREBLK don't know how many blocks we have 03835 EC090184 4 ZBM 1420 STZ VLN,VOLNADTPT assume no ADT blocks left 03836 6047FFF8 1 IMM 1421 LD R1 -SECADTNUM 1422 * \ / 1423 00003837 1424 ADTFNDLOOP LABEL 03837 5C221010 1 1425 CMZ WNDO3(SECADTTOP+SECADTNUM+R1) 03838 FE02383E 1426 JEQ ADTHAVEND jump if last ADT list looked at 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 718 (GETPUTADT) F 38 Disk Free Space Managers 03839 5C221018 1 1427 CMZ WNDO3(SECADTBTM+SECADTNUM+R1) 0383A FE023849 1428 JEQ ADTGETEND jump if this is the last list 0383B 60221020 0 1 1429 LD R0 WNDO3(SECADTCNT+SECADTNUM+R1) 0383C 9817081C 0 4 BASE 1430 ADDM R0 VLN,VOLNFREBLK count the number of free on volume 0383D FA603837 1 1431 IRJ R1 ADTFNDLOOP fall through means all lists full 1432 * \ / 1433 0000383E 1434 ADTHAVEND LABEL 0383E 6447FFF8 1 IMM 1435 CPR R1 -SECADTNUM is there any free storage? 0383F FE023845 1436 JEQ NONELEFT jump if no space at all 03840 60221017 0 1 1437 LD R0 WNDO3(SECADTBTM+SECADTNUM+R1-1) 03841 E4090184 0 4 ZBM 1438 ST R0 VLN,VOLNADTPT get end of initial list 03842 EC221017 1 1439 STZ WNDO3(SECADTBTM+SECADTNUM+R1-1) 03843 6022101F 0 1 1440 LD R0 WNDO3(SECADTCNT+SECADTNUM+R1-1) 03844 E417081B 0 4 BASE 1441 ST R0 VLN,VOLNFRELST get free blocks in list 1442 * \ / 1443 00003845 1444 NONELEFT LABEL 03845 60938000 2 6 REG 1445 LD R2 SP save address of stack pointer 03846 DC0032A0 1446 CALL RSTRWNDO restore state of window 2 03847 40168803 2 BASE 1447 PARL R2,RBLDWNDO2 address of old VP element 03848 5D1F8004 6 STAK 1448 LEAVE POP 1449 * --- 1450 1451 ********************************************************************************** 1452 * * 1453 * We have found the list to search so that we may find * 1454 * the last block. We search for the end of the chain by * 1455 * reading each block. The reason we examine the block is * 1456 * because the block may be readable but contain garbage. In * 1457 * each ADT block there should be a marker of zero to indicate * 1458 * the end of the table. Failure to find this marker causes * 1459 * us to treat that block as bad. * 1460 * * 1461 ********************************************************************************** 1462 00003849 1463 ADTGETEND LABEL 03849 E4578801 1 6 BASE 1464 ST R1 SP,RBLDSECIND save security block index 0384A EC17081B 4 BASE 1465 STZ VLN,VOLNFRELST no blocks yet in list 0384B EC090184 4 ZBM 1466 STZ VLN,VOLNADTPT and no known good ADT blocks 1467 * \ / 1468 0384C 60221010 0 1 1469 LD R0 WNDO3(SECADTTOP+SECADTNUM+R1) get list head pointer 0000384D 1470 ADTSETCNT LABEL 0384D E4091186 0 4 ZBM 1471 ST R0 VLN,VOLNMSBLK place address of next block 0384E DC0031FF 1472 CALL SETWNDO2 get the ADT block in 0384F 41440003 IMM 1473 PARV VPCNTLRO+VPCNTLLK read only and locked 03850 41440000 IMM 1474 PARV VPNOFCB indicate no lun associated 03851 41003862 1475 PAR BUMADTBLK error address 03852 41570806 4 BASE 1476 PARV VLN,VOLNBLOCK pass the block address 03853 40440007 IMM 1477 PARVL FBITADT and the FBI type expected 03854 60489180 1 2 ZBM 1478 LD R1 R2,FBIFLINK get pointer to the forward block 03855 DC40261B 1479 CALLNP MAPOUTFBI unmap FBI, ION 03856 E4578802 1 6 BASE 1480 ST R1 SP,RBLDBLKTMP save pointer to next block 1481 * \ / 1482 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 719 (GETPUTADT) F 38 Disk Free Space Managers 03857 6007FC00 0 IMM 1483 LD R0 -WPP 00003858 1484 CHKADTBLK LABEL 03858 5C201000 0 1485 CMZ WNDO2(WPP)(R0) check for end of list 03859 FE023864 1486 JEQ ADTBLKOK jump if end 0385A FA203858 0 1487 IRJ R0 CHKADTBLK 1488 * \ / fall through indicates a garbage block 1489 1490 ********************************************************************************** 1491 * * 1492 * We have been scanning an ADT to find its end and have * 1493 * discovered this block is bad. Use the previous block if * 1494 * there is one else resort to the last list. * 1495 * * 1496 ********************************************************************************** 1497 1498 * \ / 0000385B 1499 CRAPADTBLK LABEL 0385B DC403153 1500 CALLNP GRUBWNDO2 get rid of the page 0385C 60578801 1 6 BASE 1501 LD R1 SP,RBLDSECIND restore security block index 0385D 5C090184 4 ZBM 1502 CMZ VLN,VOLNADTPT were any blocks found in this list? 0385E FE0C386C 1503 JNE ADTLASTBLK jump if at least one found 1504 * \ / 1505 1506 ********************************************************************************** 1507 * * 1508 * There are no free blocks in this list -- destroy this * 1509 * list and try the previous one. * 1510 * * 1511 ********************************************************************************** 1512 1513 * \ / 0385F EC221010 1 1514 STZ WNDO3(SECADTTOP+SECADTNUM+R1) 03860 EC221020 1 1515 STZ WNDO3(SECADTCNT+SECADTNUM+R1) 03861 FE0E383E 1516 JMP ADTHAVEND use previous list 1517 * --- 1518 1519 ********************************************************************************** 1520 * * 1521 * Bad block during SETWNDO. Unmap the FBI page and act * 1522 * normal. * 1523 * * 1524 ********************************************************************************** 1525 00003862 1526 BUMADTBLK LABEL 03862 DC40261B 1527 CALLNP MAPOUTFBI unmap PPLWINDOW 03863 FE0E385B 1528 JMP CRAPADTBLK 1529 * --- 1530 1531 ********************************************************************************** 1532 * * 1533 * The blocks in the current ADT block are counted. Try * 1534 * the next block in the list. * 1535 * * 1536 ********************************************************************************** 1537 00003864 1538 ADTBLKOK LABEL 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 720 (GETPUTADT) F 38 Disk Free Space Managers 03864 18040401 0 IMM 1539 ADD R0 WPP+1 blocks counted + the block itself 03865 9817081B 0 4 BASE 1540 ADDM R0 VLN,VOLNFRELST add to growing total in list 03866 DC403153 1541 CALLNP GRUBWNDO2 we don't need this ADT anymore 03867 60091186 0 4 ZBM 1542 LD R0 VLN,VOLNMSBLK get address of current good block 03868 E4090184 0 4 ZBM 1543 ST R0 VLN,VOLNADTPT and save as the current end 03869 60178802 0 6 BASE 1544 LD R0 SP,RBLDBLKTMP is there a next block? 0386A FA0C384D 0 1545 JNEZ R0 ADTSETCNT if so, count the free blocks herein 0386B 60578801 1 6 BASE 1546 LD R1 SP,RBLDSECIND restore security block index 1547 * \ / 1548 1549 ********************************************************************************** 1550 * * 1551 * The block at the end has been found. Use this block. * 1552 * * 1553 ********************************************************************************** 1554 1555 * \ / 0000386C 1556 ADTLASTBLK LABEL 0386C 6017081B 0 4 BASE 1557 LD R0 VLN,VOLNFRELST see how many in list 0386D E4221020 0 1 1558 ST R0 WNDO3(SECADTCNT+SECADTNUM+R1) 0386E 9817081C 0 4 BASE 1559 ADDM R0 VLN,VOLNFREBLK add these to total free 0386F FE0E3845 1560 JMP NONELEFT use this list 1561 * --- 1562 1563 END REBUILDADT routine 1564 1565 END GETPUTADTB routines that get and put disk blocks 64 INPUT MONITOR instruction usage monitor 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 721 (MONITOR) F 39 Performance Monitor and Trace Routines 3 4 ********************************************************************************** 5 * * 6 * MONITRPROC. * 7 * This routine is called by the dispatcher when the * 8 * monitor flag is set. The CPU that calls us will end up * 9 * doing the monitoring of other CPUs in the system. * 10 * We monitor all of the remaining CPUs in the system * 11 * and produce a histogram of their PCs, including whether * 12 * monitor or user. In order to prevent getting a PC and * 13 * MSR that do not belong together (e.g. an interrupt occurred * 14 * between our two fetches) we request that the victim CPU * 15 * stop, then fetch the MSR and PC, then command the victim * 16 * CPU to go. This also means that our recorded PCs will * 17 * be properly associated with the actual instruction * 18 * responsible for the time spent (normally, PC will point * 19 * to the next instruction). Without the stop, it is likely * 20 * that several instructions will be executed before the PC * 21 * is fetched (since the MSR is fetched first), thereby * 22 * spreading the peaks. * 23 * Call: * 24 * SP = stack pointer * 25 * CALLNP MONITRPROC * 26 * * 27 * Eats R0:R5. * 28 * Stack required = 15. * 29 * 1 + max ( FREEZE (14), FREEZEWAIT(12), LOCKWAIT (0), * 30 * UNFREEZE (1) ) * 31 * * 32 ********************************************************************************** 33 34 BLOCK MONITORPROC subroutine 35 ENTRY MONITRPROC 36 37 BEGFRAME 38 ENDFRAME 39 03870 DD5F8001 6 STAK 40 MONITRPROC ENTRNP PUSH 41 * Remove us from list of active CPUs 03871 DC402D79 42 CALLNP FREEZE freeze the system 03872 D0401CF7 43 DEC CPUCOUNT one fewer CPUs 03873 D0401CF8 44 DEC CPUCOUNT1 one fewer unfrozen CPU 03874 60040000 0 IMM 45 LD R0 0 03875 60400415 1 46 LD R1 OURSLOT get slot where we reside 00003876 47 FINDUS LABEL 03876 64601CFB 1 0 48 CPR R1 CPUSLOTS(R0) is this our entry? 03877 FE023879 49 JEQ FOUNDUS jump if yes 03878 FA203876 0 50 IRJ R0 FINDUS else search more 51 * --- 52 00003879 53 FOUNDUS LABEL 03879 60801CF7 2 54 LD R2 CPUCOUNT 0387A 60641CFB 1 2 55 LD R1 CPUSLOTS(R2) pick up last entry in table 0387B E4601CFB 1 0 56 ST R1 CPUSLOTS(R0) overlay our entry 0387C EC241CFB 2 57 STZ CPUSLOTS(R2) and remove last entry 0387D DC402D95 58 CALLNP UNFREEZE allow the system to continue 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 722 (MONITOR) F 39 Performance Monitor and Trace Routines 59 60 * \ / 61 62 ********************************************************************************** 63 * * 64 * Main loop. We: * 65 * 1.) wait for a short interval. * 66 * 2.) for each CPU: fetch and record its PC, using the IRELOC bit for * 67 * the high order (18th) PC bit. * 68 * 3.) if we should exit, do so, else loop * 69 * * 70 ********************************************************************************** 71 72 * \ / 0000387E 73 MAINLOOP LABEL 0387E 00440064 IMM 74 WAIT 100 delay for a millisecond 75 * \ / 76 0387F 61401CF7 5 77 LD R5 CPUCOUNT get count of CPUs 00003880 78 CPULOOP LABEL 03880 602A1CFA 0 5 79 LD R0 CPUSLOTS(R5-1) get a CPU slot number 03881 60440000 1 IMM 80 LD R1 CPUREGOFST/FLDABSPG prototype page file 03882 E40A4840 0 1 CBM 81 ST R0 R1/PFSLOT put slot number into it 03883 60C40086 3 IMM 82 LD PFPTR PNCIX get I/O window page number 03884 00D24000 1 REG 83 LDPF R1 map this CPUs registers into the CIX page 03885 60C40083 3 IMM 84 LD PFPTR PNWNDO2 and use another virtual page 03886 00D650C0 1 REG 85 LDPF R1+CPUCOFFSET/FLDABSPG-CPUREGOFST/FLDABSPG to point to commands 86 PLOCK CPUCOMLOCK get access to it 03887 0CC00000 86 IOFF 03888 D1C01CF5 86 SETT CPUCOMLOCK 03889 FE0C388B 86 JNE MA(2+DISPW MA 0) 0388A DC40308B 86 CALLNP LOCKWAIT 0388B EC000C01 87 STZ WNDO2(CPUSTOP) stop this fella 0388C 60001809 0 88 LD R0 CIX(CPUMSR) get that CPUs MSR 0388D 60401808 1 89 LD R1 CIX(CPUPC) and its PC 0388E EC000C00 90 STZ WNDO2(CPURUN) make this CPU go again 91 PUNLOCK CPUCOMLOCK give up access to CPU 0388F EC001CF5 91 STZ CPUCOMLOCK 03890 0C800000 91 ION 92 03891 600A3610 0 0 CBM 93 LD R0 R0/MSRIRELOCB get relocation bit as a word 03892 E40A40F0 0 1 CBM 94 ST R0 R1/UPR15 make PC monitor or user 03893 10401D16 1 95 SUB R1 IHBASE subtract off minimum 03894 54440000 1 IMM 96 MAX R1 0 lower PCs (now negative) go into first bucket 03895 14401D17 1 97 DIV R1 IHBUKSIZE put PC into a bucket 03896 504407FF 1 IMM 98 MIN R1 IHMAX-1 use highest if PC is out of range high 03897 600A5E70 0 1 CBM 99 LD R0 R1/FLDPAGE R0 = bucket page index 03898 604A6CA0 1 1 CBM 100 LD R1 R1/DISPFIELD R1 = offset into bucket page 03899 60201D18 0 0 101 LD R0 IHBLOCKS(R0) R0 => bucket page 0389A D01C0800 01 BASE 102 INC R0,0(R1) increment the bucket 0389B FB623880 5 103 DRJ R5 CPULOOP do any other CPUs 104 * \ / 0389C 5C001D15 105 CMZ IHBUSY should we stop 0389D FE04387E 106 JGT MAINLOOP loop if not 107 * \ / 108 * We come here when we were asked to go away. Restore the CPU slot 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 723 (MONITOR) F 39 Performance Monitor and Trace Routines 109 * number list and exit. 110 * \ / 0389E 60C40086 3 IMM 111 LD PFPTR PNCIX get I/O window page number 0389F 80D2C000 3 REG 112 PFRC PFPTR clear out this PF location 038A0 60C40083 3 IMM 113 LD PFPTR PNWNDO2 and the other virtual page that we used 038A1 80D2C000 3 REG 114 PFRC PFPTR clear out this PF location 038A2 60000415 0 115 LD R0 OURSLOT get our slot number 038A3 60401CF7 1 116 LD R1 CPUCOUNT how many other CPUs 038A4 E4221CFB 0 1 117 ST R0 CPUSLOTS(R1) put us onto end of table 038A5 D0001CF7 118 INC CPUCOUNT indicate back into the running 038A6 D0001CF8 119 INC CPUCOUNT1 038A7 DC402D9A 120 CALLNP FREEZEWAIT in case we should freeze 038A8 EDC01D15 121 STW IHBUSY say that I saw the stop command 038A9 5D1F8001 6 STAK 122 LEAVE POP return 123 * --- 124 125 END MONITORPROC subroutine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 724 (MONITOR) F 39 Performance Monitor and Trace Routines 127 128 ********************************************************************************** 129 * * 130 * TRACEPROC. * 131 * Put an entry into the trace table. This routine will log * 132 * the return address, the slot number who called us, and the * 133 * contents of R0-R2. * 134 * Call: * 135 * XCT TRACECALL(CLASS) ="NOP 0" or "CALLNP TRACEPROC" * 136 * NOP (class*bits 22:26)+(event*bits 27:31) * 137 * * 138 * No registers are destroyed. * 139 * Stack required = 3. * 140 * * 141 ********************************************************************************** 142 143 BLOCK TRACEPROC subroutine 144 ENTRY TRACEPROC 145 146 BEGFRAME 00178801 6 BASE 147 SAVER0 BSS 1 save area for R0 00178802 6 BASE 148 SAVER1 BSS 1 save area for R1 149 ENDFRAME 150 151 TRINFORD LIST 151 ********************************************************************************** 151 * * 151 * Information returned by the stop trace request. * 151 * * 151 ********************************************************************************** 151 000038AA 151 TIPROTO BASE R0 00080040 0 ZBM 151 TISLOT BSSB 4 slot number of CPU creating this entry 000808A0 0 ZBM 151 TIEVENT BSSB 10 class and event number 00081D20 0 ZBM 151 TITIME BSSB 18 right bits of clock 00160801 0 BASE 151 TIR0 BSS 1 contents of R0 at time of event 00160802 0 BASE 151 TIR1 BSS 1 contents of R1 at time of event 00160803 0 BASE 151 TIR2 BSS 1 contents of R2 at time of event 151 DRCT 00000004 ABS 151 TILENGTH EQU DISPW TIPROTO entry length 151 ORG TIPROTO 152 038AA DD5F8003 6 STAK 153 TRACEPROC ENTRNP PUSH 038AB E6178801 016 BASE 154 ST2 R0 SP,SAVER0 save these registers 038AC BC001D2A 0 155 INCL R0 TRACEINDEX next entry in table 038AD 600A3080 0 0 CBM 156 LD R0 R0/BITS 24:31 index into trace buffer 038AE 60401D29 1 157 LD R1 TRACEADDR ptr to beginning of buffer 038AF 980A5EF0 0 1 CBM 158 ADDM R0 R1/BITS 15:29 add in the index 038B0 60001EE6 0 159 LD R0 FDATE(1) get current time 038B1 E4085D20 0 1 ZBM 160 ST R0 R1,TITIME and plop into buffer 038B2 6009ECA0 0 7 ZBM 161 LD R0 R7,0/BITS 22:31 038B3 E40848A0 0 1 ZBM 162 ST R0 R1,TIEVENT save the trace address 038B4 60000415 0 163 LD R0 OURSLOT 038B5 E4084040 0 1 ZBM 164 ST R0 R1,TISLOT save the cpu slot nubmer 038B6 E4964803 2 1 BASE 165 ST R2 R1,TIR2 save R2 value 038B7 60178802 0 6 BASE 166 LD R0 SP,SAVER1 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 725 (MONITOR) F 39 Performance Monitor and Trace Routines 038B8 E4164802 0 1 BASE 167 ST R0 R1,TIR1 save R1 value 038B9 60178801 0 6 BASE 168 LD R0 SP,SAVER0 038BA E4164801 0 1 BASE 169 ST R0 R1,TIR0 save R0 value 038BB 60578802 1 6 BASE 170 LD R1 SP,SAVER1 restore register 038BC 5D1F8003 6 STAK 171 LEAVE POP return 172 * --- 173 174 END TRACEPROC subroutine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 726 F 0 Performance Monitor and Trace Routines 66 67 ********************************************************************************** 68 * * 69 * Place to break the listing. * 70 * This section contains the resident I/O drivers. * 71 * * 72 ********************************************************************************** 73 74 nolist cref skip creffing rest of files 75 INPUT INTSORT interrupt entry processor 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 727 (INTSORT) F 40 User Interrupt handlers 3 4 INTSORTB BLOCK Interrupt Sort Routines 5 6 ENTRY TRACETRAP trace return 7 ENTRY UERRTRAP user error entry 8 ENTRY XCALLTRAP trap entry for XCALL instructions 9 ENTRY XREQRETURN return from XREQ processing 10 ENTRY XREQRTNX return without incrementing PC 11 ENTRY XREQTRAP user to system request 12 ENTRY BREAKOP instruction sub-op for breakpoint 13 ENTRY MONITORRTN return from XREQ, no CHKWNDO 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 728 (INTSORT) F 40 User Interrupt handlers 15 16 ********************************************************************************** 17 * * 18 * XREQ trap processor * 19 * * 20 ********************************************************************************** 21 22 BLOCK XREQTRAP routine 23 ENTRY XREQTRAP 24 ENTRY BREAKOP 25 000038BD 26 XREQTRAP LABEL 038BD 81538000 6 REG 27 STCAR SP pick up Console Area pointer 038BE E4D7880E 3 6 BASE 28 ST R3 SP,CAXOPERAND save XREQ operand 038BF 6197880D 6 6 BASE 29 LD SP SP,CASTACKPTR pick up stack area pointer 038C0 61979020 6 6 REG 30 LD SP SP+(2 POWER STAKLOG) and make actual stack pointer 038C1 DC00284A 31 CALL GRABCA exchange new CA for one in trap vector 038C2 4000040C 32 PARL IVTXREQ 038C3 0C800000 33 ION interrupts on 038C4 5D401D1B 34 XCT XHCHECK maybe log XREQ call 038C5 600A8E30 0 2 CBM 35 LD R0 R2/BITS 7:9 get the sub-op from the inst 038C6 5CA038C7 0 36 LDPC XREQJMP(R0) goto appropriate routine 37 * --- 38 39 * Processing routine entered with: 40 * SP = R6 => stack top 41 * R4 => requesters console area 42 000038C7 43 XREQJMP LABEL 038C7 000059D8 44 VFD ADR UERRORILR 038C8 000059D8 45 VFD ADR UERRORILR 038C9 00005EA8 46 VFD ADR FREQTRAP file function request 038CA 000059D8 47 VFD ADR UERRORILR 038CB 000087C7 48 VFD ADR UREQTRAP assorted user request traps 038CC 00009113 49 VFD ADR OPREQTRAP operator function request 038CD 000059D8 50 VFD ADR UERRORILR 00000007 DISP 51 BREAKOP EQU DISP XREQJMP index for next entry 038CE 00003903 52 VFD ADR BREAKINST a debugging break instruction 53 * --- 54 55 END XREQTRAP routine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 729 (INTSORT) F 40 User Interrupt handlers 57 58 ********************************************************************************** 59 * * 60 * Routine used to return from XREQs. * 61 * * 62 ********************************************************************************** 63 64 BLOCK XREQRETURN routine 65 ENTRY XREQRETURN 66 ENTRY MONITORRTN 67 000038CF 68 XREQRETURN LABEL 69 * Note: The following 5 instructions are for test purposes only. 70 * They maybe patched out without harm. 038CF 60400412 1 71 LD R1 CPPSA get pointer to PSA 038D0 60485F11 1 1 ZBM 72 LD R1 R1,PSCACHNP1 get pointer to console area 038D1 5C087611 1 ZBM 73 CMZ R1,CAMSR/MSRIRELOCB check xreq from monitor 038D2 FE0C38D4 74 JNE MONITORRTN if so, skip window check 038D3 DC40317A 75 CALLNP CHKWNDOS check if windows left mapped in 000038D4 76 MONITORRTN LABEL 038D4 0CC00000 77 IOFF disable interrupts 78 SETSP 038D5 81538000 6 REG 78 STCAR SP 038D6 6197880D 6 6 BASE 78 LD SP SP,CASTACKPTR 038D7 61979020 6 6 REG 78 LD SP SP+(2 POWER STAKLOG) 038D8 DC40285A 79 CALLNP DROPCA discard CA 038D9 61000412 4 80 LD R4 CPPSA get pointer to PSA 038DA 61091F10 4 4 ZBM 81 LD R4 R4,PSCACHN and pointer to callers CA 038DB D0091F10 4 ZBM 82 INC R4,CAPC advance PC to not re-execute XREQ 038DC 5C092C11 4 ZBM 83 CMZ R4,CAMSR/MSRTRACEIB check for single stepping instructions 038DD FE0228B7 84 JEQ DISPATCH if not, just return from request 038DE FE0E38F0 85 JMP TRACETRAP fake end of instruction trace trap 86 * --- 87 88 END XREQRETURN routine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 730 (INTSORT) F 40 User Interrupt handlers 90 91 ********************************************************************************** 92 * * 93 * Return from an XREQ without incrementing the program counter. * 94 * This is used by the requests that set interrupt conditions * 95 * in the user error list. We exit here so that the dispatcher * 96 * will go to the program controller. * 97 * Also, does not check for tracing when returning. * 98 * * 99 ********************************************************************************** 100 101 BLOCK XREQRTNX routine 102 ENTRY XREQRTNX 103 000038DF 104 XREQRTNX LABEL 038DF 0CC00000 105 IOFF disable interrupts 106 SETSP 038E0 81538000 6 REG 106 STCAR SP 038E1 6197880D 6 6 BASE 106 LD SP SP,CASTACKPTR 038E2 61979020 6 6 REG 106 LD SP SP+(2 POWER STAKLOG) 038E3 DC40285A 107 CALLNP DROPCA discard extra CA 038E4 FE0E28B7 108 JMP DISPATCH off to run the user 109 * --- 110 111 END XREQRTNX routine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 731 (INTSORT) F 40 User Interrupt handlers 113 114 ********************************************************************************** 115 * * 116 * The XCALL instructions are not yet in the CPU microcode, so * 117 * we have to simulate them. As yet we do not simulate them so here * 118 * we fake an illegal operation interrupt. * 119 * * 120 ********************************************************************************** 121 122 BLOCK XCALLTRAP routine 123 ENTRY XCALLTRAP 124 000038E5 125 XCALLTRAP LABEL 038E5 60D28000 3 2 REG 126 LD R3 R2 R3 = instruction image 038E6 60840001 2 IMM 127 LD R2 UINTUOP R2 = error code 038E7 FE0E38E8 128 JMP UERRTRAP treat as error trap 129 * --- 130 131 END XCALLTRAP routine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 732 (INTSORT) F 40 User Interrupt handlers 133 134 ********************************************************************************** 135 * * 136 * Routine to handle a user trap * 137 * * 138 ********************************************************************************** 139 140 BLOCK UERRTRAP and TRACETRAP routines 141 ENTRY UERRTRAP 142 ENTRY TRACETRAP 143 000038E8 144 UERRTRAP LABEL 145 SETSP 038E8 81538000 6 REG 145 STCAR SP 038E9 6197880D 6 6 BASE 145 LD SP SP,CASTACKPTR 038EA 61979020 6 6 REG 145 LD SP SP+(2 POWER STAKLOG) 038EB 5C093611 4 ZBM 146 CMZ R4,CAMSR/MSRIRELOCB was error from within monitor? 038EC FE0238F5 147 JEQ UERRT1 jump if a real user error 038ED 60342AF5 0 2 @ 148 LD R0 @INTMASKB(R2) get code for interrupt bits 038EE FA0C38F7 0 149 JNEZ R0 UERRT2 jump if possible 038EF 00080050 150 HALT HALTH0050 a bad instruction from the monitor 151 * --- (what is the world coming to?) 152 153 ********************************************************************************** 154 * * 155 * Come here after an XREQ that is being traced by the user * 156 * program. We fake like we got the proper interrupt by putting * 157 * the right stuff in the registers and faking the user interrupt. * 158 * * 159 ********************************************************************************** 160 000038F0 161 TRACETRAP LABEL 162 SETSP 038F0 81538000 6 REG 162 STCAR SP 038F1 6197880D 6 6 BASE 162 LD SP SP,CASTACKPTR 038F2 61979020 6 6 REG 162 LD SP SP+(2 POWER STAKLOG) 038F3 6084001F 2 IMM 163 LD R2 UINTTRACEI interrupt code to R2 038F4 60C40000 3 IMM 164 LD R3 0 other param unknown 165 * \ / 166 000038F5 167 UERRT1 LABEL 038F5 DC403589 168 CALLNP UERRSET place the error in user list 038F6 FE0E28B7 169 JMP DISPATCH return to the user 170 * --- 171 172 ********************************************************************************** 173 * * 174 * An error occurred while in the monitor and the monitor * 175 * routine says it wishes to process such errors. This is here * 176 * on the off-chance that a monitor routine would wish to use * 177 * CKB or other trapping instructions. It is also used by URLEA * 178 * to get the trap from the failed LEA. * 179 * The error codes are returned in R0, R1 and control is * 180 * passed directly back to the interrupt error address. * 181 * * 182 ********************************************************************************** 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 733 (INTSORT) F 40 User Interrupt handlers 183 000038F7 184 UERRT2 LABEL 038F7 3849001B 1 4 ZBM 185 LEA R1 R4,CAINTMASK/BIT 0 produce pointer to interrupt mask 038F8 5C1A4400 10 @R 186 CMZ @R1(R0) is this interrupt enabled? 038F9 FE023902 187 JEQ UERRTMH jump if not, this is a bad error 038FA 6017080A 0 4 BASE 188 LD R0 R4,CAINTADR get the interrupt address 038FB FA023902 0 189 JEQZ R0 UERRTMH cannot return to nothing 038FC E6970802 234 BASE 190 ST2 R2 R4,CAR0 return error info in R0, R1 038FD E4091F10 0 4 ZBM 191 ST R0 R4,CAPC place to return 038FE EDC93011 4 ZBM 192 STW R4,CAMSR/MSRSRELOCB restore monitor relocation 038FF EDC93211 4 ZBM 193 STW R4,CAMSR/MSRFRELOCB restore monitor relocation 03900 EDC93411 4 ZBM 194 STW R4,CAMSR/MSRPRELOCB restore monitor relocation 03901 FE0E28B7 195 JMP DISPATCH return to the error maker 196 * --- 197 198 * Unexpected instruction traps from the monitor 00003902 199 UERRTMH LABEL 03902 00080051 200 HALT HALTH0051 instruction trap from monitor 201 * --- 202 203 END UERRTRAP and TRACETRAP routines 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 734 (INTSORT) F 40 User Interrupt handlers 205 206 ********************************************************************************** 207 * * 208 * A break instruction is provided for debuggers so that * 209 * they can place an instruction in the execution path and get * 210 * control back. Other illegal instructions don't work because * 211 * the program can request traps on illegal instructions. * 212 * * 213 ********************************************************************************** 214 215 BLOCK BREAKINST routine 216 ENTRY BREAKINST 217 00003903 218 BREAKINST LABEL 03903 60840079 2 IMM 219 LD R2 UINTBRKINS R2 = reason for interrupt 03904 60C91F10 3 4 ZBM 220 LD R3 R4,CAPC parameter is location of instruction 03905 EC092C11 4 ZBM 221 STZ R4,CAMSR/MSRTRACEIB single stepping is to stop 03906 DC403589 222 CALLNP UERRSET set error that will pass up 03907 FE0E38DF 223 JMP XREQRTNX return from XREQ processing 224 * --- 225 226 END BREAKINST routine 227 228 229 END INTSORTB Interrupt Sort Routines 76 INPUT IOINTPROC IO interrupt processor 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 735 (IOINTPROC) F 41 I/O interrupt processor 3 4 ********************************************************************************** 5 * I/O interrupt processor * 6 * On entry here: * 7 * R2 = interrupt poll response from device * 8 * R3 = slot number causing interrupt * 9 * R4 = previous console area * 10 ********************************************************************************** 11 12 BLOCK IOINTPROC routine 13 ENTRY IOINTPROC enter here on I/O interrupts 14 00003908 15 IOINTPROC LABEL 16 SETSP 03908 81538000 6 REG 16 STCAR SP 03909 6197880D 6 6 BASE 16 LD SP SP,CASTACKPTR 0390A 61979020 6 6 REG 16 LD SP SP+(2 POWER STAKLOG) 0390B 60661ECE 1 3 17 LD R1 SLOTTABLE(R3) fetch this slots descriptor 0390C 600A4030 0 1 CBM 18 LD R0 R1/SLOTTYPE find device type causing interrupt 0390D 7845FFFF 1 IMM 19 AND R1 ONEBITS/SLOTPTR mask to field size 0390E 5CA0390F 0 20 LDPC SLOTDECODE(R0) decode device type 21 * --- 0000390F 22 SLOTDECODE LABEL 0390F 00003917 23 ADR BADTYPE 0 - empty slot 03910 00003917 24 ADR BADTYPE 1 - MCU 03911 00003917 25 ADR BADTYPE 2 - CPU ( IAPR is different ) 03912 00003918 26 ADR CHANTYPE 3 - PPU 03913 0000446A 27 ADR SSU_INT 4 - SSU 03914 00003917 28 ADR BADTYPE 5 - undef 03915 00003917 29 ADR BADTYPE 6 - undef 03916 00003917 30 ADR BADTYPE 7 - undef 31 03917 00090800 32 BADTYPE HALT HALTI0800 SLOTTABLE was garbage or interrupt 33 * --- from unbelievable slot 34 35 ********************************************************************************** 36 * Interrupt was from a channel. Determine which * 37 * controller and call its driver. * 38 ********************************************************************************** 39 00003918 40 CHANTYPE LABEL 03918 600A9080 0 2 CBM 41 LD R0 R2/IPRPPUCHAN isolate channel number (used from R0 later) 03919 614A0C00 5 0 CBM 42 LD R5 R0*PPUCHAN position channel number for PF 0391A 7D564800 5 1 BASE 43 IOR R5 R1,PPUPF make PF to talk to channel 0391B 60C40086 3 IMM 44 LD PFPTR PNCIX get the I/O page file location 0391C 00D34000 5 REG 45 LDPF R5 point to PPU channel 0391D 7C801801 2 46 IOR R2 CIX(PPUINTSTAT) clear out the int bit in the PPU, get any new ints 0391E 608AA100 2 2 CBM 47 LD R2 R2/IPRPPUSTAT isolate the interrupting status 0391F E4964802 2 1 BASE 48 ST R2 R1,PPULASTST save as last status 03920 60DC4004 3 10 BASE 49 LD R3 R1,PPUCNTLPTR(R0) get pointer to device control element 03921 600AC080 0 3 CBM 50 LD R0 R3/DEVTYPE get the device type 03922 5004000F 0 IMM 51 MIN R0 0F catch bad types 03923 78C5FFFF 3 IMM 52 AND R3 ONEBITS/DEVPTR isolate the control block pointer 03924 5CA03925 0 53 LDPC DEVICETYPE(R0) decode type of controller 54 * Processing routine entered with: 55 * R2 = PPU internal status for channel 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 736 (IOINTPROC) F 41 I/O interrupt processor 56 * R3 => controller table 57 * SP => stack top 58 * CIX = window to device 59 * --- 60 00003925 61 DEVICETYPE BASE 03925 00003935 62 ADR BADEVTYPE 00 - not legal 03926 00003994 63 ADR MSPROCINT 01 - mass storage controller 03927 00004D7B 64 ADR LPCINT 02 - line printer 03928 00003935 65 ADR BADEVTYPE 03 - not legal 03929 00003935 66 ADR BADEVTYPE 04 - not legal 0392A 00003935 67 ADR BADEVTYPE 05 - not legal 0392B 00003935 68 ADR BADEVTYPE 06 - not legal 0392C 00003935 69 ADR BADEVTYPE 07 - not legal 0392D 00004761 70 ADR CIA_INT 08 - async comm controller 0392E 000041B0 71 ADR MTPROCINT 09 - 9 track MT 0392F 000041B0 72 ADR MTPROCINT 0A - cartridge mag tape 03930 000041B0 73 ADR MTPROCINT 0B - video tape 03931 00003994 74 ADR MSPROCINT 0C - SCSI disk controller 03932 00003935 75 ADR BADEVTYPE 0D - not legal 03933 00003935 76 ADR BADEVTYPE 0E - not legal 03934 00003935 77 ADR BADEVTYPE 0F - not legal 78 DRCT 79 03935 00090801 80 BADEVTYPE HALT HALTI0801 channel table garbage or 81 * --- interrupt from unbelievable device 82 * R1 -> PPU control element 83 84 END IOINTPROC routine 77 INPUT MSREQUEST mass storage request queuer 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 737 (MSREQUEST) F 42 Mass storage request queuer 3 4 ********************************************************************************** 5 * * 6 * MSQREADREQ * 7 * This routine places a read request into the MS queue * 8 * if it is not already present. If the page is already present * 9 * in the queue, we exit directly. All users requesting a given * 10 * page get it when it becomes available. * 11 * LD R2 * 12 * LD R4 * 13 * SP = stack pointer * 14 * CALL MSREADREQ with MSQIN locked, interrupts off * 15 * note: R0, R1, and R3 are destroyed before* 16 * the parameters are passed * 17 * PARVL * 18 * R3 => VOLN element * 19 * R2 => MSQ element iff request for this * 20 * address not already present. * 21 * * 22 * Eats R0:R3 * 23 * Stack required = 1. * 24 * 1 + max ( SGETMEM (0) ) * 25 * * 26 ********************************************************************************** 27 28 BLOCK MSREADREQ subroutine 29 ENTRY MSREADREQ entry to request a transfer 30 31 BEGFRAME 32 ENDFRAME 33 03936 DD9F8001 6 STAK 34 MSREADREQ ENTRS PUSH 03937 600B0080 0 4 CBM 35 LD R0 R4/VOLFIELD get the volume requested 03938 60E01F22 3 0 36 LD R3 VOLNTABLE(R0) R3=> VOLN element 03939 6016C816 0 3 BASE 37 LD R0 R3,VOLNREADQ => first element in list 0393A 3C960801 2 0 BASE 38 LSRCH R2 R0,MSQBLOCK search for this block in read queue 0393B FE02395A 39 JEQ MSRRXITX jump if already present 40 * element not present, produce a new one 0393C DC002ED0 41 CALL SGETMEM call for a block of memory 0393D 40440002 IMM 42 PARVL MSQLOG this big 0393E EC160800 0 BASE 43 STZ R0,MSQWORDA clear this word 0393F E4960801 2 0 BASE 44 ST R2 R0,MSQBLOCK set the block number 03940 E5160802 4 0 BASE 45 ST R4 R0,MSQACTAD set actual read address 03941 EC160803 0 BASE 46 STZ R0,MSQXPTR indicate no extra PPL pointer 03942 60920000 2 0 REG 47 LD R2 R0 copy the element pointer 03943 DCD3C000 7 REG 48 EXPCS R7 go back to caller for parameters 03944 C04880F0 2 ZBM 49 STPVL R2,MSQTYPE set into the request block 03945 BC001F1A 0 50 INCL R0 DISKCOUNT increment the reads so far 03946 64001F1B 0 51 CPR R0 DISKREND time to give someone else a chance? 03947 FE06394F 52 JGE PUTEND jump if so, put this one on the end 53 * \ / 54 03948 6056C816 1 3 BASE 55 LD R1 R3,VOLNREADQ address of the read queue 03949 FA4C394B 1 56 JNEZ R1 MSNOTEMPTY 0394A 3856C816 1 3 BASE 57 LEA R1 R3,VOLNREADQ pointer to the read queue 58 * \ / 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 738 (MSREQUEST) F 42 Mass storage request queuer 59 0000394B 60 MSNOTEMPTY LABEL 0394B 60085F10 0 1 ZBM 61 LD R0 R1,MSQLINK actually get second in list 0394C E4089F10 0 2 ZBM 62 ST R0 R2,MSQLINK fix up our pointer 0394D E4885F10 2 1 ZBM 63 ST R2 R1,MSQLINK now we are second 0394E FE0E3954 64 JMP MSDONE finished here 65 * --- 66 0000394F 67 PUTEND LABEL 0394F EC001F1A 68 STZ DISKCOUNT only one every comes here 03950 60040000 0 IMM 69 LD R0 0 search for this in the pointer 03951 3856C816 1 3 BASE 70 LEA R1 R3,VOLNREADQ get the address of the queue head 03952 3C085F10 0 1 ZBM 71 LSRCH R0 R1,MSQLINK look for the end of the list 03953 E4885F10 2 1 ZBM 72 ST R2 R1,MSQLINK place this element on end of MS queue 73 * \ / 74 00003954 75 MSDONE LABEL 03954 D0001F18 76 INC DISKRBUSY increment number of MS reads 03955 6496C816 2 3 BASE 77 CPR R2 R3,VOLNREADQ equal if this is the first entry 03956 FE0C3959 78 JNE MSRRXIT if queue already exists, exit directly 03957 60040001 0 IMM 79 LD R0 1*BIT FLMSPROC MS driver start flag 03958 FC001CF6 0 80 IORM R0 FLAGS indicate that the driver must be started 81 * \ / 82 00003959 83 MSRRXIT LABEL 03959 5D1F8001 6 STAK 84 LEAVE POP 85 * --- 86 87 ********************************************************************************** 88 * * 89 * A MS request for the desired block is already present * 90 * in the MS read request queue. * 91 * It is not possible to have a find in one of the queues * 92 * if the call specified a switch in block number, because that * 93 * only happens with a newly acquired free block. The ADT * 94 * is managed such that all free blocks are written full of * 95 * garbage on the disk and purged from physical memory before * 96 * that block becomes available for re-use. * 97 * Notice that a find in one of the MS queues would prevent * 98 * the required block number switch for this user. * 99 * This situation may require re-analysis at some future * 100 * date. * 101 * * 102 ********************************************************************************** 103 0000395A 104 MSRRXITX LABEL request already in, chuck the parameters 0395A DCD3C000 7 REG 105 EXPCS R7 back to the caller 0395B C0520000 0 REG 106 STPVL R0 0395C 5D1F8001 6 STAK 107 LEAVE POP done here, return 108 * --- 109 110 END MSREADREQ subroutine 78 INPUT MSPROC mass storage driver 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 739 (MSPROC) F 43 Mass Storage Driver 3 4 BLOCK Mass Storage Driver 5 6 ENTRY MSPROC Try to schedule more I/O - entry from dispatcher 7 ENTRY MSPROCINT Disk interrupt - entry from interrupt handler 8 ENTRY MS_RESET Reset a controller - entry from INITIAL and DEADMAN 9 ENTRY CALCDRVADR Calculate drive's hardware address 10 ENTRY DISKWRUMASK WRU mask for DEADMAN 11 ENTRY DISKWRUVAL WRU value for DEADMAN 12 13 ********************************************************************************** 14 * * 15 * MASS STORAGE DATA STRUCTURES * 16 * * 17 * Each disk controller (BFDC - "Binary Formatted Disk * 18 * Controller") is represented by a block called an MCT * 19 * element (Mass storage ConTroller). These elements are * 20 * created at system initialization and never destroyed. * 21 * Each BFDC may have as many as eight disk drives * 22 * attached to it (only four unit cables are provided in the * 23 * production versions). Similarly, each MCT element points to * 24 * as many as eight MDV ("Mass storage DeVice") elements, each * 25 * of which describes one disk drive. The MDV elements are * 26 * dynamic. An MDV element is created whenever a drive comes * 27 * into existence by being powered on or having a unit plug * 28 * put into it, and an MDV element is destroyed whenever the * 29 * unit plug is removed from the drive or it is powered down. * 30 * Note that a drive that has power applied but no pack * 31 * spinning will retain an MDV element. * 32 * No operations other than head check are performed on a * 33 * drive unless it has a volume mounted on it. In this case, * 34 * the MDV contains the volume number of the volume mounted * 35 * there. The volume number is used to access the VOLN * 36 * ("VOLume Name") element, which describes the volume. * 37 * Pending I/O requests are represented by MSQ (Mass * 38 * Storage Queue") elements, which are chained off the VOLN * 39 * element in two queues: Read and Write. * 40 * Most read requests are the result of a page-fault. * 41 * The exceptions to this are the FORMAT and REINITIALIZE * 42 * operations, and the pre-fetching operation performed by * 43 * the backup requests. Each read should generally release * 44 * one or more processes from the MSWAIT queue. The read * 45 * requests come in five different flavors: normal, zeropage, * 46 * address-switch, format, and reinit. Normal requests are * 47 * handled by allocating a page of memory, and reading a * 48 * block from the disk. Zero-page requests are handled by * 49 * allocating a page of memory and zeroing it. Address- * 50 * switch requests require that a page be returned that * 51 * claims to be for one block, but the data has come from * 52 * a different block. * 53 * This is done by either: * 54 * a) Finding the real block on the idle page list and * 55 * converting it to the requested block, or * 56 * b) Finding the real block on the in-use page list, and * 57 * copying the data to another page of memory. Note that * 58 * if the page is resident, it MUST NOT be read in from * 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 740 (MSPROC) F 43 Mass Storage Driver 59 * mass storage, since the resident version may have been * 60 * modified. Or, * 61 * c) Reading in the real block, then converting it to the * 62 * requested block. * 63 * * 64 * Neither FORMAT nor REINITIALIZE are reads in the * 65 * normal sense: they do not "read" the disk, and therefore * 66 * require no PPL. Instead, they are specialized functions * 67 * most readily processed via the disk read queue. They are * 68 * indicated by bits in the MSQ element control field. * 69 * FORMAT will seek to and format the track associated * 70 * with the specified disk address. Note that formatting * 71 * is inherently a full track operation, as it must wait for * 72 * the index and do a whole track to ensure correct timing. * 73 * REINITIALIZE causes the drive/pack information in the * 74 * MDV element to be reread from the disk. This is required * 75 * following initialization (formatting) of a previously * 76 * unreadable pack, because the current MDV info is incomplete. * 77 * * 78 * The write queue may contain MSQ elements representing * 79 * one of several different kinds of writes: * 80 * IDLE-WRITE or NORMAL-WRITE * 81 * These MSQ elements are created when a PAL with PAMODIFIED * 82 * set is destroyed. These writes are the normal mechanism by * 83 * which writes to mass storage are accomplished. * 84 * FORCE-WRITE * 85 * These MSQ elements are created when a force request is * 86 * made. They are essentially the same as the normal-write * 87 * elements except that the PPL is marked FWIP (force write * 88 * in progress). If the FWIP bit is set, any new reference * 89 * to the page so marked causes the referencing process to * 90 * be suspended. Therefore, when a disk write is completed a * 91 * process may need to be released from the MSWAIT queue, just * 92 * as for a read. This type of write also causes the block to * 93 * be write checked for accuracy. * 94 * DUAL-WRITE * 95 * These MSQ elements are created when a dual-write request is * 96 * made. This is done when a given page of memory must be * 97 * written to an address other than (or in addition to) the * 98 * one represented by its PPL. The XPTR field in the MSQ is * 99 * made to point to a phony PPL-FBI combination that is used * 100 * for the extra write. Following this write the XPTR is * 101 * cleared and the MSQ element looks like a normal force-write * 102 * element. A bit is available in the control field to * 103 * prevent the normal write from taking place. This allows a * 104 * page to be written to an extra place without disturbing the * 105 * original. This type of write also causes both blocks to be * 106 * write checked for accuracy. * 107 * * 108 * * 109 * LOCKS * 110 * * 111 * Generally, all lists are locked only while being * 112 * searched or altered. * 113 * MCTELOCK is set to indicate that some CPU is actively * 114 * talking to a disk controller. While the controller is * 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 741 (MSPROC) F 43 Mass Storage Driver 115 * performing a data transfer operation, it is tied up and * 116 * cannot talk to anybody. In this case MCTBUSY is set. * 117 * While an MS request is being performed, the MSQ * 118 * element is left at the head of the queue. This allows * 119 * other processes to realize that the operation has already * 120 * been requested. Since we inspect the heads of the request * 121 * queues with them unlocked, nobody but us may remove an * 122 * element from the queue or put an element at the beginning * 123 * of a non-empty queue. We lock the queue before removing an * 124 * element, and everyone else locks the queue before adding an * 125 * element. The system has two global locks that are used to * 126 * lock the queues on all volumes simultaneously. The READ * 127 * queues are locked by MSQINLOCK, and the WRITE queues are * 128 * locked by MSQOUTLOCK. However, we must hold the MSQINLOCK * 129 * when manipulating the FWIP bit in a PPL at the conclusion * 130 * of a write. This is so that the page fault processor does * 131 * not suspend someone due to the FWIP at the same time that * 132 * we are clearing it. * 133 * * 134 * PROGRAM STRUCTURE * 135 * * 136 * The Mass Storage Driver consists of two sections: the * 137 * controller-scheduling section and the drive logic section. * 138 * The controller-scheduling section is always entered first. * 139 * Its job is to route control to the code for the various * 140 * drives at the appropriate times, so that any appropriate * 141 * activity can be done to the drive. The drive logic section * 142 * contains the code that performs the actual read and write * 143 * requests. * 144 * These two sections act as co-routines. Whenever the * 145 * code in the drive section reaches a critical point (for * 146 * example, wait for seek completion), it loads a code into R0 * 147 * and executes an "EXPCS MDV,MDVPC" instruction. This * 148 * transfers control to the scheduling section. Control will * 149 * return when the appropriate conditions are met. The drive * 150 * section loads one of the following codes into R0 before the * 151 * "EXPCS": * 152 * * 153 * MDVSTRUN - Run the drive code next time the scheduling * 154 * section is entered. This is what the drive * 155 * code does when there are no pending requests. * 156 * MDVSTSEEK - Run the drive code when it has seek end status. * 157 * This is what the drive does after starting up * 158 * a seek or rezero request. * 159 * MDVSTONCYL - Run the drive code after any other drive's * 160 * code that must be run. This is what a drive * 161 * does right before it starts something that * 162 * will tie up the controller. * 163 * MDVSTDT - The drive has just tied up the controller. * 164 * Run its code after the next interrupt from * 165 * the drive. Until then, no other drive on * 166 * the same controller can be run. * 167 * MDVSTKILL - Destroy the MDV for this drive. This is what * 168 * the drive code does when it discovers that * 169 * the physical disk drive no longer is responding. * 170 * MDVSTPFAIL - The drive routine was interrupted by a power * 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 742 (MSPROC) F 43 Mass Storage Driver 171 * failure. The drive routine returns with this * 172 * code after power-fail restart, to let the * 173 * controller scheduler know that things need * 174 * to be reset. * 175 * * 176 * When the controller-scheduling section eventually * 177 * returns to the drive section (via "EXPCS MDV,MDVPC"), * 178 * registers R0:R2 have been altered, but R3:R7 have been * 179 * restored. Note that each drive has its own stack (as part * 180 * of the MDV element). * 181 * * 182 ********************************************************************************** 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 743 (MSPROC) F 43 Mass Storage Driver 184 185 * We generate the following trace events: 186 00000001 ABS 187 MSTENTER EQU 01 Enter MSPROC, R0=PageMap, R2=PpuStatus 00000002 ABS 188 MSTSEEK EQU 02 Start Seek, R0=Unit, R1=SeekAdr 00000003 ABS 189 MSTREAD EQU 03 Start Read, R0=Unit 00000004 ABS 190 MSTRDCHK EQU 04 Get Check Segment, R0 = unit 00000005 ABS 191 MSTWRITE EQU 05 Start Write, R0=Unit, R1=TimeCode 00000006 ABS 192 MSTCHECK EQU 06 Start Check, R0=Unit, R1=TimeCode 00000007 ABS 193 MSTREZERO EQU 07 Start Rezero, R0=Unit 00000008 ABS 194 MSTINTRPT EQU 08 Interrupt, R0=PageMap, R2=PpuStatus 00000009 ABS 195 MSTSKEND EQU 09 Seek End, R0=Unit, R1=BfdStatus 0000000A ABS 196 MSTTREND EQU 0A Xfer End, R0=Unit, R1=BfdStatus, R2=PpuStatus 0000000B ABS 197 MSTLEAVE EQU 0B Leave driver, R0=PageMap 0000000C ABS 198 MSTRESET EQU 0C Reset controller, R0=PageMap, R1=0 if controller dead 0000000D ABS 199 MSTGETID EQU 0D Get Drive Id, R0=Unit 0000000E ABS 200 MSTUNLOAD EQU 0E Unload Heads, R0=Unit 0000000F ABS 201 MSTFORMAT EQU 0F Format Track, R0=Unit 202 203 204 * Operation code values for error logging: 205 00000001 ABS 206 OPSEEK EQU 01 seek operation 00000002 ABS 207 OPREZERO EQU 02 rezero operation 00000003 ABS 208 OPREAD EQU 03 read operation 209 * EQU 04 unused - was "about to read check seg" 00000005 ABS 210 OPCHKSEG EQU 05 read check segment 00000006 ABS 211 OPWRITE EQU 06 write operation 00000007 ABS 212 OPCHECK EQU 07 write-check operation 00000008 ABS 213 OPOFFSET EQU 08 offset heads for read retry 00000009 ABS 214 OPFORMAT EQU 09 format operation 215 216 217 * BFD Status Masks 218 0395D FF00FF00 219 DISKWRUMASK VFD ONEBITS/DWRUTYPE*DWRUTYPE+ONEBITS/BFDIDSTEST*BFDIDSTEST 0395E 01000000 220 DISKWRUVAL VFD DVCTBFD*DWRUTYPE+0*BFDIDSTEST 221 0395F 0F000100 222 SEEKMASK VFD 1*BFDSSRDY+1*BFDSSONCYL+1*BFDSSSKERR+1*BFDSSFAULT+1*BFDSSRSPER 03960 08000000 223 SEEKING VFD 1*BFDSSRDY status while seeking 03961 0C000000 224 SEEKOK VFD 1*BFDSSRDY+1*BFDSSONCYL value if seek is normal 225 00016540 ABS 226 PPUMASK EQU 1*PPUITOUT+1*PPUIXTRA+1*PPUIDPPE+1*PPUICONF+1*PPUIMPE+1*PPUIBCNR 227 0F000000 ABS 228 MASK1 EQU 1*BFDSSRDY+1*BFDSSONCYL+1*BFDSSSKERR+1*BFDSSFAULT 00000F00 ABS 229 MASK2 EQU 1*BFDSSWCERR+1*BFDSSLOSTD+1*BFDSSIFPE+1*BFDSSRSPER 000000FF ABS 230 MASK3 EQU 7*BFDSSHDECD+1*BFDSSCEOV+0F*BFDSSERRCD 231 03962 0F000FFF 232 XFERMASK VFD MASK1+MASK2+MASK3 relevant bits of disk status 03963 0C000000 233 XFEROK VFD 1*BFDSSRDY+1*BFDSSONCYL good disk status 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 744 (MSPROC) F 43 Mass Storage Driver 235 236 ********************************************************************************** 237 * * 238 * DISK HEAD - CRASH CHECKING ALGORITHM: * 239 * The following parameters control the disk head-crash * 240 * checking algorithm: * 241 * * 242 * HDCHKINT - Number of seconds to wait after completing * 243 * the algorithm before doing it again. * 244 * HDCHKCNT1 - Number of tracks to read on each head when * 245 * the algorithm is run. * 246 * HDCHKERR1 - Number of errors that would cause us to do * 247 * more checking. If we get fewer than * 248 * 'HDCHKERR1' errors reading 'HDCHKCNT1' * 249 * tracks, we assume that the head has not * 250 * crashed. Otherwise, we continue checking. * 251 * HDCHKCNT2 - Number of tracks to read on a head that * 252 * has failed the first check. * 253 * HDCHKERR2 - Number of errors that would cause us to * 254 * unload the heads. If we get fewer than * 255 * 'HDCHKERR2' errors reading 'HDCHKCNT2' * 256 * tracks, then we assume that the head has * 257 * not crashed. Otherwise, we unload the heads. * 258 * HDCHKCYLM - Number of cylinders to move the heads between * 259 * two successive tracks. To guarantee that the * 260 * entire disk eventually gets covered, this number * 261 * should be relatively prime to both the number * 262 * of heads and the number of cylinders on a disk. * 263 * * 264 ********************************************************************************** 265 03964 00000078 266 HDCHKINT VFD 120 re-check after 2 minutes 03965 00000001 267 HDCHKCNT1 VFD 1 check one track on each head 03966 00000001 268 HDCHKERR1 VFD 1 one error causes us to look further 03967 00000019 269 HDCHKCNT2 VFD 25 check 25 tracks if we had errors 03968 0000000A 270 HDCHKERR2 VFD 10 ten errors cause us to unload the heads 03969 0000002F 271 HDCHKCYLM VFD 47 move 47 cylinders each time 272 273 ********************************************************************************** 274 * * 275 * DRIVE COROUTINE DELAY: * 276 * * 277 * Every once in a while we need to delay activity on a * 278 * drive for a period of time to allow the hardware logic to * 279 * clear itself up. Here is the length of time DRIVEPROC is * 280 * allowed to ignore a drive coroutine. * 281 * * 282 ********************************************************************************** 283 0396A 00000320 284 IDLEPERIOD VFD 800 delay in milliseconds 285 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 745 (MSPROC) F 43 Mass Storage Driver - Controller Scheduler 288 289 BLOCK Controller-Scheduling Section 290 291 ENTRY MSPROC Try to schedule something 292 ENTRY MSPROCINT Process an interrupt 293 ENTRY MS_RESET Reset the controller 294 295 ********************************************************************************** 296 * * 297 * This is the controller-scheduling section of the mass * 298 * storage driver. We have three entry points: MSPROC, * 299 * MSPROCINT, and MS_RESET. * 300 * * 301 * MSPROC is entered by the dispatcher when someone has * 302 * set the MSPROC flag. This is done when someone adds an I/O * 303 * request to an empty queue. MSPROC must loop through each * 304 * controller, attempting to start activity. It exits * 305 * directly to DISPATCH. * 306 * * 307 * MSPROCINT is entered by the interrupt handler when a * 308 * disk interrupt occurrs. It must update status according to * 309 * the interrupt, then start activity as necessary. It is * 310 * only necessary to look at one controller when entered via * 311 * MSPROCINT. It exits directly to DISPATCH. * 312 * * 313 * MS_RESET is called by INITIAL and DEADMAN to reset a * 314 * particular controller. It will update drive statuses, then * 315 * start any necessary activity on the drive. * 316 * * 317 ********************************************************************************** 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 746 (MSPROC) F 43 Mass Storage Driver - Controller Scheduler 319 320 ********************************************************************************** 321 * * 322 * MSPROC - Entry from Dispatcher. * 323 * * 324 * We are entered here when it may be possible to start * 325 * some new I/O operations. We must scan each controller and * 326 * each device in turn to see if it is possible. * 327 * * 328 * Exits to DISPATCH. * 329 * Eats R0:R5,R7. Unmaps CIX and WNDO4. * 330 * Stack required: 6 * 331 * 0 + max ( DODISK (6), LOCKWAIT (0), PROCESSINT (6), * 332 * TRACEPROC (3) ) * 333 * * 334 ********************************************************************************** 335 336 BLOCK MSPROC routine 337 ENTRY MSPROC 338 0000396B 339 MSPROC LABEL 0396B 61C01F13 7 340 LD MCT MCTLIST get pointer to first controller 0396C FBF03991 7 341 JZA MCT DONE jump if none (unusual, to say the least!) 342 * \ / 343 0000396D 344 LOOP LABEL 345 PFAILCHK DONE jump if power fail 0396D 5C00044E 345 CMZ POWERFLAG power-fail restart in progress? 0396E FE0C3991 345 JNE DONE jump if so 345 PFAILEN DONE else allow interrupt 0396F 60043991 0 IMM 345 LD R0 ADR DONE 03970 E400044F 0 345 ST R0 POWERUPLOC 03971 59C40800 IMM 345 IORMSR MSRPFINTE 345 PFAILDS then disallow interrupt 03972 59840800 IMM 345 CLBMSR MSRPFINTE 03973 EC00044F 345 STZ POWERUPLOC 346 PLOCK (MCT,MCTELOCK) 03974 0CC00000 346 IOFF 03975 D1D7C803 7 BASE 346 SETT (MCT,MCTELOCK) 03976 FE0C3978 346 JNE MA(2+DISPW MA 0) 03977 DC40308B 346 CALLNP LOCKWAIT 03978 5C09C014 7 ZBM 347 CMZ MCT,MCTBUSY is controller transferring data? 03979 FE0C398E 348 JNE CONTBUSY jump if so -- do nothing here 349 0397A 60C40086 3 IMM 350 LD PFPTR PNCIX page number of controller window 0397B 00D7C801 7 BASE 351 LDPF MCT,MCTPMVALUE map in the controller 0397C 5C09D014 7 ZBM 352 CMZ MCT,MCTDEAD is the controller being non-responsive? 0397D FE0C398D 353 JNE NOINT jump if dead 0397E 5C001800 354 CMZ CIX(PPUCABLED) see if responding now 0397F FE0C3982 355 JNE ALIVE jump if alive 03980 EDC9D014 7 ZBM 356 STW MCT,MCTDEAD otherwise, mark as dead 03981 FE0E398D 357 JMP NOINT 358 * --- 359 00003982 360 ALIVE LABEL 03982 60040028 0 IMM 361 LD R0 BFDFNDSINT 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 747 (MSPROC) F 43 Mass Storage Driver - Controller Scheduler 03983 E4001A20 0 362 ST R0 CIX(BFDFUNC) disable further interrupt requests 03984 60801801 2 363 LD R2 CIX(PPUINTSTAT) get current channel status 03985 6017C801 0 7 BASE 364 LD R0 MCT,MCTPMVALUE for trace 365 TRACE MSTRACE,MSTENTER enter - R0=PageMap, R2=PpuStatus 03986 5D401D2C 365 XCT TRACECALL(MSTRACE) 03987 FEC00001 365 NOP (MSTRACE*BITS 22:26)+(MSTENTER*BITS 27:31) 366 * \ / 03988 F2A8398E 2 367 JBF R2/PPUICIA CONTBUSY jump if another CPU just got interrupted 03989 F2B8398D 2 368 JBF R2/PPUIINTC NOINT jump if interrupt is not pending 0398A DC0039E4 369 CALL PROCESSINT post the interrupt 0398B 414AA100 2 CBM 370 PARV R2/BITS 16:31 channel status 0398C 40401802 371 PARVL CIX(PPUCHANS1) disk status 0000398D 372 NOINT LABEL 373 0398D DC403A51 374 CALLNP DODISK do any necessary disk activity 375 * \ / 376 0000398E 377 CONTBUSY LABEL 378 PUNLOCK (MCT,MCTELOCK) release the controller 0398E EC17C803 7 BASE 378 STZ (MCT,MCTELOCK) 0398F 0C800000 378 ION 03990 FBF6396D 7 379 LJNA MCT LOOP do next controller, if any 380 * \ / 381 00003991 382 DONE LABEL 03991 60C40086 3 IMM 383 LD PFPTR PNCIX page number of CIX 03992 80D2C000 3 REG 384 PFRC PFPTR unmap anything left here 03993 FE0E28B7 385 JMP DISPATCH exit to dispatcher 386 * --- 387 388 END MSPROC routine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 748 (MSPROC) F 43 Mass Storage Driver - Controller Scheduler 390 391 ********************************************************************************** 392 * * 393 * MSPROCINT - Entry from Interrupt Handler. * 394 * * 395 * We are entered here when an I/O interrupt for a disk * 396 * occurs. * 397 * On entry: * 398 * R2 = PPU status * 399 * R3 -> MCT * 400 * CIX is mapped to BFD controller. * 401 * Exit to DISPATCH * 402 * Eats R0:R5,R7. Unmaps CIX and WNDO4. * 403 * Stack required: 6 * 404 * 0 + max ( DODISK (6), LOCKWAIT (0), PROCESSINT (6), * 405 * TRACEPROC (3) ) * 406 * * 407 ********************************************************************************** 408 409 BLOCK MSPROCINT routine 410 ENTRY MSPROCINT process I/O interrupt 411 00003994 412 MSPROCINT LABEL 03994 61D2C000 7 3 REG 413 LD MCT R3 pointer to MCT element 414 PLOCK (MCT,MCTELOCK) lock the controller 03995 0CC00000 414 IOFF 03996 D1D7C803 7 BASE 414 SETT (MCT,MCTELOCK) 03997 FE0C3999 414 JNE MA(2+DISPW MA 0) 03998 DC40308B 414 CALLNP LOCKWAIT 03999 5C09D014 7 ZBM 415 CMZ MCT,MCTDEAD is the controller dead? 0399A FE0C39A4 416 JNE NOINT jump if controller presumed dead 0399B 6017C801 0 7 BASE 417 LD R0 MCT,MCTPMVALUE for trace 418 TRACE MSTRACE,MSTINTRPT trace - R0=PageMap, R2=PpuStatus 0399C 5D401D2C 418 XCT TRACECALL(MSTRACE) 0399D FEC00008 418 NOP (MSTRACE*BITS 22:26)+(MSTINTRPT*BITS 27:31) 419 * \ / 420 CLRTBIT MCT,MCTTIMEOUT clear the timeout flag 0399E 60021000 0 IMM 420 LD R0 1*BIT(((MCT,MCTTIMEOUT) DISP (MCT,0))/BITS 0:4) 0399F A817C804 0 7 BASE 420 BRSBM R0 MCT,(((MCT,MCTTIMEOUT) DISP (MCT,0))/BITS 15:31) 039A0 DC0039E4 421 CALL PROCESSINT post the interrupt 039A1 41528000 2 REG 422 PARV R2 PPU status 039A2 40401802 423 PARVL CIX(PPUCHANS1) disk status 424 * \ / 039A3 DC403A51 425 CALLNP DODISK schedule any disk activity 426 * \ / 427 000039A4 428 NOINT LABEL 039A4 60C40086 3 IMM 429 LD PFPTR PNCIX page number of controller window 039A5 80D2C000 3 REG 430 PFRC PFPTR unmap the controller 431 PUNLOCK (MCT,MCTELOCK) unlock the MCT element 039A6 EC17C803 7 BASE 431 STZ (MCT,MCTELOCK) 039A7 0C800000 431 ION 039A8 FE0E28B7 432 JMP DISPATCH exit to dispatcher 433 * --- 434 435 END MSPROCINT routine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 749 (MSPROC) F 43 Mass Storage Driver - Controller Scheduler 437 438 ********************************************************************************** 439 * * 440 * MS_RESET - Reset a BFD Controller. * 441 * * 442 * This routine will reset and re-initialize a BFD * 443 * controller. We are called at initialization, and later if * 444 * requests are queued on a device but nothing has happened * 445 * for at least 10 seconds. * 446 * We go to the effort of determining whether, if the * 447 * controller is alive, there is only one unit that is * 448 * seeking or awaiting end of transfer. We take a skip * 449 * return and give the unit number if it is true. This is * 450 * intended to point a finger at an unresponsive drive if * 451 * we were called after the 10 second timeout. * 452 * * 453 * LD R5 => MCT element * 454 * PLOCK (R5,MCTELOCK) * 455 * CIX mapped to BFD controller * 456 * LD R0 0 if PPU is dead * 457 * CALLNP MS_RESET * 458 * JMP * 459 * * 460 * * 461 * Registers Used: R0:R4 * 462 * Stack Required: 8 * 463 * 2 + max ( CANCELTMR (6), DISKCHECK (2), DODISK (6), * 464 * TRACEPROC (3) ) * 465 * * 466 ********************************************************************************** 467 468 BLOCK MS_RESET subroutine 469 ENTRY MS_RESET reset the controller 470 471 BEGFRAME 00178801 6 BASE 472 SAVER7 BSS 1 save area for R7 473 ENDFRAME 474 475 * we have bits 0:9 in R7 available, here we use 0:6 00000040 BYTE 476 DCNT EQU BITS 0:LOGUPC count of disks we bumped (must count 0:8) 00000830 BYTE 477 DNUM EQU BITS (LOGUPC+1):(2*LOGUPC) last one we bumped if DCNT <> 0 478 039A9 DD5F8002 6 STAK 479 MS_RESET ENTRNP PUSH 039AA EC0BC040 7 CBM 480 STZ R7/DCNT say no disks reset yet 039AB E5D78801 7 6 BASE 481 ST R7 SP,SAVER7 save volatile register 039AC 60520000 1 0 REG 482 LD R1 R0 R1 = 0 if BFD dead 039AD 61D34000 7 5 REG 483 LD MCT R5 load pointer to MCT 039AE 60C40086 3 IMM 484 LD PFPTR PNCIX get the I/O window page number 039AF 80920000 0 REG 485 PFRD R0 find the page map value to access controller 486 TRACE MSTRACE,MSTRESET Reset controller, R0=PageMap, R1=0 if cntlr dead 039B0 5D401D2C 486 XCT TRACECALL(MSTRACE) 039B1 FEC0000C 486 NOP (MSTRACE*BITS 22:26)+(MSTRESET*BITS 27:31) 039B2 FA4C39B5 1 487 JNEZ R1 ALIVE jump if controller acts alive 039B3 EDC9D014 7 ZBM 488 STW MCT,MCTDEAD otherwise, mark as dead 039B4 FE0E39BD 489 JMP NORESET and save energy 490 * --- 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 750 (MSPROC) F 43 Mass Storage Driver - Controller Scheduler 491 000039B5 492 ALIVE LABEL 039B5 EC09D014 7 ZBM 493 STZ MCT,MCTDEAD mark controller alive 039B6 EC001801 494 STZ CIX(PPUABORT) clear out the PPU channel 495 039B7 60040028 0 IMM 496 LD R0 BFDFNDSINT code for disable interrupts 039B8 E4001A20 0 497 ST R0 CIX(BFDFUNC) and issue 039B9 60040021 0 IMM 498 LD R0 BFDFNSISE code for select interrupt on seek end 039BA E4001A20 0 499 ST R0 CIX(BFDFUNC) and issue 039BB 60040014 0 IMM 500 LD R0 BFDFNSOLNT code for select off-line interrupt 039BC E4001A20 0 501 ST R0 CIX(BFDFUNC) and issue 502 * \ / 503 000039BD 504 NORESET LABEL 039BD 6109CA34 4 7 ZBM 505 LD R4 MCT,MCTMAXUNIT start with largest unit number 000039BE 506 UNITLOOP LABEL 039BE 615DE005 5 74 BASE 507 LD MDV MCT,MCTDRIVE(R4) get MDV pointer 039BF FB7039D6 5 508 JZA MDV UNITNEXT jump if none here 039C0 60094231 0 5 ZBM 509 LD R0 MDV,MDVSTATE get current state 039C1 5CA039C2 0 510 LDPC JUMPTAB(R0) branch according to it 511 * --- 512 000039C2 513 JUMPTAB LABEL 039C2 000039D6 514 ADR UNITNEXT 0 - initialize 039C3 000039D6 515 ADR UNITNEXT 1 - runnable 039C4 000039CA 516 ADR UNITRESET 2 - seeking 039C5 000039D6 517 ADR UNITNEXT 3 - transfer start wait 039C6 000039CA 518 ADR UNITRESET 4 - transfer end wait 039C7 000039D6 519 ADR UNITNEXT 5 - destroy MDV 039C8 000039D6 520 ADR UNITNEXT 6 - interrupted by power failure 039C9 000039E1 521 ADR UNITCANIDL 7 - idling 522 000039CA 523 UNITRESET LABEL 039CA 6007FFFF 0 IMM 524 LD R0 ONEBITS get a really bad status 039CB 5C09D014 7 ZBM 525 CMZ MCT,MCTDEAD check for controller dead 039CC FE0C39D1 526 JNE HAVESTAT use really bad stuff if controller dead 039CD D0098041 6 ZBM 527 INC SP,SAVER7/DCNT inc the counter 039CE E5098831 4 6 ZBM 528 ST R4 SP,SAVER7/DNUM record this unit number 039CF 60281A28 0 4 529 LD R0 CIX(BFDSS+BFDSELECTB)(R4) get unit status 039D0 7C020400 0 IMM 530 IOR R0 1*BFDSSSKERR claim seek error 000039D1 531 HAVESTAT LABEL 039D1 E4174809 0 5 BASE 532 ST R0 MDV,MDVBFDSTAT save status 039D2 60050000 0 IMM 533 LD R0 1*PPUITOUT indicate deadman timeout 039D3 E417480A 0 5 BASE 534 ST R0 MDV,MDVPPUSTAT indicate deadman timeout in PPU status 000039D4 535 RUNIT LABEL 039D4 60040001 0 IMM 536 LD R0 MDVSTRUN get new state code 039D5 E4094231 0 5 ZBM 537 ST R0 MDV,MDVSTATE set state = runnable 538 * \ / 539 000039D6 540 UNITNEXT LABEL 039D6 FB2639BE 4 541 JDR R4 UNITLOOP do all units 542 * \ / 543 039D7 DC403A15 544 CALLNP DISKCHECK check presence of disks 039D8 DC403A51 545 CALLNP DODISK perform necessary disk activity 546 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 751 (MSPROC) F 43 Mass Storage Driver - Controller Scheduler 039D9 6153C000 5 7 REG 547 LD R5 MCT restore R5 039DA 61D78801 7 6 BASE 548 LD R7 SP,SAVER7 restore return register 549 039DB 600BC040 0 7 CBM 550 LD R0 R7/DCNT count of units bumped 039DC 64040001 0 IMM 551 CPR R0 1 exactly one? 039DD FE0C39E0 552 JNE MREXIT jump if not 039DE 610BC830 4 7 CBM 553 LD R4 R7/DNUM call this the culprit 039DF 61D7D001 7 7 REG 554 LD R7 R7+1 bump the return address 555 * \ / 556 000039E0 557 MREXIT LABEL 039E0 5D1F8002 6 STAK 558 LEAVE POP return to caller 559 * --- 560 000039E1 561 UNITCANIDL LABEL 039E1 DC003B80 562 CALL CANCELTMR remove idler interrupt, if any 039E2 40174813 5 BASE 563 PARL MDV,MDVIDLESER pass serial number field 039E3 FE0E39D4 564 JMP RUNIT then let the thing run 565 * --- 566 567 END MS_RESET subroutine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 752 (MSPROC) F 43 Mass Storage Driver - Controller Scheduler 569 570 ********************************************************************************** 571 * * 572 * PROCESSINT - Post an Interrupt Request. * 573 * * 574 * This routine will awaken any drives for which a seek * 575 * or data transfer has completed. It will also handle * 576 * offline interrupt requests. * 577 * * 578 * LD MCT => MCT element * 579 * CALL PROCESSINT * 580 * PARV PPU status * 581 * PARVL BFD status * 582 * * 583 * Registers Used: R0:R5 * 584 * Stack Required: 6 * 585 * 3 + max ( DISKCHECK (2), TRACEPROC (3) ) * 586 * * 587 ********************************************************************************** 588 589 BLOCK PROCESSINT subroutine 590 ENTRY PROCESSINT 591 592 BEGFRAME 00178801 6 BASE 593 PPUSTAT BSS 1 interrupting PPU status 00178802 6 BASE 594 BFDSTAT BSS 1 interrupting disk status 595 ENDFRAME 596 039E4 DD1F8003 6 STAK 597 PROCESSINT ENTR PUSH 039E5 C1578801 6 BASE 598 STPV SP,PPUSTAT 039E6 C0578802 6 BASE 599 STPVL SP,BFDSTAT 039E7 E1D78800 7 6 BASE 600 EXCH R7 SP,0 get MCT pointer 601 039E8 6009CA34 0 7 ZBM 602 LD R0 MCT,MCTMAXUNIT start at the largest unit 000039E9 603 UNITLOOP LABEL 039E9 615DC005 5 70 BASE 604 LD MDV MCT,MCTDRIVE(R0) get MDV pointer 039EA FB703A0F 5 605 JZA MDV UNITNEXT jump if no unit here 039EB 60C94231 3 5 ZBM 606 LD R3 MDV,MDVSTATE get current state 039EC 5CA639ED 3 607 LDPC STATETAB(R3) branch depending on state 608 * --- 609 000039ED 610 STATETAB LABEL 039ED 00003A0F 611 ADR UNITNEXT 0 - initialize 039EE 00003A0F 612 ADR UNITNEXT 1 - runnable 039EF 000039F5 613 ADR SEEKENDTST 2 - waiting for seek end 039F0 00003A0F 614 ADR UNITNEXT 3 - waiting to start transfer 039F1 00003A01 615 ADR XFEREND 4 - transfer end 039F2 00003A0F 616 ADR UNITNEXT 5 - destroy MDV 039F3 00003A0F 617 ADR UNITNEXT 6 - interrupted by power failure 039F4 00003A0F 618 ADR UNITNEXT 7 - idling 619 000039F5 620 SEEKENDTST LABEL 039F5 70C95231 3 5 ZBM 621 LDN R3 MDV,MDVCABLE get cable position, negated 039F6 39099E12 4 6 ZBM 622 LEA R4 SP,BFDSTAT/BIT 15 039F7 5C1B1C00 43 @R 623 CMZ @R4(R3) is this drive at seek end? 039F8 FE023A0F 624 JEQ UNITNEXT jump if not 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 753 (MSPROC) F 43 Mass Storage Driver - Controller Scheduler 039F9 60578802 1 6 BASE 625 LD R1 SP,BFDSTAT get status 039FA 70D2C000 3 3 REG 626 LDN R3 R3 get cable number 039FB 64CA6030 3 1 CBM 627 CPR R3 R1/BFDSSDNUM is this our status? 039FC FE0239FE 628 JEQ HAVESTAT jump if yes 039FD 60601A28 1 0 629 LD R1 CIX(BFDSS+BFDSELECTB)(R0) get correct status 000039FE 630 HAVESTAT LABEL 631 TRACE MSTRACE,MSTSKEND seek end, R0=unit, R1=status 039FE 5D401D2C 631 XCT TRACECALL(MSTRACE) 039FF FEC00009 631 NOP (MSTRACE*BITS 22:26)+(MSTSKEND*BITS 27:31) 03A00 FE0E3A0C 632 JMP SAVESTAT 633 * --- 634 00003A01 635 XFEREND LABEL 03A01 60D61001 3 0 REG 636 LD R3 R0+1 03A02 64C9CA34 3 7 ZBM 637 CPR R3 MCT,MCTMAXUNIT greater than the rest 03A03 FE0A3A05 638 JLE UNITFINE jump if unit still in range 03A04 EC12C000 3 REG 639 STZ R3 start at the bottom 640 * \ / 641 00003A05 642 UNITFINE LABEL 03A05 E4C9C234 3 7 ZBM 643 ST R3 MCT,MCTUNIT change unit for start of scan 03A06 60978801 2 6 BASE 644 LD R2 SP,PPUSTAT 03A07 E497480A 2 5 BASE 645 ST R2 MDV,MDVPPUSTAT save PPU status 03A08 60578802 1 6 BASE 646 LD R1 SP,BFDSTAT 03A09 E657480B 125 BASE 647 ST2 R1 MDV,MDVLOPSTAT save last operation status 648 TRACE MSTRACE,MSTTREND xfer end, R0=unit, R1=BfdStat, R2=PpuStat 03A0A 5D401D2C 648 XCT TRACECALL(MSTRACE) 03A0B FEC0000A 648 NOP (MSTRACE*BITS 22:26)+(MSTTREND*BITS 27:31) 649 * \ / 650 00003A0C 651 SAVESTAT LABEL 03A0C E4574809 1 5 BASE 652 ST R1 MDV,MDVBFDSTAT save disk status 03A0D 60440001 1 IMM 653 LD R1 MDVSTRUN 03A0E E4494231 1 5 ZBM 654 ST R1 MDV,MDVSTATE set drive runnable 655 * \ / 656 00003A0F 657 UNITNEXT LABEL 03A0F FA2639E9 0 658 JDR R0 UNITLOOP do next unit 659 * \ / 660 03A10 60578802 1 6 BASE 661 LD R1 SP,BFDSTAT get interrupting status 03A11 F2403A13 1 662 JBF R1/BFDSSOLINT NOTOFFL jump if not offline interrupt request 03A12 DC403A15 663 CALLNP DISKCHECK else do offline stuff 00003A13 664 NOTOFFL LABEL 665 03A13 E1D78800 7 6 BASE 666 EXCH R7 SP,0 restore return pointer 03A14 5D1F8003 6 STAK 667 LEAVE POP 668 * --- 669 670 END PROCESSINT subroutine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 754 (MSPROC) F 43 Mass Storage Driver - Controller Scheduler 672 673 ********************************************************************************** 674 * * 675 * DISKCHECK - Check Presence of Disks. * 676 * * 677 * This routine will create an MDV for each drive that is * 678 * present but does not already have an MDV, and will set any * 679 * drive runnable that is not already so. * 680 * * 681 * LD R7 => MCT element * 682 * CALLNP DISKCHECK * 683 * * 684 * Eats R0:R5. * 685 * Stack required: 2 * 686 * 1 + max ( LOCKLIST (1), SGETMEM (0), UNLOCKLIST (1), * 687 * ZEROIT (1) ) * 688 * * 689 ********************************************************************************** 690 691 BLOCK DISKCHECK subroutine 692 ENTRY DISKCHECK 693 694 BEGFRAME 695 ENDFRAME 696 03A15 DD5F8001 6 STAK 697 DISKCHECK ENTRNP PUSH 03A16 E1D78800 7 6 BASE 698 EXCH R7 SP,0 get MCT pointer 03A17 61040000 4 IMM 699 LD R4 0 make fake presence bits 03A18 5C09D014 7 ZBM 700 CMZ MCT,MCTDEAD check for dead controller 03A19 FE0C3A1C 701 JNE NOSTAT jump if controller not responding 03A1A 61001A40 4 702 LD R4 CIX(BFDEF9A) get word containing disk presence bits 03A1B 610B2080 4 4 CBM 703 LD R4 R4/BFDPRESENT bits 24:31 = units 7..0 00003A1C 704 NOSTAT LABEL 03A1C 60840007 2 IMM 705 LD R2 UPC-1 unit number index 706 * \ / 707 00003A1D 708 UNITLOOP LABEL 03A1D 615DD005 5 72 BASE 709 LD MDV MCT,MCTDRIVE(R2) get MDV pointer 03A1E FB723A3D 5 710 JNZA MDV HAVEMDV jump if it exists 03A1F F3303A4C 4 711 JBF R4/BIT 24 UNITNEXT jump if it shouldn't exist 712 * \ / 713 714 ********************************************************************************** 715 * * 716 * Create a new MDV. Note that we can get away with several * 717 * stores into the first word of a new MDV element without using * 718 * read-modify-writes, because nobody else can possibly be looking * 719 * at it until we put it onto the MDVLIST. * 720 * * 721 ********************************************************************************** 722 723 * \ / 03A20 DC002ED0 724 CALL SGETMEM get some storage for it 03A21 40440005 IMM 725 PARVL MDVLOG 03A22 61520000 5 0 REG 726 LD MDV R0 the pointer to the block 03A23 DC003090 727 CALL ZEROIT remove unwanted garbage 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 755 (MSPROC) F 43 Mass Storage Driver - Controller Scheduler 03A24 41174800 5 BASE 728 PAR MDV,0 03A25 40440020 IMM 729 PARVL 2 POWER MDVLOG 03A26 E5C95F11 7 5 ZBM 730 ST MCT MDV,MDVCNTL enter pointer to its controller 03A27 E4895830 2 5 ZBM 731 ST R2 MDV,MDVUNIT enter the unit number 03A28 6009C841 0 7 ZBM 732 LD R0 MCT,MCTPMVALUE/PFSLOT 03A29 1C040028 0 IMM 733 MUL R0 40 03A2A 1809F021 0 7 ZBM 734 ADD R0 MCT,MCTPMVALUE/PPUCHAN 03A2B 1C040028 0 IMM 735 MUL R0 40 03A2C 18128000 0 2 REG 736 ADD R0 R2 03A2D 18003A50 0 737 ADD R0 DISKNAME R1=drive name ("DSKxxx") 03A2E E4174805 0 5 BASE 738 ST R0 MDV,MDVNAME enter in element 03A2F DC003096 739 CALL LOCKLIST get access to the MDV list 03A30 40001F14 740 PARL MDVLOCK 03A31 E55DD005 5 72 BASE 741 ST MDV MCT,MCTDRIVE(R2) point controller to new unit 03A32 60001F15 0 742 LD R0 MDVLIST 03A33 E4095F10 0 5 ZBM 743 ST R0 MDV,MDVLINK 03A34 E5401F15 5 744 ST MDV MDVLIST link new element into list 03A35 DC0030A4 745 CALL UNLOCKLIST release the list 03A36 40001F14 746 PARL MDVLOCK 03A37 60128000 0 2 REG 747 LD R0 R2 place unit number in temp register 03A38 5409CA34 0 7 ZBM 748 MAX R0 MCT,MCTMAXUNIT see if new one is larger 03A39 E409CA34 0 7 ZBM 749 ST R0 MCT,MCTMAXUNIT only the driver knows for sure 03A3A 60040000 0 IMM 750 LD R0 MDVSTINIT 03A3B E4094231 0 5 ZBM 751 ST R0 MDV,MDVSTATE set state to initialize 03A3C FE0E3A4C 752 JMP UNITNEXT and process next unit 753 * --- 754 00003A3D 755 HAVEMDV LABEL 756 SETTBIT MDV,MDVCHKSTAT set to check state 03A3D 60020080 0 IMM 756 LD R0 1*BIT(((MDV,MDVCHKSTAT) DISP (MDV,0))/BITS 0:4) 03A3E FC174800 0 5 BASE 756 IORM R0 MDV,(((MDV,MDVCHKSTAT) DISP (MDV,0))/BITS 15:31) 03A3F 60094231 0 5 ZBM 757 LD R0 MDV,MDVSTATE get current state 03A40 64040002 0 IMM 758 CPR R0 MDVSTSEEK are we seeking? 03A41 FE0C3A4C 759 JNE UNITNEXT jump if not - no action necessary 03A42 6007FFFF 0 IMM 760 LD R0 ONEBITS get really bad status 03A43 5C09D014 7 ZBM 761 CMZ MCT,MCTDEAD check for dead controller 03A44 FE0C3A49 762 JNE ENDSEEK jump if dead controller 03A45 60241A28 0 2 763 LD R0 CIX(BFDSS+BFDSELECTB)(R2) get current drive status 03A46 6040395F 1 764 LD R1 SEEKMASK mask of relevant seek bits 03A47 6C003960 01 765 MCPR R0 SEEKING is drive still seeking? 03A48 FE023A4C 766 JEQ UNITNEXT jump if so 00003A49 767 ENDSEEK LABEL 03A49 E4174809 0 5 BASE 768 ST R0 MDV,MDVBFDSTAT else save the status 03A4A 60040001 0 IMM 769 LD R0 MDVSTRUN 03A4B E4094231 0 5 ZBM 770 ST R0 MDV,MDVSTATE and set state = runnable 771 * \ / 772 00003A4C 773 UNITNEXT LABEL 03A4C 610B0200 4 4 CBM 774 LD R4 R4/BITS 1:0 shift R4 left one 03A4D FAA63A1D 2 775 JDR R2 UNITLOOP and do next unit 776 * \ / 777 03A4E E1D78800 7 6 BASE 778 EXCH R7 SP,0 restore return link 03A4F 5D1F8001 6 STAK 779 LEAVE POP 780 * --- 781 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 756 (MSPROC) F 43 Mass Storage Driver - Controller Scheduler 03A50 59F45869 782 DISKNAME PAK6 DSK000 skeleton disk name 783 784 END DISKCHECK subroutine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 757 (MSPROC) F 43 Mass Storage Driver - Controller Scheduler 786 787 ********************************************************************************** 788 * * 789 * DODISK - Disk Activity Scheduler. * 790 * * 791 * This routine will inspect each drive in turn, running * 792 * each one whose state is runnable. Then it will run the * 793 * first one whose state is on cylinder (so it can start a * 794 * transfer). * 795 * * 796 * LD R7 => MCT element * 797 * CALLNP DODISK * 798 * * 799 * Eats R0:R5. * 800 * Stack required: 6 * 801 * 3 + max ( LOCKLIST (1), SFREEMEM (0), TRACEPROC (3), * 802 * UNLOCKLIST (1) ) * 803 * * 804 ********************************************************************************** 805 806 BLOCK DODISK subroutine 807 ENTRY DODISK 808 809 BEGFRAME 00178801 6 BASE 810 UNIT BSS 1 current unit number to scan 00178802 6 BASE 811 XFERMDV BSS 1 address of MDV for data transfer 812 ENDFRAME 813 03A51 DD5F8003 6 STAK 814 DODISK ENTRNP PUSH 03A52 E1D78800 7 6 BASE 815 EXCH R7 SP,0 restore MCT pointer 816 * \ / 817 00003A53 818 DODISK1 LABEL take it again from the top 03A53 EC178802 6 BASE 819 STZ SP,XFERMDV say no unit found for data transfer 03A54 6009C234 0 7 ZBM 820 LD R0 MCT,MCTUNIT get starting unit number 821 * \ / 822 00003A55 823 DRIVELOOP LABEL try next drive 03A55 E4178801 0 6 BASE 824 ST R0 SP,UNIT current unit number to process 03A56 615DC005 5 70 BASE 825 LD MDV MCT,MCTDRIVE(R0) get MDV element 03A57 FB703A9A 5 826 JZA MDV DRIVENEXT jump if none 827 PFAILCHK RETURN quit if power failed 03A58 5C00044E 827 CMZ POWERFLAG power-fail restart in progress? 03A59 FE0C3AC2 827 JNE RETURN jump if so 827 PFAILEN RETURN else allow interrupt 03A5A 60043AC2 0 IMM 827 LD R0 ADR RETURN 03A5B E400044F 0 827 ST R0 POWERUPLOC 03A5C 59C40800 IMM 827 IORMSR MSRPFINTE 827 PFAILDS then disallow interrupt 03A5D 59840800 IMM 827 CLBMSR MSRPFINTE 03A5E EC00044F 827 STZ POWERUPLOC 03A5F 60094231 0 5 ZBM 828 LD R0 MDV,MDVSTATE get state of drive 03A60 5CA03A61 0 829 LDPC STATETAB1(R0) jump depending on state 830 * --- 831 00003A61 832 STATETAB1 LABEL 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 758 (MSPROC) F 43 Mass Storage Driver - Controller Scheduler 03A61 00003A69 833 ADR INITDRIVE 0 - initialize drive 03A62 00003A6B 834 ADR RUNDRIVE 1 - runnable 03A63 00003A9A 835 ADR DRIVENEXT 2 - seeking 03A64 00003A7E 836 ADR CHECKTRAN 3 - waiting to start data transfer 03A65 00003A9A 837 ADR DRIVENEXT 4 - transfer in progress (can't happen) 03A66 00003A82 838 ADR DESTROYMDV 5 - destroy this MDV element 03A67 00003A6B 839 ADR RUNDRIVE 6 - interrupted by power failure 03A68 00003A9A 840 ADR DRIVENEXT 7 - idling 841 842 ********************************************************************************** 843 * * 844 * Drive is just starting up. Set initial entry point * 845 * into drive coroutine, then let it run. * 846 * * 847 ********************************************************************************** 848 00003A69 849 INITDRIVE LABEL initialize the drive 03A69 60043AC4 0 IMM 850 LD R0 ADR DRIVEPROC get initial program counter 03A6A E417481B 0 5 BASE 851 ST R0 MDV,MDVPC and save it 852 * \ / 853 854 ********************************************************************************** 855 * * 856 * Let drive coroutine execute from just after its most * 857 * recent EXPCS. * 858 * * 859 ********************************************************************************** 860 861 * \ / 00003A6B 862 RUNDRIVE LABEL run this drive 03A6B 62D7481C 345 BASE 863 LD2 R3 MDV,MDVSAVER34 restore these regs 03A6C 6009D014 0 7 ZBM 864 LD R0 MCT,MCTDEAD get dead indicator 03A6D E397481E 675 BASE 865 EXCH2 R6 MDV,MDVSAVER67 save our regs, get drive's regs 03A6E DCD7481B 5 BASE 866 EXPCS MDV,MDVPC go to drive code 867 * \ / 868 * Here, R0 = new state for drive 869 * \ / 03A6F E397481E 675 BASE 870 EXCH2 R6 MDV,MDVSAVER67 save drive's regs, get ours 03A70 E6D7481C 345 BASE 871 ST2 R3 MDV,MDVSAVER34 save drive's regs 03A71 E4094231 0 5 ZBM 872 ST R0 MDV,MDVSTATE save new state 03A72 5CA03A73 0 873 LDPC STATETAB2(R0) jump depending on new state 874 * --- 875 00003A73 876 STATETAB2 LABEL 03A73 00003A9A 877 ADR DRIVENEXT 0 - initialize (can't happen) 03A74 00003A9A 878 ADR DRIVENEXT 1 - runnable (next time) 03A75 00003A7B 879 ADR DIDSEEK 2 - seeking 03A76 00003A7E 880 ADR CHECKTRAN 3 - wants to start data transfer 03A77 00003AB2 881 ADR CONTBUSY 4 - has started data transfer 03A78 00003A82 882 ADR DESTROYMDV 5 - destroy this drive's MDV 03A79 00003AC2 883 ADR RETURN 6 - interrupted by power failure 03A7A 00003A9A 884 ADR DRIVENEXT 7 - idling 885 886 ********************************************************************************** 887 * * 888 * Here, we just started a seek. Clear the timeout * 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 759 (MSPROC) F 43 Mass Storage Driver - Controller Scheduler 889 * indicator. * 890 * * 891 ********************************************************************************** 892 00003A7B 893 DIDSEEK LABEL 894 CLRTBIT MCT,MCTTIMEOUT clear the timeout indicator 03A7B 60021000 0 IMM 894 LD R0 1*BIT(((MCT,MCTTIMEOUT) DISP (MCT,0))/BITS 0:4) 03A7C A817C804 0 7 BASE 894 BRSBM R0 MCT,(((MCT,MCTTIMEOUT) DISP (MCT,0))/BITS 15:31) 03A7D FE0E3A9A 895 JMP DRIVENEXT 896 * --- 897 898 ********************************************************************************** 899 * * 900 * Here, a drive wants to start a data transfer. * 901 * Remember it. * 902 * * 903 ********************************************************************************** 904 00003A7E 905 CHECKTRAN LABEL 03A7E 5C178802 6 BASE 906 CMZ SP,XFERMDV one already set up? 03A7F FE0C3A9A 907 JNE DRIVENEXT jump if so, we will be found later 03A80 E5578802 5 6 BASE 908 ST MDV SP,XFERMDV else remember which MDV 03A81 FE0E3A9A 909 JMP DRIVENEXT do next drive 910 * --- 911 912 ********************************************************************************** 913 * * 914 * Here, we should destroy the MDV of a drive. * 915 * Recalculate highest unit number on controller. * 916 * * 917 ********************************************************************************** 918 00003A82 919 DESTROYMDV LABEL 03A82 60095830 0 5 ZBM 920 LD R0 MDV,MDVUNIT get unit number 03A83 EC1DC005 70 BASE 921 STZ MCT,MCTDRIVE(R0) remove pointer in MCT 03A84 60040007 0 IMM 922 LD R0 UPC-1 start at the very top 923 * \ / 924 00003A85 925 MAXLOOP LABEL 03A85 5C1DC005 70 BASE 926 CMZ MCT,MCTDRIVE(R0) MDV element with this unit number 03A86 FE0C3A88 927 JNE FOUNDMAX if non-zero found the max 03A87 FA223A85 0 928 DRJ R0 MAXLOOP back around, note we skip zero 929 * \ / 930 00003A88 931 FOUNDMAX LABEL 03A88 E409CA34 0 7 ZBM 932 ST R0 MCT,MCTMAXUNIT save away for later use 03A89 6409C234 0 7 ZBM 933 CPR R0 MCT,MCTUNIT compare against the starting unit 03A8A FE063A8C 934 JGE UNITEXIST jump if starting unit still in good range 03A8B E409C234 0 7 ZBM 935 ST R0 MCT,MCTUNIT readjust starting unit number 936 * \ / 937 00003A8C 938 UNITEXIST LABEL 03A8C DC003096 939 CALL LOCKLIST lock the MDV list 03A8D 40001F14 940 PARL MDVLOCK 03A8E 60441F15 1 IMM 941 LD R1 ADR MDVLIST get pointer to head of list 03A8F 3D485F10 5 1 ZBM 942 LSRCH MDV R1,MDVLINK find our predecessor 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 760 (MSPROC) F 43 Mass Storage Driver - Controller Scheduler 03A90 FE023A92 943 JEQ FOUNDIT jump if found 03A91 00130104 944 HALT HALTS0104 our MDV is not in the list 945 * --- 946 00003A92 947 FOUNDIT LABEL 03A92 60095F10 0 5 ZBM 948 LD R0 MDV,MDVLINK R0 := adr next 03A93 740B5F10 0 5 CBM 949 XOR R0 MDV/FLDADRS R0 := (adr next) XOR (adr us) 03A94 F4164800 0 1 BASE 950 XORM R0 R1,MDVWORDA MDVLINK := adr next 951 * The above convolutions were necessary 952 * to update using read-modify-write. 03A95 DC0030A4 953 CALL UNLOCKLIST unlock the MDV list 03A96 40001F14 954 PARL MDVLOCK 03A97 DC002F5D 955 CALL SFREEMEM free up the MDV 03A98 41440005 IMM 956 PARV MDVLOG its length 03A99 40534000 5 REG 957 PARVL MDV its address 958 * \ / 959 960 ********************************************************************************** 961 * * 962 * Move on to the next drive, if any, on the controller. * 963 * * 964 ********************************************************************************** 965 966 * \ / 00003A9A 967 DRIVENEXT LABEL 03A9A BC178801 0 6 BASE 968 INCL R0 SP,UNIT get next unit number 03A9B 6409CA34 0 7 ZBM 969 CPR R0 MCT,MCTMAXUNIT compare against the maximum unit number 03A9C FE0A3A9E 970 JLE UNITLOW jump if unit number NOT over the max 03A9D EC120000 0 REG 971 STZ R0 start at the bottom 972 * \ / 973 00003A9E 974 UNITLOW LABEL 03A9E 6409C234 0 7 ZBM 975 CPR R0 MCT,MCTUNIT back to start? 03A9F FE0C3A55 976 JNE DRIVELOOP loop if not 977 * \ / 978 979 ********************************************************************************** 980 * * 981 * Done with general processing on all units of this * 982 * controller. If someone wanted to start a data transfer, do * 983 * it now. * 984 * * 985 ********************************************************************************** 986 987 * \ / 03AA0 61578802 5 6 BASE 988 LD MDV SP,XFERMDV get unit for data transfer 03AA1 FB703AB6 5 989 JZA MDV NODATAXFER jump if none 990 PFAILCHK RETURN quit if power failing 03AA2 5C00044E 990 CMZ POWERFLAG power-fail restart in progress? 03AA3 FE0C3AC2 990 JNE RETURN jump if so 990 PFAILEN RETURN else allow interrupt 03AA4 60043AC2 0 IMM 990 LD R0 ADR RETURN 03AA5 E400044F 0 990 ST R0 POWERUPLOC 03AA6 59C40800 IMM 990 IORMSR MSRPFINTE 990 PFAILDS then disallow interrupt 03AA7 59840800 IMM 990 CLBMSR MSRPFINTE 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 761 (MSPROC) F 43 Mass Storage Driver - Controller Scheduler 03AA8 EC00044F 990 STZ POWERUPLOC 03AA9 62D7481C 345 BASE 991 LD2 R3 MDV,MDVSAVER34 get drive's registers 03AAA 6009D014 0 7 ZBM 992 LD R0 MCT,MCTDEAD get dead indicator 03AAB E397481E 675 BASE 993 EXCH2 R6 MDV,MDVSAVER67 save our regs, get drive's 03AAC DCD7481B 5 BASE 994 EXPCS MDV,MDVPC and go do him 995 * \ / 996 * Here, R0 is drive's new state. Normally it will be MDVSTDT 997 * (data transfer in progress), but in strange cases it could 998 * be something else. If so, we must re-scan the whole 999 * controller, because someone else may have wanted to start 1000 * a data transfer operation. 1001 * \ / 03AAD E397481E 675 BASE 1002 EXCH2 R6 MDV,MDVSAVER67 save drive's registers, get ours 03AAE E6D7481C 345 BASE 1003 ST2 R3 MDV,MDVSAVER34 save drive's registers 03AAF E4094231 0 5 ZBM 1004 ST R0 MDV,MDVSTATE save new state 03AB0 64040004 0 IMM 1005 CPR R0 MDVSTDT data transfer now in progress? 03AB1 FE0C3A53 1006 JNE DODISK1 if not, start all over 1007 * \ / 1008 1009 ********************************************************************************** 1010 * * 1011 * Controller can not be disturbed. * 1012 * * 1013 ********************************************************************************** 1014 1015 * \ / 00003AB2 1016 CONTBUSY LABEL 1017 CLRTBIT MCT,MCTTIMEOUT clear the timeout indicator 03AB2 60021000 0 IMM 1017 LD R0 1*BIT(((MCT,MCTTIMEOUT) DISP (MCT,0))/BITS 0:4) 03AB3 A817C804 0 7 BASE 1017 BRSBM R0 MCT,(((MCT,MCTTIMEOUT) DISP (MCT,0))/BITS 15:31) 03AB4 EDC9C014 7 ZBM 1018 STW MCT,MCTBUSY data transfer is in progress 03AB5 FE0E3ABB 1019 JMP DONE 1020 * --- 1021 00003AB6 1022 NODATAXFER LABEL no data transfer in progress 03AB6 EC09C014 7 ZBM 1023 STZ MCT,MCTBUSY say no longer busy 03AB7 5C09D014 7 ZBM 1024 CMZ MCT,MCTDEAD is the controller dead? 03AB8 FE0C3ABB 1025 JNE NOENABLE1 jump if so 03AB9 60040024 0 IMM 1026 LD R0 BFDFNENINT 03ABA E4001A20 0 1027 ST R0 CIX(BFDFUNC) enable disk interrupts 00003ABB 1028 NOENABLE1 LABEL 1029 * \ / 1030 00003ABB 1031 DONE LABEL 03ABB 5C09D014 7 ZBM 1032 CMZ MCT,MCTDEAD check for dead controller 03ABC FE0C3ABF 1033 JNE NOENABLE2 jump if dead 03ABD 60040800 0 IMM 1034 LD R0 1*PPUICIA 03ABE E4001802 0 1035 ST R0 CIX(PPUSSSTAT) enable PPU interrupts 00003ABF 1036 NOENABLE2 LABEL 03ABF 6017C801 0 7 BASE 1037 LD R0 MCT,MCTPMVALUE 1038 TRACE MSTRACE,MSTLEAVE leaving, R0=PageMap 03AC0 5D401D2C 1038 XCT TRACECALL(MSTRACE) 03AC1 FEC0000B 1038 NOP (MSTRACE*BITS 22:26)+(MSTLEAVE*BITS 27:31) 1039 * \ / 1040 00003AC2 1041 RETURN LABEL 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 762 (MSPROC) F 43 Mass Storage Driver - Controller Scheduler 03AC2 E1D78800 7 6 BASE 1042 EXCH R7 SP,0 restore return link 03AC3 5D1F8003 6 STAK 1043 LEAVE POP return to caller 1044 * --- 1045 1046 END DODISK subroutine 1047 1048 1049 END Controller-Scheduling Section 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 763 (MSPROC) F 43 Mass Storage Driver - Drive Activity Section 1052 1053 BLOCK Drive Activity Section 1054 ENTRY DRIVEPROC Entry point for drive process 1055 ENTRY CALCDRVADR Calculate drive's hardware address 1056 1057 ********************************************************************************** 1058 * * 1059 * This is the drive activity section of the mass storage * 1060 * driver. In this section we actually handle all requests * 1061 * for disk input and output. When necessary to wait for * 1062 * something, we call the controller-scheduling section as a * 1063 * coroutine via "EXPCS MDV,MDVPC". * 1064 * * 1065 * The initial entry point for the drive section is * 1066 * DRIVEPROC, which is the code that starts by initializing * 1067 * the MDV. The chain of control finally dies when we call the * 1068 * controller- scheduler with a new state of MDVSTKILL. It * 1069 * will then destroy our MDV and control will not come back * 1070 * here. The only place where we actually do that is in * 1071 * DRIVEPROC, after we discover that the disk drive is no * 1072 * longer responding. * 1073 * * 1074 ********************************************************************************** 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 764 (MSPROC) F 43 Mass Storage Driver - Drive Activity Section 1076 1077 ********************************************************************************** 1078 * * 1079 * This section consists of a large number of subroutines. * 1080 * After DRIVEPROC, which is first, they make their appearances * 1081 * in alphabetical order. Following is a very brief description * 1082 * of each: * 1083 * * 1084 ********************************************************************************** 1085 1086 * ROUTINE INPUT OUT EATEN SKIP 1087 * NAME PARAMS REGISTERS REG REGS RETURNS DESCRIPTION 1088 * ---------- ------- ----------- --- ----- ------------ -------------------------- 1089 * ADDRSWITCH MSQ,MDV PPL R0:R2 Offl,NoPages Perform an address-switch read request 1090 * ADJUSTCYL MDV R0 R0 Adjust MDVCHKCYL 1091 * CALCDRVADR MDV R0 R0:R2 Calculate cable position 1092 * CALCSKADR MDV R0:R3 Calculate seek address 1093 * CANCELTMR ser# MDV R0:R3 Cancel drive timer request 1094 * CHECKHEADS MDV R0:R4 Offline Check all heads for crash 1095 * CHECK1HEAD HeadNum MDV R0:R4 Offline Check one head for crash 1096 * CHECKSTATE MDV R0:R4 Destroy Check state of drive 1097 * CLEARFAULT MDV R0:R3 Offline Clears drive fault 1098 * DISKCHECK PPL,MDV R0:R3 Offl,ReWrite Perform write-check operation 1099 * DISKOPRMSG code MDV R0:R3 Send offline msg to operator 1100 * DISKSEEK PPL,MDV R0:R3 Offl,SeekErr Seek to particular block 1101 * DISKWRITE PPL,MDV R0:R3 Offl,MemErr Perform write operation 1102 * DOREADREQ MSQ,MDV R0:R4 Offline Perform a read request 1103 * DOREWRITE PPL,MDV R0:R3 Offline Rewrite block for error recovery 1104 * DOWRITEREQ MSQ,MDV R0:R4 Offline Perform a write request 1105 * FIXSEGMENT R0,PPL,MDV R0:R3 Error Reconstruct bad segment 1106 * FORMAT BlkNum MSQ,MDV R0:R3 Offline Formats one track 1107 * GETDISKID MDV 3&4 R0:R4 Offline Get and Log Id of Drive and pack 1108 * GETDRIVEID buffer MDV R0:R4 Offline Get Drive serial number 1109 * GETZEROPG BlkNum MDV PPL R0:R2 Offl,NoPages Get a zero page for specified block 1110 * HEADCHKINT R3 R0:R5 Head Crash Check Timer Interrupt Routine 1111 * HEADCHKSET MDV R0:R2 Set Head Crash Check Timer Interrupt 1112 * IDLEINT R3 R0:R5 Reactivate idle driver 1113 * IDLEDRIVE MDV R0:R3 Drive coroutine delay 1114 * INTREAD BlkNum,FbiType MDV PPL R0:R3 Offl,DataErr,ChanErr Internal Read Routine 1115 * LOGCOUNT MDV R0:R3 Log activity counts for 1 drive 1116 * PADBUILD PPL,MDV R0:R3 Setup transfer addresses in PPU 1117 * READ BlkNum MDV PPL R0:R2 Offl,NoPages Read specified page from disk 1118 * READTRACKS HeadNum,MDV Count R0 R0:R4 Offline Read a group of Tracks 1119 * REMOUNT R3,R4,MDV R0:R4 Check for remounting a volume 1120 * REZERO PPL,MDV R0:R3 Offline Rezero the disk 1121 * RQSTDONE MSQ,PPL,MDV R0:R4 Post a request as complete 1122 * SEEKNDSTAT OpCode PPL,MDV R0:R3 Offl,SeekErr Check status at seek end 1123 * SEEKNDWAIT MDV R0 R0:R2 Wait for seek end 1124 * STATCHECK OpCode PPL,MDV R0 R0:R3 Offl,Perm,ReSeek,ReXfer,Misc Status check after xfer 1125 * TSELECT PPL,MDV R0:R3 Offl,SeekErr Select trick for reading 1126 * UNLOADHEAD MDV R0:R4 Unload the heads from the disk 1127 * UNMOUNTVOL MDV R0:R4 Unmount a volume (drive dropped ready) 1128 * WRITE PPL,MDV R0:R2 Offline Write specified page to disk 1129 * ZEROPAGE PPL R0:R3 Zero out a given page 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 765 (MSPROC) F 43 Mass Storage Driver - Drive Activity Section 1131 1132 ********************************************************************************** 1133 * * 1134 * DRIVEPROC - Entry Point for the Drive Activity * 1135 * Process. * 1136 * * 1137 * This is the entry point for the drive activity * 1138 * process. Here, we initialize the MDV, then fall into the * 1139 * main processing loop. The main loop tries to perform a * 1140 * read request, a write request and another write request in * 1141 * that order. If any of them cannot be done, we skip it and * 1142 * go to the next one. * 1143 * * 1144 * On entry, MDV -> our MDV element. * 1145 * We alter R0:R4,R6:R7. * 1146 * Stack required: 23. (We call SGETMEM to get our own.) * 1147 * !!!!!!! WARNING !!!!!!! Check STACKSIZE (below) when expanding stack.* 1148 * 0 + max ( CHECKHEADS (22), CHECKSTATE (23), DISKOPRMSG (6), * 1149 * DOREADREQ (17), DOWRITEREQ (14), FREESTAK (0), * 1150 * GETSTAK (0), LOGCOUNT (4), UNMOUNTVOL (8) ) * 1151 * * 1152 ********************************************************************************** 1153 1154 BLOCK DRIVEPROC routine 1155 ENTRY DRIVEPROC 1156 0000001F ABS 1157 STACKSIZE EQU 31 size of stack to get 1158 00003AC4 1159 DRIVEPROC LABEL 03AC4 DC00286A 1160 CALL GETSTACK allocate a stack for us 03AC5 4044001F IMM 1161 PARVL STACKSIZE 1162 * \ / 03AC6 EDD7400B 5 CACH 1163 STW MDV,MDVSECPTRK set sectors per track 03AC7 EDD7400A 5 CACH 1164 STW MDV,MDVTRKPCYL set tracks per cylinder 03AC8 D1574804 5 BASE 1165 STMW MDV,MDVMAXSEEK say volume is huge 1166 SETTBIT MDV,MDVCHKSTAT say we must check status 03AC9 60020080 0 IMM 1166 LD R0 1*BIT(((MDV,MDVCHKSTAT) DISP (MDV,0))/BITS 0:4) 03ACA FC174800 0 5 BASE 1166 IORM R0 MDV,(((MDV,MDVCHKSTAT) DISP (MDV,0))/BITS 15:31) 1167 * \ / 1168 * Main processing loop. 1169 * \ / 1170 00003ACB 1171 LOOP LABEL 1172 CLRTBIT MDV,MDVCHKSTAT status check required? 03ACB 60020080 0 IMM 1172 LD R0 1*BIT(((MDV,MDVCHKSTAT) DISP (MDV,0))/BITS 0:4) 03ACC A8174800 0 5 BASE 1172 BRSBM R0 MDV,(((MDV,MDVCHKSTAT) DISP (MDV,0))/BITS 15:31) 03ACD FE023AD0 1173 JEQ NOSTAT jump if not 03ACE DC403BD8 1174 CALLNP CHECKSTATE and do the check 03ACF FE0E3AF4 1175 JMP DESTROYUS jump if we should no longer exist 1176 * \ / 00003AD0 1177 NOSTAT LABEL 1178 CLRTBIT MDV,MDVLOGCNT should we log counts? 03AD0 60020040 0 IMM 1178 LD R0 1*BIT(((MDV,MDVLOGCNT) DISP (MDV,0))/BITS 0:4) 03AD1 A8174800 0 5 BASE 1178 BRSBM R0 MDV,(((MDV,MDVLOGCNT) DISP (MDV,0))/BITS 15:31) 03AD2 FE023AD4 1179 JEQ NOLOG jump if not 03AD3 DC403E82 1180 CALLNP LOGCOUNT and do the logging 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 766 (MSPROC) F 43 Mass Storage Driver - Drive Activity Section 1181 * \ / 00003AD4 1182 NOLOG LABEL 1183 CLRTBIT MDV,MDVCHKHEAD should we run the head checker? 03AD4 60020020 0 IMM 1183 LD R0 1*BIT(((MDV,MDVCHKHEAD) DISP (MDV,0))/BITS 0:4) 03AD5 A8174800 0 5 BASE 1183 BRSBM R0 MDV,(((MDV,MDVCHKHEAD) DISP (MDV,0))/BITS 15:31) 03AD6 FE023AD9 1184 JEQ NOHEADCHK jump if not 03AD7 DC403B8E 1185 CALLNP CHECKHEADS call to look for suspicious heads 03AD8 FE0E3AEE 1186 JMP SETOFFLINE get rid of volume if suspicious 1187 * \ / 00003AD9 1188 NOHEADCHK LABEL 03AD9 EC094011 5 ZBM 1189 STZ MDV,MDVDIDXFER say we haven't done anything this time 03ADA 60494080 1 5 ZBM 1190 LD R1 MDV,MDVVOLUME get volume number here 03ADB FA423AEB 1 1191 JEQZ R1 IDLE jump if none - can't do anything 03ADC 61E21F22 7 1 1192 LD R7 VOLNTABLE(R1) get VOLN pointer 1193 * \ / 03ADD 60D7C816 3 7 BASE 1194 LD MSQ R7,VOLNREADQ get first read request 03ADE FAF03AE1 3 1195 JZA MSQ NOREAD jump if none 03ADF DC403CC1 1196 CALLNP DOREADREQ else do the read request 03AE0 FE0E3AEE 1197 JMP SETOFFLINE jump if drive fell offline 1198 * \ / 00003AE1 1199 NOREAD LABEL 03AE1 60D7C817 3 7 BASE 1200 LD MSQ R7,VOLNWRITEQ get first write request 03AE2 FAF03AE9 3 1201 JZA MSQ NOWRITE jump if none 03AE3 DC403CFD 1202 CALLNP DOWRITEREQ else do a write request 03AE4 FE0E3AEE 1203 JMP SETOFFLINE jump if drive now unusable 1204 * \ / 03AE5 60D7C817 3 7 BASE 1205 LD MSQ R7,VOLNWRITEQ get first write request 03AE6 FAF03AE9 3 1206 JZA MSQ NOWRITE jump if none 03AE7 DC403CFD 1207 CALLNP DOWRITEREQ else do a write request 03AE8 FE0E3AEE 1208 JMP SETOFFLINE jump if drive now unusable 1209 * \ / 00003AE9 1210 NOWRITE LABEL 03AE9 5C094011 5 ZBM 1211 CMZ MDV,MDVDIDXFER did we accomplish anything? 03AEA FE0C3ACB 1212 JNE LOOP jump if so 1213 * \ / 1214 00003AEB 1215 IDLE LABEL 03AEB 60040001 0 IMM 1216 LD R0 MDVSTRUN new state = runnable (next time) 03AEC DCD7481B 5 BASE 1217 EXPCS MDV,MDVPC wait for next request 03AED FE0E3ACB 1218 JMP LOOP and go try again 1219 * --- 1220 00003AEE 1221 SETOFFLINE LABEL 03AEE 5C094212 5 ZBM 1222 CMZ MDV,MDVBADSKS faking offline for seek errors? 03AEF FE023AF2 1223 JEQ REALLYOFF jump if not 03AF0 DC003C3D 1224 CALL DISKOPRMSG tell operator 03AF1 40440001 IMM 1225 PARVL 1 "Unable to seek DSKscu" 1226 * \ / 00003AF2 1227 REALLYOFF LABEL 03AF2 DC4040A4 1228 CALLNP UNMOUNTVOL make volume unmounted 03AF3 FE0E3ACB 1229 JMP LOOP 1230 * --- 1231 00003AF4 1232 DESTROYUS LABEL 03AF4 DC002875 1233 CALL FREESTACK free our stack 03AF5 4044001F IMM 1234 PARVL STACKSIZE 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 767 (MSPROC) F 43 Mass Storage Driver - Drive Activity Section 1235 * \ / 03AF6 60040005 0 IMM 1236 LD R0 MDVSTKILL new state: destroy us 03AF7 DCD7481B 5 BASE 1237 EXPCS MDV,MDVPC go bare the old bodkin 1238 * --- 1239 1240 END DRIVEPROC routine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 768 (MSPROC) F 43 Mass Storage Driver - Drive Activity Section 1242 1243 ********************************************************************************** 1244 * * 1245 * ADDRSWITCH - Perform a Read with Address Switch * 1246 * Request. * 1247 * * 1248 * This subroutine will perform an address-switch read * 1249 * request. It must get the block whose number is in MSQACTAD * 1250 * and convert it to block number MSQBLOCK. There are three * 1251 * possible ways to do this: * 1252 * - If the right page is on the idle page list, we can grab * 1253 * it and convert it to the correct page number. * 1254 * - If the right page is on the PPage list, we can grab an * 1255 * idle page and copy the data into it. * 1256 * - Otherwise, we read the right page from disk and convert * 1257 * it to the correct page number. * 1258 * * 1259 * LD MSQ => MSQ element * 1260 * LD MDV => MDV element * 1261 * CALLNP ADDRSWITCH * 1262 * * 1263 * * 1264 * PPL for page> * 1265 * * 1266 * Registers Used: R0:R2. Sets PPL. * 1267 * Stack Required: 16 * 1268 * 3 + max ( FINDPPAGE (1), GETIDLE (1), GETIDLEPG (2), * 1269 * MAPINFBI (2), MAPOUTFBI (2), READ (13), * 1270 * SFREEMEM (0), SGETMEM (0) ) * 1271 * * 1272 ********************************************************************************** 1273 1274 BLOCK ADDRSWITCH subroutine 1275 ENTRY ADDRSWITCH 1276 1277 BEGFRAME 00178801 6 BASE 1278 SAVER3 BSS 1 save area for R3 00178802 6 BASE 1279 OLDPAGE BSS 1 pointer to PPL of page to copy 1280 ENDFRAME 1281 03AF8 DD5F8003 6 STAK 1282 ADDRSWITCH ENTRNP PUSH 03AF9 DC002D3B 1283 CALL GETIDLEPG get the page from the idle list 03AFA 4056C802 3 BASE 1284 PARVL MSQ,MSQACTAD address to find 03AFB FE0E3AFE 1285 JMP NOTONIDLE jump if not there 03AFC EDC91F12 4 ZBM 1286 STW PPL,PPBUSYWORD/FLDADRS make it once busy 03AFD FE0E3B3D 1287 JMP CHANGEADDR jump if gotten 1288 * --- 1289 00003AFE 1290 NOTONIDLE LABEL 03AFE DC002D0E 1291 CALL FINDPPAGE find page on PPAGE list 03AFF 4056C802 3 BASE 1292 PARVL MSQ,MSQACTAD page number to find 03B00 FE0E3B39 1293 JMP NOTONPPAGE jump if not there 1294 * \ / 1295 * Now, PPL => page on PAGE list, list is locked. 1296 * \ / 03B01 E5178802 4 6 BASE 1297 ST PPL SP,OLDPAGE save pointer to it 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 769 (MSPROC) F 43 Mass Storage Driver - Drive Activity Section 03B02 DC402D1C 1298 CALLNP GETIDLE get any idle page 03B03 FE0E3B34 1299 JMP NOIDLE ain't none, can't copy it 1300 * \ / 1301 * Now, PPL => empty page. 1302 * \ / 03B04 EDC91F12 4 ZBM 1303 STW PPL,PPBUSYWORD/FLDADRS make it once busy 03B05 E4D78801 3 6 BASE 1304 ST PFPTR SP,SAVER3 save this register 1305 * \ / 1306 00003B06 1307 RETRY LABEL 1308 PFAILEN PFAIL enable power fail interrupt 03B06 60043B52 0 IMM 1308 LD R0 ADR PFAIL 03B07 E400044F 0 1308 ST R0 POWERUPLOC 03B08 59C40800 IMM 1308 IORMSR MSRPFINTE 03B09 60C40086 3 IMM 1309 LD PFPTR PNCIX page number for destination page 03B0A 00D70803 4 BASE 1310 LDPF PPL,PPPMVALUE map new page into CIX 03B0B 60C40085 3 IMM 1311 LD PFPTR PNWNDO4 page number for source page 03B0C 60178802 0 6 BASE 1312 LD R0 SP,OLDPAGE point to old PPL 03B0D 00D60803 0 BASE 1313 LDPF R0,PPPMVALUE map old page into WNDO4 03B0E 60041400 0 IMM 1314 LD R0 ADR WNDO4 03B0F 60441000 1 IMM 1315 LD R1 CPP 03B10 60841800 2 IMM 1316 LD R2 ADR CIX 03B11 FE400000 1317 CMOVE copy the page 03B12 80D20000 0 REG 1318 PFRC R0 unmap WNDO4 1319 PFAILDS disable power-fail interrupt 03B13 59840800 IMM 1319 CLBMSR MSRPFINTE 03B14 EC00044F 1319 STZ POWERUPLOC 03B15 60C40086 3 IMM 1320 LD PFPTR PNCIX page number of controller window 03B16 60095F11 0 5 ZBM 1321 LD R0 MDV,MDVCNTL R0 -> MCT element 03B17 00D60801 0 BASE 1322 LDPF R0,MCTPMVALUE remap controller into CIX 1323 1324 * copy FBI for the PPL 03B18 DC002ED0 1325 CALL SGETMEM get a spare FBI 03B19 40440004 IMM 1326 PARVL FBILOG pass log length 03B1A 60920000 2 0 REG 1327 LD R2 R0 set as CMOVE destination 03B1B 60D20000 3 0 REG 1328 LD R3 R0 and put in more perm register 03B1C E0D78802 3 6 BASE 1329 EXCH R3 SP,OLDPAGE get back old PPL 03B1D DC002606 1330 CALL MAPINFBI map in FBI for it 03B1E 4052C000 3 REG 1331 PARVL R3 pass PPL 03B1F 60124000 0 1 REG 1332 LD R0 R1 copy FBI addr as CMOVE source 03B20 6044002C 1 IMM 1333 LD R1 FBILNTH*CPW length of FBI CMOVE 03B21 FE400000 1334 CMOVE copy the FBI to temp area 03B22 DC40261B 1335 CALLNP MAPOUTFBI unmap FBI, ION 1336 03B23 DC002606 1337 CALL MAPINFBI map in new FBIs PPL, IOFF 03B24 40530000 4 REG 1338 PARVL PPL pass address of PPL 03B25 60924000 2 1 REG 1339 LD R2 R1 R2 => new FBI 03B26 60178802 0 6 BASE 1340 LD R0 SP,OLDPAGE R0 => temp FBI 03B27 6044002C 1 IMM 1341 LD R1 FBILNTH*CPW R1 = length of FBI 03B28 FE400000 1342 CMOVE copy temp FBI into new PPL 03B29 DC40261B 1343 CALLNP MAPOUTFBI unmap new FBI 03B2A E0D78802 3 6 BASE 1344 EXCH R3 SP,OLDPAGE save old PPL, R3 => temp FBI 03B2B DC002F5D 1345 CALL SFREEMEM get rid of temp 03B2C 41440004 IMM 1346 PARV FBILOG pass log length 03B2D 4052C000 3 REG 1347 PARVL R3 pass address 1348 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 770 (MSPROC) F 43 Mass Storage Driver - Drive Activity Section 03B2E 60D78801 3 6 BASE 1349 LD PFPTR SP,SAVER3 restore this register 03B2F 60178802 0 6 BASE 1350 LD R0 SP,OLDPAGE old PPL 03B30 60883461 2 0 ZBM 1351 LD R2 R0,PPBLOCK/PPHASHFLD get hash field 1352 PUNLOCK PPAGELOCK(R2) unlock the list 03B31 EC241E21 2 1352 STZ PPAGELOCK(R2) 03B32 0C800000 1352 ION 03B33 FE0E3B3D 1353 JMP CHANGEADDR and go do the address change 1354 * --- 1355 00003B34 1356 NOIDLE LABEL can't copy page - nowhere to copy it 03B34 60178802 0 6 BASE 1357 LD R0 SP,OLDPAGE get old PPL pointer 03B35 60883461 2 0 ZBM 1358 LD R2 R0,PPBLOCK/PPHASHFLD get hash field 1359 PUNLOCK PPAGELOCK(R2) unlock the list 03B36 EC241E21 2 1359 STZ PPAGELOCK(R2) 03B37 0C800000 1359 ION 03B38 FE0E3B50 1360 JMP CANTREAD and say we couldn't do it 1361 * --- 1362 00003B39 1363 NOTONPPAGE LABEL 03B39 DC003EBE 1364 CALL READ read the block 03B3A 4056C802 3 BASE 1365 PARVL MSQ,MSQACTAD address to read 03B3B FE0E3B51 1366 JMP OFFLINE jump if drive went offline 03B3C FE0E3B50 1367 JMP CANTREAD jump if no page available 1368 * \ / 1369 * Now, PPL points to the proper page. Here we do the 1370 * address change. 1371 * \ / 1372 00003B3D 1373 CHANGEADDR LABEL 03B3D DC002606 1374 CALL MAPINFBI get access to FBI, IOFF 03B3E 40530000 4 REG 1375 PARVL PPL pass PPL address 03B3F 6016C803 0 3 BASE 1376 LD R0 MSQ,MSQXPTR pick up pointer to extra PPL 03B40 FA303B4A 0 1377 JZA R0 NONEWFBI jump if none here 03B41 E4578801 1 6 BASE 1378 ST R1 SP,SAVER3 save FBI pointer 03B42 60924000 2 1 REG 1379 LD R2 R1 make destination address 03B43 6044002C 1 IMM 1380 LD R1 CPW*FBILNTH get length to move 03B44 38160804 0 0 BASE 1381 LEA R0 R0,PPFBFBI make source address 03B45 FE400000 1382 CMOVE 03B46 DC002F5D 1383 CALL SFREEMEM call to dump PPL-FBI element 03B47 41440004 IMM 1384 PARV PPFBLOG indicate length 03B48 4056C803 3 BASE 1385 PARVL MSQ,MSQXPTR and address 03B49 60578801 1 6 BASE 1386 LD R1 SP,SAVER3 restore real FBI address 00003B4A 1387 NONEWFBI LABEL 03B4A 6016C801 0 3 BASE 1388 LD R0 MSQ,MSQBLOCK get new block number 03B4B E4170801 0 4 BASE 1389 ST R0 PPL,PPBLOCK save in PPL 03B4C E4085181 0 1 ZBM 1390 ST R0 R1,FBIDA and in FBI 03B4D EDC90012 4 ZBM 1391 STW PPL,PPMODIFIED say this page has been modified 03B4E DC40261B 1392 CALLNP MAPOUTFBI unmap PPLs FBI, ION 03B4F 61D7D001 7 7 REG 1393 LD R7 R7+1 we got the page 1394 * \ / 1395 00003B50 1396 CANTREAD LABEL 03B50 61D7D001 7 7 REG 1397 LD R7 R7+1 no idle pages available 1398 * \ / 1399 00003B51 1400 OFFLINE LABEL 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 771 (MSPROC) F 43 Mass Storage Driver - Drive Activity Section 03B51 5D1F8003 6 STAK 1401 LEAVE POP 1402 * --- 1403 00003B52 1404 PFAIL LABEL power failure occurred 03B52 60040006 0 IMM 1405 LD R0 MDVSTPFAIL say we are runnable 03B53 DCD7481B 5 BASE 1406 EXPCS MDV,MDVPC go back to controller 03B54 FE0E3B06 1407 JMP RETRY when we come back, try again 1408 * --- 1409 1410 END ADDRSWITCH subroutine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 772 (MSPROC) F 43 Mass Storage Driver - Drive Activity Section 1412 1413 ********************************************************************************** 1414 * * 1415 * ADJUSTCYL - Select New Track for Head Check. * 1416 * * 1417 * This routine uses the head checking constant HDCHKCYLM * 1418 * to select a new MDVCHKCYL. Returns new MDVCHKCYL in R0. * 1419 * * 1420 * LD MDV => MDV element * 1421 * CALLNP ADJUSTCYL * 1422 * R0 = new cylinder number * 1423 * * 1424 * Sets R0. * 1425 * Stack required: 1 * 1426 * * 1427 ********************************************************************************** 1428 1429 BLOCK ADJUSTCYL subroutine 1430 ENTRY ADJUSTCYL 1431 1432 BEGFRAME 1433 ENDFRAME 1434 03B55 DD5F8001 6 STAK 1435 ADJUSTCYL ENTRNP PUSH 03B56 60174814 0 5 BASE 1436 LD R0 MDV,MDVCHKCYL get current cylinder number 03B57 10003969 0 1437 SUB R0 HDCHKCYLM pick another cylinder 03B58 FA063B5B 0 1438 JGEZ R0 HAVECYL jump if ok 1439 * \ / 1440 00003B59 1441 ADJCYL LABEL 03B59 18094104 0 5 ZBM 1442 ADD R0 MDV,MDVMAXSEEK/BFDSACYL wrap around the disk 03B5A FA083B59 0 1443 JLTZ R0 ADJCYL 1444 * \ / 1445 00003B5B 1446 HAVECYL LABEL 03B5B E4174814 0 5 BASE 1447 ST R0 MDV,MDVCHKCYL save this cylinder number 03B5C 5D1F8001 6 STAK 1448 LEAVE POP 1449 * --- 1450 1451 END ADJUSTCYL subroutine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 773 (MSPROC) F 43 Mass Storage Driver - Drive Activity Section 1453 1454 ********************************************************************************** 1455 * * 1456 * CALCDRVADR - Calculate drive's hardware address * 1457 * * 1458 * This routine calculates the drive's hardware address as a * 1459 * combination of the BFD's location and the drive cable position. * 1460 * * 1461 * LD MDV => MDV element * 1462 * CALLNP CALCDRVADR * 1463 * R0 = drive address * 1464 * * 1465 * Eats R0:R2. Sets R0. * 1466 * Stack required: 1 * 1467 * * 1468 ********************************************************************************** 1469 1470 BLOCK CALCDRVADR subroutine 1471 ENTRY CALCDRVADR 1472 1473 BEGFRAME 1474 ENDFRAME 1475 03B5D DD5F8001 6 STAK 1476 CALCDRVADR ENTRNP PUSH 03B5E 60495F11 1 5 ZBM 1477 LD R1 MDV,MDVCNTL get controller element 03B5F 60564801 1 1 BASE 1478 LD R1 R1,MCTPMVALUE page map for BFD 03B60 60095231 0 5 ZBM 1479 LD R0 MDV,MDVCABLE cable position 03B61 608A7020 2 1 CBM 1480 LD R2 R1/PPUCHAN channel on the PPU 03B62 E48A3040 2 0 CBM 1481 ST R2 R0/BITS 24:27 combine with cable position 03B63 608A4840 2 1 CBM 1482 LD R2 R1/PFSLOT get slot PPU resides in 03B64 E48A2840 2 0 CBM 1483 ST R2 R0/BITS 20:23 combine with the rest 03B65 5D1F8001 6 STAK 1484 LEAVE POP return 1485 * --- 1486 1487 END CALCDRVADR subroutine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 774 (MSPROC) F 43 Mass Storage Driver - Drive Activity Section 1489 1490 ********************************************************************************** 1491 * * 1492 * CALCSKADR - Calculate Seek Address. * 1493 * * 1494 * This routine will calculate the physical seek address * 1495 * for a block, and save it in the MDV element. It searches * 1496 * the substitution list to see if the block is substituted. * 1497 * * 1498 * LD MDV => MDV for drive * 1499 * CALL CALCSKADR * 1500 * PARVL * 1501 * * 1502 * Eats R0:R1. * 1503 * Stack required: 1 * 1504 * 1 + max ( LOCKWAIT (0) ) * 1505 * * 1506 ********************************************************************************** 1507 1508 BLOCK CALCSKADR subroutine 1509 ENTRY CALCSKADR 1510 1511 BEGFRAME 1512 ENDFRAME 1513 03B66 DD1F8001 6 STAK 1514 CALCSKADR ENTR PUSH 03B67 C0524000 1 REG 1515 STPVL R1 get disk address 1516 * \ / 03B68 5C094013 5 ZBM 1517 CMZ MDV,MDVNOSUB should substitutions be ignored? 03B69 FE0C3B74 1518 JNE SKIPSUBS jump if yes 1519 PLOCK SUBSLOCK lock the substitution list 03B6A 0CC00000 1519 IOFF 03B6B D1C01F62 1519 SETT SUBSLOCK 03B6C FE0C3B6E 1519 JNE MA(2+DISPW MA 0) 03B6D DC40308B 1519 CALLNP LOCKWAIT 03B6E 60001F63 0 1520 LD R0 SUBSLIST R0 -> first element on list 03B6F 3C560801 1 0 BASE 1521 LSRCH R1 R0,SUBLBAD find substitution list entry for block 03B70 FE0C3B72 1522 JNE NOTSUBBED jump if none - block is not substituted 03B71 60560802 1 0 BASE 1523 LD R1 R0,SUBLGOOD get substituted block number 1524 * \ / 00003B72 1525 NOTSUBBED LABEL 1526 PUNLOCK SUBSLOCK unlock the substitution list 03B72 EC001F62 1526 STZ SUBSLOCK 03B73 0C800000 1526 ION 1527 * \ / 00003B74 1528 SKIPSUBS LABEL 03B74 7840254F 1 1529 AND R1 MSBLKMASK remove volume number 03B75 EC174808 5 BASE 1530 STZ MDV,MDVSEEKADR clear out result location 03B76 58C40010 IMM 1531 IORPSR PSRMODIF turn on funky arithmetic 03B77 62124000 011 REG 1532 LD2 R0 R1 swell up for divide 03B78 1417400B 0 5 CACH 1533 DIV R0 MDV,MDVSECPTRK R0 = quotient, R1 = remainder 03B79 E4497088 1 5 ZBM 1534 ST R1 MDV,MDVSEEKADR/BFDSASEC save sector number 03B7A 62120000 010 REG 1535 LD2 R0 R0 swell up for divide 03B7B 1417400A 0 5 CACH 1536 DIV R0 MDV,MDVTRKPCYL R0 = quotient, R1 = remainder 03B7C E4496088 1 5 ZBM 1537 ST R1 MDV,MDVSEEKADR/BFDSAHEAD save head number 03B7D E4094108 0 5 ZBM 1538 ST R0 MDV,MDVSEEKADR/BFDSACYL save cylinder number 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 775 (MSPROC) F 43 Mass Storage Driver - Drive Activity Section 03B7E 58840010 IMM 1539 CLBPSR PSRMODIF clear funky arithmetic 03B7F 5D1F8001 6 STAK 1540 LEAVE POP return 1541 * --- 1542 1543 END CALCSKADR subroutine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 776 (MSPROC) F 43 Mass Storage Driver - Drive Activity Section 1545 1546 ********************************************************************************** 1547 * * 1548 * CANCELTMR - Cancel Time Interrupt For Drive. * 1549 * * 1550 * This routine will cancel the given timer interrupt for * 1551 * the specified drive coroutine. * 1552 * * 1553 * LD MDV =>MDV element * 1554 * CALL CANCELTMR * 1555 * PARL * 1556 * * 1557 * Eats R0:R3. * 1558 * Stack required: 6 * 1559 * 4 + max ( TIMEKILL (2) ) * 1560 * * 1561 ********************************************************************************** 1562 1563 BLOCK CANCELTMR subroutine 1564 ENTRY CANCELTMR 1565 1566 BEGFRAME 00178801 6 BASE 1567 TIMERADR BSS 1 address of serial number 00178802 6 BASE 1568 SAVEPF BSS 1 CIX mapping 00178803 6 BASE 1569 KEEPR4 BSS 1 R4 safe spot 1570 ENDFRAME 1571 03B80 DD1F8004 6 STAK 1572 CANCELTMR ENTR PUSH 03B81 C0178801 6 BASE 1573 STPL SP,TIMERADR save address of serial number 03B82 E5178803 4 6 BASE 1574 ST R4 SP,KEEPR4 save a register 03B83 61178C01 4 6 FPVR 1575 LD TMR @(SP,TIMERADR) serial number of timer request 03B84 FB023B8C 4 1576 JEQZ TMR RETURN jump if none 03B85 60C40086 3 IMM 1577 LD PFPTR PNCIX page number of CIX window 03B86 80D78802 6 BASE 1578 PFRC SP,SAVEPF save mapping on stack 03B87 DC404517 1579 CALLNP TIMEKILL else kill the request 03B88 FEC00000 1580 NOP 0 (not found return) 03B89 60C40086 3 IMM 1581 LD PFPTR PNCIX restore CIX window 03B8A 00D78802 6 BASE 1582 LDPF SP,SAVEPF saved PF value 03B8B EC178C01 6 FPVR 1583 STZ @(SP,TIMERADR) say request no longer outstanding 1584 * \ / 1585 00003B8C 1586 RETURN LABEL 03B8C 61178803 4 6 BASE 1587 LD R4 SP,KEEPR4 restore a register 03B8D 5D1F8004 6 STAK 1588 LEAVE POP and return 1589 * --- 1590 1591 END CANCELTMR subroutine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 777 (MSPROC) F 43 Mass Storage Driver - Drive Activity Section 1593 1594 ********************************************************************************** 1595 * * 1596 * CHECKHEADS - Check All Heads for Crash. * 1597 * * 1598 * This routine is called periodically to check for head * 1599 * crashes. It will do at least one read from each head * 1600 * looking for errors. If we find too many errors, we will * 1601 * unload the heads. Note that we can inhibit the head * 1602 * checker by setting a bit in the VOLN element. This is done * 1603 * so if the drive is powered off/on the head checker will * 1604 * remain inhibited or if the volume is unloaded and the next * 1605 * disk spun up, the head checker will function normally. * 1606 * * 1607 * LD MDV => MDV element * 1608 * CALLNP CHECKHEADS * 1609 * JMP drive offline or heads unloaded * 1610 * * 1611 * Registers Used: R0:R4 * 1612 * Stack Required: 22 * 1613 * 2 + max ( ADJUSTCYL (1), CANCELTMR (6), CHECK1HEAD (20), * 1614 * HEADCHKSET (6), INTREAD (14), PUTIDLE (1) ) * 1615 * * 1616 ********************************************************************************** 1617 1618 1619 BLOCK CHECKHEADS subroutine 1620 ENTRY CHECKHEADS 1621 1622 BEGFRAME 00178801 6 BASE 1623 HEADNUM BSS 1 current head number 1624 ENDFRAME 1625 03B8E DD5F8002 6 STAK 1626 CHECKHEADS ENTRNP PUSH 03B8F DC003B80 1627 CALL CANCELTMR clear any outstanding timer request 03B90 40174812 5 BASE 1628 PARL MDV,MDVTIMESER pass serial num field 1629 * \ / 03B91 EC174817 5 BASE 1630 STZ MDV,MDVBTRXPPL assume no bad tracks block 03B92 EC174819 5 BASE 1631 STZ MDV,MDVSUBSPPL assume no substitution block 03B93 60174804 0 5 BASE 1632 LD R0 MDV,MDVMAXSEEK at max seek address 03B94 FA2C3BB3 0 1633 JEQMW R0 DONE if not set, we cannot do this 1634 * \ / 03B95 60094080 0 5 ZBM 1635 LD R0 MDV,MDVVOLUME get the volume number 03B96 FA023B9A 0 1636 JEQZ R0 DOHEADCHK jump if volume not loaded 03B97 60201F22 0 0 1637 LD R0 VOLNTABLE(R0) address of the VOLN element 03B98 5C080015 0 ZBM 1638 CMZ R0,VOLNHDCK is the head checker inhibited? 03B99 FE0C3BB3 1639 JNE DONE jump if so 1640 * \ / 00003B9A 1641 DOHEADCHK LABEL 03B9A EC174803 5 BASE 1642 STZ MDV,MDVERRWORD clear flags and counters 03B9B DC003E63 1643 CALL INTREAD read the bad tracks block 03B9C 41574816 5 BASE 1644 PARV MDV,MDVBTRXDA disk address 03B9D 40440002 IMM 1645 PARVL FBITBTRX expected FBI type 03B9E FE0E3BB5 1646 JMP RETURN0 jump if drive offline 03B9F FE0E3BA2 1647 JMP GOTBTRX jump if data error 03BA0 FE0E3BA2 1648 JMP GOTBTRX jump if channel error 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 778 (MSPROC) F 43 Mass Storage Driver - Drive Activity Section 03BA1 E5174817 4 5 BASE 1649 ST PPL MDV,MDVBTRXPPL normal return - save PPL pointer 1650 * \ / 00003BA2 1651 GOTBTRX LABEL 03BA2 DC003E63 1652 CALL INTREAD read the substitution block 03BA3 41574818 5 BASE 1653 PARV MDV,MDVSUBSDA disk address 03BA4 40440005 IMM 1654 PARVL FBITSUBS expected FBI type 03BA5 FE0E3BB5 1655 JMP RETURN0 jump if drive offline 03BA6 FE0E3BA9 1656 JMP GOTSUBS jump if data error 03BA7 FE0E3BA9 1657 JMP GOTSUBS jump if channel error 03BA8 E5174819 4 5 BASE 1658 ST PPL MDV,MDVSUBSPPL normal return - save PPL pointer 1659 * \ / 00003BA9 1660 GOTSUBS LABEL 03BA9 EDC94213 5 ZBM 1661 STW MDV,MDVNOERRS indicate immunity to most errors 03BAA DC403B55 1662 CALLNP ADJUSTCYL select cylinder 03BAB 6017400A 0 5 CACH 1663 LD R0 MDV,MDVTRKPCYL number of heads 03BAC FE0E3BB2 1664 JMP LOOPEND start loop with a count down 1665 * --- 1666 00003BAD 1667 LOOP LABEL 03BAD E4178801 0 6 BASE 1668 ST R0 SP,HEADNUM set current number on stack 03BAE DC003BC2 1669 CALL CHECK1HEAD else check that head 03BAF 40520000 0 REG 1670 PARVL R0 pass head number 03BB0 FE0E3BB5 1671 JMP RETURN0 jump if bad or offline 03BB1 60178801 0 6 BASE 1672 LD R0 SP,HEADNUM get head just done 00003BB2 1673 LOOPEND LABEL 03BB2 FA263BAD 0 1674 JDR R0 LOOP do next head 1675 * \ / 00003BB3 1676 DONE LABEL 03BB3 DC403E33 1677 CALLNP HEADCHKSET set timer request for next check 03BB4 61D7D001 7 7 REG 1678 LD R7 R7+1 good return 1679 * \ / 00003BB5 1680 RETURN0 LABEL 03BB5 61174817 4 5 BASE 1681 LD PPL MDV,MDVBTRXPPL PPL => block containing bad tracks list 03BB6 FB303BB8 4 1682 JZA PPL NOBTRXPPL jump if none 03BB7 DC402D51 1683 CALLNP PUTIDLE free the block 1684 * \ / 00003BB8 1685 NOBTRXPPL LABEL 03BB8 61174819 4 5 BASE 1686 LD PPL MDV,MDVSUBSPPL PPL => block containing substitution entries 03BB9 FB303BBB 4 1687 JZA PPL NOSUBSPPL jump if none 03BBA DC402D51 1688 CALLNP PUTIDLE free the block 1689 * \ / 00003BBB 1690 NOSUBSPPL LABEL 03BBB D0574815 5 BASE 1691 DEC MDV,MDVRZPROBS say seeker looks good 03BBC FE063BBE 1692 JGE OKNOW jump if counter normal 03BBD EC174815 5 BASE 1693 STZ MDV,MDVRZPROBS make it ok 1694 * \ / 00003BBE 1695 OKNOW LABEL 03BBE EC094213 5 ZBM 1696 STZ MDV,MDVNOERRS restore normal error handling 1697 CLRTBIT MDV,MDVCHKHEAD don't re-check immediately 03BBF 60020020 0 IMM 1697 LD R0 1*BIT(((MDV,MDVCHKHEAD) DISP (MDV,0))/BITS 0:4) 03BC0 A8174800 0 5 BASE 1697 BRSBM R0 MDV,(((MDV,MDVCHKHEAD) DISP (MDV,0))/BITS 15:31) 03BC1 5D1F8002 6 STAK 1698 LEAVE POP 1699 * --- 1700 1701 END CHECKHEADS subroutine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 779 (MSPROC) F 43 Mass Storage Driver - Drive Activity Section 1703 1704 ********************************************************************************** 1705 * * 1706 * CHECK1HEAD - Check One Head for Crash. * 1707 * * 1708 * This routine checks for a crash on one disk head. It * 1709 * will read a small number of tracks. If the number of * 1710 * errors exceeds a predefined value, it will read a larger * 1711 * number of tracks. If the number of errors in this second * 1712 * group of tracks exceeds another predefined value, we will * 1713 * unload the heads. * 1714 * * 1715 * LD MDV => MDV element * 1716 * CALL CHECK1HEAD * 1717 * PARVL head number * 1718 * JMP offline of heads unloaded * 1719 * * 1720 * Eats R0:R4 * 1721 * Stack required: 20 * 1722 * 2 + max ( ADJUSTCYL (1), DISKOPRMSG (6), READTRACKS (18), * 1723 * UNLOADHEAD (4) ) * 1724 * * 1725 ********************************************************************************** 1726 1727 BLOCK CHECK1HEAD Subroutine 1728 ENTRY CHECK1HEAD 1729 1730 BEGFRAME 00178801 6 BASE 1731 HEADNUM BSS 1 number of the head to check 1732 ENDFRAME 1733 03BC2 DD1F8002 6 STAK 1734 CHECK1HEAD ENTR PUSH 03BC3 C0578801 6 BASE 1735 STPVL SP,HEADNUM R0 <= also contains the head number 1736 * \ / 03BC4 DC003F28 1737 CALL READTRACKS read a group of tracks 03BC5 41520000 0 REG 1738 PARV R0 head number 03BC6 41403965 1739 PARV HDCHKCNT1 number of tracks 03BC7 40403966 1740 PARVL HDCHKERR1 number of allowable errors 03BC8 FE0E3BD7 1741 JMP RETURN0 jump if offline 03BC9 FA043BD6 0 1742 JGTZ R0 RETURN1 return if not too many errors 1743 * \ / 1744 1745 * Bad start, move to another cylinder and try some more 03BCA DC403B55 1746 CALLNP ADJUSTCYL move to new cylinder 03BCB 60178801 0 6 BASE 1747 LD R0 SP,HEADNUM get head number back 03BCC DC003F28 1748 CALL READTRACKS read another group of tracks 03BCD 41520000 0 REG 1749 PARV R0 head number 03BCE 41403967 1750 PARV HDCHKCNT2 number of tracks 03BCF 40403968 1751 PARVL HDCHKERR2 number of allowable errors 03BD0 FE0E3BD7 1752 JMP RETURN0 jump if drive is offline 03BD1 FA043BD6 0 1753 JGTZ R0 RETURN1 return if not too many errors 1754 * \ / 03BD2 DC404097 1755 CALLNP UNLOADHEAD else unload the heads 03BD3 DC003C3D 1756 CALL DISKOPRMSG tell operator about the problem 03BD4 40440000 IMM 1757 PARVL 0 "Suspected head crash on ..." 03BD5 FE0E3BD7 1758 JMP RETURN0 and say we unloaded heads 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 780 (MSPROC) F 43 Mass Storage Driver - Drive Activity Section 1759 * --- 1760 00003BD6 1761 RETURN1 LABEL 03BD6 61D7D001 7 7 REG 1762 LD R7 R7+1 good return 1763 * \ / 1764 00003BD7 1765 RETURN0 LABEL 03BD7 5D1F8002 6 STAK 1766 LEAVE POP 1767 * --- 1768 END CHECK1HEAD subroutine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 781 (MSPROC) F 43 Mass Storage Driver - Drive Activity Section 1770 1771 ********************************************************************************** 1772 * * 1773 * CHECKSTATE - Check Drive State for Present and Online. * 1774 * * 1775 * This subroutine will check the current drive status to * 1776 * see whether the drive is present and online. If not, we * 1777 * unmount any volume mounted here. * 1778 * * 1779 * LD MDV => MDV element * 1780 * CALLNP CHECKSTATE * 1781 * JMP drive no longer responding * 1782 * * 1783 * Registers Used: R0:R4 * 1784 * Stack Required: 23 * 1785 * 1 + max ( CANCELTMR (6), GETDISKID (22), HEADCHKSET (6), * 1786 * IDLEDRIVE (5), REMOUNT (4), UNMOUNTVOL (8) ) * 1787 * * 1788 ********************************************************************************** 1789 1790 BLOCK CHECKSTATE subroutine 1791 ENTRY CHECKSTATE 1792 1793 BEGFRAME 1794 ENDFRAME 1795 03BD8 DD5F8001 6 STAK 1796 CHECKSTATE ENTRNP PUSH 1797 * \ / 00003BD9 1798 AGAIN LABEL 03BD9 60095F11 0 5 ZBM 1799 LD R0 MDV,MDVCNTL R0 -> MCT element 03BDA 5C081014 0 ZBM 1800 CMZ R0,MCTDEAD is the BFD dead? 03BDB FE0C3BEE 1801 JNE NODRIVE jump if so 03BDC 60095830 0 5 ZBM 1802 LD R0 MDV,MDVUNIT our unit number 03BDD 60601A28 1 0 1803 LD R1 CIX(BFDSS+BFDSELECTB+R0) R1=our status 03BDE F66E3BEE 1 1804 JBT R1/BFDSSRSPER NODRIVE jump if drive not here 03BDF 600A6030 0 1 CBM 1805 LD R0 R1/BFDSSDNUM get the hardware drive number 03BE0 E4095231 0 5 ZBM 1806 ST R0 MDV,MDVCABLE which is drive cable position 03BE1 60094212 0 5 ZBM 1807 LD R0 MDV,MDVBADSKS drive unable to seek? 03BE2 7C094012 0 5 ZBM 1808 IOR R0 MDV,MDVBADDISK was head retracted 'cause of errors? 03BE3 FA0C3BF4 0 1809 JNEZ R0 NOTREADY if either, presume not ready 03BE4 F2483BF4 1 1810 JBF R1/BFDSSRDY NOTREADY jump if drive not ready 03BE5 600A4610 0 1 CBM 1811 LD R0 R1/BFDSSWPROT get status of writeprotect 03BE6 60894811 2 5 ZBM 1812 LD R2 MDV,MDVWPROT get prev state 03BE7 E4094811 0 5 ZBM 1813 ST R0 MDV,MDVWPROT save new state for mounter 03BE8 FA0C3BF6 0 1814 JNEZ R0 WRITEPROT if wprot, act similar to 'not ready' 03BE9 F6443BFC 1 1815 JBT R1/BFDSSNSAFE CAMEREADY jump if drive not safe 03BEA 5C095010 5 ZBM 1816 CMZ MDV,MDVREADY did we know drive is ready? 03BEB FE023C03 1817 JEQ DRIVEINIT jump if not 03BEC FA8C3BFC 2 1818 JNEZ R2 CAMEREADY jump if just un-writeprotected 03BED FE0E3C0C 1819 JMP RETURN1 else do nothing 1820 * --- 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 782 (MSPROC) F 43 Mass Storage Driver - Drive Activity Section 1822 1823 ********************************************************************************** 1824 * * 1825 * The above code sorts out the various cases and transfers * 1826 * to one of the following labels: * 1827 * * 1828 * NODRIVE - Either the disk controller is dead or the drive is * 1829 * not selectable. This is what happens when one pulls * 1830 * the plug on a drive. We don't try to dismount if * 1831 * there is no volume. This keeps us from generating * 1832 * a 'not ready' error log entry we don't want. * 1833 * * 1834 * NOTREADY - Either the disk is not spinning, or we have previously * 1835 * had problems with the drive (head crash or excessive * 1836 * seek failures). The first case means the disk has * 1837 * been spun down. The "problems" case means the drive * 1838 * ought to be spun down and looked at (we won't even * 1839 * handle the drive again until it's been power cycled). * 1840 * * 1841 * CAMEREADY - a) The drive is ready but in "volume not safe" status. * 1842 * The BFDC asserts "not safe" to indicate that the * 1843 * drive has spun down. The drive is now ready, so we * 1844 * read the pack information and try to remount. We * 1845 * first unmount, tho, in case the system was stopped * 1846 * when the drive was spun down. N.B. "Volume not safe" * 1847 * is NOT the same as the "drive unsafe" condition given * 1848 * (by the drive) when a drive can not be used. * 1849 * Or b) The drive just became un-writeprotected. Because * 1850 * wprot is much like not ready, the remedy is the same. * 1851 * * 1852 * DRIVEINIT - The drive is ready and safe, but MDVREADY = 0. * 1853 * This happens right after boot on drives that were * 1854 * made safe by boot, and on drives that whose MDV * 1855 * is being reinitialized (see ORRESETMDV OPREQ and * 1856 * DOREADREQ). This is where the head initially starts. * 1857 * * 1858 ********************************************************************************** 1859 00003BEE 1860 NODRIVE LABEL 03BEE DC003B80 1861 CALL CANCELTMR cancel head check timer 03BEF 40174812 5 BASE 1862 PARL MDV,MDVTIMESER pass ser num field 03BF0 5C094080 5 ZBM 1863 CMZ MDV,MDVVOLUME was there a volume? 03BF1 FE023C0D 1864 JEQ RETURN0 if not, don't try dismount 03BF2 DC4040A4 1865 CALLNP UNMOUNTVOL unmount volume 03BF3 FE0E3C0D 1866 JMP RETURN0 jump to destroy MDV 1867 * --- 1868 00003BF4 1869 NOTREADY LABEL 03BF4 DC003B80 1870 CALL CANCELTMR cancel head check timer 03BF5 40174812 5 BASE 1871 PARL MDV,MDVTIMESER pass ser num field 00003BF6 1872 WRITEPROT LABEL 1873 CLRTBIT MDV,MDVREADY say drive is no longer ready 03BF6 60020100 0 IMM 1873 LD R0 1*BIT(((MDV,MDVREADY) DISP (MDV,0))/BITS 0:4) 03BF7 A8174800 0 5 BASE 1873 BRSBM R0 MDV,(((MDV,MDVREADY) DISP (MDV,0))/BITS 15:31) 03BF8 FE023BFA 1874 JEQ NOVOLUME jump if we knew drive was not ready 03BF9 DC4040A4 1875 CALLNP UNMOUNTVOL make log file entries 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 783 (MSPROC) F 43 Mass Storage Driver - Drive Activity Section 00003BFA 1876 NOVOLUME LABEL 03BFA EE17480E 5 BASE 1877 STZ2 MDV,MDVVOLNAME clear volume name 03BFB FE0E3C0C 1878 JMP RETURN1 and return to our death 1879 * --- 1880 00003BFC 1881 CAMEREADY LABEL 03BFC DC003B80 1882 CALL CANCELTMR cancel head check timer 03BFD 40174812 5 BASE 1883 PARL MDV,MDVTIMESER serial number field 03BFE 5C094080 5 ZBM 1884 CMZ MDV,MDVVOLUME was there a volume? 03BFF FE023C01 1885 JEQ NOVOL if not, don't try dismount 03C00 DC4040A4 1886 CALLNP UNMOUNTVOL (drive spun down while sys stopped) 00003C01 1887 NOVOL LABEL 03C01 60040020 0 IMM 1888 LD R0 BFDFNSAFE controller function code to ... 03C02 E4001A20 0 1889 ST R0 CIX(BFDFUNC) ... make volume safe 1890 * \ / 1891 00003C03 1892 DRIVEINIT LABEL 03C03 DC403E43 1893 CALLNP IDLEDRIVE delay to allow drive logic to clear 03C04 DC403D9A 1894 CALLNP GETDISKID get drive, pack id's, & mount time 03C05 FE0E3BD9 1895 JMP AGAIN jump if drive went away 1896 SETTBIT MDV,MDVREADY say we know drive is ready 03C06 60020100 0 IMM 1896 LD R0 1*BIT(((MDV,MDVREADY) DISP (MDV,0))/BITS 0:4) 03C07 FC174800 0 5 BASE 1896 IORM R0 MDV,(((MDV,MDVREADY) DISP (MDV,0))/BITS 15:31) 03C08 DC403E33 1897 CALLNP HEADCHKSET set head check timer 03C09 5C094080 5 ZBM 1898 CMZ MDV,MDVVOLUME is volume already here? 03C0A FE0C3C0C 1899 JNE RETURN1 jump if so 1900 * \ / 1901 1902 * R3 & R4 have double word volume mount date 03C0B DC403F4C 1903 CALLNP REMOUNT else try the remounter 1904 * \ / 1905 00003C0C 1906 RETURN1 LABEL 03C0C 61D7D001 7 7 REG 1907 LD R7 R7+1 normal return 1908 * \ / 1909 00003C0D 1910 RETURN0 LABEL 03C0D 5D1F8001 6 STAK 1911 LEAVE POP return 1912 * --- 1913 1914 END CHECKSTATE subroutine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 784 (MSPROC) F 43 Mass Storage Driver - Drive Activity Section 1916 1917 ********************************************************************************** 1918 * * 1919 * CLEARFAULT - Clear a Drive Fault. * 1920 * * 1921 * This routine does the operations that are necessary to * 1922 * clear a drive fault, assuming the drive state is unknown. * 1923 * This means that a seek operation is possible, so we may * 1924 * need to wait for an interrupt. * 1925 * Remember that a reseek operation is necessary after * 1926 * this routine is called. * 1927 * * 1928 * LD MDV => MDV element * 1929 * CALLNP CLEARFAULT * 1930 * * 1931 * * 1932 * Eats R0:R3. * 1933 * Stack required: 2 * 1934 * 1 + max ( SEEKNDWAIT (1) ) * 1935 * * 1936 ********************************************************************************** 1937 1938 BLOCK CLEARFAULT routine 1939 ENTRY CLEARFAULT 1940 1941 BEGFRAME 1942 ENDFRAME 1943 03C0E DD5F8001 6 STAK 1944 CLEARFAULT ENTRNP PUSH 03C0F 60095830 0 5 ZBM 1945 LD R0 MDV,MDVUNIT R0 = our unit number 03C10 EC201A18 0 1946 STZ CIX(BFDSEEK+BFDSELECTB+R0) clear out cyl, head, sector 03C11 DC403FBE 1947 CALLNP SEEKNDWAIT wait for possible seek end 03C12 FA0C3C1A 0 1948 JNEZ R0 RETURN0 jump if controller is dead 03C13 60040011 0 IMM 1949 LD R0 BFDFNCLFLT get function to clear fault 03C14 E4001A20 0 1950 ST R0 CIX(BFDFUNC) and issue it to clear any faults 03C15 60040020 0 IMM 1951 LD R0 BFDFNSAFE get command code to make drive safe 03C16 E4001A20 0 1952 ST R0 CIX(BFDFUNC) and issue it 03C17 DC403FBE 1953 CALLNP SEEKNDWAIT wait for possible seek end 03C18 FA0C3C1A 0 1954 JNEZ R0 RETURN0 jump if controller is dead 03C19 19C40001 7 IMM 1955 ADD R7 1 give skip return 1956 * \ / 00003C1A 1957 RETURN0 LABEL 03C1A 5D1F8001 6 STAK 1958 LEAVE POP return to caller 1959 * --- 1960 1961 END of CLEARFAULT routine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 785 (MSPROC) F 43 Mass Storage Driver - Drive Activity Section 1963 1964 ********************************************************************************** 1965 * * 1966 * DISKCHECK - Perform a Write-Check Operation. * 1967 * * 1968 * This routine will perform a write-check operation with * 1969 * error recovery. If assumes that the drive is already on * 1970 * cylinder (but if it's not, we will discover that fact and * 1971 * redo the seek). * 1972 * * 1973 * LD PPL => PPL element * 1974 * LD MDV => MDV element * 1975 * CALLNP DISKCHECK * 1976 * * 1977 * * 1978 * * 1979 * * 1980 * In the normal return case, the caller should inspect * 1981 * MDVSUB to see whether the block should be substituted. * 1982 * * 1983 * Registers Used: R0:R3 * 1984 * Stack Required: 10 * 1985 * 1 + max ( DISKSEEK (8), PADBUILD (3), STATCHECK (9), * 1986 * TRACEPROC(3) ) * 1987 * * 1988 ********************************************************************************** 1989 1990 BLOCK DISKCHECK subroutine 1991 ENTRY DISKCHECK 1992 1993 BEGFRAME 1994 ENDFRAME 1995 03C1B DD5F8001 6 STAK 1996 DISKCHECK ENTRNP PUSH 03C1C EC0949C3 5 ZBM 1997 STZ MDV,MDVERRFLDS clean out the error counters 03C1D FE0E3C21 1998 JMP RECHECK skip initial seek 1999 * --- 2000 00003C1E 2001 RESEEK LABEL 03C1E DC403C7B 2002 CALLNP DISKSEEK redo the seek 03C1F FE0E3C3C 2003 JMP OFFLINE jump if drive went offline 03C20 FE0E3C37 2004 JMP MUSTSUB jump if permanent seek error 2005 * \ / 2006 00003C21 2007 RECHECK LABEL 03C21 60040003 0 IMM 2008 LD R0 MDVSTONCYL new state: waiting to start transfer 03C22 DCD7481B 5 BASE 2009 EXPCS MDV,MDVPC wait our turn 03C23 FA0C3C3C 0 2010 JNEZ R0 OFFLINE jump if controller is dead 2011 * \ / 03C24 60040001 0 IMM 2012 LD R0 1*PPUIDMAD 03C25 E4001802 0 2013 ST R0 CIX(PPUSSSTAT) set DMA direction to output 03C26 DC403EAA 2014 CALLNP PADBUILD set up data transfer addresses 2015 * \ / 03C27 60095830 0 5 ZBM 2016 LD R0 MDV,MDVUNIT get unit number 03C28 6057480D 1 5 BASE 2017 LD R1 MDV,MDVTIMCODE get write time code 03C29 E4601AD8 1 0 2018 ST R1 CIX(BFDWRCH+1*BFDINTBIT+BFDSELECTB)(R0) start write-check 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 786 (MSPROC) F 43 Mass Storage Driver - Drive Activity Section 2019 TRACE MSTRACE,MSTCHECK write-check, R0=unit, R1=TimeCode 03C2A 5D401D2C 2019 XCT TRACECALL(MSTRACE) 03C2B FEC00006 2019 NOP (MSTRACE*BITS 22:26)+(MSTCHECK*BITS 27:31) 03C2C 60040004 0 IMM 2020 LD R0 MDVSTDT new state: data transfer in progress 03C2D DCD7481B 5 BASE 2021 EXPCS MDV,MDVPC wait for it to complete 03C2E FA0C3C3C 0 2022 JNEZ R0 OFFLINE jump if controller is dead 2023 * \ / 03C2F DC003FCA 2024 CALL STATCHECK check our status 03C30 40440007 IMM 2025 PARVL OPCHECK operation is write-check 03C31 FE0E3C3C 2026 JMP OFFLINE drive went offline 03C32 FE0E3C37 2027 JMP MUSTSUB the case is hopeless 03C33 FE0E3C1E 2028 JMP RESEEK must redo the seek 03C34 FE0E3C21 2029 JMP RECHECK must redo the transfer 03C35 FE0E3C3B 2030 JMP NEEDWRITE check failed, but rewrite might help 03C36 FE0E3C3A 2031 JMP CHECKOK all is well 2032 * --- 2033 00003C37 2034 MUSTSUB LABEL 03C37 5C094013 5 ZBM 2035 CMZ MDV,MDVNOSUB should substitutions be ignored 03C38 FE0C3C3A 2036 JNE CHECKOK jump if yes 03C39 EDC94A13 5 ZBM 2037 STW MDV,MDVSUB say we must substitute 2038 * \ / 2039 00003C3A 2040 CHECKOK LABEL normal return 03C3A 61D7D001 7 7 REG 2041 LD R7 R7+1 2042 * \ / 2043 00003C3B 2044 NEEDWRITE LABEL failed check - rewrite may help 03C3B 61D7D001 7 7 REG 2045 LD R7 R7+1 2046 * \ / 2047 00003C3C 2048 OFFLINE LABEL drive is offline 03C3C 5D1F8001 6 STAK 2049 LEAVE POP return 2050 * --- 2051 2052 END DISKCHECK subroutine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 787 (MSPROC) F 43 Mass Storage Driver - Drive Activity Section 2054 2055 ********************************************************************************** 2056 * * 2057 * DISKOPRMSG - Send a "Drive Is Offline" Message * 2058 * to the Operator. * 2059 * * 2060 * This routine sends a message to the front panel to say * 2061 * that the given drive has been taken offline by the system, * 2062 * and sends a short explanation to the operator. * 2063 * The messages are defined herein. The code parameter * 2064 * indicates the type of disk problem that occurred. * 2065 * Assignment: * 2066 * * 2067 * code lights operator * 2068 * ---- ------ -------- * 2069 * 0 "CRASH scu" "Suspected head crash on * 2070 * DSKscu... Do not use!" * 2071 * 1 "REZEROscu" "Unable to seek * 2072 * DSKscu... Do not use!" * 2073 * * 2074 * LD MDV => MDV element * 2075 * CALL DISKOPRMSG * 2076 * PARVL code * 2077 * * 2078 * Eats R0:R3. * 2079 * Stack required: 6 * 2080 * 2 + max ( GENOPMSG (1), HEXTOCHAR (4), P6TOCHAR (3), * 2081 * SGETMEM (0) ) * 2082 * * 2083 ********************************************************************************** 2084 2085 BLOCK DISKOPRMSG Subroutine 2086 ENTRY DISKOPRMSG 2087 2088 BEGFRAME 00178801 6 BASE 2089 MSGPTR BSS 1 loc of message group 2090 ENDFRAME 2091 03C3D DD1F8002 6 STAK 2092 DISKOPRMSG ENTR PUSH 03C3E C0520000 0 REG 2093 STPVL R0 get code 03C3F 60203C66 0 0 2094 LD R0 MSGPTRTAB(R0) determine msgs to use 03C40 E4178801 0 6 BASE 2095 ST R0 MSGPTR save loc of msg group 03C41 DC002ED0 2096 CALL SGETMEM get an OPMSG block 03C42 40440005 IMM 2097 PARVL OPMSGLOG 03C43 61120000 4 0 REG 2098 LD R4 R0 2099 * \ / 03C44 38970802 2 4 BASE 2100 LEA R2 R4,OPMSGTEXT put lights part into message 03C45 60178801 0 6 BASE 2101 LD R0 SP,MSGPTR get current position in block 03C46 60560400 1 0 @R 2102 LD R1 @R0 get length field 03C47 38160001 0 0 CACH 2103 LEA R0 CACH R0,1 get address of first char 03C48 FE400000 2104 CMOVE move chars 03C49 E4178801 0 6 BASE 2105 ST R0 SP,MSGPTR save current position in block 2106 * \ / 03C4A 60495F11 1 5 ZBM 2107 LD R1 MDV,MDVCNTL R1 => MCT element 03C4B 60084841 0 1 ZBM 2108 LD R0 R1,MCTPMVALUE/PFSLOT R0 = PPU slot number 03C4C 600A0800 0 0 CBM 2109 LD R0 R0/BITS 4:3 shift left 1 hex digit 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 788 (MSPROC) F 43 Mass Storage Driver - Drive Activity Section 03C4D 18087021 0 1 ZBM 2110 ADD R0 R1,MCTPMVALUE/PPUCHAN insert BFD channel number 03C4E 600A0800 0 0 CBM 2111 LD R0 R0/BITS 4:3 shift left another hex digit 03C4F 18095830 0 5 ZBM 2112 ADD R0 MDV,MDVUNIT R0 = hardware address 03C50 DC0058D1 2113 CALL HEXTOCHAR convert it to characters 03C51 41520000 0 REG 2114 PARV R0 value 03C52 41440003 IMM 2115 PARV 3 field width 03C53 40168000 2 CACH 2116 PARL CACH R2,0 where to put it 2117 * \ / R2 => null at end of string 03C54 60178801 0 6 BASE 2118 LD R0 SP,MSGPTR get current position in msg group 03C55 60560400 1 0 @R 2119 LD R1 @R0 get length field 03C56 38160001 0 0 CACH 2120 LEA R0 CACH R0,1 get address of first char 03C57 FE400000 2121 CMOVE move chars 2122 * \ / 03C58 DC00593E 2123 CALL P6TOCHAR put disk name into message 03C59 41574805 5 BASE 2124 PARV MDV,MDVNAME 03C5A 40168000 2 CACH 2125 PARL CACH R2,0 2126 * \ / R2 => null at end of string 03C5B 60043C77 0 IMM 2127 LD R0 ADR FINW pointer to final msg part 03C5C 6044000F 1 IMM 2128 LD R1 FINWLEN length 03C5D FE400000 2129 CMOVE move chars 2130 * \ / 03C5E 38170802 0 4 BASE 2131 LEA R0 R4,OPMSGTEXT R0 = beginning of text 03C5F 608A9F30 2 2 CBM 2132 LD R2 R2/FLDCHARS 03C60 108A1F30 2 0 CBM 2133 SUB R2 R0/FLDCHARS R2 = message length 03C61 E4970007 2 4 CACH 2134 ST R2 R4,OPMSGLEN save it 03C62 EC0902E0 4 ZBM 2135 STZ R4,OPMSGPROC no process number 03C63 DC0046F3 2136 CALL GENOPMSG generate the message 03C64 40530000 4 REG 2137 PARVL R4 03C65 5D1F8002 6 STAK 2138 LEAVE POP return to caller 2139 * --- 2140 2141 * Table of message descriptors indexed by msg code 00003C66 2142 MSGPTRTAB LABEL 03C66 020C3C68 2143 PTR MSG0 head crash 03C67 420C3C70 2144 PTR MSG1 re-zero probs 2145 2146 * Operator message when drive appears to have 2147 * a head crash and we've retracted heads 02003C68 2148 MSG0 BSSC 0 03C67 00000006 2149 VFDC 6 03C68 00000020 2150 VFDC "C","R","A","S","H"," " 03C69 00000019 2151 VFDC 25 03C6B 00000020 2152 VFDC " ","S","u","s","p","e","c","t","e","d"," " 03C6F 00000020 2153 VFDC "h","e","a","d"," ","c","r","a","s","h"," ","o","n"," " 2154 2155 * Operator message when drive must be taken offline 2156 * because it can't be re-zeroed. 42003C70 2157 MSG1 BSSC 0 03C6F 00000006 2158 VFDC 6 03C71 0000004F 2159 VFDC "R","E","Z","E","R","O" 03C71 00000010 2160 VFDC 16 03C75 00000020 2161 VFDC " ","U","n","a","b","l","e"," ","t","o"," ","s","e","e","k"," " 2162 2163 * Final warning on both messages 0000000F ABS 2164 FINWLEN EQU 15 03C77 2E2E2E20 2165 FINW TEXT "... Do not use!" 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 789 (MSPROC) F 43 Mass Storage Driver - Drive Activity Section 2166 2167 END DISKOPRMSG subroutine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 790 (MSPROC) F 43 Mass Storage Driver - Drive Activity Section 2169 2170 ********************************************************************************** 2171 * * 2172 * DISKSEEK - Perform a Seek on the Disk. * 2173 * * 2174 * This routine will seek the disk, and wait for it to * 2175 * complete. It will do any necessary retries. * 2176 * * 2177 * LD PPL => PPL (used for error logging only) * 2178 * LD MDV => MDV element (MDVSEEKADR must be set) * 2179 * CALLNP DISKSEEK * 2180 * * 2181 * * 2182 * * 2183 * * 2184 * Registers Used: R0:R3 * 2185 * Stack Required: 8 * 2186 * 1 + max ( REZERO (7), SEEKNDSTAT (4), SEEKNDWAIT (1) * 2187 * TRACEPROC (3) ) * 2188 * * 2189 ********************************************************************************** 2190 2191 BLOCK DISKSEEK subroutine 2192 ENTRY DISKSEEK 2193 2194 BEGFRAME 2195 ENDFRAME 2196 03C7B DD5F8001 6 STAK 2197 DISKSEEK ENTRNP PUSH 00003C7C 2198 RESEEK LABEL 03C7C 60095F11 0 5 ZBM 2199 LD R0 MDV,MDVCNTL get the controller element pointer 03C7D 5C081014 0 ZBM 2200 CMZ R0,MCTDEAD is the controller dead? 03C7E FE0C3C91 2201 JNE RETURN split if so 2202 * \ / 03C7F 60095830 0 5 ZBM 2203 LD R0 MDV,MDVUNIT get unit number 03C80 60574808 1 5 BASE 2204 LD R1 MDV,MDVSEEKADR get seek address 03C81 68574804 1 5 BASE 2205 UCPR R1 MDV,MDVMAXSEEK is the address reasonable? 03C82 ECC94C19 5 ZBM 2206 STLGE MDV,MDVBFDSTAT/BFDSSSKERR indicate seek error if not 03C83 ECC94C1B 5 ZBM 2207 STLGE MDV,MDVLOPSTAT/BFDSSSKERR remember in last operation status 03C84 FE063C99 2208 JGE PERMDSKERR and don't even try the operation 03C85 E4601A18 1 0 2209 ST R1 CIX(BFDSEEK+BFDSELECTB)(R0) start the seek 2210 TRACE MSTRACE,MSTSEEK seeking, R0=unit, R1=SeekAdr 03C86 5D401D2C 2210 XCT TRACECALL(MSTRACE) 03C87 FEC00002 2210 NOP (MSTRACE*BITS 22:26)+(MSTSEEK*BITS 27:31) 2211 * \ / 03C88 DC403FBE 2212 CALLNP SEEKNDWAIT wait for seek to complete 03C89 FA0C3C91 0 2213 JNEZ R0 RETURN jump if controller is dead 03C8A 60174809 0 5 BASE 2214 LD R0 MDV,MDVBFDSTAT get disk status after seek 03C8B E417480B 0 5 BASE 2215 ST R0 MDV,MDVLOPSTAT and save in last operation status 03C8C DC003FA0 2216 CALL SEEKNDSTAT check seek end status 03C8D 40440001 IMM 2217 PARVL OPSEEK doing seek 03C8E FE0E3C91 2218 JMP RETURN jump if went offline 03C8F FE0E3C92 2219 JMP SEEKERR jump if seek error 2220 * \ / 03C90 61D7D002 7 7 REG 2221 LD R7 R7+2 normal return 00003C91 2222 RETURN LABEL 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 791 (MSPROC) F 43 Mass Storage Driver - Drive Activity Section 03C91 5D1F8001 6 STAK 2223 LEAVE POP 2224 * -- 2225 00003C92 2226 SEEKERR LABEL 03C92 DC403F74 2227 CALLNP REZERO try to realign the drive 03C93 FE0E3C91 2228 JMP RETURN jump if drive offline 03C94 BC095843 0 5 ZBM 2229 INCL R0 MDV,MDVSKERRS say one more seek error 03C95 5C094213 5 ZBM 2230 CMZ MDV,MDVNOERRS see if special error handling 03C96 FE0C3C99 2231 JNE PERMDSKERR if so, one is too many 03C97 64040005 0 IMM 2232 CPR R0 MDVSKERLIM too many otherwise? 03C98 FE083C7C 2233 JLT RESEEK jump if not 2234 * \ / 00003C99 2235 PERMDSKERR LABEL 03C99 FBE03C91 7 2236 IRJ R7 RETURN else give error return 2237 * --- 2238 2239 END DISKSEEK subroutine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 792 (MSPROC) F 43 Mass Storage Driver - Drive Activity Section 2241 2242 ********************************************************************************** 2243 * * 2244 * DISKWRITE - Write a Disk Block. * 2245 * * 2246 * This routine will perform a disk-write operation, * 2247 * retrying as necessary. It will not do such things as * 2248 * write-check, however. * 2249 * * 2250 * LD PPL => PPL element * 2251 * LD MDV => MDV element * 2252 * CALLNP DISKWRITE * 2253 * * 2254 * * 2255 * * 2256 * * 2257 * Registers Used: R0:R3 * 2258 * Stack Required: 10 * 2259 * 1 + max ( DISKSEEK (8), PADBUILD (3), STATCHECK (9), * 2260 * TRACEPROC(3) ) * 2261 * * 2262 ********************************************************************************** 2263 2264 BLOCK DISKWRITE subroutine 2265 ENTRY DISKWRITE 2266 2267 BEGFRAME 2268 ENDFRAME 2269 03C9A DD5F8001 6 STAK 2270 DISKWRITE ENTRNP PUSH 03C9B EC0949C3 5 ZBM 2271 STZ MDV,MDVERRFLDS reset error counters 2272 * \ / 2273 00003C9C 2274 RESEEK LABEL 03C9C DC403C7B 2275 CALLNP DISKSEEK do the seek 03C9D FE0E3CBC 2276 JMP OFFLINE jump if drive went offline 03C9E FE0E3CB7 2277 JMP MUSTSUB jump if permanent seek error 2278 * \ / 2279 00003C9F 2280 REWRITE LABEL 03C9F 60040003 0 IMM 2281 LD R0 MDVSTONCYL new state: on cylinder 03CA0 DCD7481B 5 BASE 2282 EXPCS MDV,MDVPC wait our turn 03CA1 FA0C3CBC 0 2283 JNEZ R0 OFFLINE jump if controller is dead 2284 * \ / 03CA2 60040001 0 IMM 2285 LD R0 1*PPUIDMAD 03CA3 E4001802 0 2286 ST R0 CIX(PPUSSSTAT) set DMA to output 03CA4 DC403EAA 2287 CALLNP PADBUILD set up data transfer addresses 2288 * \ / 03CA5 D0174807 5 BASE 2289 INC MDV,MDVWRITCNT count number of writes 03CA6 60095830 0 5 ZBM 2290 LD R0 MDV,MDVUNIT get unit number 03CA7 60401EE6 1 2291 LD R1 FDATE(1) get timecode value 03CA8 E4601AC8 1 0 2292 ST R1 CIX(BFDWRITE+1*BFDINTBIT+BFDSELECTB)(R0) start the write 2293 TRACE MSTRACE,MSTWRITE write, R0=unit, R1=TimeCode 03CA9 5D401D2C 2293 XCT TRACECALL(MSTRACE) 03CAA FEC00005 2293 NOP (MSTRACE*BITS 22:26)+(MSTWRITE*BITS 27:31) 03CAB E457480D 1 5 BASE 2294 ST R1 MDV,MDVTIMCODE save the time code 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 793 (MSPROC) F 43 Mass Storage Driver - Drive Activity Section 2295 * \ / 03CAC 60040004 0 IMM 2296 LD R0 MDVSTDT new state: doing transfer 03CAD DCD7481B 5 BASE 2297 EXPCS MDV,MDVPC wait for it to complete 03CAE FA0C3CBC 0 2298 JNEZ R0 OFFLINE jump if controller is dead 2299 * \ / 03CAF DC003FCA 2300 CALL STATCHECK check our status 03CB0 40440006 IMM 2301 PARVL OPWRITE doing a write 03CB1 FE0E3CBC 2302 JMP OFFLINE jump if drive went offline 03CB2 FE0E3CB7 2303 JMP MUSTSUB jump if hopeless error 03CB3 FE0E3C9C 2304 JMP RESEEK jump if need to reseek 03CB4 FE0E3C9F 2305 JMP REWRITE jump if need to redo the write 03CB5 FE0E3CBB 2306 JMP MEMPARERR jump if memory parity error 03CB6 FE0E3CBA 2307 JMP WRITEOK jump if all went well 2308 * --- 2309 00003CB7 2310 MUSTSUB LABEL 03CB7 5C094013 5 ZBM 2311 CMZ MDV,MDVNOSUB are substitutions to be ignored 03CB8 FE0C3CBA 2312 JNE WRITEOK jump if they are 03CB9 EDC94A13 5 ZBM 2313 STW MDV,MDVSUB say we should substitute 2314 * \ / 2315 00003CBA 2316 WRITEOK LABEL normal return 03CBA 61D7D001 7 7 REG 2317 LD R7 R7+1 2318 * \ / 2319 00003CBB 2320 MEMPARERR LABEL memory parity error 03CBB 61D7D001 7 7 REG 2321 LD R7 R7+1 2322 * \ / 2323 00003CBC 2324 OFFLINE LABEL drive is offline 03CBC 5D1F8001 6 STAK 2325 LEAVE POP return 2326 * --- 2327 2328 END DISKWRITE subroutine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 794 (MSPROC) F 43 Mass Storage Driver - Drive Activity Section 2330 2331 ********************************************************************************** 2332 * * 2333 * DOREADREQ - Process a Read Request. * 2334 * * 2335 * This routine will process a read request if possible. * 2336 * There are actually six different types of requests, as * 2337 * follows: * 2338 * * 2339 * If MSQFORMAT = 1, the track corresponding to MSQBLOCK gets * 2340 * formatted. * 2341 * * 2342 * If MSQREINIT = 1, the drive's MDV get's reinitialized from * 2343 * the pack label, etc.. * 2344 * * 2345 * Otherwise, the two flags are interpreted as: * 2346 * * 2347 * MSQSNEWAD MSQZPAGE action * 2348 * --------- -------- ------------------------------ * 2349 * 0 X Read block MSQACTAD. * 2350 * 1 0 Get block MSQACTAD, convert to MSQBLOCK. * 2351 * 1 1 Get zero page, convert to MSQBLOCK. * 2352 * * 2353 * If it is not possible to do the request because no * 2354 * idle pages are available, we will do nothing. If it is * 2355 * possible, we will remove and free the MSQ element after * 2356 * completion. Note that a format operation requires no PPL, * 2357 * hence it will most certainly get done. * 2358 * Note the oddity that FORMAT is a read operation. This * 2359 * is for list locking considerations. See the ORFORMAT OPREQ. * 2360 * * 2361 * LD MSQ => MSQ element * 2362 * LD MDV => MDV element * 2363 * CALLNP DOREADREQ * 2364 * * 2365 * * 2366 * * 2367 * Registers Used: R0:R4 * 2368 * Stack Required: 17 * 2369 * 1 + max ( ADDRSWITCH (16), FORMAT (10), GETZEROPAGE (5), * 2370 * LOCKWAIT (0), PUTPPAGE (1), READ (13), * 2371 * RQSTDONE (13) ) * 2372 * * 2373 ********************************************************************************** 2374 2375 BLOCK DOREADREQ subroutine 2376 ENTRY DOREADREQ 2377 2378 BEGFRAME 2379 ENDFRAME 2380 00003CBD 2381 MSREADTAB LABEL 03CBD 00003CCC 2382 ADR NORMREAD normal read request 03CBE 00003CD1 2383 ADR FUNNYREAD address switch request 03CBF 00003CCC 2384 ADR NORMREAD normal read 03CC0 00003CD5 2385 ADR ZIPPAGE zero page request 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 795 (MSPROC) F 43 Mass Storage Driver - Drive Activity Section 2386 03CC1 DD5F8001 6 STAK 2387 DOREADREQ ENTRNP PUSH 03CC2 6008D230 0 3 ZBM 2388 LD R0 MSQ,MSQTYPE/MSQMAIFLD get the maintenance bits only 03CC3 E4094033 0 5 ZBM 2389 ST R0 MDV,MDVMAIFLD and put into the MDV element 2390 2391 * check for special operations 03CC4 5C08D010 3 ZBM 2392 CMZ MSQ,MSQTYPE/MSQFORMAT is this a format request? 03CC5 FE0C3CE8 2393 JNE DOFORMAT jump if it is 03CC6 5C08CE10 3 ZBM 2394 CMZ MSQ,MSQTYPE/MSQREINIT is this a reinit request? 03CC7 FE0C3CEB 2395 JNE DOREINIT jump if it is 2396 * \ / 2397 03CC8 60094213 0 5 ZBM 2398 LD R0 MDV,MDVNOERRS error recovery inhibit flag 03CC9 E4094613 0 5 ZBM 2399 ST R0 MDV,MDVNOLOG forego logging maint errors 03CCA 6008DA20 0 3 ZBM 2400 LD R0 MSQ,MSQTYPE/MSQTYPFLD get non maintenance bits 03CCB 5CA03CBD 0 2401 LDPC MSREADTAB(R0) perform appropriate processing 2402 * --- 2403 2404 * Normal read request 2405 00003CCC 2406 NORMREAD LABEL 03CCC DC003EBE 2407 CALL READ read from disk 03CCD 4056C802 3 BASE 2408 PARVL MSQ,MSQACTAD block number wanted 03CCE FE0E3CE7 2409 JMP OFFLINE jump if drive is offline 03CCF FE0E3CE6 2410 JMP CANTREAD jump if no pages available 03CD0 FE0E3CD8 2411 JMP DIDREAD jump if we got the page 2412 * --- 2413 2414 * Address switch request 2415 00003CD1 2416 FUNNYREAD LABEL 03CD1 DC403AF8 2417 CALLNP ADDRSWITCH do address-switch request 03CD2 FE0E3CE7 2418 JMP OFFLINE jump if drive went offline 03CD3 FE0E3CE6 2419 JMP CANTREAD jump if no pages available 03CD4 FE0E3CD8 2420 JMP DIDREAD jump if we got the page 2421 * --- 2422 2423 * Zero page request 2424 00003CD5 2425 ZIPPAGE LABEL 03CD5 DC003E18 2426 CALL GETZEROPG do zero-page request 03CD6 4056C801 3 BASE 2427 PARVL MSQ,MSQBLOCK block number to become 03CD7 FE0E3CE6 2428 JMP CANTREAD jump if page not available 2429 * \ / 2430 00003CD8 2431 DIDREAD LABEL 03CD8 DC402D6C 2432 CALLNP PUTPPAGE put PPL on PPAGE list 2433 * \ / 00003CD9 2434 FORMATXIT LABEL (jumped to w/PPL=0) 2435 PLOCK MSQINLOCK lock the MS read queue 03CD9 0CC00000 2435 IOFF 03CDA D1C01F16 2435 SETT MSQINLOCK 03CDB FE0C3CDD 2435 JNE MA(2+DISPW MA 0) 03CDC DC40308B 2435 CALLNP LOCKWAIT 03CDD 60494080 1 5 ZBM 2436 LD R1 MDV,MDVVOLUME get volume number 03CDE 60621F22 1 1 2437 LD R1 VOLNTABLE(R1) R1 -> VOLN element 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 796 (MSPROC) F 43 Mass Storage Driver - Drive Activity Section 03CDF 60D64816 3 1 BASE 2438 LD MSQ R1,VOLNREADQ first read request 03CE0 6008DF10 0 3 ZBM 2439 LD R0 MSQ,MSQLINK the rest of the list 03CE1 E4164816 0 1 BASE 2440 ST R0 R1,VOLNREADQ remove first element from read queue 2441 PUNLOCK MSQINLOCK unlock the input queue 03CE2 EC001F16 2441 STZ MSQINLOCK 03CE3 0C800000 2441 ION 2442 * \ / 03CE4 D0401F18 2443 DEC DISKRBUSY decrement the number of MS read requests 03CE5 DC403F95 2444 CALLNP RQSTDONE clean up after request 2445 * \ / 2446 00003CE6 2447 CANTREAD LABEL 03CE6 61D7D001 7 7 REG 2448 LD R7 R7+1 normal return 2449 * \ / 2450 00003CE7 2451 OFFLINE LABEL 03CE7 5D1F8001 6 STAK 2452 LEAVE POP return to caller 2453 * --- 2454 2455 ********************************************************************************** 2456 * * 2457 * DOFORMAT - Format a Track on a Disk. * 2458 * * 2459 * This code handle the request to format a track. The * 2460 * MSQ element contains a disk address, we seek to that block * 2461 * and start the format operation there. * 2462 * * 2463 * N.B. There is no PPL associated with this request. * 2464 * * 2465 ********************************************************************************** 2466 00003CE8 2467 DOFORMAT LABEL 03CE8 DC403D79 2468 CALLNP FORMAT format a track 03CE9 FE0E3CE7 2469 JMP OFFLINE jump if drive went offline 03CEA FE0E3CD9 2470 JMP FORMATXIT finish the request 2471 * --- 2472 2473 ********************************************************************************** 2474 * * 2475 * DOREINIT - Reinitialize the MDV * 2476 * * 2477 * This code handles the request to ensure that the MDV * 2478 * has the up-to-date drive info from the pack itself. It's * 2479 * needed when a drive is made readable online (i.e. formatted). * 2480 * This is deceptively simple! It decrements R7 so that * 2481 * we'll take the OFFLINE exit (but not until the MSQ element * 2482 * is dumped!), sets the flag that causes CHECKSTATE to be * 2483 * called, and clears the flag MDVREADY flag so CHECKSTATE * 2484 * will reread the pack label, etc. (i.e. it looks like the * 2485 * drive was "made safe by boot"). * 2486 * * 2487 * Note that the operation isn't complete by the time this * 2488 * subroutine returns! For this reason, and because there * 2489 * is no MS block involved, we have no one to unsuspend from * 2490 * MSWAIT. * 2491 * * 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 797 (MSPROC) F 43 Mass Storage Driver - Drive Activity Section 2492 * N.B. There is no PPL associated with this request. We * 2493 * therefore clear the PPL register for RQSTDONE. * 2494 * * 2495 ********************************************************************************** 2496 00003CEB 2497 DOREINIT LABEL 03CEB 11C40001 7 IMM 2498 SUB R7 1 so that we take OFFLINE exit 2499 SETTBIT MDV,MDVCHKSTAT so CHECKSTATE is called 03CEC 60020080 0 IMM 2499 LD R0 1*BIT(((MDV,MDVCHKSTAT) DISP (MDV,0))/BITS 0:4) 03CED FC174800 0 5 BASE 2499 IORM R0 MDV,(((MDV,MDVCHKSTAT) DISP (MDV,0))/BITS 15:31) 2500 CLRTBIT MDV,MDVREADY so CHECKSTATE resets MDV 03CEE 60020100 0 IMM 2500 LD R0 1*BIT(((MDV,MDVREADY) DISP (MDV,0))/BITS 0:4) 03CEF A8174800 0 5 BASE 2500 BRSBM R0 MDV,(((MDV,MDVREADY) DISP (MDV,0))/BITS 15:31) 03CF0 61040000 4 IMM 2501 LD PPL 0 indicate no page associated 03CF1 FE0E3CD9 2502 JMP FORMATXIT finish the request 2503 * --- 2504 2505 END DOREADREQ subroutine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 798 (MSPROC) F 43 Mass Storage Driver - Drive Activity Section 2507 2508 ********************************************************************************** 2509 * * 2510 * DOREWRITE - Rewrite a Block for Error Recovery. * 2511 * * 2512 * This routine will re-write and write-check a block. It * 2513 * is called by READ and WRITE for error-recovery purposes. * 2514 * * 2515 * LD PPL => PPL * 2516 * LD MDV => MDV element * 2517 * CALLNP DOREWRITE * 2518 * * 2519 * * 2520 * * 2521 * Registers Used: R0:R3 * 2522 * Stack Required: 11 * 2523 * 1 + max ( DISKCHECK (10), DISKWRITE (10) ) * 2524 * * 2525 ********************************************************************************** 2526 2527 BLOCK DOREWRITE subroutine 2528 ENTRY DOREWRITE 2529 2530 BEGFRAME 2531 ENDFRAME 2532 03CF2 DD5F8001 6 STAK 2533 DOREWRITE ENTRNP PUSH 03CF3 DC403C9A 2534 CALLNP DISKWRITE write the block 03CF4 FE0E3CFC 2535 JMP OFFLINE jump if drive is offline 03CF5 FE0E3CFB 2536 JMP RETURN jump if memory parity error 03CF6 5C094A13 5 ZBM 2537 CMZ MDV,MDVSUB is substitute needed? 03CF7 FE0C3CFB 2538 JNE RETURN if so, don't bother with check 03CF8 DC403C1B 2539 CALLNP DISKCHECK do the write-check 03CF9 FE0E3CFC 2540 JMP OFFLINE jump if drive now offline 03CFA EDC94A13 5 ZBM 2541 STW MDV,MDVSUB flag if still not written well 2542 * \ / 2543 00003CFB 2544 RETURN LABEL 03CFB 61D7D001 7 7 REG 2545 LD R7 R7+1 normal return 2546 * \ / 2547 00003CFC 2548 OFFLINE LABEL 03CFC 5D1F8001 6 STAK 2549 LEAVE POP return 2550 * --- 2551 2552 END DOREWRITE subroutine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 799 (MSPROC) F 43 Mass Storage Driver - Drive Activity Section 2554 2555 ********************************************************************************** 2556 * * 2557 * DOWRITEREQ - Process a Write Request. * 2558 * * 2559 * This routine will process a request on the MS write * 2560 * queue. There are two kinds of requests: dual-write and * 2561 * force-write. * 2562 * After performing the request, we clear the * 2563 * "force-write in progress" flag in the associated PPL. To * 2564 * appropriately interlock with the page-fault processor, the * 2565 * MSQINLOCK must be held while clearing the flag. Otherwise, * 2566 * the page-fault processor might decide that the page is not * 2567 * available and shut a user down at the same time that we are * 2568 * clearing the flag, and the user might never get awakened. * 2569 * * 2570 * LD MSQ => MSQ element * 2571 * LD MDV => MDV element * 2572 * CALLNP DOWRITEREQ * 2573 * * 2574 * * 2575 * * 2576 * Eats R0:R4. * 2577 * Stack required: 14 * 2578 * 1 + max ( LOCKWAIT (0), RQSTDONE (13), SFREEMEM (0), * 2579 * WRITE (13) ) * 2580 * * 2581 ********************************************************************************** 2582 2583 BLOCK DOWRITEREQ subroutine 2584 ENTRY DOWRITEREQ 2585 2586 BEGFRAME 2587 ENDFRAME 2588 03CFD DD5F8001 6 STAK 2589 DOWRITEREQ ENTRNP PUSH 03CFE 6008D230 0 3 ZBM 2590 LD R0 MSQ,MSQTYPE/MSQMAIFLD get the maintenance bits only 03CFF E4094033 0 5 ZBM 2591 ST R0 MDV,MDVMAIFLD and put into the MDV element 03D00 60094213 0 5 ZBM 2592 LD R0 MDV,MDVNOERRS error recovery inhibit flag 03D01 E4094613 0 5 ZBM 2593 ST R0 MDV,MDVNOLOG forego logging maint errors 03D02 6116C803 4 3 BASE 2594 LD PPL MSQ,MSQXPTR get extra PPL for dual-write 03D03 FB303D0A 4 2595 JZA PPL NOTDUAL jump if none, not a dual-write 03D04 DC4040D7 2596 CALLNP WRITE write the secondary block 03D05 FE0E3D23 2597 JMP OFFLINE jump if drive went offline 03D06 EC16C803 3 BASE 2598 STZ MSQ,MSQXPTR convert dual-write to force-write 03D07 DC002F5D 2599 CALL SFREEMEM free the funny extra PPL 03D08 41440004 IMM 2600 PARV PPFBLOG pass the size 03D09 40530000 4 REG 2601 PARVL PPL and the block address 2602 * \ / 2603 00003D0A 2604 NOTDUAL LABEL 03D0A 6116C802 4 3 BASE 2605 LD PPL MSQ,MSQPPPTR get pointer to real PPL 03D0B DC4040D7 2606 CALLNP WRITE write the block 03D0C FE0E3D23 2607 JMP OFFLINE jump if drive went offline 2608 * \ / 2609 PLOCK MSQINLOCK lock the INPUT queue 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 800 (MSPROC) F 43 Mass Storage Driver - Drive Activity Section 03D0D 0CC00000 2609 IOFF 03D0E D1C01F16 2609 SETT MSQINLOCK 03D0F FE0C3D11 2609 JNE MA(2+DISPW MA 0) 03D10 DC40308B 2609 CALLNP LOCKWAIT 2610 CLRTBIT PPL,PPFWIP clear the force-write bit 03D11 60022000 0 IMM 2610 LD R0 1*BIT(((PPL,PPFWIP) DISP (PPL,0))/BITS 0:4) 03D12 A8170802 0 4 BASE 2610 BRSBM R0 PPL,(((PPL,PPFWIP) DISP (PPL,0))/BITS 15:31) 2611 PUNLOCK MSQINLOCK unlock the input queue 03D13 EC001F16 2611 STZ MSQINLOCK 03D14 0C800000 2611 ION 2612 * \ / 2613 PLOCK MSQOUTLOCK lock the output queue 03D15 0CC00000 2613 IOFF 03D16 D1C01F17 2613 SETT MSQOUTLOCK 03D17 FE0C3D19 2613 JNE MA(2+DISPW MA 0) 03D18 DC40308B 2613 CALLNP LOCKWAIT 03D19 60494080 1 5 ZBM 2614 LD R1 MDV,MDVVOLUME get volume number 03D1A 60621F22 1 1 2615 LD R1 VOLNTABLE(R1) R1 -> VOLN element 03D1B 60D64817 3 1 BASE 2616 LD MSQ R1,VOLNWRITEQ 03D1C 6008DF10 0 3 ZBM 2617 LD R0 MSQ,MSQLINK 03D1D E4164817 0 1 BASE 2618 ST R0 R1,VOLNWRITEQ remove first element from write queue 2619 PUNLOCK MSQOUTLOCK unlock the output queue 03D1E EC001F17 2619 STZ MSQOUTLOCK 03D1F 0C800000 2619 ION 2620 * \ / 03D20 D0401F19 2621 DEC DISKWBUSY say one less write pending 03D21 DC403F95 2622 CALLNP RQSTDONE finish off the request 03D22 61D7D001 7 7 REG 2623 LD R7 R7+1 good return 2624 * \ / 00003D23 2625 OFFLINE LABEL 03D23 5D1F8001 6 STAK 2626 LEAVE POP return 2627 * --- 2628 2629 END DOWRITEREQ subroutine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 801 (MSPROC) F 43 Mass Storage Driver - Drive Activity Section 2631 2632 ********************************************************************************** 2633 * * 2634 * FIXSEGMENT - Correct a Single-Segment Error after * 2635 * Read. * 2636 * * 2637 * This routine will read the correction segment from the * 2638 * disk controller and fix up the segment in error. It must be * 2639 * called after a read and before any other data transfer * 2640 * operation on the controller. * 2641 * This is a controller operation, so it should not fail * 2642 * unless the controller got tied up and MS_RESET was called. * 2643 * This invalidates the check segment, so no retries are made. * 2644 * Appropriate recovery is to reread the block. * 2645 * * 2646 * LD R0 bad segment number * 2647 * LD PPL => PPL of block read * 2648 * LD MDV => MDV element * 2649 * CALLNP FIXSEGMENT * 2650 * * 2651 * * 2652 * * 2653 * Eats R0:R3. * 2654 * Stack required: 7 * 2655 * 4 + max ( ERRORLOG (3), MAPINFBI (2), MAPOUTFBI (2), * 2656 * SFREEMEM (0), SGETMEM (0), TRACEPROC (3) ) * 2657 * * 2658 ********************************************************************************** 2659 2660 BLOCK FIXSEGMENT subroutine 2661 ENTRY FIXSEGMENT 2662 2663 BEGFRAME 00178801 6 BASE 2664 BLOCKPTR BSS 1 address of correction segment memory 00178802 6 BASE 2665 BADSEGPTR BSS 1 offset to end of bad segment 00178803 6 BASE 2666 PPLFBI BSS 1 address of FBI for bad segment 00000040 BYTE 2667 SAVESEGN EQU BITS 0:3 some temp storage in R7 2668 ENDFRAME 2669 03D24 DD5F8004 6 STAK 2670 FIXSEGMENT ENTRNP PUSH 03D25 E40BC040 0 7 CBM 2671 ST R0 R7/SAVESEGN save away so ERRORLOG doesn't get it 03D26 60D20000 3 0 REG 2672 LD R3 R0 place here for parameter passing 03D27 DC005048 2673 CALL ERRORLOG log that we are trying to correct 03D28 41440C39 IMM 2674 PARV ERLCRDGCS reading check segment 03D29 41574805 5 BASE 2675 PARV MDV,MDVNAME drive name 03D2A 41570801 4 BASE 2676 PARV PPL,PPBLOCK block number 03D2B 4052C000 3 REG 2677 PARVL R3 segment number 2678 03D2C 60CBC040 3 7 CBM 2679 LD R3 R7/SAVESEGN restore bad segment number 03D2D FAC23D78 3 2680 JEQZ R3 BADSEGNUM jump if segment number out of range 03D2E 68C4000A 3 IMM 2681 UCPR R3 BFDCHKSEG is error in correction segment? 03D2F FE043D78 2682 JGT BADSEGNUM jump if unreasonable 03D30 FE083D32 2683 JLT OKSEGNUM jump if reasonable 03D31 FBE03D77 7 2684 IRJ R7 RETURN error is in correction segment - do nothing 2685 * --- 2686 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 802 (MSPROC) F 43 Mass Storage Driver - Drive Activity Section 00003D32 2687 OKSEGNUM LABEL 03D32 1CC40073 3 IMM 2688 MUL R3 BFDSEGSIZE R3 = offset to END of bad segment 03D33 E4D78802 3 6 BASE 2689 ST R3 SP,BADSEGPTR save it 03D34 DC002ED0 2690 CALL SGETMEM get space for correction segment 03D35 40440007 IMM 2691 PARVL (BFDSEGSIZE+1) LOG 2 03D36 E4178801 0 6 BASE 2692 ST R0 SP,BLOCKPTR save pointer to block 2693 * \ / 2694 2695 * Read the correction segment. 2696 2697 * \ / 03D37 60CA1E70 3 0 CBM 2698 LD PFPTR R0/FLDPAGE page number of gotten page 03D38 7CC40080 3 IMM 2699 IOR PFPTR MONPF make it monitor space 03D39 80928000 2 REG 2700 PFRD R2 get real page number 03D3A E48A14C0 2 0 CBM 2701 ST R2 R0/FLDABSPG replace virt page with real page 03D3B E40A9560 0 2 CBM 2702 ST R0 R2/PAGEANDISP combine with slot number 03D3C 60040001 0 IMM 2703 LD R0 1*PPUIDMAD 03D3D E4001803 0 2704 ST R0 CIX(PPUSCSTAT) set DMA direction to input 03D3E E4801805 2 2705 ST R2 CIX(PPUADDR1) set transfer address 03D3F 600481D0 0 IMM 2706 LD R0 (BFDSEGSIZE+1)*CPW+1*PPUCLAST 03D40 E4001804 0 2707 ST R0 CIX(PPUCNT1) set byte count 03D41 60095830 0 5 ZBM 2708 LD R0 MDV,MDVUNIT get unit number in R0 for trace 03D42 EDE01AB8 0 2709 STW CIX(BFDREAD+BFDSELECTB+1*BFDINTBIT)(R0) get check segment 2710 TRACE MSTRACE,MSTRDCHK get check seg, R0=unit 03D43 5D401D2C 2710 XCT TRACECALL(MSTRACE) 03D44 FEC00004 2710 NOP (MSTRACE*BITS 22:26)+(MSTRDCHK*BITS 27:31) 2711 * \ / 03D45 60040004 0 IMM 2712 LD R0 MDVSTDT new state: data transfer in progress 03D46 DCD7481B 5 BASE 2713 EXPCS MDV,MDVPC wait for it to complete 2714 * \ / 2715 03D47 FA0C3D73 0 2716 JNEZ R0 FREEBLK jump if controller is dead 03D48 62574809 125 BASE 2717 LD2 R1 MDV,MDVBFDSTAT get statuses 03D49 78403962 1 2718 AND R1 XFERMASK mask off irrelevant bits 03D4A 64403963 1 2719 CPR R1 XFEROK is all well with disk? 03D4B FE0C3D4E 2720 JNE BUMSEG jump if not 03D4C 78856540 2 IMM 2721 AND R2 PPUMASK mask off irrelevant PPU bits 03D4D FA823D57 2 2722 JEQZ R2 GOTSEG exit if life is easy 2723 * \ / 2724 00003D4E 2725 BUMSEG LABEL 03D4E DC005048 2726 CALL ERRORLOG log the bad transfer 03D4F 41441A32 IMM 2727 PARV ERLCDE disk error 03D50 41574805 5 BASE 2728 PARV MDV,MDVNAME 03D51 41570801 4 BASE 2729 PARV PPL,PPBLOCK block number 03D52 41574808 5 BASE 2730 PARV MDV,MDVSEEKADR seek address 03D53 41440005 IMM 2731 PARV OPCHKSEG operation 03D54 41574809 5 BASE 2732 PARV MDV,MDVBFDSTAT disk status 03D55 4057480A 5 BASE 2733 PARVL MDV,MDVPPUSTAT channel status 03D56 FE0E3D73 2734 JMP FREEBLK take error return 2735 * --- 2736 2737 * Map the block into WNDO4, then do the XOR trick to 2738 * fix the bad segment. 00003D57 2739 GOTSEG LABEL 03D57 DC002606 2740 CALL MAPINFBI map the FBI to correct 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 803 (MSPROC) F 43 Mass Storage Driver - Drive Activity Section 03D58 40530000 4 REG 2741 PARVL PPL pass physical page element 03D59 E4578803 1 6 BASE 2742 ST R1 SP,PPLFBI store FBI loc 03D5A 60C40085 3 IMM 2743 LD PFPTR PNWNDO4 page number of available window 03D5B 00D70803 4 BASE 2744 LDPF PPL,PPPMVALUE map page into WNDO4 03D5C 60D78801 3 6 BASE 2745 LD R3 SP,BLOCKPTR R3 -> correction segment 03D5D 6087FF8D 2 IMM 2746 LD R2 -BFDSEGSIZE get initial word index 2747 * \ / 2748 00003D5E 2749 NEXTWORD LABEL 03D5E 60569073 1 2 REG 2750 LD R1 R2+BFDSEGSIZE copy the 'within segment' word index 03D5F 601CC800 0 31 BASE 2751 LD R0 R3,0(R1) get word from correction segment 03D60 10440400 1 IMM 2752 SUB R1 WPP make data/FBI split at 0! 2753 * \ / 2754 00003D61 2755 DOREGW LABEL 03D61 74221800 0 1 2756 XOR R0 WNDO4(WPP)(R1) get word from data area 03D62 18440073 1 IMM 2757 ADD R1 BFDSEGSIZE move to corresponding word in next segment 03D63 FA483D61 1 2758 JLTZ R1 DOREGW jump if still in data area 03D64 6444000B 1 IMM 2759 CPR R1 9*BFDSEGSIZE-WPP not in data area, still in FBI? 03D65 FE063D67 2760 JGE DIDFBIW jump if not in FBI 03D66 741D8C03 0 61 FPVR 2761 XOR R0 @(SP,PPLFBI)(R1) do last word from FBI 00003D67 2762 DIDFBIW LABEL 03D67 60578802 1 6 BASE 2763 LD R1 SP,BADSEGPTR get pointer to end of bad segment 03D68 18528000 1 2 REG 2764 ADD R1 R2 make point to current word 03D69 10440400 1 IMM 2765 SUB R1 WPP make data/FBI split at 0 03D6A FA483D6D 1 2766 JLTZ R1 COREGW jump if not into FBI 03D6B F41D8C03 0 61 FPVR 2767 XORM R0 @(SP,PPLFBI)(R1) fixup FBI word 03D6C FE0E3D6E 2768 JMP THISCDN done with this word, next 2769 * --- 2770 00003D6D 2771 COREGW LABEL 03D6D F4221800 0 1 2772 XORM R0 WNDO4(WPP)(R1) fixup data segment word 2773 00003D6E 2774 THISCDN LABEL 03D6E FAA03D5E 2 2775 IRJ R2 NEXTWORD go on to do next word 2776 * \ / 2777 * The data is now corrected. Release the correction 2778 * block and unmap the page. 2779 * \ / 2780 03D6F 61D7D001 7 7 REG 2781 LD R7 R7+1 successful return 03D70 60C40085 3 IMM 2782 LD PFPTR PNWNDO4 page number of correction data page 03D71 80D2C000 3 REG 2783 PFRC PFPTR unmap the data block 03D72 DC40261B 2784 CALLNP MAPOUTFBI unmap FBI we corrected 2785 * \ / 2786 00003D73 2787 FREEBLK LABEL 03D73 60D78801 3 6 BASE 2788 LD R3 SP,BLOCKPTR address of temp storage 03D74 DC002F5D 2789 CALL SFREEMEM free the correction segment 03D75 41440007 IMM 2790 PARV (BFDSEGSIZE+1) LOG 2 size 03D76 4052C000 3 REG 2791 PARVL R3 address 2792 * \ / 2793 00003D77 2794 RETURN LABEL 03D77 5D1F8004 6 STAK 2795 LEAVE POP return to caller 2796 * --- 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 804 (MSPROC) F 43 Mass Storage Driver - Drive Activity Section 2797 03D78 00130105 2798 BADSEGNUM HALT HALTS0105 segment number is bad (in R3) 2799 * --- 2800 2801 END FIXSEGMENT subroutine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 805 (MSPROC) F 43 Mass Storage Driver - Drive Activity Section 2803 2804 ********************************************************************************** 2805 * * 2806 * FORMAT - Format One Track. * 2807 * * 2808 * This routine will perform a disk-format operation, * 2809 * retrying as necessary. It does not guarantee that the * 2810 * surface is usable, this should be done with writes and * 2811 * subsequent reads. * 2812 * * 2813 * LD MDV => MDV element * 2814 * CALLNP FORMAT * 2815 * * 2816 * * 2817 * * 2818 * Registers Used: R0:R3. Sets PPL. * 2819 * Stack Required: 10 * 2820 * 1 + max ( CALCSKADR (1), DISKSEEK (8), STATCHECK (9), * 2821 * TRACEPROC (3) ) * 2822 * * 2823 ********************************************************************************** 2824 2825 BLOCK FORMAT subroutine 2826 ENTRY FORMAT 2827 2828 BEGFRAME 2829 ENDFRAME 2830 03D79 DD5F8001 6 STAK 2831 FORMAT ENTRNP PUSH 03D7A 6002A000 0 IMM 2832 LD R0 (1*MDVNOERRSB)+(1*MDVNOLOGB) 03D7B E4174803 0 5 BASE 2833 ST R0 MDV,MDVERRWORD clear MDVERRFLDS, set flags 03D7C EC130000 4 REG 2834 STZ PPL this request does not deal with pages 03D7D DC003B66 2835 CALL CALCSKADR calculate seek address 03D7E 4056C801 3 BASE 2836 PARVL MSQ,MSQBLOCK pass disk address 2837 * \ / 2838 00003D7F 2839 RETRYSEEK LABEL 03D7F DC403C7B 2840 CALLNP DISKSEEK attempt to seek to cylinder 03D80 FE0E3D97 2841 JMP OFFLINE disk is now offline 03D81 FE0E3D96 2842 JMP FORMATXIT unable to seek, just return 2843 * \ / 2844 00003D82 2845 RETRYFMT LABEL 03D82 60040003 0 IMM 2846 LD R0 MDVSTONCYL new state: on cylinder 03D83 DCD7481B 5 BASE 2847 EXPCS MDV,MDVPC wait our turn 03D84 FA0C3D97 0 2848 JNEZ R0 OFFLINE jump if controller dead 2849 * \ / 03D85 6004F078 0 IMM 2850 LD R0 BFDFORMATW/BITS 0:15 construct the format word 03D86 60443C1E 1 IMM 2851 LD R1 BFDFORMATW/BITS 16:31 03D87 E40A4100 0 1 CBM 2852 ST R0 R1/BITS 0:15 that should do it 03D88 60095830 0 5 ZBM 2853 LD R0 MDV,MDVUNIT get unit number 03D89 E4601AE8 1 0 2854 ST R1 CIX(BFDFORMAT+1*BFDINTBIT+BFDSELECTB)(R0) start the format 2855 TRACE MSTRACE,MSTFORMAT format, R0=unit 03D8A 5D401D2C 2855 XCT TRACECALL(MSTRACE) 03D8B FEC0000F 2855 NOP (MSTRACE*BITS 22:26)+(MSTFORMAT*BITS 27:31) 2856 * \ / 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 806 (MSPROC) F 43 Mass Storage Driver - Drive Activity Section 03D8C 60040004 0 IMM 2857 LD R0 MDVSTDT new state: doing operation 03D8D DCD7481B 5 BASE 2858 EXPCS MDV,MDVPC wait for completion interrupt 03D8E FA0C3D97 0 2859 JNEZ R0 OFFLINE jump if controller dead 2860 * \ / 03D8F DC003FCA 2861 CALL STATCHECK check operation status 03D90 40440009 IMM 2862 PARVL OPFORMAT doing a format 03D91 FE0E3D97 2863 JMP OFFLINE drive is now offline 03D92 FE0E3D96 2864 JMP FORMATXIT jump if permanent error 03D93 FE0E3D7F 2865 JMP RETRYSEEK jump to retry seek 03D94 FE0E3D82 2866 JMP RETRYFMT jump to retry operation 03D95 FEC00000 2867 NOP 0 shouldn't get here 2868 * \ / 00003D96 2869 FORMATXIT LABEL 03D96 19C40001 7 IMM 2870 ADD R7 1 advance to good return 2871 * \ / 00003D97 2872 OFFLINE LABEL 03D97 EC094213 5 ZBM 2873 STZ MDV,MDVNOERRS restore normal error handling 03D98 EC094613 5 ZBM 2874 STZ MDV,MDVNOLOG restore normal error logging 03D99 5D1F8001 6 STAK 2875 LEAVE POP return to caller 2876 * --- 2877 2878 END FORMAT subroutine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 807 (MSPROC) F 43 Mass Storage Driver - Drive Activity Section 2880 2881 ********************************************************************************** 2882 * * 2883 * GETDISKID - Get ID of Drive and Pack. * 2884 * * 2885 * This routine will get the drive serial number, pack * 2886 * manufacturer and serial number, pack formatted date, and * 2887 * volume name. It will put an entry into the error log with * 2888 * this information. It will also fill in MDVSECPTRK, * 2889 * MDVTRKPCYL, MDVMAXSEEK, MDVFMTDAT, MDVBTRXDA and MDVVOLNAME. * 2890 * It returns a double word value that REMOUNT should * 2891 * match against VOLNMNTDAT. Normally, it is SECMNTDAT from * 2892 * the security block. If the sec blocks were not available, * 2893 * or the SECMNTDAT is 0, it is 0 and should be ignored (the * 2894 * MDVFMTDAT should be used instead). * 2895 * * 2896 * LD MDV => MDV element * 2897 * CALLNP GETDISKID * 2898 * JMP drive offline * 2899 * ST2 R3 * 2900 * * 2901 * Registers Used: R0:R4 * 2902 * Stack Required: 22 * 2903 * 8 + max ( CALCDRVADR (1), ERRORLOG (3), GETDRIVEID (7), * 2904 * INTREAD (14), PUTIDLE (1) ) * 2905 * * 2906 ********************************************************************************** 2907 2908 BLOCK GETDISKID subroutine 2909 ENTRY GETDISKID 2910 00000010 BYTE 2911 NODIDBIT EQU BIT 0 bit in R7 to indicate no drive ID board 00000210 BYTE 2912 SBIT EQU BIT 1 bit in R7 to say we tried 2nd security block 2913 2914 BEGFRAME 00178801 6 BASE 2915 DRIVEID BSS 3 disk drive id 00178804 6 BASE 2916 PACKMFG BSS 1 pack manufacturer 00178805 6 BASE 2917 PACKSN BSS 1 pack serial number 00178806 6 BASE 2918 TEMPSPOT BSS 2 storage 2919 ENDFRAME 2920 03D9A DD5F8008 6 STAK 2921 GETDISKID ENTRNP PUSH 03D9B EE178801 6 BASE 2922 STZ2 SP,DRIVEID clear drive serial number in case... 03D9C EC178803 6 BASE 2923 STZ SP,DRIVEID(2) ... the call to GETDRIVEID is skipped 03D9D EC178804 6 BASE 2924 STZ SP,PACKMFG clear pack manufacturer field 03D9E EC178805 6 BASE 2925 STZ SP,PACKSN clear pack serial number field 03D9F EE178806 6 BASE 2926 STZ2 SP,TEMPSPOT clear these, too 2927 * MDVFMTDAT and MDVBTRXPPL zeroed in initial element creation 2928 * \ / 03DA0 62003E00 01 2929 LD2 R0 DFLTVOLNM get default volume name 03DA1 E617480E 015 BASE 2930 ST2 R0 MDV,MDVVOLNAME save it 03DA2 D157400B 5 CACH 2931 STMW MDV,MDVSECPTRK get sectors per track 03DA3 D157400A 5 CACH 2932 STMW MDV,MDVTRKPCYL set tracks per cylinder 03DA4 D1574804 5 BASE 2933 STMW MDV,MDVMAXSEEK set max seek address 2934 * \ / 03DA5 DC003E63 2935 CALL INTREAD read a block 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 808 (MSPROC) F 43 Mass Storage Driver - Drive Activity Section 03DA6 41440000 IMM 2936 PARV PLDA disk address of the pack label 03DA7 40440001 IMM 2937 PARVL FBITPL expected FBI type 03DA8 FE0E3DF7 2938 JMP RETURN0 jump if offline 03DA9 FE0E3DF8 2939 JMP ERRPKLBL jump if data error 03DAA FE0E3DF8 2940 JMP ERRPKLBL jump if electronic error 2941 * \ / 03DAB 60C40085 3 IMM 2942 LD PFPTR PNWNDO4 page number of available page 03DAC 00D70803 4 BASE 2943 LDPF PPL,PPPMVALUE map page into WNDO4 03DAD 60001400 0 2944 LD R0 WNDO4/PLMAKER 03DAE E4178804 0 6 BASE 2945 ST R0 SP,PACKMFG save manufacturer name 03DAF 60001401 0 2946 LD R0 WNDO4/PLSERNO 03DB0 E4178805 0 6 BASE 2947 ST R0 SP,PACKSN save pack serial number 03DB1 62001407 01 2948 LD2 R0 WNDO4/PLINIDATE 03DB2 E6174810 015 BASE 2949 ST2 R0 MDV,MDVFMTDAT save formatted date 03DB3 60001410 0 2950 LD R0 WNDO4/PLSECPTRK get size of volume... 03DB4 E417400B 0 5 CACH 2951 ST R0 MDV,MDVSECPTRK ...sectors per track 03DB5 60001411 0 2952 LD R0 WNDO4/PLTRKPCYL 03DB6 E417400A 0 5 CACH 2953 ST R0 MDV,MDVTRKPCYL ...tracks per cylinder 03DB7 60001412 0 2954 LD R0 WNDO4/PLCYLPPCK 03DB8 60440000 1 IMM 2955 LD R1 0 initialize reg for hardware seek address 03DB9 E40A4100 0 1 CBM 2956 ST R0 R1/BFDSACYL 03DBA E4574804 1 5 BASE 2957 ST R1 MDV,MDVMAXSEEK ...and maximum seek address 03DBB 60041400 0 IMM 2958 LD R0 ADR WNDO4 get pointer to page 03DBC 60083014 0 0 ZBM 2959 LD R0 R0,PLFLAGS/PLNODRVID get bit indicating no head retract board 03DBD E40BC010 0 7 CBM 2960 ST R0 R7/NODIDBIT and stash in R7 03DBE 60001413 0 2961 LD R0 WNDO4/PLSIZE 03DBF E417481A 0 5 BASE 2962 ST R0 MDV,MDVSIZE ...size in blocks 03DC0 60001418 0 2963 LD R0 WNDO4/PLBDTRXDA get address of bad trax list 03DC1 E4174816 0 5 BASE 2964 ST R0 MDV,MDVBTRXDA 03DC2 80D2C000 3 REG 2965 PFRC PFPTR unmap the page 03DC3 DC402D51 2966 CALLNP PUTIDLE free the page 2967 * \ / 2968 2969 ********************************************************************************** 2970 * Here we check to see if this drive has a head retract * 2971 * board (drive ID board) that we should read. If so, as * 2972 * indicated by a bit in the pack label, we call GETDRIVEID to * 2973 * get its serial number. * 2974 ********************************************************************************** 2975 2976 * \ / 03DC4 F7C03DC9 7 2977 JBT R7/NODIDBIT NODIDBRD jump if no board present 03DC5 38178801 0 6 BASE 2978 LEA R0 SP,DRIVEID 03DC6 DC003E02 2979 CALL GETDRIVEID get drive serial number 03DC7 40160400 0 @R 2980 PARL @R0 where to put it 03DC8 FE0E3DF7 2981 JMP RETURN0 jump if drive went offline 2982 * \ / 2983 2984 ********************************************************************************** 2985 * Read volume label to get the volume name (among others, * 2986 * used for mount-by-volumename XREQ). Also, get security * 2987 * block addresses for our own use. * 2988 ********************************************************************************** 2989 2990 * \ / 00003DC9 2991 NODIDBRD LABEL 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 809 (MSPROC) F 43 Mass Storage Driver - Drive Activity Section 03DC9 DC003E63 2992 CALL INTREAD read a block 03DCA 41440001 IMM 2993 PARV VOLLABELDA the volume label 03DCB 40440004 IMM 2994 PARVL FBITVL expected FBI type 03DCC FE0E3DF7 2995 JMP RETURN0 jump if offline 03DCD FE0E3DE8 2996 JMP DOLOG jump if data error 03DCE FE0E3DE8 2997 JMP DOLOG jump if data error 2998 * \ / 03DCF 60C40085 3 IMM 2999 LD PFPTR PNWNDO4 page number of available window 03DD0 00D70803 4 BASE 3000 LDPF PPL,PPPMVALUE map in the page 03DD1 62001404 01 3001 LD2 R0 WNDO4/VLVNAME get volume name 03DD2 E617480E 015 BASE 3002 ST2 R0 MDV,MDVVOLNAME save it 03DD3 60001410 0 3003 LD R0 WNDO4/VLSUBSDA address of substitution block 03DD4 E4174818 0 5 BASE 3004 ST R0 MDV,MDVSUBSDA save in the MDV element 03DD5 60001412 0 3005 LD R0 WNDO4/VLSECBDA address of primary security block 03DD6 60401413 1 3006 LD R1 WNDO4/VLSECB2DA address of secondary security block 03DD7 E6178806 016 BASE 3007 ST2 R0 SP,TEMPSPOT save on stack 03DD8 80D2C000 3 REG 3008 PFRC PFPTR unmap the page 03DD9 DC402D51 3009 CALLNP PUTIDLE release the page 3010 * \ / 3011 3012 * read the security block to get the last mount time stamp 03DDA 60D78806 3 6 BASE 3013 LD R3 SP,TEMPSPOT(0) primary security block address 03DDB EC0BC210 7 CBM 3014 STZ R7/SBIT say no retry yet 00003DDC 3015 TRYAGAIN LABEL 03DDC DC003E63 3016 CALL INTREAD try to read it 03DDD 4152C000 3 REG 3017 PARV R3 DA 03DDE 40440006 IMM 3018 PARVL FBITSEC FBI type 03DDF FE0E3DF7 3019 JMP RETURN0 offline 03DE0 FE0E3DFB 3020 JMP TRYOTHER data error 03DE1 FE0E3DFB 3021 JMP TRYOTHER electronic error 3022 * \ / 3023 03DE2 60C40085 3 IMM 3024 LD PFPTR PNWNDO4 page number of available window 03DE3 00D70803 4 BASE 3025 LDPF PPL,PPPMVALUE map in the page 03DE4 62001402 01 3026 LD2 R0 WNDO4/SECMNTDAT get last mount date 03DE5 E6178806 016 BASE 3027 ST2 R0 SP,TEMPSPOT save it on the stack 03DE6 80D2C000 3 REG 3028 PFRC PFPTR unmap the page 03DE7 DC402D51 3029 CALLNP PUTIDLE release the page 3030 * \ / 3031 3032 * log the spin up 00003DE8 3033 DOLOG LABEL 03DE8 61138000 4 6 REG 3034 LD R4 SP base reg for local vars 03DE9 DC005048 3035 CALL ERRORLOG log an event 03DEA 41442830 IMM 3036 PARV ERLCDSKID disk is spinning 03DEB 41574805 5 BASE 3037 PARV MDV,MDVNAME 03DEC 41570801 4 BASE 3038 PARV R4,DRIVEID(0) disk drive 03DED 41570802 4 BASE 3039 PARV R4,DRIVEID(1) serial 03DEE 41570803 4 BASE 3040 PARV R4,DRIVEID(2) number 03DEF 41570804 4 BASE 3041 PARV R4,PACKMFG pack manufacturer 03DF0 41570805 4 BASE 3042 PARV R4,PACKSN pack serial number 03DF1 41574810 5 BASE 3043 PARV MDV,MDVFMTDAT(0) pack formatted 03DF2 41574811 5 BASE 3044 PARV MDV,MDVFMTDAT(1) date 03DF3 4157480E 5 BASE 3045 PARV MDV,MDVVOLNAME(0) volume 03DF4 4057480F 5 BASE 3046 PARVL MDV,MDVVOLNAME(1) name 3047 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 810 (MSPROC) F 43 Mass Storage Driver - Drive Activity Section 03DF5 61D7D001 7 7 REG 3048 LD R7 R7+1 good return 3049 * \ / 3050 03DF6 62D78806 346 BASE 3051 LD2 R3 SP,TEMPSPOT retrieve remount ID 00003DF7 3052 RETURN0 LABEL 03DF7 5D1F8008 6 STAK 3053 LEAVE POP 3054 * --- 3055 3056 ********************************************************************************** 3057 * * 3058 * The pack label is unreadable at this point, hopefully * 3059 * a format operation is to be performed on this pack. In an * 3060 * attempt to generate some kind of format date (to identify * 3061 * the pack) we use the cable position. * 3062 * * 3063 ********************************************************************************** 3064 00003DF8 3065 ERRPKLBL LABEL 03DF8 DC403B5D 3066 CALLNP CALCDRVADR calculate drive's address 03DF9 E4174811 0 5 BASE 3067 ST R0 MDV,MDVFMTDAT(1) and set into MDV element 03DFA FE0E3DE8 3068 JMP DOLOG log this event 3069 * --- 3070 3071 ********************************************************************************** 3072 * * 3073 * A security block won't read. Try the second if we haven't already. * 3074 * * 3075 ********************************************************************************** 3076 00003DFB 3077 TRYOTHER LABEL 03DFB 60D78807 3 6 BASE 3078 LD R3 SP,TEMPSPOT(1) secondary security block address 03DFC D1CBC210 7 CBM 3079 SETT R7/SBIT test, set flag 03DFD FE0C3DDC 3080 JNE TRYAGAIN jump if still alive 3081 * \ / 3082 03DFE EE178806 6 BASE 3083 STZ2 SP,TEMPSPOT say no date available 03DFF FE0E3DE8 3084 JMP DOLOG join exit chorus 3085 * --- 3086 03E00 E6A76B44 3087 DFLTVOLNM PAK12 !UNLABELLED! name of volume with unreadable vol label 3088 3089 END GETDISKID subroutine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 811 (MSPROC) F 43 Mass Storage Driver - Drive Activity Section 3091 3092 ********************************************************************************** 3093 * * 3094 * GETDRIVEID - Get Disk Drive Serial Number. * 3095 * * 3096 * This routine will fetch the serial number (and other * 3097 * identifying information from a drive). This depends on a * 3098 * special BTI - installed board in the disk drive, that works * 3099 * as follows: * 3100 * If one seeks to cylinder and head BFDMAGICHD, then * 3101 * the kludge board takes over control of the write-protect * 3102 * status line, and instead of it reflecting the setting of * 3103 * the write protect switch, it is the value of bit in a * 3104 * 1K prom on the kludge board. The drive id is in bits 0..95 * 3105 * of this prom. Note that it is not necessary for a seek to * 3106 * complete before looking at the status. * 3107 * Note also that some drives believe that this write * 3108 * protect status is real and furthermore, they 'de-bounce' * 3109 * the signal by leaving the drive write protected for a * 3110 * period of time (800 ms) following the release of the write * 3111 * protect line. we therefore we call for the driver to idle * 3112 * for that length of time after we read the board. * 3113 * * 3114 * LD MDV => MDV element * 3115 * CALL GETDRIVEID * 3116 * PARL 3-word area to put ID into * 3117 * JMP drive quit responding * 3118 * * 3119 * Eats R0:R4 * 3120 * Stack required: 7 * 3121 * 2 + max ( CLEARFAULT (2), IDLEDRIVE (5), SEEKNDWAIT (1), * 3122 * TRACEPROC (3) ) * 3123 * * 3124 ********************************************************************************** 3125 3126 BLOCK GETDRIVEID subroutine 3127 ENTRY GETDRIVEID 3128 3129 BEGFRAME 00178801 6 BASE 3130 RESULTPTR BSS 1 ZBM pointer to first bit of result 3131 ENDFRAME 3132 03E02 DD1F8002 6 STAK 3133 GETDRIVEID ENTR PUSH 03E03 38080010 0 0 ZBM 3134 LEA R0 R0,0/BIT 0 convert to 1-bit ZBM address 03E04 C0178801 6 BASE 3135 STPL SP,RESULTPTR save pointer to first bit of result 03E05 60095830 0 5 ZBM 3136 LD R0 MDV,MDVUNIT R0 = our unit number 3137 TRACE MSTRACE,MSTGETID get drive id, R0 = unit 03E06 5D401D2C 3137 XCT TRACECALL(MSTRACE) 03E07 FEC0000D 3137 NOP (MSTRACE*BITS 22:26)+(MSTGETID*BITS 27:31) 3138 * \ / 03E08 6084FF00 2 IMM 3139 LD R2 BFDMAGICHD*BFDSAHEAD prototype seek address 03E09 6044005F 1 IMM 3140 LD R1 3*WORDLNTH-1 index in prom 3141 * \ / 00003E0A 3142 LOOP LABEL 03E0A E44A8100 1 2 CBM 3143 ST R1 R2/BFDSACYL get cylinder number 03E0B E4A01A18 2 0 3144 ST R2 CIX(BFDSEEK+BFDSELECTB+R0) do the seek command 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 812 (MSPROC) F 43 Mass Storage Driver - Drive Activity Section 03E0C 60C01A20 3 3145 LD R3 CIX(BFDSS) get status 03E0D F6EE3E17 3 3146 JBT R3/BFDSSRSPER RETURN0 jump if not there 03E0E 60CAC610 3 3 CBM 3147 LD R3 R3/BFDSSWPROT isolate data bit 03E0F E4DD8C01 3 61 FPVR 3148 ST R3 @(SP,RESULTPTR)(R1) save a data bit 03E10 FA663E0A 1 3149 JDR R1 LOOP get all bits 03E11 DC403FBE 3150 CALLNP SEEKNDWAIT wait for possible seek and 03E12 FA0C3E17 0 3151 JNEZ R0 RETURN0 jump if controller is dead 03E13 DC403C0E 3152 CALLNP CLEARFAULT clear any fault 03E14 FE0E3E17 3153 JMP RETURN0 jump if drive offline 03E15 DC403E43 3154 CALLNP IDLEDRIVE delay a moment 03E16 61D7D001 7 7 REG 3155 LD R7 R7+1 good return 3156 * \ / 00003E17 3157 RETURN0 LABEL 03E17 5D1F8002 6 STAK 3158 LEAVE POP 3159 * --- 3160 3161 END GETDRIVEID subroutine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 813 (MSPROC) F 43 Mass Storage Driver - Drive Activity Section 3163 3164 ********************************************************************************** 3165 * * 3166 * GETZEROPG - Get a Fresh Zero Page. * 3167 * * 3168 * This routine will get an idle page, zero it, and * 3169 * convert it into a page for a specified block. On return, * 3170 * the PPL is not on any list, but has a busy count of 1. * 3171 * * 3172 * CALL GETZEROPG * 3173 * PARVL block number * 3174 * * 3175 * * 3176 * * 3177 * Eats R0:R2. Sets PPL. * 3178 * Stack required: 5 * 3179 * 2 + max ( GETIDLE (1), ZEROPAGE (3) ) * 3180 * * 3181 ********************************************************************************** 3182 3183 BLOCK GETZEROPG subroutine 3184 ENTRY GETZEROPG 3185 3186 BEGFRAME 00178801 6 BASE 3187 TEMP BSS 1 place to stuff the block number 3188 ENDFRAME 3189 03E18 DD1F8002 6 STAK 3190 GETZEROPG ENTR PUSH 03E19 C0578801 6 BASE 3191 STPVL SP,TEMP TEMP = block number 3192 * \ / 03E1A DC402D1C 3193 CALLNP GETIDLE get an idle page 03E1B FE0E3E23 3194 JMP RETURN jump if none available 03E1C EDC91F12 4 ZBM 3195 STW PPL,PPBUSYWORD/FLDADRS make it busy once 03E1D EDC90012 4 ZBM 3196 STW PPL,PPMODIFIED make it modified 03E1E E0D78801 3 6 BASE 3197 EXCH R3 SP,TEMP TEMP = R3, R3 = block number 03E1F E4D70801 3 4 BASE 3198 ST R3 PPL,PPBLOCK set block number in PPL 03E20 DC404120 3199 CALLNP ZEROPAGE zero out the page 03E21 60D78801 3 6 BASE 3200 LD R3 SP,TEMP restore R3 03E22 61D7D001 7 7 REG 3201 LD R7 R7+1 successful return 3202 * \ / 3203 00003E23 3204 RETURN LABEL 03E23 5D1F8002 6 STAK 3205 LEAVE POP 3206 * --- 3207 3208 END GETZEROPG subroutine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 814 (MSPROC) F 43 Mass Storage Driver - Drive Activity Section 3210 3211 ********************************************************************************** 3212 * * 3213 * HEADCHKINT - Head-check Timer Interrupt Routine. * 3214 * * 3215 * This routine is called by the timer handler when it is * 3216 * time to run the head-crash checker. Since we are run * 3217 * asynchronously from the rest of the disk driver, we just * 3218 * set a flag and let DRIVEPROC call the head-crash checker * 3219 * next time through its main loop. * 3220 * * 3221 * MCTELOCK not held by us! * 3222 * Controller may be busy. * 3223 * LD R3 => MDV element (may no longer exist) * 3224 * CALLNP HEADCHECKINT * 3225 * * 3226 * Eats R0:R5. * 3227 * Stack required: 2 * 3228 * 1 + max ( SRCHLIST (1), UNSRCHLIST (1) ) * 3229 * * 3230 ********************************************************************************** 3231 3232 BLOCK HEADCHKINT subroutine 3233 ENTRY HEADCHKINT 3234 3235 BEGFRAME 3236 ENDFRAME 3237 03E24 DD5F8001 6 STAK 3238 HEADCHKINT ENTRNP PUSH 03E25 6152C000 5 3 REG 3239 LD MDV R3 MDV -> our MDV element 03E26 DC0030AA 3240 CALL SRCHLIST lock the MDV list 03E27 40001F14 3241 PARL MDVLOCK 03E28 60041F15 0 IMM 3242 LD R0 ADR MDVLIST R0 -> first MDV 03E29 3D481F10 5 0 ZBM 3243 LSRCH MDV R0,MDVLINK see if we are on the list 03E2A FE0C3E30 3244 JNE NOTHERE jump if not 3245 SETTBIT MDV,MDVCHKHEAD else request a head-check 03E2B 60020020 0 IMM 3245 LD R0 1*BIT(((MDV,MDVCHKHEAD) DISP (MDV,0))/BITS 0:4) 03E2C FC174800 0 5 BASE 3245 IORM R0 MDV,(((MDV,MDVCHKHEAD) DISP (MDV,0))/BITS 15:31) 03E2D EC174812 5 BASE 3246 STZ MDV,MDVTIMESER and say interval not outstanding 03E2E 60040001 0 IMM 3247 LD R0 1*BIT FLMSPROC 03E2F FC001CF6 0 3248 IORM R0 FLAGS 3249 * \ / 3250 00003E30 3251 NOTHERE LABEL 03E30 DC0030B7 3252 CALL UNSRCHLIST release the MDV list 03E31 40001F14 3253 PARL MDVLOCK 03E32 5D1F8001 6 STAK 3254 LEAVE POP and all done 3255 * --- 3256 3257 END HEADCHKINT subroutine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 815 (MSPROC) F 43 Mass Storage Driver - Drive Activity Section 3259 3260 ********************************************************************************** 3261 * * 3262 * HEADCHKSET - Set Head-check Timer Interrupt. * 3263 * * 3264 * This routine will set a timer interrupt for the next * 3265 * time to run the head-crash checker. * 3266 * * 3267 * LD MDV => MDV element * 3268 * CALLNP HEADCHKSET * 3269 * * 3270 * Eats R0:R4. * 3271 * Stack required: 6 * 3272 * 4 + max ( TIMESET (2) ) * 3273 * * 3274 ********************************************************************************** 3275 3276 BLOCK HEADCHKSET subroutine 3277 ENTRY HEADCHKSET 3278 3279 BEGFRAME 00178801 6 BASE 3280 SAVEPF BSS 1 00178802 6 BASE 3281 SAVEOTHERS BSS 2 3282 ENDFRAME 3283 03E33 DD5F8004 6 STAK 3284 HEADCHKSET ENTRNP PUSH 03E34 E6D78802 346 BASE 3285 ST2 R3 SP,SAVEOTHERS save regs 03E35 60C40086 3 IMM 3286 LD PFPTR PNCIX page number of I/O window 03E36 80D78801 6 BASE 3287 PFRC SP,SAVEPF exclude it 03E37 60C03964 3 3288 LD R3 HDCHKINT interval in seconds 03E38 1CC403E8 3 IMM 3289 MUL R3 MSECSS make it milliseconds 03E39 DC0044F8 3290 CALL TIMESET request an interval 03E3A 4352C000 3 REG 3291 PARV2 R3 interval 03E3B 41440000 IMM 3292 PARV 0 CPU (any) 03E3C 41003E24 3293 PAR HEADCHKINT subroutine to call 03E3D 40534000 5 REG 3294 PARVL MDV parameter 03E3E E5174812 4 5 BASE 3295 ST TMR MDV,MDVTIMESER save serial number of request 03E3F 60C40086 3 IMM 3296 LD PFPTR PNCIX page number of CIX window 03E40 00D78801 6 BASE 3297 LDPF SP,SAVEPF restore the page file 03E41 62D78802 346 BASE 3298 LD2 R3 SP,SAVEOTHERS restore regs 03E42 5D1F8004 6 STAK 3299 LEAVE POP all done 3300 * --- 3301 3302 END HEADCHKSET subroutine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 816 (MSPROC) F 43 Mass Storage Driver - Drive Activity Section 3304 3305 ********************************************************************************** 3306 * * 3307 * IDLEDRIVE - Delay for a Period of Time. * 3308 * * 3309 * This routine forestalls execution of the caller's drive * 3310 * coroutine for a set period of time. It sets up a timer * 3311 * interrupt and returns to the main coroutine in an * 3312 * inactivatible state. The timer routine should change the * 3313 * MDVSTATE to MDVSTRUN, and we'll be reentered right after * 3314 * the EXPCS. * 3315 * We assume that we can leave ourselves in the runnable * 3316 * state, since our next return the main coroutine sets up a * 3317 * new state, anyway. * 3318 * * 3319 * LD MDV => MDV element * 3320 * CALLNP IDLEDRIVE * 3321 * * 3322 * Eats R0:R3. * 3323 * Stack required: 5 * 3324 * 3 + max ( TIMESET (2) ) * 3325 * * 3326 ********************************************************************************** 3327 3328 BLOCK IDLEDRIVE subroutine 3329 ENTRY IDLEDRIVE 3330 3331 BEGFRAME 00178801 6 BASE 3332 SAVEAREG BSS 1 00178802 6 BASE 3333 SAVEPF BSS 1 3334 ENDFRAME 3335 03E43 DD5F8003 6 STAK 3336 IDLEDRIVE ENTRNP PUSH 03E44 E5178801 4 6 BASE 3337 ST R4 SP,SAVEAREG guard this register 03E45 60C40086 3 IMM 3338 LD PFPTR PNCIX save this window's mapping 03E46 80D78802 6 BASE 3339 PFRC SP,SAVEPF on the stack 03E47 60C0396A 3 3340 LD R3 IDLEPERIOD interval in milliseconds 03E48 DC0044F8 3341 CALL TIMESET request an interval 03E49 4352C000 3 REG 3342 PARV2 R3 interval 03E4A 41440000 IMM 3343 PARV 0 CPU (any) 03E4B 41003E54 3344 PAR IDLEINT subroutine to call 03E4C 40534000 5 REG 3345 PARVL MDV parameter 03E4D E5174813 4 5 BASE 3346 ST TMR MDV,MDVIDLESER save serial number of request 03E4E 60C40086 3 IMM 3347 LD PFPTR PNCIX page number of CIX window 03E4F 00D78802 6 BASE 3348 LDPF SP,SAVEPF restore the page file 03E50 61178801 4 6 BASE 3349 LD R4 SP,SAVEAREG restore this register 3350 * \ / 3351 03E51 60040007 0 IMM 3352 LD R0 MDVSTIDLE new state - idling 03E52 DCD7481B 5 BASE 3353 EXPCS MDV,MDVPC return to main coroutine 3354 03E53 5D1F8003 6 STAK 3355 LEAVE POP all done 3356 * --- 3357 3358 END IDLEDRIVE subroutine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 817 (MSPROC) F 43 Mass Storage Driver - Drive Activity Section 3360 3361 ********************************************************************************** 3362 * * 3363 * IDLEINT - Idle Drive Timer Interrupt Routine. * 3364 * * 3365 * This routine is called by the timer handler when it is * 3366 * time to reactivate the driver coroutine. We change the * 3367 * MDVSTATE to allow DRIVEPROC to run the drive the next time * 3368 * through its main loop. We also alter the FLAGS word to * 3369 * ensure service. * 3370 * * 3371 * MCTELOCK not held by us! * 3372 * Controller may be busy. * 3373 * LD R3 => MDV element (may no longer exist) * 3374 * CALLNP IDLEINT * 3375 * * 3376 * Eats R0:R5. * 3377 * Stack required: 2 * 3378 * 1 + max ( SRCHLIST (1), UNSRCHLIST (1) ) * 3379 * * 3380 ********************************************************************************** 3381 3382 BLOCK IDLEINT subroutine 3383 ENTRY IDLEINT 3384 3385 BEGFRAME 3386 ENDFRAME 3387 03E54 DD5F8001 6 STAK 3388 IDLEINT ENTRNP PUSH 03E55 6152C000 5 3 REG 3389 LD MDV R3 MDV -> our MDV element 03E56 DC0030AA 3390 CALL SRCHLIST lock the MDV list 03E57 40001F14 3391 PARL MDVLOCK 03E58 60041F15 0 IMM 3392 LD R0 ADR MDVLIST R0 -> first MDV 03E59 3D481F10 5 0 ZBM 3393 LSRCH MDV R0,MDVLINK see if we are on the list 03E5A FE0C3E60 3394 JNE NOTHERE jump if not 03E5B 60040001 0 IMM 3395 LD R0 MDVSTRUN new state - runnable 03E5C E4094231 0 5 ZBM 3396 ST R0 MDV,MDVSTATE give it to him 03E5D EC174813 5 BASE 3397 STZ MDV,MDVIDLESER and say interval not outstanding 03E5E 60040001 0 IMM 3398 LD R0 1*BIT FLMSPROC 03E5F FC001CF6 0 3399 IORM R0 FLAGS 3400 * \ / 3401 00003E60 3402 NOTHERE LABEL 03E60 DC0030B7 3403 CALL UNSRCHLIST release the MDV list 03E61 40001F14 3404 PARL MDVLOCK 03E62 5D1F8001 6 STAK 3405 LEAVE POP and all done 3406 * --- 3407 3408 END IDLEINT subroutine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 818 (MSPROC) F 43 Mass Storage Driver - Drive Activity Section 3410 3411 ********************************************************************************** 3412 * * 3413 * INTREAD - Internal Read Subroutine. * 3414 * * 3415 * This routine will read a block and check the FBI. It * 3416 * gives returns for the different error conditions. A page of * 3417 * memory remains allocated for the read only if the read was * 3418 * successful. The PPL is not on any lists. PPBLOCK = 0 so * 3419 * the page looks 'clean'. These two measures have the effect * 3420 * of making the PPL invisible to the page fault processor and * 3421 * others, so the disk block might be or become resident * 3422 * elsewhere as well. Therefore, the data on the page is * 3423 * current as of the time of the read, but not necessarily * 3424 * later, and the page should never be written out. * 3425 * * 3426 * LD MDV => MDV element * 3427 * CALL INTREAD * 3428 * PARV block number * 3429 * PARVL expected FBI type * 3430 * JMP drive offline * 3431 * JMP disk data (or FBI) error * 3432 * JMP electronic error * 3433 * page for data> * 3434 * * 3435 * Eats R2 during parameter passing * 3436 * Eats R0:R4. Sets PPL. * 3437 * Stack required: 14 * 3438 * 1 + max ( MAPINFBI (2), MAPOUTFBI (2), PUTIDLE (1), * 3439 * READ (13) ) * 3440 * * 3441 ********************************************************************************** 3442 3443 BLOCK INTREAD subroutine 3444 ENTRY INTREAD 3445 3446 BEGFRAME 3447 ENDFRAME 3448 00000080 BYTE 3449 FBIT EQU BITS 0:7 expected FBI type (in R7) 3450 03E63 DD1F8001 6 STAK 3451 INTREAD ENTR PUSH 03E64 C152C000 3 REG 3452 STPV R3 block number 03E65 C04BC080 7 CBM 3453 STPVL R7/FBIT expected FBI type 3454 * \ / 00003E66 3455 AGAIN LABEL 03E66 DC003EBE 3456 CALL READ read the block 03E67 4052C000 3 REG 3457 PARVL R3 block number 03E68 FE0E3E79 3458 JMP OFFLINE jump if offline 03E69 FE0E3E76 3459 JMP NOPAGE jump if no idle paper available 03E6A EC170801 4 BASE 3460 STZ PPL,PPBLOCK clear block number field 03E6B 5C090212 4 ZBM 3461 CMZ PPL,PPDISKERR did an error occur? 03E6C FE0C3E74 3462 JNE DISKERR jump if so 03E6D DC002606 3463 CALL MAPINFBI map in FBI for PPL, IOFF 03E6E 40530000 4 REG 3464 PARVL PPL pass physical page element 03E6F 600BC080 0 7 CBM 3465 LD R0 R7/FBIT get expected type 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 819 (MSPROC) F 43 Mass Storage Driver - Drive Activity Section 03E70 FA023E7D 0 3466 JEQZ R0 GOODRET jump if any block type OK 03E71 64084080 0 1 ZBM 3467 CPR R0 R1,FBITYPE do types match? 03E72 FE023E7D 3468 JEQ GOODRET jump if type OK 03E73 DC40261B 3469 CALLNP MAPOUTFBI unmap FBI for PPL, ION 3470 * \ / 3471 00003E74 3472 DISKERR LABEL 03E74 DC402D51 3473 CALLNP PUTIDLE release the page 03E75 FE0E3E80 3474 JMP DATARET take data error return 3475 * --- 3476 00003E76 3477 NOPAGE LABEL 03E76 60040001 0 IMM 3478 LD R0 MDVSTRUN new state: runnable (next time) 03E77 DCD7481B 5 BASE 3479 EXPCS MDV,MDVPC go back to controller-scheduler 03E78 FE0E3E66 3480 JMP AGAIN try again later 3481 * --- 3482 00003E79 3483 OFFLINE LABEL 03E79 60174809 0 5 BASE 3484 LD R0 MDV,MDVBFDSTAT get last status 03E7A F62E3E81 0 3485 JBT R0/BFDSSRSPER OFFLRET jump if drive disappeared 03E7B F2083E81 0 3486 JBF R0/BFDSSRDY OFFLRET jump if drive offline 03E7C FE0E3E7F 3487 JMP CHANRET else assume channel error 3488 * --- 3489 00003E7D 3490 GOODRET LABEL data successfully read 03E7D DC40261B 3491 CALLNP MAPOUTFBI unmap FBI for PPL, ION 03E7E 61D7D001 7 7 REG 3492 LD R7 R7+1 3493 * \ / 3494 00003E7F 3495 CHANRET LABEL channel (electronic) error 03E7F 61D7D001 7 7 REG 3496 LD R7 R7+1 3497 * \ / 3498 00003E80 3499 DATARET LABEL disk data error 03E80 61D7D001 7 7 REG 3500 LD R7 R7+1 3501 * \ / 3502 00003E81 3503 OFFLRET LABEL drive offline error 03E81 5D1F8001 6 STAK 3504 LEAVE POP 3505 * --- 3506 3507 END INTREAD subroutine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 820 (MSPROC) F 43 Mass Storage Driver - Drive Activity Section 3509 3510 ********************************************************************************** 3511 * * 3512 * LOGCOUNT - Log Activity on Drive. * 3513 * * 3514 * This routine will write an error log record containing * 3515 * the number of reads and writes that have been done to the * 3516 * drive. It will then clean out the counters. This is done * 3517 * once per hour, and whenever a volume is dismounted. * 3518 * * 3519 * LD MDV => MDV element * 3520 * CALLNP LOGCOUNT * 3521 * * 3522 * Eats R0:R3. * 3523 * Stack required: 4 * 3524 * 1 + max ( ERRORLOG (3) ) * 3525 * * 3526 ********************************************************************************** 3527 3528 BLOCK LOGCOUNT subroutine 3529 ENTRY LOGCOUNT 3530 3531 BEGFRAME 3532 ENDFRAME 3533 03E82 DD5F8001 6 STAK 3534 LOGCOUNT ENTRNP PUSH 03E83 5E174806 5 BASE 3535 CMZ2 MDV,MDVCOUNTS any activity? 03E84 FE023E8C 3536 JEQ RETURN jump if not 3537 * \ / 03E85 DC005048 3538 CALL ERRORLOG log the activity 03E86 41441021 IMM 3539 PARV ERLCDCNT disk count 03E87 41574805 5 BASE 3540 PARV MDV,MDVNAME drive name 03E88 41495231 5 ZBM 3541 PARV MDV,MDVCABLE cable position 03E89 41574806 5 BASE 3542 PARV MDV,MDVREADCNT read count 03E8A 40574807 5 BASE 3543 PARVL MDV,MDVWRITCNT write count 03E8B EE174806 5 BASE 3544 STZ2 MDV,MDVCOUNTS 3545 * \ / 3546 00003E8C 3547 RETURN LABEL 03E8C 5D1F8001 6 STAK 3548 LEAVE POP 3549 * --- 3550 3551 END LOGCOUNT subroutine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 821 (MSPROC) F 43 Mass Storage Driver - Drive Activity Section 3553 3554 ********************************************************************************** 3555 * * 3556 * LOOKUPBTRX - Look Up Block in Bad Tracks List. * 3557 * * 3558 * This subroutine determines whether a given block * 3559 * number is on the bad blocks list. It assumes that * 3560 * MDVBTRXPPL contains a pointer to the PPL of a page * 3561 * containing the bad tracks block. If the block is a * 3562 * substitute then ignore those as well since they will * 3563 * cause a DA mismatch. Note that if a volume is loaded * 3564 * we search the resident substitution list, ohterwise * 3565 * the substitution block is mapped in. * 3566 * * 3567 * LD MDV => MDV element * 3568 * CALL LOOKUPBTRX * 3569 * PARVL block number * 3570 * JMP block is on the list * 3571 * * 3572 * * 3573 * Eats R0:R1, R3. Unmaps WNDO4. * 3574 * Stack required: 1 * 3575 * * 3576 ********************************************************************************** 3577 3578 BLOCK LOOKUPBTRX subroutine 3579 ENTRY LOOKUPBTRX 3580 3581 BEGFRAME 3582 ENDFRAME 3583 03E8D DD1F8001 6 STAK 3584 LOOKUPBTRX ENTR PUSH 03E8E C0524000 1 REG 3585 STPVL R1 R1 = block number 3586 * \ / 03E8F 7840254F 1 3587 AND R1 MSBLKMASK clear upper bits 03E90 60C40085 3 IMM 3588 LD PFPTR PNWNDO4 page number of available window 03E91 60174817 0 5 BASE 3589 LD R0 MDV,MDVBTRXPPL R0 -> PPL of bad tracks block, if any 03E92 FA303E9C 0 3590 JZA R0 NOBTRXLIST jump if no bad tracks block 03E93 00D60803 0 BASE 3591 LDPF R0,PPPMVALUE map in the bad tracks block 03E94 60041400 0 IMM 3592 LD R0 ADR WNDO4 R0 -> first entry 3593 * \ / 00003E95 3594 BTRXLOOP LABEL 03E95 5C160800 0 BASE 3595 CMZ R0,BTRXEL end of block? 03E96 FE023E9C 3596 JEQ NOBTRXLIST jump if yes 03E97 64481180 1 0 ZBM 3597 CPR R1 R0,BTRXEL/MSBLKFIELD is this entry for us? 03E98 FE023EA8 3598 JEQ FOUND jump if yes 03E99 38160802 0 0 BASE 3599 LEA R0 R0,BTRXLNTH R0 -> next entry 03E9A 640417FE 0 IMM 3600 CPR R0 ADR WNDO4(WPP-BTRXLNTH) end of block? 03E9B FE0A3E95 3601 JLE BTRXLOOP loop if not 3602 * \ / 00003E9C 3603 NOBTRXLIST LABEL 03E9C 60174819 0 5 BASE 3604 LD R0 MDV,MDVSUBSPPL R0 - > PPL of substitution block 03E9D FA303EA7 0 3605 JZA R0 NOTFOUND jump if no substitution block 03E9E 00D60803 0 BASE 3606 LDPF R0,PPPMVALUE map in substitution block 03E9F 60041400 0 IMM 3607 LD R0 ADR WNDO4 R0 -> first entry 3608 * \ / 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 822 (MSPROC) F 43 Mass Storage Driver - Drive Activity Section 00003EA0 3609 SUBSLOOP LABEL 03EA0 5C160800 0 BASE 3610 CMZ R0,SUBSBADDY end of block? 03EA1 FE023EA7 3611 JEQ NOTFOUND jump if yes 03EA2 64481181 1 0 ZBM 3612 CPR R1 R0,SUBSSUB/MSBLKFIELD is this entry for us? 03EA3 FE023EA8 3613 JEQ FOUND jump if yes 03EA4 38160802 0 0 BASE 3614 LEA R0 R0,SUBSLNTH R0 -> next entry 03EA5 640417FE 0 IMM 3615 CPR R0 ADR WNDO4(WPP-SUBSLNTH) end of block? 03EA6 FE0A3EA0 3616 JLE SUBSLOOP loop if not 3617 * \ / 00003EA7 3618 NOTFOUND LABEL 03EA7 61D7D001 7 7 REG 3619 LD R7 R7+1 advance to good return 00003EA8 3620 FOUND LABEL 03EA8 80D2C000 3 REG 3621 PFRC PFPTR unmap WNDO4 03EA9 5D1F8001 6 STAK 3622 LEAVE POP 3623 * --- 3624 3625 END LOOKUPBTRX subroutine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 823 (MSPROC) F 43 Mass Storage Driver - Drive Activity Section 3627 3628 ********************************************************************************** 3629 * * 3630 * PADBUILD - Set Up Physical Addresses for Data * 3631 * Transfer. * 3632 * * 3633 * This routine will store the data transfer addresses * 3634 * and byte counts into the PPU for a disk transfer. Before * 3635 * calling this routine, the DMA direction had better be set * 3636 * correctly (or the PPU will cause a bus error). * 3637 * * 3638 * LD PPL => PPL for page * 3639 * CALLNP PADBUILD * 3640 * * 3641 * Eats R0:R1, PFPTR * 3642 * Stack required: 3 * 3643 * 1 + max ( MAPINFBI (2), MAPOUTFBI (2) ) * 3644 * * 3645 ********************************************************************************** 3646 3647 BLOCK PADBUILD subroutine 3648 ENTRY PADBUILD 3649 3650 BEGFRAME 3651 ENDFRAME 3652 03EAA DD5F8001 6 STAK 3653 PADBUILD ENTRNP PUSH 03EAB DC002606 3654 CALL MAPINFBI get virtual address of the FBI 03EAC 40530000 4 REG 3655 PARVL PPL pass the PPL address 03EAD 60CA5C80 3 1 CBM 3656 LD PFPTR R1/PAGEFIELD extract the virtual page number 03EAE 7CC40080 3 IMM 3657 IOR PFPTR MONPF make it monitor space 03EAF 80920000 0 REG 3658 PFRD R0 get the page map value 03EB0 E40A54C0 0 1 CBM 3659 ST R0 R1/FLDABSPG combine page with displacement 03EB1 E44A1560 1 0 CBM 3660 ST R1 R0/PAGEANDISP add page and displacement to slot number 03EB2 E4001807 0 3661 ST R0 CIX(PPUADDR2) store memory address for FBI 03EB3 DC40261B 3662 CALLNP MAPOUTFBI unmap the FBI window 03EB4 6004802C 0 IMM 3663 LD R0 FBILNTH*CPW+PPUCLAST*1 indicate size of FBI, also indicate end 03EB5 E4001806 0 3664 ST R0 CIX(PPUCNT2) set into PPU 3665 * \ / 03EB6 60170803 0 4 BASE 3666 LD R0 PPL,PPPMVALUE get the page location 03EB7 60440000 1 IMM 3667 LD R1 0 page displacement (beginning of page) 03EB8 E40A54C0 0 1 CBM 3668 ST R0 R1/FLDABSPG build the relative address 03EB9 E44A1560 1 0 CBM 3669 ST R1 R0/PAGEANDISP combine with slot number 03EBA E4001805 0 3670 ST R0 CIX(PPUADDR1) store mem address for data block 03EBB 60041000 0 IMM 3671 LD R0 CPP get the size of one page 03EBC E4001804 0 3672 ST R0 CIX(PPUCNT1) store data block byte count 03EBD 5D1F8001 6 STAK 3673 LEAVE POP 3674 * --- 3675 3676 END PADBUILD subroutine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 824 (MSPROC) F 43 Mass Storage Driver - Drive Activity Section 3678 3679 ********************************************************************************** 3680 * * 3681 * READ - Read a Block, with Full Error Recovery * 3682 * * 3683 * This routine will read a block from the disk, with full * 3684 * error recovery, including re-writing a marginally written * 3685 * block, and substituting a block from a bad piece of the disk. * 3686 * It will allocate a page of memory for the data. * 3687 * If the block contains a permanent I/O error, it will * 3688 * return its best approximation of the data, if possible. If * 3689 * no data can be gotten off the disk, it will return a zero * 3690 * page. In either case, the PPDISKERR bit will be set. * 3691 * * 3692 * LD MDV => MDV element * 3693 * CALL READ * 3694 * PARVL block number * 3695 * * 3696 * * 3697 * page of data> * 3698 * * 3699 * Registers Used: R0:R2. Sets PPL. * 3700 * Stack Required: 13 * 3701 * 2 + max ( CALCSKADR (1), DISKSEEK (8), DOREWRITE (11), * 3702 * ERRORLOG (3), FBICHKCKSM (6), FIXSEGMENT (7), * 3703 * GETIDLE (1), MAPINFBI (2), MAPOUTFBI (2), * 3704 * PADBUILD (3), PUTIDLE (1) STATCHECK (9), * 3705 * SUBSTITUTE (7), TRACEPROC (3), TSELECT (6), * 3706 * ZEROPAGE (3) ) * 3707 * * 3708 ********************************************************************************** 3709 3710 BLOCK READ subroutine 3711 ENTRY READ 3712 3713 BEGFRAME 00178801 6 BASE 3714 TEMP BSS 1 block num and save for R3 3715 ENDFRAME 3716 03EBE DD1F8002 6 STAK 3717 READ ENTR PUSH 03EBF C0578801 6 BASE 3718 STPVL SP,TEMP TEMP = block number 03EC0 E0D78801 3 6 BASE 3719 EXCH R3 SP,TEMP TEMP = R3, R3 = block number 3720 * \ / 03EC1 DC402D1C 3721 CALLNP GETIDLE get an idle page 03EC2 FBE03F10 7 3722 IRJ R7 CANTREAD jump if none available 03EC3 EDC91F12 4 ZBM 3723 STW PPL,PPBUSYWORD/FLDADRS make it once busy 03EC4 E4D70801 3 4 BASE 3724 ST R3 PPL,PPBLOCK save block number 03EC5 DC002606 3725 CALL MAPINFBI get access to FBI for PPL, IOFF 03EC6 40530000 4 REG 3726 PARVL PPL pass physical page element 03EC7 D1564801 1 BASE 3727 STMW R1,FBIWORDB flag nothing read so far 03EC8 DC40261B 3728 CALLNP MAPOUTFBI unmap FBI, ION 3729 * \ / 03EC9 EC0949C3 5 ZBM 3730 STZ MDV,MDVERRFLDS clear error counters 03ECA DC003B66 3731 CALL CALCSKADR calculate seek address 03ECB 40570801 4 BASE 3732 PARVL PPL,PPBLOCK pass the disk address 3733 * \ / 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 825 (MSPROC) F 43 Mass Storage Driver - Drive Activity Section 3734 00003ECC 3735 SEEKOVER LABEL 03ECC DC403C7B 3736 CALLNP DISKSEEK seek the disk 03ECD FE0E3F25 3737 JMP OFFLINE jump if drive is offline 03ECE FE0E3F15 3738 JMP GIVEERROR jump if permanent seek error 3739 * \ / 3740 00003ECF 3741 READOVER LABEL 03ECF DC002606 3742 CALL MAPINFBI get access to FBI for PPL, IOFF 03ED0 40530000 4 REG 3743 PARVL PPL pass physical page element 03ED1 D1564801 1 BASE 3744 STMW R1,FBIWORDB flag nothing read so far 03ED2 DC40261B 3745 CALLNP MAPOUTFBI unmap FBI, ION 03ED3 60040003 0 IMM 3746 LD R0 MDVSTONCYL new state: ready for data transfer 03ED4 DCD7481B 5 BASE 3747 EXPCS MDV,MDVPC wait our turn 03ED5 FA0C3F25 0 3748 JNEZ R0 OFFLINE jump if controller is dead 3749 * \ / 03ED6 DC40406D 3750 CALLNP TSELECT tweak for error recovery 03ED7 FE0E3F25 3751 JMP OFFLINE jump if drive now offline 03ED8 FE0E3ECC 3752 JMP SEEKOVER jump if seek error 3753 * \ / 03ED9 60040001 0 IMM 3754 LD R0 1*PPUIDMAD 03EDA E4001803 0 3755 ST R0 CIX(PPUSCSTAT) set DMA direction to input 03EDB DC403EAA 3756 CALLNP PADBUILD set up data transfer addresses 3757 * \ / 03EDC EC001AB0 3758 STZ CIX(BFDREAD+1*BFDINTBIT) start the read 03EDD 60095830 0 5 ZBM 3759 LD R0 MDV,MDVUNIT R0 = unit number 3760 TRACE MSTRACE,MSTREAD reading, R0=Unit 03EDE 5D401D2C 3760 XCT TRACECALL(MSTRACE) 03EDF FEC00003 3760 NOP (MSTRACE*BITS 22:26)+(MSTREAD*BITS 27:31) 03EE0 D0174806 5 BASE 3761 INC MDV,MDVREADCNT say one more read attempt 03EE1 60040004 0 IMM 3762 LD R0 MDVSTDT new state: data transfer in progress 03EE2 DCD7481B 5 BASE 3763 EXPCS MDV,MDVPC wait for interrupt 03EE3 FA0C3F25 0 3764 JNEZ R0 OFFLINE jump if controller is dead 3765 * \ / 03EE4 DC003FCA 3766 CALL STATCHECK check transfer status 03EE5 40440003 IMM 3767 PARVL OPREAD operation is read 03EE6 FE0E3F25 3768 JMP OFFLINE drive went offline 03EE7 FE0E3F15 3769 JMP GIVEERROR unrecoverable error 03EE8 FE0E3ECC 3770 JMP SEEKOVER retry the seek 03EE9 FE0E3ECF 3771 JMP READOVER retry the read 03EEA FE0E3F12 3772 JMP FIXSEG do segment reconstruction 3773 * \ / good read 3774 3775 ********************************************************************************** 3776 * * 3777 * Read operation was successful, correctable, or at least * 3778 * we have something to give back to the user. See if we need * 3779 * to take preventative measures for next time. We tally the * 3780 * operation in the table of read counts by FBI type, verify the * 3781 * checksum, then rewrite and/or substitute if required. * 3782 * MDVREWRITE can be set by STATCHECK. MDVSUB can be set either * 3783 * by STATCHECK or DOREWRITE. A headcheck is called for if the * 3784 * block gets substituted. * 3785 * * 3786 ********************************************************************************** 3787 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 826 (MSPROC) F 43 Mass Storage Driver - Drive Activity Section 3788 * \ / 00003EEB 3789 READOK LABEL 03EEB DC002606 3790 CALL MAPINFBI get access to FBI, IOFF 03EEC 40530000 4 REG 3791 PARVL PPL pass PPAGE element 03EED 60084080 0 1 ZBM 3792 LD R0 R1,FBITYPE get type of block read 03EEE 50040016 0 IMM 3793 MIN R0 MAXFBITYPE make sure it's reasonable 03EEF D0201D4C 0 3794 INC READCOUNTS(R0) and keep statistics on reads 03EF0 DC404161 3795 CALLNP FBICHKCKSM check the checksum 03EF1 EDC90212 4 ZBM 3796 STW PPL,PPDISKERR set error flag if bad 03EF2 DC40261B 3797 CALLNP MAPOUTFBI unmap FBI, ION 3798 03EF3 5C094813 5 ZBM 3799 CMZ MDV,MDVREWRITE do we want to do rewrite? 03EF4 FE023F08 3800 JEQ MAYBESUB jump if not 03EF5 5C090081 4 ZBM 3801 CMZ PPL,PPBLOCK/VOLFIELD no rewrites on unmounted vols. 03EF6 FE023F08 3802 JEQ MAYBESUB try another flag 3803 * \ / 3804 3805 * Rewrite the block 03EF7 DC002606 3806 CALL MAPINFBI get the FBI of the block to rewrite 03EF8 40530000 4 REG 3807 PARVL PPL 03EF9 D0484011 1 ZBM 3808 DEC R1,FBINOREWRIT flip 'rewritten' bit and test previous value 03EFA ED928000 2 REG 3809 STLNE R2 R2 <= 1 if block has not already been rewritten 3810 * Update the checksum in the FBI, since we just changed a bit 03EFB 6003FF80 0 IMM 3811 LD R0 FBIGMASK 03EFC F0164800 0 1 BASE 3812 PRMUT R0 R1,0 03EFD 7407FFFF 0 IMM 3813 XOR R0 -1 03EFE E416480A 0 1 BASE 3814 ST R0 R1,FBICKSUM 03EFF DC40261B 3815 CALLNP MAPOUTFBI 03F00 FA823F0A 2 3816 JEQZ R2 DOTHESUB substitute if block has been rewritten before 3817 * \ / 03F01 DC005048 3818 CALL ERRORLOG log the rewrite 03F02 41440C3F IMM 3819 PARV ERLCDSKRW rewrite after read 03F03 41574805 5 BASE 3820 PARV MDV,MDVNAME disk name 03F04 41570801 4 BASE 3821 PARV PPL,PPBLOCK MS address 03F05 40574808 5 BASE 3822 PARVL MDV,MDVSEEKADR seek address 03F06 DC403CF2 3823 CALLNP DOREWRITE do the rewrite 03F07 FE0E3F25 3824 JMP OFFLINE drive went offline 3825 * \ / 3826 00003F08 3827 MAYBESUB LABEL 03F08 5C094A13 5 ZBM 3828 CMZ MDV,MDVSUB do we want to substitute? 03F09 FE023F0F 3829 JEQ DONE jump if not 3830 * \ / 3831 3832 * Substitute, and call for head check 00003F0A 3833 DOTHESUB LABEL 3834 TRACE SUBSTRACE,SUBTCALL trace the substitution 03F0A 5D401D32 3834 XCT TRACECALL(SUBSTRACE) 03F0B FEC000C0 3834 NOP (SUBSTRACE*BITS 22:26)+(SUBTCALL*BITS 27:31) 03F0C DC40506E 3835 CALLNP SUBSTITUTE do the substitution 00003F0D 3836 PERM LABEL 3837 SETTBIT MDV,MDVCHKHEAD say headcheck required 03F0D 60020020 0 IMM 3837 LD R0 1*BIT(((MDV,MDVCHKHEAD) DISP (MDV,0))/BITS 0:4) 03F0E FC174800 0 5 BASE 3837 IORM R0 MDV,(((MDV,MDVCHKHEAD) DISP (MDV,0))/BITS 15:31) 3838 * \ / 00003F0F 3839 DONE LABEL good return 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 827 (MSPROC) F 43 Mass Storage Driver - Drive Activity Section 03F0F 61D7D002 7 7 REG 3840 LD R7 R7+2 advance the return address 00003F10 3841 CANTREAD LABEL error return, +1=>offline, +2=>no idle page 03F10 60D78801 3 6 BASE 3842 LD R3 SP,TEMP restore R3 03F11 5D1F8002 6 STAK 3843 LEAVE POP and return 3844 * --- 3845 3846 ********************************************************************************** 3847 * * 3848 * Sort out various possible results from seek and/or read * 3849 * attempts. * 3850 * * 3851 * Fix segment, try rewrite (STATCHECK sets MDVREWRITE). * 3852 * Failed write check causes substitution. * 3853 * * 3854 ********************************************************************************** 3855 00003F12 3856 FIXSEG LABEL do segment correction 03F12 DC403D24 3857 CALLNP FIXSEGMENT do the correction 03F13 FE0E3ECC 3858 JMP SEEKOVER error, reread 03F14 FE0E3EEB 3859 JMP READOK it went well 3860 * --- 3861 3862 ********************************************************************************** 3863 * * 3864 * Permanent error trying seek or read. Log the error, * 3865 * mark and possibly zero fill the memory page. We want the * 3866 * head checker to run, but we suppress REWRITE and/or SUB. * 3867 * * 3868 ********************************************************************************** 3869 00003F15 3870 GIVEERROR LABEL permanent I/O error 03F15 5C094213 5 ZBM 3871 CMZ MDV,MDVNOERRS special error handling 03F16 FE0C3F0F 3872 JNE DONE if so, just return what was read 03F17 EDC90212 4 ZBM 3873 STW PPL,PPDISKERR flag the error 03F18 DC005048 3874 CALL ERRORLOG log the error 03F19 41440E3E IMM 3875 PARV ERLCDSKRD permanent read error 03F1A 41574805 5 BASE 3876 PARV MDV,MDVNAME disk name 03F1B 41570801 4 BASE 3877 PARV PPL,PPBLOCK block number 03F1C 40574808 5 BASE 3878 PARVL MDV,MDVSEEKADR seek address 3879 * \ / 03F1D DC002606 3880 CALL MAPINFBI get access to FBI for PPL 03F1E 40530000 4 REG 3881 PARVL PPL pass PPAGE element 03F1F 60485181 1 1 ZBM 3882 LD R1 R1,FBIDA get block number from FBI 03F20 DC40261B 3883 CALLNP MAPOUTFBI unmap FBI 03F21 64491181 1 4 ZBM 3884 CPR R1 PPL,PPBLOCK/MSBLKFIELD is it the right one? 03F22 FE023F0D 3885 JEQ PERM jump if so, allow data to be seen 03F23 DC404120 3886 CALLNP ZEROPAGE else zero the page ... 03F24 FE0E3F0D 3887 JMP PERM ... then hand it back 3888 * --- 3889 3890 ********************************************************************************** 3891 * * 3892 * Disk is no longer accessible. Abort the operation so * 3893 * it can be retried when the disk comes ready again (or the * 3894 * volume is remounted elsewhere). * 3895 * * 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 828 (MSPROC) F 43 Mass Storage Driver - Drive Activity Section 3896 ********************************************************************************** 3897 00003F25 3898 OFFLINE LABEL 03F25 EC170801 4 BASE 3899 STZ PPL,PPBLOCK nothing useful in block 03F26 DC402D51 3900 CALLNP PUTIDLE put it back on the idle list 03F27 FE0E3F10 3901 JMP CANTREAD 3902 * --- 3903 3904 END READ subroutine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 829 (MSPROC) F 43 Mass Storage Driver - Drive Activity Section 3906 3907 ********************************************************************************** 3908 * * 3909 * READTRACKS - Read a Group of Tracks. * 3910 * * 3911 * This routine will read a group of tracks. It returns * 3912 * when all tracks are read or as soon as the number of blocks * 3913 * with errors exceeds the specified number. It is used for * 3914 * head-crash detection. * 3915 * * 3916 * LD MDV => MDV element * 3917 * CALL READTRACKS * 3918 * PARV head number * 3919 * PARV number of tracks * 3920 * PARVL error limit * 3921 * JMP drive went offline * 3922 * ST R0 number of errors remaining in limit (may be negative!) * 3923 * * 3924 * Registers Used: R0:R4 * 3925 * Stack Required: 18 * 3926 * 4 + max ( ADJUSTCYL (1), INTREAD (14), LOOKUPBTRX (1), * 3927 * PUTIDLE (1) ) * 3928 * * 3929 ********************************************************************************** 3930 3931 BLOCK READTRACKS subroutine 3932 ENTRY READTRACKS 3933 3934 BEGFRAME 00178801 6 BASE 3935 HEADNUM BSS 1 head number to read 00178802 6 BASE 3936 COUNT BSS 1 number of tracks left to read 00178803 6 BASE 3937 ERRORS BSS 1 number of errors found so far 3938 ENDFRAME 3939 03F28 DD1F8004 6 STAK 3940 READTRACKS ENTR PUSH 03F29 C1578801 6 BASE 3941 STPV SP,HEADNUM save head number 03F2A C1578802 6 BASE 3942 STPV SP,COUNT save number of tracks to do 03F2B C0578803 6 BASE 3943 STPVL SP,ERRORS save error limit 3944 * \ / 03F2C EC0949C3 5 ZBM 3945 STZ MDV,MDVERRFLDS indicate no errors found yet 03F2D 60174814 0 5 BASE 3946 LD R0 MDV,MDVCHKCYL get cylinder to check 03F2E FE0E3F30 3947 JMP READTRK join in 3948 * --- 3949 00003F2F 3950 LOOP LABEL 03F2F DC403B55 3951 CALLNP ADJUSTCYL move to new cylinder 00003F30 3952 READTRK LABEL 03F30 1C17400A 0 5 CACH 3953 MUL R0 MDV,MDVTRKPCYL mult cyl# by trackspercyl 03F31 18178801 0 6 BASE 3954 ADD R0 SP,HEADNUM R0 = track number 03F32 6117400B 4 5 CACH 3955 LD R4 MDV,MDVSECPTRK for mult, and in case block is on bad trax 03F33 1C130000 0 4 REG 3956 MUL R0 R4 R0 = number of 0th block on track 03F34 60920000 2 0 REG 3957 LD R2 R0 save it 00003F35 3958 GOTSECTOR LABEL 03F35 DC003E8D 3959 CALL LOOKUPBTRX is this block on bad trax list? 03F36 40528000 2 REG 3960 PARVL R2 block number 03F37 FE0E3F49 3961 JMP OOPS jump if block is known bad 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 830 (MSPROC) F 43 Mass Storage Driver - Drive Activity Section 03F38 DC003E63 3962 CALL INTREAD read the block 03F39 41528000 2 REG 3963 PARV R2 block number 03F3A 40440000 IMM 3964 PARVL 0 any type is ok 03F3B FE0E3F48 3965 JMP RETURN0 jump if offline 03F3C FE0E3F3F 3966 JMP CHKERR jump if data/fbi error 03F3D FE0E3F44 3967 JMP NEXT jump if electronic error 03F3E DC402D51 3968 CALLNP PUTIDLE free up the page 3969 * \ / 3970 00003F3F 3971 CHKERR LABEL 03F3F 60095843 0 5 ZBM 3972 LD R0 MDV,MDVSKERRS get number of seek errors 03F40 18097083 0 5 ZBM 3973 ADD R0 MDV,MDVDKERRS add number of disk errors 03F41 FA023F44 0 3974 JEQZ R0 NEXT jump if no errors 03F42 D0578803 6 BASE 3975 DEC SP,ERRORS subtract error from limit 03F43 FE0A3F46 3976 JLE RETURN1 jump if exhausted 00003F44 3977 NEXT LABEL 03F44 D0578802 6 BASE 3978 DEC SP,COUNT done enough? 03F45 FE043F2F 3979 JGT LOOP loop if not 3980 * \ / 3981 00003F46 3982 RETURN1 LABEL 03F46 60178803 0 6 BASE 3983 LD R0 SP,ERRORS number of errors remaining 03F47 61D7D001 7 7 REG 3984 LD R7 R7+1 good return 3985 * \ / 3986 00003F48 3987 RETURN0 LABEL 03F48 5D1F8004 6 STAK 3988 LEAVE POP 3989 * --- 3990 3991 * Block is on list of baddies, try next block on track 00003F49 3992 OOPS LABEL 03F49 60969001 2 2 REG 3993 LD R2 R2+1 next! 03F4A FB223F35 4 3994 DRJ R4 GOTSECTOR jump if we haven't exhausted track 03F4B FE0E3F44 3995 JMP NEXT not an error, but ... 3996 * --- 3997 3998 END READTRACKS subroutine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 831 (MSPROC) F 43 Mass Storage Driver - Drive Activity Section 4000 4001 ********************************************************************************** 4002 * * 4003 * REMOUNT - Check for Remounting a Volume. * 4004 * * 4005 * This routine is called when a drive a) comes ready, b) * 4006 * becomes unwriteprotected, c) has just been initialized * 4007 * (and is being reset, see ORRESETDRV). We attempt to * 4008 * reassociate the MDV with the volume it represents, if any. * 4009 * It is critical that we don't mismatch volumes and drives. * 4010 * Our first and most secure line of defense to match the * 4011 * VOLNMNTDAT with the SECMNTDAT. This is the raw date when * 4012 * the volume was last messed with. Unfortunately, SECMNTDAT * 4013 * is not always available (pack label and/or security blocks * 4014 * are unreadable, or the SECMNTDAT is 0), or usable (the * 4015 * security blocks are being written out). In these cases we * 4016 * fall back on matching the VOLNMNTDAT with the MDVFMTDAT * 4017 * (either PLINITDAT or cable pos). This match is fallible in * 4018 * that PLINITDAT may not be unique (someone copied a pack * 4019 * label without updating this field). The third possiblity is * 4020 * a match on cable position EVEN IF we were able to read the * 4021 * pack label and/or security blocks. This should only happen * 4022 * on packs that were made readable by an online disk * 4023 * initialization. * 4024 * * 4025 * LD MDV => MDV element * 4026 * LD2 R3 * 4027 * CALLNP REMOUNT * 4028 * * 4029 * Eats R0:R4. * 4030 * Stack required: 4 * 4031 * 1 + max ( CANOPMSG (1), ERRORLOG (3), SRCHLIST (1), * 4032 * UNSRCHLIST (1) ) * 4033 * * 4034 ********************************************************************************** 4035 4036 BLOCK REMOUNT subroutine 4037 ENTRY REMOUNT 4038 4039 BEGFRAME 4040 ENDFRAME 4041 00000020 BYTE 4042 MCNT EQU BITS 0:1 pass counter in R7 4043 03F4C DD5F8001 6 STAK 4044 REMOUNT ENTRNP PUSH 03F4D EC0BC020 7 CBM 4045 STZ R7/MCNT clear pass counter 03F4E DC0030AA 4046 CALL SRCHLIST lock the VOLN table 03F4F 40001F22 4047 PARL VOLNLOCK 00003F50 4048 REMTRYOVER LABEL 03F50 FAD23F59 34 4049 JEQZ2 R3 NEXTPASS jump if format date does not exist 03F51 60440001 1 IMM 4050 LD R1 1 lowest volume number 4051 * \ / 4052 00003F52 4053 FINDVOL LABEL 03F52 64440040 1 IMM 4054 CPR R1 MAXVOLNUM all volumes checked? 03F53 FE063F59 4055 JGE NEXTPASS loop if so 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 832 (MSPROC) F 43 Mass Storage Driver - Drive Activity Section 03F54 60A21F22 2 1 4056 LD R2 VOLNTABLE(R1) R2 -> a VOLN element 03F55 FAB03F58 2 4057 JZA R2 NEXTVOL jump if none 03F56 66D68813 342 BASE 4058 CPR2 R3 R2,VOLNMNTDAT is this one ours? 03F57 FE023F62 4059 JEQ FOUNDVOL jump if so 4060 * \ / 00003F58 4061 NEXTVOL LABEL 03F58 FA603F52 1 4062 IRJ R1 FINDVOL up and try next 4063 * --- 4064 4065 * Made a pass, and nothing matched. Try another. 00003F59 4066 NEXTPASS LABEL 03F59 62D74810 345 BASE 4067 LD2 R3 MDV,MDVFMTDAT get formatted date 03F5A BC0BC020 0 7 CBM 4068 INCL R0 R7/MCNT test, set flag 03F5B 64040001 0 IMM 4069 CPR R0 1 second pass? 03F5C FE023F50 4070 JEQ REMTRYOVER jump to try format date 4071 * \ / 03F5D 64040002 0 IMM 4072 CPR R0 2 third pass? 03F5E FE043F71 4073 JGT NOREMOUNT jump if already done 03F5F DC403B5D 4074 CALLNP CALCDRVADR calculate cable position 03F60 62D20000 340 REG 4075 LD2 R3 R0 move into R3,R4 03F61 FE0E3F50 4076 JMP REMTRYOVER and try again 4077 * --- 4078 4079 * found a volume that matched, attempt remount 00003F62 4080 FOUNDVOL LABEL 03F62 600A7000 0 1 CBM 4081 LD R0 R1*MDVVOLFLD put volume number in right place 03F63 FC174800 0 5 BASE 4082 IORM R0 MDV,MDVWORDA set (RMW) volume number in MDV 03F64 5C089F15 2 ZBM 4083 CMZ R2,VOLNHCB drive for volume already exist? 03F65 FE023F67 4084 JEQ SETHCB jump if not 03F66 00130102 4085 HALT HALTS0102 VOLN already associated with a drive 00003F67 4086 SETHCB LABEL 03F67 E5489F15 5 2 ZBM 4087 ST MDV R2,VOLNHCB set VOLN ptr to MDV (ta dah!) 03F68 DC004713 4088 CALL CANOPMSG cancel complaint about volume 03F69 40489180 2 ZBM 4089 PARVL R2,VOLNMSGID 03F6A DC005048 4090 CALL ERRORLOG log the event 03F6B 4144081C IMM 4091 PARV ERLCRMNT 03F6C 41494080 5 ZBM 4092 PARV MDV,MDVVOLUME 03F6D 40574805 5 BASE 4093 PARVL MDV,MDVNAME 4094 * \ / 4095 00003F6E 4096 RETURN LABEL 03F6E DC0030B7 4097 CALL UNSRCHLIST release the lock 03F6F 40001F22 4098 PARL VOLNLOCK 03F70 5D1F8001 6 STAK 4099 LEAVE POP return 4100 * --- 4101 4102 * nothing! 00003F71 4103 NOREMOUNT LABEL 03F71 6003FE00 0 IMM 4104 LD R0 ONEBITS/MDVVOLFLD*MDVVOLFLD 03F72 A8174800 0 5 BASE 4105 BRSBM R0 MDV,MDVWORDA clear (RMW) volume field in MDV 03F73 FE0E3F6E 4106 JMP RETURN exit this routine 4107 * --- 4108 4109 END REMOUNT subroutine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 833 (MSPROC) F 43 Mass Storage Driver - Drive Activity Section 4111 4112 ********************************************************************************** 4113 * * 4114 * REZERO - ReZero a Drive. * 4115 * * 4116 * This routine will rezero a drive, to recover from a * 4117 * previous seek error. * 4118 * We delay for short while if the drive already has had * 4119 * problems trying to rezero. This allows for problems caused * 4120 * by power glitches and other fleeting events. If we can't * 4121 * rezero and many other tries have failed as well, we unload * 4122 * the heads (in case the heads are crashing, too) and go * 4123 * offline. * 4124 * * 4125 * LD PPL => PPL (used for error logging only) * 4126 * LD MDV => MDV element * 4127 * CALLNP REZERO * 4128 * * 4129 * * 4130 * * 4131 * Eats R0:R3. * 4132 * Stack required: 7 * 4133 * 2 + max ( IDLEDRIVE (5), SEEKNDSTAT (4), SEEKNDWAIT (1), * 4134 * TRACEPROC (3), UNLOADHEAD (4) ) * 4135 * * 4136 ********************************************************************************** 4137 4138 BLOCK REZERO subroutine 4139 ENTRY REZERO 4140 4141 BEGFRAME 00178801 6 BASE 4142 RZERRS BSS 1 retry limit minus retries 4143 ENDFRAME 4144 03F74 DD5F8002 6 STAK 4145 REZERO ENTRNP PUSH 03F75 5C174815 5 BASE 4146 CMZ MDV,MDVRZPROBS having seek problems already? 03F76 FE023F78 4147 JEQ GOAHEAD jump if not 03F77 DC403E43 4148 CALLNP IDLEDRIVE else, wait for air to clear 4149 * \ / 00003F78 4150 GOAHEAD LABEL 03F78 60040005 0 IMM 4151 LD R0 MDVRZRTLIM max number of retries 03F79 E4178801 0 6 BASE 4152 ST R0 SP,RZERRS save it 4153 * \ / 00003F7A 4154 RETRY LABEL 03F7A 60095F11 0 5 ZBM 4155 LD R0 MDV,MDVCNTL load the controller element pointer 03F7B 5C081014 0 ZBM 4156 CMZ R0,MCTDEAD check for dead controller 03F7C FE0C3F94 4157 JNE RETURN jump if controller dead 03F7D 60095830 0 5 ZBM 4158 LD R0 MDV,MDVUNIT unit number 03F7E 60440012 1 IMM 4159 LD R1 BFDFNZERO operation 03F7F E4601A28 1 0 4160 ST R1 CIX(BFDFUNC+BFDSELECTB)(R0) start the rezero 4161 TRACE MSTRACE,MSTREZERO rezero, R0=Unit 03F80 5D401D2C 4161 XCT TRACECALL(MSTRACE) 03F81 FEC00007 4161 NOP (MSTRACE*BITS 22:26)+(MSTREZERO*BITS 27:31) 4162 * \ / 03F82 DC403FBE 4163 CALLNP SEEKNDWAIT wait for seek end 03F83 FA0C3F94 0 4164 JNEZ R0 RETURN jump if controller is dead 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 834 (MSPROC) F 43 Mass Storage Driver - Drive Activity Section 03F84 DC003FA0 4165 CALL SEEKNDSTAT check seek end status 03F85 40440002 IMM 4166 PARVL OPREZERO operation is rezero 03F86 FE0E3F94 4167 JMP RETURN jump if drive is offline 03F87 FE0E3F8C 4168 JMP BADREZERO error rezeroing drive 4169 * \ / 4170 4171 * Rezero worked, say drive is getting better 03F88 D0574815 5 BASE 4172 DEC MDV,MDVRZPROBS one fewer problem 03F89 FE063F8B 4173 JGE NORMRETURN jump if non-neg 03F8A EC174815 5 BASE 4174 STZ MDV,MDVRZPROBS don't let counter go neg 4175 * \ / 4176 4177 * Drive is OK, or at least tolerable 00003F8B 4178 NORMRETURN LABEL 03F8B FBE03F94 7 4179 IRJ R7 RETURN successful return 4180 * --- 4181 4182 * Rezero failed, consider a retry 00003F8C 4183 BADREZERO LABEL 03F8C D0578801 6 BASE 4184 DEC SP,RZERRS count error 03F8D FE043F7A 4185 JGT RETRY jump we can still retry 03F8E BC174815 0 5 BASE 4186 INCL R0 MDV,MDVRZPROBS say seeker is sicker 03F8F 64040005 0 IMM 4187 CPR R0 MDVRZERLIM too sick? 03F90 FE083F8B 4188 JLT NORMRETURN not yet ... 4189 SETTBIT MDV,MDVBADSKS say why now offline 03F91 60028000 0 IMM 4189 LD R0 1*BIT(((MDV,MDVBADSKS) DISP (MDV,0))/BITS 0:4) 03F92 FC174802 0 5 BASE 4189 IORM R0 MDV,(((MDV,MDVBADSKS) DISP (MDV,0))/BITS 15:31) 03F93 DC404097 4190 CALLNP UNLOADHEAD unload the heads 4191 * \ / 4192 00003F94 4193 RETURN LABEL 03F94 5D1F8002 6 STAK 4194 LEAVE POP back to caller 4195 * --- 4196 4197 END REZERO subroutine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 835 (MSPROC) F 43 Mass Storage Driver - Drive Activity Section 4199 4200 ********************************************************************************** 4201 * * 4202 * RQSTDONE - Clean up After MS Request. * 4203 * * 4204 * This routine will clean up after a request: it will * 4205 * release the MSQ element, make the page available, and * 4206 * decrement the disk busy count. * 4207 * * 4208 * * 4209 * LD MSQ => MSQ element * 4210 * LD PPL => PPL for page (0 if none) * 4211 * LD MDV => MDV element * 4212 * CALLNP RQSTDONE * 4213 * * 4214 * Eats R0:R4. * 4215 * Stack required: 13 * 4216 * 2 + max ( PAGEREADY (11), SFREEMEM(0) ) * 4217 * * 4218 ********************************************************************************** 4219 4220 BLOCK RQSTDONE subroutine 4221 ENTRY RQSTDONE 4222 4223 BEGFRAME 00178801 6 BASE 4224 SAVEMDV BSS 1 save area for MDV register 4225 ENDFRAME 4226 03F95 DD5F8002 6 STAK 4227 RQSTDONE ENTRNP PUSH 03F96 6096C801 2 3 BASE 4228 LD R2 MSQ,MSQBLOCK get the disk address 03F97 DC002F5D 4229 CALL SFREEMEM release the MSQ element 03F98 41440002 IMM 4230 PARV MSQLOG block size 03F99 4052C000 3 REG 4231 PARVL MSQ and address 03F9A E5578801 5 6 BASE 4232 ST MDV SP,SAVEMDV save this register 03F9B DC002E94 4233 CALL PAGEREADY release the page to the rest of system 03F9C 40528000 2 REG 4234 PARVL R2 pass the disk address 03F9D 61578801 5 6 BASE 4235 LD MDV SP,SAVEMDV restore this register 03F9E EDC94011 5 ZBM 4236 STW MDV,MDVDIDXFER say we accomplished something 03F9F 5D1F8002 6 STAK 4237 LEAVE POP 4238 * --- 4239 4240 END RQSTDONE subroutine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 836 (MSPROC) F 43 Mass Storage Driver - Drive Activity Section 4242 4243 ********************************************************************************** 4244 * * 4245 * SEEKNDSTAT - Check Status at Seek End. * 4246 * * 4247 * This routine will inspect the status after a seek (or * 4248 * rezero) operation to decide whether it was successful. * 4249 * * 4250 * LD PPL => PPL (used for error logging only) * 4251 * LD MDV => MDV element * 4252 * CALL SEEKNDSTAT * 4253 * PARVL operation code (OPSEEK or OPZERO) * 4254 * * 4255 * * 4256 * * 4257 * * 4258 * Eats R0:R3. * 4259 * Stack required: 4 * 4260 * 1 + max ( CLEARFAULT (2), ERRORLOG (3) ) * 4261 * * 4262 ********************************************************************************** 4263 4264 BLOCK SEEKNDSTAT subroutine 4265 ENTRY SEEKNDSTAT 4266 4267 BEGFRAME 4268 ENDFRAME 4269 03FA0 DD1F8001 6 STAK 4270 SEEKNDSTAT ENTR PUSH 03FA1 C052C000 3 REG 4271 STPVL R3 R3 = operation code 4272 * \ / 03FA2 60174809 0 5 BASE 4273 LD R0 MDV,MDVBFDSTAT get disk status 03FA3 6040395F 1 4274 LD R1 SEEKMASK mask of relevant bits 03FA4 6C003961 01 4275 MCPR R0 SEEKOK is it all right? 03FA5 FE023FBC 4276 JEQ DONE jump if so 03FA6 5C094613 5 ZBM 4277 CMZ MDV,MDVNOLOG error logging disabled? 03FA7 FE0C3FB3 4278 JNE CKSEEKSTAT jump if so 4279 * \ / 03FA8 DC005048 4280 CALL ERRORLOG log the bad status 03FA9 41441A32 IMM 4281 PARV ERLCDE disk error 03FAA 41574805 5 BASE 4282 PARV MDV,MDVNAME 03FAB 60040000 0 IMM 4283 LD R0 0 get dummy value 03FAC FB303FAE 4 4284 JZA PPL NOPPL don't use pointer if no PPL 03FAD 60170801 0 4 BASE 4285 LD R0 PPL,PPBLOCK otherwise, get block number involved 00003FAE 4286 NOPPL LABEL 03FAE 41520000 0 REG 4287 PARV R0 03FAF 41574808 5 BASE 4288 PARV MDV,MDVSEEKADR seek address 03FB0 4152C000 3 REG 4289 PARV R3 operation 03FB1 41574809 5 BASE 4290 PARV MDV,MDVBFDSTAT disk status 03FB2 40440000 IMM 4291 PARVL 0 PPU status 4292 * \ / 4293 00003FB3 4294 CKSEEKSTAT LABEL 03FB3 60174809 0 5 BASE 4295 LD R0 MDV,MDVBFDSTAT get disk status 03FB4 F62E3FBD 0 4296 JBT R0/BFDSSRSPER OFFLINE jump if drive has disappeared 03FB5 F60E3FB9 0 4297 JBT R0/BFDSSFAULT DRVFAULT jump if drive has faulted 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 837 (MSPROC) F 43 Mass Storage Driver - Drive Activity Section 03FB6 F60C3FBB 0 4298 JBT R0/BFDSSSKERR ERROR jump on seek error 03FB7 F6083FBB 0 4299 JBT R0/BFDSSRDY ERROR jump if drive is ready 03FB8 FE0E3FBD 4300 JMP OFFLINE jump if drive seems to be not ready 4301 * --- 4302 00003FB9 4303 DRVFAULT LABEL 03FB9 DC403C0E 4304 CALLNP CLEARFAULT try to clear fault 03FBA FE0E3FBD 4305 JMP OFFLINE jump if drive is offline 4306 * \ / 4307 00003FBB 4308 ERROR LABEL 03FBB FBE03FBD 7 4309 IRJ R7 RETURN advance return address 4310 * --- 4311 00003FBC 4312 DONE LABEL 03FBC 61D7D002 7 7 REG 4313 LD R7 R7+2 4314 * \ / 4315 00003FBD 4316 OFFLINE LABEL 00003FBD 4317 RETURN LABEL 03FBD 5D1F8001 6 STAK 4318 LEAVE POP 4319 * --- 4320 4321 END SEEKNDSTAT subroutine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 838 (MSPROC) F 43 Mass Storage Driver - Drive Activity Section 4323 4324 ********************************************************************************** 4325 * * 4326 * SEEKNDWAIT - Wait for Seek to Complete. * 4327 * * 4328 * LD MDV => MDV element * 4329 * CALLNP SEEKNDWAIT * 4330 * * 4331 * * 4332 * Eats R0:R2. * 4333 * Stack required: 1 * 4334 * * 4335 ********************************************************************************** 4336 4337 BLOCK SEEKNDWAIT subroutine 4338 ENTRY SEEKNDWAIT 4339 4340 BEGFRAME 4341 ENDFRAME 4342 03FBE DD5F8001 6 STAK 4343 SEEKNDWAIT ENTRNP PUSH 03FBF 60095830 0 5 ZBM 4344 LD R0 MDV,MDVUNIT get unit number 03FC0 60201A28 0 0 4345 LD R0 CIX(BFDSS+BFDSELECTB)(R0) get status 03FC1 6040395F 1 4346 LD R1 SEEKMASK mask of relevant bits 03FC2 6C003960 01 4347 MCPR R0 SEEKING are we actually seeking? 03FC3 FE023FC7 4348 JEQ DOWAIT jump if so - must wait 03FC4 E4174809 0 5 BASE 4349 ST R0 MDV,MDVBFDSTAT else save status 03FC5 60040000 0 IMM 4350 LD R0 0 say controller is alive 03FC6 FE0E3FC9 4351 JMP RETURN and return 4352 * --- 4353 00003FC7 4354 DOWAIT LABEL 03FC7 60040002 0 IMM 4355 LD R0 MDVSTSEEK new state: seeking 03FC8 DCD7481B 5 BASE 4356 EXPCS MDV,MDVPC wait for seek-end interrupt 4357 * \ / 4358 00003FC9 4359 RETURN LABEL 03FC9 5D1F8001 6 STAK 4360 LEAVE POP 4361 * --- 4362 4363 END SEEKNDWAIT subroutine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 839 (MSPROC) F 43 Mass Storage Driver - Drive Activity Section 4365 4366 ********************************************************************************** 4367 * * 4368 * STATCHECK - Perform Status Check after Data Transfer. * 4369 * * 4370 * This routine will do the status checking after a data * 4371 * transfer operation. It will decide whether the operation * 4372 * was successful, and if not, what kind of retry to do. It * 4373 * will do any necessary ClearFault or ReZero. It will log * 4374 * any nonoptimal status. * 4375 * * 4376 * Note: If the MDVNOERRS flag is set, errors are counted but * 4377 * not checked against the maximums. No recovery is attempted, * 4378 * and the "permanent error" return is used. * 4379 * * 4380 * LD PPL => PPL of block transferred * 4381 * LD MDV => MDV element * 4382 * CALL STATCHECK * 4383 * PARVL operation code * 4384 * * 4385 * * 4386 * * 4387 * * 4388 * * 4389 * * 4390 * * 4391 * The miscellaneous error is: * 4392 * For READ, single segment reconstruction is necessary * 4393 * (R0 is the segment number) * 4394 * For WRITE, memory parity error occurred * 4395 * For CHECK, the data does not check (or is not readable) * 4396 * For FORMAT, should not happen, assume seek error * 4397 * * 4398 * Registers Used: R0:R3 * 4399 * Stack Required: 9 * 4400 * 2 + max ( CLEARFAULT (2), ERRORLOG (3), MAPINFBI (2), * 4401 * MAPOUTFBI (2) REZERO (7) ) * 4402 * * 4403 ********************************************************************************** 4404 4405 BLOCK STATCHECK subroutine 4406 ENTRY STATCHECK 4407 4408 BEGFRAME 00178801 6 BASE 4409 OPCODE BSS 1 requested operation 4410 ENDFRAME 4411 03FCA DD1F8002 6 STAK 4412 STATCHECK ENTR PUSH 03FCB C0578801 6 BASE 4413 STPVL SP,OPCODE operation code 4414 4415 ********************************************************************************** 4416 * * 4417 * Make first checks common to all operation types. * 4418 * * 4419 ********************************************************************************** 4420 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 840 (MSPROC) F 43 Mass Storage Driver - Drive Activity Section 4421 * \ / 4422 * ignore parity error on page we already know about 03FCC FB303FCF 4 4423 JZA PPL CHKTRNSFER if no PPL, skip adjustment 03FCD 60090812 0 4 ZBM 4424 LD R0 PPL,PPMEMERR get bit for memory error found 03FCE A8096E1A 0 5 ZBM 4425 BRSBM R0 MDV,MDVPPUSTAT/PPUIMPE remove it from transfer status 4426 * \ / 4427 4428 * see whether all is OK right off the bat 00003FCF 4429 CHKTRNSFER LABEL 03FCF 62574809 125 BASE 4430 LD2 R1 MDV,MDVBFDSTAT get statuses 03FD0 78403962 1 4431 AND R1 XFERMASK mask off irrelevant bits 03FD1 64403963 1 4432 CPR R1 XFEROK is all well with disk? 03FD2 FE0C3FD5 4433 JNE HARDWAY jump if not 03FD3 78856540 2 IMM 4434 AND R2 PPUMASK mask off irrelevant PPU bits 03FD4 FA824065 2 4435 JEQZ R2 ALLOK exit if life is easy 4436 * \ / 4437 4438 * statuses not clean, log and process them 00003FD5 4439 HARDWAY LABEL 03FD5 5C094613 5 ZBM 4440 CMZ MDV,MDVNOLOG logging disabled? 03FD6 FE0C3FE3 4441 JNE CHKSTATUS jump if so 03FD7 60D78801 3 6 BASE 4442 LD R3 SP,OPCODE get the requested op code 03FD8 DC005048 4443 CALL ERRORLOG log the error 03FD9 41441A32 IMM 4444 PARV ERLCDE disk error 03FDA 41574805 5 BASE 4445 PARV MDV,MDVNAME 03FDB 60040000 0 IMM 4446 LD R0 0 parm if no PPL 03FDC FB303FDE 4 4447 JZA PPL HAVEPARM jump if no PPL 03FDD 60170801 0 4 BASE 4448 LD R0 PPL,PPBLOCK block number 00003FDE 4449 HAVEPARM LABEL 03FDE 41520000 0 REG 4450 PARV R0 pass MS block address 03FDF 41574808 5 BASE 4451 PARV MDV,MDVSEEKADR seek address 03FE0 4152C000 3 REG 4452 PARV R3 operation in progress 03FE1 41574809 5 BASE 4453 PARV MDV,MDVBFDSTAT disk status 03FE2 4057480A 5 BASE 4454 PARVL MDV,MDVPPUSTAT channel status 4455 * \ / 4456 4457 * check unmasked PPUINTSTAT and BFDSS 00003FE3 4458 CHKSTATUS LABEL 03FE3 62574809 125 BASE 4459 LD2 R1 MDV,MDVBFDSTAT get statuses 03FE4 F69E404F 2 4460 JBT R2/PPUITOUT SEEKERROR deadman timeout, re-start everything 03FE5 F6AA4057 2 4461 JBT R2/PPUICONF CHANERROR jump if PPU is confused 03FE6 F66E406A 1 4462 JBT R1/BFDSSRSPER OFFLINE exit if response error 03FE7 F64E4047 1 4463 JBT R1/BFDSSFAULT DRVFAULT jump to process drive fault 03FE8 F64C404F 1 4464 JBT R1/BFDSSSKERR SEEKERROR jump on seek error 03FE9 F24A404F 1 4465 JBF R1/BFDSSONCYL SEEKERROR jump if not on cylinder 03FEA F644406A 1 4466 JBT R1/BFDSSNSAFE OFFLINE else exit if drive is unsafe 03FEB F248406A 1 4467 JBF R1/BFDSSRDY OFFLINE exit if drive not ready 4468 * \ / 4469 4470 * check error code 03FEC 600A7840 0 1 CBM 4471 LD R0 R1/BFDSSERRCD get error code 03FED 5C30406B 0 @ 4472 CMZ @PTRBDE(R0) is it B, D or E? 03FEE FE0C4057 4473 JNE CHANERROR jump if yes 4474 * \ / 4475 4476 * branch to operation-specific checking 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 841 (MSPROC) F 43 Mass Storage Driver - Drive Activity Section 03FEF 60178801 0 6 BASE 4477 LD R0 SP,OPCODE get the operation code 03FF0 64040006 0 IMM 4478 CPR R0 OPWRITE write operation? 03FF1 FE02402B 4479 JEQ STATWRITE jump if so 03FF2 64040007 0 IMM 4480 CPR R0 OPCHECK write-check operation? 03FF3 FE024038 4481 JEQ STATWCHK jump if yes 03FF4 64040009 0 IMM 4482 CPR R0 OPFORMAT format operation? 03FF5 FE02404F 4483 JEQ SEEKERROR treat like seek error 4484 * \ / 4485 4486 ********************************************************************************** 4487 * * 4488 * Status checking for READ operation. * 4489 * * 4490 * This section is not entered by the other operation checks. * 4491 * * 4492 ********************************************************************************** 4493 4494 * \ / 03FF6 F6A44057 2 4495 JBT R2/PPUIDPPE CHANERROR jump if data path parity error 03FF7 F6B24057 2 4496 JBT R2/PPUIBCNR CHANERROR jump if byte count not ready 03FF8 F6A24057 2 4497 JBT R2/PPUIXTRA CHANERROR jump if extra bytes after rollover 03FF9 F6684057 1 4498 JBT R1/BFDSSWCERR CHANERROR jump if word-count error 03FFA F66A4057 1 4499 JBT R1/BFDSSLOSTD CHANERROR jump if FIFO over/under-flow 03FFB F66C4057 1 4500 JBT R1/BFDSSIFPE CHANERROR jump if interface parity error 4501 4502 * BFDSS and PPUINTSTAT check out for the most part. Only 4503 * things left to check are header errors and BFDSSCEOV. 4504 03FFC 5C0A7030 1 CBM 4505 CMZ R1/BFDSSHDECD any header errors? 03FFD FE024013 4506 JEQ NOHEADERR1 jump if none 03FFE 60097083 0 5 ZBM 4507 LD R0 MDV,MDVDKERRS pick up media counter 03FFF FA02405F 0 4508 JEQZ R0 DISKERROR treat very first header error as media 04000 600A01D0 0 0 CBM 4509 LD R0 R0/BITS 0:28 use .125 as appropriate ratio 04001 64095843 0 5 ZBM 4510 CPR R0 MDV,MDVSKERRS check against seek error count 04002 FE06404F 4511 JGE SEEKERROR apportion some blame to seek errors 04003 60D24000 3 1 REG 4512 LD R3 R1 save BFD status 04004 DC002606 4513 CALL MAPINFBI get access to FBI 04005 40530000 4 REG 4514 PARVL PPL pass physical page element 04006 6003FFC0 0 IMM 4515 LD R0 FBICSMASK 04007 F0164800 0 1 BASE 4516 PRMUT R0 R1,0 generate FBI checksum 04008 FA2E405E 0 4517 JNEMW R0 DSKERRUMAP jump if not correct 04009 60085181 0 1 ZBM 4518 LD R0 R1,FBIDA get disk address read 0400A 64091181 0 4 ZBM 4519 CPR R0 PPL,PPBLOCK/MSBLKFIELD is it right? 0400B FE0C405E 4520 JNE DSKERRUMAP jump if not 0400C DC40261B 4521 CALLNP MAPOUTFBI unmap FBI, ION 0400D 6052C000 1 3 REG 4522 LD R1 R3 get BFD status 0400E 5C0A7840 1 CBM 4523 CMZ R1/BFDSSERRCD did we have any data errors too? 0400F FE0C4013 4524 JNE NOHEADERR1 jump if so, data not good enough to substitute 04010 5C094013 5 ZBM 4525 CMZ MDV,MDVNOSUB ignore substitutions? 04011 FE0C4013 4526 JNE NOHEADERR1 jump if so, substitutions not allowed 04012 EDC94A13 5 ZBM 4527 STW MDV,MDVSUB else accept, but substitute block 4528 * \ / 4529 4530 * either, no header error occurred or not too many have 00004013 4531 NOHEADERR1 LABEL 04013 600A7840 0 1 CBM 4532 LD R0 R1/BFDSSERRCD get error code 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 842 (MSPROC) F 43 Mass Storage Driver - Drive Activity Section 04014 6404000A 0 IMM 4533 CPR R0 BFDNUMSEGS is it single-segment error? 04015 FE04405F 4534 JGT DISKERROR jump if not 04016 FA044019 0 4535 JGTZ R0 SEGERROR jump if so 04017 F2764065 1 4536 JBF R1/BFDSSCEOV ALLOK exit if no error code or flags 4537 * \ / 4538 4539 ********************************************************************************** 4540 * Only thing wrong with read is BFDSSCEOV. Everything * 4541 * else is perfect. This means "time code error". Fake * 4542 * register to process "segment error" in check segment. * 4543 ********************************************************************************** 4544 04018 6004000A 0 IMM 4545 LD R0 BFDCHKSEG supply check segment number 4546 * \ / 4547 4548 ********************************************************************************** 4549 * READ: At least one segment (R0=number) has had an error. We * 4550 * can reconstruct it from checksum information if it is the only * 4551 * such segment (but just retry if this is the first time through). * 4552 * Read the BFDs auxiliary status to check on other segments. Each * 4553 * segment has four bits of information regarding its type of error: * 4554 * (write check), (overrun), (crc error), (time code error). The * 4555 * ten segments occupy the first 40 bits of the double word status, * 4556 * the remaining 24 bits are not relevant here. We mask off the * 4557 * bits we assume are bad in the known segment. If everything else * 4558 * is 0, no other segments had errors of any kind, so we set a flag * 4559 * (MDVREWRITE) and take the "correctable segment error" return. * 4560 ********************************************************************************** 4561 4562 * \ / 00004019 4563 SEGERROR LABEL 04019 5C097083 5 ZBM 4564 CMZ MDV,MDVDKERRS any disk errors yet? 0401A FE02405F 4565 JEQ DISKERROR if not, just retry 4566 * \ / 4567 0401B 60401A30 1 4568 LD R1 CIX(BFDEF18) get info on first 8 segments (1:8) 0401C 60801A40 2 4569 LD R2 CIX(BFDEF9A) get info on last two segments (9:A) 0401D 7883FE00 2 IMM 4570 AND R2 0FF000000 mask off irrelevant stuff 0401E E6574809 125 BASE 4571 ST2 R1 MDV,MDVBFDSTAT save them (wiping out status) 0401F 6044000C 1 IMM 4572 LD R1 0C mask to remove CRC and timecode errors 04020 38897848 2 5 ZBM 4573 LEA R2 MDV,MDVBFDSTAT/BITS 0:3(-1) point to segment "zero" info 04021 F85A8400 1 20 @R 4574 ANDM R1 @R2(R0) clear some bits in bad segment 04022 5E174809 5 BASE 4575 CMZ2 MDV,MDVBFDSTAT any other bits set? 04023 FE0C405F 4576 JNE DISKERROR jump if so 4577 * \ / 4578 4579 * Single segment error - rewrite unless we've been asked to 4580 * keep our hands off. R0 <= segment number. 04024 BC497083 1 5 ZBM 4581 INCL R1 MDV,MDVDKERRS count the error 04025 64440014 1 IMM 4582 CPR R1 MDVDKERLIM too many? 04026 FE064069 4583 JGE PERMERROR exit if so, treat as perm 04027 5C094213 5 ZBM 4584 CMZ MDV,MDVNOERRS special error handling? 04028 FE0C4066 4585 JNE SEGERR exit w/o rewrite 04029 EDC94813 5 ZBM 4586 STW MDV,MDVREWRITE say we should rewrite the block 0402A FE0E4066 4587 JMP SEGERR exit 4588 * --- 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 843 (MSPROC) F 43 Mass Storage Driver - Drive Activity Section 4589 4590 ********************************************************************************** 4591 * * 4592 * Status checking for WRITE operations. * 4593 * * 4594 * This section is not entered by the other operation checks. * 4595 * * 4596 ********************************************************************************** 4597 0000402B 4598 STATWRITE LABEL 0402B F646406A 1 4599 JBT R1/BFDSSWPROT OFFLINE exit if write-protected (treat as offline) 0402C F6AE4066 2 4600 JBT R2/PPUIMPE MEMPARERR exit if memory parity error 0402D 5C0A7030 1 CBM 4601 CMZ R1/BFDSSHDECD any header errors? 0402E FE024032 4602 JEQ NOHEADERR2 jump if not 0402F 5C095843 5 ZBM 4603 CMZ MDV,MDVSKERRS have we retried seek yet? 04030 FE02404F 4604 JEQ SEEKERROR if not, do so 04031 FE0E4069 4605 JMP PERMERROR exit, it's a hopeless perm 4606 * --- 4607 00004032 4608 NOHEADERR2 LABEL 04032 5C0A7650 1 CBM 4609 CMZ R1/(BFDSSCEOV+BFDSSERRCD) any disk errors? 04033 FE024057 4610 JEQ CHANERROR jump if not 04034 60097083 0 5 ZBM 4611 LD R0 MDV,MDVDKERRS see how many so far 04035 64040005 0 IMM 4612 CPR R0 5 too many? 04036 FE08405F 4613 JLT DISKERROR jump if not 04037 FE0E406A 4614 JMP OFFLINE exit, drive is not useable 4615 * --- 4616 4617 ********************************************************************************** 4618 * * 4619 * Status checking for Write-Check operations. * 4620 * * 4621 * This section is not entered by the other operation checks. * 4622 * * 4623 ********************************************************************************** 4624 00004038 4625 STATWCHK LABEL 04038 5C0A7030 1 CBM 4626 CMZ R1/BFDSSHDECD any header errors? 04039 FE02403D 4627 JEQ NOHEADERR3 jump if not 0403A 5C095843 5 ZBM 4628 CMZ MDV,MDVSKERRS retried seek yet? 0403B FE02404F 4629 JEQ SEEKERROR if not, do so 0403C FE0E4069 4630 JMP PERMERROR exit, it's a fatal perm 4631 * --- 4632 0000403D 4633 NOHEADERR3 LABEL 0403D F6AE4066 2 4634 JBT R2/PPUIMPE NEEDWRITE exit if memory parity error 0403E F6684057 1 4635 JBT R1/BFDSSWCERR CHANERROR jump if word-count error 0403F F66A4057 1 4636 JBT R1/BFDSSLOSTD CHANERROR jump if FIFO over/under-run 04040 F66C4057 1 4637 JBT R1/BFDSSIFPE CHANERROR jump if interface parity error 04041 F6764069 1 4638 JBT R1/BFDSSCEOV PERMERROR trap undefined error which comes 04041 F6764069 1 4639 up once in a blue moon and doesn't 04041 F6764069 1 4640 seem to be recoverable 04042 5C0A7840 1 CBM 4641 CMZ R1/BFDSSERRCD any miscellaneous errors? 04043 FE024057 4642 JEQ CHANERROR if not, it's a channel error 04044 5C097083 5 ZBM 4643 CMZ MDV,MDVDKERRS have we retried yet? 04045 FE02405F 4644 JEQ DISKERROR if not, do so 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 844 (MSPROC) F 43 Mass Storage Driver - Drive Activity Section 04046 FE0E4066 4645 JMP NEEDWRITE exit, we must do a rewrite 4646 * --- 4647 4648 ********************************************************************************** 4649 * * 4650 * Problems. This section is entered from any of the operation * 4651 * checks attempting to recover from common hardware shortcomings. * 4652 * The counter for the specific error is incremented. We try no * 4653 * recovery and just perm the error if the MDVNOERRS flag is set. * 4654 * We say the drive is offline and do no recovery if our count * 4655 * of the specific error exceeds a predefined maximum. * 4656 * * 4657 ********************************************************************************** 4658 4659 4660 * Drive fault - clear fault, reseek or kill drive 00004047 4661 DRVFAULT LABEL 04047 DC403C0E 4662 CALLNP CLEARFAULT try to clear drive logic 04048 FE0E406A 4663 JMP OFFLINE jump if drive offline 04049 BC095043 0 5 ZBM 4664 INCL R0 MDV,MDVFLTERRS increment and get error count 0404A 5C094213 5 ZBM 4665 CMZ MDV,MDVNOERRS special error handling? 0404B FE0C4069 4666 JNE PERMERROR exit if so, treat as perm 0404C 64040005 0 IMM 4667 CPR R0 MDVFLERLIM have we hit the limit? 0404D FE084068 4668 JLT RESEEK exit if not, try reseek 0404E FE0E406A 4669 JMP OFFLINE exit, error is permanent 4670 * --- 4671 4672 * Seek error - rezero the drive, re-seek or kill the drive. 0000404F 4673 SEEKERROR LABEL 0404F DC403F74 4674 CALLNP REZERO try to realign the drive 04050 FE0E406A 4675 JMP OFFLINE jump if drive offline 04051 BC095843 0 5 ZBM 4676 INCL R0 MDV,MDVSKERRS increment and get error count 04052 5C094213 5 ZBM 4677 CMZ MDV,MDVNOERRS see if special error handling 04053 FE0C4069 4678 JNE PERMERROR exit if so, treat as perm 04054 64040005 0 IMM 4679 CPR R0 MDVSKERLIM too many otherwise? 04055 FE084068 4680 JLT RESEEK exit if not, try reseek 04056 FE0E406A 4681 JMP OFFLINE exit, drive looks bad 4682 * --- 4683 4684 * Channel error - clear channel, retry transfer or kill the drive 00004057 4685 CHANERROR LABEL 04057 EC001801 4686 STZ CIX(PPUABORT) try to make the channel happier 04058 BC096083 0 5 ZBM 4687 INCL R0 MDV,MDVCHERRS count the error 04059 5C094213 5 ZBM 4688 CMZ MDV,MDVNOERRS see if special error handling 0405A FE0C4069 4689 JNE PERMERROR exit if so, treat as perm 0405B 64040032 0 IMM 4690 CPR R0 MDVCHERLIM too many? 0405C FE084067 4691 JLT REXFER exit if not, retry the transfer 0405D FE0E406A 4692 JMP OFFLINE exit, the error is permanent 4693 * --- 4694 4695 * Disk error - retry transfer or kill the drive 0000405E 4696 DSKERRUMAP LABEL 0405E DC40261B 4697 CALLNP MAPOUTFBI unmap FBI, ION 0000405F 4698 DISKERROR LABEL 0405F BC097083 0 5 ZBM 4699 INCL R0 MDV,MDVDKERRS count the error 04060 5C094213 5 ZBM 4700 CMZ MDV,MDVNOERRS see if special error handling 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 845 (MSPROC) F 43 Mass Storage Driver - Drive Activity Section 04061 FE0C4069 4701 JNE PERMERROR exit if so, treat as perm 04062 64040014 0 IMM 4702 CPR R0 MDVDKERLIM too many otherwise? 04063 FE084067 4703 JLT REXFER exit if not, retry transfer 04064 FE0E4069 4704 JMP PERMERROR exit, error is permanent 4705 * --- 4706 4707 ********************************************************************************** 4708 * * 4709 * The various skip returns. * 4710 * * 4711 ********************************************************************************** 4712 00004065 4713 ALLOK LABEL transfer was successful 04065 61D7D001 7 7 REG 4714 LD R7 R7+1 4715 * \ / 4716 00004066 4717 SEGERR LABEL READ: single-segment error 00004066 4718 MEMPARERR LABEL WRITE: memory parity error 00004066 4719 NEEDWRITE LABEL CHECK: data badly written 04066 61D7D001 7 7 REG 4720 LD R7 R7+1 miscellaneous error 4721 * \ / 4722 00004067 4723 REXFER LABEL retry the data transfer 04067 61D7D001 7 7 REG 4724 LD R7 R7+1 4725 * \ / 4726 00004068 4727 RESEEK LABEL retry the seek 04068 61D7D001 7 7 REG 4728 LD R7 R7+1 4729 * \ / 4730 00004069 4731 PERMERROR LABEL permanent error 04069 61D7D001 7 7 REG 4732 LD R7 R7+1 4733 * \ / 4734 0000406A 4735 OFFLINE LABEL drive is offline 0406A 5D1F8002 6 STAK 4736 LEAVE POP return to caller 4737 * --- 4738 4739 * Bit table to check code in BFDSSERRCD. Quick check 4740 * whether code is one of 0B, 0D, or 0E. 0406B 0048406C 4741 PTRBDE PTR SETBDE pointer to bit table 0406B 00000000 4742 SETBDE VFDB 0,0,0,0,0,0,0,0,0,0,0,1,0,1,1,0 4743 4744 BSS 0 align to fullword 4745 4746 END STATCHECK subroutine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 846 (MSPROC) F 43 Mass Storage Driver - Drive Activity Section 4748 4749 ********************************************************************************** 4750 * * 4751 * TSELECT - Select Special Settings for Read Operation. * 4752 * * 4753 * This routine will select the drive for reading, and * 4754 * perform any initializing operation required. It can select * 4755 * early or late data strobe, and/or positioner offset forward * 4756 * or backward. It makes its decision based on the disk error * 4757 * counter, and will try all of the various possibilities in * 4758 * turn. * 4759 * * 4760 * Notes: * 4761 * a) After selecting the options, we cannot do another * 4762 * select operation, as that would cause any selected * 4763 * options to be cancelled. * 4764 * b) After selecting a positioner offset, we have to wait * 4765 * for the drive to once more claim that it is on-cylinder. * 4766 * Since the disk controller is not guaranteed to give an * 4767 * interrupt for that condition, we just loop here waiting * 4768 * for it. * 4769 * c) Some drives (e.g. fixed Fujitsu with SMD/ESDI interface) * 4770 * can't handle these options. The interface deals with * 4771 * it, but is slow (90 micro-seconds) to drop "on-cylinder". * 4772 * We therefore WAIT a bit prior to checking the status. * 4773 * * 4774 * This is kind of dirty, but c'est la vie. * 4775 * * 4776 * LD PPL => PPL for page (used for error logging only) * 4777 * LD MDV => MDV element * 4778 * CALLNP TSELECT * 4779 * * 4780 * * 4781 * * 4782 * * 4783 * Eats R0:R3. * 4784 * Stack required: 6 * 4785 * 2 + max ( SEEKNDSTAT (4) ) * 4786 * * 4787 ********************************************************************************** 4788 4789 BLOCK TSELECT subroutine 4790 ENTRY TSELECT 4791 000001F4 ABS 4792 WAITTIME EQU 500 x 10 usec = 5 msec 00000064 ABS 4793 MAXWAITS EQU 100 x WAITTIME = 1/2 sec 4794 4795 BEGFRAME 00178801 6 BASE 4796 ACTION BSS 1 strobe/offset to use 4797 ENDFRAME 4798 0406D DD5F8002 6 STAK 4799 TSELECT ENTRNP PUSH 0406E 60495830 1 5 ZBM 4800 LD R1 MDV,MDVUNIT get the unit number 0406F E4401A00 1 4801 ST R1 CIX(BFDSELECT) select the drive just this once 4802 * \ / 04070 60497083 1 5 ZBM 4803 LD R1 MDV,MDVDKERRS get the error counter 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 847 (MSPROC) F 43 Mass Storage Driver - Drive Activity Section 04071 FA42408B 1 4804 JEQZ R1 GOODRET leave if this is the first try 04072 60040000 0 IMM 4805 LD R0 0 clear for divide 04073 58C40010 IMM 4806 IORPSR PSRMODIF turn on mod arithmetic 04074 1404000A 0 IMM 4807 DIV R0 TERRORLIM R1 = which trick to use 04075 58840010 IMM 4808 CLBPSR PSRMODIF back to normal math 4809 * \ / 04076 6062408C 1 1 4810 LD R1 OFSETA(R1) select a trick from our grab bag 04077 FE0E407A 4811 JMP TSWAIT wait for any un-operations to happen 4812 * --- 4813 00004078 4814 TALOOP LABEL 04078 600A7080 0 1 CBM 4815 LD R0 R1/CH3 extract current operation 04079 E4001A20 0 4816 ST R0 CIX(BFDFUNC) do the function 0000407A 4817 TSWAIT LABEL 0407A E4578801 1 6 BASE 4818 ST R1 SP,ACTION save remaining codes 0407B 00440019 IMM 4819 WAIT 25 pause to let interface work 4820 * \ / 4821 4822 * Now loop until the mechanical motion is done. 0407C 60840064 2 IMM 4823 LD R2 MAXWAITS max number of times through the loop 0407D 6040395F 1 4824 LD R1 SEEKMASK load bits relevant to seek 0000407E 4825 WAIT LABEL 0407E 60001A20 0 4826 LD R0 CIX(BFDSS) get drive status 0407F 6C003960 01 4827 MCPR R0 SEEKING still seeking? 04080 FE0C4084 4828 JNE WAITDONE no, we're done 04081 004401F4 IMM 4829 WAIT WAITTIME wait a while 04082 FAA2407E 2 4830 DRJ R2 WAIT try again if under the limit 04083 FE0E4087 4831 JMP OFFLINE the thing can't take that long 4832 * --- 00004084 4833 WAITDONE LABEL 04084 E4174809 0 5 BASE 4834 ST R0 MDV,MDVBFDSTAT save current status 04085 DC003FA0 4835 CALL SEEKNDSTAT see how it looks 04086 40440008 IMM 4836 PARVL OPOFFSET doing offset operation 04087 5D1F8002 6 STAK 4837 OFFLINE LEAVE POP exit (SEEKNDSTAT sez offline) 04088 FBE04087 7 4838 ERROR IRJ R7 OFFLINE advance exit (SEEKNDSTAT sez seekerror) 4839 * \ / 4840 4841 * look for next action 04089 60499101 1 6 ZBM 4842 LD R1 SP,ACTION/(CH1+CH2) rotate! 0408A FA4C4078 1 4843 JNEZ R1 TALOOP jump if something to do 0000408B 4844 GOODRET LABEL 0408B FBE04088 7 4845 IRJ R7 ERROR make for third exit 4846 * --- 4847 4848 ********************************************************************************** 4849 * * 4850 * Bag of Tricks * 4851 * Each character in an entry is a function to be * 4852 * issued to the disk controller before the read. Many of * 4853 * the functions take time to execute and the driver must wait * 4854 * for on-cylinder to be re-asserted. Worse yet, the select * 4855 * at the beginning of this routine may also require a wait * 4856 * due to the controller cancelling a previous operation. * 4857 * The entries from the following table are right shifted * 4858 * for each loop. When the residue is zero, the loop terminates. * 4859 * The first pass through the loop does not issue any function, * 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 848 (MSPROC) F 43 Mass Storage Driver - Drive Activity Section 4860 * so the rightmost character is a dummy. * 4861 * * 4862 ********************************************************************************** 4863 0000408C 4864 OFSETA LABEL 0408C 00000000 4865 VFD 8:0,0,0,0 index of zero -- not used on first try 0408D 00000000 4866 VFD 8:0,0,0,0 index of one -- simply a retry, nothing fancy 0408E 00000000 4867 VFD 8:0,0,BFDFNDSE,0 try early data strobe 0408F 00000000 4868 VFD 8:0,0,BFDFNDSL,0 try late data strobe 04090 00000000 4869 VFD 8:0,0,BFDFNOFSF,0 try offset forward 04091 00000000 4870 VFD 8:0,BFDFNDSE,BFDFNOFSF,0 early, forward 04092 00000000 4871 VFD 8:0,BFDFNDSL,BFDFNOFSF,0 late, forward 04093 00000000 4872 VFD 8:0,0,BFDFNOFSB,0 try offset backward 04094 00000000 4873 VFD 8:0,BFDFNDSE,BFDFNOFSB,0 early, backward 04095 00000000 4874 VFD 8:0,BFDFNDSL,BFDFNOFSB,0 late, backward 0000000A ABS 4875 TERRORLIM EQU DISPW OFSETA number of elements in above table 04096 00000000 4876 VFD 8:0,0,0,0 extra do nothing element 4877 4878 END TSELECT subroutine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 849 (MSPROC) F 43 Mass Storage Driver - Drive Activity Section 4880 4881 ********************************************************************************** 4882 * * 4883 * UNLOADHEAD - Unload the Heads from the Disk. * 4884 * * 4885 * This routine will cause the disk drive to unload the * 4886 * heads from the disk. This depends on a special BTI * 4887 * installed board in the disk drive that works as follows: * 4888 * On a seek, if the cylinder is BFDUNLDCYL and the head * 4889 * is BFDMAGICID, the kludge board will assert the power fault * 4890 * inside of the drive. This will cause the heads to unload. * 4891 * * 4892 * LD MDV => MDV element * 4893 * CALLNP UNLOADHEAD * 4894 * * 4895 * Eats R0:R3. * 4896 * Stack required: 4 * 4897 * 1 + max ( ERRORLOG (3), TRACEPROC (3) ) * 4898 * * 4899 ********************************************************************************** 4900 4901 BLOCK UNLOADHEAD subroutine 4902 ENTRY UNLOADHEAD 4903 4904 BEGFRAME 4905 ENDFRAME 4906 04097 DD5F8001 6 STAK 4907 UNLOADHEAD ENTRNP PUSH 04098 60095830 0 5 ZBM 4908 LD R0 MDV,MDVUNIT our unit number 04099 604040A3 1 4909 LD R1 MAGICSEEK seek to unload heads 0409A E4601A18 1 0 4910 ST R1 CIX(BFDSEEK+BFDSELECTB+R0) do the dirty deed 4911 TRACE MSTRACE,MSTUNLOAD trace the event 0409B 5D401D2C 4911 XCT TRACECALL(MSTRACE) 0409C FEC0000E 4911 NOP (MSTRACE*BITS 22:26)+(MSTUNLOAD*BITS 27:31) 4912 SETTBIT MDV,MDVBADDISK remember we did it 0409D 60030000 0 IMM 4912 LD R0 1*BIT(((MDV,MDVBADDISK) DISP (MDV,0))/BITS 0:4) 0409E FC174802 0 5 BASE 4912 IORM R0 MDV,(((MDV,MDVBADDISK) DISP (MDV,0))/BITS 15:31) 0409F DC005048 4913 CALL ERRORLOG log the head retraction 040A0 41440631 IMM 4914 PARV ERLCUNLOAD code 040A1 40574805 5 BASE 4915 PARVL MDV,MDVNAME drive name 040A2 5D1F8001 6 STAK 4916 LEAVE POP 4917 * --- 4918 040A3 03FFFF00 4919 MAGICSEEK VFD BFDUNLDCYL*BFDSACYL+BFDMAGICHD*BFDSAHEAD 4920 4921 END UNLOADHEAD subroutine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 850 (MSPROC) F 43 Mass Storage Driver - Drive Activity Section 4923 4924 ********************************************************************************** 4925 * * 4926 * UNMOUNTVOL - Disassociate Volume and Drive. * 4927 * * 4928 * This routine will disassociate a volume and a drive. * 4929 * This is done when a drive drops ready but a volume is * 4930 * mounted there. * 4931 * * 4932 * LD MDV => MDV element * 4933 * CALLNP UNMOUNTVOL * 4934 * * 4935 * Eats R0:R4. * 4936 * Stack required: 8 * 4937 * 2 + max ( ERRORLOG (3), GENOPMSG (1), LOGCOUNT (4) * 4938 * P12TOCHAR (6), P6TOCHAR (3), SGETMEM (0) ) * 4939 * * 4940 ********************************************************************************** 4941 4942 BLOCK UNMOUNTVOL subroutine 4943 ENTRY UNMOUNTVOL 4944 4945 BEGFRAME 00178801 6 BASE 4946 SAVER5 BSS 1 save area for R5 4947 ENDFRAME 4948 040A4 DD5F8002 6 STAK 4949 UNMOUNTVOL ENTRNP PUSH 040A5 DC403E82 4950 CALLNP LOGCOUNT log the activity from this volume 040A6 DC005048 4951 CALL ERRORLOG log what we are doing 040A7 41440A3D IMM 4952 PARV ERLCDNRDY drive dropped ready 040A8 41574805 5 BASE 4953 PARV MDV,MDVNAME disk name 040A9 40494080 5 ZBM 4954 PARVL MDV,MDVVOLUME volume number 040AA 60094080 0 5 ZBM 4955 LD R0 MDV,MDVVOLUME get volume number 040AB FA0240CE 0 4956 JEQZ R0 RETURN jump if no volume mounted here 040AC 61201F22 4 0 4957 LD VLN VOLNTABLE(R0) R0 -> VOLN element 040AD EC091F15 4 ZBM 4958 STZ VLN,VOLNHCB clear reference to MDV 040AE 6003FE00 0 IMM 4959 LD R0 ONEBITS/MDVVOLFLD*MDVVOLFLD 040AF A8174800 0 5 BASE 4960 BRSBM R0 MDV,MDVWORDA clear (RMW) volume number in MDV 4961 4962 * Create message telling operator about the problem. 4963 040B0 E5578801 5 6 BASE 4964 ST R5 SP,SAVER5 save this register 040B1 DC002ED0 4965 CALL SGETMEM get an OPMSG block 040B2 40440005 IMM 4966 PARVL OPMSGLOG 040B3 61520000 5 0 REG 4967 LD R5 R0 R5 -> OPMSG block 4968 * \ / 040B4 38974802 2 5 BASE 4969 LEA R2 R5,OPMSGTEXT put "VOL " into message 040B5 600440CF 0 IMM 4970 LD R0 ADR MSGPART1 040B6 60440004 1 IMM 4971 LD R1 MSG1LEN 040B7 FE400000 4972 CMOVE 4973 * \ / 040B8 DC00593E 4974 CALL P6TOCHAR put half of volume name into message 040B9 41570811 4 BASE 4975 PARV VLN,VOLNNAME 040BA 41440006 IMM 4976 PARV 6 040BB 40168000 2 CACH 4977 PARL CACH R2,0 4978 * \ / R2 => null at end of string 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 851 (MSPROC) F 43 Mass Storage Driver - Drive Activity Section 040BC 600440D0 0 IMM 4979 LD R0 ADR MSGPART2 put "Volume " into message 040BD 60440007 1 IMM 4980 LD R1 MSG2LEN 040BE FE400000 4981 CMOVE 4982 * \ / 040BF DC005926 4983 CALL P12TOCHAR put volume name into message 040C0 43570811 4 BASE 4984 PARV2 VLN,VOLNNAME 040C1 40168000 2 CACH 4985 PARL CACH R2,0 4986 * \ / R2 => null at end of string 040C2 600440D2 0 IMM 4987 LD R0 ADR MSGPART3 put " is not accessible." into message 040C3 60440013 1 IMM 4988 LD R1 MSG3LEN 040C4 FE400000 4989 CMOVE 4990 * \ / 040C5 38174802 0 5 BASE 4991 LEA R0 R5,OPMSGTEXT R0 -> beginning of text 040C6 608A9F30 2 2 CBM 4992 LD R2 R2/FLDCHARS 040C7 108A1F30 2 0 CBM 4993 SUB R2 R0/FLDCHARS R2 = message length 040C8 E4974007 2 5 CACH 4994 ST R2 R5,OPMSGLEN save length 040C9 EC0942E0 5 ZBM 4995 STZ R5,OPMSGPROC no process number 040CA DC0046F3 4996 CALL GENOPMSG generate the message 040CB 40534000 5 REG 4997 PARVL R5 040CC E4091180 0 4 ZBM 4998 ST R0 VLN,VOLNMSGID save id of message 040CD 61578801 5 6 BASE 4999 LD R5 SP,SAVER5 restore ptr to MDV 5000 * \ / 5001 000040CE 5002 RETURN LABEL 040CE 5D1F8002 6 STAK 5003 LEAVE POP 5004 * --- 5005 040CF 564F4C20 5006 MSGPART1 TEXT "VOL " 00000004 ABS 5007 MSG1LEN EQU 4 040D0 566F6C75 5008 MSGPART2 TEXT "Volume " 00000007 ABS 5009 MSG2LEN EQU 7 040D2 20697320 5010 MSGPART3 TEXT " is not accessible." 00000013 ABS 5011 MSG3LEN EQU 19 5012 5013 END UNMOUNTVOL subroutine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 852 (MSPROC) F 43 Mass Storage Driver - Drive Activity Section 5015 5016 ********************************************************************************** 5017 * * 5018 * WRITE - Do a Write Operation, with Complete Recovery. * 5019 * * 5020 * This routine will do a disk write operation, complete * 5021 * with recovery, including write-check and rewrite. * 5022 * * 5023 * LD PPL => PPL of page to be written * 5024 * LD MDV => MDV of drive * 5025 * CALLNP WRITE * 5026 * * 5027 * * 5028 * * 5029 * Registers Used: R0:R2 * 5030 * Stack Required: 13 * 5031 * 2 + max ( CALCSKADR (1), DISKCHECK (10), DISKWRITE (10), * 5032 * DOREWRITE (11), ERRORLOG (3), MAPINFBI (2), * 5033 * MAPOUTFBI (2), SUBSTITUTE (7), TRACEPROC (3) ) * 5034 * * 5035 ********************************************************************************** 5036 5037 BLOCK WRITE subroutine 5038 ENTRY WRITE 5039 5040 BEGFRAME 00178801 6 BASE 5041 TEMP BSS 1 save area for R3 5042 ENDFRAME 5043 040D7 DD5F8002 6 STAK 5044 WRITE ENTRNP PUSH 040D8 E4D78801 3 6 BASE 5045 ST R3 SP,TEMP save volatile register 5046 * \ / 000040D9 5047 WRITEAGAIN LABEL 5048 CLRTBIT PPL,PPMODIFIED say resident page is no longer dirty 040D9 60030000 0 IMM 5048 LD R0 1*BIT(((PPL,PPMODIFIED) DISP (PPL,0))/BITS 0:4) 040DA A8170802 0 4 BASE 5048 BRSBM R0 PPL,(((PPL,PPMODIFIED) DISP (PPL,0))/BITS 15:31) 040DB DC002606 5049 CALL MAPINFBI get access to FBI, IOFF 040DC 40530000 4 REG 5050 PARVL PPL pass physical page element 040DD 60090812 0 4 ZBM 5051 LD R0 PPL,PPMEMERR get memory error flag 040DE E4084611 0 1 ZBM 5052 ST R0 R1,FBIMEMERR save in FBI 040DF 60101EE7 0 @ 5053 LD R0 @FDATEPTR get current date and time 040E0 E4164803 0 1 BASE 5054 ST R0 R1,FBILCD save change date in FBI 040E1 6003FF80 0 IMM 5055 LD R0 FBIGMASK 040E2 F0164800 0 1 BASE 5056 PRMUT R0 R1,0 generate the checksum 040E3 7407FFFF 0 IMM 5057 XOR R0 -1 change sense 040E4 E416480A 0 1 BASE 5058 ST R0 R1,FBICKSUM and save it into FBI 040E5 60485181 1 1 ZBM 5059 LD R1 R1,FBIDA get disk address from FBI 040E6 DC40261B 5060 CALLNP MAPOUTFBI unmap FBI, ION 040E7 64491181 1 4 ZBM 5061 CPR R1 PPL,PPBLOCK/MSBLKFIELD compare against block number 040E8 FE0240EC 5062 JEQ BLKNUMOK jump if it is right 040E9 5C094023 5 ZBM 5063 CMZ MDV,MDVSPECDA are we allowing DA mismatches? 040EA FE0C40EC 5064 JNE BLKNUMOK ignore this halt if so 040EB 00130101 5065 HALT HALTS0101 FBIDA and PPBLOCK disagree 5066 * --- 5067 000040EC 5068 BLKNUMOK LABEL 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 853 (MSPROC) F 43 Mass Storage Driver - Drive Activity Section 040EC DC003B66 5069 CALL CALCSKADR calculate the seek address 040ED 40570801 4 BASE 5070 PARVL PPL,PPBLOCK pass disk address 040EE DC403C9A 5071 CALLNP DISKWRITE do the write 040EF FE0E411B 5072 JMP OFFLINE jump if drive went offline 040F0 FE0E40F2 5073 JMP MEMERROR jump if new memory error 040F1 FE0E40F9 5074 JMP WRITEOK jump if all went well 5075 * --- 5076 000040F2 5077 MEMERROR LABEL 5078 SETTBIT PPL,PPMEMERR set the memory error bit 040F2 60021000 0 IMM 5078 LD R0 1*BIT(((PPL,PPMEMERR) DISP (PPL,0))/BITS 0:4) 040F3 FC170802 0 4 BASE 5078 IORM R0 PPL,(((PPL,PPMEMERR) DISP (PPL,0))/BITS 15:31) 040F4 DC005048 5079 CALL ERRORLOG log the error 040F5 41440A1A IMM 5080 PARV ERLCMPED disk driver discovered memory error 040F6 41570803 4 BASE 5081 PARV PPL,PPPMVALUE page file value for page 040F7 40570801 4 BASE 5082 PARVL PPL,PPBLOCK disk block number 040F8 FE0E40D9 5083 JMP WRITEAGAIN rewrite, with memory error bit 5084 * --- 5085 000040F9 5086 WRITEOK LABEL 040F9 5C094A13 5 ZBM 5087 CMZ MDV,MDVSUB do we need to substitute? 040FA FE0C410F 5088 JNE DOSUB jump if yes 040FB DC002606 5089 CALL MAPINFBI get access to FBI, IOFF 040FC 40530000 4 REG 5090 PARVL PPL pass physical page element 040FD 60084080 0 1 ZBM 5091 LD R0 R1,FBITYPE get type of block written 040FE 50040016 0 IMM 5092 MIN R0 MAXFBITYPE keep it within bounds 040FF D0201D63 0 5093 INC WRITCOUNTS(R0) increment counters by type 04100 60484211 1 1 ZBM 5094 LD R1 R1,FBIWCHK does this page deserve write-check? 04101 DC40261B 5095 CALLNP MAPOUTFBI unmap FBI, ION 04102 FA4C4105 1 5096 JNEZ R1 DOWRITECK perform write-check if so 04103 5C094413 5 ZBM 5097 CMZ MDV,MDVWWCHK write-check operation indicated? 04104 FE02411A 5098 JEQ WRITEDONE if not, all finished 5099 * \ / 5100 00004105 5101 DOWRITECK LABEL 04105 DC403C1B 5102 CALLNP DISKCHECK else do the write-check 04106 FE0E411B 5103 JMP OFFLINE jump if drive is offline 04107 FE0E4109 5104 JMP NEEDWRITE jump if rewrite is needed 04108 FE0E410D 5105 JMP NOREWRITE jump if rewrite not needed 5106 * --- 5107 00004109 5108 NEEDWRITE LABEL 04109 5C094213 5 ZBM 5109 CMZ MDV,MDVNOERRS special error handling? 0410A FE0C411A 5110 JNE WRITEDONE if so, skip rewrite 0410B DC403CF2 5111 CALLNP DOREWRITE do the rewrite (and write-check) 0410C FE0E411B 5112 JMP OFFLINE jump if drive went offline 5113 * \ / 0000410D 5114 NOREWRITE LABEL 0410D 5C094A13 5 ZBM 5115 CMZ MDV,MDVSUB do we now need to substitute? 0410E FE02411A 5116 JEQ WRITEDONE jump if not 5117 * \ / 5118 0000410F 5119 DOSUB LABEL 5120 SETTBIT MDV,MDVCHKHEAD perform a head check 0410F 60020020 0 IMM 5120 LD R0 1*BIT(((MDV,MDVCHKHEAD) DISP (MDV,0))/BITS 0:4) 04110 FC174800 0 5 BASE 5120 IORM R0 MDV,(((MDV,MDVCHKHEAD) DISP (MDV,0))/BITS 15:31) 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 854 (MSPROC) F 43 Mass Storage Driver - Drive Activity Section 04111 DC002606 5121 CALL MAPINFBI get access to FBI, IOFF 04112 40530000 4 REG 5122 PARVL PPL pass physical page element 04113 60084411 0 1 ZBM 5123 LD R0 R1,FBINOSUB is block substitutable? 04114 60484080 1 1 ZBM 5124 LD R1 R1,FBITYPE get the type of this block 04115 DC40261B 5125 CALLNP MAPOUTFBI unmap FBI, ION 04116 FA0C411D 0 5126 JNEZ R0 CANTSUB jump if not substitutable 5127 * \ / 5128 TRACE SUBSTRACE,SUBTCALL trace the substitution 04117 5D401D32 5128 XCT TRACECALL(SUBSTRACE) 04118 FEC000C0 5128 NOP (SUBSTRACE*BITS 22:26)+(SUBTCALL*BITS 27:31) 04119 DC40506E 5129 CALLNP SUBSTITUTE substitute the block 5130 * \ / 5131 0000411A 5132 WRITEDONE LABEL 0411A 61D7D001 7 7 REG 5133 LD R7 R7+1 successful return 5134 * \ / 5135 0000411B 5136 OFFLINE LABEL 0411B 60D78801 3 6 BASE 5137 LD R3 SP,TEMP restore this register 0411C 5D1F8002 6 STAK 5138 LEAVE POP 5139 * --- 5140 5141 * Halt iff system volume, else set drive offline 0000411D 5142 CANTSUB LABEL 0411D 60094080 0 5 ZBM 5143 LD R0 MDV,MDVVOLUME get the volume number 0411E FA22411B 0 5144 DRJ R0 OFFLINE jump if not system volume 5145 * \ / 0411F 00100103 5146 HALT HALTP0103 write error on non-substitutable block 5147 * --- 5148 5149 END WRITE subroutine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 855 (MSPROC) F 43 Mass Storage Driver - Drive Activity Section 5151 5152 ********************************************************************************** 5153 * * 5154 * ZEROPAGE - Zero Out a Page. * 5155 * * 5156 * This routine will zero out a page. This is done for * 5157 * zeropage requests, and for read requests when absolutely no * 5158 * data can be scraped off the disk. * 5159 * * 5160 * LD PPL => PPL for page * 5161 * CALLNP ZEROPAGE * 5162 * * 5163 * Eats R0:R3. Unmaps WNDO4. * 5164 * Stack required: 3 * 5165 * 1 + max ( MAPINFBI (2), MAPOUTFBI (2) ) * 5166 * * 5167 ********************************************************************************** 5168 5169 BLOCK ZEROPAGE subroutine 5170 ENTRY ZEROPAGE 5171 5172 BEGFRAME 5173 ENDFRAME 5174 04120 DD5F8001 6 STAK 5175 ZEROPAGE ENTRNP PUSH 04121 DC002606 5176 CALL MAPINFBI get access to FBI, IOFF 04122 40530000 4 REG 5177 PARVL PPL pass physical page element 04123 60124000 0 1 REG 5178 LD R0 R1 save address of FBI 04124 60924000 2 1 REG 5179 LD R2 R1 address of FBI 04125 6044002C 1 IMM 5180 LD R1 FBILNTH*CPW size of FBI 04126 FE580000 5181 CFILL 0 clear out the FBI 04127 6044007F 1 IMM 5182 LD R1 FBITFREE 04128 E4480080 1 0 ZBM 5183 ST R1 R0,FBITYPE set FBITYPE = free block 04129 60570801 1 4 BASE 5184 LD R1 PPL,PPBLOCK 0412A E4481181 1 0 ZBM 5185 ST R1 R0,FBIDA set block number 0412B 6043FF80 1 IMM 5186 LD R1 FBIGMASK 0412C F0560800 1 0 BASE 5187 PRMUT R1 R0,0 generate FBI checksum 0412D 7447FFFF 1 IMM 5188 XOR R1 -1 change sense 0412E E456080A 1 0 BASE 5189 ST R1 R0,FBICKSUM save the checksum 0412F DC40261B 5190 CALLNP MAPOUTFBI unmap FBI, ION 5191 * \ / 5192 00004130 5193 RETRY LABEL 5194 PFAILEN PFAIL enable power-fail interrupts 04130 6004413C 0 IMM 5194 LD R0 ADR PFAIL 04131 E400044F 0 5194 ST R0 POWERUPLOC 04132 59C40800 IMM 5194 IORMSR MSRPFINTE 04133 60C40085 3 IMM 5195 LD PFPTR PNWNDO4 page number of available window 04134 00D70803 4 BASE 5196 LDPF PPL,PPPMVALUE map in the page 04135 60441000 1 IMM 5197 LD R1 CPP size of page 04136 60841400 2 IMM 5198 LD R2 ADR WNDO4 address of page 04137 FE580000 5199 CFILL 0 fill it up with zeros 04138 80D2C000 3 REG 5200 PFRC PFPTR unmap the window 5201 PFAILDS disable power-fail interrupts 04139 59840800 IMM 5201 CLBMSR MSRPFINTE 0413A EC00044F 5201 STZ POWERUPLOC 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 856 (MSPROC) F 43 Mass Storage Driver - Drive Activity Section 0413B 5D1F8001 6 STAK 5202 LEAVE POP 5203 * --- 5204 0000413C 5205 PFAIL LABEL power-fail restart here 0413C 60040006 0 IMM 5206 LD R0 MDVSTPFAIL go back to controller 0413D DCD7481B 5 BASE 5207 EXPCS MDV,MDVPC 0413E FE0E4130 5208 JMP RETRY on return, try again 5209 * --- 5210 5211 END ZEROPAGE subroutine 5212 5213 5214 END Drive Activity Section 5215 5216 5217 END Mass Storage Driver 79 INPUT FBICHECK FBI validity checker 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 857 (FBICHECK) F 44 FBI checker 3 4 BLOCK FBI Checking Routines 5 6 ENTRY VOLTODISK convert volume number to disk name 7 ENTRY FBICHECK check the FBI contents 8 ENTRY FBICHKCKSM verify checksum 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 858 (FBICHECK) F 44 FBI checker 10 11 ********************************************************************************** 12 * * 13 * FBICHECK * 14 * A routine called by the page fault processor that * 15 * handles the checking and type conversion of the mass * 16 * storage block. It is passed the VP element pointer, the * 17 * PAL pointer, and the PPL. The expected and new FBI types * 18 * are retrieved from the VP element. Values of these FBI * 19 * types may be: * 20 * * 21 * old new action * 22 * 00 xx the FBI is checked to be type xx * 23 * xx yy the FBI is checked to be type xx, * 24 * then, if it was okay, * 25 * it is changed to type yy. * 26 * 00 00 no checking at all is done on the FBI * 27 * If an error does occur, the error logger is called to * 28 * record the problem and the error return is taken. * 29 * * 30 * Call: * 31 * SP = stack address * 32 * LD R3 => PAL element * 33 * LD R4 => PPL element * 34 * LD VPP => virtual page element * 35 * CALLNP FBICHECK * 36 * * 37 * * 38 * Eats R0:R1, Sets R2. * 39 * Stack required = 6 * 40 * 2 + max ( ERRORLOG/VOLTODISK (4), MAPINFBI (2), MAPOUTFBI (2) ) * 41 * * 42 ********************************************************************************** 43 44 BLOCK FBICHECK subroutine 45 ENTRY FBICHECK 46 47 BEGFRAME 00178801 6 BASE 48 SAVER3 BSS 1 guess 49 ENDFRAME 50 0413F DD5F8002 6 STAK 51 FBICHECK ENTRNP PUSH 04140 608942E2 2 5 ZBM 52 LD R2 VPP,VPFBITYPE get the virtual page types 04141 5C090212 4 ZBM 53 CMZ PPL,PPDISKERR check error bit 04142 FE0C4157 54 JNE FBIDATERR jump if prior discovered data error 04143 DC002606 55 CALL MAPINFBI get access to FBI, IOFF 04144 40530000 4 REG 56 PARVL PPL pass physical page element 04145 64884080 2 1 ZBM 57 CPR R2 R1,FBITYPE is this the type of block we have? 04146 FE02415C 58 JEQ CHECKPE jump if success 04147 FA82415C 2 59 JEQZ R2 CHECKPE jump if no checking desired 04148 600AA470 0 2 CBM 60 LD R0 R2/VPFBIOLDB get the old type expected 04149 64084080 0 1 ZBM 61 CPR R0 R1,FBITYPE is that what we have? 0414A FE024159 62 JEQ TYPECHANGE yes, type change request 0414B E4D78801 3 6 BASE 63 ST R3 SP,SAVER3 tuck this away 0414C 60C84080 3 1 ZBM 64 LD R3 R1,FBITYPE put received type in safe reg 0414D DC40261B 65 CALLNP MAPOUTFBI unmap FBI, ION 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 859 (FBICHECK) F 44 FBI checker 0414E DC005048 66 CALL ERRORLOG bad news for whoever 0414F 41441236 IMM 67 PARV ERLCBFBI indicate bad FBI 04150 DC00417D 68 CALL VOLTODISK make disk name 04151 40490081 4 ZBM 69 PARVL PPL,PPBLOCK/VOLFIELD volume number 04152 41520000 0 REG 70 PARV R0 PAK6 disk name 04153 41570801 4 BASE 71 PARV PPL,PPBLOCK MS address 04154 414942E2 5 ZBM 72 PARV VPP,VPFBITYPE expected FBI type 04155 4052C000 3 REG 73 PARVL R3 found FBI type 04156 60D78801 3 6 BASE 74 LD R3 SP,SAVER3 restore 00004157 75 DISKERROR LABEL 04157 60840871 2 IMM 76 LD R2 UINTVMFDE+VERYBAD diskerror - very bad 04158 FE0E4160 77 JMP GROUPEXIT take error exit 78 * --- 79 80 81 ********************************************************************************** 82 * * 83 * The PPL represents a page that was recovered with a * 84 * read error. * 85 * Since we have already logged the error, we don't * 86 * clutter up the log file with another entry. * 87 * * 88 ********************************************************************************** 89 00004157 90 FBIDATERR EQU DISKERROR give error return 91 * --- 92 93 ********************************************************************************** 94 * * 95 * Do the FBI type conversion and return success. * 96 * * 97 ********************************************************************************** 98 00004159 99 TYPECHANGE LABEL a type change was requested 04159 600AB270 0 2 CBM 100 LD R0 R2/VPFBINEWB get the new type 0415A E4084080 0 1 ZBM 101 ST R0 R1,FBITYPE convert the FBI type 0415B EC094272 5 ZBM 102 STZ VPP,VPFBIOLD dump old type 103 * \ / 104 0000415C 105 CHECKPE LABEL 0415C 60884611 2 1 ZBM 106 LD R2 R1,FBIMEMERR then check for parity errors 0415D FA82415F 2 107 JEQZ R2 NOMEMERR jump if page is rosy (R2=0 => no error) 0415E 60840870 2 IMM 108 LD R2 UINTVMFPE+VERYBAD parityerror - very bad 109 * \ / 110 0000415F 111 NOMEMERR LABEL 0415F DC40261B 112 CALLNP MAPOUTFBI unmap FBI, ION 113 * \ / 114 00004160 115 GROUPEXIT LABEL 04160 5D1F8002 6 STAK 116 LEAVE POP return 117 * --- 118 119 END FBICHECK subroutine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 860 (FBICHECK) F 44 FBI checker 121 122 ********************************************************************************** 123 * * 124 * Routine to calculate and verify the FBI checksum. * 125 * Call: * 126 * FBI mapped in * 127 * MDV => drive element (for logging) * 128 * PPL => PPAGE element * 129 * R1 => FBI * 130 * CALLNP FBICHKCKSM * 131 * JMP * 132 * * 133 * Eats R0:R3 * 134 * Stack required: 6 * 135 * 2 + ERRORLOG/VOLTODISK (4) * 136 * * 137 ********************************************************************************** 138 139 BLOCK FBICHKCKSM subroutine 140 ENTRY FBICHKCKSM 141 142 BEGFRAME 00178801 6 BASE 143 SAVER5 BSS 1 144 ENDFRAME 145 04161 DD5F8002 6 STAK 146 FBICHKCKSM ENTRNP PUSH 04162 6003FFC0 0 IMM 147 LD R0 FBICSMASK mask includes all FBI words 04163 F0164800 0 1 BASE 148 PRMUT R0 R1,0 calculate the FBI checksum 04164 FA2E4169 0 149 JNEMW R0 FBICKSBAD jump if checksum bad 150 * \ / 151 04165 60085181 0 1 ZBM 152 LD R0 R1,FBIDA get DA from FBI 04166 64091181 0 4 ZBM 153 CPR R0 PPL,PPBLOCK/MSBLKFIELD compare DA with block where transfer occurred 04167 FE0C4176 154 JNE BADBLKNUM jump if block number mismatch 04168 FBE0417C 7 155 IRJ R7 RETURN advance over the error return 156 * --- 157 158 * FBI checksum was found bad 00004169 159 FBICKSBAD LABEL 04169 E5578801 5 6 BASE 160 ST R5 SP,SAVER5 tuck away this reg 0416A 60D20000 3 0 REG 161 LD R3 R0 save the error bits 0416B 6156480A 5 1 BASE 162 LD R5 R1,FBICKSUM get CS from FBI 0416C DC005048 163 CALL ERRORLOG log the error 0416D 41441237 IMM 164 PARV ERLCCKFBI indicate checksum error 0416E DC00417D 165 CALL VOLTODISK make disk name 0416F 40490081 4 ZBM 166 PARVL PPL,PPBLOCK/VOLFIELD volume number 04170 41520000 0 REG 167 PARV R0 PAK6 disk name 04171 41570801 4 BASE 168 PARV PPL,PPBLOCK get the block number of the bad block 04172 4152C000 3 REG 169 PARV R3 get the difference 04173 40534000 5 REG 170 PARVL R5 and the existing checksum 04174 61578801 5 6 BASE 171 LD R5 SP,SAVER5 restore this reg 04175 FE0E417C 172 JMP RETURN error return 173 * --- 174 175 * FBI checksum was okay, but FBIDA did not match expectations 00004176 176 BADBLKNUM LABEL 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 861 (FBICHECK) F 44 FBI checker 04176 60D20000 3 0 REG 177 LD R3 R0 copy block number from FBI 04177 DC005048 178 CALL ERRORLOG log the error 04178 41440E38 IMM 179 PARV ERLCBKFBI bad block number 04179 41574805 5 BASE 180 PARV R5,MDVNAME disk name 0417A 41570801 4 BASE 181 PARV PPL,PPBLOCK pass the expected block number 0417B 4052C000 3 REG 182 PARVL R3 pass the FBIs claim 0000417C 183 RETURN LABEL 0417C 5D1F8002 6 STAK 184 LEAVE POP back to caller 185 * --- 186 187 END FBICHKCKSM subroutine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 862 (FBICHECK) F 44 FBI checker 189 190 ********************************************************************************** 191 * * 192 * VOLTODISK. Subroutine to convert a volume number to the * 193 * name of the drive on which the volume is currently mounted. * 194 * Call: * 195 * CALL VOLTODISK * 196 * PARVL * 197 * ST R0 | 0 if none * 198 * * 199 * Eats R0 * 200 * Stack usage: 1 * 201 * * 202 ********************************************************************************** 203 204 BLOCK VOLTODISK subroutine 205 ENTRY VOLTODISK 206 207 BEGFRAME 208 ENDFRAME 209 0417D DD1F8001 6 STAK 210 VOLTODISK ENTR PUSH 0417E C0520000 0 REG 211 STPVL R0 get volume number 0417F FA024183 0 212 JEQZ R0 VTDEXIT jump if none (head checker) 04180 60201F22 0 0 213 LD R0 VOLNTABLE(R0) VOLN element 04181 60081F15 0 0 ZBM 214 LD R0 R0,VOLNHCB MDV element 04182 60160805 0 0 BASE 215 LD R0 R0,MDVNAME PAK6 name 00004183 216 VTDEXIT LABEL 04183 5D1F8001 6 STAK 217 LEAVE POP return 218 * --- 219 220 END VOLTODISK subroutine 221 222 END FBI Checking Routines 80 INPUT MTDRIVER mag tape driver 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 863 (MTDRIVER) F 45 Magnetic Tape Driver 3 4 BLOCK Magnetic Tape Driver 5 6 ENTRY MTPROC Try to schedule I/O - Entry from Dispatcher 7 ENTRY MTPROCINT Tape interrupt - entry from interrupt handler 8 ENTRY MT_RESET Reset a controller - entry from INITIAL and DEADMAN 9 10 ENTRY MTDRIVE Initial address for drive routine (used by INITIAL) 11 12 13 ********************************************************************************** 14 * * 15 * MAGNETIC TAPE DATA STRUCTURES * 16 * * 17 * Each tape controller (either cartridge, 9 track, or video) * 18 * is represented by a block called an MTC element (Mag Tape * 19 * Controller). Each controller can have up to 4 tape drives * 20 * connected to it. Each drive is represented by a block * 21 * called an MTU element (Mag Tape Unit). These blocks are * 22 * created at initialization and are never destroyed. * 23 * Each tape drive can be opened by only one process * 24 * at a time. Furthermore, there can be only one request * 25 * outstanding for each drive at a time. The request is * 26 * described by a word in the MTU element. * 27 * For READ and WRITE requests, the data is read directly * 28 * into or written directly from the user's address space. * 29 * The pages are locked into core in advance, and are * 30 * described by a chain of UBS elements (User Buffer Space). * 31 * These elements are chained from the MTU element. * 32 * * 33 * LOCKS * 34 * * 35 * MTCELOCK (within each MTC element) is set to indicate * 36 * that some CPU is actively talking to a tape controller. * 37 * CPU's use PLOCK for mutual exclusion on entry to the tape * 38 * controller. * 39 * MTCBUSY (within each MTC element) is set to indicate * 40 * that the controller is doing an operation and that nobody * 41 * can talk to it. This lock is only changed while MTCELOCK * 42 * is held. * 43 * MTREQLOCK (global) is held by a user while requesting * 44 * an operation, and is held by the driver while rousting a * 45 * user. * 46 * * 47 * REQUESTS * 48 * * 49 * The protocol for requesting an operation is as follows: * 50 * - Lock MTREQLOCK. * 51 * - If requesting a DMA operation, call DIOSETUP. * 52 * - Set the request code in MTUREQUEST. * 53 * - Set MTCREQUEST bit to indicate that a request is pending. * 54 * - Set FLMTPROC in the dispatcher FLAGS. * 55 * - Suspend in DIO Wait, releasing MTCREQLOCK. * 56 * - When awakened, inspect MTUERRCODE and MTURECTYPE. * 57 * * 58 ********************************************************************************** 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 864 (MTDRIVER) F 45 Magnetic Tape Driver 60 61 ********************************************************************************** 62 * * 63 * PROGRAM STRUCTURE * 64 * * 65 * The Magnetic Tape Driver consists of two sections: the * 66 * controller-scheduling section and the drive logic section. * 67 * The controller-scheduling section is always entered first. * 68 * Its job is to route control to the code for the various * 69 * drives at the appropriate times, so that any appropriate * 70 * activity can be done to the drive. The drive logic section * 71 * contains the code that performs the actual tape requests. * 72 * * 73 * These two sections act as coroutines. Whenever the * 74 * code in the drive section reaches a critical point (for * 75 * example, wait for completion of an operation), it loads a * 76 * code into R0 and executes an "EXPCS MTU,MTUPC" instruction. * 77 * This transfers control to the scheduling section. Control * 78 * will return (again via "EXPCS MTU,MTUPC") when the * 79 * appropriate conditions are met. The drive section loads * 80 * one of the following codes into R0 before the "EXPCS": * 81 * * 82 * MTUSTRUN - Run the drive code next time the * 83 * scheduling section is entered. * 84 * This is what the drive code does * 85 * when there are no pending requests. * 86 * * 87 * MTUSTWAIT - Run the drive code after any other * 88 * drive's code that must be run. This * 89 * is what a drive does right before it * 90 * starts an operation that will tie up * 91 * the controller. (This gives other * 92 * drives an opportunity to make progress * 93 * meanwhile.) * 94 * * 95 * MTUSTBUSY - The drive has just tied up the controller. * 96 * Run its code after the next interrupt * 97 * from the controller. Until then, no * 98 * other drive on the same controller * 99 * can be run. * 100 * * 101 * When the controller-scheduling section eventually * 102 * returns to the drive section (via "EXPCS MTU,MTUPC"), R0 = * 103 * 0 if controller is alive, 1 if dead, registers R1:R2 have * 104 * been altered, but R3-R7 have been saved and restored. Note * 105 * that each drive has its own stack (as part of the MTU * 106 * element). * 107 * * 108 ********************************************************************************** 109 110 111 112 * We generate the following trace events: 113 00000001 ABS 114 MTTENTER EQU 1 Enter MTPROC, R0=PageMap, R1=MtcStat, R2=PpuStat 00000002 ABS 115 MTTINTRPT EQU 2 Interrupt, R0=PageMap, R1=MtcStat, R2=PpuStat 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 865 (MTDRIVER) F 45 Magnetic Tape Driver 00000003 ABS 116 MTTRESET EQU 3 Reset, R0=PageMap, R0=0 if cntlr is dead 00000004 ABS 117 MTTLEAVE EQU 4 Leave, R0=PageMap 00000005 ABS 118 MTTFUNC EQU 5 Tape Function, R0=Unit, R1=Address, R2=Value 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 866 (MTDRIVER) F 45 Magnetic Tape Driver - Controller Scheduler 121 122 BLOCK Controller-Scheduling Section 123 124 ENTRY MTPROC Try to schedule something 125 ENTRY MTPROCINT Process an interrupt 126 ENTRY MT_RESET Reset a controller 127 128 ENTRY NEWBYTECNT Load next byte count for transfer 129 130 ********************************************************************************** 131 * * 132 * This is the controller-scheduling section of the tape * 133 * driver. We have three main entry points: MTPROC, * 134 * MTPROCINT, and MT_RESET. * 135 * * 136 * MTPROC is entered by the dispatcher when someone has * 137 * set the MTPROC flag. This is done when someone requests a * 138 * new tape operation. MTPROC must loop through each * 139 * controller, attempting to start activity. It exits * 140 * directly to DISPATCH. * 141 * * 142 * MTPROCINT is entered by the interrupt handler when a * 143 * tape interrupt occurs. It must update tape status, then * 144 * attempt to start any new activity on the interrupting * 145 * controller. It also exits directly to DISPATCH. * 146 * * 147 * MT_RESET is called by INITIAL and DEADMAN to reset a * 148 * particular controller. It will update drive statuses, then * 149 * start any necessary activity on the drive. * 150 * * 151 * The subroutine NEWBYTECNT will load the next byte * 152 * count on a byte count rollover interrupt. This routine is * 153 * an entry because it is called by the drive activity section * 154 * of the tape driver. * 155 * * 156 ********************************************************************************** 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 867 (MTDRIVER) F 45 Magnetic Tape Driver - Controller Scheduler 158 159 ********************************************************************************** 160 * * 161 * MTPROC - Entry from dispatcher. * 162 * * 163 * We are entered here when it may be possible to start * 164 * some new I/O operations. We must scan each controller and * 165 * each device in turn to see if it is possible. * 166 * * 167 * Exits to DISPATCH. unmaps CIX. * 168 * * 169 * Eats R0:R5,R7. * 170 * Stack required = 5. * 171 * 0 + max ( DOTAPE (5), LOCKWAIT (0), PROCESSINT (4), * 172 * TRACEPROC (3) ) * 173 * * 174 ********************************************************************************** 175 176 BLOCK MTPROC routine 177 ENTRY MTPROC 178 00004184 179 MTPROC LABEL 04184 61C01F1C 7 180 LD MTC MTCLIST get pointer to the first controller 04185 FBF041AD 7 181 JZA MTC DONE jump if no tape controllers 182 * \ / 183 00004186 184 LOOP LABEL 04186 D197C805 7 BASE 185 CLRT MTC,MTCREQUEST is anything new requested here? 04187 FE0241AC 186 JEQ NEXT if not, skip this controller 187 PFAILCHK DONE jump if power failure 04188 5C00044E 187 CMZ POWERFLAG power-fail restart in progress? 04189 FE0C41AD 187 JNE DONE jump if so 187 PFAILEN DONE else allow interrupt 0418A 600441AD 0 IMM 187 LD R0 ADR DONE 0418B E400044F 0 187 ST R0 POWERUPLOC 0418C 59C40800 IMM 187 IORMSR MSRPFINTE 187 PFAILDS then disallow interrupt 0418D 59840800 IMM 187 CLBMSR MSRPFINTE 0418E EC00044F 187 STZ POWERUPLOC 188 PLOCK (MTC,MTCELOCK) lock the controller 0418F 0CC00000 188 IOFF 04190 D1D7C803 7 BASE 188 SETT (MTC,MTCELOCK) 04191 FE0C4193 188 JNE MA(2+DISPW MA 0) 04192 DC40308B 188 CALLNP LOCKWAIT 04193 5C09DF16 7 ZBM 189 CMZ MTC,MTCBUSY is the controller busy? 04194 FE0C41AA 190 JNE CONTBUSY jump if so 191 04195 60C40086 3 IMM 192 LD PFPTR PNCIX 04196 00D7C801 7 BASE 193 LDPF MTC,MTCPMVALUE map in the controller 04197 5C09C816 7 ZBM 194 CMZ MTC,MTCDEAD check for dead controller 04198 FE0C41A9 195 JNE NOINT jump if controller is presumed dead 04199 5C001800 196 CMZ CIX(PPUCABLED) check for response 0419A FE0C419D 197 JNE ALIVE jump on good response 0419B EDC9C816 7 ZBM 198 STW MTC,MTCDEAD mark controller as dead 0419C FE0E41A9 199 JMP NOINT 200 * --- 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 868 (MTDRIVER) F 45 Magnetic Tape Driver - Controller Scheduler 201 0000419D 202 ALIVE LABEL 0419D 60040008 0 IMM 203 LD R0 MTFNDSCIOF 0419E E4001A30 0 204 ST R0 CIX(MTCMFUNC) disable state-change interrupts 0419F 60801801 2 205 LD R2 CIX(PPUINTSTAT) get PPU interrupt status 041A0 6017C801 0 7 BASE 206 LD R0 MTC,MTCPMVALUE for trace 041A1 60401802 1 207 LD R1 CIX(PPUCHANS1) R1 = MTC status 208 TRACE MTTRACE,MTTENTER enter MTPROC, R0=PageMap, R1=MtcStat, R2=PpuStat 041A2 5D401D30 208 XCT TRACECALL(MTTRACE) 041A3 FEC00081 208 NOP (MTTRACE*BITS 22:26)+(MTTENTER*BITS 27:31) 209 041A4 F2A841AA 2 210 JBF R2/PPUICIA CONTBUSY jump if another CPU just got interrupt 041A5 F2B841A9 2 211 JBF R2/PPUIINTC NOINT jump if interrupt not pending 041A6 DC0041F3 212 CALL PROCESSINT process the pending interrupt 041A7 414AA100 2 CBM 213 PARV R2/BITS 16:31 PPU status 041A8 40524000 1 REG 214 PARVL R1 interrupting tape status 000041A9 215 NOINT LABEL 216 041A9 DC404212 217 CALLNP DOTAPE do any necessary tape activity 218 * \ / 219 000041AA 220 CONTBUSY LABEL 221 PUNLOCK (MTC,MTCELOCK) unlock the controller 041AA EC17C803 7 BASE 221 STZ (MTC,MTCELOCK) 041AB 0C800000 221 ION 222 * \ / 223 000041AC 224 NEXT LABEL 041AC FBF64186 7 225 LJNA MTC LOOP do next controller, if any 226 * \ / 227 000041AD 228 DONE LABEL 041AD 60C40086 3 IMM 229 LD PFPTR PNCIX 041AE 80D2C000 3 REG 230 PFRC PFPTR unmap anything left here 041AF FE0E28B7 231 JMP DISPATCH and all done 232 * --- 233 234 END MTPROC routine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 869 (MTDRIVER) F 45 Magnetic Tape Driver - Controller Scheduler 236 237 ********************************************************************************** 238 * * 239 * MTPROCINT - Entry from Interrupt Handler * 240 * * 241 * We are entered here when an I/O interrupt for a tape * 242 * occurs. On entry: * 243 * * 244 * R2 = PPU status * 245 * R3 -> MTC element * 246 * CIX is mapped to the controller * 247 * Exits to DISPATCH. Unmaps CIX. * 248 * * 249 * Stack required = 5. * 250 * 0 + max ( DOTAPE (5), LOCKWAIT (0), NEWBYTECNT (1), * 251 * PROCESSINT (4), TRACEPROC (3) ) * 252 * * 253 ********************************************************************************** 254 255 BLOCK MTPROCINT routine 256 ENTRY MTPROCINT process an I/O interrupt 257 000041B0 258 MTPROCINT LABEL 041B0 61D2C000 7 3 REG 259 LD MTC R3 pointer to the MTC element 260 PLOCK (MTC,MTCELOCK) lock the controller 041B1 0CC00000 260 IOFF 041B2 D1D7C803 7 BASE 260 SETT (MTC,MTCELOCK) 041B3 FE0C41B5 260 JNE MA(2+DISPW MA 0) 041B4 DC40308B 260 CALLNP LOCKWAIT 041B5 6017C801 0 7 BASE 261 LD R0 MTC,MTCPMVALUE for trace 041B6 60401802 1 262 LD R1 CIX(PPUCHANS1) get tape controller status 263 TRACE MTTRACE,MTTINTRPT interrupt, R0=PageMap, R1=MtcStat, R2=PpuStat 041B7 5D401D30 263 XCT TRACECALL(MTTRACE) 041B8 FEC00082 263 NOP (MTTRACE*BITS 22:26)+(MTTINTRPT*BITS 27:31) 264 041B9 5C09C816 7 ZBM 265 CMZ MTC,MTCDEAD check for dead controller 041BA FE0C41C6 266 JNE RETURN jump if controller is believed to be dead 041BB F6B841C2 2 267 JBT R2/PPUIINTC CONTINT jump if controller wants interrupt 041BC F2B641BF 2 268 JBF R2/PPUIROLL NOROLL jump if not rollover interrupt 041BD 6149DF16 5 7 ZBM 269 LD MTU MTC,MTCBUSY get MTU element for busy drive 041BE DC40425E 270 CALLNP NEWBYTECNT load next byte count 271 * \ / 272 000041BF 273 NOROLL LABEL 041BF 60040800 0 IMM 274 LD R0 1*PPUICIA 041C0 E4001802 0 275 ST R0 CIX(PPUSSSTAT) re-enable the interrupts 041C1 FE0E41C6 276 JMP RETURN and return 277 * --- 278 000041C2 279 CONTINT LABEL 041C2 DC0041F3 280 CALL PROCESSINT process the interrupt 041C3 41528000 2 REG 281 PARV R2 PPU status 041C4 40524000 1 REG 282 PARVL R1 MTC status 283 041C5 DC404212 284 CALLNP DOTAPE schedule any necessary activity 285 * \ / 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 870 (MTDRIVER) F 45 Magnetic Tape Driver - Controller Scheduler 286 000041C6 287 RETURN LABEL 041C6 60C40086 3 IMM 288 LD PFPTR PNCIX 041C7 80D2C000 3 REG 289 PFRC PFPTR unmap the controller 290 PUNLOCK (MTC,MTCELOCK) unlock the controller 041C8 EC17C803 7 BASE 290 STZ (MTC,MTCELOCK) 041C9 0C800000 290 ION 291 041CA FE0E28B7 292 JMP DISPATCH and we're all done 293 * --- 294 295 END MTPROCINT routine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 871 (MTDRIVER) F 45 Magnetic Tape Driver - Controller Scheduler 297 298 ********************************************************************************** 299 * * 300 * MT_RESET - Reset a Tape Controller * 301 * * 302 * This routine will reset and re-initialize a tape * 303 * controller. We are called at initialization, and later if * 304 * nothing has happened on the tape for a while. * 305 * * 306 * LD R5 => MTC element * 307 * PLOCK (R5,MTCELOCK) * 308 * CIX mapped to the controller * 309 * LD R0 0 if controller is dead * 310 * CALLNP MT_RESET * 311 * JMP don't log a timeout * 312 * * 313 * Eats R0:R4. * 314 * Stack required = 7. * 315 * 2 + max ( DOTAPE (5), PROCESSINT (4), TRACEPROC (3) ) * 316 * * 317 ********************************************************************************** 318 319 BLOCK MT_RESET subroutine 320 ENTRY MT_RESET 321 322 BEGFRAME 00178801 6 BASE 323 SAVER7 BSS 1 save area for R7 324 ENDFRAME 325 041CB DD5F8002 6 STAK 326 MT_RESET ENTRNP PUSH 041CC E5D78801 7 6 BASE 327 ST R7 SP,SAVER7 save this register 041CD 60520000 1 0 REG 328 LD R1 R0 R1=flag for controller alive 041CE 61D34000 7 5 REG 329 LD MTC R5 get MTC pointer 330 041CF 6017C801 0 7 BASE 331 LD R0 MTC,MTCPMVALUE for trace 332 TRACE MTTRACE,MTTRESET reset ctlr, R0=PageMap, R1=0 if cntlr dead 041D0 5D401D30 332 XCT TRACECALL(MTTRACE) 041D1 FEC00083 332 NOP (MTTRACE*BITS 22:26)+(MTTRESET*BITS 27:31) 041D2 FA4C41D6 1 333 JNEZ R1 ALIVE jump if cntlr is alive 041D3 EDC9C816 7 ZBM 334 STW MTC,MTCDEAD otherwise, mark as dead 041D4 604240C0 1 IMM 335 LD R1 1*MTSTANER+MTSTTMLOST*MTSTTMD indicate error and lost 041D5 FE0E41EC 336 JMP DOINT and process 337 * --- 338 000041D6 339 ALIVE LABEL 041D6 EC09C816 7 ZBM 340 STZ MTC,MTCDEAD mark controller as alive now 041D7 EC001801 341 STZ CIX(PPUABORT) clean up the controller 342 041D8 60040008 0 IMM 343 LD R0 MTFNDSCIOF 041D9 E4001A30 0 344 ST R0 CIX(MTCMFUNC) disable state-change interrupts 041DA D1401803 345 STMW CIX(PPUSCSTAT) clear all PPU status 346 041DB 5C09DF16 7 ZBM 347 CMZ MTC,MTCBUSY was the controller busy? 041DC FE0241DE 348 JEQ NOTBUSY jump if not 041DD D0178801 6 BASE 349 INC SP,SAVER7 else use skip return 000041DE 350 NOTBUSY LABEL 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 872 (MTDRIVER) F 45 Magnetic Tape Driver - Controller Scheduler 351 041DE 60040003 0 IMM 352 LD R0 MTCUPC-1 get count of units 000041DF 353 DRIVELOOP LABEL 041DF 615DC007 5 70 BASE 354 LD MTU MTC,MTCDRIVE(R0) get unit element pointer for next drive 041E0 FB7041E9 5 355 JZA MTU NEXTDRIVE jump if no drive here 041E1 6044000C 1 IMM 356 LD R1 MTFNDENSEL get density select function 041E2 18495A20 1 5 ZBM 357 ADD R1 MTU,MTUDENSITY select proper density function 041E3 E4601A38 1 0 358 ST R1 CIX(MTCMFUNC+MTSELECT+R0) and issue to unit 041E4 5C094021 5 ZBM 359 CMZ MTU,MTUTYPE check for type of tape (0=ct, 1=mt, 2=vt) 041E5 FE0C41E9 360 JNE NEXTDRIVE skip following for 9 track and video 041E6 60440010 1 IMM 361 LD R1 MTFNTRSEL get function for track select 041E7 18495831 1 5 ZBM 362 ADD R1 MTU,MTUTRACK make proper track select 041E8 E4601A38 1 0 363 ST R1 CIX(MTCMFUNC+MTSELECT+R0) and issue to unit 000041E9 364 NEXTDRIVE LABEL 041E9 FA2641DF 0 365 JDR R0 DRIVELOOP scan all units 041EA 60401A10 1 366 LD R1 CIX(MTLDSTAT) get current status 041EB 7C4340C0 1 IMM 367 IOR R1 1*MTSTDSC+1*MTSTANER+MTSTTMLOST*MTSTTMD indicate error and lost 368 000041EC 369 DOINT LABEL 041EC DC0041F3 370 CALL PROCESSINT process as an interrupt 041ED 41450000 IMM 371 PARV 1*PPUITOUT fake PPU status 041EE 40524000 1 REG 372 PARVL R1 fake tape status 373 041EF DC404212 374 CALLNP DOTAPE start any possible activity 375 041F0 6153C000 5 7 REG 376 LD R5 MTC restore R5 041F1 61D78801 7 6 BASE 377 LD R7 SP,SAVER7 restore return link 041F2 5D1F8002 6 STAK 378 LEAVE POP and return 379 * --- 380 381 END MT_RESET subroutine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 873 (MTDRIVER) F 45 Magnetic Tape Driver - Controller Scheduler 383 384 ********************************************************************************** 385 * * 386 * PROCESSINT - Post a Tape Interrupt * 387 * * 388 * This routine will post the interrupting status to the * 389 * drive that had the controller busy, if any. It will also * 390 * post status to all other drives if a state-change interrupt * 391 * has occurred. * 392 * * 393 * LD MTC => MTC element * 394 * CALL PROCESSINT * 395 * PARV PPU status * 396 * PARVL MTC status * 397 * * 398 * Eats R0:R5. * 399 * Stack required = 4 * 400 * * 401 ********************************************************************************** 402 403 BLOCK PROCESSINT subroutine 404 ENTRY PROCESSINT 405 406 BEGFRAME 00178801 6 BASE 407 PPUSTAT BSS 1 interrupting PPU status 00178802 6 BASE 408 TAPESTAT BSS 1 interrupting controller status 00178803 6 BASE 409 ALLSTATS BSS 1 status for all 4 drives 410 ENDFRAME 411 041F3 DD1F8004 6 STAK 412 PROCESSINT ENTR PUSH 041F4 C1578801 6 BASE 413 STPV SP,PPUSTAT interrupting PPU status 041F5 C0578802 6 BASE 414 STPVL SP,TAPESTAT interrupting tape status 041F6 E1D78800 7 6 BASE 415 EXCH R7 SP,0 get MTC pointer 416 * \ / 417 * If the bit is on for state change, we will update the drive 418 * status of all drives. 419 * \ / 041F7 60D78802 3 6 BASE 420 LD R3 SP,TAPESTAT get interrupting tape status 041F8 F2C04204 3 421 JBF R3/MTSTDSC NOCHANGE jump if no drive changed state 041F9 5C09C816 7 ZBM 422 CMZ MTC,MTCDEAD check for controller dead 041FA FE0C4204 423 JNE NOCHANGE jump if controller dead 041FB 60001A40 0 424 LD R0 CIX(MTLDDRVST) get status for all 4 drives 041FC E4178803 0 6 BASE 425 ST R0 SP,ALLSTATS save it 426 041FD 60440003 1 IMM 427 LD R1 MTCUPC-1 index through drives 041FE 38898083 2 6 ZBM 428 LEA R2 SP,ALLSTATS/BITS 0:7 R2 -> status for first drive 000041FF 429 LOOP LABEL 041FF 615DC807 5 71 BASE 430 LD MTU MTC,MTCDRIVE(R1) get MTU for a drive 04200 FB704203 5 431 JZA MTU NEXT jump if no drive here 04201 601A8C00 0 21 @R 432 LD R0 @R2(R1) get new status for this drive 04202 E409708B 0 5 ZBM 433 ST R0 MTU,MTUMTCSTAT/MTSTDRVST save it for the drive 434 * \ / 00004203 435 NEXT LABEL 04203 FA6641FF 1 436 JDR R1 LOOP loop through all drives 437 * \ / 438 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 874 (MTDRIVER) F 45 Magnetic Tape Driver - Controller Scheduler 00004204 439 NOCHANGE LABEL 440 * \ / 441 * If the controller was busy, we will save the interrupting 442 * status for the drive that was doing something. 443 * \ / 04204 6149DF16 5 7 ZBM 444 LD MTU MTC,MTCBUSY get MTU for busy device 04205 FB704210 5 445 JZA MTU NOTBUSY jump if none 04206 EC09DF16 7 ZBM 446 STZ MTC,MTCBUSY else say no longer busy 04207 60978801 2 6 BASE 447 LD R2 SP,PPUSTAT get interrupting PPU status 04208 60D78802 3 6 BASE 448 LD R3 SP,TAPESTAT get interrupting tape status 04209 E697480A 235 BASE 449 ST2 R2 MTU,MTUPPUSTAT save statuses for drive 0420A 60040000 0 IMM 450 LD R0 MTUSTRUN 0420B E4094020 0 5 ZBM 451 ST R0 MTU,MTUSTATE and set state to runnable 0420C 60095040 0 5 ZBM 452 LD R0 MTU,MTUUNIT get unit number of this guy 0420D 60161001 0 0 REG 453 LD R0 R0+1 make him last to look at 0420E 78040003 0 IMM 454 AND R0 MTUNITMASK do the MOD function 0420F E409CA36 0 7 ZBM 455 ST R0 MTC,MTCUNIT and save the number 00004210 456 NOTBUSY LABEL 457 * \ / 458 04210 E1D78800 7 6 BASE 459 EXCH R7 SP,0 restore return register 04211 5D1F8004 6 STAK 460 LEAVE POP and all done 461 * --- 462 463 END PROCESSINT subroutine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 875 (MTDRIVER) F 45 Magnetic Tape Driver - Controller Scheduler 465 466 ********************************************************************************** 467 * * 468 * DOTAPE - Tape Activity Scheduler * 469 * * 470 * This routine will inspect each drive in turn, running * 471 * each one whose state is runnable. Then it will run the * 472 * first one whose state is waiting (to start a transfer). * 473 * * 474 * LD MTC => MTC element * 475 * CALLNP DOTAPE * 476 * * 477 * Eats R0:R5. * 478 * Stack required = 5. * 479 * 2 + max ( TRACEPROC (3) ) * 480 * * 481 ********************************************************************************** 482 483 BLOCK DOTAPE subroutine 484 ENTRY DOTAPE 485 486 BEGFRAME 00178801 6 BASE 487 UNIT BSS 1 current unit number to scan 488 ENDFRAME 489 04212 DD5F8002 6 STAK 490 DOTAPE ENTRNP PUSH 04213 E1D78800 7 6 BASE 491 EXCH R7 SP,0 get MTC pointer 492 * \ / 493 00004214 494 DOTAPE1 LABEL 04214 EC09DF16 7 ZBM 495 STZ MTC,MTCBUSY say no drive wants data XFER 04215 6009CA36 0 7 ZBM 496 LD R0 MTC,MTCUNIT get starting unit number 497 * \ / 498 00004216 499 DRIVELOOP LABEL 04216 E4178801 0 6 BASE 500 ST R0 SP,UNIT save current unit number 04217 615DC007 5 70 BASE 501 LD MTU MTC,MTCDRIVE(R0) get MTU element 04218 FB704235 5 502 JZA MTU DRIVENEXT jump if none 503 PFAILCHK RETURN jump if power failure 04219 5C00044E 503 CMZ POWERFLAG power-fail restart in progress? 0421A FE0C425C 503 JNE RETURN jump if so 503 PFAILEN RETURN else allow interrupt 0421B 6004425C 0 IMM 503 LD R0 ADR RETURN 0421C E400044F 0 503 ST R0 POWERUPLOC 0421D 59C40800 IMM 503 IORMSR MSRPFINTE 503 PFAILDS then disallow interrupt 0421E 59840800 IMM 503 CLBMSR MSRPFINTE 0421F EC00044F 503 STZ POWERUPLOC 04220 60094020 0 5 ZBM 504 LD R0 MTU,MTUSTATE get drive state 04221 5CA04222 0 505 LDPC STATETAB1(R0) jump depending on state 506 * --- 507 00004222 508 STATETAB1 LABEL 04222 00004226 509 ADR RUNDRIVE 0 - runnable 04223 00004232 510 ADR CHECKTRAN 1 - wait to start data transfer 04224 00004235 511 ADR DRIVENEXT 2 - transfer in progress (can't happen) 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 876 (MTDRIVER) F 45 Magnetic Tape Driver - Controller Scheduler 04225 00004226 512 ADR RUNDRIVE 3 - interrupted by power failure 513 00004226 514 RUNDRIVE LABEL 04226 62D7480C 345 BASE 515 LD2 R3 MTU,MTUSAVER34 restore these registers 04227 6009C816 0 7 ZBM 516 LD R0 MTC,MTCDEAD get indicator for dead controller 04228 E397480E 675 BASE 517 EXCH2 R6 MTU,MTUSAVER67 save, restore these registers 04229 DCD74810 5 BASE 518 EXPCS MTU,MTUPC go to the drive code 519 * \ / 520 * Here, R0 = new state for drive. If new state is 521 * "transfer in progress", then R1 = timeout count. 522 * \ / 0422A E397480E 675 BASE 523 EXCH2 R6 MTU,MTUSAVER67 save, restore these registers 0422B E6D7480C 345 BASE 524 ST2 R3 MTU,MTUSAVER34 save these registers 0422C E4094020 0 5 ZBM 525 ST R0 MTU,MTUSTATE save new state 0422D 5CA0422E 0 526 LDPC STATETAB2(R0) jump depending on new state 527 * --- 528 0000422E 529 STATETAB2 LABEL 0422E 00004235 530 ADR DRIVENEXT 0 - runnable (next time) 0422F 00004232 531 ADR CHECKTRAN 1 - wait to start data transfer 04230 0000424B 532 ADR CONTBUSY 2 - transfer in progress 04231 0000425C 533 ADR RETURN 3 - interrupted by power failure 534 535 * Here, a drive wants to start a transfer. Remember it. 536 00004232 537 CHECKTRAN LABEL 04232 5C09DF16 7 ZBM 538 CMZ MTC,MTCBUSY is one already set up? 04233 FE0C4235 539 JNE DRIVENEXT if so, skip this one 04234 E549DF16 5 7 ZBM 540 ST MTU MTC,MTCBUSY else remember this one 541 * \ / 542 00004235 543 DRIVENEXT LABEL 04235 BC178801 0 6 BASE 544 INCL R0 SP,UNIT try the next unit 04236 78040003 0 IMM 545 AND R0 MTUNITMASK mask for wrap-around 04237 6409CA36 0 7 ZBM 546 CPR R0 MTC,MTCUNIT back to start? 04238 FE0C4216 547 JNE DRIVELOOP if not, scan another drive 548 * \ / 549 550 * If someone wanted to start a data transfer, do so. 551 * \ / 552 04239 6149DF16 5 7 ZBM 553 LD MTU MTC,MTCBUSY get MTU for guy to start 0423A FB704251 5 554 JZA MTU NOBUSY jump if nobody to start 555 PFAILCHK RETURN jump if power failure 0423B 5C00044E 555 CMZ POWERFLAG power-fail restart in progress? 0423C FE0C425C 555 JNE RETURN jump if so 555 PFAILEN RETURN else allow interrupt 0423D 6004425C 0 IMM 555 LD R0 ADR RETURN 0423E E400044F 0 555 ST R0 POWERUPLOC 0423F 59C40800 IMM 555 IORMSR MSRPFINTE 555 PFAILDS then disallow interrupt 04240 59840800 IMM 555 CLBMSR MSRPFINTE 04241 EC00044F 555 STZ POWERUPLOC 04242 62D7480C 345 BASE 556 LD2 R3 MTU,MTUSAVER34 restore these registers 04243 6009C816 0 7 ZBM 557 LD R0 MTC,MTCDEAD get indicator for dead controller 04244 E397480E 675 BASE 558 EXCH2 R6 MTU,MTUSAVER67 save, restore these registers 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 877 (MTDRIVER) F 45 Magnetic Tape Driver - Controller Scheduler 04245 DCD74810 5 BASE 559 EXPCS MTU,MTUPC go run the drive 560 * \ / 561 * Here, R0 is the drive's new state. Normally it will be 562 * MTUSTBUSY (data transfer in progress), but in strange 563 * cases it could be something else. If so, we must re-scan 564 * the whole controller, because someone else may have wanted 565 * to start an operation. 566 * \ / 04246 E397480E 675 BASE 567 EXCH2 R6 MTU,MTUSAVER67 save, restore these registers 04247 E6D7480C 345 BASE 568 ST2 R3 MTU,MTUSAVER34 save these registers 04248 E4094020 0 5 ZBM 569 ST R0 MTU,MTUSTATE save new state 04249 64040002 0 IMM 570 CPR R0 MTUSTBUSY did he make controller busy? 0424A FE0C4214 571 JNE DOTAPE1 jump if not (back to the top) 572 * \ / 573 0000424B 574 CONTBUSY LABEL 0424B E457C804 1 7 BASE 575 ST R1 MTC,MTCTIMEOUT time-out counter 0424C 5C09C816 7 ZBM 576 CMZ MTC,MTCDEAD check for dead controller 0424D FE0C4259 577 JNE DONE jump if dead 0424E 60040800 0 IMM 578 LD R0 1*PPUICIA 0424F E4001802 0 579 ST R0 CIX(PPUSSSTAT) allow interrupts from controller 04250 FE0E4259 580 JMP DONE and all done 581 * --- 582 00004251 583 NOBUSY LABEL nothing to make controller busy 04251 60040008 0 IMM 584 LD R0 8 allow extra time before checking again 04252 E417C804 0 7 BASE 585 ST R0 MTC,MTCTIMEOUT set time out counter 04253 5C09C816 7 ZBM 586 CMZ MTC,MTCDEAD check for dead controller 04254 FE0C4259 587 JNE DONE jump if controller dead 04255 60040009 0 IMM 588 LD R0 MTFNDSCION 04256 E4001A30 0 589 ST R0 CIX(MTCMFUNC) allow interrupts on state change 04257 60040800 0 IMM 590 LD R0 1*PPUICIA 04258 E4001802 0 591 ST R0 CIX(PPUSSSTAT) allow interrupts from controller 592 * \ / 593 00004259 594 DONE LABEL 04259 6017C801 0 7 BASE 595 LD R0 MTC,MTCPMVALUE for trace 596 TRACE MTTRACE,MTTLEAVE leaving MSPROC, R0=PageMap 0425A 5D401D30 596 XCT TRACECALL(MTTRACE) 0425B FEC00084 596 NOP (MTTRACE*BITS 22:26)+(MTTLEAVE*BITS 27:31) 597 * \ / 598 0000425C 599 RETURN LABEL 0425C E1D78800 7 6 BASE 600 EXCH R7 SP,0 restore R7 0425D 5D1F8002 6 STAK 601 LEAVE POP and return 602 * --- 603 604 END DOTAPE subroutine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 878 (MTDRIVER) F 45 Magnetic Tape Driver - Controller Scheduler 606 607 ********************************************************************************** 608 * * 609 * NEWBYTECNT - Load next byte count for data transfer. * 610 * * 611 * This subroutine will load the byte count and address * 612 * registers for the next page of a read or write transfer. * 613 * Field MTUNUBS contains the address of the UBS block that * 614 * describes the next fragment of the transfer. If there are * 615 * even more byte counts to follow, we will enable byte-count * 616 * rollover interrupts from the PPU. * 617 * * 618 * LD MTU => MTU element * 619 * CIX mapped to device * 620 * CALLNP NEWBYTECNT * 621 * * 622 * Eats R0:R1. * 623 * Stack required = 1. * 624 * * 625 ********************************************************************************** 626 627 BLOCK NEWBYTECNT subroutine 628 ENTRY NEWBYTECNT 629 630 BEGFRAME 631 ENDFRAME 632 0425E DD5F8001 6 STAK 633 NEWBYTECNT ENTRNP PUSH 0425F 60574809 1 5 BASE 634 LD R1 MTU,MTUNUBS get pointer to next UBS block 04260 FA70426A 1 635 JZA R1 RETURN jump if no next byte count 636 04261 60164801 0 1 BASE 637 LD R0 R1,UBSMAW get the memory address word 04262 E4001807 0 638 ST R0 CIX(PPUADDR2) place into the PPU 04263 60164802 0 1 BASE 639 LD R0 R1,UBSBCW get the byte count word 04264 E4001806 0 640 ST R0 CIX(PPUCNT2) place into the PPU 04265 60085F10 0 1 ZBM 641 LD R0 R1,UBSLINK get link to next UBS 04266 E4174809 0 5 BASE 642 ST R0 MTU,MTUNUBS update pointer to next one 04267 FA30426A 0 643 JZA R0 RETURN jump if no more to follow 04268 60041200 0 IMM 644 LD R0 1*PPUIINTR+1*PPUIPIA 04269 E4001802 0 645 ST R0 CIX(PPUSSSTAT) enable rollover interrupts 646 * \ / 647 0000426A 648 RETURN LABEL 0426A 5D1F8001 6 STAK 649 LEAVE POP and all done 650 * --- 651 652 END NEWBYTECNT subroutine 653 654 655 END Controller-Scheduling Section 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 879 (MTDRIVER) F 45 Magnetic Tape Driver - Drive Activity Section 658 659 BLOCK Drive Activity Section 660 661 ENTRY MTDRIVE Initial Entry Point 662 663 ********************************************************************************** 664 * * 665 * This is the drive activity section of the tape driver. * 666 * In this section we actually handle all requests for tape * 667 * I/O. When necessary, we call the controller-scheduling * 668 * section as a coroutine via "EXPCS MTU,MTUPC". * 669 * * 670 * The initial entry point for the drive section is * 671 * MTDRIVE. During initialization, the value in MTUPC for each * 672 * drive is set to the address of MTDRIVE. Thereafter, the * 673 * drive coroutine stays in its loop forever. * 674 * * 675 ********************************************************************************** 676 677 0000426B 678 TAPEERRMAX LABEL max number of retries on an error 0426B 0000000C 679 VFD 12 retries for CT 0426C 0000000C 680 VFD 12 retries for MT 0426D 00000000 681 VFD 0 retries for VT 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 880 (MTDRIVER) F 45 Magnetic Tape Driver - Drive Activity Section 683 684 ********************************************************************************** 685 * * 686 * MTDRIVE - Drive Activity Process * 687 * * 688 * This is the entry point and main loop for the drive * 689 * activity process. We set up the stack, then process * 690 * requests one at a time. * 691 * * 692 * On entry, MTU -> our MTU element. No other registers * 693 * defined. We alter R0:R4,R6:R7. Since we never return, this * 694 * doesn't matter. * 695 * * 696 * Stack required = 9. We use MTUSTACK, maximum stack size = 15. * 697 * 0 + max ( DOBKSP ( 7), DOCYCLE ( 7), DOFWSP ( 7), * 698 * DOGAP ( 4), DOREAD ( 9), DOSEFB ( 9), * 699 * DOSEFF ( 9), DOSETPARM ( 7), DOWFM ( 9), * 700 * DOWRITE ( 9), LOCKWAIT ( 0), REWNOWAIT ( 8), * 701 * TAPENOTRDY ( 8), WAKEUPUSER( 5) ) * 702 * * 703 ********************************************************************************** 704 705 BLOCK MTDRIVE routine 706 ENTRY MTDRIVE 707 0000426E 708 MTDRIVE LABEL 0426E 39974820 6 5 BASE 709 LEA SP MTU,MTUSTACK initialize our stack pointer 710 * \ / 711 0000426F 712 OFFLINE LABEL 0426F DC404433 713 CALLNP TAPENOTRDY wait for tape to become ready 714 * \ / 715 00004270 716 LOOP LABEL 717 PLOCK MTREQLOCK lock to get request 04270 0CC00000 717 IOFF 04271 D1C01F20 717 SETT MTREQLOCK 04272 FE0C4274 717 JNE MA(2+DISPW MA 0) 04273 DC40308B 717 CALLNP LOCKWAIT 04274 60574008 1 5 CACH 718 LD R1 MTU,MTUREQUEST get the request code 04275 EC174008 5 CACH 719 STZ MTU,MTUREQUEST say we got it 720 PUNLOCK MTREQLOCK unlock the request lock 04276 EC001F20 720 STZ MTREQLOCK 04277 0C800000 720 ION 04278 FA42427E 1 721 JEQZ R1 NOREQUEST jump if none 04279 60224283 0 1 722 LD R0 ROUTINE(R1) get address of routine to execute 0427A DC560400 0 @R 723 CALLNP @R0 do the request 0427B FA2C4280 0 724 JEQMW R0 TRYAGAIN jump if no wakeup wanted 0427C DC40445D 725 CALLNP WAKEUPUSER and wake up the requester 0427D FE0E4280 726 JMP TRYAGAIN and go try again 727 * --- 728 0000427E 729 NOREQUEST LABEL 0427E 60040000 0 IMM 730 LD R0 MTUSTRUN new state: runnable (next time) 0427F DCD74810 5 BASE 731 EXPCS MTU,MTUPC and go back to controller scheduler 732 * \ / 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 881 (MTDRIVER) F 45 Magnetic Tape Driver - Drive Activity Section 733 00004280 734 TRYAGAIN LABEL 04280 6017480B 0 5 BASE 735 LD R0 MTU,MTUMTCSTAT get current status 04281 F6344270 0 736 JBT R0/MTDSTRDY LOOP jump if tape is ready 04282 FE0E426F 737 JMP OFFLINE else do the offline stuff again 738 * --- 739 00004283 740 ROUTINE LABEL request codes 04283 00000000 741 VFD 0 00 - never used 04284 00004406 742 ADR REWNOWAIT 01 - rewind tape 04285 00004367 743 ADR DOSEFF 02 - skip file forward 04286 00004350 744 ADR DOSEFB 03 - skip file backward 04287 000042B5 745 ADR DOFWSP 04 - forward space record 04288 0000428F 746 ADR DOBKSP 05 - back space record 04289 000042EC 747 ADR DOREAD 06 - read record 0428A 000043B2 748 ADR DOWRITE 07 - write record 0428B 00004398 749 ADR DOWFM 08 - write filemark 0428C 000042C6 750 ADR DOGAP 09 - write gap 0428D 0000437D 751 ADR DOSETPARM 10 - select track and density 0428E 000042A1 752 ADR DOCYCLE 11 - cycle cartridge tape 753 754 END MTDRIVE routine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 882 (MTDRIVER) F 45 Magnetic Tape Driver - Drive Activity Section 756 757 ********************************************************************************** 758 * * 759 * DOBKSP - Back Space One Record * 760 * * 761 * LD MTU => MTU element * 762 * CALLNP DOBKSP * 763 * ST R0 error code (0 if ok) * 764 * * 765 * Eats R0:R4. * 766 * Stack required = 7 * 767 * 1 + TAPEFUNC (6). * 768 * * 769 ********************************************************************************** 770 771 BLOCK DOBKSP subroutine 772 ENTRY DOBKSP 773 774 BEGFRAME 775 ENDFRAME 776 0428F DD5F8001 6 STAK 777 DOBKSP ENTRNP PUSH 04290 60494021 1 5 ZBM 778 LD R1 MTU,MTUTYPE R1 = 0 if CT, 1 if MT, 2 if video 04291 6122426B 4 1 779 LD R4 TAPEERRMAX(R1) retry count 00004292 780 LOOP LABEL 04292 DC00440C 781 CALL TAPEFUNC request a backspace 04293 41440006 IMM 782 PARV MTFNBKSP operation code 04294 60494021 1 5 ZBM 783 LD R1 MTU,MTUTYPE R1 = 0 if CT, 1 if MT, 2 if video 04295 4062429E 1 784 PARVL TIMEOUT(R1) timeout value 04296 FA0C429B 0 785 JNEZ R0 RETURN jump if error 04297 F652429B 1 786 JBT R1/MTSTTMBKB RETURN jump if tape moved backward 04298 F676429B 1 787 JBT R1/MTDSTBOT RETURN jump if at load point 04299 FB224292 4 788 DRJ R4 LOOP else try again (several times) 789 * \ / fall through when retries exhausted 790 0429A 60040089 0 IMM 791 LD R0 XREQERFAU error: abnormal/unavailable 792 * \ / 793 0000429B 794 RETURN LABEL 0429B 6049501B 1 5 ZBM 795 LD R1 MTU,MTUMTCSTAT/MTSTEOF 0429C E4495810 1 5 ZBM 796 ST R1 MTU,MTUEOF 0429D 5D1F8001 6 STAK 797 LEAVE POP return to caller 798 * --- 799 042A0 00000100 800 TIMEOUT VFD 2,1,256 backspace timeouts for CT, MT, VT 801 802 END DOBKSP subroutine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 883 (MTDRIVER) F 45 Magnetic Tape Driver - Drive Activity Section 804 805 ********************************************************************************** 806 * * 807 * DOCYCLE - Cycle a cartridge tape * 808 * * 809 * LD MTU => MTU element * 810 * CALLNP DOCYCLE * 811 * ST R0 error code (0 if ok) * 812 * * 813 * Eats R0:R4. * 814 * Stack required = 7 * 815 * 1 + TAPEFUNC (6). * 816 * * 817 ********************************************************************************** 818 819 BLOCK DOCYCLE subroutine 820 ENTRY DOCYCLE 821 822 BEGFRAME 823 ENDFRAME 824 042A1 DD5F8001 6 STAK 825 DOCYCLE ENTRNP PUSH 042A2 60094021 0 5 ZBM 826 LD R0 MTU,MTUTYPE get tape type 042A3 FA0C42AE 0 827 JNEZ R0 DOCYCILOP illegal operation if MT or video 042A4 6120426B 4 0 828 LD R4 TAPEERRMAX(R0) retry counter 829 * \ / 000042A5 830 LOOP LABEL 042A5 DC00440C 831 CALL TAPEFUNC request tape to cycle 042A6 41440001 IMM 832 PARV MTFNCYCLE operation code 042A7 404042B4 833 PARVL TIMEOUT timeout value 042A8 FA0C42B3 0 834 JNEZ R0 RETURN jump if error 042A9 F27442B0 1 835 JBF R1/MTDSTRDY OFFLINE jump if drive went offline 042AA F67642B2 1 836 JBT R1/MTDSTBOT OKSTAT jump if at load point 042AB FB2642A5 4 837 JDR R4 LOOP fall through when retries exhausted 838 * \ / 839 042AC 60040089 0 IMM 840 LD R0 XREQERFAU error: abnormal/unavailable 042AD FE0E42B3 841 JMP RETURN inform caller 842 * --- 843 000042AE 844 DOCYCILOP LABEL 042AE 60040091 0 IMM 845 LD R0 XREQERILOP error: illegal operation on device 042AF FE0E42B3 846 JMP RETURN return to caller 847 * --- 848 000042B0 849 OFFLINE LABEL 042B0 600400AE 0 IMM 850 LD R0 XREQERDNR error: device not ready 042B1 FE0E42B3 851 JMP RETURN return to caller 852 * --- 853 000042B2 854 OKSTAT LABEL 042B2 EC120000 0 REG 855 STZ R0 indicate all went well 856 * \ / 857 000042B3 858 RETURN LABEL 042B3 5D1F8001 6 STAK 859 LEAVE POP exit this mess 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 884 (MTDRIVER) F 45 Magnetic Tape Driver - Drive Activity Section 860 * --- 861 042B4 00000042 862 TIMEOUT VFD 042 7 minutes max 863 864 END DOCYCLE subroutine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 885 (MTDRIVER) F 45 Magnetic Tape Driver - Drive Activity Section 866 867 ********************************************************************************** 868 * * 869 * DOFWSP - Forward Space One Record * 870 * * 871 * LD MTU => MTU element * 872 * CALLNP DOFWSP * 873 * ST R0 error code (0 if OK) * 874 * * 875 * Eats R0:R4. * 876 * Stack required = 7 * 877 * 1 + TAPEFUNC (6). * 878 * * 879 ********************************************************************************** 880 881 BLOCK DOFWSP subroutine 882 ENTRY DOFWSP 883 884 BEGFRAME 885 ENDFRAME 886 042B5 DD5F8001 6 STAK 887 DOFWSP ENTRNP PUSH 042B6 60494021 1 5 ZBM 888 LD R1 MTU,MTUTYPE R1 = 0 if CT, 1 if MT, 2 if video 042B7 6122426B 4 1 889 LD R4 TAPEERRMAX(R1) retry counter 890 * \ / 000042B8 891 LOOP LABEL 042B8 DC00440C 892 CALL TAPEFUNC request a forward space 042B9 41440007 IMM 893 PARV MTFNFWSP operation code 042BA 60494021 1 5 ZBM 894 LD R1 MTU,MTUTYPE R1 = 0 if CT, 1 if MT, 2 if video 042BB 406242C3 1 895 PARVL TIMEOUT(R1) timeout value 042BC FA0C42C0 0 896 JNEZ R0 RETURN jump if error 042BD F65442C0 1 897 JBT R1/MTSTTMFWB RETURN jump if tape moved forward 042BE FB2642B8 4 898 JDR R4 LOOP else try again (several times) 899 * \ / fall through when retries exhausted 900 042BF 60040089 0 IMM 901 LD R0 XREQERFAU error: abnormal/unavailable 902 * \ / 903 000042C0 904 RETURN LABEL 042C0 6049501B 1 5 ZBM 905 LD R1 MTU,MTUMTCSTAT/MTSTEOF 042C1 E4495810 1 5 ZBM 906 ST R1 MTU,MTUEOF 042C2 5D1F8001 6 STAK 907 LEAVE POP return to caller 908 * --- 909 042C5 0000000C 910 TIMEOUT VFD 2,1,12 forward space timeouts for CT, MT, VT 911 912 END DOFWSP subroutine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 886 (MTDRIVER) F 45 Magnetic Tape Driver - Drive Activity Section 914 915 ********************************************************************************** 916 * * 917 * DOGAP - Erase a Gap * 918 * * 919 * LD MTU => MTU element * 920 * CALLNP DOGAP * 921 * ST R0 error code (0 if OK) * 922 * * 923 * Eats R0:R4. * 924 * Stack required = 4 * 925 * 1 + max ( ERRORLOG (3), TRACEPROC (3) ) * 926 * * 927 ********************************************************************************** 928 929 BLOCK DOGAP subroutine 930 ENTRY DOGAP 931 932 BEGFRAME 933 ENDFRAME 934 042C6 DD5F8001 6 STAK 935 DOGAP ENTRNP PUSH 042C7 60094021 0 5 ZBM 936 LD R0 MTU,MTUTYPE R0 = 0 if CT, 1 if MT, 2 if video 042C8 6120426B 4 0 937 LD R4 TAPEERRMAX(R0) retry counter 000042C9 938 LOOP LABEL 042C9 60040001 0 IMM 939 LD R0 MTUSTWAIT new state: wait our turn 042CA DCD74810 5 BASE 940 EXPCS MTU,MTUPC go back to controller scheduler 042CB FA0C42E3 0 941 JNEZ R0 ERROR jump if controller is dead 042CC 60095040 0 5 ZBM 942 LD R0 MTU,MTUUNIT get our unit number 042CD 60440260 1 IMM 943 LD R1 MTCMERASE operation code (for trace) 042CE 60840003 2 IMM 944 LD R2 3 parameter (number of inches) 945 TRACE MTTRACE,MTTFUNC function: R0=Unit, R1=Address, R2=Parm 042CF 5D401D30 945 XCT TRACECALL(MTTRACE) 042D0 FEC00085 945 NOP (MTTRACE*BITS 22:26)+(MTTFUNC*BITS 27:31) 946 * \ / 042D1 E4A01AE8 2 0 947 ST R2 CIX(MTCMERASE+MTINTREQ+MTSELECT+R0) start the erase gap 042D2 60040002 0 IMM 948 LD R0 MTUSTBUSY new state: busy with transfer 042D3 60440001 1 IMM 949 LD R1 1 timeout counter 042D4 DCD74810 5 BASE 950 EXPCS MTU,MTUPC go back to controller scheduler 951 * \ / 042D5 6057480B 1 5 BASE 952 LD R1 MTU,MTUMTCSTAT get new tape status 042D6 784042EB 1 953 AND R1 STATMASK mask off all but error bits 042D7 FA4242DE 1 954 JEQZ R1 NOERROR jump if no error 042D8 DC005048 955 CALL ERRORLOG else log the error 042D9 4144122F IMM 956 PARV ERLCMTCERR mag tape error 042DA 41574804 5 BASE 957 PARV MTU,MTUNAME tape drive name 042DB 41440260 IMM 958 PARV MTCMERASE operation 042DC 4157480B 5 BASE 959 PARV MTU,MTUMTCSTAT tape status 042DD 4057480A 5 BASE 960 PARVL MTU,MTUPPUSTAT PPU status 961 * \ / 000042DE 962 NOERROR LABEL 042DE 6057480B 1 5 BASE 963 LD R1 MTU,MTUMTCSTAT get the status again 042DF F24442E9 1 964 JBF R1/MTSTANER OKSTAT jump if operation was OK 042E0 F27442E7 1 965 JBF R1/MTDSTRDY OFFLINE jump if drive went offline 042E1 F67842E5 1 966 JBT R1/MTDSTWPRT PROTECTED jump if drive is write-protected 042E2 FB2642C9 4 967 JDR R4 LOOP else retry as many times as allowed 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 887 (MTDRIVER) F 45 Magnetic Tape Driver - Drive Activity Section 968 * \ / 000042E3 969 ERROR LABEL 042E3 60040089 0 IMM 970 LD R0 XREQERFAU then error: abnormal/unavailable 042E4 FE0E42EA 971 JMP RETURN and return 972 * --- 973 000042E5 974 PROTECTED LABEL 042E5 60040084 0 IMM 975 LD R0 XREQERPFM error: protected from modification 042E6 FE0E42EA 976 JMP RETURN 977 * --- 978 000042E7 979 OFFLINE LABEL 042E7 600400AE 0 IMM 980 LD R0 XREQERDNR error: drive not ready 042E8 FE0E42EA 981 JMP RETURN 982 * --- 983 000042E9 984 OKSTAT LABEL 042E9 60040000 0 IMM 985 LD R0 0 no error 986 * \ / 987 000042EA 988 RETURN LABEL 042EA 5D1F8001 6 STAK 989 LEAVE POP return to caller 990 * --- 991 042EB 201F0000 992 STATMASK VFD 1*MTSTANER+ONEBITS/MTSTERSTAT*MTSTERSTAT 993 994 END DOGAP subroutine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 888 (MTDRIVER) F 45 Magnetic Tape Driver - Drive Activity Section 996 997 ********************************************************************************** 998 * * 999 * DOREAD - Read a Record from the Tape * 1000 * * 1001 * This routine assumes that MTUUBS points to the chain * 1002 * of UBS elements describing the user's buffer. It will set * 1003 * MTURECLEN to the length of the record read, and MTUEOF to * 1004 * indicate whether a tape mark was read. * 1005 * * 1006 * LD MTU => MTU element * 1007 * CALLNP DOREAD * 1008 * ST R0 error code (0 if OK) * 1009 * * 1010 * Eats R0:R4. * 1011 * Stack required = 9. * 1012 * 2 + max ( DOBKSP (7), ERRORLOG (3), PADEXT (2), * 1013 * TRACEPROC (3) ) * 1014 * * 1015 ********************************************************************************** 1016 1017 BLOCK DOREAD subroutine 1018 ENTRY DOREAD 1019 1020 BEGFRAME 00178801 6 BASE 1021 RETRYCOUNT BSS 1 retry counter 1022 ENDFRAME 1023 042EC DD5F8002 6 STAK 1024 DOREAD ENTRNP PUSH 042ED 60094021 0 5 ZBM 1025 LD R0 MTU,MTUTYPE R0 = 0 if CT, 1 if MT, 2 if video 042EE 6020426B 0 0 1026 LD R0 TAPEERRMAX(R0) retry count 042EF E4178801 0 6 BASE 1027 ST R0 SP,RETRYCOUNT initialize retry counter 1028 * \ / 000042F0 1029 LOOP LABEL 042F0 60040001 0 IMM 1030 LD R0 MTUSTWAIT new state: wait for our turn 042F1 DCD74810 5 BASE 1031 EXPCS MTU,MTUPC go back to controller scheduler 042F2 FA0C431F 0 1032 JNEZ R0 ERROR jump if controller is dead 1033 * \ / 042F3 60040001 0 IMM 1034 LD R0 1*PPUIDMAD 042F4 E4001803 0 1035 ST R0 CIX(PPUSCSTAT) set DMA to input 042F5 DC4043F5 1036 CALLNP PADEXT set up DMA registers 1037 * \ / 042F6 60095040 0 5 ZBM 1038 LD R0 MTU,MTUUNIT our unit number 042F7 60440240 1 IMM 1039 LD R1 MTCMREAD for trace 042F8 60974807 2 5 BASE 1040 LD R2 MTU,MTUREQLEN get requested read length 1041 TRACE MTTRACE,MTTFUNC function, R0=Unit, R1=Address, R2=Data 042F9 5D401D30 1041 XCT TRACECALL(MTTRACE) 042FA FEC00085 1041 NOP (MTTRACE*BITS 22:26)+(MTTFUNC*BITS 27:31) 1042 * \ / 042FB E4A01AC8 2 0 1043 ST R2 CIX(MTCMREAD+MTINTREQ+MTSELECT+R0) start the read 1044 * \ / 042FC 60094021 0 5 ZBM 1045 LD R0 MTU,MTUTYPE R0 = 0 if CT, 1 if MT, 2 if VT 042FD 60604327 1 0 1046 LD R1 TIMEOUT(R0) timeout value 042FE 60040002 0 IMM 1047 LD R0 MTUSTBUSY new state: busy with transfer 042FF DCD74810 5 BASE 1048 EXPCS MTU,MTUPC go back to controller scheduler 1049 * \ / 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 889 (MTDRIVER) F 45 Magnetic Tape Driver - Drive Activity Section 04300 FA0C431F 0 1050 JNEZ R0 ERROR jump if controller is dead 04301 60001803 0 1051 LD R0 CIX(PPUCHANS2) R0 = length actually read 04302 E4174806 0 5 BASE 1052 ST R0 MTU,MTURECLEN save it 1053 * \ / 04303 6009501B 0 5 ZBM 1054 LD R0 MTU,MTUMTCSTAT/MTSTEOF R0 = eof flag 04304 E4095810 0 5 ZBM 1055 ST R0 MTU,MTUEOF save it 04305 FA024307 0 1056 JEQZ R0 NOTEOF jump if not an EOF 04306 EC174806 5 BASE 1057 STZ MTU,MTURECLEN if EOF, set record length to zero 1058 * \ / 00004307 1059 NOTEOF LABEL 04307 6217480A 015 BASE 1060 LD2 R0 MTU,MTUPPUSTAT get PPU and tape status 04308 7A00432A 01 1061 AND2 R0 STATMASK look at error bits 04309 FA124325 01 1062 JEQZ2 R0 OKSTAT jump if no errors 0430A DC005048 1063 CALL ERRORLOG else log the error 0430B 4144122F IMM 1064 PARV ERLCMTCERR tape error 0430C 41574804 5 BASE 1065 PARV MTU,MTUNAME drive name 0430D 41440240 IMM 1066 PARV MTCMREAD operation 0430E 4157480B 5 BASE 1067 PARV MTU,MTUMTCSTAT tape status 0430F 4057480A 5 BASE 1068 PARVL MTU,MTUPPUSTAT PPU status 1069 * \ / 04310 6217480A 015 BASE 1070 LD2 R0 MTU,MTUPPUSTAT get PPU and tape status 04311 7800432A 0 1071 AND R0 STATMASK mask the PPU status 04312 FA0C4314 0 1072 JNEZ R0 NOTGOOD jump if PPU is unhappy 04313 F2444325 1 1073 JBF R1/MTSTANER OKSTAT jump if tape recovered from error 1074 * \ / 00004314 1075 NOTGOOD LABEL 04314 EC001801 1076 STZ CIX(PPUABORT) make the PPU happy 04315 F2744323 1 1077 JBF R1/MTDSTRDY OFFLINE jump if drive not ready 04316 D0578801 6 BASE 1078 DEC SP,RETRYCOUNT tried one more time 04317 FE084321 1079 JLT READERROR jump if error is permanent 04318 600A5220 0 1 CBM 1080 LD R0 R1/MTSTTMD get tape motion bits 04319 FA0242F0 0 1081 JEQZ R0 LOOP just retry if the tape didn't move 0431A 64040001 0 IMM 1082 CPR R0 MTSTTMFW did the tape move forward? 0431B FE0C431F 1083 JNE ERROR if not, can't recover 0431C DC40428F 1084 CALLNP DOBKSP else backspace the tape 0431D FA0C4326 0 1085 JNEZ R0 RETURN jump if can't backspace 0431E FE0E42F0 1086 JMP LOOP then try the read again 1087 * --- 1088 0000431F 1089 ERROR LABEL 0431F 60040089 0 IMM 1090 LD R0 XREQERFAU error: abnormal/unavailable 04320 FE0E4326 1091 JMP RETURN 1092 * --- 1093 00004321 1094 READERROR LABEL 04321 600400E3 0 IMM 1095 LD R0 DEVERTRE error: tape read error 04322 FE0E4326 1096 JMP RETURN 1097 * --- 1098 00004323 1099 OFFLINE LABEL 04323 600400AE 0 IMM 1100 LD R0 XREQERDNR error: drive not ready 04324 FE0E4326 1101 JMP RETURN 1102 * --- 1103 00004325 1104 OKSTAT LABEL 04325 60040000 0 IMM 1105 LD R0 0 no error 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 890 (MTDRIVER) F 45 Magnetic Tape Driver - Drive Activity Section 1106 * \ / 1107 00004326 1108 RETURN LABEL 04326 5D1F8002 6 STAK 1109 LEAVE POP return to caller 1110 * --- 1111 04329 00000009 1112 TIMEOUT VFD 3,3,9 read timeouts for CT, MT, VT 1113 0000432A 1114 STATMASK LABEL 0432A 00012540 1115 VFD 1*PPUITOUT+1*PPUIBCNR+1*PPUIMPE+1*PPUICONF+1*PPUIDPPE 0432B 201F0000 1116 VFD 1*MTSTANER+ONEBITS/MTSTERSTAT*MTSTERSTAT 1117 1118 END DOREAD subroutine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 891 (MTDRIVER) F 45 Magnetic Tape Driver - Drive Activity Section 1120 1121 ********************************************************************************** 1122 * * 1123 * DOREWIND - Rewind the Tape * 1124 * * 1125 * LD MTU => MTU element * 1126 * CALLNP DOREWIND * 1127 * ST R0 error code (0 if OK) * 1128 * * 1129 * Eats R0:R4. * 1130 * Stack required = 7 * 1131 * 1 + max ( TAPEFUNC (6), TRACEPROC (3) ) * 1132 * * 1133 ********************************************************************************** 1134 1135 BLOCK DOREWIND subroutine 1136 ENTRY DOREWIND 1137 1138 BEGFRAME 1139 ENDFRAME 1140 0432C DD5F8001 6 STAK 1141 DOREWIND ENTRNP PUSH 0432D EC095810 5 ZBM 1142 STZ MTU,MTUEOF no EOF yet 0432E 60C94021 3 5 ZBM 1143 LD R3 MTU,MTUTYPE R3 = 0 if CT, 1 if MT, 2 if VT 0432F 6126426B 4 3 1144 LD R4 TAPEERRMAX(R3) retry counter 1145 * \ / 00004330 1146 LOOP LABEL 04330 60095F11 0 5 ZBM 1147 LD R0 MTU,MTUCNTL get pointer to MTC element 04331 5C080816 0 ZBM 1148 CMZ R0,MTCDEAD check for dead controller 04332 FE0C4347 1149 JNE ERROR jump if controller dead 04333 F2FE4341 3 1150 JBF R3/BIT 31 REWINDCT jump if not MT 1151 * \ / 1152 * Rewind a MT, this does not tie up the controller. 1153 * \ / 04334 60095040 0 5 ZBM 1154 LD R0 MTU,MTUUNIT R0 = our unit number 04335 60440230 1 IMM 1155 LD R1 MTCMFUNC for trace 04336 60840002 2 IMM 1156 LD R2 MTFNREWIND R2 = function code 1157 TRACE MTTRACE,MTTFUNC function, R0=Unit, R1=location, R2=value 04337 5D401D30 1157 XCT TRACECALL(MTTRACE) 04338 FEC00085 1157 NOP (MTTRACE*BITS 22:26)+(MTTFUNC*BITS 27:31) 04339 E4A01A38 2 0 1158 ST R2 CIX(MTCMFUNC+MTSELECT+R0) start the rewind 0433A 6066434D 1 3 1159 LD R1 TIMEOUT(R3) get timeout value 1160 * \ / 0000433B 1161 WAIT LABEL 0433B 60040000 0 IMM 1162 LD R0 MTUSTRUN new state: runnable (next time) 0433C DCD74810 5 BASE 1163 EXPCS MTU,MTUPC go back to controller-scheduler 0433D FA0C4347 0 1164 JNEZ R0 ERROR jump if controller dead 0433E 6057480B 1 5 BASE 1165 LD R1 MTU,MTUMTCSTAT get new tape status 0433F F67A433B 1 1166 JBT R1/MTDSTBREW WAIT jump if busy rewinding 04340 FE0E4344 1167 JMP DONEREW else go check status 1168 * --- 1169 00004341 1170 REWINDCT LABEL here to rewind a CT or VT 04341 DC00440C 1171 CALL TAPEFUNC request the rewind 04342 41440002 IMM 1172 PARV MTFNREWIND code for rewind 04343 4066434D 3 1173 PARVL TIMEOUT(R3) timeout counter 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 892 (MTDRIVER) F 45 Magnetic Tape Driver - Drive Activity Section 1174 * \ / 00004344 1175 DONEREW LABEL 04344 F2744349 1 1176 JBF R1/MTDSTRDY OFFLINE jump if tape is offline 04345 F676434B 1 1177 JBT R1/MTDSTBOT OKSTAT jump if at load point 04346 FB264330 4 1178 JDR R4 LOOP else retry as allowed 1179 * \ / 00004347 1180 ERROR LABEL 04347 60040089 0 IMM 1181 LD R0 XREQERFAU then error: abnormal/unavailable 04348 FE0E434C 1182 JMP RETURN 1183 * --- 1184 00004349 1185 OFFLINE LABEL 04349 600400AE 0 IMM 1186 LD R0 XREQERDNR error: drive not ready 0434A FE0E434C 1187 JMP RETURN 1188 * --- 1189 0000434B 1190 OKSTAT LABEL 0434B 60040000 0 IMM 1191 LD R0 0 no error 1192 * \ / 0000434C 1193 RETURN LABEL 0434C 5D1F8001 6 STAK 1194 LEAVE POP return to caller 1195 * --- 1196 0434F 00000060 1197 TIMEOUT VFD 48,48,96 rewind timeouts for CT, MT, VT 1198 1199 END DOREWIND subroutine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 893 (MTDRIVER) F 45 Magnetic Tape Driver - Drive Activity Section 1201 1202 ********************************************************************************** 1203 * * 1204 * DOSEFB - Seek End of File Backward * 1205 * * 1206 * LD MTU => MTU element * 1207 * CALLNP DOSEFB * 1208 * ST R0 error code (0 if OK) * 1209 * * 1210 * Eats R0:R4. * 1211 * Stack required = 9 * 1212 * 2 + max ( DOFWSP (7), TAPEFUNC (6) ). * 1213 * * 1214 ********************************************************************************** 1215 1216 BLOCK DOSEFB subroutine 1217 ENTRY DOSEFB 1218 1219 BEGFRAME 00178801 6 BASE 1220 RETRYCOUNT BSS 1 retry counter 1221 ENDFRAME 1222 04350 DD5F8002 6 STAK 1223 DOSEFB ENTRNP PUSH 04351 60494021 1 5 ZBM 1224 LD R1 MTU,MTUTYPE R1 = 0 if CT, 1 if MT, 2 if video 04352 6022426B 0 1 1225 LD R0 TAPEERRMAX(R1) retry counter 04353 E4178801 0 6 BASE 1226 ST R0 SP,RETRYCOUNT save it 1227 * \ / 00004354 1228 LOOP LABEL 04354 DC00440C 1229 CALL TAPEFUNC request a skip file backward 04355 41440004 IMM 1230 PARV MTFNSEFB operation code 04356 60494021 1 5 ZBM 1231 LD R1 MTU,MTUTYPE R1 = 0 if CT, 1 if MT, 2 if video 04357 40624364 1 1232 PARVL TIMEOUT(R1) timeout value 04358 FA0C4362 0 1233 JNEZ R0 RETURN jump if error 04359 F2444362 1 1234 JBF R1/MTSTANER RETURN jump if no error occurred 0435A F6764362 1 1235 JBT R1/MTDSTBOT RETURN jump if at load point 0435B D0578801 6 BASE 1236 DEC SP,RETRYCOUNT one fewer retry allowed 0435C FE084361 1237 JLT ERROR jump if permanent error 0435D F2524354 1 1238 JBF R1/MTSTTMBKB LOOP just retry if tape did not move backward 0435E DC4042B5 1239 CALLNP DOFWSP else forward space over problem 0435F FA0C4362 0 1240 JNEZ R0 RETURN jump if couldn't even do that 04360 FE0E4354 1241 JMP LOOP else retry the SEFB 1242 * --- 1243 00004361 1244 ERROR LABEL 04361 60040089 0 IMM 1245 LD R0 XREQERFAU error: abnormal/unavailable 1246 * \ / 00004362 1247 RETURN LABEL 04362 EDC95810 5 ZBM 1248 STW MTU,MTUEOF 04363 5D1F8002 6 STAK 1249 LEAVE POP return to caller 1250 * --- 1251 04366 0000007D 1252 TIMEOUT VFD 48,78,125 SEFB timeouts for CT, MT, VT 1253 1254 END DOSEFB subroutine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 894 (MTDRIVER) F 45 Magnetic Tape Driver - Drive Activity Section 1256 1257 ********************************************************************************** 1258 * * 1259 * DOSEFF - Seek End of File Forward * 1260 * * 1261 * LD MTU => MTU element * 1262 * CALLNP DOSEFF * 1263 * ST R0 error code (0 if OK) * 1264 * * 1265 * Eats R0:R4. * 1266 * Stack required = 9 * 1267 * 2 + max ( DOBKSP (7), TAPEFUNC (6) ). * 1268 * * 1269 ********************************************************************************** 1270 1271 BLOCK DOSEFF subroutine 1272 ENTRY DOSEFF 1273 1274 BEGFRAME 00178801 6 BASE 1275 RETRYCOUNT BSS 1 retry counter 1276 ENDFRAME 1277 04367 DD5F8002 6 STAK 1278 DOSEFF ENTRNP PUSH 04368 60494021 1 5 ZBM 1279 LD R1 MTU,MTUTYPE R1 = 0 if CT, 1 if MT, 2 if video 04369 6022426B 0 1 1280 LD R0 TAPEERRMAX(R1) retry counter 0436A E4178801 0 6 BASE 1281 ST R0 SP,RETRYCOUNT save it 1282 * \ / 0000436B 1283 LOOP LABEL 0436B DC00440C 1284 CALL TAPEFUNC request a skip file forward 0436C 41440005 IMM 1285 PARV MTFNSEFF operation code 0436D 60494021 1 5 ZBM 1286 LD R1 MTU,MTUTYPE R1 = 0 if CT, 1 if MT, 2 if video 0436E 4062437A 1 1287 PARVL TIMEOUT(R1) timeout value 0436F FA0C4378 0 1288 JNEZ R0 RETURN jump if error 04370 F2444378 1 1289 JBF R1/MTSTANER RETURN jump if no error occurred 04371 D0578801 6 BASE 1290 DEC SP,RETRYCOUNT one fewer retry allowed 04372 FE084377 1291 JLT ERROR jump if permanent error 04373 F254436B 1 1292 JBF R1/MTSTTMFWB LOOP just retry if tape did not move forward 04374 DC40428F 1293 CALLNP DOBKSP else backspace over problem 04375 FA0C4378 0 1294 JNEZ R0 RETURN jump if couldn't even do that 04376 FE0E436B 1295 JMP LOOP else retry the SEFF 1296 * --- 1297 00004377 1298 ERROR LABEL 04377 60040089 0 IMM 1299 LD R0 XREQERFAU error: abnormal/unavailable 1300 * \ / 1301 00004378 1302 RETURN LABEL 04378 EDC95810 5 ZBM 1303 STW MTU,MTUEOF 04379 5D1F8002 6 STAK 1304 LEAVE POP return to caller 1305 * --- 1306 0437C 0000007D 1307 TIMEOUT VFD 48,78,125 SEFF timeouts for CT, MT, VT 1308 1309 END DOSEFF subroutine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 895 (MTDRIVER) F 45 Magnetic Tape Driver - Drive Activity Section 1311 1312 ********************************************************************************** 1313 * * 1314 * DOSETPARM - Select Track and Density * 1315 * * 1316 * This routine will select a density, and if CT, a * 1317 * track. * 1318 * * 1319 * LD MTU => MTU element * 1320 * CALLNP DOSETPARM * 1321 * ST R0 error code (0 if OK) * 1322 * * 1323 * Eats R0:R4. * 1324 * Stack required = 7 * 1325 * 1 + max (TAPEFUNC (6) ). * 1326 * * 1327 ********************************************************************************** 1328 1329 BLOCK DOSETPARM subroutine 1330 ENTRY DOSETPARM 1331 1332 BEGFRAME 1333 ENDFRAME 1334 0437D DD5F8001 6 STAK 1335 DOSETPARM ENTRNP PUSH 0437E EC0BC010 7 CBM 1336 STZ R7/BIT 0 flag no error 0437F 60095A20 0 5 ZBM 1337 LD R0 MTU,MTUDENSITY get requested density 04380 DC00440C 1338 CALL TAPEFUNC select the density 04381 4156100C 0 REG 1339 PARV R0+MTFNDENSEL indicate the operation 04382 40440001 IMM 1340 PARVL 1 and timeout counter 04383 F2444389 1 1341 JBF R1/MTSTANER DENSITYOK jump if density selected okay 04384 EDCBC010 7 CBM 1342 STW R7/BIT 0 say an error occurred 04385 EC095A20 5 ZBM 1343 STZ MTU,MTUDENSITY reset to low density 04386 DC00440C 1344 CALL TAPEFUNC and issue that function 04387 4144000C IMM 1345 PARV MTFNDENSEL (select low density) 04388 40440001 IMM 1346 PARVL 1 timeout counter 00004389 1347 DENSITYOK LABEL 04389 5C094021 5 ZBM 1348 CMZ MTU,MTUTYPE is this an MT or video? 0438A FE0C4395 1349 JNE TRACKOK MTs and VTs don't have track select 0438B 60095831 0 5 ZBM 1350 LD R0 MTU,MTUTRACK get the track number 0438C DC00440C 1351 CALL TAPEFUNC issue the function 0438D 41561010 0 REG 1352 PARV R0+MTFNTRSEL operation 0438E 40440001 IMM 1353 PARVL 1 time-out counter 0438F F2444395 1 1354 JBF R1/MTSTANER TRACKOK jump if it worked 04390 EDCBC010 7 CBM 1355 STW R7/BIT 0 else, say that an error occurred 04391 EC095831 5 ZBM 1356 STZ MTU,MTUTRACK and reset to track zero 04392 DC00440C 1357 CALL TAPEFUNC issue that function 04393 41440010 IMM 1358 PARV MTFNTRSEL (select track 0) 04394 40440001 IMM 1359 PARVL 1 timeout counter 00004395 1360 TRACKOK LABEL 04395 600BC010 0 7 CBM 1361 LD R0 R7/BIT 0 get the error flag 04396 1C040082 0 IMM 1362 MUL R0 XREQERPOB possible error code, param out of bounds 04397 5D1F8001 6 STAK 1363 LEAVE POP and all done 1364 * --- 1365 1366 END DOSETPARM subroutine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 896 (MTDRIVER) F 45 Magnetic Tape Driver - Drive Activity Section 1368 1369 ********************************************************************************** 1370 * * 1371 * DOWFM - Write File Mark * 1372 * * 1373 * LD MTU => MTU element * 1374 * CALLNP DOWFM * 1375 * ST R0 error code (0 if OK) * 1376 * * 1377 * Eats R0:R4. * 1378 * Stack required = 9 * 1379 * 2 + max ( DOBKSP (7), DOGAP (4), TAPEFUNC (6) ). * 1380 * * 1381 ********************************************************************************** 1382 1383 BLOCK DOWFM subroutine 1384 ENTRY DOWFM 1385 1386 BEGFRAME 00178801 6 BASE 1387 RETRYCOUNT BSS 1 retry counter 1388 ENDFRAME 1389 04398 DD5F8002 6 STAK 1390 DOWFM ENTRNP PUSH 04399 60494021 1 5 ZBM 1391 LD R1 MTU,MTUTYPE R1 = 0 if CT, 1 if MT, 2 if VT 0439A 6022426B 0 1 1392 LD R0 TAPEERRMAX(R1) retry counter 0439B E4178801 0 6 BASE 1393 ST R0 SP,RETRYCOUNT 1394 * \ / 0000439C 1395 LOOP LABEL 0439C DC00440C 1396 CALL TAPEFUNC request a write file mark 0439D 41440018 IMM 1397 PARV MTFNWFM operation code 0439E 60494021 1 5 ZBM 1398 LD R1 MTU,MTUTYPE R1 = 0 if CT, 1 if MT, 2 if VT 0439F 406243AF 1 1399 PARVL TIMEOUT(R1) timeout value 043A0 FA0C43AE 0 1400 JNEZ R0 RETURN jump if error 1401 * \ / 043A1 F24443AE 1 1402 JBF R1/MTSTANER RETURN jump if all is well 043A2 F67843AD 1 1403 JBT R1/MTDSTWPRT PROTECTED jump if write-protected 043A3 D0578801 6 BASE 1404 DEC SP,RETRYCOUNT one fewer retry 043A4 FE0843AB 1405 JLT ERROR jump if all used up 1406 * \ / 043A5 F254439C 1 1407 JBF R1/MTSTTMFWB LOOP jump if tape did not move forward 043A6 DC40428F 1408 CALLNP DOBKSP else do a backspace 043A7 FA0C43AE 0 1409 JNEZ R0 RETURN return if that didn't work 043A8 DC4042C6 1410 CALLNP DOGAP then do a gap 043A9 FA0C43AE 0 1411 JNEZ R0 RETURN and return if that didn't work 043AA FE0E439C 1412 JMP LOOP then try again 1413 * --- 1414 000043AB 1415 ERROR LABEL 043AB 60040089 0 IMM 1416 LD R0 XREQERFAU error: abnormal/unavailable 043AC FE0E43AE 1417 JMP RETURN and return 1418 * --- 1419 000043AD 1420 PROTECTED LABEL 043AD 60040084 0 IMM 1421 LD R0 XREQERPFM error: protected from modification 1422 * \ / 000043AE 1423 RETURN LABEL 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 897 (MTDRIVER) F 45 Magnetic Tape Driver - Drive Activity Section 043AE 5D1F8002 6 STAK 1424 LEAVE POP return to caller 1425 * --- 1426 043B1 00000009 1427 TIMEOUT VFD 1,1,9 WFM timeouts for CT, MT, VT 1428 1429 END DOWFM subroutine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 898 (MTDRIVER) F 45 Magnetic Tape Driver - Drive Activity Section 1431 1432 ********************************************************************************** 1433 * * 1434 * DOWRITE - Write a Record onto the Tape * 1435 * * 1436 * This routine assumes that MTUUBS points to the chain * 1437 * of UBS elements describing the user's buffer, and that * 1438 * MTURECLEN is the length of the record to be written. * 1439 * * 1440 * LD MTU => MTU element * 1441 * CALLNP DOWRITE * 1442 * ST R0 error code (0 if OK) * 1443 * * 1444 * Eats R0:R4. * 1445 * Stack required = 9. * 1446 * 2 + max ( DOBKSP (7), DOGAP (4), ERRORLOG (3), * 1447 * PADEXT (2), TRACEPROC (3) ) * 1448 * * 1449 ********************************************************************************** 1450 1451 BLOCK DOWRITE subroutine 1452 ENTRY DOWRITE 1453 1454 BEGFRAME 00178801 6 BASE 1455 RETRYCOUNT BSS 1 retry counter 1456 ENDFRAME 1457 043B2 DD5F8002 6 STAK 1458 DOWRITE ENTRNP PUSH 043B3 60094021 0 5 ZBM 1459 LD R0 MTU,MTUTYPE R0 = 0 if CT, 1 if MT, 2 if VT 043B4 6020426B 0 0 1460 LD R0 TAPEERRMAX(R0) retry count 043B5 E4178801 0 6 BASE 1461 ST R0 SP,RETRYCOUNT initialize retry counter 1462 * \ / 000043B6 1463 LOOP LABEL 043B6 60040001 0 IMM 1464 LD R0 MTUSTWAIT new state: wait for our turn 043B7 DCD74810 5 BASE 1465 EXPCS MTU,MTUPC go back to controller scheduler 043B8 FA0C43E9 0 1466 JNEZ R0 ERROR jump if controller is dead 1467 * \ / 043B9 60040001 0 IMM 1468 LD R0 1*PPUIDMAD 043BA E4001802 0 1469 ST R0 CIX(PPUSSSTAT) set DMA to output 043BB DC4043F5 1470 CALLNP PADEXT set up DMA registers 1471 * \ / 043BC 60095040 0 5 ZBM 1472 LD R0 MTU,MTUUNIT our unit number 043BD 60440250 1 IMM 1473 LD R1 MTCMWRITE for trace 043BE 60974806 2 5 BASE 1474 LD R2 MTU,MTURECLEN for trace 1475 TRACE MTTRACE,MTTFUNC function, R0=Unit, R1=Address, R2=Data 043BF 5D401D30 1475 XCT TRACECALL(MTTRACE) 043C0 FEC00085 1475 NOP (MTTRACE*BITS 22:26)+(MTTFUNC*BITS 27:31) 1476 * \ / 043C1 E4A01AD8 2 0 1477 ST R2 CIX(MTCMWRITE+MTINTREQ+MTSELECT+R0) start the write 1478 * \ / 043C2 60094021 0 5 ZBM 1479 LD R0 MTU,MTUTYPE R0 = 0 if CT, 1 if MT, 2 if VT 043C3 606043F0 1 0 1480 LD R1 TIMEOUT(R0) timeout value 043C4 60040002 0 IMM 1481 LD R0 MTUSTBUSY new state: busy with transfer 043C5 DCD74810 5 BASE 1482 EXPCS MTU,MTUPC go back to controller scheduler 1483 * \ / 043C6 FA0C43E9 0 1484 JNEZ R0 ERROR jump if controller is dead 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 899 (MTDRIVER) F 45 Magnetic Tape Driver - Drive Activity Section 043C7 6217480A 015 BASE 1485 LD2 R0 MTU,MTUPPUSTAT get PPU and tape status 043C8 7A0043F3 01 1486 AND2 R0 STATMASK look at error bits 043C9 FA1243ED 01 1487 JEQZ2 R0 OKSTAT jump if no errors 043CA DC005048 1488 CALL ERRORLOG else log the error 043CB 4144122F IMM 1489 PARV ERLCMTCERR tape error 043CC 41574804 5 BASE 1490 PARV MTU,MTUNAME drive name 043CD 41440250 IMM 1491 PARV MTCMWRITE operation 043CE 4157480B 5 BASE 1492 PARV MTU,MTUMTCSTAT tape status 043CF 4057480A 5 BASE 1493 PARVL MTU,MTUPPUSTAT PPU status 1494 * \ / 043D0 6217480A 015 BASE 1495 LD2 R0 MTU,MTUPPUSTAT get PPU and tape status 043D1 780043F3 0 1496 AND R0 STATMASK mask the PPU status 043D2 FA0C43D4 0 1497 JNEZ R0 NOTGOOD jump if PPU is unhappy 043D3 F24443ED 1 1498 JBF R1/MTSTANER OKSTAT jump if tape recovered from error 1499 * \ / 000043D4 1500 NOTGOOD LABEL 043D4 EC001801 1501 STZ CIX(PPUABORT) make the PPU happy 043D5 F27443EB 1 1502 JBF R1/MTDSTRDY OFFLINE jump if drive not ready 043D6 F67843E7 1 1503 JBT R1/MTDSTWPRT PROTECTED jump if drive is write-protected 043D7 F62E43E3 0 1504 JBT R0/PPUIMPE MEMERROR jump if memory parity error 043D8 D0578801 6 BASE 1505 DEC SP,RETRYCOUNT tried one more time 043D9 FE0843E9 1506 JLT ERROR jump if error is permanent 043DA 600A5220 0 1 CBM 1507 LD R0 R1/MTSTTMD get tape motion bits 043DB FA0243B6 0 1508 JEQZ R0 LOOP just retry if the tape didn't move 043DC 64040001 0 IMM 1509 CPR R0 MTSTTMFW did the tape move forward? 043DD FE0C43E9 1510 JNE ERROR if not, can't recover 043DE DC40428F 1511 CALLNP DOBKSP else backspace the tape 043DF FA0C43EE 0 1512 JNEZ R0 RETURN jump if can't backspace 043E0 DC4042C6 1513 CALLNP DOGAP then write a gap 043E1 FA0C43EE 0 1514 JNEZ R0 RETURN jump if we can't do that either 043E2 FE0E43B6 1515 JMP LOOP then try the write again 1516 * --- 1517 000043E3 1518 MEMERROR LABEL 043E3 F25443E5 1 1519 JBF R1/MTSTTMFWB MEMERR2 jump if tape was not moved 043E4 DC40428F 1520 CALLNP DOBKSP else backspace the tape 000043E5 1521 MEMERR2 LABEL 043E5 60040070 0 IMM 1522 LD R0 UINTVMFPE error: memory parity error 043E6 FE0E43EE 1523 JMP RETURN 1524 * --- 1525 000043E7 1526 PROTECTED LABEL 043E7 60040084 0 IMM 1527 LD R0 XREQERPFM error: protected from modification 043E8 FE0E43EE 1528 JMP RETURN 1529 * --- 1530 000043E9 1531 ERROR LABEL 043E9 60040089 0 IMM 1532 LD R0 XREQERFAU error: abnormal/unavailable 043EA FE0E43EE 1533 JMP RETURN 1534 * --- 1535 000043EB 1536 OFFLINE LABEL 043EB 600400AE 0 IMM 1537 LD R0 XREQERDNR error: drive not ready 043EC FE0E43EE 1538 JMP RETURN 1539 * --- 1540 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 900 (MTDRIVER) F 45 Magnetic Tape Driver - Drive Activity Section 000043ED 1541 OKSTAT LABEL 043ED 60040000 0 IMM 1542 LD R0 0 no error 1543 * \ / 000043EE 1544 RETURN LABEL 043EE EC095810 5 ZBM 1545 STZ MTU,MTUEOF 043EF 5D1F8002 6 STAK 1546 LEAVE POP return to caller 1547 * --- 1548 043F2 00000006 1549 TIMEOUT VFD 1,1,6 write timeouts for CT, MT, VT 1550 000043F3 1551 STATMASK LABEL 043F3 00012540 1552 VFD 1*PPUITOUT+1*PPUIBCNR+1*PPUIMPE+1*PPUICONF+1*PPUIDPPE 043F4 201F0000 1553 VFD 1*MTSTANER+ONEBITS/MTSTERSTAT*MTSTERSTAT 1554 1555 END DOWRITE subroutine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 901 (MTDRIVER) F 45 Magnetic Tape Driver - Drive Activity Section 1557 1558 ********************************************************************************** 1559 * * 1560 * PADEXT - Set Up the PPU DMA Registers * 1561 * * 1562 * You must previously set the DMA direction bit. We use * 1563 * the UBS blocks chained from the MTU element to set up the * 1564 * PPU registers. * 1565 * * 1566 * LD MTU => MTU element * 1567 * CALLNP PADEXT * 1568 * * 1569 * Eats R0:R1. * 1570 * Stack required = 2 * 1571 * 1 + NEWBYTECNT (1). * 1572 * * 1573 ********************************************************************************** 1574 1575 BLOCK PADEXT subroutine 1576 ENTRY PADEXT 1577 1578 BEGFRAME 1579 ENDFRAME 1580 043F5 DD5F8001 6 STAK 1581 PADEXT ENTRNP PUSH 043F6 60574808 1 5 BASE 1582 LD R1 MTU,MTUUBS R1 -> first UBS block 043F7 FA7243FD 1 1583 JNZA R1 DOIT jump if there is a buffer 043F8 EC174809 5 BASE 1584 STZ MTU,MTUNUBS else say no next UBS element 043F9 EC001805 1585 STZ CIX(PPUADDR1) no relevant address 043FA 60048000 0 IMM 1586 LD R0 1*PPUCLAST 043FB E4001804 0 1587 ST R0 CIX(PPUCNT1) and only byte count = 0 043FC FE0E4405 1588 JMP RETURN 1589 * --- 1590 000043FD 1591 DOIT LABEL 043FD 60085F10 0 1 ZBM 1592 LD R0 R1,UBSLINK R0 => second UBS block 043FE E4174809 0 5 BASE 1593 ST R0 MTU,MTUNUBS set so NEWBYTECNT uses this one 043FF DC40425E 1594 CALLNP NEWBYTECNT load the second byte count 04400 60574808 1 5 BASE 1595 LD R1 MTU,MTUUBS R1 => first UBS block 04401 60164801 0 1 BASE 1596 LD R0 R1,UBSMAW get the memory address word 04402 E4001805 0 1597 ST R0 CIX(PPUADDR1) give it to the PPU 04403 60164802 0 1 BASE 1598 LD R0 R1,UBSBCW get the byte count word 04404 E4001804 0 1599 ST R0 CIX(PPUCNT1) give it to the PPU 1600 * \ / 1601 00004405 1602 RETURN LABEL 04405 5D1F8001 6 STAK 1603 LEAVE POP 1604 * --- 1605 1606 END PADEXT subroutine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 902 (MTDRIVER) F 45 Magnetic Tape Driver - Drive Activity Section 1608 1609 ********************************************************************************** 1610 * * 1611 * REWNOWAIT - Awaken User, then Rewind a Tape * 1612 * * 1613 * This routine is called in response to a user's REWIND * 1614 * request. It will awaken the user so he can continue, then * 1615 * rewind the tape. Note that future user requests will not * 1616 * even be looked for until the rewind has completed. * 1617 * * 1618 * On return, R0 = -1. This is a flag to MTDRIVE saying * 1619 * that it shouldn't awaken the user (because we already have). * 1620 * * 1621 * CALLNP REWNOWAIT * 1622 * * 1623 * Eats R0:R4. * 1624 * Stack required = 8 * 1625 * 1 + max ( DOREWIND (7), WAKEUPUSER (5) ). * 1626 * * 1627 ********************************************************************************** 1628 1629 BLOCK REWNOWAIT subroutine 1630 ENTRY REWNOWAIT 1631 1632 BEGFRAME 1633 ENDFRAME 1634 04406 DD5F8001 6 STAK 1635 REWNOWAIT ENTRNP PUSH 04407 60040000 0 IMM 1636 LD R0 0 error code for WAKEUPUSER 04408 DC40445D 1637 CALLNP WAKEUPUSER awaken the user 04409 DC40432C 1638 CALLNP DOREWIND then rewind the tape 0440A 6007FFFF 0 IMM 1639 LD R0 -1 tell MTDRIVE not to awaken user 0440B 5D1F8001 6 STAK 1640 LEAVE POP and return 1641 * --- 1642 1643 END REWNOWAIT subroutine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 903 (MTDRIVER) F 45 Magnetic Tape Driver - Drive Activity Section 1645 1646 ********************************************************************************** 1647 * * 1648 * TAPEFUNC - Perform a Non-Data Transfer Tape Function * 1649 * * 1650 * This routine will perform a tape function that ties * 1651 * up the controller. It will not do any retries. It will, * 1652 * however, log an error if any non-optimal status is * 1653 * encountered. It also does preliminary error checking. * 1654 * Note especially that this routine will not return an * 1655 * error indication for normal errors. Backspace normally * 1656 * gets an error following a write error, and this routine * 1657 * ignores any such error. * 1658 * * 1659 * LD MTU => MTU element * 1660 * CALL TAPEFUNC * 1661 * PARV command for controller * 1662 * PARVL max time required (in 10-second intervals) * 1663 * ST R1 new tape status * 1664 * ST R0 XREQERDNR if drive went offline * 1665 * XREQERFAU if tape position lost * 1666 * 0 otherwise * 1667 * * 1668 * Eats R0:R3. * 1669 * Stack required = 6 * 1670 * 3 + max ( ERRORLOG (3), TRACEPROC (3) ) * 1671 * * 1672 ********************************************************************************** 1673 1674 BLOCK TAPEFUNC subroutine 1675 ENTRY TAPEFUNC 1676 1677 BEGFRAME 00178801 6 BASE 1678 OPERATION BSS 1 operation requested 00178802 6 BASE 1679 TIMEOUT BSS 1 timeout counter 1680 ENDFRAME 1681 0440C DD1F8003 6 STAK 1682 TAPEFUNC ENTR PUSH 0440D C1578801 6 BASE 1683 STPV SP,OPERATION get the operation code 0440E C0578802 6 BASE 1684 STPVL SP,TIMEOUT get the timeout value 0440F 60040001 0 IMM 1685 LD R0 MTUSTWAIT new state: wait our turn to start I/O 04410 DCD74810 5 BASE 1686 EXPCS MTU,MTUPC go back to controller-scheduler 04411 FA0C442C 0 1687 JNEZ R0 ERROR jump if controller is dead 1688 * \ / 04412 60095040 0 5 ZBM 1689 LD R0 MTU,MTUUNIT R0 = unit number 04413 60440230 1 IMM 1690 LD R1 MTCMFUNC for trace 04414 60978801 2 6 BASE 1691 LD R2 SP,OPERATION get operation code 1692 TRACE MTTRACE,MTTFUNC tape function, R0=Unit, R1=Address, R2=Value 04415 5D401D30 1692 XCT TRACECALL(MTTRACE) 04416 FEC00085 1692 NOP (MTTRACE*BITS 22:26)+(MTTFUNC*BITS 27:31) 04417 E4A01AB8 2 0 1693 ST R2 CIX(MTCMFUNC+MTINTREQ+MTSELECT+R0) start the operation 1694 * \ / 04418 60040002 0 IMM 1695 LD R0 MTUSTBUSY new state: made controller busy 04419 60578802 1 6 BASE 1696 LD R1 SP,TIMEOUT timeout counter 0441A DCD74810 5 BASE 1697 EXPCS MTU,MTUPC go back to controller-scheduler 1698 * \ / 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 904 (MTDRIVER) F 45 Magnetic Tape Driver - Drive Activity Section 0441B FA0C442C 0 1699 JNEZ R0 ERROR jump if controller is dead 0441C 6057480B 1 5 BASE 1700 LD R1 MTU,MTUMTCSTAT get new status 0441D 78404432 1 1701 AND R1 STATMASK mask off irrelevant bits 0441E FA424427 1 1702 JEQZ R1 NOERROR jump if no error to log 0441F E1178801 4 6 BASE 1703 EXCH R4 SP,OPERATION save R4, get op code 04420 DC005048 1704 CALL ERRORLOG else log the error 04421 4144122F IMM 1705 PARV ERLCMTCERR tape error 04422 41574804 5 BASE 1706 PARV MTU,MTUNAME tape name 04423 41530000 4 REG 1707 PARV R4 operation requested 04424 4157480B 5 BASE 1708 PARV MTU,MTUMTCSTAT tape status 04425 4057480A 5 BASE 1709 PARVL MTU,MTUPPUSTAT PPU status 04426 E1178801 4 6 BASE 1710 EXCH R4 SP,OPERATION restore R4, op code 1711 * \ / 00004427 1712 NOERROR LABEL 04427 6057480B 1 5 BASE 1713 LD R1 MTU,MTUMTCSTAT get current status 04428 F274442E 1 1714 JBF R1/MTDSTRDY OFFLINE jump if drive went offline 1715 * note that other errors are accepted 04429 600A5220 0 1 CBM 1716 LD R0 R1/MTSTTMD get tape motion direction 0442A 64040003 0 IMM 1717 CPR R0 MTSTTMLOST is tape position lost? 0442B FE0C4430 1718 JNE OKSTAT jump if not 1719 * \ / 0000442C 1720 ERROR LABEL 0442C 60040089 0 IMM 1721 LD R0 XREQERFAU else error: abnormal/unavailable 0442D FE0E4431 1722 JMP RETURN and return 1723 * --- 1724 0000442E 1725 OFFLINE LABEL 0442E 600400AE 0 IMM 1726 LD R0 XREQERDNR error: drive not ready 0442F FE0E4431 1727 JMP RETURN and return 1728 * --- 1729 00004430 1730 OKSTAT LABEL 04430 60040000 0 IMM 1731 LD R0 0 no error (so far) 1732 * \ / 00004431 1733 RETURN LABEL 04431 5D1F8003 6 STAK 1734 LEAVE POP 1735 * --- 1736 04432 201F0000 1737 STATMASK VFD 1*MTSTANER+ONEBITS/MTSTERSTAT*MTSTERSTAT 1738 1739 END TAPEFUNC subroutine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 905 (MTDRIVER) F 45 Magnetic Tape Driver - Drive Activity Section 1741 1742 ********************************************************************************** 1743 * * 1744 * TAPENOTRDY - Handle Tapes that are not Ready * 1745 * * 1746 * This routine is called when we discover that a tape is * 1747 * not ready. We will complain to the operator as necessary, * 1748 * and will also give errors for any requests that happen. We * 1749 * return when the controller seems to be OK (not MTCDEAD) and * 1750 * the drive is ready (MTDSTRDY). Note that the drive might * 1751 * be inoperative for some other reason, however. * 1752 * * 1753 * * 1754 * LD MTU => our MTU element * 1755 * CALLNP TAPENOTRDY * 1756 * * 1757 * Eats R0:R4. * 1758 * Stack required = 8. * 1759 * 1 + max ( CANOPMSG (1), DEVNOTRDY (5), DOREWIND (7), * 1760 * LOCKWAIT (0), WAKEUPUSER (5) ) * 1761 * * 1762 ********************************************************************************** 1763 1764 BLOCK TAPENOTRDY subroutine 1765 ENTRY TAPENOTRDY 1766 1767 BEGFRAME 1768 ENDFRAME 1769 04433 DD5F8001 6 STAK 1770 TAPENOTRDY ENTRNP PUSH 1771 1772 ********************************************************************************** 1773 * * 1774 * The tape is not ready or the controller is dead. If * 1775 * is someone is using the drive generate a "not ready" * 1776 * message (if there isn't already a message for the drive) * 1777 * and let the user go. If no user, clear any message since * 1778 * none is needed when no one is using the drive. * 1779 * * 1780 ********************************************************************************** 1781 1782 * \ / 00004434 1783 ERROR LABEL 04434 5C174803 5 BASE 1784 CMZ MTU,MTUPCADRS is this tape open? 04435 FE024447 1785 JEQ NOTOPEN jump if not - no message needed 1786 * \ / 1787 1788 * Drive in use, generate necessary message 04436 5C174805 5 BASE 1789 CMZ MTU,MTUMSGID is a message outstanding? 04437 FE0C443B 1790 JNE CHECKREQ jump if so, don't complain again 04438 DC004FBE 1791 CALL DEVNOTRDY else generate a complaint 04439 40574804 5 BASE 1792 PARVL MTU,MTUNAME tape drive name 0443A E4174805 0 5 BASE 1793 ST R0 MTU,MTUMSGID and save complaint id 0000443B 1794 CHECKREQ LABEL 1795 PLOCK MTREQLOCK get the request lock 0443B 0CC00000 1795 IOFF 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 906 (MTDRIVER) F 45 Magnetic Tape Driver - Drive Activity Section 0443C D1C01F20 1795 SETT MTREQLOCK 0443D FE0C443F 1795 JNE MA(2+DISPW MA 0) 0443E DC40308B 1795 CALLNP LOCKWAIT 0443F 60174008 0 5 CACH 1796 LD R0 MTU,MTUREQUEST get the request 04440 EC174008 5 CACH 1797 STZ MTU,MTUREQUEST say we got it 1798 PUNLOCK MTREQLOCK release the lock 04441 EC001F20 1798 STZ MTREQLOCK 04442 0C800000 1798 ION 04443 FA02444C 0 1799 JEQZ R0 WAIT jump if no new request 04444 600400AE 0 IMM 1800 LD R0 XREQERDNR error code: device not ready 04445 DC40445D 1801 CALLNP WAKEUPUSER and go wake up the user 04446 FE0E444C 1802 JMP WAIT then wait it out 1803 * --- 1804 1805 * Drive is not in use, clear any message associated with it 00004447 1806 NOTOPEN LABEL 04447 5C174805 5 BASE 1807 CMZ MTU,MTUMSGID do we have a complaint outstanding? 04448 FE02444C 1808 JEQ WAIT jump if not 04449 DC004713 1809 CALL CANOPMSG else cancel the complaint 0444A 40574805 5 BASE 1810 PARVL MTU,MTUMSGID 0444B EC174805 5 BASE 1811 STZ MTU,MTUMSGID say we have cancelled it 1812 * \ / 1813 1814 ********************************************************************************** 1815 * * 1816 * Now return to the controller-scheduler to wait for a * 1817 * change of state. * 1818 * * 1819 ********************************************************************************** 1820 0000444C 1821 WAIT LABEL 0444C 60040000 0 IMM 1822 LD R0 MTUSTRUN new state: runnable (next time) 0444D DCD74810 5 BASE 1823 EXPCS MTU,MTUPC go back to controller scheduler 1824 * \ / 1825 1826 ********************************************************************************** 1827 * * 1828 * Check whether the controller is well and the drive * 1829 * "ready". We get here after coming back from the * 1830 * controller-scheduler or after doing an unsuccessful rewind * 1831 * when the drive said "ready". In the first case we want to * 1832 * try all over again if things aren't OK, or do a rewind if * 1833 * they are. In the second case we want to try over if things * 1834 * don't check out, but LEAVE if they do. We return because * 1835 * the rewind found an error, but the error wasn't that the * 1836 * controller is dead or the drive not ready. This is as far * 1837 * as our jurisdiction goes, so we return. This way, further * 1838 * requests produce errors but we don't waste our time doing * 1839 * the same. * 1840 * * 1841 ********************************************************************************** 1842 0444E 60040000 0 IMM 1843 LD R0 0 say we haven't tried rewind 0000444F 1844 REWERROR LABEL R0 = 0, or DOREWIND error code 0444F 60495F11 1 5 ZBM 1845 LD R1 MTU,MTUCNTL get pointer to MTC element 04450 5C084816 1 ZBM 1846 CMZ R1,MTCDEAD check for dead controller 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 907 (MTDRIVER) F 45 Magnetic Tape Driver - Drive Activity Section 04451 FE0C4434 1847 JNE ERROR jump if controller dead 04452 6057480B 1 5 BASE 1848 LD R1 MTU,MTUMTCSTAT get current status 04453 F2744434 1 1849 JBF R1/MTDSTRDY ERROR jump if tape is not ready 04454 FA0C445C 0 1850 JNEZ R0 EXIT jump if final rewind got bad error 1851 * \ / 1852 1853 ********************************************************************************** 1854 * * 1855 * Drive is now ready. Cancel message (if we must) and * 1856 * rewind the tape. * 1857 * * 1858 ********************************************************************************** 1859 04455 5C174805 5 BASE 1860 CMZ MTU,MTUMSGID do we have a complaint outstanding? 04456 FE02445A 1861 JEQ TRYREWIND jump if not 04457 DC004713 1862 CALL CANOPMSG else cancel the complaint 04458 40574805 5 BASE 1863 PARVL MTU,MTUMSGID 04459 EC174805 5 BASE 1864 STZ MTU,MTUMSGID 0000445A 1865 TRYREWIND LABEL 0445A DC40432C 1866 CALLNP DOREWIND try to rewind the tape 0445B FA0C444F 0 1867 JNEZ R0 REWERROR jump if it wouldn't work 1868 * \ / 1869 0000445C 1870 EXIT LABEL 0445C 5D1F8001 6 STAK 1871 LEAVE POP we're all done, controller alive and drive ready 1872 * --- 1873 END TAPENOTRDY subroutine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 908 (MTDRIVER) F 45 Magnetic Tape Driver - Drive Activity Section 1875 1876 ********************************************************************************** 1877 * * 1878 * WAKEUPUSER - Roust the Process Using This Tape * 1879 * * 1880 * This routine will roust the process that was waiting * 1881 * for a tape operation. * 1882 * * 1883 * LD MTU => our MTU element * 1884 * LD R0 error code (0 if no error) * 1885 * CALLNP WAKEUPUSER * 1886 * * 1887 * Eats R0:R2. * 1888 * Stack required = 5 * 1889 * 1 + max ( DQUEONE(4), LOCKWAIT (0) ) * 1890 * * 1891 ********************************************************************************** 1892 1893 BLOCK WAKEUPUSER subroutine 1894 ENTRY WAKEUPUSER 1895 1896 BEGFRAME 1897 ENDFRAME 1898 0445D DD5F8001 6 STAK 1899 WAKEUPUSER ENTRNP PUSH 0445E 60520000 1 0 REG 1900 LD R1 R0 R1 = error code 1901 PLOCK MTREQLOCK get the request lock 0445F 0CC00000 1901 IOFF 04460 D1C01F20 1901 SETT MTREQLOCK 04461 FE0C4463 1901 JNE MA(2+DISPW MA 0) 04462 DC40308B 1901 CALLNP LOCKWAIT 04463 E44944A1 1 5 ZBM 1902 ST R1 MTU,MTUERRCODE save the error code 04464 DC00354F 1903 CALL DQUEONE roust the user 04465 41001DAC 1904 PAR SQDIOWAIT queue header 04466 40534000 5 REG 1905 PARVL MTU queue parameter 1906 PUNLOCK MTREQLOCK release the request lock 04467 EC001F20 1906 STZ MTREQLOCK 04468 0C800000 1906 ION 04469 5D1F8001 6 STAK 1907 LEAVE POP and all done 1908 * --- 1909 1910 END WAKEUPUSER subroutine 1911 1912 1913 END Drive Activity Section 1914 1915 1916 END Magnetic Tape Driver 81 INPUT TIMER clock routines 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 909 (TIMER) F 46 SSU Driver - NVM, Clock, Front panel 3 4 BLOCK SSU Routines 5 6 ENTRY CANOPMSG cancel a message to the operator 7 ENTRY FLASHVAL pointer to front panel information 8 ENTRY FLREADNVM read flagged datum from NVM 9 ENTRY FLWRITENVM write flagged datum into NVM 10 ENTRY FPFLASHER front panel flasher 11 ENTRY GENOPMSG generate a message to the operator 12 ENTRY GETDATE get the 64 bit date, does not ensure uniqueness 13 ENTRY GETFDATE get 32 bit current date 14 ENTRY GETFSEQN get 64 bit sequence number/date 15 ENTRY HOURINT routine to run each hour 16 ENTRY NVMREAD read from NVM 17 ENTRY NVMSTORE store into NVM 18 ENTRY READNVM read datum from NVM 19 ENTRY SSU_INT interrupt from SSU 20 ENTRY SSU_RESET to restart the SSU 21 ENTRY TIMEADJUST clock adjuster 22 ENTRY TIMEDRFT clock drifter 23 ENTRY TIMENOW get current time from SSU 24 ENTRY TIMESET queue a time interrupt 25 ENTRY TIMEKILL remove a time interrupt 26 ENTRY WRITENVM write datum into NVM 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 910 (TIMER) F 46 SSU Driver - NVM, Clock, Front panel 28 29 ********************************************************************************** 30 * * 31 * SSU_INT. * 32 * The SSU has the real time clock, the non-volatile * 33 * memory, the remote front panel, and the real front panel. * 34 * One interrupt from the SSU could be for all. This routine * 35 * accepts the interrupt and examines the WRU response and * 36 * processes each in turn. This whole mess runs with the * 37 * interrupts off so we have to try and keep it short. * 38 * * 39 * Stack required = 11. * 40 * 1 + max ( CHECKLOGD (6), DQUEONE (4), FPFLASHER (3), * 41 * GETOUTCHAR (5), LOCKWAIT (0), PUTINCHAR (10), * 42 * SETALARM (1), SFREEMEM (0), TIMENOW (1) ) * 43 * * 44 ********************************************************************************** 45 46 BLOCK SSU_INT routine 47 ENTRY SSU_INT 48 49 BEGFRAME2 00178800 6 BASE 50 INTSTAT BSS 1 interrupt poll response 51 ENDFRAME 52 53 * R2=WRU response, R3=slot SSU in, R4=>prev CA, SP=>stack top 54 0000446A 55 SSU_INT LABEL 0446A E49F8001 2 6 STAK 56 ST R2 PUSH allocate stack frame and save response 0446B 60C40086 3 IMM 57 LD PFPTR PNCIX (destroys R3) 0446C 00C01EDE 58 LDPF CLOCKPF set up communication 0446D F2BA447A 2 59 JBF R2/IPRSSUSTAT/SSUIMNVM NOTNVMINT 60 * \ / 61 62 * Interrupt from NVM. Means that a store to the NVM has completed. 63 * The PLOCK is needed so that a reader about to suspend on 64 * NVMBSYFLAG is in a known state... either fully suspended 65 * in the DIOWAIT queue or waiting for us to release our lock. 66 67 * \ / 68 PLOCK NVMBSYLOCK lock the NVM 0446E 0CC00000 68 IOFF 0446F D1C01EF4 68 SETT NVMBSYLOCK 04470 FE0C4472 68 JNE MA(2+DISPW MA 0) 04471 DC40308B 68 CALLNP LOCKWAIT 04472 EC001EF5 69 STZ NVMBSYFLAG say no longer busy 70 PUNLOCK NVMBSYLOCK then release the lock 04473 EC001EF4 70 STZ NVMBSYLOCK 04474 0C800000 70 ION 00004475 71 RELESEMORE LABEL 04475 DC00354F 72 CALL DQUEONE release anyone waiting 04476 41001DAC 73 PAR SQDIOWAIT from this queue 04477 40441EF4 IMM 74 PARVL ADR NVMBSYLOCK waiting for the NVM 04478 FA0C4475 0 75 JNEZ R0 RELESEMORE jump if someone was released, 76 * \ / we want to clean out the queue 04479 60978800 2 6 BASE 77 LD R2 SP,INTSTAT restore SSU interrupt response 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 911 (TIMER) F 46 SSU Driver - NVM, Clock, Front panel 78 * \ / 79 0000447A 80 NOTNVMINT LABEL 0447A F2BC447F 2 81 JBF R2/IPRSSUSTAT/SSUIMFPS NOTFPINT 0447B 60001811 0 82 LD R0 CIX(SSUFPSWCH) new front panel setting 0447C E4001EDF 0 83 ST R0 FPSWITCH 0447D DC404639 84 CALLNP FPFLASHER update the display now 0447E 60978800 2 6 BASE 85 LD R2 SP,INTSTAT restore the WRU response 86 * \ / 87 0000447F 88 NOTFPINT LABEL 0447F F2B0448D 2 89 JBF R2/IPRSSUSTAT/SSUIMCI NOSSUCHIN jump if not char in int 90 PLOCK FPCHARINLK prevent interference 04480 0CC00000 90 IOFF 04481 D1C01EE3 90 SETT FPCHARINLK 04482 FE0C4484 90 JNE MA(2+DISPW MA 0) 04483 DC40308B 90 CALLNP LOCKWAIT 04484 6080180D 2 91 LD R2 CIX(SSUCHARIN) get the typed character 04485 78840FFF 2 IMM 92 AND R2 0FFF remove the new bit 04486 61001EE1 4 93 LD TCB FPTCB get the TCB for this special device 04487 DC404C29 94 CALLNP CHECKLOGD check for process creation 04488 FE0E448A 95 JMP DONTPUT (R4 eaten on this return) 04489 DC404B21 96 CALLNP PUTINCHAR put character into the buffer 0000448A 97 DONTPUT LABEL 98 PUNLOCK FPCHARINLK release critical region 0448A EC001EE3 98 STZ FPCHARINLK 0448B 0C800000 98 ION 0448C 60978800 2 6 BASE 99 LD R2 SP,INTSTAT restore R2 100 * \ / 0000448D 101 NOSSUCHIN LABEL 0448D 61001EE1 4 102 LD TCB FPTCB get the TCB for this special device 0448E F6B24493 2 103 JBT R2/IPRSSUSTAT/SSUIMCO DOCHAROUT jump if interrupt caused by 104 * ready for char output 105 * check to see if we must start output 0448F 5C091F1A 4 ZBM 106 CMZ TCB,TCTTOBP are there characters to output? 04490 FE024497 107 JEQ NOSSUCHOUT jump if not 04491 D1C01EE2 108 SETT FPTERMBZY is it already busy? 04492 FE024497 109 JEQ NOSSUCHOUT jump if so - int will happen yet 110 * \ / 00004493 111 DOCHAROUT LABEL 04493 DC4049DC 112 CALLNP GETOUTCHAR get an output char 04494 FE0E44B9 113 JMP NOCHARS jump if no chars there 04495 E4801808 2 114 ST R2 CIX(SSUCHAROUT) output the char 00004496 115 RESTORR2 LABEL 04496 60978800 2 6 BASE 116 LD R2 SP,INTSTAT restore the WRU word 117 * \ / 00004497 118 NOSSUCHOUT LABEL 04497 F2BE44B8 2 119 JBF R2/IPRSSUSTAT/SSUIMTICK NOTTICKINT 120 * \ / 121 122 ********************************************************************************** 123 * A clock interrupt has occurred. Pass it to the * 124 * proper cpu ( or take it if ours or a don't care ). * 125 ********************************************************************************** 126 127 * \ / 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 912 (TIMER) F 46 SSU Driver - NVM, Clock, Front panel 00004498 128 TICKAGAIN LABEL 129 PLOCK TIMERLOCK acquire the timer queue 04498 0CC00000 129 IOFF 04499 D1C01EF1 129 SETT TIMERLOCK 0449A FE0C449C 129 JNE MA(2+DISPW MA 0) 0449B DC40308B 129 CALLNP LOCKWAIT 0449C 61001EF2 4 130 LD TMR TIMERQ get pointer to head element 0449D FB3044B5 4 131 JZA TMR FAKE jump if nothing in queue 0449E DC404532 132 CALLNP TIMENOW get current time in R0,R1 0449F 66170801 014 BASE 133 CPR2 R0 TMR,TMRTIME check against the elements request 044A0 FE0844B5 134 JLT FAKE jump if not time for the interrupt 135 * that is now at the queue head 044A1 60970800 2 4 BASE 136 LD R2 TMR,TMRLINK get the forward pointer 044A2 E4801EF2 2 137 ST R2 TIMERQ remove this element from the list 138 PUNLOCK TIMERLOCK release the timer queue 044A3 EC001EF1 138 STZ TIMERLOCK 044A4 0C800000 138 ION 139 * \ / 140 141 * Check to see if the request is for this CPU 044A5 60490043 1 4 ZBM 142 LD R1 TMR,TMRCPU see if anyone can do it 044A6 FA4244BB 1 143 JEQZ R1 MEDOIT if anyone, I'll do it 044A7 64400415 1 144 CPR R1 OURSLOT is this request for me? 044A8 FE0244BB 145 JEQ MEDOIT jump if so 146 * only quantums go this way, so we just kick the other CPU 147 PLOCK CPUCOMLOCK wait for critical region 044A9 0CC00000 147 IOFF 044AA D1C01CF5 147 SETT CPUCOMLOCK 044AB FE0C44AD 147 JNE MA(2+DISPW MA 0) 044AC DC40308B 147 CALLNP LOCKWAIT 044AD 0C4044B4 148 STTB IAPRPROTO tell him to cut off the current process 149 PUNLOCK CPUCOMLOCK release critical region 044AE EC001CF5 149 STZ CPUCOMLOCK 044AF 0C800000 149 ION 044B0 DC002F5D 150 CALL SFREEMEM release the queue element 044B1 41440003 IMM 151 PARV TMRLOG indicate its length 044B2 40530000 4 REG 152 PARVL TMR and address 044B3 FE0E4498 153 JMP TICKAGAIN check for the next int 154 * --- 155 044B4 00030004 156 IAPRPROTO VFD BUSCWRITE+CPUCOFFSET+CPUIAPR bus command for IAPR 157 000044B5 158 FAKE LABEL 044B5 DC404567 159 CALLNP SETALARM set up timer to get us back here 160 PUNLOCK TIMERLOCK release the timer queue 044B6 EC001EF1 160 STZ TIMERLOCK 044B7 0C800000 160 ION 161 * \ / 000044B8 162 NOTTICKINT LABEL 044B8 FE0E28B7 163 JMP DISPATCH return from int 164 * --- 165 166 * There are no chars to output so we say output 167 * is no longer busy. 000044B9 168 NOCHARS LABEL 044B9 EC001EE2 169 STZ FPTERMBZY clear the busy flag 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 913 (TIMER) F 46 SSU Driver - NVM, Clock, Front panel 044BA FE0E4496 170 JMP RESTORR2 171 * --- 172 173 ********************************************************************************** 174 * * 175 * We have found a time queue element whose time has * 176 * arrived. We call the requested routine with R3 containing * 177 * the parameter that the user passed with the TIMESET request. * 178 * SP contains a pointer to the resident stack. The called * 179 * routine may destroy all registers except SP. No lists are * 180 * locked, so the called routine may call any resident routine * 181 * including the TIMESET routine. The caller must return! * 182 * * 183 ********************************************************************************** 184 000044BB 185 MEDOIT LABEL 044BB 60891F13 2 4 ZBM 186 LD R2 TMR,TMRPC get the call address 044BC 60D70805 3 4 BASE 187 LD R3 TMR,TMRPARAM give caller param in R3 044BD DC002F5D 188 CALL SFREEMEM release the element 044BE 41440003 IMM 189 PARV TMRLOG indicate the elements length 044BF 40530000 4 REG 190 PARVL TMR and address 044C0 DC568400 2 @R 191 CALLNP @R2 go off to the indicated routine 192 PFAILCHK DISPATCH 044C1 5C00044E 192 CMZ POWERFLAG power-fail restart in progress? 044C2 FE0C28B7 192 JNE DISPATCH jump if so 192 PFAILEN DISPATCH else allow interrupt 044C3 600428B7 0 IMM 192 LD R0 ADR DISPATCH 044C4 E400044F 0 192 ST R0 POWERUPLOC 044C5 59C40800 IMM 192 IORMSR MSRPFINTE 192 PFAILDS then disallow interrupt 044C6 59840800 IMM 192 CLBMSR MSRPFINTE 044C7 EC00044F 192 STZ POWERUPLOC 044C8 FE0E4498 193 JMP TICKAGAIN check new element 194 * --- 195 196 END SSU_INT routine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 914 (TIMER) F 46 SSU Driver - NVM, Clock, Front panel 198 199 ********************************************************************************** 200 * * 201 * SSU_RESET. This routine initializes the SSU that is * 202 * described in CLOCKPF. The current time is fetched and the * 203 * SSUs interrupt mask is initialized. * 204 * * 205 * Eats R0 thru R3. * 206 * Stack required = 5 * 207 * 1 + max ( DQUEONE (4), LOCKWAIT (0) ) * 208 * * 209 ********************************************************************************** 210 211 BLOCK SSU_RESET subroutine 212 ENTRY SSU_RESET 213 214 BEGFRAME 215 ENDFRAME 216 044C9 DD5F8001 6 STAK 217 SSU_RESET ENTRNP PUSH 044CA 60C40086 3 IMM 218 LD PFPTR PNCIX get I/O window page number 044CB 00C01EDE 219 LDPF CLOCKPF set the window to point to the SSU 220 * \ / 044CC 60001801 0 221 LD R0 CIX(SSUCLOCKU) get clock upper half 044CD 60401802 1 222 LD R1 CIX(SSUCLOCKL) get clock lower half 044CE 684403E8 1 IMM 223 UCPR R1 1*MSECSS check for possible rollover 044CF FE0644D1 224 JGE NOROLL jump if clock safely away from rollover point 044D0 60001801 0 225 LD R0 CIX(SSUCLOCKU) get another copy of the upper half 226 * in case the lower carried out while 227 * we were between the LD R0 and R1 000044D1 228 NOROLL LABEL 044D1 6A001EE5 01 229 UCPR2 R0 FDATE check for better value already in! 044D2 FE0844F6 230 JLT BADTIME jump if so, maybe someday reset the clock 044D3 E6001EE5 01 231 ST2 R0 FDATE set current date 000044D4 232 USEASTIME LABEL 044D4 60001810 0 233 LD R0 CIX(SSUBOOTFP) get the buttons at boot 044D5 E4001EE0 0 234 ST R0 FPSWITCHB set indicators to use for bootstrap 044D6 60001811 0 235 LD R0 CIX(SSUFPSWCH) get and save current switches 044D7 E4001EDF 0 236 ST R0 FPSWITCH 044D8 600400C7 0 IMM 237 LD R0 1*SSUIMTICK+1*SSUIMFPS+1*SSUIMNVM+1*SSUIMCI+1*SSUIMCO 238 * interrupt on clock fence, front panel change, 239 * and characters in and out 044D9 5C001EE4 240 CMZ SSUVER is this a new SSU? 044DA FE0244E4 241 JEQ NOSETCLOCK if so, skip set up for SSU to set FDATE 242 * \ / 243 244 ********************************************************************************** 245 * * 246 * New SSUs (REV 0D and up) will set the operating system's * 247 * clock in memory. We must however request this service of the * 248 * SSU and tell it where in memory we keep our clock. * 249 * * 250 ********************************************************************************** 251 252 * \ / 044DB 60441EE5 1 IMM 253 LD R1 ADR FDATE where we want the SSU to store the time 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 915 (TIMER) F 46 SSU Driver - NVM, Clock, Front panel 044DC 60CA5C80 3 1 CBM 254 LD PFPTR R1/PAGEFIELD get the page number 044DD 7CC40080 3 IMM 255 IOR PFPTR MONPF make monitor page number 044DE 80920000 0 REG 256 PFRD R0 get the physical location 044DF E40A54C0 0 1 CBM 257 ST R0 R1/FLDABSPG mix in with the virtual address 044E0 E44A1560 1 0 CBM 258 ST R1 R0/PAGEANDISP add page and displacement to slot number 044E1 E4001817 0 259 ST R0 CIX(SSUCLOKAD) set address of FDATE 044E2 60C40086 3 IMM 260 LD PFPTR PNCIX reload I/O window page number 044E3 600400D7 0 IMM 261 LD R0 1*SSUIMTICK+1*SSUIMFPS+1*SSUIMNVM+1*SSUIMCI+1*SSUIMCO+1*SSUIMCLKSTR 262 * interrupt on clock fence, front panel 263 * change, characters in and out, and 264 * \ / our clock word in memory (FDATE). 265 000044E4 266 NOSETCLOCK LABEL 044E4 E400180F 0 267 ST R0 CIX(SSUINTMASK) set up what to interrupt for 044E5 60001802 0 268 LD R0 CIX(SSUCLOCKL) get the current clock 044E6 18040002 0 IMM 269 ADD R0 2 ensure that the fence is ahead of the clock 044E7 E4001809 0 270 ST R0 CIX(SSUFENCE) cause him to interrupt now 044E8 EC001EE2 271 STZ FPTERMBZY ensure restart of output 272 273 PLOCK NVMBSYLOCK lock the NVM 044E9 0CC00000 273 IOFF 044EA D1C01EF4 273 SETT NVMBSYLOCK 044EB FE0C44ED 273 JNE MA(2+DISPW MA 0) 044EC DC40308B 273 CALLNP LOCKWAIT 044ED EC001EF5 274 STZ NVMBSYFLAG say no longer busy 275 PUNLOCK NVMBSYLOCK then release the lock 044EE EC001EF4 275 STZ NVMBSYLOCK 044EF 0C800000 275 ION 000044F0 276 LETGOMORE LABEL 044F0 DC00354F 277 CALL DQUEONE release anyone waiting 044F1 41001DAC 278 PAR SQDIOWAIT from this queue 044F2 40441EF4 IMM 279 PARVL ADR NVMBSYLOCK waiting for the NVM 044F3 FA0C44F0 0 280 JNEZ R0 LETGOMORE jump if someone was released, 281 * \ / we want to clean out the queue 044F4 80D2C000 3 REG 282 PFRC PFPTR destroy the mapping 044F5 5D1F8001 6 STAK 283 LEAVE POP return 284 * --- 285 286 ********************************************************************************** 287 * * 288 * We come here if the clock has died during a power * 289 * failure or other anomaly causing a timeout. This may also * 290 * occur if an FS type is adjusting the clock back. If it is a * 291 * short interval, just stay here until the clock passes FDATE. * 292 * If it is a long interval, fix the times in the TIMERQ and * 293 * hope that you don't get a file serial number duplicate. We * 294 * won't stop here during boot because FDATE is initialized to * 295 * zeros. INITPROC will fix the clock. * 296 * * 297 ********************************************************************************** 298 000044F6 299 BADTIME LABEL 044F6 00880700 300 STOP STOPH0700 clock went backwards 044F7 FE0E44D4 301 JMP USEASTIME 302 * --- 303 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 916 (TIMER) F 46 SSU Driver - NVM, Clock, Front panel 304 END SSU_RESET subroutine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 917 (TIMER) F 46 SSU Driver - NVM, Clock, Front panel 306 307 ********************************************************************************** 308 * * 309 * TIMER SET ROUTINE * 310 * This routine keeps track of the entire queue of clock * 311 * requests. The set routine inserts new entries into the queue * 312 * in time order, resetting the interval timer if a new entry * 313 * goes on at the head of the queue. * 314 * Interrupts MUST be off when called. * 315 * SP = stack pointer * 316 * CALL TIMESET destroys R0, R1, and R2 before the * 317 * parameters are passed * 318 * caller must not destroy R2 * 319 * PARV2 * 320 * PARV * 321 * PAR * 322 * PARVL * 323 * * 324 * * 325 * CALLED ROUTINE * 326 * When the time is up, a CALLNP to the callback location * 327 * is executed. The interrupts are off. The called routine * 328 * must be resident (must not page fault). The parameter is * 329 * in R3 at that time. SP contains a stack pointer. The * 330 * entire stack is available to the called routine. The * 331 * called routine may destroy any registers except SP, but it * 332 * must return. The called routine may call TIMESET or any of * 333 * the other SSU routines. * 334 * * 335 * Eats R0:R3, sets R4 * 336 * Stack required = 2 * 337 * 1 + max ( LOCKWAIT (0), SETALARM (1), SGETMEM (0), * 338 * TIMENOW (1) ) * 339 * * 340 ********************************************************************************** 341 342 BLOCK TIMESET subroutine 343 ENTRY TIMESET 344 345 BEGFRAME 346 ENDFRAME 347 044F8 DD9F8001 6 STAK 348 TIMESET ENTRS PUSH 044F9 DC002ED0 349 CALL SGETMEM get a piece of memory 044FA 40440003 IMM 350 PARVL TMRLOG for the timer queue element 044FB 60920000 2 0 REG 351 LD R2 R0 copy the pointer 044FC DCD3C000 7 REG 352 EXPCS R7 back to pick up the parameters 044FD C3568801 2 BASE 353 STPV2 R2,TMRTIME save the time interval 044FE C1488043 2 ZBM 354 STPV R2,TMRCPU ... the cpu number 044FF C1089F13 2 ZBM 355 STP R2,TMRPC ... the callback address 04500 C0568805 2 BASE 356 STPVL R2,TMRPARAM ... and the parameter 04501 61128000 4 2 REG 357 LD TMR R2 copy the pointer 04502 DC404532 358 CALLNP TIMENOW get current time in R0,R1 04503 9A170801 014 BASE 359 ADD2M R0 TMR,TMRTIME make time interval into actual time 360 PLOCK TIMERLOCK lock the timer queue 04504 0CC00000 360 IOFF 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 918 (TIMER) F 46 SSU Driver - NVM, Clock, Front panel 04505 D1C01EF1 360 SETT TIMERLOCK 04506 FE0C4508 360 JNE MA(2+DISPW MA 0) 04507 DC40308B 360 CALLNP LOCKWAIT 361 04508 BC001EF0 0 362 INCL R0 TIMESERIAL get the next available serial number 04509 E4170804 0 4 BASE 363 ST R0 TMR,TMRSERIAL save in element 364 0450A 62970801 234 BASE 365 LD2 R2 TMR,TMRTIME get insertion sort value (time of int) 0450B 60441EF2 1 IMM 366 LD R1 ADR TIMERQ get address of list head 0450C 60001EF2 0 367 LD R0 TIMERQ and address of first element 0450D 4E960801 230 BASE 368 RLSLE2 R2 R0,TMRTIME now search for insertion point 369 0450E E4170800 0 4 BASE 370 ST R0 TMR,TMRLINK hook tail of list behind us 0450F E5164800 4 1 BASE 371 ST TMR R1,TMRLINK insinuate us into the list 04510 64441EF2 1 IMM 372 CPR R1 ADR TIMERQ check for us being new first element 04511 FE0C4513 373 JNE INSERTDONE jump if not 374 * \ / 375 376 ********************************************************************************** 377 * * 378 * The element that is now the head of the list needs * 379 * to have the clock set to correspond to it. * 380 * * 381 ********************************************************************************** 382 383 * \ / 04512 DC404567 384 CALLNP SETALARM set up timer to reflect this element 00004513 385 INSERTDONE LABEL 04513 61170804 4 4 BASE 386 LD TMR TMR,TMRSERIAL get this elements serial number 387 PUNLOCK TIMERLOCK release the timer queue 04514 EC001EF1 387 STZ TIMERLOCK 04515 0C800000 387 ION 04516 5D1F8001 6 STAK 388 LEAVE POP 389 * --- 390 391 END TIMESET subroutine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 919 (TIMER) F 46 SSU Driver - NVM, Clock, Front panel 393 394 ********************************************************************************** 395 * * 396 * TIME KILL ROUTINE * 397 * This routine is called when an already set up * 398 * time interrupt must be deleted. This routine searches * 399 * the queue for the indicated interrupt and removes it * 400 * from the queue. We reset the alarm if we removed the * 401 * first element. * 402 * Interrupts MUST be off to call this routine!!!! * 403 * It is possible for the interrupt to already be * 404 * posted in the hardware, however, this condition should * 405 * be handled okay by the interrupt routine. * 406 * Call: * 407 * interrupts off * 408 * TMR = serial number of time queue element * 409 * SP = stack pointer * 410 * CALLNP TIMEKILL * 411 * * 412 * * 413 * Eats R0:R3, TMR * 414 * Stack required = 2 * 415 * 1 + max( LOCKWAIT (0), SETALARM (1), SFREEMEM (0), * 416 * TIMENOW (1) ) * 417 * * 418 ********************************************************************************** 419 420 BLOCK TIMEKILL subroutine 421 ENTRY TIMEKILL 422 423 BEGFRAME 424 ENDFRAME 425 04517 DD5F8001 6 STAK 426 TIMEKILL ENTRNP PUSH 427 PLOCK TIMERLOCK lock the timer queue 04518 0CC00000 427 IOFF 04519 D1C01EF1 427 SETT TIMERLOCK 0451A FE0C451C 427 JNE MA(2+DISPW MA 0) 0451B DC40308B 427 CALLNP LOCKWAIT 0451C 60001EF2 0 428 LD R0 TIMERQ get the list head 0451D 38401EF2 1 429 LEA R1 TIMERQ get address of the list head 0451E 49160804 4 0 BASE 430 RLSRCH TMR R0,TMRSERIAL search for element with desired SN 0451F FE0C452F 431 JNE TIMEKGONE jump if element not in list 04520 61120000 4 0 REG 432 LD TMR R0 copy address of element 04521 60960800 2 0 BASE 433 LD R2 R0,TMRLINK get the forward ptr from this element 04522 E4964800 2 1 BASE 434 ST R2 R1,TMRLINK remove us from the list 04523 19C40001 7 IMM 435 ADD R7 1 advance the return address 04524 64441EF2 1 IMM 436 CPR R1 ADR TIMERQ check, were we first? 437 * Condition bits saved until later 04525 DC404532 438 CALLNP TIMENOW 04526 32170801 014 BASE 439 RSB2 R0 TMR,TMRTIME calculate now to requested 04527 60840000 2 IMM 440 LD R2 0 04528 FA18452A 0 441 JLTZ2 R0 NOTPASSED if time went by return zero 04529 60924000 2 1 REG 442 LD R2 R1 return real difference 443 * \ / 444 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 920 (TIMER) F 46 SSU Driver - NVM, Clock, Front panel 0000452A 445 NOTPASSED LABEL 0452A DC002F5D 446 CALL SFREEMEM release this element 0452B 41440003 IMM 447 PARV TMRLOG indicate the size 0452C 40530000 4 REG 448 PARVL TMR and address 0452D FE0C452F 449 JNE TIMEKGONE jump if we didn't touch first queue element 0452E DC404567 450 CALLNP SETALARM re-set the fence if needed 451 * \ / 452 0000452F 453 TIMEKGONE LABEL 454 PUNLOCK TIMERLOCK release the timer queue 0452F EC001EF1 454 STZ TIMERLOCK 04530 0C800000 454 ION 04531 5D1F8001 6 STAK 455 LEAVE POP 456 * --- 457 458 END TIMEKILL subroutine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 921 (TIMER) F 46 SSU Driver - NVM, Clock, Front panel 460 461 ********************************************************************************** 462 * * 463 * TIMENOW * 464 * This routine goes to the clock and determines the * 465 * current time. FDATE is set to the current time, except * 466 * that it may not decrease. * 467 * Fetches from the SSU are slower than memory fetches. * 468 * In order to avoid constantly checking the clock upper * 469 * half ( which only changes once every six weeks ) we check * 470 * to see if the the right half is smaller than it was on * 471 * the previous check. If the new right half is smaller, * 472 * we assume that the rollover has recently occurred and * 473 * we read the upper half from the SSU. * 474 * The newer revision SSUs will update FDATE for us so * 475 * we check for a new SSU and if it is there pick up FDATE. * 476 * Call: * 477 * SP = stack pointer * 478 * CALLNP TIMENOW * 479 * * 480 * Eats R0, R1, R3 * 481 * stack required = 1 * 482 * * 483 ********************************************************************************** 484 485 BLOCK TIMENOW subroutine 486 ENTRY TIMENOW 487 488 BEGFRAME 489 ENDFRAME 490 04532 DD5F8001 6 STAK 491 TIMENOW ENTRNP PUSH 04533 5C001EE4 492 CMZ SSUVER new SSU? 04534 FE0C4547 493 JNE QUICKTIME if so don't waste time here 494 * \ / 495 496 PLOCK FDATELOCK get access to FDATE for modify 04535 0CC00000 496 IOFF 04536 D1C01EE8 496 SETT FDATELOCK 04537 FE0C4539 496 JNE MA(2+DISPW MA 0) 04538 DC40308B 496 CALLNP LOCKWAIT 04539 60C40086 3 IMM 497 LD PFPTR PNCIX set up for channel page 0453A 00C01EDE 498 LDPF CLOCKPF point to the clock board 0453B 60001EE5 0 499 LD R0 FDATE 0453C 60401802 1 500 LD R1 CIX(SSUCLOCKL) fetch the current clock value 0453D 68401EE6 1 501 UCPR R1 FDATE(1) check to see if recently rolled over 0453E FE044540 502 JGT TOK jump if rollover unlikely 0453F 60001801 0 503 LD R0 CIX(SSUCLOCKU) may have rolled, get new upper 00004540 504 TOK LABEL 04540 80D2C000 3 REG 505 PFRC PFPTR unmap from the clock 04541 66001EE5 01 506 CPR2 R0 FDATE check against current date 04542 FE084544 507 JLT NOCHANGE jump if FDATE has counted faster than clock 04543 E6001EE5 01 508 ST2 R0 FDATE update time 00004544 509 NOCHANGE LABEL 510 PUNLOCK FDATELOCK release lock 04544 EC001EE8 510 STZ FDATELOCK 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 922 (TIMER) F 46 SSU Driver - NVM, Clock, Front panel 04545 0C800000 510 ION 04546 5D1F8001 6 STAK 511 LEAVE POP return 512 * --- 513 00004547 514 QUICKTIME LABEL 04547 62001EE5 01 515 LD2 R0 FDATE pick up the time 04548 5D1F8001 6 STAK 516 LEAVE POP and get out of here 517 * --- 518 519 END TIMENOW subroutine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 923 (TIMER) F 46 SSU Driver - NVM, Clock, Front panel 521 522 ********************************************************************************** 523 * * 524 * Routines to get file sequence numbers and dates. * 525 * GETDATE and GETFSEQN return a 44 bit clock value in R0,R1. * 526 * GETFDATE returns a 32 bit date in R0. * 527 * Stack required = 1 * 528 * * 529 ********************************************************************************** 530 531 BLOCK GETDATE subroutine 532 ENTRY GETDATE 533 534 BEGFRAME 535 ENDFRAME 536 04549 DD5F8001 6 STAK 537 GETDATE ENTRNP PUSH 0454A 62001EE5 01 538 LD2 R0 FDATE get the current clock 0454B 68441388 1 IMM 539 UCPR R1 5*MSECSS check for recent rollover 0454C FE06454E 540 JGE GETDALV falls through for 5 seconds every six weeks 0454D 60001EE5 0 541 LD R0 FDATE reload the upper half to ensure 542 * that the halves make sense together 0000454E 543 GETDALV LABEL 0454E 5D1F8001 6 STAK 544 LEAVE POP return 545 * --- 546 547 END GETDATE subroutine 548 549 BLOCK GETFDATE subroutine 550 ENTRY GETFDATE 551 552 BEGFRAME 553 ENDFRAME 554 0454F DD5F8001 6 STAK 555 GETFDATE ENTRNP PUSH 04550 60101EE7 0 @ 556 LD R0 @FDATEPTR set R0 to current date, short form 04551 5C0A1940 0 CBM 557 CMZ R0/BITS 12:31 check part that came from low word 04552 FE0C4554 558 JNE GETFDLV jump if not near rollover 04553 60101EE7 0 @ 559 LD R0 @FDATEPTR get again if maybe just rolled over 00004554 560 GETFDLV LABEL 04554 5D1F8001 6 STAK 561 LEAVE POP 562 * --- 563 564 END GETFDATE subroutine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 924 (TIMER) F 46 SSU Driver - NVM, Clock, Front panel 566 567 ********************************************************************************** 568 * * 569 * GETFSEQN * 570 * This routine is used to get a unique serial number in * 571 * R0:R1. The number used is FDATE. This number represents the * 572 * current time, however, it is advanced after it is picked up * 573 * for serial number use. When a clock interrupt comes in, it * 574 * can never set FDATE back. * 575 * As an undesirable side effect, a user can actually cause * 576 * FDATE to advance faster than real time. This might produce * 577 * some awkwardness when FDATE is used as the actual time, but * 578 * tough. * 579 * If a new SSU is on the system it is keeping FDATE * 580 * constantly correct. In this case we cannot set FDATE ahead * 581 * and assure unique serial numbers so we keep the most recent * 582 * dispensed serial number in FSNDATE and if FDATE is smaller or * 583 * equal to this increment FSNDATE and hand that back as the new * 584 * serial number. * 585 * * 586 ********************************************************************************** 587 588 BLOCK GETFSEQN subroutine 589 ENTRY GETFSEQN 590 591 BEGFRAME 592 ENDFRAME 593 04555 DD5F8001 6 STAK 594 GETFSEQN ENTRNP PUSH 595 PLOCK FDATELOCK ensure no competition for update 04556 0CC00000 595 IOFF 04557 D1C01EE8 595 SETT FDATELOCK 04558 FE0C455A 595 JNE MA(2+DISPW MA 0) 04559 DC40308B 595 CALLNP LOCKWAIT 0455A 62001EE5 01 596 LD2 R0 FDATE get the current clock 0455B 5C001EE4 597 CMZ SSUVER new SSU? 0455C FE0C4561 598 JNE NEWWAY if so do this the new way 599 * \ / 600 0455D D2001EE5 601 INC2 FDATE increase the time to ensure uniqueness 0000455E 602 UNDOFLOCK LABEL 603 PUNLOCK FDATELOCK release the lock 0455E EC001EE8 603 STZ FDATELOCK 0455F 0C800000 603 ION 04560 5D1F8001 6 STAK 604 LEAVE POP return 605 * --- 606 00004561 607 NEWWAY LABEL 04561 6A001EE9 01 608 UCPR2 R0 FSNDATE is FDATE newer than FSNDATE? 04562 FE044565 609 JGT HAVESN if so then use it 04563 62001EE9 01 610 LD2 R0 FSNDATE use FSNDATE instead 04564 D2140000 01 PAIR 611 INC2 PAIR R0 make it unique 00004565 612 HAVESN LABEL 04565 E6001EE9 01 613 ST2 R0 FSNDATE save for next time 04566 FE0E455E 614 JMP UNDOFLOCK unlock and leave 615 * --- 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 925 (TIMER) F 46 SSU Driver - NVM, Clock, Front panel 616 617 END GETFSEQN subroutine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 926 (TIMER) F 46 SSU Driver - NVM, Clock, Front panel 619 620 ********************************************************************************** 621 * * 622 * SETALARM * 623 * This routine sets up the fence register to provide an * 624 * interrupt at the time indicated by the first queue element. * 625 * We make the assumption that no interval exceeds 65535 * 626 * milliseconds. If longer intervals exist, we may get fake * 627 * interrupts because of fence aliasing. The CPR2 in the * 628 * interrupt handler will sort them out. This will only be * 629 * a consideration during initialization, since during normal * 630 * system operation there are always one second front panel * 631 * interrupts, two second TICK interrupts, etc. * 632 * * 633 * Eats R0, R3 * 634 * Uses CIX window * 635 * Stack required = 1 * 636 * * 637 ********************************************************************************** 638 639 BLOCK SETALARM subroutine 640 ENTRY SETALARM 641 642 BEGFRAME 643 ENDFRAME 644 04567 DD5F8001 6 STAK 645 SETALARM ENTRNP PUSH 04568 60C40086 3 IMM 646 LD PFPTR PNCIX set up for channel page 04569 00C01EDE 647 LDPF CLOCKPF point to the clock board 0456A 60001EF2 0 648 LD R0 TIMERQ get the head of the queue 0456B FA304570 0 649 JZA R0 SETALARMY jump if nothing there 0456C 60160802 0 0 BASE 650 LD R0 R0,TMRTIME(1) get the time for the interrupt 0000456D 651 SETALARMX LABEL 0456D E4001809 0 652 ST R0 CIX(SSUFENCE) set the fence value 0456E 80D2C000 3 REG 653 PFRC PFPTR unmap the virtual page 0456F 5D1F8001 6 STAK 654 LEAVE POP return 655 * --- 656 00004570 657 SETALARMY LABEL 04570 60001802 0 658 LD R0 CIX(SSUCLOCKL) get the current time 04571 180403E8 0 IMM 659 ADD R0 MSECSS make time in the near future 04572 FE0E456D 660 JMP SETALARMX pretend came from legitimate queue element 661 * --- 662 663 END SETALARM subroutine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 927 (TIMER) F 46 SSU Driver - NVM, Clock, Front panel 665 666 ********************************************************************************** 667 * * 668 * CLOCK ADJUSTER * 669 * Clock adjust routine. This routine will slowly (so as * 670 * not to frighten the accounting routines or user benchmarks) * 671 * adjust the clock on the SSU. If the FDATERROR word is * 672 * positive, we add one to the clock and decrement FDATERROR * 673 * each time through. Conversly for a fast clock. * 674 * The frequency with which this routine is scheduled * 675 * has been set to provide 1000 ppm as the correction rate. * 676 * * 677 * Stack required = 2 * 678 * 0 + TIMESET(2) * 679 * * 680 ********************************************************************************** 681 682 BLOCK TIMEADJUST subroutine 683 ENTRY TIMEADJUST 684 04573 DD534000 5 REG 685 TIMEADJUST ENTRNP R5 04574 5C001EED 686 CMZ FDATERROR check sense of correction term 04575 FE024582 687 JEQ TAEXIT jump if no offset error 04576 60C40086 3 IMM 688 LD PFPTR PNCIX get the I/O window page number 04577 00C01EDE 689 LDPF CLOCKPF make point to clock 04578 FE084583 690 JLT TARETARD jump if clock fast 04579 EDC01803 691 STW CIX(SSUINCCLK) add extra tick to clock 0457A D0401EED 692 DEC FDATERROR and remove one from correction term 0000457B 693 TAUNLOAD LABEL 0457B 80D2C000 3 REG 694 PFRC PFPTR unmap the clock 0457C FE024582 695 JEQ TAEXIT avoid rescheduling if not needed 0457D DC0044F8 696 CALL TIMESET call the timer routine 0457E 434403E8 IMM 697 PARV2 1000 indicate interval to next correction 0457F 41440000 IMM 698 PARV 0 don't care which CPU 04580 41004573 699 PAR TIMEADJUST come to this routine 04581 40440000 IMM 700 PARVL 0 parameter is don't care 00004582 701 TAEXIT LABEL 04582 5D134000 5 REG 702 LEAVE R5 return 703 * --- 704 00004583 705 TARETARD LABEL code for fast clock 04583 EDC01804 706 STW CIX(SSUDECCLK) subtract one tick 04584 D0001EED 707 INC FDATERROR and adjust correction term 04585 FE0E457B 708 JMP TAUNLOAD return to main line code 709 * --- 710 711 END TIMEADJUST subroutine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 928 (TIMER) F 46 SSU Driver - NVM, Clock, Front panel 713 714 ********************************************************************************** 715 * * 716 * Clock rate fixer. The system clock is driven by a * 717 * quartz crystal oscillator and has the following error * 718 * sources: * 719 * 1) initial rate error (accuracy) 10 ppm * 720 * 2) crystal aging 5 ppm/year * 721 * 3) temperature stability 5 ppm (0-50 C) * 722 * When the system operator specifies a clock error (as * 723 * number of seconds fast or slow) the system, in addition to * 724 * setting FDATERROR to accomplish the correction, calculates * 725 * FDATEDRFT, the total apparent error in the clock rate. * 726 * FDATEDRFT is set up as the number of parts per billion * 727 * error in the clock. * 728 * Positive means add ticks. Negative means delete ticks. * 729 * Stack required = 2 * 730 * 0 + TIMESET(2) * 731 * * 732 ********************************************************************************** 733 734 BLOCK TIMEDRFT subroutine 735 ENTRY TIMEDRFT 736 04586 DD534000 5 REG 737 TIMEDRFT ENTRNP R5 04587 61001EEE 4 738 LD R4 FDATEDRFT get the rate error factor 04588 FB024596 4 739 JEQZ R4 TAEXIT jump if no error indicated 04589 60C40086 3 IMM 740 LD PFPTR PNCIX get the I/O window page number 0458A 00C01EDE 741 LDPF CLOCKPF make point to clock 0458B FB044597 4 742 JGTZ R4 CLKRUP jump if we must add ticks 0458C EDC01804 743 STW CIX(SSUDECCLK) subtract a tick from the clock 0458D 71130000 4 4 REG 744 LDN R4 R4 make factor positive 0000458E 745 CLKRUNLOAD LABEL 0458E 80D2C000 3 REG 746 PFRC PFPTR clear the page file for the I/O window 0458F DC0044F8 747 CALL TIMESET set up an interrupt 04590 62130000 014 REG 748 LD2 R0 R4 get the magnitude of the error (in PPB) 04591 36004599 01 749 RDV2 R0 ABILLION produce the interval between correction ticks 04592 43540000 01 PAIR 750 PARV2 PAIR R0 pass the interval 04593 41440000 IMM 751 PARV 0 don't care which CPU 04594 41004586 752 PAR TIMEDRFT routine to call 04595 40440000 IMM 753 PARVL 0 don't care parameter 00004596 754 TAEXIT LABEL 04596 5D134000 5 REG 755 LEAVE R5 return to caller 756 * --- 757 00004597 758 CLKRUP LABEL 04597 EDC01803 759 STW CIX(SSUINCCLK) add an extra count to the clock 04598 FE0E458E 760 JMP CLKRUNLOAD return to main line code 761 * --- 762 0459A 3B9ACA00 763 ABILLION VFD 0,1000000000 a billion 764 765 END TIMEDRFT subroutine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 929 (TIMER) F 46 SSU Driver - NVM, Clock, Front panel 767 768 ********************************************************************************** 769 * One hour interrupt routine. Note that this routine * 770 * recalculates the next interrupt each time. This is so it * 771 * always happens on the hour (except for a single execution * 772 * following a system stop). We prevent two interrupts within * 773 * one minute of each other by a special check. The only thing * 774 * that this routine does is to create a process that will write * 775 * the current time and clock correction numbers onto the * 776 * security block. A process must be created because of the * 777 * required disk transfers. If the time happens to be off due * 778 * to the 6 week rollover, we will have an extra hourint and * 779 * then it will reset. * 780 * * 781 * Stack required = 4. * 782 * 1 + max ( BLDPROCESS(2), MAPINMEM (3), SETRUNNING(2), * 783 * TIMESET (2) ) * 784 * * 785 ********************************************************************************** 786 787 BLOCK HOURINT subroutine 788 ENTRY HOURINT 789 790 BEGFRAME 791 ENDFRAME 792 0459B DD5F8001 6 STAK 793 HOURINT ENTRNP PUSH 0459C 62801EE5 23 794 LD2 R2 FDATE R2,R3 = now 0459D 58C40010 IMM 795 IORPSR PSRMODIF turn on funny arithmetic 0459E 1480255B 2 796 DIV R2 ONEHOUR R3 = amount into the hour 0459F 58840010 IMM 797 CLBPSR PSRMODIF restore normalcy 045A0 30C0255B 3 798 RSB R3 ONEHOUR R3 = amount until next hour 045A1 64C4EA60 3 IMM 799 CPR R3 1*MSECSM greater than one minute? 045A2 FE0645A4 800 JGE WAITTHIS jump if long time 045A3 18C0255B 3 801 ADD R3 ONEHOUR if less then 1 min, wait out a full hour 000045A4 802 WAITTHIS LABEL 045A4 DC0044F8 803 CALL TIMESET set up interrupt for next hour 045A5 4352C000 3 REG 804 PARV2 R3 pass calculated time to next hour 045A6 41440000 IMM 805 PARV 0 don't care which CPU 045A7 4100459B 806 PAR HOURINT call this routine again 045A8 40440000 IMM 807 PARVL 0 no parameter 808 * \ / 809 * build hour processing routine 045A9 0CC00000 810 IOFF we must not be interrupted 045AA DC0035D2 811 CALL BLDPROCESS build the process 045AB 4144F1F0 IMM 812 PARV MONMSR indicate what for MSR 045AC 434045B4 813 PARV2 HOURPROCNM pass the name 045AD 414454C5 IMM 814 PARV ADR HOURPROC indicate where the process is to start 045AE 40440001 IMM 815 PARVL 1 this is a system process 045AF DC402B99 816 CALLNP SETRUNNING set this new process running 045B0 DC0025EB 817 CALL MAPINMEM re-map original caller 045B1 40400412 818 PARVL CPPSA pointer to the PSA 045B2 0C800000 819 ION turn interrupts back on 820 * \ / 821 * return to the clock driver 045B3 5D1F8001 6 STAK 822 LEAVE POP 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 930 (TIMER) F 46 SSU Driver - NVM, Clock, Front panel 823 * --- 824 045B4 B674F8A9 825 HOURPROCNM PAK12 SYS_HOURPROC 826 827 END HOURINT subroutine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 931 (TIMER) F 46 SSU Driver - NVM, Clock, Front panel 829 830 ********************************************************************************** 831 * * 832 * NVMREAD * 833 * Routine to read a single byte from the NVM. * 834 * Caller may be suspended. * 835 * Call: * 836 * CALL NVMREAD * 837 * PARVL
* 838 * Eats R0, R1. Value returned in R1. * 839 * Stack required = 3 * 840 * 3 + max ( LOCKWAIT (0), SUSPENDME (0) ) * 841 * * 842 ********************************************************************************** 843 844 BLOCK NVMREAD subroutine 845 ENTRY NVMREAD to read a single byte from the NVM 846 847 BEGFRAME 00178801 6 BASE 848 DATASAVE BSS 1 to save the data byte 00178802 6 BASE 849 REGSAVE BSS 1 to save registers 850 ENDFRAME 851 045B6 DD1F8003 6 STAK 852 NVMREAD ENTR PUSH 045B7 C0524000 1 REG 853 STPVL R1 get desired location 045B8 E4D78802 3 6 BASE 854 ST PFPTR SP,REGSAVE save this register 000045B9 855 RDNVMOVER LABEL 856 PLOCK NVMBSYLOCK gain access to the controlling flag 045B9 0CC00000 856 IOFF 045BA D1C01EF4 856 SETT NVMBSYLOCK 045BB FE0C45BD 856 JNE MA(2+DISPW MA 0) 045BC DC40308B 856 CALLNP LOCKWAIT 045BD 5C001EF5 857 CMZ NVMBSYFLAG check for long operation in progress 045BE FE0C45CB 858 JNE SUSP4NVM jump if NVM busy with write 045BF 60C40086 3 IMM 859 LD PFPTR PNCIX get I/O window page number 045C0 60001EDE 0 860 LD R0 CLOCKPF get the normal page map value 045C1 18040001 0 IMM 861 ADD R0 (SSUNVM-SSUCOFFSET)/WPP move to NVM location 045C2 00D20000 0 REG 862 LDPF R0 and set up mapping 045C3 60221800 0 1 863 LD R0 CIX(R1) read out the data 045C4 E4178801 0 6 BASE 864 ST R0 SP,DATASAVE save the byte read 045C5 80D2C000 3 REG 865 PFRC PFPTR destroy the mapping 866 PUNLOCK NVMBSYLOCK release the list 045C6 EC001EF4 866 STZ NVMBSYLOCK 045C7 0C800000 866 ION 045C8 60D78802 3 6 BASE 867 LD PFPTR SP,REGSAVE restore this register 868 * if readers are suspended behind a writer, they 869 * are all released when the writer finishes. 045C9 60578801 1 6 BASE 870 LD R1 SP,DATASAVE get the result to return 045CA 5D1F8003 6 STAK 871 LEAVE POP 872 * --- 873 000045CB 874 SUSP4NVM LABEL 045CB DC00351C 875 CALL SUSPENDME call for suspension 045CC 410045B9 876 PAR RDNVMOVER indicate restart address 045CD 41041EF4 IMM 877 PAR ADR NVMBSYLOCK parameter for shutdown 045CE 41001DAC 878 PAR SQDIOWAIT use direct I/O wait queue 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 932 (TIMER) F 46 SSU Driver - NVM, Clock, Front panel 045CF 40001EF4 879 PARL NVMBSYLOCK what to unlock 880 * --- 881 882 END NVMREAD subroutine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 933 (TIMER) F 46 SSU Driver - NVM, Clock, Front panel 884 885 ********************************************************************************** 886 * * 887 * NVMSTORE * 888 * Routine to store a single byte into the NVM. * 889 * Caller may be suspended. * 890 * Call: * 891 * CALL NVMSTORE eats R1 during parameter passing * 892 * PARV
* 893 * PARVL * 894 * Eats R0, R1 * 895 * Stack required = 3 * 896 * 3 + max ( LOCKWAIT (0), SUSPENDME (0) ) * 897 * * 898 ********************************************************************************** 899 900 BLOCK NVMSTORE subroutine 901 ENTRY NVMSTORE to store a byte into the NVM 902 903 BEGFRAME 00178801 6 BASE 904 DATASAVE BSS 1 place to save the data byte 00178802 6 BASE 905 REGSAVE BSS 1 to save R3 906 ENDFRAME 907 045D0 DD1F8003 6 STAK 908 NVMSTORE ENTR PUSH 045D1 C1524000 1 REG 909 STPV R1 get the address 045D2 C0578801 6 BASE 910 STPVL SP,DATASAVE get the data byte 045D3 E4D78802 3 6 BASE 911 ST PFPTR SP,REGSAVE save this register 000045D4 912 WRNVMOVER LABEL 913 PLOCK NVMBSYLOCK gain access to the flag 045D4 0CC00000 913 IOFF 045D5 D1C01EF4 913 SETT NVMBSYLOCK 045D6 FE0C45D8 913 JNE MA(2+DISPW MA 0) 045D7 DC40308B 913 CALLNP LOCKWAIT 045D8 D1C01EF5 914 SETT NVMBSYFLAG is the NVM busy now? set if not 045D9 FE0245E5 915 JEQ SUSP4WNVM jump if so, we must suspend 045DA 60C40086 3 IMM 916 LD PFPTR PNCIX get the I/O window page number 045DB 60001EDE 0 917 LD R0 CLOCKPF get the normal page map value 045DC 18040001 0 IMM 918 ADD R0 (SSUNVM-SSUCOFFSET)/WPP move to point to NVM 045DD 00D20000 0 REG 919 LDPF R0 set up mapping to NVM 045DE 60178801 0 6 BASE 920 LD R0 SP,DATASAVE get the date byte 045DF E4221800 0 1 921 ST R0 CIX(R1) and do the store 045E0 80D2C000 3 REG 922 PFRC PFPTR undo the mapping 923 PUNLOCK NVMBSYLOCK release the critical region 045E1 EC001EF4 923 STZ NVMBSYLOCK 045E2 0C800000 923 ION 045E3 60D78802 3 6 BASE 924 LD PFPTR SP,REGSAVE restore register for caller 045E4 5D1F8003 6 STAK 925 LEAVE POP return 926 * --- 927 000045E5 928 SUSP4WNVM LABEL 045E5 DC00351C 929 CALL SUSPENDME suspend to await NVM completion 045E6 410045D4 930 PAR WRNVMOVER indicate restart address 045E7 41041EF4 IMM 931 PAR ADR NVMBSYLOCK parameter for shutdown 045E8 41001DAC 932 PAR SQDIOWAIT use direct I/O wait queue 045E9 40001EF4 933 PARL NVMBSYLOCK what to unlock 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 934 (TIMER) F 46 SSU Driver - NVM, Clock, Front panel 934 * --- 935 936 END NVMSTORE subroutine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 935 (TIMER) F 46 SSU Driver - NVM, Clock, Front panel 938 939 ********************************************************************************** 940 * * 941 * READNVM * 942 * This routine is provided to read a specific datum * 943 * from the NVM. * 944 * Call: * 945 * CALL READNVM eats R3 during parameter passing * 946 * PARV * 947 * PARVL
* 948 * * 993 * PARVL
* 994 * Eats R0:R3 * 995 * Stack required = 6 * 996 * 3 + NVMSTORE (3) * 997 * * 998 ********************************************************************************** 999 1000 BLOCK WRITENVM subroutine 1001 ENTRY WRITENVM place a datum into the NVM 1002 1003 BEGFRAME 00178801 6 BASE 1004 DATASPOTW BSS2 0 word address for following 00178004 6 CACH 1005 DATASPOT BSSC 8 place to hold the data word 1006 ENDFRAME 1007 045F9 DD1F8003 6 STAK 1008 WRITENVM ENTR PUSH 045FA E6978801 236 BASE 1009 ST2 R2 SP,DATASPOTW save the data on the stack 045FB C152C000 3 REG 1010 STPV R3 save the size 045FC C0528000 2 REG 1011 STPVL R2 and address 045FD E4CBC040 3 7 CBM 1012 ST R3 R7/BITS 0:3 save the size in R7 045FE 38D78004 3 6 CACH 1013 LEA R3 SP,DATASPOT make pointer to data area on stack 000045FF 1014 NEXTBYTE LABEL 045FF DC0045D0 1015 CALL NVMSTORE place the byte into the NVM 04600 41528000 2 REG 1016 PARV R2 indicate the address 04601 4056C400 3 @R 1017 PARVL @R3 and the data byte 04602 18840001 2 IMM 1018 ADD R2 1 advance the NVM address 04603 D092C000 3 REG 1019 INCP R3 and advance the build pointer 04604 D04BC040 7 CBM 1020 DEC R7/BITS 0:3 decrement the count 04605 FE0445FF 1021 JGT NEXTBYTE jump if still more bytes to go 04606 5D1F8003 6 STAK 1022 LEAVE POP return 1023 * --- 1024 1025 END WRITENVM subroutine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 937 (TIMER) F 46 SSU Driver - NVM, Clock, Front panel 1027 1028 ********************************************************************************** 1029 * * 1030 * FLREADNVM * 1031 * Some data stored in the NVM is duplicated and has * 1032 * a flag indicating which copy to use. Items are updated * 1033 * by changing the copy NOT in use, then changing the flag. * 1034 * Proper flag values are 000 and 0FF. Other values * 1035 * represent a power failure during a previous alteration * 1036 * of the flag (or a defective memory). If other flag values * 1037 * are discovered in the memory, they are overwritten with * 1038 * a 0FF so that everyone will stay together. * 1039 * This routine is provided to read a specific datum * 1040 * from the NVM. * 1041 * Call: * 1042 * CALL FLREADNVM eats R3 during parameter passing * 1043 * PARV * 1044 * PARVL
* 1045 * * 1091 * PARVL
* 1092 * Eats R0:R3 * 1093 * Stack required = 7. * 1094 * 4 + max ( NVMREAD (3), NVMSTORE (3) ) * 1095 * * 1096 ********************************************************************************** 1097 1098 BLOCK FLWRITENVM subroutine 1099 ENTRY FLWRITENVM place a datum into the NVM 1100 1101 BEGFRAME 00178801 6 BASE 1102 DATASPOTW BSS2 0 word address for following 00178004 6 CACH 1103 DATASPOT BSSC 8 place to hold the data word 00178803 6 BASE 1104 ADDWORD BSS 1 holds various address and length items 00098083 6 ZBM 1105 FLAG EQU ADDWORD/CH0 holds the flag read 00099F13 6 ZBM 1106 NVMADDR EQU ADDWORD/FLDADRS holds location of datum 1107 ENDFRAME 1108 04617 DD1F8004 6 STAK 1109 FLWRITENVM ENTR PUSH 04618 E6978801 236 BASE 1110 ST2 R2 SP,DATASPOTW save the data 04619 C152C000 3 REG 1111 STPV R3 save the size 0461A C0499F13 6 ZBM 1112 STPVL SP,NVMADDR and the address 0461B 60899F13 2 6 ZBM 1113 LD R2 SP,NVMADDR fetch up the address for the read 0461C DC0045B6 1114 CALL NVMREAD read the flag from the NVM 0461D 40528000 2 REG 1115 PARVL R2 pass the address 0461E E4498083 1 6 ZBM 1116 ST R1 SP,FLAG save for now 0461F FA424627 1 1117 JEQZ R1 ALTERHI jump if currently using low copy 04620 644400FF 1 IMM 1118 CPR R1 0FF check for other good flag value 04621 FE024628 1119 JEQ ALTERLO jump if currently using high copy 04622 DC0045D0 1120 CALL NVMSTORE fix the flag by storing default 04623 41528000 2 REG 1121 PARV R2 indicate the address 04624 404400FF IMM 1122 PARVL 0FF and the value 04625 D1498083 6 ZBM 1123 STMW SP,FLAG indicate that the flag contains 0FF 04626 FE0E4628 1124 JMP ALTERLO 1125 * --- 1126 00004627 1127 ALTERHI LABEL 04627 1892C000 2 3 REG 1128 ADD R2 R3 advance address to high copy 00004628 1129 ALTERLO LABEL 04628 18840001 2 IMM 1130 ADD R2 1 skip over the flag byte 04629 E4CBC040 3 7 CBM 1131 ST R3 R7/BITS 0:3 save the size in R7 0462A 38D78004 3 6 CACH 1132 LEA R3 SP,DATASPOT make pointer to data area on stack 0000462B 1133 NEXTBYTE LABEL 0462B DC0045D0 1134 CALL NVMSTORE place the byte into the NVM 0462C 41528000 2 REG 1135 PARV R2 indicate the address 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 939 (TIMER) F 46 SSU Driver - NVM, Clock, Front panel 0462D 4056C400 3 @R 1136 PARVL @R3 and the data byte 0462E 18840001 2 IMM 1137 ADD R2 1 advance the NVM address 0462F D092C000 3 REG 1138 INCP R3 and advance the build pointer 04630 D04BC040 7 CBM 1139 DEC R7/BITS 0:3 decrement the count 04631 FE04462B 1140 JGT NEXTBYTE jump if still more bytes to go 1141 * \ / 1142 1143 * Now, indicate that the new word is in place 04632 60899F13 2 6 ZBM 1144 LD R2 SP,NVMADDR get the flags address 04633 60C98083 3 6 ZBM 1145 LD R3 SP,FLAG and the old flag 04634 74C400FF 3 IMM 1146 XOR R3 0FF make the opposite flag 04635 DC0045D0 1147 CALL NVMSTORE and store the new flag value 04636 41528000 2 REG 1148 PARV R2 indicate address 04637 4052C000 3 REG 1149 PARVL R3 and new value 04638 5D1F8004 6 STAK 1150 LEAVE POP return 1151 * --- 1152 1153 END FLWRITENVM subroutine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 940 (TIMER) F 46 Front panel flasher 1156 1157 ********************************************************************************** 1158 * * 1159 * This routine flashes the front panel lights to * 1160 * keep the operator (and anyone else looking) happy. * 1161 * * 1162 * Eats R??? * 1163 * Stack required = 3. * 1164 * 3 + max ( LOCKWAIT (0) ) * 1165 * * 1166 ********************************************************************************** 1167 1168 BLOCK FPFLASHER subroutine 1169 ENTRY FPFLASHER update the front panel display 1170 ENTRY FLASHVAL table of the front panel values 1171 1172 BEGFRAME 00178801 6 BASE 1173 SECONDS BSS 1 number of seconds for clock 00178802 6 BASE 1174 MINUTES BSS 1 number of minutes for clock 1175 ENDFRAME 1176 04639 DD5F8003 6 STAK 1177 FPFLASHER ENTRNP PUSH 0463A 60C40086 3 IMM 1178 LD PFPTR PNCIX 0463B 00C01EDE 1179 LDPF CLOCKPF point to the SSU 1180 * \ / 1181 1182 ********************************************************************************** 1183 * Display the next error message for the operator, if any. * 1184 * If there are none, or if we have just displayed the last one, * 1185 * then do the normal frront panel display. * 1186 ********************************************************************************** 1187 1188 * \ / 1189 PLOCK OPMSGLOCK lock the list of messages 0463C 0CC00000 1189 IOFF 0463D D1C01EA7 1189 SETT OPMSGLOCK 0463E FE0C4640 1189 JNE MA(2+DISPW MA 0) 0463F DC40308B 1189 CALLNP LOCKWAIT 04640 BC001EAA 0 1190 INCL R0 OPMSGDISP get next message number to display 04641 60401EA8 1 1191 LD R1 OPMSGLIST R1 -> first message 04642 4C084181 0 1 ZBM 1192 RLSHLE R0 R1,OPMSGID find next message 04643 FE044652 1193 JGT NORMALDISP jump if no more messages 04644 60084181 0 1 ZBM 1194 LD R0 R1,OPMSGID get id of message found 04645 E4001EAA 0 1195 ST R0 OPMSGDISP save for future reference 04646 60964804 2 1 BASE 1196 LD R2 R1,OPMSGTEXT(2) get characters 9..10 of display 04647 78870000 2 IMM 1197 AND R2 0FFFF0000 mask off chars 11.12 04648 60084010 0 1 ZBM 1198 LD R0 R1,OPMSGHORN get bit for the horn 04649 E40AB410 0 2 CBM 1199 ST R0 R2/SSUHORN set it into the word 0464A EC084010 1 ZBM 1200 STZ R1,OPMSGHORN clear bit so horn only sounds once 0464B EDCAB610 2 CBM 1201 STW R2/SSUALARM set bit for alarm light 0464C 62164802 011 BASE 1202 LD2 R0 R1,OPMSGTEXT get chars 1..8 of display 0464D E600180A 01 1203 ST2 R0 MA ((CIX DISPW MA 0)+SSUDISP03) display chars 1..8 0464E E480180C 2 1204 ST R2 CIX(SSUDISP89) display chars 9..10, alarm, horn 1205 PUNLOCK OPMSGLOCK unlock the lock 0464F EC001EA7 1205 STZ OPMSGLOCK 04650 0C800000 1205 ION 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 941 (TIMER) F 46 Front panel flasher 04651 FE0E46DC 1206 JMP FLSH004 and all done 1207 * --- 1208 00004652 1209 NORMALDISP LABEL 04652 EC001EAA 1210 STZ OPMSGDISP say we are doing normal display 1211 PUNLOCK OPMSGLOCK unlock the list of messages 04653 EC001EA7 1211 STZ OPMSGLOCK 04654 0C800000 1211 ION 1212 * \ / 1213 1214 ********************************************************************************** 1215 * Check the front panel switches to see what we are * 1216 * being asked to display. * 1217 * T R A F : X X X terminal count * 1218 * S E S S : X X X PCCOUNT * 1219 * D R B Z Y : X X X DISKRBUSY * 1220 * B C P U : X X X BUSYCPUS * 1221 * S U N : X X X SYSTEMSUN * 1222 * I D L E P : X X X PPIDLCOUNT * 1223 * D W B Z Y : X X X DISKWBUSY * 1224 * T B U S Y : X X X TERMWBUSY * 1225 * D Y N W : X X X DYNWAIT * 1226 * E C N T : X X X ERRLOGCNT * 1227 * L O A D : X X X LOADFACT * 1228 ********************************************************************************** 1229 1230 * \ / 04655 61401EDF 5 1231 LD R5 FPSWITCH get the front panel switches 04656 7944000F 5 IMM 1232 AND R5 16-1 isolate the relevant bits 04657 FB4246B0 5 1233 JEQZ R5 TIMEFLASH jump if to give the time 04658 1D440003 5 IMM 1234 MUL R5 3 multiply to make table index 04659 606A4681 1 5 1235 LD R1 FLASHVAL(R5) get ptr to value we should display 0465A FA4246B0 1 1236 JEQZ R1 TIMEFLASH no pointer, give time 0465B FA6C4678 1 1237 JEQMW R1 JUSTBLANK this combo is blank display 0465C 602A467F 0 5 1238 LD R0 FIRST(R5) fetch the first 4 chars of display 0465D E400180A 0 1239 ST R0 CIX(SSUDISP03) place the name of the value 0465E 60564400 1 1 @R 1240 LD R1 @R1 fetch the value itself 0465F 60040000 0 IMM 1241 LD R0 0 make into a double word 04660 58C40010 IMM 1242 IORPSR PSRMODIF turn on funny arithmetic 04661 1404000A 0 IMM 1243 DIV R0 10 take out a digit 04662 608046AF 2 1244 LD R2 LAST get some magic unknown quantity 04663 F44A9080 1 2 CBM 1245 XORM R1 R2/CH1 place the rightmost digit 04664 FA024669 0 1246 JEQZ R0 FLSH001 jump if now zero 04665 62120000 010 REG 1247 LD2 R0 R0 make into a double word 04666 1404000A 0 IMM 1248 DIV R0 10 produce another digit 04667 74440030 1 IMM 1249 XOR R1 "0" make into an ascii character 04668 E44A8080 1 2 CBM 1250 ST R1 R2/CH0 store character into display digit 8 00004669 1251 FLSH001 LABEL 04669 E480180C 2 1252 ST R2 CIX(SSUDISP89) place lowest stuff 0466A 60AA4680 2 5 1253 LD R2 MIDDLE(R5) get the middle 4 chars of display 0466B FA024675 0 1254 JEQZ R0 FLSH002 jump if zero suppress 0466C 62120000 010 REG 1255 LD2 R0 R0 make into a double word 0466D 1404000A 0 IMM 1256 DIV R0 10 extract another digit 0466E 74440030 1 IMM 1257 XOR R1 "0" make an ascii digit 0466F E44AB080 1 2 CBM 1258 ST R1 R2/CH3 store into display value 04670 FA024675 0 1259 JEQZ R0 FLSH003 jump if zero suppress 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 942 (TIMER) F 46 Front panel flasher 04671 62120000 010 REG 1260 LD2 R0 R0 make into a double word 04672 1404000A 0 IMM 1261 DIV R0 10 extract a fourth digit 04673 74440030 1 IMM 1262 XOR R1 "0" make into an ascii character 04674 E44AA080 1 2 CBM 1263 ST R1 R2/CH2 store into display value 00004675 1264 FLSH002 LABEL 00004675 1265 FLSH003 LABEL 04675 58840010 IMM 1266 CLBPSR PSRMODIF restore normal arithmetic 04676 E480180B 2 1267 ST R2 CIX(SSUDISP47) place the middle characters 04677 FE0E46DC 1268 JMP FLSH004 return from flasher driver 1269 * --- 1270 1271 * Display only a blank display 00004678 1272 JUSTBLANK LABEL 04678 6000467E 0 1273 LD R0 DISPBLANK get a word of blanks 04679 E400180A 0 1274 ST R0 CIX(SSUDISP03) clear the first 4 characters 0467A E400180B 0 1275 ST R0 CIX(SSUDISP47) and the next 0467B 78070000 0 IMM 1276 AND R0 ONEBITS/(CH0+CH1)*(CH0+CH1) mask off garbage bits 0467C E400180C 0 1277 ST R0 CIX(SSUDISP89) 0467D FE0E46DC 1278 JMP FLSH004 go return 1279 * --- 1280 1281 ********************************************************************************** 1282 * * 1283 * This table is not only used by the SSU driver but it * 1284 * also is used by the OPREQ ORGSYSINFO, to return information * 1285 * about the system. If any changes are made to this table be * 1286 * sure they are compatable with ORGSYSINFO. * 1287 * * 1288 ********************************************************************************** 1289 0467E 20202020 1290 DISPBLANK TEXT " " 1291 0467F 58585858 1292 FIRST TEXT "XXXX" (zero index handled differently) 04680 58585858 1293 MIDDLE TEXT "XXXX" (zero index not used) 04681 00000000 1294 FLASHVAL PTR ZERO (not used) 1295 04682 54524146 1296 TEXT "TRAF: " 04684 00001F02 1297 PTR TERMCOUNT 1298 04685 53455353 1299 TEXT "SESS: " 04687 00001EB0 1300 PTR PCCOUNT 1301 04688 4452425A 1302 TEXT "DRBZY: " 0468A 00001F18 1303 PTR DISKRBUSY 1304 0468B 42435055 1305 TEXT "BCPU: " 0468D 00001D0B 1306 PTR BUSYCPUS 1307 0468E 53554E3A 1308 TEXT "SUN: " 04690 00001EFC 1309 PTR SYSTEMSUN 1310 04691 49444C45 1311 TEXT "IDLEP: " 04693 00001DDA 1312 PTR PPIDLCOUNT 1313 04694 4457425A 1314 TEXT "DWBZY: " 04696 00001F19 1315 PTR DISKWBUSY 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 943 (TIMER) F 46 Front panel flasher 1316 04697 54425553 1317 TEXT "TBUSY: " 04699 00001F05 1318 PTR TERMWBUSY 1319 0469A 44594E57 1320 TEXT "DYNW: " 0469C 00001D0E 1321 PTR DYNWAIT 1322 0469D 45434E54 1323 TEXT "ECNT: " 0469F 00001D98 1324 PTR ERRLOGCNT 1325 046A0 4C4F4144 1326 TEXT "LOAD: " 046A2 00001DD7 1327 PTR LOADFACT 1328 046A5 00000000 1329 VFD 0,0,0 1330 046A8 00000000 1331 VFD 0,0,0 1332 046AB 00000000 1333 VFD 0,0,0 1334 046AE FFFFFFFF 1335 VFD 0,0,-1 1336 046AF 20300000 1337 LAST TEXTZ " 0" 1338 000046B0 1339 TIMEFLASH LABEL 046B0 60401EEF 1 1340 LD R1 TIMEZONE get the timezone indicator 046B1 700A7010 0 1 CBM 1341 LDN R0 R1/BIT 24 get the sign bit 046B2 E40A4180 0 1 CBM 1342 ST R0 R1/BITS 0:23 extend the sign 046B3 1C40255B 1 1343 MUL R1 ONEHOUR convert to milliseconds 046B4 1A001EE5 01 1344 ADD2 R0 FDATE add to now 1345 * could provide bogus display on 6 week boundary 046B5 58C40010 IMM 1346 IORPSR PSRMODIF enable funny arithmetic 046B6 1400255C 0 1347 DIV R0 ONEDAY R0=days since ...,R1=ms in today 046B7 644403E8 1 IMM 1348 CPR R1 1000 check for proximity to midnight 046B8 FE0846E0 1349 JLT DOMIDNIGHT jump if less than one second after 046B9 644046F1 1 1350 CPR R1 NOONTIME check for proximity to noon 046BA FE0846BD 1351 JLT NOTNOON jump if not yet noon 046BB 644046F2 1 1352 CPR R1 NOONTIMEPE check for noon + 1 second 046BC FE0846E7 1353 JLT DONOON jump if within one second of noon 000046BD 1354 NOTNOON LABEL 046BD 62924000 231 REG 1355 LD2 R2 R1 046BE 148403E8 2 IMM 1356 DIV R2 1000 R2=seconds in today, R3=ms in second 046BF 62928000 232 REG 1357 LD2 R2 R2 046C0 1484003C 2 IMM 1358 DIV R2 60 R2=minutes in today, R3=seconds 046C1 E4D78801 3 6 BASE 1359 ST R3 SP,SECONDS save seconds 046C2 62928000 232 REG 1360 LD2 R2 R2 046C3 1484003C 2 IMM 1361 DIV R2 60 R2=hours, R3=minutes 046C4 E4D78802 3 6 BASE 1362 ST R3 SP,MINUTES 046C5 62928000 232 REG 1363 LD2 R2 R2 046C6 1484000A 2 IMM 1364 DIV R2 10 R2=tens of hours, R3=ones of hours 046C7 600046DD 0 1365 LD R0 TIMEW(0) 046C8 F48A1080 2 0 CBM 1366 XORM R2 R0/BITS 8:15 place chars in display 046C9 F4CA2080 3 0 CBM 1367 XORM R3 R0/BITS 16:23 046CA E400180A 0 1368 ST R0 CIX(SSUDISP03) 046CB 60840000 2 IMM 1369 LD R2 0 get most significant zero bits 046CC 60D78802 3 6 BASE 1370 LD R3 SP,MINUTES get the minutes back 046CD 1484000A 2 IMM 1371 DIV R2 10 R2=tens of minutes, R3=ones of minutes 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 944 (TIMER) F 46 Front panel flasher 046CE 600046DE 0 1372 LD R0 TIMEW(1) 046CF F48A0080 2 0 CBM 1373 XORM R2 R0/BITS 0:7 046D0 F4CA1080 3 0 CBM 1374 XORM R3 R0/BITS 8:15 046D1 60840000 2 IMM 1375 LD R2 0 get most significant zero bits 046D2 60D78801 3 6 BASE 1376 LD R3 SP,SECONDS 046D3 1484000A 2 IMM 1377 DIV R2 10 R2=tens of seconds, R3=ones of seconds 046D4 F48A3080 2 0 CBM 1378 XORM R2 R0/BITS 24:31 046D5 E400180B 0 1379 ST R0 CIX(SSUDISP47) 046D6 600046DF 0 1380 LD R0 TIMEW(2) 046D7 F4CA0080 3 0 CBM 1381 XORM R3 R0/BITS 0:7 046D8 5C001EED 1382 CMZ FDATERROR doing clock correction? 046D9 ED8A0010 0 CBM 1383 STLNE R0/BIT 0 turn on decimal point if so 046DA E400180C 0 1384 ST R0 CIX(SSUDISP89) 046DB 58840010 IMM 1385 CLBPSR PSRMODIF funny arithmetic off 000046DC 1386 FLSH004 LABEL 046DC 5D1F8003 6 STAK 1387 LEAVE POP return from processing 1388 * --- 1389 046DD 2030303A 1390 TIMEW TEXTZ " 00:00:00 " 1391 1392 * Exactly midnight 000046E0 1393 DOMIDNIGHT LABEL 046E0 58840010 IMM 1394 CLBPSR PSRMODIF clear modify arithmetic 046E1 620046E4 01 1395 LD2 R0 MIDNIGHTM get midnight message 046E2 608046E6 2 1396 LD R2 MIDNIGHTM(2) get rest of midnight message 046E3 FE0E46EA 1397 JMP DONOONX go share 1398 * --- 046E4 204D4944 1399 MIDNIGHTM TEXTZ " MIDNIGHT " 1400 1401 * Exactly noon 000046E7 1402 DONOON LABEL 046E7 58840010 IMM 1403 CLBPSR PSRMODIF clear modify arithmetic 046E8 620046EE 01 1404 LD2 R0 NOONM get noon message 046E9 608046F0 2 1405 LD R2 NOONM(2) get rest of noon message 000046EA 1406 DONOONX LABEL 046EA E400180A 0 1407 ST R0 CIX(SSUDISP03) put out the message 046EB E440180B 1 1408 ST R1 CIX(SSUDISP47) 046EC E480180C 2 1409 ST R2 CIX(SSUDISP89) 046ED FE0E46DC 1410 JMP FLSH004 done, leave 1411 * --- 046EE 48494748 1412 NOONM TEXTZ "HIGH NOON " 046F1 02932E00 1413 NOONTIME VFD 12*MSECSH noon 046F2 029331E8 1414 NOONTIMEPE VFD 12*MSECSH+MSECSS noon + 1 second 1415 1416 END FPFLASHER subroutine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 945 (TIMER) F 46 GENOPMSG - Generate Message to Operator 1419 1420 ********************************************************************************** 1421 * * 1422 * GENOPMSG - Generate Message to Operator * 1423 * * 1424 * This routine will generate a message to the operator. * 1425 * To use it, you must allocate (via SGETMEM) an OPMSG block and * 1426 * fill in the length, text, and process number fields * 1427 * (OPMSGLEN, OPMSGTEXT and OPMSGPROC), then call us and we take * 1428 * care of the rest. On return, you get back the message serial * 1429 * number, which you can save for future reference to the * 1430 * message. * 1431 * * 1432 * CALL GENOPMSG * 1433 * PARVL address of OPMSG block * 1434 * * 1435 * * 1436 * Eats R1:R3 * 1437 * Sets R0 <= message serial number * 1438 * Stack required = 1 * 1439 * 1 + max ( LOCKWAIT (0) ) * 1440 * * 1441 ********************************************************************************** 1442 1443 BLOCK GENOPMSG subroutine 1444 ENTRY GENOPMSG 1445 1446 BEGFRAME 1447 ENDFRAME 1448 046F3 DD1F8001 6 STAK 1449 GENOPMSG ENTR PUSH 046F4 C0528000 2 REG 1450 STPVL R2 R2 -> OPMSG block 1451 * \ / 1452 1453 ********************************************************************************** 1454 * * 1455 * Convert lower-case to upper case in the first 10 * 1456 * characters of the message. This part goes into the front * 1457 * panel display, which only has a 64 character set. * 1458 * * 1459 ********************************************************************************** 1460 1461 * \ / 046F5 60440009 1 IMM 1462 LD R1 9 000046F6 1463 LOOP LABEL 046F6 601A8808 0 21 CACH 1464 LD R0 R2,OPMSGTEXTC(R1) get a character 046F7 64040061 0 IMM 1465 CPR R0 "a" 046F8 FE084701 1466 JLT NEXT 046F9 6404007A 0 IMM 1467 CPR R0 "z" 046FA FE0A46FF 1468 JLE UPPERFY 046FB 640400E1 0 IMM 1469 CPR R0 080+"a" 046FC FE084701 1470 JLT NEXT 046FD 640400FA 0 IMM 1471 CPR R0 080+"z" 046FE FE044701 1472 JGT NEXT 1473 * \ / 1474 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 946 (TIMER) F 46 GENOPMSG - Generate Message to Operator 000046FF 1475 UPPERFY LABEL 046FF 10040020 0 IMM 1476 SUB R0 "a"-"A" convert char to upper case 04700 E41A8808 0 21 CACH 1477 ST R0 R2,OPMSGTEXTC(R1) and save it 1478 * \ / 00004701 1479 NEXT LABEL 04701 FA6646F6 1 1480 JDR R1 LOOP inspect all ten characters 1481 1482 PLOCK OPMSGLOCK lock the list 04702 0CC00000 1482 IOFF 04703 D1C01EA7 1482 SETT OPMSGLOCK 04704 FE0C4706 1482 JNE MA(2+DISPW MA 0) 04705 DC40308B 1482 CALLNP LOCKWAIT 04706 60168007 0 2 CACH 1483 LD R0 R2,OPMSGLEN get length of message 04707 EC1A8008 20 CACH 1484 STZ R2,OPMSGTEXTC(R0) put NUL at end of message 04708 EC089F10 2 ZBM 1485 STZ R2,OPMSGLINK clear the link 04709 EDC88010 2 ZBM 1486 STW R2,OPMSGHORN set to sound horn when displayed 0470A 60040000 0 IMM 1487 LD R0 0 to search for end of list 0470B 60441EA8 1 IMM 1488 LD R1 ADR OPMSGLIST R1 -> previous to first element 0470C 3C085F10 0 1 ZBM 1489 LSRCH R0 R1,OPMSGLINK find end of list (can't fail) 0470D E4885F10 2 1 ZBM 1490 ST R2 R1,OPMSGLINK put new element on end 0470E BC001EA9 0 1491 INCL R0 OPMSGSER get brand new serial number 0470F E4088181 0 2 ZBM 1492 ST R0 R2,OPMSGID save into message 1493 PUNLOCK OPMSGLOCK unlock the list 04710 EC001EA7 1493 STZ OPMSGLOCK 04711 0C800000 1493 ION 04712 5D1F8001 6 STAK 1494 LEAVE POP all done, R0 = serial number 1495 * --- 1496 1497 END GENOPMSG subroutine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 947 (TIMER) F 46 CANOPMSG - Cancel Operator Message 1500 1501 ********************************************************************************** 1502 * * 1503 * CANOPMSG - Cancel Operator Message * 1504 * * 1505 * This routine will cancel a message to the operator. You * 1506 * must supply the message serial number as returned by GENOPMSG. * 1507 * * 1508 * CALL CANOPMSG * 1509 * PARVL * 1510 * * 1511 * * 1512 * Sets R0, eats R1:R2. * 1513 * Stack required = 1. * 1514 * 1 + max ( LOCKWAIT (0), SFREEMEM (0) ) * 1515 * * 1516 ********************************************************************************** 1517 1518 BLOCK CANOPMSG subroutine 1519 ENTRY CANOPMSG 1520 1521 BEGFRAME 1522 ENDFRAME 1523 04713 DD1F8001 6 STAK 1524 CANOPMSG ENTR PUSH 04714 C0528000 2 REG 1525 STPVL R2 R2 = serial number 1526 PLOCK OPMSGLOCK lock the list 04715 0CC00000 1526 IOFF 04716 D1C01EA7 1526 SETT OPMSGLOCK 04717 FE0C4719 1526 JNE MA(2+DISPW MA 0) 04718 DC40308B 1526 CALLNP LOCKWAIT 04719 60001EA8 0 1527 LD R0 OPMSGLIST R0 -> first element 0471A 60441EA8 1 IMM 1528 LD R1 ADR OPMSGLIST R1 -> previous 0471B 4C880181 2 0 ZBM 1529 RLSHLE R2 R0,OPMSGID find our message 0471C FE0C4727 1530 JNE NOTTHERE jump if not there 0471D 60881F10 2 0 ZBM 1531 LD R2 R0,OPMSGLINK R2 -> following one 0471E E4885F10 2 1 ZBM 1532 ST R2 R1,OPMSGLINK remove us from list 0471F 60920000 2 0 REG 1533 LD R2 R0 R2 -> our message 1534 PUNLOCK OPMSGLOCK unlock the list 04720 EC001EA7 1534 STZ OPMSGLOCK 04721 0C800000 1534 ION 04722 DC002F5D 1535 CALL SFREEMEM free the OPMSG block 04723 41440005 IMM 1536 PARV OPMSGLOG size 04724 40528000 2 REG 1537 PARVL R2 address 04725 60040000 0 IMM 1538 LD R0 0 normal return 04726 FE0E472A 1539 JMP RETURN 1540 * --- 1541 00004727 1542 NOTTHERE LABEL 1543 PUNLOCK OPMSGLOCK unlock the list 04727 EC001EA7 1543 STZ OPMSGLOCK 04728 0C800000 1543 ION 04729 600400AB 0 IMM 1544 LD R0 XREQERNSE error code: no such entry 1545 * \ / 1546 0000472A 1547 RETURN LABEL 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 948 (TIMER) F 46 CANOPMSG - Cancel Operator Message 0472A 5D1F8001 6 STAK 1548 LEAVE POP 1549 * --- 1550 1551 END CANOPMSG subroutine 1552 1553 1554 END SSU Routines 82 INPUT ONCEASEC once a second interrupt 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 949 (ONCEASEC) F 47 Once a second interrupt 3 4 ********************************************************************************** 5 * * 6 * ONCEASEC. Several system things occur once a second. This * 7 * routine is called once a second and this performs various display, * 8 * book keeping, and timing routines. Things done are: * 9 * - update the front panel display * 10 * - examine the time wait queue to count the session elapsed time. * 11 * This routine is called out of the SSU interrupt routine so the * 12 * interrupts are very off, so keep it short. * 13 * Eats R??? * 14 * Stack required = 4 * 15 * 1 + max ( FPFLASHER (3), LOCKWAIT (0), SETRUNNING (2), * 16 * TIMESET (2) ) * 17 * * 18 ********************************************************************************** 19 20 BLOCK ONCEASEC subroutine 21 ENTRY ONCEASEC place entered once each second 22 23 BEGFRAME 24 ENDFRAME 25 0472B DD5F8001 6 STAK 26 ONCEASEC ENTRNP PUSH 0472C DC0044F8 27 CALL TIMESET set up for next second 0472D 434403E8 IMM 28 PARV2 1*MSECSS this many milliseconds 0472E 41440000 IMM 29 PARV 0 no particular CPU 0472F 4100472B 30 PAR ONCEASEC call me in a second 04730 40440000 IMM 31 PARVL 0 call parameter is a don't care 32 * \ / 33 * Update the front panel 04731 DC404639 34 CALLNP FPFLASHER update the front panel 35 * \ / 36 37 ********************************************************************************** 38 * * 39 * Scan the sessions in the time wait queue and count their * 40 * time down. Set running the timed out sessions. * 41 * * 42 ********************************************************************************** 43 44 * \ / 45 PLOCK SQLOCKS(NQTIMEWAIT) lock the queue 04732 0CC00000 45 IOFF 04733 D1C01DC8 45 SETT SQLOCKS(NQTIMEWAIT) 04734 FE0C4736 45 JNE MA(2+DISPW MA 0) 04735 DC40308B 45 CALLNP LOCKWAIT 04736 39001DB7 4 46 LEA R4 SQTIMEWAIT R4 => root of list 04737 FB38474A 45 47 RLJZA R4 LISTEMPTY get first element ptr and check empty 48 * \ / 49 00004738 50 NXTTIMER LABEL 04738 60C91F13 3 4 ZBM 51 LD R3 R4,PCPSADRS R3 => PSA 04739 FAF04749 3 52 JZA R3 NOPUSH don't look farther if none 0473A 6088DF10 2 3 ZBM 53 LD R2 R3,PSCACHN R2 => console area 0473B FAB04749 2 54 JZA R2 NOPUSH odd that there is no CA 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 950 (ONCEASEC) F 47 Once a second interrupt 0473C D0568803 2 BASE 55 DEC R2,CAR1 count the second 0473D FE044749 56 JGT NOPUSH jump if more seconds to count 0473E 60040143 0 IMM 57 LD R0 URDELAYR get XREQ to finish delay 0473F 5C089014 2 ZBM 58 CMZ R2,CAR2/BIT CAIMNETERM was waiting for .TERM? 04740 FE0C4743 59 JNE NOSWEAT if so, have him do XREQ 04741 D0089F10 2 ZBM 60 INC R2,CAPC move him past XREQ call 04742 60040000 0 IMM 61 LD R0 0 else, set AOK XREQ return 00004743 62 NOSWEAT LABEL 04743 E4168802 0 2 BASE 63 ST R0 R2,CAR0 set users R0 04744 EC168804 2 BASE 64 STZ R2,CAR2 clear event mask 04745 60091F10 0 4 ZBM 65 LD R0 R4,PCQLINK get link out of this session 04746 E4095F10 0 5 ZBM 66 ST R0 R5,PCQLINK unlink this timed out session 04747 DC402B99 67 CALLNP SETRUNNING set running the timed out session 04748 61134000 4 5 REG 68 LD R4 R5 R4 -> previous PCB 00004749 69 NOPUSH LABEL 04749 FB3A4738 45 70 RLJNA R4 NXTTIMER link to next PCB in list 71 * \ / 72 0000474A 73 LISTEMPTY LABEL 74 PUNLOCK SQLOCKS(NQTIMEWAIT) no more sessions - unlock list 0474A EC001DC8 74 STZ SQLOCKS(NQTIMEWAIT) 0474B 0C800000 74 ION 0474C 5D1F8001 6 STAK 75 LEAVE POP return 76 * --- 77 78 END ONCEASEC subroutine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 951 (ONCEASEC) F 47 UNFILEWAIT - Release Jobs From FileWait 81 82 ********************************************************************************** 83 * * 84 * UNFILEWAIT - Release Jobs From FILEWAIT. * 85 * * 86 * Because of some synchronization and interlocking * 87 * problems, it is possible for jobs to end up waiting * 88 * on a file and have nobody using the file. While the * 89 * probability of this is small, it can happen. So, we * 90 * execute this routine periodically, which dumps everyone * 91 * out of FILEWAIT onto the runnable queue. Those who * 92 * should have been waiting will immediately re-queue, * 93 * while those who had been improperly stuck will go on * 94 * their merry way. This is a kludge. * 95 * * 96 * We are called by the timer interrupt routine, and we * 97 * schedule the next call to ourselves before exiting. * 98 * * 99 * CALLNP UNFILEWAIT * 100 * * 101 * Eats R0-R5. * 102 * stack required = 3. * 103 * 1 + max ( LOCKWAIT (0), SETRUNNING (2), TIMESET (2) ) * 104 * * 105 ********************************************************************************** 106 107 BLOCK UNFILEWAIT subroutine 108 ENTRY UNFILEWAIT 109 110 BEGFRAME 111 ENDFRAME 112 0474D DD5F8001 6 STAK 113 UNFILEWAIT ENTRNP PUSH 114 PLOCK SQLOCKS(NQFILEWAIT) lock the filewait queue 0474E 0CC00000 114 IOFF 0474F D1C01DC2 114 SETT SQLOCKS(NQFILEWAIT) 04750 FE0C4752 114 JNE MA(2+DISPW MA 0) 04751 DC40308B 114 CALLNP LOCKWAIT 04752 61001DB1 4 115 LD R4 SQFILEWAIT R4 -> head of list 04753 EC001DB1 116 STZ SQFILEWAIT clear out the list 117 PUNLOCK SQLOCKS(NQFILEWAIT) release the list 04754 EC001DC2 117 STZ SQLOCKS(NQFILEWAIT) 04755 0C800000 117 ION 118 * \ / 119 00004756 120 UFWLOOP LABEL 04756 FB30475B 4 121 JZA R4 UFWDONE jump if no more sessions 04757 61491F10 5 4 ZBM 122 LD R5 R4,PCQLINK R5 -> next one 04758 DC402B99 123 CALLNP SETRUNNING set one guy running 04759 61134000 4 5 REG 124 LD R4 R5 R4 -> next session 0475A FE0E4756 125 JMP UFWLOOP and loop 126 * --- 127 0000475B 128 UFWDONE LABEL 0475B DC0044F8 129 CALL TIMESET do it again later 0475C 4344EA60 IMM 130 PARV2 60*MSECSS one minute later 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 952 (ONCEASEC) F 47 UNFILEWAIT - Release Jobs From FileWait 0475D 41440000 IMM 131 PARV 0 any CPU 0475E 4100474D 132 PAR UNFILEWAIT indicate what routine to call 0475F 40440000 IMM 133 PARVL 0 parameter (don't care) 134 04760 5D1F8001 6 STAK 135 LEAVE POP all done 136 * --- 137 138 END UNFILEWAIT subroutine 83 INPUT CIADRIVER Driver for CIA 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 953 (CIADRIVER) F 48 CIA interrupt routine 3 4 BLOCK CIA Driver 5 6 ENTRY CIA_INT process an interrupt from the CIA 7 ENTRY CIA_RESET do reinitialize of a CIA 8 9 ENTRY STATE15 the CIA port state for shut down 10 ENTRY TIMESHUT code for the shutdown routine 11 ENTRY WAIT120SEC a timing count for shutdown 12 13 ********************************************************************************** 14 * * 15 * This is the driver routine for the Communication * 16 * Interface Adaptor. In the Reset and Initialization routine, * 17 * we set up the interval between interrupts to be 100 ms. * 18 * This interval was chosen since we felt that an interactive * 19 * user was likely to notice longer delays between typing * 20 * characters and the system response. The CIA will override * 21 * this interval and give us an interrupt ahead of time if any * 22 * terminal buffer gets more than 50% full. This should not * 23 * happen with the chosen interval (100 ms), except on a 19200 * 24 * baud terminal, since a 9600 baud terminal will only receive * 25 * 96 characters in that time, although the actual processing * 26 * associated delays may push it slightly over the 128 * 27 * threshold. * 28 * In the current version of CIA microcode, we are able to * 29 * select the read operation before the interrupt occurs. At * 30 * the completion of output processing we set up the PPU and * 31 * CIA to do the next read. This delayed read does not * 32 * actually happen until the interrupt interval has expired. * 33 * We then process the characters and status changes that * 34 * are contained in that read. After the input and status * 35 * processing, we scan all terminals and look for output * 36 * characters or commands and build an output buffer. The * 37 * output buffer is sent to the CIA. On the completion * 38 * interrupt we set up the delayed read (as mentioned above) * 39 * for the next interval. * 40 * The differences to this sequence are abnormal end of * 41 * operations which may come from either the PPU or the CIA. * 42 * No matter who did it, some characters will be lost so all * 43 * we do is log the error and try the operation again. * 44 * The CIA_RESET routine is called at system boot, or * 45 * after a deadman timeout. It clears up the state of the * 46 * device and re-establishes the interrupt parameters. * 47 * * 48 * The port number scheme is a little complex. The * 49 * hardware has its own numbering scheme which is easily * 50 * decoded by a three-bit board and three-bit port number. * 51 * The internal port numbering scheme is based on adding an * 52 * offset to this hardware derived number. An offset of 1 is * 53 * used for the first port so that number zero can be reserved * 54 * for the RFP. However, to make the system a little more * 55 * operator friendly, a matrix form is used when talking to * 56 * the outside world. This scheme is based on an initial * 57 * letter to indicate which Comm, a second letter indicates * 58 * which board on that comm, and a digit indicates which port * 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 954 (CIADRIVER) F 48 CIA interrupt routine 59 * on that board (starting with 1 at the top). This table * 60 * should facilitate conversions between the hardware * 61 * addresses and the external form. * 62 * The indices into this table are the external form and * 63 * the entries are given in both decimal and hex. The hex * 64 * entries are especially useful in locating the physical * 65 * board, the decimal entries in converting to the old * 66 * external form. * 67 * * 68 * port A B C D E F H J * 69 * --- --- --- --- --- --- --- --- * 70 * 1 56 48 40 32 24 16 08 00 * 71 * 038 030 028 020 018 010 008 000 * 72 * 2 57 49 41 33 25 17 09 01 * 73 * 039 031 029 021 019 011 009 001 * 74 * 3 58 50 42 34 26 18 10 02 * 75 * 03A 032 02A 022 01A 012 00A 002 * 76 * 4 59 51 43 35 27 19 11 03 * 77 * 03B 033 02B 023 01B 013 00B 003 * 78 * 5 60 52 44 36 28 20 12 04 * 79 * 03C 034 02C 024 01C 014 00C 004 * 80 * 6 61 53 45 37 29 21 13 05 * 81 * 03D 035 02D 025 01D 015 00D 005 * 82 * 7 62 54 46 38 30 22 14 06 * 83 * 03E 036 02E 026 01E 016 00E 006 * 84 * 8 63 55 47 39 31 23 15 07 * 85 * 03F 037 02F 027 01F 017 00F 007 * 86 * * 87 * The first Comm controller encountered during configuration * 88 * is designated with an 'A' and to convert ports on this Comm * 89 * to the internal format add one to the number above. * 90 * The second Comm controller becomes 'B' and add 65. * 91 * The third Comm controller becomes 'C' and add 129. * 92 * * 93 ********************************************************************************** 94 95 * Events logged when CIA traced 00000001 ABS 96 CIATINT EQU 1 interrupt only, R0 = who, R1 = why, R2 = PPU stat 00000002 ABS 97 CIATLV EQU 2 leave, R0 = who, R1 = state on exit 00000003 ABS 98 CIATRST EQU 3 reset, R0 = who 00000004 ABS 99 CIATSTAT EQU 4 status, R0 = recvd bits, R1 = routine, R2 = port 00000005 ABS 100 CIATINCH EQU 5 input char(s), R0 = count, R1 = port, R2 = first char 00000006 ABS 101 CIATOCH EQU 6 output char(s), R0 = first char, R1 = ccnt, R2 = port 00000007 ABS 102 CIATSTIME EQU 7 start timing, R0 = time, R2 = port 00000008 ABS 103 CIATSSTAT EQU 8 send status, R0 = comm parms, R1 = comm code, R2 = port 00000009 ABS 104 CIATSTRD EQU 9 start read, R0, R1, R2 = first 3 words of CIA buffer 0000000A ABS 105 CIATSTWRT EQU 0A start write, R0, R1, R2 = first 3 words of output buffer 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 955 (CIADRIVER) F 48 CIA interrupt routine 107 108 ********************************************************************************** 109 * * 110 * CIA_INT. The interrupt routine. * 111 * We arrive here on any interrupt from any CIA device. * 112 * The interrupt code has loaded CIX to point to the proper * 113 * CIA device, and loaded R3 with the address of the * 114 * appropriate CIA control block. * 115 * We can get here either when an interval interrupt has * 116 * expired or any comm port input buffer exceeds half full. * 117 * We may or may not have actually0accomplished a read of the * 118 * current characters and status (the CIA status word AND the * 119 * variable COMSTATE will tell the tale). * 120 * As a side note, the DEADMAN routine is checking every * 121 * ten seconds for dead I/O devices. It sets the bit called * 122 * COMTIMEOUT. We must clear it on every interrupt, since if * 123 * the DEADMAN routine goes to set it and finds it already * 124 * set, it presumes that we are not getting interrupts (a * 125 * pretty safe assumption). On timeout, CIA_RESET is called * 126 * to attempt to put things right. This is real handy for * 127 * recovering from all sorts of things. * 128 * * 129 * Stack required = 19 * 130 * 5 + max ( CHECKLOGD (6), DQUETHIS (3), ERRORLOG (3), * 131 * INPUTERR (3), LINKBEGLST (3), LOCKWAIT (0), * 132 * MAKEABSAD (1), MOVECHARIN (14), OUTTERMCH (5), * 133 * OUTTSETX (8), PUTINCHAR (10), ROUST (4), * 134 * SETTRSMTR (5), SFREEMEM (0), SRCHLIST (1), * 135 * TRACEPROC (3), UERRSETY (1), UNSRCHLIST (1) ) * 136 * * 137 ********************************************************************************** 138 139 BLOCK CIA_INT routine 140 ENTRY CIA_INT 141 ENTRY STATE15 142 ENTRY TIMESHUT 143 ENTRY WAIT120SEC 144 145 BEGFRAME 00178801 6 BASE 146 COMBLOCK BSS 1 pointer to CIA control block 00178802 6 BASE 147 COMCCNT BSS 1 on read, chars being queued 00178803 6 BASE 148 COMBUFR BSS 1 on write, buffer remaining 00178804 6 BASE 149 OUTBUFPTR BSS 1 ptr to place in output buffer 150 ENDFRAME 151 152 153 * Entered with R2=PPU status, R3=>CIA control block, 154 * CIX = window to CIA 00004761 155 CIA_INT LABEL 04761 EC1F8005 6 STAK 156 STZ PUSH allocate stack frame 04762 60401802 1 157 LD R1 CIX(PPUCHANS1) get the interrupt status of CIA 158 * (this is the I/O status of the CIA 159 * at the time that the interrupt was requested) 04763 E456C804 1 3 BASE 160 ST R1 R3,COMLASTST remember last status 04764 6016C802 0 3 BASE 161 LD R0 R3,COMPF "who ints for" for trace 162 TRACE CIATRACE,CIATINT 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 956 (CIADRIVER) F 48 CIA interrupt routine 04765 5D401D2D 162 XCT TRACECALL(CIATRACE) 04766 FEC00021 162 NOP (CIATRACE*BITS 22:26)+(CIATINT*BITS 27:31) 04767 EC08C215 3 ZBM 163 STZ R3,COMTIMEOUT indicate that we're running 04768 E4D78801 3 6 BASE 164 ST R3 SP,COMBLOCK save cntl block address 04769 60001F00 0 165 LD R0 PPUBADSTAT 0476A 78128000 0 2 REG 166 AND R0 R2 check for bad bits in the PPU status 0476B FA0C477A 0 167 JNEZ R0 LOGPPUBAD jump if status is bad 168 * \ / 169 170 ********************************************************************************** 171 * * 172 * The PPU status seems to be okay. Check the CIA status * 173 * to see why we were interrupted. Note that errors here are * 174 * generally those affecting the CIA as a whole. Errors like * 175 * input buffer overrun, etc. are handled in the read data * 176 * processing for that individual port. * 177 * * 178 ********************************************************************************** 179 180 * \ / 0476C F67A478A 1 181 JBT R1/CIAEOP PROCEOP jump if the comm thinks done 0476D F67E4791 1 182 JBT R1/CIATICK SETUPREAD jump if it's ready for read 0476E F67C4791 1 183 JBT R1/CIAFULL SETUPREAD jump if it has to be read 0476F F6764773 1 184 JBT R1/CIAERR DOCIAERR jump if the comm thinks error 04770 F6784782 1 185 JBT R1/CIAAEOP PROCAEOP jump if the comm thought abnormal 00004771 186 SETNORM LABEL return with normal state set 187 * \ / 188 189 ********************************************************************************** 190 * * 191 * Set up 'delayed read'. The CIA will wait until either * 192 * enough chars or tick timeout to give an EOP for this read. * 193 * We set state and wait for the EOP. * 194 * * 195 ********************************************************************************** 196 197 * \ / 00004771 198 SETDREAD LABEL 04771 60040004 0 IMM 199 LD R0 COMSTDREAD get the status code for 'delayed read' 04772 FE0E4792 200 JMP SETUPREADX go to read setup code 201 * --- 202 203 ********************************************************************************** 204 * * 205 * The CIA says it got an error while processing. We log * 206 * the error and pray for the best. * 207 * * 208 ********************************************************************************** 209 00004773 210 DOCIAERR LABEL 04773 60C40086 3 IMM 211 LD PFPTR PNCIX get page map index for PFRD 04774 80930000 4 REG 212 PFRD R4 set R4 to indexing PF 04775 DC005048 213 CALL ERRORLOG log the error 04776 41440A0E IMM 214 PARV ERLCCIAE 04777 41530000 4 REG 215 PARV R4 param1 = PF of channel 04778 40401A03 216 PARVL CIX(CIAERROR) param2 = CIA error code 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 957 (CIADRIVER) F 48 CIA interrupt routine 04779 FE0E47A3 217 JMP ENABCIAI return without changing state 218 * --- 219 220 ********************************************************************************** 221 * * 222 * The PPU thinks that the transmission was bad. We log * 223 * the error and then fake a AEOP. * 224 * * 225 ********************************************************************************** 226 0000477A 227 LOGPPUBAD LABEL 0477A 60C40086 3 IMM 228 LD PFPTR PNCIX get page map index for PFRD 0477B 80930000 4 REG 229 PFRD R4 set R4 to PF for CIA 0477C 61528000 5 2 REG 230 LD R5 R2 copy the PPU status for the call 0477D DC005048 231 CALL ERRORLOG log the error 0477E 41440A0D IMM 232 PARV ERLCPPUBT 0477F 41530000 4 REG 233 PARV R4 param1 = PF of channel 04780 40534000 5 REG 234 PARVL R5 param2 = bad status 00004781 235 PROCAEOPX LABEL 04781 60D78801 3 6 BASE 236 LD R3 SP,COMBLOCK pick up the control block pointer 237 * \ / 238 239 ********************************************************************************** 240 * * 241 * Abnormal end of operation. In every case, we have * 242 * lost some data. All we can do is try to continue on and * 243 * not do it again. * 244 * * 245 ********************************************************************************** 246 247 * \ / 00004782 248 PROCAEOP LABEL 04782 EC001801 249 STZ CIX(PPUABORT) clean out the channel 04783 6008F085 0 3 ZBM 250 LD R0 R3,COMSTATE load the current port state 04784 5CA04785 0 251 LDPC AEOPJMP(R0) process according to state 252 * --- 253 00004785 254 AEOPJMP LABEL 04785 00004771 255 VFD ADR SETNORM 0 - I don't know why I got the interrupt 04786 00004791 256 VFD ADR SETUPREAD 1 - read, just try again 04787 00004771 257 VFD ADR SETNORM 2 - write, just forget it 04788 00004771 258 VFD ADR SETNORM 3 - write2, just ignore 04789 00004771 259 VFD ADR SETDREAD 4 - delayed read, just try again 260 261 262 ********************************************************************************** 263 * * 264 * End of operation. This is selected for the read * 265 * operation (so we can begin processing of the data) and at * 266 * the end of a write that didn't all fit in one buffer (so * 267 * we can output more). This interrupt should not occur in * 268 * the other states but we won't freak out if they do. * 269 * * 270 ********************************************************************************** 271 0000478A 272 PROCEOP LABEL 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 958 (CIADRIVER) F 48 CIA interrupt routine 0478A 6008F085 0 3 ZBM 273 LD R0 R3,COMSTATE load the current port state 0478B 5CA0478C 0 274 LDPC EOPJMP(R0) 275 * --- 276 0000478C 277 EOPJMP LABEL 0478C 00004771 278 VFD ADR SETNORM 0 - idle, just return 0478D 000047AA 279 VFD ADR PROCRDIN 1 - read, process the read data 0478E 00004771 280 VFD ADR SETNORM 2 - write, set up delayed read (shouldn't happen) 0478F 00004860 281 VFD ADR SETUPWRIT 3 - write2, try to write more data 04790 000047AA 282 VFD ADR PROCRDIN 4 - delayed read, process the read data 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 959 (CIADRIVER) F 48 CIA interrupt routine 284 285 ********************************************************************************** 286 * * 287 * The flags seem to imply that it is time to read the * 288 * ports characters and status. We set up the read and wait * 289 * for it. * 290 * * 291 ********************************************************************************** 292 00004791 293 SETUPREAD LABEL 04791 60040001 0 IMM 294 LD R0 COMSTREAD get state code for 'reading' 00004792 295 SETUPREADX LABEL 04792 E408F085 0 3 ZBM 296 ST R0 R3,COMSTATE set new state 04793 60040001 0 IMM 297 LD R0 1*PPUIDMAD get bit that we wish to clear (DMA direction) 04794 E4001803 0 298 ST R0 CIX(PPUSCSTAT) DMA direction = device to memory 04795 6056C806 1 3 BASE 299 LD R1 R3,COMINBUF get virtual input buffer address 04796 7C420004 1 IMM 300 IOR R1 1*MONBIT*FLDABSPG make 18 bit monitor address 04797 DC404946 301 CALLNP MAKEABSAD make an absolute memory address 04798 60D78801 3 6 BASE 302 LD R3 SP,COMBLOCK restore CIA control block pointer 04799 E4001805 0 303 ST R0 CIX(PPUADDR1) destination memory addr 0479A 6056C807 1 3 BASE 304 LD R1 R3,COMINBUFS pick up buffer size 305 * LD R0 R1 copy the transfer size 0479B E4561004 1 0 REG 306 ST R1 R0+4 (allow for bug in CIA microcode) 0479C 7C448000 1 IMM 307 IOR R1 1*PPUCLAST this is the only byte count 0479D E4401804 1 308 ST R1 CIX(PPUCNT1) give addr and set PPU going 0479E 6056C804 1 3 BASE 309 LD R1 R3,COMLASTST retrieve the status 0479F E44A0080 1 0 CBM 310 ST R1 R0/CIASRWACK acknowledge the previous interrupt 047A0 7C020038 0 IMM 311 IOR R0 (1*CIAEOP+1*CIAAEOP+1*CIAERR)*CIASRWMSK 047A1 6048F085 1 3 ZBM 312 LD R1 R3,COMSTATE state so we can tell new from old 047A2 E4221A03 0 1 313 ST R0 CIX(CIASREAD)(R1-COMSTREAD) start the CIA going 314 * note that the buffer size is included here 315 * so that CIA knows where to stop (the PPU 316 * does not pass along the buffer length to 317 * the controller). 000047A3 318 ENABCIAI LABEL 047A3 6016C802 0 3 BASE 319 LD R0 R3,COMPF "who" for trace 047A4 6048F085 1 3 ZBM 320 LD R1 R3,COMSTATE "new state" for trace 321 TRACE CIATRACE,CIATLV 047A5 5D401D2D 321 XCT TRACECALL(CIATRACE) 047A6 FEC00022 321 NOP (CIATRACE*BITS 22:26)+(CIATLV*BITS 27:31) 047A7 60040800 0 IMM 322 LD R0 1*PPUICIA get bit for controller interrupt allowed 047A8 E4001802 0 323 ST R0 CIX(PPUSSSTAT) set bit in PPU allowing controller interrupt 047A9 FE0E28B7 324 JMP DISPATCH return from interrupt 325 * --- 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 960 (CIADRIVER) F 48 CIA interrupt routine 327 328 ********************************************************************************** 329 * * 330 * We have an end-of-operation interrupt from the * 331 * completion of a read. We now pass through the block moving * 332 * the characters into the buffers for the terminals. * 333 * Entered with: R3=>CIA control block * 334 * SP=>allocated stack area * 335 * CIX = window to the device * 336 * During the major loop that you see here (over all * 337 * ports) R5 contains the pointer to the input buffer. This * 338 * pointer is advanced as appropriate, and at NEXTINPRT will * 339 * point to the character that contains the port number of the * 340 * terminal whose status and input follows. * 341 * The rough format of the input buffer elements is... * 342 * For ports with no status change. * 343 * Char 0 = 000 + port number * 344 * Char 1 = amount of space in output buffer * 345 * Char 2 = count of input characters transmitted with this read * 346 * Char 3... = the characters counted by Char 2. * 347 * For ports with a status change. * 348 * Char 0 = 040 + port number * 349 * Char 1 = amount of space in output buffer * 350 * Char 2 = current status * 351 * Char 3 = count of input characters transmitted with this read * 352 * Char 4... = the characters counted by Char 3. * 353 * For the end of the input buffer. * 354 * Char 0 = 0FF (iff all terminals got a chance) * 355 * = 0FE (iff buffer filled up first) * 356 * Char 1 = * 357 * * 358 ********************************************************************************** 359 000047AA 360 PROCRDIN LABEL 361 PFAILEN PFAIL enable power-fail interrupts 047AA 60044939 0 IMM 361 LD R0 ADR PFAIL 047AB E400044F 0 361 ST R0 POWERUPLOC 047AC 59C40800 IMM 361 IORMSR MSRPFINTE 047AD 6156C806 5 3 BASE 362 LD R5 R3,COMINBUF R5=>current char in input buffer 047AE FE0E47B3 363 JMP NEXTINPRT jump around trace call and setup 364 * --- 365 366 * NOPping the previous jump will cause the first 3 words of input from 367 * the CIA to be added to TRACE data. 047AF 62174800 015 BASE 368 LD2 R0 R5,0 pick up the first two words of buffer 047B0 60974802 2 5 BASE 369 LD R2 R5,2 and the third word, too 370 TRACE CIATRACE,CIATSTRD 047B1 5D401D2D 370 XCT TRACECALL(CIATRACE) 047B2 FEC00029 370 NOP (CIATRACE*BITS 22:26)+(CIATSTRD*BITS 27:31) 371 * \ / 372 000047B3 373 NEXTINPRT LABEL 047B3 60174000 0 5 CACH 374 LD R0 CACH R5,0 get the port number 047B4 F630485B 0 375 JBT R0/PORTLAST DONERDPC jump if no more data 376 * \ / 377 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 961 (CIADRIVER) F 48 CIA interrupt routine 378 ********************************************************************************** 379 * * 380 * We have found that more port data is present in the CIA * 381 * input buffer. Find the TCB for the port and check for a * 382 * status change. If we find a status change, we go off to the * 383 * status checking routine which returns to STATDONE. * 384 * * 385 ********************************************************************************** 386 387 * \ / 047B5 604A3430 1 0 CBM 388 LD R1 R0/CIABRDF R1=board number 047B6 78040007 0 IMM 389 AND R0 CIAPPBRD-1 R0=port on the board 047B7 611CC80C 4 31 BASE 390 LD TCB R3,COMTERMS(R1) R4=>block of TCBs for this board 047B8 FB3247C3 4 391 JNZA TCB GOODTCB jump if TCB block exists 392 393 ********************************************************************************** 394 * * 395 * Data read from the CIA refers to a board that doesn't * 396 * exist. We can make no assumptions about any following * 397 * data, so we must log bad address and abnormal processing. * 398 * * 399 ********************************************************************************** 400 401 PFAILDS disable power-fail interrupt 047B9 59840800 IMM 401 CLBMSR MSRPFINTE 047BA EC00044F 401 STZ POWERUPLOC 047BB 5C00044E 402 CMZ POWERFLAG did one happen? 047BC FE0C28B7 403 JNE DISPATCH jump if so 047BD 00900200 404 STOP STOPP0200 CIA board magicly appeared (for debugging) 047BE DC005048 405 CALL ERRORLOG fake a CIA error 047BF 41440A0E IMM 406 PARV ERLCCIAE pass code 047C0 41534000 5 REG 407 PARV R5 param 1 = location in buffer 047C1 40574800 5 BASE 408 PARVL R5,0 param 2 = the funny data 047C2 FE0E4781 409 JMP PROCAEOPX say abnormal 410 * --- 411 000047C3 412 GOODTCB LABEL 047C3 1920493E 4 0 413 ADD TCB TCBLENGTHS(R0) R4=> this ports TCB 047C4 60174001 0 5 CACH 414 LD R0 CACH R5,1 get the next byte 047C5 E4091289 0 4 ZBM 415 ST R0 TCB,TCOUTSPACE this is output space 047C6 60174002 0 5 CACH 416 LD R0 CACH R5,2 and the next could be status 047C7 60974000 2 5 CACH 417 LD R2 CACH R5,0 get the port number 047C8 F6B247EC 2 418 JBT R2/PORTSTAT STATCHANGE status here so update stuff 419 * \ / 420 000047C9 421 STATDONE LABEL 047C9 FA0247E9 0 422 JEQZ R0 SKIPOVERX if no characters, we're done 423 * \ / 424 425 ********************************************************************************** 426 * * 427 * This port has characters that must be moved into the * 428 * systems input buffer for this port. For a normal user, * 429 * only a few characters will arrive on each interrupt. These * 430 * will be processed through the PUTINCHAR routine which does * 431 * relatively complete checking of the state of this port. * 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 962 (CIADRIVER) F 48 CIA interrupt routine 432 * If, however, we have a machine generated input (either * 433 * block mode send or machine to machine messages) we attempt * 434 * to go to the MOVECHARIN routine. This routine has a high * 435 * setup time, but it is quite fast for a large number of * 436 * characters (break-even is at 4 or 5, as a guess). Before * 437 * we can call it, we have to check for several conditions * 438 * that it cannot cope with. If any exist, we must use the * 439 * more complete PUTINCHAR. * 440 * * 441 ********************************************************************************** 442 443 * \ / 047CA 60974003 2 5 CACH 444 LD R2 CACH R5,3 get the first character 047CB 60574000 1 5 CACH 445 LD R1 CACH R5,0 get port number for trace 446 TRACE CIATRACE,CIATINCH trace for input character(s) 047CC 5D401D2D 446 XCT TRACECALL(CIATRACE) 047CD FEC00025 446 NOP (CIATRACE*BITS 22:26)+(CIATINCH*BITS 27:31) 047CE DC404C29 447 CALLNP CHECKLOGD can he get input? 047CF FE0E47E7 448 JMP SKIPOVER jump if to ignore 047D0 60174002 0 5 CACH 449 LD R0 CACH R5,2 get the number of chars received 047D1 64040009 0 IMM 450 CPR R0 9 see if enough to do en masse 047D2 FE0847E0 451 JLT SLOWWAY if a few, do slowly with echo 047D3 60093C21 0 4 ZBM 452 LD R0 TCB,TCECHO pick up current echo mode 047D4 64040002 0 IMM 453 CPR R0 ECHOMSOFT is software echoing enabled? 047D5 FE0647E0 454 JGE SLOWWAY if it is, we cannot do en masse 047D6 600407BA 0 IMM 455 LD R0 MAXINQUE maximum allowance for input buffer 047D7 5C091015 4 ZBM 456 CMZ TCB,TCXOFFIQ does he want to be XOFFed earlier? 047D8 FE0247DA 457 JEQ HAVEMAX if not then this is the correct max 047D9 600403DD 0 IMM 458 LD R0 MAXIXOFF otherwise, use smaller max 000047DA 459 HAVEMAX LABEL 047DA 640922FB 0 4 ZBM 460 CPR R0 TCB,TCTTICNT is the input buffer full? 047DB FE0847E0 461 JLT SLOWWAY if it is, do slowly so error is seen 047DC DC004BDE 462 CALL MOVECHARIN move the characters in a lump 047DD 41174003 5 CACH 463 PAR CACH R5,3 => to the characters 047DE 40574002 5 CACH 464 PARVL CACH R5,2 the number of characters there 047DF FE0E47E7 465 JMP SKIPOVER move up R5 pointer and continue 466 * --- 467 468 * Move the characters one at a time -- good for a few characters 469 * and error checking. 000047E0 470 SLOWWAY LABEL 047E0 60040000 0 IMM 471 LD R0 0 initialize running index to character zero 047E1 E4178802 0 6 BASE 472 ST R0 SP,COMCCNT save current running index 000047E2 473 MOVEINCH LABEL 047E2 609B4003 2 50 CACH 474 LD R2 CACH R5,3(R0) get the character 047E3 DC404B21 475 CALLNP PUTINCHAR place in the input queue 047E4 BC178802 0 6 BASE 476 INCL R0 SP,COMCCNT count this character 047E5 64174002 0 5 CACH 477 CPR R0 CACH R5,2 are all characters now processed? 047E6 FE0847E2 478 JLT MOVEINCH jump back if not 000047E7 479 SKIPOVER LABEL 047E7 60174002 0 5 CACH 480 LD R0 CACH R5,2 get number of characters 047E8 60D78801 3 6 BASE 481 LD R3 SP,COMBLOCK restore control block pointer 000047E9 482 SKIPOVERX LABEL 047E9 18040003 0 IMM 483 ADD R0 3 add length of the header 047EA 980B5F30 0 5 CBM 484 ADDM R0 R5/FLDCHARS move pointer to info for next port 047EB FE0E47B3 485 JMP NEXTINPRT do the next port 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 963 (CIADRIVER) F 48 CIA interrupt routine 486 * --- 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 964 (CIADRIVER) F 48 CIA interrupt routine 488 489 ********************************************************************************** 490 * * 491 * STATUS CHECKING * 492 * There are three interface handling protocols that may * 493 * be specified for each port. The three protocols and their * 494 * codes are: * 495 * 0 - no handling * 496 * 1 - DTR/DSR drop disconnect * 497 * 2 - RS232 modem handshake * 498 * These three protocols are complicated by the fact that * 499 * each port may have either terminal or modem configuration * 500 * (that is, the receivers and transmitters are set up to * 501 * communicate with either a terminal or a modem). So the * 502 * following table is a description of the 6 configurations * 503 * and the meaning of the interface states that are used to * 504 * control them. * 505 * * 506 * Some states are predefined. These are: * 507 * STATE0 - initialization, boot. Set by INITIAL. * 508 * STATE1 - powerfail/reset. Set by POWERFAIL. * 509 * STATE2 - normal operation. A process will not be created for * 510 * a port until it is in this state. * 511 * STATE15 - if a port seems to be receiving continuous input * 512 * without the program reading same, the port goes into * 513 * this state and is shut down (turn off RDE) for * 514 * one minute. * 515 * * 516 * The RS-232 signal names that are used herein: * 517 * DSR = Data Set Ready. Incoming signal that indicates * 518 * that the modem is ready to receive/transmit data. * 519 * DTR = Data Terminal Ready. Outgoing signal that indicates * 520 * that the computer is ready to receive/transmit * 521 * data. This signal must be asserted to answer * 522 * the phone. De-assertion of this signal causes * 523 * the phone connection to be broken. * 524 * CD = Carrier Detect. Incoming signal indicating that * 525 * the modem has established a connection with a * 526 * remote modem. * 527 * RI = Ring Indicator. Indicates that the local modem * 528 * is receiving a ring signal from the phone line. * 529 * * 530 * A routine name is given for each state. That name is * 531 * of the form "Sncm" where "n" is the configuration number, * 532 * "c" is "N" if not a modem and "M" if it is a modem, and "m" * 533 * is the state number. Many of the state handling routines * 534 * can be shared and this is reflected by the duplication of * 535 * the routine names. * 536 * * 537 * CONFIGURATION ROUTINE STATE MEANING * 538 * ------------- ------- ----- ------- * 539 * protocol=0 S0N0 0 initialization, => 2 * 540 * no handling S0N0 1 powerfail reset, => 2 * 541 * not modem S0N2 2 normal operation, =>2 * 542 * S0N2 15 shut down -- wait for timeout * 543 * * 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 965 (CIADRIVER) F 48 CIA interrupt routine 544 * protocol=0 S0N0 0 initialization, => 2 * 545 * no handling S0N0 1 powerfail reset, => 2 * 546 * modem S0N2 2 normal operation, => 2 * 547 * S0N2 15 shut down -- wait for timeout * 548 * * 549 * protocol=1 S1N0 0 initialization, all transmitters on, * 550 * DTR disconnect => 2 * 551 * not modem S1N2 1 powerfail reset, if DTR on => 2, * 552 * if DTR off => 3 and start timing * 553 * S1N2 2 normal operation, if DTR on => 2, * 554 * if DTR off => 3 and start timing * 555 * S1N3 3 timing disconnect, if DTR on then stop timing* 556 * and =>2, if count exceeded disc. * 557 * S1N0 4 disconnecting * 558 * S0N2 15 shut down -- wait for timeout * 559 * * 560 * protocol=1 S1N0 0 initialization, all transmitters on, * 561 * DSR disconnect => 2 * 562 * modem S1N2 1 powerfail reset, if DSR on => 2, if DSR * 563 * off => 3 and start timing * 564 * S1N2 2 normal operation, if DSR on => 2, if DSR * 565 * off => 3 and start timing * 566 * S1N3 3 timing disconnect, if DSR on stop timing * 567 * and =>2, if count exceeded disc. * 568 * S1N0 4 disconnecting * 569 * S0N2 15 shut down -- wait for timeout * 570 * * 571 * protocol=2 S1N0 0 initialization, all transmitters on, * 572 * RS232 handshake => 2 * 573 * not modem S1N0 1 powerfail reset, if DTR on => 2, if DTR * 574 * (handle like off => 3 and start timing * 575 * DTR disc.) S1N2 2 normal operation, if DTR on => 2, if DTR * 576 * off => 3 and start timing * 577 * S1N3 3 timing disconnect, if DTR on stop timing * 578 * and =>2, if count exceeded disc. * 579 * S1N0 4 disconnecting * 580 * S0N2 15 shut down -- wait for timeout * 581 * * 582 * protocol=2 S2M0 0 initialization, all transmitters off, =>5 * 583 * RS232 handshake S2M0 1 powerfail reset, if no process transmitter * 584 * modem off, if process => 4 and disc. and * 585 * hang up phone * 586 * S2M2 2 normal operation, if DSR or CD off then * 587 * => 3 and and start timing * 588 * S2M3 3 timing disconnect, if DSR and CD on then * 589 * => 2 and stop timing otherwise if * 590 * count exceeded => 4 and disc. * 591 * S2M5 4 disconnecting, => 5 * 592 * S2M5 5 idle, if RING then assert DTR, => 6 and * 593 * start timing * 594 * S2M6 6 waiting for phone to answer, if DSR and * 595 * CD on then => 2, else if timing * 596 * done hang up phone and => 5. * 597 * S2M5 7 identical to 5 * 598 * S0N2 15 shut down -- wait for timeout * 599 * * 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 966 (CIADRIVER) F 48 CIA interrupt routine 600 * This state changing is done in the CIA read processor * 601 * and this has the problem of only getting here when the * 602 * status changes for the port. We also do not have access to * 603 * the output buffer to do the outputting of status for the * 604 * modem (changing the state of DTR) so that and the other * 605 * timing operations are done after the read information is * 606 * processed. If an operation is needed, then timing of 1 * 607 * tick is requested so that the operation will be done * 608 * immediatly after this. * 609 * * 610 ********************************************************************************** 611 612 * Values for state changing so they can be found in the CREF 00000000 ABS 613 STATE0 EQU 0 initialization 00000001 ABS 614 STATE1 EQU 1 powerfail reset 00000002 ABS 615 STATE2 EQU 2 normal operation 00000003 ABS 616 STATE3 EQU 3 00000004 ABS 617 STATE4 EQU 4 00000005 ABS 618 STATE5 EQU 5 00000006 ABS 619 STATE6 EQU 6 0000000F ABS 620 STATE15 EQU 15 port shutdown 621 622 * Timing times 00000000 ABS 623 WAITNOSEC EQU 0 used to turn off timing 00000001 ABS 624 WAITONCE EQU 1 one tick to happen immediatly 0000003C ABS 625 WAIT6SEC EQU 6*CIATPS 6 seconds of CIA ticks 00000096 ABS 626 WAIT15SEC EQU 15*CIATPS 15 seconds of CIA ticks 00000258 ABS 627 WAIT60SEC EQU 60*CIATPS 60 seconds of CIA ticks 000004B0 ABS 628 WAIT120SEC EQU 120*CIATPS 120 seconds of CIA ticks 629 630 ********************************************************************************** 631 * * 632 * We also look for errors that may have occurred on a * 633 * port such as framing errors or parity errors. If one is * 634 * detected we build an error element and link it into the * 635 * chain of input TCQs. Note that a parity error detected * 636 * is reported as a framing error so if a framing error is * 637 * indicated we return a parity error iff the port has * 638 * requested parity checking. * 639 * * 640 ********************************************************************************** 641 000047EC 642 STATCHANGE LABEL 643 * R0 = status 644 * R2 = port number/status present bit (for trace) 047EC 39574001 5 5 CACH 645 LEA R5 CACH R5,1 increment pointer in R5 by one char 047ED E4092289 0 4 ZBM 646 ST R0 TCB,TCLASTST remember the last status 047EE F23247F6 0 647 JBF R0/PORTFFE STATECASE jump if no framing error 648 * \ / 649 047EF 600400E0 0 IMM 650 LD R0 DEVERPFE error code for framing error 047F0 5C093814 4 ZBM 651 CMZ TCB,TCLASTCOM2/PORTCHKPAR see if it might be a parity error 047F1 FE0247F3 652 JEQ NOTPARITY jump if not 047F2 600400E1 0 IMM 653 LD R0 DEVERPPE error code for parity error 000047F3 654 NOTPARITY LABEL 047F3 DC004D5C 655 CALL INPUTERR build an error element 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 967 (CIADRIVER) F 48 CIA interrupt routine 047F4 40520000 0 REG 656 PARVL R0 pass the error code 047F5 60092289 0 4 ZBM 657 LD R0 TCB,TCLASTST restore R0 658 * \ / 659 000047F6 660 STATECASE LABEL 047F6 60493C78 1 4 ZBM 661 LD R1 TCB,TCCONTROL pick up state control fields 047F7 60724813 1 1 @ 662 LD R1 @INTERFACE(R1) R1 = index of state operation routine 663 TRACE CIATRACE,CIATSTAT 047F8 5D401D2D 663 XCT TRACECALL(CIATRACE) 047F9 FEC00024 663 NOP (CIATRACE*BITS 22:26)+(CIATSTAT*BITS 27:31) 047FA 7804000F 0 IMM 664 AND R0 1*PORTRI+1*PORTCD+1*PORTCS+1*PORTDSR 047FB 5CA247FC 1 665 LDPC STATEOPR(R1) go to appropriate routine 666 * --- 667 668 ********************************************************************************** 669 * * 670 * The following jump table is provided to decode the * 671 * current state of this port. The index to the jump table is * 672 * the 7 bit field TCCONTROL. This field is made up of three * 673 * other fields. TCIPROT, the leftmost two bits is the * 674 * handling protocol that has been established for this port. * 675 * TCMODEM, the next bit to the right, indicates that this * 676 * port is configured for modem connection (1) or configured * 677 * for terminal connection (0). TCINTSTATE, the rightmost 4 * 678 * bits, is the current interface state. * 679 * This jump table implements the state transitions * 680 * that were described in the large box. * 681 * * 682 * The routine that is called by the jump through table * 683 * accomplishes the actions indicated by the commentary in the * 684 * large box. When that routine is entered, the following * 685 * items are found where indicated: * 686 * R0 = received status bits, * 687 * R1-R3 available * 688 * R4 = TCB => TCB * 689 * R5 => input buffer, * 690 * SP = R6 = stack pointer * 691 * * 692 ********************************************************************************** 693 000047FC 694 STATEOPR BASE 047FC 00004814 695 SERR VFD ADR SERRR 047FD 00004816 696 S0N0 VFD ADR S0N0R 047FE 00004852 697 S0N2 VFD ADR S0N2R 047FF 0000481A 698 S1N0 VFD ADR S1N0R 04800 00004821 699 S1N2 VFD ADR S1N2R 04801 00004830 700 S1N3 VFD ADR S1N3R 04802 00004838 701 S2M0 VFD ADR S2M0R 04803 0000483B 702 S2M2 VFD ADR S2M2R 04804 00004840 703 S2M3 VFD ADR S2M3R 04805 00004843 704 S2M5 VFD ADR S2M5R 04806 0000484D 705 S2M6 VFD ADR S2M6R 706 DRCT 00000004 ABS 707 SLOG EQU (DISPW STATEOPR) LOG 2 calculate size of needed index 708 04806 00000000 709 INTERFACET VFD SLOG:S0N0,S0N0,S0N2,SERR,SERR,SERR no interface, not modem 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 968 (CIADRIVER) F 48 CIA interrupt routine 04807 00000000 710 VFDB SLOG:SERR,SERR,SERR,SERR,SERR,SERR 04808 00000002 711 VFDB SLOG:SERR,SERR,SERR,S0N2 04808 00000000 712 VFDB SLOG:S0N0,S0N0,S0N2,SERR,SERR,SERR no interface, modem 04809 00000000 713 VFDB SLOG:SERR,SERR,SERR,SERR,SERR,SERR 0480A 00000002 714 VFDB SLOG:SERR,SERR,SERR,S0N2 0480A 00000000 715 VFDB SLOG:S1N0,S1N2,S1N2,S1N3,S1N0,SERR DTR disconnect, not modem 0480B 00000000 716 VFDB SLOG:SERR,SERR,SERR,SERR,SERR,SERR 0480C 00000002 717 VFDB SLOG:SERR,SERR,SERR,S0N2 0480C 00000000 718 VFDB SLOG:S1N0,S1N2,S1N2,S1N3,S1N0,SERR DSR disconnect, modem 0480D 00000000 719 VFDB SLOG:SERR,SERR,SERR,SERR,SERR,SERR 0480E 00000002 720 VFDB SLOG:SERR,SERR,SERR,S0N2 0480E 00000000 721 VFDB SLOG:S1N0,S1N2,S1N2,S1N3,S1N0,SERR DTR disconnect, not modem 0480F 00000000 722 VFDB SLOG:SERR,SERR,SERR,SERR,SERR,SERR 04810 00000002 723 VFDB SLOG:SERR,SERR,SERR,S0N2 04810 00000009 724 VFDB SLOG:S2M0,S2M0,S2M2,S2M3,S2M5,S2M5 modem control, modem 04811 00000000 725 VFDB SLOG:S2M6,S2M5,SERR,SERR,SERR,SERR 04812 00000002 726 VFDB SLOG:SERR,SERR,SERR,S0N2 727 BSS 0 take up slack 04813 01084807 728 INTERFACE PTR INTERFACET 729 730 ********************************************************************************** 731 * * 732 * Illegal and undefined state. The odds are someone * 733 * is messing with the IPROT setting on a busy port. * 734 * We set the interface state to reinitialize the port and * 735 * go through the state jump tables again. Since there is * 736 * no way that an interface state of zero will generate an * 737 * error and return us here it is safe to do this. * 738 * * 739 ********************************************************************************** 740 00004814 741 SERRR LABEL 04814 EC090249 4 ZBM 742 STZ TCB,TCINTSTATE reset the interface state 04815 FE0E47F6 743 JMP STATECASE and go through the state tables 744 * --- 745 746 ********************************************************************************** 747 * Do nothing, set all transmitters, go to normal state * 748 * This state occurs during resets and boot. We set the * 749 * output signals as appropriate and change the state to * 750 * normal. * 751 ********************************************************************************** 752 00004816 753 S0N0R LABEL 04816 DC004A79 754 CALL SETTRSMTR turn everything on 04817 40570012 4 CACH 755 PARVL TCB,TCLASTCOM 04818 60C40002 3 IMM 756 LD R3 STATE2 04819 FE0E4832 757 JMP STOPTIMEX stop any timing that might have been 758 * --- 759 760 ********************************************************************************** 761 * Do nothing and continue that. * 762 ********************************************************************************** 763 764 S0N2R EQU NOCHANGE 765 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 969 (CIADRIVER) F 48 CIA interrupt routine 766 ********************************************************************************** 767 * DTR/DSR drop disconnect, initialization, check for * 768 * the bit being good. * 769 ********************************************************************************** 770 0000481A 771 S1N0R LABEL 0481A DC004A79 772 CALL SETTRSMTR turn everything on 0481B 40570012 4 CACH 773 PARVL TCB,TCLASTCOM 0481C 60092289 0 4 ZBM 774 LD R0 TCB,TCLASTST fetch the prior status 0481D 60C40002 3 IMM 775 LD R3 STATE2 if on, normal operation 0481E F63C4851 0 776 JBT R0/PORTDSR SETSTATE jump for normal operation 0000481F 777 S1N0X LABEL 0481F 60C40004 3 IMM 778 LD R3 STATE4 if off, port won't work 04820 FE0E4832 779 JMP STOPTIMEX stop any timing that might have been 780 * --- 781 782 ********************************************************************************** 783 * DTR/DSR drop disconnect, restart, if status is off, * 784 * flush the process. * 785 ********************************************************************************** 786 00004821 787 S1N2R LABEL 04821 60C40002 3 IMM 788 LD R3 STATE2 get state for good status 04822 F63C4851 0 789 JBT R0/PORTDSR SETSTATE all is okay if DSR is on 04823 5C091F17 4 ZBM 790 CMZ TCB,TCPCADRS is there a process here? 04824 FE02481F 791 JEQ S1N0X no, but port won't work 04825 70040096 0 IMM 792 LDN R0 WAIT15SEC wait for 15 seconds 04826 60C40003 3 IMM 793 LD R3 STATE3 get state for that 00004827 794 SETTIMEOUT LABEL 795 * R0=time to delay, R3=new state 796 TRACE CIATRACE,CIATSTIME trace timing event 04827 5D401D2D 796 XCT TRACECALL(CIATRACE) 04828 FEC00027 796 NOP (CIATRACE*BITS 22:26)+(CIATSTIME*BITS 27:31) 04829 60440000 1 IMM 797 LD R1 TIMEDISC all calls from here are for timing disconnect 0482A E4490A39 1 4 ZBM 798 ST R1 TCB,TCTIMERTN we are waiting for timing 0482B E0170817 0 4 BASE 799 EXCH R0 TCB,TCTIMECNT place new time, fetch any old 0482C FA0C482F 0 800 JNEZ R0 S1N2X jump if a prior value found 0482D 60178801 0 6 BASE 801 LD R0 SP,COMBLOCK get pointer to comm block 0482E D016080A 0 BASE 802 INC R0,COMTRMTMNG indicate another terminal timing 0000482F 803 S1N2X LABEL 0482F FE0E4851 804 JMP SETSTATE 805 * --- 806 807 ********************************************************************************** 808 * DTR/DSR drop disconnect, timing, see if our bit has * 809 * come back. * 810 ********************************************************************************** 811 00004830 812 S1N3R LABEL 04830 F23C4852 0 813 JBF R0/PORTDSR NOCHANGE no change in timing state 00004831 814 STOPTIMING LABEL 04831 60C40002 3 IMM 815 LD R3 STATE2 back to normal state 00004832 816 STOPTIMEX LABEL 04832 60040000 0 IMM 817 LD R0 WAITNOSEC indicate no longer timing 04833 E0170817 0 4 BASE 818 EXCH R0 TCB,TCTIMECNT not timing anymore 04834 FA024837 0 819 JEQZ R0 S1N3X jump if no prior value 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 970 (CIADRIVER) F 48 CIA interrupt routine 04835 60178801 0 6 BASE 820 LD R0 SP,COMBLOCK get pointer to comm block 04836 D056080A 0 BASE 821 DEC R0,COMTRMTMNG indicate another terminal done timing 00004837 822 S1N3X LABEL 04837 FE0E4851 823 JMP SETSTATE 824 * --- 825 826 ********************************************************************************** 827 * Modem handling, initialization, initial hung up phone * 828 * so we zap any process. * 829 ********************************************************************************** 830 00004838 831 S2M0R LABEL 04838 70040001 0 IMM 832 LDN R0 WAITONCE 04839 60C40004 3 IMM 833 LD R3 STATE4 go idle after this 0483A FE0E4827 834 JMP SETTIMEOUT 835 * --- 836 837 ********************************************************************************** 838 * Modem handling, normal operation, the loss of some * 839 * things starts disconnect timing * 840 ********************************************************************************** 841 0000483B 842 S2M2R LABEL 0483B F23C483D 0 843 JBF R0/PORTDSR S2M2X loss of DSR is bad news 0483C F63A4852 0 844 JBT R0/PORTCD NOCHANGE loss of CD is bad news (falls through) 0000483D 845 S2M2X LABEL 0483D 7004003C 0 IMM 846 LDN R0 WAIT6SEC time for 6 seconds 0483E 60C40003 3 IMM 847 LD R3 STATE3 0483F FE0E4827 848 JMP SETTIMEOUT 849 * --- 850 851 ********************************************************************************** 852 * Modem handling, timing disconnect, see if DSR and * 853 * CD have returned. * 854 * We come here if an interruption in a phone line occurred. * 855 * If the interruption was a transient, we will go back to the * 856 * normal state when DSR and CD are restored. If however, we * 857 * time out, we have no choice but to hang up the phone and force * 858 * the process into control mode disconnect state. Control mode * 859 * will dump the standard input and output units and wait a few * 860 * minutes looking for an attach. * 861 ********************************************************************************** 862 00004840 863 S2M3R LABEL 04840 F23C4852 0 864 JBF R0/PORTDSR NOCHANGE if no DSR, still timing 04841 F23A4852 0 865 JBF R0/PORTCD NOCHANGE if no CD, still timing 04842 FE0E4831 866 JMP STOPTIMING stop timing, return to normal state 867 * --- 868 869 ********************************************************************************** 870 ** Modem handling, idle waiting for the phone to ring * 871 ********************************************************************************** 872 00004843 873 S2M5R LABEL 04843 F2384852 0 874 JBF R0/PORTRI NOCHANGE no ringy, no worky 04844 5C001D0D 875 CMZ ALLINHIBIT check global inhibit 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 971 (CIADRIVER) F 48 CIA interrupt routine 04845 FE0C4852 876 JNE NOCHANGE if cannot logon, do not answer phone 04846 5C091C10 4 ZBM 877 CMZ TCB,TCINHIB check inhibit for this port 04847 FE0C4852 878 JNE NOCHANGE if cannot logon, do not answer phone 04848 DC004A79 879 CALL SETTRSMTR assert DTR and RTS 04849 40440028 IMM 880 PARVL 1*PORTSDTR+1*PORTSRTS 0484A 70040258 0 IMM 881 LDN R0 WAIT60SEC timing value allowed for logon 0484B 60C40006 3 IMM 882 LD R3 STATE6 answering phone 0484C FE0E4827 883 JMP SETTIMEOUT 884 * --- 885 886 ********************************************************************************** 887 ** Modem handling, answering phone, waiting for DSR and CD * 888 ********************************************************************************** 889 0000484D 890 S2M6R LABEL 0484D F23A4852 0 891 JBF R0/PORTCD NOCHANGE if no CD, we wait 0484E F23C4852 0 892 JBF R0/PORTDSR NOCHANGE if no DSR, we wait 0484F EDC92619 4 ZBM 893 STW TCB,TCLASTST/PORTFBRK fake a break to ensure continuity of timing 04850 FE0E4831 894 JMP STOPTIMING go to normal operation 895 * --- 896 897 ********************************************************************************** 898 * * 899 * The state routine has finished and come here with a * 900 * new state for this port. We set that state into the * 901 * TCB and check status bits unrelated to phones timing. * 902 * * 903 ********************************************************************************** 904 00004851 905 SETSTATE LABEL 04851 E4C90249 3 4 ZBM 906 ST R3 TCB,TCINTSTATE set interface state 00004852 907 NOCHANGE LABEL 04852 5C092619 4 ZBM 908 CMZ TCB,TCLASTST/PORTFBRK has a break (or fake break) occurred? 04853 FE024858 909 JEQ NOTBREAK jump if not 04854 60840100 2 IMM 910 LD R2 BREAKMARK get fake character to say break 04855 DC404C29 911 CALLNP CHECKLOGD is there a process? 04856 FE0E47E7 912 JMP SKIPOVER return, no process 04857 DC404B21 913 CALLNP PUTINCHAR pass info along 00004858 914 NOTBREAK LABEL 04858 60D78801 3 6 BASE 915 LD R3 SP,COMBLOCK restore control block pointer 04859 60174002 0 5 CACH 916 LD R0 CACH R5,2 get count of characters received 0485A FE0E47C9 917 JMP STATDONE process incoming characters 918 * --- 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 972 (CIADRIVER) F 48 CIA interrupt routine 920 921 ********************************************************************************** 922 * * 923 * All of the input characters have been processed. See * 924 * if this was a complete read and, if not, read again. * 925 * * 926 ********************************************************************************** 927 0000485B 928 DONERDPC LABEL 929 PFAILDS disable power fail interrupts 0485B 59840800 IMM 929 CLBMSR MSRPFINTE 0485C EC00044F 929 STZ POWERUPLOC 0485D 5C00044E 930 CMZ POWERFLAG did one happen? 0485E FE0C28B7 931 JNE DISPATCH jump if so 0485F F23E4791 0 932 JBF R0/BIT 31 SETUPREAD jump if more to read 933 * \ / 934 935 ********************************************************************************** 936 * * 937 * The read processing is complete. Now build the output * 938 * for the write by passing over the TCBs and creating the * 939 * output commands for each. * 940 * We do a few clever things here to prevent the needless * 941 * scan of all of the TCBs. Since we are usually NOT timing * 942 * anything, we keep a count of ports that are timing for some * 943 * reason for each CIA in their comm block. Iff this count is * 944 * zero, we can completely skip the code for processing * 945 * timing. * 946 * While it is not so common to have no output occurring, * 947 * we also keep a count of ports that are outputting * 948 * (TERMWBUSY). Iff this count is zero, we can completely * 949 * skip the code for processing output. Also if this count * 950 * goes to zero while we are processing TCBs we can stop * 951 * processing any more TCBs. * 952 * * 953 ********************************************************************************** 954 955 * \ / 00004860 956 SETUPWRIT LABEL 04860 6156C808 5 3 BASE 957 LD R5 R3,COMOUTBUF R5 => output buffer 04861 6016C809 0 3 BASE 958 LD R0 R3,COMOUTBUFS get the size allotted for the output buffer 04862 E4178803 0 6 BASE 959 ST R0 SP,COMBUFR set number of characters remaining in buffer 04863 60D78801 3 6 BASE 960 LD R3 SP,COMBLOCK R3 => CIA control block 04864 5C16C80A 3 BASE 961 CMZ R3,COMTRMTMNG are any terminals timing? 04865 FE0C490E 962 JNE DOTIMING jump if so 00004866 963 CHECKWBUSY LABEL 04866 5C001F05 964 CMZ TERMWBUSY is there anything to write? 04867 FE024771 965 JEQ SETNORM if none, go idle 966 * \ / 967 968 * Done with port timing, but there are other ports that should output. 969 PFAILEN PFAIL enable power-fail interrupts 04868 60044939 0 IMM 969 LD R0 ADR PFAIL 04869 E400044F 0 969 ST R0 POWERUPLOC 0486A 59C40800 IMM 969 IORMSR MSRPFINTE 0486B 61C40007 7 IMM 970 LD R7 CIAPPBRD-1 R7 = board number 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 973 (CIADRIVER) F 48 CIA interrupt routine 0000486C 971 NXTBRDW LABEL 0486C 611CF80C 4 37 BASE 972 LD TCB R3,COMTERMS(R7) get first TCB on this board 0486D FB32488F 4 973 JNZA TCB WRITTCB jump if a TCB here 0000486E 974 NXTBRDWX LABEL 0486E FBE6486C 7 975 JDR R7 NXTBRDW process next board 976 * \ / 977 0000486F 978 DONEWRITE LABEL 979 PFAILDS disable power-fail interrupts 0486F 59840800 IMM 979 CLBMSR MSRPFINTE 04870 EC00044F 979 STZ POWERUPLOC 04871 5C00044E 980 CMZ POWERFLAG did one happen? 04872 FE0C28B7 981 JNE DISPATCH jump if yes 04873 6556C808 5 3 BASE 982 CPR R5 R3,COMOUTBUF is anything to go out? 04874 FE024771 983 JEQ SETNORM go idle if nothing to do 984 * \ / 985 986 ********************************************************************************** 987 * * 988 * Do a write to the CIA. * 989 * We come here either when we have scanned all TCBs and * 990 * constructed a complete output buffer (via fall-through) or * 991 * we have scanned some TCBs and filled up our output buffer * 992 * (via DOCIAWRITX). In the latter case, we will set up the * 993 * status so that when we return from the completion of the * 994 * write, we will return to finish processing output. * 995 * * 996 ********************************************************************************** 997 998 * \ / 04875 60040002 0 IMM 999 LD R0 COMSTWRITE get status for normal, complete write 00004876 1000 DOCIAWRITX LABEL 04876 E408F085 0 3 ZBM 1001 ST R0 R3,COMSTATE set state to writing 04877 60040001 0 IMM 1002 LD R0 1*PPUIDMAD 04878 E4001802 0 1003 ST R0 CIX(PPUSSSTAT) DMA direction = mem to dev 04879 6056C808 1 3 BASE 1004 LD R1 R3,COMOUTBUF pick up output buffer pointer 0487A 7C420004 1 IMM 1005 IOR R1 1*MONBIT*FLDABSPG create 18 bit monitor address 0487B DC404946 1006 CALLNP MAKEABSAD make into an absolute address 0487C 60D78801 3 6 BASE 1007 LD R3 SP,COMBLOCK restore control block pointer 0487D E4001805 0 1008 ST R0 CIX(PPUADDR1) source address 0487E 6016C808 0 3 BASE 1009 LD R0 R3,COMOUTBUF pick up output buffer pointer 0487F 600A1F30 0 0 CBM 1010 LD R0 R0/FLDCHARS make character address 04880 300B5F30 0 5 CBM 1011 RSB R0 R5/FLDCHARS R0=number of characters to output 04881 60820038 2 IMM 1012 LD R2 (1*CIAEOP+1*CIAAEOP+1*CIAERR)*CIASRWMSK 04882 7C920000 2 0 REG 1013 IOR R2 R0 build proper command for CIA in R2 04883 7C048000 0 IMM 1014 IOR R0 1*PPUCLAST this is the only byte count 04884 E4001804 0 1015 ST R0 CIX(PPUCNT1) start the PPU 04885 6016C804 0 3 BASE 1016 LD R0 R3,COMLASTST retrieve the status 04886 E40A8080 0 2 CBM 1017 ST R0 R2/CIASRWACK recognize the previous interrupt 04887 E4801A05 2 1018 ST R2 CIX(CIASWRITE) start the CIA 04888 FE0E47A3 1019 JMP ENABCIAI enable interrupts and return 1020 * --- 1021 1022 * This trace can be reached by NOPping the previous JMP instruction. 04889 6096C808 2 3 BASE 1023 LD R2 R3,COMOUTBUF R2 -> output buffer 0488A 62168800 012 BASE 1024 LD2 R0 R2,0 pick up the first two words of buffer 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 974 (CIADRIVER) F 48 CIA interrupt routine 0488B 60968802 2 2 BASE 1025 LD R2 R2,2 and the third word, too 1026 TRACE CIATRACE,CIATSTWRT 0488C 5D401D2D 1026 XCT TRACECALL(CIATRACE) 0488D FEC0002A 1026 NOP (CIATRACE*BITS 22:26)+(CIATSTWRT*BITS 27:31) 0488E FE0E47A3 1027 JMP ENABCIAI enable interrupts and return 1028 * --- 1029 1030 ********************************************************************************** 1031 * * 1032 * A block of TCBs has been found so check to see if they * 1033 * have anything to output. * 1034 * The format for the output buffer is: * 1035 * For character output. * 1036 * Char 0 = 000 + port number * 1037 * Char 1 = count of output characters transmitted with * 1038 * this write (must be less than 128). * 1039 * Char 2... = the characters counted by Char 1. * 1040 * For command output. * 1041 * Char 0 = 000 + port number * 1042 * Char 1 = Command code (always >= 080) * 1043 * Char 2 = (optional parameters for the command) * 1044 * Note that we cleverly avoid putting out more than 128 * 1045 * characters in one element. Each TCQ that we copy into the * 1046 * CIA output buffer gets its own port number and output * 1047 * count. We limit the maximum size of the TCQs to a size * 1048 * that will hold less than 128 characters. * 1049 * * 1050 ********************************************************************************** 1051 0000488F 1052 WRITTCB LABEL 0488F E5D78802 7 6 BASE 1053 ST R7 SP,COMCCNT save the board number 04890 61C7FFF8 7 IMM 1054 LD R7 -CIAPPBRD initialize port number 00004891 1055 WRITTCBX LABEL 1056 * \ / 1057 1058 ********************************************************************************** 1059 * If the terminal was sending too many input characters * 1060 * without the user picking them up we will have XOFFed it. * 1061 * When we XOFF a terminal we increment the TERMWBUSY word so * 1062 * that we will check the terminal on a regular basis to see * 1063 * if it is time to XON it. We will XON a port when the input * 1064 * buffers are less than one fourth of the maximum size and * 1065 * the COMM buffer for the port is empty. * 1066 ********************************************************************************** 1067 1068 * \ / 04891 5C09101D 4 ZBM 1069 CMZ TCB,TCIQXOFFED has this port been XOFFed? 04892 FE0248A5 1070 JEQ NOTXOFFED if not, then no problem 04893 600400F7 0 IMM 1071 LD R0 MAXIXOFF/4 get XON threshold value 04894 640922FB 0 4 ZBM 1072 CPR R0 TCB,TCTTICNT see if it is time to XON the port 04895 FE0A48A5 1073 JLE NOTXOFFED if not then keep on going 1074 * \ / 1075 04896 600400FF 0 IMM 1076 LD R0 CIATRMBUFL-1 get size of cia terminal's buffer 04897 64091289 0 4 ZBM 1077 CPR R0 TCB,TCOUTSPACE is the terminal's buffer empty? 04898 FE0C48E5 1078 JNE CHARSMOVDX if not then skip this port 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 975 (CIADRIVER) F 48 CIA interrupt routine 1079 * \ / 1080 04899 60840011 2 IMM 1081 LD R2 XON pick up the XON character 0489A 60C40000 3 IMM 1082 LD TCQ 0 0489B DC404994 1083 CALLNP OUTTERMCH put it in its own TCQ 0489C DC004A4C 1084 CALL LINKBEGLST put at the head of our output list 0489D 41440001 IMM 1085 PARV 1 number of characters 0489E 4116C400 3 @R 1086 PAR @TCQ beginning of list 0489F 4016C400 3 @R 1087 PARL @TCQ end of list 048A0 EC09101D 4 ZBM 1088 STZ TCB,TCIQXOFFED say that we are no longer xoffed 1089 PUNLOCK TCB,TCLOCK unlock the TCB 048A1 EC170818 4 BASE 1089 STZ TCB,TCLOCK 048A2 0C800000 1089 ION 048A3 D0401F05 1090 DEC TERMWBUSY one less XOFF out there 048A4 60D78801 3 6 BASE 1091 LD R3 SP,COMBLOCK restore R3 1092 * \ / 1093 000048A5 1094 NOTXOFFED LABEL 048A5 5C091F1A 4 ZBM 1095 CMZ TCB,TCTTOBP anything to output? 048A6 FE0248E5 1096 JEQ CHARSMOVDX jump if not 048A7 5C178803 6 BASE 1097 CMZ SP,COMBUFR any buffer remaining? 048A8 FE0A4908 1098 JLE EXTRAWRIT if none, extra writes required! 1099 PLOCK TCB,TCLOCK get access to the list 048A9 0CC00000 1099 IOFF 048AA D1D70818 4 BASE 1099 SETT TCB,TCLOCK 048AB FE0C48AD 1099 JNE MA(2+DISPW MA 0) 048AC DC40308B 1099 CALLNP LOCKWAIT 000048AD 1100 CHARMOVE LABEL 048AD 60C91F1A 3 4 ZBM 1101 LD TCQ TCB,TCTTOBP get pointer to the list beginning 048AE FAF048D6 3 1102 JZA TCQ CHARSMOVD jump if empty list 048AF 5C08DC10 3 ZBM 1103 CMZ TCQ,TCQCOMND is the first a command? 048B0 FE0C48E9 1104 JNE PUTCOMND jump if it's a command 1105 * \ / 1106 048B1 6056C004 1 3 CACH 1107 LD R1 TCQ,TCQLAST get index to end character 048B2 1056C000 1 3 CACH 1108 SUB R1 TCQ,TCQFIRST R1=#characters in block 048B3 50578803 1 6 BASE 1109 MIN R1 SP,COMBUFR buffer remaining 048B4 60091289 0 4 ZBM 1110 LD R0 TCB,TCOUTSPACE get how much space is available 048B5 10170014 0 4 CACH 1111 SUB R0 TCB,TCBAUDROOM remove some dependent on baud rate 048B6 50520000 1 0 REG 1112 MIN R1 R0 don't send out more than this 048B7 FA4A48D6 1 1113 JLEZ R1 CHARSMOVD jump if nothing can be moved 048B8 6097000F 2 4 CACH 1114 LD R2 TCB,TCCIAPORT get the port number 048B9 E4974000 2 5 CACH 1115 ST R2 CACH R5,0 place in the output buffer 048BA E4574001 1 5 CACH 1116 ST R1 CACH R5,1 place the number of chars to follow 048BB 6016C000 0 3 CACH 1117 LD R0 TCQ,TCQFIRST get index to first character 048BC 601AC006 0 30 CACH 1118 LD R0 TCQ,TCQCHARS(R0+1) and pick up first char for trace 1119 TRACE CIATRACE,CIATOCH trace output character(s) 048BD 5D401D2D 1119 XCT TRACECALL(CIATRACE) 048BE FEC00026 1119 NOP (CIATRACE*BITS 22:26)+(CIATOCH*BITS 27:31) 048BF 38974002 2 5 CACH 1120 LEA R2 CACH R5,2 R2 = destination address 048C0 60165002 0 1 REG 1121 LD R0 R1+2 R0 = total length of the output 048C1 B0178803 0 6 BASE 1122 RSBM R0 SP,COMBUFR less buffer remaining 048C2 980B5F30 0 5 CBM 1123 ADDM R0 R5/FLDCHARS move the buffer pointer 048C3 B0491289 1 4 ZBM 1124 RSBM R1 TCB,TCOUTSPACE less space in output buffer 048C4 B04900FA 1 4 ZBM 1125 RSBM R1 TCB,TCTTOCNT fewer output characters 048C5 6016C000 0 3 CACH 1126 LD R0 TCQ,TCQFIRST get index to first output char 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 976 (CIADRIVER) F 48 CIA interrupt routine 048C6 9856C000 1 3 CACH 1127 ADDM R1 TCQ,TCQFIRST move up the beginning index 048C7 381AC006 0 30 CACH 1128 LEA R0 TCQ,TCQCHARS(R0+1) create source address 048C8 FE400000 1129 CMOVE move the characters 048C9 6096C000 2 3 CACH 1130 LD R2 TCQ,TCQFIRST get new beginning pointer 048CA 6496C004 2 3 CACH 1131 CPR R2 TCQ,TCQLAST is the thing empty? 048CB FE0848D4 1132 JLT NOTEMPTYB jump if some left 1133 * \ / 1134 000048CC 1135 REMOVCOMND LABEL 048CC 6008DF10 0 3 ZBM 1136 LD R0 TCQ,TCQLINK get pointer to next TCB element 048CD E4091F1A 0 4 ZBM 1137 ST R0 TCB,TCTTOBP remove the element from the list 048CE FA3248D1 0 1138 JNZA R0 NOTEMPTYQ jump if list not empty yet 048CF EC09011B 4 ZBM 1139 STZ TCB,TCTTOEP mark the queue as empty 048D0 D0401F05 1140 DEC TERMWBUSY one less writer 000048D1 1141 NOTEMPTYQ LABEL 048D1 DC002F5D 1142 CALL SFREEMEM free up the last TCQ 048D2 4148D060 3 ZBM 1143 PARV TCQ,TCQLOG log size and 048D3 4052C000 3 REG 1144 PARVL TCQ address 000048D4 1145 NOTEMPTYB LABEL 048D4 5C091289 4 ZBM 1146 CMZ TCB,TCOUTSPACE space left in CIA? 048D5 FE0C48AD 1147 JNE CHARMOVE jump if more room to try 1148 * \ / 1149 1150 ********************************************************************************** 1151 * * 1152 * The characters are all moved for this port. Finish it * 1153 * off and move to the next port. * 1154 * * 1155 ********************************************************************************** 1156 1157 * \ / 000048D6 1158 CHARSMOVD LABEL 1159 PUNLOCK TCB,TCLOCK lock access to this TCB 048D6 EC170818 4 BASE 1159 STZ TCB,TCLOCK 048D7 0C800000 1159 ION 048D8 600900FA 0 4 ZBM 1160 LD R0 TCB,TCTTOCNT get the remaining output count 048D9 640914A2 0 4 ZBM 1161 CPR R0 TCB,TCUNSUSP check against the unsuspend limit 048DA FE0648E2 1162 JGE NOUNSUSP jump if not time to release 048DB 60C91F17 3 4 ZBM 1163 LD R3 TCB,TCPCADRS get the address of the PCB 048DC FAF048E2 3 1164 JZA R3 NOUNSUSP jump if no longer a PCB there 048DD 6008D260 0 3 ZBM 1165 LD R0 R3,PCQUEUE get the PCB scheduler queue location 048DE 6404000D 0 IMM 1166 CPR R0 NQTRMOWAIT is this process waiting for the terminal? 048DF FE0C48E2 1167 JNE NOUNSUSP jump if not 048E0 DC003573 1168 CALL DQUETHIS call to release this user 048E1 40001DB6 1169 PARL SQTRMOWAIT from this queue 1170 * \ / 1171 000048E2 1172 NOUNSUSP LABEL 048E2 60D78801 3 6 BASE 1173 LD R3 SP,COMBLOCK retrieve the control block pointer 048E3 5C001F05 1174 CMZ TERMWBUSY any more writers? 048E4 FE02486F 1175 JEQ DONEWRITE if no more writers, get out of here 1176 * \ / 1177 000048E5 1178 CHARSMOVDX LABEL 048E5 1904001D 4 IMM 1179 ADD TCB TCBLNTH move to the next TCB 048E6 FBE04891 7 1180 IRJ R7 WRITTCBX loop if another TCB on board 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 977 (CIADRIVER) F 48 CIA interrupt routine 048E7 61D78802 7 6 BASE 1181 LD R7 SP,COMCCNT get the board number 048E8 FE0E486E 1182 JMP NXTBRDWX jump to check for done 1183 * --- 1184 1185 1186 ********************************************************************************** 1187 * * 1188 * The thing in the output queue is a command. Place it * 1189 * in the output buffer if there is room and character room in * 1190 * the CIA. * 1191 * * 1192 ********************************************************************************** 1193 000048E9 1194 PUTCOMND LABEL 048E9 6048C081 1 3 ZBM 1195 LD R1 TCQ,TCQCCODE pick up command code 048EA 64440090 1 IMM 1196 CPR R1 PORTPCINIT is this the initialize pseudo command? 048EB FE0C48EE 1197 JNE NOTPSEUDO jump if not 1198 * \ / 1199 048EC EC090249 4 ZBM 1200 STZ TCB,TCINTSTATE reset the interface state 048ED FE0E48CC 1201 JMP REMOVCOMND remove this command element 1202 * --- 1203 000048EE 1204 NOTPSEUDO LABEL 048EE 60840004 2 IMM 1205 LD R2 CPW must have whole word in output buffer 1206 * because of the way we do the store 048EF 64978803 2 6 BASE 1207 CPR R2 SP,COMBUFR does the output buffer have room? 048F0 FE0448D6 1208 JGT CHARSMOVD jump if no room 1209 * \ / 1210 048F1 6444008F 1 IMM 1211 CPR R1 PORTCZAP the immediate reset command? 048F2 FE0248F6 1212 JEQ OKCOMMAND if so, don't do space check 048F3 6096C000 2 3 CACH 1213 LD R2 TCQ,TCQCLNTH get the length of the command 048F4 64891289 2 4 ZBM 1214 CPR R2 TCB,TCOUTSPACE room in the CIA for the command? 048F5 FE0448D6 1215 JGT CHARSMOVD jump if no room 000048F6 1216 OKCOMMAND LABEL 048F6 6097000F 2 4 CACH 1217 LD R2 TCB,TCCIAPORT get the port number 048F7 E4974000 2 5 CACH 1218 ST R2 CACH R5,0 place in output buffer 048F8 E4574001 1 5 CACH 1219 ST R1 CACH R5,1 place the command code 048F9 D00B5F30 5 CBM 1220 INC R5/FLDCHARS advance to command code 048FA 6008D181 0 3 ZBM 1221 LD R0 TCQ,TCQCPARMS pick up parameters to the command 048FB E4095180 0 5 ZBM 1222 ST R0 ZBM R5,0/BITS 8:31 place parameters in the buffer 1223 TRACE CIATRACE,CIATSSTAT trace for sending status 048FC 5D401D2D 1223 XCT TRACECALL(CIATRACE) 048FD FEC00028 1223 NOP (CIATRACE*BITS 22:26)+(CIATSSTAT*BITS 27:31) 048FE 6016C000 0 3 CACH 1224 LD R0 TCQ,TCQCLNTH get the length of the command 048FF 980B5F30 0 5 CBM 1225 ADDM R0 R5/FLDCHARS advance buffer pointer past parameters 04900 60961001 2 0 REG 1226 LD R2 R0+1 produce total size of command (parms + 1 for comnd) 04901 B0978803 2 6 BASE 1227 RSBM R2 SP,COMBUFR a little less CIA output buffer 04902 60840004 2 IMM 1228 LD R2 TCCMNDBURD get assumed command size 04903 B08900FA 2 4 ZBM 1229 RSBM R2 TCB,TCTTOCNT and remove from current output total 04904 6444008F 1 IMM 1230 CPR R1 PORTCZAP the immediate reset command? 04905 FE0248CC 1231 JEQ REMOVCOMND if so, don't decrement available space 04906 B0091289 0 4 ZBM 1232 RSBM R0 TCB,TCOUTSPACE remove space from this ports buffer 04907 FE0E48CC 1233 JMP REMOVCOMND free up the block 1234 * --- 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 978 (CIADRIVER) F 48 CIA interrupt routine 1235 1236 ********************************************************************************** 1237 * * 1238 * It seems that not all of the characters to output fit * 1239 * into the output buffer. We therefore write this buffer and * 1240 * wait for an end-of-operation interrupt to tell us that we * 1241 * can write another bunch. * 1242 * * 1243 ********************************************************************************** 1244 00004908 1245 EXTRAWRIT LABEL 1246 PFAILDS disable power-failure interrupts 04908 59840800 IMM 1246 CLBMSR MSRPFINTE 04909 EC00044F 1246 STZ POWERUPLOC 0490A 5C00044E 1247 CMZ POWERFLAG did one happen? 0490B FE0C28B7 1248 JNE DISPATCH jump if so 0490C 60040003 0 IMM 1249 LD R0 COMSTWRIT2 continuing write state 0490D FE0E4876 1250 JMP DOCIAWRITX 1251 * --- 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 979 (CIADRIVER) F 48 CIA interrupt routine 1253 1254 ********************************************************************************** 1255 * * 1256 * Several operations handling the CIA interface require * 1257 * timing. Here we check for timing in progress and, if so, * 1258 * we find the terminals currently timing and if timing is * 1259 * complete, we go through the specified processing routine. * 1260 * The placement of this routine ( just in the write * 1261 * code ) allows it to be also used to place commands into * 1262 * the output buffer. This is done by setting timing to * 1263 * one 'tick' and specifying the address of a routine that * 1264 * will place the command in the buffer. We must make sure * 1265 * that the CIA we're interrupting for here is the one * 1266 * being timed. * 1267 * Note that since TCBs are created for an entire CIA * 1268 * at a time, they are linked together in contiguous clumps * 1269 * for each CIA. Therefore we start scanning at the beginning * 1270 * of the CIAs terminals in the TCB list, and when we reach * 1271 * some other CIA's TCBs we can stop. * 1272 * Also the timing count is a negative count so we * 1273 * can LSRCH for the sign bit (TCTIMEFLAG) through the TCBs * 1274 * to find timing terminals. * 1275 * * 1276 ********************************************************************************** 1277 1278 * R3 -> comm block for this CIA 1279 0000490E 1280 DOTIMING LABEL 0490E 6116C80B 4 3 BASE 1281 LD TCB R3,COMFRSTTRM TCB => first TCB belonging to this comm 0000490F 1282 FINDTIMER LABEL 0490F 600400FF 0 IMM 1283 LD R0 0FF should be in first char of TCTIMECNT 04910 3C17005C 0 4 CACH 1284 LSRCH R0 TCB,TCTIMEFLAG look for a timing terminal 04911 FE0C4866 1285 JNE CHECKWBUSY if not found then done here 04912 64C91F16 3 4 ZBM 1286 CPR R3 TCB,TCCIABLOCK is this timer for this CIA? 04913 FE0C4866 1287 JNE CHECKWBUSY if not, we are done 04914 D0170817 4 BASE 1288 INC TCB,TCTIMECNT count the time 04915 FE084937 1289 JLT FINDTIMERX don't do anything if more time to go 04916 EC170817 4 BASE 1290 STZ TCB,TCTIMECNT be sure to clear out counter 04917 D056C80A 3 BASE 1291 DEC R3,COMTRMTMNG indicate this guy no longer timing 04918 60090A39 0 4 ZBM 1292 LD R0 TCB,TCTIMERTN get the routine index 04919 5CA0491A 0 1293 LDPC TIMERTNT(R0) go to the timing routine 1294 * --- 1295 0000491A 1296 TIMERTNT BASE 0491A 0000491C 1297 TIMEDISC VFD ADR TIMEDISCR disconnect on timeout 0491B 00004935 1298 TIMESHUT VFD ADR TIMESHUTR end of port shutdown time 1299 DRCT 1300 1301 ********************************************************************************** 1302 * * 1303 * The timeout implies that the program must be * 1304 * disconnected. We pass the information to the process. * 1305 * The sub-code for the error passed is the unit number * 1306 * of the terminal. The sign bit is set iff the terminal * 1307 * is an absolute i/o unit. * 1308 * * 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 980 (CIADRIVER) F 48 CIA interrupt routine 1309 ********************************************************************************** 1310 0000491C 1311 TIMEDISCR LABEL 0491C DC0030AA 1312 CALL SRCHLIST see that the process doesn't disappear 0491D 40001EB2 1313 PARL PCNTLLOCK 0491E E5578804 5 6 BASE 1314 ST R5 SP,OUTBUFPTR save output buffer pointer 1315 PLOCK TCB,TCLOCK lock TCB 0491F 0CC00000 1315 IOFF 04920 D1D70818 4 BASE 1315 SETT TCB,TCLOCK 04921 FE0C4923 1315 JNE MA(2+DISPW MA 0) 04922 DC40308B 1315 CALLNP LOCKWAIT 04923 61491F17 5 4 ZBM 1316 LD R5 TCB,TCPCADRS get ptr to PCB 04924 FB70492C 5 1317 JZA R5 NOZAP process already gone 04925 61495F13 5 5 ZBM 1318 LD R5 R5,PCPSADRS get pointer to PSA 04926 FB70492C 5 1319 JZA R5 NOZAP no PSA exists 04927 60841024 2 IMM 1320 LD R2 UINTTDISC+CMERR get error code 04928 60C91F15 3 4 ZBM 1321 LD R3 TCB,TCFCB FCB address is subcode 04929 DC4035B5 1322 CALLNP UERRSETY tell the session that terminal is disconnected 0492A 60C91F17 3 4 ZBM 1323 LD R3 TCB,TCPCADRS get pointer to PCB 0492B DC403569 1324 CALLNP ROUST get the session out of waits 1325 * \ / 1326 0000492C 1327 NOZAP LABEL 0492C 61578804 5 6 BASE 1328 LD R5 SP,OUTBUFPTR restore R5 1329 ***** check for need for following instruction 0492D D0090249 4 ZBM 1330 INC TCB,TCINTSTATE tell interface state that it's flushed 1331 PUNLOCK TCB,TCLOCK let the TCB free 0492E EC170818 4 BASE 1331 STZ TCB,TCLOCK 0492F 0C800000 1331 ION 04930 DC0030B7 1332 CALL UNSRCHLIST release process list 04931 40001EB2 1333 PARL PCNTLLOCK 04932 DC004A79 1334 CALL SETTRSMTR hang it up 04933 40440000 IMM 1335 PARVL 0*PORTSDTR+0*PORTSRTS 04934 FE0E4936 1336 JMP FINDTIMERY keep working on the TCBs 1337 * --- 1338 1339 ********************************************************************************** 1340 * * 1341 * A port that is receiving mucho unread characters is * 1342 * shut down for a minute at a time. This is the end of the * 1343 * minute so we push the port through a reset. * 1344 * * 1345 ********************************************************************************** 1346 00004935 1347 TIMESHUTR LABEL 04935 DC404AE0 1348 CALLNP OUTTSETX reset the port 00004936 1349 FINDTIMERY LABEL 04936 60D78801 3 6 BASE 1350 LD R3 SP,COMBLOCK restore control block pointer 00004937 1351 FINDTIMERX LABEL 04937 FB36490F 4 1352 LJNA TCB FINDTIMER link to next TCB 04938 FE0E4866 1353 JMP CHECKWBUSY 1354 * --- 1355 1356 ********************************************************************************** 1357 * * 1358 * Control comes here at power-fail restart time. We * 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 981 (CIADRIVER) F 48 CIA interrupt routine 1359 * resume the operation of moving characters into or out of * 1360 * the CIA buffer. * 1361 * * 1362 ********************************************************************************** 1363 00004939 1364 PFAIL LABEL 04939 81530000 4 REG 1365 STCAR R4 get access to regs 0493A 60000450 0 1366 LD R0 POWERRTNPC get where to return 0493B E4091F10 0 4 ZBM 1367 ST R0 R4,CAPC save so we can return there 0493C EDC92811 4 ZBM 1368 STW R4,CAMSR/MSRPFINTEB enable future ints 0493D 01130000 4 REG 1369 LDCA R4 resume interrupted routine 1370 * --- 1371 1372 ********************************************************************************** 1373 * * 1374 * Table of TCB displacements so a multiply is not needed. * 1375 * * 1376 ********************************************************************************** 1377 0000493E 1378 TCBLENGTHS LABEL 0493E 00000000 1379 VFD TCBLNTH*(DISPW TCBLENGTHS) 0493F 0000001D 1380 VFD TCBLNTH*(DISPW TCBLENGTHS) 04940 0000003A 1381 VFD TCBLNTH*(DISPW TCBLENGTHS) 04941 00000057 1382 VFD TCBLNTH*(DISPW TCBLENGTHS) 04942 00000074 1383 VFD TCBLNTH*(DISPW TCBLENGTHS) 04943 00000091 1384 VFD TCBLNTH*(DISPW TCBLENGTHS) 04944 000000AE 1385 VFD TCBLNTH*(DISPW TCBLENGTHS) 04945 000000CB 1386 VFD TCBLNTH*(DISPW TCBLENGTHS) 1387 1388 END CIA_INT routine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 982 (CIADRIVER) F 48 CIA interrupt routine 1390 1391 ********************************************************************************** 1392 * * 1393 * MAKEABSAD. Routine to transform an 18 bit virtual * 1394 * address into an absolute address acceptable to the PPU. * 1395 * Call: * 1396 * * 1397 * LD R1 18 bit virtual address * 1398 * CALLNP MAKEABSAD * 1399 * ST R0 absolute address * 1400 * * 1401 * Mangles R1 and R3. * 1402 * Stack required = 1 * 1403 * * 1404 ********************************************************************************** 1405 1406 BLOCK MAKEABSAD subroutine 1407 ENTRY MAKEABSAD 1408 1409 BEGFRAME 1410 ENDFRAME 1411 04946 DD5F8001 6 STAK 1412 MAKEABSAD ENTRNP PUSH 04947 60CA5C80 3 1 CBM 1413 LD PFPTR R1/PAGEFIELD point to the page 04948 80920000 0 REG 1414 PFRD R0 get the page map value being used 04949 E40A54C0 0 1 CBM 1415 ST R0 R1/FLDABSPG 0494A E44A1560 1 0 CBM 1416 ST R1 R0/PAGEANDISP 0494B 5D1F8001 6 STAK 1417 LEAVE POP 1418 * --- 1419 1420 END MAKEABSAD subroutine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 983 (CIADRIVER) F 48 CIA interrupt routine 1422 1423 ********************************************************************************** 1424 * * 1425 * CIA_RESET. Communication Interface Adaptor reset. * 1426 * This routine will do a reset and reinitialization of the * 1427 * specified CIA. It first sees if the CIA is talking by * 1428 * asking the PPU to check cabling. If the CIA talks, we will * 1429 * initialize the CIA ports and set it going again. If the * 1430 * CIA won't talk, we just flush each ports input and output * 1431 * queues and wait for human intervention. * 1432 * Call: * 1433 * SP => stack top * 1434 * LD R5 => CIA control block * 1435 * CIX => device * 1436 * LD R0 zero if CIA clammed up, 1 if alive * 1437 * CALLNP CIA_RESET * 1438 * Eats R0:R4. * 1439 * Stack required = 12 * 1440 * 4 + max ( FLUSHIQ (2), FLUSHOQ (1), OUTTSETX (8), * 1441 * TRACEPROC (3) ) * 1442 * * 1443 ********************************************************************************** 1444 1445 BLOCK CIA_RESET subroutine 1446 ENTRY CIA_RESET 1447 1448 BEGFRAME 00178801 6 BASE 1449 CRSTPORT BSS 1 holds current port number 00178802 6 BASE 1450 CRSTBRD BSS 1 holds current board number 00178803 6 BASE 1451 CRSTR7SV BSS 1 saves R7 1452 ENDFRAME 1453 0494C DD5F8004 6 STAK 1454 CIA_RESET ENTRNP PUSH 0494D E5D78803 7 6 BASE 1455 ST R7 SP,CRSTR7SV save this register 0494E FA304974 0 1456 JZA R0 NOCIATALK jump if PPU not talking 0494F 60174802 0 5 BASE 1457 LD R0 R5,COMPF "who" for trace 04950 60497085 1 5 ZBM 1458 LD R1 R5,COMSTATE what doing for trace 1459 TRACE CIATRACE,CIATRST 04951 5D401D2D 1459 XCT TRACECALL(CIATRACE) 04952 FEC00023 1459 NOP (CIATRACE*BITS 22:26)+(CIATRST*BITS 27:31) 04953 EC001801 1460 STZ CIX(PPUABORT) clean out the PPU channel 1461 * \ / 1462 * The CIA seems to be talking, so we reset him 04954 EC001A02 1463 STZ CIX(CIAINTMASK) no interrupts yet 04955 D1401A01 1464 STMW CIX(CIAINTACK) acknowledge all previous interrupts 04956 6004002D 0 IMM 1465 LD R0 CIATICKTIME use standard value 04957 E4001A06 0 1466 ST R0 CIX(CIASETTICK) set timer interval 04958 60040000 0 IMM 1467 LD R0 CIAMODEN 04959 E4001A09 0 1468 ST R0 CIX(CIAMODE) set mode for CIA 0495A 60040000 0 IMM 1469 LD R0 COMSTIDLE 0495B E4097085 0 5 ZBM 1470 ST R0 R5,COMSTATE state of the driver is "idle" 1471 * \ / 1472 1473 ********************************************************************************** 1474 * This loop checks each board position in the CIA * 1475 * by checking the base TCB pointer for each position. * 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 984 (CIADRIVER) F 48 CIA interrupt routine 1476 * This currently means no dynamic reconfiguration! * 1477 * Within each board, it presumes that all eight ports * 1478 * are present AND that the TCBs are arranged sequentially * 1479 * (see non-standard construction method). * 1480 ********************************************************************************** 1481 1482 * \ / 0495C 61C7FFF8 7 IMM 1483 LD R7 -CIABOARDS the number of boards to check 0000495D 1484 NEXTBRDL LABEL 0495D 611D7814 4 57 BASE 1485 LD TCB R5,COMTERMS(CIABOARDS)(R7) 0495E FB02496D 4 1486 JEQZ TCB NOBRDHERE jump if no board to initialize 0495F E5D78802 7 6 BASE 1487 ST R7 SP,CRSTBRD save board index 04960 6017D008 0 7 REG 1488 LD R0 R7+CIABOARDS make actual board number 04961 600A0600 0 0 CBM 1489 LD R0 R0*CIABRDF shift board number to make port index 04962 E4178801 0 6 BASE 1490 ST R0 SP,CRSTPORT save index 00004963 1491 NEXTTCBL LABEL 04963 6017000F 0 4 CACH 1492 LD R0 TCB,TCCIAPORT get the hardware port number 04964 60201A80 0 0 1493 LD R0 CIX(CIAPORT+R0) pick up the port's status 04965 5C0A3E10 0 CBM 1494 CMZ R0/CIAPMODM is this a modem? 04966 ED890019 4 ZBM 1495 STLNE TCB,TCMODEM keep the TCB up to date 04967 DC404AE0 1496 CALLNP OUTTSETX reset this port 04968 1904001D 4 IMM 1497 ADD TCB TCBLNTH move to next TCB 04969 BC178801 0 6 BASE 1498 INCL R0 SP,CRSTPORT move to next port number 0496A 78040007 0 IMM 1499 AND R0 (2 POWER (CIAPPBRD LOG 2))-1 all on board initialized? 0496B FA0C4963 0 1500 JNEZ R0 NEXTTCBL jump if not, scan the next 0496C 61D78802 7 6 BASE 1501 LD R7 SP,CRSTBRD if so, restore board index 0000496D 1502 NOBRDHERE LABEL 0496D FBE0495D 7 1503 IRJ R7 NEXTBRDL loop through all boards 1504 * \ / 1505 * All ports ready to go. Give the CIA its marching orders 0496E 60040013 0 IMM 1506 LD R0 1*CIATICK+1*CIAERR+1*CIAFULL 0496F E4001A02 0 1507 ST R0 CIX(CIAINTMASK) enable interrupts from CIA 04970 60040800 0 IMM 1508 LD R0 1*PPUICIA 04971 E4001802 0 1509 ST R0 CIX(PPUSSSTAT) allow the PPU to pass us the interrupts 04972 61D78803 7 6 BASE 1510 LD R7 SP,CRSTR7SV restore R7 04973 5D1F8004 6 STAK 1511 LEAVE POP 1512 * --- 1513 1514 ********************************************************************************** 1515 * * 1516 * The CIA isn't talking. Well, all that we can do is * 1517 * flush all of the ports input and output queues so that * 1518 * there will be a chance of evicting the processes. * 1519 * * 1520 ********************************************************************************** 1521 1522 00004974 1523 NOCIATALK LABEL 04974 6007FFF8 0 IMM 1524 LD R0 -CIABOARDS get number of boards possible 00004975 1525 NEXTBRDM LABEL 04975 611D4014 4 50 BASE 1526 LD TCB R5,COMTERMS(CIABOARDS)(R0) 04976 FB024980 4 1527 JEQZ TCB NOBRDHEREM jump if no board in this slot 04977 E4178802 0 6 BASE 1528 ST R0 SP,CRSTBRD save the current board index 04978 60040008 0 IMM 1529 LD R0 CIAPPBRD get the number of ports on this board 04979 E4178801 0 6 BASE 1530 ST R0 SP,CRSTPORT set number of ports on a board 0000497A 1531 NEXTTCBM LABEL 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 985 (CIADRIVER) F 48 CIA interrupt routine 0497A DC404AF8 1532 CALLNP FLUSHIQ flush all characters 0497B DC404AE3 1533 CALLNP FLUSHOQ 0497C 1904001D 4 IMM 1534 ADD TCB TCBLNTH move to next TCB 0497D D0578801 6 BASE 1535 DEC SP,CRSTPORT see if this board is done 0497E FE04497A 1536 JGT NEXTTCBM jump if still more 0497F 60178802 0 6 BASE 1537 LD R0 SP,CRSTBRD recover the board number 00004980 1538 NOBRDHEREM LABEL 04980 FA204975 0 1539 IRJ R0 NEXTBRDM move through all possible boards 04981 61D78803 7 6 BASE 1540 LD R7 SP,CRSTR7SV restore R7 04982 5D1F8004 6 STAK 1541 LEAVE POP return that sez he won't talk 1542 * --- 1543 1544 END CIA_RESET subroutine 1545 1546 1547 END CIA Driver 84 INPUT CIAOUTUTIL Output Utilities for Comm 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 986 (CIAOUTUTIL) F 49 Output utility routines for the CIA 3 4 BLOCK Comm Utility Routines 5 6 ENTRY DELAYCHS pointer to array of characters that delay 7 ENTRY FLUSHOQ flush terminal output queue 8 ENTRY GETOUTCHAR get char from output list 9 ENTRY LINK1CMND place one command in output queue 10 ENTRY LINKBEGLST link TCQ list into start of output queue 11 ENTRY LINKINTLST link TCQ list into output queue 12 ENTRY LINKTCQLST link TCQ list into output queue 13 ENTRY LNKCMNDBEG place one command at start of output queue 14 ENTRY MAKECEL make a CIA command element 15 ENTRY OUTTSET reinitialize a single port 16 ENTRY OUTTSETX reinitialize a single port 17 ENTRY OUTTERMCH special routine to put out one char 18 ENTRY PLACEOUTCH put one character in out list 19 ENTRY SETACCOPTS set output options 20 ENTRY SETTRSMTR set the ports transmitters 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 987 (CIAOUTUTIL) F 49 Output utility routines for the CIA 22 23 ********************************************************************************** 24 * * 25 * PLACEOUTCH. * 26 * Routine to place a single character into the output * 27 * queue for a specified terminal. The TCB is locked and * 28 * OUTTERMCH is called to actually link in the character. * 29 * Note that it will emplace delay elements if necessary. * 30 * If the terminal was not already outputting, we increment * 31 * the count of outputters. * 32 * Call: * 33 * * 34 * LD R2 character * 35 * LD R4 => TCB * 36 * CALLNP PLACEOUTCH * 37 * * 38 * Gets R0 thru R3. * 39 * Stack required = 6 * 40 * 1 + max ( LOCKWAIT (0), OUTTERMCH (5) ) * 41 * * 42 ********************************************************************************** 43 44 BLOCK PLACEOUTCH subroutine 45 ENTRY PLACEOUTCH 46 47 BEGFRAME 48 ENDFRAME 49 04983 DD5F8001 6 STAK 50 PLACEOUTCH ENTRNP PUSH 51 PLOCK TCB,TCLOCK get access to the list 04984 0CC00000 51 IOFF 04985 D1D70818 4 BASE 51 SETT TCB,TCLOCK 04986 FE0C4988 51 JNE MA(2+DISPW MA 0) 04987 DC40308B 51 CALLNP LOCKWAIT 04988 60C9011B 3 4 ZBM 52 LD TCQ TCB,TCTTOEP get end of output queue 04989 DC404994 53 CALLNP OUTTERMCH put the char in the list 0498A 18040001 0 IMM 54 ADD R0 1 add for the single character 0498B 980900FA 0 4 ZBM 55 ADDM R0 TCB,TCTTOCNT increase the output queue size 0498C E4C9011B 3 4 ZBM 56 ST TCQ TCB,TCTTOEP set new list element 0498D 5C091F1A 4 ZBM 57 CMZ TCB,TCTTOBP was there anything in the list? 0498E FE0C4991 58 JNE NOTNEWB jump if not a first block 0498F E4891F1A 2 4 ZBM 59 ST R2 TCB,TCTTOBP point beginning at it 04990 D0001F05 60 INC TERMWBUSY indicate one more writer 00004991 61 NOTNEWB LABEL 62 PUNLOCK TCB,TCLOCK release list 04991 EC170818 4 BASE 62 STZ TCB,TCLOCK 04992 0C800000 62 ION 04993 5D1F8001 6 STAK 63 LEAVE POP 64 * --- 65 66 END PLACEOUTCH subroutine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 988 (CIAOUTUTIL) F 49 Output utility routines for the CIA 68 69 ********************************************************************************** 70 * * 71 * OUTTERMCH. * 72 * Routine to link a single character into the indicated * 73 * list of TCQs. If the character is delayable, a command * 74 * element with the appropriate delay command will also be * 75 * linked into the TCQ list. * 76 * This routine does not alter the TCB, so * 77 * the TCB may be locked or not. However, if the TCQ list * 78 * that we are extending is pointed to by the TCB, the TCB * 79 * must be locked. Otherwise, a flush output queue would * 80 * produce a disaster. Note also that the TCB is consulted * 81 * for information on delayable characters. * 82 * Call: * 83 * See above note about TCB being locked. * 84 * LD R4 => TCB * 85 * LD TCQ => last queue element * 86 * LD R2 character * 87 * CALLNP OUTTERMCH * 88 * TCQ -- may point to new block * 89 * R2 -- 0 or ptr to first created TCQ element * 90 * R0 -- total burden for command TCQs created * 91 * Gets R0 thru R2 and TCQ may be a new block. * 92 * It is possible for this routine to create more than * 93 * 1 TCQ block. To cover this case, R2 returns the * 94 * address of the first created block. Zero if none * 95 * created. * 96 * Stack required = 5 * 97 * 4 + max ( MAKECEL (1), SGETMEM (0) ) * 98 * * 99 ********************************************************************************** 100 101 BLOCK OUTTERMCH subroutine 102 ENTRY OUTTERMCH 103 ENTRY DELAYCHS 104 105 BEGFRAME 00178801 6 BASE 106 OUTTRMCHF BSS 1 first TCQ element 00178802 6 BASE 107 OUTTRMDLY BSS 1 save for DLY 00178803 6 BASE 108 OUTTRMCBRD BSS 1 total burden for created command elements 109 ENDFRAME 110 00000003 ABS 111 OUTTRMDSIZ EQU 8 LOG 2 default queue block size 112 04994 DD5F8004 6 STAK 113 OUTTERMCH ENTRNP PUSH 04995 EC178801 6 BASE 114 STZ SP,OUTTRMCHF indicate no TCQ elements created yet 04996 EC178803 6 BASE 115 STZ SP,OUTTRMCBRD and no commands either 04997 FAF0499A 3 116 JZA TCQ ADDNEW jump if no block 04998 5C08DC10 3 ZBM 117 CMZ TCQ,TCQCOMND is the current block a command? 04999 FE0249A5 118 JEQ PLACECHAR if not, then add char 0000499A 119 ADDNEW LABEL 0499A DC002ED0 120 CALL SGETMEM eight word block = 26 characters 0499B 40440003 IMM 121 PARVL OUTTRMDSIZ 0499C E4178801 0 6 BASE 122 ST R0 SP,OUTTRMCHF save address of first created block 0499D EE160800 0 BASE 123 STZ2 R0,0 initialize the first two words 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 989 (CIAOUTUTIL) F 49 Output utility routines for the CIA 0499E 60440003 1 IMM 124 LD R1 OUTTRMDSIZ log size in words = OUTTRMDSIZ 0499F E4481060 1 0 ZBM 125 ST R1 R0,TCQLOG save log size 049A0 6044001A 1 IMM 126 LD R1 ((2 POWER OUTTRMDSIZ)*CPW)-TCQUSED load the available size 049A1 E4560005 1 0 CACH 127 ST R1 R0,TCQSIZE number of chars in block 049A2 FAF049A4 3 128 JZA TCQ NOTCQYET jump if no existing block 049A3 E408DF10 0 3 ZBM 129 ST R0 TCQ,TCQLINK link it to the last block 000049A4 130 NOTCQYET LABEL 049A4 60D20000 3 0 REG 131 LD TCQ R0 copy the current last block ptr to TCQ 132 * \ / 133 * Place the character if there's room 000049A5 134 PLACECHAR LABEL 049A5 BC56C004 1 3 CACH 135 INCL R1 TCQ,TCQLAST get index for placing 049A6 6456C005 1 3 CACH 136 CPR R1 TCQ,TCQSIZE see if block is full 049A7 FE0A49AA 137 JLE STOREIN if not full, store char in 049A8 D056C004 3 CACH 138 DEC TCQ,TCQLAST block already full, uncount the character 049A9 FE0E499A 139 JMP ADDNEW add a new block 140 * --- 141 142 ********************************************************************************** 143 * * 144 * We have found or generated a TCQ element that has * 145 * room for the single character that we have. Place the * 146 * character into the TCQ and check for it being a * 147 * delayable character. * 148 * * 149 ********************************************************************************** 150 000049AA 151 STOREIN LABEL 049AA E49AC805 2 31 CACH 152 ST R2 TCQ,TCQCHARS(R1) place character into block 049AB 5C3449DB 2 @ 153 CMZ @DELAYCHS(R2) could this character require a delay? 049AC FE0249D0 154 JEQ OUTTEXIT jump if not, we're done 155 * \ / 156 157 ********************************************************************************** 158 * This character is one of the magic four that MAY have * 159 * a delay specified. Pick up the specified delay. * 160 ********************************************************************************** 161 049AD 7884007F 2 IMM 162 AND R2 07F mask off the parity bit 049AE 6484000D 2 IMM 163 CPR R2 CR check for a carriage return 049AF FE0C49B2 164 JNE NOTCR jump if not a CR 049B0 600928C2 0 4 ZBM 165 LD R0 TCB,TCCRDELAY load the proper delay 049B1 FE0E49BB 166 JMP DELAYER go set up delay 167 * --- 168 000049B2 169 NOTCR LABEL 049B2 6484000A 2 IMM 170 CPR R2 LF check for a line feed 049B3 FE0C49B6 171 JNE NOTLF jump if not an LF 049B4 600900C3 0 4 ZBM 172 LD R0 TCB,TCLFDELAY load the proper delay 049B5 FE0E49BB 173 JMP DELAYER go set up delay 174 * --- 175 000049B6 176 NOTLF LABEL 049B6 64840009 2 IMM 177 CPR R2 HT check for a horizontal tab 049B7 FE0C49BA 178 JNE NOTHT jump if not an HT 049B8 600900C8 0 4 ZBM 179 LD R0 TCB,TCHTDELAY load the proper delay 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 990 (CIAOUTUTIL) F 49 Output utility routines for the CIA 049B9 FE0E49BB 180 JMP DELAYER go set up the delay 181 * --- 182 000049BA 183 NOTHT LABEL 049BA 600918C3 0 4 ZBM 184 LD R0 TCB,TCFFDELAY must be form feed, get delay 000049BB 185 DELAYER LABEL 049BB FA0249D0 0 186 JEQZ R0 OUTTEXIT jump if no delay 049BC 1C091EF1 0 4 ZBM 187 MUL R0 TCB,TCORATE 049BD 1804270F 0 IMM 188 ADD R0 1000*10-1 force to next higher integer 049BE 14042710 0 IMM 189 DIV R0 1000*10 R0 = character times to delay 049BF FA0A49D0 0 190 JLEZ R0 OUTTEXIT jump if no delay to do 000049C0 191 DELAYMORE LABEL 049C0 60920000 2 0 REG 192 LD R2 R0 copy the delay value 049C1 508400FF 2 IMM 193 MIN R2 TCQMXDELAY produce a limited value in R2 049C2 10128000 0 2 REG 194 SUB R0 R2 make R0 hold the leftover value 049C3 E4178802 0 6 BASE 195 ST R0 SP,OUTTRMDLY and save it 049C4 DC404A1C 196 CALLNP MAKECEL create a command element 049C5 41440086 IMM 197 PARV PORTDWELL the command 049C6 40528000 2 REG 198 PARVL R2 pass the delay for this command 049C7 60040004 0 IMM 199 LD R0 TCCMNDBURD get assumed size for single command 049C8 98178803 0 6 BASE 200 ADDM R0 SP,OUTTRMCBRD count up total command burden 049C9 E488DF10 2 3 ZBM 201 ST R2 TCQ,TCQLINK link in the new element 049CA 60D28000 3 2 REG 202 LD TCQ R2 049CB 5C178801 6 BASE 203 CMZ SP,OUTTRMCHF check for a TCQ already created 049CC FE0C49CE 204 JNE NOTFIRSTB jump if one already exists 049CD E4D78801 3 6 BASE 205 ST TCQ SP,OUTTRMCHF save pointer if none already present 000049CE 206 NOTFIRSTB LABEL 049CE 60178802 0 6 BASE 207 LD R0 SP,OUTTRMDLY retrieve any remaining delay value 049CF FA0449C0 0 208 JGTZ R0 DELAYMORE jump if more delay left 209 * \ / 000049D0 210 OUTTEXIT LABEL 049D0 60978801 2 6 BASE 211 LD R2 SP,OUTTRMCHF return first created block 049D1 60178803 0 6 BASE 212 LD R0 SP,OUTTRMCBRD pick up total burden 049D2 5D1F8004 6 STAK 213 LEAVE POP return 214 * --- 215 216 * Bit array of the characters that can have delay times 217 * This array contains bits for both senses of the parity bit. 218 * This array contains bits for each of CR, LF, FF, and HT. 049D3 006C0000 219 DELAYCHT VFD (1*BIT CR)+(1*BIT LF)+(1*BIT FF)+(1*BIT HT) 049D4 00000000 220 VFD 0 049D5 00000000 221 VFD 0 049D6 00000000 222 VFD 0 049D7 006C0000 223 VFD (1*BIT CR)+(1*BIT LF)+(1*BIT FF)+(1*BIT HT) 049D8 00000000 224 VFD 0 049D9 00000000 225 VFD 0 049DA 00000000 226 VFD 0 227 049DB 004849D3 228 DELAYCHS PTR DELAYCHT/BIT 0 bit pointer to table 229 230 END OUTTERMCH subroutine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 991 (CIAOUTUTIL) F 49 Output utility routines for the CIA 232 233 ********************************************************************************** 234 * * 235 * GETOUTCHAR. * 236 * Routine to fetch one character from the output * 237 * queue. Fetches the character and returns it in R2. It * 238 * ignores command blocks (freeing them as encountered) * 239 * except for breaks and dwells, so if you care you must * 240 * check before calling here. This routine also unsuspends * 241 * the writer if the number of characters drops below the * 242 * unsuspend limit. * 243 * This routine is provided solely for the SSU (RFP) * 244 * output. * 245 * Call: * 246 * LD R4 => TCB * 247 * CALLNP GETOUTCHAR * 248 * JMP * 249 * ST R2 the character * 250 * Eats R0:R3 and sets R2 * 251 * Stack required = 5 * 252 * 2 + max ( DQUETHIS (3), LOCKWAIT (0), SFREEMEM (0) ) * 253 * * 254 ********************************************************************************** 255 256 BLOCK GETOUTCHAR subroutine 257 ENTRY GETOUTCHAR 258 259 BEGFRAME 00178801 6 BASE 260 TEMP BSS 1 beats me 261 ENDFRAME 262 049DC DD5F8002 6 STAK 263 GETOUTCHAR ENTRNP PUSH 264 PLOCK TCB,TCLOCK get access to the list 049DD 0CC00000 264 IOFF 049DE D1D70818 4 BASE 264 SETT TCB,TCLOCK 049DF FE0C49E1 264 JNE MA(2+DISPW MA 0) 049E0 DC40308B 264 CALLNP LOCKWAIT 049E1 6087FFFF 2 IMM 265 LD R2 -1 no character yet 000049E2 266 NEXTLINK LABEL 049E2 60C91F1A 3 4 ZBM 267 LD TCQ TCB,TCTTOBP get first element 049E3 FAF04A19 3 268 JZA TCQ NOCHARS no characters in output queue 049E4 5C08DC10 3 ZBM 269 CMZ TCQ,TCQCOMND is this a command? 049E5 FE0249FE 270 JEQ NOTCMND if not then get the character 271 * \ / 272 049E6 60001EE4 0 273 LD R0 SSUVER can this SSU handle breaks and dwells? 049E7 FA0249F7 0 274 JEQZ R0 REMOVECMND if not then remove this command 275 * \ / 276 049E8 6016C000 0 3 CACH 277 LD R0 TCQ,TCQCLNTH get the command length 049E9 64040002 0 IMM 278 CPR R0 2 break and dwell command lengths are 2 049EA FE0C49F7 279 JNE REMOVECMND can't be one so remove the command 049EB 6008C081 0 3 ZBM 280 LD R0 TCQ,TCQWORDB/CH0 get the command code 049EC 64040086 0 IMM 281 CPR R0 PORTDWELL is it a DWELL command? 049ED FE0249F2 282 JEQ SSUDWELL 049EE 64040087 0 IMM 283 CPR R0 PORTBREAK is it a break command? 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 992 (CIAOUTUTIL) F 49 Output utility routines for the CIA 049EF FE0C49F7 284 JNE REMOVECMND if neither then remove the command 285 * \ / 286 049F0 60840100 2 IMM 287 LD R2 1*SSUBREAKB set bit indicating a break command 049F1 FE0E49F3 288 JMP BREAKJOIN share code with DWELL 289 * --- 290 000049F2 291 SSUDWELL LABEL 049F2 60840200 2 IMM 292 LD R2 1*SSUDWELLB set bit indicating a dwell command 000049F3 293 BREAKJOIN LABEL 049F3 6008D081 0 3 ZBM 294 LD R0 TCQ,TCQWORDB/CH1 get the number of characters to send 049F4 640400FF 0 IMM 295 CPR R0 SSUMAXCC only can send up to 0FF 049F5 FE0449FA 296 JGT TOOMUCH send some and decrement count 049F6 E40AB080 0 2 CBM 297 ST R0 R2/CH3 put count into our character element 298 * \ / 299 000049F7 300 REMOVECMND LABEL 049F7 60040004 0 IMM 301 LD R0 TCCMNDBURD get assumed output burden 049F8 B00900FA 0 4 ZBM 302 RSBM R0 TCB,TCTTOCNT and remove from output buffer 049F9 FE0E4A03 303 JMP FREEQUE remove the command element 304 * --- 305 000049FA 306 TOOMUCH LABEL 049FA 600400FF 0 IMM 307 LD R0 SSUMAXCC how many we can send at a time 049FB E40AB080 0 2 CBM 308 ST R0 R2/CH3 put into character element 049FC B008D081 0 3 ZBM 309 RSBM R0 TCQ,TCQWORDB/CH1 decrement the count to send 049FD FE0E4A0C 310 JMP OUTTHECHAR 311 * --- 312 313 * Not a command, get the character 000049FE 314 NOTCMND LABEL 049FE BC16C000 0 3 CACH 315 INCL R0 TCQ,TCQFIRST advance and acquire the char pointer 049FF 609AC005 2 30 CACH 316 LD R2 TCQ,TCQCHARS(R0) get the indicated character 04A00 D04900FA 4 ZBM 317 DEC TCB,TCTTOCNT reduce the count of output chars 04A01 6416C004 0 3 CACH 318 CPR R0 TCQ,TCQLAST was this the last character in this block? 04A02 FE084A0C 319 JLT OUTTHECHAR jump if not 320 * \ / 321 00004A03 322 FREEQUE LABEL current block contains a command 04A03 6008DF10 0 3 ZBM 323 LD R0 TCQ,TCQLINK get the link to the next element 04A04 E4091F1A 0 4 ZBM 324 ST R0 TCB,TCTTOBP unlink the last element 04A05 FA324A08 0 325 JNZA R0 NOTECHNG are we removing the last one? 04A06 E409011B 0 4 ZBM 326 ST R0 TCB,TCTTOEP if so, also zero list end pointer and 04A07 D0401F05 327 DEC TERMWBUSY indicate one less writer 00004A08 328 NOTECHNG LABEL 04A08 DC002F5D 329 CALL SFREEMEM free the element 04A09 4148D060 3 ZBM 330 PARV TCQ,TCQLOG length stored in the element 04A0A 4052C000 3 REG 331 PARVL TCQ indicate its address 04A0B FA8849E2 2 332 JLTZ R2 NEXTLINK jump if we don't have a character yet 00004A0C 333 OUTTHECHAR LABEL 04A0C 600900FA 0 4 ZBM 334 LD R0 TCB,TCTTOCNT get the output count 04A0D 640914A2 0 4 ZBM 335 CPR R0 TCB,TCUNSUSP check to see if time to unsuspend the user 04A0E FE064A18 336 JGE NOUNSUSPG jump if user may stay suspended 04A0F 60C91F17 3 4 ZBM 337 LD R3 TCB,TCPCADRS get the address of the PCB 04A10 FAF04A18 3 338 JZA R3 NOUNSUSPG if no process associated, skip blowing up 04A11 6008D260 0 3 ZBM 339 LD R0 R3,PCQUEUE get the queue that we are in 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 993 (CIAOUTUTIL) F 49 Output utility routines for the CIA 04A12 6404000D 0 IMM 340 CPR R0 NQTRMOWAIT verify that it's terminal wait 04A13 FE0C4A18 341 JNE NOUNSUSPG jump if stopped for some other reason 04A14 E4978801 2 6 BASE 342 ST R2 SP,TEMP save this register (character) 04A15 DC003573 343 CALL DQUETHIS call to release this process to run 04A16 40001DB6 344 PARL SQTRMOWAIT indicate which queue 04A17 60978801 2 6 BASE 345 LD R2 SP,TEMP restore R2 00004A18 346 NOUNSUSPG LABEL 04A18 19C40001 7 IMM 347 ADD R7 1 advance to the skip return 00004A19 348 NOCHARS LABEL 349 PUNLOCK TCB,TCLOCK release the list 04A19 EC170818 4 BASE 349 STZ TCB,TCLOCK 04A1A 0C800000 349 ION 04A1B 5D1F8002 6 STAK 350 LEAVE POP return 351 * --- 352 353 END GETOUTCHAR subroutine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 994 (CIAOUTUTIL) F 49 Output utility routines for the CIA 355 356 ********************************************************************************** 357 * * 358 * MAKECEL. Routine that makes a comm command element. * 359 * Call: * 360 * CALL MAKECEL * 361 * PARV * 362 * PARVL * 363 * ST R2 * 364 * Forward link in new element is clear * 365 * * 366 * Eats R0:R1, sets R2. * 367 * Zaps R0,R1 before passing parameters. * 368 * Stack required = 1 * 369 * * 370 ********************************************************************************** 371 372 BLOCK MAKECEL subroutine 373 ENTRY MAKECEL 374 375 BEGFRAME 376 ENDFRAME 377 04A1C DD9F8001 6 STAK 378 MAKECEL ENTRS PUSH 04A1D DC002ED0 379 CALL SGETMEM get block of memory 04A1E 40440001 IMM 380 PARVL 1 indicate 2 words long 04A1F EE160800 0 BASE 381 STZ2 R0,0 clear the block 04A20 EDC81060 0 ZBM 382 STW R0,TCQLOG indicate length of block 04A21 EDC81C10 0 ZBM 383 STW R0,TCQCOMND mark as command 04A22 60520000 1 0 REG 384 LD R1 R0 copy the pointer 04A23 DCD3C000 7 REG 385 EXPCS R7 go back for the parameters 04A24 C1484081 1 ZBM 386 STPV R1,TCQCCODE command code 04A25 C0520000 0 REG 387 STPVL R0 and the parameter value 04A26 60924000 2 1 REG 388 LD R2 R1 return pointer in R2 04A27 60488081 1 2 ZBM 389 LD R1 R2,TCQCCODE get the command code 04A28 60721F12 1 1 @ 390 LD R1 @TCQCLEN(R1) get length of command 04A29 E4568000 1 2 CACH 391 ST R1 R2,TCQCLNTH set length of command 04A2A 5D624A2D 1 392 XCT CMNDAJST(R1) justify the command value 04A2B E4089181 0 2 ZBM 393 ST R0 R2,TCQCPARMS leaves WORDB/CH0 = command code and 394 * value left justified in CH1:CH3 04A2C 5D1F8001 6 STAK 395 LEAVE POP return 396 * --- 397 398 * Table to left justify the value for the command 04A2D 00130213 399 CMNDAJST HALT HALTS0213 bad command code passed 04A2E FEC00000 400 NOP 0 length=1, no value 04A2F 600A3180 0 0 CBM 401 LD R0 R0/(CH3+CH0+CH1) len=2, value to first of 3 04A30 600A2180 0 0 CBM 402 LD R0 R0/(CH2+CH3+CH0) len=3, move up 1 char 04A31 FEC00000 403 NOP 0 len=4, no shifting needed 404 405 END MAKECEL subroutine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 995 (CIAOUTUTIL) F 49 Output utility routines for the CIA 407 408 ********************************************************************************** 409 * * 410 * LINKTCQLST. * 411 * Link a list of TCQ elements onto the end of the output * 412 * queue for the specified port. We expect to get the TCB * 413 * pointer, pointers to the first and last TCQ element that we * 414 * will link in, and the count of characters. This routine will * 415 * clean up the forward link in the last element and will not * 416 * blow its mind if passed an empty list. * 417 * Call: * 418 * * 419 * LD TCB => terminal control block * 420 * * 421 * CALL LINKTCQLST * 422 * PARV number of characters going into list * 423 * PAR => first element of list * 424 * PARL => last element in list * 425 * * 426 * Gets R0 thru R3. * 427 * Stack required = 3 * 428 * 3 + max ( LOCKWAIT (0) ) * 429 * * 430 ********************************************************************************** 431 432 ********************************************************************************** 433 * * 434 * LINKINTLST. Link in a list of TCQs. This routine is * 435 * identical to LINKTCQLST except that TCLOCK is locked before * 436 * the items are inserted. Remember that the list is left * 437 * locked on return. * 438 * * 439 ********************************************************************************** 440 441 BLOCK LINKTCQLST, LINKINTLST 442 ENTRY LINKINTLST 443 ENTRY LINKTCQLST 444 445 BEGFRAME 00178801 6 BASE 446 LINKINCNT BSS 1 number of characters being inserted 00178802 6 BASE 447 FIRSTLINK BSS 1 pointer to the first element 448 ENDFRAME 449 04A32 DD1F8003 6 STAK 450 LINKINTLST ENTR PUSH 04A33 C1578801 6 BASE 451 STPV SP,LINKINCNT count of characters inserting 04A34 C1178802 6 BASE 452 STP SP,FIRSTLINK pointer to the first TCQ of new list 04A35 C012C000 3 REG 453 STPL TCQ pointer to the end 454 PLOCK TCB,TCLOCK lock the lists 04A36 0CC00000 454 IOFF 04A37 D1D70818 4 BASE 454 SETT TCB,TCLOCK 04A38 FE0C4A3A 454 JNE MA(2+DISPW MA 0) 04A39 DC40308B 454 CALLNP LOCKWAIT 04A3A FE0E4A3F 455 JMP LINKINSHR share most of the code 456 * --- 457 04A3B DD1F8003 6 STAK 458 LINKTCQLST ENTR PUSH 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 996 (CIAOUTUTIL) F 49 Output utility routines for the CIA 04A3C C1578801 6 BASE 459 STPV SP,LINKINCNT count of characters inserting 04A3D C1178802 6 BASE 460 STP SP,FIRSTLINK pointer to the first 04A3E C012C000 3 REG 461 STPL TCQ pointer to the end 00004A3F 462 LINKINSHR LABEL 04A3F 60978802 2 6 BASE 463 LD R2 SP,FIRSTLINK R2 => first in the list 04A40 FAB04A49 2 464 JZA R2 NOLINKIN jump if nothing to link in 04A41 EC08DF10 3 ZBM 465 STZ TCQ,TCQLINK zap the forward link in the new list 04A42 6009011B 0 4 ZBM 466 LD R0 TCB,TCTTOEP get the end of existing list 04A43 FA324A47 0 467 JNZA R0 LINKINY jump if list present 04A44 E4891F1A 2 4 ZBM 468 ST R2 TCB,TCTTOBP this is the whole list 04A45 D0001F05 469 INC TERMWBUSY another busy terminal 04A46 FE0E4A48 470 JMP LINKINX 471 * --- 472 00004A47 473 LINKINY LABEL 04A47 E4881F10 2 0 ZBM 474 ST R2 R0,TCQLINK link our list onto end of existing 00004A48 475 LINKINX LABEL 04A48 E4C9011B 3 4 ZBM 476 ST TCQ TCB,TCTTOEP ours is the new end of the list 00004A49 477 NOLINKIN LABEL 04A49 60178801 0 6 BASE 478 LD R0 SP,LINKINCNT get the characters being put in 04A4A 980900FA 0 4 ZBM 479 ADDM R0 TCB,TCTTOCNT put the count in the list 480 * leave the list locked 04A4B 5D1F8003 6 STAK 481 LEAVE POP 482 * --- 483 484 END LINKTCQLST, LINKINTLST 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 997 (CIAOUTUTIL) F 49 Output utility routines for the CIA 486 487 ********************************************************************************** 488 * * 489 * LINKBEGLST. * 490 * Link a list of TCQ elements into the start of the output * 491 * queue of the specified port. This routine expects the TCB * 492 * pointer, pointers to the first and last TCQ elements to be * 493 * linked in, and the count of characters. This routine is used * 494 * for sending high priority commands to the comm. It will not * 495 * blow it's mind if passed an empty list. TCLOCK is locked * 496 * before the items are inserted. Remember that the list is * 497 * left locked on return. * 498 * Call: * 499 * LD TCB => terminal control block * 500 * CALL LINKBEGLST * 501 * PARV number of characters going into list * 502 * PAR => first element of list * 503 * PARL => last element in list * 504 * * 505 * * 506 * Gets R0 thru R3. * 507 * Stack required = 3 * 508 * 3 + max ( LOCKLIST (0) ) * 509 * * 510 ********************************************************************************** 511 512 BLOCK LINKBEGLST 513 ENTRY LINKBEGLST 514 515 BEGFRAME 00178801 6 BASE 516 LINKINCNT BSS 1 number of characters being inserted 00178802 6 BASE 517 FIRSTLINK BSS 1 pointer to the first element 518 ENDFRAME 519 04A4C DD1F8003 6 STAK 520 LINKBEGLST ENTR PUSH 04A4D C1578801 6 BASE 521 STPV SP,LINKINCNT count of characters inserting 04A4E C1178802 6 BASE 522 STP SP,FIRSTLINK pointer to the first 04A4F C012C000 3 REG 523 STPL TCQ pointer to the end 524 PLOCK TCB,TCLOCK lock the lists 04A50 0CC00000 524 IOFF 04A51 D1D70818 4 BASE 524 SETT TCB,TCLOCK 04A52 FE0C4A54 524 JNE MA(2+DISPW MA 0) 04A53 DC40308B 524 CALLNP LOCKWAIT 04A54 60978802 2 6 BASE 525 LD R2 SP,FIRSTLINK R2 => first new TCQ 04A55 FAB04A5C 2 526 JZA R2 NOLINKIN jump if nothing to link in 04A56 60091F1A 0 4 ZBM 527 LD R0 TCB,TCTTOBP get the beginning of existing list 04A57 E408DF10 0 3 ZBM 528 ST R0 TCQ,TCQLINK link old list onto end of ours 04A58 FA324A5B 0 529 JNZA R0 LINKINY jump if prior list present 04A59 E4C9011B 3 4 ZBM 530 ST TCQ TCB,TCTTOEP this is the whole list 04A5A D0001F05 531 INC TERMWBUSY another busy terminal 532 * \ / 00004A5B 533 LINKINY LABEL 04A5B E4891F1A 2 4 ZBM 534 ST R2 TCB,TCTTOBP ours is the new output list beginning 00004A5C 535 NOLINKIN LABEL 04A5C 60178801 0 6 BASE 536 LD R0 SP,LINKINCNT get the characters being put in 04A5D 980900FA 0 4 ZBM 537 ADDM R0 TCB,TCTTOCNT put the count in the list 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 998 (CIAOUTUTIL) F 49 Output utility routines for the CIA 538 * leave the list locked 04A5E 5D1F8003 6 STAK 539 LEAVE POP 540 * --- 541 542 END LINKBEGLST 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE 999 (CIAOUTUTIL) F 49 Output utility routines for the CIA 544 545 ********************************************************************************** 546 * * 547 * LINK1CMND. Routine that builds and links one command into * 548 * the end of the terminal's output queue. * 549 * Call: * 550 * * 551 * LD R4 => terminal control block * 552 * CALL LINK1CMND * 553 * PARV command * 554 * PARVL parameter for the command * 555 * * 556 * Eats R0:R3 Eats R2 before taking last PARM * 557 * Stack required = 4 * 558 * 1 + max ( LINKINTLST (3), MAKECEL (1) ) * 559 * * 560 ********************************************************************************** 561 562 BLOCK make and link single command element 563 ENTRY LINK1CMND 564 565 BEGFRAME 566 ENDFRAME 567 04A5F DD1F8001 6 STAK 568 LINK1CMND ENTR PUSH 04A60 C1528000 2 REG 569 STPV R2 the command to link in 04A61 C052C000 3 REG 570 STPVL R3 and its parameter 04A62 DC004A1C 571 CALL MAKECEL make the command element 04A63 41528000 2 REG 572 PARV R2 pass command 04A64 4052C000 3 REG 573 PARVL R3 and parameter 04A65 DC004A32 574 CALL LINKINTLST link it into the list 04A66 41440004 IMM 575 PARV TCCMNDBURD the "size" of the command 04A67 41168400 2 @R 576 PAR @R2 the element 04A68 40168400 2 @R 577 PARL @R2 578 PUNLOCK TCB,TCLOCK unlock the list 04A69 EC170818 4 BASE 578 STZ TCB,TCLOCK 04A6A 0C800000 578 ION 04A6B 5D1F8001 6 STAK 579 LEAVE POP 580 * --- 581 582 END LINK1CMND 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1000 (CIAOUTUTIL) F 49 Output utility routines for the CIA 584 585 ********************************************************************************** 586 * * 587 * LNKCMNDBEG. Routine that builds and links one command * 588 * onto the beginning of the terminal's output queue. This is * 589 * used for sending high priority commands to the comm. * 590 * Call: * 591 * * 592 * LD R4 => terminal control block * 593 * CALL LNKCMNDBEG * 594 * PARV command * 595 * PARVL parameter for the command * 596 * * 597 * Eats R0:R3 Eats R2 before taking last PARM * 598 * Stack required = 4 * 599 * 1 + max ( LINKBEGLST (3), MAKECEL (1) ) * 600 * * 601 ********************************************************************************** 602 603 BLOCK make and link command element on list begin 604 ENTRY LNKCMNDBEG 605 606 BEGFRAME 607 ENDFRAME 608 04A6C DD1F8001 6 STAK 609 LNKCMNDBEG ENTR PUSH 04A6D C1528000 2 REG 610 STPV R2 pick up the command 04A6E C052C000 3 REG 611 STPVL R3 and its parameter 04A6F DC004A1C 612 CALL MAKECEL make the command element 04A70 41528000 2 REG 613 PARV R2 pass the command 04A71 4052C000 3 REG 614 PARVL R3 and its parameter 04A72 DC004A4C 615 CALL LINKBEGLST link it into the beginning of the list 04A73 41440004 IMM 616 PARV TCCMNDBURD the "size" of the command 04A74 41168400 2 @R 617 PAR @R2 the element 04A75 40168400 2 @R 618 PARL @R2 619 PUNLOCK TCB,TCLOCK unlock the list 04A76 EC170818 4 BASE 619 STZ TCB,TCLOCK 04A77 0C800000 619 ION 04A78 5D1F8001 6 STAK 620 LEAVE POP 621 * --- 622 623 END LNKCMNDBEG 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1001 (CIAOUTUTIL) F 49 Output utility routines for the CIA 625 626 ********************************************************************************** 627 * * 628 * SETTRSMTR. Routine that will build and link onto the * 629 * end of the specified output queue a port command to set * 630 * the transmitters as indicated. * 631 * Call: * 632 * LD R4 => terminal control block * 633 * CALL SETTRSMTR * 634 * PARVL transmitters to set * 635 * Eats R0:R3 * 636 * Stack required = 5 * 637 * 1 + LINK1CMND(4) * 638 * * 639 ********************************************************************************** 640 641 BLOCK SETTRSMTR and SETACCOPTS subroutines 642 ENTRY SETTRSMTR 643 644 BEGFRAME 645 ENDFRAME 646 04A79 DD1F8001 6 STAK 647 SETTRSMTR ENTR PUSH 04A7A C052C000 3 REG 648 STPVL R3 the transmitters to set 04A7B DC004A5F 649 CALL LINK1CMND place at end of output queue 04A7C 41440083 IMM 650 PARV PORTCSTAT 04A7D 4052C000 3 REG 651 PARVL R3 04A7E 5D1F8001 6 STAK 652 LEAVE POP return to caller 653 * --- 654 655 END SETTRSMTR 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1002 (CIAOUTUTIL) F 49 Output utility routines for the CIA 657 658 ********************************************************************************** 659 * * 660 * SETACCOPTS. Routine that will build and link onto the * 661 * end of the specified output queue a port command to set * 662 * the options as indicated. * 663 * Call: * 664 * LD R4 => terminal control block * 665 * CALL SETACCOPTS * 666 * PARVL options to set * 667 * * 668 * Eats R0:R3 * 669 * Stack required = 5 * 670 * 1 + LINK1CMND(4) * 671 * * 672 ********************************************************************************** 673 674 BLOCK make command to select port options 675 ENTRY SETACCOPTS 676 677 BEGFRAME 678 ENDFRAME 679 04A7F DD1F8001 6 STAK 680 SETACCOPTS ENTR PUSH 04A80 C052C000 3 REG 681 STPVL R3 get the options to set 04A81 DC004A5F 682 CALL LINK1CMND place command at end of output queue 04A82 4144008D IMM 683 PARV PORTCSTAT2 04A83 4052C000 3 REG 684 PARVL R3 04A84 5D1F8001 6 STAK 685 LEAVE POP 686 * --- 687 688 END SETACCOPTS 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1003 (CIAOUTUTIL) F 49 Output utility routines for the CIA 690 691 ********************************************************************************** 692 * * 693 * OUTTSET. Output terminal setting. Given a pointer to * 694 * a TCB (unlocked), this routine will output an initializing * 695 * command followed by commands to set input and output baud * 696 * rates, the echo setting, and then the control setting * 697 * command. These commands are put at the end of the output * 698 * queue so they will not interfere with output in progress. * 699 * We also recalculate TCBAUDROOM (in case the baud rate is * 700 * changing), and send out a pseudo-command to reset the * 701 * port's interface state. * 702 * This command shares code with the OUTTSETX routine. * 703 * The primary difference is in the command used and whether * 704 * these commands go at the head of the queue (used for CIA * 705 * resets) or at the end of the queue (after current outputs, * 706 * used for logoff, etc). We also check to see if we have * 707 * XOFFed the port and if so send an XON to it. * 708 * Call: * 709 * LD TCB => a terminal control block * 710 * CALLNP OUTTSET initializes that port * 711 * Eats R0:R3 * 712 * Stack required = 8 * 713 * 3 + max ( LINKBEGLST (3), LINKINTLST (3), LOCKWAIT (0), * 714 * MAKECEL (1), OUTTERMCH (5) ) * 715 * * 716 ********************************************************************************** 717 718 BLOCK OUTTSET and OUTTSETX subroutines 719 ENTRY OUTTSET 720 ENTRY OUTTSETX 721 00000010 BYTE 722 OUTTSETP EQU BIT 0 bit in R7, 0 sez link on end, 1 sez beginning 723 BEGFRAME 00178801 6 BASE 724 OUTTSETF BSS 1 first element created 00178802 6 BASE 725 OUTSETXON BSS 1 1 sez we sent the XON character 726 ENDFRAME 727 04A85 DD5F8003 6 STAK 728 OUTTSET ENTRNP PUSH 04A86 EC0BC010 7 CBM 729 STZ R7/OUTTSETP flag to say to link on end 00004A87 730 OUTTSHARE LABEL 04A87 5C091A10 4 ZBM 731 CMZ TCB,TCRFP check for RFP terminal 04A88 FE0C4ADA 732 JNE OUTSETXIT jump out if so 733 * \ / 734 04A89 EC178802 6 BASE 735 STZ SP,OUTSETXON say we have not sent the XON 04A8A DC004A1C 736 CALL MAKECEL make the init port state command 04A8B 41440090 IMM 737 PARV PORTPCINIT an init pseudo-command 04A8C 40440000 IMM 738 PARVL 0 no additional parameters 739 * Note that this command element takes no space in the CIA buffer. 04A8D E4978801 2 6 BASE 740 ST R2 SP,OUTTSETF save pointer to first element 04A8E 60D28000 3 2 REG 741 LD TCQ R2 TCQ -> first command element 742 * (now one element) 04A8F F3C04AA6 7 743 JBF R7/OUTTSETP INQUERESET jump to link onto end 744 * \ / 745 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1004 (CIAOUTUTIL) F 49 Output utility routines for the CIA 04A90 60091F16 0 4 ZBM 746 LD R0 TCB,TCCIABLOCK R0 -> CIA control block 04A91 DC004A1C 747 CALL MAKECEL make a reset now command 04A92 4144008F IMM 748 PARV PORTCZAP a reset that happens when received 04A93 4044001F IMM 749 PARVL PORTCRALL reset all the attributes 04A94 5C09101D 4 ZBM 750 CMZ TCB,TCIQXOFFED have we XOFFed this port? 04A95 FE024AA9 751 JEQ RESETNOW if not then don't XON it 752 * \ / 753 04A96 E488DF10 2 3 ZBM 754 ST R2 TCQ,TCQLINK link created element onto chain 04A97 60D28000 3 2 REG 755 LD TCQ R2 and point to the end of the chain 756 PLOCK TCB,TCLOCK 04A98 0CC00000 756 IOFF 04A99 D1D70818 4 BASE 756 SETT TCB,TCLOCK 04A9A FE0C4A9C 756 JNE MA(2+DISPW MA 0) 04A9B DC40308B 756 CALLNP LOCKWAIT 04A9C D189101D 4 ZBM 757 CLRT TCB,TCIQXOFFED clear the bit 758 PUNLOCK TCB,TCLOCK 04A9D EC170818 4 BASE 758 STZ TCB,TCLOCK 04A9E 0C800000 758 ION 04A9F FE024AA9 759 JEQ RESETNOW in case some one else cleared it 04AA0 60840011 2 IMM 760 LD R2 XON 04AA1 DC404994 761 CALLNP OUTTERMCH put the XON in an output element 04AA2 D0401F05 762 DEC TERMWBUSY decrement for the removed XOFF 04AA3 60040004 0 IMM 763 LD R0 TCCMNDBURD command burden 04AA4 E4178802 0 6 BASE 764 ST R0 SP,OUTSETXON how much extra we put in 04AA5 FE0E4AAB 765 JMP RESETNOWX 766 * --- 767 00004AA6 768 INQUERESET LABEL 04AA6 DC004A1C 769 CALL MAKECEL make a command for reset 04AA7 4144008E IMM 770 PARV PORTCRESET indicate command 04AA8 40440018 IMM 771 PARVL PORTCRINIT we are re-initializing the port 772 * \ / 773 00004AA9 774 RESETNOW LABEL 04AA9 E488DF10 2 3 ZBM 775 ST R2 TCQ,TCQLINK remember first element created 04AAA 60D28000 3 2 REG 776 LD TCQ R2 TCQ => last element created 777 * (now two elements) 778 00004AAB 779 RESETNOWX LABEL 04AAB 608900F1 2 4 ZBM 780 LD R2 TCB,TCIRATE get the current rate 04AAC 34871F00 2 IMM 781 RDV R2 -19200*3 convert to baud rate constant 04AAD DC004A1C 782 CALL MAKECEL make command to set input rate 04AAE 41440081 IMM 783 PARV PORTCIRATE command 04AAF 40528000 2 REG 784 PARVL R2 pass the rate to set 04AB0 E488DF10 2 3 ZBM 785 ST R2 TCQ,TCQLINK link new on the end 04AB1 60D28000 3 2 REG 786 LD TCQ R2 R3 => last element created 787 * (now three elements) 788 789 * We calculate TCBAUDROOM every time that the output baud rate is set. 790 * This assures the value is current and saves the driver from computing it. 04AB2 60091EF1 0 4 ZBM 791 LD R0 TCB,TCORATE get the current rate 04AB3 14040019 0 IMM 792 DIV R0 (CIATPS*10)/4 determine how much we will allow in 793 * the output buffer at any given time 04AB4 30040100 0 IMM 794 RSB R0 CIATRMBUFL invert it 04AB5 54040000 0 IMM 795 MAX R0 0 make sure it is not negative 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1005 (CIAOUTUTIL) F 49 Output utility routines for the CIA 04AB6 E4170014 0 4 CACH 796 ST R0 TCB,TCBAUDROOM save for the driver 797 04AB7 60891EF1 2 4 ZBM 798 LD R2 TCB,TCORATE get the current rate 04AB8 34871F00 2 IMM 799 RDV R2 -19200*3 convert to baud rate constant 04AB9 DC004A1C 800 CALL MAKECEL make command for output rate 04ABA 41440082 IMM 801 PARV PORTCORATE command 04ABB 40528000 2 REG 802 PARVL R2 pass the rate to set 04ABC E488DF10 2 3 ZBM 803 ST R2 TCQ,TCQLINK link last to this one 04ABD 60D28000 3 2 REG 804 LD TCQ R2 R3 => last created element 805 * (now four elements) 806 04ABE DC004A1C 807 CALL MAKECEL make an element to set CIA options 04ABF 4144008D IMM 808 PARV PORTCSTAT2 set port options 04AC0 40570013 4 CACH 809 PARVL TCB,TCLASTCOM2 what to set them to 04AC1 E488DF10 2 3 ZBM 810 ST R2 TCQ,TCQLINK link last to this one 04AC2 60D28000 3 2 REG 811 LD TCQ R2 R3 => last element 812 * (now five elements) 813 04AC3 DC004A1C 814 CALL MAKECEL make an element to set CIA options 04AC4 41440083 IMM 815 PARV PORTCSTAT set port options 04AC5 40570012 4 CACH 816 PARVL TCB,TCLASTCOM what to set them to 04AC6 E488DF10 2 3 ZBM 817 ST R2 TCQ,TCQLINK link last to this one 04AC7 60D28000 3 2 REG 818 LD TCQ R2 R3 => last element 819 * (now six elements) 820 04AC8 60840088 2 IMM 821 LD R2 PORTECHOON get echo on command 04AC9 60093C21 0 4 ZBM 822 LD R0 TCB,TCECHO get the echo code 04ACA 64040001 0 IMM 823 CPR R0 ECHOMCIA is the CIA to do the echo? 04ACB FE024ACD 824 JEQ OUTTSETE jump if so 04ACC 60840089 2 IMM 825 LD R2 PORTECHOOF get echo off command then 00004ACD 826 OUTTSETE LABEL 04ACD DC004A1C 827 CALL MAKECEL make element for echo 04ACE 41528000 2 REG 828 PARV R2 pass command 04ACF 40440000 IMM 829 PARVL 0 no value associated 04AD0 E488DF10 2 3 ZBM 830 ST R2 TCQ,TCQLINK link it in 831 * (now seven elements) 832 04AD1 60578801 1 6 BASE 833 LD R1 SP,OUTTSETF pick up first element pointer 04AD2 F3C04ADB 7 834 JBF R7/OUTTSETP ONTOEND jump to link onto end 04AD3 60178802 0 6 BASE 835 LD R0 SP,OUTSETXON get count of extra chars being linked 04AD4 DC004A4C 836 CALL LINKBEGLST call to hook this list into TCQ 04AD5 41561018 0 REG 837 PARV R0+6*TCCMNDBURD assumed size for six commands 838 * pseudo-command has no size 04AD6 41164400 1 @R 839 PAR @R1 pointer to list beginning 04AD7 40168400 2 @R 840 PARL @R2 pointer to list end 00004AD8 841 UNDOLOCK LABEL 842 PUNLOCK TCB,TCLOCK release the locks 04AD8 EC170818 4 BASE 842 STZ TCB,TCLOCK 04AD9 0C800000 842 ION 00004ADA 843 OUTSETXIT LABEL 04ADA 5D1F8003 6 STAK 844 LEAVE POP return 845 * --- 846 847 * Link elements onto end of queue 00004ADB 848 ONTOEND LABEL 04ADB DC004A32 849 CALL LINKINTLST hook this list onto TCQ end 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1006 (CIAOUTUTIL) F 49 Output utility routines for the CIA 04ADC 41440018 IMM 850 PARV 6*TCCMNDBURD assumed size for six commands 851 * pseudo-command has no size 04ADD 41164400 1 @R 852 PAR @R1 pointer to list beginning 04ADE 40168400 2 @R 853 PARL @R2 pointer to list end 04ADF FE0E4AD8 854 JMP UNDOLOCK and go release the lock 855 * --- 856 857 ********************************************************************************** 858 * * 859 * OUTTSETX. Identical to OUTTSET (see above) except that * 860 * the generated command elements are linked onto the beginning * 861 * of the output stream and the reset command is the one that * 862 * happens when received rather then when it shuffles to the * 863 * buffer head. This will affect output in progress. * 864 * * 865 ********************************************************************************** 866 04AE0 DD5F8003 6 STAK 867 OUTTSETX ENTRNP PUSH 04AE1 EDCBC010 7 CBM 868 STW R7/OUTTSETP flag to say link on beginning 04AE2 FE0E4A87 869 JMP OUTTSHARE go share code 870 * --- 871 872 END OUTTSET and OUTTSETX subroutines 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1007 (CIAOUTUTIL) F 49 Output utility routines for the CIA 874 875 ********************************************************************************** 876 * * 877 * FLUSHOQ. Flush the output queue for the specified * 878 * terminal. This routine does not send a command to the * 879 * CIA to flush its buffer. * 880 * Call: * 881 * LD R4 => TCB * 882 * CALLNP FLUSHOQ * 883 * gets R0 thru R3 * 884 * Stack required = 1 * 885 * 1 + max ( LOCKWAIT (0), SFREEMEM (0) ) * 886 * * 887 ********************************************************************************** 888 889 BLOCK FLUSHOQ subroutine 890 ENTRY FLUSHOQ 891 892 BEGFRAME 893 ENDFRAME 894 04AE3 DD5F8001 6 STAK 895 FLUSHOQ ENTRNP PUSH 896 PLOCK TCB,TCLOCK call to lock the element 04AE4 0CC00000 896 IOFF 04AE5 D1D70818 4 BASE 896 SETT TCB,TCLOCK 04AE6 FE0C4AE8 896 JNE MA(2+DISPW MA 0) 04AE7 DC40308B 896 CALLNP LOCKWAIT 04AE8 60C91F1A 3 4 ZBM 897 LD TCQ TCB,TCTTOBP get the first of the list 04AE9 EC091F1A 4 ZBM 898 STZ TCB,TCTTOBP indicate no list any more 04AEA EC09011B 4 ZBM 899 STZ TCB,TCTTOEP kill end ptr too 04AEB EC0900FA 4 ZBM 900 STZ TCB,TCTTOCNT and count now zero, too 04AEC FAF04AEE 3 901 JZA TCQ FLUSHOQSHR jump if no list was here 04AED D0401F05 902 DEC TERMWBUSY if list, indicate one less outputter 00004AEE 903 FLUSHOQSHR LABEL 904 PUNLOCK TCB,TCLOCK call to release the element 04AEE EC170818 4 BASE 904 STZ TCB,TCLOCK 04AEF 0C800000 904 ION 04AF0 FAF04AF7 3 905 JZA TCQ FLUSHOQX jump iff no list at all 00004AF1 906 FLUSHOQL LABEL 04AF1 6088DF10 2 3 ZBM 907 LD R2 TCQ,TCQLINK save link to next block 04AF2 DC002F5D 908 CALL SFREEMEM free one block 04AF3 4148D060 3 ZBM 909 PARV TCQ,TCQLOG indicate its size 04AF4 4052C000 3 REG 910 PARVL TCQ and address 04AF5 60D28000 3 2 REG 911 LD TCQ R2 copy to next blocks address 04AF6 FAF24AF1 3 912 JNZA TCQ FLUSHOQL jump if another block 00004AF7 913 FLUSHOQX LABEL 04AF7 5D1F8001 6 STAK 914 LEAVE POP return to caller 915 * --- 916 917 END FLUSHOQ subroutine 918 919 920 END Comm Utility Routines 85 INPUT CIAINUTIL Input Utilities for Comm 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1008 (CIAINUTIL) F 50 Input utility routines for the CIA 3 4 CIAINUTIL BLOCK Comm Utility Routines 5 6 ENTRY CALCTERMC calculate terminating character count 7 ENTRY CHECKLOGD check port for logged on 8 ENTRY ECHOALL cause all input characters to echo 9 ENTRY ECHOLINE echo the first input line 10 ENTRY FILLTCQ fill TCQ with characters 11 ENTRY FLUSHIQ flush terminal input queue 12 ENTRY GETTERMPTR make pointer to TCA in use 13 ENTRY MAKTRMSTAT make status word for .TERM 14 ENTRY MOVECHARIN to move in a character string 15 ENTRY PUTINCHAR put one char in input list 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1009 (CIAINUTIL) F 50 Input utility routines for the CIA 17 18 ********************************************************************************** 19 * * 20 * FLUSHIQ. Routine to flush the input queue of the * 21 * specified terminal. This routine does not send a command * 22 * to the CIA to flush its buffer. The only special processing * 23 * is done when the "read in progress" flag is on. In this * 24 * case, we cannot flush the first record, so we search for * 25 * the first terminator and free after it. * 26 * Call: * 27 * LD R4 => TCB * 28 * CALLNP FLUSHIQ * 29 * Gets R0 thru R3 * 30 * Stack required = 2. * 31 * 2 + max ( LOCKWAIT (0), SFREEMEM (0) ) * 32 * * 33 ********************************************************************************** 34 35 BLOCK FLUSHIQ subroutine 36 ENTRY FLUSHIQ 37 38 BEGFRAME 00178801 6 BASE 39 SUMC BSS 1 total keepable 40 ENDFRAME 41 04AF8 DD5F8002 6 STAK 42 FLUSHIQ ENTRNP PUSH 43 PLOCK TCB,TCLOCK lock the access list 04AF9 0CC00000 43 IOFF 04AFA D1D70818 4 BASE 43 SETT TCB,TCLOCK 04AFB FE0C4AFD 43 JNE MA(2+DISPW MA 0) 04AFC DC40308B 43 CALLNP LOCKWAIT 04AFD 60C9231C 3 4 ZBM 44 LD TCQ TCB,TCTTIBP get beginning pointer 04AFE 5C09041D 4 ZBM 45 CMZ TCB,TCREADIP is there a read in progress? 04AFF FE0C4B05 46 JNE FLSHIQRIP if so, leave first record 04B00 EC09231C 4 ZBM 47 STZ TCB,TCTTIBP indicate list no longer here 04B01 EC09011C 4 ZBM 48 STZ TCB,TCTTIEP clear the end pointer too 04B02 EC0922FB 4 ZBM 49 STZ TCB,TCTTICNT clear the count of characters 04B03 EC17080E 4 BASE 50 STZ TCB,TCTERMLOC and the terminator location 04B04 FE0E4B17 51 JMP FLUSHIQSHR so share code 52 * --- 53 54 * Read in progress, find the first terminator 55 00004B05 56 FLSHIQRIP LABEL 04B05 60040000 0 IMM 57 LD R0 0 initialize count of characters 00004B06 58 FLSHCNTL LABEL 04B06 64C91F1E 3 4 ZBM 59 CPR TCQ TCB,TCTERMTCQ does this TCQ hold the first terminator? 04B07 FE024B0C 60 JEQ FLSHTRMS if so jump to release the remainder 04B08 1816C004 0 3 CACH 61 ADD R0 TCQ,TCQLAST get end index 04B09 1016C000 0 3 CACH 62 SUB R0 TCQ,TCQFIRST add the number of characters herein to R0 04B0A FAF64B06 3 63 LJNA TCQ FLSHCNTL move to next block 04B0B 00130210 64 HALT HALTS0210 no such TCQ in queue 65 * --- 66 00004B0C 67 FLSHTRMS LABEL 04B0C E4178801 0 6 BASE 68 ST R0 SP,SUMC save number keepable 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1010 (CIAINUTIL) F 50 Input utility routines for the CIA 04B0D 604900FE 1 4 ZBM 69 LD R1 TCB,TCTERMCHLC get index for terminator 04B0E 18440001 1 IMM 70 ADD R1 1 advance so as to keep terminator 04B0F E456C004 1 3 CACH 71 ST R1 TCQ,TCQLAST make end pointer point at first terminator 04B10 1056C000 1 3 CACH 72 SUB R1 TCQ,TCQFIRST make count of characters in this TCQ 04B11 18578801 1 6 BASE 73 ADD R1 SP,SUMC produce number of 'keepers' 04B12 E44922FB 1 4 ZBM 74 ST R1 TCB,TCTTICNT save in TCB 04B13 6048DF10 1 3 ZBM 75 LD R1 TCQ,TCQLINK get link to remainder of list 04B14 EC08DF10 3 ZBM 76 STZ TCQ,TCQLINK no blocks after this 04B15 E4C9011C 3 4 ZBM 77 ST TCQ TCB,TCTTIEP new list end 04B16 60D24000 3 1 REG 78 LD TCQ R1 copy ptr to list remainder 79 * \ / 00004B17 80 FLUSHIQSHR LABEL 81 PUNLOCK TCB,TCLOCK call to release the element 04B17 EC170818 4 BASE 81 STZ TCB,TCLOCK 04B18 0C800000 81 ION 04B19 FAF04B20 3 82 JZA TCQ FLUSHIQX jump iff no list at all 00004B1A 83 FLUSHIQL LABEL 04B1A 6088DF10 2 3 ZBM 84 LD R2 TCQ,TCQLINK save link to next block 04B1B DC002F5D 85 CALL SFREEMEM free one block 04B1C 4148D060 3 ZBM 86 PARV TCQ,TCQLOG indicate its size 04B1D 4052C000 3 REG 87 PARVL TCQ and address 04B1E 60D28000 3 2 REG 88 LD TCQ R2 copy to next blocks address 04B1F FAF24B1A 3 89 JNZA TCQ FLUSHIQL jump if another block 00004B20 90 FLUSHIQX LABEL 04B20 5D1F8002 6 STAK 91 LEAVE POP return to caller 92 * --- 93 94 END FLUSHIQ subroutine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1011 (CIAINUTIL) F 50 Input utility routines for the CIA 96 97 ********************************************************************************** 98 * * 99 * PUTINCHAR. Routine to place a character into the * 100 * input queue. It handles break, backspace, line kill, * 101 * as well as doing echo if specified. The input queue * 102 * must not be locked. * 103 * Call: * 104 * LD R2 char (BREAKMARK if break) * 105 * LD R4 => TCB * 106 * CALLNP PUTINCHAR * 107 * * 108 * Gets R0 thru R3 * 109 * Stack required = 10 * 110 * 2 + max (FLUSHIQ (2), GETTERMPTR (1), GIVEUINT (8), * 111 * INPUTERR (3), LINKBEGLST (3), LOCKWAIT (0), * 112 * OUTTERMCH (5), PLACEOUTCH (6), ROUST (4), * 113 * SETACCOPTS (5), SGETMEM (0) ) * 114 * * 115 ********************************************************************************** 116 117 BLOCK PUTINCHAR subroutine 118 ENTRY PUTINCHAR 119 120 BEGFRAME 00178801 6 BASE 121 PUTINCHART BSS 1 character temp 122 ENDFRAME 123 00000002 ABS 124 INTRMDSIZ EQU 4 LOG 2 default size for input queue elements 125 04B21 DD5F8002 6 STAK 126 PUTINCHAR ENTRNP PUSH 04B22 64840100 2 IMM 127 CPR R2 BREAKMARK is this a break? 04B23 FE024B88 128 JEQ PUTINBREAK jump if so, give to user 04B24 600AB270 0 2 CBM 129 LD R0 R2/BITS 25:31 get the right 7 bits 04B25 64170018 0 4 CACH 130 CPR R0 TCB,TCBRCH check for a 'break' character 04B26 FE024B87 131 JEQ PRCBRKCH jump to check for a valid one 132 * \ / 133 00004B27 134 NULLCHAR LABEL 04B27 604922FB 1 4 ZBM 135 LD R1 TCB,TCTTICNT get the input buffer current size 04B28 644403DD 1 IMM 136 CPR R1 MAXIXOFF have we reached the XOFF point? 04B29 FE0A4B2E 137 JLE NOTOFLOW if not then no problem 04B2A 5C091015 4 ZBM 138 CMZ TCB,TCXOFFIQ should we XOFF when input queue is full? 04B2B FE0C4BAC 139 JNE XOFFINQUE if so go do it 00004B2C 140 CHECKOFLOW LABEL 04B2C 644407BA 1 IMM 141 CPR R1 MAXINQUE check against the input buffer size limit 04B2D FE044BC2 142 JGT OVERFLOW jump if so 143 * \ / 144 00004B2E 145 NOTOFLOW LABEL 146 PLOCK TCB,TCLOCK get exclusive access to list 04B2E 0CC00000 146 IOFF 04B2F D1D70818 4 BASE 146 SETT TCB,TCLOCK 04B30 FE0C4B32 146 JNE MA(2+DISPW MA 0) 04B31 DC40308B 146 CALLNP LOCKWAIT 04B32 5C090E1D 4 ZBM 147 CMZ TCB,TCINECHO check kind of echo 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1012 (CIAINUTIL) F 50 Input utility routines for the CIA 04B33 ED8BC010 7 CBM 148 STLNE R7/BIT 0 remember delayed echo mode 04B34 60C9011C 3 4 ZBM 149 LD TCQ TCB,TCTTIEP load the current input buffer block pointer 04B35 FAF04B38 3 150 JZA TCQ OCADDNEW start a new TCQ if none exist 04B36 5C08DC10 3 ZBM 151 CMZ TCQ,TCQCOMND is this an error element 04B37 FE024B45 152 JEQ PLCCHAR if not then use this TCQ 153 * \ / 154 00004B38 155 OCADDNEW LABEL 04B38 DC002ED0 156 CALL SGETMEM four word block holds 10 characters 04B39 40440002 IMM 157 PARVL INTRMDSIZ 04B3A EE160800 0 BASE 158 STZ2 R0,0 initialize the control information 04B3B 60440002 1 IMM 159 LD R1 INTRMDSIZ log block size = 2 04B3C E4481060 1 0 ZBM 160 ST R1 R0,TCQLOG save block size 04B3D 6044000A 1 IMM 161 LD R1 ((2 POWER INTRMDSIZ)*CPW)-TCQUSED load the available size 04B3E E4560005 1 0 CACH 162 ST R1 R0,TCQSIZE and save in block 04B3F FAF04B41 3 163 JZA TCQ NOEXISTLST jump if no existing list 04B40 E408DF10 0 3 ZBM 164 ST R0 TCQ,TCQLINK link on this block 00004B41 165 NOEXISTLST LABEL 04B41 E409011C 0 4 ZBM 166 ST R0 TCB,TCTTIEP set new end pointer 04B42 FAF24B44 3 167 JNZA TCQ NOTNEWLIST jump if list already had blocks in it 04B43 E409231C 0 4 ZBM 168 ST R0 TCB,TCTTIBP otherwise, this block is new list head 00004B44 169 NOTNEWLIST LABEL 04B44 60D20000 3 0 REG 170 LD TCQ R0 copy current block pointer 171 * \ / 00004B45 172 PLCCHAR LABEL 04B45 BC56C004 1 3 CACH 173 INCL R1 TCQ,TCQLAST update and load the CPP 04B46 6456C005 1 3 CACH 174 CPR R1 TCQ,TCQSIZE is this block full? 04B47 FE0A4B4A 175 JLE OCSTOREIN jump if not, store away current char 04B48 D056C004 3 CACH 176 DEC TCQ,TCQLAST this block full, restore the counter 04B49 FE0E4B38 177 JMP OCADDNEW make a new block 178 * --- 179 180 ********************************************************************************** 181 * * 182 * We have found or generated a TCQ element that has * 183 * room for the single character that we have. Place the * 184 * character into the TCQ and check for it being a * 185 * terminator. * 186 * * 187 ********************************************************************************** 188 00004B4A 189 OCSTOREIN LABEL 04B4A E49AC805 2 31 CACH 190 ST R2 TCQ,TCQCHARS(R1) place character in 04B4B D00922FB 4 ZBM 191 INC TCB,TCTTICNT count number of characters in 04B4C E4978801 2 6 BASE 192 ST R2 SP,PUTINCHART save the received character 04B4D 5C17080E 4 BASE 193 CMZ TCB,TCTERMLOC do we already have a terminator? 04B4E FE0C4B63 194 JNE NOUNSUSP jump if so, one's enough 04B4F DC404C8B 195 CALLNP GETTERMPTR R1 => term array 04B50 5C1A5400 12 @R 196 CMZ @R1(R2) is this a terminator? 04B51 FE024B63 197 JEQ NOUNSUSP jump if not a terminator 04B52 E4C91F1E 3 4 ZBM 198 ST TCQ TCB,TCTERMTCQ save pointer to TCQ holding terminator 04B53 6056C004 1 3 CACH 199 LD R1 TCQ,TCQLAST get index to this character 04B54 10440001 1 IMM 200 SUB R1 1 back up to character just placed 04B55 E44900FE 1 4 ZBM 201 ST R1 TCB,TCTERMCHLC and save terminator index 04B56 EC090E1D 4 ZBM 202 STZ TCB,TCINECHO indicate no more echo of line 04B57 DC003457 203 CALL GIVEUINT give interrupt to trapper 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1013 (CIAINUTIL) F 50 Input utility routines for the CIA 04B58 41491F17 4 ZBM 204 PARV TCB,TCPCADRS PCB of our user 04B59 41530000 4 REG 205 PARV TCB value of PCQPARM if waiting 04B5A 4147FFFF IMM 206 PARV ONEBITS mask for PCQPARM if waiting 04B5B 4144000C IMM 207 PARV NQTERMWAIT queue in if waiting 04B5C 41420100 IMM 208 PARV 1*BIT CAIMNETERM program interrupt mask bit 04B5D 60091615 0 4 ZBM 209 LD R0 TCB,TCINTTCG terminator a trapper's? 04B5E 78091E18 0 4 ZBM 210 AND R0 TCB,TCINTE ints enabled on unit? 04B5F 41520000 0 REG 211 PARV R0 device interrupt enable bit 04B60 41440022 IMM 212 PARV UINTNETERM interrupt code 04B61 40491F15 4 ZBM 213 PARVL TCB,TCFCB interrupt subcode 04B62 60978801 2 6 BASE 214 LD R2 SP,PUTINCHART get the received char back 00004B63 215 NOUNSUSP LABEL 216 PUNLOCK TCB,TCLOCK release this list 04B63 EC170818 4 BASE 216 STZ TCB,TCLOCK 04B64 0C800000 216 ION 04B65 60093C21 0 4 ZBM 217 LD R0 TCB,TCECHO fetch the echo control field 04B66 5CA04B67 0 218 LDPC ECHOMODE(R0) do appropriate echo processing 219 * --- 220 00004B67 221 ECHOMODE LABEL 04B67 00004B6E 222 PTR CHEK4LKILL no echo 04B68 00004B6E 223 PTR CHEK4LKILL hardware echo 04B69 00004B6C 224 PTR DOECHO software echo 04B6A 00004B6B 225 PTR CHECKECHO echo when read 226 227 * See if echo because in read mode 00004B6B 228 CHECKECHO LABEL 04B6B F3C04B71 7 229 JBF R7/BIT 0 PUTLEAVE jump if not within line 230 * \ / 00004B6C 231 DOECHO LABEL 04B6C DC404983 232 CALLNP PLACEOUTCH output the character 04B6D 60978801 2 6 BASE 233 LD R2 SP,PUTINCHART get the received char back 00004B6E 234 CHEK4LKILL LABEL 04B6E 7884007F 2 IMM 235 AND R2 07F line kill is only a 7-bit char 04B6F 64891076 2 4 ZBM 236 CPR R2 TCB,TCLKILLC is the char a line kill 04B70 FE024B72 237 JEQ LKILLPROC jump if so, process line kill 238 * \ / 239 00004B71 240 PUTLEAVE LABEL 04B71 5D1F8002 6 STAK 241 LEAVE POP return 242 * --- 243 244 ********************************************************************************** 245 * A line kill character is being entered. If the * 246 * character is not a terminator then the character * 247 * processor will probably accept it as the line kill * 248 * character so if it passes that test, we here output * 249 * the line kill response. If a program is shifting * 250 * between terminating character sets or changing the * 251 * line kill character while type ahead is happening * 252 * and the terminal is not set to echo mode 3 it * 253 * is possible to get false line kill prompts, but the * 254 * kills will be processed properly. * 255 ********************************************************************************** 256 00004B72 257 LKILLPROC LABEL 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1014 (CIAINUTIL) F 50 Input utility routines for the CIA 04B72 FA824B71 2 258 JEQZ R2 PUTLEAVE null characters indicate nothing specified 04B73 6484007F 2 IMM 259 CPR R2 DEL check for a delete, it's non-printing 04B74 FE024B77 260 JEQ NONPRINT jump if it is 04B75 64840020 2 IMM 261 CPR R2 " " check to see if printing 04B76 FE064B71 262 JGE PUTLEAVE skip echoing response if printing lkill 00004B77 263 NONPRINT LABEL 264 PLOCK TCB,TCLOCK lock up the TCB 04B77 0CC00000 264 IOFF 04B78 D1D70818 4 BASE 264 SETT TCB,TCLOCK 04B79 FE0C4B7B 264 JNE MA(2+DISPW MA 0) 04B7A DC40308B 264 CALLNP LOCKWAIT 04B7B DC404C8B 265 CALLNP GETTERMPTR get the terminating character array 266 PUNLOCK TCB,TCLOCK release the TCB 04B7C EC170818 4 BASE 266 STZ TCB,TCLOCK 04B7D 0C800000 266 ION 04B7E 5C1A5400 12 @R 267 CMZ @R1(R2) see if this character is a terminator 04B7F FE0C4B71 268 JNE PUTLEAVE skip echo if terminator 04B80 6084005C 2 IMM 269 LD R2 "\" get the line kill echo character 04B81 DC404983 270 CALLNP PLACEOUTCH put into the output buffer 04B82 6084000D 2 IMM 271 LD R2 CR get a CR 04B83 DC404983 272 CALLNP PLACEOUTCH put into the output buffer 04B84 6084000A 2 IMM 273 LD R2 LF get a LF 04B85 DC404983 274 CALLNP PLACEOUTCH put into the output buffer 04B86 FE0E4B71 275 JMP PUTLEAVE and continue processing 276 * --- 277 278 ********************************************************************************** 279 * * 280 * We believe we have encountered an indication of a * 281 * terminal "break" condition (exception: "null" is not a break * 282 * character). We hereby send a user interrupt to the session * 283 * reading the terminal, if any. * 284 * * 285 ********************************************************************************** 286 00004B87 287 PRCBRKCH LABEL 04B87 FA024B27 0 288 JEQZ R0 NULLCHAR jump if break character not really set 289 * \ / 290 00004B88 291 PUTINBREAK LABEL 04B88 DC004A6C 292 CALL LNKCMNDBEG urgent command to ACC 04B89 4144008F IMM 293 PARV PORTCZAP 04B8A 40440004 IMM 294 PARVL 1*PORTCRCXON forget about any XON in effect 04B8B DC003457 295 CALL GIVEUINT tell user about the BREAK 04B8C 41491F17 4 ZBM 296 PARV TCB,TCPCADRS PCB of our user 04B8D 41440001 IMM 297 PARV 1 value of PCQPARM if waiting (can't wait) 04B8E 41440000 IMM 298 PARV 0 mask for PCQPARM (can't wait) 04B8F 4147FFFF IMM 299 PARV -1 queue in if waiting (can't wait) 04B90 41420400 IMM 300 PARV 1*BIT CAIMBREAK program interrupt mask 04B91 41440001 IMM 301 PARV 1 device interrupt enable bit (always) 04B92 41440020 IMM 302 PARV UINTBREAK interrupt code 04B93 40491F15 4 ZBM 303 PARVL TCB,TCFCB interrupt subcode 04B94 60091F17 0 4 ZBM 304 LD R0 TCB,TCPCADRS get associated process, if any 04B95 FA304BA3 0 305 JZA R0 NOTBREAKX jump if process disappeared 04B96 60081F13 0 0 ZBM 306 LD R0 R0,PCPSADRS R0=>PSA of the user 04B97 5C081214 0 ZBM 307 CMZ R0,PSCNTLMODE is he in control mode? 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1015 (CIAINUTIL) F 50 Input utility routines for the CIA 04B98 FE0C4BA3 308 JNE NOTBREAKX if he is, don't do the message thing 04B99 6084002A 2 IMM 309 LD R2 "*" 04B9A DC404983 310 CALLNP PLACEOUTCH "*BRK*" to signify break 04B9B 60840042 2 IMM 311 LD R2 "B" 04B9C DC404983 312 CALLNP PLACEOUTCH 04B9D 60840052 2 IMM 313 LD R2 "R" 04B9E DC404983 314 CALLNP PLACEOUTCH 04B9F 6084004B 2 IMM 315 LD R2 "K" 04BA0 DC404983 316 CALLNP PLACEOUTCH 04BA1 6084002A 2 IMM 317 LD R2 "*" 04BA2 DC404983 318 CALLNP PLACEOUTCH 00004BA3 319 NOTBREAKX LABEL 04BA3 6084000D 2 IMM 320 LD R2 CR get a CR 04BA4 DC404983 321 CALLNP PLACEOUTCH and place it 04BA5 6084000A 2 IMM 322 LD R2 LF get a line feed 04BA6 DC404983 323 CALLNP PLACEOUTCH place into output string 04BA7 DC404AF8 324 CALLNP FLUSHIQ dump the users input chars 04BA8 60C91F17 3 4 ZBM 325 LD R3 TCB,TCPCADRS get the PCB address for this process 04BA9 FAF04B71 3 326 JZA R3 PUTLEAVE odd to be here, but many breaks will do it 04BAA DC403569 327 CALLNP ROUST see that he processes the break 04BAB FE0E4B71 328 JMP PUTLEAVE exit 329 * --- 330 331 ********************************************************************************** 332 * * 333 * We have put many, many characters into the port's input * 334 * buffer but no one is removing them. The user wishes to be * 335 * XOFFed when this happens so that we won't flush his input * 336 * queue when the maximum input count is surpassed. We first * 337 * check to make sure we haven't already sent the XOFF before * 338 * sending one. There is likely to be a few characters coming * 339 * in after we send the XOFF. * 340 * TERMWBUSY is incremented since the check to send the XON * 341 * is in the CIA write code. This forces the CIADRIVER to scan * 342 * the TCBs for writes and possible XON sending. * 343 * * 344 ********************************************************************************** 345 00004BAC 346 XOFFINQUE LABEL 347 PLOCK TCB,TCLOCK lock up the TCB 04BAC 0CC00000 347 IOFF 04BAD D1D70818 4 BASE 347 SETT TCB,TCLOCK 04BAE FE0C4BB0 347 JNE MA(2+DISPW MA 0) 04BAF DC40308B 347 CALLNP LOCKWAIT 04BB0 D1C9101D 4 ZBM 348 SETT TCB,TCIQXOFFED say we have XOFFed the input 349 PUNLOCK TCB,TCLOCK release the TCB 04BB1 EC170818 4 BASE 349 STZ TCB,TCLOCK 04BB2 0C800000 349 ION 04BB3 FE024B2C 350 JEQ CHECKOFLOW jump if this has happened before 351 * \ / need to XOFF the port 04BB4 E4978801 2 6 BASE 352 ST R2 SP,PUTINCHART save our character 04BB5 60840013 2 IMM 353 LD R2 XOFF pick up the XOFF character 04BB6 60C40000 3 IMM 354 LD TCQ 0 04BB7 DC404994 355 CALLNP OUTTERMCH put it in its own TCQ 04BB8 DC004A4C 356 CALL LINKBEGLST put at the head of our output list 04BB9 41440001 IMM 357 PARV 1 number of characters 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1016 (CIAINUTIL) F 50 Input utility routines for the CIA 04BBA 4116C400 3 @R 358 PAR @TCQ beginning of list 04BBB 4016C400 3 @R 359 PARL @TCQ end of list 04BBC D0001F05 360 INC TERMWBUSY XOFF sent 361 PUNLOCK TCB,TCLOCK unlock the TCB 04BBD EC170818 4 BASE 361 STZ TCB,TCLOCK 04BBE 0C800000 361 ION 04BBF 604922FB 1 4 ZBM 362 LD R1 TCB,TCTTICNT restore our input count 04BC0 60978801 2 6 BASE 363 LD R2 SP,PUTINCHART restore our character 04BC1 FE0E4B2C 364 JMP CHECKOFLOW might have overflow, too 365 * --- 366 367 ********************************************************************************** 368 * * 369 * The number of input characters exceeds an arbitrary (and * 370 * rather large) limit. We check to see if this is the second * 371 * occurrence of an overflow without a successful read in * 372 * between. If it is so, we shut down that port for two minutes * 373 * in the hopes that the data generator will go away since the * 374 * program doesn't seem to be reading the data. Regardless, we * 375 * flush the buffer and queue an error element for the next read. * 376 * * 377 ********************************************************************************** 378 00004BC2 379 OVERFLOW LABEL 380 PLOCK TCB,TCLOCK lock up the TCB 04BC2 0CC00000 380 IOFF 04BC3 D1D70818 4 BASE 380 SETT TCB,TCLOCK 04BC4 FE0C4BC6 380 JNE MA(2+DISPW MA 0) 04BC5 DC40308B 380 CALLNP LOCKWAIT 04BC6 D1C9061D 4 ZBM 381 SETT TCB,TCINQFILL say we have input overrun 04BC7 FE024BCE 382 JEQ NEEDSHUTDN jump if this has already happened before 383 PUNLOCK TCB,TCLOCK release the TCB 04BC8 EC170818 4 BASE 383 STZ TCB,TCLOCK 04BC9 0C800000 383 ION 00004BCA 384 OVERFLOW1 LABEL 04BCA DC404AF8 385 CALLNP FLUSHIQ dump the users input chars 04BCB DC004D5C 386 CALL INPUTERR make an error element 04BCC 404400E2 IMM 387 PARVL DEVERPIBO pass the error code 04BCD FE0E4B71 388 JMP PUTLEAVE exit 389 * --- 390 391 * Disable input from this port for two minutes 00004BCE 392 NEEDSHUTDN LABEL 04BCE 6004000F 0 IMM 393 LD R0 STATE15 shutdown state code 04BCF E4090249 0 4 ZBM 394 ST R0 TCB,TCINTSTATE force us into shut down state 04BD0 700404B0 0 IMM 395 LDN R0 WAIT120SEC keep shut down for 2 minutes 04BD1 60440001 1 IMM 396 LD R1 TIMESHUT indicate routine to execute 04BD2 E4490A39 1 4 ZBM 397 ST R1 TCB,TCTIMERTN set it 04BD3 E0170817 0 4 BASE 398 EXCH R0 TCB,TCTIMECNT get the old timing number 04BD4 FA0C4BD7 0 399 JNEZ R0 TIMECNTOK jump if already timing 04BD5 60091F16 0 4 ZBM 400 LD R0 TCB,TCCIABLOCK get comm control element 04BD6 D016080A 0 BASE 401 INC R0,COMTRMTMNG another timer on this comm 00004BD7 402 TIMECNTOK LABEL 403 PUNLOCK TCB,TCLOCK release the TCB 04BD7 EC170818 4 BASE 403 STZ TCB,TCLOCK 04BD8 0C800000 403 ION 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1017 (CIAINUTIL) F 50 Input utility routines for the CIA 04BD9 60970013 2 4 CACH 404 LD R2 TCB,TCLASTCOM2 04BDA EC0AB610 2 CBM 405 STZ R2/PORTSRDE pass options with receiving turned off 04BDB DC004A7F 406 CALL SETACCOPTS send stuff to the ACC 04BDC 40528000 2 REG 407 PARVL R2 options to set 04BDD FE0E4BCA 408 JMP OVERFLOW1 rejoin code 409 * --- 410 411 END PUTINCHAR subroutine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1018 (CIAINUTIL) F 50 Input utility routines for the CIA 413 414 ********************************************************************************** 415 * * 416 * MOVECHARIN. This routine moves a string of characters * 417 * (presumably from the comm input buffer) into the input buffer * 418 * for the specified terminal. This routine is intended to be a * 419 * much faster version of PUTINCHAR for use when a block mode * 420 * device is sending at high, continuous rates. It does not * 421 * check for input buffer overrun, it does not do certain echo * 422 * modes, and it has a higher setup time. Consequently, it is * 423 * used only when these restrictions do not matter. * 424 * Timing. On a fast input port, each interrupt can supply * 425 * about 100 characters for each port. This represents the * 426 * worst case load for the comm. During testing in 1984, we * 427 * discovered that the existing routine could not handle 64 * 428 * ports at maximum rate due to the processing overhead in * 429 * MOVECHARIN. The following timings were calculated then for a * 430 * CPU3. The original routine moved one character at a time * 431 * checking each for a terminator. The original code used about * 432 * 110 usec for setup and 19 usec for each character for a total * 433 * of 2010 usec for such a port. The new code using the TSCAN * 434 * used about 110 usec for setup, 2.5 usec for each character * 435 * in the tscan, overhead of 35 usec, and .75 usec for each * 436 * character moved, to total about 470 usec for such a port. * 437 * For a comm where each port is supplying characters at * 438 * the maximum rate, 64 ports used 128 msec with the old method, * 439 * longer than the time between interrupts. With the new * 440 * method, 64 ports requires only 30 msec. * 441 * Call: * 442 * * 443 * LD R4 => TCB * 444 * CALL MOVECHARIN * 445 * PAR => the characters * 446 * PARVL number of characters * 447 * * 448 * Eats R0:R3 * 449 * Stack required = 14 * 450 * 6 + max ( GETTERMPTR (1), GIVEUINT (8), LOCKWAIT (0), * 451 * SGETMEM (0) ) * 452 * * 453 ********************************************************************************** 454 455 BLOCK MOVECHARIN subroutine 456 ENTRY MOVECHARIN move characters in mass 457 458 BEGFRAME 00178801 6 BASE 459 CHRSMOVD BSS 1 number of characters moved 00178802 6 BASE 460 THEFIRST1 BSS 1 => the first TCB created 00178803 6 BASE 461 CHARSLEFT BSS 1 characters left to process 00178804 6 BASE 462 INBUFF BSS 1 => the first char to move 00178805 6 BASE 463 SAVER5 BSS 1 to save R5 464 ENDFRAME 465 04BDE DD1F8006 6 STAK 466 MOVECHARIN ENTR PUSH 04BDF C1178804 6 BASE 467 STP SP,INBUFF save pointer to the characters 04BE0 C0578803 6 BASE 468 STPVL SP,CHARSLEFT save the characters to move 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1019 (CIAINUTIL) F 50 Input utility routines for the CIA 04BE1 E4178801 0 6 BASE 469 ST R0 SP,CHRSMOVD remember the count 04BE2 60C40000 3 IMM 470 LD TCQ 0 no blocks yet 04BE3 E5578805 5 6 BASE 471 ST R5 SP,SAVER5 save this register 472 * \ / 00004BE4 473 MORECHARS LABEL 04BE4 61578803 5 6 BASE 474 LD R5 SP,CHARSLEFT get the number left to move 04BE5 51401F0B 5 475 MIN R5 TCQMAXSIZE 04BE6 5C575005 5 REG 476 HIB R5+TCQUSED-1 04BE7 70920000 2 0 REG 477 LDN R2 R0 04BE8 1884001E 2 IMM 478 ADD R2 WORDLNTH-(CPW LOG 2) R2=log size of block (for later store) 04BE9 DC002ED0 479 CALL SGETMEM get storage for the block 04BEA 40528000 2 REG 480 PARVL R2 04BEB EE160800 0 BASE 481 STZ2 R0,0 clean out garbage 04BEC E4881060 2 0 ZBM 482 ST R2 R0,TCQLOG remember block size 04BED 60641F06 1 2 483 LD R1 TCQSIZES(R2) 04BEE E4560005 1 0 CACH 484 ST R1 R0,TCQSIZE remember the maximum chars in block 04BEF FAF04BF2 3 485 JZA TCQ THEFIRST is the new block the first? 04BF0 E408DF10 0 3 ZBM 486 ST R0 TCQ,TCQLINK not -- link new onto end 04BF1 FE0E4BF3 487 JMP NOTFIRST 488 * --- 489 00004BF2 490 THEFIRST LABEL 04BF2 E4178802 0 6 BASE 491 ST R0 SP,THEFIRST1 remember the first block 00004BF3 492 NOTFIRST LABEL 04BF3 60D20000 3 0 REG 493 LD TCQ R0 TCQ now points to new block 04BF4 E556C004 5 3 CACH 494 ST R5 TCQ,TCQLAST putting this number of chars in 04BF5 60178804 0 6 BASE 495 LD R0 SP,INBUFF get the source string pointer 04BF6 3896C006 2 3 CACH 496 LEA R2 TCQ,TCQCHARS[1] get the destination string pointer 04BF7 60534000 1 5 REG 497 LD R1 R5 and get length of source 04BF8 FE400000 498 CMOVE move 'em in 04BF9 E4178804 0 6 BASE 499 ST R0 SP,INBUFF save the advanced source pointer 04BFA B1578803 5 6 BASE 500 RSBM R5 SP,CHARSLEFT remove the count of chars moved 04BFB FE044BE4 501 JGT MORECHARS loop if more to move 04BFC 61578805 5 6 BASE 502 LD R5 SP,SAVER5 restore this register 503 * \ / 504 505 ********************************************************************************** 506 * * 507 * All of the passed characters are now in queue elements. * 508 * Link the created list into the terminal's input queue and * 509 * then check to see if the port needs a push to get the data * 510 * read. * 511 * * 512 ********************************************************************************** 513 514 * \ / 515 PLOCK TCB,TCLOCK get access to the TCB 04BFD 0CC00000 515 IOFF 04BFE D1D70818 4 BASE 515 SETT TCB,TCLOCK 04BFF FE0C4C01 515 JNE MA(2+DISPW MA 0) 04C00 DC40308B 515 CALLNP LOCKWAIT 04C01 60178801 0 6 BASE 516 LD R0 SP,CHRSMOVD 04C02 980922FB 0 4 ZBM 517 ADDM R0 TCB,TCTTICNT add in the characters being added 04C03 6009011C 0 4 ZBM 518 LD R0 TCB,TCTTIEP R0=>end of old list 04C04 60578802 1 6 BASE 519 LD R1 SP,THEFIRST1 R1=>start of list just made 04C05 FA304C08 0 520 JZA R0 WHOLELIST jump if linking onto an empty list 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1020 (CIAINUTIL) F 50 Input utility routines for the CIA 04C06 E4481F10 1 0 ZBM 521 ST R1 R0,TCQLINK link new stuff onto end of old 04C07 FE0E4C09 522 JMP ADD2END 523 * --- 524 00004C08 525 WHOLELIST LABEL 04C08 E449231C 1 4 ZBM 526 ST R1 TCB,TCTTIBP ours is the whole thing 00004C09 527 ADD2END LABEL 04C09 E4C9011C 3 4 ZBM 528 ST TCQ TCB,TCTTIEP new end of the list 04C0A 5C17080E 4 BASE 529 CMZ TCB,TCTERMLOC is there already a terminator in the queue? 04C0B FE0C4C26 530 JNE NOPUSHY jump if so, one is enough 04C0C 60D78802 3 6 BASE 531 LD TCQ SP,THEFIRST1 get pointer to first new TCQ 04C0D FAF04C26 3 532 JZA TCQ NOPUSHY no blocks, obviously no terminators 04C0E DC404C8B 533 CALLNP GETTERMPTR get bit pointer to term. char array 04C0F 60924000 2 1 REG 534 LD R2 R1 copy pointer to R2 00004C10 535 TERSCAN LABEL 04C10 6056C004 1 3 CACH 536 LD R1 TCQ,TCQLAST get last index 04C11 6016C000 0 3 CACH 537 LD R0 TCQ,TCQFIRST get begin index 04C12 10520000 1 0 REG 538 SUB R1 R0 make count of characters here 04C13 381AC006 0 30 CACH 539 LEA R0 TCQ,TCQCHARS(1)(R0) make char pointer to first char 04C14 DA148800 0 21 540 SCAN R0,R2,R1 scan for terminators in this block 04C15 FE024C18 541 JEQ GIVEANINT if terminator found, save location and allow read 04C16 FAF64C10 3 542 LJNA TCQ TERSCAN advance to next block and search it 04C17 FE0E4C26 543 JMP NOPUSHY no blocks, no terms, no errors, 544 * --- and no one left on base 545 00004C18 546 GIVEANINT LABEL 04C18 3056C004 1 3 CACH 547 RSB R1 TCQ,TCQLAST make index of terminator 04C19 E44900FE 1 4 ZBM 548 ST R1 TCB,TCTERMCHLC save terminator index 04C1A E4C91F1E 3 4 ZBM 549 ST TCQ TCB,TCTERMTCQ along with its TCQ address 04C1B DC003457 550 CALL GIVEUINT pass the event to the user 04C1C 41491F17 4 ZBM 551 PARV TCB,TCPCADRS PCB of the user 04C1D 41530000 4 REG 552 PARV TCB value of PCQPARM if waiting 04C1E 4147FFFF IMM 553 PARV ONEBITS mask for PCQPARM 04C1F 4144000C IMM 554 PARV NQTERMWAIT queue in if waiting 04C20 41420100 IMM 555 PARV 1*BIT CAIMNETERM program interrupt mask bit 04C21 60091615 0 4 ZBM 556 LD R0 TCB,TCINTTCG terminator a trapper's? 04C22 78091E18 0 4 ZBM 557 AND R0 TCB,TCINTE ints enabled on unit? 04C23 41520000 0 REG 558 PARV R0 device interrupt enable bit 04C24 41440022 IMM 559 PARV UINTNETERM interrupt code 04C25 40491F15 4 ZBM 560 PARVL TCB,TCFCB interrupt subcode 00004C26 561 NOPUSHY LABEL 562 PUNLOCK TCB,TCLOCK release the TCB 04C26 EC170818 4 BASE 562 STZ TCB,TCLOCK 04C27 0C800000 562 ION 04C28 5D1F8006 6 STAK 563 LEAVE POP 564 * --- 565 566 END MOVECHARIN subroutine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1021 (CIAINUTIL) F 50 Input utility routines for the CIA 568 569 ********************************************************************************** 570 * * 571 * CHECKLOGD. * 572 * Routine that checks the status of the indicated TCB and * 573 * either sez to ignore the character or to use it. We check to * 574 * see if anyone is already logged on. If logged on, we allow * 575 * the character. * 576 * If the port is NOT already logged on, we ignore the * 577 * character under any of the following circumstances: * 578 * 1) the port state is not normal (TCINTSNORM). * 579 * 2) the port is inhibited. * 580 * 3) the system is inhibited. * 581 * 4) the character is not a break or break character. * 582 * If these conditions are all negative, a process is * 583 * created for this port, control mode is CHAINED to (by a * 584 * rather non-standard chain procedure), and the process is * 585 * started. Control mode will demand a proper log on. * 586 * Call: * 587 * LD R4 =>TCB * 588 * LD R2 character * 589 * CALLNP CHECKLOGD * 590 * JMP * 591 * * 592 * Gets R0, R1, R3, and R4. Also gets R2 if not logged. * 593 * Stack required = 6 * 594 * 3 + max ( BLDPROCESS (2), BLKLIMCHK (1), CREATEFCB (2), * 595 * CREATEUCE (2), MAPINMEM (3), SETINITRUN (1), * 596 * SETRUNNING (2) ) * 597 * * 598 ********************************************************************************** 599 600 BLOCK CHECKLOGD subroutine 601 ENTRY CHECKLOGD 602 603 BEGFRAME 00178801 6 BASE 604 TEMP BSS 1 guess 00178802 6 BASE 605 SAVER5 BSS 1 bet you can't figure this one out 606 ENDFRAME 607 04C29 DD5F8003 6 STAK 608 CHECKLOGD ENTRNP PUSH 04C2A 5C091F17 4 ZBM 609 CMZ TCB,TCPCADRS is he logged on? 04C2B FE024C2E 610 JEQ NOTLOGD jump if not, character is questionable 04C2C 19C40001 7 IMM 611 ADD R7 1 advance to skip return 04C2D 5D1F8003 6 STAK 612 LEAVE POP return 613 * --- 614 00004C2E 615 NOTLOGD LABEL 04C2E 5C001D0D 616 CMZ ALLINHIBIT check the inhibit bit 04C2F FE0C4C75 617 JNE IGNORECH jump if to ignore the character 04C30 60090249 0 4 ZBM 618 LD R0 TCB,TCINTSTATE fetch his current modem control state 04C31 64040002 0 IMM 619 CPR R0 TCINTSNORM check against normal 04C32 FE0C4C75 620 JNE IGNORECH jump if to ignore the character 04C33 600AB270 0 2 CBM 621 LD R0 R2/BITS 25:31 get seven-bit character 04C34 64170018 0 4 CACH 622 CPR R0 TCB,TCBRCH is it the fake break character? 04C35 FE024C38 623 JEQ GOODASBRK if so, fake a break 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1022 (CIAINUTIL) F 50 Input utility routines for the CIA 04C36 64840100 2 IMM 624 CPR R2 BREAKMARK check for break character 04C37 FE0C4C75 625 JNE IGNORECH only break can create a process 626 * \ / 627 00004C38 628 GOODASBRK LABEL 04C38 E5178801 4 6 BASE 629 ST TCB SP,TEMP save the TCB pointer 04C39 E5578802 5 6 BASE 630 ST R5 SP,SAVER5 save the callers input buffer pointer 04C3A DC0035D2 631 CALL BLDPROCESS create a process 04C3B 4144F000 IMM 632 PARV USERMSR supply MSR desired 04C3C 43440000 IMM 633 PARV2 0 "name" of program running 04C3D 41440000 IMM 634 PARV 0 (program counter) 04C3E 40440000 IMM 635 PARVL 0 not a system process 636 * R3 => new PSA, R4 => new PCB 04C3F 60978801 2 6 BASE 637 LD R2 SP,TEMP R2 => TCB 04C40 E5089F17 4 2 ZBM 638 ST R4 R2,TCPCADRS point TCB to PCB 04C41 6216881B 012 BASE 639 LD2 R0 R2,TCSITE 04C42 E6170805 014 BASE 640 ST2 R0 R4,PCBSITE copy the site name to the process 641 * \ / 642 643 ********************************************************************************** 644 * * 645 * We create for the user his absolute input and absolute * 646 * output units. The output terminal is created RW privilege * 647 * and access, the input terminal with RO privilege and access. * 648 * The FCBCBPTRs are initialized with the TCB pointer we * 649 * received, and the serial number is set. Note that the * 650 * FCLIMITPTR is left empty so that the routine which closes * 651 * these units does not assume that they were opened by the * 652 * normal method from a saved file. * 653 * * 654 ********************************************************************************** 655 656 * \ / 04C43 6108DF15 4 3 ZBM 657 LD R4 R3,PSPROCLIST get one and only process 04C44 FB324C46 4 658 JNZA R4 PROCOK jump if there 04C45 00130214 659 HALT HALTS0214 PSPROCLIST empty after BLDPROCESS 660 * --- 661 00004C46 662 PROCOK LABEL 04C46 DC004C77 663 CALL CREATEFCB make a new FCB and add to list 04C47 41440007 IMM 664 PARV HTYPETERM of this type 04C48 40440000 IMM 665 PARVL FSPRIVRW with this privilege and access 04C49 E4895F16 2 5 ZBM 666 ST R2 FCB,FCDCBPTR set TCB as control block 04C4A 60040007 0 IMM 667 LD R0 HTYPETERM get type code for terminal 04C4B E4174809 0 5 BASE 668 ST R0 FCB,FCSERIAL set first half of serial # 04C4C 60088890 0 2 ZBM 669 LD R0 R2,TCTNUM get port number 04C4D E417480A 0 5 BASE 670 ST R0 FCB,FCSERIAL(1) set as second half of serial # 04C4E EDC89415 2 ZBM 671 STW R2,TCACSRW terminal is being access RW 04C4F DC003635 672 CALL CREATEUCE make a UCE for it 04C50 414400CA IMM 673 PARV LUNAOUT use number for absolute output 04C51 40534000 5 REG 674 PARVL FCB FCB => newly created file control block 04C52 EC081F10 0 ZBM 675 STZ R0,UCELINK this will be list end 04C53 E408E316 0 3 ZBM 676 ST R0 R3,PSUNITS and, for now, the list head 677 * \ / 678 04C54 DC004C77 679 CALL CREATEFCB make a new FCB 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1023 (CIAINUTIL) F 50 Input utility routines for the CIA 04C55 41440007 IMM 680 PARV HTYPETERM of this type 04C56 40440001 IMM 681 PARVL FSPRIVRO with this privilege and access 04C57 60040007 0 IMM 682 LD R0 HTYPETERM get type code for terminal 04C58 E4174809 0 5 BASE 683 ST R0 FCB,FCSERIAL set first half of serial # 04C59 60978801 2 6 BASE 684 LD R2 SP,TEMP get the TCB back 04C5A 60088890 0 2 ZBM 685 LD R0 R2,TCTNUM get port number 04C5B E417480A 0 5 BASE 686 ST R0 FCB,FCSERIAL(1) set as second half of serial # 04C5C E4895F16 2 5 ZBM 687 ST R2 FCB,FCDCBPTR give terminal control block address 04C5D E5489F15 5 2 ZBM 688 ST FCB R2,TCFCB this FCB will get interrupts 04C5E EDC89E18 2 ZBM 689 STW R2,TCINTE interrupts for him 04C5F EDC89215 2 ZBM 690 STW R2,TCACSRO terminal is being access RO 04C60 DC003635 691 CALL CREATEUCE make a UCE for it 04C61 414400C9 IMM 692 PARV LUNAIN use number for absolute input 04C62 40534000 5 REG 693 PARVL FCB FCB => newly created file control block 04C63 6048E316 1 3 ZBM 694 LD R1 R3,PSUNITS fetch the list head 04C64 E4481F10 1 0 ZBM 695 ST R1 R0,UCELINK tack list behind 04C65 E408E316 0 3 ZBM 696 ST R0 R3,PSUNITS and renew list head 697 * \ / 698 04C66 EDC91011 4 ZBM 699 STW R4,UPCNETINTE enable terminal interrupts 04C67 6108DF13 4 3 ZBM 700 LD ULB R3,PSUSERLIMP get logon ULB 04C68 DC40364A 701 CALLNP BLKLIMCHK enough disk space to attempt a logon 702 * R0 <= error code if not enough disk space 04C69 60404C76 1 703 LD R1 CMENTCODE get prototype entry code 04C6A 5C120000 0 REG 704 CMZ R0 did we get an out of space error 04C6B ED8A4410 1 CBM 705 STLNE R1/CMERRIDS indicate the problem to control mode 04C6C 5C089C10 2 ZBM 706 CMZ R2,TCINHIB check the terminal bit 04C6D ED8A4610 1 CBM 707 STLNE R1/CMERRINH set bit to give Control Mode 04C6E DC003640 708 CALL SETINITRUN set initial entry 04C6F 40524000 1 REG 709 PARVL R1 pass initial entry code 04C70 6108DF12 4 3 ZBM 710 LD R4 R3,PSPROCCB pick up PCB pointer 04C71 DC402B99 711 CALLNP SETRUNNING make this new process run 04C72 DC0025EB 712 CALL MAPINMEM re-map the original caller 04C73 40400412 713 PARVL CPPSA pointer to the PSA 714 * ignore the character that created the process 04C74 61578802 5 6 BASE 715 LD R5 SP,SAVER5 restore callers register 716 * \ / 717 00004C75 718 IGNORECH LABEL 04C75 5D1F8003 6 STAK 719 LEAVE POP return 720 * --- 721 04C76 00000000 722 CMENTCODE VFD 0*CMSKAPPL+0*CMBATCHJOB+0*CMERRIDS+CMNLOGIO*CMENTRYCD 723 724 END CHECKLOGD subroutine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1024 (CIAINUTIL) F 50 Input utility routines for the CIA 726 727 ********************************************************************************** 728 * * 729 * This be a routine that creates the FCBs for the default * 730 * lun assignment. It creates a zeroed FCB save for read only * 731 * privilege, load point status, FCABSIO, and the hardware type * 732 * and lun number as passed by the caller. * 733 * * 734 * R3 => PSA * 735 * CALL CREATEFCB * 736 * PARV hardware type * 737 * PARVL access/priv * 738 * * 739 * Eats R0-R1, sets FCB => New FCB * 740 * Stack required = 2 * 741 * 1 + max ( FCGETMEM (0), ZEROIT (1) ) * 742 * * 743 ********************************************************************************** 744 745 BLOCK CREATEFCB subroutine 746 747 ENTRY CREATEFCB 748 749 BEGFRAME 750 ENDFRAME 751 04C77 DD9F8001 6 STAK 752 CREATEFCB ENTRS PUSH 04C78 DC002F0A 753 CALL FCGETMEM make the block 04C79 40440004 IMM 754 PARVL FCLOG 04C7A 61520000 5 0 REG 755 LD FCB R0 pointer to right register 04C7B DC003090 756 CALL ZEROIT clean any garbage out 04C7C 41174800 5 BASE 757 PAR FCB,0 04C7D 40440010 IMM 758 PARVL 2 POWER FCLOG 04C7E DCD3C000 7 REG 759 EXPCS R7 pick up parameters 04C7F C1496665 5 ZBM 760 STPV FCB,FCHTYPE get hardware type 04C80 C0524000 1 REG 761 STPVL R1 get access code 04C81 E4495835 1 5 ZBM 762 ST R1 FCB,FCACCESS put access into FCB 04C82 E4494E45 1 5 ZBM 763 ST R1 FCB,FCPRIV use same priv as the access 04C83 EDC96015 5 ZBM 764 STW FCB,FCABSIO say that this is an "absolute" unit 04C84 EDC94C15 5 ZBM 765 STW FCB,FCLOADPT make at load point 04C85 D157480D 5 BASE 766 STMW FCB,FCNAMEEXT for project in catalog info fetch 04C86 EDC94080 5 ZBM 767 STW FCB,FCBUSYCNT set initial busy counter 04C87 6008DF17 0 3 ZBM 768 LD R0 R3,PSFCBLIST get list head 04C88 E4095F10 0 5 ZBM 769 ST R0 FCB,FCLINK set current list behind new element 04C89 E548DF17 5 3 ZBM 770 ST FCB R3,PSFCBLIST and make new element list head 04C8A 5D1F8001 6 STAK 771 LEAVE POP 772 * --- 773 774 END CREATEFCB subroutine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1025 (CIAINUTIL) F 50 Input utility routines for the CIA 776 777 ********************************************************************************** 778 * * 779 * GETTERMPTR * 780 * Fetches a pointer to the current terminating character * 781 * array. * 782 * The eight word array in the TCB is provided (rather * 783 * than just having the pointer point at whereever the array * 784 * actually is) because the PSA and UPC related tables may * 785 * be virtual. * 786 * Call: * 787 * LD SP => stack * 788 * LD R4 => TCB * 789 * CALLNP GETTERMPTR * 790 * ST R1 => term char array * 791 * * 792 * Eats R0:R1. * 793 * Stack required = 1 * 794 * * 795 ********************************************************************************** 796 797 BLOCK GETTERMPTR subroutine 798 ENTRY GETTERMPTR 799 800 BEGFRAME 801 ENDFRAME 802 04C8B DD5F8001 6 STAK 803 GETTERMPTR ENTRNP PUSH 04C8C 6009083D 0 4 ZBM 804 LD R0 TCB,TCTERMGRP see which group he is using 04C8D 5D604C8F 0 805 XCT GTPVECT(R0) decode group 04C8E 5D1F8001 6 STAK 806 LEAVE POP return 807 * --- 808 00004C8F 809 GTPVECT LABEL 04C8F 60404CA3 1 810 LD R1 TERMARAYP0 0 - standard 0 04C90 60404CA4 1 811 LD R1 TERMARAYP1 1 - standard 1 04C91 60404CA5 1 812 LD R1 TERMARAYP2 2 - standard 2 04C92 3849001F 1 4 ZBM 813 LEA R1 TCB,TCTERMA/BIT 0 3 - user specified 814 * --- 815 816 * The system default terminating char set -- CR and cntl-W 817 00004C93 818 TERMARRAY0 LABEL 04C93 00040100 819 VFD (1*BIT CR)+(1*BIT ETB) CR and ETB (control W) 04C94 00000000 820 VFD 0 04C95 00000000 821 VFD 0 04C96 00000000 822 VFD 0 04C97 00040100 823 VFD (1*BIT CR)+(1*BIT ETB) CR and ETB (control W) 04C98 00000000 824 VFD 0 04C99 00000000 825 VFD 0 04C9A 00000000 826 VFD 0 827 00004C9B 828 TERMARRAY1 LABEL 00004C9B 829 TERMARRAY2 LABEL 04C9B 00040000 830 VFD 1*BIT CR CR only 04C9C 00000000 831 VFD 0 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1026 (CIAINUTIL) F 50 Input utility routines for the CIA 04C9D 00000000 832 VFD 0 04C9E 00000000 833 VFD 0 04C9F 00040000 834 VFD 1*BIT CR CR only 04CA0 00000000 835 VFD 0 04CA1 00000000 836 VFD 0 04CA2 00000000 837 VFD 0 838 04CA3 00484C93 839 TERMARAYP0 PTR TERMARRAY0/BIT 0 04CA4 00484C9B 840 TERMARAYP1 PTR TERMARRAY1/BIT 0 04CA5 00484C9B 841 TERMARAYP2 PTR TERMARRAY2/BIT 0 842 843 END GETTERMPTR subroutines 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1027 (CIAINUTIL) F 50 Input utility routines for the CIA 845 846 ********************************************************************************** 847 * * 848 * CALCTERMC * 849 * Scan the input buffer until we find the first terminating * 850 * character. If none, TCTERMLOC <= 0, else TCTERMLOC gets the * 851 * location of that terminator. It is possible to have a TCQ * 852 * element that contains an error code rather than characters * 853 * so we need to check before a scan is done. * 854 * Call: * 855 * LD R4 => TCB (locked) * 856 * CALLNP CALCTERMC * 857 * * 858 * Gets R0:R3 * 859 * Stack required = 2 * 860 * 1 + GETTERMPTR (1) * 861 * * 862 ********************************************************************************** 863 864 BLOCK CALCTERMC subroutine 865 ENTRY CALCTERMC 866 867 BEGFRAME 868 ENDFRAME 869 04CA6 DD5F8001 6 STAK 870 CALCTERMC ENTRNP PUSH 04CA7 EC17080E 4 BASE 871 STZ TCB,TCTERMLOC assume no terminator in list 04CA8 60C9231C 3 4 ZBM 872 LD TCQ TCB,TCTTIBP get link to first TCQ 04CA9 FAF04CB9 3 873 JZA TCQ EXITCALC if none, quit 04CAA DC404C8B 874 CALLNP GETTERMPTR get bit pointer to term array 04CAB 60924000 2 1 REG 875 LD R2 R1 copy pointer to R2 876 * \ / 877 00004CAC 878 CALC1 LABEL 04CAC 5C08DC10 3 ZBM 879 CMZ TCQ,TCQCOMND is this an error element? 04CAD FE0C4CB4 880 JNE NEXTTCQ skip this TCQ if so 04CAE 6016C000 0 3 CACH 881 LD R0 TCQ,TCQFIRST get index to first character 04CAF 6056C004 1 3 CACH 882 LD R1 TCQ,TCQLAST get index to last character 04CB0 10520000 1 0 REG 883 SUB R1 R0 make count of characters 04CB1 381AC006 0 30 CACH 884 LEA R0 TCQ,TCQCHARS(1)(R0) produce char pointer to first char 04CB2 DA148800 0 21 885 SCAN R0,R2,R1 scan for a terminator 04CB3 FE024CB6 886 JEQ CALC2 jump if found, compute and store its location 887 * \ / 888 00004CB4 889 NEXTTCQ LABEL 04CB4 FAF64CAC 3 890 LJNA TCQ CALC1 link to next block and repeat term search 04CB5 FE0E4CB9 891 JMP EXITCALC jump if no terminators 892 * --- 893 00004CB6 894 CALC2 LABEL 04CB6 E4C91F1E 3 4 ZBM 895 ST TCQ TCB,TCTERMTCQ save address of TCQ with first terminator 04CB7 3056C004 1 3 CACH 896 RSB R1 TCQ,TCQLAST calculate index of terminator 04CB8 E44900FE 1 4 ZBM 897 ST R1 TCB,TCTERMCHLC and save in TCB 898 * \ / 899 00004CB9 900 EXITCALC LABEL 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1028 (CIAINUTIL) F 50 Input utility routines for the CIA 04CB9 5D1F8001 6 STAK 901 LEAVE POP 902 * --- 903 904 END CALCTERMC subroutine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1029 (CIAINUTIL) F 50 Input utility routines for the CIA 906 907 ********************************************************************************** 908 * * 909 * MAKTRMSTAT. This routine will create the dynamic status * 910 * for a .TERM. We check the TCB for terminators and return * 911 * the unit number given as the operand of the XREQ. For this * 912 * reason please make sure this routine is ALWAYS called from * 913 * the XREQ processor. * 914 * * 915 * FCB => FCB of a .TERM * 916 * CALLNP MAKTRMSTAT * 917 * * 918 * * 919 * Registers Used: R0:R1, TCB. * 920 * Stack Required: 1 * 921 * * 922 ********************************************************************************** 923 924 BLOCK routine to construct terminal status 925 ENTRY MAKTRMSTAT 926 927 BEGFRAME 928 ENDFRAME 929 04CBA DD5F8001 6 STAK 930 MAKTRMSTAT ENTRNP PUSH 04CBB 60040000 0 IMM 931 LD R0 0 get initial status of zero 04CBC 60494455 1 5 ZBM 932 LD R1 FCB,FCDYNSTAT get these status bits 04CBD E44A2050 1 0 CBM 933 ST R1 R0/FCDSTATPLC and put them in their place 04CBE 61095F16 4 5 ZBM 934 LD TCB FCB,FCDCBPTR get the terminal control block 04CBF FB304CC2 4 935 JZA TCB SKIPLP don't get load point status if no terminal 04CC0 5C17080E 4 BASE 936 CMZ TCB,TCTERMLOC is there another line? 04CC1 EC4A2810 0 CBM 937 STLEQ R0/FDSTATLP set LP bit appropriately 938 * \ / 939 00004CC2 940 SKIPLP LABEL 04CC2 81524000 1 REG 941 STCAR R1 pointer to console area 04CC3 6056480E 1 1 BASE 942 LD R1 R1,CAXOPERAND operand should be the unit number 04CC4 E44A0880 1 0 CBM 943 ST R1 R0/FDSTATLUN plug in unit number 04CC5 5D1F8001 6 STAK 944 LEAVE POP return 945 * --- 946 947 END of MAKTRMSTAT 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1030 (CIAINUTIL) F 50 Input utility routines for the CIA 949 950 ********************************************************************************** 951 * * 952 * Routine to echo all of the characters in the input * 953 * buffer up to and including a terminator. This routine * 954 * is used by the echo mode which only echoes characters * 955 * when the program actually reads them. TCB,TCLOCK must be * 956 * locked when this is called and this returns with the list * 957 * still locked. * 958 * Call: * 959 * LD R4 =>TCB (TCB must be locked) * 960 * CALLNP ECHOLINE * 961 * * 962 * Gets R0:R3 * 963 * Stack required = 14 * 964 * 7 + max ( FILLTCQ (1), LINKTCQLST (3), LOCKWAIT (0), * 965 * OUTTERMCH (5), PROCLKILL (7), SCAN4DLY (2) ) * 966 * * 967 ********************************************************************************** 968 969 BLOCK ECHOLINE and ECHOALL subroutines 970 ENTRY ECHOLINE 971 ENTRY ECHOALL 972 00000010 BYTE 973 ELSTOPT EQU BIT 0 bit in R7, if zero, stop on term., otherwise, echo all 974 BEGFRAME 00178801 6 BASE 975 ELROOT BSS 1 root of created list 00178802 6 BASE 976 ELCHARS BSS 1 number of characters echoed 00178803 6 BASE 977 ELSAVER5 BSS 1 save for R5 00178804 6 BASE 978 ELTCQ BSS 1 temp for holding TCQ pointer 00178805 6 BASE 979 ELFIRSTPOS BSS 1 pointer to our first position 00178806 6 BASE 980 ELTCQCNT BSS 1 count of characters output from this TCQ 981 ENDFRAME 982 04CC6 DD5F8007 6 STAK 983 ECHOLINE ENTRNP PUSH 04CC7 EC0BC010 7 CBM 984 STZ R7/ELSTOPT remember to stop on terminator 00004CC8 985 ELSHARE LABEL 04CC8 E5578803 5 6 BASE 986 ST R5 SP,ELSAVER5 save this register 04CC9 60C9231C 3 4 ZBM 987 LD TCQ TCB,TCTTIBP TCQ => beginning of input string 04CCA FAF04D11 3 988 JZA TCQ ELLIDX jump if no characters 989 * \ / 990 04CCB EE178801 6 BASE 991 STZ2 SP,ELROOT indicate no list yet and no chars echoed 04CCC EC178804 6 BASE 992 STZ SP,ELTCQ no TCQ yet 993 00004CCD 994 ELNEXTTCQ LABEL 04CCD 5C08DC10 3 ZBM 995 CMZ TCQ,TCQCOMND is this an error element? 04CCE FE0C4D0B 996 JNE DONTSTOP if so then get the next TCQ 04CCF 6156C004 5 3 CACH 997 LD R5 TCQ,TCQLAST get index to last character 04CD0 6016C000 0 3 CACH 998 LD R0 TCQ,TCQFIRST and index to first character 04CD1 F7C04CD6 7 999 JBT R7/ELSTOPT NOTERM jump if not stopping at the first terminator 04CD2 64C91F1E 3 4 ZBM 1000 CPR TCQ TCB,TCTERMTCQ does this TCQ contain a terminator 04CD3 FE0C4CD6 1001 JNE NOTERM if not, skip ahead 04CD4 614900FE 5 4 ZBM 1002 LD R5 TCB,TCTERMCHLC don't go further than it 04CD5 19440001 5 IMM 1003 ADD R5 1 include the terminator 1004 * \ / 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1031 (CIAINUTIL) F 50 Input utility routines for the CIA 1005 00004CD6 1006 NOTERM LABEL 04CD6 11520000 5 0 REG 1007 SUB R5 R0 R5 = number of chars 04CD7 E5578806 5 6 BASE 1008 ST R5 SP,ELTCQCNT how many characters need to go from TCQ 04CD8 381AC006 0 30 CACH 1009 LEA R0 TCQ,TCQCHARS(1)(R0) R0 -> first char we need to move 04CD9 E4178805 0 6 BASE 1010 ST R0 SP,ELFIRSTPOS save location in input buffer 1011 * \ / 1012 1013 * R5 = number of chars we want to echo, R0 -> start of chars to echo 00004CDA 1014 TCQCONT LABEL 04CDA 5C0928C2 4 ZBM 1015 CMZ TCB,TCCRDELAY is it delayable? 04CDB FE024CDE 1016 JEQ NOCRDELAY if not then don't bother 04CDC 6084000D 2 IMM 1017 LD R2 CR scan for this delayable character 04CDD DC404D33 1018 CALLNP SCAN4DLY is it in the buffer? 00004CDE 1019 NOCRDELAY LABEL 04CDE 5C0900C3 4 ZBM 1020 CMZ TCB,TCLFDELAY is it delayable? 04CDF FE024CE2 1021 JEQ NOLFDELAY if not then don't bother 04CE0 6084000A 2 IMM 1022 LD R2 LF is this a delayable character? 04CE1 DC404D33 1023 CALLNP SCAN4DLY is it in the buffer? 00004CE2 1024 NOLFDELAY LABEL 04CE2 5C0918C3 4 ZBM 1025 CMZ TCB,TCFFDELAY is it delayable? 04CE3 FE024CE6 1026 JEQ NOFFDELAY if not then don't bother 04CE4 6084000C 2 IMM 1027 LD R2 FF is this a delayable character? 04CE5 DC404D33 1028 CALLNP SCAN4DLY is it in the buffer? 00004CE6 1029 NOFFDELAY LABEL 04CE6 5C0900C8 4 ZBM 1030 CMZ TCB,TCHTDELAY is it delayable? 04CE7 FE024CEA 1031 JEQ NOHTDELAY if not then don't bother 04CE8 60840009 2 IMM 1032 LD R2 HT is this a delayable character? 04CE9 DC404D33 1033 CALLNP SCAN4DLY is it in the buffer? 00004CEA 1034 NOHTDELAY LABEL 04CEA 60891076 2 4 ZBM 1035 LD R2 TCB,TCLKILLC look for the line kill character 04CEB DC404D33 1036 CALLNP SCAN4DLY is it in the buffer? 1037 * \ / 1038 04CEC E0D78804 3 6 BASE 1039 EXCH TCQ SP,ELTCQ get pointer to output TCQ 04CED DC404D41 1040 CALLNP FILLTCQ set up to move stuff into output TCQ 04CEE 60178805 0 6 BASE 1041 LD R0 SP,ELFIRSTPOS point to our source of characters 04CEF FE400000 1042 CMOVE 04CF0 99578802 5 6 BASE 1043 ADDM R5 SP,ELCHARS update count of chars output 04CF1 E4178805 0 6 BASE 1044 ST R0 SP,ELFIRSTPOS save location in input buffer 04CF2 5C178801 6 BASE 1045 CMZ SP,ELROOT first time here? 04CF3 FE0C4CF5 1046 JNE HAVEROOT if not then we already saved the root 04CF4 E4D78801 3 6 BASE 1047 ST TCQ SP,ELROOT save the root block of TCQ chain 1048 * \ / 1049 00004CF5 1050 HAVEROOT LABEL 04CF5 6016C004 0 3 CACH 1051 LD R0 TCQ,TCQLAST check the last character 04CF6 609AC005 2 30 CACH 1052 LD R2 TCQ,TCQCHARS(R0) pick up the last character 04CF7 5C3449DB 2 @ 1053 CMZ @DELAYCHS(R2) is this a delayable character? 04CF8 FE024CFC 1054 JEQ MAYBELK maybe it is the line kill character 04CF9 D056C004 3 CACH 1055 DEC TCQ,TCQLAST remove last char from the list 04CFA DC404994 1056 CALLNP OUTTERMCH place the char in the queue element 04CFB FE0E4D01 1057 JMP ITSINX 1058 * --- 1059 00004CFC 1060 MAYBELK LABEL 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1032 (CIAINUTIL) F 50 Input utility routines for the CIA 04CFC 60128000 0 2 REG 1061 LD R0 R2 copy the character 04CFD 7804007F 0 IMM 1062 AND R0 07F only want to check 7 bits worth 04CFE 64091076 0 4 ZBM 1063 CPR R0 TCB,TCLKILLC is it the line kill character? 04CFF FE0C4D02 1064 JNE ITSIN 04D00 DC404D1D 1065 CALLNP PROCLKILL process the line kill 00004D01 1066 ITSINX LABEL 04D01 98178802 0 6 BASE 1067 ADDM R0 SP,ELCHARS add in the command burden 1068 * \ / 1069 00004D02 1070 ITSIN LABEL 04D02 E0D78804 3 6 BASE 1071 EXCH TCQ SP,ELTCQ switch TCQs (TCQ -> input) 04D03 B1578806 5 6 BASE 1072 RSBM R5 SP,ELTCQCNT count of chars in this TCQ 04D04 FE024D08 1073 JEQ TCQDONE jump if done with this TCQ 1074 * \ / 1075 04D05 60178805 0 6 BASE 1076 LD R0 SP,ELFIRSTPOS point to our source of characters 04D06 61578806 5 6 BASE 1077 LD R5 SP,ELTCQCNT how much is left in this TCQ 04D07 FE0E4CDA 1078 JMP TCQCONT continue with this TCQ 1079 * --- 1080 00004D08 1081 TCQDONE LABEL 04D08 F7C04D0B 7 1082 JBT R7/ELSTOPT DONTSTOP don't stop for terminator 04D09 64C91F1E 3 4 ZBM 1083 CPR TCQ TCB,TCTERMTCQ contain a terminator? 04D0A FE024D0C 1084 JEQ ELLINKIN if so then we are done 00004D0B 1085 DONTSTOP LABEL 04D0B FAF64CCD 3 1086 LJNA TCQ ELNEXTTCQ continue on our way 1087 * \ / 1088 1089 * SP, ELROOT => beginning, SP,ELTCQ => end, SP,ELCHARS = count 1090 * of characters echoed. Now link it in. 00004D0C 1091 ELLINKIN LABEL 04D0C 61538000 5 6 REG 1092 LD R5 SP remember my frame address 04D0D DC004A3B 1093 CALL LINKTCQLST link into the terminal list 04D0E 41574802 5 BASE 1094 PARV R5,ELCHARS the characters going in 04D0F 41174C01 5 FPVR 1095 PAR @(R5,ELROOT) the first element 04D10 40174C04 5 FPVR 1096 PARL @(R5,ELTCQ) pointer to last TCQ in output chain 00004D11 1097 ELLIDX LABEL 04D11 F3C04D14 7 1098 JBF R7/ELSTOPT ELLEAVE return if stopping for terminators 1099 PUNLOCK TCB,TCLOCK unlock the lists 04D12 EC170818 4 BASE 1099 STZ TCB,TCLOCK 04D13 0C800000 1099 ION 00004D14 1100 ELLEAVE LABEL 04D14 61578803 5 6 BASE 1101 LD R5 SP,ELSAVER5 restore this register 04D15 5D1F8007 6 STAK 1102 LEAVE POP return 1103 * --- 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1033 (CIAINUTIL) F 50 Input utility routines for the CIA 1105 1106 ********************************************************************************** 1107 * * 1108 * Routine that causes all characters in the input queue to * 1109 * be echoed. The TCB cannot be locked when this is called and * 1110 * the TCB is returned unlocked. * 1111 * Call: * 1112 * LD R4 =>TCB * 1113 * CALLNP ECHOALL * 1114 * * 1115 * See ECHOLINE for stack usage. * 1116 * * 1117 ********************************************************************************** 1118 04D16 DD5F8007 6 STAK 1119 ECHOALL ENTRNP PUSH 04D17 EDCBC010 7 CBM 1120 STW R7/ELSTOPT set flag saying to do all 1121 PLOCK TCB,TCLOCK lock access to the list 04D18 0CC00000 1121 IOFF 04D19 D1D70818 4 BASE 1121 SETT TCB,TCLOCK 04D1A FE0C4D1C 1121 JNE MA(2+DISPW MA 0) 04D1B DC40308B 1121 CALLNP LOCKWAIT 04D1C FE0E4CC8 1122 JMP ELSHARE share the rest of the code 1123 * --- 1124 1125 END ECHOLINE and ECHOALL subroutines 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1034 (CIAINUTIL) F 50 Input utility routines for the CIA 1127 1128 ********************************************************************************** 1129 * * 1130 * A line kill character is being entered. If the * 1131 * character is not a terminator then the character processor * 1132 * will probably accept it as the line kill character so if it * 1133 * passes that test, we here output the line kill response. * 1134 * Call: * 1135 * R0 = line kill character masked to 7 bits * 1136 * R2 = line kill character * 1137 * TCQ -> TCQ * 1138 * TCB -> TCB * 1139 * CALLNP PROCLKILL * 1140 * R0 = char count + command burden * 1141 * TCQ -> TCQ (May have linked on numerous TCQs.) * 1142 * * 1143 * Eats R0:R2. * 1144 * Stack required = 7 * 1145 * 2 + max ( GETTERMPTR (1), OUTTERMCH (5) ) * 1146 * * 1147 ********************************************************************************** 1148 1149 BLOCK PROCLKILL subroutine 1150 ENTRY PROCLKILL 1151 1152 BEGFRAME 00178801 6 BASE 1153 CHARCOUNT BSS 1 1154 ENDFRAME 1155 04D1D DD5F8002 6 STAK 1156 PROCLKILL ENTRNP PUSH 04D1E EC178801 6 BASE 1157 STZ SP,CHARCOUNT 04D1F FA024D31 0 1158 JEQZ R0 SKIPECHO null characters indicate nothing specified 04D20 6404007F 0 IMM 1159 CPR R0 DEL check for a delete, it's non-printing 04D21 FE024D24 1160 JEQ NONPRINT jump if it is 04D22 64040020 0 IMM 1161 CPR R0 " " check to see if printing 04D23 FE064D31 1162 JGE SKIPECHO skip echoing response if printing lkill 00004D24 1163 NONPRINT LABEL 04D24 DC404C8B 1164 CALLNP GETTERMPTR get the terminating character array 04D25 5C1A5400 12 @R 1165 CMZ @R1(R2) see if this character is a terminator 04D26 FE0C4D31 1166 JNE SKIPECHO skip echo if terminator 04D27 6084005C 2 IMM 1167 LD R2 "\" get the line kill echo character 04D28 DC404994 1168 CALLNP OUTTERMCH put into the output buffer 04D29 98178801 0 6 BASE 1169 ADDM R0 SP,CHARCOUNT keep track of chars put in 04D2A 6084000D 2 IMM 1170 LD R2 CR get a CR 04D2B DC404994 1171 CALLNP OUTTERMCH put into the output buffer 04D2C 98178801 0 6 BASE 1172 ADDM R0 SP,CHARCOUNT keep track of chars put in 04D2D 6084000A 2 IMM 1173 LD R2 LF get a LF 04D2E DC404994 1174 CALLNP OUTTERMCH put into the output buffer 04D2F 18040003 0 IMM 1175 ADD R0 3 account for the characters we put in 04D30 98178801 0 6 BASE 1176 ADDM R0 SP,CHARCOUNT keep track of chars put in 00004D31 1177 SKIPECHO LABEL 04D31 60178801 0 6 BASE 1178 LD R0 SP,CHARCOUNT return count 04D32 5D1F8002 6 STAK 1179 LEAVE POP 1180 * --- 1181 1182 END of PROCLKILL 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1035 (CIAINUTIL) F 50 Input utility routines for the CIA 1184 1185 ********************************************************************************** 1186 * * 1187 * SCAN4DLY is used to scan a buffer for a delayable * 1188 * character. * 1189 * Call: * 1190 * R0 -> start of buffer * 1191 * R2 = character looking for * 1192 * R5 = how far to search * 1193 * CALLNP SCAN4DLY * 1194 * R5 = count of chars through character * 1195 * * 1196 * Eats R1:R2. * 1197 * Stack required = 2 * 1198 * * 1199 ********************************************************************************** 1200 1201 1202 BLOCK SCAN4DLY subroutine 1203 1204 ENTRY SCAN4DLY 1205 1206 BEGFRAME 00178801 6 BASE 1207 SCAN4R0 BSS 1 temp for R0 1208 ENDFRAME 1209 04D33 DD5F8002 6 STAK 1210 SCAN4DLY ENTRNP PUSH 04D34 E4178801 0 6 BASE 1211 ST R0 SP,SCAN4R0 save this register 04D35 60534000 1 5 REG 1212 LD R1 R5 get count 04D36 FE560000 1213 CSRCH look for the character 04D37 FE024D3D 1214 JEQ FOUNDIT jump if found 1215 * \ / not found, now try with the high bit on 04D38 60178801 0 6 BASE 1216 LD R0 SP,SCAN4R0 restore this register 04D39 60534000 1 5 REG 1217 LD R1 R5 get count 04D3A EDCAB010 2 CBM 1218 STW R2/BIT 24 turn on the high bit 04D3B FE560000 1219 CSRCH look for the character 04D3C FE0C4D3F 1220 JNE DONENOW jump if not found 00004D3D 1221 FOUNDIT LABEL 04D3D 11524000 5 1 REG 1222 SUB R5 R1 R5 = number of chars up to character 04D3E 19440001 5 IMM 1223 ADD R5 1 make it point past the found character 00004D3F 1224 DONENOW LABEL 04D3F 60178801 0 6 BASE 1225 LD R0 SP,SCAN4R0 restore this register 04D40 5D1F8002 6 STAK 1226 LEAVE POP 1227 * --- 1228 1229 END of SCAN4DLY 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1036 (CIAINUTIL) F 50 Input utility routines for the CIA 1231 1232 ********************************************************************************** 1233 * * 1234 * FILLTCQ * 1235 * * 1236 * FILLTCQ sets up a TCQ to be filled for output and linked * 1237 * onto the TCB for the terminal. * 1238 * * 1239 * R5 equals the MIN(length of record, free space in output * 1240 * queue, chars before any delaying char). We will set up a TCQ * 1241 * to put this number of characters into the existing TCQ, or * 1242 * create a new TCQ that will hold this number of characters. * 1243 * The TCQ that is set up for use might not hold as many * 1244 * characters as requested by the caller if we are topping off * 1245 * an existing TCQ. * 1246 * Call: * 1247 * LD R5 * 1248 * TCQ -> output TCQ or 0 if none * 1249 * CALLNP FILLTCQ * 1250 * R1 = number of characters that can go in this TCQ * 1251 * R2 -> where to move chars to * 1252 * TCQ -> current TCQ (end of list) * 1253 * R5 = number of chars to move * 1254 * * 1255 * Eats R0:R2, sets R3, R5. * 1256 * Stack required = 1 * 1257 * 1 + max ( SGETMEM(0)) * 1258 * * 1259 ********************************************************************************** 1260 1261 BLOCK FILLTCQ subroutine 1262 1263 ENTRY FILLTCQ 1264 1265 BEGFRAME 1266 ENDFRAME 1267 04D41 DD5F8001 6 STAK 1268 FILLTCQ ENTRNP PUSH 1269 * try to wedge chars into an existing block 04D42 FAF04D45 3 1270 JZA TCQ ADDNEW jump if no current block 04D43 5C08DC10 3 ZBM 1271 CMZ TCQ,TCQCOMND is this TCQ a command element? 04D44 FE024D53 1272 JEQ TRYWEDGE if not then try to wedge in more chars 00004D45 1273 ADDNEW LABEL 04D45 5C575005 5 REG 1274 HIB R5+TCQUSED-1 poor mans log base 2 04D46 70920000 2 0 REG 1275 LDN R2 R0 04D47 1884001E 2 IMM 1276 ADD R2 WORDLNTH-(CPW LOG 2) R2=log size of block to hold chars 04D48 DC002ED0 1277 CALL SGETMEM get a block 04D49 40528000 2 REG 1278 PARVL R2 of the indicated size 04D4A EE160800 0 BASE 1279 STZ2 R0,0 remove any garbage 04D4B E4881060 2 0 ZBM 1280 ST R2 R0,TCQLOG remember log size 04D4C 60641F06 1 2 1281 LD R1 TCQSIZES(R2) get number of chars possible in block 04D4D E4560005 1 0 CACH 1282 ST R1 R0,TCQSIZE and save for TCQ users 04D4E FAF04D50 3 1283 JZA TCQ GOTFIRST jump if no blocks currently in list 1284 1285 * Link the element into the list. 04D4F E408DF10 0 3 ZBM 1286 ST R0 TCQ,TCQLINK link new one onto the end 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1037 (CIAINUTIL) F 50 Input utility routines for the CIA 00004D50 1287 GOTFIRST LABEL 04D50 60D20000 3 0 REG 1288 LD TCQ R0 TCQ=>last element in the list 04D51 3896C006 2 3 CACH 1289 LEA R2 TCQ,TCQCHARS(1) place to put the first character 04D52 FE0E4D59 1290 JMP ITWILLFITX jump to put characters in 1291 * --- 1292 1293 * This block is not a command, so try to wedge as many 1294 * characters as possible into it 00004D53 1295 TRYWEDGE LABEL 04D53 6096C004 2 3 CACH 1296 LD R2 TCQ,TCQLAST get index to last char position 04D54 60528000 1 2 REG 1297 LD R1 R2 copy the index 04D55 3056C005 1 3 CACH 1298 RSB R1 TCQ,TCQSIZE R1:=char spaces left in block 04D56 FA424D45 1 1299 JEQZ R1 ADDNEW jump if no room available 04D57 51524000 5 1 REG 1300 MIN R5 R1 04D58 389AD006 2 32 CACH 1301 LEA R2 TCQ,TCQCHARS(R2)(1) R2 => place to put characters 1302 * \ / 1303 00004D59 1304 ITWILLFITX LABEL 04D59 60534000 1 5 REG 1305 LD R1 R5 R5 = number of characters to move 04D5A 9956C004 5 3 CACH 1306 ADDM R5 TCQ,TCQLAST account for the chars to be placed 04D5B 5D1F8001 6 STAK 1307 LEAVE POP 1308 * --- 1309 1310 END of FILLTCQ 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1038 (CIAINUTIL) F 50 Input utility routines for the CIA 1312 1313 ********************************************************************************** 1314 * * 1315 * INPUTERR * 1316 * * 1317 * When an input error occurs we build an error element and * 1318 * link it into the chain of input TCQs. The error element is a * 1319 * TCQ with the command bit set and the parameter is the error * 1320 * code. * 1321 * * 1322 * Note: We do not place the element if the last element in the * 1323 * existing input queue is also an error element. This is to * 1324 * prevent multitudes of errors (for example, framing error) * 1325 * from eating up free memory with error elements. One error * 1326 * should be enough anyway! * 1327 * * 1328 * Call: * 1329 * TCB -> TCB (unlocked) * 1330 * CALL INPUTERR * 1331 * PARVL error code * 1332 * * 1333 * Eats R0:R1 * 1334 * Stack Required = 3 * 1335 * 2 + max ( LOCKWAIT (0), MAKECEL (1), SFREEMEM (0) ) * 1336 * * 1337 ********************************************************************************** 1338 1339 BLOCK INPUTERR subroutine 1340 1341 ENTRY INPUTERR 1342 1343 BEGFRAME 00178801 6 BASE 1344 TEMP BSS 1 1345 ENDFRAME 1346 04D5C DD1F8002 6 STAK 1347 INPUTERR ENTR PUSH 04D5D C0578801 6 BASE 1348 STPVL SP,TEMP save the error code 04D5E E0978801 2 6 BASE 1349 EXCH R2 SP,TEMP save R2 and pick up the error code 04D5F DC004A1C 1350 CALL MAKECEL build and element 04D60 41440091 IMM 1351 PARV PORTIERR the command code 04D61 40528000 2 REG 1352 PARVL R2 the parameter 1353 1354 PLOCK TCB,TCLOCK lock the TCB 04D62 0CC00000 1354 IOFF 04D63 D1D70818 4 BASE 1354 SETT TCB,TCLOCK 04D64 FE0C4D66 1354 JNE MA(2+DISPW MA 0) 04D65 DC40308B 1354 CALLNP LOCKWAIT 04D66 6009011C 0 4 ZBM 1355 LD R0 TCB,TCTTIEP get pointer to end of input TCQs 04D67 FA324D6A 0 1356 JNZA R0 NOTFIRST jump if some elements already exist 04D68 E489231C 2 4 ZBM 1357 ST R2 TCB,TCTTIBP make us the beginning 04D69 FE0E4D70 1358 JMP JOININ merge back 1359 * --- 1360 1361 * Input queue not empty. Check for duplicate error elements. 00004D6A 1362 NOTFIRST LABEL 04D6A 5C081C10 0 ZBM 1363 CMZ R0,TCQCOMND last element a command? 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1039 (CIAINUTIL) F 50 Input utility routines for the CIA 04D6B FE024D6F 1364 JEQ SETIT jump if not 04D6C 60480081 1 0 ZBM 1365 LD R1 R0,TCQCCODE get command code 04D6D 64440091 1 IMM 1366 CPR R1 PORTIERR last element an input error? 04D6E FE024D75 1367 JEQ DUMPIT jump if so 00004D6F 1368 SETIT LABEL 04D6F E4881F10 2 0 ZBM 1369 ST R2 R0,TCQLINK link the new element on 1370 * \ / 1371 00004D70 1372 JOININ LABEL 04D70 E489011C 2 4 ZBM 1373 ST R2 TCB,TCTTIEP we are now the last in the chain 1374 PUNLOCK TCB,TCLOCK 04D71 EC170818 4 BASE 1374 STZ TCB,TCLOCK 04D72 0C800000 1374 ION 00004D73 1375 IEDONE LABEL 04D73 60978801 2 6 BASE 1376 LD R2 SP,TEMP restore R2 04D74 5D1F8002 6 STAK 1377 LEAVE POP return 1378 * --- 1379 1380 * dump would-be duplicate (addressed by R2) 00004D75 1381 DUMPIT LABEL 1382 PUNLOCK TCB,TCLOCK 04D75 EC170818 4 BASE 1382 STZ TCB,TCLOCK 04D76 0C800000 1382 ION 04D77 DC002F5D 1383 CALL SFREEMEM hand back the memory 04D78 41489060 2 ZBM 1384 PARV R2,TCQLOG log size 04D79 40528000 2 REG 1385 PARVL R2 address 04D7A FE0E4D73 1386 JMP IEDONE leave 1387 * --- 1388 1389 END of INPUTERR subroutine 1390 1391 END CIAINUTIL Comm Utility Routines 86 INPUT LPDRIVER line printer driver 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1040 (LPDRIVER) F 51 Line Printer Driver 3 4 ********************************************************************************** 5 * * 6 * This is the line printer driver. The story behind the * 7 * line printer is as follows: * 8 * * 9 * Each line printer controller (LPC) supports exactly * 10 * one line printer. This is described by an LPC element. * 11 * * 12 * When a line printer is opened, EQUIP allocates a * 13 * line printer buffer block (LPB), which can buffer up to * 14 * seven lines. A write will put a line into the buffer * 15 * (waiting if it will not fit), and will start an I/O * 16 * operation to the printer if it is not already going. * 17 * An interrupt from the printer will cause us to start * 18 * writing the next line, if any. Also, if only two lines * 19 * remain to be written, we will awaken the writer (if he * 20 * is sleeping). After the line printer is closed and all * 21 * lines are written out, we will free the line printer * 22 * buffer block. * 23 * * 24 ********************************************************************************** 25 26 BLOCK Line Printer Driver 27 28 ENTRY LPCINT LP Interrupt Routine 29 ENTRY LPCSTART Start LP (when something is put into buf) 30 ENTRY LPCRESET Reset LP (when timeout occurs) 31 32 33 * Trace Events Generated 34 00000001 ABS 35 LPTINTRPT EQU 1 Interrupt, R0=PageMap, R1=LpcStatus, R2=PpuStatus 00000002 ABS 36 LPTSTART EQU 2 Start, R0=PageMap, R1=LpcStatus, R2=PpuStatus 00000003 ABS 37 LPTRESET EQU 3 Reset, R0=PageMap, R1=LpcStatus 00000004 ABS 38 LPTENVVFU EQU 4 Enable VVFU, R0=PageMap 00000005 ABS 39 LPTLDVVFU EQU 5 Load VVFU, R0=PageMap 00000006 ABS 40 LPTDSVVFU EQU 6 Disable VVFU, R0=PageMap 00000007 ABS 41 LPTWRLINE EQU 7 Write, R0=PageMap 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1041 (LPDRIVER) F 51 Line Printer Driver 43 44 ********************************************************************************** 45 * * 46 * Line Printer Interrupt Routine. Entered with: * 47 * R2 = PPU status, R3 => LPC element, CIX is mapped to device. * 48 * * 49 * Exit to DISPATCH. * 50 * Stack required = 10 * 51 * 0 + max ( LOCKWAIT (0), PROCESSINT (10), TRACEPROC (3) ) * 52 * * 53 ********************************************************************************** 54 55 BLOCK LPCINT routine 56 ENTRY LPCINT 57 00004D7B 58 LPCINT LABEL 59 PLOCK (LPC,LPCELOCK) lock the controller 04D7B 0CC00000 59 IOFF 04D7C D1D6C805 3 BASE 59 SETT (LPC,LPCELOCK) 04D7D FE0C4D7F 59 JNE MA(2+DISPW MA 0) 04D7E DC40308B 59 CALLNP LOCKWAIT 04D7F 5C08D417 3 ZBM 60 CMZ LPC,LPCDEAD check for controller dead 04D80 FE0C4D86 61 JNE RETURN jump if controller dead 04D81 60401802 1 62 LD R1 CIX(PPUCHANS1) get LPC interrupting status 04D82 6016C801 0 3 BASE 63 LD R0 LPC,LPCPMVALUE for trace 64 TRACE LPTRACE,LPTINTRPT interrupt: R0=PageMap, R1=LpcStat, R2=PpuStat 04D83 5D401D31 64 XCT TRACECALL(LPTRACE) 04D84 FEC000A1 64 NOP (LPTRACE*BITS 22:26)+(LPTINTRPT*BITS 27:31) 65 04D85 DC404DC2 66 CALLNP PROCESSINT process the interrupt 67 00004D86 68 RETURN LABEL 69 PUNLOCK (LPC,LPCELOCK) unlock the controller 04D86 EC16C805 3 BASE 69 STZ (LPC,LPCELOCK) 04D87 0C800000 69 ION 04D88 60C40086 3 IMM 70 LD PFPTR PNCIX 04D89 80D2C000 3 REG 71 PFRC PFPTR unmap the controller 04D8A FE0E28B7 72 JMP DISPATCH and all done 73 * --- 74 75 END LPCINT routine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1042 (LPDRIVER) F 51 Line Printer Driver 77 78 ********************************************************************************** 79 * * 80 * LPCSTART. This subroutine will attempt to start * 81 * a line printer write operation, if possible. It * 82 * should be called after putting a new line into * 83 * the line printer buffer. * 84 * * 85 * PLOCK LPCELOCK * 86 * LD LPC => LPC element * 87 * CALLNP LPCSTART * 88 * Eats R0-R2, R4. * 89 * Stack required = 11 * 90 * 1 + max ( PROCESSINT (10), TRACEPROC (3) ) * 91 * * 92 ********************************************************************************** 93 94 BLOCK LPCSTART subroutine 95 ENTRY LPCSTART 96 97 BEGFRAME 98 ENDFRAME 99 04D8B DD5F8001 6 STAK 100 LPCSTART ENTRNP PUSH 04D8C 5C08C217 3 ZBM 101 CMZ LPC,LPCBUSY is LP busy with write? 04D8D FE0C4DA7 102 JNE RETURN if so, can't bother it now 04D8E 5C08D417 3 ZBM 103 CMZ LPC,LPCDEAD check for controller dead 04D8F FE0C4DA7 104 JNE RETURN jump if controller dead 105 04D90 6012C000 0 3 REG 106 LD R0 LPC save register (same as PFPTR) 04D91 60C40086 3 IMM 107 LD PFPTR PNCIX 04D92 00D60801 0 BASE 108 LDPF R0,LPCPMVALUE map in the controller 04D93 60D20000 3 0 REG 109 LD LPC R0 restore register 04D94 5C001800 110 CMZ CIX(PPUCABLED) check for response 04D95 FE0C4D99 111 JNE ALIVE jump if it looks good 112 SETTBIT LPC,LPCDEAD otherwise, indicate dead 04D96 60020040 0 IMM 112 LD R0 1*BIT(((LPC,LPCDEAD) DISP (LPC,0))/BITS 0:4) 04D97 FC16C807 0 3 BASE 112 IORM R0 LPC,(((LPC,LPCDEAD) DISP (LPC,0))/BITS 15:31) 04D98 FE0E4DA3 113 JMP UNMAP and exit 114 * --- 115 00004D99 116 ALIVE LABEL 04D99 EC001A00 117 STZ CIX(LPNOP) disable LPC interrupts 118 04D9A 60801801 2 119 LD R2 CIX(PPUINTSTAT) get current PPU status 04D9B F2A84DA3 2 120 JBF R2/PPUICIA UNMAP jump if another CPU just got interrupt 04D9C 60401802 1 121 LD R1 CIX(PPUCHANS1) get LPC interrupting status 04D9D F6784D9F 1 122 JBT R1/PPUIINTC HAVEINT jump if interrupt was pending 04D9E 60401A20 1 123 LD R1 CIX(LPSTATUS) else get current LPC status 00004D9F 124 HAVEINT LABEL 125 04D9F 6016C801 0 3 BASE 126 LD R0 LPC,LPCPMVALUE for trace 127 TRACE LPTRACE,LPTSTART start LP, R0=PageMap, R1=LpcStat, R2=PpuStat 04DA0 5D401D31 127 XCT TRACECALL(LPTRACE) 04DA1 FEC000A2 127 NOP (LPTRACE*BITS 22:26)+(LPTSTART*BITS 27:31) 128 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1043 (LPDRIVER) F 51 Line Printer Driver 04DA2 DC404DC2 129 CALLNP PROCESSINT process as interrupt 130 * \ / 131 00004DA3 132 UNMAP LABEL 04DA3 6012C000 0 3 REG 133 LD R0 LPC save register 04DA4 60C40086 3 IMM 134 LD PFPTR PNCIX 04DA5 80D2C000 3 REG 135 PFRC PFPTR unmap the controller 04DA6 60D20000 3 0 REG 136 LD LPC R0 restore register 137 * \ / 138 00004DA7 139 RETURN LABEL 04DA7 5D1F8001 6 STAK 140 LEAVE POP all done 141 * --- 142 143 END LPCSTART subroutine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1044 (LPDRIVER) F 51 Line Printer Driver 145 146 ********************************************************************************** 147 * * 148 * LPCRESET. Reset the controller after timeout. * 149 * * 150 * Call: CIX mapped to device * 151 * PLOCK LPCELOCK * 152 * LD R5 => LPC element * 153 * LD R0 0 if LPC not talking, 1 if ok * 154 * CALLNP LPCRESET * 155 * * 156 * * 157 * Eats R0-R4. * 158 * Stack required = 11 * 159 * 1 + max ( PROCESSINT (10), TRACEPROC (3) ) * 160 * * 161 ********************************************************************************** 162 163 BLOCK LPCRESET subroutine 164 ENTRY LPCRESET 165 166 BEGFRAME 167 ENDFRAME 168 04DA8 DD5F8001 6 STAK 169 LPCRESET ENTRNP PUSH 04DA9 60D34000 3 5 REG 170 LD LPC R5 get LPC pointer 04DAA FA024DB9 0 171 JEQZ R0 DEAD jump if not talking 172 CLRTBIT LPC,LPCDEAD save LPC is alive 04DAB 60020040 0 IMM 172 LD R0 1*BIT(((LPC,LPCDEAD) DISP (LPC,0))/BITS 0:4) 04DAC A816C807 0 3 BASE 172 BRSBM R0 LPC,(((LPC,LPCDEAD) DISP (LPC,0))/BITS 15:31) 04DAD 60401A20 1 173 LD R1 CIX(LPSTATUS) get current status 04DAE F66E4DB0 1 174 JBT R1/LPSTBUFRDY DORESET jump if ready for another line 04DAF F2644DBB 1 175 JBF R1/LPSTREADY WAKEUP just return if printer is offline 176 * \ / 177 00004DB0 178 DORESET LABEL 04DB0 6016C801 0 3 BASE 179 LD R0 LPC,LPCPMVALUE for trace 180 TRACE LPTRACE,LPTRESET Reset: R0=PageMap, R1=LpcStatus 04DB1 5D401D31 180 XCT TRACECALL(LPTRACE) 04DB2 FEC000A3 180 NOP (LPTRACE*BITS 22:26)+(LPTRESET*BITS 27:31) 04DB3 7C440013 1 IMM 181 IOR R1 1*LPSTBADWRT+1*LPSTIVFU+1*LPSTIRDY set misc status bits 182 04DB4 DC404DC2 183 CALLNP PROCESSINT process as interrupt 184 04DB5 5C08C217 3 ZBM 185 CMZ LPC,LPCBUSY is LP now busy? 04DB6 FE024DBB 186 JEQ WAKEUP jump if not 04DB7 61D7D001 7 7 REG 187 LD R7 R7+1 else skip return: log timeout error 04DB8 FE0E4DBB 188 JMP WAKEUP go to shake it up 189 * --- 190 00004DB9 191 DEAD LABEL 192 SETTBIT LPC,LPCDEAD indicate morbid controller 04DB9 60020040 0 IMM 192 LD R0 1*BIT(((LPC,LPCDEAD) DISP (LPC,0))/BITS 0:4) 04DBA FC16C807 0 3 BASE 192 IORM R0 LPC,(((LPC,LPCDEAD) DISP (LPC,0))/BITS 15:31) 193 * \ / 00004DBB 194 WAKEUP LABEL 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1045 (LPDRIVER) F 51 Line Printer Driver 195 CLRTBIT LPC,LPCWAITING check for process waiting 04DBB 60022000 0 IMM 195 LD R0 1*BIT(((LPC,LPCWAITING) DISP (LPC,0))/BITS 0:4) 04DBC A816C807 0 3 BASE 195 BRSBM R0 LPC,(((LPC,LPCWAITING) DISP (LPC,0))/BITS 15:31) 04DBD FE024DC1 196 JEQ RETURN if none, just return 04DBE DC00354F 197 CALL DQUEONE otherwise dequeue him 04DBF 41001DAC 198 PAR SQDIOWAIT indicate which queue 04DC0 4052C000 3 REG 199 PARVL LPC and what parameter 200 * \ / 201 00004DC1 202 RETURN LABEL 04DC1 5D1F8001 6 STAK 203 LEAVE POP all done 204 * --- 205 206 END LPCRESET subroutine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1046 (LPDRIVER) F 51 Line Printer Driver 208 209 ********************************************************************************** 210 * * 211 * PROCESSINT. Process an LP Interrupt. * 212 * This routine is called at LP interrupt time, LP startup * 213 * time, and LP reset time. It will handle the following, * 214 * as needed: * 215 * - error logging. * 216 * - VVFU loading. * 217 * - Complaints about LP not ready. * 218 * - writing lines. * 219 * - rousting processes that are waiting. * 220 * * 221 * Call: * 222 * PLOCK LPCELOCK * 223 * LD LPC => LPC element * 224 * LD R1 LPC status * 225 * CIX mapped to controller * 226 * LPC interrupts disabled * 227 * CALLNP PROCESSINT * 228 * * 229 * Eats R0-R2,R4. * 230 * Stack required = 10. * 231 * 2 + max ( CHECKSTAT (8), DQUEONE (4), ERRORLOG (3), * 232 * LPCWRITE (1), REALADDR (2), SFREEMEM (0), * 233 * TRACEPROC (3) ) * 234 * * 235 ********************************************************************************** 236 237 BLOCK PROCESSINT subroutine 238 ENTRY PROCESSINT 239 240 BEGFRAME 00178801 6 BASE 241 SAVER5 BSS 1 save area for R5 242 ENDFRAME 243 04DC2 DD5F8002 6 STAK 244 PROCESSINT ENTRNP PUSH 245 CLRTBIT LPC,LPCTIMEOUT clear timeout flag 04DC3 60030000 0 IMM 245 LD R0 1*BIT(((LPC,LPCTIMEOUT) DISP (LPC,0))/BITS 0:4) 04DC4 A816C807 0 3 BASE 245 BRSBM R0 LPC,(((LPC,LPCTIMEOUT) DISP (LPC,0))/BITS 15:31) 04DC5 E5578801 5 6 BASE 246 ST R5 SP,SAVER5 save this register 04DC6 61524000 5 1 REG 247 LD R5 R1 R5 = LP status 248 04DC7 5C0B4840 5 CBM 249 CMZ R5/LPSTERROR has error occurred? 04DC8 FE024DCF 250 JEQ NOERROR jump if not 04DC9 6112C000 4 3 REG 251 LD R4 LPC save this register 04DCA DC005048 252 CALL ERRORLOG and log the error 04DCB 41440A23 IMM 253 PARV ERLCLPERR line printer error 04DCC 41570804 4 BASE 254 PARV R4,LPCNAME name of line printer 04DCD 40534000 5 REG 255 PARVL R5 line printer status 04DCE 60D30000 3 4 REG 256 LD LPC R4 restore register 00004DCF 257 NOERROR LABEL 258 04DCF F37C4DDF 5 259 JBF R5/LPSTIVFU AFTLDVVFU jump if NOT just finished loading VVFU 260 * \ / 261 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1047 (LPDRIVER) F 51 Line Printer Driver 262 * A load VVFU operation just completed. If it was successful, 263 * enable the VVFU. Otherwise, change our state to show that 264 * the VVFU should not be enabled. 265 266 * \ / 267 CLRTBIT LPC,LPCLDVVFU say load VVFU not in progress 04DD0 60020100 0 IMM 267 LD R0 1*BIT(((LPC,LPCLDVVFU) DISP (LPC,0))/BITS 0:4) 04DD1 A816C807 0 3 BASE 267 BRSBM R0 LPC,(((LPC,LPCLDVVFU) DISP (LPC,0))/BITS 15:31) 04DD2 FE024DDF 268 JEQ AFTLDVVFU jump if we weren't doing one (strange) 269 CLRTBIT LPC,LPCBUSY say no longer busy 04DD3 60028000 0 IMM 269 LD R0 1*BIT(((LPC,LPCBUSY) DISP (LPC,0))/BITS 0:4) 04DD4 A816C807 0 3 BASE 269 BRSBM R0 LPC,(((LPC,LPCBUSY) DISP (LPC,0))/BITS 15:31) 04DD5 F7764DDD 5 270 JBT R5/LPSTBADWRT LDVVFUBAD jump if load didn't work 04DD6 60020040 0 IMM 271 LD R0 1*LPSTVFU bit to enable VFU 04DD7 E4001A02 0 272 ST R0 CIX(LPSETCTL) turn it on 04DD8 7D520000 5 0 REG 273 IOR R5 R0 update our copy of LPC status 04DD9 6016C801 0 3 BASE 274 LD R0 LPC,LPCPMVALUE for trace 275 TRACE LPTRACE,LPTENVVFU enable VVFU, R0=PageMap 04DDA 5D401D31 275 XCT TRACECALL(LPTRACE) 04DDB FEC000A4 275 NOP (LPTRACE*BITS 22:26)+(LPTENVVFU*BITS 27:31) 04DDC FE0E4DDF 276 JMP AFTLDVVFU 277 * --- 278 00004DDD 279 LDVVFUBAD LABEL 280 CLRTBIT LPC,LPCVVFUON say VVFU can not be enabled 04DDD 60020080 0 IMM 280 LD R0 1*BIT(((LPC,LPCVVFUON) DISP (LPC,0))/BITS 0:4) 04DDE A816C807 0 3 BASE 280 BRSBM R0 LPC,(((LPC,LPCVVFUON) DISP (LPC,0))/BITS 15:31) 281 * \ / 282 00004DDF 283 AFTLDVVFU LABEL 04DDF 6116C806 4 3 BASE 284 LD R4 LPC,LPCBUFPTR R4 -> line printer buffer 04DE0 DC004E34 285 CALL CHECKSTAT check online/offline status 04DE1 40534000 5 REG 286 PARVL R5 new status 04DE2 FB304E15 4 287 JZA R4 ENABLELPC jump if no buffer (ergo no activity) 288 04DE3 F36E4E15 5 289 JBF R5/LPSTBUFRDY ENABLELPC jump if buffer not ready (can't start write) 290 CLRTBIT LPC,LPCBUSY clear busy, were we busy? 04DE4 60028000 0 IMM 290 LD R0 1*BIT(((LPC,LPCBUSY) DISP (LPC,0))/BITS 0:4) 04DE5 A816C807 0 3 BASE 290 BRSBM R0 LPC,(((LPC,LPCBUSY) DISP (LPC,0))/BITS 15:31) 04DE6 FE024DED 291 JEQ NOLINEDONE jump if we weren't busy 04DE7 F7764DED 5 292 JBT R5/LPSTBADWRT NOLINEDONE jump if last write didn't work 293 * \ / 294 295 * We have just successfully completed writing a line. 296 * Remove it from our buffer. 297 298 * \ / 04DE8 D0570801 4 BASE 299 DEC R4,LPBLINECNT one fewer line in the buffer 04DE9 BC170802 0 4 BASE 300 INCL R0 R4,LPBFIRSTLN increment index for next to do 04DEA 64040007 0 IMM 301 CPR R0 LPBMAXCNT did we wrap around? 04DEB FE084DED 302 JLT NOWRAP jump if not 04DEC EC170802 4 BASE 303 STZ R4,LPBFIRSTLN else set index to beginning 00004DED 304 NOWRAP LABEL 00004DED 305 NOLINEDONE LABEL 306 * \ / 307 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1048 (LPDRIVER) F 51 Line Printer Driver 308 * Verify that the LPC's idea of the state of the VVFU 309 * is the same as ours. If not, correct it. 310 311 * \ / 04DED 5C08D217 3 ZBM 312 CMZ LPC,LPCVVFUON should the VVFU be on? 04DEE FE024DFF 313 JEQ VVFUOFF jump if it should be off 04DEF F7544E05 5 314 JBT R5/LPSTVFU VVFUOK jump if it is on 315 * \ / 316 * The VVFU needs to be enabled. First we must load it. 317 * \ / 04DF0 6016C801 0 3 BASE 318 LD R0 LPC,LPCPMVALUE for trace 319 TRACE LPTRACE,LPTLDVVFU load VVFU: R0=PageMap 04DF1 5D401D31 319 XCT TRACECALL(LPTRACE) 04DF2 FEC000A5 319 NOP (LPTRACE*BITS 22:26)+(LPTLDVVFU*BITS 27:31) 04DF3 60040001 0 IMM 320 LD R0 1*PPUIDMAD 04DF4 E4001802 0 321 ST R0 CIX(PPUSSSTAT) set DMA direction to output 04DF5 DC004E49 322 CALL REALADDR get real address ... 04DF6 4016C80A 3 BASE 323 PARL LPC,LPCVVFUDAT ... for VVFU data buffer 04DF7 E4001805 0 324 ST R0 CIX(PPUADDR1) tell the PPU about it 04DF8 6016C809 0 3 BASE 325 LD R0 LPC,LPCVVFULNS get line count 04DF9 604A0200 1 0 CBM 326 LD R1 R0/BITS 1:0 double for byte count 04DFA E4401804 1 327 ST R1 CIX(PPUCNT1) tell PPU about byte count 04DFB E4001A8C 0 328 ST R0 CIX(LPINT+LPLOADVFU) start the load VVFU operation 04DFC 60028100 0 IMM 329 LD R0 1*BIT(LPCBUSY DISPB LPCFLAGS)+1*BIT(LPCLDVVFU DISPB LPCFLAGS) 04DFD FC16C807 0 3 BASE 330 IORM R0 LPC,LPCFLAGS set busy and loading VVFU flags 04DFE FE0E4E16 331 JMP LPNOWBUSY and exit 332 * --- 333 00004DFF 334 VVFUOFF LABEL VVFU should be disabled 04DFF F3544E05 5 335 JBF R5/LPSTVFU VVFUOK jump if VVFU is disabled 04E00 6016C801 0 3 BASE 336 LD R0 LPC,LPCPMVALUE for trace 337 TRACE LPTRACE,LPTDSVVFU disable VVFU: R0=PageMap 04E01 5D401D31 337 XCT TRACECALL(LPTRACE) 04E02 FEC000A6 337 NOP (LPTRACE*BITS 22:26)+(LPTDSVVFU*BITS 27:31) 04E03 60020040 0 IMM 338 LD R0 1*LPSTVFU 04E04 E4001A01 0 339 ST R0 CIX(LPCLRCTL) clear the VVFU bit 340 * \ / 00004E05 341 VVFUOK LABEL VVFU is now properly set 342 04E05 5C170801 4 BASE 343 CMZ R4,LPBLINECNT is there a line to write? 04E06 FE024E0E 344 JEQ NOLINE jump if not 04E07 6016C801 0 3 BASE 345 LD R0 LPC,LPCPMVALUE for trace 346 TRACE LPTRACE,LPTWRLINE starting write: R0=PageMap 04E08 5D401D31 346 XCT TRACECALL(LPTRACE) 04E09 FEC000A7 346 NOP (LPTRACE*BITS 22:26)+(LPTWRLINE*BITS 27:31) 04E0A DC404E24 347 CALLNP LPCWRITE do the write 348 SETTBIT LPC,LPCBUSY say it is now busy 04E0B 60028000 0 IMM 348 LD R0 1*BIT(((LPC,LPCBUSY) DISP (LPC,0))/BITS 0:4) 04E0C FC16C807 0 3 BASE 348 IORM R0 LPC,(((LPC,LPCBUSY) DISP (LPC,0))/BITS 15:31) 04E0D FE0E4E16 349 JMP LPNOWBUSY 350 * --- 351 00004E0E 352 NOLINE LABEL no line to write 04E0E 5C08C417 3 ZBM 353 CMZ LPC,LPCOPEN is the LP still open? 04E0F FE0C4E15 354 JNE ENABLELPC jump if so, just idle 355 * \ / 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1049 (LPDRIVER) F 51 Line Printer Driver 356 357 * There are no lines left to output and the line printer 358 * is no longer open. Here we destroy the LP buffer block. 359 360 * \ / 04E10 DC002F5D 361 CALL SFREEMEM free the block 04E11 41440008 IMM 362 PARV LPBLOG log size 04E12 40530000 4 REG 363 PARVL R4 address 04E13 61040000 4 IMM 364 LD R4 0 block no longer exists 04E14 EC16C806 3 BASE 365 STZ LPC,LPCBUFPTR ditto 366 * \ / 367 00004E15 368 ENABLELPC LABEL 04E15 EC001A80 369 STZ CIX(LPINT+LPNOP) enable interrupt from LPC 370 00004E16 371 LPNOWBUSY LABEL 372 * \ / 373 374 * Now see if we can wake up a waiting process 375 * \ / 376 04E16 FB304E20 4 377 JZA R4 NOWAITER if no buffer then no waiter 04E17 60170801 0 4 BASE 378 LD R0 R4,LPBLINECNT number of lines in buffer 04E18 64040002 0 IMM 379 CPR R0 2 two or less? 04E19 FE044E20 380 JGT NOWAITER if not, don't awaken yet 381 CLRTBIT LPC,LPCWAITING is someone waiting? 04E1A 60022000 0 IMM 381 LD R0 1*BIT(((LPC,LPCWAITING) DISP (LPC,0))/BITS 0:4) 04E1B A816C807 0 3 BASE 381 BRSBM R0 LPC,(((LPC,LPCWAITING) DISP (LPC,0))/BITS 15:31) 04E1C FE024E20 382 JEQ NOWAITER jump if not 04E1D DC00354F 383 CALL DQUEONE else awaken him 04E1E 41001DAC 384 PAR SQDIOWAIT queue number 04E1F 4052C000 3 REG 385 PARVL LPC wait parameter 00004E20 386 NOWAITER LABEL 387 04E20 60040800 0 IMM 388 LD R0 1*PPUICIA 04E21 E4001802 0 389 ST R0 CIX(PPUSSSTAT) allow LPC to cause PPU interrupts 390 04E22 61578801 5 6 BASE 391 LD R5 SP,SAVER5 restore this register 04E23 5D1F8002 6 STAK 392 LEAVE POP and all done 393 * --- 394 395 END PROCESSINT subroutine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1050 (LPDRIVER) F 51 Line Printer Driver 397 398 ********************************************************************************** 399 * * 400 * LPCWRITE. Write another line to the line printer. * 401 * Call: LD R4 LP buffer block pointer * 402 * CIX mapped to controller * 403 * CALLNP LPCWRITE * 404 * Eats R0-R2. * 405 * Stack required: 1. * 406 * * 407 ********************************************************************************** 408 409 BLOCK LPCWRITE subroutine 410 ENTRY LPCWRITE 411 412 BEGFRAME 413 ENDFRAME 414 04E24 DD5F8001 6 STAK 415 LPCWRITE ENTRNP PUSH 04E25 60040001 0 IMM 416 LD R0 1*PPUIDMAD 04E26 E4001802 0 417 ST R0 CIX(PPUSSSTAT) set DMA to output 04E27 60970802 2 4 BASE 418 LD R2 R4,LPBFIRSTLN get index to first line 04E28 1C840024 2 IMM 419 MUL R2 LPBLINESZ by size of line 04E29 389D1004 2 42 BASE 420 LEA R2 R4,LPBLINES(R2) R2 -> entry for line to write 04E2A 38168801 0 2 BASE 421 LEA R0 R2,1 R0 -> first character of line 04E2B 600A2CA0 0 0 CBM 422 LD R0 R0/DISPFIELD R0 = page displacement part of addr 04E2C 7C170800 0 4 BASE 423 IOR R0 R4,LPBPHYSADR R0 = physical address of line 04E2D E4001805 0 424 ST R0 CIX(PPUADDR1) save it 04E2E 6008B080 0 2 ZBM 425 LD R0 R2,0/LPWRLNTH get byte count 04E2F 7C048000 0 IMM 426 IOR R0 1*PPUCLAST this is only one 04E30 E4001804 0 427 ST R0 CIX(PPUCNT1) ship it to PPU 04E31 60168800 0 2 BASE 428 LD R0 R2,0 get command for LP 04E32 E4001AC0 0 429 ST R0 CIX(LPWRITE+LPINT) start write, request interrupt 04E33 5D1F8001 6 STAK 430 LEAVE POP and that's all 431 * --- 432 433 END LPCWRITE subroutine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1051 (LPDRIVER) F 51 Line Printer Driver 435 436 ********************************************************************************** 437 * * 438 * CHECKSTAT. Check LP status for online and possibly complain if not. * 439 * * 440 * LPC => LPC element * 441 * CALL CHECKSTAT * 442 * PARVL new LP status * 443 * * 444 * Eats R0-R2,R4. * 445 * Stack required: 8. * 446 * 3 + max ( CANOPMSG (1), DEVNOTRDY (5) ) * 447 * * 448 ********************************************************************************** 449 450 BLOCK CHECKSTAT subroutine 451 ENTRY CHECKSTAT 452 453 BEGFRAME 00178801 6 BASE 454 SAVER3R4 BSS 2 save area for these registers 455 ENDFRAME 456 04E34 DD1F8003 6 STAK 457 CHECKSTAT ENTR PUSH 04E35 C0520000 0 REG 458 STPVL R0 R0 = LP status 04E36 F6244E43 0 459 JBT R0/LPSTREADY ONLINE jump if online 04E37 6016C806 0 3 BASE 460 LD R0 LPC,LPCBUFPTR get pointer to buffer block 04E38 FA304E48 0 461 JZA R0 RETURN jump if no buffer block - nothing pending 04E39 5C160801 0 BASE 462 CMZ R0,LPBLINECNT are any lines of output pending? 04E3A FE024E48 463 JEQ RETURN if not, no complaint is needed 04E3B 5C16C803 3 BASE 464 CMZ LPC,LPCMSGID2 have we already complained? 04E3C FE0C4E48 465 JNE RETURN if so, don't do it again 04E3D E6D78801 346 BASE 466 ST2 R3 SP,SAVER3R4 save registers 04E3E DC004FBE 467 CALL DEVNOTRDY generate device not ready message 04E3F 4056C804 3 BASE 468 PARVL LPC,LPCNAME 04E40 62D78801 346 BASE 469 LD2 R3 SP,SAVER3R4 restore registers 04E41 E416C803 0 3 BASE 470 ST R0 LPC,LPCMSGID2 save message id of complaint 04E42 FE0E4E48 471 JMP RETURN and all done 472 * --- 473 00004E43 474 ONLINE LABEL 04E43 5C16C803 3 BASE 475 CMZ LPC,LPCMSGID2 is a complaint outstanding? 04E44 FE024E48 476 JEQ RETURN if not, no action 04E45 DC004713 477 CALL CANOPMSG else cancel the complaint 04E46 4056C803 3 BASE 478 PARVL LPC,LPCMSGID2 04E47 EC16C803 3 BASE 479 STZ LPC,LPCMSGID2 say no complaints now 480 * \ / 481 00004E48 482 RETURN LABEL 04E48 5D1F8003 6 STAK 483 LEAVE POP return, all done 484 * --- 485 486 END CHECKSTAT subroutine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1052 (LPDRIVER) F 51 Line Printer Driver 488 489 ********************************************************************************** 490 * * 491 * REALADDR - Convert virtual address to real address. * 492 * * 493 * CALL REALADDR * 494 * PARL virtual address * 495 * ST R0 real address (PPU format) * 496 * * 497 * Eats R0-R1. * 498 * Stack required = 2. * 499 * * 500 ********************************************************************************** 501 502 BLOCK REALADDR subroutine 503 ENTRY REALADDR 504 505 BEGFRAME 00178801 6 BASE 506 SAVER3 BSS 1 save area for this register 507 ENDFRAME 508 04E49 DD1F8002 6 STAK 509 REALADDR ENTR PUSH 04E4A C0124000 1 REG 510 STPL R1 R1 = virtual address 04E4B E4D78801 3 6 BASE 511 ST R3 SP,SAVER3 save this register 04E4C 60CA5C80 3 1 CBM 512 LD PFPTR R1/PAGEFIELD get virtual page number 04E4D 7CC40080 3 IMM 513 IOR PFPTR MONPF make it in monitor 04E4E 80920000 0 REG 514 PFRD R0 set R0 = page map value 04E4F 60CA28C0 3 0 CBM 515 LD R3 R0/PFPAGENUM R3 = page number 04E50 E4CA14C0 3 0 CBM 516 ST R3 R0/FLDABSPG put it into absolute address place 04E51 E44A2CA0 1 0 CBM 517 ST R1 R0/DISPFIELD save displacement 04E52 60D78801 3 6 BASE 518 LD R3 SP,SAVER3 restore this register 04E53 5D1F8002 6 STAK 519 LEAVE POP and all done 520 * --- 521 522 END REALADDR subroutine 523 524 525 END Line Printer Driver 87 INPUT IAPRINT associated process interrupt processor 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1053 (IAPRINT) F 52 Associated Processor Interrupt Processing 3 4 ********************************************************************************** 5 * * 6 * This routine handles interrupts that another processor * 7 * can force upon this processor. This interrupt is only used * 8 * to signal the end of a quantum. Note that a stack pointer * 9 * is not setup since no subroutine calls are made. * 10 * * 11 ********************************************************************************** 12 13 BLOCK OTHERTALK routine 14 ENTRY OTHERTALK process IAPR 15 16 * R4 => previous console area 00004E54 17 OTHERTALK LABEL 04E54 60400412 1 18 LD R1 CPPSA pointer to current process 04E55 FA7028B7 1 19 JZA R1 DISPATCH if none, then already shutdown 20 PLOCK R1,PSLOCK lock for access to PSUERROR word 04E56 0CC00000 20 IOFF 04E57 D1D6480C 1 BASE 20 SETT R1,PSLOCK 04E58 FE0C4E5A 20 JNE MA(2+DISPW MA 0) 04E59 DC40308B 20 CALLNP LOCKWAIT 04E5A EDC85A1D 1 ZBM 21 STW R1,PSUERROR/RTSWITCHB set switch bit in PSA 22 PUNLOCK R1,PSLOCK release lock 04E5B EC16480C 1 BASE 22 STZ R1,PSLOCK 04E5C 0C800000 22 ION 04E5D FE0E28B7 23 JMP DISPATCH go directly to dispatch, do not collect $200 24 * --- 25 26 END OTHERTALK routine 88 INPUT DEADMAN I/O deadman timer 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1054 (DEADMAN) F 53 Deadman Timer 3 4 BLOCK Dead Man Timer Routines 5 ENTRY DEADMAN check all devices 6 ENTRY DEVNOTRDY complain about device not ready 7 8 ********************************************************************************** 9 * * 10 * Dead Man Timer Routines * 11 * * 12 * This block contains the dead man timer and associated * 13 * routines. DEADMAN is called via a timer interrupt once every 10 * 14 * seconds, and checks to see that everything is still alive. * 15 * * 16 * If the timer dies we don't get here. The code to restart * 17 * the time interrupts is to be found in the dispatcher. * 18 * * 19 * DEVNOTRDY is a utility routine that can be called from * 20 * device drivers to generate a message to the operator saying * 21 * that a device is not ready. It is included in this file for * 22 * want of a better place. * 23 * * 24 ********************************************************************************** 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1055 (DEADMAN) F 53 Deadman Timer 26 27 ********************************************************************************** 28 * * 29 * DEADMAN. I/O deadman timer. * 30 * Since dead men say nothing (as well as no tales) we must * 31 * periodically wander over and kick the bodies in the system to * 32 * make sure that they're still animate. Every device control * 33 * block has a bit in it that this routine will set if the device * 34 * is busy and that the driver will clear when it gets an * 35 * interrupt from the device. If this routine discovers that the * 36 * bit is set and that the device is still busy, then the device * 37 * has taken over 10 seconds to respond so this routine willl * 38 * invoke recovery for that device. * 39 * This routine is called every 10 seconds so it may take up * 40 * to 20 seconds to notice that a device is dead, but it is not * 41 * supposed to happen often. * 42 * This routine does not attempt to restart the SSU because: * 43 * 1) if it is not working, how did we get here? and 2) the call * 44 * to timeset at the beginning of this could cause problems. * 45 * * 46 * Call: * 47 * LD SP => stack top * 48 * IOFF * 49 * CALLNP DEADMAN * 50 * * 51 * Eats R0:R5. * 52 * Stack required = 16 * 53 * 3 + max ( CHECKDISK (10), CHECKCIA (13), CHECKLP (12), * 54 * CHECKMTC (10), LOGPPUBAD ( 5), LOGPPUGOOD( 4), * 55 * SMUCHECK ( 5), TIMESET ( 2) ) * 56 * * 57 ********************************************************************************** 58 59 BLOCK DEADMAN subroutine 60 ENTRY DEADMAN 61 62 BEGFRAME 00178004 6 CACH 63 DEADMSLOT BSSC 1 slot being examined 00178005 6 CACH 64 DEADMCHAN BSSC 1 channel being examined 00178006 6 CACH 65 DEADMPPUT BSSC 1 non-zero if PPU talking 00178802 6 BASE 66 DEADMR7 BSS 1 R7 save 67 ENDFRAME 68 04E5E DD5F8003 6 STAK 69 DEADMAN ENTRNP PUSH 04E5F E5D78802 7 6 BASE 70 ST R7 SP,DEADMR7 save R7 04E60 DC0044F8 71 CALL TIMESET set up for our next interrupt 04E61 43442710 IMM 72 PARV2 10*MSECSS indicate interval 04E62 41440000 IMM 73 PARV 0 don't care which CPU 04E63 41004E5E 74 PAR DEADMAN come back here 04E64 40440000 IMM 75 PARVL 0 parameter unused 04E65 E5001EF3 4 76 ST TMR DEADMANTMR save the serial number of element 77 * \ / ... for use during power fail recovery 78 79 ********************************************************************************** 80 * The SMUs keep a log of errors on the board. We want to * 81 * occasionally check this log and report any errors in the system * 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1056 (DEADMAN) F 53 Deadman Timer 82 * error log. Since reading this log is a rather slow activity we * 83 * choose to do it once a minute or every sixth time through * 84 * DEADMAN. For this purpose we keep a counter which is initially * 85 * set to 6 and is decremented each time through here. When it * 86 * reaches 0 we read all SMU error logs, record any errors, and * 87 * reset the counter. * 88 ********************************************************************************** 89 90 * \ / 04E66 D0401EFF 91 DEC SMUCHKCNT one more time though DEADMAN 04E67 FE044E6B 92 JGT DOSLOTS if more than zero then not time to check SMUs 04E68 DC404EAA 93 CALLNP SMUCHECK check the SMU error logs 04E69 60040006 0 IMM 94 LD R0 SMUCHKINTV pick up initial counter value 04E6A E4001EFF 0 95 ST R0 SMUCHKCNT reset counter 96 * \ / 97 00004E6B 98 DOSLOTS LABEL 04E6B 6104000F 4 IMM 99 LD R4 NUMSLOTS-1 do each slot on VRA bus 00004E6C 100 NEXTDSLOT LABEL 04E6C 61E81ECE 7 4 101 LD R7 SLOTTABLE(R4) get a slot descriptor 04E6D 600BC030 0 7 CBM 102 LD R0 R7/SLOTTYPE get type of device here 04E6E E5178004 4 6 CACH 103 ST R4 SP,DEADMSLOT save slot looking at 04E6F 5CA04E70 0 104 LDPC DEADCHECK(R0) do the checking 105 * --- 106 00004E70 107 DEADCHECK LABEL 04E70 00004E79 108 ADR NOCHECK 0 - empty slot 04E71 00004E79 109 ADR NOCHECK 1 - MCU, can't interrupt 04E72 00004E79 110 ADR NOCHECK 2 - CPU, shouldn't interrupt 04E73 00004E7C 111 ADR CHECKPPU 3 - PPU 04E74 00004E79 112 ADR NOCHECK 4 - SSU, check is futile 04E75 00004E79 113 ADR NOCHECK 5 - undefined type 04E76 00004E79 114 ADR NOCHECK 6 - undefined type 04E77 00004E79 115 ADR NOCHECK 7 - undefined type 116 117 * Done with the checking of this slot 00004E78 118 DONECHECK LABEL 04E78 61178004 4 6 CACH 119 LD R4 SP,DEADMSLOT restore the slot index 00004E79 120 NOCHECK LABEL 04E79 FB264E6C 4 121 JDR R4 NEXTDSLOT count on to the next slot 122 * \ / 04E7A 61D78802 7 6 BASE 123 LD R7 SP,DEADMR7 restore R7 04E7B 5D1F8003 6 STAK 124 LEAVE POP done checking, return 125 * --- 126 127 * A PPU. Check each of the devices here. 00004E7C 128 CHECKPPU LABEL 04E7C 79C5FFFF 7 IMM 129 AND R7 ONEBITS/SLOTPTR R7 => PPU control block 04E7D EDD78006 6 CACH 130 STW SP,DEADMPPUT indicate PPU talking 04E7E 60828000 2 IMM 131 LD R2 BUSCWRU+0 get a WRU command 04E7F 6049C840 1 7 ZBM 132 LD R1 R7,PPUPF/PFSLOT get the PPU slot number 04E80 0C128000 2 REG 133 LDFB R2 find out if PPU answering 04E81 FE164E84 134 JOS PPUZAPPED jump if abnormal data 04E82 FE104E86 135 JCC PPUTALKING jump if response received okay 04E83 EC178006 6 CACH 136 STZ SP,DEADMPPUT indicate no response 00004E84 137 PPUZAPPED LABEL 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1057 (DEADMAN) F 53 Deadman Timer 04E84 DC404F13 138 CALLNP LOGPPUBAD log that PPU is bad if needed 04E85 FE0E4E87 139 JMP LOOKCHANS 140 * --- 141 00004E86 142 PPUTALKING LABEL 04E86 DC404F43 143 CALLNP LOGPPUGOOD log that PPU is ok if needed 144 * \ / 145 00004E87 146 LOOKCHANS LABEL 04E87 61040003 4 IMM 147 LD R4 PPUCHANS-1 check each channel on PPU 00004E88 148 NEXTCHAN LABEL 04E88 615DE004 5 74 BASE 149 LD R5 R7,PPUCNTLPTR(R4) get the device control block 04E89 FB424E97 5 150 JEQZ R5 NODEV jump off if no device 151 * \ / 152 04E8A 608B0C00 2 4 CBM 153 LD R2 R4*PPUCHAN position the real channel number 04E8B 7C97C800 2 7 BASE 154 IOR R2 R7,PPUPF make composite page map value 04E8C 60C40086 3 IMM 155 LD PFPTR PNCIX get the I/O window number 04E8D 00D28000 2 REG 156 LDPF R2 and load up the page file 04E8E 600B4080 0 5 CBM 157 LD R0 R5/DEVTYPE see what type device on this channel 04E8F 5004000F 0 IMM 158 MIN R0 0F catch invalid types 04E90 7945FFFF 5 IMM 159 AND R5 ONEBITS/DEVPTR mask off pointer 04E91 60204E99 0 0 160 LD R0 CHECKDEV(R0) get address of appropriate routine 04E92 FA304E97 0 161 JZA R0 NODEV jump if unknown type 162 * \ / 163 04E93 60578006 1 6 CACH 164 LD R1 SP,DEADMPPUT flag whether PPU is talking 04E94 E5178005 4 6 CACH 165 ST R4 SP,DEADMCHAN save the channel index 04E95 DC560400 0 @R 166 CALLNP @R0 call the routine 167 * \ / 168 04E96 61178005 4 6 CACH 169 LD R4 SP,DEADMCHAN restore the channel index 00004E97 170 NODEV LABEL 04E97 FB264E88 4 171 JDR R4 NEXTCHAN continue on with next channel 04E98 FE0E4E78 172 JMP DONECHECK done with all PPU channels 173 * --- 174 175 ********************************************************************************** 176 * * 177 * Routine called with: * 178 * R1 = 1 if PPU is talking, 0 if not * 179 * R2 = page map value * 180 * R5 => control block * 181 * SP = stack pointer * 182 * * 183 * Routines may mangle R0:R4. * 184 * * 185 ********************************************************************************** 186 00004E99 187 CHECKDEV LABEL 04E99 00000000 188 VFD 0 00 - not used 04E9A 00004EC8 189 ADR CHECKDISK 01 - mass storage controller 04E9B 00004EDD 190 ADR CHECKLP 02 - line printer controller 04E9C 00000000 191 VFD 0 03 - not used 04E9D 00000000 192 VFD 0 04 - not used 04E9E 00000000 193 VFD 0 05 - not used 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1058 (DEADMAN) F 53 Deadman Timer 04E9F 00000000 194 VFD 0 06 - not used 04EA0 00000000 195 VFD 0 07 - not used 04EA1 00004EB9 196 ADR CHECKCIA 08 - async comm. controller 04EA2 00004EF3 197 ADR CHECKMTC 09 - magnetic tape controller 04EA3 00004EF3 198 ADR CHECKMTC 0A - cartridge tape controller 04EA4 00004EF3 199 ADR CHECKMTC 0B - video tape controller 04EA5 00004EC8 200 ADR CHECKDISK 0C - mass storage controller (SDC) 04EA6 00000000 201 VFD 0 0D - not used 04EA7 00000000 202 VFD 0 0E - not used 04EA8 00000000 203 VFD 0 0F - not used 204 205 END DEADMAN subroutine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1059 (DEADMAN) F 53 Deadman Timer 207 208 ********************************************************************************** 209 * * 210 * SMUCHECK -- Read the SMU Error Log * 211 * * 212 * Once a minute we come here to read the error logs on * 213 * any SMUs on the system. SMULIST is scanned and for each * 214 * entry a bus command is sent to the SMU to fetch the most * 215 * recent error log entry. If there is an error we log it, * 216 * otherwise we continue on our merry way. Note that we only * 217 * attempt a single read. This is to prevent a major problem * 218 * from flooding the error log. * 219 * Call: * 220 * IOFF * 221 * CALLNP SMUCHECK * 222 * * 223 * Eats R0:R4. * 224 * Stack required = 5. * 225 * 2 + max (ERRORLOG (3) ) * 226 * * 227 ********************************************************************************** 228 229 BLOCK SMUCHECK subroutine 230 ENTRY SMUCHECK 231 232 BEGFRAME 00178801 6 BASE 233 SAVER3 BSS 1 you guess 234 ENDFRAME 235 04EA9 22020000 236 ERRLOGCMND VFD BUSCREAD+SMUPCRCEL*SMUPCC+1*SMUPCMND bus command to read 04EA9 22020000 237 SMU current error log 238 04EAA DD5F8002 6 STAK 239 SMUCHECK ENTRNP PUSH 04EAB 60C01EFE 3 240 LD R3 SMULIST R3 -> list of SMUs 04EAC FAF04EB8 3 241 JZA R3 NOSMUS if nothing to read 242 * \ / 243 00004EAD 244 SMULOOP LABEL 04EAD 6048C040 1 3 ZBM 245 LD R1 R3,SMUSLOT pick up the slot number 04EAE 0C004EA9 246 LDFB ERRLOGCMND request the error log information 04EAF FA024EB7 0 247 JEQZ R0 NOERROR no error if all zero 04EB0 61120000 4 0 REG 248 LD R4 R0 move to safe register for parameter passing 04EB1 E4D78801 3 6 BASE 249 ST R3 SP,SAVER3 keep safe from subroutine 04EB2 DC005048 250 CALL ERRORLOG log the error 04EB3 41440A35 IMM 251 PARV ERLCSMU a SMU error 04EB4 4148C040 3 ZBM 252 PARV R3,SMUSLOT SMU slot number 04EB5 40530000 4 REG 253 PARVL R4 the error information 04EB6 60D78801 3 6 BASE 254 LD R3 SP,SAVER3 restore pointer to list 255 * \ / 256 00004EB7 257 NOERROR LABEL 04EB7 FAF64EAD 3 258 LJNA R3 SMULOOP keep on going 259 * \ / 00004EB8 260 NOSMUS LABEL 04EB8 5D1F8002 6 STAK 261 LEAVE POP 262 * --- 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1060 (DEADMAN) F 53 Deadman Timer 263 264 END of SMUCHECK subroutine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1061 (DEADMAN) F 53 Deadman Timer 266 267 ********************************************************************************** 268 * * 269 * CHECKCIA - Check comm controller for signs of life. * 270 * * 271 * R5 => CIA control block * 272 * CIX => device * 273 * R1 = 0 if PPU not talking * 274 * CALLNP CHECKCIA * 275 * * 276 * Eats R0:R4. * 277 * Stack required = 13. * 278 * 1 + max ( CHECKTALK (9), CIA_RESET (12), ERRORLOG (3) ) * 279 * * 280 ********************************************************************************** 281 282 BLOCK CHECKCIA subroutine 283 ENTRY CHECKCIA 284 285 BEGFRAME 286 ENDFRAME 287 04EB9 DD5F8001 6 STAK 288 CHECKCIA ENTRNP PUSH 289 SETTBIT R5,COMTIMEOUT the CIA is always busy, so save check 04EBA 60028000 0 IMM 289 LD R0 1*BIT(((R5,COMTIMEOUT) DISP (R5,0))/BITS 0:4) 04EBB FC174805 0 5 BASE 289 IORM R0 R5,(((R5,COMTIMEOUT) DISP (R5,0))/BITS 15:31) 04EBC FE0C4EC7 290 JNE RETURN if it was off, device is running 04EBD DC004F4F 291 CALL CHECKTALK see if comm is alive 04EBE 4147FFFF IMM 292 PARV ONEBITS mask for WRU response 04EBF 41574801 5 BASE 293 PARV R5,COMWRU expected value for WRU response 04EC0 40174803 5 BASE 294 PARL R5,COMOPMSGID place for id of operator message 04EC1 FA024EC6 0 295 JEQZ R0 NOCOMTALK jump if comm is dead 04EC2 DC005048 296 CALL ERRORLOG log the timed out error 04EC3 4144060F IMM 297 PARV ERLCCIATO error code 04EC4 40574802 5 BASE 298 PARVL R5,COMPF PF of the device 04EC5 60040001 0 IMM 299 LD R0 1 say PPU is talking 300 * \ / 00004EC6 301 NOCOMTALK LABEL 04EC6 DC40494C 302 CALLNP CIA_RESET restart comm (if comm silent, flushes buffers) 303 * \ / 00004EC7 304 RETURN LABEL 04EC7 5D1F8001 6 STAK 305 LEAVE POP 306 * --- 307 308 END CHECKCIA subroutine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1062 (DEADMAN) F 53 Deadman Timer 310 311 ********************************************************************************** 312 * * 313 * CHECKDISK - Check a disk controller. * 314 * * 315 * R5 => MCT element * 316 * CIX => device * 317 * R1 = 0 if PPU not talking * 318 * CALLNP CHECKDISK * 319 * * 320 * Eats R0:R4 * 321 * Stack required = 10 * 322 * 1 + max ( CHECKTALK (9), ERRORLOG (3), LOCKWAIT (0), * 323 * MS_RESET (6) ) * 324 * * 325 ********************************************************************************** 326 327 BLOCK CHECKDISK subroutine 328 ENTRY CHECKDISK 329 330 BEGFRAME 331 ENDFRAME 332 04EC8 DD5F8001 6 STAK 333 CHECKDISK ENTRNP PUSH 334 PLOCK (R5,MCTELOCK) lock the controller 04EC9 0CC00000 334 IOFF 04ECA D1D74803 5 BASE 334 SETT (R5,MCTELOCK) 04ECB FE0C4ECD 334 JNE MA(2+DISPW MA 0) 04ECC DC40308B 334 CALLNP LOCKWAIT 335 SETTBIT R5,MCTTIMEOUT check the timeout flag 04ECD 60021000 0 IMM 335 LD R0 1*BIT(((R5,MCTTIMEOUT) DISP (R5,0))/BITS 0:4) 04ECE FC174804 0 5 BASE 335 IORM R0 R5,(((R5,MCTTIMEOUT) DISP (R5,0))/BITS 15:31) 04ECF FE0C4EDA 336 JNE RETURN jump if it's been busy recently 337 04ED0 DC004F4F 338 CALL CHECKTALK see if DISK is talking today 04ED1 4140395D 339 PARV DISKWRUMASK mask for WRU response 04ED2 4140395E 340 PARV DISKWRUVAL value for WRU response after masking 04ED3 40174802 5 BASE 341 PARL R5,MCTOPMSGID place for message id 04ED4 DC4039A9 342 CALLNP MS_RESET start the controller 04ED5 FE0E4EDA 343 JMP RETURN jump if no error logging needed 344 * \ / 345 346 * R4 = unit plug number of a lazy disk 04ED6 DC005048 347 CALL ERRORLOG log the somnambulant disk 04ED7 41440A10 IMM 348 PARV ERLCDSKTO error type 04ED8 41574801 5 BASE 349 PARV R5,MCTPMVALUE page file of controller 04ED9 40530000 4 REG 350 PARVL R4 unit number 351 * \ / 352 00004EDA 353 RETURN LABEL 354 PUNLOCK (R5,MCTELOCK) unlock the controller 04EDA EC174803 5 BASE 354 STZ (R5,MCTELOCK) 04EDB 0C800000 354 ION 04EDC 5D1F8001 6 STAK 355 LEAVE POP 356 * --- 357 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1063 (DEADMAN) F 53 Deadman Timer 358 END CHECKDISK subroutine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1064 (DEADMAN) F 53 Deadman Timer 360 361 ********************************************************************************** 362 * * 363 * CHECKLP - Check line printer controller for signs of life. * 364 * * 365 * R5 => LPC block * 366 * CIX => device * 367 * R1 = 0 if PPU not talking * 368 * CALLNP CHECKLP * 369 * * 370 * Eats R0:R4. * 371 * Stack required = 12 * 372 * 1 + max ( CHECKTALK (9), ERRORLOG (3), LOCKWAIT (0), * 373 * LPCRESET (11) ) * 374 * * 375 ********************************************************************************** 376 377 BLOCK CHECKLP subroutine 378 ENTRY CHECKLP 379 380 BEGFRAME 381 ENDFRAME 382 04EDD DD5F8001 6 STAK 383 CHECKLP ENTRNP PUSH 384 PLOCK (R5,LPCELOCK) lock the region 04EDE 0CC00000 384 IOFF 04EDF D1D74805 5 BASE 384 SETT (R5,LPCELOCK) 04EE0 FE0C4EE2 384 JNE MA(2+DISPW MA 0) 04EE1 DC40308B 384 CALLNP LOCKWAIT 385 SETTBIT R5,LPCTIMEOUT check on the time out bit 04EE2 60030000 0 IMM 385 LD R0 1*BIT(((R5,LPCTIMEOUT) DISP (R5,0))/BITS 0:4) 04EE3 FC174807 0 5 BASE 385 IORM R0 R5,(((R5,LPCTIMEOUT) DISP (R5,0))/BITS 15:31) 04EE4 FE0C4EEE 386 JNE RETURN if it was not previously set, done 387 04EE5 DC004F4F 388 CALL CHECKTALK see if LPC is talking 04EE6 41404EF1 389 PARV LPCWRUMASK mask for WRU response 04EE7 41404EF2 390 PARV LPCWRUVAL value for WRU response, after masking 04EE8 40174802 5 BASE 391 PARL R5,LPCMSGID1 place for id of msg to operator 04EE9 DC404DA8 392 CALLNP LPCRESET try to revive device 04EEA FE0E4EEE 393 JMP NOLPTO jump if intervention required, no answer 04EEB DC005048 394 CALL ERRORLOG call to log the restart 04EEC 41440625 IMM 395 PARV ERLCLPTO indicate line printer time out 04EED 40574804 5 BASE 396 PARVL R5,LPCNAME indicate which one 00004EEE 397 NOLPTO LABEL 398 * \ / 399 00004EEE 400 RETURN LABEL 401 PUNLOCK (R5,LPCELOCK) release the critical region 04EEE EC174805 5 BASE 401 STZ (R5,LPCELOCK) 04EEF 0C800000 401 ION 04EF0 5D1F8001 6 STAK 402 LEAVE POP 403 * --- 404 04EF1 FF000000 405 LPCWRUMASK VFD ONEBITS/DWRUTYPE*DWRUTYPE 04EF2 02000000 406 LPCWRUVAL VFD DVCTLPC*DWRUTYPE 407 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1065 (DEADMAN) F 53 Deadman Timer 408 END CHECKLP subroutine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1066 (DEADMAN) F 53 Deadman Timer 410 411 ********************************************************************************** 412 * * 413 * CHECKMTC - Check magnetic tape for signs of life. * 414 * * 415 * R5 => MTC control block * 416 * CIX => device * 417 * R1 = 0 if PPU not talking * 418 * CALLNP CHECKMTC * 419 * * 420 * Eats R0:R4. * 421 * Stack required = 10. * 422 * 1 + max ( CHECKTALK (9), ERRORLOG (3), LOCKWAIT (0), * 423 * MT_RESET (7) ) * 424 * * 425 ********************************************************************************** 426 427 BLOCK CHECKMTC subroutine 428 ENTRY CHECKMTC 429 430 BEGFRAME 431 ENDFRAME 432 04EF3 DD5F8001 6 STAK 433 CHECKMTC ENTRNP PUSH 434 PLOCK (R5,MTCELOCK) lock the controller 04EF4 0CC00000 434 IOFF 04EF5 D1D74803 5 BASE 434 SETT (R5,MTCELOCK) 04EF6 FE0C4EF8 434 JNE MA(2+DISPW MA 0) 04EF7 DC40308B 434 CALLNP LOCKWAIT 04EF8 D0574804 5 BASE 435 DEC R5,MTCTIMEOUT decrement the timeout counter 04EF9 FE064F04 436 JGE RETURN jump if not time yet 437 04EFA DC004F4F 438 CALL CHECKTALK see if the MTC is talking 04EFB 41404F07 439 PARV MTCWRUMASK mask for WRU response 04EFC 60094426 0 5 ZBM 440 LD R0 R5,MTCTYPE 0 if CT, 1 if MT, 2 if VT 04EFD 41604F08 0 441 PARV MTCWRUVAL(R0) value for WRU response 04EFE 40174802 5 BASE 442 PARL R5,MTCOPMSGID place for id of operator message 443 04EFF DC4041CB 444 CALLNP MT_RESET call to restart magnetic tape 04F00 FE0E4F04 445 JMP RETURN jump if we shouldn't log a timeout 446 * \ / 447 04F01 DC005048 448 CALL ERRORLOG mag tape controller timeout 04F02 4144062E IMM 449 PARV ERLCMTCTO time out 04F03 40574801 5 BASE 450 PARVL R5,MTCPMVALUE page map value 451 * \ / 452 00004F04 453 RETURN LABEL 454 PUNLOCK (R5,MTCELOCK) unlock the controller 04F04 EC174803 5 BASE 454 STZ (R5,MTCELOCK) 04F05 0C800000 454 ION 04F06 5D1F8001 6 STAK 455 LEAVE POP 456 * --- 457 04F07 FF00FF00 458 MTCWRUMASK VFD ONEBITS/DWRUTYPE*DWRUTYPE+ONEBITS/MTIDSTEST*MTIDSTEST 00004F08 459 MTCWRUVAL LABEL 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1067 (DEADMAN) F 53 Deadman Timer 04F08 0A000000 460 VFD DVCTCTC*DWRUTYPE+0*MTIDSTEST value for CT 04F09 09000000 461 VFD DVCTMTC*DWRUTYPE+0*MTIDSTEST value for MT 04F0A 0B000000 462 VFD DVCTVTC*DWRUTYPE+0*MTIDSTEST value for VT 463 464 END CHECKMTC subroutine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1068 (DEADMAN) F 53 Deadman Timer 466 467 ********************************************************************************** 468 * * 469 * SETPPU3WRD * 470 * * 471 * This subroutine will check to see if a given PPU should * 472 * have triple word transfers enabled and if so will enable * 473 * them. * 474 * Call: * 475 * R4 -> PPU control element * 476 * CALLNP SETPPU3WRD * 477 * * 478 * Eats R3. * 479 * Stack required = 1 * 480 * * 481 ********************************************************************************** 482 483 BLOCK SETPPU3WRD subroutine 484 485 ENTRY SETPPU3WRD 486 487 BEGFRAME 488 ENDFRAME 489 04F0B DD5F8001 6 STAK 490 SETPPU3WRD ENTRNP PUSH 04F0C 5C170803 4 BASE 491 CMZ R4,PPU3WORD is this a triple word PPU? 04F0D FE024F12 492 JEQ OUTOFHERE get out of here if not 493 * \ / 494 04F0E 60C40086 3 IMM 495 LD PFPTR PNCIX i/o page 04F0F 00D70800 4 BASE 496 LDPF R4,PPUPF map in the PPU 04F10 EDC01808 497 STW CIX(PPU3WRD) enable triple word transfers 04F11 80D2C000 3 REG 498 PFRC PFPTR unmap the page 499 * \ / 500 00004F12 501 OUTOFHERE LABEL 04F12 5D1F8001 6 STAK 502 LEAVE POP 503 * --- 504 505 END of SETPPU3WRD subroutine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1069 (DEADMAN) F 53 Deadman Timer 507 508 ********************************************************************************** 509 * * 510 * LOGPPUBAD - Called when we notice that a PPU is not * 511 * working. If it used to be working, we log that it went bad * 512 * and generate a message to tell the operator about it. * 513 * * 514 * R7 => PPU element * 515 * CALLNP LOGPPUBAD * 516 * * 517 * Eats R0:R5. * 518 * Stack required = 5. * 519 * 1 + max ( ERRORLOG (3), GENOPMSG (1), HEXTOCHAR (4), * 520 * SGETMEM (0) ) * 521 * * 522 ********************************************************************************** 523 524 BLOCK LOGPPUBAD subroutine 525 ENTRY LOGPPUBAD 526 527 BEGFRAME 528 ENDFRAME 529 04F13 DD5F8001 6 STAK 530 LOGPPUBAD ENTRNP PUSH 04F14 61578800 5 6 BASE 531 LD R5 SP,0 R5 => PPU element 04F15 5C174801 5 BASE 532 CMZ R5,PPUOPMSGID have we already told people it's bad? 04F16 FE0C4F37 533 JNE RETURN jump if so 534 04F17 DC005048 535 CALL ERRORLOG else log the error 04F18 41440626 IMM 536 PARV ERLCPPUBAD PPU is bad 04F19 40494840 5 ZBM 537 PARVL R5,PPUPF/PFSLOT slot number 538 04F1A DC002ED0 539 CALL SGETMEM get an OPMSG block 04F1B 40440005 IMM 540 PARVL OPMSGLOG size of block 04F1C 61120000 4 0 REG 541 LD R4 R0 R4 -> OPMSG block 542 04F1D 38970802 2 4 BASE 543 LEA R2 R4,OPMSGTEXT put "PPU " into message 04F1E 60044F38 0 IMM 544 LD R0 ADR MSGPART1 04F1F 60440004 1 IMM 545 LD R1 MSG1LEN 04F20 FE400000 546 CMOVE 547 04F21 DC0058D1 548 CALL HEXTOCHAR put slot number into message 04F22 41494840 5 ZBM 549 PARV R5,PPUPF/PFSLOT 04F23 41440001 IMM 550 PARV 1 04F24 40168000 2 CACH 551 PARL CACH R2,0 552 * \ / R2 => null at end of string 553 04F25 60044F39 0 IMM 554 LD R0 ADR MSGPART2 put " PPU is slot " into message 04F26 60440011 1 IMM 555 LD R1 MSG2LEN 04F27 FE400000 556 CMOVE 557 04F28 DC0058D1 558 CALL HEXTOCHAR put slot number into message 04F29 41494840 5 ZBM 559 PARV R5,PPUPF/PFSLOT 04F2A 41440001 IMM 560 PARV 1 04F2B 40168000 2 CACH 561 PARL CACH R2,0 562 * \ / R2 => null at end of string 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1070 (DEADMAN) F 53 Deadman Timer 563 04F2C 60044F3E 0 IMM 564 LD R0 ADR MSGPART3 put " is not responding." into message 04F2D 60440013 1 IMM 565 LD R1 MSG3LEN 04F2E FE400000 566 CMOVE 567 04F2F 38170802 0 4 BASE 568 LEA R0 R4,OPMSGTEXT R0 -> beginning of text 04F30 608A9F30 2 2 CBM 569 LD R2 R2/FLDCHARS 04F31 108A1F30 2 0 CBM 570 SUB R2 R0/FLDCHARS R2 = message length 04F32 E4970007 2 4 CACH 571 ST R2 R4,OPMSGLEN save it 04F33 EC0902E0 4 ZBM 572 STZ R4,OPMSGPROC no process number 04F34 DC0046F3 573 CALL GENOPMSG generate the message 04F35 40530000 4 REG 574 PARVL R4 address of block 04F36 E4174801 0 5 BASE 575 ST R0 R5,PPUOPMSGID save id of message 576 * \ / 577 00004F37 578 RETURN LABEL 04F37 5D1F8001 6 STAK 579 LEAVE POP 580 * --- 581 04F38 50505520 582 MSGPART1 TEXT "PPU " 00000004 ABS 583 MSG1LEN EQU 4 04F39 20202020 584 MSGPART2 TEXT " PPU in slot " 00000011 ABS 585 MSG2LEN EQU 17 04F3E 20697320 586 MSGPART3 TEXT " is not responding." 00000013 ABS 587 MSG3LEN EQU 19 588 589 END LOGPPUBAD subroutine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1071 (DEADMAN) F 53 Deadman Timer 591 592 ********************************************************************************** 593 * * 594 * LOGPPUGOOD - Called when we notice that the PPU is * 595 * working. If it used to be wedged, we log that it has come * 596 * back to life, and kill the operator message complaining * 597 * about it. * 598 * * 599 * R7 => PPU element * 600 * CALLNP LOGPPUGOOD * 601 * * 602 * Eats R0:R4. * 603 * Stack required = 4. * 604 * 1 + max ( CANOPMSG (1), ERRORLOG (3), SETPPU3WRD(1) ) * 605 * * 606 ********************************************************************************** 607 608 BLOCK LOGPPUGOOD subroutine 609 ENTRY LOGPPUGOOD 610 611 BEGFRAME 612 ENDFRAME 613 04F43 DD5F8001 6 STAK 614 LOGPPUGOOD ENTRNP PUSH 04F44 61178800 4 6 BASE 615 LD R4 SP,0 R4 -> PPU element 04F45 5C170801 4 BASE 616 CMZ R4,PPUOPMSGID did PPU used to work? 04F46 FE024F4E 617 JEQ RETURN if so, all done 618 * \ / 619 04F47 DC005048 620 CALL ERRORLOG log the event 04F48 41440427 IMM 621 PARV ERLCPPUOK PPU came back to life 04F49 40490840 4 ZBM 622 PARVL R4,PPUPF/PFSLOT slot number of PPU 623 04F4A DC004713 624 CALL CANOPMSG cancel complaint to operator 04F4B 40570801 4 BASE 625 PARVL R4,PPUOPMSGID id of complaint 04F4C EC170801 4 BASE 626 STZ R4,PPUOPMSGID remember that it's good 04F4D DC404F0B 627 CALLNP SETPPU3WRD reset PPU to do triple word transfers 628 * \ / 629 00004F4E 630 RETURN LABEL 04F4E 5D1F8001 6 STAK 631 LEAVE POP 632 * --- 633 634 END LOGPPUGOOD subroutine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1072 (DEADMAN) F 53 Deadman Timer 636 637 ********************************************************************************** 638 * * 639 * CHECKTALK - See whether a controller is talking. * 640 * * 641 * If it isn't talking, and we have not already told the * 642 * operator about it, log the error and tell the operator. If * 643 * it is talking, and we have told the operator that it isn't, * 644 * log the controller's resurrection and cancel our complaint * 645 * to the operator. Simple, huh? Also, if it isn't talking, * 646 * we send it a reset command that will reset the hardware and * 647 * the PPU interface in the hopes that that will make it * 648 * happier (we still say it's dead because a controller reset * 649 * takes up to two seconds). * 650 * * 651 * CIX mapped to the device * 652 * R1 = 0 if PPU is dead * 653 * CALL CHECKTALK * 654 * PARV mask for device WRU response * 655 * PARV expected value for device WRU response, after masking * 656 * PARL location for id of operator message * 657 * JEQZ R0 controller is not talking * 658 * * 659 * Eats R0:R3. Sets R0=0 if not talking, R0=1 if talking. * 660 * Stack required = 9. * 661 * 5 + max ( CANOPMSG (1), ERRORLOG (3), GENOPMSG (1), * 662 * HEXTOCHAR(4), SGETMEM (0) ) * 663 * * 664 ********************************************************************************** 665 666 BLOCK CHECKTALK subroutine 667 ENTRY CHECKTALK 668 669 BEGFRAME 00178801 6 BASE 670 PFILE BSS 1 page file for device 00178802 6 BASE 671 WRUMASK BSS 1 mask for device WRU response 00178802 6 BASE 672 SAVER4 EQU WRUMASK save area for R4 00178803 6 BASE 673 WRUVALUE BSS 1 expected WRU response, after masking 00178804 6 BASE 674 MSGIDPTR BSS 1 pointer to location for message id 675 ENDFRAME 676 04F4F DD1F8005 6 STAK 677 CHECKTALK ENTR PUSH 04F50 C1578802 6 BASE 678 STPV SP,WRUMASK save WRU mask 04F51 C1578803 6 BASE 679 STPV SP,WRUVALUE save WRU value 04F52 C0178804 6 BASE 680 STPL SP,MSGIDPTR save pointer to message id 04F53 FA424FA7 1 681 JEQZ R1 PPUNOTALK jump if PPU is not talking 04F54 60C40086 3 IMM 682 LD PFPTR PNCIX load index for page file CIX window 04F55 80978801 6 BASE 683 PFRD SP,PFILE read what's in the PF for the IO device 684 04F56 60824000 2 IMM 685 LD R2 BUSCREAD construct read of device WRU info 04F57 6009B021 0 6 ZBM 686 LD R0 SP,PFILE/PPUCHAN 04F58 E40A9C20 0 2 CBM 687 ST R0 R2/BITS 14:15 04F59 18840000 2 IMM 688 ADD R2 PPUCABLED R2 = read command 04F5A 60498841 1 6 ZBM 689 LD R1 SP,PFILE/PFSLOT R1 = slot number 04F5B 0C128000 2 REG 690 LDFB R2 do command (R0 = response) 04F5C FE164F6E 691 JOS NOTALK jump if abnormal data 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1073 (DEADMAN) F 53 Deadman Timer 04F5D FE124F6E 692 JCS NOTALK jump if no response 04F5E 78178802 0 6 BASE 693 AND R0 SP,WRUMASK mask the response 04F5F 64178803 0 6 BASE 694 CPR R0 SP,WRUVALUE is it what we wanted? 04F60 FE0C4F6E 695 JNE NOTALK if not, device doesn't talk right 696 * \ / 697 698 * The controller seems to be talking. See if it just 699 * recently came alive. 700 701 * \ / 04F61 5C178C04 6 FPVR 702 CMZ @(SP,MSGIDPTR) is a complaint outstanding? 04F62 FE024F6C 703 JEQ RETURN1 if not, all is well 04F63 60040000 0 IMM 704 LD R0 0 04F64 E0178C04 0 6 FPVR 705 EXCH R0 @(SP,MSGIDPTR) R0 := msg id, clear his variable 04F65 DC004713 706 CALL CANOPMSG cancel the message 04F66 40520000 0 REG 707 PARVL R0 708 04F67 60D78801 3 6 BASE 709 LD R3 SP,PFILE 04F68 DC005048 710 CALL ERRORLOG log the event 04F69 41440829 IMM 711 PARV ERLCCTLOK controller has come back to life 04F6A 414AC840 3 CBM 712 PARV R3/PFSLOT slot number 04F6B 404AF020 3 CBM 713 PARVL R3/PPUCHAN channel number 714 * \ / 715 00004F6C 716 RETURN1 LABEL 04F6C 60040001 0 IMM 717 LD R0 1 flag: controller is talking 04F6D FE0E4FAD 718 JMP RETURN 719 * --- 720 721 * The controller is not talking. See if it just died, and 722 * if so, notify the operator. 723 00004F6E 724 NOTALK LABEL 04F6E EC001800 725 STZ CIX(PPURESET) wang the hardware and software 726 * \ / 04F6F 5C178C04 6 FPVR 727 CMZ @(SP,MSGIDPTR) is message already outstanding? 04F70 FE0C4FAC 728 JNE RETURN0 if so, we were dead last time, too 729 04F71 60D78801 3 6 BASE 730 LD R3 SP,PFILE 04F72 DC005048 731 CALL ERRORLOG log the event 04F73 41440A28 IMM 732 PARV ERLCCTLBAD controller is dead 04F74 414AC840 3 CBM 733 PARV R3/PFSLOT slot number 04F75 404AF020 3 CBM 734 PARVL R3/PPUCHAN channel number 735 04F76 E5178802 4 6 BASE 736 ST R4 SP,SAVER4 save volatile register 04F77 DC002ED0 737 CALL SGETMEM get an OPMSG block 04F78 40440005 IMM 738 PARVL OPMSGLOG 04F79 61120000 4 0 REG 739 LD R4 R0 R4 -> the block 740 04F7A 38970802 2 4 BASE 741 LEA R2 R4,OPMSGTEXT put "CTLR " into message 04F7B 60044FAE 0 IMM 742 LD R0 ADR MSGPART1 04F7C 60440005 1 IMM 743 LD R1 MSG1LEN 04F7D FE400000 744 CMOVE 745 04F7E 60098841 0 6 ZBM 746 LD R0 SP,PFILE/PFSLOT 04F7F DC0058D1 747 CALL HEXTOCHAR put slot number into message 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1074 (DEADMAN) F 53 Deadman Timer 04F80 41520000 0 REG 748 PARV R0 04F81 41440001 IMM 749 PARV 1 04F82 40168000 2 CACH 750 PARL CACH R2,0 751 * \ / R2 => null at end of string 752 04F83 60040020 0 IMM 753 LD R0 " " put space into message 04F84 E4168000 0 2 CACH 754 ST R0 CACH R2,0 755 04F85 6009B021 0 6 ZBM 756 LD R0 SP,PFILE/PPUCHAN 04F86 DC0058D1 757 CALL HEXTOCHAR put channel number into message 04F87 41520000 0 REG 758 PARV R0 04F88 41440001 IMM 759 PARV 1 04F89 40168001 2 CACH 760 PARL CACH R2,1 761 * \ / R2 => null at end of string 762 04F8A 60044FB0 0 IMM 763 LD R0 ADR MSGPART2 put " Controller at slot " into message 04F8B 60440015 1 IMM 764 LD R1 MSG2LEN 04F8C FE400000 765 CMOVE 766 04F8D 60098841 0 6 ZBM 767 LD R0 SP,PFILE/PFSLOT 04F8E DC0058D1 768 CALL HEXTOCHAR put slot number into message 04F8F 41520000 0 REG 769 PARV R0 04F90 41440001 IMM 770 PARV 1 04F91 40168000 2 CACH 771 PARL CACH R2,0 772 * \ / R2 => null at end of string 773 04F92 60044FB6 0 IMM 774 LD R0 ADR MSGPART3 put ", channel " into message 04F93 6044000A 1 IMM 775 LD R1 MSG3LEN 04F94 FE400000 776 CMOVE 777 04F95 6009B021 0 6 ZBM 778 LD R0 SP,PFILE/PPUCHAN 04F96 DC0058D1 779 CALL HEXTOCHAR put channel number into message 04F97 41520000 0 REG 780 PARV R0 04F98 41440001 IMM 781 PARV 1 04F99 40168000 2 CACH 782 PARL CACH R2,0 783 * \ / R2 => null at end of string 784 04F9A 60044FB9 0 IMM 785 LD R0 ADR MSGPART4 put " is not responding." into message 04F9B 60440013 1 IMM 786 LD R1 MSG4LEN 04F9C FE400000 787 CMOVE 788 04F9D 38170802 0 4 BASE 789 LEA R0 R4,OPMSGTEXT R0 -> beginning of message 04F9E 608A9F30 2 2 CBM 790 LD R2 R2/FLDCHARS 04F9F 108A1F30 2 0 CBM 791 SUB R2 R0/FLDCHARS R2 = length of message 04FA0 E4970007 2 4 CACH 792 ST R2 R4,OPMSGLEN save length in block 793 04FA1 EC0902E0 4 ZBM 794 STZ R4,OPMSGPROC no process number for this message 04FA2 DC0046F3 795 CALL GENOPMSG generate the message 04FA3 40530000 4 REG 796 PARVL R4 04FA4 E4178C04 0 6 FPVR 797 ST R0 @(SP,MSGIDPTR) save id of message 04FA5 61178802 4 6 BASE 798 LD R4 SP,SAVER4 restore this regiser 04FA6 FE0E4FAC 799 JMP RETURN0 and all done - not talking 800 * --- 801 802 * The PPU is not talking. Cancel any message that says 803 * that the controller is not talking. 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1075 (DEADMAN) F 53 Deadman Timer 804 00004FA7 805 PPUNOTALK LABEL 04FA7 60040000 0 IMM 806 LD R0 0 04FA8 E0178C04 0 6 FPVR 807 EXCH R0 @(SP,MSGIDPTR) R0 = message id, clear it 04FA9 FA024FAC 0 808 JEQZ R0 RETURN0 jump if message not pending 04FAA DC004713 809 CALL CANOPMSG else cancel the message 04FAB 40520000 0 REG 810 PARVL R0 811 * \ / 812 00004FAC 813 RETURN0 LABEL 04FAC 60040000 0 IMM 814 LD R0 0 controller (or PPU) not talking 815 * \ / 816 00004FAD 817 RETURN LABEL 04FAD 5D1F8005 6 STAK 818 LEAVE POP 819 * --- 820 04FAE 43544C52 821 MSGPART1 TEXT "CTLR " 00000005 ABS 822 MSG1LEN EQU 5 04FB0 2020436F 823 MSGPART2 TEXT " Controller at slot " 00000015 ABS 824 MSG2LEN EQU 21 04FB6 2C206368 825 MSGPART3 TEXT ", channel " 0000000A ABS 826 MSG3LEN EQU 10 04FB9 20697320 827 MSGPART4 TEXT " is not responding." 00000013 ABS 828 MSG4LEN EQU 19 829 830 END CHECKTALK subroutine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1076 (DEADMAN) F 53 Deadman Timer 832 833 ********************************************************************************** 834 * * 835 * DEVNOTRDY - Complain about device not ready. * 836 * * 837 * This routine will generate a message to the operator * 838 * saying that a device is not ready. * 839 * * 840 * CALL DEVNOTRDY * 841 * PARVL pak6 device name * 842 * ST R0 message serial number * 843 * * 844 * Eats R0:R4. * 845 * Stack required = 5. * 846 * 2 + max ( GENOPMSG (1), P6TOCHAR (3), SGETMEM (0) ) * 847 * * 848 ********************************************************************************** 849 850 BLOCK DEVNOTRDY subroutine 851 ENTRY DEVNOTRDY 852 853 BEGFRAME 00178801 6 BASE 854 DEVNAME BSS 1 855 ENDFRAME 856 04FBE DD1F8002 6 STAK 857 DEVNOTRDY ENTR PUSH 04FBF C0578801 6 BASE 858 STPVL SP,DEVNAME save device name 859 04FC0 DC002ED0 860 CALL SGETMEM get an OPMSG block 04FC1 40440005 IMM 861 PARVL OPMSGLOG 04FC2 61120000 4 0 REG 862 LD R4 R0 R4 -> OPMSG block 863 04FC3 38970802 2 4 BASE 864 LEA R2 R4,OPMSGTEXT put "DEV " into message 04FC4 60044FDE 0 IMM 865 LD R0 ADR MSGPART1 04FC5 60440004 1 IMM 866 LD R1 MSG1LEN 04FC6 FE400000 867 CMOVE 868 04FC7 60178801 0 6 BASE 869 LD R0 SP,DEVNAME 04FC8 DC00593E 870 CALL P6TOCHAR put device name into message 04FC9 41520000 0 REG 871 PARV R0 04FCA 41440006 IMM 872 PARV 6 04FCB 40168000 2 CACH 873 PARL CACH R2,0 874 * \ / R2 => null at end of string 875 04FCC 60044FDF 0 IMM 876 LD R0 ADR MSGPART2 put "Device " into message 04FCD 60440007 1 IMM 877 LD R1 MSG2LEN 04FCE FE400000 878 CMOVE 879 04FCF 60178801 0 6 BASE 880 LD R0 SP,DEVNAME 04FD0 DC00593E 881 CALL P6TOCHAR put device name into message 04FD1 41520000 0 REG 882 PARV R0 04FD2 40168000 2 CACH 883 PARL CACH R2,0 884 * \ / R2 => null at end of string 885 04FD3 60044FE1 0 IMM 886 LD R0 ADR MSGPART3 put " is not ready." into message 04FD4 6044000E 1 IMM 887 LD R1 MSG3LEN 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1077 (DEADMAN) F 53 Deadman Timer 04FD5 FE400000 888 CMOVE 889 04FD6 38170802 0 4 BASE 890 LEA R0 R4,OPMSGTEXT R0 -> beginning of text 04FD7 608A9F30 2 2 CBM 891 LD R2 R2/FLDCHARS 04FD8 108A1F30 2 0 CBM 892 SUB R2 R0/FLDCHARS R2 = message length 04FD9 E4970007 2 4 CACH 893 ST R2 R4,OPMSGLEN save length in OPMSG block 894 04FDA EC0902E0 4 ZBM 895 STZ R4,OPMSGPROC no process number for this message 04FDB DC0046F3 896 CALL GENOPMSG generate the message 04FDC 40530000 4 REG 897 PARVL R4 898 04FDD 5D1F8002 6 STAK 899 LEAVE POP return, R0 = message serial number 900 * --- 901 04FDE 44455620 902 MSGPART1 TEXT "DEV " 00000004 ABS 903 MSG1LEN EQU 4 04FDF 44657669 904 MSGPART2 TEXT "Device " 00000007 ABS 905 MSG2LEN EQU 7 04FE1 20697320 906 MSGPART3 TEXT " is not ready." 0000000E ABS 907 MSG3LEN EQU 14 908 909 END DEVNOTRDY subroutine 910 911 END Dead Man Timer Routines 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1078 F 0 Deadman Timer 90 91 ********************************************************************************** 92 * * 93 * Place to break the listing. * 94 * * 95 ********************************************************************************** 96 97 INPUT SPROCSTART element queuers for system processes 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1079 (SPROCSTART) F 54 System Process Start Routine 3 4 PROCSTART BLOCK routines that start other processes 5 6 ENTRY ACCOUNT get accounting element 7 ENTRY ACCTREQUE requeueing of accounting records 8 ENTRY DISMOUNT check if volume requires dismounting 9 ENTRY ERRORLOG log errors 10 ENTRY FREEFILE return a file structure 11 ENTRY FREESPEC return a file structure 12 ENTRY PUTADT put a single block into the ADT 13 ENTRY SUBSTITUTE substitute a block 14 ENTRY UNSUBS unsubstitute a block 15 16 ********************************************************************************** 17 * * 18 * FREESPEC * 19 * This is a special version of FREEFILE that places * 20 * the new queue element at the beginning of the queue. * 21 * This call is used when an element being freed generates * 22 * many other elements. It ensures that the growth of the * 23 * free element queue is somewhat controlled when freeing * 24 * complex structures. * 25 * Same call as FREEFILE. * 26 * * 27 * Eats R0:R3. * 28 * Stack required = 3 * 29 * 2 + max ( GETDATE (1), LOCKLIST (1), LOCKWAIT (0), * 30 * SGETMEM (0), UNLOCKLIST (1) ) * 31 * * 32 ********************************************************************************** 33 34 BLOCK FREESPEC, FREEFILE, ACCTQUE, PUTADT, ERRORLOG, DISMOUNT 35 ENTRY DISMOUNT 36 ENTRY FREESPEC 37 ENTRY FREEFILE 38 ENTRY ACCTQUE 39 ENTRY ACCTREQUE 40 ENTRY PUTADT 41 ENTRY ERRORLOG 42 43 BEGFRAME 00178801 6 BASE 44 FREEFILET BSS 1 temp location 45 ENDFRAME 46 04FE5 DD9F8002 6 STAK 47 FREESPEC ENTRS PUSH 04FE6 EDD78801 6 BASE 48 STW SP,FREEFILET indicate special routine 04FE7 FE0E4FEC 49 JMP FREESHR go share code 50 * --- 51 52 ********************************************************************************** 53 * * 54 * FREEFILE. * 55 * This routine is called with the root of some disk structure * 56 * and it causes a process to be started up (if it is not already * 57 * running) that will return the disk blocks in that * 58 * structure to the free block pool. Call: * 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1080 (SPROCSTART) F 54 System Process Start Routine 59 * * 60 * SP = stack area * 61 * CALL FREEFILE * 62 ** Eats R0, R1, and R3 before the parameters are passed. Therefore * 63 ** the caller must not destroy R3. * 64 * PARV first disk addr (includes volume number) * 65 * PARVL type of structure freeing * 66 * * 67 * Eats R0:R3. * 68 * Stack required = 3, See FREESPEC. * 69 * * 70 ********************************************************************************** 71 04FE8 0000000A 72 FFMAXPROC VFD 10 maximum number of FF processes 04FE9 0000001E 73 FFELPPROC VFD 30 number of FFLIST elements per process 74 04FEA DD9F8002 6 STAK 75 FREEFILE ENTRS PUSH 04FEB EC178801 6 BASE 76 STZ SP,FREEFILET indicate normal free file call 00004FEC 77 FREESHR LABEL 04FEC DC002ED0 78 CALL SGETMEM get a queue element 04FED 40440002 IMM 79 PARVL FFLOG 04FEE E412C000 0 3 REG 80 ST R0 R3 04FEF DCD3C000 7 REG 81 EXPCS R7 go get parameters 04FF0 C156C801 3 BASE 82 STPV R3,FFBLOCK save the free items root address 04FF1 C048C080 3 ZBM 83 STPVL R3,FFTYPE store structure to free 84 * \ / 85 86 ********************************************************************************** 87 * * 88 * Search the volume name list for this volume and count the * 89 * entry busy word. * 90 * * 91 ********************************************************************************** 92 93 * \ / 04FF2 6008C081 0 3 ZBM 94 LD R0 R3,FFDRIVE get drive number we'll be looking for 04FF3 60601F22 1 0 95 LD R1 VOLNTABLE(R0) get VOLN element pointer 04FF4 38164815 0 1 BASE 96 LEA R0 R1,VOLNBUSY make address of busy counter 04FF5 D0160400 0 @R 97 INC @R0 make the volume busy for this element 04FF6 E416C802 0 3 BASE 98 ST R0 R3,FFVOLBPTR save the address of the busy counter 99 * \ / 100 101 ********************************************************************************** 102 * * 103 * List element is prepared. Queue it and start the consumer * 104 * process if it is not already busy. * 105 * * 106 ********************************************************************************** 107 108 * \ / 04FF7 D0001D81 109 INC FFLISTSIZ indicate another list entry 04FF8 60441D7A 1 IMM 110 LD R1 ADR FFLOCK get the address of the list 04FF9 5C178801 6 BASE 111 CMZ SP,FREEFILET check for special free file call 04FFA FE025005 112 JEQ FREFILSHAR share some code to queue element 113 * \ / 04FFB E5178801 4 6 BASE 114 ST R4 SP,FREEFILET save callers R4 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1081 (SPROCSTART) F 54 System Process Start Routine 04FFC 61124000 4 1 REG 115 LD R4 R1 copy the control element pointer 116 PLOCK R4,FFCPCLOCK call to lock the file freers list 04FFD 0CC00000 116 IOFF 04FFE D1D70800 4 BASE 116 SETT R4,FFCPCLOCK 04FFF FE0C5001 116 JNE MA(2+DISPW MA 0) 05000 DC40308B 116 CALLNP LOCKWAIT 05001 60170801 0 4 BASE 117 LD R0 R4,FFCPCLIST load the current list pointer 05002 E408DF10 0 3 ZBM 118 ST R0 R3,FFLINK link after our list 05003 E4D70801 3 4 BASE 119 ST R3 R4,FFCPCLIST make our element new list head 05004 FE0E5010 120 JMP FREFILENS go share code 121 * --- 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1082 (SPROCSTART) F 54 System Process Start Routine 123 124 ********************************************************************************** 125 * * 126 * This routine is shared by the assorted consumer * 127 * process feeders to queue the element in the proper list and * 128 * start the consumer process if it is not busy. * 129 * * 130 * R1=>consumer process control triplet * 131 * R3=> list element * 132 * SP=> stack frame of size FREEFILES * 133 * JMP FREFILSHAR * 134 * * 135 ********************************************************************************** 136 00005005 137 FREFILSHAR LABEL 05005 EC08DF10 3 ZBM 138 STZ R3,0/FLDADRS clear the forward link 05006 E5178801 4 6 BASE 139 ST R4 SP,FREEFILET save R4 05007 61124000 4 1 REG 140 LD R4 R1 make R4 point to list control triplet 141 PLOCK R4,FFCPCLOCK call to lock the list 05008 0CC00000 141 IOFF 05009 D1D70800 4 BASE 141 SETT R4,FFCPCLOCK 0500A FE0C500C 141 JNE MA(2+DISPW MA 0) 0500B DC40308B 141 CALLNP LOCKWAIT 0500C 60040000 0 IMM 142 LD R0 0 0500D 38570801 1 4 BASE 143 LEA R1 R4,FFCPCLIST search the list pointed to 0500E 3C085F10 0 1 ZBM 144 LSRCH R0 R1,0/FLDADRS find the end of the list 0500F E4C85F10 3 1 ZBM 145 ST R3 R1,0/FLDADRS link element to the end of the list 146 * \ / 147 00005010 148 FREFILENS LABEL 05010 5C001C6B 149 CMZ BOOTFLAG are we still in the bootstrap? 05011 FE0C5018 150 JNE FREFILDN if so, don't start process 05012 65041D7A 4 IMM 151 CPR R4 ADR FFLOCK is this free file? 05013 FE02501C 152 JEQ CHKFFMANY if so, special check to allow more than one 05014 D1D70802 4 BASE 153 SETT R4,FFCPCBUSY see if consumer process already running 05015 FE025018 154 JEQ FREFILDN jump if process already running 155 * \ / 156 00005016 157 FREFILBLD LABEL 05016 60970806 2 4 BASE 158 LD R2 R4,FFCPCPROC get flag for the process to start 05017 FC801CF6 2 159 IORM R2 FLAGS tell the dispatcher to start it 160 * \ / 161 00005018 162 FREFILDN LABEL 163 PUNLOCK R4,FFCPCLOCK call to unlock the list 05018 EC170800 4 BASE 163 STZ R4,FFCPCLOCK 05019 0C800000 163 ION 0501A 61178801 4 6 BASE 164 LD R4 SP,FREEFILET restore R4 0501B 5D1F8002 6 STAK 165 LEAVE POP return 166 * --- 167 168 ********************************************************************************** 169 * * 170 * Due to its high usage there may be many free file processes. * 171 * Here we check to see how many there are and to add another if * 172 * needed. * 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1083 (SPROCSTART) F 54 System Process Start Routine 173 * * 174 ********************************************************************************** 175 0000501C 176 CHKFFMANY LABEL 0501C 60001D81 0 177 LD R0 FFLISTSIZ R0 = number of elements in list 0501D 14004FE9 0 178 DIV R0 FFELPPROC divide by number of elements per process 0501E 18040001 0 IMM 179 ADD R0 1 R0 = number of processes required 0501F 64001D82 0 180 CPR R0 FFPROCS enough processes already exist? 05020 FE085018 181 JLT FREFILDN jump if enough 05021 60401D82 1 182 LD R1 FFPROCS get the number that there are now 05022 64404FE8 1 183 CPR R1 FFMAXPROC too many already? 05023 FE045018 184 JGT FREFILDN if so, don't make more 05024 FE0E5016 185 JMP FREFILBLD build a free file process 186 * --- 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1084 (SPROCSTART) F 54 System Process Start Routine 188 189 ********************************************************************************** 190 * * 191 * ACCTQUE is called when an accounting record is ready to be * 192 * put in the queue. We simply set up the pointers to the queue to * 193 * use and jump to some code sharing. * 194 * Call: * 195 * R3 = ADR accounting record * 196 * CALLNP ACCTQUE * 197 * Eats R0:R3. * 198 * Stack required = 3. See FREESPEC. * 199 * * 200 ********************************************************************************** 201 05025 DD5F8002 6 STAK 202 ACCTQUE ENTRNP PUSH 05026 60441D99 1 IMM 203 LD R1 ADR APLOCK make pointer to lock and list 05027 FE0E5005 204 JMP FREFILSHAR go share the queuer code 205 * --- 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1085 (SPROCSTART) F 54 System Process Start Routine 207 208 ********************************************************************************** 209 * * 210 * ACCTREQUE. Since the account logging files may be * 211 * busy, and since the account logger must be multi-threaded * 212 * ( as they say in IBMness ), when a busy file is found, * 213 * the accounting element is queued as a time element * 214 * waiting some amount of time and then coming here to get * 215 * requeued into the accounting list. * 216 * This routine call is from the clock interrupt routine * 217 * and R3 (the clock queue parameter) points to the element * 218 * to requeue. * 219 * * 220 ********************************************************************************** 221 05028 DD5F8002 6 STAK 222 ACCTREQUE ENTRNP PUSH 05029 60441D99 1 IMM 223 LD R1 ADR APLOCK R1 => accounting process control stuff 0502A D0401DA0 224 DEC APREQUE indicate one less requeued element 0502B FE0E5005 225 JMP FREFILSHAR link in and start process 226 * --- 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1086 (SPROCSTART) F 54 System Process Start Routine 228 229 ********************************************************************************** 230 * * 231 * PUTADT. This process provides a skeleton from which the * 232 * PUTFREEBLK routine may be called. We use this process because * 233 * we may not free blocks until the mass storage driver is done * 234 * with them, and when that occurs we are not running a * 235 * suspendable process. Therefore, when the DONEPPL routine * 236 * recognizes a block that has been freed ( by the PPPUTADT bit ) * 237 * it queues up an element to call this process. One special note * 238 * being that the volume that the ADT block is to be written has * 239 * its busy count incremented when the PPPUTADT bit is set and * 240 * NOT when we create the element here. * 241 * * 242 * Eats R0:R3 * 243 * Stack required: 3, See FREESPEC. * 244 * * 245 ********************************************************************************** 246 0502C DD1F8002 6 STAK 247 PUTADT ENTR PUSH 0502D C052C000 3 REG 248 STPVL R3 pick up the block number 0502E DC002ED0 249 CALL SGETMEM call for a piece of storage 0502F 40440001 IMM 250 PARVL PADTLOG indicate its length 05030 E4D60801 3 0 BASE 251 ST R3 R0,PADTBLOCK save block number in block 05031 60D20000 3 0 REG 252 LD R3 R0 place element pointer in proper register 05032 60441D83 1 IMM 253 LD R1 ADR PADTLOCK get pointer to the control triplet 05033 FE0E5005 254 JMP FREFILSHAR go share the queuer code 255 * --- 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1087 (SPROCSTART) F 54 System Process Start Routine 257 258 ********************************************************************************** 259 * * 260 * DISMOUNT * 261 * This subroutine is called whenever the busy count for * 262 * a volume goes to zero. All we check is if the VOLNAWAY * 263 * bit is set, indicating to dismount this volume. One * 264 * special note being that we also check the VOLNMOUNT bit, * 265 * which indicates somebody is already fooling with this * 266 * volume. Call: * 267 * * 268 * CALL DISMOUNT * 269 * PARVL * 270 * * 271 * Eats R0:R3 * 272 * Stack required = 3. See FREESPEC * 273 * * 274 ********************************************************************************** 275 05034 DD1F8002 6 STAK 276 DISMOUNT ENTR PUSH 05035 C0528000 2 REG 277 STPVL R2 get pointer to VOLN element 05036 5C088E10 2 ZBM 278 CMZ R2,VOLNMAIM is this volume maintenance mounted 05037 FE025047 279 JEQ NODISMNT jump if not 05038 DC003096 280 CALL LOCKLIST gain access to volume list 05039 40001F22 281 PARL VOLNLOCK lock associate with this list 0503A D1C88810 2 ZBM 282 SETT R2,VOLNAWAY is someone already fooling with 0503B FE025045 283 JEQ DISMNTXIT jump if we are too late 0503C DC0030A4 284 CALL UNLOCKLIST release hold on the list 0503D 40001F22 285 PARL VOLNLOCK lock to unlock 0503E DC002ED0 286 CALL SGETMEM get a chuck of memory 0503F 40440001 IMM 287 PARVL DMNTLOG log base 2 of the block size 05040 60D20000 3 0 REG 288 LD R3 R0 put element pointer in proper register 05041 60088086 0 2 ZBM 289 LD R0 R2,VOLNNUM get the volume number 05042 E416C801 0 3 BASE 290 ST R0 R3,DMNTVOLN and place into the element 05043 60441D8A 1 IMM 291 LD R1 ADR DMNTLOCK dismount control information 05044 FE0E5005 292 JMP FREFILSHAR go share code 293 * --- 294 00005045 295 DISMNTXIT LABEL 05045 DC0030A4 296 CALL UNLOCKLIST release the list 05046 40001F22 297 PARL VOLNLOCK 298 * \ / 299 00005047 300 NODISMNT LABEL 05047 5D1F8002 6 STAK 301 LEAVE POP just leave 302 * --- 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1088 (SPROCSTART) F 54 System Process Start Routine 304 305 ********************************************************************************** 306 * * 307 * ERRORLOG * 308 * This subroutine places an element into the error log * 309 * list and starts the process that will write it to mass * 310 * storage. It eats R0 thru R3 ( R0 thru R2 before fetching * 311 * the parameters ) and accepts a variable number of parameters * 312 * ( depending on the error ). * 313 * Note: this routine (or the process) needs to be fixed * 314 * so that FBI errors in the error log file don't create * 315 * an infinite number of calls! Also, a secondary log * 316 * file may be provided so that errors are not totally * 317 * lost when the first file goes bad. * 318 * Call: * 319 * SP => stack pointer * 320 * CALL ERRORLOG * 321 ** eats R0-R2 before PARMS are passed * 322 * PARV ERLCxxxx length and type * 323 * PARV param1 * 324 * ... * 325 * PARVL paramn * 326 * * 327 * Eats R0:R3. * 328 * Stack required: 3, See FREESPEC. * 329 * * 330 ********************************************************************************** 331 00178801 6 BASE 332 ERRORLOGT EQU FREEFILET temp for number of parameters 333 05048 DD1F8002 6 STAK 334 ERRORLOG ENTR PUSH 05049 E4178801 0 6 BASE 335 ST R0 SP,ERRORLOGT save the first parameter 0504A F22C504C 0 336 JBF R0/ERERROR NOTERROR jump if code for information rather than error 0504B D0001D98 337 INC ERRLOGCNT indicate that another error occurred 0000504C 338 NOTERROR LABEL 0504C 604A2250 1 0 CBM 339 LD R1 R0/ERLLEN get the number of parameters 0504D 5C565002 1 REG 340 HIB R1+ERLFUNK calculate size of block to hold it 0504E 70920000 2 0 REG 341 LDN R2 R0 copy result of HIB 0504F DC002ED0 342 CALL SGETMEM get a block for the error 05050 40569020 2 REG 343 PARVL R2+WORDLNTH specify its size 05051 60520000 1 0 REG 344 LD R1 R0 copy pointer to R1 05052 E0178801 0 6 BASE 345 EXCH R0 SP,ERRORLOGT save pointer and get back R0 05053 708A2250 2 0 CBM 346 LDN R2 R0/ERLLEN get number of parameters 05054 10528000 1 2 REG 347 SUB R1 R2 05055 C15C5002 12 BASE 348 ERRLOGLOOP STPV R1,ERLFUNK(R2) fetch for each of the parameters 05056 FAA05055 2 349 IRJ R2 ERRLOGLOOP process each parameter 05057 C0564802 1 BASE 350 STPVL R1,ERLFUNK store the last parameter 05058 60D78801 3 6 BASE 351 LD R3 SP,ERRORLOGT get element pointer in R3 05059 6016C802 0 3 BASE 352 LD R0 R3,ERLFUNK 0505A E408C0F0 0 3 ZBM 353 ST R0 R3,ERLTYPE place code in right place 0505B DC404549 354 CALLNP GETDATE get the current time 0505C E616C801 013 BASE 355 ST2 R0 R3,ERLDATE and time stamp the entry 0505D 60441D91 1 IMM 356 LD R1 ADR ERRLOGLOCK make pointer to list and lock 0505E FE0E5005 357 JMP FREFILSHAR place in list and set consumer process running 358 * --- 359 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1089 (SPROCSTART) F 54 System Process Start Routine 360 END FREESPEC, FREEFILE, ACCTQUE, PUTADT, ERRORLOG, DISMOUNT 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1090 (SPROCSTART) F 54 System Process Start Routine 362 363 ********************************************************************************** 364 * * 365 * ACCOUNT * 366 * This routine is called on the occurrence of * 367 * various events of significance to accounting and * 368 * auditing. We get an empty element to use for the * 369 * accounting file entry, set the type, length, and * 370 * time fields, then return to the caller to allow him * 371 * to finish building the element. * 372 * Call: * 373 * SP => stack pointer * 374 * CALL ACCOUNT * 375 ** Eats R0, R1, and R3 before the parameters are passed. * 376 * PARV type code * 377 * PARV length of record in chars * 378 * PARVL * 379 * * 380 * Eats R0:R3. * 381 * Stack required = 2 * 382 * 1 + max ( GETDATE (1), SGETMEM (0), ZEROIT (1) ) * 383 * * 384 ********************************************************************************** 385 386 BLOCK ACCOUNT subroutine 387 ENTRY ACCOUNT 388 389 BEGFRAME 390 ENDFRAME 391 0505F DD9F8001 6 STAK 392 ACCOUNT ENTRS PUSH 05060 DC002ED0 393 CALL SGETMEM call for a piece of storage 05061 40440004 IMM 394 PARVL APLOG of this length 05062 60D20000 3 0 REG 395 LD R3 R0 copy the block pointer 05063 DC003090 396 CALL ZEROIT clean up our block 05064 41160800 0 BASE 397 PAR R0,0 where the block is 05065 4044000E IMM 398 PARVL APLNTH how much to zero 399 05066 DCD3C000 7 REG 400 EXPCS R7 get the parameters 05067 C148C051 3 ZBM 401 STPV R3,APRECORD/AFRTYPE first parameter is type 05068 C148DF11 3 ZBM 402 STPV R3,APRECORD/AFRLEN save the length 05069 C048C050 3 ZBM 403 STPVL R3,APWHOGETS put in the bits indicating where to file this entry 404 0506A D148CAA1 3 ZBM 405 STMW R3,APRECORD/AFRPORTNUM assume no port 0506B DC404549 406 CALLNP GETDATE get the current time 0506C E616C806 013 BASE 407 ST2 R0 R3,APRECORD/AFRTIME tell when event occurred 0506D 5D1F8001 6 STAK 408 LEAVE POP 409 * --- 410 411 END of ACCOUNT 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1091 (SPROCSTART) F 54 System Process Start Routine 413 414 415 ********************************************************************************** 416 * * 417 * SUBSTITUTE * 418 * This subroutine is called only by the disk driver * 419 * when a recoverable error ( data intact ) has occurred * 420 * during a disk read or write operation. The actual disk * 421 * block substitution does not happen here, because in * 422 * order to get a new block for the substitution, a call * 423 * to GETFREEBLK is required, and this routine may suspend * 424 * the caller ( disk driver ). Please note the following, * 425 * they are crucial to substitution process. * 426 * * 427 * - The PPL busy count is incremented. This guarantees * 428 * that the block will remain RESIDENT until the count * 429 * reaches zero. Note that the decrement will happen * 430 * within the actual substitution process. * 431 * * 432 * - A substitution queue element is created and linked * 433 * onto the list contained in the VOLN element. * 434 * * 435 * - If a substitution process does not already exists then * 436 * one is created. * 437 * * 438 * Call: * 439 * LD PPL <=> PPAGE element> * 440 * CALLNP SUBSTITUTE * 441 * * 442 * Eats R0:R2. * 443 * Stack required = 7 * 444 * 4 + max ( BLDPROCESS (2), LOCKWAIT (0), MAPINMEM (3), * 445 * SETRUNNING (2), SGETMEM (0), TRACEPROC(3) ) * 446 * * 447 ********************************************************************************** 448 449 BLOCK SUBSTITUTE and UNSUBS subroutines 450 ENTRY SUBSTITUTE substitute a block 451 ENTRY UNSUBS unsubstitute a block 452 453 BEGFRAME stack frame for SUBSTITUTE and UNSUBS 00178801 6 BASE 454 SUBSR34 BSS 2 save area for R3,R4 00178803 6 BASE 455 SUBSBLK BSS 1 block number to (un)substitute 456 ENDFRAME 457 0506E DD5F8004 6 STAK 458 SUBSTITUTE ENTRNP PUSH 0506F 60490081 1 4 ZBM 459 LD R1 PPL,PPBLOCK/VOLFIELD fetch the volume number 05070 FA4250B2 1 460 JEQZ R1 RETURN jump if no volume number given 05071 60621F22 1 1 461 LD R1 VOLNTABLE(R1) get the VOLN ptr 05072 5C084A10 1 ZBM 462 CMZ R1,VOLNMOUNT is this volume mounted? 05073 FE0C50B2 463 JNE RETURN do not substitute if not 05074 5C087181 1 ZBM 464 CMZ R1,VOLNSUBBLK substitutions allowed on this volume 05075 FE0250B2 465 JEQ RETURN no subs block, skip starting this process 05076 60893461 2 4 ZBM 466 LD R2 PPL,PPBLOCK/PPHASHFLD get proper hash code 467 PLOCK PPAGELOCK(R2) lock the list 05077 0CC00000 467 IOFF 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1092 (SPROCSTART) F 54 System Process Start Routine 05078 D1E41E21 2 467 SETT PPAGELOCK(R2) 05079 FE0C507B 467 JNE MA(2+DISPW MA 0) 0507A DC40308B 467 CALLNP LOCKWAIT 0507B D0170802 4 BASE 468 INC PPL,PPBUSYWORD say we are using it 469 PUNLOCK PPAGELOCK(R2) release the list 0507C EC241E21 2 469 STZ PPAGELOCK(R2) 0507D 0C800000 469 ION 0507E 60170801 0 4 BASE 470 LD R0 PPL,PPBLOCK 0507F E4178803 0 6 BASE 471 ST R0 SP,SUBSBLK save block number 05080 EC0BC010 7 CBM 472 STZ R7/BIT 0 flag for substitute 05081 FE0E5085 473 JMP SUBSCOMMON go to common routine 474 * --- 475 476 ********************************************************************************** 477 * * 478 * UNSUBS * 479 * This routine initiates the unsubstitution of a * 480 * substituted block. PUTFREEBLK calls this routine if * 481 * the MS address being freed is in the global substitution * 482 * list. Since the address is no longer in use and the bad * 483 * block is already in the bad tracks list, this process just * 484 * removes the substitution list entry and returns the good * 485 * block to the ADT. This is done in a separate process from * 486 * PUTFREEBLK (PUTADT) so that it can suspend. * 487 * * 488 * Call: * 489 * CALL UNSUBS * 490 * PARVL block number (including volume) * 491 * * 492 * Eats R0:R2. * 493 * Stack required = 7, See SUBSTITUTE. * 494 * * 495 ********************************************************************************** 496 05082 DD1F8004 6 STAK 497 UNSUBS ENTR PUSH 05083 C0578803 6 BASE 498 STPVL SP,SUBSBLK save block number 05084 EDCBC010 7 CBM 499 STW R7/BIT 0 flag for unsubstitute 500 * \ / 501 00005085 502 SUBSCOMMON LABEL 05085 E6D78801 346 BASE 503 ST2 R3 SP,SUBSR34 save bothersome registers 05086 DC002ED0 504 CALL SGETMEM get a substitution queue element 05087 40440001 IMM 505 PARVL SUBQLOG size of element 05088 EC160800 0 BASE 506 STZ R0,SUBQWORDA clear request code and chain link 05089 604BC010 1 7 CBM 507 LD R1 R7/BIT 0 get request code 0508A E4480080 1 0 ZBM 508 ST R1 R0,SUBQREQ save it 0508B 60920000 2 0 REG 509 LD R2 R0 R2 = ADR SUBQ element 0508C 60178803 0 6 BASE 510 LD R0 SP,SUBSBLK 0508D E4168801 0 2 BASE 511 ST R0 R2,SUBQBLOCK save block number 512 TRACE SUBSTRACE,SUBTELEM 0508E 5D401D32 512 XCT TRACECALL(SUBSTRACE) 0508F FEC000C2 512 NOP (SUBSTRACE*BITS 22:26)+(SUBTELEM*BITS 27:31) 513 05090 60088081 0 2 ZBM 514 LD R0 R2,SUBQBLOCK/VOLFIELD R0 = volume number 05091 61201F22 4 0 515 LD VLN VOLNTABLE(R0) get the VOLN element pointer 516 PLOCK (VLN,VOLNSUBQL) lock the substitution queue 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1093 (SPROCSTART) F 54 System Process Start Routine 05092 0CC00000 516 IOFF 05093 D1D7080B 4 BASE 516 SETT (VLN,VOLNSUBQL) 05094 FE0C5096 516 JNE MA(2+DISPW MA 0) 05095 DC40308B 516 CALLNP LOCKWAIT 05096 60040000 0 IMM 517 LD R0 0 value of nil pointer 05097 3857080A 1 4 BASE 518 LEA R1 VLN,VOLNSUBQ address of list pointer 05098 3C085F10 0 1 ZBM 519 LSRCH R0 R1,SUBQLINK R1 = ADR last element on list (can't fail) 05099 E4885F10 2 1 ZBM 520 ST R2 R1,SUBQLINK put new element at end of list 521 PUNLOCK (VLN,VOLNSUBQL) unlock the list 0509A EC17080B 4 BASE 521 STZ (VLN,VOLNSUBQL) 0509B 0C800000 521 ION 522 0509C 5C001C6B 523 CMZ BOOTFLAG are we still in the bootstrap 0509D FE0C50B1 524 JNE SUBSDONE don't start process if booting 525 SETTBIT VLN,VOLNSBFLAG say substitution process exists 0509E 60022000 0 IMM 525 LD R0 1*BIT(((VLN,VOLNSBFLAG) DISP (VLN,0))/BITS 0:4) 0509F FC170800 0 4 BASE 525 IORM R0 VLN,(((VLN,VOLNSBFLAG) DISP (VLN,0))/BITS 15:31) 050A0 FE0250B1 526 JEQ SUBSDONE jump if already existed 050A1 D0170815 4 BASE 527 INC VLN,VOLNBUSY subs process is using volume 050A2 0CC00000 528 IOFF disallow any interrupts 050A3 DC0035D2 529 CALL BLDPROCESS build the process 050A4 4144F1F0 IMM 530 PARV MONMSR runs in monitor state 050A5 434050B3 531 PARV2 RADSUBNAME pass the process name 050A6 414453AC IMM 532 PARV ADR SUBSPROC initial PC 050A7 40440001 IMM 533 PARVL 1 it is a system process 050A8 6088DF10 2 3 ZBM 534 LD R2 R3,PSCACHN R2 = ADR process's console area 050A9 60098083 0 6 ZBM 535 LD R0 SP,SUBSBLK/VOLFIELD 050AA E4168806 0 2 BASE 536 ST R0 R2,CAR4 initialize process's R4 537 TRACE SUBSTRACE,SUBTBPROC 050AB 5D401D32 537 XCT TRACECALL(SUBSTRACE) 050AC FEC000C3 537 NOP (SUBSTRACE*BITS 22:26)+(SUBTBPROC*BITS 27:31) 050AD DC402B99 538 CALLNP SETRUNNING set process running 050AE DC0025EB 539 CALL MAPINMEM re-map original caller 050AF 40400412 540 PARVL CPPSA pointer to his PSA 050B0 0C800000 541 ION restore interrupts 000050B1 542 SUBSDONE LABEL 050B1 62D78801 346 BASE 543 LD2 R3 SP,SUBSR34 restore bothersome registers 000050B2 544 RETURN LABEL 050B2 5D1F8004 6 STAK 545 LEAVE POP and return 546 * --- 547 050B3 B674FA67 548 RADSUBNAME PAK12 SYS_SUBSPROC 549 550 END SUBSTITUTE and UNSUBS subroutines 551 552 END PROCSTART routines that start other processes 98 INPUT SYSPROCESS system housekeeping processes 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1094 (SYSPROCESS) F 55 Disk Structure Freeing Process 3 4 BLOCK System Processes 5 6 ENTRY DMNTSTRT volume dismount 7 ENTRY ELPRESTART error logger 8 ENTRY FFPRESTART freefiler 9 ENTRY PADTRSTRT ADT get/put 10 ENTRY PATCHPROC CPU u-code patch 11 ENTRY REMOVECPU disengage CPU 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1095 (SYSPROCESS) F 55 Disk Structure Freeing Process 13 14 BLOCK SYS_FREEFILE process 15 16 ENTRY FFPRESTART 17 18 ********************************************************************************** 19 * * 20 * This separate process runs whenever there is an element * 21 * in the list of structures to be freed. This process takes * 22 * elements off of the list and sets each free block to ones. * 23 * The mass storage driver is told to free the blocks after * 24 * they have been written out. * 25 * * 26 ********************************************************************************** 27 000050B5 28 FFPTMPP BASE R5 temp area used by free file process 29 BSS FFLNTH first is like queue element 00094183 5 ZBM 30 LASTBLOCK BSSB MSBLKLOG last block referenced 00097183 5 ZBM 31 MAJORACS BSSB MSBLKLOG major access 00096184 5 ZBM 32 MINORACS BSSB MSBLKLOG minor access block of subtree 00174015 5 CACH 33 MINACSTYP BSSB 8 type of minor access block freeing 34 DRCT 00000003 ABS 35 FFTEMPLOG EQU (DISP FFPTMPP) LOG 2 36 ORG FFPTMPP 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1096 (SYSPROCESS) F 55 Disk Structure Freeing Process 38 39 ********************************************************************************** 40 * * 41 * SYS_FREEFILE - free file process * 42 * * 43 * Stack required = 11. WARNING!!! See STACKSIZE below. * 44 * 0 + max ( DISMOUNT (3), DODIR (11), ERRORLOG (3), * 45 * FREEFILE (3), FREESTACK (0), GETSTACK (0), * 46 * GRUBWNDOx (7), LIQUIDATE (7), LOCKWAIT (0), * 47 * MAPOUTFBI (2), RAFSUBTREE (11), SETWNDOx (4), * 48 * SFREEMEM (0), SGETMEM (0), ZOTBLOCK (8), * 49 * ZOTRAFBLK (10) ) * 50 * * 51 ********************************************************************************** 52 53 BLOCK SYS_FREEFILE process 54 ENTRY FFPRESTART 55 0000000F ABS 56 STACKSIZE EQU 15 size of stack to get 57 000050B5 58 FFPRESTART LABEL 050B5 DC00286A 59 CALL GETSTACK acquire a stack 050B6 4044000F IMM 60 PARVL STACKSIZE 050B7 61440000 5 IMM 61 LD R5 0 no temp allocated 62 * \ / 63 000050B8 64 FFPAGAIN LABEL the loop -- get the next structure 65 PLOCK FFLOCK lock the free file list => lock word 050B8 0CC00000 65 IOFF 050B9 D1C01D7A 65 SETT FFLOCK 050BA FE0C50BC 65 JNE MA(2+DISPW MA 0) 050BB DC40308B 65 CALLNP LOCKWAIT 050BC 61001D7B 4 66 LD R4 FFLIST get pointer to a structure 050BD FB30518A 4 67 JZA R4 FFPDONE jump if nothing to do 050BE 60091F10 0 4 ZBM 68 LD R0 R4,FFLINK get pointer to next one 050BF E4001D7B 0 69 ST R0 FFLIST unlink ours 050C0 D0401D81 70 DEC FFLISTSIZ one less element in list 71 PUNLOCK FFLOCK unlock the free file list => lock word 050C1 EC001D7A 71 STZ FFLOCK 050C2 0C800000 71 ION 72 * \ / 73 74 ********************************************************************************** 75 * * 76 * A structure to free has been found. See if our temp * 77 * region has been allocated. * 78 * * 79 ********************************************************************************** 80 81 * \ / 050C3 FB7250C7 5 82 JNZA R5 FFPTMPGOT jump if already allocated 050C4 DC002ED0 83 CALL UGETMEM get our temp area 050C5 40440003 IMM 84 PARVL FFTEMPLOG 050C6 E4134000 0 5 REG 85 ST R0 R5 000050C7 86 FFPTMPGOT LABEL 050C7 60130000 0 4 REG 87 LD R0 R4 get pointer to the free file queue element 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1097 (SYSPROCESS) F 55 Disk Structure Freeing Process 050C8 6044000C 1 IMM 88 LD R1 FFLNTH*CPW get the length of the information 050C9 60934000 2 5 REG 89 LD R2 R5 get pointer to this process temp element 050CA FE400000 90 CMOVE copy the freeing information 050CB DC002F5D 91 CALL SFREEMEM free the queue element 050CC 41440002 IMM 92 PARV FFLOG 050CD 40530000 4 REG 93 PARVL R4 050CE EC094183 5 ZBM 94 STZ R5,LASTBLOCK last block was not there 050CF 60094080 0 5 ZBM 95 LD R0 R5,FFTYPE get the type we're freeing 050D0 64040016 0 IMM 96 CPR R0 FFTMAX reasonable value? 050D1 FE0850D3 97 JLT FFPDOIT jump if good 050D2 001310B0 98 HALT HALTS10B0 passed garbage for type to free 99 * --- 100 000050D3 101 FFPDOIT LABEL 050D3 60574801 1 5 BASE 102 LD R1 R5,FFBLOCK R1 holds block number 050D4 5CA050D5 0 103 LDPC FFPSTRUCT(R0) 104 * --- 105 000050D5 106 FFPSTRUCT LABEL 050D5 00005133 107 ADR FFPUNKNOWN 000 - type of block unknown 050D6 0000513B 108 ADR FFPSINGLE 001 - pack label 050D7 0000513B 109 ADR FFPSINGLE 002 - bad trax list 050D8 0000513B 110 ADR FFPSINGLE 003 - bootstrap 050D9 0000513B 111 ADR FFPSINGLE 004 - volume label 050DA 0000513B 112 ADR FFPSINGLE 005 - substitution list 050DB 0000513B 113 ADR FFPSINGLE 006 - security block 050DC 0000513B 114 ADR FFPSINGLE 007 - single ADT block 050DD 0000513B 115 ADR FFPSINGLE 008 - IDX block 050DE 00005147 116 ADR FFPDIR 009 - UDIR and subsidiary elements 050DF 0000516F 117 ADR FFPUDIR2 00A - UDIR2 and subsidiary elements 050E0 00005146 118 ADR FFPSYS 00B - swapping block 050E1 000050EB 119 ADR FFPSAF 00C - entire SAF 050E2 00005115 120 ADR FFPLRAF 00D - RAF major access and subsidiary elements 050E3 0000510D 121 ADR FFPSRAF 00E - RAF minor access and subsidiary data blocks 050E4 0000513B 122 ADR FFPSINGLE 00F - RAF data block 050E5 0000513B 123 ADR FFPSINGLE 010 - AFT 050E6 0000513B 124 ADR FFPSINGLE 011 - account share list block 050E7 0000513B 125 ADR FFPSINGLE 012 - file share list block 050E8 00005111 126 ADR FFPCODE 013 - CCB and subsidiary blocks 050E9 0000513B 127 ADR FFPSINGLE 014 - code data block 050EA 0000513B 128 ADR FFPSINGLE 015 - auth list block 00000016 ABS 129 FFTMAX EQU DISPW FFPSTRUCT size of the table 130 131 ********************************************************************************** 132 * * 133 * Free a sequential file. * 134 * * 135 ********************************************************************************** 136 000050EB 137 FFPSAF LABEL 050EB 5C095181 5 ZBM 138 CMZ R5,FFMSBLK another block to free 050EC FE025185 139 JEQ FFPFREED jump if none 050ED DC003205 140 CALL SETWNDO1 get this block in 050EE 41440002 IMM 141 PARV VPCNTLLK+VPCNTLW 050EF 41440000 IMM 142 PARV VPNOFCB indicate no lun associated with us 050F0 410050FC 143 PAR FFBWERROR 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1098 (SYSPROCESS) F 55 Disk Structure Freeing Process 050F1 41574801 5 BASE 144 PARV R5,FFBLOCK 050F2 4044067F IMM 145 PARVL FBITSAF*VPFBIOLDB+FBITFREE*VPFBINEWB 050F3 60095181 0 5 ZBM 146 LD R0 R5,FFMSBLK get current block number 050F4 E0094183 0 5 ZBM 147 EXCH R0 R5,LASTBLOCK exchange with the last block 050F5 FA0250F8 0 148 JEQZ R0 FFPFILEBG jump if no last block to check 050F6 64089182 0 2 ZBM 149 CPR R0 R2,FBIBLINK check backward link 050F7 FE0C5102 150 JNE FFPFILEE jump if bad link 000050F8 151 FFPFILEBG LABEL 050F8 60089180 0 2 ZBM 152 LD R0 R2,FBIFLINK 050F9 E4095181 0 5 ZBM 153 ST R0 R5,FFMSBLK save forward link 050FA DC4051B2 154 CALLNP ZOTBLOCK make the block free, unmaps FBI 050FB FE0E50EB 155 JMP FFPSAF 156 * --- 157 158 * Error in referencing the block 000050FC 159 FFBWERROR LABEL 050FC DC40261B 160 CALLNP MAPOUTFBI unmap FBI, ION 050FD DC403150 161 CALLNP GRUBWNDO1 release this window 050FE DC005048 162 CALL ERRORLOG out with an error message 050FF 4144060A IMM 163 PARV ERLCFSAF error while freeing .SAF 05100 40574801 5 BASE 164 PARVL R5,FFBLOCK indicate the ms address 05101 FE0E5185 165 JMP FFPFREED fake like we're done 166 * --- 167 168 * Links bad on freeing sequential file - error message 00005102 169 FFPFILEE LABEL 05102 E4094183 0 5 ZBM 170 ST R0 R5,LASTBLOCK save the block number 05103 61089182 4 2 ZBM 171 LD R4 R2,FBIBLINK get the back pointer 05104 DC40261B 172 CALLNP MAPOUTFBI unmap FBI, ION 05105 60840000 2 IMM 173 LD R2 0 DEBUG safety, kill pointer 05106 DC403150 174 CALLNP GRUBWNDO1 release the block 05107 DC005048 175 CALL ERRORLOG queue up an error message 05108 41440E09 IMM 176 PARV ERLCBLNK indicate type of error 05109 41574801 5 BASE 177 PARV R5,FFBLOCK indicate the ms address 0510A 41494183 5 ZBM 178 PARV R5,LASTBLOCK ms address of who pointed here 0510B 40530000 4 REG 179 PARVL R4 and our backward link 0510C FE0E5185 180 JMP FFPFREED fake like we're done 181 * --- 182 183 184 ********************************************************************************** 185 * * 186 * Free a small RAF. * 187 * * 188 ********************************************************************************** 189 0000510D 190 FFPSRAF LABEL 0510D DC0051CC 191 CALL RAFSUBTREE free the structure 0510E 4144000E IMM 192 PARV FBITSRAF 0510F 40495181 5 ZBM 193 PARVL R5,FFMSBLK 05110 FE0E5185 194 JMP FFPFREED get next structure to free 195 * --- 196 197 198 ********************************************************************************** 199 * * 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1099 (SYSPROCESS) F 55 Disk Structure Freeing Process 200 * Free a CODE file. * 201 * * 202 ********************************************************************************** 203 00005111 204 FFPCODE LABEL 05111 DC0051CC 205 CALL RAFSUBTREE free the structure 05112 41440013 IMM 206 PARV FBITCCB 05113 40495181 5 ZBM 207 PARVL R5,FFMSBLK 05114 FE0E5185 208 JMP FFPFREED find next thing to free 209 * --- 210 211 212 ********************************************************************************** 213 * * 214 * Free a large RAF * 215 * * 216 ********************************************************************************** 217 00005115 218 FFPLRAF LABEL 05115 60095181 0 5 ZBM 219 LD R0 R5,FFMSBLK 05116 E4097183 0 5 ZBM 220 ST R0 R5,MAJORACS save the major access block number 05117 DC003205 221 CALL SETWNDO1 get the major access block in 05118 41440001 IMM 222 PARV VPCNTLRO indicate read only 05119 41440000 IMM 223 PARV VPNOFCB indicate no lun associated with us 0511A 41005131 224 PAR FFPLRAFMER pass the error return address 0511B 41574801 5 BASE 225 PARV R5,FFBLOCK pass the MS address 0511C 4044000D IMM 226 PARVL FBITLRAF indicate type of block expected 0511D 610403FF 4 IMM 227 LD R4 WPP-1 number of pointers in an access block 0000511E 228 FFPLRAFLP LABEL 0511E 60280800 0 4 229 LD R0 WNDO1(R4) get a possible pointer 0511F 7800254F 0 230 AND R0 MSBLKMASK isolate a clean block number 05120 FA025125 0 231 JEQZ R0 FFPLRAFEL jump if no block indicated 05121 E4095181 0 5 ZBM 232 ST R0 R5,FFMSBLK make complete MS address of minor access block 05122 DC004FEA 233 CALL FREEFILE call to free the subtree 05123 41574801 5 BASE 234 PARV R5,FFBLOCK indicate MS address 05124 4044000E IMM 235 PARVL FBITSRAF and type 00005125 236 FFPLRAFEL LABEL 05125 FB26511E 4 237 JDR R4 FFPLRAFLP try next pointer or quit 238 * \ / 239 05126 60097183 0 5 ZBM 240 LD R0 R5,MAJORACS 05127 E4095181 0 5 ZBM 241 ST R0 R5,FFMSBLK restore the address in major block 05128 DC003205 242 CALL SETWNDO1 get the block in locked 05129 41440002 IMM 243 PARV VPCNTLW+VPCNTLLK this time with write access 0512A 41440000 IMM 244 PARV VPNOFCB indicate no lun associated with us 0512B 41005130 245 PAR FFPLRAFMR1 0512C 41574801 5 BASE 246 PARV R5,FFBLOCK 0512D 404406FF IMM 247 PARVL FBITLRAF*VPFBIOLDB+FBITFREE*VPFBINEWB 0512E DC4051B2 248 CALLNP ZOTBLOCK free the major access block, unmaps FBI 0512F FE0E5185 249 JMP FFPFREED 250 * --- 251 252 * Error referencing the major access block 253 00005130 254 FFPLRAFMR1 LABEL 05130 DC40261B 255 CALLNP MAPOUTFBI unmap FBI, ION 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1100 (SYSPROCESS) F 55 Disk Structure Freeing Process 00005131 256 FFPLRAFMER LABEL 05131 DC403150 257 CALLNP GRUBWNDO1 release grip on this window 258 * Error message out 05132 FE0E5185 259 JMP FFPFREED 260 * --- 261 262 263 ********************************************************************************** 264 * * 265 * Free a single block of unspecified type. We use the control * 266 * bit that causes the disk driver to forego any FBI checking * 267 * so this may be used to free very screwed up blocks. * 268 * * 269 ********************************************************************************** 270 00005133 271 FFPUNKNOWN LABEL 05133 DC003205 272 CALL SETWNDO1 get the block in core 05134 4144001A IMM 273 PARV VPCNTLLK+VPCNTLNR locked and dont actually read page 05135 41440000 IMM 274 PARV VPNOFCB indicate no lun associated with us 05136 41005182 275 PAR FFPBLKBAD if the block comes in bad 05137 41574801 5 BASE 276 PARV R5,FFBLOCK 05138 40440000 IMM 277 PARVL 0 indicate that the FBI is not to be checked 05139 DC4051B2 278 CALLNP ZOTBLOCK make the block virgin, unmaps FBI 0513A FE0E5185 279 JMP FFPFREED try for another 280 * --- 281 282 283 ********************************************************************************** 284 * * 285 * Routine to free a single block. The FBI type of the * 286 * block is the same as the structure type that we were told * 287 * to free. * 288 * * 289 ********************************************************************************** 290 0000513B 291 FFPSINGLE LABEL 0513B DC003205 292 CALL SETWNDO1 make the block resident 0513C 41440002 IMM 293 PARV VPCNTLLK+VPCNTLW locked and writable 0513D 41440000 IMM 294 PARV VPNOFCB indicate no lun associated with us 0513E 41005182 295 PAR FFPBLKBAD if the block comes in bad 0513F 41574801 5 BASE 296 PARV R5,FFBLOCK specify MS address 05140 60094080 0 5 ZBM 297 LD R0 R5,FFTYPE get the current block type 05141 600A0E00 0 0 CBM 298 LD R0 R0*VPFBIOLDB move to old type position 05142 1804007F 0 IMM 299 ADD R0 FBITFREE*VPFBINEWB indicate the new type 05143 40520000 0 REG 300 PARVL R0 pass the FBI type indicating conversion 05144 DC4051B2 301 CALLNP ZOTBLOCK make the block virgin, unmaps FBI 05145 FE0E5185 302 JMP FFPFREED try for another element 303 * --- 304 305 ********************************************************************************** 306 * * 307 * Request to free a swapping block. Execution should * 308 * never get here because swapping blocks need never be * 309 * written out since they cannot be part of any * 310 * MS structure. The security problems are insignificant, since * 311 * even if one becomes part of a file ( which can happen in a * 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1101 (SYSPROCESS) F 55 Disk Structure Freeing Process 312 * crash ), the FBI type would not match when it was read in. * 313 * The routine that finds a swapping block free will set * 314 * the PPUTADT bit in the PPL and then release its PAL which * 315 * will cause the block number to become free without any * 316 * more mass storage transfers. * 317 * * 318 ********************************************************************************** 319 00005146 320 FFPSYS LABEL 05146 001310B2 321 HALT HALTS10B2 FREEFILE called to free swapping block 322 * --- 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1102 (SYSPROCESS) F 55 Disk Structure Freeing Process 324 325 ********************************************************************************** 326 * * 327 * Free a UDIR * 328 * Section to get rid of a UDIR. If the directory is * 329 * a small type, we call DODIR to dump the files, then * 330 * free the rest. If a large dir, we free all of the * 331 * UDIR2 elements, then free the rest. * 332 * * 333 ********************************************************************************** 334 00005147 335 FFPDIR LABEL 05147 E4496184 1 5 ZBM 336 ST R1 R5,MINORACS save address of UDIR 05148 DC0031FF 337 CALL SETWNDO2 get in the UDIR1 block 05149 41440001 IMM 338 PARV VPCNTLRO only reading this time 0514A 41440000 IMM 339 PARV VPNOFCB indicate no lun associated with us 0514B 41005160 340 PAR UD1MSER error address 0514C 41574801 5 BASE 341 PARV R5,FFBLOCK pass the MS address 0514D 40440009 IMM 342 PARVL FBITUDIR1 indicate type of block 0514E 60C40C00 3 IMM 343 LD R3 ADR WNDO2 get address of block 0514F 61040C60 4 IMM 344 LD R4 ADR WNDO2(UDFDLIST) point to FD or index part 05150 5C08C01A 3 ZBM 345 CMZ R3,UDTYPE check to see if small or large 05151 FE0C5165 346 JNE BIGDIR jump if large - free UDIR2 blocks 05152 DC405194 347 CALLNP DODIR small dir - free all files 00005153 348 DIRSHL LABEL 05153 60800C3C 2 349 LD R2 WNDO2(UDSHLLIST)/SHLFLAGW check for MS resident share list 05154 F2805157 2 350 JBF R2/SHLDSKFLGB NOSHLIST jump if none on MS 05155 DC0051EE 351 CALL ZOTRAFBLK call to dump the block 05156 40440011 IMM 352 PARVL FBITASLB type is account share list 00005157 353 NOSHLIST LABEL 05157 60800C40 2 354 LD R2 WNDO2(UDAUTHLIST) check for auth list 05158 FA82515B 2 355 JEQZ R2 NOAUTHLIST jump if not 356 * (should be released before here by destroy account) 05159 DC0051EE 357 CALL ZOTRAFBLK destroy a single block 0515A 40440015 IMM 358 PARVL FBITAUTLB indicate its type 0000515B 359 NOAUTHLIST LABEL 0515B 60896184 2 5 ZBM 360 LD R2 R5,MINORACS get address of this UDIR 0515C DC0051EE 361 CALL ZOTRAFBLK destroy it 0515D 40440009 IMM 362 PARVL FBITUDIR1 indicate type 0515E DC403153 363 CALLNP GRUBWNDO2 release the window 0515F FE0E5185 364 JMP FFPFREED jump off, structure completed 365 * --- 366 00005160 367 UD1MSER LABEL MS error in block 05160 DC403153 368 CALLNP GRUBWNDO2 free up the window 05161 DC005048 369 CALL ERRORLOG call to log the error 05162 4144060B IMM 370 PARV ERLCFUD1 pass error code 05163 40574801 5 BASE 371 PARVL R5,FFBLOCK indicate MS address in error 05164 FE0E5185 372 JMP FFPFREED pretend success 373 * --- 374 375 ********************************************************************************** 376 * * 377 * We have the UDIR1 of a large DIR in window 2. * 378 * Call FREEFILE for each of the UDIR2 blocks in it. * 379 * We don't use FREESPEC here. This way, we get rid * 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1103 (SYSPROCESS) F 55 Disk Structure Freeing Process 380 * of UDIR1 blocks as rapidly as possible (good, since * 381 * they can be confusing on a system rebuild). * 382 * * 383 ********************************************************************************** 384 00005165 385 BIGDIR LABEL 00005165 386 NEXTINDX LABEL 05165 60C91183 3 4 ZBM 387 LD R3 R4,UDINDXADR get the MS address of the next block 05166 FAC25153 3 388 JEQZ R3 DIRSHL jump if end of UDIR1 index 05167 E4C95181 3 5 ZBM 389 ST R3 R5,FFMSBLK combine with volume 05168 DC004FEA 390 CALL FREEFILE call to free the structure 05169 41574801 5 BASE 391 PARV R5,FFBLOCK pass the MS address 0516A 4044000A IMM 392 PARVL FBITUDIR2 and type 0516B 19040005 4 IMM 393 ADD R4 UDINDXLEN advance to next UDIR1 index entry 0516C 65040FF8 4 IMM 394 CPR R4 ADR WNDO2(UD1LINDX) check for done 0516D FE0A5165 395 JLE NEXTINDX jump back if more elements 0516E FE0E5153 396 JMP DIRSHL go free up account share list and UDIR1 397 * --- 398 399 ********************************************************************************** 400 * * 401 * Free a UDIR2 * 402 * Section called to destroy all of the entries in a UDIR2 * 403 * by calling FREESPEC for each file in it. Afterwards, the * 404 * UDIR2 block itself is destroyed. * 405 * FREESPEC is used so that a very large directory * 406 * does not have all of its UDIR2 elements freed, then * 407 * have all files in each one of them freed. This could * 408 * lead to 12000 elements in the free list. Instead, * 409 * all of the UDIR2 elements are freed (max of 185 free * 410 * list elements), then one of those is freed (max of * 411 * 42 more free list elements), then all of those 42 * 412 * files are freed before we continue. This limits the * 413 * maximum size of the free file list to no more than * 414 * about 230 for each directory freed. * 415 * * 416 ********************************************************************************** 417 0000516F 418 FFPUDIR2 LABEL 0516F E4496184 1 5 ZBM 419 ST R1 R5,MINORACS save address of structure head 05170 DC0031FF 420 CALL SETWNDO2 get in the UDIR2 block 05171 41440001 IMM 421 PARV VPCNTLRO only reading now 05172 41440000 IMM 422 PARV VPNOFCB indicate no lun associated with us 05173 4100517D 423 PAR UD2MSER error address 05174 41574801 5 BASE 424 PARV R5,FFBLOCK pass the MS address 05175 4044000A IMM 425 PARVL FBITUDIR2 indicate type of block expected 426 05176 61040C00 4 IMM 427 LD R4 ADR WNDO2 load address of FD part 05177 DC405194 428 CALLNP DODIR release all of the files 05178 60896184 2 5 ZBM 429 LD R2 R5,MINORACS get MS address of UDIR2 05179 DC0051EE 430 CALL ZOTRAFBLK free it 0517A 4044000A IMM 431 PARVL FBITUDIR2 indicate type 0517B DC403153 432 CALLNP GRUBWNDO2 remove from VM list 0517C FE0E5185 433 JMP FFPFREED done with current element 434 * --- 435 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1104 (SYSPROCESS) F 55 Disk Structure Freeing Process 0000517D 436 UD2MSER LABEL 0517D DC403153 437 CALLNP GRUBWNDO2 release the window 0517E DC005048 438 CALL ERRORLOG record the error 0517F 4144060C IMM 439 PARV ERLCFUD2 indicate the type of error 05180 40574801 5 BASE 440 PARVL R5,FFBLOCK indicate MS address at fault 05181 FE0E5185 441 JMP FFPFREED pretend done 442 * --- 443 444 ********************************************************************************** 445 * An individual block was found to be bad. Output an * 446 * error message and ignore the problem. * 447 ********************************************************************************** 448 00005182 449 FFPBLKBAD LABEL 450 * call ERRORLOG 05182 DC40261B 451 CALLNP MAPOUTFBI unmap FBI, ION 05183 DC403150 452 CALLNP GRUBWNDO1 release this window for swapping 05184 FE0E5185 453 JMP FFPFREED get the next thing to free 454 * --- 455 456 ********************************************************************************** 457 * * 458 * The last structure finished - free usage of the volume * 459 * and see if there is more to free. * 460 * * 461 ********************************************************************************** 462 00005185 463 FFPFREED LABEL 05185 D0574C02 5 FPVR 464 DEC @(R5,FFVOLBPTR) remove busy count for FF element 05186 FE0C50B8 465 JNE FFPAGAIN skip dismount volume check 05187 DC005034 466 CALL DISMOUNT check if volume needs dismounting 05188 40574802 5 BASE 467 PARVL R5,FFVOLBPTR pointer to the VOLN element 05189 FE0E50B8 468 JMP FFPAGAIN try for something new to free 469 * --- 470 471 472 ********************************************************************************** 473 * * 474 * Nothing in free list, stop myself * 475 * * 476 ********************************************************************************** 477 0000518A 478 FFPDONE LABEL 0518A FB70518E 5 479 JZA R5 FFPDONENT jump if no temp area allocated 0518B DC002F5D 480 CALL UFREEMEM return my temp area 0518C 41440003 IMM 481 PARV FFTEMPLOG 0518D 40534000 5 REG 482 PARVL R5 0000518E 483 FFPDONENT LABEL 0518E D0401D82 484 DEC FFPROCS one less free file process 485 PUNLOCK FFLOCK release the list 0518F EC001D7A 485 STZ FFLOCK 05190 0C800000 485 ION 05191 DC002875 486 CALL FREESTACK free our stack 05192 4044000F IMM 487 PARVL STACKSIZE 05193 FE0E2DAC 488 JMP LIQUIDATE destroy this process 489 * --- 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1105 (SYSPROCESS) F 55 Disk Structure Freeing Process 490 491 END FFPINIT and FFPRESTART routines 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1106 (SYSPROCESS) F 55 Disk Structure Freeing Process 493 494 ********************************************************************************** 495 * * 496 * This section scans a file directory and produces * 497 * a FFPLIST entry for each element that it finds. * 498 * Enter with R4 => first FD element. * 499 * * 500 * Stack required = 11 * 501 * 1 + max ( FREESPEC (3), ZOTRAFBLK (10) ) * 502 * * 503 ********************************************************************************** 504 505 BLOCK DODIR subroutine 506 ENTRY DODIR 507 508 BEGFRAME 509 ENDFRAME 510 05194 DD5F8001 6 STAK 511 DODIR ENTRNP PUSH 00005195 512 DODLOOP LABEL 513 * do the share list 05195 60970814 2 4 BASE 514 LD R2 R4,FDSHL/SHLFLAGW get the indicator word 05196 F2805199 2 515 JBF R2/SHLDSKFLGB SHSHLIST jump if no MS block 05197 DC0051EE 516 CALL ZOTRAFBLK dump this block 05198 40440012 IMM 517 PARVL FBITFSLB indicate file share list block 00005199 518 SHSHLIST LABEL 05199 60092A60 0 4 ZBM 519 LD R0 R4,FDET get the entry type 0519A 64040003 0 IMM 520 CPR R0 MAXTYPE check for odd ball 0519B FE0451AD 521 JGT IGNORE skip entry if not understood 0519C 5CA0519D 0 522 LDPC DODTAB(R0) jump to appropriate handler 523 * --- 524 0000519D 525 DODTAB LABEL 0519D 000051B0 526 ADR DONE 0 - end of list 0519E 000051A1 527 ADR SEQFILE 1 - sequential file 0519F 000051A3 528 ADR RAFFIL 2 - .RAF 051A0 000051A7 529 ADR CODEFIL 3 - .CODE 00000003 ABS 530 MAXTYPE EQU 3 largest freeable type 531 000051A1 532 SEQFILE LABEL 051A1 6084000C 2 IMM 533 LD R2 FBITSAF get proper code for freer 051A2 FE0E51A8 534 JMP DODSHR go to shared code 535 * --- 536 000051A3 537 RAFFIL LABEL 051A3 60493C20 1 4 ZBM 538 LD R1 R4,FDRAFTYPE pick up the type of the RAF 051A4 60B2637F 2 1 @ 539 LD R2 @RAFFBITABP(R1) get the matching FBI type 051A5 FA8251AD 2 540 JEQZ R2 IGNORE ignore this if an empty RAF 051A6 FE0E51A8 541 JMP DODSHR go share code 542 * --- 543 000051A7 544 CODEFIL LABEL 051A7 60840013 2 IMM 545 LD R2 FBITCCB get proper code for code file 546 * \ / 000051A8 547 DODSHR LABEL 051A8 60091185 0 4 ZBM 548 LD R0 R4,FDDA get MS address of structure head 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1107 (SYSPROCESS) F 55 Disk Structure Freeing Process 051A9 E4095181 0 5 ZBM 549 ST R0 R5,FFMSBLK combine with volume 550 551 ********************************************************************************** 552 * We call a special routine to free these elements. This * 553 * is so that a huge directory doesn't put 12000 elements into * 554 * the free file list! * 555 ********************************************************************************** 556 051AA DC004FE5 557 CALL FREESPEC call to free element 051AB 41574801 5 BASE 558 PARV R5,FFBLOCK pass MS address 051AC 40528000 2 REG 559 PARVL R2 pass type 000051AD 560 IGNORE LABEL 051AD 19040018 4 IMM 561 ADD R4 FDLNTH advance to next entry 051AE 65040FE8 4 IMM 562 CPR R4 ADR WNDO2(UDLFDE) check for end of block 051AF FE0A5195 563 JLE DODLOOP return if more 000051B0 564 DONE LABEL 051B0 5D1F8001 6 STAK 565 LEAVE POP return to caller 566 * --- 567 568 END DODIR subroutine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1108 (SYSPROCESS) F 55 Disk Structure Freeing Process 570 571 ********************************************************************************** 572 * * 573 * ZOTBLOCK * 574 * Routine to make a free block. * 575 * Call: * 576 * SP => stack * 577 * R5 => FFTEMP block * 578 * R3 => PPL * 579 * associated page locked in window 1 * 580 * block for pages FBI mapped and IOFF * 581 * CALLNP ZOTBLOCK * 582 * * 583 * * 584 * Eats R0:R3. * 585 * Stack required = 8 * 586 * 1 + max ( GRUBWNDO1 (7), MAPOUTFBI (2) ) * 587 * * 588 * NOTE: It is possible that the disk driver is doing an idle-write * 589 * operation on the page at the same time that we are freeing * 590 * it. Therefore, the FBIDA field must be correct at all times. * 591 * Also, since this is possible, we clear the data before clearing * 592 * the FBI, so that there will never be a page on the disk that * 593 * appears to be free, but actually contains residual user data. * 594 * * 595 ********************************************************************************** 596 597 BLOCK ZOTBLOCK subroutine 598 ENTRY ZOTBLOCK 599 600 BEGFRAME 601 ENDFRAME 602 051B1 0000000C 603 FFWRITEMAX VFD 12 greatest number of disk writes before... 604 * ...FreeFile suspends 605 051B2 DD5F8001 6 STAK 606 ZOTBLOCK ENTRNP PUSH 051B3 60128000 0 2 REG 607 LD R0 R2 save loc of FBI 051B4 60441000 1 IMM 608 LD R1 CPP number of characters on the page 051B5 60840800 2 IMM 609 LD R2 ADR WNDO1 address of page 051B6 FE5800FF 610 CFILL 0FF fill it up with ones 051B7 60440024 1 IMM 611 LD R1 (FBILNTH-2)*CPW to clear FBI 051B8 38960802 2 0 BASE 612 LEA R2 R0,2 except for first two words 051B9 FE580000 613 CFILL 000 which must be treated specially 051BA 6042FE00 1 IMM 614 LD R1 FBITFREE*BITS 0:7 value for FBI word 0 051BB 6088D181 2 3 ZBM 615 LD R2 R3,PPBLOCK/MSBLKFIELD value for FBI word 1 051BC E6560800 120 BASE 616 ST2 R1 R0,0 clear first two words of FBI 617 SETTBIT R3,PPPUTADT cause the block number to... 051BD 60024000 0 IMM 617 LD R0 1*BIT(((R3,PPPUTADT) DISP (R3,0))/BITS 0:4) 051BE FC16C802 0 3 BASE 617 IORM R0 R3,(((R3,PPPUTADT) DISP (R3,0))/BITS 15:31) 618 * ...be put into ADT after writing 051BF 6008C081 0 3 ZBM 619 LD R0 R3,PPBLOCK/VOLFIELD get volume number for this block 051C0 60201F22 0 0 620 LD R0 VOLNTABLE(R0) get access to the VOLN element 051C1 D0160815 0 BASE 621 INC R0,VOLNBUSY busy volume for ADT element to be created later 051C2 DC40261B 622 CALLNP MAPOUTFBI unmap FBI, ION 051C3 DC403150 623 CALLNP GRUBWNDO1 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1109 (SYSPROCESS) F 55 Disk Structure Freeing Process 624 * \ / 625 626 ********************************************************************************** 627 * * 628 * If the free filer is handed a file that is mostly resident, we * 629 * create hundreds of disk writes while we're freeing. We then * 630 * control that many pages forever because we get one read of a new * 631 * page for every disk write that takes place. We prevent this * 632 * by suspending if the number of pending disk writes seems excessive. * 633 * * 634 ********************************************************************************** 635 636 * \ / 051C4 60001F19 0 637 LD R0 DISKWBUSY get the number of disk writes waiting 051C5 640051B1 0 638 CPR R0 FFWRITEMAX above the suspend threshold? 051C6 FE0A51CB 639 JLE ZOTEXIT jump if we keep going 051C7 60040140 0 IMM 640 LD R0 URDELAY a suspend request 051C8 60440002 1 IMM 641 LD R1 2 a little time 051C9 60840000 2 IMM 642 LD R2 0 051CA 09040000 IMM 643 UREQ 0 wait for the two seconds 644 * \ / 645 000051CB 646 ZOTEXIT LABEL 051CB 5D1F8001 6 STAK 647 LEAVE POP 648 * --- 649 650 END ZOTBLOCK subroutine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1110 (SYSPROCESS) F 55 Disk Structure Freeing Process 652 653 ********************************************************************************** 654 * * 655 * Routine to free a RAF subtree * 656 * Call: * 657 * SP => stack * 658 * R5 => FF temp block * 659 * CALL RAFSUBTREE * 660 * PARV * 661 * PARVL * 662 * * 663 * Uses window 2 to hold the root block and window * 664 * 1 for zotting. * 665 * * 666 * Eats R0:R3. * 667 * Stack required = 11 * 668 * 1 + max ( GRUBWNDOx (7), SETWNDO2 (4), ZOTRAFBLK (10) ) * 669 * * 670 ********************************************************************************** 671 672 BLOCK RAFSUBTREE subroutine 673 ENTRY RAFSUBTREE 674 675 BEGFRAME 676 ENDFRAME 677 051CC DD1F8001 6 STAK 678 RAFSUBTREE ENTR PUSH 051CD C1574015 5 CACH 679 STPV R5,MINACSTYP first param is type of root block 051CE C0495181 5 ZBM 680 STPVL R5,FFMSBLK second is addr of root block 051CF E4096184 0 5 ZBM 681 ST R0 R5,MINORACS save addr of root block 051D0 DC0031FF 682 CALL SETWNDO2 get root block in 051D1 41440001 IMM 683 PARV VPCNTLRO indicate read-only 051D2 41440000 IMM 684 PARV VPNOFCB indicate no lun associated with us 051D3 410051EB 685 PAR FFPMACSER error address 051D4 41574801 5 BASE 686 PARV R5,FFBLOCK 051D5 40574015 5 CACH 687 PARVL R5,MINACSTYP 051D6 610403E7 4 IMM 688 LD R4 CCBMAXPAGE-1 number of ptrs in CCB 051D7 60174015 0 5 CACH 689 LD R0 R5,MINACSTYP get type of root block 051D8 64040013 0 IMM 690 CPR R0 FBITCCB check for a code control block 051D9 FE0251DB 691 JEQ FFPSRAFLP jump if this is a CCB 051DA 610403FF 4 IMM 692 LD R4 WPP-1 otherwise, load number of ptrs in RAF minor access 000051DB 693 FFPSRAFLP LABEL 051DB 60A80C00 2 4 694 LD R2 WNDO2(R4) get a possible pointer 051DC 7880254F 2 695 AND R2 MSBLKMASK mask down to block number only 051DD FA8251E5 2 696 JEQZ R2 FFPSRAFNO jump if no block here 051DE DC0051EE 697 CALL ZOTRAFBLK free this block 051DF 60174015 0 5 CACH 698 LD R0 R5,MINACSTYP get type of minor access block 051E0 60440014 1 IMM 699 LD R1 FBITCODED get type for code data block 051E1 6404000E 0 IMM 700 CPR R0 FBITSRAF is minor access block a short .RAF? 051E2 FE0C51E4 701 JNE ITSACODE jump if not 051E3 6044000F 1 IMM 702 LD R1 FBITRAFD load type for .RAF data 051E4 40524000 1 REG 703 ITSACODE PARVL R1 pass type determined 000051E5 704 FFPSRAFNO LABEL 051E5 FB2651DB 4 705 JDR R4 FFPSRAFLP try the next pointer 051E6 60896184 2 5 ZBM 706 LD R2 R5,MINORACS get the addr of the root block 051E7 DC0051EE 707 CALL ZOTRAFBLK call to dump the access block 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1111 (SYSPROCESS) F 55 Disk Structure Freeing Process 051E8 40574015 5 CACH 708 PARVL R5,MINACSTYP indicate the type 051E9 DC403153 709 CALLNP GRUBWNDO2 take page out of VM list 051EA 5D1F8001 6 STAK 710 LEAVE POP 711 * --- 712 713 * error while fooling with minor access block 000051EB 714 FFPMACSER LABEL 051EB DC403150 715 CALLNP GRUBWNDO1 remove from VM list 051EC DC403153 716 CALLNP GRUBWNDO2 remove from VM list 051ED 5D1F8001 6 STAK 717 LEAVE POP return nonchalantly 718 * --- 719 720 END RAFSUBTREE subroutine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1112 (SYSPROCESS) F 55 Disk Structure Freeing Process 722 723 ********************************************************************************** 724 * * 725 * Free an individual block. * 726 * Call: * 727 * SP => stack * 728 * R5 => FF temp block * 729 * R2 = disk address * 730 * CALL ZOTRAFBLK * 731 * PARVL * 732 * Uses window 1 * 733 * * 734 * Eats R0:R3. * 735 * Stack required = 10 * 736 * 2 + max ( GRUBWNDO1 (7), MAPOUTFBI (2), SETWNDO1 (4), * 737 * ZOTBLOCK (8) ) * 738 * * 739 ********************************************************************************** 740 741 BLOCK ZOTRAFBLK subroutine 742 ENTRY ZOTRAFBLK 743 744 BEGFRAME 00178801 6 BASE 745 SAVER4 BSS 1 746 ENDFRAME 747 051EE DD1F8002 6 STAK 748 ZOTRAFBLK ENTR PUSH 051EF E5178801 4 6 BASE 749 ST R4 SP,SAVER4 save callers register 051F0 C0530000 4 REG 750 STPVL R4 051F1 610B0E00 4 4 CBM 751 LD R4 R4*VPFBIOLDB 051F2 1904007F 4 IMM 752 ADD R4 FBITFREE*VPFBINEWB 051F3 E4895181 2 5 ZBM 753 ST R2 R5,FFMSBLK construct a whole mass storage address 051F4 DC003205 754 CALL SETWNDO1 map in the block to be zotted 051F5 41440002 IMM 755 PARV VPCNTLW+VPCNTLLK 051F6 41440000 IMM 756 PARV VPNOFCB 051F7 410051FD 757 PAR ZOTRBLKERR 051F8 41574801 5 BASE 758 PARV R5,FFBLOCK 051F9 40530000 4 REG 759 PARVL R4 051FA DC4051B2 760 CALLNP ZOTBLOCK 051FB 61178801 4 6 BASE 761 LD R4 SP,SAVER4 051FC 5D1F8002 6 STAK 762 LEAVE POP 763 * --- 764 765 766 * Error while fooling with RAF data block - give 767 * error message but otherwise ignore. 000051FD 768 ZOTRBLKERR LABEL 051FD DC40261B 769 CALLNP MAPOUTFBI unmap FBI, ION 051FE DC403150 770 CALLNP GRUBWNDO1 get rid of PAL for page with error 771 * call ERRORLOG 051FF 61178801 4 6 BASE 772 LD R4 SP,SAVER4 restore this register 05200 5D1F8002 6 STAK 773 LEAVE POP 774 * --- 775 776 END ZOTRAFBLK subroutine 777 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1113 (SYSPROCESS) F 55 Disk Structure Freeing Process 778 779 END SYS_FREEFILE process 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1114 (SYSPROCESS) F 55 Put ADT process 782 783 ********************************************************************************** 784 * * 785 * SYS_PUTADT - put ADT process * 786 * This separate process runs whenever there is a single * 787 * block known to be free on mass storage. We merely take * 788 * elements off of the queue and call PUTFREEBLK for each * 789 * block represented. * 790 * * 791 * Stack required = 15 * 792 * WARNING see STACKSIZE below. * 793 * 0 + max ( DISMOUNT (3), FREESTACK (0), GETSTACK (0), * 794 * LIQUIDATE (7), LOCKWAIT (0), PUTFREEBLK (15), * 795 * SFREEMEM (0) ) * 796 * * 797 ********************************************************************************** 798 799 BLOCK SYS_PUTADT process 800 ENTRY PADTRSTRT 801 0000000F ABS 802 STACKSIZE EQU 15 size of stack to get 803 00005201 804 PADTRSTRT LABEL 05201 DC00286A 805 CALL GETSTACK 05202 4044000F IMM 806 PARVL STACKSIZE 00005203 807 PADTAGAIN LABEL 808 PLOCK PADTLOCK lock the put adt list 05203 0CC00000 808 IOFF 05204 D1C01D83 808 SETT PADTLOCK 05205 FE0C5207 808 JNE MA(2+DISPW MA 0) 05206 DC40308B 808 CALLNP LOCKWAIT 05207 61001D84 4 809 LD R4 PADTLIST get pointer to the first element 05208 FB30521B 4 810 JZA R4 PADTDONE jump if nothing to do 05209 60091F10 0 4 ZBM 811 LD R0 R4,PADTLINK get pointer to next element 0520A E4001D84 0 812 ST R0 PADTLIST and remove us from the list 813 PUNLOCK PADTLOCK release the put adt list 0520B EC001D83 813 STZ PADTLOCK 0520C 0C800000 813 ION 0520D 60170801 0 4 BASE 814 LD R0 R4,PADTBLOCK get the block number requested 0520E DC0036B9 815 CALL PUTFREEBLK call to return the space 0520F 41491181 4 ZBM 816 PARV R4,PADTMSBLK pass the relative address 05210 40490081 4 ZBM 817 PARVL R4,PADTDRIVE and the volume number 05211 60090081 0 4 ZBM 818 LD R0 R4,PADTDRIVE get the volume number 05212 60201F22 0 0 819 LD R0 VOLNTABLE(R0) get pointer to VOLN element 05213 D0560815 0 BASE 820 DEC R0,VOLNBUSY remove busy count for this element 05214 FE0C5217 821 JNE PADTVBSY if busy skip volume dismount check 05215 DC005034 822 CALL DISMOUNT check if volume needs dismounting 05216 40520000 0 REG 823 PARVL R0 address of the VOLN element 824 * \ / 825 00005217 826 PADTVBSY LABEL 05217 DC002F5D 827 CALL SFREEMEM call to free the element 05218 41440001 IMM 828 PARV PADTLOG indicate length 05219 40530000 4 REG 829 PARVL R4 and address 0521A FE0E5203 830 JMP PADTAGAIN go check for more elements 831 * --- 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1115 (SYSPROCESS) F 55 Put ADT process 832 833 ********************************************************************************** 834 * * 835 * Nothing remains in our list of elements, so stop myself. * 836 * * 837 ********************************************************************************** 838 0000521B 839 PADTDONE LABEL 0521B EC001D85 840 STZ PADTBUSY say I no longer exist 841 PUNLOCK PADTLOCK let others use the list 0521C EC001D83 841 STZ PADTLOCK 0521D 0C800000 841 ION 0521E DC002875 842 CALL FREESTACK 0521F 4044000F IMM 843 PARVL STACKSIZE 05220 FE0E2DAC 844 JMP LIQUIDATE flush my existence 845 * --- 846 847 END SYS_PUTADT process 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1116 (SYSPROCESS) F 55 Volume dismount process 850 851 ********************************************************************************** 852 * * 853 * SYS_DISMOUNT - volume dismount process * 854 * This process simply dismounts the volumes given * 855 * to it by the DISMOUNT routine. The volumes we dismount are * 856 * strictly of the maintenance mounted type. At times when we * 857 * close the .VOL for a maintenance mounted volume and we attempt * 858 * to dismount the volume there are still system processes still * 859 * busy. When this happens we set a bit in the VOLN element and * 860 * when the volume busy count reaches zero we call the DISMOUNT * 861 * routine which in turns tells the dispatcher to start this * 862 * process. * 863 * * 864 * Stack required = 18 * 865 * WARNING!!! See stacksize below. * 866 * 0 + max ( DISMTDUMMY (4), DISMTIDX (18), DISMTNAME (16), * 867 * ERRORLOG (3), FREESTACK (0), GETSTACK (0), * 868 * LIQUIDATE (7), LOCKWAIT (0), SFREEMEM (0) ) * 869 * * 870 ********************************************************************************** 871 872 BLOCK SYS_DISMOUNT process 873 ENTRY DMNTSTRT 874 0000001F ABS 875 STACKSIZE EQU 31 876 00005221 877 DMNTSTRT LABEL 05221 DC00286A 878 CALL GETSTACK get stack and CA for this process 05222 4044001F IMM 879 PARVL STACKSIZE number of words required 880 * \ / 881 00005223 882 DMNTAGAIN LABEL 883 PLOCK DMNTLOCK gain access to the list 05223 0CC00000 883 IOFF 05224 D1C01D8A 883 SETT DMNTLOCK 05225 FE0C5227 883 JNE MA(2+DISPW MA 0) 05226 DC40308B 883 CALLNP LOCKWAIT 05227 61401D8B 5 884 LD R5 DMNTLIST check if any volumes to dismount 05228 FB70523B 5 885 JZA R5 DMNTDONE jump if nothing more to do here 05229 60095F10 0 5 ZBM 886 LD R0 R5,DMNTLINK pointer to next in line 0522A E4001D8B 0 887 ST R0 DMNTLIST this unlinks the first element 888 PUNLOCK DMNTLOCK release the list for others to use 0522B EC001D8A 888 STZ DMNTLOCK 0522C 0C800000 888 ION 0522D 60174801 0 5 BASE 889 LD R0 R5,DMNTVOLN volume number to dismount 0522E 61201F22 4 0 890 LD VLN VOLNTABLE(R0) pointer to the VOLN element 0522F DC002F5D 891 CALL SFREEMEM call to free the block 05230 41440001 IMM 892 PARV DMNTLOG log of the block size 05231 40534000 5 REG 893 PARVL R5 address of the block 05232 DC005048 894 CALL ERRORLOG log dismounting of the volume 05233 41440418 IMM 895 PARV ERLCDMOUNT code indicating a dismount 05234 40490086 4 ZBM 896 PARVL VLN,VOLNNUM volume number 05235 5C091F19 4 ZBM 897 CMZ VLN,VOLNIDXPTR IDX table associated 05236 FE025239 898 JEQ NOIDX jump if not 05237 DC409FC1 899 CALLNP DISMTIDX get rid of the entries 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1117 (SYSPROCESS) F 55 Volume dismount process 05238 DC409FF4 900 CALLNP DISMTNAME down to the bare necessities 901 * \ / 902 00005239 903 NOIDX LABEL 05239 DC40A039 904 CALLNP DISMTDUMMY and leave no more trace 0523A FE0E5223 905 JMP DMNTAGAIN see if more work to do 906 * --- 907 0000523B 908 DMNTDONE LABEL 0523B EC001D8C 909 STZ DMNTBUSY indicate process going away 910 PUNLOCK DMNTLOCK release critical region 0523C EC001D8A 910 STZ DMNTLOCK 0523D 0C800000 910 ION 0523E DC002875 911 CALL FREESTACK we have no need for a stack 0523F 4044001F IMM 912 PARVL STACKSIZE number of words to return 05240 FE0E2DAC 913 JMP LIQUIDATE our days are numbered now! 914 * --- 915 916 END SYS_DISMOUNT process 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1118 (SYSPROCESS) F 55 Error log writer process 919 920 ********************************************************************************** 921 * * 922 * SYS_ERRORLOG - Error log process. * 923 * This process takes errors logged by the various parts of * 924 * the system and writes them into a file on the system * 925 * maintenance account. This will provide a permanent record * 926 * of the errors for field service personnel. The file is a * 927 * RAF mainly for compactness but also for security through * 928 * obscurity. * 929 * * 930 * Stack required = 7 * 931 * WARNING!!! See STACKSIZE below. * 932 * 0 + max ( FREESTACK (0), GETSTACK (0), LIQUIDATE (7), * 933 * LOCKWAIT (0), SFREEMEM (0), SGETMEM (0) ) * 934 * * 935 ********************************************************************************** 936 937 BLOCK SYS_ERRORLOG process 938 ENTRY ELPRESTART 939 00000007 ABS 940 STACKSIZE EQU 7 size of stack to get 941 942 * Temp block allocated herein 00005241 943 ELTPROTO BASE R5 00174800 5 BASE 944 ELTBASE BSS 1 00174801 5 BASE 945 ELTEND BSS 1 946 DRCT 00000001 ABS 947 ELTLOG EQU (DISPW ELTPROTO) LOG 2 length of element 948 ORG ELTPROTO recover lost space 0000000A ABS 949 ELPLUN EQU 10 my personal lun 00000010 BYTE 950 FILELINK EQU BIT 0 bit in R7 to say file linked 951 00005241 952 ELPRESTART LABEL normal creation start 05241 60000412 0 953 LD R0 CPPSA 05242 D1560813 0 BASE 954 STMW R0,PSSESLIM allow room to write 05243 DC00286A 955 CALL GETSTACK 05244 40440007 IMM 956 PARVL STACKSIZE 00005245 957 ELPAGAIN0 LABEL 05245 61440000 5 IMM 958 LD R5 0 indicate no temp block yet 05246 EC0BC010 7 CBM 959 STZ R7/FILELINK say file not linked 00005247 960 ELPAGAIN LABEL get next element in list 961 PLOCK ERRLOGLOCK get access to the list roots 05247 0CC00000 961 IOFF 05248 D1C01D91 961 SETT ERRLOGLOCK 05249 FE0C524B 961 JNE MA(2+DISPW MA 0) 0524A DC40308B 961 CALLNP LOCKWAIT 0524B 61001D92 4 962 LD R4 ERRLOGLIST get pointer to first element 0524C FB305292 4 963 JZA R4 ELPDONE jump if nothing to do 0524D 60091F10 0 4 ZBM 964 LD R0 R4,ERLLINK get link to remainder of error log list 0524E E4001D92 0 965 ST R0 ERRLOGLIST remove this element from the list 966 PUNLOCK ERRLOGLOCK release the list 0524F EC001D91 966 STZ ERRLOGLOCK 05250 0C800000 966 ION 967 * \ / 05251 FB725255 5 968 JNZA R5 OK2TEMP jump if temp block allocated 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1119 (SYSPROCESS) F 55 Error log writer process 05252 DC002ED0 969 CALL UGETMEM allocate temp block 05253 40440001 IMM 970 PARVL ELTLOG of this size 05254 61520000 5 0 REG 971 LD R5 R0 R5 => temp block 00005255 972 OK2TEMP LABEL 05255 F7C05260 7 973 JBT R7/FILELINK OK2FILE jump if file already linked 05256 60040050 0 IMM 974 LD R0 FREQUIPW equip request for write 05257 60445282 1 IMM 975 LD R1 ADR LOGFILNAME => block for file name 05258 0884000A IMM 976 FREQ ELPLUN link the file 05259 FA08527A 0 977 JLTZ R0 CHKBUSY see if maybe busy 0525A EDCBC010 7 CBM 978 STW R7/FILELINK indicate that the file is equipped 0525B 60040031 0 IMM 979 LD R0 FRREADB get the code for read 0525C 60440008 1 IMM 980 LD R1 2*CPW get character count for read 0525D 38974800 2 5 BASE 981 LEA R2 R5,ELTBASE make address of input buffer 0525E 0884000A IMM 982 FREQ ELPLUN read in the begin/end pointers 0525F FA085273 0 983 JLTZ R0 ABNORMAL jump if some error 984 * \ / 00005260 985 OK2FILE LABEL 05260 60574801 1 5 BASE 986 LD R1 R5,ELTEND get pointer to end of the file 05261 6847FFC0 1 IMM 987 UCPR R1 -((ERLMAXLEN+3)*CPW) is there enough room to write our data? 05262 FE045265 988 JGT NOROOM jump if not, wrap around 05263 68440008 1 IMM 989 UCPR R1 2*CPW maybe the file is empty? 05264 FE065267 990 JGE POSITIONOK jump if looks good, we use the pointer 00005265 991 NOROOM LABEL 05265 60440008 1 IMM 992 LD R1 2*CPW file begins after the base and end pointers 05266 E4574801 1 5 BASE 993 ST R1 R5,ELTEND save as new end pointer 00005267 994 POSITIONOK LABEL 05267 60040090 0 IMM 995 LD R0 FRPOSITION do the seek in the RAF 05268 0884000A IMM 996 FREQ ELPLUN 05269 FA085273 0 997 JLTZ R0 ABNORMAL bail out if error 998 0526A 60490050 1 4 ZBM 999 LD R1 R4,ERLTYPE/ERLLEN R1 = number of parameters 0526B 18440003 1 IMM 1000 ADD R1 ERLFUNK+1 R1 = length of stuff in words 0526C E4491F10 1 4 ZBM 1001 ST R1 R4,ERLLINK place length in record being written 0526D 604A4400 1 1 CBM 1002 LD R1 R1*BIT 29 R1 = length of record in characters 0526E 98574801 1 5 BASE 1003 ADDM R1 R5,ELTEND move the files end pointer 0526F 38970800 2 4 BASE 1004 LEA R2 R4,0 R2 => record 05270 60040042 0 IMM 1005 LD R0 FRWRITEB get code for write 05271 0884000A IMM 1006 FREQ ELPLUN write it in the RAF 05272 FA065273 0 1007 JGEZ R0 WRITEWORKD jump if write okay 1008 * \ / 1009 1010 ********************************************************************************** 1011 * * 1012 * What to do if the file won't work for us. I really * 1013 * don't know. * 1014 * * 1015 ********************************************************************************** 1016 1017 * \ / 00005273 1018 ABNORMAL LABEL 1019 *** LOG error somewhere 1020 * \ / 00005273 1021 WRITEWORKD LABEL 1022 * Write message to operator too? 00005273 1023 FLUSHERR LABEL 05273 60C90050 3 4 ZBM 1024 LD R3 R4,ERLTYPE/ERLLEN get the message length 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1120 (SYSPROCESS) F 55 Error log writer process 05274 5C56D002 3 REG 1025 HIB R3+ERLFUNK calculate size of block 05275 70D20000 3 0 REG 1026 LDN R3 R0 05276 DC002F5D 1027 CALL SFREEMEM release the queue element 05277 4156D020 3 REG 1028 PARV R3+32 indicate log size of block 05278 40530000 4 REG 1029 PARVL R4 and its address 05279 FE0E5247 1030 JMP ELPAGAIN try for more entries 1031 * --- 1032 1033 ********************************************************************************** 1034 * * 1035 * The file is not equippable. We here check to see if we * 1036 * cannot get at it because it's busy. If this is true, then we * 1037 * wait a while to see if it will become available. * 1038 * For now, the equip request sez suspend if file busy, so this * 1039 * code ( which is left over from before suspension ) will never * 1040 * be invoked for a busy file. * 1041 * * 1042 ********************************************************************************** 1043 0000527A 1044 CHKBUSY LABEL 0527A 600A2AB0 0 0 CBM 1045 LD R0 R0/FDSTATERR extract the error code 0527B 6404008A 0 IMM 1046 CPR R0 XREQERFBZ is it a busy error? 0527C FE0C5273 1047 JNE FLUSHERR if not, we can only throw it away 0527D 60040140 0 IMM 1048 LD R0 URDELAY wait some time 0527E 60440005 1 IMM 1049 LD R1 5 5 seconds will do 0527F 60840000 2 IMM 1050 LD R2 0 only time event 05280 09040000 IMM 1051 UREQ 0 wait 05281 FE0E5255 1052 JMP OK2TEMP try equip again 1053 * --- 1054 00005282 1055 LOGFILNAME LABEL 05282 00000000 1056 PAK12 05284 00000000 1057 PAK6 05285 00000000 1058 PAK12 05287 B674BFEF 1059 PAK12 SYSTEM account name 05289 E79DF200 1060 PAK6 !!! and extension 0528A 00000000 1061 PAK12 0528C 5FEF38B6 1062 PAK12 ERRORLOG log file name 0528E 8A28910E 1063 PAK6 LOGFIL and extension 0528F 00000000 1064 PAK12 05291 00000000 1065 VFD 0 1066 1067 ********************************************************************************** 1068 * * 1069 * Nothing more in the queue. Release the file and temp * 1070 * block and go away. * 1071 * * 1072 ********************************************************************************** 1073 00005292 1074 ELPDONE LABEL 1075 PUNLOCK ERRLOGLOCK release the list 05292 EC001D91 1075 STZ ERRLOGLOCK 05293 0C800000 1075 ION 05294 F3C052A2 7 1076 JBF R7/FILELINK NOFILE jump if file never linked 05295 60040090 0 IMM 1077 LD R0 FRPOSITION get a RAF position request 05296 60440004 1 IMM 1078 LD R1 EFEND get ready to write end pointer back 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1121 (SYSPROCESS) F 55 Error log writer process 05297 0884000A IMM 1079 FREQ ELPLUN position to the end pointer in the file 05298 FA08529E 0 1080 JLTZ R0 ENDNOPOS jump if error 05299 60040042 0 IMM 1081 LD R0 FRWRITEB get the code for write 0529A 60440004 1 IMM 1082 LD R1 1*CPW get the write length 0529B 38974801 2 5 BASE 1083 LEA R2 R5,ELTEND and the buffer pointr 0529C 0884000A IMM 1084 FREQ ELPLUN write the new end pointer 0529D FA06529E 0 1085 JGEZ R0 ENDWRITN jump if successful write 1086 * \ / 1087 * This file won't work 0000529E 1088 ENDNOPOS LABEL 1089 *** Can we log the error somewhere? 0000529E 1090 ENDWRITN LABEL 0529E 60040060 0 IMM 1091 LD R0 FRUNEQUIP unequip the file 0529F 0884000A IMM 1092 FREQ ELPLUN 052A0 FA0652A2 0 1093 JGEZ R0 UNEQPOK jump if successful 052A1 001310B1 1094 HALT HALTS10B1 stop when log file totally unmanageable 1095 * --- 1096 000052A2 1097 UNEQPOK LABEL 000052A2 1098 NOFILE LABEL 052A2 FB7052A6 5 1099 JZA R5 NOTBLOCK jump if no temp block allocated 052A3 DC002F5D 1100 CALL UFREEMEM free it if here 052A4 41440001 IMM 1101 PARV ELTLOG indicate size of temp block 052A5 40534000 5 REG 1102 PARVL R5 and its address 000052A6 1103 NOTBLOCK LABEL 1104 PLOCK ERRLOGLOCK lock the list 052A6 0CC00000 1104 IOFF 052A7 D1C01D91 1104 SETT ERRLOGLOCK 052A8 FE0C52AA 1104 JNE MA(2+DISPW MA 0) 052A9 DC40308B 1104 CALLNP LOCKWAIT 052AA 5C001D92 1105 CMZ ERRLOGLIST did stuff come in while I wasn't looking? 052AB FE0C52B2 1106 JNE NOFLUSH if so, we cannot flush us 052AC EC001D93 1107 STZ ERRLOGBUSY say I'm no longer here 1108 PUNLOCK ERRLOGLOCK Release the list 052AD EC001D91 1108 STZ ERRLOGLOCK 052AE 0C800000 1108 ION 052AF DC002875 1109 CALL FREESTACK 052B0 40440007 IMM 1110 PARVL STACKSIZE 052B1 FE0E2DAC 1111 JMP LIQUIDATE zap my form 1112 * --- 1113 1114 * There be stuff again in the list. 000052B2 1115 NOFLUSH LABEL 1116 PUNLOCK ERRLOGLOCK release the list 052B2 EC001D91 1116 STZ ERRLOGLOCK 052B3 0C800000 1116 ION 052B4 FE0E5245 1117 JMP ELPAGAIN0 process list 1118 * --- 1119 1120 END SYS_ERRORLOG process 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1122 (SYSPROCESS) F 55 CPU microcode patcher process 1123 1124 ********************************************************************************** 1125 * * 1126 * This process causes the CPU running it to reload its * 1127 * CPU microcode patches. * 1128 * * 1129 * Stack required = 0 * 1130 * 1 + max ( LOCKWAIT (0) ) * 1131 ********************************************************************************** 1132 1133 BLOCK PATCHPROC routine 1134 ENTRY PATCHPROC 1135 000052B5 1136 PATCHPROC LABEL 052B5 60400415 1 1137 LD R1 OURSLOT pick up our slot number 052B6 60221ECE 0 1 1138 LD R0 SLOTTABLE(R1) get some info about ourself 052B7 600A3080 0 0 CBM 1139 LD R0 R0/WRU0MREV our microcode revision 052B8 60801DA1 2 1140 LD R2 PATCHLIST R2 -> list of patches 052B9 3C168000 0 2 CACH 1141 LSRCH R0 R2,CPUPREV look for the correct patch revision 052BA FE0252BC 1142 JEQ HAVEIT 052BB 001310A0 1143 HALT HALTS10A0 patch disappeared for this CPU 1144 * --- 1145 000052BC 1146 HAVEIT LABEL 052BC 38968801 2 2 BASE 1147 LEA R2 R2,CPUPLNTH point to start of the patch 052BD 60CA9C80 3 2 CBM 1148 LD PFPTR R2/PAGEFIELD get page number of the patch 052BE 7CC40080 3 IMM 1149 IOR PFPTR 1*MONBIT make sure it is in monitor 1150 PLOCK CPUCOMLOCK 052BF 0CC00000 1150 IOFF 052C0 D1C01CF5 1150 SETT CPUCOMLOCK 052C1 FE0C52C3 1150 JNE MA(2+DISPW MA 0) 052C2 DC40308B 1150 CALLNP LOCKWAIT 1151 * (PLOCK may destroy R0) 052C3 80920000 0 REG 1152 PFRD R0 pick up page file for patch location 052C4 60CA28C0 3 0 CBM 1153 LD R3 R0/PFPAGENUM fetch physical page number... 052C5 E4CA14C0 3 0 CBM 1154 ST R3 R0/FLDABSPG ...and put into actual address 052C6 E48A2CA0 2 0 CBM 1155 ST R2 R0/DISPFIELD make physical location of patch 052C7 0C4052CB 1156 STTB PATCHCMND send out the command to patch 1157 * R1 still contains our slot number 1158 * R0 contains the MA of the patch buffer 1159 PUNLOCK CPUCOMLOCK 052C8 EC001CF5 1159 STZ CPUCOMLOCK 052C9 0C800000 1159 ION 052CA FE0E2DAC 1160 JMP LIQUIDATE 1161 * --- 1162 052CB 00030703 1163 PATCHCMND VFD BUSCWRITE+CPUCOFFSET+CPUPTCHCMD 1164 1165 END of PATCHPROC routine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1123 (SYSPROCESS) F 55 CPU remover process 1168 1169 ********************************************************************************** 1170 * * 1171 * REMOVECPU * 1172 * * 1173 * When a CPU is to be taken out of the system we * 1174 * come to this routine. An element has already been * 1175 * built for the CPU and is in the IDLECPULST. * 1176 * Here the CPU number is removed from the CPU slot table, * 1177 * and then it just sits around waiting to be called * 1178 * back to action. ICSTART is checked periodically * 1179 * and when it is set, we return to normal work. * 1180 * Call: * 1181 * JMP REMOVECPU * 1182 * Eats R0:R4 * 1183 * Stack required = 14 * 1184 * 0 + max ( FREESTACK (0), FREEZE (14), GETSTACK (0), * 1185 * LOCKWAIT (0), MAPINMEM (3), SFREEMEM (0) * 1186 * UNFREEZE (1) ) * 1187 * * 1188 ********************************************************************************** 1189 1190 BLOCK REMOVECPU routine 1191 ENTRY REMOVECPU 1192 0000000E ABS 1193 STACKSIZE EQU 14 size of stack needed 1194 000052CC 1195 REMOVECPU LABEL 052CC DC00286A 1196 CALL GETSTACK get stack for this process 052CD 4044000E IMM 1197 PARVL STACKSIZE number of words desired 1198 1199 * Remove us from list of active CPUs 052CE 61000412 4 1200 LD R4 CPPSA R4 -> our PSA 052CF DC402D79 1201 CALLNP FREEZE freeze the system 052D0 D0401CF7 1202 DEC CPUCOUNT one fewer CPUs 052D1 D0401CF8 1203 DEC CPUCOUNT1 one fewer unfrozen CPU 052D2 60040000 0 IMM 1204 LD R0 0 052D3 61400415 5 1205 LD R5 OURSLOT our slot number will stay in R5 000052D4 1206 FINDCPU LABEL 052D4 65601CFB 5 0 1207 CPR R5 CPUSLOTS(R0) is this our entry? 052D5 FE0252D7 1208 JEQ FOUNDCPU jump if yes 052D6 FA2052D4 0 1209 IRJ R0 FINDCPU else search more 1210 * --- 1211 000052D7 1212 FOUNDCPU LABEL 052D7 60801CF7 2 1213 LD R2 CPUCOUNT 052D8 60641CFB 1 2 1214 LD R1 CPUSLOTS(R2) pick up last entry in table 052D9 E4601CFB 1 0 1215 ST R1 CPUSLOTS(R0) overlay our entry 052DA EC241CFB 2 1216 STZ CPUSLOTS(R2) and remove last entry 052DB 0CC00000 1217 IOFF so we will not get interrupted 052DC DC402D95 1218 CALLNP UNFREEZE allow the system to continue 1219 * \ / 1220 1221 * Get us out of the runnable queue and back into the running. 052DD 60841DAA 2 IMM 1222 LD R2 ADR SQRUNNABLE set up for RLSRCH 1223 PLOCK SQLOCKS(NQRUNNABLE) 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1124 (SYSPROCESS) F 55 CPU remover process 052DE 0CC00000 1223 IOFF 052DF D1C01DBB 1223 SETT SQLOCKS(NQRUNNABLE) 052E0 FE0C52E2 1223 JNE MA(2+DISPW MA 0) 052E1 DC40308B 1223 CALLNP LOCKWAIT 052E2 60401DAA 1 1224 LD R1 SQRUNNABLE get the root of the list 052E3 49085F13 4 1 ZBM 1225 RLSRCH R4 R1,PCPSADRS look for us in the queue 052E4 60085F10 0 1 ZBM 1226 LD R0 R1,PCQLINK get link to remainder of list 052E5 E4089F10 0 2 ZBM 1227 ST R0 R2,PCQLINK remove our element from the list 1228 PUNLOCK SQLOCKS(NQRUNNABLE) call to release the runnable queue 052E6 EC001DBB 1228 STZ SQLOCKS(NQRUNNABLE) 052E7 0C800000 1228 ION 1229 1230 * Set up PCB information for new queue. 052E8 E5564801 5 1 BASE 1231 ST R5 R1,PCQPARM our slot number is the parameter 052E9 60040000 0 IMM 1232 LD R0 NQRUNNING get queue number 052EA E4085260 0 1 ZBM 1233 ST R0 R1,PCQUEUE set our new queue number 1234 PLOCK SQLOCKS(NQRUNNING) lock the list of running processes 052EB 0CC00000 1234 IOFF 052EC D1C01DBA 1234 SETT SQLOCKS(NQRUNNING) 052ED FE0C52EF 1234 JNE MA(2+DISPW MA 0) 052EE DC40308B 1234 CALLNP LOCKWAIT 052EF 60001DA9 0 1235 LD R0 SQRUNNING get pointer to head of list 052F0 E4085F10 0 1 ZBM 1236 ST R0 R1,PCQLINK put existing queue behind us 052F1 E4401DA9 1 1237 ST R1 SQRUNNING put us at head of queue 1238 PUNLOCK SQLOCKS(NQRUNNING) unlock the queue 052F2 EC001DBA 1238 STZ SQLOCKS(NQRUNNING) 052F3 0C800000 1238 ION 1239 052F4 60885F13 2 1 ZBM 1240 LD R2 R1,PCPSADRS R2 -> PSA 052F5 60088116 0 2 ZBM 1241 LD R0 R2,PSCURRPROC get current UPC pointer for this user 052F6 E4000414 0 1242 ST R0 CPCUPC assign as current UPC for this CPU 052F7 E4800412 2 1243 ST R2 CPPSA indicate new current user 052F8 DC0025EB 1244 CALL MAPINMEM map in our virtual monitor memory 052F9 40528000 2 REG 1245 PARVL R2 PSA associated with it 1246 052FA 60401DA5 1 1247 LD R1 IDLECPULST R1 -> first of idle CPU list 052FB 3D484840 5 1 ZBM 1248 LSRCH R5 R1,ICSLOT search for our element 1249 * \ / 1250 1251 * R1 -> our element, R5 = our slot number 000052FC 1252 IDLELOOP LABEL 052FC 00442710 IMM 1253 WAIT IDLETIME wait a bit 052FD 5C085210 1 ZBM 1254 CMZ R1,ICSTART time to start back to work? 052FE FE0252FC 1255 JEQ IDLELOOP keep looping if not 1256 * \ / 1257 052FF 60841DA5 2 IMM 1258 LD R2 ADR IDLECPULST R2 -> idle CPU list 1259 PLOCK IDLECPULCK 05300 0CC00000 1259 IOFF 05301 D1C01DA4 1259 SETT IDLECPULCK 05302 FE0C5304 1259 JNE MA(2+DISPW MA 0) 05303 DC40308B 1259 CALLNP LOCKWAIT 05304 60401DA5 1 1260 LD R1 IDLECPULST R1 -> first of idle CPU list 05305 49484840 5 1 ZBM 1261 RLSRCH R5 R1,ICSLOT search for our element 05306 60085F10 0 1 ZBM 1262 LD R0 R1,ICLINK R0 -> next element in list 05307 E4089F10 0 2 ZBM 1263 ST R0 R2,ICLINK take us out of the list 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1125 (SYSPROCESS) F 55 CPU remover process 1264 PUNLOCK IDLECPULCK 05308 EC001DA4 1264 STZ IDLECPULCK 05309 0C800000 1264 ION 0530A D0401DA6 1265 DEC IDLECPUCNT one less idle CPU 0530B DC002F5D 1266 CALL SFREEMEM 0530C 41440000 IMM 1267 PARV ICBLKLOG how much to return 0530D 40524000 1 REG 1268 PARVL R1 where it is 1269 1270 * Return us to the list of CPUs. 0530E 60401CF7 1 1271 LD R1 CPUCOUNT how many other CPUs 0530F E5621CFB 5 1 1272 ST R5 CPUSLOTS(R1) put us onto end of table 05310 D0001CF7 1273 INC CPUCOUNT indicate back into the running 05311 D0001CF8 1274 INC CPUCOUNT1 05312 0C800000 1275 ION restore interrupts 05313 DC002875 1276 CALL FREESTACK return our stack 05314 4044000E IMM 1277 PARVL STACKSIZE 05315 FE0E2DAC 1278 JMP LIQUIDATE the break is over 1279 * --- 1280 1281 END of REMOVECPU routine 1282 1283 END System Processes 99 INPUT ACCPROCESS accounting process 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1126 (ACCPROCESS) F 56 Accounting Process 3 4 ********************************************************************************** 5 * * 6 * This code represents the process that takes * 7 * enqueued accounting file messages and actually * 8 * gets them out to the accounting file (or files). * 9 * * 10 * Stack required: 7 * 11 * WARNING!!! See STACKSIZE below. * 12 * 0 + max ( FREESTACK (0), GETSTACK (0), LIQUIDATE (7), * 13 * LOCKWAIT (0), SFREEMEM (0), SGETMEM (0), * 14 * TIMESET (2) ) * 15 * * 16 ********************************************************************************** 17 18 BLOCK ACCTINIT and ACCTRESTRT routines 19 ENTRY ACCTINIT initialize accounting process 20 ENTRY ACCTRESTRT 21 00000000 ABS 22 WHICHFILE EQU 0 holds ptr to file indicator 00000001 ABS 23 LOCALSSIZE EQU 1 size of local stack usage 00000003 ABS 24 STACKSIZE EQU 3 size of stack to get 0000000C ABS 25 ACLUN EQU 12 lun where work takes place 26 27 ********************************************************************************** 28 * * 29 * This temp area is used by the accounting process and * 30 * freed when no longer needed. * 31 * * 32 ********************************************************************************** 33 00005316 34 APTMPP BASE R5 temp area used by acct process 00174800 5 BASE 35 APTMVNM BSS2 1 volume name 00174802 5 BASE 36 APTMSYS BSS 1 system name 00174803 5 BASE 37 APTMSPW BSS2 1 volume password 00174805 5 BASE 38 APTMACCT BSS2 1 account name 00174807 5 BASE 39 APTMDIVPRJ BSS 1 division-project 00174808 5 BASE 40 APTMACPW BSS2 1 account password (to fit equip block format) 0017480A 5 BASE 41 APTMLOGNM BSS2 1 log file name 0017480C 5 BASE 42 APTMLOGEX BSS 1 log file name extension 0017480D 5 BASE 43 APTMFPW BSS2 1 file password (to fit equip block format) 0017480F 5 BASE 44 APTACS BSS 1 equip access 45 DRCT 00000010 DISP 46 APTEMPSIZE EQU DISP APTMPP size of temp block 00000004 ABS 47 APTEMPLOG EQU APTEMPSIZE LOG 2 log size for free memory routines 48 ORG APTMPP recover lost space 49 00005316 50 ACCTINIT LABEL 00005316 51 ACCTRESTRT LABEL 05316 60000412 0 52 LD R0 CPPSA get our PSA pointer 05317 D1560813 0 BASE 53 STMW R0,PSSESLIM make session limit unlimited 05318 DC00286A 54 CALL GETSTACK get our stack 05319 40440003 IMM 55 PARVL STACKSIZE 0531A 11840001 6 IMM 56 SUB SP LOCALSSIZE allocate stack space for our variables 0531B 61440000 5 IMM 57 LD R5 0 indicate no temp block 58 * \ / 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1127 (ACCPROCESS) F 56 Accounting Process 59 0000531C 60 ACCTAGAIN LABEL 61 PLOCK APLOCK lock the accounting process 0531C 0CC00000 61 IOFF 0531D D1C01D99 61 SETT APLOCK 0531E FE0C5320 61 JNE MA(2+DISPW MA 0) 0531F DC40308B 61 CALLNP LOCKWAIT 05320 61001D9A 4 62 LD R4 APLIST => first element in list 05321 FB30539F 4 63 JZA R4 ACTDONE jump if nothing left there 05322 60091F10 0 4 ZBM 64 LD R0 R4,APLINK get pointer to next one 05323 E4001D9A 0 65 ST R0 APLIST and remove current element from list 66 PUNLOCK APLOCK unlock the accounting process list 05324 EC001D99 66 STZ APLOCK 05325 0C800000 66 ION 05326 FB725333 5 67 JNZA R5 HAVETEMPB jump if a temp block exists 05327 DC002ED0 68 CALL UGETMEM otherwise, call for one 05328 40440004 IMM 69 PARVL APTEMPLOG indicating its length 05329 61520000 5 0 REG 70 LD R5 R0 copy the block pointer 0532A EC174802 5 BASE 71 STZ R5,APTMSYS now do some initialization 0532B EE174803 5 BASE 72 STZ2 R5,APTMSPW 0532C EE174808 5 BASE 73 STZ2 R5,APTMACPW clear the account password 0532D EE17480D 5 BASE 74 STZ2 R5,APTMFPW clear the file password 0532E EC17480F 5 BASE 75 STZ R5,APTACS clear access word 0532F 620053A9 01 76 LD2 R0 LOGFILENAM get the name of a log file 05330 E617480A 015 BASE 77 ST2 R0 R5,APTMLOGNM and set into equip block 05331 600053AB 0 78 LD R0 LOGFILEEXT similarly for the extension 05332 E417480C 0 5 BASE 79 ST R0 R5,APTMLOGEX 80 * \ / 81 82 ********************************************************************************** 83 * * 84 * We now have a log file record (ptr to element in * 85 * R4) that requires an entry to be made in a log file * 86 * (unless APWHOGETS is 0, an unlikely possibility). * 87 * We need to decide the account names of those who * 88 * get this information. All records use the primary * 89 * account name except the file type records which * 90 * use the secondary (file owner) account name. This * 91 * small kludge was done so that the accounting files * 92 * themselves remain consistent. * 93 * * 94 ********************************************************************************** 95 96 * \ / 00005333 97 HAVETEMPB LABEL 05333 62170803 014 BASE 98 LD2 R0 R4,APRECORD/AFRACCT get the account 05334 E6174805 015 BASE 99 ST2 R0 R5,APTMACCT save in temp block for equip 05335 60170805 0 4 BASE 100 LD R0 R4,APRECORD/AFRPROJ and the project 05336 E4174807 0 5 BASE 101 ST R0 R5,APTMDIVPRJ place into equip block 102 * \ / 103 104 ********************************************************************************** 105 * * 106 * Here we test the bits in the APWHOGETS field to * 107 * see which accounts get a log file entry. There are three * 108 * special checks for the following cases: * 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1128 (ACCPROCESS) F 56 Accounting Process 109 * 1) The log entry is for a manager. We ensure that only * 110 * one entry shows up in Manager.XxxYxx:Accounting.Logfil * 111 * rather than one each for user and project manager. * 112 * 2) The log entry is on a null project. We ensure that only * 113 * one entry shows up in Manager.Xxx:Accounting.Logfil * 114 * rather than one each for project manager and division * 115 * manager. * 116 * 3) The log entry is on the system division. We ensure that * 117 * only one entry shows up in Manager.Sys:Accounting.Logfil * 118 * rather than one each for division manager and system * 119 * manager. * 120 * These cases may happen together. There will never be more * 121 * than one log file entry for a single event. * 122 * * 123 ********************************************************************************** 124 125 * \ / 00005337 126 DONEXT LABEL 05337 62002556 01 127 LD2 R0 RADMANAGER get the name of all managers 05338 66174805 015 BASE 128 CPR2 R0 R5,APTMACCT is this guy a manager? 05339 FE0C533D 129 JNE NORMPROC1 jump if no special case 0533A 60890010 2 4 ZBM 130 LD R2 R4,APWHOGETS/LIMACSUSR pick up this log file bit 0533B EC090010 4 ZBM 131 STZ R4,APWHOGETS/LIMACSUSR clear to prevent duplicate log file entries 0533C FC890210 2 4 ZBM 132 IORM R2 R4,APWHOGETS/LIMACSPROJ combine user and project bits 133 * \ / 134 0000533D 135 NORMPROC1 LABEL 0533D 38890010 2 4 ZBM 136 LEA R2 R4,APWHOGETS/LIMACSUSR point to user log file bit 0533E 5C168400 2 @R 137 CMZ @R2 check the current bit 0533F FE0C535D 138 JNE DOFILEHERE jump if bit was set 05340 E6174805 015 BASE 139 ST2 R0 R5,APTMACCT set account name to make project manager 05341 60040000 0 IMM 140 LD R0 0 05342 60574807 1 5 BASE 141 LD R1 R5,APTMDIVPRJ get the users div-proj 05343 58C40010 IMM 142 IORPSR PSRMODIF set funny arithmetic 05344 1404FA00 0 IMM 143 DIV R0 DVSNDISP separate division from project part 05345 1C04FA00 0 IMM 144 MUL R0 DVSNDISP put division back to correct space 05346 58840010 IMM 145 CLBPSR PSRMODIF restore normal arithmetic 05347 64574807 1 5 BASE 146 CPR R1 R5,APTMDIVPRJ is division-project same as division? 05348 FE0C534C 147 JNE NORMPROC2 jump if not 05349 60890210 2 4 ZBM 148 LD R2 R4,APWHOGETS/LIMACSPROJ pick up this log file bit 0534A EC090210 4 ZBM 149 STZ R4,APWHOGETS/LIMACSPROJ and clear to prevent duplicates 0534B FC890410 2 4 ZBM 150 IORM R2 R4,APWHOGETS/LIMACSDIV combine project and division bits 151 * \ / 152 0000534C 153 NORMPROC2 LABEL 0534C 38890210 2 4 ZBM 154 LEA R2 R4,APWHOGETS/LIMACSPROJ point to project manager log file bit 0534D 5C168400 2 @R 155 CMZ @R2 check the current bit 0534E FE0C535D 156 JNE DOFILEHERE jump if bit was set 0534F E4574807 1 5 BASE 157 ST R1 R5,APTMDIVPRJ set division into equip block 05350 60002555 0 158 LD R0 DOTSYS get extension for system manager 05351 64174807 0 5 BASE 159 CPR R0 R5,APTMDIVPRJ check for the div-proj already system manager 05352 FE0C5356 160 JNE NORMPROC3 jump if not 05353 60890410 2 4 ZBM 161 LD R2 R4,APWHOGETS/LIMACSDIV pick up this log file bit 05354 EC090410 4 ZBM 162 STZ R4,APWHOGETS/LIMACSDIV and clear to prevent duplicates 05355 FC890610 2 4 ZBM 163 IORM R2 R4,APWHOGETS/LIMACSSYS combine division and system mgr bits 164 * \ / 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1129 (ACCPROCESS) F 56 Accounting Process 165 00005356 166 NORMPROC3 LABEL 05356 38890410 2 4 ZBM 167 LEA R2 R4,APWHOGETS/LIMACSDIV point to division manager log file bit 05357 5C168400 2 @R 168 CMZ @R2 check the current bit 05358 FE0C535D 169 JNE DOFILEHERE jump if it was set 05359 E4174807 0 5 BASE 170 ST R0 R5,APTMDIVPRJ set system mgr div-proj into equip block 0535A 38890610 2 4 ZBM 171 LEA R2 R4,APWHOGETS/LIMACSSYS point to system manager log file bit 0535B 5C168400 2 @R 172 CMZ @R2 check the current bit 0535C FE025391 173 JEQ ENTDONE jump if not, we are done 174 * \ / 175 0000535D 176 DOFILEHERE LABEL 0535D E4978800 2 6 BASE 177 ST R2 SP,WHICHFILE save pointer to current log bit 0535E EC178C00 6 FPVR 178 STZ @(SP,WHICHFILE) indicate record written for this file 0535F EE174800 5 BASE 179 STZ2 R5,APTMVNM clear the volume name 05360 60048050 0 IMM 180 LD R0 XRSUSPERR+FREQUIPW attempt to equip the requested log file 05361 60534000 1 5 REG 181 LD R1 R5 copy the pointer to the equip block 05362 0884000C IMM 182 FREQ ACLUN try for an equip 05363 FA085386 0 183 JLTZ R0 CHKBUSY check for a busy file 184 05364 60040030 0 IMM 185 LD R0 FRREAD get the read request code 05365 60440008 1 IMM 186 LD R1 2*CPW read first two words from file 05366 38974800 2 5 BASE 187 LEA R2 R5,APTMVNM over top of volume name 05367 0884000C IMM 188 FREQ ACLUN try read 05368 FA085382 0 189 JLTZ R0 ABNORMAL jump if error 05369 60574801 1 5 BASE 190 LD R1 R5,APTMVNM(1) get our store pointer 0536A 6847FFCC 1 IMM 191 UCPR R1 -AFRMAXLEN enough room left before end? 0536B FE04536E 192 JGT NOROOM jump if not, start file over 0536C 68440008 1 IMM 193 UCPR R1 2*CPW pointing at pointer words? 0536D FE065370 194 JGE AFPTROK jump if okay 0000536E 195 NOROOM LABEL otherwise, must reset output pointer 0536E 60440008 1 IMM 196 LD R1 2*CPW 0536F E4574801 1 5 BASE 197 ST R1 R5,APTMVNM(1) 00005370 198 AFPTROK LABEL 05370 60040090 0 IMM 199 LD R0 FRPOSITION load a seek request 05371 0884000C IMM 200 FREQ ACLUN (seek addr in R1) do a position 05372 FA085382 0 201 JLTZ R0 ABNORMAL jump on error 05373 60491F11 1 4 ZBM 202 LD R1 R4,APRECORD/AFRLEN get the record length 05374 98574801 1 5 BASE 203 ADDM R1 R5,APTMVNM(1) advance the store pointer 05375 60040042 0 IMM 204 LD R0 FRWRITEB get code for binary write 05376 38970801 2 4 BASE 205 LEA R2 R4,APRECORD make address of record 05377 0884000C IMM 206 FREQ ACLUN out onto our trusty unit 05378 FA085382 0 207 JLTZ R0 ABNORMAL jump on error 05379 60040090 0 IMM 208 LD R0 FRPOSITION get the seek request code 0537A 60440004 1 IMM 209 LD R1 AFEND address of end pointer word 0537B 0884000C IMM 210 FREQ ACLUN do a position 0537C FA085382 0 211 JLTZ R0 ABNORMAL jump on any error 0537D 60040042 0 IMM 212 LD R0 FRWRITEB get the code for binary write 0537E 60440004 1 IMM 213 LD R1 1*CPW get the record size 0537F 38974801 2 5 BASE 214 LEA R2 R5,APTMVNM(1) and address 05380 0884000C IMM 215 FREQ ACLUN write the new end pointer out 05381 FA065382 0 216 JGEZ R0 WRITE2OK jump on good status 217 * \ / 218 219 ********************************************************************************** 220 * * 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1130 (ACCPROCESS) F 56 Accounting Process 221 * Come here if the log file that we were trying to access * 222 * is A/U, DSE, write protected, etc. Note that because log * 223 * files are repeatedly accessed, we may come here LOTS for * 224 * a single bad file. * 225 * * 226 ********************************************************************************** 227 228 * \ / 00005382 229 ABNORMAL LABEL 230 *** LOG error if deemed appropriate 00005382 231 WRITE2OK LABEL 05382 60040060 0 IMM 232 LD R0 FRUNEQUIP load code for unequip 05383 0884000C IMM 233 FREQ ACLUN free up our unit 05384 FA065337 0 234 JGEZ R0 DONEXT jump to continue 05385 001310C0 235 HALT HALTS10C0 couldn't unequip work unit 236 * --- 237 238 ********************************************************************************** 239 * * 240 * If the required logging file was unaccessable because * 241 * it was busy, we suspend the accounting of this event for * 242 * some short time (5 sec) and then we re-try access to the * 243 * file. This allows the waiting on busy files without tying * 244 * up this process so that other accounting backs up. * 245 * * 246 ********************************************************************************** 247 00005386 248 CHKBUSY LABEL 05386 600A2AB0 0 0 CBM 249 LD R0 R0/FDSTATERR get the error code 05387 6404008A 0 IMM 250 CPR R0 XREQERFBZ is it file busy? 05388 FE0C5337 251 JNE DONEXT on unavailable file, causes accting to be forgotten 00005389 252 REQUEUE LABEL 05389 EDD78C00 6 FPVR 253 STW @(SP,WHICHFILE) don't forget this one next time 0538A D0001DA0 254 INC APREQUE count how many elements in this state 0538B DC0044F8 255 CALL TIMESET suspend this accounting element 0538C 43441388 IMM 256 PARV2 5*MSECSS give 5 seconds 0538D 41440000 IMM 257 PARV 0 any CPU can handle this 0538E 41005028 258 PAR ACCTREQUE indicate who to call 0538F 40530000 4 REG 259 PARVL R4 pass pointer to queue block 05390 FE0E531C 260 JMP ACCTAGAIN go on to next queue element 261 * --- 262 263 ********************************************************************************** 264 * The accounting files have all had this entry made in * 265 * them. Get rid of this element and go see if there are * 266 * more. * 267 ********************************************************************************** 268 00005391 269 ENTDONE LABEL 05391 60890051 2 4 ZBM 270 LD R2 R4,APRECORD/AFRTYPE get the type of the record 05392 FA8C5397 2 271 JNEZ R2 ENTDONEY jump if not sleep 05393 5C001DA0 272 CMZ APREQUE are there any suspended elements? 05394 FE0C5389 273 JNE REQUEUE if so, we can't sleep yet 05395 5C001D9A 274 CMZ APLIST is there a requeued element in the list behind us? 05396 FE0C5389 275 JNE REQUEUE wait for it if so 00005397 276 ENTDONEY LABEL 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1131 (ACCPROCESS) F 56 Accounting Process 05397 DC002F5D 277 CALL SFREEMEM free up the element 05398 41440004 IMM 278 PARV APLOG indicate length 05399 40530000 4 REG 279 PARVL R4 and address 0539A FA8C531C 2 280 JNEZ R2 ACCTAGAIN jump if not a sleep marker 281 * \ / 282 PLOCK APLOCK lock the list for proper exit 0539B 0CC00000 282 IOFF 0539C D1C01D99 282 SETT APLOCK 0539D FE0C539F 282 JNE MA(2+DISPW MA 0) 0539E DC40308B 282 CALLNP LOCKWAIT 283 0000539F 284 ACTDONE LABEL 0539F FB7053A3 5 285 JZA R5 NOTEMB jump if no temp block assigned 053A0 DC002F5D 286 CALL UFREEMEM otherwise, free 053A1 41440004 IMM 287 PARV APTEMPLOG indicate its length 053A2 40534000 5 REG 288 PARVL R5 and address 000053A3 289 NOTEMB LABEL 053A3 EC001D9B 290 STZ APBUSY indicate that I no longer exist 291 PUNLOCK APLOCK let others see the list 053A4 EC001D99 291 STZ APLOCK 053A5 0C800000 291 ION 053A6 DC002875 292 CALL FREESTACK 053A7 40440003 IMM 293 PARVL STACKSIZE 053A8 FE0E2DAC 294 JMP LIQUIDATE I'm gone 295 * --- 296 053A9 452CA330 297 LOGFILENAM PAK12 ACCOUNTING file name for log file 053AB 8A28910E 298 LOGFILEEXT PAK6 LOGFIL and its extension 299 300 END ACCTINIT and ACCTRESTRT routines 100 INPUT SUBSPROCESS substitution process 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1132 (SUBSPROCESS) F 57 Disk Block Substitution Process 3 4 BLOCK Substitution Process 5 6 ENTRY SUBSPROC MS block substitute/unsubstitute 7 trace events invoked elsewhere 8 ENTRY SUBTCALL (substitute required) 9 ENTRY SUBTCALLU (unsubstitute required) 10 ENTRY SUBTELEM (subs/unsubs request element built) 11 ENTRY SUBTBPROC (subs/unsubs process is built) 12 13 ********************************************************************************** 14 * * 15 * This is the code for the disk block substitution process. Its * 16 * job is to substitute blocks when a soft I/O error is encountered, * 17 * and to unsubstitute blocks when a substituted block is freed. * 18 * * 19 * There may be one copy of this process for each volume. When a * 20 * soft I/O error occurs or a substituted block is freed, the system * 21 * checks to see if a substitution process already exists for the * 22 * affected volume, and if not, it creates one. The substitution * 23 * process satisfies all queued requests for it, then liquidates * 24 * itself. * 25 * * 26 * When this routine is entered, R4 = the volume number of the volume * 27 * on which we will operate. That volume's VOLNBUSY counter has been * 28 * incremented to account for our presence, this prevents the volume * 29 * from being dismounted. * 30 * * 31 * Please see the comments with the substitution and unsubstitution * 32 * routines. * 33 * * 34 * Window usage is as follows: * 35 * WNDO1 - bad tracks block * 36 * WNDO2 - substitution block * 37 * WNDO3 - user's block that needs substitution * 38 * * 39 ********************************************************************************** 40 41 * The following are trace events associated with the substitution process 00000000 ABS 42 SUBTCALL EQU 0 call to substitute a block 00000001 ABS 43 SUBTCALLU EQU 1 call to unsubstitute a block 00000002 ABS 44 SUBTELEM EQU 2 element to link onto VOLN element is built 00000003 ABS 45 SUBTBPROC EQU 3 process to do sub/unsub is built 00000004 ABS 46 SUBTENTR EQU 4 sub process entered 00000005 ABS 47 SUBTHELM EQU 5 have element from VOLN 00000006 ABS 48 SUBTUHALT EQU 6 HALTS10D8 encountered 00000007 ABS 49 SUBTUFND EQU 7 block to unsub found in SUBSLIST 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1133 (SUBSPROCESS) F 57 Disk Block Substitution Process 51 52 ********************************************************************************** 53 * * 54 * SUBSPROC - Main Routine. * 55 * * 56 * Stack required = 20. * 57 * WARNING!!! See STACKSIZE below. * 58 * 0 + max ( DISMOUNT (3), FREESTACK (0), GETSTACK (0), * 59 * GRUBWNDOx (7), LIQUIDATE (7), LOCKWAIT (0), * 60 * MAPOUTFBI (2), SETWNDOx (4), SFREEMEM (0), * 61 * SUBBLOCK (20), TRACEPROC (3), UNSUBBLOCK (8) ) * 62 * * 63 ********************************************************************************** 64 65 BLOCK SUBSPROC routine 66 ENTRY SUBSPROC 67 0000001F ABS 68 STACKSIZE EQU 31 size of stack to get 69 000053AC 70 SUBSPROC LABEL 71 * R4 = volume number 053AC 60130000 0 4 REG 72 LD R0 R4 set up for TRACE 73 TRACE SUBSTRACE,SUBTENTR 053AD 5D401D32 73 XCT TRACECALL(SUBSTRACE) 053AE FEC000C4 73 NOP (SUBSTRACE*BITS 22:26)+(SUBTENTR*BITS 27:31) 74 * \ / 053AF DC00286A 75 CALL GETSTACK get a stack for this routine 053B0 4044001F IMM 76 PARVL STACKSIZE indicate its size 053B1 61281F22 4 4 77 LD VLN VOLNTABLE(R4) convert volume number to VOLN element pointer 78 * \ / 79 * Map in the bad tracks and substitution blocks 053B2 DC003205 80 CALL SETWNDO1 map in bad tracks block 053B3 41440002 IMM 81 PARV VPCNTLW+VPCNTLLK window will be locked 053B4 41440000 IMM 82 PARV VPNOFCB not from a file 053B5 410053F9 83 PAR BTRXBLKERR where to go if error 053B6 60170806 0 4 BASE 84 LD R0 VLN,VOLNBLOCK get prototype disk address 053B7 EC0A1180 0 CBM 85 STZ R0/MSBLKFIELD leave volume number while clearing block addr 053B8 18090181 0 4 ZBM 86 ADD R0 VLN,VOLNBTRXBK combine btrx address with volume number 053B9 41520000 0 REG 87 PARV R0 block number of bad tracks block 053BA 40440002 IMM 88 PARVL FBITBTRX fbi type expected 053BB DC40261B 89 CALLNP MAPOUTFBI unmap FBI, ION 90 * \ / 053BC DC0031FF 91 CALL SETWNDO2 map in the substitution block 053BD 41440002 IMM 92 PARV VPCNTLW+VPCNTLLK window will be locked 053BE 41440000 IMM 93 PARV VPNOFCB not from a file 053BF 410053FA 94 PAR SUBSBLKERR where to go if error 053C0 60170806 0 4 BASE 95 LD R0 VLN,VOLNBLOCK 053C1 EC0A1180 0 CBM 96 STZ R0/MSBLKFIELD 053C2 18093181 0 4 ZBM 97 ADD R0 VLN,VOLNSUBBLK 053C3 41520000 0 REG 98 PARV R0 block number of substitution block 053C4 40440005 IMM 99 PARVL FBITSUBS FBI type expected 053C5 DC40261B 100 CALLNP MAPOUTFBI unmap FBI, ION 101 * \ / 102 103 ********************************************************************************** 104 * * 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1134 (SUBSPROCESS) F 57 Disk Block Substitution Process 105 * Finding the bad tracks block or substitution block in * 106 * the substitution list would mean there was an error with one * 107 * of those blocks, and the disk drive or controller is very * 108 * probably sick. Check for this. If it is the case, we have * 109 * no choice but to punt (HALT). * 110 * * 111 ********************************************************************************** 112 113 * \ / 114 PLOCK (VLN,VOLNSUBQL) lock queue of requests 053C6 0CC00000 114 IOFF 053C7 D1D7080B 4 BASE 114 SETT (VLN,VOLNSUBQL) 053C8 FE0C53CA 114 JNE MA(2+DISPW MA 0) 053C9 DC40308B 114 CALLNP LOCKWAIT 053CA 6017080A 0 4 BASE 115 LD R0 VLN,VOLNSUBQ R0 -> queue of requests 053CB 60490181 1 4 ZBM 116 LD R1 VLN,VOLNBTRXBK R1 = bad tracks block number (w/o vol) 053CC 3C481181 1 0 ZBM 117 LSRCH R1 R0,SUBQBLOCK/MSBLKFIELD 053CD FE0253D2 118 JEQ DISKBAD jump if bad tracks block request found 053CE 6017080A 0 4 BASE 119 LD R0 VLN,VOLNSUBQ R0 -> queue of requests 053CF 60493181 1 4 ZBM 120 LD R1 VLN,VOLNSUBBLK R1 = substitution block num (w/o vol) 053D0 3C481181 1 0 ZBM 121 LSRCH R1 R0,SUBQBLOCK/MSBLKFIELD 053D1 FE0C53D3 122 JNE DISKGOOD jump if not found 123 * \ / 053D2 009010D1 124 DISKBAD STOP STOPP10D1 many hardware errors on disk. GO will 125 * \ / attempt to continue. 000053D3 126 DISKGOOD LABEL 127 PUNLOCK (VLN,VOLNSUBQL) unlock the queue 053D3 EC17080B 4 BASE 127 STZ (VLN,VOLNSUBQL) 053D4 0C800000 127 ION 128 * \ / 129 130 ********************************************************************************** 131 * * 132 * Process the first request. * 133 * * 134 ********************************************************************************** 135 136 * \ / 000053D5 137 SUBSAGAIN LABEL 138 PLOCK (VLN,VOLNSUBQL) lock queue of requests 053D5 0CC00000 138 IOFF 053D6 D1D7080B 4 BASE 138 SETT (VLN,VOLNSUBQL) 053D7 FE0C53D9 138 JNE MA(2+DISPW MA 0) 053D8 DC40308B 138 CALLNP LOCKWAIT 053D9 6157080A 5 4 BASE 139 LD R5 VLN,VOLNSUBQ R5 -> a request 053DA FB4253EC 5 140 JEQZ R5 NOREQUESTS jump if all done 053DB 60095F10 0 5 ZBM 141 LD R0 R5,SUBQLINK get link to next element 053DC E417080A 0 4 BASE 142 ST R0 VLN,VOLNSUBQ remove request from queue 143 PUNLOCK (VLN,VOLNSUBQL) unlock the queue 053DD EC17080B 4 BASE 143 STZ (VLN,VOLNSUBQL) 053DE 0C800000 143 ION 053DF 60894080 2 5 ZBM 144 LD R2 R5,SUBQREQ R2 = request code 053E0 60D74801 3 5 BASE 145 LD R3 R5,SUBQBLOCK R3 = block number 053E1 DC002F5D 146 CALL SFREEMEM free the queue element 053E2 41440001 IMM 147 PARV SUBQLOG size of element 053E3 40534000 5 REG 148 PARVL R5 address of block 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1135 (SUBSPROCESS) F 57 Disk Block Substitution Process 053E4 6012C000 0 3 REG 149 LD R0 R3 block number in R0 150 TRACE SUBSTRACE,SUBTHELM 053E5 5D401D32 150 XCT TRACECALL(SUBSTRACE) 053E6 FEC000C5 150 NOP (SUBSTRACE*BITS 22:26)+(SUBTHELM*BITS 27:31) 053E7 FA8C53EA 2 151 JNEZ R2 UNDOSUB jump if unsubstitute request 152 * \ / 153 154 * request is to substitute 053E8 DC4053FB 155 CALLNP SUBBLOCK substitute a block 053E9 FE0E53D5 156 JMP SUBSAGAIN and try again 157 * --- 158 159 * request is to unsubstitute 000053EA 160 UNDOSUB LABEL 053EA DC405485 161 CALLNP UNSUBBLOCK unsubstitute a block 053EB FE0E53D5 162 JMP SUBSAGAIN and try again 163 * --- 164 165 ********************************************************************************** 166 * * 167 * Request list is empty. Try to dismount the volume if no * 168 * one else is using it. Then go away. * 169 * * 170 ********************************************************************************** 171 000053EC 172 NOREQUESTS LABEL 053EC EC090610 4 ZBM 173 STZ VLN,VOLNSBFLAG say process no longer active 053ED D0570815 4 BASE 174 DEC VLN,VOLNBUSY decrement volume use count 175 PUNLOCK (VLN,VOLNSUBQL) unlock the request queue 053EE EC17080B 4 BASE 175 STZ (VLN,VOLNSUBQL) 053EF 0C800000 175 ION 053F0 DC403150 176 CALLNP GRUBWNDO1 get rid of the bad tracks block 053F1 DC403153 177 CALLNP GRUBWNDO2 get rid of the substitution block 053F2 5C170815 4 BASE 178 CMZ VLN,VOLNBUSY check for zero busy count 053F3 FE0C53F6 179 JNE SUBSVBSY if volume busy, skip dismount check 053F4 DC005034 180 CALL DISMOUNT try to dismount this volume 053F5 40530000 4 REG 181 PARVL VLN pointer to the VOLN element 000053F6 182 SUBSVBSY LABEL 053F6 DC002875 183 CALL FREESTACK return stack and console area 053F7 4044001F IMM 184 PARVL STACKSIZE word length of stack 053F8 FE0E2DAC 185 JMP LIQUIDATE fall on our own sword 186 * --- 187 188 ********************************************************************************** 189 * * 190 * We come here if an I/O error occurs on any window. * 191 * Since we are trying to substitute a block on which an I/O * 192 * error occurred, any furthur errors in this code mean that * 193 * the disk is very probably sick. Therefore, we bare the ol' * 194 * bodkin. * 195 * * 196 ********************************************************************************** 197 053F9 001010D2 198 BTRXBLKERR HALT HALTP10D2 error on bad tracks block 199 * --- VLN -> voln element 200 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1136 (SUBSPROCESS) F 57 Disk Block Substitution Process 053FA 001010D3 201 SUBSBLKERR HALT HALTP10D3 error on substitution block 202 * --- VLN -> voln element 203 204 END SUBSPROC routine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1137 (SUBSPROCESS) F 57 Disk Block Substitution Process 206 207 ********************************************************************************** 208 * * 209 * Routine to substitute a block. * 210 * Call: * 211 * LD R3 failing block number * 212 * LD VLN PTR VOLN element * 213 * CALLNP SUBBLOCK * 214 * * 215 * Eats R0:R3. * 216 * Stack required = 21. * 217 * 6 + max ( ERRORLOG/VOLTODISK (4), FORCEWRWx (7), * 218 * GETFREEBLK (15), GRUBWNDO3 (7), LOCKPAGE (1), * 219 * LOCKWAIT (0), MAPINFBI (2), MAPOUTFBI (2), * 220 * SETERRW3 (1), SETWNDO3 (4), SGETMEM (0) ) * 221 * * 222 * The bad block should already be resident on a PPAGELIST, and its * 223 * PPBUSYWORD has been incremented to account for our activity. * 224 * WNDO1 and WNDO2 should already have the bad tracks list and the * 225 * substitution block locked into them. * 226 * * 227 * If the bad block is already substituted, that means that the * 228 * substitute block is bad, too, and we should re-substitute it. * 229 * We proceed as follows: * 230 * 1. Make an entry in the bad tracks block and force-write it. * 231 * 2. Check the block's FBI. If the block is not substitutable, * 232 * then we don't substitute it. * 233 * 3. Get a new block and update the resident substitution list. * 234 * 4. Map in the user's block, decrement its PPBUSYWORD, then * 235 * force-write it (it will go to its substitute location). * 236 * 5. Update and force-write the substitution block. * 237 * * 238 ********************************************************************************** 239 240 BLOCK SUBBLOCK subroutine 241 ENTRY SUBBLOCK 242 00128000 2 REG 243 FBI EQU R2 244 245 BEGFRAME 00178801 6 BASE 246 PPLADDR BSS 1 ptr to block's PPL 00178802 6 BASE 247 VIRTBLK BSS 1 virtual block number (the number that 248 * the rest of the system knows) 00178803 6 BASE 249 REALBLK BSS 1 real block number (after any previous 250 * substitutions), this loc also used to 251 * hold FBI type for SETWNDO3 at MOVEBLOCK 00178804 6 BASE 252 NEWBLK BSS 1 new place to put block 253 * If the volume number field is zero, 254 * then this is the error code: 255 * 1 - block is not substitutable 256 * 2 - no free space on volume 257 * 3 - block is a free block 258 ENDFRAME 259 053FB DD5F8005 6 STAK 260 SUBBLOCK ENTRNP PUSH 053FC 61538000 5 6 REG 261 LD R5 SP R5 -> our stack frame 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1138 (SUBSPROCESS) F 57 Disk Block Substitution Process 053FD E4D74802 3 5 BASE 262 ST R3 R5,VIRTBLK save input block number 053FE E4D74803 3 5 BASE 263 ST R3 R5,REALBLK assume it is not substituted 264 * \ / 265 266 ********************************************************************************** 267 * * 268 * See if bad block already has a substitute. If so, * 269 * the substitute is now bad, so save its address, too. * 270 * * 271 ********************************************************************************** 272 273 * \ / 274 PLOCK SUBSLOCK lock the substitution list 053FF 0CC00000 274 IOFF 05400 D1C01F62 274 SETT SUBSLOCK 05401 FE0C5403 274 JNE MA(2+DISPW MA 0) 05402 DC40308B 274 CALLNP LOCKWAIT 05403 60001F63 0 275 LD R0 SUBSLIST R0 -> substitution list 05404 3CD60801 3 0 BASE 276 LSRCH R3 R0,SUBLBAD see if already substituted 05405 FE0C5408 277 JNE NOTSUBD jump if not 05406 60160802 0 0 BASE 278 LD R0 R0,SUBLGOOD get substitute block number 05407 E4174803 0 5 BASE 279 ST R0 R5,REALBLK and save it 00005408 280 NOTSUBD LABEL 281 PUNLOCK SUBSLOCK unlock the substitution list 05408 EC001F62 281 STZ SUBSLOCK 05409 0C800000 281 ION 282 * \ / 283 284 ********************************************************************************** 285 * * 286 * Update and write the bad tracks block * 287 * * 288 ********************************************************************************** 289 290 * \ / 0540A 60174803 0 5 BASE 291 LD R0 R5,REALBLK R0 is the bad block number 0540B 7800254F 0 292 AND R0 MSBLKMASK strip the volume number 0540C 60440800 1 IMM 293 LD R1 ADR WNDO1 R1 -> beginning of bad tracks block 0000540D 294 SEARCHBTRX LABEL 0540D 5C084080 1 ZBM 295 CMZ R1,BTRXEL/BTRXREASON 0540E FE025416 296 JEQ NOTINBTRX jump if end of data in btrx block 0540F 64085180 0 1 ZBM 297 CPR R0 R1,BTRXEL/MSBLKFIELD 05410 FE02541E 298 JEQ INBTRX jump if already in btrx block 05411 18440002 1 IMM 299 ADD R1 BTRXLNTH point to next entry 05412 64440BFE 1 IMM 300 CPR R1 ADR WNDO1(WPP)(-BTRXLNTH) 05413 FE0A540D 301 JLE SEARCHBTRX jump if not off end of block 302 * \ / 05414 008610D4 303 STOP STOPF10D4 bad tracks block is full. GO will 304 * \ / not put new entry into list. 05415 FE0E541E 305 JMP INBTRX 306 * --- 307 00005416 308 NOTINBTRX LABEL 05416 E4164800 0 1 BASE 309 ST R0 R1,BTRXEL save block number 05417 60040020 0 IMM 310 LD R0 BTRXRTDE get reason code 05418 E4084080 0 1 ZBM 311 ST R0 R1,BTRXEL/BTRXREASON save it 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1139 (SUBSPROCESS) F 57 Disk Block Substitution Process 05419 60101EE7 0 @ 312 LD R0 @FDATEPTR get current date (more or less) 0541A E4164801 0 1 BASE 313 ST R0 R1,BTRXDATE say when found 0541B DC40319D 314 CALLNP FORCEWRW1 write the bad tracks block 0541C 60040082 0 IMM 315 LD R0 PNWNDO1 page number holding bad trax block 0541D DC4031DE 316 CALLNP LOCKPAGE reference the page to wait for write completion 317 * \ / 318 319 ********************************************************************************** 320 * * 321 * Find the page's PPL and see if the block is substitutable * 322 * * 323 ********************************************************************************** 324 325 * \ / 0000541E 326 INBTRX LABEL 0541E 60974802 2 5 BASE 327 LD R2 R5,VIRTBLK Get the system's MS address 0541F 604AB460 1 2 CBM 328 LD R1 R2/PPHASHFLD R1 = index of PP list 329 PLOCK PPAGELOCK(R1) lock the list 05420 0CC00000 329 IOFF 05421 D1E21E21 1 329 SETT PPAGELOCK(R1) 05422 FE0C5424 329 JNE MA(2+DISPW MA 0) 05423 DC40308B 329 CALLNP LOCKWAIT 05424 60221E61 0 1 330 LD R0 PPAGELIST(R1) R0 -> first element on list 05425 3C960801 2 0 BASE 331 LSRCH R2 R0,PPBLOCK find the PPL 05426 FE025428 332 JEQ FOUNDPPL 05427 001310D5 333 HALT HALTS10D5 PPL not found 334 * --- 335 00005428 336 FOUNDPPL LABEL 05428 E4174801 0 5 BASE 337 ST R0 R5,PPLADDR save the address 338 PUNLOCK PPAGELOCK(R1) unlock the list 05429 EC221E21 1 338 STZ PPAGELOCK(R1) 0542A 0C800000 338 ION 0542B DC002606 339 CALL MAPINFBI get access to FBI, IOFF 0542C 40520000 0 REG 340 PARVL R0 pass physical page element 0542D 60084411 0 1 ZBM 341 LD R0 R1,FBINOSUB Check the No-Substitute marker bit 0542E 60484080 1 1 ZBM 342 LD R1 R1,FBITYPE get the type of block 0542F DC40261B 343 CALLNP MAPOUTFBI unmap FBI, ION 05430 FA0C547E 0 344 JNEZ R0 CANTSUB jump if block is not substitutable 05431 6444007F 1 IMM 345 CPR R1 FBITFREE is this a free block? 05432 FE025482 346 JEQ NODATAHERE jump if so, no actual substitution to do 347 * \ / 348 349 ********************************************************************************** 350 * * 351 * Get a free block and update the resident substitution list. * 352 * * 353 ********************************************************************************** 354 355 * \ / 05433 DC003654 356 CALL GETFREEBLK get a free block 05434 41440000 IMM 357 PARV 0 fbi type - how should I know? 05435 40490086 4 ZBM 358 PARVL VLN,VOLNNUM volume number 05436 FE0C5480 359 JNE NOSPACE jump if no space left 05437 E4174804 0 5 BASE 360 ST R0 R5,NEWBLK save new block number 361 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1140 (SUBSPROCESS) F 57 Disk Block Substitution Process 362 PLOCK SUBSLOCK lock the substitution list 05438 0CC00000 362 IOFF 05439 D1C01F62 362 SETT SUBSLOCK 0543A FE0C543C 362 JNE MA(2+DISPW MA 0) 0543B DC40308B 362 CALLNP LOCKWAIT 0543C 60174802 0 5 BASE 363 LD R0 R5,VIRTBLK virtual block number 0543D 64174803 0 5 BASE 364 CPR R0 R5,REALBLK Check against actual location 0543E FE025446 365 JEQ NEWSUB jump if block is a first timer 366 367 * block is already substituted 0543F 60401F63 1 368 LD R1 SUBSLIST get head of substitution list 05440 3C164801 0 1 BASE 369 LSRCH R0 R1,SUBLBAD find entry on list 05441 FE025443 370 JEQ GOTENTRY jump if found 05442 001310D6 371 HALT HALTS10D6 substitution list entry not found 372 * --- 373 00005443 374 GOTENTRY LABEL 05443 60174804 0 5 BASE 375 LD R0 R5,NEWBLK Get number of new block 05444 E4164802 0 1 BASE 376 ST R0 R1,SUBLGOOD set new substitution for block 05445 FE0E544F 377 JMP DIDREZSUB now done with resident list 378 * --- 379 00005446 380 NEWSUB LABEL 05446 DC002ED0 381 CALL SGETMEM get space for SUBLIST element 05447 40440002 IMM 382 PARVL SUBLLOG size of element 05448 60574802 1 5 BASE 383 LD R1 R5,VIRTBLK 05449 E4560801 1 0 BASE 384 ST R1 R0,SUBLBAD set bad block number 0544A 60574804 1 5 BASE 385 LD R1 R5,NEWBLK 0544B E4560802 1 0 BASE 386 ST R1 R0,SUBLGOOD set good block number 0544C 60401F63 1 387 LD R1 SUBSLIST 0544D E4560800 1 0 BASE 388 ST R1 R0,SUBLLINK link this element at top of list 0544E E4001F63 0 389 ST R0 SUBSLIST set new list pointer 390 * \ / 391 0000544F 392 DIDREZSUB LABEL 393 PUNLOCK SUBSLOCK unlock the substitution list 0544F EC001F62 393 STZ SUBSLOCK 05450 0C800000 393 ION 394 * \ / 395 396 ********************************************************************************** 397 * * 398 * Bad tracks block and resident substitution list entries * 399 * have been made. Now it's time to cause the resident data * 400 * to be written to the fresh disk block. * 401 * * 402 * Since the block is resident, the SETWNDO3 will get us the * 403 * block's data without going through the disk driver. * 404 * * 405 * N.B. We purposely map the page without specifying an FBI * 406 * type. This is required in case it is a swapping page for * 407 * the real user of the block. Since grubbing a substituted * 408 * swapping page causes an unsubstitution to be queued, a * 409 * duplicate unsubs would occur if we also held the block as * 410 * a swapping page (in turn leading to a HALT S10D8 when the * 411 * subs entry isn't found on the second unsubs). * 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1141 (SUBSPROCESS) F 57 Disk Block Substitution Process 412 * * 413 ********************************************************************************** 414 415 * \ / 00005451 416 MOVEBLOCK LABEL 05451 DC003202 417 CALL SETWNDO3 map in the user block 05452 41440003 IMM 418 PARV VPCNTLRO+VPCNTLLK read/only 05453 41440000 IMM 419 PARV VPNOFCB not from a file 05454 41005457 420 PAR USERBLKERR where to go if error 05455 41574802 5 BASE 421 PARV R5,VIRTBLK block number 05456 40440000 IMM 422 PARVL 0 ignore fbi type 423 424 * \ / 00005457 425 USERBLKERR LABEL 05457 DC40261B 426 CALLNP MAPOUTFBI unmap FBI, ION 05458 60040000 0 IMM 427 LD R0 0 05459 DC40318A 428 CALLNP SETERRW3 clear error trap 429 * \ / 0545A 60D74801 3 5 BASE 430 LD R3 R5,PPLADDR R3 -> block's PPL 0545B D056C802 3 BASE 431 DEC R3,PPBUSYWORD undo INC that happened long ago 0545C 5C094084 5 ZBM 432 CMZ R5,NEWBLK/VOLFIELD did we really substitute? 0545D FE02546B 433 JEQ AFTERSUBS jump if not, must skip force 434 * \ / 0545E DC4031A3 435 CALLNP FORCEWRW3 force-write the data to new location 0545F DC403156 436 CALLNP GRUBWNDO3 unmap the window 437 * \ / 438 439 ********************************************************************************** 440 * * 441 * Update the substitution list on the disk. * 442 * * 443 ********************************************************************************** 444 445 446 * search subs block for insertion point 447 * (same as existing on re-substitute) 05460 60174802 0 5 BASE 448 LD R0 R5,VIRTBLK MS address of bad block 05461 7800254F 0 449 AND R0 MSBLKMASK strip the volume number 05462 60440C00 1 IMM 450 LD R1 ADR WNDO2 R1 -> first element in substitution blk 00005463 451 SEARCHSUBS LABEL 05463 5C164800 1 BASE 452 CMZ R1,SUBSBADDY end of info in subs block? 05464 FE02546E 453 JEQ FOUNDPLACE jump if yes 05465 64164800 0 1 BASE 454 CPR R0 R1,SUBSBADDY found our entry? 05466 FE02546E 455 JEQ FOUNDPLACE jump if yes 05467 18440002 1 IMM 456 ADD R1 SUBSLNTH point to next entry 05468 64440FFE 1 IMM 457 CPR R1 ADR WNDO2(WPP)(-SUBSLNTH) off end of block? 05469 FE0A5463 458 JLE SEARCHSUBS jump if room left 0546A 008610D7 459 STOP STOPF10D7 substitution block is full 460 * \ / GO will not put new entry anywhere 0000546B 461 AFTERSUBS LABEL 0546B DC403156 462 CALLNP GRUBWNDO3 unmap the window 0546C 60C40E3B 3 IMM 463 LD R3 ERLCNOSUB say we didn't substitute 0546D FE0E5476 464 JMP CALLLOG jump to make log entry 465 * --- 466 467 * R1 => insertion point in WNDO2 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1142 (SUBSPROCESS) F 57 Disk Block Substitution Process 0000546E 468 FOUNDPLACE LABEL 0546E E4164800 0 1 BASE 469 ST R0 R1,SUBSBADDY save bad block number 0546F 60174804 0 5 BASE 470 LD R0 R5,NEWBLK get good block number 05470 7800254F 0 471 AND R0 MSBLKMASK strip volume number 05471 E4164801 0 1 BASE 472 ST R0 R1,SUBSSUB save result 05472 DC4031A0 473 CALLNP FORCEWRW2 write the substitution block 05473 60040083 0 IMM 474 LD R0 PNWNDO2 page number holding subs block 05474 DC4031DE 475 CALLNP LOCKPAGE wait for write to complete 476 05475 60C40E3A 3 IMM 477 LD R3 ERLCSUB say we substituted a block 478 * \ / 00005476 479 CALLLOG LABEL 05476 DC005048 480 CALL ERRORLOG make a log entry for our activity 05477 4152C000 3 REG 481 PARV R3 ERLCSUB or ERLCNOSUB 05478 DC00417D 482 CALL VOLTODISK find disk name 05479 40494082 5 ZBM 483 PARVL R5,VIRTBLK/VOLFIELD volume number 0547A 41520000 0 REG 484 PARV R0 PAK6 drive name 0547B 41574802 5 BASE 485 PARV R5,VIRTBLK logical block number 0547C 40574804 5 BASE 486 PARVL R5,NEWBLK substitute block number 0547D 5D1F8005 6 STAK 487 LEAVE POP and exit 488 * --- 489 490 * the block is not substitutable 0000547E 491 CANTSUB LABEL 0547E 60040001 0 IMM 492 LD R0 1 error code 0547F FE0E5483 493 JMP SETERRCODE 494 * --- 495 496 * no room for substitute block 00005480 497 NOSPACE LABEL 05480 60040002 0 IMM 498 LD R0 2 error code 05481 FE0E5483 499 JMP SETERRCODE 500 * --- 501 502 * the block should not be substituted since it is now free 00005482 503 NODATAHERE LABEL 05482 60040003 0 IMM 504 LD R0 3 error code 00005483 505 SETERRCODE LABEL 05483 E4174804 0 5 BASE 506 ST R0 R5,NEWBLK save the reason code 05484 FE0E5451 507 JMP MOVEBLOCK go do work to decrement PPL busy word 508 * --- 509 510 END SUBBLOCK subroutine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1143 (SUBSPROCESS) F 57 Disk Block Substitution Process 512 513 ********************************************************************************** 514 * * 515 * Routine to unsubstitute a block. * 516 * Call: * 517 * LD R3 block number to unsubstitute * 518 * LD VLN PTR VOLN element * 519 * CALLNP UNSUBBLOCK * 520 * * 521 * Eats R0:R3. * 522 * Stack required = 8. * 523 * 3 + max ( ERRORLOG/VOLTODISK (4), FORCEWRW2 (5), * 524 * FREEFILE (3), LOCKPAGE (1), LOCKWAIT (0), * 525 * SFREEMEM (0), TRACEPROC(3) ) * 526 * * 527 * The substitution block should already be locked in * 528 * WNDO2. This routine will unsubstitute the given block, and * 529 * free its substitute. We do the following: * 530 * 1. Remove the entry from the resident substitution list. * 531 * 2. Remove the entry from the substitution block. * 532 * 3. Forcewrite the substitution block. * 533 * 4. Call FREEFILE to free the substituted block. * 534 * * 535 ********************************************************************************** 536 537 BLOCK UNSUBBLOCK subroutine 538 ENTRY UNSUBBLOCK 539 540 BEGFRAME 00178801 6 BASE 541 VIRTBLK BSS 1 virtual block number 00178802 6 BASE 542 REALBLK BSS 1 substituted block number 543 ENDFRAME 544 05485 DD5F8003 6 STAK 545 UNSUBBLOCK ENTRNP PUSH 05486 61538000 5 6 REG 546 LD R5 SP R5 -> our stack frame 05487 E4D74801 3 5 BASE 547 ST R3 R5,VIRTBLK save virtual block number 548 549 * Remove element from resident substitution list 550 PLOCK SUBSLOCK lock the list 05488 0CC00000 550 IOFF 05489 D1C01F62 550 SETT SUBSLOCK 0548A FE0C548C 550 JNE MA(2+DISPW MA 0) 0548B DC40308B 550 CALLNP LOCKWAIT 0548C 60401F63 1 551 LD R1 SUBSLIST R1 => first subs element 0548D 38801F63 2 552 LEA R2 SUBSLIST R2 => list head pointer 0548E 48D64801 3 1 BASE 553 RLSRCH R3 R1,SUBLBAD find substitution list element 0548F FE025497 554 JEQ FOUND jump if found 05490 001310D8 555 HALT HALTS10D8 substitution list element not found 556 * --- 557 * To recover we unlock the lock, trace the event, and leave. 558 PUNLOCK SUBSLOCK release lock 05491 EC001F62 558 STZ SUBSLOCK 05492 0C800000 558 ION 05493 6012C000 0 3 REG 559 LD R0 R3 copy block we are looking for 560 TRACE SUBSTRACE,SUBTUHALT 05494 5D401D32 560 XCT TRACECALL(SUBSTRACE) 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1144 (SUBSPROCESS) F 57 Disk Block Substitution Process 05495 FEC000C6 560 NOP (SUBSTRACE*BITS 22:26)+(SUBTUHALT*BITS 27:31) 05496 5D1F8003 6 STAK 561 LEAVE POP 562 * --- 563 00005497 564 FOUND LABEL 05497 60164800 0 1 BASE 565 LD R0 R1,SUBLLINK get link to next element 05498 E4168800 0 2 BASE 566 ST R0 R2,SUBLLINK remove element from list 567 PUNLOCK SUBSLOCK unlock the list 05499 EC001F62 567 STZ SUBSLOCK 0549A 0C800000 567 ION 0549B 60164802 0 1 BASE 568 LD R0 R1,SUBLGOOD 0549C E4174802 0 5 BASE 569 ST R0 R5,REALBLK save real block number 570 571 TRACE SUBSTRACE,SUBTUFND 0549D 5D401D32 571 XCT TRACECALL(SUBSTRACE) 0549E FEC000C7 571 NOP (SUBSTRACE*BITS 22:26)+(SUBTUFND*BITS 27:31) 572 0549F DC002F5D 573 CALL SFREEMEM free the substitution list element 054A0 41440002 IMM 574 PARV SUBLLOG 054A1 40524000 1 REG 575 PARVL R1 576 577 * Remove item from the substitution block 054A2 60174801 0 5 BASE 578 LD R0 R5,VIRTBLK get the address by which the system knows it 054A3 7800254F 0 579 AND R0 MSBLKMASK mask off the volume number 054A4 60840C00 2 IMM 580 LD R2 ADR WNDO2 R2 -> start of substitution block 000054A5 581 FINDENTRY LABEL 054A5 64168800 0 2 BASE 582 CPR R0 R2,SUBSBADDY see if this entry matches 054A6 FE0254AD 583 JEQ FOUNDENTRY jump if found our entry 054A7 5C168800 2 BASE 584 CMZ R2,SUBSBADDY check for empty entry 054A8 FE0254BA 585 JEQ NOENTRY jump if no more entries 054A9 18840002 2 IMM 586 ADD R2 SUBSLNTH advance to next entry 054AA 64840FFE 2 IMM 587 CPR R2 ADR WNDO2(WPP)(-SUBSLNTH) 054AB FE0A54A5 588 JLE FINDENTRY jump if more to search 054AC FE0E54BA 589 JMP NOENTRY else no entry in substitution block 590 * --- 591 000054AD 592 FOUNDENTRY LABEL 054AD 60D28000 3 2 REG 593 LD R3 R2 copy pointer for search to end 000054AE 594 FINDLAST LABEL 054AE 18C40002 3 IMM 595 ADD R3 SUBSLNTH R3 -> next entry 054AF 64C40FFE 3 IMM 596 CPR R3 ADR WNDO2(WPP)(-SUBSLNTH) at end of block? 054B0 FE0454B3 597 JGT FOUNDLAST jump if at hard end 054B1 5C16C800 3 BASE 598 CMZ R3,SUBSBADDY are we past the last actual entry? 054B2 FE0C54AE 599 JNE FINDLAST jump if not 600 * \ / 000054B3 601 FOUNDLAST LABEL 054B3 10C40002 3 IMM 602 SUB R3 SUBSLNTH R3 -> last used entry in block 054B4 6216C800 013 BASE 603 LD2 R0 R3,0 pick it up 054B5 E6168800 012 BASE 604 ST2 R0 R2,0 put it on top of deleted one 054B6 EE16C800 3 BASE 605 STZ2 R3,0 zero out last entry 054B7 DC4031A0 606 CALLNP FORCEWRW2 write the substitution block 054B8 60040083 0 IMM 607 LD R0 PNWNDO2 page number holding subs block 054B9 DC4031DE 608 CALLNP LOCKPAGE and wait for write to complete 000054BA 609 NOENTRY LABEL 610 054BA DC004FEA 611 CALL FREEFILE free the block 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1145 (SUBSPROCESS) F 57 Disk Block Substitution Process 054BB 41574802 5 BASE 612 PARV R5,REALBLK block number 054BC 40440000 IMM 613 PARVL FFTUNKNOWN fbi type - indicate single block 614 054BD DC005048 615 CALL ERRORLOG log the unsubstitution 054BE 41440C3C IMM 616 PARV ERLCUNSUB code 054BF DC00417D 617 CALL VOLTODISK find disk name 054C0 40494081 5 ZBM 618 PARVL R5,VIRTBLK/VOLFIELD volume number 054C1 41520000 0 REG 619 PARV R0 PAK6 drive name 054C2 41574801 5 BASE 620 PARV R5,VIRTBLK now block 054C3 40574802 5 BASE 621 PARVL R5,REALBLK bad block 622 054C4 5D1F8003 6 STAK 623 LEAVE POP return happily 624 * --- 625 626 END UNSUBBLOCK subroutine 627 628 629 END Substitution Process 101 INPUT HOURPROC routine to do hour interrupt processing 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1146 (HOURPROC) F 58 Hour processing 3 4 BLOCK hour process 5 ENTRY HOURPROC one hour processing 6 ENTRY TIME2DISK force time variables to disk 7 ENTRY LOGDISKS log all disk activity counts 8 ENTRY SETNVMTIME set time into NVM 9 10 ********************************************************************************** 11 * * 12 * This virtual routine is run as a process once an hour. * 13 * Its main job is to copy the current time and clock correction * 14 * values to the security block on mass storage. This is done * 15 * so that a crash does not lose too much information - * 16 * especially the clock correction values. It also logs the * 17 * counts of disk activity, so we can have some measure of the * 18 * reliability of our disk drives. * 19 * * 20 * Stack required = 8 * 21 * 0 + max ( FREESTACK (0), GETSTACK (0), LIQUIDATE (7), * 22 * LOGDISKS (2), TIME2DISK (8), UPDATENVM (8) ) * 23 * * 24 ********************************************************************************** 25 26 BLOCK HOURPROC routine 27 ENTRY HOURPROC 28 0000000F ABS 29 STACKSIZE EQU 15 size of stack to get 30 000054C5 31 HOURPROC LABEL 054C5 DC00286A 32 CALL GETSTACK get a stack 054C6 4044000F IMM 33 PARVL STACKSIZE 054C7 DC4054D2 34 CALLNP TIME2DISK force time variables to disk 054C8 DC4054F2 35 CALLNP LOGDISKS log disk activity 054C9 DC4054FF 36 CALLNP UPDATENVM update clock value in NVM 37 054CA 60040055 0 IMM 38 LD R0 URMAYIRUN see if OS is still allowed to run 054CB 60440000 1 IMM 39 LD R1 0 (code for OS) 054CC 09040000 IMM 40 UREQ 0 054CD FA0854D1 0 41 JLTZ R0 DEATHHALT go die if not 42 054CE DC002875 43 CALL FREESTACK free our stack 054CF 4044000F IMM 44 PARVL STACKSIZE 054D0 FE0E2DAC 45 JMP LIQUIDATE destroy my process 46 * --- 47 054D1 002A1270 48 DEATHHALT HALT HLTSV1270 user no longer authorized to use system 49 50 END HOURPROC routine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1147 (HOURPROC) F 58 Hour processing 52 53 ********************************************************************************** 54 * * 55 * TIME2DISK. Routine that finds the security block and * 56 * places assorted time related variables on mass storage. * 57 * Call: * 58 * SP => stack * 59 * CALLNP TIME2DISK * 60 * Gets R0:R4 * 61 * Stack required = 8 * 62 * 1 + max ( DUALWRITE (7), GETDATE (1), GRUBWNDO1 (7), * 63 * SETWNDO1 (4) ) * 64 * * 65 ********************************************************************************** 66 67 BLOCK TIME2DISK subroutine 68 ENTRY TIME2DISK 69 70 BEGFRAME 71 ENDFRAME 72 054D2 DD5F8001 6 STAK 73 TIME2DISK ENTRNP PUSH 054D3 61001F23 4 74 LD VLN VOLNTABLE(1) get pointer to system volume 054D4 60092182 0 4 ZBM 75 LD R0 VLN,VOLNSECBK1 get the security block pointer 76 * \ / 77 000054D5 78 TRYSECAGN LABEL 054D5 E4091187 0 4 ZBM 79 ST R0 VLN,VOLNSMSBLK create security block address 054D6 DC003205 80 CALL SETWNDO1 map the block into window 1 054D7 41440000 IMM 81 PARV VPCNTLW with write access 054D8 41440000 IMM 82 PARV VPNOFCB indicate no lun associated with this page 054D9 410054EE 83 PAR BADSEC2BLK MS error address 054DA 41570807 4 BASE 84 PARV VLN,VOLNSECAD pass the complete MS address 054DB 40440006 IMM 85 PARVL FBITSEC expecting a security block 86 * \ / 054DC DC404549 87 CALLNP GETDATE get the current date 054DD E6000A29 01 88 ST2 R0 WNDO1(SECLASTDT) set the last known date 054DE 60001EEF 0 89 LD R0 TIMEZONE get the time zone information 054DF E4000A26 0 90 ST R0 WNDO1(SECTZONE) remember time zone 054E0 60001EED 0 91 LD R0 FDATERROR 054E1 E4000A2D 0 92 ST R0 WNDO1(SECDATERR) remember date error in MS 054E2 60001EEE 0 93 LD R0 FDATEDRFT 054E3 E4000A2E 0 94 ST R0 WNDO1(SECDATDRFT) remember clock drift in ppb 054E4 62001EEB 01 95 LD2 R0 LASTCORR get the date of the last correction 054E5 E6000A2F 01 96 ST2 R0 WNDO1(SECDATCOR) remember last correction time 054E6 60C40082 3 IMM 97 LD R3 PNWNDO1 get page number of window we're using 054E7 DC0031A6 98 CALL DUALWRITE write security block out twice 054E8 60170807 0 4 BASE 99 LD R0 VLN,VOLNSECAD get the address where we succeeded 054E9 74092182 0 4 ZBM 100 XOR R0 VLN,VOLNSECBK1 take out the right one 054EA 74091183 0 4 ZBM 101 XOR R0 VLN,VOLNSECBK2 and create the other sec blk addr 054EB 40520000 0 REG 102 PARVL R0 pass the other address 054EC DC403150 103 CALLNP GRUBWNDO1 now free up the window 104 * \ / 054ED 5D1F8001 6 STAK 105 LEAVE POP done 106 * --- 107 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1148 (HOURPROC) F 58 Hour processing 108 * Primary security block is bad, try the other. 000054EE 109 BADSEC2BLK LABEL 054EE 60091183 0 4 ZBM 110 LD R0 VLN,VOLNSECBK2 get the second sec blocks address 054EF 64091187 0 4 ZBM 111 CPR R0 VLN,VOLNSMSBLK did we already try it? 054F0 FE0C54D5 112 JNE TRYSECAGN no, so go try it 113 * \ / 114 * Neither security block worked for us 054F1 00041261 115 HALT HALTD1261 dead in the water, both security blocks bad 116 * --- 117 118 END TIME2DISK subroutine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1149 (HOURPROC) F 58 Hour processing 120 121 ********************************************************************************** 122 * * 123 * LOGDISKS. This routine will set the flags that cause * 124 * the disk activity to be logged. It does this for all disk * 125 * drives. Call: * 126 * SP => stack * 127 * CALLNP LOGDISKS * 128 * Eats R0-R5. * 129 * Stack required = 2 * 130 * 1 + max ( SRCHLIST (1), UNSRCHLIST (1) ) * 131 * * 132 ********************************************************************************** 133 134 BLOCK LOGDISKS subroutine 135 ENTRY LOGDISKS 136 137 BEGFRAME 138 ENDFRAME 139 054F2 DD5F8001 6 STAK 140 LOGDISKS ENTRNP PUSH 054F3 DC0030AA 141 CALL SRCHLIST lock the MDV list 054F4 40001F14 142 PARL MDVLOCK 054F5 61401F15 5 143 LD MDV MDVLIST get first MDV element 054F6 FB7054FA 5 144 JZA MDV DONE jump if none 145 * \ / 146 000054F7 147 LOOP LABEL 148 SETTBIT MDV,MDVLOGCNT set the flag - MSPROC does the rest 054F7 60020040 0 IMM 148 LD R0 1*BIT(((MDV,MDVLOGCNT) DISP (MDV,0))/BITS 0:4) 054F8 FC174800 0 5 BASE 148 IORM R0 MDV,(((MDV,MDVLOGCNT) DISP (MDV,0))/BITS 15:31) 054F9 FB7654F7 5 149 LJNA MDV LOOP do it for each of them 150 * \ / 151 000054FA 152 DONE LABEL 054FA DC0030B7 153 CALL UNSRCHLIST release the MDV list 054FB 40001F14 154 PARL MDVLOCK 054FC 60040001 0 IMM 155 LD R0 1*BIT FLMSPROC get the appropriate dispatcher bit 054FD FC001CF6 0 156 IORM R0 FLAGS and tell the dispatcher to run MS proc 054FE 5D1F8001 6 STAK 157 LEAVE POP return 158 * --- 159 160 END LOGDISKS subroutine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1150 (HOURPROC) F 58 Hour processing 162 163 ********************************************************************************** 164 * * 165 * Once an hour we come here to update the last known * 166 * time in the NVM clock. We do this very carefully, so * 167 * that the NVM time may be used as a reliable check on the * 168 * date in the real clock. * 169 * * 170 * Stack required = 8 * 171 * 1 + max ( GETFDATE (1), READNVM (6), SETNVMTIME (7) ) * 172 * * 173 ********************************************************************************** 174 175 BLOCK UPDATENVM subroutine 176 ENTRY UPDATENVM routine to update the NVM values 177 178 BEGFRAME 179 ENDFRAME 180 054FF DD5F8001 6 STAK 181 UPDATENVM ENTRNP PUSH 05500 60401EF9 1 182 LD R1 NVMCLKINDX get index for current clock value 05501 78401EF8 1 183 AND R1 NVMCLKMASK mask off unused bits 05502 1C440004 1 IMM 184 MUL R1 NVMCLKBYTS convert to byte index 05503 18401EF6 1 185 ADD R1 NVMCLOCKS and add in base value 05504 DC0045EA 186 CALL READNVM call to read NVM 05505 41440004 IMM 187 PARV NVMCLKBYTS number of bytes to read 05506 40524000 1 REG 188 PARVL R1 byte address to fetch 189 * \ / 05507 18005514 0 190 ADD R0 X1HOUR advance the time by one hour 05508 60920000 2 0 REG 191 LD R2 R0 make a copy (for the store) 05509 DC40454F 192 CALLNP GETFDATE get the time that the system believes in 0550A 10128000 0 2 REG 193 SUB R0 R2 find the difference 0550B FA085511 0 194 JLTZ R0 DOWRITE jump if NVM time greater (shouldn't happen) 0550C 68005515 0 195 UCPR R0 X36DAYS check to see if roughly correct 0550D FE065511 196 JGE DOWRITE jump if too far away 0550E 68005516 0 197 UCPR R0 X5MINS check to see if within 5 minutes 0550F FE0A5511 198 JLE DOWRITE jump if almost right on 05510 18805516 2 199 ADD R2 X5MINS make the NVM time creep up on the real time 200 * \ / 201 00005511 202 DOWRITE LABEL 05511 DC005517 203 CALL SETNVMTIME set new NVM time 05512 40528000 2 REG 204 PARVL R2 pass new time as parameter 05513 5D1F8001 6 STAK 205 LEAVE POP return 206 * --- 207 05514 0000036E 208 X1HOUR VFD 1*FOURSECSH 1 hour (in 32 bit time format) 05515 000B9634 209 X36DAYS VFD 36*FOURSECSD 36 days (in 32 bit time format) 05516 00000046 210 X5MINS VFD 5*FOURSECSM 5 minutes (in 32 bit time format) 211 212 END UPDATENVM subroutine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1151 (HOURPROC) F 58 Hour processing 214 215 ********************************************************************************** 216 * * 217 * SETNVMTIME. This routine copies the time passed to * 218 * it into the next NVM clock location. The number of times * 219 * (4 bytes each) kept in the NVM depends on the SSU version. * 220 * The times are indexed by a variable on the head page, * 221 * NVMCLKINDX. * 222 * Call: * 223 * CALL SETNVMTIME * 224 * PARVL <32 bit time> * 225 * * 226 * Eats R0:R3 * 227 * Stack required = 7 * 228 * 1 + max ( WRITENVM (6) ) * 229 * * 230 ********************************************************************************** 231 232 BLOCK SETNVMTIME subroutine 233 ENTRY SETNVMTIME 234 235 BEGFRAME 236 ENDFRAME 237 05517 DD1F8001 6 STAK 238 SETNVMTIME ENTR PUSH 05518 C0528000 2 REG 239 STPVL R2 get new 32 bit time 240 * \ / 05519 BC401EF9 1 241 INCL R1 NVMCLKINDX advance to next indexed time 0551A 78401EF8 1 242 AND R1 NVMCLKMASK don't let it get too large 0551B 1C440004 1 IMM 243 MUL R1 NVMCLKBYTS calculate proper index 0551C 18401EF6 1 244 ADD R1 NVMCLOCKS and add in base 0551D DC0045F9 245 CALL WRITENVM write time to NVM 0551E 41440004 IMM 246 PARV NVMCLKBYTS number of bytes to write 0551F 40524000 1 REG 247 PARVL R1 and byte address 05520 5D1F8001 6 STAK 248 LEAVE POP exit this subroutine 249 * --- 250 251 END SETNVMTIME subroutine 252 253 254 END hour process 102 INPUT ULBTWIDDLE ULB finders and returners 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1152 (ULBTWIDDLE) F 59 User Limit Block Managers 3 4 ULBTWIDDLE BLOCK User Limit Block Manager 5 6 ENTRY FINDULB look up an ULB 7 ENTRY USEULB add another user of ULB 8 ENTRY FETCHDIR lock directory 9 ENTRY FREEDIR unlock directory 10 ENTRY FREEULB return a usage of an ULB 11 ENTRY FREEULBC same as above but info copied to directory 12 ENTRY FREEULBLK same as FREEULB, but dir locked 13 ENTRY FINDVOLUME find VOLN element given volume name 14 ENTRY ULTRLOCK trace code for FETCHDIR (locking) 15 ENTRY ULTRUNLOCK trace code for FREEDIR (unlocking) 16 17 ********************************************************************************** 18 * * 19 * The UDIR for an account is the disk resident table that * 20 * contains all of the information about the account, including * 21 * its limits and its file directory. However, while an account * 22 * is being actively used, it is necessary to retain some type * 23 * of resident central control element. These control elements * 24 * are called User Limit Blocks. The routines following are the * 25 * routines that manipulate these blocks. * 26 * * 27 ********************************************************************************** 28 29 * The ULB managers generate the following trace entries. 30 * code event R0 R1 R2 31 * ---- ----- -- -- -- 00000001 ABS 32 ULTRCREATE EQU 01 create ULB ULB ptr acct(0) project name 00000002 ABS 33 ULTRFIND EQU 02 find ULB ULB ptr return adr ULBUSYWORD 00000003 ABS 34 ULTRFIND2 EQU 03 find ULB ULB ptr return adr ULBUSYWORD 00000004 ABS 35 ULTRFIND3 EQU 04 find ULB ULB ptr return adr ULBUSYWORD 00000005 ABS 36 ULTRNOFIND EQU 05 no find return adr acct(0) project name 00000006 ABS 37 ULTRUSE EQU 06 use ULB ULB ptr return adr ULBUSYWORD 00000007 ABS 38 ULTRFREE EQU 07 free ULB ULB ptr return adr ULBUSYWORD 00000008 ABS 39 ULTRDSTROY EQU 08 destroy ULB ULB ptr 00000009 ABS 40 ULTRLOCK EQU 09 lock dir ULB ptr return adr previous return adr 0000000A ABS 41 ULTRUNLOCK EQU 0A unlock dir ULB ptr return adr previous return adr 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1153 (ULBTWIDDLE) F 59 User Limit Block Managers 43 44 ********************************************************************************** 45 * * 46 * FREEULB. Free a user limit block. Routine to count * 47 * down the ULB busy counter in a user limit block pointed * 48 * to by R4 and if it becomes zero it will free it by * 49 * copying its information to the disk. * 50 * Note that FREEULB and FREEULBC lock the ULB (FETCHDIR) * 51 * on entry. They must not be called with the directory * 52 * locked or a deadlock will result. Use FREEULBLK if the * 53 * directory is already locked. FREEULBLK will unlock the * 54 * directory on return. * 55 * Call: * 56 * LD R4 * 57 * CALLNP FREEULB * 58 * * 59 * Eats R0:R4 * 60 * Stack required = 11 * 61 * 1 + max ( DISMOUNT (3), FETCHDIR (4), FORCEWRW1 (5), * 62 * FREEDIR (5), GRUBWNDO1 (7), LOCKLIST (1), * 63 * MAPOUTFBI (2), SETWNDO1 (4), SFREEMEM (0), * 64 * TRACEPROC (3), UNLOCKLIST (1), WSXCLNALL(10) ) * 65 * * 66 ********************************************************************************** 67 68 BLOCK FREEULB and FREEULBC subroutines 69 ENTRY FREEULB 70 ENTRY FREEULBC 71 ENTRY FREEULBLK same as FREEULB, but dir locked 72 73 BEGFRAME 74 ENDFRAME 75 05521 DD5F8001 6 STAK 76 FREEULBLK ENTRNP PUSH 05522 600908B0 0 4 ZBM 77 LD R0 ULB,ULIDENT get ULB identifier 05523 64040765 0 IMM 78 CPR R0 ULIDVAL is this ULB good? 05524 FE02552C 79 JEQ FREEULB3 jump if yes 05525 001310E2 80 HALT HALTS10E2 bad ULB pointer given to FREEULBLK 81 * --- 82 05526 DD5F8001 6 STAK 83 FREEULB ENTRNP PUSH 00005527 84 FREEULB1 LABEL 05527 600908B0 0 4 ZBM 85 LD R0 ULB,ULIDENT get ULB identifier 05528 64040765 0 IMM 86 CPR R0 ULIDVAL is this ULB good? 05529 FE02552B 87 JEQ FREEULB2 jump if yes 0552A 001310E0 88 HALT HALTS10E0 bad ULB pointer given to FREEULB 89 * --- 90 0000552B 91 FREEULB2 LABEL 0552B DC405667 92 CALLNP FETCHDIR link up to the directory 0000552C 93 FREEULB3 LABEL 0552C 6087FFFF 2 IMM 94 LD R2 -1 this is used to decrement the busy word, 0552D B8970805 2 4 BASE 95 ADDB R2 ULB,ULBUSYWORD and we save value for trace and test 0552E 60130000 0 4 REG 96 LD R0 ULB copy ULB pointer for trace 0552F 6053C000 1 7 REG 97 LD R1 R7 copy return address for trace 98 TRACE ULBTRACE,ULTRFREE trace the event 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1154 (ULBTWIDDLE) F 59 User Limit Block Managers 05530 5D401D2E 98 XCT TRACECALL(ULBTRACE) 05531 FEC00047 98 NOP (ULBTRACE*BITS 22:26)+(ULTRFREE*BITS 27:31) 05532 F7C05538 7 99 JBT R7/BIT 0 FULBCOPY jump if FREEULBC called 05533 7885FFFF 2 IMM 100 AND R2 01FFFF leave only the count part 101 * note that we have an extra count from FETCHDIR 05534 64840001 2 IMM 102 CPR R2 1 check for exactly us left 05535 FE025538 103 JEQ FULBCOPY if so, copy stuff to mass storage 05536 DC405685 104 CALLNP FREEDIR otherwise, release the DIR 05537 FE0E5563 105 JMP FREEULBXT and exit 106 * --- 107 00005538 108 FULBCOPY LABEL 05538 DC003205 109 CALL SETWNDO1 get resident copy of directory 05539 41440002 IMM 110 PARV VPCNTLW+VPCNTLLK write access and locked 0553A 41440000 IMM 111 PARV VPNOFCB indicate no LUN associated with this block 0553B 41005564 112 PAR FREEULBDE indicate error address 0553C 41570801 4 BASE 113 PARV ULB,ULBLOCK indicate the block number 0553D 40440009 IMM 114 PARVL FBITUDIR1 and block type expected 0553E DC40261B 115 CALLNP MAPOUTFBI unmap FBI, ION 0553F 38170806 0 4 BASE 116 LEA R0 ULB,ULLIMITS get address of limit field 05540 60440024 1 IMM 117 LD R1 LIMITSIZE*CPW get its size 05541 6084082B 2 IMM 118 LD R2 ADR WNDO1(UDLIMITS) and location in UDIR1 05542 FE400000 119 CMOVE copy limit field into directory 05543 DC40319D 120 CALLNP FORCEWRW1 force modification to disk 00005544 121 FREEULB01 LABEL 05544 DC403150 122 CALLNP GRUBWNDO1 and unmap the window 05545 DC405685 123 CALLNP FREEDIR release hold on the directory 05546 60C40000 3 IMM 124 LD R3 0 marker for all pages 05547 DC4032EA 125 CALLNP WSXCLNALL flush the working set extension list 126 05548 DC003096 127 CALL LOCKLIST ensure list not busy 05549 40001EAC 128 PARL ULLOCK 0554A 60441EAB 1 IMM 129 LD R1 ADR ULLIST get address of ULB list head 0554B 3D085F10 4 1 ZBM 130 LSRCH ULB R1,ULLINK look for guy pointing here 0554C FE0C5561 131 JNE FREEULGO jump if not found... someone else got it 0554D 5C091F15 4 ZBM 132 CMZ ULB,ULBUSYCTR found - is it being used? 0554E FE0C5561 133 JNE FREEULGO yes - don't destroy this block 0554F 60091F10 0 4 ZBM 134 LD R0 ULB,ULLINK get forward link from this entry 05550 E4085F10 0 1 ZBM 135 ST R0 R1,ULLINK and unlink this entry 05551 EC0908B0 4 ZBM 136 STZ ULB,ULIDENT say this is no longer a ULB 05552 60130000 0 4 REG 137 LD R0 ULB for trace 138 TRACE ULBTRACE,ULTRDSTROY say we destroyed ULB 05553 5D401D2E 138 XCT TRACECALL(ULBTRACE) 05554 FEC00048 138 NOP (ULBTRACE*BITS 22:26)+(ULTRDSTROY*BITS 27:31) 05555 60890081 2 4 ZBM 139 LD R2 ULB,ULDRIVE get volume wherein lies the account 05556 DC002F5D 140 CALL SFREEMEM give the storage back to the system 05557 41440004 IMM 141 PARV ULLOG 05558 40530000 4 REG 142 PARVL ULB 143 * \ / 144 145 ********************************************************************************** 146 * * 147 * Every ULB creation increments its volume busy counter * 148 * (so that the volume doesn't get dismounted). * 149 * This section is to reduce that count. * 150 * * 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1155 (ULBTWIDDLE) F 59 User Limit Block Managers 151 ********************************************************************************** 152 153 * \ / 05559 DC0030A4 154 CALL UNLOCKLIST let go the UL list 0555A 40001EAC 155 PARL ULLOCK 0555B 60241F22 0 2 156 LD R0 VOLNTABLE(R2) get the VOLN element pointer 0555C D0560815 0 BASE 157 DEC R0,VOLNBUSY indicate not busy by this ULB 0555D FE0C5563 158 JNE FREEULBXT if volume busy skip dismount check 0555E DC005034 159 CALL DISMOUNT check if volume needs dismounting 0555F 40520000 0 REG 160 PARVL R0 address of the VOLN element 05560 FE0E5563 161 JMP FREEULBXT exit 162 * --- 163 00005561 164 FREEULGO LABEL 05561 DC0030A4 165 CALL UNLOCKLIST allow others to use the list 05562 40001EAC 166 PARL ULLOCK 00005563 167 FREEULBXT LABEL 05563 5D1F8001 6 STAK 168 LEAVE POP return to caller 169 * --- 170 171 * Disk error copying to disk block - give up on the data 172 * because the directory is lost 00005564 173 FREEULBDE LABEL 05564 DC40261B 174 CALLNP MAPOUTFBI unmap FBI, ION 05565 FE0E5544 175 JMP FREEULB01 and go release the window 176 * --- 177 178 * Decrement ULB use count and copy limit information to the 179 * disk no matter what. Used to keep disk limits as up to the 180 * moment as possible 181 05566 DD5F8001 6 STAK 182 FREEULBC ENTRNP PUSH 05567 EDCBC010 7 CBM 183 STW R7/BIT 0 say that we must copy to UDIR1 05568 FE0E5527 184 JMP FREEULB1 go share code 185 * --- 186 187 END FREEULB and FREEULBC subroutines 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1156 (ULBTWIDDLE) F 59 User Limit Block Managers 189 190 ********************************************************************************** 191 * * 192 * USEULB. Given that we already have a ULB, increment * 193 * the busy count to account for another user. * 194 * Call: * 195 * LD ULB * 196 * CALLNP USEULB * 197 * * 198 * Eats R0:R2 * 199 * Stack required = 4 * 200 * 1 + max ( TRACEPROC (3) ) * 201 * * 202 ********************************************************************************** 203 204 BLOCK USEULB subroutine 205 ENTRY USEULB 206 207 BEGFRAME 208 ENDFRAME 209 05569 DD5F8001 6 STAK 210 USEULB ENTRNP PUSH 0556A 600908B0 0 4 ZBM 211 LD R0 ULB,ULIDENT get identifier word 0556B 64040765 0 IMM 212 CPR R0 ULIDVAL is this really a ULB? 0556C FE02556E 213 JEQ USEULB1 jump if this is real 0556D 001310E1 214 HALT HALTS10E1 bad ULB pointer passed to USEULB 215 * --- 216 0000556E 217 USEULB1 LABEL 0556E BC970805 2 4 BASE 218 INCL R2 ULB,ULBUSYWORD increment the use count, remember value 0556F 60130000 0 4 REG 219 LD R0 ULB for trace 05570 6053C000 1 7 REG 220 LD R1 R7 return address, for trace 221 TRACE ULBTRACE,ULTRUSE say we are using ULB 05571 5D401D2E 221 XCT TRACECALL(ULBTRACE) 05572 FEC00046 221 NOP (ULBTRACE*BITS 22:26)+(ULTRUSE*BITS 27:31) 05573 5D1F8001 6 STAK 222 LEAVE POP return to caller 223 * --- 224 225 END USEULB subroutine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1157 (ULBTWIDDLE) F 59 User Limit Block Managers 227 228 ********************************************************************************** 229 * * 230 * FINDULB. Routine to find a user limit block. It checks * 231 * resident and if not there it reads in the directory from the * 232 * disk (WNDO1) and creates it. * 233 * Call: * 234 * LD EQT => parameter block * 235 * CALLNP FINDULB * 236 * returns with ULB => element or zero if the directory * 237 * was not found. ULBUSYWORD is incremented once for * 238 * this call. * 239 * You must fetch access to the directory yourself. * 240 * * 241 * Eats R0:R3, returns ULB * 242 * Stack required = 14 * 243 * 2 + max ( DISMOUNT (3), DMOTEWNDO1 (7), FINDVOLUME (1), * 244 * FREEIDXACS (5), GETIDXACS (3), GRUBWNDO1 (7), * 245 * LOCKLIST (1), MAPOUTFBI (2), SETWNDO1 (4), * 246 * SFREEMEM (0), SGETMEM (0), SRCHAFT (12), * 247 * SRCHAFTIDX (11), SRCHLIST (1), TRACEPROC (3), * 248 * UNLOCKLIST (1), UNSRCHLIST (1) ) * 249 * * 250 ********************************************************************************** 251 252 BLOCK FINDULB subroutine 253 ENTRY FINDULB findulb utility 254 255 BEGFRAME 00178801 6 BASE 256 SAVER3 BSS 1 holds MS address while searching AFT 257 ENDFRAME 00000010 BYTE 258 SHADOW EQU BIT 0 bit in R7, 1 => acct is shadow 259 05574 DD5F8002 6 STAK 260 FINDULB ENTRNP PUSH 05575 EC0BC010 7 CBM 261 STZ R7/SHADOW assume the best about the acct 05576 60174803 0 5 BASE 262 LD R0 EQT,EQSYSTEM is an alternate system specified? 05577 FA0C564A 0 263 JNEZ R0 FINDULBSYS jump if not ourselves 00005578 264 FNDSYSOK LABEL 05578 5E174801 5 BASE 265 CMZ2 EQT,EQVOLUME was a volume specified too? 05579 FE0C5620 266 JNE FINDULBVOL jump if so 0557A DC0030AA 267 CALL SRCHLIST check lockout for searching 0557B 40001EAC 268 PARL ULLOCK 0557C 62174806 015 BASE 269 LD2 R0 EQT,EQACCT get account name 0557D 60974808 2 5 BASE 270 LD R2 EQT,EQACCTPROJ and project 0557E 61001EAB 4 271 LD ULB ULLIST get ULB list head 0000557F 272 SRCHULNS LABEL 0557F 3C170802 0 4 BASE 273 LSRCH R0 ULB,ULACCNM search for an account match 05580 FE0C5588 274 JNE ACTNOTINUL jump if acct not here 05581 64570803 1 4 BASE 275 CPR R1 ULB,ULACCNM(1) does second half match 05582 FE0C5587 276 JNE SRCHULNSX jump if not 05583 64970804 2 4 BASE 277 CPR R2 ULB,ULACCPROJ does the project match? 05584 FE0C5587 278 JNE SRCHULNSX jump if not 05585 5C090010 4 ZBM 279 CMZ ULB,ULSHADOW is this a shadow account? 05586 FE025613 280 JEQ ACCTINULL2 jump if not - it's found 00005587 281 SRCHULNSX LABEL this entry unsatisfactory - 05587 FB36557F 4 282 LJNA ULB SRCHULNS try next entry 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1158 (ULBTWIDDLE) F 59 User Limit Block Managers 283 * \ / 284 00005588 285 ACTNOTINUL LABEL 05588 DC0030B7 286 CALL UNSRCHLIST indicate that we're no longer looking 05589 40001EAC 287 PARL ULLOCK 0558A DC405657 288 CALLNP SRCHAFT search the account finder table 0558B FAC2560C 3 289 JEQZ R3 FNDULBNAC jump if no such account 290 * \ / 291 292 ********************************************************************************** 293 * * 294 * Check for inhibited access to this volume. * 295 * Otherwise, mark access in the volume control block. Note * 296 * the funny check to see if the volume has gone away. * 297 * Unfortunately, somewhere between the SRCHAFT and SRCHLIST * 298 * below another CPU (a fast one) could have pulled the * 299 * volume out from underneath us. The main flag here is * 300 * VOLNMOUNT, which tells us whether or not the volume is * 301 * in the process of being dismounted. If not then we will * 302 * increment the busy counter and prevent the dismount. * 303 * If the volume is in the process of being (or has been) * 304 * dismounted the absence of a VOLN element or the VOLNMOUNT * 305 * flag being set will let us know. * 306 * * 307 ********************************************************************************** 308 309 * \ / R3 = UDIR1 address with volume # 0000558C 310 CHECKIT LABEL 0558C 604AC080 1 3 CBM 311 LD R1 R3/VOLFIELD get the number of the volume 0558D DC0030AA 312 CALL SRCHLIST get access to the volume list 0558E 40001F22 313 PARL VOLNLOCK ptr to the lock word 0558F 60A21F22 2 1 314 LD R2 VOLNTABLE(R1) convert volume number into VOLN element pointer 05590 FA82561D 2 315 JEQZ R2 FNDULBNV jump if volume gone 05591 5C088840 2 ZBM 316 CMZ R2,VOLNNOUSE check for availability 05592 FE0255A9 317 JEQ NOINHIB jump if okay 05593 5C088A10 2 ZBM 318 CMZ R2,VOLNMOUNT is it not completely mounted? 05594 FE0C561D 319 JNE FNDULBNV jump if so, we don't get it 05595 64440001 1 IMM 320 CPR R1 SYSVOLNUM is this the system volume? 05596 FE0C55A4 321 JNE MAYBEBKUP if not, nothing special 05597 60400412 1 322 LD R1 CPPSA get the current PSA pointer 05598 60485F13 1 1 ZBM 323 LD R1 R1,PSUSERLIMP get the current ULB pointer 05599 60084174 0 1 ZBM 324 LD R0 R1,ULACCPROJ/DVSNPART1 get group of caller 0559A 64401EAE 1 325 CPR R1 SYSTEMULB is this the system ULB? 0559B FE0C559D 326 JNE HESLOGGED jump if he's logged on 0559C 60094178 0 5 ZBM 327 LD R0 EQT,EQACCTPROJ/DVSNPART1 otherwise, see who's trying to log on 0000559D 328 HESLOGGED LABEL 0559D 1404007D 0 IMM 329 DIV R0 DVSNPART2 extract project 0559E 1C04007D 0 IMM 330 MUL R0 DVSNPART2 and back to normal format 0559F 600A1200 0 0 CBM 331 LD R0 R0*DVSNPART1 restore to normal format 055A0 68002551 0 332 UCPR R0 DOTBTI system accounts may... 055A1 FE0255A9 333 JEQ NOINHIB ...access an inhibited... 055A2 68002555 0 334 UCPR R0 DOTSYS ...system volume 055A3 FE0255A9 335 JEQ NOINHIB jump if enough privs 336 * \ / 337 338 * Backup can access maintenance mounted volumes 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1159 (ULBTWIDDLE) F 59 User Limit Block Managers 000055A4 339 MAYBEBKUP LABEL 055A4 5C088E10 2 ZBM 340 CMZ R2,VOLNMAIM is this a maint volume? 055A5 FE02561D 341 JEQ FNDULBNV jump if not -- other reasons good enough 055A6 60000414 0 342 LD R0 CPCUPC 055A7 5C080C10 0 ZBM 343 CMZ R0,UPBACKUP is this the backup program? 055A8 FE0C561D 344 JNE FNDULBNV jump if not -- no privs to access 345 * \ / 346 000055A9 347 NOINHIB LABEL 055A9 D0168815 2 BASE 348 INC R2,VOLNBUSY say that we wish to use it 055AA DC0030B7 349 CALL UNSRCHLIST indicate done with volume list pointers 055AB 40001F22 350 PARL VOLNLOCK 351 352 * R2 => VOLN element, R3=DIRDA, R5=>EQT 055AC DC002ED0 353 CALL SGETMEM get room for a ULB 055AD 40440004 IMM 354 PARVL ULLOG 055AE E4130000 0 4 REG 355 ST R0 ULB put pointer in its usual place 055AF EC170800 4 BASE 356 STZ ULB,ULWORDA initialize this words flags 055B0 E4D70801 3 4 BASE 357 ST R3 ULB,ULBLOCK give acct its directory address 055B1 62174806 015 BASE 358 LD2 R0 EQT,EQACCT 055B2 E6170802 014 BASE 359 ST2 R0 ULB,ULACCNM give it an account number 055B3 60174808 0 5 BASE 360 LD R0 EQT,EQACCTPROJ 055B4 E4170804 0 4 BASE 361 ST R0 ULB,ULACCPROJ give the account its project 055B5 600BC010 0 7 CBM 362 LD R0 R7/SHADOW 055B6 E4090010 0 4 ZBM 363 ST R0 ULB,ULSHADOW say whether a shadow or not 055B7 60088215 0 2 ZBM 364 LD R0 R2,VOLNFOREN pick up foreign bit 055B8 E4090210 0 4 ZBM 365 ST R0 ULB,ULFOREIGN save whether a system outsider 055B9 EDD70805 4 BASE 366 STW ULB,ULBUSYWORD say block in use once 367 368 * In rare circumstances, this may get an FBI type mismatch 369 * because the ACCOUNT is being destroyed. Awkward, but safe, 370 * as are the other variants of the problem. 371 055BA DC003205 372 CALL SETWNDO1 get the directory in 055BB 41440003 IMM 373 PARV VPCNTLRO+VPCNTLLK specify read only and locked 055BC 41440000 IMM 374 PARV VPNOFCB indicate that no lun is associated 055BD 410055E7 375 PAR FNDULBNACD pass error address 055BE 41570801 4 BASE 376 PARV ULB,ULBLOCK disk address to read 055BF 40440009 IMM 377 PARVL FBITUDIR1 and type expected 378 379 * If the directory that we find is not for the proper account, 380 * we say mass storage error. This is partly a security 381 * related check (to detect alterations by penetrators). 382 055C0 62000800 01 383 LD2 R0 WNDO1/UDACCT get the directories account 055C1 66170802 014 BASE 384 CPR2 R0 ULB,ULACCNM compare against the ULB 055C2 FE0C55E7 385 JNE FNDULBNACD jump on unusual switch to fake disk error 055C3 60000802 0 386 LD R0 WNDO1/UDPROJ get the division-project 055C4 64170804 0 4 BASE 387 CPR R0 ULB,ULACCPROJ and give it the same check 055C5 FE0C55E7 388 JNE FNDULBNACD and the same treatment 055C6 DC40261B 389 CALLNP MAPOUTFBI unmap FBI, ION 055C7 60040800 0 IMM 390 LD R0 ADR WNDO1 get a pointer to our window 055C8 6048001A 1 0 ZBM 391 LD R1 R0,UDTYPE check the directory type 055C9 E4490410 1 4 ZBM 392 ST R1 ULB,ULRAFDIR remember the directory format 393 * \ / 394 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1160 (ULBTWIDDLE) F 59 User Limit Block Managers 055CA 6004082B 0 IMM 395 LD R0 ADR WNDO1(UDLIMITS) get address in UDIR1 055CB 60440024 1 IMM 396 LD R1 LIMITSIZE*CPW get size of limit block 055CC 38970806 2 4 BASE 397 LEA R2 ULB,ULLIMITS get address in ULB 055CD FE400000 398 CMOVE copy limit field into ULB 055CE EC17080F 4 BASE 399 STZ ULB,ULSCRDSK clear scratch disk space total 055CF DC40315C 400 CALLNP DMOTEWNDO1 release the window 055D0 DC003096 401 CALL LOCKLIST get access to the ULB list 055D1 40001EAC 402 PARL ULLOCK 403 * \ / 404 055D2 60170801 0 4 BASE 405 LD R0 ULB,ULBLOCK get the directory MS address 055D3 60C01EAB 3 406 LD R3 ULLIST get the list head 055D4 3C16C801 0 3 BASE 407 LSRCH R0 R3,ULBLOCK look for this ACCT already in ULB list 055D5 FE0255F3 408 JEQ FNDULBDUP jump if a duplicate found 055D6 60040765 0 IMM 409 LD R0 ULIDVAL get a code 055D7 E40908B0 0 4 ZBM 410 ST R0 ULB,ULIDENT indicate this is a valid ULB 055D8 60130000 0 4 REG 411 LD R0 ULB for trace 055D9 60574806 1 5 BASE 412 LD R1 EQT,EQACCT for trace 055DA 60974808 2 5 BASE 413 LD R2 EQT,EQACCTPROJ get project for trace 414 TRACE ULBTRACE,ULTRCREATE say we created a block 055DB 5D401D2E 414 XCT TRACECALL(ULBTRACE) 055DC FEC00041 414 NOP (ULBTRACE*BITS 22:26)+(ULTRCREATE*BITS 27:31) 055DD 6053C000 1 7 REG 415 LD R1 R7 for trace 055DE 60970805 2 4 BASE 416 LD R2 ULB,ULBUSYWORD for trace 417 TRACE ULBTRACE,ULTRFIND say we found ULB (by making it) 055DF 5D401D2E 417 XCT TRACECALL(ULBTRACE) 055E0 FEC00042 417 NOP (ULBTRACE*BITS 22:26)+(ULTRFIND*BITS 27:31) 055E1 60401EAB 1 418 LD R1 ULLIST get pointer to the list 055E2 E4491F10 1 4 ZBM 419 ST R1 ULB,ULLINK put existing list behind our new element 055E3 E5001EAB 4 420 ST ULB ULLIST new element now the list head 055E4 DC0030A4 421 CALL UNLOCKLIST release access to the list 055E5 40001EAC 422 PARL ULLOCK 423 * \ / 424 055E6 5D1F8002 6 STAK 425 LEAVE POP 426 * --- 427 428 * The directory went bad -- free everything remaining and freak out. 000055E7 429 FNDULBNACD LABEL 055E7 DC40261B 430 CALLNP MAPOUTFBI unmap FBI, ION 055E8 DC403150 431 CALLNP GRUBWNDO1 just in case 055E9 60890081 2 4 ZBM 432 LD R2 ULB,ULDRIVE remember the drive it came from 055EA DC002F5D 433 CALL SFREEMEM remove allocated ULB 055EB 41440004 IMM 434 PARV ULLOG 055EC 40530000 4 REG 435 PARVL ULB 436 * \ / 437 438 ********************************************************************************** 439 * * 440 * We have managed to increment the volume busy word once too * 441 * often, here we undo it. * 442 * * 443 ********************************************************************************** 444 445 * \ / 055ED 60241F22 0 2 446 LD R0 VOLNTABLE(R2) get the VOLN element pointer 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1161 (ULBTWIDDLE) F 59 User Limit Block Managers 055EE D0560815 0 BASE 447 DEC R0,VOLNBUSY remove the extra access 055EF FE0C560C 448 JNE FNDULBNAC if volume busy, skip dismount check 055F0 DC005034 449 CALL DISMOUNT check if volume needs dismounting 055F1 40520000 0 REG 450 PARVL R0 address of the VOLN element 055F2 FE0E560C 451 JMP FNDULBNAC share no find code 452 * --- 453 454 ********************************************************************************** 455 * * 456 * We have created a ULB for an account that didn't * 457 * have one a moment ago. We are now trying to link * 458 * it into the ULLIST and we find that a ULB exists * 459 * now. Rather than panic, we presume that a different * 460 * process needed one about the same time as we did, * 461 * and won the race to put one into the list. We just * 462 * destroy the one we created and give back a pointer * 463 * to the one in the list. * 464 * * 465 ********************************************************************************** 466 000055F3 467 FNDULBDUP LABEL 055F3 60890081 2 4 ZBM 468 LD R2 ULB,ULDRIVE get the volume number 055F4 DC002F5D 469 CALL SFREEMEM release the ULB that we were constructing 055F5 41440004 IMM 470 PARV ULLOG indicate its length 055F6 40530000 4 REG 471 PARVL ULB and address 055F7 6112C000 4 3 REG 472 LD ULB R3 get pointer to the one that we found 055F8 60241F22 0 2 473 LD R0 VOLNTABLE(R2) get VOLN pointer 055F9 D0560815 0 BASE 474 DEC R0,VOLNBUSY remove busy count for the one we were making 055FA FE0C55FD 475 JNE FNDULBVBSY skip dismount check if volume busy 055FB DC005034 476 CALL DISMOUNT check if volume needs dismounting 055FC 40520000 0 REG 477 PARVL R0 address of the VOLN element 478 * \ / 479 000055FD 480 FNDULBVBSY LABEL 055FD 5C090610 4 ZBM 481 CMZ ULB,ULNOTHERE test for account being destroyed 055FE FE0C5607 482 JNE ACCTZOTA jump if account being destroyed 055FF BC970805 2 4 BASE 483 INCL R2 ULB,ULBUSYWORD increment busy counter 05600 60130000 0 4 REG 484 LD R0 ULB for trace 05601 6053C000 1 7 REG 485 LD R1 R7 for trace 486 TRACE ULBTRACE,ULTRFIND2 found a ULB (by finding duplicate) 05602 5D401D2E 486 XCT TRACECALL(ULBTRACE) 05603 FEC00043 486 NOP (ULBTRACE*BITS 22:26)+(ULTRFIND2*BITS 27:31) 05604 DC0030A4 487 CALL UNLOCKLIST release the list 05605 40001EAC 488 PARL ULLOCK 05606 5D1F8002 6 STAK 489 LEAVE POP return 490 * --- 491 00005607 492 ACCTZOTA LABEL 05607 DC0030A4 493 CALL UNLOCKLIST release the list 05608 40001EAC 494 PARL ULLOCK 05609 FE0E560C 495 JMP FNDULBNAC indicate no account found 496 * --- 497 498 499 * Account being destroyed -- fake innocence 0000560A 500 ACCTZOTTNG LABEL 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1162 (ULBTWIDDLE) F 59 User Limit Block Managers 0560A DC0030B7 501 CALL UNSRCHLIST 0560B 40001EAC 502 PARL ULLOCK 503 * \ / 504 505 * account/volume does not exist - return error code 0000560C 506 FNDULBNAC LABEL 0560C 6013C000 0 7 REG 507 LD R0 R7 copy return adr for trace 0560D 60574806 1 5 BASE 508 LD R1 EQT,EQACCT first word of account 0560E 60974808 2 5 BASE 509 LD R2 EQT,EQACCTPROJ and project 510 TRACE ULBTRACE,ULTRNOFIND could not find a account 0560F 5D401D2E 510 XCT TRACECALL(ULBTRACE) 05610 FEC00045 510 NOP (ULBTRACE*BITS 22:26)+(ULTRNOFIND*BITS 27:31) 05611 61040000 4 IMM 511 LD ULB 0 05612 5D1F8002 6 STAK 512 LEAVE POP return to caller 513 * --- 514 515 * A ULB is resident for this account. Just clean 516 * up lists that we have locked, etc. 517 00005613 518 ACCTINULL2 LABEL 05613 5C090610 4 ZBM 519 CMZ ULB,ULNOTHERE is the account being destroyed? 05614 FE0C560A 520 JNE ACCTZOTTNG jump if so - not found 05615 BC970805 2 4 BASE 521 INCL R2 ULB,ULBUSYWORD increment the busy counter 05616 60130000 0 4 REG 522 LD R0 ULB copy ULB pointer for trace 05617 6053C000 1 7 REG 523 LD R1 R7 return address for trace 524 TRACE ULBTRACE,ULTRFIND3 found a ULB (already resident) 05618 5D401D2E 524 XCT TRACECALL(ULBTRACE) 05619 FEC00044 524 NOP (ULBTRACE*BITS 22:26)+(ULTRFIND3*BITS 27:31) 0561A DC0030B7 525 CALL UNSRCHLIST indicate that we're done 0561B 40001EAC 526 PARL ULLOCK 0561C 5D1F8002 6 STAK 527 LEAVE POP return to caller 528 * --- 529 530 * It seems that the volume does not allow us access to it. 531 * Clean up this and that and say no access given. 532 0561D DC0030B7 533 FNDULBNV CALL UNSRCHLIST let go of the list pointers 0561E 40001F22 534 PARL VOLNLOCK ptr to the list lock word 0561F FE0E560C 535 JMP FNDULBNAC say that the ULB was not found 536 * --- 537 538 ********************************************************************************** 539 * * 540 * Alternate volume specified. We proceed by searching * 541 * the volume name list to find the volume and then we search * 542 * the IDX on that volume to find the account. Even after the * 543 * account is found there, we must search the AFT to see if it * 544 * is to be a shadow account. * 545 * * 546 ********************************************************************************** 547 00005620 548 FINDULBVOL LABEL 05620 DC0030AA 549 CALL SRCHLIST get access to the volume name list 05621 40001F22 550 PARL VOLNLOCK 05622 DC00564D 551 CALL FINDVOLUME look for ours there 05623 42574801 5 BASE 552 PARV2L EQT,EQVOLUME 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1163 (ULBTWIDDLE) F 59 User Limit Block Managers 05624 FA30562C 0 553 JZA R0 FNDULNOVOL jump if ours wasn't found 05625 5C080840 0 ZBM 554 CMZ R0,VOLNNOUSE is it completely mounted and uninhibited? 05626 FE02562F 555 JEQ FNDULNAMF jump if not 556 * \ / 05627 5C080E10 0 ZBM 557 CMZ R0,VOLNMAIM maint mount? 05628 FE02562C 558 JEQ FNDULNOVOL if not, no hope for access 559 * \ / 05629 60400414 1 560 LD R1 CPCUPC 0562A 5C084C10 1 ZBM 561 CMZ R1,UPBACKUP is the asker backup? 0562B FE02562F 562 JEQ FNDULNAMF if so, let him have it 563 * \ / 0000562C 564 FNDULNOVOL LABEL volume not found 0562C DC0030B7 565 CALL UNSRCHLIST remove access to the list 0562D 40001F22 566 PARL VOLNLOCK 0562E FE0E560C 567 JMP FNDULBNAC say not found 568 * --- 569 570 * Volume name found 0000562F 571 FNDULNAMF LABEL 0562F 61080086 4 0 ZBM 572 LD R4 R0,VOLNNUM get the index number of the volume 05630 DC0030B7 573 CALL UNSRCHLIST remove access to VOLN entries 05631 40001F22 574 PARL VOLNLOCK 575 05632 DC00580B 576 CALL GETIDXACS get access to the IDX of that volume 05633 41440000 IMM 577 PARV AFTACSRO value to indicate just looking 05634 40530000 4 REG 578 PARVL R4 pass volume number 05635 6108DF19 4 3 ZBM 579 LD R4 R3,VOLNIDXPTR save pointer to IDX control block 05636 DC0056E2 580 CALL SRCHAFTIDX look for the account 05637 40174806 5 BASE 581 PARL EQT,EQACCT pass account name triple 05638 FE0E5647 582 JMP SRCHIDXNF1 disk error 05639 FE0E5646 583 JMP SRCHIDXNF no such entry 0563A 60D20000 3 0 REG 584 LD R3 R0 R3:=directory address 0563B 60090080 0 4 ZBM 585 LD R0 R4,IDXTVOL get volume number 0563C E40AC080 0 3 CBM 586 ST R0 R3/VOLFIELD set volume number with address 0563D E4D78801 3 6 BASE 587 ST R3 SP,SAVER3 save the disk address 0563E DC403150 588 CALLNP GRUBWNDO1 done with this block 0563F DC005829 589 CALL FREEIDXACS release grip on IDX 05640 40490080 4 ZBM 590 PARVL R4,IDXTVOL 05641 DC405657 591 CALLNP SRCHAFT see if the account is a shadow 05642 64D78801 3 6 BASE 592 CPR R3 SP,SAVER3 the same disk address? 05643 ED8BC010 7 CBM 593 STLNE R7/SHADOW mark whether shadow account or not 05644 60D78801 3 6 BASE 594 LD R3 SP,SAVER3 restore the directory address 05645 FE0E558C 595 JMP CHECKIT enter it in 596 * --- 597 598 * We arrive here for either entry not found or a disk 599 * error. In either event, we just return a not found 600 * status. 601 00005646 602 SRCHIDXNF LABEL 05646 DC403150 603 CALLNP GRUBWNDO1 release the window with IDX 00005647 604 SRCHIDXNF1 LABEL 05647 DC005829 605 CALL FREEIDXACS release list that we hold 05648 40490080 4 ZBM 606 PARVL R4,IDXTVOL 05649 FE0E560C 607 JMP FNDULBNAC say not found 608 * --- 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1164 (ULBTWIDDLE) F 59 User Limit Block Managers 609 610 ********************************************************************************** 611 * Alternate system specified. Since networks don't * 612 * exist yet, we just check for our own name. If not our * 613 * own name, we fake account not found. * 614 ********************************************************************************** 615 0000564A 616 FINDULBSYS LABEL 0564A 64001EFB 0 617 CPR R0 SYSTEMNM is this our own name? 0564B FE025578 618 JEQ FNDSYSOK if it is, accept it 0564C FE0E560C 619 JMP FNDULBNAC if not, fake innocence 620 * --- 621 622 END FINDULB subroutine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1165 (ULBTWIDDLE) F 59 User Limit Block Managers 624 625 ********************************************************************************** 626 * * 627 * FINDVOLUME - Find a VOLN element, given a volume name * 628 * Call: * 629 * CALL FINDVOLUME * 630 * PARV2L volume name (pak 12) * 631 * On return, R0 -> VOLN, or zero if not found * 632 * Original name returned in R2:R3. * 633 * * 634 * The caller is responsible for locking and unlocking the VOLN * 635 * table. * 636 * * 637 * Eats R0:R3. Values returned in R0, R2:R3. * 638 * Stack required: 1 * 639 * * 640 ********************************************************************************** 641 642 BLOCK FINDVOLUME subroutine 643 ENTRY FINDVOLUME 644 645 BEGFRAME 646 ENDFRAME 647 0564D DD1F8001 6 STAK 648 FINDVOLUME ENTR PUSH 0564E C2548000 23 PAIR 649 STPV2L PAIR R2 R2, R3 = volume name 0564F 6047FFC1 1 IMM 650 LD R1 -MAXVOLNUM+1 index into table 00005650 651 LOOP LABEL 05650 60221F62 0 1 652 LD R0 VOLNTABLE(R1+MAXVOLNUM) R0 -> a VOLN element 05651 FA305654 0 653 JZA R0 NEXT jump if none here 05652 66960811 230 BASE 654 CPR2 R2 R0,VOLNNAME is this one us? 05653 FE025656 655 JEQ FOUND jump if so 656 * \ / 00005654 657 NEXT LABEL 05654 FA605650 1 658 IRJ R1 LOOP look at all volumes 659 * \ / 05655 60040000 0 IMM 660 LD R0 0 flag: not found 661 * \ / 00005656 662 FOUND LABEL 05656 5D1F8001 6 STAK 663 LEAVE POP all done 664 * --- 665 666 END FINDVOLUME subroutine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1166 (ULBTWIDDLE) F 59 User Limit Block Managers 668 669 ********************************************************************************** 670 * * 671 * SRCHAFT. Routine to search the account finder table for the * 672 * given account. * 673 * Call: * 674 * LD SP => return addr stack * 675 * LD EQT => EQT block containing account name * 676 * CALLNP SRCHAFT * 677 * JEQZ R3 no such account * 678 * ST R3 directory address * 679 * * 680 * Eats R0:R4. * 681 * Stack required = 12 * 682 * 1 + max ( FREEAFTACS (5), GETAFTACS (1), GRUBWNDO1 (7) * 683 * SRCHAFTIDX (11) ) * 684 * * 685 ********************************************************************************** 686 687 BLOCK SRCHAFT subroutine 688 ENTRY SRCHAFT 689 690 BEGFRAME 691 ENDFRAME 692 05657 DD5F8001 6 STAK 693 SRCHAFT ENTRNP PUSH 05658 DC0056E6 694 CALL GETAFTACS get looking access to the AFT 05659 40440000 IMM 695 PARVL AFTACSRO 0565A 61001F64 4 696 LD R4 AFTINDEX 0565B DC0056E2 697 CALL SRCHAFTIDX search the AFT 0565C 40174806 5 BASE 698 PARL EQT,EQACCT pass account name triple 0565D FE0E5665 699 JMP SRCHAFTNT disk error 0565E 60040000 0 IMM 700 LD R0 0 no such entry 0565F 61120000 4 0 REG 701 LD R4 R0 save disk address 05660 DC403150 702 CALLNP GRUBWNDO1 release the window 00005661 703 SRCHAFTXIT LABEL 05661 DC005701 704 CALL FREEAFTACS let go of AFT 05662 40440000 IMM 705 PARVL AFTACSRO 05663 60D30000 3 4 REG 706 LD R3 R4 return disk address in R3 05664 5D1F8001 6 STAK 707 LEAVE POP 708 * --- 709 710 * Had a disk error -- return failure 00005665 711 SRCHAFTNT LABEL 05665 61040000 4 IMM 712 LD R4 0 return a zero saying not found 05666 FE0E5661 713 JMP SRCHAFTXIT 714 * --- 715 716 END SRCHAFT subroutine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1167 (ULBTWIDDLE) F 59 User Limit Block Managers 718 719 ********************************************************************************** 720 * * 721 * Routine to get access to the directory by interlocking * 722 * with bits in the user limit block. The calling process * 723 * is possibly queued until the current user is finished with * 724 * his access. * 725 * Call: * 726 * SP = stack pointer * 727 * ULB => user limit block * 728 * CALLNP FETCHDIR * 729 * * 730 * Eats R0. * 731 * Stack required = 4 * 732 * 1 + max ( LOCKWAIT (0), SUSPENDME (0), TRACEPROC (3) ) * 733 * * 734 ********************************************************************************** 735 736 BLOCK FETCHDIR subroutine 737 ENTRY FETCHDIR to fetch access to a directory 738 739 BEGFRAME 740 ENDFRAME 741 05667 DD5F8001 6 STAK 742 FETCHDIR ENTRNP PUSH 05668 600908B0 0 4 ZBM 743 LD R0 ULB,ULIDENT get the marker field 05669 64040765 0 IMM 744 CPR R0 ULIDVAL is it a good marker? 0566A FE0C5684 745 JNE BADULB jump if something other than a ULB 0566B D0170805 4 BASE 746 INC ULB,ULBUSYWORD make busy so it won't be deleted 0000566C 747 FTCHDIRWTR LABEL 748 PLOCK DIRLOCKING no one else diddles directories 0566C 0CC00000 748 IOFF 0566D D1C01EAD 748 SETT DIRLOCKING 0566E FE0C5670 748 JNE MA(2+DISPW MA 0) 0566F DC40308B 748 CALLNP LOCKWAIT 05670 60030000 0 IMM 749 LD R0 ULBLOCKING get this locking bit 05671 FC170805 0 4 BASE 750 IORM R0 ULB,ULBUSYWORD is the directory in use? 05672 FE02567F 751 JEQ FTCHDIRQUE jump if it is - queue me 05673 60000412 0 752 LD R0 CPPSA get the current PSA pointer 05674 D0080230 0 ZBM 753 INC R0,PSLOCKCNTR indicate a critical region is locked 05675 60130000 0 4 REG 754 LD R0 ULB copy the ULB pointer 05676 E053C000 1 7 REG 755 EXCH R1 R7 move return address down for trace 05677 E0978800 2 6 BASE 756 EXCH R2 SP,0 and previous R7 also 757 TRACE ULBTRACE,ULTRLOCK make a trace entry 05678 5D401D2E 757 XCT TRACECALL(ULBTRACE) 05679 FEC00049 757 NOP (ULBTRACE*BITS 22:26)+(ULTRLOCK*BITS 27:31) 0567A E0978800 2 6 BASE 758 EXCH R2 SP,0 restore registers 0567B E053C000 1 7 REG 759 EXCH R1 R7 760 PUNLOCK DIRLOCKING 0567C EC001EAD 760 STZ DIRLOCKING 0567D 0C800000 760 ION 0567E 5D1F8001 6 STAK 761 LEAVE POP 762 * --- 763 764 * The directory is busy - queue this process 0000567F 765 FTCHDIRQUE LABEL 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1168 (ULBTWIDDLE) F 59 User Limit Block Managers 0567F DC00351C 766 CALL SUSPENDME call to suspend this process 05680 4100566C 767 PAR FTCHDIRWTR indicate the restart address 05681 41530000 4 REG 768 PARV ULB this is the parameter for shutdown 05682 41001DAD 769 PAR SQDIRWAIT this is the list to suspend in 05683 40001EAD 770 PARL DIRLOCKING this is the lock field 771 * --- 772 05684 001300E0 773 BADULB HALT HALTS00E0 dir fetch against something not a ULB 774 * --- 775 776 END FETCHDIR subroutine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1169 (ULBTWIDDLE) F 59 User Limit Block Managers 778 779 ********************************************************************************** 780 * * 781 * Routine to give up access to directory and set going anyone * 782 * who was stopped by my being in the way. * 783 * Call: * 784 * SP = stack pointer * 785 * ULB => user limit block * 786 * CALLNP FREEDIR * 787 * * 788 * Eats R0:R2. * 789 * Stack required = 5 * 790 * 1 + max ( DQUEONE (4), LOCKWAIT (0), TRACEPROC (3) ) * 791 * * 792 ********************************************************************************** 793 794 BLOCK FREEDIR subroutine 795 ENTRY FREEDIR routine to release directory access 796 797 BEGFRAME 798 ENDFRAME 799 05685 DD5F8001 6 STAK 800 FREEDIR ENTRNP PUSH 05686 600908B0 0 4 ZBM 801 LD R0 ULB,ULIDENT get the marker field 05687 64040765 0 IMM 802 CPR R0 ULIDVAL is it a good marker? 05688 FE0C569E 803 JNE BADULB jump if this isn't a ULB 804 PLOCK DIRLOCKING exclusive access to dir locks 05689 0CC00000 804 IOFF 0568A D1C01EAD 804 SETT DIRLOCKING 0568B FE0C568D 804 JNE MA(2+DISPW MA 0) 0568C DC40308B 804 CALLNP LOCKWAIT 0568D 60130000 0 4 REG 805 LD R0 ULB copy the ULB pointer 0568E 6053C000 1 7 REG 806 LD R1 R7 copy the return address 0568F 60978800 2 6 BASE 807 LD R2 SP,0 and the callers R7 808 TRACE ULBTRACE,ULTRUNLOCK and make a trace entry with them 05690 5D401D2E 808 XCT TRACECALL(ULBTRACE) 05691 FEC0004A 808 NOP (ULBTRACE*BITS 22:26)+(ULTRUNLOCK*BITS 27:31) 809 * check to see if anybody queued 05692 DC00354F 810 CALL DQUEONE call to remove user from a queue 05693 41001DAD 811 PAR SQDIRWAIT specify the queue 05694 40530000 4 REG 812 PARVL ULB specify the parameter 05695 60030000 0 IMM 813 LD R0 ULBLOCKING get directory busy bit 05696 A8170805 0 4 BASE 814 BRSBM R0 ULB,ULBUSYWORD remove with interlocked instruction 05697 FE02569F 815 JEQ FREEALRDY jump if ULB already unlocked 05698 60000412 0 816 LD R0 CPPSA get the current PSA pointer 05699 D0480230 0 ZBM 817 DEC R0,PSLOCKCNTR indicate a critical region is unlocked 0569A D0570805 4 BASE 818 DEC ULB,ULBUSYWORD directory now not busy 819 PUNLOCK DIRLOCKING allow others to lock dirs 0569B EC001EAD 819 STZ DIRLOCKING 0569C 0C800000 819 ION 0569D 5D1F8001 6 STAK 820 LEAVE POP return 821 * --- 822 0000569E 823 BADULB LABEL 0569E 001300E1 824 HALT HALTS00E1 attempt to free dir access with a non-ULB 825 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1170 (ULBTWIDDLE) F 59 User Limit Block Managers 0000569F 826 FREEALRDY LABEL 0569F 001300E2 827 HALT HALTS00E2 attempt to free already free ULB 828 829 END FREEDIR subroutine 830 831 832 END ULBTWIDDLE User Limit Block Manager 103 INPUT IDXMANGLE routines to search IDX 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1171 (IDXMANGLE) F 60 often used AFT and IDX handlers 3 4 BLOCK AFT and IDX Managers 5 6 ENTRY DELAFTIDX delete an entry from IDX or AFT 7 ENTRY FREEAFTACS 8 ENTRY GETAFTACS 9 ENTRY SRCHAFTIDX search IDX or AFT 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1172 (IDXMANGLE) F 60 often used AFT and IDX handlers 11 12 ********************************************************************************** 13 * * 14 * DELAFTIDX. Routine to delete an entry from either the AFT * 15 * or a particular IDX. The disk table is searched and if the * 16 * entry exactly matches then the entry is removed. Resulting * 17 * empty blocks are not freed so that the disk need not be * 18 * updated. Maybe that is a good idea someday. Routine assumes * 19 * that search access to the table has already been granted to * 20 * the caller. * 21 * Note that this routine leaves the GRUB (or possibly * 22 * DMOTE) of the window up to the caller (except for disk error). * 23 * This is so that this routine can be used by MOUNTIDX and * 24 * DISMNTIDX without causing a disk write for each entry * 25 * processed. * 26 * Call: * 27 * LD SP => return addr stack * 28 * LD R4 => IDXT for the table to change * 29 * CALL DELAFTIDX * 30 * PARV MS addr of dir for entry to delete * 31 * PARL account name triple * 32 * JMP * 33 * JMP * 34 * * 35 * * 36 * Eats R0:R3 and WNDO1. * 37 * Stack required = 11 * 38 * 4 + max ( GRUBWNDO1 (7), SETWNDO1 (4) ) * 39 * * 40 ********************************************************************************** 41 42 BLOCK DELAFTIDX and SRCHAFTIDX subroutines 43 44 ENTRY DELAFTIDX delete an entry from IDX or AFT 45 ENTRY SRCHAFTIDX search IDX or AFT 46 47 BEGFRAME 00178004 6 CACH 48 DELIDXNDX BSSB 8 bucket currently looking in 49 BSSB 7 filler 00099F11 6 ZBM 50 DELIDXACCT BSSB 17 pointer to account name triple 00178802 6 BASE 51 DELIDXVAL BSS 1 value of entry (MS address) to delete 00178803 6 BASE 52 SAVER5 BSS 1 temp for keeping R5 53 ENDFRAME 54 056A0 DD1F8004 6 STAK 55 DELAFTIDX ENTR PUSH 056A1 C1578802 6 BASE 56 STPV SP,DELIDXVAL directory address 056A2 C0099F11 6 ZBM 57 STPL SP,DELIDXACCT pointer to account name triple 056A3 EDCBC010 7 CBM 58 STW R7/BIT 0 say I'm deleting 000056A4 59 SHARECODE LABEL 60 * \ / 61 056A4 E5578803 5 6 BASE 62 ST R5 SP,SAVER5 put register away for safe keeping 63 * Use macro to calculate IDX hashing function in R1. 056A5 60899F11 2 6 ZBM 64 LD R2 SP,DELIDXACCT get pointer to account name triple 65 IDXHASH R0,R1,(R2,0),(R2,2),(R4,IDXTBNUM) 056A6 62168800 012 BASE 65 LD2 R0 (R2,0) get the account name into R0 and R1 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1173 (IDXMANGLE) F 60 often used AFT and IDX handlers 056A7 744A1000 1 0 CBM 65 XOR R1 R0/BITS 8:7 mix up the account number 056A8 60168802 0 2 BASE 65 LD R0 (R2,2) fetch up the project 056A9 744A2000 1 0 CBM 65 XOR R1 R0/BITS 16:15 mix in the project shifted 056AA 60040000 0 IMM 65 LD R0 0 initialize register for marth 056AB 58C40010 IMM 65 IORPSR PSRMODIF say that we want the remainder 056AC 14170005 0 4 CACH 65 DIV R0 (R4,IDXTBNUM) divide by number of buckets 056AD 58840010 IMM 65 CLBPSR PSRMODIF restore normalcy 056AE EC0BC210 7 CBM 66 STZ R7/BIT 1 flag to catch looping 67 * \ / 000056AF 68 INTONEXT LABEL 056AF E4578004 1 6 CACH 69 ST R1 SP,DELIDXNDX remember bucket hashed into 000056B0 70 INTONEXTY LABEL 056B0 615D0804 5 41 BASE 71 LD R5 R4,IDXTBUCKET(R1) get MS address of bucket 056B1 7940254F 5 72 AND R5 MSBLKMASK remove any upper garbage 056B2 FB4256DC 5 73 JEQZ R5 NOTTHERE jump if an empty bucket 056B3 60090080 0 4 ZBM 74 LD R0 R4,IDXTVOL get our volume number 056B4 E40B4080 0 5 CBM 75 ST R0 R5/VOLFIELD set in volume number field 056B5 DC003205 76 CALL SETWNDO1 get the block mapped in 056B6 41440000 IMM 77 PARV VPCNTLW indicate write access 056B7 41440000 IMM 78 PARV VPNOFCB indicate no lun associated with this block 056B8 410056DD 79 PAR BLOCKBAD pass error address 056B9 41534000 5 REG 80 PARV R5 pass MS address of bucket 056BA 40570004 4 CACH 81 PARVL R4,IDXTFBIT pass FBI type of block 056BB 60C40800 3 IMM 82 LD R3 ADR WNDO1 the place to start searching 000056BC 83 TRYNEXT LABEL 056BC 5E16C800 3 BASE 84 CMZ2 R3,IDXACNO an empty entry? 056BD FE0C56C0 85 JNE CHECKENTRY jump if not 056BE 5C16C802 3 BASE 86 CMZ R3,IDXACNOP to be empty both acct and proj are zero 056BF FE0256DC 87 JEQ NOTTHERE jump if entry not found 000056C0 88 CHECKENTRY LABEL 056C0 60899F11 2 6 ZBM 89 LD R2 SP,DELIDXACCT get pointer to account name triple 056C1 6044000C 1 IMM 90 LD R1 3*CPW get comparison length 056C2 3816C800 0 3 BASE 91 LEA R0 R3,IDXACNO get pointer to IDX triple 056C3 DA108800 0 21 92 CMSTR R0 R2 R1 check for match 056C4 FE0256D0 93 JEQ MAYBETHIS jump if a match 000056C5 94 MOVE2NEXT LABEL 056C5 18C40005 3 IMM 95 ADD R3 IDXLNTH move pointer to the next entry 056C6 64C40BFC 3 IMM 96 CPR R3 ADR WNDO1(IDXECNT*IDXLNTH) are we at the end? 056C7 FE0856BC 97 JLT TRYNEXT jump if more to search 98 * \ / 99 100 ********************************************************************************** 101 * This block seems full so we follow the overflow into * 102 * the next block. * 103 ********************************************************************************** 104 105 * \ / 056C8 DC403150 106 CALLNP GRUBWNDO1 free up window, prevent WSX use 056C9 BC578004 1 6 CACH 107 INCL R1 SP,DELIDXNDX get the bucket we're in 056CA 64570005 1 4 CACH 108 CPR R1 R4,IDXTBNUM check for wrap around 056CB FE0856B0 109 JLT INTONEXTY jump and try next block if not 056CC F7C256DC 7 110 JBT R7/BIT 1 NOTTHERE jump if around twice 056CD 60440000 1 IMM 111 LD R1 0 056CE 7DC28000 7 IMM 112 IOR R7 1*BIT 1 remember once around 056CF FE0E56AF 113 JMP INTONEXT 114 * --- 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1174 (IDXMANGLE) F 60 often used AFT and IDX handlers 115 116 * The name matches -- be extra careful if deleting. 000056D0 117 MAYBETHIS LABEL 056D0 6016C803 0 3 BASE 118 LD R0 R3,IDXDIRDA pick up the tables UDIR address 056D1 F3C056DB 7 119 JBF R7/BIT 0 ONLYSRCH jump if searching and not deleting 120 * \ / for a delete even the value must match 056D2 74178802 0 6 BASE 121 XOR R0 SP,DELIDXVAL match up against requested value 056D3 60440010 1 IMM 122 LD R1 FBITAFT get type code for an AFT block 056D4 64570004 1 4 CACH 123 CPR R1 R4,IDXTFBIT is this an AFT? 056D5 FE0256D7 124 JEQ NOMASKAFT do NOT mask off volume for AFTs 056D6 7800254F 0 125 AND R0 MSBLKMASK isolate the significant part 000056D7 126 NOMASKAFT LABEL 056D7 FA0C56C5 0 127 JNEZ R0 MOVE2NEXT try it with the next entry 128 * \ / 129 130 ********************************************************************************** 131 * * 132 * An entry had been found to delete so fill the entry * 133 * with garbage. This ensures that subsequent searches for * 134 * entries that have overflowed into the next block are * 135 * still looked for there. * 136 * * 137 ********************************************************************************** 138 139 * \ / 056D8 D356C800 3 BASE 140 STMW2 R3,IDXACNO clear the account name 056D9 D156C802 3 BASE 141 STMW R3,IDXACNOP and the division-project 056DA D0492101 4 ZBM 142 DEC R4,IDXTENTS one less account herein 000056DB 143 ONLYSRCH LABEL success on search, UDIR addr in R0 056DB FBE056DC 7 144 IRJ R7 NOTTHERE success, add two to return address 145 * --- 146 147 148 ********************************************************************************** 149 * * 150 * NOTTHERE... Arrive here when we have found an empty entry or block. * 151 * That means that the account could never have hashed to * 152 * to this point -- that means that the entry is not found. * 153 * BLOCKBAD... We have gotten some type of disk error. Error code * 154 * is passed back in R0. Window one is unmapped. * 155 * * 156 ********************************************************************************** 157 000056DC 158 NOTTHERE LABEL 056DC FBE056E0 7 159 IRJ R7 NORMEXIT give another skip 160 * --- 161 000056DD 162 BLOCKBAD LABEL Disk error, give error return 056DD 61520000 5 0 REG 163 LD R5 R0 save the error code 056DE DC403150 164 CALLNP GRUBWNDO1 release this window 056DF 60134000 0 5 REG 165 LD R0 R5 restore the error code 000056E0 166 NORMEXIT LABEL 056E0 61578803 5 6 BASE 167 LD R5 SP,SAVER5 restore this register 056E1 5D1F8004 6 STAK 168 LEAVE POP return 169 * --- 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1175 (IDXMANGLE) F 60 often used AFT and IDX handlers 171 172 ********************************************************************************** 173 * * 174 * SRCHAFTIDX. Routine to search the specified table to find an * 175 * account therein. * 176 * Call: * 177 * LD SP => return address stack * 178 * LD R4 => IDXT block for that disk table * 179 * CALL SRCHAFTIDX * 180 * PARL account name triple * 181 * JMP * 182 * JMP * 183 * ST R0 disk address for found entry UDIR1 * 184 * * 185 * * 186 * Eats R0:R3. * 187 * Stack required = 11. See DELAFTIDX. * 188 * * 189 ********************************************************************************** 190 056E2 DD1F8004 6 STAK 191 SRCHAFTIDX ENTR PUSH 056E3 C0099F11 6 ZBM 192 STPL SP,DELIDXACCT save pointer to account name triple 056E4 EC0BC010 7 CBM 193 STZ R7/BIT 0 say we are searching 056E5 FE0E56A4 194 JMP SHARECODE almost like a delete without the blood 195 * --- 196 197 END DELAFTIDX and SRCHAFTIDX subroutines 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1176 (IDXMANGLE) F 60 often used AFT and IDX handlers 199 200 ********************************************************************************** 201 * * 202 * GETAFTACS. Get access to the AFT. Depending on whether * 203 * the caller wishes to modify the AFT or just look, this code * 204 * gives exclusive access or shared access. Two counters on the * 205 * head page count the number of modifiers and lookers and if * 206 * the user's requested access conflicts then he is suspended * 207 * until access can be allowed. * 208 * If this user is a looker and there are no modifiers, * 209 * then give it to him. * 210 * If this user is a looker and there are modifiers, * 211 * then queue him. * 212 * If this user is a modifier and there are other users, * 213 * then queue him. * 214 * Call: * 215 * LD SP => return addr stack * 216 * CALL GETAFTACS * 217 * PARVL zero if looking and one if modifying * 218 * * 219 * Routine gets R0 and R1. * 220 * Stack required = 1 * 221 * 1 + max ( LOCKWAIT (0), SUSPENDME (0) ) * 222 * * 223 ********************************************************************************** 224 225 BLOCK GETAFTACS subroutine 226 227 ENTRY GETAFTACS 228 229 BEGFRAME 230 ENDFRAME 231 056E6 DD1F8001 6 STAK 232 GETAFTACS ENTR PUSH 056E7 C0524000 1 REG 233 STPVL R1 place look/modify indicator in R1 234 * \ / 235 236 * Get access to the access counters 000056E8 237 TRYAGAIN LABEL 238 PLOCK AFTLOCK call to lock the AFT => lock word 056E8 0CC00000 238 IOFF 056E9 D1C01F65 238 SETT AFTLOCK 056EA FE0C56EC 238 JNE MA(2+DISPW MA 0) 056EB DC40308B 238 CALLNP LOCKWAIT 239 * Note that PLOCK and SUSPENDME both restore R1 056EC FA4256F6 1 240 JEQZ R1 JUSTLOOK jump if I'm a just a looker 056ED BC001F67 0 241 INCL R0 AFTMODIFY count up the modifiers 056EE FA2256F1 0 242 DRJ R0 NOMODIFY jump if I must wait 056EF 5C001F66 243 CMZ AFTLOOKERS are there lookers looking? 056F0 FE0256FE 244 JEQ GAAXIT jump if no lookers, he gets it 245 * \ / 246 247 * Either there are other lookers or there are other modifiers 248 * so I, a modifier, must wait. 249 * \ / 000056F1 250 NOMODIFY LABEL 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1177 (IDXMANGLE) F 60 often used AFT and IDX handlers 056F1 DC00351C 251 CALL SUSPENDME put me in a queue 056F2 41005700 252 PAR GOMOD when restarted, we've got it 056F3 41430000 IMM 253 PARV 080000000 flag for a AFT modifier 056F4 41001DAF 254 PAR SQIDXWAIT 056F5 40001F65 255 PARL AFTLOCK 256 * --- 257 258 * A looker trying to get at the AFT 000056F6 259 JUSTLOOK LABEL 056F6 5C001F67 260 CMZ AFTMODIFY are there modifiers? 056F7 FE0256FD 261 JEQ LOOKATIT jump if not -- I may access 056F8 DC00351C 262 CALL SUSPENDME wait for the modifer to finish 056F9 410056E8 263 PAR TRYAGAIN 056FA 41440000 IMM 264 PARV 0 flag for an AFT looker 056FB 41001DAF 265 PAR SQIDXWAIT 056FC 40001F65 266 PARL AFTLOCK 267 * --- 268 269 * Looking privilege is granted 000056FD 270 LOOKATIT LABEL 056FD D0001F66 271 INC AFTLOOKERS count a new looker 000056FE 272 GAAXIT LABEL 273 PUNLOCK AFTLOCK unlock the AFT counters => lock word 056FE EC001F65 273 STZ AFTLOCK 056FF 0C800000 273 ION 00005700 274 GOMOD LABEL 05700 5D1F8001 6 STAK 275 LEAVE POP 276 * --- 277 278 END GETAFTACS subroutine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1178 (IDXMANGLE) F 60 often used AFT and IDX handlers 280 281 ********************************************************************************** 282 * * 283 * FREEAFTACS. Undoes an access granted by GETAFTACS. The * 284 * caller states whether he got access to modify or to look and * 285 * the routine undoes the counters and sets anyone waiting * 286 * going. * 287 * Call: * 288 * * 289 * LD SP => return address stack * 290 * CALL FREEAFTACS * 291 * PARVL zero if looking and non-zero if modifying * 292 * * 293 * Eats R0:R2. * 294 * Stack required = 5 * 295 * 1 + max ( DQUEONE(4), LOCKWAIT (0) ) * 296 * * 297 ********************************************************************************** 298 299 BLOCK FREEAFTACS subroutine 300 301 ENTRY FREEAFTACS 302 303 BEGFRAME 304 ENDFRAME 305 05701 DD1F8001 6 STAK 306 FREEAFTACS ENTR PUSH 05702 C0524000 1 REG 307 STPVL R1 save look/modify indicator in R1 308 309 PLOCK AFTLOCK call to lock the AFT counters 05703 0CC00000 309 IOFF 05704 D1C01F65 309 SETT AFTLOCK 05705 FE0C5707 309 JNE MA(2+DISPW MA 0) 05706 DC40308B 309 CALLNP LOCKWAIT 05707 FA42570E 1 310 JEQZ R1 IWASLOOKNG jump if I'm a looker leaving 05708 D0401F67 311 DEC AFTMODIFY count me out 05709 FE025712 312 JEQ NONELEFT jump if no more modifiers waiting 0000570A 313 GOMODIF LABEL 0570A DC00354F 314 CALL DQUEONE set one modifier going 0570B 41001DAF 315 PAR SQIDXWAIT 0570C 40430000 IMM 316 PARVL 080000000 0570D FE0E5715 317 JMP FAAXIT 318 * --- 319 320 * I was only looking -- count down the number of lookers and 321 * if zero set any modifiers going, else set a looker going 322 * (possibly due to a mixup if many modifiers came at once). 323 0000570E 324 IWASLOOKNG LABEL 0570E D0401F66 325 DEC AFTLOOKERS one less looker 0570F FE0C5715 326 JNE FAAXIT just return if other lookers 05710 5C001F67 327 CMZ AFTMODIFY are there modifiers waiting? 05711 FE0C570A 328 JNE GOMODIF if so, then set one going 329 * \ / 330 331 * No modifers left. Set any left over lookers going 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1179 (IDXMANGLE) F 60 often used AFT and IDX handlers 00005712 332 NONELEFT LABEL 05712 DC00354F 333 CALL DQUEONE set a looker going 05713 41001DAF 334 PAR SQIDXWAIT 05714 40440000 IMM 335 PARVL 0 code for a looker 00005715 336 FAAXIT LABEL 337 PUNLOCK AFTLOCK unlock the AFT counters => lock word 05715 EC001F65 337 STZ AFTLOCK 05716 0C800000 337 ION 05717 5D1F8001 6 STAK 338 LEAVE POP 339 * --- 340 341 END FREEAFTACS subroutine 342 343 344 END AFT and IDX Managers 104 INPUT AFTMANGLE routines to handle AFT and IDX 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1180 (AFTMANGLE) F 61 AFT & IDX managers 3 4 BLOCK AFT and IDX Managers 5 6 ENTRY ADDIDXAFT add on entry to AFT or IDX 7 ENTRY EXPANDIDX expand the size of the IDX or AFT 8 ENTRY FORCEIDX force the IDX pointers to the disk 9 ENTRY FREEIDXACS release access to an IDX 10 ENTRY GETIDXACS get access to an IDX 11 ENTRY LOADAFTIDX read in table pointers 12 ENTRY ZAPAFT destroy a table control block 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1181 (AFTMANGLE) F 61 AFT & IDX managers 14 15 ********************************************************************************** 16 * * 17 * ADDIDXAFT. Routine to add an entry to the account finder * 18 * table or the IDX of a particular volume. These tables are * 19 * hashed buckets and the number of buckets depends on the * 20 * number of entries. When the table becomes 80% full then the * 21 * table is rebuilt (hashing the old table into a new table) and * 22 * the new table is put in the place of the old. This routine * 23 * assumes the caller has locked the specified table to be * 24 * modified and it returns with that still in force. * 25 * Call: * 26 ** appropriate table locked * 27 * LD SP =>return addr stack * 28 * LD R4 =>table control block * 29 * CALL ADDIDXAFT * 30 * PAR address of account name triple * 31 * PARVL MS address of UDIR1 * 32 * JMP * 33 * JMP 64768 entries)> * 34 * JMP * 35 * JMP
* 36 * * 37 * Routine returns with R0 thru R3 eaten and WNDO1 remapped. * 38 * After this routine is called, the table block is left * 39 * in window 1 (needs forcewriting if it's an IDX block) * 40 * and the block pointers for the table blocks have not * 41 * been written out. * 42 * Stack required = 10 * 43 * 3 + max ( GRUBWNDO1 (7), MAPOUTFBI (2), SETWNDO1(4), * 44 * UNLKWNDO1 (1) ) * 45 * * 46 ********************************************************************************** 47 48 BLOCK ADDIDXAFT subroutine 49 ENTRY ADDIDXAFT 50 51 BEGFRAME 00178004 6 CACH 52 ADDIDXNDX BSSB 8 hashed index into control table 53 BSSB 7 filler 00099F11 6 ZBM 54 ADDIDXACCT BSSB 17 addr of account name triple 00178802 6 BASE 55 ADDIDXPTR BSS 1 UDIR address for account being entered 56 ENDFRAME 57 05718 DD1F8003 6 STAK 58 ADDIDXAFT ENTR PUSH 05719 C1099F11 6 ZBM 59 STP SP,ADDIDXACCT save address of account name triple 0571A C0578802 6 BASE 60 STPVL SP,ADDIDXPTR save UDIR1 address 0571B 60092101 0 4 ZBM 61 LD R0 R4,IDXTENTS get total number of entries 0571C 6404C99C 0 IMM 62 CPR R0 IDXECNT*MAXIDXSIZE see if table totally full 0571D FE065789 63 JGE TOTALLYFUL jump no more room (>64768 entries) 0571E EC170802 4 BASE 64 STZ R4,IDXTTEMP3 no insert point yet 65 * Use macro to calculate IDX hashing function in R1. 0571F 60899F11 2 6 ZBM 66 LD R2 SP,ADDIDXACCT get address of account name triple 67 IDXHASH R0,R1,(R2,0),(R2,2),(R4,IDXTBNUM) 05720 62168800 012 BASE 67 LD2 R0 (R2,0) get the account name into R0 and R1 05721 744A1000 1 0 CBM 67 XOR R1 R0/BITS 8:7 mix up the account number 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1182 (AFTMANGLE) F 61 AFT & IDX managers 05722 60168802 0 2 BASE 67 LD R0 (R2,2) fetch up the project 05723 744A2000 1 0 CBM 67 XOR R1 R0/BITS 16:15 mix in the project shifted 05724 60040000 0 IMM 67 LD R0 0 initialize register for marth 05725 58C40010 IMM 67 IORPSR PSRMODIF say that we want the remainder 05726 14170005 0 4 CACH 67 DIV R0 (R4,IDXTBNUM) divide by number of buckets 05727 58840010 IMM 67 CLBPSR PSRMODIF restore normalcy 05728 EC0BC010 7 CBM 68 STZ R7/BIT 0 remember didn't repeat 69 70 * R1 = current index into IDXTBUCKET, 71 * R4 => IDX/AFT resident element 00005729 72 INTONEXT LABEL 05729 E4578004 1 6 CACH 73 ST R1 SP,ADDIDXNDX save hashed bucket number 0572A 601D0804 0 41 BASE 74 LD R0 R4,IDXTBUCKET(R1) get block account should be in 0572B FA0C5744 0 75 JNEZ R0 BLOCKTHERE jump if the block exists 76 * Create a block since this is the first entry in this bucket 0572C DC003205 77 CALL SETWNDO1 get a new block 0572D 4144000A IMM 78 PARV VPCNTLW+VPCNTLLK+VPZEROPG 0572E 41440000 IMM 79 PARV VPNOFCB indicate no lun associated 0572F 4100573D 80 PAR ADDIDXDEUM error address 05730 41570800 4 BASE 81 PARV R4,IDXTBLOCK pass volume over 05731 60043F80 0 IMM 82 LD R0 FBITFREE*VPFBIOLDB old type is, of course, free 05732 7C170004 0 4 CACH 83 IOR R0 R4,IDXTFBIT plug in new type desired 05733 40520000 0 REG 84 PARVL R0 old and new types 05734 60089181 0 2 ZBM 85 LD R0 R2,FBIDA get block number allocated 05735 E4091180 0 4 ZBM 86 ST R0 R4,IDXTMSBLK 05736 60578004 1 6 CACH 87 LD R1 SP,ADDIDXNDX get current hash value 05737 E4489184 1 2 ZBM 88 ST R1 R2,FBIRELBLK put position in IDX into block 05738 60170800 0 4 BASE 89 LD R0 R4,IDXTBLOCK get complete MS address of new block 05739 E41D0804 0 41 BASE 90 ST R0 R4,IDXTBUCKET(R1) and save in control block 0573A DC40261B 91 CALLNP MAPOUTFBI unmap FBI, ION 0573B DC403276 92 CALLNP ULKWNDO1 0573C FE0E574B 93 JMP SRCHEMPTY search for an empty place to put entry 94 * --- 95 96 * Disk error while creating or referencing the table. 97 * Pass it off on the caller. 0000573D 98 ADDIDXDEUM LABEL 0573D E4178802 0 6 BASE 99 ST R0 SP,ADDIDXPTR save the error code 0573E DC40261B 100 CALLNP MAPOUTFBI unmap FBI, ION 0573F FE0E5741 101 JMP SHAREPROB 102 * --- 103 00005740 104 ADDIDXDE LABEL 05740 E4178802 0 6 BASE 105 ST R0 SP,ADDIDXPTR save the error code 00005741 106 SHAREPROB LABEL 05741 DC403150 107 CALLNP GRUBWNDO1 release the window 05742 60178802 0 6 BASE 108 LD R0 SP,ADDIDXPTR recover error code 05743 5D1F8003 6 STAK 109 LEAVE POP and bail out 110 * --- 111 112 * The block exists in the index table. We now search for 113 * a place to put our entry. 00005744 114 BLOCKTHERE LABEL 05744 E4091180 0 4 ZBM 115 ST R0 R4,IDXTMSBLK form disk address 05745 DC003205 116 CALL SETWNDO1 map in the block 05746 41440000 IMM 117 PARV VPCNTLW indicate write access 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1183 (AFTMANGLE) F 61 AFT & IDX managers 05747 41440000 IMM 118 PARV VPNOFCB indicate no file associated 05748 41005740 119 PAR ADDIDXDE error address 05749 41570800 4 BASE 120 PARV R4,IDXTBLOCK MS address 0574A 40570004 4 CACH 121 PARVL R4,IDXTFBIT FBI type expected 0000574B 122 SRCHEMPTY LABEL 0574B 60C40800 3 IMM 123 LD R3 ADR WNDO1 get search start address 0000574C 124 CHECKNEXT LABEL 0574C 6216C800 013 BASE 125 LD2 R0 R3,IDXACNO get the account name 0574D FA1C5750 01 126 JNEZ2 R0 NOTVIRGIN jump if location used before 0574E 5C16C802 3 BASE 127 CMZ R3,IDXACNOP check for null project too 0574F FE02576C 128 JEQ ISEMPTY jump if completely virgin entry 00005750 129 NOTVIRGIN LABEL 05750 FA2C5766 0 130 JEQMW R0 CHECKDELET jump if a deleted entry 05751 60099F11 0 6 ZBM 131 LD R0 SP,ADDIDXACCT get pointer to account name triple 05752 6044000C 1 IMM 132 LD R1 3*CPW get size of name 05753 3896C800 2 3 BASE 133 LEA R2 R3,IDXACNO address of table entry 05754 FE540000 134 CMS check for duplicate 05755 FE025762 135 JEQ DUPENTRY jump if duplicate entry error 136 * \ / 137 138 * A used entry - move to next. 00005756 139 USEDENTRY LABEL 05756 18C40005 3 IMM 140 ADD R3 IDXLNTH move one entry 05757 64C40BFC 3 IMM 141 CPR R3 ADR WNDO1(IDXECNT*IDXLNTH) 05758 FE08574C 142 JLT CHECKNEXT jump if not yet to end 143 * \ / 144 145 * This block seems to be full - move to the next one. 05759 DC403150 146 CALLNP GRUBWNDO1 done with page, prevent WSX use 0575A 60578004 1 6 CACH 147 LD R1 SP,ADDIDXNDX retrieve current bucket number 0575B 18440001 1 IMM 148 ADD R1 1 use next block for overflow 0575C 64570005 1 4 CACH 149 CPR R1 R4,IDXTBNUM check for wrap around 0575D FE085729 150 JLT INTONEXT 0575E F7C05765 7 151 JBT R7/BIT 0 ALLFULL jump if second time around 0575F 7DC30000 7 IMM 152 IOR R7 1*BIT 0 indicate we've been here once 05760 60440000 1 IMM 153 LD R1 0 set back to first bucket 05761 FE0E5729 154 JMP INTONEXT 155 * --- 156 157 * Duplicate entry. 00005762 158 DUPENTRY LABEL 05762 DC403150 159 CALLNP GRUBWNDO1 release this window, done here 05763 19C40002 7 IMM 160 ADD R7 2 advance to duplicate return 05764 5D1F8003 6 STAK 161 LEAVE POP 162 * --- 163 164 ********************************************************************************** 165 * Come here if the table is totally full. This should * 166 * have been caught by the check near the beginning, but if the * 167 * count is wrong we might come here when all 65000 entries are * 168 * present. This condition could possibly do some cleanup and * 169 * exit via the TOTALLYFUL exit. * 170 ********************************************************************************** 171 05765 00061250 172 ALLFULL HALT HALTF1250 stop for full AFT or IDX 173 * --- 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1184 (AFTMANGLE) F 61 AFT & IDX managers 174 175 ********************************************************************************** 176 * We have come upon a previously deleted entry. We * 177 * remember where this is. Later, after we have decided that * 178 * this is not a duplicate entry, we can make the insertion * 179 * here. * 180 ********************************************************************************** 181 00005766 182 CHECKDELET LABEL 05766 5C170802 4 BASE 183 CMZ R4,IDXTTEMP3 do we already have a place recorded? 05767 FE0C5756 184 JNE USEDENTRY jump if we do 05768 E4D70803 3 4 BASE 185 ST R3 R4,IDXTTEMP4 nothing stored yet, remember index 05769 60170800 0 4 BASE 186 LD R0 R4,IDXTBLOCK get current block MS address 0576A E4170802 0 4 BASE 187 ST R0 R4,IDXTTEMP3 remember block address 0576B FE0E5756 188 JMP USEDENTRY go on to next entry 189 * --- 190 191 * An empty place has been found - place entry 0000576C 192 ISEMPTY LABEL 0576C 60170802 0 4 BASE 193 LD R0 R4,IDXTTEMP3 were there any deleted entries? 0576D FA025779 0 194 JEQZ R0 PUTONEND if not, put at end 0576E 64170800 0 4 BASE 195 CPR R0 R4,IDXTBLOCK is that block already mapped? 0576F FE025778 196 JEQ PLACEONTOP yes, save ourselves effort 05770 E4170800 0 4 BASE 197 ST R0 R4,IDXTBLOCK if not, map it in 05771 DC403150 198 CALLNP GRUBWNDO1 done with page, prevent WSX use 05772 DC003205 199 CALL SETWNDO1 map in the prior block 05773 41440000 IMM 200 PARV VPCNTLW indicate write access 05774 41440000 IMM 201 PARV VPNOFCB 05775 41005740 202 PAR ADDIDXDE disk error address 05776 41570800 4 BASE 203 PARV R4,IDXTBLOCK pass block number 05777 40570004 4 CACH 204 PARVL R4,IDXTFBIT and block type expected 00005778 205 PLACEONTOP LABEL 05778 60D70803 3 4 BASE 206 LD R3 R4,IDXTTEMP4 get ptr to deleted entry 00005779 207 PUTONEND LABEL 05779 60099F11 0 6 ZBM 208 LD R0 SP,ADDIDXACCT get pointer to account name triple 0577A 6044000C 1 IMM 209 LD R1 3*CPW get length of name 0577B 3896C800 2 3 BASE 210 LEA R2 R3,IDXACNO get pointer to table 0577C DA880800 2 01 211 MOVE R2 R0 R1 copy entry into table 0577D 60178802 0 6 BASE 212 LD R0 SP,ADDIDXPTR get the UDIR1 address 0577E E416C803 0 3 BASE 213 ST R0 R3,IDXDIRDA and place into the entry 0577F D0092101 4 ZBM 214 INC R4,IDXTENTS count addition 215 * \ / 216 217 * Entry is placed. We now check to see if the table is so 218 * full that it requires expansion. 05780 60170005 0 4 CACH 219 LD R0 R4,IDXTBNUM get the current number of buckets 05781 640400FD 0 IMM 220 CPR R0 MAXIDXSIZE is table at max size? 05782 FE065787 221 JGE CANTEXPAND jump if so - can't expand 05783 1C0400A3 0 IMM 222 MUL R0 (IDXECNT*80)/100 calculate 80% full table 05784 64092101 0 4 ZBM 223 CPR R0 R4,IDXTENTS see if table more than 80% full 05785 FE065787 224 JGE CANTEXPAND fall through if table needs expanding 05786 11C40001 7 IMM 225 SUB R7 1 retard return point to indicate expansion needed 00005787 226 CANTEXPAND LABEL 05787 19C40004 7 IMM 227 ADD R7 4 give success return 05788 5D1F8003 6 STAK 228 LEAVE POP 229 * --- 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1185 (AFTMANGLE) F 61 AFT & IDX managers 230 231 * The table is totally full - no new accounts. 00005789 232 TOTALLYFUL LABEL 05789 19C40001 7 IMM 233 ADD R7 1 give disk full return 0578A 5D1F8003 6 STAK 234 LEAVE POP 235 * --- 236 237 END ADDIDXAFT subroutine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1186 (AFTMANGLE) F 61 AFT & IDX managers 239 240 ********************************************************************************** 241 * * 242 * EXPANDIDX. * 243 * The table needs expanding. This is done by creating a * 244 * new index block and then calling ADDIDXAFT until the new * 245 * table is built. The new pointers are then written out and * 246 * finally the old table is freed. * 247 * Call: * 248 * SP => stack top * 249 * appropriate list locked * 250 * LD R4 => table control block * 251 * CALLNP EXPANDIDX * 252 * ST R4 => new table control block * 253 * * 254 * Gets R0 thru R3 and remaps WNDO1 and WNDO2. * 255 * Stack required = 13 * 256 * 3 + max (ADDIDXAFT (10), FORCEIDX (9), GRUBWNDO2 (7), * 257 * SETWNDO2 (4), SGETMEM (0), ZAPAFT (5), * 258 * ZEROIT (1) ) * 259 * * 260 ********************************************************************************** 261 262 BLOCK EXPANDIDX subroutine 263 ENTRY EXPANDIDX 264 265 BEGFRAME 00178801 6 BASE 266 EXPIDXR5 BSS 1 save for callers R5 00178008 6 CACH 267 EXPIDXBKT BSSB 8 save for bucket currently expanding 00099102 6 ZBM 268 EXPIDXPLAC BSSB 16 save for position in current bucket 269 ENDFRAME 270 0578B DD5F8003 6 STAK 271 EXPANDIDX ENTRNP PUSH 0578C E5578801 5 6 BASE 272 ST R5 SP,EXPIDXR5 save callers R5 0578D 61530000 5 4 REG 273 LD R5 R4 R5 will point to the old block 0578E 60D74005 3 5 CACH 274 LD R3 R5,IDXTBNUM get current number of buckets 0578F 18C40002 3 IMM 275 ADD R3 2 increase table size by 2 05790 50C400FD 3 IMM 276 MIN R3 MAXIDXSIZE ensure not too big 05791 5C56D003 3 REG 277 HIB R3+IDXTPWR2-1 05792 71120000 4 0 REG 278 LDN R4 R0 generate log two of area size 05793 DC002ED0 279 CALL SGETMEM get memory for control block 05794 40571020 4 REG 280 PARVL R4+32 05795 61120000 4 0 REG 281 LD R4 R0 R4 points to new control block 05796 DC003090 282 CALL ZEROIT remove any garbage 05797 41170800 4 BASE 283 PAR R4,0 05798 4056D004 3 REG 284 PARVL R3+IDXTPWR2 05799 60094080 0 5 ZBM 285 LD R0 R5,IDXTVOL 0579A E4090080 0 4 ZBM 286 ST R0 R4,IDXTVOL set up volume its from 0579B 60174004 0 5 CACH 287 LD R0 R5,IDXTFBIT 0579C E4170004 0 4 CACH 288 ST R0 R4,IDXTFBIT copy fbi type of table 0579D E4D70005 3 4 CACH 289 ST R3 R4,IDXTBNUM set number of buckets in new table 290 * \ / 291 292 ********************************************************************************** 293 * * 294 * We now map the old blocks into window 2, pass * 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1187 (AFTMANGLE) F 61 AFT & IDX managers 295 * through same, and call ADDIDXAFT to place them into the * 296 * expanded table. * 297 * * 298 ********************************************************************************** 299 300 * \ / 0579E 60C40000 3 IMM 301 LD R3 0 begin with the first bucket 0000579F 302 XPNDNEXT LABEL 0579F 601D5804 0 53 BASE 303 LD R0 R5,IDXTBUCKET(R3) get ptr to this bucket on MS 057A0 FA0257BB 0 304 JEQZ R0 BLKUSEDUP a zero means no block here 057A1 E4095180 0 5 ZBM 305 ST R0 R5,IDXTMSBLK 057A2 E4D78008 3 6 CACH 306 ST R3 SP,EXPIDXBKT remember bucket working on 057A3 DC0031FF 307 CALL SETWNDO2 map in the bucket from mass storage 057A4 41440001 IMM 308 PARV VPCNTLRO indicate read only 057A5 41440000 IMM 309 PARV VPNOFCB 057A6 410057CB 310 PAR OLDTABBAD pass error address 057A7 41574800 5 BASE 311 PARV R5,IDXTBLOCK indicate the MS address 057A8 40574004 5 CACH 312 PARVL R5,IDXTFBIT and the type expected 057A9 60C40C00 3 IMM 313 LD R3 ADR WNDO2 initialize ptr to beginning of bucket 000057AA 314 XPNDENTRY LABEL 057AA 6216C800 013 BASE 315 LD2 R0 R3,IDXACNO see if this is an empty entry 057AB FA1C57AE 01 316 JNEZ2 R0 NOTEND jump if valid entry 057AC 5C16C802 3 BASE 317 CMZ R3,IDXACNOP check the extension too 057AD FE0257BB 318 JEQ BLKUSEDUP jump if no more in this block 000057AE 319 NOTEND LABEL 057AE FA2C57B8 0 320 JEQMW R0 SKIPOVERIT check for deleted entry 057AF E4C99102 3 6 ZBM 321 ST R3 SP,EXPIDXPLAC remember place 057B0 DC005718 322 CALL ADDIDXAFT add the entry to the new table 057B1 4116C800 3 BASE 323 PAR R3,IDXACNO pass the account name triple 057B2 4016C803 3 BASE 324 PARL R3,IDXDIRDA the directory address 057B3 FE0E57C6 325 JMP CANNOTEXP disk error (volume full!) 057B4 FE0E57C9 326 JMP TABLEFULL table full (impossible) 057B5 FE0E57CA 327 JMP DUPENTRY duplicate entry (impossible) 057B6 00131255 328 HALT HALTS1255 new table needs expanding. In a pigs eye. 057B7 60C99102 3 6 ZBM 329 LD R3 SP,EXPIDXPLAC retrieve the current location 000057B8 330 SKIPOVERIT LABEL 057B8 18C40005 3 IMM 331 ADD R3 IDXLNTH advance to the next entry 057B9 64C40FFC 3 IMM 332 CPR R3 ADR WNDO2(IDXECNT*IDXLNTH) check for past end 057BA FE0857AA 333 JLT XPNDENTRY jump if more entries to scan 334 * \ / 335 336 * Move to next block and check for finish. 000057BB 337 BLKUSEDUP LABEL 057BB DC403153 338 CALLNP GRUBWNDO2 release the source window 057BC 60D78008 3 6 CACH 339 LD R3 SP,EXPIDXBKT get the current bucket index 057BD 18C40001 3 IMM 340 ADD R3 1 advance to the next bucket 057BE 64D74005 3 5 CACH 341 CPR R3 R5,IDXTBNUM all buckets cycled through? 057BF FE08579F 342 JLT XPNDNEXT jump if more to do 343 * \ / 344 345 * R4 points to the new table. Now we 346 * update the pointers on the disk. 000057C0 347 FREEOLD LABEL 057C0 DC4057DF 348 CALLNP FORCEIDX write out the pointers 349 * \ / 350 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1188 (AFTMANGLE) F 61 AFT & IDX managers 351 * Now we destroy the old table blocks. 057C1 E1530000 5 4 REG 352 EXCH R5 R4 make R4 block to get rid of 057C2 DC4057CD 353 CALLNP ZAPAFT destroy the old table 057C3 61134000 4 5 REG 354 LD R4 R5 restore R4 to point to the new table 355 * \ / 356 357 * Restore the caller's registers and return. 358 * I think we're done. 057C4 61578801 5 6 BASE 359 LD R5 SP,EXPIDXR5 057C5 5D1F8003 6 STAK 360 LEAVE POP 361 * --- 362 363 ********************************************************************************** 364 * * 365 * Volume full when expanding the IDX. We ignore the * 366 * problem by not expanding the table and just letting the old * 367 * one get more than 80% full. This can be disastrous later on * 368 * if it gets totally full but not as disastrous as a halt here. * 369 * * 370 ********************************************************************************** 371 000057C6 372 CANNOTEXP LABEL 057C6 DC403153 373 CALLNP GRUBWNDO2 release the IDX bucket 057C7 E1134000 4 5 REG 374 EXCH R4 R5 make old new and vice versa 057C8 FE0E57C0 375 JMP FREEOLD 376 * --- 377 378 ********************************************************************************** 379 * * 380 * While building the new bigger table from the old we got * 381 * a table full error. This is, of course, impossible and I * 382 * would expect resident tables are mangled (R5 points to the * 383 * IDXT block for the old table and R4 points to the IDXT block * 384 * for the now supposedly full table). * 385 * * 386 ********************************************************************************** 387 000057C9 388 TABLEFULL LABEL 057C9 00131251 389 HALT HALTS1251 table overflow while expanding! impossible 390 * --- 391 392 ********************************************************************************** 393 * * 394 * While building the new bigger table from the old we got * 395 * a duplicate entry error. This is, of course, impossible and * 396 * I would expect resident tables are mangled (R5 points to the * 397 * IDXT block for the old table and R4 points to the IDXT block * 398 * for the new table with the purported duplicate). * 399 * * 400 ********************************************************************************** 401 000057CA 402 DUPENTRY LABEL 057CA 00131252 403 HALT HALTS1252 dup entry while expanding table, impossible 404 * --- 405 406 ********************************************************************************** 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1189 (AFTMANGLE) F 61 AFT & IDX managers 407 * * 408 * While expanding the disk table the old table went bad. * 409 * Due to the way the tables are organized I cannot * 410 * programmatically recover. This code solves the problem by * 411 * losing any entries in the bad block and just moving on to the * 412 * next bucket. What else could be done? A halt would maybe * 413 * get the disk repaired sooner but he still wouldn't get the * 414 * lost accounts back. * 415 * * 416 ********************************************************************************** 417 000057CB 418 OLDTABBAD LABEL 419 * Call error logger to log my inelegant recovery. 057CB 00841253 420 STOP STOPD1253 stop for disk error 057CC FE0E57BB 421 JMP BLKUSEDUP move onto the next 422 * --- 423 424 END EXPANDIDX subroutine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1190 (AFTMANGLE) F 61 AFT & IDX managers 426 427 ********************************************************************************** 428 * * 429 * ZAPAFT. Routine to destroy an AFT given the * 430 * pointer to the table control block. This routine will * 431 * also destroy an IDX, but the security block must already * 432 * point to a new IDX since this routine destroys the old * 433 * IDX on mass storage. The mass storage blocks pointed to * 434 * are freed and the control block itself is returned to * 435 * free storage. * 436 * Call: * 437 * LD SP => return address stack * 438 * LD R4 => table control block * 439 * CALLNP ZAPAFT * 440 * * 441 * Routine destroys R0 thru R4. * 442 * Stack required: 5 * 443 * 2 + max ( FREEFILE (3), SFREEMEM (0) ) * 444 * * 445 ********************************************************************************** 446 447 BLOCK ZAPAFT subroutine 448 ENTRY ZAPAFT 449 450 BEGFRAME 00178801 6 BASE 451 ZAPAFTR3 BSS 1 R3 save 452 ENDFRAME 453 057CD DD5F8002 6 STAK 454 ZAPAFT ENTRNP PUSH 057CE 60D70005 3 4 CACH 455 LD R3 R4,IDXTBNUM initialize the bucket pointer 057CF FE0E57D8 456 JMP NOSUCHBKUT jump to end (allow for empty list) 457 * --- 458 000057D0 459 FREEBKUT LABEL 057D0 609D1804 2 43 BASE 460 LD R2 R4,IDXTBUCKET(R3) get a bucket pointer 057D1 FA8257D8 2 461 JEQZ R2 NOSUCHBKUT jump if no bucket 057D2 E4891180 2 4 ZBM 462 ST R2 R4,IDXTMSBLK 057D3 E4D78801 3 6 BASE 463 ST R3 SP,ZAPAFTR3 057D4 DC004FEA 464 CALL FREEFILE free the found block 057D5 41570800 4 BASE 465 PARV R4,IDXTBLOCK 057D6 40440000 IMM 466 PARVL FFTUNKNOWN indicate single block of unspecified type 057D7 60D78801 3 6 BASE 467 LD R3 SP,ZAPAFTR3 000057D8 468 NOSUCHBKUT LABEL 057D8 FAE657D0 3 469 JDR R3 FREEBKUT continue if not all done 470 * \ / 471 472 * Now free the old index block. 057D9 5C56D003 3 REG 473 HIB R3+IDXTPWR2-1 take a logarithm 057DA 70D20000 3 0 REG 474 LDN R3 R0 057DB DC002F5D 475 CALL SFREEMEM free the old index block 057DC 4156D020 3 REG 476 PARV R3+32 057DD 40530000 4 REG 477 PARVL R4 057DE 5D1F8002 6 STAK 478 LEAVE POP 479 * --- 480 481 END ZAPAFT subroutine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1191 (AFTMANGLE) F 61 AFT & IDX managers 483 484 ********************************************************************************** 485 * * 486 * FORCEIDX. Routine to cause the pointers to the IDX * 487 * blocks (or the AFT for that matter) to be written out to the * 488 * security block. * 489 * Call: * 490 * LD R4 => to IDXT block for table * 491 * CALLNP FORCEIDX * 492 * * 493 * Eats R0-R3. Unmaps WNDO1. * 494 * Stack required: 9 * 495 * 2 + max (DUALWRITE (7), GRUBWNDO1 (7), MAPOUTFBI (2), * 496 * SETWNDO1 (4) ) * 497 * * 498 ********************************************************************************** 499 500 BLOCK FORCEIDX subroutine 501 ENTRY FORCEIDX 502 503 BEGFRAME 00178801 6 BASE 504 FORCEIDXR5 BSS 1 save for R5 505 ENDFRAME 506 057DF DD5F8002 6 STAK 507 FORCEIDX ENTRNP PUSH 057E0 E5578801 5 6 BASE 508 ST R5 SP,FORCEIDXR5 save the caller's R5 057E1 60090080 0 4 ZBM 509 LD R0 R4,IDXTVOL 057E2 61601F22 5 0 510 LD R5 VOLNTABLE(R0) R5 -> VOLN entry 511 * \ / 512 513 * We have the addr of the security blocks 514 * so we now put the table info therein. 057E3 60096182 0 5 ZBM 515 LD R0 R5,VOLNSECBK1 get the primary block address 000057E4 516 TRYOTHERS LABEL 057E4 E4095187 0 5 ZBM 517 ST R0 R5,VOLNSMSBLK construct a complete address 057E5 DC003205 518 CALL SETWNDO1 get primary security block in 057E6 41440002 IMM 519 PARV VPCNTLW+VPCNTLLK indicate write access and locked 057E7 41440000 IMM 520 PARV VPNOFCB 057E8 41005806 521 PAR PRIMSECBAD 057E9 41574807 5 BASE 522 PARV R5,VOLNSECAD pass the MS address 057EA 40440006 IMM 523 PARVL FBITSEC and the type expected 057EB DC40261B 524 CALLNP MAPOUTFBI unmap FBI, ION 057EC 60170004 0 4 CACH 525 LD R0 R4,IDXTFBIT get the type of table 057ED 60492101 1 4 ZBM 526 LD R1 R4,IDXTENTS number of entries 057EE 60970005 2 4 CACH 527 LD R2 R4,IDXTBNUM number of buckets 057EF 64040010 0 IMM 528 CPR R0 FBITAFT check for AFT 057F0 FE0C57F6 529 JNE PUTTINGIDX jump if not AFT (it's an IDX) 057F1 E5001F64 4 530 ST R4 AFTINDEX system now uses new table 057F2 E440082B 1 531 ST R1 WNDO1/SECAFTENTS place AFT entry count into security block 057F3 60440928 1 IMM 532 LD R1 ADR WNDO1(SECAFTPTR-1) get ptr to security blocks AFT table 057F4 E4800829 2 533 ST R2 WNDO1/SECAFTSIZ place size of AFT into security block 057F5 FE0E57FA 534 JMP MOVEBUCT 535 * --- 536 000057F6 537 PUTTINGIDX LABEL 057F6 E5095F19 4 5 ZBM 538 ST R4 R5,VOLNIDXPTR volume points to new IDX info 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1192 (AFTMANGLE) F 61 AFT & IDX managers 057F7 E440082A 1 539 ST R1 WNDO1/SECIDXENTS place IDX entry count into sec block 057F8 6044082B 1 IMM 540 LD R1 ADR WNDO1(SECIDXPTR-1) get ptr to sec block IDX table 057F9 E4800828 2 541 ST R2 WNDO1/SECIDXSIZ place size of IDX into sec block 000057FA 542 MOVEBUCT LABEL 057FA 601D1003 0 42 BASE 543 LD R0 R4,IDXTBUCKET(R2-1) move new pointers into block 057FB E41C5000 0 12 BASE 544 ST R0 R1,0(R2) 057FC FAA257FA 2 545 DRJ R2 MOVEBUCT 546 * \ / 547 057FD 60C40082 3 IMM 548 LD R3 PNWNDO1 get the page number to be forced 057FE DC0031A6 549 CALL DUALWRITE force out the security block 057FF 60174807 0 5 BASE 550 LD R0 R5,VOLNSECAD get the address actually used 05800 74096182 0 5 ZBM 551 XOR R0 R5,VOLNSECBK1 do two XORs to generate 05801 74095183 0 5 ZBM 552 XOR R0 R5,VOLNSECBK2 the others address 05802 40520000 0 REG 553 PARVL R0 indicate secondary address 05803 DC403150 554 CALLNP GRUBWNDO1 now free up the window 05804 61578801 5 6 BASE 555 LD R5 SP,FORCEIDXR5 restore the caller's R5 05805 5D1F8002 6 STAK 556 LEAVE POP 557 * --- 558 559 * Primary security block bad - try the other one. 00005806 560 PRIMSECBAD LABEL 561 * Call error log saying action. 05806 DC40261B 562 CALLNP MAPOUTFBI unmap FBI, ION 05807 60095183 0 5 ZBM 563 LD R0 R5,VOLNSECBK2 get the secondary address 05808 64095187 0 5 ZBM 564 CPR R0 R5,VOLNSMSBLK see if we have already tried it 05809 FE0C57E4 565 JNE TRYOTHERS jump if not 566 * \ / couldn't read either 567 568 * Secondary security block bad - nothing to do after this. 569 * \ / 0580A 00041254 570 HALT HALTD1254 both security blocks bad 571 * --- 572 573 END FORCEIDX subroutine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1193 (AFTMANGLE) F 61 AFT & IDX managers 575 576 ********************************************************************************** 577 * * 578 * GETIDXACS. Get access to an IDX. The caller is possibly * 579 * suspended depending on whether the table is currently being * 580 * modified. This routine acts upon a counter that counts the * 581 * number of people looking at the IDX and a bit that signifies * 582 * that the IDX is being modified. Both of these counters are * 583 * protected by another bit lock. * 584 * This algorithm is not the most beautiful invented (a * 585 * modifier could be held up by lots of lookers -- improbable * 586 * but possible). Its advantage is that it's small. If it * 587 * gives you trouble see how the AFT lockers do it. * 588 * Call: * 589 * LD SP => return address stack * 590 * CALL GETIDXACS * 591 * PARV zero if looking at table and one if to modify * 592 * PARVL volume number * 593 * ST R3 => volume name entry * 594 * * 595 * Eats R0:R3. The busy counter in VOLN is incremented. * 596 * Stack required = 3 * 597 * 2 + max ( LOCKWAIT (0), SRCHLIST (1), SUSPENDME (0), * 598 * UNSRCHLIST (1) ) * 599 * * 600 ********************************************************************************** 601 602 BLOCK GETIDXACS subroutine 603 ENTRY GETIDXACS 604 605 BEGFRAME 00178801 6 BASE 606 GIAMODIF BSS 1 non-zero if modifier 607 ENDFRAME 608 609 0580B DD1F8002 6 STAK 610 GETIDXACS ENTR PUSH 0580C C1578801 6 BASE 611 STPV SP,GIAMODIF flag, 0=> read only, 1=> modify 0580D C0528000 2 REG 612 STPVL R2 save the volume number 613 * \ / 614 615 * Search for the volume to use. 0580E DC0030AA 616 CALL SRCHLIST get access to volume list 0580F 40001F22 617 PARL VOLNLOCK 05810 60E41F22 3 2 618 LD R3 VOLNTABLE(R2) R3 -> VOLN entry 05811 D016C815 3 BASE 619 INC R3,VOLNBUSY say I'm using this volume block 05812 DC0030B7 620 CALL UNSRCHLIST say I'm no longer using the pointers 05813 40001F22 621 PARL VOLNLOCK 622 * \ / 623 624 * Get access to the IDX lock counters and see if others 625 * are modifying 00005814 626 TRYAGAIN LABEL 627 PLOCK R3,VOLNIDXLK lock the IDX 05814 0CC00000 627 IOFF 05815 D1D6C808 3 BASE 627 SETT R3,VOLNIDXLK 05816 FE0C5818 627 JNE MA(2+DISPW MA 0) 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1194 (AFTMANGLE) F 61 AFT & IDX managers 05817 DC40308B 627 CALLNP LOCKWAIT 05818 5C08C019 3 ZBM 628 CMZ R3,VOLNIDXMOD are there any modifiers? 05819 FE02581F 629 JEQ NOMODIFIER jump if free to look at 630 * \ / 631 632 * Others are in our way so we must wait for our access. 0000581A 633 GIASUSP LABEL 0581A DC00351C 634 CALL SUSPENDME place me in the IDX wait queue 0581B 41005814 635 PAR TRYAGAIN restart address 0581C 4148C086 3 ZBM 636 PARV R3,VOLNNUM who we are waiting for 0581D 41001DAF 637 PAR SQIDXWAIT 0581E 4016C808 3 BASE 638 PARL R3,VOLNIDXLK lock to undo when we suspend 639 * --- 640 641 * The table is not being modified so we'll get the access we 642 * wish unless we are a modifier and there are lookers. 0000581F 643 NOMODIFIER LABEL 0581F 5C178801 6 BASE 644 CMZ SP,GIAMODIF check for modify/read only 05820 FE025825 645 JEQ NOTMODIF jump if just a looker 05821 5C08C2D9 3 ZBM 646 CMZ R3,VOLNIDXLOK are there any lookers? 05822 FE0C581A 647 JNE GIASUSP if lookers then I must wait 05823 EDC8C019 3 ZBM 648 STW R3,VOLNIDXMOD say a modifier is changing it 05824 FE0E5826 649 JMP GIAXIT 650 * --- 651 652 * Just a looker and I can look. Count my presence and return. 00005825 653 NOTMODIF LABEL 05825 D008C2D9 3 ZBM 654 INC R3,VOLNIDXLOK count a new looker 00005826 655 GIAXIT LABEL 656 PUNLOCK R3,VOLNIDXLK let others see counters 05826 EC16C808 3 BASE 656 STZ R3,VOLNIDXLK 05827 0C800000 656 ION 05828 5D1F8002 6 STAK 657 LEAVE POP 658 * --- 659 660 END GETIDXACS subroutine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1195 (AFTMANGLE) F 61 AFT & IDX managers 662 663 ********************************************************************************** 664 * * 665 * FREEIDXACS. Routine that undoes the work of GETIDXACS by * 666 * decrementing the proper usage counter and unqueuing anybody * 667 * waiting on that particular IDX. * 668 * Call: * 669 * LD SP => return addr stack * 670 * CALL FREEIDXACS * 671 * PARVL volume number * 672 * * 673 * Eats R0:R3 * 674 * Stack required = 5 * 675 * 1 + max ( DISMOUNT (3), DQUEONE (4), LOCKWAIT (0) ) * 676 * * 677 ********************************************************************************** 678 679 BLOCK FREEIDXACS subroutine 680 ENTRY FREEIDXACS 681 682 BEGFRAME 683 ENDFRAME 684 05829 DD1F8001 6 STAK 685 FREEIDXACS ENTR PUSH 0582A C0528000 2 REG 686 STPVL R2 pickup volume number 0582B 60E41F22 3 2 687 LD R3 VOLNTABLE(R2) R3 -> VOLN entry 688 PLOCK R3,VOLNIDXLK lock the counters 0582C 0CC00000 688 IOFF 0582D D1D6C808 3 BASE 688 SETT R3,VOLNIDXLK 0582E FE0C5830 688 JNE MA(2+DISPW MA 0) 0582F DC40308B 688 CALLNP LOCKWAIT 05830 5C08C019 3 ZBM 689 CMZ R3,VOLNIDXMOD was I modifying? 05831 FE02583D 690 JEQ FIANOTMOD jump if not 05832 EC08C019 3 ZBM 691 STZ R3,VOLNIDXMOD say no longer modifying 692 * \ / 693 694 * Set one waiter going now that my access is done. 00005833 695 FIADEQUE LABEL 05833 DC00354F 696 CALL DQUEONE let one go out of the wait list 05834 41001DAF 697 PAR SQIDXWAIT which queue 05835 4048C086 3 ZBM 698 PARVL R3,VOLNNUM 00005836 699 FIAXIT LABEL 05836 D056C815 3 BASE 700 DEC R3,VOLNBUSY say access finished to volume 701 PUNLOCK R3,VOLNIDXLK allow access to counters 05837 EC16C808 3 BASE 701 STZ R3,VOLNIDXLK 05838 0C800000 701 ION 05839 FE0C583C 702 JNE FIVBSY if volume busy skip dismount check 0583A DC005034 703 CALL DISMOUNT check if volume needs dismounting 0583B 4052C000 3 REG 704 PARVL R3 address of the VOLN element 705 * \ / 706 0000583C 707 FIVBSY LABEL 0583C 5D1F8001 6 STAK 708 LEAVE POP 709 * --- 710 711 * Not modifier -- decrement looker count and set a probable 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1196 (AFTMANGLE) F 61 AFT & IDX managers 712 * modifier going if all lookers are done. 0000583D 713 FIANOTMOD LABEL 0583D D048C2D9 3 ZBM 714 DEC R3,VOLNIDXLOK one less looker 0583E FE025833 715 JEQ FIADEQUE if no more lookers set one going 0583F FE0E5836 716 JMP FIAXIT if more lookers then let them do any dequeueing 717 * --- 718 719 END FREEIDXACS subroutine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1197 (AFTMANGLE) F 61 AFT & IDX managers 721 722 ********************************************************************************** 723 * * 724 * LOADAFTIDX. Routine to fetch the specified table * 725 * pointers from the disk. * 726 * Call: * 727 * LD SP => return addr stack * 728 * VLN => VOLN element pointer * 729 * CALL LOADAFTIDX * 730 * PARVL FBI type of the table * 731 * JMP disk error * 732 * ST R3 => to IDXT block for table * 733 * WNDO1 is grubbed * 734 * * 735 * It is assumed when the routine is called the required table * 736 * is not resident and that no conflicts are likely (that means * 737 * that this routine does no locking of anything). * 738 * * 739 * Eats R0:R3 * 740 * Stack required: 9 * 741 * 2 + max (GRUBWNDO1 (7), MAPOUTFBI (2), SETWNDO1 (4), * 742 * SGETMEM (0) ) * 743 * * 744 ********************************************************************************** 745 746 BLOCK LOADAFTIDX subroutine 747 ENTRY LOADAFTIDX 748 749 BEGFRAME 00178801 6 BASE 750 LDAFTFBIT BSS 1 save FBI type of table 751 ENDFRAME 752 05840 DD1F8002 6 STAK 753 LOADAFTIDX ENTR PUSH 05841 C0578801 6 BASE 754 STPVL SP,LDAFTFBIT save the FBI type 755 * \ / 05842 60092182 0 4 ZBM 756 LD R0 VLN,VOLNSECBK1 fetch the primary security block address 00005843 757 TRYOTHERSC LABEL 05843 E4091187 0 4 ZBM 758 ST R0 VLN,VOLNSMSBLK and create whole disk address 759 * \ / 05844 DC003205 760 CALL SETWNDO1 get the security block in 05845 41440002 IMM 761 PARV VPCNTLW+VPCNTLLK read/write and locked 05846 41440000 IMM 762 PARV VPNOFCB indicate no file associated 05847 4100586D 763 PAR PRIMSECBAD disk error address 05848 41570807 4 BASE 764 PARV VLN,VOLNSECAD pass MS address 05849 40440006 IMM 765 PARVL FBITSEC FBI type expected 0584A DC40261B 766 CALLNP MAPOUTFBI unmap FBI, ION 767 * \ / 0584B 60178801 0 6 BASE 768 LD R0 SP,LDAFTFBIT 0584C 64040010 0 IMM 769 CPR R0 FBITAFT are we diddling the AFT or IDX? 0584D FE0C5852 770 JNE NOTAFTLD jump if not loading the AFT 0584E 60C40928 3 IMM 771 LD R3 ADR WNDO1(SECAFTPTR-1) 0584F 60800829 2 772 LD R2 WNDO1/SECAFTSIZ 05850 6040082B 1 773 LD R1 WNDO1/SECAFTENTS how many entries are present 05851 FE0E5855 774 JMP MAKESPACE 775 * --- 776 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1198 (AFTMANGLE) F 61 AFT & IDX managers 00005852 777 NOTAFTLD LABEL 05852 60C4082B 3 IMM 778 LD R3 ADR WNDO1(SECIDXPTR-1) 05853 60800828 2 779 LD R2 WNDO1/SECIDXSIZ 05854 6040082A 1 780 LD R1 WNDO1/SECIDXENTS how many entries are present 00005855 781 MAKESPACE LABEL 05855 FA8C5858 2 782 JNEZ R2 SOMEXIST jump if buckets actually in tables 05856 60840001 2 IMM 783 LD R2 1 must have 1 bucket 05857 EC16C800 3 BASE 784 STZ R3,0 don't rely on MS table having zeros here 00005858 785 SOMEXIST LABEL 05858 5C569003 2 REG 786 HIB R2+IDXTPWR2-1 calculate size of block to hold... 05859 30040020 0 IMM 787 RSB R0 32 ...all of the MS addresses 0585A E44A8180 1 2 CBM 788 ST R1 R2/BITS 0:23 save count of entries 0585B DC002ED0 789 CALL SGETMEM get a block of system memory 0585C 40520000 0 REG 790 PARVL R0 pass log size 0585D 60490086 1 4 ZBM 791 LD R1 VLN,VOLNNUM pick up volume number 0585E E4480080 1 0 ZBM 792 ST R1 R0,IDXTVOL place values in table control block 0585F 60578801 1 6 BASE 793 LD R1 SP,LDAFTFBIT get FBI type requested 05860 E4560004 1 0 CACH 794 ST R1 R0,IDXTFBIT and save the table type 05861 604A8180 1 2 CBM 795 LD R1 R2/BITS 0:23 retrieve count of entries 05862 E4482101 1 0 ZBM 796 ST R1 R0,IDXTENTS how many entries are present 05863 788400FF 2 IMM 797 AND R2 0FF clean up this register 05864 E4960005 2 0 CACH 798 ST R2 R0,IDXTBNUM set number of buckets 05865 E4178801 0 6 BASE 799 ST R0 SP,LDAFTFBIT save pointer 00005866 800 COPYLOOP LABEL 05866 605CD000 1 32 BASE 801 LD R1 R3,0(R2) copy the bucket pointers into core 05867 E45C1003 1 02 BASE 802 ST R1 R0,IDXTBUCKET(R2-1) 05868 FAA25866 2 803 DRJ R2 COPYLOOP 05869 19C40001 7 IMM 804 ADD R7 1 skip error return 0000586A 805 SECSECBAD LABEL 0586A DC403150 806 CALLNP GRUBWNDO1 release window holding the security block 0586B 60D78801 3 6 BASE 807 LD R3 SP,LDAFTFBIT return table pointer in R3 0586C 5D1F8002 6 STAK 808 LEAVE POP 809 * --- 810 811 * a security block is bad. Try for other or punt. 0000586D 812 PRIMSECBAD LABEL 0586D DC40261B 813 CALLNP MAPOUTFBI unmap FBI, ION 0586E 60091183 0 4 ZBM 814 LD R0 VLN,VOLNSECBK2 get address of secondary 0586F 64091187 0 4 ZBM 815 CPR R0 VLN,VOLNSMSBLK was it last tried? 05870 FE0C5843 816 JNE TRYOTHERSC jump if not, give it a try 05871 FE0E586A 817 JMP SECSECBAD both security blocks bad, punt 818 * --- 819 820 END LOADAFTIDX subroutine 821 822 823 END AFT and IDX Managers 105 INPUT PWMANGLE password mangler 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1199 (PWMANGLE) F 62 Password Mangler 3 4 ********************************************************************************** 5 * * 6 * PWMANGLE * 7 * The purpose of this routine is to scramble a password so * 8 * that a user seeing the scrambled form has no hope of recovering * 9 * the unscrambled version. We hope that it is not possible * 10 * for a penetrator to see this type of data, but we use this * 11 * technique just in case. When a password is set, the password * 12 * is scrambled and the scrambled form is saved on mass storage * 13 * and the plaintext version is not saved at all. A user * 14 * desiring access supplies a password which is subjected to * 15 * the same scrambling operation before being compared to the * 16 * stored version. See Wilkes or Evens or Purdys articles for * 17 * more complete information. A password of zero is presumed to * 18 * indicate that no password is expected. This routine will * 19 * return immediately with a double zero indicating no password. * 20 * A parameter in addition to the password is supplied * 21 * to this routine. That parameter must be saved with * 22 * the scrambled password. The purpose of this parameter is * 23 * to prevent penetration by generating a list of "likely" * 24 * passwords, subjecting them to the one way transformation, * 25 * then looking for someone unlucky enough to have used one. * 26 * The penetrators work has been increased in that he must * 27 * rescramble his list for each different account using the * 28 * proper parameter for that account. Note that the parameter * 29 * for a given account must remain unchanged as long as any * 30 * password was scrambled using it. * 31 * In this system, we have decided to use the account name * 32 * itself as the parameter. * 33 * Call: * 34 * SP => stack pointer * 35 * CALL PWMANGLE * 36 * PARV2 * 37 * PARV2L * 38 * scrambled form in R0, R1 * 39 * In addition, eats R2 and R3 * 40 * Stack required = 3 * 41 * * 42 ********************************************************************************** 43 44 PWMANGLER BLOCK PWMANGLE subroutine 45 ENTRY PWMANGLE mangle password for security 46 47 BEGFRAME 00178801 6 BASE 48 PEND BSS2 0 spot to do the dirty work 00178801 6 BASE 49 PENS BSS 0 same place, different name 00178004 6 CACH 50 PENC BSSC 8 same place, character name 51 ENDFRAME 52 05872 DD1F8003 6 STAK 53 PWMANGLE ENTR PUSH 05873 C3578801 6 BASE 54 STPV2 SP,PEND store the encode parameter 05874 C2540000 01 PAIR 55 STPV2L PAIR R0 get the password 05875 FA125889 01 56 JEQZ2 R0 RETURNZERO no scramble if no password 05876 58C40010 IMM 57 IORPSR PSRMODIF doing full length multiply 05877 1E00588A 01 58 MUL2 R0 ONESPREAD allow for dummys with very short passwords 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1200 (PWMANGLE) F 62 Password Mangler 59 * when we get to picking out fields, 60 * we do not want zero fields more 61 * frequently than average 1 in 2^n times. 05878 58840010 IMM 62 CLBPSR PSRMODIF restore normalcy 05879 76148000 0123 PAIR 63 XOR2 R0 PAIR R2 fold the two halves together 0587A F4178801 0 6 BASE 64 XORM R0 SP,PENS also, diddle the encode parameter 0587B F4578802 1 6 BASE 65 XORM R1 SP,PENS(1) do the other half 66 * \ / 67 68 ********************************************************************************** 69 * Are you ready for this? * 70 * We here use the password to control a 'random' transposition * 71 * of the characters of the encode parameter. We also do an * 72 * ADD on the way through so that a penetrator cannot back track * 73 * by trying all 8! combinations until one makes sense. * 74 * * 75 * Note that any given character might only be moved once, so the * 76 * ADD, EXCH, SUB sequence insures that a character moved only once * 77 * gets mangled. * 78 ********************************************************************************** 79 80 81 * \ / 0587C 18124000 0 1 REG 82 ADD R0 R1 produce a shorter word of garbage 0587D 60840007 2 IMM 83 LD R2 8-1 counter for all eight characters 0000587E 84 PENCLOP LABEL 0587E 600A0A00 0 0 CBM 85 LD R0 R0/BITS 5:4 rotate an odd amount 0587F 60CA2A30 3 0 CBM 86 LD R3 R0/BITS 21:23 get a three bit index 05880 605B9004 1 62 CACH 87 LD R1 SP,PENC(R2) get the next character 05881 18520000 1 0 REG 88 ADD R1 R0 swizzle the bits to make harder to find 05882 E05B9804 1 63 CACH 89 EXCH R1 SP,PENC(R3) move character to 'random' place 05883 10520000 1 0 REG 90 SUB R1 R0 make sure this char gets mangled, too. 05884 E45B9004 1 62 CACH 91 ST R1 SP,PENC(R2) actually, we exchange the characters 05885 FAA6587E 2 92 JDR R2 PENCLOP okay, we move ALL 8 characters 93 * \ / 94 * see, my fingers never left my hands! 95 05886 62178801 016 BASE 96 LD2 R0 SP,PEND retrieve the scrambled form 05887 FA1C5889 01 97 JNEZ2 R0 RETURNZERO jump if a good job 05888 6200588A 01 98 LD2 R0 ONESPREAD just in case zero is the answer! 00005889 99 RETURNZERO LABEL 05889 5D1F8003 6 STAK 100 LEAVE POP return to caller 101 * --- 102 0588A 6E57BA0E 103 ONESPREAD VFD 06E57BA0E random double word number 0588B C294A0F7 104 VFD 0C294A0F7 105 106 END PWMANGLER PWMANGLE subroutine 106 INPUT CONVERSION conversion routines 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1201 (CONVERSION) F 63 Miscellaneous Conversion Routines 3 4 BLOCK Conversion Routines 5 6 ENTRY ACCTTOCHAR convert an account name to char string 7 ENTRY CHARTOINT convert char string to integer 8 ENTRY CHARTOP12 convert char string to pak12 symbol 9 ENTRY CHARTOP6 convert char string to pak6 symbol 10 ENTRY HEXTOCHAR convert integer to hex char string 11 ENTRY INTTOCHAR convert integer to character string 12 ENTRY P12TOCHAR convert pak12 symbol to char string 13 ENTRY P6TOCHAR convert pak6 symbol to char string 14 15 ********************************************************************************** 16 * * 17 * This block will contain several conversion routines, as they * 18 * become necessary. They are all pretty much ripped off from * 19 * $$$CharStuff.Assem. * 20 * * 21 ********************************************************************************** 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1202 (CONVERSION) F 63 Miscellaneous Conversion Routines 23 24 ********************************************************************************** 25 * * 26 * CHARTOP12. Convert character string to a pak12 item. * 27 * * 28 * CALL CHARTOP12 * 29 * PARL buffer pointer, terminated by NUL * 30 * * 31 * 0 = ok * 32 * bit 24 => bad char * 33 * bit 25 => empty * 34 * bit 26 => too long * 35 * * 36 * * 37 * Eats R0:R3. * 38 * Stack required = 3 * 39 * 2 + max ( CHARTOP6 (1) ) * 40 * * 41 ********************************************************************************** 42 43 BLOCK CHARTOP12 subroutine 44 ENTRY CHARTOP12 45 46 BEGFRAME 00178801 6 BASE 47 HALF BSS 1 first half of result 48 ENDFRAME 49 0588C DD1F8002 6 STAK 50 CHARTOP12 ENTR PUSH 0588D C012C000 3 REG 51 STPL R3 save pointer to users buffer 0588E DC005898 52 CALL CHARTOP6 pack first half 0588F 4016C000 3 CACH 53 PARL CACH R3,0 05890 60840000 2 IMM 54 LD R2 0 clear second half of result 05891 F2345897 0 55 JBF R0/BIT 26 DONE jump on any except 'too long' error 05892 E4578801 1 6 BASE 56 ST R1 HALF save first half of result 05893 DC005898 57 CALL CHARTOP6 pack second half 05894 4016C000 3 CACH 58 PARL CACH R3,0 05895 60924000 2 1 REG 59 LD R2 R1 copy second half 05896 60578801 1 6 BASE 60 LD R1 HALF get first half 61 * \ / 62 00005897 63 DONE LABEL 05897 5D1F8002 6 STAK 64 LEAVE POP 65 * --- 66 67 END CHARTOP12 subroutine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1203 (CONVERSION) F 63 Miscellaneous Conversion Routines 69 70 ********************************************************************************** 71 * * 72 * CHARTOP6. Convert a character string to a PAK6 value * 73 * CALL CHARTOP6 * 74 * PARL buffer, terminated by NUL * 75 * * 76 * 0 = ok * 77 * bit 24 => bad char * 78 * bit 25 => empty * 79 * bit 26 => too long * 80 * * 81 * * 82 * * 83 * Eats R0:R3. * 84 * Stack required = 1 * 85 * * 86 ********************************************************************************** 87 88 BLOCK CHARTOP6 subroutine 89 ENTRY CHARTOP6 90 91 BEGFRAME 92 ENDFRAME 93 05898 DD1F8001 6 STAK 94 CHARTOP6 ENTR PUSH 05899 C012C000 3 REG 95 STPL R3 pick up string pointer 0589A 62440006 12 IMM 96 LD2 R1 6 clear pack value in R1, char count in R2 0589B 6016C000 0 3 CACH 97 LD R0 CACH R3,0 check first character in item 0589C FA0C58A1 0 98 JNEZ R0 LOOPSTRT start the loop if not null 0589D 60040040 0 IMM 99 LD R0 040 bit 25 => empty string 0589E FE0E58AA 100 JMP DONE and exit with that code 101 * --- 102 0000589F 103 LOOP LABEL 0589F 1C440028 1 IMM 104 MUL R1 40 accumulate the character 058A0 6016C000 0 3 CACH 105 LD R0 CACH R3,0 get new character 000058A1 106 LOOPSTRT LABEL 058A1 603058AB 0 0 @ 107 LD R0 @CHARTABPTR(R0) get translated value 058A2 F63058AA 0 108 JBT R0/BIT 24 DONE jump if character not in legal set 058A3 F63258A6 0 109 JBT R0/BIT 25 NOINCR jump if null character, do all MULs 058A4 18520000 1 0 REG 110 ADD R1 R0 accumulate value 058A5 38D6C001 3 3 CACH 111 LEA R3 CACH R3,1 advance to next character 000058A6 112 NOINCR LABEL 058A6 FAA2589F 2 113 DRJ R2 LOOP loop six times 114 * \ / 058A7 6016C000 0 3 CACH 115 LD R0 CACH R3,0 pick up character to come next 058A8 FA0258AA 0 116 JEQZ R0 DONE jump if null, end of string reached 058A9 60040020 0 IMM 117 LD R0 020 load code for string too long 000058AA 118 DONE LABEL 058AA 5D1F8001 6 STAK 119 LEAVE POP 120 * --- 121 058AB 020C58AC 122 CHARTABPTR PTR CHARTAB pointer to character table 123 020058AC 124 CHARTAB BSSC 0 values of pak characters 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1204 (CONVERSION) F 63 Miscellaneous Conversion Routines 058AD 00000080 125 VFDC 040,080,080,080,080,080,080,080 00-07 (NUL-BEL) 058AF 00000080 126 VFDC 080,080,080,080,080,080,080,080 08-0F (BS-SI) 058B1 00000080 127 VFDC 080,080,080,080,080,080,080,080 10-17 (DLE-ETB) 058B3 00000080 128 VFDC 080,080,080,080,080,080,080,080 18-1F (CAN-US) 058B5 00000080 129 VFDC 00, 37,080,080,080,080, 38,080 20-27 ( !"#$%') 058B7 00000080 130 VFDC 080,080,080,080,080,080,080,080 28-2F (()*+, -./) 058B9 00000008 131 VFDC 01, 02, 03, 04, 05, 06, 07, 08 30-37 (01234567) 058BB 00000080 132 VFDC 09, 10,080,080,080,080,080,080 38-3F (89:s<=>?) 058BD 00000011 133 VFDC 080, 11, 12, 13, 14, 15, 16, 17 40-47 (@ABCDEFG) 058BF 00000019 134 VFDC 18, 19, 20, 21, 22, 23, 24, 25 48-4F (HIJKLMNO) 058C1 00000021 135 VFDC 26, 27, 28, 29, 30, 31, 32, 33 50-57 (PQRSTUVW) 058C3 00000027 136 VFDC 34, 35, 36,080,080,080,080, 39 58-5F (XYZ[\]^_) 058C5 00000011 137 VFDC 080, 11, 12, 13, 14, 15, 16, 17 60-67 (`abcdefg) 058C7 00000019 138 VFDC 18, 19, 20, 21, 22, 23, 24, 25 68-6F (hijklmno) 058C9 00000021 139 VFDC 26, 27, 28, 29, 30, 31, 32, 33 70-77 (pqrstuvw) 058CB 00000080 140 VFDC 34, 35, 36,080,080,080,080,080 78-7F (xyz{|}~r) 141 142 END CHARTOP6 subroutine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1205 (CONVERSION) F 63 Miscellaneous Conversion Routines 144 145 ********************************************************************************** 146 * * 147 * HEXTOCHAR. Convert integer to character string (in hex). * 148 * CALL HEXTOCHAR * 149 * PARV value to convert * 150 * PARV result size * 151 * PARL result buffer * 152 * ST R2 address of NUL at end of result * 153 * * 154 * Eats R0:R2. * 155 * Stack required = 4 * 156 * * 157 ********************************************************************************** 158 159 BLOCK HEXTOCHAR subroutine 160 ENTRY HEXTOCHAR 161 162 BEGFRAME 00178801 6 BASE 163 VALUE BSS 1 value to convert 00178802 6 BASE 164 VALUEPTR BSS 1 pointer to one digit in value 00178803 6 BASE 165 RESULTLEN BSS 1 length of result 166 ENDFRAME 167 058CC 020C58CD 168 CHARPTR PTR CHARSTRING 020058CD 169 CHARSTRING BSSC 0 058CD 30313233 170 TEXT "0123456789ABCDEF" 171 058D1 DD1F8004 6 STAK 172 HEXTOCHAR ENTR PUSH 058D2 C1578801 6 BASE 173 STPV VALUE save value to convert 058D3 C1578803 6 BASE 174 STPV RESULTLEN save result length 058D4 C0128000 2 REG 175 STPL R2 set result buffer pointer 176 058D5 60578803 1 6 BASE 177 LD R1 RESULTLEN 058D6 10440008 1 IMM 178 SUB R1 8 amount of padding needed 058D7 FA4A58D9 1 179 JLEZ R1 NOPAD jump if no padding 058D8 FE580020 180 CFILL " " put in the padding 000058D9 181 NOPAD LABEL 182 058D9 60578803 1 6 BASE 183 LD R1 RESULTLEN 058DA 50440008 1 IMM 184 MIN R1 8 number of digits wanted 058DB 389A8800 2 21 CACH 185 LEA R2 CACH R2,0(R1) point to end of result 058DC 70524000 1 1 REG 186 LDN R1 R1 make negative 058DD 38098042 0 6 ZBM 187 LEA R0 VALUE/BITS 0:3(8) pointer after last digit wanted 058DE E4178802 0 6 BASE 188 ST R0 VALUEPTR save it 189 000058DF 190 LOOP LABEL 058DF 601D8C02 0 61 FPVR 191 LD R0 @VALUEPTR(R1) get a digit 058E0 603058CC 0 0 @ 192 LD R0 @CHARPTR(R0) convert to printable 058E1 E41A8800 0 21 CACH 193 ST R0 CACH R2,0(R1) save it 058E2 FA6058DF 1 194 IRJ R1 LOOP and loop till all done 195 058E3 EC168000 2 CACH 196 STZ CACH R2,0 put NUL at end 058E4 5D1F8004 6 STAK 197 LEAVE POP 198 * --- 199 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1206 (CONVERSION) F 63 Miscellaneous Conversion Routines 200 END HEXTOCHAR subroutine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1207 (CONVERSION) F 63 Miscellaneous Conversion Routines 202 203 ********************************************************************************** 204 * * 205 * CHARTOINT. Convert character string to integer. * 206 * CALL CHARTOINT * 207 * PARL buffer pointer, terminated by a NUL * 208 * ST R0 error code (0 = ok, -1 = bad string) * 209 * ST R1 result * 210 * * 211 * Eats R0:R2. * 212 * Stack required = 2 * 213 * * 214 ********************************************************************************** 215 216 BLOCK CHARTOINT subroutine 217 ENTRY CHARTOINT 218 219 BEGFRAME 00178801 6 BASE 220 SIGN BSS 1 sign: +1 or -1 221 ENDFRAME 222 058E5 DD1F8002 6 STAK 223 CHARTOINT ENTR PUSH 058E6 C0128000 2 REG 224 STPL R2 address of the string to convert 058E7 EDD78801 6 BASE 225 STW SP,SIGN assume positive 226 * \ / 227 000058E8 228 SKIPBLANKS LABEL 058E8 60168000 0 2 CACH 229 LD R0 CACH R2,0 get first character 058E9 FA0258FE 0 230 JEQZ R0 BADCHAR jump if string is empty 058EA 6404002B 0 IMM 231 CPR R0 02B is it a plus sign 058EB FE0258EF 232 JEQ POSITIVE number is positive 058EC 6404002D 0 IMM 233 CPR R0 02D is it a minus sign 058ED FE0C58F0 234 JNE NOTNEG probably a number 058EE D1578801 6 BASE 235 STMW SP,SIGN adjust sign appropriately 236 * \ / 237 000058EF 238 POSITIVE LABEL 058EF 38968001 2 2 CACH 239 LEA R2 CACH R2,1 skip the sign character 000058F0 240 NOTNEG LABEL 058F0 64040020 0 IMM 241 CPR R0 020 if blank move on to the next character 058F1 FE0C58F4 242 JNE NOTBLANK move on 058F2 38968001 2 2 CACH 243 LEA R2 CACH R2,1 to next character 058F3 FE0E58E8 244 JMP SKIPBLANKS back for next check 245 * --- 246 000058F4 247 NOTBLANK LABEL 058F4 60440000 1 IMM 248 LD R1 0 initialize result 249 * \ / 250 000058F5 251 LOOP LABEL 058F5 60168000 0 2 CACH 252 LD R0 CACH R2,0 get a character 058F6 FA025900 0 253 JEQZ R0 DONE jump if end of string 058F7 10040030 0 IMM 254 SUB R0 "0" subtract off bias 058F8 68040009 0 IMM 255 UCPR R0 09 check if good character 058F9 FE0458FE 256 JGT BADCHAR jump if non-numeric character 058FA 1C44000A 1 IMM 257 MUL R1 0A move number up decimal place 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1208 (CONVERSION) F 63 Miscellaneous Conversion Routines 058FB 18520000 1 0 REG 258 ADD R1 R0 accumulate the character 058FC 38968001 2 2 CACH 259 LEA R2 CACH R2,1 increment character pointer 058FD FE0E58F5 260 JMP LOOP back for more characters 261 * --- 262 000058FE 263 BADCHAR LABEL 058FE D1520000 0 REG 264 STMW R0 error: bad string 058FF FE0E5902 265 JMP RETURN 266 * --- 267 00005900 268 DONE LABEL 05900 1C578801 1 6 BASE 269 MUL R1 SP,SIGN correct according to sign 05901 EC120000 0 REG 270 STZ R0 indicate all went well 271 * \ / 272 00005902 273 RETURN LABEL 05902 5D1F8002 6 STAK 274 LEAVE POP 275 * --- 276 277 END CHARTOINT subroutine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1209 (CONVERSION) F 63 Miscellaneous Conversion Routines 279 280 ********************************************************************************** 281 * * 282 * INTTOCHAR. Convert integer to character string (decimal). * 283 * CALL INTTOCHAR * 284 * PARV value to convert * 285 *optional PARV length of result * 286 * PARL result buffer * 287 * NUL after end of converted string.> * 288 * * 289 * Eats R0:R3. * 290 * Stack required = 6 * 291 * * 292 ********************************************************************************** 293 294 BLOCK INTTOCHAR subroutine 295 ENTRY INTTOCHAR 296 297 BEGFRAME 00178801 6 BASE 298 VALUE BSS 1 value to convert 00178802 6 BASE 299 RESULTLEN BSS 1 length for result 0017800C 6 CACH 300 BUFFER BSSC 12 temporary buffer 301 ENDFRAME 302 05903 DD1F8006 6 STAK 303 INTTOCHAR ENTR PUSH 05904 C1578801 6 BASE 304 STPV VALUE save value to convert 05905 D1578802 6 BASE 305 STMW RESULTLEN 05906 F3CA5908 7 306 JBF R7/STPVALUE NOLEN jump if length not specified 05907 C1578802 6 BASE 307 STPV RESULTLEN save result length 00005908 308 NOLEN LABEL 05908 C0128000 2 REG 309 STPL R2 save result pointer 05909 EC0BC010 7 CBM 310 STZ R7/BIT 0 clear negative flag 0590A 60178801 0 6 BASE 311 LD R0 VALUE get value to convert 0590B FA06590E 0 312 JGEZ R0 NOTNEG jump if not negative 0590C EDCBC010 7 CBM 313 STW R7/BIT 0 set negative flag 0590D 70120000 0 0 REG 314 LDN R0 R0 make value positive 0000590E 315 NOTNEG LABEL 0590E 60C4000B 3 IMM 316 LD R3 11 index into buffer for last char 0590F 58C40010 IMM 317 IORPSR PSRMODIF set funky arithmetic 318 00005910 319 LOOP LABEL 05910 62120000 010 REG 320 LD2 R0 R0 05911 1404000A 0 IMM 321 DIV R0 10 R0 = quotient, R1 = remainder 05912 60565030 1 1 REG 322 LD R1 R1+"0" convert to printable 05913 E45B980C 1 63 CACH 323 ST R1 BUFFER(R3) save it 05914 E4D6D001 3 3 REG 324 ST R3 R3+1 decrement index 05915 FA045910 0 325 JGTZ R0 LOOP jump if more to convert 326 05916 58840010 IMM 327 CLBPSR PSRMODIF clear modified arithmetic 05917 F3C0591B 7 328 JBF R7/BIT 0 NOTNEG2 jump if number was not negative 05918 6004002D 0 IMM 329 LD R0 "-" 05919 E41B980C 0 63 CACH 330 ST R0 BUFFER(R3) else put "-" in front of number 0591A E4D6D001 3 3 REG 331 ST R3 R3+1 decrement index 0000591B 332 NOTNEG2 LABEL 333 0591B 60578802 1 6 BASE 334 LD R1 RESULTLEN get desired result length 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1210 (CONVERSION) F 63 Miscellaneous Conversion Routines 0591C 1852C000 1 3 REG 335 ADD R1 R3 0591D 1044000B 1 IMM 336 SUB R1 11 R1 = number of characters of padding 0591E FA4A5920 1 337 JLEZ R1 NOPAD jump if no padding needed 0591F FE580020 338 CFILL " " put in necessary padding 00005920 339 NOPAD LABEL 05920 381B980D 0 63 CACH 340 LEA R0 BUFFER(R3+1) R0 -> converted string in BUFFER 05921 6044000B 1 IMM 341 LD R1 11 05922 1052C000 1 3 REG 342 SUB R1 R3 R1 = length of converted string 05923 FE400000 343 CMOVE copy into result buffer 05924 EC168000 2 CACH 344 STZ CACH R2,0 put in the NUL 05925 5D1F8006 6 STAK 345 LEAVE POP 346 * --- 347 348 END INTTOCHAR subroutine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1211 (CONVERSION) F 63 Miscellaneous Conversion Routines 350 351 ********************************************************************************** 352 * * 353 * P12TOCHAR. Convert PAK12 item to character string. * 354 * CALL P12TOCHAR * 355 * PARV2 value to convert * 356 * PARL result buffer pointer * 357 * ST R2 address of NUL at end of string * 358 * * 359 * Eats R0:R3. * 360 * Stack required = 6 * 361 * 3 + max ( P6TOCHAR (3) ) * 362 * * 363 ********************************************************************************** 364 365 BLOCK P12TOCHAR subroutine 366 ENTRY P12TOCHAR 367 368 BEGFRAME 00178801 6 BASE 369 VALUE BSS 2 value to convert 370 ENDFRAME 371 05926 DD1F8003 6 STAK 372 P12TOCHAR ENTR PUSH 05927 C3578801 6 BASE 373 STPV2 SP,VALUE value to convert 05928 C0128000 2 REG 374 STPL R2 save result pointer 375 05929 60178801 0 6 BASE 376 LD R0 SP,VALUE pick up first half of name 0592A DC00593E 377 CALL P6TOCHAR convert first half 0592B 41520000 0 REG 378 PARV R0 pass value to convert 0592C 40168000 2 CACH 379 PARL CACH R2,0 pass result pointer 380 * \ / R2 => null at end of result string 0592D 60178802 0 6 BASE 381 LD R0 SP,VALUE(1) pick up second half of name 0592E FA025932 0 382 JEQZ R0 ONEWORD jump if only one word 0592F DC00593E 383 CALL P6TOCHAR convert second half 05930 41520000 0 REG 384 PARV R0 pass second half of value 05931 40168000 2 CACH 385 PARL CACH R2,0 pass result address 386 * \ / R2 => null at end of result string 00005932 387 ONEWORD LABEL 05932 5D1F8003 6 STAK 388 LEAVE POP 389 * --- 390 391 END P12TOCHAR subroutine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1212 (CONVERSION) F 63 Miscellaneous Conversion Routines 393 394 ********************************************************************************** 395 * * 396 * P6TOCHAR. Convert PAK6 item to character string. * 397 * CALL P6TOCHAR * 398 * PARV pak6 item to convert * 399 *optional: PARV field size * 400 * PARL result buffer address * 401 * ST R2 address of NUL at end of result * 402 * * 403 * Eats R0:R3. * 404 * Stack required = 3 * 405 * * 406 ********************************************************************************** 407 408 BLOCK P6TOCHAR subroutine 409 ENTRY P6TOCHAR 410 411 BEGFRAME 00178801 6 BASE 412 VALUE BSS 1 value to convert 00178802 6 BASE 413 RESULTLEN BSS 1 length of result 414 ENDFRAME 415 05933 020C5934 416 P6PTR PTR P6STRING 02005934 417 P6STRING BSSC 0 05934 00000032 418 VFDC 000,"0","1","2" 05935 33343536 419 TEXT "3456789ABCDEFGHIJKLMNOPQRSTUVWXYZ!&_" 420 0593E DD1F8003 6 STAK 421 P6TOCHAR ENTR PUSH 0593F C1578801 6 BASE 422 STPV VALUE save value to convert 05940 D1578802 6 BASE 423 STMW RESULTLEN say result not specified 05941 F3CA5943 7 424 JBF R7/STPVALUE NOLEN jump if length parm not specified 05942 C1578802 6 BASE 425 STPV RESULTLEN else save result length 00005943 426 NOLEN LABEL 05943 C012C000 3 REG 427 STPL R3 result buffer pointer 428 05944 EC16C006 3 CACH 429 STZ CACH R3,6 put NUL beyond longest possible string 05945 60840005 2 IMM 430 LD R2 5 to convert six characters 05946 60178801 0 6 BASE 431 LD R0 VALUE value to convert 05947 58C40010 IMM 432 IORPSR PSRMODIF turn on modified arithmetic 433 00005948 434 LOOP LABEL 05948 62120000 010 REG 435 LD2 R0 R0 swell up for divide 05949 14040028 0 IMM 436 DIV R0 40 R0 = quotient, R1 = remainder 0594A 60725933 1 1 @ 437 LD R1 @P6PTR(R1) get character 0594B E45AD000 1 32 CACH 438 ST R1 CACH R3,0(R2) save it 0594C FAA65948 2 439 JDR R2 LOOP do all characters 0594D 58840010 IMM 440 CLBPSR PSRMODIF turn off modified arithmetic 441 442 * Now, scan from left to right, and make any letters 443 * that are preceeded by a letter be lower case. 444 0594E EC0BC010 7 CBM 445 STZ R7/BIT 0 say previous is not a letter 0594F 6047FFFF 1 IMM 446 LD R1 -1 starting index (to look at previous letter) 00005950 447 LOWERLOOP LABEL 05950 601AC800 0 31 CACH 448 LD R0 CACH R3,0(R1) get a character 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1213 (CONVERSION) F 63 Miscellaneous Conversion Routines 05951 FA485953 1 449 JLTZ R1 NOTDONE output one digit for zero 05952 FA025960 0 450 JEQZ R0 LOWERDONE jump if all done 00005953 451 NOTDONE LABEL 05953 28040020 0 IMM 452 BSUB R0 "a"-"A" make sure this is upper case 05954 64040041 0 IMM 453 CPR R0 "A" 05955 FE08595D 454 JLT NOTLETTER jump if not a letter 05956 6404005A 0 IMM 455 CPR R0 "Z" 05957 FE04595D 456 JGT NOTLETTER jump if not a letter 05958 F3C0595B 7 457 JBF R7/BIT 0 NOLOWER jump if previous was not a letter 05959 18040020 0 IMM 458 ADD R0 "a"-"A" convert to lower case 0595A E41AC800 0 31 CACH 459 ST R0 CACH R3,0(R1) and save it 0000595B 460 NOLOWER LABEL 0595B EDCBC010 7 CBM 461 STW R7/BIT 0 remember that this is a letter 0595C FE0E595E 462 JMP NEXTLOOP 463 * --- 464 0000595D 465 NOTLETTER LABEL 0595D EC0BC010 7 CBM 466 STZ R7/BIT 0 remember that this is not a letter 467 * \ / 468 0000595E 469 NEXTLOOP LABEL 0595E 60565001 1 1 REG 470 LD R1 R1+1 point at next character 0595F FE0E5950 471 JMP LOWERLOOP and do it all again 472 * --- 473 00005960 474 LOWERDONE LABEL 05960 6012C000 0 3 REG 475 LD R0 R3 R0 -> destination 05961 60578802 1 6 BASE 476 LD R1 RESULTLEN requested length 05962 60840000 2 IMM 477 LD R2 0 05963 FA4A596A 1 478 JLEZ R1 NOLEN2 jump if no length specified 05964 FE560000 479 CSRCH find current end of string 05965 FE0C596A 480 JNE NOLEN2 jump if longer than requested 05966 38960000 2 0 CACH 481 LEA R2 CACH R0,0 R2 -> last char so far 05967 FE580020 482 CFILL " " fill remaining characters with spaces 05968 EC168000 2 CACH 483 STZ CACH R2,0 then put NUL at end 05969 FE0E596D 484 JMP DONE 485 * --- 486 0000596A 487 NOLEN2 LABEL 0596A 60440063 1 IMM 488 LD R1 99 much longer than possible 0596B FE560000 489 CSRCH find end of string 0596C 38960000 2 0 CACH 490 LEA R2 CACH R0,0 R2 -> NUL at end of string 491 * \ / 492 0000596D 493 DONE LABEL 0596D 5D1F8003 6 STAK 494 LEAVE POP 495 * --- 496 497 END P6TOCHAR subroutine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1214 (CONVERSION) F 63 Miscellaneous Conversion Routines 499 500 ********************************************************************************** 501 * * 502 * ACCTTOCHAR. This routine converts a three word account * 503 * name (or filename for that matter) into a string storing it * 504 * into the specified destination string. * 505 * Note that P12TOCHAR must not be used because of * 506 * excessive stack usage. * 507 * Call: * 508 * CALL ACCTTOCHAR * 509 * PAR => account name (3 words) * 510 * PARL result buffer pointer * 511 * ST R2 address of NULL at the end of the result string * 512 * * 513 * Eats R0:R3. * 514 * Stack required = 5 * 515 * 2 + max ( P6TOCHAR (3) ) * 516 * * 517 ********************************************************************************** 518 519 BLOCK 520 ENTRY ACCTTOCHAR convert account name to characters 521 522 BEGFRAME 00178801 6 BASE 523 ACCTADDR BSS 1 => account name 524 ENDFRAME 525 0596E DD1F8002 6 STAK 526 ACCTTOCHAR ENTR PUSH 0596F C1178801 6 BASE 527 STP SP,ACCTADDR address of the account name triple 05970 C0128000 2 REG 528 STPL R2 pick up result address 529 05971 60178801 0 6 BASE 530 LD R0 SP,ACCTADDR pick up address of name 05972 DC00593E 531 CALL P6TOCHAR convert first half 05973 41560800 0 BASE 532 PARV R0,0 pass value to convert 05974 40168000 2 CACH 533 PARL CACH R2,0 pass result pointer 534 * \ / R2 => null at end of result string 05975 60178801 0 6 BASE 535 LD R0 SP,ACCTADDR pick up address of name 05976 60160801 0 0 BASE 536 LD R0 R0,1 does second half exist? 05977 FA02597B 0 537 JEQZ R0 ONEWORD jump if only one word 05978 DC00593E 538 CALL P6TOCHAR convert second half 05979 41520000 0 REG 539 PARV R0 pass second half of value 0597A 40168000 2 CACH 540 PARL CACH R2,0 pass result address 541 * \ / R2 => null at end of result string 0000597B 542 ONEWORD LABEL 0597B 6044002E 1 IMM 543 LD R1 "." place the separating dot 0597C E4568000 1 2 CACH 544 ST R1 CACH R2,0 ...after the string 0597D 60178801 0 6 BASE 545 LD R0 SP,ACCTADDR pick up address of name 0597E DC00593E 546 CALL P6TOCHAR convert the extension 0597F 41560802 0 BASE 547 PARV R0,2 pass the extension 05980 40168001 2 CACH 548 PARL CACH R2,1 skip over the dot 05981 5D1F8002 6 STAK 549 LEAVE POP 550 * --- 551 552 END of ACCTTOCHAR 553 554 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1215 (CONVERSION) F 63 Miscellaneous Conversion Routines 555 END Conversion Routines 107 INPUT XREQPROC XREQ decoder 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1216 (XREQPROC) F 64 XREQ Processor 3 4 XREQPROC BLOCK Executive Request Processor 5 6 ENTRY FREQTRAP processor of file requests 7 ENTRY INITTERM move terminal config info into TCB 8 ENTRY LUNSEARCH find FCB from a unit number 9 ENTRY MAKEBATCH log on a batch job w/o password 10 ENTRY MOUNTIDX incorporate IDX into AFT 11 ENTRY MOUNTNAME complete volume setup 12 ENTRY MOUNTPACKL mount pack label 13 ENTRY OPREQTRAP processor of operator requests 14 ENTRY PASSERRUP put VMF in error list 15 ENTRY SETMEMTRAP set up monitor error address 16 ENTRY SRCHDIR search directory by name 17 ENTRY SRCHDIRSN search directory by serial number 18 ENTRY STARTSPLR start system Spooler 19 ENTRY TERMINITF block containing term config info filename 20 ENTRY UERRORILR illegal request user error 21 ENTRY UREQTRAP processor of user requests 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1217 (XREQPROC) F 64 XREQ Processor 23 24 ********************************************************************************** 25 * * 26 * Below are routines used to return errors and such to the * 27 * calling routine. FERRORxxx merges the error with the status * 28 * of the FCB and UERRORxxx just returns the error in R0. * 29 * * 30 ********************************************************************************** 31 32 * No error on file operation 00005982 33 FNOERROR LABEL 05982 60040000 0 IMM 34 LD R0 0 00005983 35 FERROR LABEL 05983 8152C000 3 REG 36 STCAR R3 get console area address 05984 60D6C80E 3 3 BASE 37 LD R3 R3,CAXOPERAND get operand to XREQ instruction (unit number) 00005985 38 FERROR3FCB LABEL entry with FCB defined and unit in R3 05985 60494455 1 5 ZBM 39 LD R1 FCB,FCDYNSTAT fetch these status bits 05986 E44A2050 1 0 CBM 40 ST R1 R0/FCDSTATPLC put them into their place 00005987 41 FERROR3 LABEL entry with R0=error code, R3=unit, no FCB 05987 E4CA0880 3 0 CBM 42 ST R3 R0/FDSTATLUN return unit number therein 00005988 43 UERROR LABEL 05988 5C0A2AB0 0 CBM 44 CMZ R0/FDSTATERR any error? 05989 FE025999 45 JEQ STOREINR0 nothing special if no error 0598A 7C030000 0 IMM 46 IOR R0 1*BIT 0 otherwise, set up sign bit as error indicator 0598B 61400412 5 47 LD R5 CPPSA get the current PSA pointer 0598C 60495F11 1 5 ZBM 48 LD R1 R5,PSCACHNP1 R1 => users registers 0598D 5C084E1B 1 ZBM 49 CMZ R1,CAINTMASK/BIT CAIMALLXR does he want all XREQ errors 0598E FE025999 50 JEQ STOREINR0 jump if yes 0598F 608A2AB0 2 0 CBM 51 LD R2 R0/FDSTATERR get the error status 05990 5C3459A4 2 @ 52 CMZ @XRERRTAB(R2) is the error a type to pass upward? 05991 FE025999 53 JEQ STOREINR0 jump if not 05992 60D20000 3 0 REG 54 LD R3 R0 if so, set as error 05993 DC403589 55 CALLNP UERRSET to call the overprocess 05994 FE0E38DF 56 JMP XREQRTNX return without bumping PC 57 * --- 58 00005995 59 UERROR7 LABEL error code in R7 05995 6013C000 0 7 REG 60 LD R0 R7 copy to normal place 05996 FE0E5988 61 JMP UERROR and continue 62 * --- 63 00005997 64 FERROR7 LABEL error code in R7 05997 6013C000 0 7 REG 65 LD R0 R7 copy to normal place 05998 FE0E5983 66 JMP FERROR and continue 67 * --- 68 00005999 69 STOREINR0 LABEL 05999 60400412 1 70 LD R1 CPPSA get the current PSA pointer 0599A 60485F11 1 1 ZBM 71 LD R1 R1,PSCACHNP1 get pointer to users registers 0599B E4164802 0 1 BASE 72 ST R0 R1,CAR0 return status in R0 0599C FE0E38CF 73 JMP XREQRETURN return from this mess 74 * --- 75 76 ********************************************************************************** 77 * * 78 * Bit array giving XREQER codes that are acceptable for * 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1218 (XREQPROC) F 64 XREQ Processor 79 * passing to an over process if error processing is not * 80 * selected. The following table only covers XREQ errors from * 81 * 0 to 0DF. * 82 * * 83 ********************************************************************************** 84 059A0 00000000 85 XRERRTABV VFD 0,0,0,0 00:7F 059A1 41C01000 86 VFD 041C01000 80:9F 059A2 08000000 87 VFD 008000000 A0:BF 059A3 00000000 88 VFD 0 C0:DF 059A4 0048599D 89 XRERRTAB PTR XRERRTABV/BIT 0 bit array pointer 90 91 ********************************************************************************** 92 * * 93 * At this writing there are too few errors to worry about these * 94 * two word entries for each error (LD code, JMP). Someday it * 95 * might be more space conscious to build a table of JSRs or * 96 * something to make it only one word per error. * 97 * * 98 ********************************************************************************** 99 100 * Illegal operation on device 000059A5 101 FERRORILOP LABEL 059A5 60040091 0 IMM 102 LD R0 XREQERILOP illegal operation on device 059A6 FE0E5983 103 JMP FERROR 104 105 * Lock protocol error 000059A7 106 FERRORLPE LABEL 059A7 60040095 0 IMM 107 LD R0 XREQERLPE 059A8 FE0E5983 108 JMP FERROR 109 110 * File abnormal/unavailable - does automatic rewind 000059A9 111 FERRORFAUR LABEL 059A9 DC4073AF 112 CALLNP DOREWINDA 000059AA 113 FERRORFAU LABEL 059AA 60040089 0 IMM 114 LD R0 XREQERFAU 059AB FE0E5983 115 JMP FERROR 116 117 * Lun protected from modification 000059AC 118 FERRORPFM LABEL 059AC 60040084 0 IMM 119 LD R0 XREQERPFM 059AD FE0E5983 120 JMP FERROR 121 122 * Read not allowed 000059AE 123 FERRORRNA LABEL 059AE 60040085 0 IMM 124 LD R0 XREQERRNA 059AF FE0E5983 125 JMP FERROR 126 127 * Parameter out of bounds 000059B0 128 FERRORPOB LABEL 059B0 60040082 0 IMM 129 LD R0 XREQERPOB 059B1 FE0E5983 130 JMP FERROR 131 132 * File busy 000059B2 133 FERRORFBZ LABEL 059B2 6004008A 0 IMM 134 LD R0 XREQERFBZ 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1219 (XREQPROC) F 64 XREQ Processor 059B3 FE0E5983 135 JMP FERROR 136 137 * Lock busy 000059B4 138 FERRORLBZ LABEL 059B4 600400C6 0 IMM 139 LD R0 XREQERLBZ 059B5 FE0E5983 140 JMP FERROR 141 142 * Bad File Name 000059B6 143 FERRORBFN LABEL 059B6 6004008F 0 IMM 144 LD R0 XREQERBFN 059B7 FE0E5983 145 JMP FERROR 146 147 * Lun not equipped (R3=lun number, no FCB) 000059B8 148 FERRORLNE3 LABEL 059B8 60040081 0 IMM 149 LD R0 XREQERLNE 059B9 FE0E5987 150 JMP FERROR3 151 152 * No such lun (R3=lun number, no FCB) 000059BA 153 FERRORNSL LABEL 059BA 600400AA 0 IMM 154 LD R0 XREQERNSL 059BB FE0E5987 155 JMP FERROR3 156 157 * file has been destroyed 000059BC 158 FERRORFHBD LABEL 059BC 60040090 0 IMM 159 LD R0 XREQERFHBD 059BD FE0E5983 160 JMP FERROR 161 162 * Lun not saved 000059BE 163 FERRORLNS LABEL 059BE 6004008C 0 IMM 164 LD R0 XREQERLNS 059BF FE0E5983 165 JMP FERROR 166 167 * Lun already equipped 000059C0 168 FERRORLAE LABEL 059C0 60040083 0 IMM 169 LD R0 XREQERLAE 059C1 FE0E5983 170 JMP FERROR 171 172 * Lun already saved 000059C2 173 FERRORLAS LABEL 059C2 6004008B 0 IMM 174 LD R0 XREQERLAS 059C3 FE0E5983 175 JMP FERROR 176 177 * Name already exists 000059C4 178 FERRORNAE LABEL 059C4 6004008E 0 IMM 179 LD R0 XREQERNAE 059C5 FE0E5983 180 JMP FERROR 181 182 * No such entry 000059C6 183 FERRORNSE LABEL 059C6 600400AB 0 IMM 184 LD R0 XREQERNSE 059C7 FE0E5983 185 JMP FERROR 186 187 * Privilege not sufficient 000059C8 188 FERRORPNS LABEL 059C8 60040094 0 IMM 189 LD R0 XREQERPNS 059C9 FE0E5983 190 JMP FERROR 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1220 (XREQPROC) F 64 XREQ Processor 191 192 * Disk structure error 000059CA 193 FERRORDSE LABEL 059CA 6004009F 0 IMM 194 LD R0 XREQERDSE 059CB FE0E5983 195 JMP FERROR 196 197 * Reread at end-of-data 000059CC 198 FERRORREOD LABEL 059CC 600400A4 0 IMM 199 LD R0 XREQERREOD 059CD FE0E5983 200 JMP FERROR 201 202 * Must not have write access (write access not allowed) 000059CE 203 FERRORWANA LABEL 059CE 600400A5 0 IMM 204 LD R0 XREQERWANA 059CF FE0E5983 205 JMP FERROR 206 207 * insufficient authorization 000059D0 208 FERRORIAUT LABEL 059D0 600400A7 0 IMM 209 LD R0 XREQERIAUT 059D1 FE0E5983 210 JMP FERROR 211 212 * insufficient system resources 000059D2 213 FERRORISYR LABEL 059D2 60040093 0 IMM 214 LD R0 XREQERISYR 059D3 FE0E5983 215 JMP FERROR 216 217 * item/access not available -- did not suspend 000059D4 218 FERRORSUSP LABEL 059D4 600400AD 0 IMM 219 LD R0 XREQERSUSP 059D5 FE0E5983 220 JMP FERROR 221 222 * No error - completion via UERROR 000059D6 223 NOERROR LABEL 059D6 60040000 0 IMM 224 LD R0 0 059D7 FE0E5988 225 JMP UERROR 226 227 * Illegal request 000059D8 228 UERRORILR LABEL 000059D8 229 ILLREQ LABEL 059D8 60040080 0 IMM 230 LD R0 XREQERILR 059D9 FE0E5988 231 JMP UERROR place in R0 and return 232 233 * Parameter out of bounds 000059DA 234 UERRORPOB LABEL 059DA 60040082 0 IMM 235 LD R0 XREQERPOB 059DB FE0E5988 236 JMP UERROR 237 238 * Name already exists 000059DC 239 UERRORNAE LABEL 059DC 6004008E 0 IMM 240 LD R0 XREQERNAE 059DD FE0E5988 241 JMP UERROR 242 243 * No Free Space on Volume 000059DE 244 UERRORNFSV LABEL 059DE 6004009D 0 IMM 245 LD R0 XREQERNFSV 059DF FE0E5988 246 JMP UERROR 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1221 (XREQPROC) F 64 XREQ Processor 247 248 * May not reference program/process 000059E0 249 UERRORMNRP LABEL 059E0 600400A2 0 IMM 250 LD R0 XREQERMNRP 059E1 FE0E5988 251 JMP UERROR 252 253 * No such process/program 000059E2 254 UERRORNSPP LABEL 059E2 600400A3 0 IMM 255 LD R0 XREQERNSPP 059E3 FE0E5988 256 JMP UERROR 257 258 * No such entry 000059E4 259 UERRORNSE LABEL 059E4 600400AB 0 IMM 260 LD R0 XREQERNSE 059E5 FE0E5988 261 JMP UERROR 262 263 * Volume in use 000059E6 264 UERRORVIU LABEL 059E6 600400A1 0 IMM 265 LD R0 XREQERVIU 059E7 FE0E5988 266 JMP UERROR 267 268 * No such volume 000059E8 269 UERRORNSV LABEL 059E8 600400A6 0 IMM 270 LD R0 XREQERNSV error 'No such volume' 059E9 FE0E5988 271 JMP UERROR 272 273 * System/resource in use 000059EA 274 UERRORSIU LABEL 059EA 60040099 0 IMM 275 LD R0 XREQERSIU system/resource in use 059EB FE0E5988 276 JMP UERROR 277 278 * No such lun 000059EC 279 UERRORNSL LABEL 059EC 600400AA 0 IMM 280 LD R0 XREQERNSL 059ED FE0E5988 281 JMP UERROR 282 283 * Insufficient authorization 000059EE 284 UERRORIAUT LABEL 059EE 600400A7 0 IMM 285 LD R0 XREQERIAUT 059EF FE0E5988 286 JMP UERROR 287 288 * trying to access an inhibited volume/port 000059F0 289 UERRORINHI LABEL 059F0 600400A9 0 IMM 290 LD R0 XREQERINHI 059F1 FE0E5988 291 JMP UERROR 292 293 * insufficient system resources 000059F2 294 UERRORISYR LABEL 059F2 60040093 0 IMM 295 LD R0 XREQERISYR 059F3 FE0E5988 296 JMP UERROR 297 298 * privilege not sufficient 000059F4 299 UERRORPNS LABEL 059F4 60040094 0 IMM 300 LD R0 XREQERPNS 059F5 FE0E5988 301 JMP UERROR 302 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1222 (XREQPROC) F 64 XREQ Processor 303 * Attempt to do a restricted XREQ 000059F6 304 UERRORURX LABEL 059F6 60840080 2 IMM 305 LD R2 XREQERILR 059F7 60C40000 3 IMM 306 LD R3 0 059F8 DC403589 307 CALLNP UERRSET 059F9 FE0E38CF 308 JMP XREQRETURN 309 * --- 310 108 INPUT NAMEPACK symbol packers 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1223 (NAMEPACK) F 65 String Parameter Packers 3 4 ********************************************************************************** 5 * * 6 * Symbols are packed using a base 40 multiply packing format. * 7 * See an above definition section for details. The following * 8 * definition of extensions has been made to aid packers by * 9 * signifying terminators. * 10 * * 11 ********************************************************************************** 12 00000000 ABS 13 PCSPACE EQU 0 code for space (a terminator) 0000000B ABS 14 PCAAA EQU 11 code for an A 00000024 ABS 15 PCZZZ EQU 36 code for a Z 00000028 ABS 16 PCRAD EQU 40 radix base 00000028 ABS 17 PCDOT EQU 40 a period 00000029 ABS 18 PCCOLON EQU 41 a colon 0000002A ABS 19 PCLPAREN EQU 42 a left paren. 0000002B ABS 20 PCRPAREN EQU 43 a right paren. 0000002C ABS 21 PCSLASH EQU 44 a slash 0000002D ABS 22 PCPLUS EQU 45 a plus sign 0000002E ABS 23 PCDOLLAR EQU 46 a dollar sign 0000002F ABS 24 PCLSQUAR EQU 47 a left square bracket 00000030 ABS 25 PCRSQUAR EQU 48 a right square bracket 00000031 ABS 26 PCDELIM EQU 49 a delimiter 00000032 ABS 27 PCLBROK EQU 50 a left broket ("<") 00000033 ABS 28 PCRBROK EQU 51 a right broket (">") 00000034 ABS 29 PCQUOTE EQU 52 a double quote 00000035 ABS 30 PCEOL EQU 53 end of line 00000036 ABS 31 PCO EQU 54 all other characters 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1224 (NAMEPACK) F 65 String Parameter Packers 33 34 BLOCK Symbol Packer Routines 35 36 ENTRY CONVTAB convert char to type code 37 ENTRY GETPKTEMP get and initialize temp area 38 ENTRY FIXEXTEN fixes up defaults 39 ENTRY PACKFS pack a whole file identifier 40 ENTRY PACKITEM pack a specifyier group 41 ENTRY PACKITEMI incre pntr then PACKITEM 42 ENTRY PACKNAME pack a single name 43 ENTRY SFTUPPKTMP shift up contents of temp block 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1225 (NAMEPACK) F 65 String Parameter Packers 45 46 ********************************************************************************** 47 * * 48 * Routine to get and initialize a symbol packer temp area. * 49 * * 50 * CALLNP GETPKTEMP * 51 * EQT => initialized temp block * 52 * Eats R0-R1. * 53 * Stack required = 2 * 54 * 1 + max ( SGETMEM (0), ZEROIT (1) ) * 55 * * 56 ********************************************************************************** 57 58 BLOCK GETPKTEMP subroutine 59 ENTRY GETPKTEMP 60 61 BEGFRAME 62 ENDFRAME 63 059FA DD5F8001 6 STAK 64 GETPKTEMP ENTRNP PUSH 059FB DC002ED0 65 CALL UGETMEM get some free storage 059FC 40440004 IMM 66 PARVL EQTEMPLOG log of the block size 059FD E4134000 0 5 REG 67 ST R0 EQT put address in safe place 059FE DC003090 68 CALL ZEROIT zero out the entire block 059FF 41160800 0 BASE 69 PAR R0,0 address of the block 05A00 40440010 IMM 70 PARVL 2 POWER EQTEMPLOG length in words 05A01 D1574803 5 BASE 71 STMW EQT,EQSYSTEM default system name 05A02 D1574808 5 BASE 72 STMW EQT,EQACCTPROJ default project name 05A03 D157480D 5 BASE 73 STMW EQT,EQFILEEXT default file extension 05A04 5D1F8001 6 STAK 74 LEAVE POP 75 * --- 76 77 END GETPKTEMP subroutine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1226 (NAMEPACK) F 65 String Parameter Packers 79 80 ********************************************************************************** 81 * * 82 * Routine to shift up the separate parts in the temp block. * 83 * * 84 * LD EQT =>temp block * 85 * CALLNP SFTUPPKTMP * 86 * returns with: R0-R1 mangled * 87 * rest unchanged * 88 * Stack required = 1 * 89 * * 90 ********************************************************************************** 91 92 BLOCK SFTUPPKTMP subroutine 93 ENTRY SFTUPPKTMP 94 95 BEGFRAME 96 ENDFRAME 97 05A05 DD5F8001 6 STAK 98 SFTUPPKTMP ENTRNP PUSH 05A06 6217480B 015 BASE 99 LD2 R0 EQT,EQFILENM 05A07 E2174806 015 BASE 100 EXCH2 R0 EQT,EQACCT 05A08 E6174801 015 BASE 101 ST2 R0 EQT,EQVOLUME 05A09 6017480D 0 5 BASE 102 LD R0 EQT,EQFILEEXT 05A0A E0174808 0 5 BASE 103 EXCH R0 EQT,EQACCTPROJ 05A0B E4174803 0 5 BASE 104 ST R0 EQT,EQSYSTEM 05A0C 6217480E 015 BASE 105 LD2 R0 EQT,EQFILEPW 05A0D E2174809 015 BASE 106 EXCH2 R0 EQT,EQACCTPW 05A0E E6174804 015 BASE 107 ST2 R0 EQT,EQVOLPW 05A0F EE17480B 5 BASE 108 STZ2 EQT,EQFILENM 05A10 EE17480E 5 BASE 109 STZ2 EQT,EQFILEPW 05A11 D157480D 5 BASE 110 STMW EQT,EQFILEEXT 05A12 5D1F8001 6 STAK 111 LEAVE POP 112 * --- 113 114 END SFTUPPKTMP subroutine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1227 (NAMEPACK) F 65 String Parameter Packers 116 117 ********************************************************************************** 118 * * 119 * This routine examines all of the extensions in the * 120 * packed block ( .SYSTEM, .PROJECT, and .EXT ) and converts * 121 * "unspecified" (all ones) to null (all zeros). This * 122 * routine is called after the caller has resolved all of * 123 * its own defaults and just before the block is used. * 124 * Call: * 125 * LD EQT => temp block * 126 * CALLNP FIXEXTEN * 127 * * 128 * mangles R0, rest unchanged * 129 * Stack required = 1 * 130 * * 131 ********************************************************************************** 132 133 BLOCK FIXEXTEN subroutine 134 ENTRY FIXEXTEN 135 136 BEGFRAME 137 ENDFRAME 138 05A13 DD5F8001 6 STAK 139 FIXEXTEN ENTRNP PUSH 05A14 60174803 0 5 BASE 140 LD R0 EQT,EQSYSTEM check the system name 05A15 FA2E5A17 0 141 JNEMW R0 FIXEXTEN1 jump if it has been specified 05A16 EC174803 5 BASE 142 STZ EQT,EQSYSTEM otherwise, set it null 00005A17 143 FIXEXTEN1 LABEL 05A17 60174808 0 5 BASE 144 LD R0 EQT,EQACCTPROJ check the project 05A18 FA2E5A1A 0 145 JNEMW R0 FIXEXTEN2 jump if it has been specified 05A19 EC174808 5 BASE 146 STZ EQT,EQACCTPROJ otherwise, set it null 00005A1A 147 FIXEXTEN2 LABEL 05A1A 6017480D 0 5 BASE 148 LD R0 EQT,EQFILEEXT get the file extension 05A1B FA2E5A1D 0 149 JNEMW R0 FIXEXTEN3 jump if it has been specified 05A1C EC17480D 5 BASE 150 STZ EQT,EQFILEEXT otherwise, set it to null 00005A1D 151 FIXEXTEN3 LABEL 05A1D 5D1F8001 6 STAK 152 LEAVE POP return 153 * --- 154 155 END FIXEXTEN subroutine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1228 (NAMEPACK) F 65 String Parameter Packers 157 158 ********************************************************************************** 159 * * 160 * Routine to fetch a character. Will fetch the character from * 161 * the memory of the XREQ instruction that made this request. This * 162 * also does not increment the character pointer. * 163 * * 164 * LD R4 => character * 165 * LD EQT => temp block * 166 * CALLNP GETCHAR * 167 * returns with: R2 = character * 168 * condition bits = COMPARE(R2,PCDOT) * 169 * rest unchanged * 170 * * 171 * Stack required = 1 * 172 * * 173 ********************************************************************************** 174 175 BLOCK GETCHAR subroutine 176 ENTRY CONVTAB 177 ENTRY GETCHAR 178 179 BEGFRAME 180 ENDFRAME 181 05A1E DD5F8001 6 STAK 182 GETCHAR ENTRNP PUSH 05A1F 60800412 2 183 LD R2 CPPSA 05A20 60889F11 2 2 ZBM 184 LD R2 R2,PSCACHNP1 05A21 5C08B211 2 ZBM 185 CMZ R2,CAMSR/MSRFRELOCB get relocation of caller 05A22 FE0C5A24 186 JNE NOTUSER jump if request from monitor 05A23 59840040 IMM 187 CLBMSR MSRFRELOC fetch the char from the user 00005A24 188 NOTUSER LABEL 05A24 60970000 2 4 CACH 189 LD R2 CACH R4,0 fetch the character 05A25 59C40040 IMM 190 IORMSR MSRFRELOC restore fetching from monitor 05A26 7884007F 2 IMM 191 AND R2 07F remove extra bit 05A27 5C094010 5 ZBM 192 CMZ EQT,CNTLPKFLG are control chars letters? 05A28 FE025A2D 193 JEQ NOCNTLSHFT jump if not 05A29 FA825A2D 2 194 JEQZ R2 NOCNTLSHFT null never shifts 05A2A 64840020 2 IMM 195 CPR R2 " " check for printing character 05A2B FE065A2D 196 JGE NOCNTLSHFT jump if not control char 05A2C 18840040 2 IMM 197 ADD R2 040 make alphabetic 00005A2D 198 NOCNTLSHFT LABEL 05A2D 60B45A49 2 2 @ 199 LD R2 CONVTAB(R2) get the code for the character 05A2E 64840028 2 IMM 200 CPR R2 PCDOT compare with the first terminator 05A2F D80BDA20 7 CBM 201 STPSR R7/FLDMODE/PSRCONDB return compare result to caller 05A30 5D1F8001 6 STAK 202 LEAVE POP 203 * --- 204 205 * conversion table - converts 7 bit ASCII to multiply pack code 00005A31 206 CONVT LABEL 05A31 00000036 207 VFD 6:PCO,PCO,PCO,PCO,PCO,PCO,PCO,PCO NUL-BEL 05A33 00000036 208 VFDB 6:PCO,PCDELIM,PCO,PCO,PCO,PCO,PCO,PCO BS-SI 05A34 00000036 209 VFDB 6:PCO,PCO,PCO,PCO,PCO,PCO,PCO,PCO DLE-ETB 05A36 00000036 210 VFDB 6:PCO,PCO,PCO,PCO,PCO,PCO,PCO,PCO CAN-US 05A37 00000036 211 VFDB 6:PCDELIM,37,PCQUOTE,PCO,PCDOLLAR,PCO,38,PCO !"#$%&' 05A38 0000002D 212 VFDB 6:PCLPAREN,PCRPAREN,PCO,PCPLUS ()*+ 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1229 (NAMEPACK) F 65 String Parameter Packers 05A39 0000002C 213 VFDB 6:PCDELIM,PCO,PCDOT,PCSLASH ,-./ 05A3A 00000008 214 VFDB 6:1,2,3,4,5,6,7,8 01234567 05A3C 00000036 215 VFDB 6:9,10,PCCOLON,PCO,PCLBROK,PCO,PCRBROK,PCO 89: <=>? 05A3D 00000011 216 VFDB 6:PCO,11,12,13,14,15,16,17 @ABCDEFG 05A3F 00000019 217 VFDB 6:18,19,20,21,22,23,24,25 HIJKLMNO 05A40 00000021 218 VFDB 6:26,27,28,29,30,31,32,33 PQRSTUVW 05A42 00000027 219 VFDB 6:34,35,36,PCLSQUAR,PCO,PCRSQUAR,PCO,39 XYZ[\]^_ 05A43 00000011 220 VFDB 6:PCO,11,12,13,14,15,16,17 `abcdefg 05A45 00000019 221 VFDB 6:18,19,20,21,22,23,24,25 hijklmno 05A46 00000021 222 VFDB 6:26,27,28,29,30,31,32,33 pqrstuvw 05A48 00000036 223 VFDB 6:34,35,36,PCO,PCO,PCO,PCO,PCO xyz{|}~ 224 BSS 0 225 05A49 01885A31 226 CONVTP PTR CONVT/BITS 0:5 00105A49 @ 227 CONVTAB EQU @CONVTP 228 229 END GETCHAR subroutine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1230 (NAMEPACK) F 65 String Parameter Packers 231 232 ********************************************************************************** 233 * * 234 * Routine to pack name or number. The number packed is decimal * 235 * unless the first digit is a zero in which case it is packed as hex. * 236 * * 237 * LD R4 => character * 238 * CALLNP PACKNAME * 239 * return1: error in format: R0 = BFN - bad first char * 240 * BFN - memory wrap around * 241 * return2: R0-R1 = symbol or number * 242 * R2 = code for terminating char * 243 * R3 = item type (0=nothing, 1=symbol, 2=number) * 244 * R4 => terminating char * 245 * R5-R7 unchanged * 246 * Stack required = 4 * 247 * 2 + max ( GETCHAR (1), PACKEXTP (2) ) * 248 * * 249 ********************************************************************************** 250 251 BLOCK PACKNAME subroutine 252 ENTRY PACKNAME 253 254 BEGFRAME 00178801 6 BASE 255 PACKNAMET BSS 1 temp 256 ENDFRAME 257 05A4A DD5F8002 6 STAK 258 PACKNAME ENTRNP PUSH 05A4B 62040000 01 IMM 259 LD2 R0 0 embryo number or name 05A4C DC405A1E 260 CALLNP GETCHAR get the first char 05A4D FE065A5B 261 JGE NULLITEM term already - null name 05A4E 6484000B 2 IMM 262 CPR R2 PCAAA could this be a number? 05A4F FE085A5E 263 JLT PACKNUM jump if number to pack 264 * \ / 265 266 * Pack the name into two PAK6 words and then combine them 05A50 DC405A6F 267 CALLNP PACKEXTP pack up 6 characters 05A51 E4178801 0 6 BASE 268 ST R0 SP,PACKNAMET save the packed word 05A52 DC405A6F 269 CALLNP PACKEXTP pack up another 6 characters 05A53 60520000 1 0 REG 270 LD R1 R0 move the second 6 05A54 60178801 0 6 BASE 271 LD R0 SP,PACKNAMET retrieve the first 6 272 * \ / 273 274 * Ignore characters after the end of the filename -- search for term 05A55 60C40001 3 IMM 275 LD R3 1 symbol packed 00005A56 276 IGNORXTRA LABEL 05A56 DC405A1E 277 CALLNP GETCHAR 05A57 FE065A6B 278 JGE PACKEXIT search for term 05A58 D00B1F30 4 CBM 279 INC R4/FLDCHARS move to next char 05A59 FB305A6D 4 280 JZA R4 TOOLONG check for wrap around 05A5A FE0E5A56 281 JMP IGNORXTRA 282 * --- 283 284 * terminator first found - return nothing 285 00005A5B 286 NULLITEM LABEL 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1231 (NAMEPACK) F 65 String Parameter Packers 05A5B 62040000 01 IMM 287 LD2 R0 0 item is not here 05A5C 60C40000 3 IMM 288 LD R3 0 type is 'nothing' 05A5D FE0E5A6B 289 JMP PACKEXIT return 290 * --- 291 292 * Number to pack 00005A5E 293 PACKNUM LABEL 05A5E 60C4000A 3 IMM 294 LD R3 10 default radix... 05A5F 64840001 2 IMM 295 CPR R2 1 ...unless first char... 05A60 FE0C5A62 296 JNE PACKDIG 05A61 60C40010 3 IMM 297 LD R3 16 ...is a zero 00005A62 298 PACKDIG LABEL 05A62 1E12C000 013 REG 299 MUL2 R0 R3 multiply existing number by radix 05A63 10840001 2 IMM 300 SUB R2 1 subtract the pack6 bias 05A64 1A128000 012 REG 301 ADD2 R0 R2 merge in new digit 05A65 D00B1F30 4 CBM 302 INC R4/FLDCHARS move over packed char 05A66 DC405A1E 303 CALLNP GETCHAR get the next char 05A67 FE065A6A 304 JGE PACKDONE jump if OK pack 05A68 6492C000 2 3 REG 305 CPR R2 R3 is char within radix? 05A69 FE0A5A62 306 JLE PACKDIG jump if so -- pack it in 00005A6A 307 PACKDONE LABEL 05A6A 60C40002 3 IMM 308 LD R3 2 indicate that a number was packed 309 * \ / Normal exit -- make a return two 00005A6B 310 PACKEXIT LABEL 05A6B 19C40001 7 IMM 311 ADD R7 1 make a skip return 05A6C 5D1F8002 6 STAK 312 LEAVE POP 313 * --- 314 315 * Error -- memory wrapped around when ignoring trailer chars 00005A6D 316 TOOLONG LABEL 05A6D 6004008F 0 IMM 317 LD R0 XREQERBFN error=gross FUBAR 05A6E 5D1F8002 6 STAK 318 LEAVE POP 319 * --- 320 321 END PACKNAME subroutine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1232 (NAMEPACK) F 65 String Parameter Packers 323 324 ********************************************************************************** 325 * * 326 * Routine to pack the extension -- packs 6 chars * 327 * * 328 * LD R4 => first char * 329 * CALLNP PACKEXTP * 330 * returns: R0 = packed thing * 331 * R1, R3 mangled * 332 * R4 => char after last packed (or to term) * 333 * rest unchanged * 334 * * 335 * Stack required = 2 * 336 * 1 + max( GETCHAR (1) ) * 337 * * 338 ********************************************************************************** 339 340 BLOCK PACKEXTP subroutine 341 ENTRY PACKEXTP 342 343 BEGFRAME 344 ENDFRAME 345 05A6F DD5F8001 6 STAK 346 PACKEXTP ENTRNP PUSH 05A70 60040000 0 IMM 347 LD R0 0 05A71 60C7FFFA 3 IMM 348 LD R3 -6 count of chars to pack 00005A72 349 PKEXTLOOP LABEL 05A72 DC405A1E 350 CALLNP GETCHAR get a char 05A73 FE065A76 351 JGE PKEXTFILL jump if term -- pad spaces 05A74 D00B1F30 4 CBM 352 INC R4/FLDCHARS move pntr past good char 05A75 FE0E5A77 353 JMP PKEXTOK 354 * --- 355 00005A76 356 PKEXTFILL LABEL 05A76 60840000 2 IMM 357 LD R2 PCSPACE pad with spaces 00005A77 358 PKEXTOK LABEL 359 * note that carry is cleared on entry 360 * and nothing will set it (ADD or INC) 05A77 58C40010 IMM 361 IORPSR PSRMODIF turn on unsigned arithmetic 05A78 1C040028 0 IMM 362 MUL R0 PCRAD pack up by radix base 05A79 18528000 1 2 REG 363 ADD R1 R2 merge in new char 364 * use MODIF in case this char makes result negative 05A7A 58840010 IMM 365 CLBPSR PSRMODIF restore normal arithmetic 05A7B 60124000 0 1 REG 366 LD R0 R1 get right half of product 05A7C FAE05A72 3 367 IRJ R3 PKEXTLOOP loop until 6 packed 05A7D 5D1F8001 6 STAK 368 LEAVE POP 369 * --- 370 371 END PACKEXTP subroutine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1233 (NAMEPACK) F 65 String Parameter Packers 373 374 ********************************************************************************** 375 * * 376 * Routine to pack specifying items of the form: * 377 * * 378 * * 379 * or * 380 * * 381 * where is a decimal or hexadecimal (the latter if the * 382 * first char is a zero) number * 383 * is a zero to twelve character symbol beginning * 384 * with an alphabetic char and terminated by a * 385 * char outside the 40 char multiply pack set * 386 * (except that a space is a terminator too). Lower * 387 * case chars are converted to upper case to use. * 388 * is either the char dot (".") followed by zero * 389 * to six char symbol made up of chars from the 40 * 390 * char multiply pack set (except space is a term). * 391 * The following other extensions cannot be followed * 392 * by a . They have the form: * 393 * symbol same as writing * 394 * ------ --------------- * 395 * + .!!!: * 396 * $$$ .SYS: * 397 * $$ .ddd: ("ddd" is division) * 398 * $ .dddppp: (project) * 399 * if of the form "()" except that control * 400 * chars are not terminators but are converted to * 401 * alphabetic chars (040 is added). * 402 * * 403 * LD R4 => first char to pack * 404 * LD EQT => pack temp area * 405 * CALLNP PACKITEM * 406 * R0 = error code: * 407 * BFN - bad first name char * 408 * WPT - closing paren. missing on password* 409 * BFN - memory wrap around when scanning * 410 * R0-R3 mangled * 411 * R4 => terminating char * 412 * R2 = terminating char * 413 * rest unchanged * 414 * contents of the temp block have been shifted up * 415 * once and the packed item is at the bottom. * 416 * Stack required = 5. * 417 * 1 + max( GETCHAR (1), PACKEXTP (2), PACKNAME (4), * 418 * SFTUPPKTMP(1) ) * 419 * * 420 ********************************************************************************** 421 422 BLOCK PACKITEM and PACKITEMI subroutine 423 ENTRY PACKITEM 424 ENTRY PACKITEMI 425 426 BEGFRAME 427 ENDFRAME 428 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1234 (NAMEPACK) F 65 String Parameter Packers 05A7E DD5F8001 6 STAK 429 PACKITEM ENTRNP PUSH 00005A7F 430 PKITMSHAR LABEL 05A7F DC405A05 431 CALLNP SFTUPPKTMP shift up the last packing 05A80 EC094010 5 ZBM 432 STZ EQT,CNTLPKFLG control characters terminate 05A81 DC405A4A 433 CALLNP PACKNAME get the first part 05A82 FE0E5AB9 434 JMP PKITMERR jump if not good 05A83 E617480B 015 BASE 435 ST2 R0 EQT,EQFILENM store packed name 05A84 64840028 2 IMM 436 CPR R2 PCDOT a dot extension? 05A85 FE025A97 437 JEQ PIDOTEXT jump if so 05A86 6484002D 2 IMM 438 CPR R2 PCPLUS system extension? 05A87 FE025A9F 439 JEQ PIPLUSEXT 05A88 6484002E 2 IMM 440 CPR R2 PCDOLLAR project relative extension? 05A89 FE025AA3 441 JEQ PIDOLEXT 442 * \ / 443 444 * try to pack the password -- check for the leading paren. 00005A8A 445 PITRYPW LABEL 05A8A 6484002A 2 IMM 446 CPR R2 PCLPAREN maybe password then? 05A8B FE0C5A95 447 JNE PIOKEXIT jump if not 05A8C D00B1F30 4 CBM 448 INC R4/FLDCHARS move to next good char 05A8D EDC94010 5 ZBM 449 STW EQT,CNTLPKFLG make control chars letters 05A8E DC405A4A 450 CALLNP PACKNAME get the password 05A8F FE0E5AB9 451 JMP PKITMERR jump if it didn't work 05A90 E617480E 015 BASE 452 ST2 R0 EQT,EQFILEPW store the password 05A91 6484002B 2 IMM 453 CPR R2 PCRPAREN proper term paren? 05A92 FE0C5AB8 454 JNE PKITMPWER jump if bad format 05A93 D00B1F30 4 CBM 455 INC R4/FLDCHARS move over that term 05A94 DC405A1E 456 CALLNP GETCHAR get the char after 00005A95 457 PIOKEXIT LABEL 05A95 19C40001 7 IMM 458 ADD R7 1 success does a skip return 05A96 5D1F8001 6 STAK 459 LEAVE POP 460 * --- 461 462 ********************************************************************************** 463 * * 464 * A dot followed the main name item. Pack the extension thereafter * 465 * * 466 ********************************************************************************** 467 00005A97 468 PIDOTEXT LABEL 05A97 D00B1F30 4 CBM 469 INC R4/FLDCHARS move past the dot 05A98 DC405A6F 470 CALLNP PACKEXTP get the extension 05A99 E417480D 0 5 BASE 471 ST R0 EQT,EQFILEEXT store the packed extension 00005A9A 472 IGNORXEXT LABEL 05A9A DC405A1E 473 CALLNP GETCHAR get the term char 05A9B FE065A8A 474 JGE PITRYPW if term try for the password 05A9C D00B1F30 4 CBM 475 INC R4/FLDCHARS move off the non-term 05A9D FB305ABA 4 476 JZA R4 PKITMWRAP jump if memory wrap around 05A9E FE0E5A9A 477 JMP IGNORXEXT loop til terminator 478 * --- 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1235 (NAMEPACK) F 65 String Parameter Packers 480 481 ********************************************************************************** 482 * * 483 * Plus sign extension. Assume ".!!!:" * 484 * * 485 ********************************************************************************** 486 00005A9F 487 PIPLUSEXT LABEL 05A9F 60002551 0 488 LD R0 DOTBTI ".!!!" 00005AA0 489 PISTOREXT LABEL 05AA0 E417480D 0 5 BASE 490 ST R0 EQT,EQFILEEXT use this as our extension 05AA1 60840029 2 IMM 491 LD R2 PCCOLON fake like terminator was colon 05AA2 FE0E5A95 492 JMP PIOKEXIT 493 * --- 494 495 ********************************************************************************** 496 * * 497 * Dollar sign extension. Count the number of dollar signs * 498 * and pick up the proper extension. * 499 * * 500 ********************************************************************************** 501 00005AA3 502 PIDOLEXT LABEL 05AA3 60C00412 3 503 LD R3 CPPSA get pointer to users PSA 05AA4 60C8DF14 3 3 ZBM 504 LD R3 R3,PSDFLTDIR need pointer to limit block 05AA5 6016C804 0 3 BASE 505 LD R0 R3,ULACCPROJ one dollar sez own 05AA6 60530000 1 4 REG 506 LD R1 R4 save pointer to this terminator 05AA7 D00B1F30 4 CBM 507 INC R4/FLDCHARS move to next char 05AA8 DC405A1E 508 CALLNP GETCHAR get it 05AA9 6484002E 2 IMM 509 CPR R2 PCDOLLAR is it also a dollar sign? 05AAA FE0C5AB6 510 JNE PIDOLBKUP no -- go back to the last char 05AAB 600A0170 0 0 CBM 511 LD R0 R0/DVSNPART1 extract less the power of two part 05AAC 1404007D 0 IMM 512 DIV R0 DVSNPART2 remove the remaining factors 05AAD 1C04007D 0 IMM 513 MUL R0 DVSNPART2 okay, now put back without the project part 05AAE 600A1200 0 0 CBM 514 LD R0 R0*DVSNPART1 05AAF 60530000 1 4 REG 515 LD R1 R4 save the position of this dollar 05AB0 D00B1F30 4 CBM 516 INC R4/FLDCHARS try the char after 05AB1 DC405A1E 517 CALLNP GETCHAR 05AB2 6484002E 2 IMM 518 CPR R2 PCDOLLAR a third dollar sign? 05AB3 FE0C5AB6 519 JNE PIDOLBKUP no -- back up to the last 05AB4 60002555 0 520 LD R0 DOTSYS three dollar sez public 05AB5 FE0E5AA0 521 JMP PISTOREXT 522 * --- 523 524 ********************************************************************************** 525 * * 526 * The next character is not a dollar sign. Back up to the * 527 * last dollar sign and use the current extension. * 528 * * 529 ********************************************************************************** 530 00005AB6 531 PIDOLBKUP LABEL 05AB6 E4530000 1 4 REG 532 ST R1 R4 back up 05AB7 FE0E5AA0 533 JMP PISTOREXT R0 = extension so far 534 * --- 535 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1236 (NAMEPACK) F 65 String Parameter Packers 536 537 ********************************************************************************** 538 * * 539 * An error -- code is in R0 so do a return 1. * 540 * * 541 ********************************************************************************** 542 543 * Password does not have the terminating paren. 00005AB8 544 PKITMPWER LABEL 05AB8 60040098 0 IMM 545 LD R0 XREQERWPT the code for the error 546 * \ / 00005AB9 547 PKITMERR LABEL 05AB9 5D1F8001 6 STAK 548 LEAVE POP return one 549 * --- 550 551 * When searching for end of symbol memory wrapped around 00005ABA 552 PKITMWRAP LABEL 05ABA 6004008F 0 IMM 553 LD R0 XREQERBFN the code for wrapping around 05ABB FE0E5AB9 554 JMP PKITMERR 555 * --- 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1237 (NAMEPACK) F 65 String Parameter Packers 557 558 ********************************************************************************** 559 * * 560 * A call to the pack item routine that increments the character * 561 * position pointer before packing. * 562 * * 563 ********************************************************************************** 564 05ABC DD5F8001 6 STAK 565 PACKITEMI ENTRNP PUSH 05ABD D00B1F30 4 CBM 566 INC R4/FLDCHARS increment the pointer 05ABE FE0E5A7F 567 JMP PKITMSHAR share the rest of the code 568 * --- 569 570 END PACKITEM and PACKITEMI subroutines 571 572 ********************************************************************************** 573 * * 574 * PACKFS. This routine packs a file specifier into an EQT block. * 575 * Call: * 576 * LD EQT => initialized EQT block * 577 * LD R4 => first character (uses GETCHAR which goes via addr space)* 578 * CALLNP PACKFS * 579 * JMP error (R0 = code) * 580 * ST R4 => terminating character * 581 * ST R2 the terminating character * 582 * * 583 * Eats R0:R3 * 584 * Stack required = 6 * 585 * 1 + max ( PACKITEM (5), PACKITEMI (5) ) * 586 * * 587 ********************************************************************************** 588 589 BLOCK 590 ENTRY PACKFS 591 592 BEGFRAME 593 ENDFRAME 594 05ABF DD5F8001 6 STAK 595 PACKFS ENTRNP PUSH 05AC0 DC405A7E 596 CALLNP PACKITEM pack first part 05AC1 FE0E5ACB 597 JMP BADRTN bad!! (R0 = code) 05AC2 64840029 2 IMM 598 CPR R2 PCCOLON was term a colon? 05AC3 FE0C5ACA 599 JNE OKRTN if not - name is done 05AC4 DC405ABC 600 CALLNP PACKITEMI pack next part 05AC5 FE0E5ACB 601 JMP BADRTN bad (R0 = code) 05AC6 64840029 2 IMM 602 CPR R2 PCCOLON is a third part here? 05AC7 FE0C5ACA 603 JNE OKRTN jump if not 05AC8 DC405ABC 604 CALLNP PACKITEMI pack last part 05AC9 FE0E5ACB 605 JMP BADRTN 05ACA 19C40001 7 IMM 606 OKRTN ADD R7 1 skip to success return 05ACB 5D1F8001 6 STAK 607 BADRTN LEAVE POP 608 * --- 609 610 END of PACKFS 611 612 END Symbol Packer Routines 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1238 (DATESTUFF) F 66 String Parameter Packers 109 INPUT DATESTUFF system date packers and unpackers 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1239 (DATESTUFF) F 66 System date packers and unpackers 3 BLOCK Date Conversion Routines 4 5 ENTRY UNPACKDATE convert 44 bits into calander fields 6 ENTRY PACKDATE convert calander fields into 44 bits 7 8 ********************************************************************************** 9 * * 10 * The system time form (44 bits counting milliseconds from 0000z * 11 * 17 Nov 1858) is not easy to convert to and from calendar fields * 12 * (month, day, year) so these routines work that magic on the date * 13 * to convert calendar fields into the 44 bit system date (PackDate) * 14 * and to convert the 44 bit system number into calendar fields (UnPackDate). * 15 * * 16 ********************************************************************************** 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1240 (DATESTUFF) F 66 System date packers and unpackers 18 19 ********************************************************************************** 20 * * 21 * UNPACKDATE. Routine that will unpack a 44 bit system date into calender * 22 * fields. Any time zone adjustment must be done before the call. * 23 * Call: * 24 * * 25 * CALL UNPACKDATE * 26 * PARV2 * 27 * PAR * 28 * PAR * 29 * PAR * 30 * PAR * 31 * PARL * 32 * * 33 * Eats R0:R3. * 34 * Stack required = 9. * 35 * * 36 ********************************************************************************** 37 38 BLOCK UNPACKDATE subroutine 39 ENTRY UNPACKDATE convert 44 bits into calendar fields 40 41 BEGFRAME 00178801 6 BASE 42 THEDATE BSS 2 the 44 bit system date 00178803 6 BASE 43 MILLI BSS 1 place to put milliseconds 00178804 6 BASE 44 DAYOFWEEK BSS 1 place for day of week (SUN=0) 00178805 6 BASE 45 DATE BSS 1 place for date in month 00178806 6 BASE 46 MONTH BSS 1 place for month (JAN=1) 00178807 6 BASE 47 YEAR BSS 1 place for year 00178808 6 BASE 48 TEMP BSS 1 temp 49 ENDFRAME 50 05ACC DD1F8009 6 STAK 51 UNPACKDATE ENTR PUSH 05ACD C3578801 6 BASE 52 STPV2 SP,THEDATE the 44 bit system date 05ACE C1178803 6 BASE 53 STP SP,MILLI place for milliseconds in today 05ACF C1178805 6 BASE 54 STP SP,DATE place for the date in month 05AD0 C1178806 6 BASE 55 STP SP,MONTH place for month (JAN=1) 05AD1 C1178807 6 BASE 56 STP SP,YEAR place for year 05AD2 C0178804 6 BASE 57 STPL SP,DAYOFWEEK place for day of week 58 05AD3 62178801 016 BASE 59 LD2 R0 SP,THEDATE get the passed date 05AD4 58C40010 IMM 60 IORPSR PSRMODIF use modify arithmetic 05AD5 14005B38 0 61 DIV R0 ONEDAYINMS make day count in R0 05AD6 E4578C03 1 6 FPVR 62 ST R1 @(SP,MILLI) save time of day from R1 05AD7 E4178808 0 6 BASE 63 ST R0 SP,TEMP save the day count 05AD8 62161003 010 REG 64 LD2 R0 R0+3 make double for divide, make wednesdays=3 05AD9 14040007 0 IMM 65 DIV R0 7 divide by days/week 05ADA E4578C04 1 6 FPVR 66 ST R1 @(SP,DAYOFWEEK) save the day of the week 05ADB 58840010 IMM 67 CLBPSR PSRMODIF repeal modify arithmetic 05ADC 60178808 0 6 BASE 68 LD R0 SP,TEMP retrieve day count 05ADD 60440018 1 IMM 69 LD R1 TABLE1SZ-1 get size of century table 00005ADE 70 T1LOOP LABEL 05ADE 64225B12 0 1 71 CPR R0 TABLE1(R1) check this entry 05ADF FE065AE1 72 JGE THISENTRY jump if proper century found 05AE0 FA665ADE 1 73 JDR R1 T1LOOP count down to proper century 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1241 (DATESTUFF) F 66 System date packers and unpackers 74 * --- 75 00005AE1 76 THISENTRY LABEL found century entry in table 05AE1 10225B12 0 1 77 SUB R0 TABLE1(R1) make day of century 05AE2 1C440064 1 IMM 78 MUL R1 100 convert century table index to integer year 05AE3 E4578C07 1 6 FPVR 79 ST R1 @(SP,YEAR) this will be updated from time to time 05AE4 58C40010 IMM 80 IORPSR PSRMODIF use modify arithmetic again 05AE5 62120000 010 REG 81 LD2 R0 R0 place in proper starting registers 05AE6 140405B5 0 IMM 82 DIV R0 365*4+1 make into four year chunks 05AE7 58840010 IMM 83 CLBPSR PSRMODIF repeal marth 05AE8 1C040004 0 IMM 84 MUL R0 4 make quotient back into proper year 05AE9 98178C07 0 6 FPVR 85 ADDM R0 @(SP,YEAR) update the year to the nearest leap year 05AEA 58C40010 IMM 86 IORPSR PSRMODIF again 05AEB 60040000 0 IMM 87 LD R0 0 clear the upper half, lower=remainder 05AEC 1404016D 0 IMM 88 DIV R0 365 get which year of group of four 05AED 58840010 IMM 89 CLBPSR PSRMODIF repeal marth 05AEE 64040004 0 IMM 90 CPR R0 4 check for leap day 05AEF FE0C5AF2 91 JNE NOTLEAR jump if not 05AF0 60040003 0 IMM 92 LD R0 3 leap day is last day of third year 05AF1 6044016D 1 IMM 93 LD R1 365 so fix registers 00005AF2 94 NOTLEAR LABEL 05AF2 98178C07 0 6 FPVR 95 ADDM R0 @(SP,YEAR) advance year to the current 'fake' year 05AF3 6084000E 2 IMM 96 LD R2 TABLE2SZ-1 get size of month table 00005AF4 97 T2LOOP LABEL 05AF4 64645B28 1 2 98 CPR R1 TABLE2(R2) check for down to proper month yet 05AF5 FE045AF7 99 JGT THISMONTH jump if we have arrived at proper month 05AF6 FAA65AF4 2 100 JDR R2 T2LOOP continue search for right month 101 * --- 102 00005AF7 103 THISMONTH LABEL 05AF7 10645B28 1 2 104 SUB R1 TABLE2(R2) subtract off prior days 05AF8 E4578C05 1 6 FPVR 105 ST R1 @(SP,DATE) save day of month 05AF9 6484000C 2 IMM 106 CPR R2 12 check for into Jan or Feb of 'fake' year 05AFA FE0A5AFD 107 JLE MONTHOK if not, the month number is okay 05AFB 1084000C 2 IMM 108 SUB R2 12 otherwise, fix for Jan=1 05AFC D0178C07 6 FPVR 109 INC @(SP,YEAR) also, fix up the year 00005AFD 110 MONTHOK LABEL 05AFD E4978C06 2 6 FPVR 111 ST R2 @(SP,MONTH) save the month number 05AFE 5D1F8009 6 STAK 112 LEAVE POP 113 * --- 114 115 END UNPACKDATE subroutine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1242 (DATESTUFF) F 66 System date packers and unpackers 117 118 ********************************************************************************** 119 * * 120 * PACKDATE. This routine takes calender fields and converts them * 121 * into the 44 bit system time code. The system time is returned * 122 * right justified in 64 bits. * 123 * Call: * 124 * * 125 * CALL PACKDATE * 126 * PAR2 * 127 * PARV * 128 * PARV * 129 * PARV * 130 * PARVL * 131 * * 132 * Eats R0:R3. * 133 * Stack required = 8. * 134 * * 135 ********************************************************************************** 136 137 BLOCK PACKDATE subroutine 138 ENTRY PACKDATE 139 140 BEGFRAME 00178801 6 BASE 141 THEDATE BSS 2 the 44 bit system date 00178803 6 BASE 142 MILLI BSS 1 place to put milliseconds 00178804 6 BASE 143 DATE BSS 1 place for date in month 00178805 6 BASE 144 MONTH BSS 1 place for month (JAN=1) 00178806 6 BASE 145 YEAR BSS 1 place for year 00178807 6 BASE 146 TEMP BSS 1 temp 147 ENDFRAME 148 05AFF DD1F8008 6 STAK 149 PACKDATE ENTR PUSH 05B00 C3178801 6 BASE 150 STP2 SP,THEDATE the 44 bit system date 05B01 C1578803 6 BASE 151 STPV SP,MILLI milliseconds in today 05B02 C1578804 6 BASE 152 STPV SP,DATE the date in month 05B03 C1578805 6 BASE 153 STPV SP,MONTH month (JAN=1) 05B04 C0578806 6 BASE 154 STPVL SP,YEAR year 155 05B05 60040000 0 IMM 156 LD R0 0 05B06 60578806 1 6 BASE 157 LD R1 SP,YEAR R0,R1=year 05B07 60978805 2 6 BASE 158 LD R2 SP,MONTH r2=month 05B08 64840002 2 IMM 159 CPR R2 2 check against february 05B09 FE045B0C 160 JGT LATERPART jump if later in year 05B0A 10440001 1 IMM 161 SUB R1 1 use earlier year 05B0B 1884000C 2 IMM 162 ADD R2 12 make it up in months 163 * this makes years start on MAR 1 164 * to make leap year processing reasonable 00005B0C 165 LATERPART LABEL 05B0C 58C40010 IMM 166 IORPSR PSRMODIF set up for funny arithmetic 05B0D 14040064 0 IMM 167 DIV R0 100 separate century and year 05B0E 58840010 IMM 168 CLBPSR PSRMODIF restore normal math 169 * R0 = century, R1 = year 05B0F 60205B12 0 0 170 LD R0 TABLE1(R0) get first day in century 05B10 E4178807 0 6 BASE 171 ST R0 SP,TEMP save for later 05B11 60040000 0 IMM 172 LD R0 0 get sign extension 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1243 (DATESTUFF) F 66 System date packers and unpackers 05B12 58C40010 IMM 173 IORPSR PSRMODIF set funny arithmetic 05B13 14040004 0 IMM 174 DIV R0 4 div by 4 years (repeat interval of leap years) 05B14 58840010 IMM 175 CLBPSR PSRMODIF restore normalcy 176 * R0 = group of 4, R1 = 0-3 05B15 1C0405B5 0 IMM 177 MUL R0 4*365+1 convert group of four to day count 05B16 98178807 0 6 BASE 178 ADDM R0 SP,TEMP update day count 05B17 1C44016D 1 IMM 179 MUL R1 365 convert the other to days 05B18 18645B28 1 2 180 ADD R1 TABLE2(R2) add number of days up to current month 05B19 18578804 1 6 BASE 181 ADD R1 SP,DATE add day of month 05B1A 18578807 1 6 BASE 182 ADD R1 SP,TEMP get the total day count 05B1B 1C440018 1 IMM 183 MUL R1 24 make day count into hours 05B1C 58C40010 IMM 184 IORPSR PSRMODIF set funny arithmetic 05B1D 1C405B37 1 185 MUL R1 ONEHOURMS make hour count into milliseconds 05B1E 58840004 IMM 186 CLBPSR PSRCARRY clear the carry bit 05B1F 18978803 2 6 BASE 187 ADD R2 SP,MILLI add in the time of day 05B20 18440000 1 IMM 188 ADD R1 0 add carry if present 05B21 58840010 IMM 189 CLBPSR PSRMODIF restore normalcy 05B22 E6578C01 126 FPVR 190 ST2 R1 @(SP,THEDATE) store time back to user 05B23 5D1F8008 6 STAK 191 LEAVE POP 192 * --- 193 194 END PACKDATE subroutine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1244 (DATESTUFF) F 66 System date packers and unpackers 196 197 ********************************************************************************** 198 * TABLE 1 * 199 * This table gives the day count for each century year * 200 * 1 March. It is used to reduce the day count down to a * 201 * hundred year range, with the (maybe) leap year at the end. * 202 ********************************************************************************** 203 00008EAC ABS 204 DAYSPCEN EQU 36524 days in a normal century 00003AE7 ABS 205 MAR1900 EQU 15079 day count to 0000Z 1 Mar, 1900 206 00005B24 207 CENTABLE BSS 0 00005B12 208 TABLE1 EQU CENTABLE(-18) referenced to 0 A.D. 05B24 FFFFAC3B 209 VFD MAR1900-DAYSPCEN 0000Z 1 Mar, 1800 05B25 00003AE7 210 VFD MAR1900 0000Z 1 Mar, 1900 05B26 0000C994 211 VFD MAR1900+DAYSPCEN+1 0000Z 1 Mar, 2000 05B27 00015840 212 VFD MAR1900+2*DAYSPCEN+1 0000Z 1 Mar, 2100 05B28 0001E6EC 213 VFD MAR1900+3*DAYSPCEN+1 0000Z 1 Mar, 2200 05B29 00027598 214 VFD MAR1900+4*DAYSPCEN+1 0000Z 1 Mar, 2300 05B2A 00030445 215 VFD MAR1900+5*DAYSPCEN+2 0000Z 1 Mar, 2400 00000019 ABS 216 TABLE1SZ EQU DISPW TABLE1 217 218 ********************************************************************************** 219 * TABLE 2 * 220 * This simple minded table is used to reduce the julian * 221 * date (day within year) to a month and day. It starts out * 222 * with -1 because people are absurd enough to call the * 223 * zeroth day of a month by number 1. * 224 ********************************************************************************** 225 00005B2B 226 DAYTAB BSS 0 00005B28 227 TABLE2 EQU DAYTAB(-3) referenced to Mar=3 05B2B FFFFFFFF 228 VFD -1 March (31) 05B2C 0000001E 229 VFD 30 April (30) 05B2D 0000003C 230 VFD 60 May (31) 05B2E 0000005B 231 VFD 91 June (30) 05B2F 00000079 232 VFD 121 July (31) 05B30 00000098 233 VFD 152 Aug (31) 05B31 000000B7 234 VFD 183 Sept (30) 05B32 000000D5 235 VFD 213 Oct (31) 05B33 000000F4 236 VFD 244 Nov (30) 05B34 00000112 237 VFD 274 Dec (31) 05B35 00000131 238 VFD 305 Jan (31) 05B36 00000150 239 VFD 336 Feb (28) 0000000F ABS 240 TABLE2SZ EQU DISPW TABLE2 241 05B37 0036EE80 242 ONEHOURMS VFD 60*60*1000 one hour in milliseconds 05B38 05265C00 243 ONEDAYINMS VFD 24*60*60*1000 one day in milliseconds 244 245 END Date Conversion Routines 110 INPUT XREQUTIL misc XREQ utilities 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1245 (XREQUTIL) F 67 Assorted Utility Routines 3 4 BLOCK Assorted Utility Routines 5 6 ENTRY ACCESSMASK modify mask depending on privilege 7 ENTRY ACCTALIAS log an account alias or unalias 8 ENTRY ACCTFILLOG log a file access 9 ENTRY ACCTPSA fill accounting record from PSA 10 ENTRY ACCTULB fill accounting record from ULB 11 ENTRY CHECK4CM see if CM unit being used by user 12 ENTRY CLRMEMTRAP remove VMF error address 13 ENTRY LEVELBIT get privilege of acct over another 14 ENTRY LEVELMASK get account relationship of 2 accts. 15 ENTRY LUNSEARCH find FCB given unit number 16 ENTRY LUNSEARCHX find FCB given unit number 17 ENTRY MAXPRIV find the best of two privs 18 ENTRY PASSERRUP pass a VMF error up one level 19 ENTRY PASSERRW1 pass a VMF error up one level (GRUBWNDO1) 20 ENTRY PRIV2MACCT see if priv to mod acct (MOD, BKUP) 21 ENTRY PRIV2MOD see if priv to change (RW, MOD, BKUP) 22 ENTRY SETMEMTRAP set virtual memory failure error addr. 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1246 (XREQUTIL) F 67 Assorted Utility Routines 24 25 ********************************************************************************** 26 * * 27 * LUNSEARCH. * 28 * * 29 * This routine searches the unit lists of the current * 30 * underprocess (on the PSA and UPC) for the UCE corresponding * 31 * to the specified unit number. It returns not the UCE, but * 32 * the FCB address for that unit. * 33 * * 34 * LUNSEARCH ensures that the current process is CM if the * 35 * unit is in the high CM range (210 or up). This routine is * 36 * the normal one called for finding a unit. It allows user * 37 * access to units 201:209, so it is called from routines that * 38 * implement 'read' type access when such access is appropriate * 39 * to the absolute input unit. See LUNSEARCHX for a more * 40 * restrictive access. * 41 * Call: * 42 * LD R3 unit number * 43 * CALLNP LUNSEARCH * 44 * * 45 * * 46 * * 47 * Sets FCB (R5). * 48 * Eats nothing. * 49 * Stack required = 2 * 50 * * 51 ********************************************************************************** 52 53 BLOCK LUNSEARCH subroutine 54 ENTRY LUNSEARCH to look for a given UNIT (209 or less) 55 ENTRY LUNSEARCHX to look for a given UNIT (200 or less) 56 57 BEGFRAME 00178801 6 BASE 58 LUNSRCHLUN BSS 1 stack place for lun number 59 ENDFRAME 60 05B39 DD5F8002 6 STAK 61 LUNSEARCH ENTRNP PUSH 05B3A 78C5FFFF 3 IMM 62 AND R3 ONEBITS/FLDADRS remove garbage bits 05B3B E4D78801 3 6 BASE 63 ST R3 SP,LUNSRCHLUN save original number 05B3C 64C400D2 3 IMM 64 CPR R3 LUNCMCNTL is this a control mode lun? 05B3D FE085B41 65 JLT LUNSEARCHL if not, normal search 66 * \ / 67 00005B3E 68 SEEIFCM LABEL 05B3E 61400414 5 69 LD FCB CPCUPC get the current UPC pointer 05B3F 61494610 5 5 ZBM 70 LD FCB FCB,UPCNTLMODE FCB = control mode flag 05B40 FB425B4D 5 71 JEQZ FCB LUNSEARCHD if not in CM, then not found (FCB=0) 72 * \ / 73 00005B41 74 LUNSEARCHL LABEL 05B41 64C40064 3 IMM 75 CPR R3 MAXLOCAL is R3 a number for local units? 05B42 FE0A5B48 76 JLE DOWN jump if it can't be on global list 77 * \ / 78 05B43 61400412 5 79 LD FCB CPPSA pick up current PSA pointer 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1247 (XREQUTIL) F 67 Assorted Utility Routines 05B44 61496316 5 5 ZBM 80 LD FCB FCB,PSUNITS get head of global unit list 05B45 3CC94080 3 5 ZBM 81 LSRCH R3 FCB,UCEUNIT look for the unit 05B46 FE0C5B4D 82 JNE LUNSEARCHD jump if not found 05B47 FE0E5B4C 83 JMP SETFCB get FCB address if found 84 * --- 85 00005B48 86 DOWN LABEL search only the local units 05B48 61400414 5 87 LD FCB CPCUPC pick up current UPC pointer 05B49 61495F15 5 5 ZBM 88 LD FCB FCB,UPCUNITS get head of local unit list 05B4A 3CC94080 3 5 ZBM 89 LSRCH R3 FCB,UCEUNIT look for the unit 05B4B FE0C5B4D 90 JNE LUNSEARCHD jump if not found 00005B4C 91 SETFCB LABEL 05B4C 61495F11 5 5 ZBM 92 LD FCB FCB,UCEFCB make real FCB if found 93 00005B4D 94 LUNSEARCHD LABEL 05B4D 60D78801 3 6 BASE 95 LD R3 SP,LUNSRCHLUN restore R3 05B4E 5D1F8002 6 STAK 96 LEAVE POP 97 * --- 98 99 ********************************************************************************** 100 * * 101 * LUNSEARCHX * 102 * * 103 * This routine is identical to LUNSEARCH (above) except * 104 * that it restricts non-CM processes to units 1:200 instead * 105 * of 1:209. It is called from requests that must prevent * 106 * plebian access to ANY Control Mode unit, including the * 107 * absolute units. * 108 * Call: * 109 * LD R3 lun number * 110 * CALLNP LUNSEARCHX * 111 * * 112 * * 113 * * 114 * Sets FCB (R5). * 115 * Eats nothing. * 116 * Stack required = 2 * 117 * * 118 ********************************************************************************** 119 05B4F DD5F8002 6 STAK 120 LUNSEARCHX ENTRNP PUSH 05B50 78C5FFFF 3 IMM 121 AND R3 ONEBITS/FLDADRS 05B51 E4D78801 3 6 BASE 122 ST R3 SP,LUNSRCHLUN save original number 05B52 64C400C9 3 IMM 123 CPR R3 LUNCMLOW is this a control mode lun? 05B53 FE085B41 124 JLT LUNSEARCHL if not, normal search 05B54 FE0E5B3E 125 JMP SEEIFCM make sure we are control mode 126 * --- 127 128 END LUNSEARCH subroutine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1248 (XREQUTIL) F 67 Assorted Utility Routines 130 131 ********************************************************************************** 132 * * 133 * CHECK4CM * 134 * * 135 * This routine checks to see if a unit is also a control * 136 * mode unit and if so ensures that it is control mode using it. * 137 * Call: * 138 * FCB -> FCB * 139 * CALLNP CHECK4CM * 140 * R0 = 0 or error code * 141 * Eats R0. * 142 * Stack required = 1. * 143 * * 144 ********************************************************************************** 145 146 BLOCK CHECK4CM subroutine 147 148 ENTRY CHECK4CM 149 150 BEGFRAME 151 ENDFRAME 152 05B55 DD5F8001 6 STAK 153 CHECK4CM ENTRNP PUSH 05B56 5C097A15 5 ZBM 154 CMZ FCB,FCCMUNIT is this unit reserved for CM? 05B57 FE025B5B 155 JEQ NOTACMUNIT jump if mere mortals can fiddle with it 05B58 60000414 0 156 LD R0 CPCUPC if CM unit, only control mode... 05B59 5C080610 0 ZBM 157 CMZ R0,UPCNTLMODE ...may rewind it 05B5A FE025B5D 158 JEQ NOTCM jump if not control mode requesting 00005B5B 159 NOTACMUNIT LABEL 05B5B 60040000 0 IMM 160 LD R0 0 indicate everything is OK 00005B5C 161 EXIT LABEL 05B5C 5D1F8001 6 STAK 162 LEAVE POP 163 * --- 164 00005B5D 165 NOTCM LABEL 05B5D 60040091 0 IMM 166 LD R0 XREQERILOP illegal operation on device 05B5E FE0E5B5C 167 JMP EXIT get out of here 168 * --- 169 170 END of CHECK4CM subroutine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1249 (XREQUTIL) F 67 Assorted utility routines for XREQs 173 174 ********************************************************************************** 175 * * 176 * PASSERRUP. This section of code is universally used * 177 * when XREQs have the user's memory bomb out on them (usually * 178 * memory protect violation). The error is just passed on to * 179 * the user to let him scratch his head. When entered we assume * 180 * no registers except R0 = reason for error and R1 = error * 181 * parameter. Since we assume the error is one of the 'bad * 182 * memory' codes, we set VERYBADB. Currently, when the * 183 * dispatcher realizes that a very bad error has occurred * 184 * with a PC in monitor memory, it unconditionally sets * 185 * MSRSRELOCB back to monitor stores. Therefore, PASSERRUP * 186 * can be jumped to while this bit is still clear. * 187 * * 188 * Stack required = 1. * 189 * 0 + max ( UERRSET (1) ) * 190 * * 191 * PASSERRW1. Performs the same function as PASSERUP, * 192 * but also does a GRUB on window 1. * 193 * * 194 * Stack required = 7. * 195 * 0 + max ( GRUBWNDO1 (7), UERRSET (1) ) * 196 * * 197 ********************************************************************************** 198 199 BLOCK PASSERRUP routine 200 ENTRY PASSERRUP 201 ENTRY PASSERRW1 202 00005B5F 203 PASSERRUP LABEL 05B5F 62940000 2301 PAIR 204 LD2 R2 PAIR R0 move parameters to proper registers 00005B60 205 PASSERJOIN LABEL 05B60 7C840800 2 IMM 206 IOR R2 VERYBAD (just in case he above is monitor too) 05B61 DC403589 207 CALLNP UERRSET make an error entry 05B62 FE0E38DF 208 JMP XREQRTNX finished 209 * --- 210 00005B63 211 PASSERRW1 LABEL 05B63 63140000 4501 PAIR 212 LD2 R4 PAIR R0 put these in a safe place 05B64 DC403150 213 CALLNP GRUBWNDO1 05B65 62950000 2345 PAIR 214 LD2 R2 PAIR R4 need these here 05B66 FE0E5B60 215 JMP PASSERJOIN join in the fun 216 * --- 217 218 END PASSERRUP routine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1250 (XREQUTIL) F 67 Assorted utility routines for XREQs 220 221 ********************************************************************************** 222 * * 223 * LEVELMASK. Routine that, given pointers to the ULB * 224 * of a requester and a requestee, returns a bit mask giving * 225 * the relationship of the two accounts in the account tree. * 226 * Its main use is in seeing which privileges that have been * 227 * given to a program (owned by the requestee) are to be * 228 * given to the runner (the requester). The bit map corresponds * 229 * to the number of above manager nodes the accounts have in * 230 * common with the rightmost bit corresponding to the top of * 231 * the tree (division = .!!!). * 232 * Returns 1F if requester and owner are same account, * 233 * else 0F if requester and owner are same project, * 234 * else 07 if requester and owner are same division, * 235 * else 03 if owner is not BTI (.!!!), * 236 * else 01. * 237 * Call: * 238 * CALL LEVELMASK * 239 * PARV =>requesters ULB (file accessor) * 240 * PARVL =>requestees ULB (the file owner) * 241 * ST R0 * 242 * * 243 * Sets R0 * 244 * Eats R1:R2 * 245 * Stack required = 2 * 246 * * 247 ********************************************************************************** 248 249 BLOCK LEVELMASK subroutine 250 ENTRY LEVELMASK 251 252 BEGFRAME 00178801 6 BASE 253 LEVELMR3 BSS 1 save location for R3 254 ENDFRAME 255 05B67 DD1F8002 6 STAK 256 LEVELMASK ENTR PUSH 05B68 C1524000 1 REG 257 STPV R1 file accesser 05B69 C0520000 0 REG 258 STPVL R0 file owner 05B6A E4D78801 3 6 BASE 259 ST R3 SP,LEVELMR3 save callers R3 260 * \ / 261 262 * Check to see if accessor and owner are same division/project 05B6B 60960804 2 0 BASE 263 LD R2 R0,ULACCPROJ get owner div-prj 05B6C 64964804 2 1 BASE 264 CPR R2 R1,ULACCPROJ check to see if div-prj same 05B6D FE0C5B75 265 JNE NOTOWNPROJ jump if not the same 266 * \ / 267 268 * Same division/project. See if same name too. 05B6E 62960802 230 BASE 269 LD2 R2 R0,ULACCNM get owner account name 05B6F 66964802 231 BASE 270 CPR2 R2 R1,ULACCNM does it match accessor? 05B70 FE0C5B73 271 JNE NOTOWNFILE jump if not 272 * \ / 273 274 * Done. Exact same account name and division/project 05B71 6004001F 0 IMM 275 LD R0 1*CCBUSRFRC+1*CCBPRJFRC+1*CCBDIVFRC+1*CCBOWNFRC+1*CCBALWFRC 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1251 (XREQUTIL) F 67 Assorted utility routines for XREQs 05B72 FE0E5B82 276 JMP MASKMADE jump giving owner access 277 * --- 278 279 * Done. Division/project match, account name does not 00005B73 280 NOTOWNFILE LABEL 05B73 6004000F 0 IMM 281 LD R0 1*CCBPRJFRC+1*CCBDIVFRC+1*CCBOWNFRC+1*CCBALWFRC 05B74 FE0E5B82 282 JMP MASKMADE proper bit mask in R0 283 * --- 284 285 * Division/project don't match, see if just division matches 00005B75 286 NOTOWNPROJ LABEL 05B75 608A8170 2 2 CBM 287 LD R2 R2/DVSNPART1 remove part of project 05B76 1484007D 2 IMM 288 DIV R2 DVSNPART2 extract division 05B77 60084174 0 1 ZBM 289 LD R0 R1,ULACCPROJ/DVSNPART1 get div-proj of one trying access 05B78 1404007D 0 IMM 290 DIV R0 DVSNPART2 extract the division 05B79 64128000 0 2 REG 291 CPR R0 R2 see if the division is the same 05B7A FE0C5B7D 292 JNE NOTOWNDIV jump if not even same division 293 * \ / 294 295 * Done. Division matches, project doesn't 05B7B 60040007 0 IMM 296 LD R0 1*CCBDIVFRC+1*CCBOWNFRC+1*CCBALWFRC 05B7C FE0E5B82 297 JMP MASKMADE proper bit mask in R0 298 * --- 299 300 * Not own division - see if super system account is the 301 * file requester. If so, see that forcing by the owner 302 * has no effect on us. 00005B7D 303 NOTOWNDIV LABEL 05B7D 64040BB5 0 IMM 304 CPR R0 ((37*40)+37*40)+37 is division .!!! ? 05B7E FE025B81 305 JEQ SUPERACCT jump if yes 306 * \ / 307 308 * Done. Nothing matches, but accessor is not BTI. 05B7F 60040003 0 IMM 309 LD R0 1*CCBOWNFRC+1*CCBALWFRC 05B80 FE0E5B82 310 JMP MASKMADE proper bit mask in R0 311 * --- 312 313 * Done. Nothing matches, accessor is BTI (so no one has powers). 00005B81 314 SUPERACCT LABEL 05B81 60040001 0 IMM 315 LD R0 1*CCBALWFRC 316 * \ / 317 318 * Clean up and go home. 00005B82 319 MASKMADE LABEL 05B82 60D78801 3 6 BASE 320 LD R3 SP,LEVELMR3 restore callers R3 05B83 5D1F8002 6 STAK 321 LEAVE POP return to caller 322 * --- 323 324 END LEVELMASK subroutine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1252 (XREQUTIL) F 67 Assorted utility routines for XREQs 326 327 ********************************************************************************** 328 * * 329 * LEVELBIT. Given the ULBs of two accounts, return the * 330 * bit corresponding to the power the first account has over * 331 * the second. The bits correspond to the levels in the account * 332 * tree with the rightmost being the highest. * 333 * Sets all of the following bits that apply: * 334 * 10 - requester and victim are same account * 335 * 08 - requester is victim's project manager * 336 * 04 - requester is victim's division manager * 337 * 02 - requester is system manager, and victim is not * 338 * BTI division (.!!!) or proprietary account (.&*) * 339 * 01 - requester is MANAGER.!!! * 340 * For example, MANAGER.SYS is the project manager, division manager and * 341 * system manager of OPR.SYS. * 342 * R1 contains the same mask with the additional bit: * 343 * 80 - requester is system manager, victim may be BTI or prop. * 344 * Call: * 345 * CALL LEVELBIT * 346 * PARV ULB of possible manager * 347 * PARVL ULB of account we want power over * 348 * ST R0 * 349 * ST R1 * 350 * Eats R2, Sets R0:R1. * 351 * Stack required = 3 * 352 * * 353 ********************************************************************************** 354 355 BLOCK LEVELBIT subroutine 356 ENTRY LEVELBIT 357 358 BEGFRAME 00178801 6 BASE 359 LEVELBITM BSS 1 build result value here 00178802 6 BASE 360 LEVELBITR3 BSS 1 save area for callers R3 361 ENDFRAME 362 05B84 DD1F8003 6 STAK 363 LEVELBIT ENTR PUSH 05B85 C1578801 6 BASE 364 STPV SP,LEVELBITM save ptr to ULB of possible manager 05B86 C0520000 0 REG 365 STPVL R0 the one we want power over 05B87 E4D78802 3 6 BASE 366 ST R3 SP,LEVELBITR3 save callers R3 05B88 60578801 1 6 BASE 367 LD R1 SP,LEVELBITM make R1 point to possible manager 05B89 EC178801 6 BASE 368 STZ SP,LEVELBITM no relationship yet 369 * \ / 370 371 * Check to see if account names are the same 05B8A 62964802 231 BASE 372 LD2 R2 R1,ULACCNM get requesters account name 05B8B 66960802 230 BASE 373 CPR2 R2 R0,ULACCNM does it match victims? 05B8C FE0C5B90 374 JNE NOTOWNACCT jump if not 375 * \ / 376 377 * Same account name, see if same division/project 05B8D 60964804 2 1 BASE 378 LD R2 R1,ULACCPROJ requesters project 05B8E 64960804 2 0 BASE 379 CPR R2 R0,ULACCPROJ does it match? 05B8F EC49B611 6 ZBM 380 STLEQ SP,LEVELBITM/CCBUSRFRC if so, set self bit 381 * \ / 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1253 (XREQUTIL) F 67 Assorted utility routines for XREQs 382 00005B90 383 NOTOWNACCT LABEL 384 * shadows are NEVER managers 05B90 5C084010 1 ZBM 385 CMZ R1,ULSHADOW is this account a shadow? 05B91 FE0C5BAC 386 JNE LVLBITRET jump if so, shadows are never managers 387 * \ / 388 389 * check to see if any manager powers exist 05B92 62802556 23 390 LD2 R2 RADMANAGER get the MANAGER account name 05B93 66964802 231 BASE 391 CPR2 R2 R1,ULACCNM is that what requester has? 05B94 FE0C5BAC 392 JNE LVLBITRET jump if requester is not a manager 393 * \ / 394 395 * foreign managers control only accounts from same customer 05B95 5C084210 1 ZBM 396 CMZ R1,ULFOREIGN is requester foreign account? 05B96 FE0C5BB0 397 JNE FOREIGNMGR jump if so 05B97 5C080210 0 ZBM 398 CMZ R0,ULFOREIGN is victim foreign account? 05B98 FE0C5BA2 399 JNE CHKSUPER jump if so 400 * \ / 401 402 * check whether division/project manager 00005B99 403 MGRCHECK LABEL 05B99 60960804 2 0 BASE 404 LD R2 R0,ULACCPROJ victim's project 05B9A 64964804 2 1 BASE 405 CPR R2 R1,ULACCPROJ 05B9B EC49B811 6 ZBM 406 STLEQ SP,LEVELBITM/CCBPRJFRC set project manager bit 407 * \ / 408 409 * check whether division manager 05B9C 608A8170 2 2 CBM 410 LD R2 R2/DVSNPART1 hack out division name 05B9D 1484007D 2 IMM 411 DIV R2 DVSNPART2 05B9E 1C84007D 2 IMM 412 MUL R2 DVSNPART2 05B9F 608A9200 2 2 CBM 413 LD R2 R2*DVSNPART1 R2 = victim's division 05BA0 64964804 2 1 BASE 414 CPR R2 R1,ULACCPROJ is requester = victim's division manager? 05BA1 EC49BA11 6 ZBM 415 STLEQ SP,LEVELBITM/CCBDIVFRC save division manager bit 416 * \ / 417 418 * check whether manager.sys 00005BA2 419 CHKSUPER LABEL 05BA2 60964804 2 1 BASE 420 LD R2 R1,ULACCPROJ requester's project 05BA3 64802555 2 421 CPR R2 DOTSYS is he system manager? 05BA4 EC49BC11 6 ZBM 422 STLEQ SP,LEVELBITM/CCBOWNFRC save system manager privilege bit 05BA5 EC49B011 6 ZBM 423 STLEQ SP,LEVELBITM/BIT 24 save system manager bit 424 * \ / 425 426 * check whether manager.!!! 00005BA6 427 CHKSUPER2 LABEL 05BA6 64802551 2 428 CPR R2 DOTBTI is he the super manager? 05BA7 EC49BE11 6 ZBM 429 STLEQ SP,LEVELBITM/CCBALWFRC save super manager bit 05BA8 60960804 2 0 BASE 430 LD R2 R0,ULACCPROJ get victim's project 05BA9 68802551 2 431 UCPR R2 DOTBTI anything bigger than this is reserved for BTI 05BAA FE085BAC 432 JLT LVLBITRET jump if not .!xxxxx, .&xxxxx, or ._xxxxx 05BAB EC09BC11 6 ZBM 433 STZ SP,LEVELBITM/CCBOWNFRC remove normal system manager privilege bit 434 * \ / 435 00005BAC 436 LVLBITRET LABEL 05BAC 6009B651 0 6 ZBM 437 LD R0 SP,LEVELBITM/BITS 27:31 load the constructed mask 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1254 (XREQUTIL) F 67 Assorted utility routines for XREQs 05BAD 60578801 1 6 BASE 438 LD R1 SP,LEVELBITM load the constructed mask 05BAE 60D78802 3 6 BASE 439 LD R3 SP,LEVELBITR3 restore callers R3 05BAF 5D1F8003 6 STAK 440 LEAVE POP and return 441 * --- 442 443 * requester is foreign, he'll get power only if he is 444 * manager.!!!, or the victim belongs to same customer 00005BB0 445 FOREIGNMGR LABEL 05BB0 60884081 2 1 ZBM 446 LD R2 R1,ULDRIVE get volume manager is from 05BB1 60A41F22 2 2 447 LD R2 VOLNTABLE(R2) pointer to VOLN element (manager) 05BB2 6088810E 2 2 ZBM 448 LD R2 R2,VOLNCUST get volume customer number 05BB3 60C80081 3 0 ZBM 449 LD R3 R0,ULDRIVE drive victim account resides 05BB4 60E61F22 3 3 450 LD R3 VOLNTABLE(R3) pointer to VOLN element (victim) 05BB5 6488C10E 2 3 ZBM 451 CPR R2 R3,VOLNCUST manager and victim from same customer? 05BB6 FE025B99 452 JEQ MGRCHECK if so, continue with the power struggle 05BB7 EC09B611 6 ZBM 453 STZ SP,LEVELBITM/CCBUSRFRC foreign can't touch native self 05BB8 60964804 2 1 BASE 454 LD R2 R1,ULACCPROJ requester's project 05BB9 FE0E5BA6 455 JMP CHKSUPER2 only manager.!!! powers matter 456 * --- 457 458 END LEVELBIT subroutine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1255 (XREQUTIL) F 67 Assorted utility routines for XREQs 460 461 ********************************************************************************** 462 * * 463 * ACCESSMASK. This routine takes a five bit privilege field * 464 * and a five bit field of what to change it to and depending on * 465 * the level of the changer (CPPSA,PSPRIVULB) and the owner of * 466 * the file (FCB,FCLIMITPTR) only those bits allowed are changed. * 467 * The bits controlling levels above the caller are not changed * 468 * and if they are specified to be changed only the caller's bit * 469 * is changed. The bits below the callers level are set to his * 470 * requested pattern. * 471 * Call: * 472 * LD FCB => file the privilege field is associated with * 473 * CALL ACCESSMASK * 474 * PARV * 475 * PARL * 476 * * 477 * Routine gets R0:R2 and R1 is returned with the new field * 478 * value. * 479 * Stack required = 6 * 480 * 3 + max ( LEVELBIT (3) ) * 481 * * 482 ********************************************************************************** 483 484 BLOCK ACCESSMASK subroutine 485 ENTRY ACCESSMASK 486 487 BEGFRAME 00178801 6 BASE 488 ACSMSKTO BSS 1 what the field changes to 00178802 6 BASE 489 ACSMSKPLAC BSS 1 place of the field 490 ENDFRAME 491 05BBA DD1F8003 6 STAK 492 ACCESSMASK ENTR PUSH 05BBB C1578801 6 BASE 493 STPV SP,ACSMSKTO get the desired new value 05BBC C0178802 6 BASE 494 STPL SP,ACSMSKPLAC and save address of field to change 05BBD DC005B84 495 CALL LEVELBIT get the level of this guy 05BBE 60000414 0 496 LD R0 CPCUPC 05BBF 41481F13 0 ZBM 497 PARV R0,UPCPRIVULB pass the ULB of the privileges 05BC0 40495114 5 ZBM 498 PARVL FCB,FCLIMITPTR 05BC1 7C040010 0 IMM 499 IOR R0 1*CCBUSRFRC we at least have modify access 05BC2 E4165001 0 1 REG 500 ST R0 R1+1 R1 = R0 - 1 05BC3 28520000 1 0 REG 501 BSUB R1 R0 R1 = mask of bits above ours 05BC4 A8578801 1 6 BASE 502 BRSBM R1 SP,ACSMSKTO turn off bits above ours 05BC5 FE025BC8 503 JEQ NOTUPPER jump if no bits above ours were set 05BC6 60165001 0 1 REG 504 LD R0 R1+1 R0 = our highest bit 05BC7 FC178801 0 6 BASE 505 IORM R0 SP,ACSMSKTO turn on our highest bit 00005BC8 506 NOTUPPER LABEL 05BC8 60178C02 0 6 FPVR 507 LD R0 @(SP,ACSMSKPLAC) get old value of field 05BC9 78124000 0 1 REG 508 AND R0 R1 turn off bits that we are changing 05BCA 7447FFFF 1 IMM 509 XOR R1 ONEBITS flip sense 05BCB 78578801 1 6 BASE 510 AND R1 SP,ACSMSKTO R1 = new value for bits we are changing 05BCC 7C520000 1 0 REG 511 IOR R1 R0 put them together 05BCD E4578C02 1 6 FPVR 512 ST R1 @(SP,ACSMSKPLAC) save result 05BCE 5D1F8003 6 STAK 513 LEAVE POP 514 * --- 515 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1256 (XREQUTIL) F 67 Assorted utility routines for XREQs 516 END ACCESSMASK subroutine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1257 (XREQUTIL) F 67 Assorted utility routines for XREQs 518 519 ********************************************************************************** 520 * * 521 * SETMEMTRAP. Routine that sets the interrupt trap * 522 * vector in the console area to the specified address. Since * 523 * the only error a monitor routine can get is a virtual memory * 524 * failure (mass storage error or memory protect violation) * 525 * this sets up for recovery from user memory mangles. It * 526 * should be used by any XREQ routine that references the users * 527 * memory image, especially if the users memory is stored into * 528 * (to catch memory protect violations). * 529 * Call: * 530 * CALL SETMEMTRAP * 531 * PARL * 532 * When the specified error routine gets control, R0 * 533 * contains the error code, R1 has the virtual page number, * 534 * and all other registers are the same as at the time of * 535 * the error. * 536 * * 537 * Gets R0 and R1 * 538 * Stack required = 1 * 539 * * 540 ********************************************************************************** 541 542 BLOCK SETMEMTRAP subroutine 543 ENTRY SETMEMTRAP 544 545 BEGFRAME 546 ENDFRAME 547 05BCF DD1F8001 6 STAK 548 SETMEMTRAP ENTR PUSH 05BD0 60400412 1 549 LD R1 CPPSA get current PSA pointer 05BD1 60485F10 1 1 ZBM 550 LD R1 R1,PSCACHN get pointer to our console area 05BD2 C016480A 1 BASE 551 STPL R1,CAINTADR set the interrupt address 05BD3 5D1F8001 6 STAK 552 LEAVE POP get back 553 * --- 554 555 END SETMEMTRAP subroutine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1258 (XREQUTIL) F 67 Assorted utility routines for XREQs 557 558 ********************************************************************************** 559 * * 560 * CLRMEMTRAP. Routine that clears the memory trap address. * 561 * This operation will cause future unrecoverable memory failures * 562 * to halt. Should be used to undo the above request after the * 563 * users memory is no longer being used. * 564 * Call: * 565 * CALLNP CLRMEMTRAP * 566 * Gets R0 and uses the stack * 567 * Stack required = 1 * 568 * * 569 ********************************************************************************** 570 571 BLOCK CLRMEMTRAP subroutine 572 ENTRY CLRMEMTRAP 573 574 BEGFRAME 575 ENDFRAME 576 05BD4 DD5F8001 6 STAK 577 CLRMEMTRAP ENTRNP PUSH 05BD5 60000412 0 578 LD R0 CPPSA get the current PSA pointer 05BD6 60081F10 0 0 ZBM 579 LD R0 R0,PSCACHN get our console area pointer 05BD7 EC16080A 0 BASE 580 STZ R0,CAINTADR clear the interrupt address 05BD8 5D1F8001 6 STAK 581 LEAVE POP go home 582 * --- 583 584 END CLRMEMTRAP subroutine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1259 (XREQUTIL) F 67 Assorted utility routines for XREQs 586 587 ********************************************************************************** 588 * * 589 * MAXPRIV. Given two privilege codes, this returns the "best" * 590 * of the two. The privileges are ordered as: * 591 * NOT < XO < RO < RW < MOD < BKUP * 592 * Call: * 593 * CALL MAXPRIV * 594 * PARV * 595 * PARVL * 596 * ST R0 * 597 * * 598 * Gets R0:R2. * 599 * Stack required = 1 * 600 * * 601 ********************************************************************************** 602 603 BLOCK 604 ENTRY MAXPRIV 605 606 BEGFRAME 607 ENDFRAME 608 05BD9 DD1F8001 6 STAK 609 MAXPRIV ENTR PUSH 05BDA C1524000 1 REG 610 STPV R1 save the first priv in R1 05BDB C0520000 0 REG 611 STPVL R0 and the second in R0 05BDC 38A05BE2 2 0 612 LEA R2 BETTERTAB(R0) R2=>bits saying if R1 is better then R0 05BDD 38888010 2 2 ZBM 613 LEA R2 R2,0/BIT 0 R2 => bit address 05BDE 5C1A8C00 21 @R 614 CMZ @R2(R1) if non-zero, R1 is better then R0 05BDF FE025BE1 615 JEQ R0ISBEST jump if the value in R0 is best 05BE0 60124000 0 1 REG 616 LD R0 R1 use the value in R1 00005BE1 617 R0ISBEST LABEL 05BE1 5D1F8001 6 STAK 618 LEAVE POP 619 * --- 620 40000000 ABS 621 RO! EQU 1*BIT FSPRIVRO 80000000 ABS 622 RW! EQU 1*BIT FSPRIVRW 20000000 ABS 623 MOD! EQU 1*BIT FSPRIVMOD 10000000 ABS 624 XO! EQU 1*BIT FSPRIVXO 00800000 ABS 625 BKUP! EQU 1*BIT FSPRIVBKUP 00010000 ABS 626 NOT! EQU 1*BIT FSPRIVNOT 627 00005BE2 628 BETTERTAB LABEL 05BE2 20800000 629 VFD MOD!+BKUP! bits for things better then RW 05BE3 A0800000 630 VFD RW!+MOD!+BKUP! RO 05BE4 00800000 631 VFD BKUP! MOD 05BE5 E0800000 632 VFD RO!+RW!+MOD!+BKUP! XO 05BE6 F0810000 633 VFD XO!+RO!+RW!+MOD!+BKUP!+NOT! UNDEF 05BE7 F0810000 634 VFD XO!+RO!+RW!+MOD!+BKUP!+NOT! UNDEF 05BE8 F0810000 635 VFD XO!+RO!+RW!+MOD!+BKUP!+NOT! UNDEF 05BE9 F0810000 636 VFD XO!+RO!+RW!+MOD!+BKUP!+NOT! UNDEF 05BEA 00000000 637 VFD 0 BKUP 05BEB F0810000 638 VFD XO!+RO!+RW!+MOD!+BKUP!+NOT! UNDEF 05BEC F0810000 639 VFD XO!+RO!+RW!+MOD!+BKUP!+NOT! UNDEF 05BED F0810000 640 VFD XO!+RO!+RW!+MOD!+BKUP!+NOT! UNDEF 05BEE F0810000 641 VFD XO!+RO!+RW!+MOD!+BKUP!+NOT! UNDEF 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1260 (XREQUTIL) F 67 Assorted utility routines for XREQs 05BEF F0810000 642 VFD XO!+RO!+RW!+MOD!+BKUP!+NOT! UNDEF 05BF0 F0810000 643 VFD XO!+RO!+RW!+MOD!+BKUP!+NOT! UNDEF 05BF1 F0800000 644 VFD XO!+RO!+RW!+MOD!+BKUP! NOT 645 646 END of MAXPRIV 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1261 (XREQUTIL) F 67 Assorted utility routines for XREQs 648 649 ********************************************************************************** 650 * * 651 * PRIV2MOD. Check the passed privilege to see if we may modify * 652 * a directory entry. The answer is "yes" if the priv is either * 653 * RW, MOD, or BKUP. If the file is a spooled file (open by the * 654 * system on behalf of the spooler) we want to disallow accesses * 655 * by unauthorized users, non .!!! and .SYS to be exact. * 656 * Call: * 657 * CALL PRIV2MOD * 658 * PARV spooled bit (0 <= no, 1 <= yes) * 659 * PARVL priv code to check * 660 * JMP * 661 * * 662 * * 663 * Eats R0 * 664 * Stack required = 2 * 665 * * 666 ********************************************************************************** 667 668 BLOCK 669 ENTRY PRIV2MOD 670 671 BEGFRAME 00178801 6 BASE 672 SPOOLBIT BSS 1 flags word 673 ENDFRAME 674 05BF2 DD1F8002 6 STAK 675 PRIV2MOD ENTR PUSH 05BF3 C1578801 6 BASE 676 STPV SP,SPOOLBIT bit indicating file opened for the spooler 05BF4 C0520000 0 REG 677 STPVL R0 privilege code 05BF5 5C305C06 0 @ 678 CMZ @MODPRIVS(R0) first check if we have power 05BF6 FE025C04 679 JEQ NOCANMOD doesn't look like we do 05BF7 5C178801 6 BASE 680 CMZ SP,SPOOLBIT file opened for the spooler? 05BF8 FE025C03 681 JEQ GIVEPWR he can do what he wants now 05BF9 60000414 0 682 LD R0 CPCUPC current running underprocess 05BFA 60081F13 0 0 ZBM 683 LD R0 R0,UPCPRIVULB ULB giving privileges 05BFB 60080174 0 0 ZBM 684 LD R0 R0,ULACCPROJ/DVSNPART1 see who's asking for privilege 05BFC 1404007D 0 IMM 685 DIV R0 DVSNPART2 extract the project 05BFD 1C04007D 0 IMM 686 MUL R0 DVSNPART2 and back to normal format 05BFE 600A1200 0 0 CBM 687 LD R0 R0*DVSNPART1 that should do it 05BFF 68002551 0 688 UCPR R0 DOTBTI is it the one and only supreme creator? 05C00 FE025C03 689 JEQ GIVEPWR no questions asked if so 05C01 68002555 0 690 UCPR R0 DOTSYS system owner? 05C02 FE0C5C04 691 JNE NOCANMOD jump if no one special 692 * \ / 693 00005C03 694 GIVEPWR LABEL 05C03 D013C000 7 REG 695 INC R7 advance to good return 696 * \ / 697 00005C04 698 NOCANMOD LABEL 05C04 5D1F8002 6 STAK 699 LEAVE POP you know the story here 700 * --- 701 05C05 A0800000 702 MODPRIVT VFD (1*BIT FSPRIVRW)+(1*BIT FSPRIVMOD)+(1*BIT FSPRIVBKUP) 05C06 00485C05 703 MODPRIVS PTR MODPRIVT/BIT 0 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1262 (XREQUTIL) F 67 Assorted utility routines for XREQs 704 705 END of PRIV2MOD 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1263 (XREQUTIL) F 67 Assorted utility routines for XREQs 707 708 ********************************************************************************** 709 * * 710 * PRIV2MACCT. Check the passed privilege to see if we may * 711 * modify an account entry. The answer is "yes" if the priv is * 712 * either MOD or BKUP. * 713 * Call: * 714 * CALL PRIV2MACCT * 715 * PARVL priv code to check * 716 * JMP * 717 * * 718 * * 719 * Gets R0. * 720 * Stack required = 1 * 721 * * 722 ********************************************************************************** 723 724 BLOCK 725 ENTRY PRIV2MACCT 726 727 BEGFRAME 728 ENDFRAME 729 05C07 DD1F8001 6 STAK 730 PRIV2MACCT ENTR PUSH 05C08 C0520000 0 REG 731 STPVL R0 pick up the priv code 05C09 19F05C0C 7 0 @ 732 ADD R7 @MODPRIVS(R0) skip error return for priv code of modify 05C0A 5D1F8001 6 STAK 733 LEAVE POP 734 * --- 735 05C0B 20800000 736 MODPRIVT VFD (1*BIT FSPRIVMOD)+(1*BIT FSPRIVBKUP) 05C0C 00485C0B 737 MODPRIVS PTR MODPRIVT/BIT 0 738 739 END of PRIV2MACCT 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1264 (XREQUTIL) F 67 Assorted utility routines for XREQs 741 742 ********************************************************************************** 743 * * 744 * ACCTPSA fills in an accounting entry with the information * 745 * that is obtained through the session's PSA. This includes the * 746 * port (if there is one), time used, session number, and the * 747 * session's maximum block usage. * 748 * Call: * 749 * R2 -> PSA * 750 * R3 -> accounting record * 751 * CALLNP ACCTPSA * 752 * * 753 * Eats R0:R1 * 754 * Stack required = 2. * 755 * 1+ max ( FINDTERMCB (1) ) * 756 * * 757 ********************************************************************************** 758 759 BLOCK ACCTPSA subroutine 760 ENTRY ACCTPSA 761 762 BEGFRAME 763 ENDFRAME 764 05C0D DD5F8001 6 STAK 765 ACCTPSA ENTRNP PUSH 05C0E D148CAA1 3 ZBM 766 STMW R3,APRECORD/AFRPORTNUM assume no port associated 05C0F DC0035C5 767 CALL FINDTERMCB get TCB of session 05C10 40528000 2 REG 768 PARVL R2 address of PSA 05C11 FA705C14 1 769 JZA R1 NOPORT jump if no port 05C12 60084890 0 1 ZBM 770 LD R0 R1,TCTNUM get the port number 05C13 E408CAA1 0 3 ZBM 771 ST R0 R3,APRECORD/AFRPORTNUM save in the record 772 * \ / 773 00005C14 774 NOPORT LABEL 05C14 60489F12 1 2 ZBM 775 LD R1 R2,PSPROCCB get the PCB pointer 05C15 604840C3 1 1 ZBM 776 LD R1 R1,PCPROCNUM R0=session number 05C16 E448C0C2 1 3 ZBM 777 ST R1 R3,APRECORD/AFRPROCN session number into the record 05C17 60168810 0 2 BASE 778 LD R0 R2,PSTIMEUSED get the time used from PSA 05C18 180401F4 0 IMM 779 ADD R0 MSECSS/2 round 05C19 140403E8 0 IMM 780 DIV R0 MSECSS convert to seconds 05C1A E416C808 0 3 BASE 781 ST R0 R3,APRECORD/AFRCPUTIME and place into the accounting record 05C1B 60168814 0 2 BASE 782 LD R0 R2,PSSESMAX get the max used from PSA 05C1C E416C80A 0 3 BASE 783 ST R0 R3,APRECORD/AFRSESMAX 05C1D 5D1F8001 6 STAK 784 LEAVE POP 785 * --- 786 787 END of ACCTPSA 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1265 (XREQUTIL) F 67 Assorted utility routines for XREQs 789 790 ********************************************************************************** 791 * * 792 * ACCTULB picks up the basic information that goes in an * 793 * accounting record from the ULB and puts it in the record. * 794 * Call: * 795 * R3 -> accounting record * 796 * ULB -> ULB * 797 * CALLNP ACCTULB * 798 * * 799 * Eats R0:R1 * 800 * Stack required = 1 * 801 * * 802 ********************************************************************************** 803 804 BLOCK 805 ENTRY ACCTULB 806 807 BEGFRAME 808 ENDFRAME 809 05C1E DD5F8001 6 STAK 810 ACCTULB ENTRNP PUSH 05C1F 62170802 014 BASE 811 LD2 R0 ULB,ULACCNM pick up the account name from the ULB 05C20 E616C803 013 BASE 812 ST2 R0 R3,APRECORD/AFRACCT put into accounting record 05C21 60170804 0 4 BASE 813 LD R0 ULB,ULACCPROJ pick up the account project from the ULB 05C22 E416C805 0 3 BASE 814 ST R0 R3,APRECORD/AFRPROJ put into accounting record 05C23 60090010 0 4 ZBM 815 LD R0 ULB,ULSHADOW pick up the shadow flag from the ULB 05C24 E408D812 0 3 ZBM 816 ST R0 R3,APRECORD/AFRSHADOW put into accounting record 05C25 60090210 0 4 ZBM 817 LD R0 ULB,ULFOREIGN pick up the foreign flag from the ULB 05C26 E408DA12 0 3 ZBM 818 ST R0 R3,APRECORD/AFRFOREIGN put into accounting record 05C27 6009118E 0 4 ZBM 819 LD R0 ULB,ULDSKUSD pick up the disk used from the ULB 05C28 E416C809 0 3 BASE 820 ST R0 R3,APRECORD/AFRSVDUSD put into accounting record 05C29 5D1F8001 6 STAK 821 LEAVE POP return 822 * --- 823 824 END 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1266 (XREQUTIL) F 67 Assorted utility routines for XREQs 826 827 ********************************************************************************** 828 * * 829 * ACCTALIAS fills in an accounting record with information * 830 * required for recording aliases (and un-aliases). * 831 * Call: * 832 * ULB -> ULB of destination of account * 833 * CALL ACCTALIAS * 834 * PARVL * 835 * * 836 * Eats R0:R2 * 837 * Stack required: 1 + 3 = 4 * 838 * 1 + max ( ACCOUNT (2), ACCTPSA (2), ACCTQUE (3), * 839 * ACCTULB (1) ) * 840 * * 841 ********************************************************************************** 842 843 BLOCK 844 ENTRY ACCTALIAS 845 846 BEGFRAME 847 ENDFRAME 848 05C2A DD1F8001 6 STAK 849 ACCTALIAS ENTR PUSH 05C2B C0528000 2 REG 850 STPVL R2 save the record type 05C2C 60000412 0 851 LD R0 CPPSA pointer to current users status area 05C2D 65081F13 4 0 ZBM 852 CPR ULB R0,PSUSERLIMP aliasing to or from our own account 05C2E FE025C3C 853 JEQ NOLOGALIAS if so, don't log the alias 05C2F DC00505F 854 CALL ACCOUNT call the accounting routine 05C30 41528000 2 REG 855 PARV R2 indicate type of record 05C31 41440034 IMM 856 PARV AFRFILLEN length of record 05C32 40491A57 4 ZBM 857 PARVL ULB,ULLOGSPOT say which files get it 05C33 60800412 2 858 LD R2 CPPSA indicate this PSA 05C34 DC405C0D 859 CALLNP ACCTPSA fill in the info from PSA 05C35 DC405C1E 860 CALLNP ACCTULB fill in info from ULB 861 862 * Say who is doing the alias. 05C36 60889F13 2 2 ZBM 863 LD R2 R2,PSUSERLIMP R2 -> logon ULB 05C37 62168802 012 BASE 864 LD2 R0 R2,ULACCNM pick up the logon account name 05C38 E616C80B 013 BASE 865 ST2 R0 R3,APRECORD/AFRFILNAM put into accounting record 05C39 60168804 0 2 BASE 866 LD R0 R2,ULACCPROJ pick up the logon account project 05C3A E416C80D 0 3 BASE 867 ST R0 R3,APRECORD/AFRFILEXT put into accounting record 05C3B DC405025 868 CALLNP ACCTQUE and send it to the queue 869 * \ / 870 00005C3C 871 NOLOGALIAS LABEL 05C3C 5D1F8001 6 STAK 872 LEAVE POP 873 * --- 874 875 END 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1267 (XREQUTIL) F 67 Assorted utility routines for XREQs 877 878 ********************************************************************************** 879 * * 880 * ACCTFILLOG fills in an accounting entry for various * 881 * file accesses. The complete file name is logged along with * 882 * the user's account, port, and session. Note that opens by * 883 * users on their own files and opens by the system don't get * 884 * logged. This also pertains to opens by backup. * 885 * Call: * 886 * FCB -> file control block * 887 * ULB -> user limit block for file * 888 * CALL ACCTFILLOG * 889 * PARVL * 890 * * 891 * Eats R0:R3 * 892 * Stack required: 1 + 3 = 4 * 893 * 1 + max ( ACCOUNT (2), ACCTPSA (2), ACCTQUE (3), * 894 * ACCTULB (1) ) * 895 * * 896 ********************************************************************************** 897 898 BLOCK subroutine ACCTFILLOG 899 900 ENTRY ACCTFILLOG 901 902 BEGFRAME 903 ENDFRAME 904 05C3D DD1F8001 6 STAK 905 ACCTFILLOG ENTR PUSH 05C3E C0528000 2 REG 906 STPVL R2 record type 05C3F 60000412 0 907 LD R0 CPPSA pointer to users process status area 05C40 65081F13 4 0 ZBM 908 CPR ULB R0,PSUSERLIMP does the file belong to us? 05C41 FE025C5A 909 JEQ NOFILLOG if so, don't log the entry 05C42 60081F11 0 0 ZBM 910 LD R0 R0,PSCACHNP1 console area of requester 05C43 5C082E11 0 ZBM 911 CMZ R0,CAMSR/MSRMONB is requester in monitor state? 05C44 FE0C5C5A 912 JNE NOFILLOG if so, skip logging this file event 05C45 60000414 0 913 LD R0 CPCUPC currently running underprocess 05C46 5C080C10 0 ZBM 914 CMZ R0,UPBACKUP backup privilege set 05C47 FE025C5A 915 JEQ NOFILLOG jump if privilege granted 05C48 DC00505F 916 CALL ACCOUNT start an accounting entry 05C49 41528000 2 REG 917 PARV R2 type of accounting record 05C4A 41440034 IMM 918 PARV AFRFILLEN file length entry 05C4B 40491A57 4 ZBM 919 PARVL ULB,ULLOGSPOT where to write the entry to 05C4C 60800412 2 920 LD R2 CPPSA R2 -> current PSA 05C4D DC405C0D 921 CALLNP ACCTPSA fill in any information we get from this 05C4E DC405C1E 922 CALLNP ACCTULB tell where the file is from 05C4F 61089F13 4 2 ZBM 923 LD ULB R2,PSUSERLIMP ULB -> requester's ULB 05C50 62170802 014 BASE 924 LD2 R0 ULB,ULACCNM get user's account name 05C51 E616C808 013 BASE 925 ST2 R0 R3,APRECORD/AFRACCT2 put in the secondary account name 05C52 60170804 0 4 BASE 926 LD R0 ULB,ULACCPROJ don't forget the project 05C53 E416C80A 0 3 BASE 927 ST R0 R3,APRECORD/AFRPROJ2 05C54 6217480B 015 BASE 928 LD2 R0 FCB,FCNAME put in the file name 05C55 E616C80B 013 BASE 929 ST2 R0 R3,APRECORD/AFRFILNAM 05C56 6017480D 0 5 BASE 930 LD R0 FCB,FCNAMEEXT extension 05C57 E416C80D 0 3 BASE 931 ST R0 R3,APRECORD/AFRFILEXT 05C58 DC405025 932 CALLNP ACCTQUE ship the record off to be queued 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1268 (XREQUTIL) F 67 Assorted utility routines for XREQs 05C59 61095114 4 5 ZBM 933 LD ULB FCB,FCLIMITPTR restore ULB ptr 934 * \ / 935 00005C5A 936 NOFILLOG LABEL 05C5A 5D1F8001 6 STAK 937 LEAVE POP 938 * --- 939 940 END of ACCTFILLOG 941 942 END Assorted Utility Routines 111 INPUT XREQUTIL2 more misc XREQ utilities 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1269 (XREQUTIL2) F 68 More Utility Routines 3 4 BLOCK More Utility Routines 5 6 ENTRY CHECKNAME Check "name.ext" for validity 7 ENTRY CHECKSYM Check name for validity 8 ENTRY EMBED Check for embedded blanks 9 ENTRY FNDMGRD Find division manager 10 ENTRY FNDMGRDP Find division/project manager 11 ENTRY FNDNONHOLE Finds next non-hole in a RAF/CODE 12 ENTRY GETFREEW1 Sets up a new block in window 1 13 ENTRY GETFREEW2 Sets up a new block in window 2 14 ENTRY LIMITCHECK Check limit usage 15 ENTRY PRESETAUTH Gets managers authorization list 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1270 (XREQUTIL2) F 68 More Utility Routines 17 18 ********************************************************************************** 19 * * 20 * Routines to fetch and set up new blocks. * 21 * For use by routines adding to a file. Sets up the * 22 * FBI accordingly. * 23 * Call: * 24 * LD FCB * 25 * CALL GETFREEWx * 26 * PARV * 27 * PARVL * 28 * JMP * 29 * : zeropage locked into window * 30 * R0 = new block number (no volume number embedded) * 31 * R2 => FBI of block, window NOT mapped * 32 * R3 => PPL of block * 33 * and FCB,FCMSBLK = new block number * 34 * Eats R0:R3 * 35 * Stack required = 6 * 36 * 2 + max ( MAPOUTFBI (2) ,SETWNDOx (4) ) * 37 * * 38 ********************************************************************************** 39 40 BLOCK GETFREEW1 and GETFREEW2 subroutines 41 ENTRY GETFREEW1 sets up a new block in window 1 42 ENTRY GETFREEW2 sets up a new block in window 2 43 44 BEGFRAME 00178801 6 BASE 45 GETFREEWT BSS 1 temporary storage 46 ENDFRAME 47 05C5B DD1F8002 6 STAK 48 GETFREEW1 ENTR PUSH 05C5C C1495181 5 ZBM 49 STPV FCB,FCMSBLK save FBI type out of the way 05C5D C0578801 6 BASE 50 STPVL SP,GETFREEWT save relative block number 05C5E DC003205 51 CALL SETWNDO1 start setup of window 05C5F FE0E5C64 52 JMP GETFREESHR 53 * --- 54 05C60 DD1F8002 6 STAK 55 GETFREEW2 ENTR PUSH 05C61 C1495181 5 ZBM 56 STPV FCB,FCMSBLK save FBI type out of the way 05C62 C0578801 6 BASE 57 STPVL SP,GETFREEWT save relative block number 05C63 DC0031FF 58 CALL SETWNDO2 start setup of window 00005C64 59 GETFREESHR LABEL 05C64 4144000A IMM 60 PARV VPCNTLW+VPCNTLLK+VPZEROPG pass VPCNTL field 61 * note that this is a zeropage request and therefore 62 * requests a new MS block. Since it is requested 63 * locked, SETWINDOW forces it in now. 05C65 41534000 5 REG 64 PARV FCB indicate what lun it's a part of 05C66 41005C79 65 PAR GETFREEDE pass the error address 05C67 41574801 5 BASE 66 PARV FCB,FCBLOCK pass the block number (just to specify volume) 05C68 6004007F 0 IMM 67 LD R0 FBITFREE get FBI type of free block 05C69 E4096471 0 5 ZBM 68 ST R0 FCB,FCMSBLK/VPFBIOLDB include with requested type 05C6A 40495181 5 ZBM 69 PARVL FCB,FCMSBLK pass the FBI type desired 70 * the FBI pointer is returned in R2 05C6B EC089180 2 ZBM 71 STZ R2,FBIFLINK zero pointers for good measure 05C6C EC089182 2 ZBM 72 STZ R2,FBIBLINK 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1271 (XREQUTIL2) F 68 More Utility Routines 05C6D 62174809 015 BASE 73 LD2 R0 FCB,FCSERIAL get the file serial number 05C6E E6168808 012 BASE 74 ST2 R0 R2,FBISERNO set into the FBI 05C6F 60495114 1 5 ZBM 75 LD R1 FCB,FCLIMITPTR get a pointer to the limit block 05C70 60164804 0 1 BASE 76 LD R0 R1,ULACCPROJ get the account extension 05C71 E4168807 0 2 BASE 77 ST R0 R2,FBIPROJ set that into the FBI 05C72 62164802 011 BASE 78 LD2 R0 R1,ULACCNM get the users account number 05C73 E6168805 012 BASE 79 ST2 R0 R2,FBIACCT set that into the FBI 05C74 60178801 0 6 BASE 80 LD R0 SP,GETFREEWT get the relative block number out of hiding 05C75 E4089184 0 2 ZBM 81 ST R0 R2,FBIRELBLK and, of course, store into the FBI 05C76 60089181 0 2 ZBM 82 LD R0 R2,FBIDA 05C77 E4095181 0 5 ZBM 83 ST R0 FCB,FCMSBLK place block number in place and R0 05C78 19C40001 7 IMM 84 ADD R7 1 advance the return address 85 * \ / 86 87 * R0 = block number or error code from SETWNDOx 00005C79 88 GETFREEDE LABEL 05C79 DC40261B 89 CALLNP MAPOUTFBI unmap FBI 05C7A 5D1F8002 6 STAK 90 LEAVE POP return to caller 91 * --- 92 93 END GETFREEW1 and GETFREEW2 subroutines 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1272 (XREQUTIL2) F 68 More Utility Routines 95 96 ********************************************************************************** 97 * * 98 * LIMITCHECK * 99 * Routine to adjust the various mass storage space used * 100 * totals that are kept to keep user programs under control. * 101 * These limits are: * 102 * - session used (PSA,PSSRSLIM). A crude count whose primary * 103 * function is to prevent a program from running away. It * 104 * counts all blocks added to the control of this process. * 105 * Note that this count may be left positive or negative at * 106 * the end of a session, depending on the disposition of * 107 * saved files. * 108 * - saved disk used (ULB,ULDSKUSD). The total amount of saved * 109 * disk space used by the account. This total may be in error * 110 * due to system crashes, since we have no way to set it right. * 111 * The total will be set to zero if it goes negative. * 112 * - scratch disk used (ULB,ULSCRDSK). The total amount of scratch * 113 * disk space used by the account. This total may be in error * 114 * due to operations on files with incorrect file lengths, since * 115 * we have no way to set it right. The total will be set to * 116 * zero if it goes negative. * 117 * Exceeding the limit for a space used total * 118 * will cause an error return with no total altered. * 119 * An example list of potential callers and the sense of their * 120 * adjustments: * 121 * operation PSA,PSSESLIM ULB,ULDSKUSD ULB,ULSCRDSK * 122 * (session limit) (svd dsk lim) (scratch disk limit) * 123 * SAVE scr file nc + - * 124 * UNSAVE svd file nc - + * 125 * UNEQUIP scr file - nc - * 126 * UNEQUIP saved file nc nc nc * 127 * EQUIP scr file + nc + * 128 * WRITE scr file + nc + * 129 * WRITE saved file + + nc * 130 * create dir block + + nc * 131 * XSAVE nc +new-old +old-new * 132 * * 133 * Call: * 134 * LD ULB * 135 * LD FCB * 136 * LD R1 * 137 * CALLNP LIMITCHECK * 138 * JMP * 139 * * 140 * Eats R0 thru R2. * 141 * Stack required = 1 * 142 * 1 + max ( LOCKWAIT (0) ) * 143 * * 144 ********************************************************************************** 145 146 BLOCK LIMITCHECK subroutine 147 ENTRY LIMITCHECK fiddles with the users space used totals 148 149 BEGFRAME 150 ENDFRAME 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1273 (XREQUTIL2) F 68 More Utility Routines 151 05C7B DD5F8001 6 STAK 152 LIMITCHECK ENTRNP PUSH 05C7C 60800412 2 153 LD R2 CPPSA get the current PSA pointer 154 * (for the session limit) 05C7D FA4A5C89 1 155 JLEZ R1 NOFAIL jump if giving up space 156 * check for overflow of the session limit 05C7E 60168812 0 2 BASE 157 LD R0 R2,PSSESUSD copy the session used 05C7F 18124000 0 1 REG 158 ADD R0 R1 try adding our adjustment to it 05C80 68168813 0 2 BASE 159 UCPR R0 R2,PSSESLIM check for overflow 05C81 FE045CA9 160 JGT SLIMEXCEED jump if session limits exceeded 161 * \ / 162 * check for overflow of the saved space limit 05C82 6009118E 0 4 ZBM 163 LD R0 ULB,ULDSKUSD copy the disk space in use 05C83 18124000 0 1 REG 164 ADD R0 R1 try adding our adjustment to it 05C84 6809018C 0 4 ZBM 165 UCPR R0 ULB,ULDSKSAVL check for save limit violation 05C85 FE045CAB 166 JGT FLIMEXCEED jump if saved file limit exceeded 05C86 1817080F 0 4 BASE 167 ADD R0 ULB,ULSCRDSK add in the current scratch 05C87 6809218D 0 4 ZBM 168 UCPR R0 ULB,ULDSKLIM check for overflow 05C88 FE045CA7 169 JGT ALIMEXCEED jump if account limit exceed 170 * \ / 00005C89 171 NOFAIL LABEL 05C89 60168812 0 2 BASE 172 LD R0 R2,PSSESUSD get current session 05C8A 18124000 0 1 REG 173 ADD R0 R1 update total session 05C8B 54040000 0 IMM 174 MAX R0 0 prevent negative totals 05C8C E4168812 0 2 BASE 175 ST R0 R2,PSSESUSD store changed back 05C8D 54168814 0 2 BASE 176 MAX R0 R2,PSSESMAX get the new session maximum usage 05C8E E4168814 0 2 BASE 177 ST R0 R2,PSSESMAX the new max 178 * \ / 05C8F 60096665 0 5 ZBM 179 LD R0 FCB,FCHTYPE get hardware type 05C90 64040005 0 IMM 180 CPR R0 HTYPEDIR check if it's a DIR 05C91 FE025C94 181 JEQ TYPEISDIR if so, treat it as saved 05C92 5C096415 5 ZBM 182 CMZ FCB,FCSAVED is this a saved file? 05C93 FE025C9F 183 JEQ NOTSAVED jump if not 184 * \ / adjust total saved space 00005C94 185 TYPEISDIR LABEL 186 PLOCK ULLIMLOCK critical region to update ULB limits 05C94 0CC00000 186 IOFF 05C95 D1C01EAF 186 SETT ULLIMLOCK 05C96 FE0C5C98 186 JNE MA(2+DISPW MA 0) 05C97 DC40308B 186 CALLNP LOCKWAIT 05C98 9849118E 1 4 ZBM 187 ADDM R1 ULB,ULDSKUSD update account disk space total 05C99 FE065C9B 188 JGE GOODEXIT jump if result is positive 05C9A EC09118E 4 ZBM 189 STZ ULB,ULDSKUSD set to zero used 190 * \ / 191 00005C9B 192 GOODEXIT LABEL 193 PUNLOCK ULLIMLOCK release access to critical region 05C9B EC001EAF 193 STZ ULLIMLOCK 05C9C 0C800000 193 ION 05C9D 19C40001 7 IMM 194 ADD R7 1 success return 05C9E 5D1F8001 6 STAK 195 LEAVE POP 196 * --- 197 00005C9F 198 NOTSAVED LABEL adjust total scratch space 199 PLOCK ULLIMLOCK critical region to update ULB limits 05C9F 0CC00000 199 IOFF 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1274 (XREQUTIL2) F 68 More Utility Routines 05CA0 D1C01EAF 199 SETT ULLIMLOCK 05CA1 FE0C5CA3 199 JNE MA(2+DISPW MA 0) 05CA2 DC40308B 199 CALLNP LOCKWAIT 05CA3 9857080F 1 4 BASE 200 ADDM R1 ULB,ULSCRDSK update account disk space total 05CA4 FE065C9B 201 JGE GOODEXIT jump if result is positive 05CA5 EC17080F 4 BASE 202 STZ ULB,ULSCRDSK set to zero used 05CA6 FE0E5C9B 203 JMP GOODEXIT return 204 * --- 205 206 * The account limit is being exceeded -- give error 00005CA7 207 ALIMEXCEED LABEL 05CA7 60040087 0 IMM 208 LD R0 XREQERDSKL account disk limit error 05CA8 5D1F8001 6 STAK 209 LEAVE POP 210 * --- 211 212 * The session limit is being exceeded -- give error 00005CA9 213 SLIMEXCEED LABEL 05CA9 600400C5 0 IMM 214 LD R0 XREQERESDL exceeding session disk limit 05CAA 5D1F8001 6 STAK 215 LEAVE POP 216 * --- 217 218 * The save file limit is being exceeded -- give error 00005CAB 219 FLIMEXCEED LABEL 05CAB 60040088 0 IMM 220 LD R0 XREQERISAV insufficient saved file space 05CAC 5D1F8001 6 STAK 221 LEAVE POP 222 * --- 223 224 END LIMITCHECK subroutine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1275 (XREQUTIL2) F 68 More Utility Routines 226 227 ********************************************************************************** 228 * * 229 * Routine to verify that a set contains * 230 * a valid file name and extension (i.e. no embedded blanks * 231 * and proper leading characters). * 232 * CALL CHECKNAME * 233 * PARL * 234 * * 235 * * 236 * Eats R0:R3 * 237 * Stack required = 7 * 238 * 2 + max ( CHECKSYM (5), EMBED (2) ) * 239 * * 240 ********************************************************************************** 241 242 BLOCK CHECKNAME subroutine 243 ENTRY CHECKNAME 244 245 BEGFRAME 00178801 6 BASE 246 CHECKNAMEP BSS 1 pointer to symbol 247 ENDFRAME 248 05CAD DD1F8002 6 STAK 249 CHECKNAME ENTR PUSH 05CAE C0178801 6 BASE 250 STPL SP,CHECKNAMEP remember pointer to symbol 05CAF 62178C01 016 FPVR 251 LD2 R0 @(SP,CHECKNAMEP) get name part of symbol to check 05CB0 DC005CD3 252 CALL CHECKSYM check name part 05CB1 42540000 01 PAIR 253 PARV2L PAIR R0 pass the name 05CB2 FE0E5CBC 254 JMP ERREXIT embedded blanks 05CB3 FE0E5CBC 255 JMP ERREXIT all blank 256 * the file name passes, now check the extension 05CB4 60840002 2 IMM 257 LD R2 2 get index for extension 05CB5 609D9401 2 62 FPVR 258 LD R2 @(SP,CHECKNAMEP)(R2) get the file name extension 05CB6 DC405CC0 259 CALLNP EMBED check for embedded blanks 05CB7 FE0E5CBC 260 JMP ERREXIT embedded blanks found, give error 05CB8 FEC00000 261 NOP 0 all blanks is allowed 05CB9 64840028 2 IMM 262 CPR R2 PCRAD compare against highest in radpack set 05CBA FE065CBC 263 JGE ERREXIT jump if bad show 05CBB 19C40001 7 IMM 264 ADD R7 1 advance to good return 00005CBC 265 ERREXIT LABEL 05CBC 5D1F8002 6 STAK 266 LEAVE POP return to caller 267 * --- 268 269 END CHECKNAME subroutine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1276 (XREQUTIL2) F 68 More Utility Routines 271 272 ********************************************************************************** 273 * * 274 * Routine to check for embedded blanks in a PAK6 word. * 275 * Call with R2 = the word to inspect * 276 * CALLNP EMBED (if right blanks allowed) * 277 * EMNALD (if no blanks at all allowed) * 278 * * 279 * * 280 * * 281 * R2 = RAD code for "leading" (leftmost) character * 282 * Stack required = 2 * 283 * 1 + max ( UNPACK (1) ) * 284 * * 285 ********************************************************************************** 286 287 BLOCK EMBED and EMNALD subroutines 288 ENTRY EMBED 289 ENTRY EMNALD 290 291 BEGFRAME 292 ENDFRAME 293 05CBD DD5F8001 6 STAK 294 EMNALD ENTRNP PUSH 05CBE 60440006 1 IMM 295 LD R1 6 load character count + 1 05CBF FE0E5CCA 296 JMP EMLSTB go enter loop checking for any blanks 297 * --- 298 05CC0 DD5F8001 6 STAK 299 EMBED ENTRNP PUSH 05CC1 60440005 1 IMM 300 LD R1 5 load the character count 00005CC2 301 EMBLOOP LABEL 05CC2 DC405CCD 302 CALLNP UNPACK get the next character from right 05CC3 FACC5CCA 3 303 JNEZ R3 EMLSTB jump if it's not a blank 05CC4 FA625CC2 1 304 DRJ R1 EMBLOOP count and try another 05CC5 FA8C5CCB 2 305 JNEZ R2 EMNBAL jump if left most char not blank 05CC6 19C40001 7 IMM 306 ADD R7 1 go to all blank return (single skip) 05CC7 5D1F8001 6 STAK 307 LEAVE POP 308 * --- 309 00005CC8 310 EMNLOOP LABEL 05CC8 DC405CCD 311 CALLNP UNPACK get the next character from right 05CC9 FAC25CCC 3 312 JEQZ R3 EMERR any blank now is an error 00005CCA 313 EMLSTB LABEL 05CCA FA625CC8 1 314 DRJ R1 EMNLOOP count and try another 00005CCB 315 EMNBAL LABEL 05CCB 19C40002 7 IMM 316 ADD R7 2 advance return to okay spot 00005CCC 317 EMERR LABEL 05CCC 5D1F8001 6 STAK 318 LEAVE POP return to caller 319 * --- 320 321 END EMBED and EMNALD subroutines 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1277 (XREQUTIL2) F 68 More Utility Routines 323 ********************************************************************************** 324 * * 325 * Routine to unpack a PAK6 word and give back the * 326 * next character. * 327 * Call with the PAK6 word in R2. * 328 * CALLNP UNPACK * 329 * * 330 * Stack required = 1 * 331 * * 332 ********************************************************************************** 333 334 BLOCK UNPACK subroutine 335 ENTRY UNPACK 336 337 BEGFRAME 338 ENDFRAME 339 05CCD DD5F8001 6 STAK 340 UNPACK ENTRNP PUSH 05CCE 62928000 232 REG 341 LD2 R2 R2 move to proper spot for modified divide 05CCF 58C40010 IMM 342 IORPSR PSRMODIF set modify arithmetic for remainder 05CD0 14840028 2 IMM 343 DIV R2 PCRAD unpack a single character 05CD1 58840010 IMM 344 CLBPSR PSRMODIF restore to normal 05CD2 5D1F8001 6 STAK 345 LEAVE POP 346 * --- 347 348 END UNPACK subroutine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1278 (XREQUTIL2) F 68 More Utility Routines 350 351 ********************************************************************************** 352 * * 353 * CHECKSYM. Routine to check the passed symbol for * 354 * legality. * 355 * Call: * 356 * CALL CHECKSYM * 357 * PAR2L
* 358 * * 359 * * 360 * * 361 * Eats R0:R3. * 362 * Stack required = 5 * 363 * 3 + max ( EMBED (2), EMNALD (2) ) * 364 * * 365 ********************************************************************************** 366 367 BLOCK CHECKSYM subroutine 368 ENTRY CHECKSYM 369 370 BEGFRAME 00178801 6 BASE 371 CKSYMSS BSS 2 (double) to hold the symbol 372 ENDFRAME 373 05CD3 DD1F8003 6 STAK 374 CHECKSYM ENTR PUSH 05CD4 C2578801 6 BASE 375 STPV2L SP,CKSYMSS save the symbol 05CD5 5E178801 6 BASE 376 CMZ2 SP,CKSYMSS see if symbol all blanks 05CD6 FE025CE6 377 JEQ CKSYMB return finding if so 05CD7 60978802 2 6 BASE 378 LD R2 SP,CKSYMSS(1) get the second word of the symbol 05CD8 DC405CC0 379 CALLNP EMBED check the second half 05CD9 FE0E5CE7 380 JMP CKSYME embedded blanks 05CDA FE0E5CE8 381 JMP CKSYMO all blank, check first half 05CDB 64840028 2 IMM 382 CPR R2 PCRAD see if remainder after divide... 05CDC FE065CE7 383 JGE CKSYME ...sez it's within range 05CDD 60978801 2 6 BASE 384 LD R2 SP,CKSYMSS(0) get first word 05CDE DC405CBD 385 CALLNP EMNALD no blanks allowed 05CDF FE0E5CE7 386 JMP CKSYME embedded blanks - bad 05CE0 FE0E5CE7 387 JMP CKSYME all blanks - also bad 388 * \ / 00005CE1 389 CKSYMA LABEL 05CE1 64840024 2 IMM 390 CPR R2 PCZZZ check for alphabetic first character 05CE2 FE045CE7 391 JGT CKSYME jump if not 05CE3 6484000B 2 IMM 392 CPR R2 PCAAA see if between A and Z 05CE4 FE085CE7 393 JLT CKSYME jump if not 05CE5 19C40001 7 IMM 394 ADD R7 1 good return 00005CE6 395 CKSYMB LABEL 05CE6 19C40001 7 IMM 396 ADD R7 1 00005CE7 397 CKSYME LABEL 05CE7 5D1F8003 6 STAK 398 LEAVE POP return to caller 399 * --- 400 401 * second half is blanks. Check first half with rightmost 402 * blanks allowed. 00005CE8 403 CKSYMO LABEL 05CE8 60978801 2 6 BASE 404 LD R2 SP,CKSYMSS(0) get left half of symbol 05CE9 DC405CC0 405 CALLNP EMBED check format 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1279 (XREQUTIL2) F 68 More Utility Routines 05CEA FE0E5CE7 406 JMP CKSYME embedded blanks - bad 05CEB FE0E5CE7 407 JMP CKSYME all blanks - odd 05CEC FE0E5CE1 408 JMP CKSYMA check first characters 409 * --- 410 411 END CHECKSYM subroutine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1280 (XREQUTIL2) F 68 More Utility Routines 413 414 ********************************************************************************** 415 * * 416 * FNDMGRD/FNDMGRDP routines. These routines are * 417 * specifically designed to find the manager ULBs given * 418 * the victim ULB. The routines will find either the * 419 * or
manager. Note that it is possible * 420 * for an account not to have a manager, in * 421 * which case the
manager is found. Call: * 422 * * 423 * ULB <= subordinate account ULB * 424 * CALLNP FNDMGRD/FNDMGRDP * 425 * ST ULB <= pointer to manager ULB, if any * 426 * * 427 * Eats R0:R2. Sets ULB. * 428 * Stack required = 16 * 429 * 2 + max ( FINDULB (14), GETPKTEMP (2), SFREEMEM (0) ) * 430 * * 431 ********************************************************************************** 432 433 BLOCK FNDMGRD/FNDMGRDP subroutines 434 ENTRY FNDMGRD 435 ENTRY FNDMGRDP 436 437 BEGFRAME 00178801 6 BASE 438 SAVEFCB BSS 1 save FCB pointer here 439 ENDFRAME 440 00000010 BYTE 441 DIVFLAG EQU BIT 0
/ flag in R7 442 05CED DD5F8002 6 STAK 443 FNDMGRD ENTRNP PUSH 05CEE EDCBC010 7 CBM 444 STW R7/DIVFLAG search for
manager 05CEF FE0E5CF2 445 JMP SHRFNDMGR share code 446 * --- 447 05CF0 DD5F8002 6 STAK 448 FNDMGRDP ENTRNP PUSH 05CF1 EC0BC010 7 CBM 449 STZ R7/DIVFLAG search for manager 450 * \ / 00005CF2 451 SHRFNDMGR LABEL 05CF2 60970804 2 4 BASE 452 LD R2 ULB,ULACCPROJ fetch the name 05CF3 E5578801 5 6 BASE 453 ST FCB SP,SAVEFCB save away FCB pointer 05CF4 DC4059FA 454 CALLNP GETPKTEMP get temporary equip block 05CF5 62002556 01 455 LD2 R0 RADMANAGER PAK12 representation of MANAGER 05CF6 E6174806 015 BASE 456 ST2 R0 EQT,EQACCT and store into the account name 05CF7 EC174803 5 BASE 457 STZ EQT,EQSYSTEM zap this field, for FINDULB 05CF8 F3C05CFD 7 458 JBF R7/DIVFLAG SKIPFUSS do not isolate the division name 05CF9 608A8170 2 2 CBM 459 LD R2 R2/DVSNPART1 hack out the project name 05CFA 1484007D 2 IMM 460 DIV R2 DVSNPART2 that should do it 05CFB 1C84007D 2 IMM 461 MUL R2 DVSNPART2 restore to proper format 05CFC 608A9200 2 2 CBM 462 LD R2 R2*DVSNPART1 division name has been exorcised 463 * \ / 00005CFD 464 SKIPFUSS LABEL 05CFD E4974808 2 5 BASE 465 ST R2 EQT,EQACCTPROJ place into the equip buffer 05CFE 38970802 2 4 BASE 466 LEA R2 ULB,ULACCNM address account name 05CFF EC130000 4 REG 467 STZ ULB indicate no one found so far 05D00 6044000C 1 IMM 468 LD R1 3*CPW 12 character search 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1281 (XREQUTIL2) F 68 More Utility Routines 05D01 38174806 0 5 BASE 469 LEA R0 EQT,EQACCT name of possible manager 05D02 FE540000 470 CMS one in the same 05D03 FE025D05 471 JEQ SAMEDUDE jump if matched 05D04 DC405574 472 CALLNP FINDULB see if the account exists 473 * \ / 00005D05 474 SAMEDUDE LABEL 05D05 DC002F5D 475 CALL SFREEMEM return the equip buffer 05D06 41440004 IMM 476 PARV EQTEMPLOG log of the block size 05D07 40534000 5 REG 477 PARVL EQT address of the block 05D08 61578801 5 6 BASE 478 LD FCB SP,SAVEFCB restore the FCB pointer 05D09 5D1F8002 6 STAK 479 LEAVE POP 480 * --- 481 482 END FNDMGRD/FNDMGRDP subroutines 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1282 (XREQUTIL2) F 68 More Utility Routines 484 485 ********************************************************************************** 486 * * 487 * PRESETAUTH. Get access to authorization list. * 488 * Read in the auth block and generate a pointer to it. * 489 * The disk error address is set to DISKBURPX. WINDO1 is * 490 * used and the auth block is there if needed. The * 491 * information on return depends on the privileges of * 492 * the requesting account. If a volume name is * 493 * specified, then the authlist is searched for a * 494 * matching entry, if one exists. Note the fancy footwork * 495 * where the manager ULB matches the victim ULB. This * 496 * simply means that someone is fooling with a manager * 497 * account and we want to be damn sure we fetch the * 498 * correct authlist. On all returns except the last, * 499 * the ULB has been released and the window grubbed. * 500 * Call: * 501 * * 502 * ULB <= ULB of victim account * 503 * CALL PRESETAUTH * 504 * PARV * 505 * PARV2L * 506 * JMP * 507 * JMP * 508 * JMP * 509 * R3 <= authlist entry (DIR locked), ULB <= manager ULB * 510 * * 511 * Eats R0:R2, Sets R3, ULB * 512 * Stack required = 21 * 513 * 5 + max ( FNDMGRD (16), FNDMGRDP (16), FREEDIR (5), * 514 * FREEULB (11), GETAUTHN (12), GRUBWNDO1 (7) ) * 515 * * 516 ********************************************************************************** 517 518 BLOCK PRESETAUTH subroutine 519 ENTRY PRESETAUTH 520 521 BEGFRAME 00178801 6 BASE 522 TWIDDLEBITS BSS 1 manager power bits 00178802 6 BASE 523 VOLNAME BSS2 1 volume name 00178804 6 BASE 524 VICTIMULB BSS 1 victim ULB pointer 525 ENDFRAME 526 05D0A DD1F8005 6 STAK 527 PRESETAUTH ENTR PUSH 05D0B C1578801 6 BASE 528 STPV SP,TWIDDLEBITS save manager power bits 05D0C C2578802 6 BASE 529 STPV2L SP,VOLNAME get the volume name 530 * \ / 05D0D E5178804 4 6 BASE 531 ST ULB SP,VICTIMULB save victim ULB pointer 05D0E DC405CF0 532 CALLNP FNDMGRDP find manager 05D0F FB305D19 4 533 JZA ULB TRYDIVMGR jump if NOT found 534 * \ / 05D10 60538000 1 6 REG 535 LD R1 SP copy stack register for subroutine call 05D11 DC009CE0 536 CALL GETAUTHN search the auth list 05D12 43564802 1 BASE 537 PARV2 R1,VOLNAME pass the volume name 05D13 40005D2C 538 PARL DISKBURPX where for disk error 05D14 FE0E5D2A 539 JMP PRESAUTHZ acct needs no authorization 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1283 (XREQUTIL2) F 68 More Utility Routines 05D15 FE0E5D17 540 JMP TRYDIVMGRF not found, attempt tp find the
manager 05D16 FE0E5D25 541 JMP PRESFOUND found the right manager 542 * --- 543 00005D17 544 TRYDIVMGRF LABEL 05D17 DC405526 545 CALLNP FREEULB release access to the managers ULB 05D18 EC130000 4 REG 546 STZ ULB so we don't free it twice 547 * \ / 00005D19 548 TRYDIVMGR LABEL 05D19 60178801 0 6 BASE 549 LD R0 SP,TWIDDLEBITS get the manager power bits 05D1A 78040007 0 IMM 550 AND R0 (1*CCBPRJFRC)-1 and off bits and below 05D1B FA025D2B 0 551 JEQZ R0 PRESAUTHN jump if no authority 05D1C 61178804 4 6 BASE 552 LD ULB SP,VICTIMULB restore victim ULB 05D1D DC405CED 553 CALLNP FNDMGRD find
manager 05D1E FB305D27 4 554 JZA ULB TRYSUPER see if we are a super account 555 * \ / 05D1F 60538000 1 6 REG 556 LD R1 SP copy stack register for subroutine call 05D20 DC009CE0 557 CALL GETAUTHN search the auth list 05D21 43564802 1 BASE 558 PARV2 R1,VOLNAME pass the volume name 05D22 40005D2C 559 PARL DISKBURPX where for disk error 05D23 FE0E5D2A 560 JMP PRESAUTHZ acct needs no authorization 05D24 FE0E5D27 561 JMP TRYSUPER not found, see if requester is super account 562 * \ / 00005D25 563 PRESFOUND LABEL 05D25 19C40003 7 IMM 564 ADD R7 3 normal return 565 * \ / 00005D26 566 PRESEXIT LABEL 05D26 5D1F8005 6 STAK 567 LEAVE POP return 568 * --- 569 00005D27 570 TRYSUPER LABEL 05D27 60178801 0 6 BASE 571 LD R0 SP,TWIDDLEBITS get the manager power bits 05D28 78040003 0 IMM 572 AND R0 (1*CCBDIVFRC)-1 and off normal manager bits 05D29 FA025D2B 0 573 JEQZ R0 PRESAUTHN jump if requester is no one special 574 * \ / 00005D2A 575 PRESAUTHZ LABEL requester is super account 05D2A 61D7D001 7 7 REG 576 LD R7 R7+1 advance the return address 577 * \ / 00005D2B 578 PRESAUTHN LABEL no authlist could be found 05D2B FBE05D2E 7 579 IRJ R7 SHAREXIT no found return 580 * --- 581 00005D2C 582 DISKBURPX LABEL disk structure error 05D2C DC405685 583 CALLNP FREEDIR unlock directory 05D2D DC403150 584 CALLNP GRUBWNDO1 release mapping of window 1 585 * \ / 586 00005D2E 587 SHAREXIT LABEL 05D2E FB305D31 4 588 JZA ULB SKIPWORK if no ULB, not necessary to free 05D2F DC405526 589 CALLNP FREEULB decrement use count of manager 05D30 EC130000 4 REG 590 STZ ULB indicate no working ULB 591 * \ / 592 00005D31 593 SKIPWORK LABEL 05D31 EC12C000 3 REG 594 STZ R3 indicate no authlist 05D32 FE0E5D26 595 JMP PRESEXIT leave 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1284 (XREQUTIL2) F 68 More Utility Routines 596 * --- 597 598 END PRESETAUTH subroutine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1285 (XREQUTIL2) F 68 More Utility Routines 600 601 ********************************************************************************** 602 * * 603 * This is the FNDNONHOLE routine. It basically starts * 604 * at the current position pointer and searches for the next * 605 * non-hole page. This routine works for both RAF and CODE * 606 * type files. It is the callers responsibility to setup * 607 * FCCPP in the FCB prior to calling this routine. If no * 608 * block is found EOD status is set in the FCB. On return * 609 * R1 contains the found block number and R0 contains the * 610 * index into the current minor access block. These values * 611 * are necessary for backup to setup for the next read and * 612 * prefetchable blocks. * 613 * Call: * 614 * FCB <= file control block * 615 * CALLNP FNDNONHOLE * 616 * JMP * 617 * JMP * 618 * return R0=index, R1=disk address * 619 * * 620 * Eats R0:R4 * 621 * Stack required = 8 * 622 * 1 + max ( GRUBWNDOx (7), SETWNDOx (4) ) * 623 * * 624 ********************************************************************************** 625 626 BLOCK FNDNONHOLE routine 627 ENTRY FNDNONHOLE 628 629 BEGFRAME 630 ENDFRAME 631 05D33 DD5F8001 6 STAK 632 FNDNONHOLE ENTRNP PUSH 05D34 60096665 0 5 ZBM 633 LD R0 FCB,FCHTYPE get the type 05D35 64040003 0 IMM 634 CPR R0 HTYPECODE is it a CODE? 05D36 FE0C5D47 635 JNE LOOKATRAF jump if not 636 * \ / 637 638 * unit is a CODE file 05D37 60097182 0 5 ZBM 639 LD R0 FCLPBLK load point block 05D38 E4095181 0 5 ZBM 640 ST R0 FCB,FCMSBLK 05D39 DC003205 641 CALL SETWNDO1 map in CCB 05D3A 41440001 IMM 642 PARV VPCNTLRO read only 05D3B 41534000 5 REG 643 PARV FCB lun 05D3C 41005D86 644 PAR GIVEDSE where to go on error 05D3D 41574801 5 BASE 645 PARV FCB,FCBLOCK disk address 05D3E 40440013 IMM 646 PARVL FBITCCB type expected 05D3F 600954A8 0 5 ZBM 647 LD R0 FCB,FCCPP/RAFMININDX get current position 648 * \ / 649 00005D40 650 LOOKLOOP LABEL 05D40 60600800 1 0 651 LD R1 WNDO1(R0) address of data page 05D41 FA4C5D83 1 652 JNEZ R1 BLOCKFND jump if found data page 05D42 BC0954A8 0 5 ZBM 653 INCL R0 FCB,FCCPP/RAFMININDX next pointer 05D43 640403E8 0 IMM 654 CPR R0 CCBMAXPAGE all pointers done? 05D44 FE085D40 655 JLT LOOKLOOP try next if not 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1286 (XREQUTIL2) F 68 More Utility Routines 05D45 DC403150 656 CALLNP GRUBWNDO1 completely done with this CCB 05D46 FE0E5D80 657 JMP GIVEEOD done, go finish up 658 * --- 659 00005D47 660 LOOKATRAF LABEL 05D47 5C174808 5 BASE 661 CMZ FCB,FCCPP is current position pointer zero 05D48 FE0C5D4B 662 JNE NOWRAPS jump if wrap around impossible 05D49 5C094C15 5 ZBM 663 CMZ FCB,FCLOADPT are we offically at load point? 05D4A FE025D80 664 JEQ GIVEEOD return EOD if wrap around occurred 665 * \ / 666 00005D4B 667 NOWRAPS LABEL 05D4B 60096183 0 5 ZBM 668 LD R0 FCB,FCMABLK major access block 05D4C FA0C5D64 0 669 JNEZ R0 LARGEONE if zero, not large RAF 670 * \ / 05D4D 60097182 0 5 ZBM 671 LD R0 FCB,FCLPBLK 05D4E FA025D5E 0 672 JEQZ R0 MUSTBETRAF jump if we are dealing with a tiny RAF 05D4F E4095181 0 5 ZBM 673 ST R0 FCB,FCMSBLK make current position 05D50 DC003205 674 CALL SETWNDO1 map in minor access block 05D51 41440001 IMM 675 PARV VPCNTLRO read only 05D52 41534000 5 REG 676 PARV FCB lun associated 05D53 41005D86 677 PAR GIVEDSE where to go on error 05D54 41574801 5 BASE 678 PARV FCB,FCBLOCK disk address 05D55 4044000E IMM 679 PARVL FBITSRAF type expected 05D56 600954A8 0 5 ZBM 680 LD R0 FCB,FCCPP/RAFMININDX current position 681 * \ / 682 00005D57 683 KEEPLOOKIN LABEL 05D57 60600800 1 0 684 LD R1 WNDO1(R0) get pointer 05D58 FA4C5D83 1 685 JNEZ R1 BLOCKFND is there a data block? 05D59 BC0954A8 0 5 ZBM 686 INCL R0 FCB,FCCPP/RAFMININDX get next pointer position 05D5A 64040400 0 IMM 687 CPR R0 WPP have we got all of the data? 05D5B FE085D57 688 JLT KEEPLOOKIN look for next data block if not done 05D5C DC403150 689 CALLNP GRUBWNDO1 completely done with this minor access block 05D5D FE0E5D80 690 JMP GIVEEOD done, go finish up 691 * --- 692 00005D5E 693 MUSTBETRAF LABEL 05D5E 5C095181 5 ZBM 694 CMZ FCB,FCMSBLK is there anything here? 05D5F FE025D80 695 JEQ GIVEEOD if not, then end of data 05D60 5C0954A8 5 ZBM 696 CMZ FCB,FCCPP/RAFMININDX are we beyond block 0? 05D61 FE0C5D80 697 JNE GIVEEOD done if so 05D62 60440000 1 IMM 698 LD R1 0 indicate nothing to prefetch 05D63 FE0E5D83 699 JMP BLOCKFND done here 700 * --- 701 00005D64 702 LARGEONE LABEL 05D64 E4095181 0 5 ZBM 703 ST R0 FCB,FCMSBLK major index is current position 05D65 DC0031FF 704 CALL SETWNDO2 map in major index 05D66 41440001 IMM 705 PARV VPCNTLRO read only 05D67 41534000 5 REG 706 PARV FCB lun associated 05D68 41005D85 707 PAR GIVEDSE2 where to go on errors 05D69 41574801 5 BASE 708 PARV FCB,FCBLOCK disk address 05D6A 4044000D IMM 709 PARVL FBITLRAF type expected 05D6B 600940A8 0 5 ZBM 710 LD R0 FCB,FCCPP/RAFMAJINDX current pointer in major index 711 * \ / 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1287 (XREQUTIL2) F 68 More Utility Routines 712 00005D6C 713 LARGELOOK LABEL 05D6C 60600C00 1 0 714 LD R1 WNDO2(R0) current major index 05D6D FA425D7C 1 715 JEQZ R1 CONTMJSCAN jump if no block here, continue scan 716 * \ / 05D6E E4495181 1 5 ZBM 717 ST R1 FCB,FCMSBLK make current position 05D6F DC003205 718 CALL SETWNDO1 map in a minor index 05D70 41440001 IMM 719 PARV VPCNTLRO read only 05D71 41534000 5 REG 720 PARV FCB lun associated 05D72 41005D85 721 PAR GIVEDSE2 where to go on error 05D73 41574801 5 BASE 722 PARV FCB,FCBLOCK disk address 05D74 4044000E IMM 723 PARVL FBITSRAF type expected 05D75 600954A8 0 5 ZBM 724 LD R0 FCB,FCCPP/RAFMININDX 725 * \ / 726 00005D76 727 PAGELOOP LABEL 05D76 60600800 1 0 728 LD R1 WNDO1(R0) get pointer 05D77 FA4C5D83 1 729 JNEZ R1 BLOCKFND jump if page here 730 * \ / 05D78 BC0954A8 0 5 ZBM 731 INCL R0 FCB,FCCPP/RAFMININDX next pointer 05D79 64040400 0 IMM 732 CPR R0 WPP all pointers done? 05D7A FE085D76 733 JLT PAGELOOP jump if not 05D7B DC403150 734 CALLNP GRUBWNDO1 completely done with this minor access block 735 * \ / 736 00005D7C 737 CONTMJSCAN LABEL 05D7C BC0940A8 0 5 ZBM 738 INCL R0 FCB,FCCPP/RAFMAJINDX next pointer 05D7D 64040400 0 IMM 739 CPR R0 WPP all pointers checked 05D7E FE085D6C 740 JLT LARGELOOK jump if not 05D7F DC403153 741 CALLNP GRUBWNDO2 get rid of major access block 742 * \ / 743 00005D80 744 GIVEEOD LABEL 05D80 60040009 0 IMM 745 LD R0 FILNEOD code for normal EOD 05D81 E4094445 0 5 ZBM 746 ST R0 FCB,FCLASTREAD put in status 00005D82 747 BUMPR7 LABEL 05D82 FBE05D87 7 748 IRJ R7 FNDNHEXIT advance R7 by 1 749 * --- 750 00005D83 751 BLOCKFND LABEL 05D83 EC094445 5 ZBM 752 STZ FCB,FCLASTREAD return good status 05D84 FBE05D82 7 753 IRJ R7 BUMPR7 advance R7 by 2 754 * --- 755 00005D85 756 GIVEDSE2 LABEL 05D85 DC403153 757 CALLNP GRUBWNDO2 flush the major access block 758 * \ / 759 00005D86 760 GIVEDSE LABEL 05D86 DC403150 761 CALLNP GRUBWNDO1 clean up 00005D87 762 FNDNHEXIT LABEL 05D87 5D1F8001 6 STAK 763 LEAVE POP return to caller 764 * --- 765 766 END FNDNONHOLE routine 767 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1288 (XREQUTIL2) F 68 More Utility Routines 768 769 END More Utility Routines 112 INPUT UCEFCBUTIL utilities to deal with UCEs and FCBs 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1289 (UCEFCBUTIL) F 69 Assorted utility routines for UCEs and FCBs 3 4 BLOCK UCE and FCB utilities 5 6 ENTRY CNTFCBUSER to increment and check FCB usecount 7 ENTRY GETVGNFCB to create an initial FCB 8 ENTRY LINKUCEIN to add UCE to UPC or PSA list 9 ENTRY LINKFCBIN to add FCB to current PSA list 10 ENTRY UNLINKUCE to remove UCE from UPC or PSA list 11 ENTRY UNLINKFCB to remove FCB from PSA list 12 13 ********************************************************************************** 14 * * 15 * GETVGNFCB. Get virgin file control block. * 16 * This routine returns with a pointer to a new file * 17 * control block in FCB (R5). The file control block is mostly * 18 * zeroed but some useful things are put here and there. Note * 19 * the check to see if enough user memory exists to open another * 20 * unit. CPPSA must be current and have his user memory mapped! * 21 * Call: * 22 * CALLNP GETVGNFCB * 23 * JMP error, R0 <= error code * 24 * * 25 * Eats R0:R1. Sets R5. * 26 * Stack required = 2 * 27 * 1 + max ( FCGETMEM (0), ZEROIT (1) ) * 28 * * 29 ********************************************************************************** 30 31 BLOCK GETVGNFCB subroutine 32 ENTRY GETVGNFCB 33 34 BEGFRAME 35 ENDFRAME 36 05D88 DD5F8001 6 STAK 37 GETVGNFCB ENTRNP PUSH 05D89 60000412 0 38 LD R0 CPPSA current process status area pointer 05D8A 60440003 1 IMM 39 LD R1 MAXMAPVALS-1 index to check user pages 40 * \ / 41 00005D8B 42 CKMEMLOOP LABEL 05D8B 5C1C081B 01 BASE 43 CMZ R0,PSMAPVALS(R1) is this page available? 05D8C FE025D91 44 JEQ HAVEUMEM jump if enough memory exists 05D8D FA665D8B 1 45 JDR R1 CKMEMLOOP continue through all the pages 46 * \ / 47 48 * Less than a page exists, check if at least a quarter page 05D8E 6001F009 0 49 LD R0 USERMEM( 512 LOG 2 ) pointer to half pages 05D8F 7C01F008 0 50 IOR R0 USERMEM( 256 LOG 2 ) or pointer to quarter pages 05D90 FA305D9D 0 51 JZA R0 NOUMEM jump if insufficient system resources 52 * \ / 53 54 * Enough free storage to create FCB 00005D91 55 HAVEUMEM LABEL 05D91 DC002F0A 56 CALL FCGETMEM get a block of memory 05D92 40440004 IMM 57 PARVL FCLOG log base 2 of the block size 05D93 E4134000 0 5 REG 58 ST R0 FCB copy pointer to proper place 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1290 (UCEFCBUTIL) F 69 Assorted utility routines for UCEs and FCBs 05D94 DC003090 59 CALL ZEROIT initialize to zeros 05D95 41174800 5 BASE 60 PAR FCB,0 05D96 40440010 IMM 61 PARVL 2 POWER FCLOG 05D97 6004000F 0 IMM 62 LD R0 FSPRIVNOT indicate no privileges 05D98 E4094E45 0 5 ZBM 63 ST R0 FCB,FCPRIV 05D99 60040007 0 IMM 64 LD R0 FSACSNDA default to no data access 05D9A E4095835 0 5 ZBM 65 ST R0 FCB,FCACCESS 05D9B 19C40001 7 IMM 66 ADD R7 1 advance to good return 67 * \ / 68 00005D9C 69 SLUTEXIT LABEL 05D9C 5D1F8001 6 STAK 70 LEAVE POP return 71 * --- 72 00005D9D 73 NOUMEM LABEL 05D9D 60040093 0 IMM 74 LD R0 XREQERISYR insufficient system resources 05D9E FE0E5D9C 75 JMP SLUTEXIT not a virgin anymore 76 * --- 77 78 END GETVGNFCB subroutine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1291 (UCEFCBUTIL) F 69 Assorted utility routines for UCEs and FCBs 80 81 ********************************************************************************** 82 * * 83 * CNTFCBUSER. This subroutine increments the use counter of the * 84 * specified file control block. A check is made to ensure that * 85 * this count does not overflow. Since more than one CPU may be * 86 * doing this sort of thing, the maximum use count is set down * 87 * by the number of CPUs on the system to provide adequate leeway. * 88 * Call: * 89 * FCB => file control block * 90 * CALLNP CNTFCBUSER * 91 * * 92 * * 93 * * 94 * Eats R0 (or sets it on bad return) * 95 * Stack usage: 1 * 96 * * 97 ********************************************************************************** 98 99 BLOCK CNTFCBUSER subroutine 100 ENTRY CNTFCBUSER 101 102 BEGFRAME 103 ENDFRAME 104 05D9F DD5F8001 6 STAK 105 CNTFCBUSER ENTRNP PUSH 05DA0 BC094080 0 5 ZBM 106 INCL R0 FCB,FCBUSYCNT say one more user of FCB 05DA1 640400F0 0 IMM 107 CPR R0 (2 POWER 8)-16 check against allowed max 05DA2 FE065DA5 108 JGE BADNEWS oh no! 05DA3 19C40001 7 IMM 109 ADD R7 1 make a good return 00005DA4 110 BYE LABEL 05DA4 5D1F8001 6 STAK 111 LEAVE POP return 112 * --- 113 00005DA5 114 BADNEWS LABEL 05DA5 D0494080 5 ZBM 115 DEC FCB,FCBUSYCNT return count to normalcy 05DA6 60040093 0 IMM 116 LD R0 XREQERISYR "insufficient system resources" 05DA7 FE0E5DA4 117 JMP BYE bye now! 118 * --- 119 120 END 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1292 (UCEFCBUTIL) F 69 Assorted utility routines for UCEs and FCBs 122 123 ********************************************************************************** 124 * * 125 * LINKFCBIN. This subroutine adds the given file control block to * 126 * the head of the list on the current session. * 127 * Call: CALL LINKFCBIN * 128 * PARVL * 129 * * 130 * Eats R0:R2 * 131 * Stack Usage: 1 * 132 * * 133 ********************************************************************************** 134 135 BLOCK LINKFCBIN subroutine 136 ENTRY LINKFCBIN 137 138 BEGFRAME 139 ENDFRAME 140 05DA8 DD1F8001 6 STAK 141 LINKFCBIN ENTR PUSH 05DA9 C0520000 0 REG 142 STPVL R0 fetch FCB address 05DAA 5C080080 0 ZBM 143 CMZ R0,FCBUSYCNT make sure someone is pointing 05DAB FE045DAD 144 JGT JUSTGREAT roger, that's AOK 05DAC 001311F0 145 HALT HALTS11F0 FCB being added with bad use count 00005DAD 146 JUSTGREAT LABEL 05DAD 60800412 2 147 LD R2 CPPSA get current session 05DAE 60489F17 1 2 ZBM 148 LD R1 R2,PSFCBLIST R1 => existing list 05DAF E4481F10 1 0 ZBM 149 ST R1 R0,FCLINK tack list after new FCB 05DB0 E4089F17 0 2 ZBM 150 ST R0 R2,PSFCBLIST make new one the head 05DB1 5D1F8001 6 STAK 151 LEAVE POP 152 * --- 153 154 END LINKFCBIN subroutine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1293 (UCEFCBUTIL) F 69 Assorted utility routines for UCEs and FCBs 156 157 ********************************************************************************** 158 * * 159 * LINKUCEIN adds the given UCE to either the global list of the * 160 * given PSA or to the local unit list of the given UPC. It goes * 161 * on the former if the unit number is in the global range, or in the * 162 * UPC list if it is in the local range. It is used when the UCE * 163 * already exists pointing to an FCB, and is simply being placed * 164 * on a list. The FCB busy counter is not changed. It is assumed * 165 * that the unit number field in the UCE is initialized and correct. * 166 * Either of the last two parameters may be 0 (NOT both!) if the * 167 * caller has ensured that the UCE will go on the OTHER list. * 168 * N.B. It is assumed that the caller has handled this correctly, * 169 * errors result in 'illegal to reference' halts. * 170 * Call: * 171 * CALL LINKUCEIN * 172 * PARV
* 173 * PARV
* 174 * PARVL
* 175 * * 176 * Eats R0:R2 * 177 * Stack required: 3 * 178 * * 179 ********************************************************************************** 180 181 BLOCK LINKUCEIN subroutine 182 ENTRY LINKUCEIN 183 184 BEGFRAME 00178801 6 BASE 185 UCEADR BSS 1 save for UCE address 00178802 6 BASE 186 UPCADR BSS 1 save for UPC address 187 ENDFRAME 188 05DB2 DD1F8003 6 STAK 189 LINKUCEIN ENTR PUSH 05DB3 C1578801 6 BASE 190 STPV SP,UCEADR save UCE address 05DB4 C1578802 6 BASE 191 STPV SP,UPCADR save UPC address 05DB5 C0524000 1 REG 192 STPVL R1 R1 = PSA address 193 194 * is the unit to be local or global? 05DB6 60978801 2 6 BASE 195 LD R2 SP,UCEADR get UCE address 05DB7 60088080 0 2 ZBM 196 LD R0 R2,UCEUNIT get the unit number 05DB8 64040064 0 IMM 197 CPR R0 MAXLOCAL check against highest local 05DB9 FE045DBF 198 JGT ITSGLOBAL jump if UCE goes on global list 199 * \ / 200 201 * unit number says we put UCE at head of local list of given UPC 05DBA 60578802 1 6 BASE 202 LD R1 SP,UPCADR R1 = UPC address 05DBB 60085F15 0 1 ZBM 203 LD R0 R1,UPCUNITS get head of unit list 05DBC E4089F10 0 2 ZBM 204 ST R0 R2,UCELINK link behind our UCE 05DBD E4885F15 2 1 ZBM 205 ST R2 R1,UPCUNITS make ours the head 05DBE FE0E5DC2 206 JMP OUT exit 207 * --- 208 209 * the unit number is in the range for global units, R1 => PSA 00005DBF 210 ITSGLOBAL LABEL 05DBF 60086316 0 1 ZBM 211 LD R0 R1,PSUNITS get head of global unit list 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1294 (UCEFCBUTIL) F 69 Assorted utility routines for UCEs and FCBs 05DC0 E4089F10 0 2 ZBM 212 ST R0 R2,UCELINK link behind our UCE 05DC1 E4886316 2 1 ZBM 213 ST R2 R1,PSUNITS make ours the head 00005DC2 214 OUT LABEL 05DC2 5D1F8003 6 STAK 215 LEAVE POP bye! 216 * --- 217 218 END LINKUCEIN routine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1295 (UCEFCBUTIL) F 69 Assorted utility routines for UCEs and FCBs 220 221 ********************************************************************************** 222 * Routine unlinks an FCB from the LUNLIST. * 223 * Call: * 224 * FCB => element to be removed * 225 * CALLNP UNLINKFCB * 226 * Eats R0:R3 * 227 * Stack required = 1 * 228 * * 229 ********************************************************************************** 230 231 BLOCK UNLINKFCB subroutine 232 ENTRY UNLINKFCB 233 234 BEGFRAME 235 ENDFRAME 236 05DC3 DD5F8001 6 STAK 237 UNLINKFCB ENTRNP PUSH 05DC4 60C00412 3 238 LD R3 CPPSA fetch the PSA pointer 05DC5 60095F10 0 5 ZBM 239 LD R0 FCB,FCLINK load pointer out of current element 05DC6 6088DF17 2 3 ZBM 240 LD R2 R3,PSFCBLIST get pointer to first element in FCBLIST 05DC7 64934000 2 5 REG 241 CPR R2 FCB is our element first in the list? 05DC8 FE0C5DCB 242 JNE FRUYNFE jump if not first 05DC9 E408DF17 0 3 ZBM 243 ST R0 R3,PSFCBLIST delink our element 05DCA FE0E5DCF 244 JMP FRUYFRE continue 245 * --- 246 00005DCB 247 FRUYNFE LABEL not first in list 05DCB 3D489F10 5 2 ZBM 248 LSRCH FCB R2,FCLINK search for pointer to this element 05DCC FE025DCE 249 JEQ FRUYFOK jump if element found 05DCD 00131199 250 HALT HALTS1199 list went bad 251 * --- 252 00005DCE 253 FRUYFOK LABEL 05DCE E4089F10 0 2 ZBM 254 ST R0 R2,FCLINK jumper list around current element 00005DCF 255 FRUYFRE LABEL 05DCF 5D1F8001 6 STAK 256 LEAVE POP return 257 * --- 258 259 END UNLINKFCB subroutine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1296 (UCEFCBUTIL) F 69 Assorted utility routines for UCEs and FCBs 261 262 ********************************************************************************** 263 * * 264 * UNLINKUCE unlinks the UCE with the specified unit number from * 265 * the current PSA or UPC list. It does not decrement the use count * 266 * in the FCB. * 267 * Call: * 268 * CALL UNLINKUCE * 269 * PARVL * 270 * * 271 * Eats R1:R3, returns R0 => unlinked UCE * 272 * Stack required: 1 * 273 * * 274 ********************************************************************************** 275 276 BLOCK UNLINKUCE subroutine 277 278 ENTRY UNLINKUCE 279 280 BEGFRAME 281 ENDFRAME 282 05DD0 DD1F8001 6 STAK 283 UNLINKUCE ENTR PUSH 05DD1 C052C000 3 REG 284 STPVL R3 keep the unit number 05DD2 64C40064 3 IMM 285 CPR R3 MAXLOCAL need to know which list to check 05DD3 FE0A5DDE 286 JLE ITSLOCAL jump if it's a local unit 287 * \ / 288 289 * it's got to be in the global list 05DD4 60800412 2 290 LD R2 CPPSA get current PSA 05DD5 6008A316 0 2 ZBM 291 LD R0 R2,PSUNITS get head of global list 05DD6 60440000 1 IMM 292 LD R1 0 prep for RLSRCH 05DD7 48C80080 3 0 ZBM 293 RLSRCH R3 R0,UCEUNIT find the one before ours 05DD8 FE0C5DDD 294 JNE NOFINDUCE jump if not in list 05DD9 60C81F10 3 0 ZBM 295 LD R3 R0,UCELINK get our man's link 05DDA FA725DE7 1 296 JNZA R1 FOUND1 jump if he wasn't list head 297 * \ / 298 05DDB E4C8A316 3 2 ZBM 299 ST R3 R2,PSUNITS give list a new head 05DDC FE0E5DE8 300 JMP UCEGONE jump to leave good registers 301 * --- 302 00005DDD 303 NOFINDUCE LABEL 05DDD 00131198 304 HALT HALTS1198 UCE must exist, not found in either list 305 * --- 306 307 * UCE must be in local list 00005DDE 308 ITSLOCAL LABEL search through the UPCs UCE list 05DDE 60800414 2 309 LD R2 CPCUPC get pointer to current underprocess 05DDF 60089F15 0 2 ZBM 310 LD R0 R2,UPCUNITS get head of local list 05DE0 60440000 1 IMM 311 LD R1 0 prep for RLSRCH 05DE1 48C80080 3 0 ZBM 312 RLSRCH R3 R0,UCEUNIT find one before ours 05DE2 FE0C5DDD 313 JNE NOFINDUCE jump if no UCE with our number 05DE3 60C81F10 3 0 ZBM 314 LD R3 R0,UCELINK load our man's link 05DE4 FA725DE7 1 315 JNZA R1 FOUND1 jump if he's not the list head 05DE5 E4C89F15 3 2 ZBM 316 ST R3 R2,UPCUNITS give list a new head 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1297 (UCEFCBUTIL) F 69 Assorted utility routines for UCEs and FCBs 05DE6 FE0E5DE8 317 JMP UCEGONE jump to leave good registers 318 * --- 319 320 * a UCE was found that had the desired unit number 00005DE7 321 FOUND1 LABEL R0 => our UCE, R1 => prev element 05DE7 E4C85F10 3 1 ZBM 322 ST R3 R1,UCELINK move list ahead of our UCE 323 * \ / 324 325 * UCE is unlinked 00005DE8 326 UCEGONE LABEL 05DE8 5D1F8001 6 STAK 327 LEAVE POP R0 => UCE 328 * --- 329 330 END UNLINKUCE routine 331 332 END UCE and FCB utilities 113 INPUT SPLRTALK spooler communication routine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1298 (SPLRTALK) F 70 Spooler communication for FREQs 3 4 BLOCK 5 6 ********************************************************************************** 7 * * 8 * Routine to aid the FREQs in communicating with the spooler. * 9 * These routines use the same interface instructions as the user's * 10 * can (XREQs) and thus may be suspended and interrupted. * 11 * * 12 ********************************************************************************** 13 14 ENTRY SPLRFIND return the handle to the spooler 15 ENTRY SPLRIGNR tell the spooler to ignore request 16 ENTRY SPLRINIT find spooler and initialize talking 17 ENTRY SPLRRECV receive a class zero message from spooler 18 ENTRY SPLRSEND send a record to the spooler 19 ENTRY SPLRCLOSE tell the spooler done with a file 20 ENTRY UNSPLRINIT undo initialization of SPLRINIT 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1299 (SPLRTALK) F 70 Spooler communication for FREQs 22 23 BLOCK 24 25 ENTRY SPLRFIND 26 27 ********************************************************************************** 28 * * 29 * SPLRFIND. Find the spooler and return the handle * 30 * (process number) of it for IO. * 31 * Call: * 32 * CALL SPLRFIND * 33 * PARL * 34 * JMP * 35 * * 36 * Gets R0 thru R3. * 37 * Stack required = 2 * 38 * * 39 ********************************************************************************** 40 41 BEGFRAME 00178801 6 BASE 42 HANDLEST BSS 1 place to store the handle 43 ENDFRAME 44 05DE9 DD1F8002 6 STAK 45 SPLRFIND ENTR PUSH 05DEA C0178801 6 BASE 46 STPL SP,HANDLEST place to store the handle 05DEB 60040170 0 IMM 47 LD R0 URGETPNUM get its process number 05DEC 60440008 1 IMM 48 LD R1 SPLRNAMEL 05DED 60845DF3 2 IMM 49 LD R2 ADR SPLRNAME the name for the spooler 05DEE 09040000 IMM 50 UREQ 0 05DEF FA085DF2 0 51 JLTZ R0 NOSPLR jump if there is no spooler 05DF0 E4578C01 1 6 FPVR 52 ST R1 @(SP,HANDLEST) return the handle for it 05DF1 19C40001 7 IMM 53 ADD R7 1 success return 00005DF2 54 NOSPLR LABEL 05DF2 5D1F8002 6 STAK 55 LEAVE POP 56 * --- 57 05DF3 2153504F 58 SPLRNAME TEXT "!SPOOLER" 00000008 ABS 59 SPLRNAMEL EQU 8 60 61 END of SPLRFIND 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1300 (SPLRTALK) F 70 Spooler communication for FREQs 63 64 BLOCK 65 66 ENTRY SPLRINIT 67 68 ********************************************************************************** 69 * * 70 * SPLRINIT. Find the spooler and, if it exists, return * 71 * the handle to it for IO and set up the readable message mask * 72 * for class zero messages (the responses from the spooler). A * 73 * bit array is returned that should be passed to UNSPLRINIT that * 74 * will restore the message readable array. * 75 * Call: * 76 * CALL SPLRINIT * 77 * PAR * 78 * PARL * 79 * JMP * 80 * * 81 * Gets R0:R3. * 82 * Stack required = 5 * 83 * 3 + SPLRFIND(2) * 84 * * 85 ********************************************************************************** 86 87 BEGFRAME 00178801 6 BASE 88 HANDLEST BSS 1 place to put the handle 00178802 6 BASE 89 RMASKST BSS 1 place to put the restore make 90 ENDFRAME 91 05DF5 DD1F8003 6 STAK 92 SPLRINIT ENTR PUSH 05DF6 C1178801 6 BASE 93 STP SP,HANDLEST place to return the handle 05DF7 C0178802 6 BASE 94 STPL SP,RMASKST place to return restore info 05DF8 60D38000 3 6 REG 95 LD R3 SP 05DF9 DC005DE9 96 CALL SPLRFIND see if a spooler exists 05DFA 4016CC01 3 FPVR 97 PARL @(R3,HANDLEST) return handle to caller 05DFB FE0E5E01 98 JMP NOSPLR jump if there is no spooler 05DFC 60040163 0 IMM 99 LD R0 URSSMSGA selectivily set the mask 05DFD 60430000 1 IMM 100 LD R1 1*BIT 0 a bit for class zero 05DFE 09040000 IMM 101 UREQ 0 set the mask 05DFF E4578C02 1 6 FPVR 102 ST R1 @(SP,RMASKST) return the restore info 05E00 19C40001 7 IMM 103 ADD R7 1 success return 00005E01 104 NOSPLR LABEL 05E01 5D1F8003 6 STAK 105 LEAVE POP 106 * --- 107 108 END of SPLRINIT 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1301 (SPLRTALK) F 70 Spooler communication for FREQs 110 111 BLOCK 112 113 ENTRY UNSPLRINIT 114 115 ********************************************************************************** 116 * * 117 * UNSPLRINIT. Routine that undoes the initialization of * 118 * SPLRINIT. In particular, the readable message mask is restored * 119 * to what it was before the initialization routine was called. * 120 * Call: * 121 * CALL UNSPLRINIT * 122 * PARVL * 123 * * 124 * Gets R0 thru R3. * 125 * Stack required = 1 * 126 * * 127 ********************************************************************************** 128 129 BEGFRAME 130 ENDFRAME 131 05E02 DD1F8001 6 STAK 132 UNSPLRINIT ENTR PUSH 05E03 C0524000 1 REG 133 STPVL R1 the restore info 05E04 FA025E07 0 134 JEQZ R0 NOCHANGE jump if the bit doesn't need clearing 05E05 60040164 0 IMM 135 LD R0 URSCMSGA we will clear the bit we set 05E06 09040000 IMM 136 UREQ 0 00005E07 137 NOCHANGE LABEL 05E07 5D1F8001 6 STAK 138 LEAVE POP 139 * --- 140 141 END of UNSPLRINIT 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1302 (SPLRTALK) F 70 Spooler communication for FREQs 143 144 BLOCK 145 146 ENTRY SPLRSEND 147 148 ********************************************************************************** 149 * * 150 * SPLRSEND. This routine builds the message to be sent to * 151 * the specified process. This routine is used by the OPEN * 152 * request to build the message to be sent to the spooler to open * 153 * a file. A piece of free storage is fetched and the message * 154 * header is built. Then if the header name is "OPN " the logon * 155 * and alias account names are placed into the message. Finally, * 156 * the message is appended to the header. The message should not * 157 * be longer than 200 or so characters. BEWARE: this request may * 158 * suspend if there are messages waiting for the spooler already. * 159 * Call: * 160 * CALL SPLRSEND * 161 * PARV * 162 * PARV * 163 * PARV * 164 * PAR
* 165 * PARVL * 166 * JMP * 167 * ST R0 ID of message sent * 168 * * 169 * For a spooler header of "OPN " we create a message that has the form * 170 *
OPN * 171 * and for everyone else the message form is: * 172 *
xxx * 173 * * 174 * BEWARE: this routine destroys R0 and R2 before passing * 175 * parameters and expects R2 will not get destroyed. * 176 * * 177 * Gets R0 thru R3. * 178 * Stack required = 12 * 179 * 6 + max ( ACCTTOCHAR (5), P12TOCHAR (6), SFREEMEM (0), * 180 * SGETMEM (0) ) * 181 * * 182 ********************************************************************************** 183 184 BEGFRAME 00178801 6 BASE 185 WHEREMSG BSS 1 where the message is 00178802 6 BASE 186 LONGMSG BSS 1 how long the message is 00178803 6 BASE 187 THEID BSS 1 the ID of the message sent 00178804 6 BASE 188 R4R5SAVE BSS 2 save for R4 and R5 189 ENDFRAME 190 191 * Definition of block used to build message 00000006 ABS 192 MYTLOG EQU 6 log size of my temp 00000040 ABS 193 MYTLENW EQU 2 POWER MYTLOG length of my temp area in words 00000100 ABS 194 MYTLENC EQU MYTLENW*CPW length of my temp area in characters 00005E08 195 MYTPROTO BASE R0 196 DRCT 197 ORG MYTPROTO 198 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1303 (SPLRTALK) F 70 Spooler communication for FREQs 05E08 DD9F8006 6 STAK 199 SPLRSEND ENTRS PUSH 05E09 DC002ED0 200 CALL UGETMEM get my temp block 05E0A 40440006 IMM 201 PARVL MYTLOG 05E0B 60920000 2 0 REG 202 LD R2 R0 R2=>my temp block 05E0C DCD3C000 7 REG 203 EXPCS R7 go get those parameters 05E0D C1488100 2 ZBM 204 STPV R2,MSGPROC the handle to the spooler 05E0E C1568801 2 BASE 205 STPV R2,MSGPRIVS the privileges to go into the header 05E0F C1568803 2 BASE 206 STPV R2,MSGSTEXT(1) the header for the spooler 05E10 C1178801 6 BASE 207 STP SP,WHEREMSG where the message is 05E11 C0578802 6 BASE 208 STPVL SP,LONGMSG how long the message is 05E12 E7178804 456 BASE 209 ST2 R4 SP,R4R5SAVE save these registers 05E13 61528000 5 2 REG 210 LD R5 R2 R5 => my temp block 05E14 BC001D10 0 211 INCL R0 SPLRMSGID get an ID for this message 05E15 E4178803 0 6 BASE 212 ST R0 SP,THEID save to return to caller 05E16 E4174802 0 5 BASE 213 ST R0 R5,MSGSTEXT place in the message 05E17 60040003 0 IMM 214 LD R0 MSGCLSSPLR the message class to the spooler 05E18 E4096100 0 5 ZBM 215 ST R0 R5,MSGCLASS 05E19 39174804 4 5 BASE 216 LEA R4 R5,MSGSTEXT(2) R4=>first place for text 05E1A 60174803 0 5 BASE 217 LD R0 R5,MSGSTEXT(1) get the message header 05E1B 64005E4C 0 218 CPR R0 OPENHDR is this the header for OPEN? 05E1C FE0C5E37 219 JNE NOTOPEN jump if not -- no accounts 220 * \ / 221 222 * pass logon account w/o volume name 05E1D DC00596E 223 CALL ACCTTOCHAR convert logon account 05E1E 60000412 0 224 LD R0 CPPSA 05E1F 60081F13 0 0 ZBM 225 LD R0 R0,PSUSERLIMP R0=>ULB of logoned account 05E20 41160802 0 BASE 226 PAR R0,ULACCNM the account to stringify 05E21 40170000 4 CACH 227 PARL CACH R4,0 where it goes 05E22 60040020 0 IMM 228 LD R0 " " separating space 05E23 E4168000 0 2 CACH 229 ST R0 CACH R2,0 05E24 39168001 4 2 CACH 230 LEA R4 CACH R2,1 advance over space 231 232 * pass alias account w/volume name (so alias can go to shadow) 05E25 DC005926 233 CALL P12TOCHAR convert alias volume name 05E26 60000412 0 234 LD R0 CPPSA 05E27 60081F14 0 0 ZBM 235 LD R0 R0,PSDFLTDIR R0=>ULB of alias account 05E28 60080081 0 0 ZBM 236 LD R0 R0,ULDRIVE volume number 05E29 60201F22 0 0 237 LD R0 VOLNTABLE(R0) VOLN pointer 05E2A 43560811 0 BASE 238 PARV2 R0,VOLNNAME the volume name to stringify 05E2B 40170000 4 CACH 239 PARL CACH R4,0 where it goes 05E2C 6004003A 0 IMM 240 LD R0 ":" required colon 05E2D E4168000 0 2 CACH 241 ST R0 CACH R2,0 add it to name 05E2E 39168001 4 2 CACH 242 LEA R4 CACH R2,1 advance over colon 05E2F DC00596E 243 CALL ACCTTOCHAR convert alias account 05E30 60000412 0 244 LD R0 CPPSA 05E31 60081F14 0 0 ZBM 245 LD R0 R0,PSDFLTDIR R0=>ULB of alias account 05E32 41160802 0 BASE 246 PAR R0,ULACCNM the account to stringify 05E33 40170000 4 CACH 247 PARL CACH R4,0 where it goes 05E34 60040020 0 IMM 248 LD R0 " " separating space 05E35 E4168000 0 2 CACH 249 ST R0 CACH R2,0 05E36 39168001 4 2 CACH 250 LEA R4 CACH R2,1 advance over space 251 * \ / 252 00005E37 253 NOTOPEN LABEL R4=>place to put the text 05E37 60CB1F30 3 4 CBM 254 LD R3 R4/FLDCHARS 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1304 (SPLRTALK) F 70 Spooler communication for FREQs 05E38 10CB5F30 3 5 CBM 255 SUB R3 R5/FLDCHARS R3=chars from start of block to here 05E39 30C40100 3 IMM 256 RSB R3 MYTLENC R3=number of chars left in block 05E3A 60178801 0 6 BASE 257 LD R0 SP,WHEREMSG where the message is to come from 05E3B 60578802 1 6 BASE 258 LD R1 SP,LONGMSG how long the message is 05E3C 60930000 2 4 REG 259 LD R2 R4 where the message is to goto 05E3D 5052C000 1 3 REG 260 MIN R1 R3 R1=length of message we use 05E3E FE400000 261 CMOVE move the message 05E3F 604A9F30 1 2 CBM 262 LD R1 R2/FLDCHARS 05E40 104B5F30 1 5 CBM 263 SUB R1 R5/FLDCHARS R1=final length of the message 05E41 60934000 2 5 REG 264 LD R2 R5 R2=message header 05E42 60040160 0 IMM 265 LD R0 URSENDMSG 05E43 09040000 IMM 266 UREQ 0 send the message to the destination 05E44 FA085E46 0 267 JLTZ R0 ERRORRTN return error if he won't talk 268 * \ / 269 05E45 19C40001 7 IMM 270 ADD R7 1 success return 00005E46 271 ERRORRTN LABEL 05E46 DC002F5D 272 CALL UFREEMEM release our temp storage 05E47 41440006 IMM 273 PARV MYTLOG 05E48 40534000 5 REG 274 PARVL R5 05E49 63178804 456 BASE 275 LD2 R4 SP,R4R5SAVE restore registers 05E4A 60178803 0 6 BASE 276 LD R0 SP,THEID return the message ID 05E4B 5D1F8006 6 STAK 277 LEAVE POP 278 * --- 279 05E4C 4F504E20 280 OPENHDR TEXT "OPN " 281 282 END of SPLRSEND 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1305 (SPLRTALK) F 70 Spooler communication for FREQs 284 285 BLOCK 286 287 ENTRY SPLRRECV 288 289 ********************************************************************************** 290 * * 291 * SPLRRECV. Routine that will read a message from the * 292 * spooler. The message is placed in the caller's buffer. Only * 293 * a MSGCLSSPLR message will be read. This routine functions by * 294 * doing a delay for SPLRTIME seconds waiting for a message of * 295 * my class. If the message comes in, we read it, otherwise we * 296 * return an error saying it wouldn't come to us. * 297 * Call: * 298 * CALL SPLRRECV * 299 * PAR * 300 * PARVL * 301 * JMP * 302 * JMP * 303 * ST R1 actual length of message * 304 * * 305 * ** NOTICE ** NOTICE ** NOTICE ** NOTICE ** NOTICE ** NOTICE ** * 306 * Because one cannot delay for a particular message class this * 307 * routine for the moment just does a delay for messages and if * 308 * there are any there we will fall into a read for the spooler * 309 * response which could be a possible hang up if the spooler * 310 * finks out. * 311 * * 312 * Gets R0 thru R3. * 313 * Stack required = 3 * 314 * * 315 ********************************************************************************** 316 317 BEGFRAME 00178801 6 BASE 318 WHEREMSG BSS 1 where the messge is to go 00178802 6 BASE 319 LONGMSG BSS 1 how long the buffer is 320 ENDFRAME 321 05E4D DD1F8003 6 STAK 322 SPLRRECV ENTR PUSH 05E4E C1178801 6 BASE 323 STP SP,WHEREMSG where the buffer is 05E4F C0578802 6 BASE 324 STPVL SP,LONGMSG how long the message is 05E50 60040140 0 IMM 325 LD R0 URDELAY wait for a response 05E51 60401D11 1 326 LD R1 SPLRTIME seconds to wait for the spooler 05E52 60820020 2 IMM 327 LD R2 1* BIT CAIMMSG waiting for a message 05E53 09040000 IMM 328 UREQ 0 wait for the spooler 05E54 600400C7 0 IMM 329 LD R0 XREQERSCU Spooler is currently unavailable 05E55 FA425E5F 1 330 JEQZ R1 ERRORRTN jump if we timed out 05E56 60040161 0 IMM 331 LD R0 URGETMSG read a message 05E57 60578802 1 6 BASE 332 LD R1 SP,LONGMSG how big the buffer is 05E58 60978801 2 6 BASE 333 LD R2 SP,WHEREMSG where the buffer is 05E59 09030000 IMM 334 UREQ 1*BIT MSGCLSRESP read a response 05E5A FA085E5F 0 335 JLTZ R0 ERRORRTN jump if it wouldn't read 05E5B FA485E5E 1 336 JLTZ R1 MESSNOT jump if message longer then buffer 05E5C 30578802 1 6 BASE 337 RSB R1 SP,LONGMSG R1=length of message 338 * \ / 339 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1306 (SPLRTALK) F 70 Spooler communication for FREQs 05E5D 19C40001 7 IMM 340 ADD R7 1 00005E5E 341 MESSNOT LABEL 05E5E 19C40001 7 IMM 342 ADD R7 1 success return 00005E5F 343 ERRORRTN LABEL 05E5F 5D1F8003 6 STAK 344 LEAVE POP 345 * --- 346 347 END of SPLRRECV 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1307 (SPLRTALK) F 70 Spooler communication for FREQs 349 350 ********************************************************************************** 351 * * 352 * SPLRCLOSE. Release the grip the spooler might have on this device. * 353 * Call: * 354 * LD FCB => FCB of file being closed * 355 * CALL SPLRCLOSE * 356 * PARVL file's last write date * 357 * * 358 * Gets R0:R4 and WNDO1. * 359 * Stack required = 18 * 360 * 6 + max ( DMOTEWNDO1 (7), INTTOCHAR (6), MAPOUUTFBI (2), * 361 * PWMANGLE (3), SETWNDO1 (4), SPLRFIND (2), * 362 * SPLRSEND (12) ) * 363 * * 364 ********************************************************************************** 365 366 BLOCK 367 368 ENTRY SPLRCLOSE 369 370 BEGFRAME 00178801 6 BASE 371 HANDLE BSS 1 handle to the spooler 00178802 6 BASE 372 QUEUEID BSS 1 spooled thing ID 00178803 6 BASE 373 THECOLON BSS 1 a separator 00178804 6 BASE 374 SPLRPW BSS 2 password to convince the spooler 375 ENDFRAME 376 05E60 DD1F8006 6 STAK 377 SPLRCLOSE ENTR PUSH 05E61 C0578804 6 BASE 378 STPVL SP,SPLRPW save part of password 05E62 5C097415 5 ZBM 379 CMZ FCB,FCSPOOLED was the spooler concerned? 05E63 FE025E8E 380 JEQ QUICKXIT jump out if not 381 * The following is only until the spooler changes from using ASCII 382 * to represent queue ids, hopefully soon! 05E64 60D38000 3 6 REG 383 LD R3 SP make a copy of the stack ptr for parm passing 05E65 DC005903 384 CALL INTTOCHAR convert hex number to (can you believe) ASCII 05E66 41497CA5 5 ZBM 385 PARV FCB,FCQUEUEID value to convert 05E67 41440004 IMM 386 PARV 4 optional length 05E68 4016C802 3 BASE 387 PARL R3,QUEUEID place to put the sucker 388 * LD R0 FCB,FCQUEUEID get the file identifier 389 * ST R0 SP,QUEUEID 05E69 60D38000 3 6 REG 390 LD R3 SP make another copy of the stack pointer 05E6A DC005DE9 391 CALL SPLRFIND found the spooler 05E6B 4016C801 3 BASE 392 PARL R3,HANDLE 05E6C FE0E5E8E 393 JMP QUICKXIT no spooler? oh well 05E6D EC178805 6 BASE 394 STZ SP,SPLRPW(1) clear right half of password 05E6E 60D38000 3 6 REG 395 LD R3 SP 05E6F DC005872 396 CALL PWMANGLE make up the password 05E70 43174809 5 BASE 397 PAR2 FCB,FCSERIAL 05E71 4216C804 3 BASE 398 PAR2L R3,SPLRPW 05E72 E6178804 016 BASE 399 ST2 R0 SP,SPLRPW 05E73 61000412 4 400 LD ULB CPPSA get this users PSA pointer 05E74 61091F13 4 4 ZBM 401 LD ULB ULB,PSUSERLIMP ULB => logged on ULB 05E75 65001EAE 4 402 CPR ULB SYSTEMULB is this after the logoff? 05E76 FE025E83 403 JEQ AFTERMAP then this cannot be the batch that requires this 05E77 DC403205 404 CALLNP SETWNDO1 map in UDIR1 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1308 (SPLRTALK) F 70 Spooler communication for FREQs 05E78 41440003 IMM 405 PARV VPCNTLRO+VPCNTLLK read only and locked 05E79 41440000 IMM 406 PARV VPNOFCB no lun associated 05E7A 41005E8F 407 PAR MAPDE where to go on error 05E7B 41570801 4 BASE 408 PARV ULB,ULBLOCK pass the mass storage address 05E7C 40440009 IMM 409 PARVL FBITUDIR1 indicate block type 05E7D DC40261B 410 CALLNP MAPOUTFBI unmap FBI, ION 05E7E 60D38000 3 6 REG 411 LD R3 SP 05E7F DC005872 412 CALL PWMANGLE 05E80 4356C804 3 BASE 413 PARV2 R3,SPLRPW 05E81 42400803 414 PARV2L WNDO1/UDPASS pass the parameter 05E82 E6178804 016 BASE 415 ST2 R0 SP,SPLRPW 00005E83 416 AFTERMAP LABEL 05E83 DC40315C 417 CALLNP DMOTEWNDO1 release the directory 05E84 60005E93 0 418 LD R0 THESEPER get the separator 05E85 E4178803 0 6 BASE 419 ST R0 SP,THECOLON place in the message 420 * \ / 05E86 60D38000 3 6 REG 421 LD R3 SP 05E87 DC005E08 422 CALL SPLRSEND send the close record to the spooler 05E88 4156C801 3 BASE 423 PARV R3,HANDLE process number of spooler 05E89 41405E91 424 PARV OUTPRIVS my power 05E8A 41405E92 425 PARV CLSHEADR header to let go -- "CLS" 05E8B 4116C802 3 BASE 426 PAR R3,QUEUEID where the message begins 05E8C 40440010 IMM 427 PARVL 4*CPW length of message (4 words) 05E8D FEC00000 428 NOP 0 error is ignored 429 * \ / 00005E8E 430 QUICKXIT LABEL 05E8E 5D1F8006 6 STAK 431 LEAVE POP 432 * --- 433 00005E8F 434 MAPDE LABEL 05E8F DC40261B 435 CALLNP MAPOUTFBI unmap FBI, ION 05E90 FE0E5E83 436 JMP AFTERMAP continue 437 * --- 438 05E91 C0000000 439 OUTPRIVS VFD 1*MSGPRIVID+1*MSGPRIVOS 05E92 434C5320 440 CLSHEADR ASCII 1,CLS 05E93 203A2020 441 THESEPER ASCII 1, : 442 443 END of SPLRCLOSE 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1309 (SPLRTALK) F 70 Spooler communication for FREQs 445 446 ********************************************************************************** 447 * * 448 * SPLRIGNR. Ignore the last discussion with the spooler. * 449 * We build up the ignore message and send same. * 450 * Call: * 451 * CALL SPLRIGNR * 452 * PARV message ID of message to ignore * 453 * PARVL process number of spooler * 454 * * 455 * Gets R0:R3. * 456 * Stack required = 17 * 457 * 5 + max ( SPLRSEND (12) ) * 458 * * 459 ********************************************************************************** 460 461 BLOCK 462 463 ENTRY SPLRIGNR 464 465 BEGFRAME 00178801 6 BASE 466 HANDLE BSS 1 process number of spooler 00178802 6 BASE 467 SEPR BSS 1 separator in message 00178803 6 BASE 468 MESSID BSS 1 the ID of the message to ignore 00178804 6 BASE 469 AFTERMES BSS 1 padding required after ID 470 ENDFRAME 471 05E94 DD1F8005 6 STAK 472 SPLRIGNR ENTR PUSH 05E95 C1578803 6 BASE 473 STPV SP,MESSID save ID of who to ignore 05E96 C0578801 6 BASE 474 STPVL SP,HANDLE where the spooler is 05E97 60005EA6 0 475 LD R0 THECOLON place separator in message 05E98 E4178802 0 6 BASE 476 ST R0 SP,SEPR 05E99 60005EA7 0 477 LD R0 SPACES 05E9A E4178804 0 6 BASE 478 ST R0 SP,AFTERMES required padding 05E9B 60D38000 3 6 REG 479 LD R3 SP 05E9C DC005E08 480 CALL SPLRSEND send the message 05E9D 4156C801 3 BASE 481 PARV R3,HANDLE where the spooler is 05E9E 41405EA4 482 PARV OUTPRIVS the privs I wish to give 05E9F 41405EA5 483 PARV IGRHEADR header for the message 05EA0 4116C802 3 BASE 484 PAR R3,SEPR where the message is 05EA1 4044000C IMM 485 PARVL 3*CPW the length of message in chars 05EA2 FEC00000 486 NOP 0 ignore skip return 05EA3 5D1F8005 6 STAK 487 LEAVE POP 488 * --- 489 05EA4 C0000000 490 OUTPRIVS VFD 1*MSGPRIVID+1*MSGPRIVOS 05EA5 49474E20 491 IGRHEADR TEXT "IGN " 05EA6 203A2020 492 THECOLON TEXT " : " 05EA7 20202020 493 SPACES TEXT " " 494 495 END of SPLRIGNR 496 497 END of spooler communication 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1310 F 0 Spooler communication for FREQs 115 116 ********************************************************************************** 117 * * 118 * Place to break the listing. * 119 * * 120 ********************************************************************************** 121 122 INPUT XRQFREQ file request decoder 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1311 (XRQFREQ) F 71 File Request Processor 3 4 FREQPROC BLOCK File Request Processor 5 6 ENTRY CALCSUSP calculate TCB suspend bounds 7 ENTRY CLOSEUNITF close a unit given an FCB 8 ENTRY CLEANUNITS remove all local units 9 ENTRY ENDFILWAIT release people waiting on files 10 ENTRY FREQTRAP simulation of file requests 11 ENTRY GETFCB get FCB and range check unit number 12 ENTRY MAKETRAF make a tiny RAF from an empty RAF 13 ENTRY SETREADER force CPCUPCs TCG/TCS into console TCB 14 ENTRY SRCHDIR search directory by name 15 ENTRY SRCHDIRLKS search directory by serial number (locked) 16 ENTRY SRCHDIRSN search directory by serial number 17 ENTRY XPANDTRAF make tiny RAF small 18 ENTRY TRAFDIR update DIR after creating tiny RAF 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1312 (XRQFREQ) F 71 File Request Processor 20 21 ********************************************************************************** 22 * * 23 * FREQTRAP. File function request trap. * 24 * * 25 ********************************************************************************** 26 27 BLOCK FREQTRAP routine 28 29 ENTRY FREQTRAP 30 00005EA8 31 FREQTRAP LABEL 05EA8 60092C62 0 4 ZBM 32 LD R0 R4,CAR0/XRFLDREQ get the code for this request 05EA9 6804002B 0 IMM 33 UCPR R0 FREQMAX is this a reasonable request? 05EAA FE0659D8 34 JGE ILLREQ jump if not 05EAB 60893842 2 4 ZBM 35 LD R2 R4,CAR0/XRFLDSUBOP get sub operation code 05EAC DC405B39 36 CALLNP LUNSEARCH search for the specified unit 05EAD 5CA05EAE 0 37 LDPC FREQOPJMP(R0) do the operation 38 * routine entered with: SP = R6 = return address stack 39 * FCB = R5 = unitlist element if it exists 40 * or zero if unit does not exist 41 * R4 = pntr to CA of trapper 42 * R3 = operand of instruction (unit number) 43 * R2 = sub operation code 44 * --- 45 46 47 * FREQ major operation jump table 00005EAE 48 FREQOPJMP LABEL 05EAE 000059D8 49 ADR UERRORILR 00X - illegal request 05EAF 00007357 50 ADR FREQCNTL 01X - file control 05EB0 00006EC0 51 ADR FREQRWRIT 02X - rewrite request 05EB1 00006EED 52 ADR FREQREAD 03X - read request 05EB2 0000695F 53 ADR FREQWRITE 04X - write request 05EB3 00006614 54 ADR FREQEQUIP 05X - equip 05EB4 00007F53 55 ADR FREQUEQUIP 06X - unequip 05EB5 00007E17 56 ADR FREQSAVE 07X - save 05EB6 00007F36 57 ADR FREQUSAVE 08X - unsave 05EB7 00007622 58 ADR FRQRAFCNTL 09X - random access file control 05EB8 00008391 59 ADR FREQSHARE 0AX - share file 05EB9 00008394 60 ADR FREQUSHARE 0BX - unshare a file 05EBA 00007D4F 61 ADR FREQACCESS 0CX - change access to a unit 05EBB 00007CD3 62 ADR FREQMODIFY 0DX - modify file attributes 05EBC 000084C7 63 ADR FREQCATINF 0EX - get catalog info for unit 05EBD 000059D8 64 ADR FREQFILINF 0FX - get file information 05EBE 00007FFB 65 ADR FREQRENAME 10X - rename a saved file 05EBF 00007925 66 ADR FREQSETTRM 11X - set terminal attributes 05EC0 000078DA 67 ADR FREQGETTRM 12X - get terminal attributes 05EC1 00007BB9 68 ADR FREQCHAIN 13X - go execute another program 05EC2 00007E75 69 ADR FREQXSAVE 14X - exchange save 05EC3 00007BA2 70 ADR FREQLIMGET 15X - get units limitations 05EC4 000059D8 71 ADR UERRORILR 16X - obsolete 05EC5 00007F62 72 ADR FREQDESTR 17X - destroy a saved file 05EC6 00007775 73 ADR FREQCODEIG 18X - get code file information 05EC7 00007779 74 ADR FREQCODEIS 19X - set code file information 05EC8 0000835E 75 ADR FREQALIAS 1AX - set a new default directory 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1313 (XRQFREQ) F 71 File Request Processor 05EC9 00007A31 76 ADR FREQTRMCTL 1BX - terminal control requests 05ECA 00008558 77 ADR FREQGACCT 1CX - get account attributes 05ECB 00008557 78 ADR FREQGACCT2 1DX - more account attribute getting 05ECC 000085DA 79 ADR FREQSACCT 1EX - set account attribute 05ECD 000085D9 80 ADR FREQSACCT2 1FX - more account attribute setting 05ECE 00007829 81 ADR FREQRLOCK 20X - use file resource locks 05ECF 00007AA1 82 ADR FREQUNIT 21X - device interrupt control 05ED0 00007924 83 ADR FREQSETTM2 22X - more set terminal attributes 05ED1 000078D9 84 ADR FREQGETTM2 23X - more get terminal attributes 05ED2 00007A89 85 ADR FREQECHO 24X - unit record echo control 05ED3 00007B55 86 ADR FREQVVFU 25X - control line printer VVFU 05ED4 00006643 87 ADR FREQNOPEN 26X - new open request 05ED5 00007AFD 88 ADR FREQMKPATH 27X - make path 05ED6 00006636 89 ADR FREQUOPEN 28X - unprivileged new open 05ED7 00007ACE 90 ADR FREQSWITCH 29X - switch resources between units 05ED8 0000698D 91 ADR FREQSEQWRT 2AX - sequential write 0000002B ABS 92 FREQMAX EQU DISPW FREQOPJMP size of this table 93 94 * Requests that are not written yet 000059D8 95 FREQFILINF EQU UERRORILR 96 97 END FREQTRAP routine 123 INPUT FRQUTILITY several write utilities 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1314 (FRQUTILITY) F 72 FREQ - FREQ Utility 3 4 ********************************************************************************** 5 * * 6 * A section of the stack is set up with these common * 7 * definitions for the read and write processors. * 8 * * 9 ********************************************************************************** 10 00005ED9 11 FRSPTEMP BASE SP 00178800 6 BASE 12 IRGWORD BSS 1 normally holds the record header for a SAF 00099040 6 ZBM 13 IRGRTYP EQU IRGWORD/FILTYPE type of record being read 00099B30 6 ZBM 14 IRGRLEN EQU IRGWORD/FILRLEN length of record 00178801 6 BASE 15 COPYCNT BSS 1 characters remaining in record 00178802 6 BASE 16 COREADR BSS 1 callers buffer address 00178803 6 BASE 17 BUFSIZ BSS 1 size of buffer left (for SAF read) 00178800 6 BASE 18 FCRTEMP EQU IRGWORD temp used in RAF code 00178804 6 BASE 19 RWERINFO BSS 2 holds error recovery information 00178800 6 BASE 20 DIRMINDX EQU IRGWORD index into main directory, DIR read 00178806 6 BASE 21 RWRETADDR BSS 1 used by terminal write for return address 22 DRCT 00000007 ABS 23 RWSTKSIZ EQU DISPW FRSPTEMP stack size for read and write processors 24 ORG FRSPTEMP backup the location counter 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1315 (FRQUTILITY) F 72 FREQ - FREQ Utility 26 27 ********************************************************************************** 28 * * 29 * UNMAPFILE. This routine passes through the UPC lists and * 30 * unmaps any pages that correspond to the passed unit. This is * 31 * done so a unit's access may be made "no data access". * 32 * This routine works by scanning all UPCs and looking for * 33 * VPs that claim to belong to this FCB. We run in a slightly * 34 * different loop if we are doing the current UPC, since the page * 35 * file is loaded for PALs found there. Additionally, for the * 36 * current UPC we have the possibility of PALs that are associated * 37 * with an indirect VP element. In this case, the VP will not * 38 * indicate the FCB association and we must look in the PALs to * 39 * see if any are associated with the target FCB. * 40 * We do not bother with the window VP list, since the * 41 * windows should be grubbed when we get here. * 42 * Call: * 43 * * 44 * FCB => file control block * 45 * CALLNP UNMAPFILE * 46 * * 47 * Eats R0:R3. * 48 * Stack required = 12 * 49 * 2 + max ( DMOTINDPAL (2), GRUBPAGE (7), GRUBVPEL (7), * 50 * WSXCLNALL (10) ). * 51 * * 52 ********************************************************************************** 53 54 ********************************************************************************** 55 * * 56 * UNMAPPAGE. This routine passes through the UPC lists and * 57 * unmaps any pages that correspond to FCB,FCBLOCK. This is done * 58 * so a page can be deleted from a file while the page is mapped * 59 * in to the user's address space. * 60 * This routine works just like UNMAPFILE, except that it * 61 * scans for the VPBLOCK, rather than the VPFCB. * 62 * Call: * 63 * FCB => file control block * 64 * CALLNP UNMAPPAGE * 65 * * 66 * Eats R0:R4 * 67 * Stack required = 12. See UNMAPPAGE. * 68 * * 69 ********************************************************************************** 70 71 BLOCK 72 73 ENTRY UNMAPFILE 74 ENTRY UNMAPPAGE 75 76 BEGFRAME 00178801 6 BASE 77 REGSAVE BSS 1 save for a register 78 ENDFRAME 79 80 * handy definition to handle two entry points 000BC010 7 CBM 81 PFLAG EQU R7/BIT 0 0 = unmap file, 1 = unmap page 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1316 (FRQUTILITY) F 72 FREQ - FREQ Utility 82 83 * table when scanning in current UPC, indexed by PFLAG 00005ED9 84 SRCHTAB1 LABEL 05ED9 3D481F11 5 0 ZBM 85 LSRCH FCB R0,VPFCB scan for FCB 05EDA 3D560803 5 0 BASE 86 LSRCH R5 R0,VPBLOCK scan for MS block 87 88 * table when scanning in other UPCs, indexed by PFLAG 00005EDB 89 SRCHTAB2 LABEL 05EDB 49489F11 5 2 ZBM 90 RLSRCH FCB R2,VPFCB scan for FCB 05EDC 49568803 5 2 BASE 91 RLSRCH R5 R2,VPBLOCK scan for MS block 92 93 * table when restoring register, indexed by PFLAG 00005EDD 94 REGSAVETAB LABEL 05EDD 61178801 4 6 BASE 95 LD R4 SP,REGSAVE restore R4 05EDE 61578801 5 6 BASE 96 LD R5 SP,REGSAVE restore R5 97 05EDF DD5F8002 6 STAK 98 UNMAPPAGE ENTRNP PUSH 05EE0 EDCBC010 7 CBM 99 STW PFLAG say we're doing page 05EE1 E5578801 5 6 BASE 100 ST R5 SP,REGSAVE save this register 05EE2 FE0E5EE6 101 JMP UNMAPIT join code 102 * --- 103 05EE3 DD5F8002 6 STAK 104 UNMAPFILE ENTRNP PUSH 05EE4 EC0BC010 7 CBM 105 STZ PFLAG say we're doing file 05EE5 E5178801 4 6 BASE 106 ST R4 SP,REGSAVE save this register 00005EE6 107 UNMAPIT LABEL 05EE6 DC403165 108 CALLNP DMOTINDPAL flush out any PALs indirectly mapped 109 * in the current UP 05EE7 60D34000 3 5 REG 110 LD R3 FCB copy the FCB pointer 05EE8 DC4032EA 111 CALLNP WSXCLNALL now get rid of any pages in any WSX list 05EE9 60800412 2 112 LD R2 CPPSA current session 05EEA 60889F15 2 2 ZBM 113 LD R2 R2,PSPROCLIST uppermost process (CM) 05EEB F3C05EED 7 114 JBF PFLAG ANOTHERAS jump if ready 05EEC 61574801 5 5 BASE 115 LD R5 FCB,FCBLOCK set up R5 if UNMAPPAGE 116 * \ / 117 00005EED 118 ANOTHERAS LABEL 05EED 61128000 4 2 REG 119 LD R4 R2 place register here so it survives 05EEE 65000414 4 120 CPR R4 CPCUPC is this the current address space? 05EEF FE0C5EFC 121 JNE CLEANOVER jump to do over/under process clean 122 * \ / 123 124 * The current process pages are cleaned with GRUBs 00005EF0 125 GRUBANOTHER LABEL 05EF0 6017080D 0 4 BASE 126 LD R0 R4,UPCVMLIST R0 => first element in VM list 05EF1 604BC010 1 7 CBM 127 LD R1 PFLAG get index to XCT table 00005EF2 128 XCT1 LABEL 05EF2 5D625ED9 1 129 XCT SRCHTAB1(R1) find a page for this thing 05EF3 FE0C5F0A 130 JNE NEXTAS if no match, try next address space 131 * \ / 132 133 * found match, can we use it? 05EF4 F3C05EF9 7 134 JBF PFLAG DUMPIT1 jump if FCB search 05EF5 5C081011 0 ZBM 135 CMZ R0,VPINDRCT is this an indirect VP? 05EF6 FE025EF9 136 JEQ DUMPIT1 jump if not 05EF7 FA365EF2 0 137 LJNA R0 XCT1 move on 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1317 (FRQUTILITY) F 72 FREQ - FREQ Utility 05EF8 FE0E5F0A 138 JMP NEXTAS we were at list end 139 * --- 140 141 * remove the VP 00005EF9 142 DUMPIT1 LABEL 05EF9 60160004 0 0 CACH 143 LD R0 R0,VPVPN get the number of the page 05EFA DC4030E4 144 CALLNP GRUBPAGE clean out the usage 05EFB FE0E5EF0 145 JMP GRUBANOTHER try for another page 146 * --- 147 148 149 ********************************************************************************** 150 * * 151 * This code removes stuff from an over or under program * 152 * (not the current UPC). We call GRUBVPEL with a pointer to * 153 * an unlinked VP element and it uses the current UPC to find * 154 * any PALs that should be destroyed. * 155 * * 156 ********************************************************************************** 157 00005EFC 158 CLEANOVER LABEL 05EFC 6097080D 2 4 BASE 159 LD R2 R4,UPCVMLIST R2 => first element of VP list 05EFD 38D7080D 3 4 BASE 160 LEA R3 R4,UPCVMLIST R3 => pointer to the first element 05EFE 600BC010 0 7 CBM 161 LD R0 PFLAG get index to XCT table 00005EFF 162 XCT2 LABEL 05EFF 5D605EDB 0 163 XCT SRCHTAB2(R0) find a page 05F00 FE0C5F0A 164 JNE NEXTAS if no occurences, try next address space 165 * \ / 166 167 * found something, can we use it? 05F01 F3C05F06 7 168 JBF PFLAG DUMPIT2 jump if FCB search 05F02 5C089011 2 ZBM 169 CMZ R2,VPINDRCT is this an indirect VP? 05F03 FE025EF9 170 JEQ DUMPIT1 jump if not 05F04 FABA5EFF 23 171 RLJNA R2 XCT2 move on 05F05 FE0E5F0A 172 JMP NEXTAS we were at list end 173 * --- 174 175 * remove the VP 00005F06 176 DUMPIT2 LABEL 05F06 60089F10 0 2 ZBM 177 LD R0 R2,VPLINK get forward link 05F07 E408DF10 0 3 ZBM 178 ST R0 R3,VPLINK save as link in preceeding element 05F08 DC4030D7 179 CALLNP GRUBVPEL release VP element 05F09 FE0E5EFC 180 JMP CLEANOVER try for another page 181 * --- 182 00005F0A 183 NEXTAS LABEL 05F0A 60891F10 2 4 ZBM 184 LD R2 R4,UPCSONPTR are there any sons to check? 05F0B FAB25EED 2 185 JNZA R2 ANOTHERAS jump to process this UPC 186 * \ / 187 00005F0C 188 UNMAPBROS LABEL 05F0C 60891F16 2 4 ZBM 189 LD R2 R4,UPCBROPTR do we have any fellow brothers? 05F0D FAB25EED 2 190 JNZA R2 ANOTHERAS jump to work on the brothers 05F0E 61091F17 4 4 ZBM 191 LD R4 R4,UPCDADPTR move up the the immediate overprocess 05F0F FB325F0C 4 192 JNZA R4 UNMAPBROS if non-zero then more work to perform 193 * \ / 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1318 (FRQUTILITY) F 72 FREQ - FREQ Utility 194 05F10 600BC010 0 7 CBM 195 LD R0 PFLAG get index 05F11 5D605EDD 0 196 XCT REGSAVETAB(R0) restore a register 05F12 5D1F8002 6 STAK 197 LEAVE POP 198 * --- 199 200 END of UNMAPFILE and UNMAPPAGE 124 INPUT SHLCHECK share list searcher 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1319 (SHLCHECK) F 73 Shared List Searching Routine 3 4 ********************************************************************************** 5 * * 6 * LIBCHECK. This routine checks to see if the specified * 7 * account has implied privileges over the specified file. If * 8 * so, FCPRIV is updated. * 9 * Call: * 10 * LD FCB => file control block * 11 * CALL LIBCHECK * 12 * PARL * 13 * * 14 * Eats R0:R2, ULB * 15 * Stack required = 4 * 16 * 1 + max ( LEVELBIT (3) ) * 17 * * 18 ********************************************************************************** 19 20 BLOCK LIBCHECK subroutine 21 ENTRY LIBCHECK 22 23 BEGFRAME 24 ENDFRAME 25 05F13 DD1F8001 6 STAK 26 LIBCHECK ENTR PUSH 05F14 C0130000 4 REG 27 STPL ULB get ULB pointer 05F15 60094E45 0 5 ZBM 28 LD R0 FCB,FCPRIV get privilege from FCB 05F16 64040002 0 IMM 29 CPR R0 FSPRIVMOD check if modify 05F17 FE025F35 30 JEQ LIBCHKEXIT skip check if already have modify 31 * \ / 32 33 ********************************************************************************** 34 * * 35 * Here we check for implicit sharing. The libraries for * 36 * this account are implicitly shared read-only and the managers * 37 * of this file's account could have implicit modify access. * 38 * Also, the file's owner has implicit modify access. * 39 * * 40 ********************************************************************************** 41 * \ / 42 05F18 65001EAE 4 43 CPR ULB SYSTEMULB system acct gets in 05F19 FE025F36 44 JEQ SHLMPRIVOK 05F1A 65095114 4 5 ZBM 45 CPR ULB FCB,FCLIMITPTR see if it's my own account 05F1B FE025F36 46 JEQ SHLMPRIVOK if so, I may modify 05F1C 60895114 2 5 ZBM 47 LD R2 FCB,FCLIMITPTR R2 => account being accessed 48 * ULB => who is trying to access 05F1D 5E168802 2 BASE 49 CMZ2 R2,ULACCNM could this be a library acct? 05F1E FE0C5F2E 50 JNE TRYMANAGER if not a library, try for manager 51 * \ / 52 53 * See if accessing the accessor's library 05F1F 60168804 0 2 BASE 54 LD R0 R2,ULACCPROJ get project name of victim 05F20 64002555 0 55 CPR R0 DOTSYS is this the system library? 05F21 FE025F2C 56 JEQ SHLRPRIVOK jump if so - give library access 05F22 64002551 0 57 CPR R0 DOTBTI manufacturers supplied library? 05F23 FE025F2C 58 JEQ SHLRPRIVOK jump if so - give library access 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1320 (SHLCHECK) F 73 Shared List Searching Routine 05F24 64170804 0 4 BASE 59 CPR R0 ULB,ULACCPROJ is this the same project? 05F25 FE025F2C 60 JEQ SHLRPRIVOK jump if so - give library access 05F26 60490174 1 4 ZBM 61 LD R1 ULB,ULACCPROJ/DVSNPART1 05F27 1444007D 1 IMM 62 DIV R1 DVSNPART2 isolate division of accessor 05F28 1C44007D 1 IMM 63 MUL R1 DVSNPART2 05F29 604A5200 1 1 CBM 64 LD R1 R1*DVSNPART1 05F2A 64124000 0 1 REG 65 CPR R0 R1 same division? 05F2B FE0C5F2E 66 JNE NOTLIBRARY if not, this is not our library 00005F2C 67 SHLRPRIVOK LABEL 05F2C 60040001 0 IMM 68 LD R0 FSPRIVRO specify library privilege 05F2D E4094E45 0 5 ZBM 69 ST R0 FCB,FCPRIV 00005F2E 70 NOTLIBRARY LABEL 71 * \ / 72 73 * See if the requester is a manager who gets access 00005F2E 74 TRYMANAGER LABEL 05F2E DC005B84 75 CALL LEVELBIT get how masterful the requester is 05F2F 41530000 4 REG 76 PARV ULB the accessor 05F30 40495114 5 ZBM 77 PARVL FCB,FCLIMITPTR who is being accessed 05F31 F6365F36 0 78 JBT R0/CCBUSRFRC SHLMPRIVOK modify priv if own (or shadow) account 05F32 60495114 1 5 ZBM 79 LD R1 FCB,FCLIMITPTR 05F33 78084047 0 1 ZBM 80 AND R0 R1,ULFACCESS may the manager access this account? 05F34 FA0C5F36 0 81 JNEZ R0 SHLMPRIVOK jump if manager gets modify priv 82 * \ / 00005F35 83 LIBCHKEXIT LABEL 05F35 5D1F8001 6 STAK 84 LEAVE POP return 85 * --- 86 00005F36 87 SHLMPRIVOK LABEL 05F36 60040002 0 IMM 88 LD R0 SHLACTPRVM set privilege to modify 05F37 E4094E45 0 5 ZBM 89 ST R0 FCB,FCPRIV 05F38 5D1F8001 6 STAK 90 LEAVE POP return 91 * --- 92 93 END 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1321 (SHLCHECK) F 73 Shared List Searching Routine 95 96 ********************************************************************************** 97 * * 98 * LIBCHKALL. This routine will check for implied * 99 * privileges over the specified file due to library or * 100 * manager functions. This routine will check using both * 101 * logon and privilege accounts, if they are different. * 102 * Call: * 103 * LD FCB => file control block * 104 * CALL LIBCHKALL * 105 * PARVL if nonzero, don't use prog. priv. (OWNDIR) * 106 * * 107 * Eats R0:R3,ULB * 108 * Stack required = 5 * 109 * 1 + LIBCHECK (4) * 110 * * 111 ********************************************************************************** 112 113 BLOCK LIBCHKALL subroutine 114 ENTRY LIBCHKALL 115 116 BEGFRAME 117 ENDFRAME 118 05F39 DD1F8001 6 STAK 119 LIBCHKALL ENTR PUSH 05F3A C052C000 3 REG 120 STPVL R3 get 'use logon priv only' flag 05F3B FACC5F44 3 121 JNEZ R3 JUSTLOGON jump if just logon priv to be used 05F3C 60000412 0 122 LD R0 CPPSA get PSA pointer 05F3D 60800414 2 123 LD R2 CPCUPC get UPC pointer 05F3E 60481F13 1 0 ZBM 124 LD R1 R0,PSUSERLIMP get pointer to user limit block 05F3F 64489F13 1 2 ZBM 125 CPR R1 R2,UPCPRIVULB compare to current ULB pointer 05F40 FE025F44 126 JEQ JUSTLOGON if same, skip unnecessary check 05F41 DC005F13 127 CALL LIBCHECK set implied privileges 05F42 60089F13 0 2 ZBM 128 LD R0 R2,UPCPRIVULB get pointer to ULB as privileged 05F43 40160400 0 @R 129 PARL @R0 pass to LIBCHECK 00005F44 130 JUSTLOGON LABEL 05F44 DC005F13 131 CALL LIBCHECK set implied privileges 05F45 60000412 0 132 LD R0 CPPSA get PSA pointer 05F46 60081F13 0 0 ZBM 133 LD R0 R0,PSUSERLIMP get pointer logon ULB 05F47 40160400 0 @R 134 PARL @R0 pass to LIBCHECK 05F48 5D1F8001 6 STAK 135 LEAVE POP return 136 * --- 137 138 END 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1322 (SHLCHECK) F 73 Shared List Searching Routine 140 141 ********************************************************************************** 142 * * 143 * SHLCHECK. This routine searches a shared list and updates * 144 * FCPRIV to the privilege allowed this file. * 145 * Call: * 146 * LD FCB => file control block * 147 * LD R3 => first word of SHL entry (UD or FD) * 148 * CALL SHLCHECK * 149 * PAR * 150 * PARVL FBITUDIR1 FBI type of shared list block looking at * 151 * * 152 * * 153 * * 154 * When entered, R3 points to the beginning of the resident * 155 * shared list (in UDIR or file entry) and it will use WNDO2 to * 156 * hold the shared list if it happens to be on the disk. * 157 * WNDO2 is grubbed on error and normal returns if we mapped * 158 * it in. * 159 * On return, R4 points to the limit block of the directory * 160 * in use (one pointed to by FCB). * 161 * * 162 * Eats R0:R2, grubs WNDO2. * 163 * Stack required = 9 * 164 * 2 + max ( GRUBWNDO2 (7), MAXPRIV (2), SETWNDO2 (4) ) * 165 * * 166 ********************************************************************************** 167 168 BLOCK SHLCHECK subroutine 169 ENTRY SHLCHECK search and check shared list 170 000BC010 7 CBM 171 SHLDSKSL EQU R7/BIT 0 on if shared list on disk 172 173 BEGFRAME 00178801 6 BASE 174 SHLREQULB BSS 1 temp to hold requested ULB 175 ENDFRAME 176 05F49 DD1F8002 6 STAK 177 SHLCHECK ENTR PUSH 05F4A C1178801 6 BASE 178 STP SP,SHLREQULB the account we're checking for 05F4B C0530000 4 REG 179 STPVL R4 save the block type 05F4C 60094E45 0 5 ZBM 180 LD R0 FCB,FCPRIV get the privilege found 05F4D 64040002 0 IMM 181 CPR R0 FSPRIVMOD does he already have modify priv? 05F4E FE025F82 182 JEQ SHLCHX don't mess with a good thing! 05F4F EC0BC010 7 CBM 183 STZ SHLDSKSL default to short resident shared list 184 * \ / 05F50 5C16C800 3 BASE 185 CMZ R3,0 check for share list 05F51 FE025F82 186 JEQ SHLCHX exit if no shared list 05F52 FE085F55 187 JLT DISKLISTL jump if shared list on disk 188 * \ / The shared list is resident 05F53 6096D003 2 3 REG 189 LD R2 R3+(UDSHLSIZE-1) load end of list 05F54 FE0E5F60 190 JMP SHLCHKGO search this small thing 191 * --- 192 00005F55 193 DISKLISTL LABEL 05F55 EDCBC010 7 CBM 194 STW SHLDSKSL make note that shared list is on disk 05F56 6008D180 0 3 ZBM 195 LD R0 R3,SHLDISK fetch file share list block address 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1323 (SHLCHECK) F 73 Shared List Searching Routine 05F57 E4095181 0 5 ZBM 196 ST R0 FCB,FCMSBLK move the address of the shared list block 05F58 DC0031FF 197 CALL SETWNDO2 make the shared list resident 05F59 41440001 IMM 198 PARV VPCNTLRO specify read only access 05F5A 41440000 IMM 199 PARV VPNOFCB indicate no lun associated with this page 05F5B 41005F85 200 PAR SHLCHKDE pass error address 05F5C 41574801 5 BASE 201 PARV FCB,FCBLOCK pass MS address 05F5D 40530000 4 REG 202 PARVL R4 pass FBI type 05F5E 60C40C00 3 IMM 203 LD R3 ADR WNDO2 get pointer to start of share list 05F5F 60840FFF 2 IMM 204 LD R2 (ADR WNDO2)+WPP-1 address of last possible entry 205 * \ / 00005F60 206 SHLCHKGO LABEL 05F60 61178801 4 6 BASE 207 LD ULB SP,SHLREQULB pick up target ULB pointer 208 * \ / 00005F61 209 NEXTSHLE LABEL 05F61 6216C801 013 BASE 210 LD2 R0 R3,SHLACCT 05F62 66170802 014 BASE 211 CPR2 R0 ULB,ULACCNM shared with this acct? 05F63 FE0C5F67 212 JNE SHLNOACCT jump if not 05F64 6016C803 0 3 BASE 213 LD R0 R3,SHLACCTP 05F65 64170804 0 4 BASE 214 CPR R0 ULB,ULACCPROJ shared with this project too? 05F66 FE025F74 215 JEQ SHLMATCH jump if match found (PW next) 00005F67 216 SHLNOACCT LABEL 05F67 5E16C801 3 BASE 217 CMZ2 R3,SHLACCT no match - shared with library? 05F68 FE0C5F89 218 JNE MOVEINSHL jump if not possible 05F69 6016C803 0 3 BASE 219 LD R0 R3,SHLACCTP 05F6A 64002555 0 220 CPR R0 DOTSYS shared with system main lib? 05F6B FE025F74 221 JEQ SHLMATCH jump if he can have it 05F6C 64170804 0 4 BASE 222 CPR R0 ULB,ULACCPROJ shared with this guys project? 05F6D FE025F74 223 JEQ SHLMATCH jump if shared with project lib 05F6E 60490174 1 4 ZBM 224 LD R1 ULB,ULACCPROJ/DVSNPART1 get requesters div-proj 05F6F 1444007D 1 IMM 225 DIV R1 DVSNPART2 eliminate the project 05F70 1C44007D 1 IMM 226 MUL R1 DVSNPART2 restore to normal form 05F71 604A5200 1 1 CBM 227 LD R1 R1*DVSNPART1 05F72 64124000 0 1 REG 228 CPR R0 R1 check to see if same division 05F73 FE0C5F89 229 JNE MOVEINSHL jump if not shared with division lib 230 * \ / 231 00005F74 232 SHLMATCH LABEL the account matches -- try the password 05F74 62040000 01 IMM 233 LD2 R0 0 05F75 5C08C210 3 ZBM 234 CMZ R3,SHLACTPW was a password in shared list? 05F76 FE025F78 235 JEQ NOSHLPW jump if not, default in R0R1 05F77 6216C804 013 BASE 236 LD2 R0 R3,SHLPWORD 237 * \ / 238 00005F78 239 NOSHLPW LABEL 05F78 6617480E 015 BASE 240 CPR2 R0 FCB,FCPWORD does the password match? 05F79 FE0C5F89 241 JNE MOVEINSHL jump if he must try another 05F7A DC005BD9 242 CALL MAXPRIV get the best of the two 05F7B 4148C630 3 ZBM 243 PARV R3,SHLACTPRIV pass priv given by this entry 05F7C 40494E45 5 ZBM 244 PARVL FCB,FCPRIV pass current privilege 05F7D E4094E45 0 5 ZBM 245 ST R0 FCB,FCPRIV set this as the privilege 05F7E 64040002 0 IMM 246 CPR R0 FSPRIVMOD is the privilege already to the maximum? 05F7F FE0C5F89 247 JNE MOVEINSHL jump if we can hope for better 248 * \ / privilege is highest possible (modify) 249 00005F80 250 NOTSHARED LABEL 05F80 F3C05F82 7 251 JBF SHLDSKSL SHLCHX jump if the shared list not on the disk 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1324 (SHLCHECK) F 73 Shared List Searching Routine 05F81 DC403153 252 CALLNP GRUBWNDO2 free the shared list block 253 * \ / 254 00005F82 255 SHLCHX LABEL 05F82 19C40001 7 IMM 256 ADD R7 1 advance over error return 257 * \ / 258 00005F83 259 SHLCHKERRD LABEL error checking shared list 05F83 61095114 4 5 ZBM 260 LD ULB FCB,FCLIMITPTR return pointing to dir in use 05F84 5D1F8002 6 STAK 261 LEAVE POP 262 * --- 263 264 * Disk error on share list block. Unmap window and take error return. 00005F85 265 SHLCHKDE LABEL 05F85 E4178801 0 6 BASE 266 ST R0 SP,SHLREQULB save the error code 05F86 DC403153 267 CALLNP GRUBWNDO2 unmap window 05F87 60178801 0 6 BASE 268 LD R0 SP,SHLREQULB restore the error code 05F88 FE0E5F83 269 JMP SHLCHKERRD take disk error exit 270 * --- 271 272 * Move to the next entry in the shared list 00005F89 273 MOVEINSHL LABEL 05F89 6008C220 0 3 ZBM 274 LD R0 R3,SHLACTOPT get flags for type of SHL entry 05F8A 18E0845C 3 0 275 ADD R3 MOVEINSHLT(R0) add in proper entry length 05F8B 64D28000 3 2 REG 276 CPR R3 R2 are we past end? 05F8C FE065F80 277 JGE NOTSHARED jump if past end 05F8D 5C16C800 3 BASE 278 CMZ R3,0 SHL list terminated by a zero entry 05F8E FE0C5F61 279 JNE NEXTSHLE try the next entry 05F8F FE0E5F80 280 JMP NOTSHARED go exit if this not an entry 281 * --- 282 283 END SHLCHECK subroutine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1325 (SHLCHECK) F 73 Shared List Searching Routine 285 286 ********************************************************************************** 287 * * 288 * SHLCHKALL. This routine will search the shared list to * 289 * see what we get for the logon and privilege accounts, if * 290 * they are different. * 291 * Call: * 292 * * 293 * LD FCB => file control block * 294 * FCB,FCLIMITPTR =>ULB of who to search * 295 * CALL SHLCHKALL * 296 * PAR addr of first SHL entry to search (in dir or UD entry) * 297 * PARV zero if use prog privs, non-zero if not (BKUP and OWNDIR) * 298 * PARVL FBI type of shared list disk block * 299 * * 300 * * 301 * * 302 * Sets ULB = FCB,FCLIMITPTR * 303 * Eats R0:R3, grubs window 2 if MS resident SHL. * 304 * Stack required = 12 * 305 * 3 + max ( SHLCHECK (9) ) * 306 * * 307 ********************************************************************************** 308 309 BLOCK 310 ENTRY SHLCHKALL 311 312 BEGFRAME 00178801 6 BASE 313 SHLFBIT BSS 2 FBI type of shared list block 00178802 6 BASE 314 ROOTOFSHL EQU SHLFBIT(1) root of shared list being searched 315 ENDFRAME 316 05F90 DD1F8003 6 STAK 317 SHLCHKALL ENTR PUSH 05F91 C1178802 6 BASE 318 STP SP,ROOTOFSHL place to start searching 05F92 C152C000 3 REG 319 STPV R3 save privs to use 05F93 C0578801 6 BASE 320 STPVL SP,SHLFBIT type to read in 321 05F94 FACC5FA7 3 322 JNEZ R3 JUSTLOGON jump if only logon acct privs 05F95 60000414 0 323 LD R0 CPCUPC 05F96 5C080C10 0 ZBM 324 CMZ R0,UPBACKUP is this a backup program? 05F97 FE0C5F9B 325 JNE NOTBKUP jump if not 05F98 60040008 0 IMM 326 LD R0 FSPRIVBKUP 05F99 E4094E45 0 5 ZBM 327 ST R0 FCB,FCPRIV backup gets lots of privs 05F9A FE0E5FAE 328 JMP NOLIMPCHK just return with lots of priv 329 * --- 330 00005F9B 331 NOTBKUP LABEL 05F9B 62978801 236 BASE 332 LD2 R2 SP,SHLFBIT R2 = block type, R3 = list begin 05F9C DC005F49 333 CALL SHLCHECK search the shared list 05F9D 60000414 0 334 LD R0 CPCUPC 05F9E 60081F13 0 0 ZBM 335 LD R0 R0,UPCPRIVULB 05F9F 41160400 0 @R 336 PAR @R0 asking about the privilege account 05FA0 40528000 2 REG 337 PARVL R2 the type 05FA1 FE0E5FAF 338 JMP BLOCKBAD jump if disk won't talk 339 * \ / 05FA2 60000412 0 340 LD R0 CPPSA 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1326 (SHLCHECK) F 73 Shared List Searching Routine 05FA3 60481F13 1 0 ZBM 341 LD R1 R0,PSUSERLIMP ULB of logon account 05FA4 60000414 0 342 LD R0 CPCUPC 05FA5 64481F13 1 0 ZBM 343 CPR R1 R0,UPCPRIVULB already searched as priv acct? 05FA6 FE025FAE 344 JEQ NOLIMPCHK 00005FA7 345 JUSTLOGON LABEL 05FA7 62978801 236 BASE 346 LD2 R2 SP,SHLFBIT R2 = block type, R3 = list beginning 05FA8 DC005F49 347 CALL SHLCHECK search the shared list 05FA9 60000412 0 348 LD R0 CPPSA 05FAA 60081F13 0 0 ZBM 349 LD R0 R0,PSUSERLIMP 05FAB 41160400 0 @R 350 PAR @R0 05FAC 40528000 2 REG 351 PARVL R2 05FAD FE0E5FAF 352 JMP BLOCKBAD disk error return 353 * \ / 00005FAE 354 NOLIMPCHK LABEL 05FAE 19C40001 7 IMM 355 ADD R7 1 success return 00005FAF 356 BLOCKBAD LABEL disk error return 05FAF 5D1F8003 6 STAK 357 LEAVE POP 358 * --- 359 360 END of SHLCHKALL 125 INPUT FILEACCESS file access control routines 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1327 (FILEACCESS) F 74 FREQ - Open service routines 3 4 BLOCK 5 6 ENTRY FNDOPNACS figure out which access to use 7 8 ********************************************************************************** 9 * * 10 * FNDOPNACS. Given an FCB, pntr to dir entry if saved, and * 11 * a new access this routine will return the access to get to the * 12 * device. In general, one gets back the requested access (if * 13 * legal) except for AO and XO which tend to override. * 14 * Call: * 15 * LD R3 => dir entry if saved * 16 * LD FCB => file control block * 17 * FCB,FCSAVED = non-zero if saved * 18 * FCB,FCHTYPE = device type * 19 * CALL FNDOPNACS * 20 * PARVL requested access * 21 * JMP illegal access (R0 = error code) * 22 * ST R0 access to set * 23 * Gets R0 thru R2. * 24 * Stack required = 1 * 25 * * 26 ********************************************************************************** 27 28 BEGFRAME 29 ENDFRAME 30 05FB0 DD1F8001 6 STAK 31 FNDOPNACS ENTR PUSH 05FB1 C0524000 1 REG 32 STPVL R1 save the requested access in register 05FB2 64440008 1 IMM 33 CPR R1 8 check against highest allowed access 05FB3 FE065FCC 34 JGE RTNPOBERR return violation if phony 05FB4 60094E45 0 5 ZBM 35 LD R0 FCB,FCPRIV get privilege over device 05FB5 60A05FDA 2 0 36 LD R2 PRIVBASE(R0) R2 => table for this privilege 05FB6 FAB25FBB 2 37 JNZA R2 PRIVBASED jump if in a table 05FB7 60096665 0 5 ZBM 38 LD R0 FCB,FCHTYPE get the type of the device 05FB8 64040005 0 IMM 39 CPR R0 HTYPEDIR is it a directory? 05FB9 FE0C5FD0 40 JNE ERRORERRPV only DIRs can have no access to them 05FBA 60805FDB 2 41 LD R2 PRIVBASE(FSPRIVRO) fake read privilege 00005FBB 42 PRIVBASED LABEL 05FBB 602261CC 0 1 43 LD R0 DISPTAB(R1) get displacement into table (requested access) 05FBC FA085FCC 0 44 JLTZ R0 RTNPOBERR return parameter out of bounds 05FBD 5C096415 5 ZBM 45 CMZ FCB,FCSAVED is the file saved? 05FBE FE025FC1 46 JEQ NSVDACS jump if not 05FBF 1808D830 0 3 ZBM 47 ADD R0 R3,FDPRIV add in the access 05FC0 FE0E5FC2 48 JMP ITSSAVED 49 * --- 50 00005FC1 51 NSVDACS LABEL 05FC1 18124000 0 1 REG 52 ADD R0 R1 00005FC2 53 ITSSAVED LABEL 05FC2 601A8400 0 20 @R 54 LD R0 @R2(R0) get the access to give 05FC3 64040010 0 IMM 55 CPR R0 ERROR is it the illegal error code? 05FC4 FE026012 56 JEQ ERRORERROR very bad error if so 05FC5 FE065FCB 57 JGE RTNERROR error code to return 05FC6 60496665 1 5 ZBM 58 LD R1 FCB,FCHTYPE get the type of device 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1328 (FILEACCESS) F 74 FREQ - Open service routines 05FC7 184061AB 1 59 ADD R1 VERIFYTABP 05FC8 5C1A4400 10 @R 60 CMZ @R1(R0) is this new access legal on this device? 05FC9 FE025FCE 61 JEQ RTNNAERR error to say cannot do it 05FCA 19C40001 7 IMM 62 ADD R7 1 success return 00005FCB 63 RTNERROR LABEL 05FCB 5D1F8001 6 STAK 64 LEAVE POP 65 * --- 66 67 * Return POB error to caller 00005FCC 68 RTNPOBERR LABEL 05FCC 60040082 0 IMM 69 LD R0 XREQERPOB "parameter out of bounds" 05FCD FE0E5FCB 70 JMP RTNERROR 71 * --- 72 73 74 * This access is not allowed on this device 05FCE 60205FD2 0 0 75 RTNNAERR LD R0 ACCESSNAT(R0) R0:=error code for this access 05FCF FE0E5FCB 76 JMP RTNERROR 77 * --- 78 79 * May not access the device at all 00005FD0 80 ERRORERRPV LABEL 05FD0 6004008D 0 IMM 81 LD R0 XREQERFNF fake file not found 05FD1 FE0E5FCB 82 JMP RTNERROR 83 * --- 84 00005FD2 85 ACCESSNAT LABEL 05FD2 00000084 86 VFD XREQERPFM trying write - "Protected from Modification" 05FD3 00000085 87 VFD XREQERRNA trying read - "Read not allowed" 05FD4 00000091 88 VFD XREQERILOP trying XO - illegal operation 05FD5 00000091 89 VFD XREQERILOP trying AO - illegal operation 05FD6 00000086 90 VFD XREQERMWNA trying MW - "Mult write not allowed" 05FD7 00000091 91 VFD XREQERILOP trying ?? - illegal operation 05FD8 00000091 92 VFD XREQERILOP trying ?? - illegal operation 05FD9 00000091 93 VFD XREQERILOP trying NA - illegal operation 94 05FDA 02885FEA 95 PRIVBASE PTR THEPRIVRW RW 05FDB 02885FF4 96 PTR THEPRIVRO RO 05FDC 02885FEA 97 PTR THEPRIVMO MO 05FDD 02885FFE 98 PTR THEPRIVXO XO 05FE1 00000000 99 VFD 0,0,0,0 undef 05FE2 02886008 100 PTR THEPRIVBKUP BKUP 05FE5 00000000 101 VFD 0,0,0 undef 05FE9 00000000 102 VFD 0,0,0,0 undef 103 0000000A ABS 104 NL EQU 10 log size of entries 00000010 ABS 105 ERROR EQU 010 code for error access 106 107 * Privilege is RW. 108 * priv file acs req acs 109 * ---- -------- ------- 05FE9 00000000 110 THEPRIVRW VFD NL:FSACSRW RW RW RW 05FE9 00000084 111 VFDB NL:XREQERPFM RW RO RW 05FE9 00000002 112 VFDB NL:FSACSAO RW AO RW 05FEA 00000084 113 VFDB NL:XREQERPFM RW XO RW 05FEA 00000000 114 VFDB NL:FSACSRW RW MW RW 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1329 (FILEACCESS) F 74 FREQ - Open service routines 05FEB 00000010 115 VFDB NL:ERROR,ERROR,ERROR RW undef RW 05FEB 00000001 116 VFDB NL:FSACSRO RW RW RO 05FEC 00000001 117 VFDB NL:FSACSRO RW RO RO 05FEC 00000085 118 VFDB NL:XREQERRNA RW AO RO 05FEC 00000003 119 VFDB NL:FSACSXO RW XO RO 05FED 00000001 120 VFDB NL:FSACSRO RW MW RO 05FEE 00000010 121 VFDB NL:ERROR,ERROR,ERROR RW undef RO 05FEE 00000004 122 VFDB NL:FSACSMW RW RW MW 05FEE 00000086 123 VFDB NL:XREQERMWNA RW RO MW 05FEE 00000086 124 VFDB NL:XREQERMWNA RW AO MW 05FEF 00000086 125 VFDB NL:XREQERMWNA RW XO MW 05FEF 00000004 126 VFDB NL:FSACSMW RW MW MW 05FF0 00000010 127 VFDB NL:ERROR,ERROR,ERROR RW undef MW 05FF0 00000007 128 VFDB NL:FSACSNDA RW RW NA 05FF1 00000007 129 VFDB NL:FSACSNDA RW RO NA 05FF1 00000007 130 VFDB NL:FSACSNDA RW AO NA 05FF1 00000007 131 VFDB NL:FSACSNDA RW XO NA 05FF2 00000007 132 VFDB NL:FSACSNDA RW MW NA 05FF2 00000010 133 VFDB NL:ERROR,ERROR RW undef NA 05FF3 00000007 134 VFDB NL:FSACSNDA RW NA NA 135 136 * Privilege is RO. 137 * priv file acs req acs 138 * ---- -------- ------- 05FF3 00000084 139 THEPRIVRO VFD NL:XREQERPFM RO RW RW 05FF3 00000084 140 VFDB NL:XREQERPFM RO RO RW 05FF3 00000084 141 VFDB NL:XREQERPFM RO AO RW 05FF4 00000084 142 VFDB NL:XREQERPFM RO XO RW 05FF4 00000084 143 VFDB NL:XREQERPFM RO MW RW 05FF5 00000010 144 VFDB NL:ERROR,ERROR,ERROR RO undef RW 05FF5 00000001 145 VFDB NL:FSACSRO RO RW RO 05FF6 00000001 146 VFDB NL:FSACSRO RO RO RO 05FF6 00000085 147 VFDB NL:XREQERRNA RO AO RO 05FF6 00000003 148 VFDB NL:FSACSXO RO XO RO 05FF7 00000001 149 VFDB NL:FSACSRO RO MW RO 05FF8 00000010 150 VFDB NL:ERROR,ERROR,ERROR RO undef RO 05FF8 00000086 151 VFDB NL:XREQERMWNA RO RW MW 05FF8 00000086 152 VFDB NL:XREQERMWNA RO RO MW 05FF8 00000086 153 VFDB NL:XREQERMWNA RO AO MW 05FF9 00000086 154 VFDB NL:XREQERMWNA RO XO MW 05FF9 00000086 155 VFDB NL:XREQERMWNA RO MW MW 05FFA 00000010 156 VFDB NL:ERROR,ERROR,ERROR RO undef MW 05FFA 00000007 157 VFDB NL:FSACSNDA RO RW NA 05FFB 00000007 158 VFDB NL:FSACSNDA RO RO NA 05FFB 00000007 159 VFDB NL:FSACSNDA RO AO NA 05FFB 00000007 160 VFDB NL:FSACSNDA RO XO NA 05FFC 00000007 161 VFDB NL:FSACSNDA RO MW NA 05FFC 00000010 162 VFDB NL:ERROR,ERROR RO undef NA 05FFD 00000007 163 VFDB NL:FSACSNDA RO NA NA 164 02805FEA 165 THEPRIVMO EQU THEPRIVRW the same mapping 166 167 * Privilege is XO. 168 * priv file acs req acs 169 * ---- -------- ------- 05FFD 00000084 170 THEPRIVXO VFD NL:XREQERPFM XO RW RW 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1330 (FILEACCESS) F 74 FREQ - Open service routines 05FFD 00000084 171 VFDB NL:XREQERPFM XO RO RW 05FFD 00000084 172 VFDB NL:XREQERPFM XO AO RW 05FFE 00000084 173 VFDB NL:XREQERPFM XO XO RW 05FFE 00000084 174 VFDB NL:XREQERPFM XO MW RW 05FFF 00000010 175 VFDB NL:ERROR,ERROR,ERROR XO undef RW 05FFF 00000003 176 VFDB NL:FSACSXO XO RW RO 06000 00000003 177 VFDB NL:FSACSXO XO RO RO 06000 00000085 178 VFDB NL:XREQERRNA XO AO RO 06000 00000003 179 VFDB NL:FSACSXO XO XO RO 06001 00000003 180 VFDB NL:FSACSXO XO MW RO 06002 00000010 181 VFDB NL:ERROR,ERROR,ERROR XO undef RO 06002 00000086 182 VFDB NL:XREQERMWNA XO RW MW 06002 00000086 183 VFDB NL:XREQERMWNA XO RO MW 06002 00000086 184 VFDB NL:XREQERMWNA XO AO MW 06003 00000086 185 VFDB NL:XREQERMWNA XO XO MW 06003 00000086 186 VFDB NL:XREQERMWNA XO MW MW 06004 00000010 187 VFDB NL:ERROR,ERROR,ERROR XO undef MW 06004 00000007 188 VFDB NL:FSACSNDA XO RW NA 06005 00000007 189 VFDB NL:FSACSNDA XO RO NA 06005 00000007 190 VFDB NL:FSACSNDA XO AO NA 06005 00000007 191 VFDB NL:FSACSNDA XO XO NA 06006 00000007 192 VFDB NL:FSACSNDA XO MW NA 06006 00000010 193 VFDB NL:ERROR,ERROR XO undef NA 06007 00000007 194 VFDB NL:FSACSNDA XO NA NA 195 196 * Privilege is BKUP. 197 * priv file acs req acs 198 * ---- -------- ------- 06007 00000000 199 THEPRIVBKUP VFD NL:FSACSRW BKUP RW RW 06007 00000000 200 VFDB NL:FSACSRW BKUP RO RW 06007 00000000 201 VFDB NL:FSACSRW BKUP AO RW 06008 00000000 202 VFDB NL:FSACSRW BKUP XO RW 06008 00000000 203 VFDB NL:FSACSRW BKUP MW RW 06009 00000010 204 VFDB NL:ERROR,ERROR,ERROR BKUP undef RW 06009 00000001 205 VFDB NL:FSACSRO BKUP RW RO 0600A 00000001 206 VFDB NL:FSACSRO BKUP RO RO 0600A 00000001 207 VFDB NL:FSACSRO BKUP AO RO 0600A 00000001 208 VFDB NL:FSACSRO BKUP XO RO 0600B 00000001 209 VFDB NL:FSACSRO BKUP MW RO 0600C 00000010 210 VFDB NL:ERROR,ERROR,ERROR BKUP undef RO 0600C 00000004 211 VFDB NL:FSACSMW BKUP RW MW 0600C 00000086 212 VFDB NL:XREQERMWNA BKUP RO MW 0600C 00000086 213 VFDB NL:XREQERMWNA BKUP AO MW 0600D 00000086 214 VFDB NL:XREQERMWNA BKUP XO MW 0600D 00000004 215 VFDB NL:FSACSMW BKUP MW MW 0600E 00000010 216 VFDB NL:ERROR,ERROR,ERROR BKUP undef MW 0600E 00000007 217 VFDB NL:FSACSNDA BKUP RW NA 0600F 00000007 218 VFDB NL:FSACSNDA BKUP RO NA 0600F 00000007 219 VFDB NL:FSACSNDA BKUP AO NA 0600F 00000007 220 VFDB NL:FSACSNDA BKUP XO NA 06010 00000007 221 VFDB NL:FSACSNDA BKUP MW NA 06010 00000010 222 VFDB NL:ERROR,ERROR BKUP undef NA 06011 00000007 223 VFDB NL:FSACSNDA BKUP NA NA 224 225 * The access in the directory entry is not known to me 226 * R3 => dir entry 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1331 (FILEACCESS) F 74 FREQ - Open service routines 06012 00131131 227 ERRORERROR HALT HALTS1131 illegal access for file privilege 228 * --- 229 230 END of FNDOPNACS 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1332 (FILEACCESS) F 74 FREQ - Open service routines 232 233 BLOCK 234 235 ENTRY CHKBZYACS 236 237 ********************************************************************************** 238 * * 239 * CKBZYACS. Given an FCB, pointer to an a FDE if saved, * 240 * and a new access, this routine will check to see that * 241 * accesses being made by others are not conflicting with the * 242 * requested access. It is assumed that the access in the given * 243 * FCB is the access that will be changed. * 244 * Call: * 245 * LD FCB => file control block * 246 * LD R3 => dir entry (if saved) * 247 * CALL CHKBZYACS * 248 * PARVL requested access * 249 * JMP file is busy * 250 * * 251 * Eats R0:R3. * 252 * Stack required = 2 * 253 * 1 + FINDFILEBZ (1) * 254 * * 255 * For all devices except PATH (explained later), the * 256 * following table gives what the busy counters must be. The * 257 * entries are "R, W, MW" with "X" meaning "don't care": * 258 * * 259 * Requested Access * 260 * * 261 * RW RO MW NA * 262 * ---------------------------------------------- * 263 * RW | X,X,X X,1,X X,1,X X,X,X * 264 * C | * 265 * u | * 266 * r RO | 1,X,X X,X,X 1,X,X X,X,X * 267 * r | * 268 * e | * 269 * n AO | X,1,X X,1,X X,1,X X,X,X * 270 * t | * 271 * | * 272 * A XO | 1,X,X X,X,X 1,X,X X,X,X * 273 * c | * 274 * c | * 275 * e MW | X,X,1 X,X,1 X,X,X X,X,X * 276 * s | * 277 * s | * 278 * NA | 0,0,0 X,0,0 0,0,X X,X,X * 279 * * 280 * Some of the entries in the above tables are don't care because * 281 * we know that the busy counters are in a certain state if we already * 282 * have a particular access (for instance, if we have RW access we know * 283 * the RW busy counter is one). * 284 * * 285 * PATHs have special funny busy counters because PATHs may have both * 286 * readers and writers at the same time (the only device that may). Thus, * 287 * its busy counter decision table is: * 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1333 (FILEACCESS) F 74 FREQ - Open service routines 288 * * 289 * Requested Access * 290 * * 291 * RW RO MW NA * 292 * ---------------------------------------------- * 293 * RW | X,X,X 0,1,X X,1,X X,X,X * 294 * C | * 295 * u | * 296 * r RO | X,0,0 X,X,X X,0,X X,X,X * 297 * r | * 298 * e | * 299 * n AO | X,X,X 0,1,X X,1,X X,X,X * 300 * t | * 301 * | * 302 * A XO | 1,X,X X,X,X 1,X,X X,X,X * 303 * c | * 304 * c | * 305 * e MW | X,X,1 0,X,X X,X,X X,X,X * 306 * s | * 307 * s | * 308 * NA | X,0,X 0,X,X X,0,X X,X,X * 309 * * 310 * R,W,MW with "X"=>"don't care" * 311 * * 312 * In those cases where we will be giving a new access (all * 313 * cases except "X,X,X" in the table), we may need to inspect the * 314 * FILEWAITQ for other processes waiting on the same file. If * 315 * this is our first time through OPEN for the file, we do the * 316 * check and refuse access if anyone else is waiting for the file * 317 * (to prevent starvation). However, if we have been awakened by * 318 * ENDFILWAIT, then it is our turn to use the file, regardless of * 319 * who is waiting, so we bypass this check. The PSWAITED bit in * 320 * our PSA says whether we have just been awakened by ENDFILEWAIT. * 321 * We invariably leave this bit cleared on exit of this routine. * 322 * * 323 ********************************************************************************** 324 325 BEGFRAME 326 ENDFRAME 327 06013 DD1F8001 6 STAK 328 CHKBZYACS ENTR PUSH 06014 C0528000 2 REG 329 STPVL R2 R2 := requested access 06015 5C096415 5 ZBM 330 CMZ FCB,FCSAVED is this a saved file? 06016 FE02606A 331 JEQ RXXX if not, no busy counter checking 06017 60096665 0 5 ZBM 332 LD R0 FCB,FCHTYPE fetch logical type 06018 64040007 0 IMM 333 CPR R0 HTYPETERM is it a terminal? 06019 FE02606A 334 JEQ RXXX access is controlled by TCB 0601A 60A461CC 2 2 335 LD R2 DISPTAB(R2) 0601B 18895835 2 5 ZBM 336 ADD R2 FCB,FCACCESS R2 = reqacs * 8 + fileaccess 0601C 64040004 0 IMM 337 CPR R0 HTYPEPATH is this a path? 0601D FE026020 338 JEQ PATHBZY jump if it is 0601E 60B46030 2 2 @ 339 LD R2 @BZYTABP(R2) get the things to check 0601F 5CA46022 2 340 LDPC BZYJMP(R2) goto routines to check 341 * --- 342 00006020 343 PATHBZY LABEL 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1334 (FILEACCESS) F 74 FREQ - Open service routines 06020 60B46035 2 2 @ 344 LD R2 @BZYPTHTABP(R2) get path busy counter 06021 5CA46022 2 345 LDPC BZYJMP(R2) 346 * --- 347 00006022 348 BZYJMP BASE 06022 0000606A 349 CXXX VFD ADR RXXX 06023 00006036 350 C1XX VFD ADR R1XX 06024 0000603A 351 CX1X VFD ADR RX1X 06025 0000603E 352 CXX1 VFD ADR RXX1 06026 00006042 353 C000 VFD ADR R000 06027 00006049 354 CX00 VFD ADR RX00 06028 0000604E 355 C00X VFD ADR R00X 06029 00006053 356 C01X VFD ADR R01X 0602A 00006059 357 CX0X VFD ADR RX0X 0602B 0000605C 358 C0XX VFD ADR R0XX 359 DRCT 00000004 ABS 360 CLOG EQU (DISPW BZYJMP) LOG 2 361 0602B 00000001 362 BZYTAB VFD CLOG:CXXX,C1XX,CX1X,C1XX req = RW 0602C 00000004 363 VFDB CLOG:CXX1,CXXX,CXXX,C000 0602C 00000000 364 VFDB CLOG:CX1X,CXXX,CX1X,CXXX req = RO 0602D 00000005 365 VFDB CLOG:CXX1,CXXX,CXXX,CX00 0602D 00000001 366 VFDB CLOG:CX1X,C1XX,CX1X,C1XX req = MW 0602E 00000006 367 VFDB CLOG:CXXX,CXXX,CXXX,C00X 0602E 00000000 368 VFDB CLOG:CXXX,CXXX,CXXX,CXXX req = NA 0602F 00000000 369 VFDB CLOG:CXXX,CXXX,CXXX,CXXX 06030 0108602C 370 BZYTABP PTR BZYTAB 371 06030 00000005 372 BZYPTHTAB VFD CLOG:CXXX,CX00,CXXX,CX00 req = RW 06031 00000005 373 VFDB CLOG:CXX1,CXXX,CXXX,CX00 06031 00000000 374 VFDB CLOG:C01X,CXXX,C01X,CXXX req = RO 06032 00000009 375 VFDB CLOG:C0XX,CXXX,CXXX,C0XX 06032 00000005 376 VFDB CLOG:CX1X,CX0X,CX1X,CX00 req = MW 06033 00000008 377 VFDB CLOG:CXXX,CXXX,CXXX,CX0X 06033 00000000 378 VFDB CLOG:CXXX,CXXX,CXXX,CXXX req = NA 06034 00000000 379 VFDB CLOG:CXXX,CXXX,CXXX,CXXX 06035 01086031 380 BZYPTHTABP PTR BZYPTHTAB 381 382 * Read can only be one 00006036 383 R1XX LABEL 06036 6008C10C 0 3 ZBM 384 LD R0 R3,FDRACS 06037 64040001 0 IMM 385 CPR R0 1 06038 FE02605F 386 JEQ CHECKWAIT 06039 FE0E606B 387 JMP BADRTN 388 * --- 389 390 * Write can only be one 0000603A 391 RX1X LABEL 0603A 6008E01C 0 3 ZBM 392 LD R0 R3,FDWACS 0603B 64040001 0 IMM 393 CPR R0 1 0603C FE02605F 394 JEQ CHECKWAIT 0603D FE0E606B 395 JMP BADRTN 396 * --- 397 398 * Multiple write can only be one 0000603E 399 RXX1 LABEL 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1335 (FILEACCESS) F 74 FREQ - Open service routines 0603E 6008E2FC 0 3 ZBM 400 LD R0 R3,FDMWACS 0603F 64040001 0 IMM 401 CPR R0 1 06040 FE02605F 402 JEQ CHECKWAIT 06041 FE0E606B 403 JMP BADRTN 404 * --- 405 406 * All busys must be zero 00006042 407 R000 LABEL 06042 5C08C10C 3 ZBM 408 CMZ R3,FDRACS 06043 FE0C606B 409 JNE BADRTN 06044 5C08E01C 3 ZBM 410 CMZ R3,FDWACS 06045 FE0C606B 411 JNE BADRTN 06046 5C08E2FC 3 ZBM 412 CMZ R3,FDMWACS 06047 FE02605F 413 JEQ CHECKWAIT 06048 FE0E606B 414 JMP BADRTN 415 * --- 416 417 * Writing access must be zero 00006049 418 RX00 LABEL 06049 5C08E01C 3 ZBM 419 CMZ R3,FDWACS 0604A FE0C606B 420 JNE BADRTN 0604B 5C08E2FC 3 ZBM 421 CMZ R3,FDMWACS 0604C FE02605F 422 JEQ CHECKWAIT 0604D FE0E606B 423 JMP BADRTN 424 * --- 425 426 * Reading and plain writing must be zero 0000604E 427 R00X LABEL 0604E 5C08C10C 3 ZBM 428 CMZ R3,FDRACS any readers? 0604F FE0C606B 429 JNE BADRTN 06050 5C08E01C 3 ZBM 430 CMZ R3,FDWACS any writers? 06051 FE02605F 431 JEQ CHECKWAIT 06052 FE0E606B 432 JMP BADRTN 433 * --- 434 435 * Reading must be zero and writing must be one 00006053 436 R01X LABEL 06053 5C08C10C 3 ZBM 437 CMZ R3,FDRACS 06054 FE0C606B 438 JNE BADRTN 06055 6008E01C 0 3 ZBM 439 LD R0 R3,FDWACS 06056 64040001 0 IMM 440 CPR R0 1 06057 FE02605F 441 JEQ CHECKWAIT 06058 FE0E606B 442 JMP BADRTN 443 * --- 444 445 * Writers must number zero 00006059 446 RX0X LABEL 06059 5C08E01C 3 ZBM 447 CMZ R3,FDWACS 0605A FE02605F 448 JEQ CHECKWAIT 0605B FE0E606B 449 JMP BADRTN 450 * --- 451 452 * Writing must be zero 0000605C 453 R0XX LABEL 0605C 5C08C10C 3 ZBM 454 CMZ R3,FDRACS 0605D FE02605F 455 JEQ CHECKWAIT 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1336 (FILEACCESS) F 74 FREQ - Open service routines 0605E FE0E606B 456 JMP BADRTN 457 * --- 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1337 (FILEACCESS) F 74 FREQ - Open service routines 459 460 ********************************************************************************** 461 * * 462 * If we have not already been suspended, check to see whether * 463 * anybody is waiting for this file. * 464 * * 465 ********************************************************************************** 466 0000605F 467 CHECKWAIT LABEL 0605F 60000412 0 468 LD R0 CPPSA => PSA 06060 5C080010 0 ZBM 469 CMZ R0,PSWAITED this our suspension 06061 FE0C606A 470 JNE OKRTN jump if I'm reentering 06062 DC00606E 471 CALL FINDFILEBZ are there any waiters? 06063 41494081 5 ZBM 472 PARV FCB,FCDRIVE the volume for the file 06064 42174809 5 BASE 473 PAR2L FCB,FCSERIAL the serial number of the file 06065 FE0E6067 474 JMP ITSWAITER jump if someone is waiting 06066 FE0E606A 475 JMP OKRTN if no waiters, its mine 476 * --- 477 00006067 478 ITSWAITER LABEL 479 PUNLOCK FILEWAITL unlock the held lock 06067 EC001D0F 479 STZ FILEWAITL 06068 0C800000 479 ION 06069 FE0E606B 480 JMP BADRTN return file busyness 481 * --- 482 483 * No checking 0000606A 484 RXXX LABEL 0000606A 485 OKRTN LABEL 0606A 19C40001 7 IMM 486 ADD R7 1 0000606B 487 BADRTN LABEL 0606B 60000412 0 488 LD R0 CPPSA 0606C EC080010 0 ZBM 489 STZ R0,PSWAITED clear the OPEN reentry flag 0606D 5D1F8001 6 STAK 490 LEAVE POP 491 * --- 492 493 END of CHKBZYACS 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1338 (FILEACCESS) F 74 FREQ - Open service routines 495 496 ********************************************************************************** 497 * * 498 * FINDFILBZ. Routine that searches the file wait queue and * 499 * returns whether this file is being waited on or not. * 500 * Call: * 501 * CALL FINDFILEBZ see if waiting on * 502 * PARV volume number of file * 503 * PAR2L file serial number * 504 * JMP someone is waiting (R2=PCB, * 505 ** & FILEWAITL is locked) * 506 * Eats R0-R2. * 507 * Stack required = 1 * 508 * 1 + LOCKWAIT (0) * 509 * * 510 ********************************************************************************** 511 512 BLOCK FINDFILEBZ subroutine 513 ENTRY FINDFILEBZ 514 515 BEGFRAME 516 ENDFRAME 517 0606E DD1F8001 6 STAK 518 FINDFILEBZ ENTR PUSH 0606F C1528000 2 REG 519 STPV R2 volume number 06070 C2124000 1 REG 520 STP2L R1 => serial number 521 PLOCK FILEWAITL get access to the file wait list 06071 0CC00000 521 IOFF 06072 D1C01D0F 521 SETT FILEWAITL 06073 FE0C6075 521 JNE MA(2+DISPW MA 0) 06074 DC40308B 521 CALLNP LOCKWAIT 522 PLOCK SQLOCKS(NQFILEWAIT) get the file wait queue 06075 0CC00000 522 IOFF 06076 D1C01DC2 522 SETT SQLOCKS(NQFILEWAIT) 06077 FE0C6079 522 JNE MA(2+DISPW MA 0) 06078 DC40308B 522 CALLNP LOCKWAIT 06079 62164400 011 @R 523 LD2 R0 @R1 R0,R1 = fsn 0607A E48A0080 2 0 CBM 524 ST R2 R0/VOLFIELD merge in the volume number 0607B 60801DB1 2 525 LD R2 SQFILEWAIT 0000607C 526 FINDWAITR LABEL 0607C 3C568802 1 2 BASE 527 LSRCH R1 R2,PCQPARM(1) see if any entries here 0607D FE0C6081 528 JNE NOWAITRS jump if none at all 0607E 64168801 0 2 BASE 529 CPR R0 R2,PCQPARM(0) could this really be a match? 0607F FE026084 530 JEQ WAITRS jump if match found 06080 FAB6607C 2 531 LJNA R2 FINDWAITR else try next one 532 * \ / 00006081 533 NOWAITRS LABEL 06081 61D7D001 7 7 REG 534 LD R7 R7+1 no waiters found 535 PUNLOCK FILEWAITL release access to the file wait list 06082 EC001D0F 535 STZ FILEWAITL 06083 0C800000 535 ION 00006084 536 WAITRS LABEL 537 PUNLOCK SQLOCKS(NQFILEWAIT) release the list 06084 EC001DC2 537 STZ SQLOCKS(NQFILEWAIT) 06085 0C800000 537 ION 06086 5D1F8001 6 STAK 538 LEAVE POP and return 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1339 (FILEACCESS) F 74 FREQ - Open service routines 539 * --- 540 541 END FINDFILEBZ subroutine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1340 (FILEACCESS) F 74 FREQ - Open service routines 543 544 BLOCK 545 546 ENTRY INITDEVACS initialize device for this access 547 548 ********************************************************************************** 549 * * 550 * INITDEVACS. Some devices need special setup when getting * 551 * accessed with different privileges. This routine does any setup * 552 * necessary. It is assumed that we have some access to the device * 553 * and are now changing to a new one. It is also assumed that the * 554 * requested access is legal for this device. A successful call of * 555 * this routine will cause a non-reversible operation to be done. * 556 * The device need not be saved. * 557 * Call: * 558 * LD FCB => file control block for file * 559 * LD R3 => directory entry (if saved) * 560 * CALL INITDEVACS * 561 * PARVL access going for * 562 * JMP couldn't do it (R0 = error code) * 563 * * 564 * Eats R0:R3. Uses WNDO1. * 565 * Stack required = 18 * 566 * 6 + max ( DOREWIND (3), GRUBWNDO1 (7), LEVELBIT (3), * 567 * LINKLP (3), LINKTAPE (2), LINKTERM (2), * 568 * LOCKWAIT (0), PLACEPTHE (5), PRIV2MACCT (1), * 569 * RAFCURCHEK (1), RSTRWNDO (7), SAVEWNDO1 (2), * 570 * SETWNDO1 (4), SFREEMEM (0), SGETMEM (0), * 571 * UNDOPATH (10), UNLINKLP (1), UNLINKTAPE (1), * 572 * UNLINKTERM (12), UNMAPFILE (12), ZEROIT (1) ) * 573 * * 574 * The devices that have to be diddled by this routine are: * 575 * * 576 * PATH - which "end" of a path depends on ones access to the device. * 577 * Thus as access changes we must unhook and hook this FCB * 578 * from the path. * 579 * * 580 * CODE - when opening for write, if the opener does not have modify * 581 * access to the file we must remove any privilege from above. * 582 * * 583 * RAF - Rafs must be large when multiple write. * 584 * * 585 * MT - make sure hardware allows writing before we give write access. * 586 * Link to device tables. * 587 * * 588 * CT - make sure hardware allows writing before we give write access. * 589 * Link to device tables. * 590 * * 591 * VT - make sure hardware allows writing before we give write access. * 592 * Link to device tables. * 593 * * 594 * TERM - open access is controlled by fields in the TCB. Make * 595 * sure no other process is using the terminal and this * 596 * process does not have conflicting access. * 597 * * 598 * LP - link to LP device tables, make sure LP is not busy, release * 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1341 (FILEACCESS) F 74 FREQ - Open service routines 599 * table if going to NA. * 600 * * 601 ********************************************************************************** 602 603 BEGFRAME 00178801 6 BASE 604 ERRSAV BSS 2 saves error codes after disk errors. 0017800C 6 CACH 605 NEWACS BSSB 8 new access to set 00099113 6 ZBM 606 DIRPNTR BSSB ADDRESS => directory entry 00178804 6 BASE 607 SAVE4WNDO1 BSS 1 save for WNDO1 state 00178805 6 BASE 608 R4SAVE BSS 1 save for the named register 609 ENDFRAME 610 06087 DD1F8006 6 STAK 611 INITDEVACS ENTR PUSH 06088 C0528000 2 REG 612 STPVL R2 06089 E497800C 2 6 CACH 613 ST R2 SP,NEWACS save the requested access 0608A E4C99113 3 6 ZBM 614 ST R3 SP,DIRPNTR save the directory pointer 0608B EC178804 6 BASE 615 STZ SP,SAVE4WNDO1 say no state saved (yet) 0608C E5178805 4 6 BASE 616 ST R4 SP,R4SAVE save this register 0608D 60A461CC 2 2 617 LD R2 DISPTAB(R2) do convert & multiply on requested access 0608E 18895835 2 5 ZBM 618 ADD R2 FCB,FCACCESS R2 = reqacs * 8 + prevaccs 0608F 60096665 0 5 ZBM 619 LD R0 FCB,FCHTYPE get device type 06090 64040010 0 IMM 620 CPR R0 HTABL known device type? 06091 FE0660D7 621 JGE RNONE if not, nothing to do 622 * \ / 06092 60E06096 3 0 623 LD R3 HTAB(R0) get pointer to operation table 06093 FAC260D7 3 624 JEQZ R3 RNONE jump if no operation to do 06094 601AD400 0 32 @R 625 LD R0 @R3(R2) get operation code 06095 5CA060A6 0 626 LDPC JTAB(R0) do change operation 627 * --- 628 629 * Indexed by hardware type to get pointer to table of operations 00006096 630 HTAB LABEL 06096 00000000 631 VFD 0 06097 00000000 632 VFD 0 SAF 06098 014860B9 633 PTR ACSRAFT RAF 06099 014860BE 634 PTR ACSCODET CODE 0609A 014860C3 635 PTR ACSPATHT PATH 0609B 00000000 636 VFD 0 DIR 0609C 00000000 637 VFD 0 NULL 0609D 014860D2 638 PTR ACSTERMT TERM 0609E 00000000 639 VFD 0 formerly LOCK 0609F 00000000 640 VFD 0 BATCH 060A0 00000000 641 VFD 0 CDR 060A1 014860CD 642 PTR ACSPHT LP 060A2 014860C8 643 PTR ACSMTT MT 060A3 014860C8 644 PTR ACSMTT CT 060A4 00000000 645 VFD 0 VOL 060A5 014860C8 646 PTR ACSMTT VT 647 00000010 ABS 648 HTABL EQU DISPW HTAB 649 ASSERTEQ HTABL,HTYPELAST 649 BSS HTABL-HTYPELAST error if HTABL < HTYPELAST 649 BSS HTYPELAST-HTABL error if HTYPELAST < HTABL 650 000060A6 651 JTAB BASE 060A6 000060D7 652 CNONE VFD ADR RNONE no changing needed 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1342 (FILEACCESS) F 74 FREQ - Open service routines 060A7 000060F4 653 CCODEW VFD ADR RCODEW writing a code file 060A8 0000611D 654 CRAFMW VFD ADR RRAFMW multiple write RAFs 060A9 0000613E 655 CRAFUM VFD ADR RRAFUM unmap data when file not in use 060AA 0000613F 656 CRAFUMW VFD ADR RRAFUMW disconnect GFC, maybe free it 060AB 0000615B 657 CPTHR VFD ADR RPTHR going to read a PATH 060AC 0000615B 658 CPTHW VFD ADR RPTHW going to write a PATH 060AD 0000615A 659 CPTHRW VFD ADR RPTHRW changing PATH from read to write 060AE 0000615A 660 CPTHWR VFD ADR RPTHWR changing PATH from write to read 060AF 00006160 661 CPTHNA VFD ADR RPTHNA changing PATH to NA 060B0 00006162 662 CMTA VFD ADR RMTA NA => read access on a MT 060B1 00006165 663 CMTW VFD ADR RMTW changing MT to writing 060B2 0000616A 664 CMTWA VFD ADR RMTWA NA => write access on a MT 060B3 00006171 665 CMTNA VFD ADR RMTNA access => NA on a MT 060B4 00006174 666 CLPA VFD ADR RLPA NA => access on a LP 060B5 00006177 667 CLPNA VFD ADR RLPNA access => NA on a LP 060B6 00006179 668 CTERMA VFD ADR RTERMA NA => access or NA on a terminal 060B7 0000617D 669 CTERMNA VFD ADR RTERMNA access => NA on a terminal 060B8 00000000 670 VFD 0 room to patch 671 DRCT 00000005 ABS 672 JLOG EQU (DISPW JTAB) LOG 2 673 674 * RAF - going into multiple write creates a GFC 675 * - going from multiple write dumps the GFC 060B8 00000000 676 ACSRAFT VFD JLOG:CNONE,CNONE,CNONE,CNONE reqacs = RW 060B9 00000000 677 VFDB JLOG:CRAFUMW,CNONE,CNONE,CNONE 060B9 00000000 678 VFDB JLOG:CNONE,CNONE,CNONE,CNONE reqacs = RO 060BA 00000000 679 VFDB JLOG:CRAFUMW,CNONE,CNONE,CNONE 060BB 00000000 680 VFDB JLOG:CRAFMW,CRAFMW,CNONE,CNONE reqacs = MW 060BB 00000002 681 VFDB JLOG:CRAFMW,CNONE,CNONE,CRAFMW 060BC 00000003 682 VFDB JLOG:CRAFUM,CRAFUM,CRAFUM,CRAFUM reqacs = NA 060BD 00000000 683 VFDB JLOG:CRAFUM,CNONE,CNONE,CNONE 684 685 * CODE - if going to write we must remove privs. 060BD 00000001 686 ACSCODET VFD JLOG:CNONE,CCODEW,CNONE,CCODEW reqacs = RW 060BE 00000001 687 VFDB JLOG:CNONE,CNONE,CNONE,CCODEW 060BE 00000000 688 VFDB JLOG:CNONE,CNONE,CNONE,CNONE reqacs = RO 060BF 00000000 689 VFDB JLOG:CNONE,CNONE,CNONE,CNONE 060C0 00000001 690 VFDB JLOG:CNONE,CCODEW,CNONE,CCODEW reqacs = MW 060C0 00000001 691 VFDB JLOG:CNONE,CNONE,CNONE,CCODEW 060C1 00000003 692 VFDB JLOG:CRAFUM,CRAFUM,CRAFUM,CRAFUM reqacs = NA 060C2 00000000 693 VFDB JLOG:CRAFUM,CNONE,CNONE,CNONE 694 695 * PATH - must change socket directions as access changes. 060C2 00000000 696 ACSPATHT VFD JLOG:CNONE,CPTHRW,CNONE,CNONE reqacs = RW 060C3 00000006 697 VFDB JLOG:CNONE,CNONE,CNONE,CPTHW 060C3 00000000 698 VFDB JLOG:CPTHWR,CNONE,CNONE,CNONE reqacs = RO 060C4 00000005 699 VFDB JLOG:CPTHWR,CNONE,CNONE,CPTHR 060C5 00000000 700 VFDB JLOG:CNONE,CPTHRW,CNONE,CNONE reqacs = MW 060C5 00000006 701 VFDB JLOG:CNONE,CNONE,CNONE,CPTHW 060C6 00000000 702 VFDB JLOG:CPTHNA,CPTHNA,CNONE,CNONE reqacs = NA 060C7 00000000 703 VFDB JLOG:CPTHNA,CNONE,CNONE,CNONE 704 705 * MT & CT & VT - check for going to writing on a read only device. 060C7 0000000B 706 ACSMTT VFD JLOG:CNONE,CMTW,CNONE,CMTW reqacs = RW 060C8 0000000C 707 VFDB JLOG:CNONE,CNONE,CNONE,CMTWA 060C8 00000000 708 VFDB JLOG:CNONE,CNONE,CNONE,CNONE reqacs = RO 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1343 (FILEACCESS) F 74 FREQ - Open service routines 060C9 0000000A 709 VFDB JLOG:CNONE,CNONE,CNONE,CMTA 060CA 0000000B 710 VFDB JLOG:CNONE,CMTW,CNONE,CMTW reqacs = MW 060CA 0000000C 711 VFDB JLOG:CNONE,CNONE,CNONE,CMTWA 060CB 0000000D 712 VFDB JLOG:CMTNA,CMTNA,CNONE,CMTNA reqacs = NA 060CC 00000000 713 VFDB JLOG:CNONE,CNONE,CNONE,CNONE 714 715 * Physical device -- if leaving NA get the physical device, 716 * if going to NA, release physical device 060CC 00000000 717 ACSPHT VFD JLOG:CNONE,CNONE,CNONE,CNONE reqacs = RW 060CD 0000000E 718 VFDB JLOG:CNONE,CNONE,CNONE,CLPA 060CD 00000000 719 VFDB JLOG:CNONE,CNONE,CNONE,CNONE reqacs = RO 060CE 0000000E 720 VFDB JLOG:CNONE,CNONE,CNONE,CLPA 060CF 00000000 721 VFDB JLOG:CNONE,CNONE,CNONE,CNONE reqacs = MW 060CF 0000000E 722 VFDB JLOG:CNONE,CNONE,CNONE,CLPA 060D0 0000000F 723 VFDB JLOG:CLPNA,CLPNA,CLPNA,CLPNA reqacs = NA 060D1 00000000 724 VFDB JLOG:CLPNA,CNONE,CNONE,CNONE 725 726 * Terminal device -- if leaving NA get the terminal device, 727 * if going to NA, release terminal device 060D1 00000000 728 ACSTERMT VFD JLOG:CNONE,CTERMA,CNONE,CNONE reqacs = RW 060D2 00000010 729 VFDB JLOG:CNONE,CNONE,CNONE,CTERMA 060D2 00000000 730 VFDB JLOG:CTERMA,CNONE,CNONE,CNONE reqacs = RO 060D3 00000010 731 VFDB JLOG:CNONE,CNONE,CNONE,CTERMA 060D4 00000000 732 VFDB JLOG:CNONE,CNONE,CNONE,CNONE reqacs = MW 060D4 00000010 733 VFDB JLOG:CNONE,CNONE,CNONE,CTERMA 060D5 00000011 734 VFDB JLOG:CTERMNA,CTERMNA,CTERMNA,CTERMNA reqacs = NA 060D6 00000010 735 VFDB JLOG:CTERMNA,CNONE,CNONE,CTERMA 736 737 ********************************************************************************** 738 * * 739 * RNONE. Nothing to do for this access or this device. * 740 * * 741 ********************************************************************************** 742 000060D7 743 RNONE LABEL 000060D7 744 OKRTN LABEL 060D7 60096665 0 5 ZBM 745 LD R0 FCB,FCHTYPE check device type 060D8 6404000D 0 IMM 746 CPR R0 HTYPECT is it cartridge tape? 060D9 FE0C60EB 747 JNE NOTCT no, skip track selection 060DA 61095F16 4 5 ZBM 748 LD R4 FCB,FCDCBPTR get device control block 060DB FB0260EB 4 749 JEQZ R4 NOTCT we come through here during system init 060DC 60000412 0 750 LD R0 CPPSA current process status area 060DD 60081F11 0 0 ZBM 751 LD R0 R0,PSCACHNP1 caller's console area 060DE 5C082212 0 ZBM 752 CMZ R0,CAR0/XRFLDNRWD did he specify no rewind? 060DF FE0C60EC 753 JNE OKRTN2 skip all this if so 060E0 DC4065A6 754 CALLNP MTCHKWFM check if file mark needed 060E1 60491F11 1 4 ZBM 755 LD R1 R4,MTUCNTL get pointer to MTC 756 PLOCK R1,MTCELOCK get access to critical region 060E2 0CC00000 756 IOFF 060E3 D1D64803 1 BASE 756 SETT R1,MTCELOCK 060E4 FE0C60E6 756 JNE MA(2+DISPW MA 0) 060E5 DC40308B 756 CALLNP LOCKWAIT 060E6 EC091831 4 ZBM 757 STZ R4,MTUTRACK track number is 0 758 PUNLOCK R1,MTCELOCK release lock 060E7 EC164803 1 BASE 758 STZ R1,MTCELOCK 060E8 0C800000 758 ION 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1344 (FILEACCESS) F 74 FREQ - Open service routines 060E9 DC00658A 759 CALL MTREQUEST select the track 060EA 4044000A IMM 760 PARVL MTURQSET 761 * \ / 000060EB 762 NOTCT LABEL 060EB DC4073B2 763 CALLNP DOREWIND rewind all other device types 000060EC 764 OKRTN2 LABEL 060EC 19C40001 7 IMM 765 ADD R7 1 000060ED 766 BADRTN LABEL 060ED E6178801 016 BASE 767 ST2 R0 SP,ERRSAV 060EE 60D38000 3 6 REG 768 LD R3 SP 060EF DC0032A0 769 CALL RSTRWNDO restore the state of WNDO1 060F0 4016C804 3 BASE 770 PARL R3,SAVE4WNDO1 060F1 62178801 016 BASE 771 LD2 R0 SP,ERRSAV 060F2 61178805 4 6 BASE 772 LD R4 SP,R4SAVE restore this register 060F3 5D1F8006 6 STAK 773 LEAVE POP 774 * --- 775 776 ********************************************************************************** 777 * * 778 * RCODEW. Writing to a CODE file. * 779 * A .CODE file being equipped for write access needs some * 780 * privilege checking. Getting write access means the equipper can * 781 * change the program so that any privileges that the program has * 782 * gotten from above are no longer valid. So, if the equipper has * 783 * modify access to the file (i.e., he is as good as the file owner) * 784 * then all privs given from above are removed and "own directory" * 785 * is kept. If the equipper does not have modify access then all * 786 * privs are removed. This ensures that privs are given only to * 787 * specific programs and if the program is modified, then privs * 788 * that the modifyer cannot change himself (that are given from * 789 * above) are lost. * 790 * * 791 ********************************************************************************** 792 000060F4 793 RCODEW LABEL 060F4 EDC95C16 5 ZBM 794 STW FCB,FCRESEEK only the root pointer is good 060F5 60097182 0 5 ZBM 795 LD R0 FCB,FCLPBLK 060F6 E4095181 0 5 ZBM 796 ST R0 FCB,FCMSBLK set up address of the CCB 060F7 60D38000 3 6 REG 797 LD R3 SP 060F8 DC00328A 798 CALL SAVEWNDO1 save the current mapping of this window 060F9 4016C804 3 BASE 799 PARL R3,SAVE4WNDO1 060FA DC003205 800 CALL SETWNDO1 get the CCB into core 060FB 41440000 IMM 801 PARV VPCNTLW indicate writable because we may remove privileges 060FC 41534000 5 REG 802 PARV FCB indicate what lun is associated with this block 060FD 41006119 803 PAR CKMODDE pass error address 060FE 41574801 5 BASE 804 PARV FCB,FCBLOCK pass MS block number 060FF 40440013 IMM 805 PARVL FBITCCB and expected FBI type 06100 60C40BE8 3 IMM 806 LD R3 ADR WNDO1(CCBINFO) R3=>root of information place 06101 DC005C07 807 CALL PRIV2MACCT enough priv to diddle account 06102 40494E45 5 ZBM 808 PARVL FCB,FCPRIV 06103 FE0E610B 809 JMP CKMODLVL jump if not enough privs 06104 DC005B84 810 CALL LEVELBIT 06105 60000414 0 811 LD R0 CPCUPC get the current UPC pointer 06106 41481F13 0 ZBM 812 PARV R0,UPCPRIVULB indicate what privileges we have 06107 40495114 5 ZBM 813 PARVL FCB,FCLIMITPTR 06108 10040001 0 IMM 814 SUB R0 1 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1345 (FILEACCESS) F 74 FREQ - Open service routines 06109 28161001 0 0 REG 815 BSUB R0 R0+1 R0 = bits above file owner 0610A FE0E610D 816 JMP CKMODZAP 817 * --- 818 819 * He has not access so we remove all given privileges 0000610B 820 CKMODLVL LABEL 0610B 6007FFFF 0 IMM 821 LD R0 -1 zap all the bits 0610C EC08C211 3 ZBM 822 STZ R3,CCBOWNDIR don't get access to the directory 0000610D 823 CKMODZAP LABEL 0610D A808C050 0 3 ZBM 824 BRSBM R0 R3,CCBRSTCTG1 remove blessings 0610E A808CA50 0 3 ZBM 825 BRSBM R0 R3,CCBRSTCTG2 0610F A808D450 0 3 ZBM 826 BRSBM R0 R3,CCBRSTCTG3 06110 A808DE50 0 3 ZBM 827 BRSBM R0 R3,CCBRSTCTG4 06111 A808E850 0 3 ZBM 828 BRSBM R0 R3,CCBRSTCTG5 06112 A808F210 0 3 ZBM 829 BRSBM R0 R3,CCBMAINTR 06113 A808F410 0 3 ZBM 830 BRSBM R0 R3,CCBMAINTW 06114 A808F620 0 3 ZBM 831 BRSBM R0 R3,CCBOPREQ 06115 A808FA40 0 3 ZBM 832 BRSBM R0 R3,CCBMANAGR 06116 A808C421 0 3 ZBM 833 BRSBM R0 R3,CCBBACKUP 06117 DC403150 834 CALLNP GRUBWNDO1 let the page get written out 06118 FE0E60D7 835 JMP OKRTN use this code file now 836 * --- 837 838 * Disk went bad on CCB. We grab the stuff and return the error to the caller. 00006119 839 CKMODDE LABEL 06119 E6178801 016 BASE 840 ST2 R0 SP,ERRSAV save error code 0611A DC403150 841 CALLNP GRUBWNDO1 clean up after error 0611B 62178801 016 BASE 842 LD2 R0 SP,ERRSAV get back why it went bad 0611C FE0E60ED 843 JMP BADRTN and return to caller 844 * --- 845 846 ********************************************************************************** 847 * * 848 * RRAFMW. A RAF is being accessed multiple write. Search * 849 * the list of GFCs for our file. If not found create one for the * 850 * file, otherwise increment the use count for it and put the * 851 * pointer in the FCB. * 852 * * 853 ********************************************************************************** 854 0000611D 855 RRAFMW LABEL 0611D 62574809 125 BASE 856 LD2 R1 FCB,FCSERIAL pick up the serial number 0611E 60094081 0 5 ZBM 857 LD R0 FCB,FCDRIVE 0611F E40A4080 0 1 CBM 858 ST R0 R1/VOLFIELD add to the serial number 859 PLOCK GFCLOCK lock the list of GFCs 06120 0CC00000 859 IOFF 06121 D1C01EC5 859 SETT GFCLOCK 06122 FE0C6124 859 JNE MA(2+DISPW MA 0) 06123 DC40308B 859 CALLNP LOCKWAIT 06124 60C01EC4 3 860 LD R3 GFCLIST R3 -> list 06125 3E56C803 123 BASE 861 LSRCH2 R1 R3,GFFSN look for the same serial number 06126 FE026139 862 JEQ HAVEGFC we have the GFC 863 * \ / 864 865 * We must create a GFC for this file 06127 DC002ED0 866 CALL SGETMEM pick up a chunk of system memory 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1346 (FILEACCESS) F 74 FREQ - Open service routines 06128 40440003 IMM 867 PARVL GFCLOG how much we want 06129 60D20000 3 0 REG 868 LD R3 R0 R3 -> our chunk 0612A DC003090 869 CALL ZEROIT clean it out 0612B 4116C800 3 BASE 870 PAR R3,0 where it starts 0612C 40440008 IMM 871 PARVL 2 POWER GFCLOG how many words to zero 0612D 60095826 0 5 ZBM 872 LD R0 FCB,FCRAFTYPE get the raf type 0612E E408C021 0 3 ZBM 873 ST R0 R3,GFRAFTYPE and set 0612F 5D606CEC 0 874 XCT RAFROOTGET(R0) pick up the root block 06130 E408D182 0 3 ZBM 875 ST R0 R3,GFMSBLK 06131 62174809 015 BASE 876 LD2 R0 FCB,FCSERIAL need the serial number 06132 E616C803 013 BASE 877 ST2 R0 R3,GFFSN 06133 60094081 0 5 ZBM 878 LD R0 FCB,FCDRIVE the volume number 06134 E408C083 0 3 ZBM 879 ST R0 R3,GFFSNVOL put in with the FSN 06135 E408C082 0 3 ZBM 880 ST R0 R3,GFVOL and set in the block address, too 06136 60001EC4 0 881 LD R0 GFCLIST pick up the list pointer 06137 E408DF10 0 3 ZBM 882 ST R0 R3,GFLINK link onto our element 06138 E4C01EC4 3 883 ST R3 GFCLIST and now we are in the list 884 * \ / 885 00006139 886 HAVEGFC LABEL 06139 D008C0F0 3 ZBM 887 INC R3,GFUSECNT account for us being here 888 PUNLOCK GFCLOCK 0613A EC001EC5 888 STZ GFCLOCK 0613B 0C800000 888 ION 0613C E4C95F16 3 5 ZBM 889 ST R3 FCB,FCDCBPTR so we will now where the element is 0613D FE0E60D7 890 JMP OKRTN done with success 891 * --- 892 893 ********************************************************************************** 894 * * 895 * RRAFUM. Unmap pages in use by this RAF or CODE. Used when * 896 * access is being changed to NA to release data in use. If there * 897 * is a global control block for this file then decrement our use * 898 * from it and free it if the use count reaches zero. * 899 * * 900 * RRAFUMW. Going from MW to another access that still allows pages * 901 * to be mapped (RW or RO). Just diddle the GFC. * 902 * * 903 ********************************************************************************** 904 0000613E 905 RRAFUM LABEL 0613E DC405EE3 906 CALLNP UNMAPFILE release the pages 0000613F 907 RRAFUMW LABEL 0613F 60C95F16 3 5 ZBM 908 LD R3 FCB,FCDCBPTR pick up pointer to global control block 06140 FAF060D7 3 909 JZA R3 OKRTN all done if there is none 06141 DC406CDF 910 CALLNP RAFCURCHEK keep pointers straight 911 PLOCK GFCLOCK lock the list of GFCs 06142 0CC00000 911 IOFF 06143 D1C01EC5 911 SETT GFCLOCK 06144 FE0C6146 911 JNE MA(2+DISPW MA 0) 06145 DC40308B 911 CALLNP LOCKWAIT 06146 D048C0F0 3 ZBM 912 DEC R3,GFUSECNT one less user 06147 FE046157 913 JGT UNLOCKIT nothing to do if still in use 06148 FE02614A 914 JEQ FREEGFC free the GFC if no one is using it 06149 00131128 915 HALT HALTS1128 use count went negative 916 * --- 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1347 (FILEACCESS) F 74 FREQ - Open service routines 917 0000614A 918 FREEGFC LABEL 0614A 60041EC4 0 IMM 919 LD R0 ADR GFCLIST pick up the list 0614B 3CC81F10 3 0 ZBM 920 LSRCH R3 R0,GFLINK scan for ours 0614C FE02614E 921 JEQ FOUNDUS jump if we have it 0614D 00131129 922 HALT HALTS1129 GFC disappeared from the list 923 * --- 924 0000614E 925 FOUNDUS LABEL 0614E 6048DF10 1 3 ZBM 926 LD R1 R3,GFLINK point to the next in the list 0614F E4481F10 1 0 ZBM 927 ST R1 R0,GFLINK remove us from the list 928 PUNLOCK GFCLOCK release GFC for good 06150 EC001EC5 928 STZ GFCLOCK 06151 0C800000 928 ION 06152 DC002F5D 929 CALL SFREEMEM 06153 41440003 IMM 930 PARV GFCLOG size of block 06154 4052C000 3 REG 931 PARVL R3 where it is 06155 EC095F16 5 ZBM 932 STZ FCB,FCDCBPTR disassociate with any GFC 06156 FE0E60D7 933 JMP OKRTN finish out 934 * --- 935 00006157 936 UNLOCKIT LABEL 937 PUNLOCK GFCLOCK 06157 EC001EC5 937 STZ GFCLOCK 06158 0C800000 937 ION 06159 FE0E60D7 938 JMP OKRTN 939 * --- 940 941 ********************************************************************************** 942 * * 943 * RPTHRW. Changing from a path reader into a writer. * 944 * Equivalent to unlinking and then relinking. * 945 * * 946 * RPTHR. Beginning to read a path. Call the accessor and * 947 * set up a read. * 948 * * 949 ********************************************************************************** 950 0000615A 951 RPTHRW LABEL 0615A DC40646A 952 CALLNP UNDOPATH unlink from the path 0000615B 953 RPTHR LABEL 0615B DC40617F 954 CALLNP EXCHACS put in new access temporarily 0615C DC40642D 955 CALLNP PLACEPTHE link to path 0615D E4C95F16 3 5 ZBM 956 ST R3 FCB,FCDCBPTR hold on to control block 0615E DC40617F 957 CALLNP EXCHACS restore accesses 0615F FE0E60D7 958 JMP OKRTN all done 959 * --- 960 961 ********************************************************************************** 962 * * 963 * RPTHW. Becoming a path writer. Call the accessor to set * 964 * up the writer. * 965 * * 966 ********************************************************************************** 967 0000615B 968 RPTHW EQU RPTHR one routine does both. 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1348 (FILEACCESS) F 74 FREQ - Open service routines 969 970 ********************************************************************************** 971 * * 972 * RPTHWR. Changing from a path writer into a reader. * 973 * Equivalent to unlinking and then relinking. * 974 * * 975 ********************************************************************************** 976 0000615A 977 RPTHWR EQU RPTHRW one routine does all 978 979 ********************************************************************************** 980 * * 981 * RPTHNA. Releasing access to the path. * 982 * * 983 ********************************************************************************** 984 00006160 985 RPTHNA LABEL 06160 DC40646A 986 CALLNP UNDOPATH loosen grip on path 06161 FE0E60D7 987 JMP OKRTN all done 988 * --- 989 990 ********************************************************************************** 991 * * 992 * RMTA. Getting access to a tape unit RO. We just link up * 993 * to it if possible. * 994 * * 995 ********************************************************************************** 996 00006162 997 RMTA LABEL 06162 DC406292 998 CALLNP LINKTAPE get access to the tables 06163 FE0E60ED 999 JMP BADRTN jump if we couldn't get it 06164 FE0E60D7 1000 JMP OKRTN 1001 * --- 1002 1003 ********************************************************************************** 1004 * * 1005 * RMTW. Changing to writing tape. We check to make sure * 1006 * that the device is not write protected. * 1007 * * 1008 ********************************************************************************** 1009 00006165 1010 RMTW LABEL 06165 60C95F16 3 5 ZBM 1011 LD R3 FCB,FCDCBPTR R3 => device control block 06166 5C08F81B 3 ZBM 1012 CMZ R3,MTUMTCSTAT/MTDSTWPRT read only? 06167 FE0260D7 1013 JEQ OKRTN jump if may write 06168 60040084 0 IMM 1014 LD R0 XREQERPFM "protected from modification" 06169 FE0E60ED 1015 JMP BADRTN 1016 * --- 1017 1018 ********************************************************************************** 1019 * * 1020 * RMTWA. Changing to writing tape. Also just going from * 1021 * NDA to write access so we have check to see if writing is legal * 1022 * after linking to the actual device. * 1023 * * 1024 ********************************************************************************** 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1349 (FILEACCESS) F 74 FREQ - Open service routines 1025 0000616A 1026 RMTWA LABEL 0616A DC406292 1027 CALLNP LINKTAPE get access to the tables 0616B FE0E60ED 1028 JMP BADRTN jump if we couldn't get it 0616C 5C08B81B 2 ZBM 1029 CMZ R2,MTUMTCSTAT/MTDSTWPRT read only? 0616D FE0260D7 1030 JEQ OKRTN jump if may write 0616E DC4062CE 1031 CALLNP UNLINKTAPE release the device we cannot use 0616F 60040084 0 IMM 1032 LD R0 XREQERPFM "protected from modification" 06170 FE0E60ED 1033 JMP BADRTN 1034 * --- 1035 1036 ********************************************************************************** 1037 * * 1038 * RMTNA. Changing from a data access to NA. Release the * 1039 * device tables. * 1040 * * 1041 ********************************************************************************** 1042 00006171 1043 RMTNA LABEL 06171 DC4073B2 1044 CALLNP DOREWIND rewind the device 06172 DC4062CE 1045 CALLNP UNLINKTAPE release the tables of the device 06173 FE0E60EC 1046 JMP OKRTN2 1047 * --- 1048 1049 1050 ********************************************************************************** 1051 * * 1052 * RLPA. Changing from NA to a data access on a LP. * 1053 * Link to the tables. * 1054 * * 1055 ********************************************************************************** 1056 00006174 1057 RLPA LABEL 06174 DC406269 1058 CALLNP LINKLP link to the device tables 06175 FE0E60ED 1059 JMP BADRTN jump if we cannot have it 06176 FE0E60D7 1060 JMP OKRTN return success 1061 * --- 1062 1063 ********************************************************************************** 1064 * * 1065 * RLPNA. Changing from a data access to NA on a LP. * 1066 * Release the device tables. * 1067 * * 1068 ********************************************************************************** 1069 00006177 1070 RLPNA LABEL 06177 DC4062C3 1071 CALLNP UNLINKLP release the tables of the device 06178 FE0E60EC 1072 JMP OKRTN2 1073 * --- 1074 1075 1076 ********************************************************************************** 1077 * * 1078 * RTERMA. Changing from NA to a data access on a TERM. * 1079 * Link to the tables. Also, if going from NA to NA we * 1080 * give marginal access to terminal (set only FCDCBPTR). * 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1350 (FILEACCESS) F 74 FREQ - Open service routines 1081 * This allows NA units to get information about busy * 1082 * terminals. * 1083 * * 1084 ********************************************************************************** 1085 00006179 1086 RTERMA LABEL 06179 60D7800C 3 6 CACH 1087 LD R3 SP,NEWACS get the desired new access 0617A DC406228 1088 CALLNP LINKTERM link to the device tables 0617B FE0E60ED 1089 JMP BADRTN jump if we cannot have it 0617C FE0E60D7 1090 JMP OKRTN return success 1091 * --- 1092 1093 ********************************************************************************** 1094 * * 1095 * RTERMNA. Changing from a data access to NA. Release * 1096 * the device tables. * 1097 * * 1098 ********************************************************************************** 1099 0000617D 1100 RTERMNA LABEL 0617D DC4062AC 1101 CALLNP UNLINKTERM release the tables of the device 0617E FE0E60EC 1102 JMP OKRTN2 1103 * --- 1104 1105 ********************************************************************************** 1106 * * 1107 * EXCHACS. Exchange saved access with access in FCB. * 1108 * * 1109 ********************************************************************************** 1110 0617F DD524000 1 REG 1111 EXCHACS ENTRNP R1 06180 6017800C 0 6 CACH 1112 LD R0 SP,NEWACS 06181 E0095835 0 5 ZBM 1113 EXCH R0 FCB,FCACCESS 06182 E417800C 0 6 CACH 1114 ST R0 SP,NEWACS 06183 5D124000 1 REG 1115 LEAVE R1 1116 * --- 1117 1118 END of INITDEVACS 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1351 (FILEACCESS) F 74 FREQ - Open service routines 1120 1121 BLOCK 1122 1123 ENTRY SETACCESS 1124 1125 ********************************************************************************** 1126 * * 1127 * SETACCESS. Given an FCB, a pointer to a directory entry * 1128 * (with the dir locked), and a new access, the old access is * 1129 * removed from the busy counters and the new access and access * 1130 * date are set. This does not diddle the total use count. * 1131 * Call: * 1132 * LD R3 => dir entry * 1133 * LD FCB => file control block * 1134 * CALL SETACCESS * 1135 * PARVL new access * 1136 * * 1137 * Eats R0:R2. * 1138 * Stack required = 2 * 1139 * 1 + GETFDATE (1) * 1140 * * 1141 ********************************************************************************** 1142 1143 BEGFRAME 1144 ENDFRAME 1145 06184 DD1F8001 6 STAK 1146 SETACCESS ENTR PUSH 06185 C0528000 2 REG 1147 STPVL R2 06186 60495835 1 5 ZBM 1148 LD R1 FCB,FCACCESS get the old access 06187 5D6261B4 1 1149 XCT ACSCLRTAB(R1) remove it from busy counters 06188 5D6461AC 2 1150 XCT ACSSETTAB(R2) add new access to busy counters 06189 E4895835 2 5 ZBM 1151 ST R2 FCB,FCACCESS set new access in control block 0618A 60094E45 0 5 ZBM 1152 LD R0 FCB,FCPRIV 0618B 64040008 0 IMM 1153 CPR R0 FSPRIVBKUP is this a backup program? 0618C FE026191 1154 JEQ NODATES if backup, skip update of selected fields 0618D 5D6461BC 2 1155 XCT ACSUSECNTB(R2) increment total read or write count 0618E DC40454F 1156 CALLNP GETFDATE get now's date 0618F 5D6261C4 1 1157 XCT ACSDATTAB(R1) update time of previous access 06190 5D6461C4 2 1158 XCT ACSDATTAB(R2) place date of the access 1159 * \ / 1160 00006191 1161 NODATES LABEL 06191 5D6261D4 1 1162 XCT UPDATEDR(R1) update DIR, if necessary 06192 5D6461DC 2 1163 XCT INITFCB(R2) reinitialize FCB 06193 5D1F8001 6 STAK 1164 LEAVE POP 1165 * --- 1166 1167 END of SETACCESS 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1352 (FILEACCESS) F 74 FREQ - Open service routines 1169 1170 BLOCK 1171 1172 ENTRY ACSSETTAB sets R3,FDxxACS corrects for getting indexing access 1173 ENTRY ACSCLRTAB removes indexing access for R3,FDxxACS 1174 ENTRY ACSUSECNTB table indexed by access to update TOTR or TOTW 1175 ENTRY ACSDATTAB sets date R3,xxxx for indexing access 1176 ENTRY DISPTAB displacement for access into common tables 1177 ENTRY VERIFYTABP accesses legal for devices 1178 ENTRY UPDATEDR updates FCB and dir file length 1179 ENTRY INITFCB initializes FCB file length 1180 1181 BEGFRAME 1182 ENDFRAME 1183 1184 ********************************************************************************** 1185 * * 1186 * A table with a one word entry for each hardware type and * 1187 * the accesses allowed for it. Accessed by: * 1188 * LD R0 access * 1189 * LD R1 hardware type code * 1190 * ADD R1 VERIFYTABP * 1191 * CMZ @R1(R0) * 1192 * JEQ access not legal * 1193 * access is legal * 1194 * * 1195 ********************************************************************************** 1196 40000000 ABS 1197 RO EQU 1*(BIT FSACSRO) 80000000 ABS 1198 RW EQU 1*(BIT FSACSRW) 20000000 ABS 1199 AO EQU 1*(BIT FSACSAO) 10000000 ABS 1200 XO EQU 1*(BIT FSACSXO) 08000000 ABS 1201 MW EQU 1*(BIT FSACSMW) 01000000 ABS 1202 NDA EQU 1*(BIT FSACSNDA) 1203 00006194 1204 VERIFYTAB LABEL 06194 00000000 1205 VFD 0 undefined 06195 E1000000 1206 VFD RW+RO+AO+NDA .SAF 06196 C9000000 1207 VFD RW+RO+MW+NDA .RAF 06197 D9000000 1208 VFD RW+RO+XO+MW+NDA .CODE 06198 C9000000 1209 VFD RW+RO+MW+NDA .PATH 06199 41000000 1210 VFD RO+NDA .DIR 0619A C9000000 1211 VFD RW+RO+MW+NDA .NULL 0619B C1000000 1212 VFD RW+RO+NDA .TERM 0619C 00000000 1213 VFD 0 was .LOCK 0619D 81000000 1214 VFD RW+NDA .TASK 0619E 41000000 1215 VFD RO+NDA .CDR 0619F C1000000 1216 VFD RW+RO+NDA .LP 061A0 C1000000 1217 VFD RW+RO+NDA .MT 061A1 C1000000 1218 VFD RW+RO+NDA .CT 061A2 01000000 1219 VFD NDA .VOL 061A3 C1000000 1220 VFD RW+RO+NDA .VT 061AA 00000000 1221 VFD 0,0,0,0,0,0,0 061AB 00486194 1222 VERIFYTABP PTR VERIFYTAB/BIT 0 1223 1224 ********************************************************************************** 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1353 (FILEACCESS) F 74 FREQ - Open service routines 1225 * * 1226 * Table of instructions to update the proper word when the * 1227 * busy counters are to be done. Indexed by access code. * 1228 * * 1229 ********************************************************************************** 1230 000061AC 1231 ACSSETTAB LABEL 061AC EDC8E01C 3 ZBM 1232 STW R3,FDWACS RW 061AD D008C10C 3 ZBM 1233 INC R3,FDRACS RO 061AE EDC8E01C 3 ZBM 1234 STW R3,FDWACS AO 061AF D008C10C 3 ZBM 1235 INC R3,FDRACS XO 061B0 D008E2FC 3 ZBM 1236 INC R3,FDMWACS MW 061B1 00131161 1237 HALT HALTS1161 DR 061B2 00131162 1238 HALT HALTS1162 -- 061B3 FEC00000 1239 NOP 0 NA 1240 1241 ********************************************************************************** 1242 * * 1243 * Instructions to remove current busy count. Indexed by * 1244 * access. * 1245 * * 1246 ********************************************************************************** 1247 000061B4 1248 ACSCLRTAB LABEL 061B4 EC08E01C 3 ZBM 1249 STZ R3,FDWACS RW 061B5 D048C10C 3 ZBM 1250 DEC R3,FDRACS RO 061B6 EC08E01C 3 ZBM 1251 STZ R3,FDWACS AO 061B7 D048C10C 3 ZBM 1252 DEC R3,FDRACS XO 061B8 D048E2FC 3 ZBM 1253 DEC R3,FDMWACS MW 061B9 00131164 1254 HALT HALTS1164 DR 061BA 00131165 1255 HALT HALTS1165 -- 061BB FEC00000 1256 NOP 0 NA 1257 1258 ********************************************************************************** 1259 * * 1260 * Table of instructions to increment TOTR or TOTW field. * 1261 * Indexed by access. * 1262 * * 1263 ********************************************************************************** 1264 000061BC 1265 ACSUSECNTB LABEL 061BC D008E10D 3 ZBM 1266 INC R3,FDWUSE RW 061BD D008C10D 3 ZBM 1267 INC R3,FDRUSE RO 061BE D008E10D 3 ZBM 1268 INC R3,FDWUSE AO 061BF D008C10D 3 ZBM 1269 INC R3,FDRUSE XO 061C0 D008E10D 3 ZBM 1270 INC R3,FDWUSE MW 061C1 00131168 1271 HALT HALTS1168 DR -- illegal 061C2 00131169 1272 HALT HALTS1169 -- unassigned code 061C3 FEC00000 1273 NOP 0 NA 1274 1275 ********************************************************************************** 1276 * * 1277 * Table to update the last access time. * 1278 * * 1279 ********************************************************************************** 1280 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1354 (FILEACCESS) F 74 FREQ - Open service routines 000061C4 1281 ACSDATTAB LABEL 061C4 E416C807 0 3 BASE 1282 ST R0 R3,FDLCD RW 061C5 E416C808 0 3 BASE 1283 ST R0 R3,FDLACC RO 061C6 E416C807 0 3 BASE 1284 ST R0 R3,FDLCD AO 061C7 E416C808 0 3 BASE 1285 ST R0 R3,FDLACC XO 061C8 E416C807 0 3 BASE 1286 ST R0 R3,FDLCD MW 061C9 00131166 1287 HALT HALTS1166 DR 061CA 00131167 1288 HALT HALTS1167 -- 061CB FEC00000 1289 NOP 0 NA 1290 1291 ********************************************************************************** 1292 * * 1293 * Access are used to access common tables, but there are * 1294 * eight access codes, but really only four access types * 1295 * (RO, RW, MW, NA). This table maps the access codes onto * 1296 * the four real accesses times eight because we usually access * 1297 * an access by access table. * 1298 * * 1299 ********************************************************************************** 1300 000061CC 1301 DISPTAB LABEL 061CC 00000000 1302 VFD 0*8 RW 061CD 00000008 1303 VFD 1*8 RO 061CE 00000000 1304 VFD 0*8 AO 061CF 00000008 1305 VFD 1*8 XO 061D0 00000010 1306 VFD 2*8 MW 061D1 FFFFFFFF 1307 VFD -1 DR 061D2 FFFFFFFF 1308 VFD -1 undefined 061D3 00000018 1309 VFD 3*8 NA 1310 1311 ********************************************************************************** 1312 * * 1313 * The following tables describe how the file lengths in * 1314 * the FCB and directory are to be updated. Also included are * 1315 * the checks for updating SAF end position pointers. If the * 1316 * old access was some type of write access we update the * 1317 * directory and if the new access is some type of write access * 1318 * we update the FCB. Note a few special cases: multiple write * 1319 * files contain relative block counts (relative to the open) * 1320 * and end pointers only concern .SAFs. * 1321 * * 1322 ********************************************************************************** 1323 000061D4 1324 UPDATEDR LABEL 061D4 DC4061E8 1325 CALLNP WASRW /RW 061D5 DC4061E4 1326 CALLNP WASRO /RO 061D6 DC4061E8 1327 CALLNP WASAO /AO 061D7 DC4061E4 1328 CALLNP WASXO /XO 061D8 DC4061F7 1329 CALLNP WASMW /MW 061D9 0013116A 1330 HALT HALTS116A /DR -- illegal 061DA 0013116B 1331 HALT HALTS116B -- unassigned code 061DB DC4061E4 1332 CALLNP WASNA /NA 1333 000061DC 1334 INITFCB LABEL 061DC DC406202 1335 CALLNP TOBERW /RW 061DD DC40620F 1336 CALLNP TOBERO /RO 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1355 (FILEACCESS) F 74 FREQ - Open service routines 061DE DC406202 1337 CALLNP TOBEAO /AO 061DF EC094182 5 ZBM 1338 STZ FCB,FCTFL /XO 061E0 EC094182 5 ZBM 1339 STZ FCB,FCTFL /MW 061E1 0013116C 1340 HALT HALTS116C DR -- illegal 061E2 0013116D 1341 HALT HALTS116D unassigned code 061E3 EC094182 5 ZBM 1342 STZ FCB,FCTFL /NA 1343 000061E4 1344 WASXO LABEL 000061E4 1345 WASNA LABEL 061E4 DD5F8001 6 STAK 1346 WASRO ENTRNP PUSH 061E5 6008D186 0 3 ZBM 1347 LD R0 R3,FDLEN get length from directory 061E6 E4094182 0 5 ZBM 1348 ST R0 FCB,FCTFL and update the FCB 061E7 5D1F8001 6 STAK 1349 LEAVE POP 1350 * --- 1351 000061E8 1352 WASAO LABEL 061E8 DD5F8001 6 STAK 1353 WASRW ENTRNP PUSH 061E9 60094182 0 5 ZBM 1354 LD R0 FCB,FCTFL get most current file length 061EA E408D186 0 3 ZBM 1355 ST R0 R3,FDLEN update directory 061EB 60096665 0 5 ZBM 1356 LD R0 FCB,FCHTYPE get the file type 061EC 64040002 0 IMM 1357 CPR R0 HTYPERAF do we have a RAF? 061ED FE0261F3 1358 JEQ UPTHEEPP if so then up the EPP 061EE 64040001 0 IMM 1359 CPR R0 HTYPESAF do we have a .SAF? 061EF FE0C61F6 1360 JNE NOUPDIR jump if not to update the directory 061F0 60095186 0 5 ZBM 1361 LD R0 FCB,FCEND current last block 061F1 E416C811 0 3 BASE 1362 ST R0 R3,FDEND into the directory we go 061F2 EC095186 5 ZBM 1363 STZ FCB,FCEND clear last block 000061F3 1364 UPTHEEPP LABEL 061F3 60174807 0 5 BASE 1365 LD R0 FCB,FCEPP the end position pointer 061F4 E416C810 0 3 BASE 1366 ST R0 R3,FDEPP save into the directory 061F5 EC174807 5 BASE 1367 STZ FCB,FCEPP clear byte position pointer 1368 * \ / 1369 000061F6 1370 NOUPDIR LABEL 061F6 5D1F8001 6 STAK 1371 LEAVE POP 1372 * --- 1373 061F7 DD5F8001 6 STAK 1374 WASMW ENTRNP PUSH 061F8 60094182 0 5 ZBM 1375 LD R0 FCB,FCTFL relative block 061F9 B808D186 0 3 ZBM 1376 ADDB R0 R3,FDLEN add directory file length to relative count 061FA E4094182 0 5 ZBM 1377 ST R0 FCB,FCTFL and update FCB length 061FB 60174807 0 5 BASE 1378 LD R0 FCB,FCEPP get the end position pointer 061FC 58C40010 IMM 1379 IORPSR PSRMODIF magical math time 061FD 5416C810 0 3 BASE 1380 MAX R0 R3,FDEPP unsigned max 061FE 58840010 IMM 1381 CLBPSR PSRMODIF turn off the magic 061FF E416C810 0 3 BASE 1382 ST R0 R3,FDEPP set the max in both places 06200 E4174807 0 5 BASE 1383 ST R0 FCB,FCEPP 06201 5D1F8001 6 STAK 1384 LEAVE POP 1385 * --- 1386 00006202 1387 TOBERW LABEL 06202 DD5F8001 6 STAK 1388 TOBEAO ENTRNP PUSH 06203 60096665 0 5 ZBM 1389 LD R0 FCB,FCHTYPE get the file type 06204 64040002 0 IMM 1390 CPR R0 HTYPERAF is this a RAF? 06205 FE02620B 1391 JEQ DOTHEEPP if so then fiddle with the EPP 06206 64040001 0 IMM 1392 CPR R0 HTYPESAF fooling with a .SAF? 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1356 (FILEACCESS) F 74 FREQ - Open service routines 06207 FE0C620E 1393 JNE NOUPFCB jump if not to update FCB 06208 6016C811 0 3 BASE 1394 LD R0 R3,FDEND get the last block address 06209 E4095186 0 5 ZBM 1395 ST R0 FCB,FCEND and place into the FCB 0620A EC16C811 3 BASE 1396 STZ R3,FDEND zap the last block address 0000620B 1397 DOTHEEPP LABEL 0620B 6016C810 0 3 BASE 1398 LD R0 R3,FDEPP get the end byte pointer 0620C E4174807 0 5 BASE 1399 ST R0 FCB,FCEPP and save for later use 0620D EC16C810 3 BASE 1400 STZ R3,FDEPP and the end byte position 1401 * \ / 1402 0000620E 1403 NOUPFCB LABEL 0620E 5D1F8001 6 STAK 1404 LEAVE POP 1405 * --- 1406 0620F DD5F8001 6 STAK 1407 TOBERO ENTRNP PUSH 06210 EC094182 5 ZBM 1408 STZ FCB,FCTFL indicate file length will not change 06211 60096665 0 5 ZBM 1409 LD R0 FCB,FCHTYPE get the hardware file type 06212 64040002 0 IMM 1410 CPR R0 HTYPERAF is this a RAF? 06213 FE026218 1411 JEQ GETTHEEPP if so then get the EPP 06214 64040001 0 IMM 1412 CPR R0 HTYPESAF latched onto a SAF file? 06215 FE0C621A 1413 JNE NOSAFHERE jump if some other type 06216 6016C811 0 3 BASE 1414 LD R0 R3,FDEND get the last block address 06217 E4095186 0 5 ZBM 1415 ST R0 FCB,FCEND and place into the FCB 00006218 1416 GETTHEEPP LABEL 06218 6016C810 0 3 BASE 1417 LD R0 R3,FDEPP get the end byte pointer 06219 E4174807 0 5 BASE 1418 ST R0 FCB,FCEPP and save for later use 1419 * \ / 1420 0000621A 1421 NOSAFHERE LABEL 0621A 5D1F8001 6 STAK 1422 LEAVE POP exit this routine 1423 * --- 1424 1425 END of tables 126 INPUT INITFILE various file access initializers 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1357 (INITFILE) F 75 FREQ - Open service routines 2 3 ********************************************************************************** 4 * * 5 * REALDEVICE. This little routine checks to make sure * 6 * that the file we are associating to the physical device * 7 * is legitimate. The checks we make are: confirm that the * 8 * file resides in the account hardware.sys and the account * 9 * is on the system disk. * 10 * Call: * 11 * FCB <= file opened to hardware entry * 12 * CALLNP REALDEVICE * 13 * JMP * 14 * Eats R0:R2 * 15 * Stack required = 1. * 16 * * 17 ********************************************************************************** 18 19 BLOCK REALDEVICE routine 20 ENTRY REALDEVICE 21 22 BEGFRAME 23 ENDFRAME 24 0621B DD5F8001 6 STAK 25 REALDEVICE ENTRNP PUSH 0621C 60895114 2 5 ZBM 26 LD R2 FCB,FCLIMITPTR account of file owner 0621D FAB06227 2 27 JZA R2 HARDLUCK jump if not real account, that makes it easy 0621E 60088081 0 2 ZBM 28 LD R0 R2,ULDRIVE get drive number 0621F 64040001 0 IMM 29 CPR R0 1 is file on system disk? 06220 FE0C6227 30 JNE HARDLUCK jump if not the case 06221 38168802 0 2 BASE 31 LEA R0 R2,ULACCNM pointer to file account name 06222 6044000C 1 IMM 32 LD R1 3*CPW length of an account name 06223 38802553 2 33 LEA R2 HARDSYS pointer to hardware.sys name 06224 FE540000 34 CMS file in the right account 06225 FE0C6227 35 JNE HARDLUCK if it not 36 * \ / 06226 19C40001 7 IMM 37 ADD R7 1 advance to good return 00006227 38 HARDLUCK LABEL 06227 5D1F8001 6 STAK 39 LEAVE POP exit to caller 40 * --- 41 42 END REALDEVICE routine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1358 (INITFILE) F 75 FREQ - Open service routines 44 45 46 ********************************************************************************** 47 * * 48 * LINKTERM. Given a partially initialized FCB, we find the TCB * 49 * for the file and check to make sure the access is valid. If * 50 * so we mark the TCB accordingly. The possiblities are: * 51 * - Some other process is using this terminal (failure). * 52 * - This process already has some form of access. * 53 * RO access can be given iff it is not already given. * 54 * RW access can be given iff it is not already given. * 55 * TCFCB field is always set for the FCB that is reading from * 56 * the terminal. This implies that a unit getting the terminal * 57 * RO is bound to be the reader. A unit getting the terminal RW * 58 * is assumed to be the reader iff there is no unit opened RO for * 59 * this terminal. * 60 * Call: * 61 * * 62 * LD FCB => file control block * 63 * R3 = desired access * 64 * CALLNP LINKTERM * 65 * JMP cannot do it (R0 = error code) * 66 * * 67 * Eats R0:R2. * 68 * Stack required = 2 * 69 * 1 + max ( LOCKWAIT (0), REALDEVICE (1) ) * 70 * * 71 ********************************************************************************** 72 73 BLOCK subroutine LINKTERM 74 ENTRY LINKTERM link to a terminal 75 76 BEGFRAME 77 ENDFRAME 78 06228 DD5F8001 6 STAK 79 LINKTERM ENTRNP PUSH 06229 DC40621B 80 CALLNP REALDEVICE check for bogus file 0622A FE0E6254 81 JMP CHECKNDA check if asking for no-data access 82 * \ / 0622B 60801F04 2 83 LD R2 TERMBASE get root of terminal list 0622C 6017480A 0 5 BASE 84 LD R0 FCB,FCSERIAL(1) get the term number associated 0622D 3C088890 0 2 ZBM 85 LSRCH R0 R2,TCTNUM find the TCB for him 0622E 64C40007 3 IMM 86 CPR R3 FSACSNDA check for NDA case 0622F FE026257 87 JEQ GIVENDA jump if we have it 06230 FAB06267 2 88 JZA R2 TERMGONE if no term return AU 89 PLOCK R2,TCLOCK get access to the TCB 06231 0CC00000 89 IOFF 06232 D1D68818 2 BASE 89 SETT R2,TCLOCK 06233 FE0C6235 89 JNE MA(2+DISPW MA 0) 06234 DC40308B 89 CALLNP LOCKWAIT 06235 5C089F17 2 ZBM 90 CMZ R2,TCPCADRS is the terminal in use? 06236 FE02623B 91 JEQ TERMISFREE if not then no special checks 06237 60000412 0 92 LD R0 CPPSA get the current PSA pointer 06238 60081F12 0 0 ZBM 93 LD R0 R0,PSPROCCB get the current PCB 06239 64089F17 0 2 ZBM 94 CPR R0 R2,TCPCADRS is the terminal being used by us? 0623A FE0C6263 95 JNE TERMBZY if not, can't use it 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1359 (INITFILE) F 75 FREQ - Open service routines 96 * \ / 0000623B 97 TERMISFREE LABEL 0623B 64C40001 3 IMM 98 CPR R3 FSACSRO does he want to get it RO? 0623C FE026259 99 JEQ TERMRO see it they can 0623D 64C40000 3 IMM 100 CPR R3 FSACSRW does he want it RW? 0623E FE0C6265 101 JNE BADACS if not, then bad access type 102 * \ / 103 * The file open is trying for RW access. 0623F D1C89415 2 ZBM 104 SETT R2,TCACSRW try to get RW access 06240 FE026263 105 JEQ TERMBZY if we were beat, then term is busy 06241 60040001 0 IMM 106 LD R0 FSACSRO get access code for RO 06242 64095835 0 5 ZBM 107 CPR R0 FCB,FCACCESS is this the current file access 06243 FE02624A 108 JEQ CLEARRO if so we need to clear it in the TCB 06244 5C089215 2 ZBM 109 CMZ R2,TCACSRO is this already being read from? 06245 FE0C624B 110 JNE SETPCB if it is, don't give us interrupts 06246 E5489F15 5 2 ZBM 111 ST FCB R2,TCFCB claim interrupts for us 06247 EDC89615 2 ZBM 112 STW R2,TCINTTCG we are trapper 06248 EDC89815 2 ZBM 113 STW R2,TCRDRTCG we are also reader 06249 FE0E624B 114 JMP SETPCB 115 * --- 116 0000624A 117 CLEARRO LABEL 0624A EC089215 2 ZBM 118 STZ R2,TCACSRO no longer RO access to this 119 * \ / 0000624B 120 SETPCB LABEL 0624B 60000412 0 121 LD R0 CPPSA get the current PSA pointer 0624C 60081F12 0 0 ZBM 122 LD R0 R0,PSPROCCB get the current PCB 0624D E4089F17 0 2 ZBM 123 ST R0 R2,TCPCADRS claim terminal for me 0624E E4895F16 2 5 ZBM 124 ST R2 FCB,FCDCBPTR save pointer to DCB 0624F EDC89E18 2 ZBM 125 STW R2,TCINTE enable unit interrupts 06250 19C40001 7 IMM 126 ADD R7 1 good return 127 * \ / 00006251 128 BADRTRNUL LABEL bad return, unlock TCB list 129 PUNLOCK R2,TCLOCK release the TCB list 06251 EC168818 2 BASE 129 STZ R2,TCLOCK 06252 0C800000 129 ION 00006253 130 LTRETURN LABEL 06253 5D1F8001 6 STAK 131 LEAVE POP return 132 * --- 133 134 * CHECKNDA allows us to open backup copies of .TERMs. GIVENDA 135 * gives no-data-access TCB linkup so we may fetch information 136 * on busy terminals. 00006254 137 CHECKNDA LABEL 06254 64C40007 3 IMM 138 CPR R3 FSACSNDA is the requested access no-data? 06255 FE0C6267 139 JNE TERMGONE jump to disallow the open 06256 60840000 2 IMM 140 LD R2 0 don't allow any access to the file 141 * \ / 00006257 142 GIVENDA LABEL 06257 E4895F16 2 5 ZBM 143 ST R2 FCB,FCDCBPTR save pointer to DCB 06258 FBE06253 7 144 IRJ R7 LTRETURN leave friendly 145 * --- 146 147 * The unit is trying for RO access. 00006259 148 TERMRO LABEL 06259 D1C89215 2 ZBM 149 SETT R2,TCACSRO try to claim RO access 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1360 (INITFILE) F 75 FREQ - Open service routines 0625A FE026263 150 JEQ TERMBZY we were beat 0625B E5489F15 5 2 ZBM 151 ST FCB R2,TCFCB say we get terminal interrupts 0625C EDC89615 2 ZBM 152 STW R2,TCINTTCG we are trapper 0625D EDC89815 2 ZBM 153 STW R2,TCRDRTCG we are also reader 0625E 60095835 0 5 ZBM 154 LD R0 FCB,FCACCESS get current terminal access 0625F 64040000 0 IMM 155 CPR R0 FSACSRW is it RW? 06260 FE0C624B 156 JNE SETPCB if not then all done here 06261 EC089415 2 ZBM 157 STZ R2,TCACSRW say no more RW access here 06262 FE0E624B 158 JMP SETPCB 159 * --- 160 161 * Terminal is being used already. 00006263 162 TERMBZY LABEL 06263 6004008A 0 IMM 163 LD R0 XREQERFBZ file is busy 06264 FE0E6251 164 JMP BADRTRNUL report busyness 165 * --- 166 167 * Illegal access type. 00006265 168 BADACS LABEL 06265 60040091 0 IMM 169 LD R0 XREQERILOP illegal operation 06266 FE0E6251 170 JMP BADRTRNUL report error 171 * --- 172 173 * Terminal does not exist in the TCB list. 00006267 174 TERMGONE LABEL 06267 60040089 0 IMM 175 LD R0 XREQERFAU file abnormal/unavailable 06268 FE0E6253 176 JMP LTRETURN report error 177 * --- 178 179 END of LINKTERM 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1361 (INITFILE) F 75 FREQ - Open service routines 181 182 ********************************************************************************** 183 * * 184 * LINKLP. Linking to a line printer. Find its control block * 185 * and if claimable allocate storage for it. * 186 * * 187 * LD FCB => file control block * 188 * CALLNP LINKLP * 189 * JMP cannot do it (R0 = error code) * 190 * * 191 * Eats R0:R2. * 192 * Stack required = 3 * 193 * 2 + max ( LOCKWAIT (0), REALDEVICE (1) , SGETMEM (0) ) * 194 * * 195 ********************************************************************************** 196 197 BLOCK LINKLP 198 ENTRY LINKLP 199 200 BEGFRAME 00178801 6 BASE 201 TEMP BSS 1 202 ENDFRAME 203 06269 DD5F8002 6 STAK 204 LINKLP ENTRNP PUSH 0626A DC40621B 205 CALLNP REALDEVICE check for bogus file 0626B FE0E628E 206 JMP LPAU do not allow linkup 207 * \ / 0626C 60801F21 2 208 LD R2 LPCLIST get the root of the LP list 0626D 6017480A 0 5 BASE 209 LD R0 FCB,FCSERIAL(1) get correct unit number 0626E 3C088847 0 2 ZBM 210 LSRCH R0 R2,LPCUNIT file correct LP 0626F FE0C628E 211 JNE LPAU jump if no such unit -- unavailable 212 SETTBIT R2,LPCOPEN say we have opened it 06270 60024000 0 IMM 212 LD R0 1*BIT(((R2,LPCOPEN) DISP (R2,0))/BITS 0:4) 06271 FC168807 0 2 BASE 212 IORM R0 R2,(((R2,LPCOPEN) DISP (R2,0))/BITS 15:31) 06272 FE026290 213 JEQ LPBZY jump if already open 214 PLOCK (R2,LPCELOCK) lock the element 06273 0CC00000 214 IOFF 06274 D1D68805 2 BASE 214 SETT (R2,LPCELOCK) 06275 FE0C6277 214 JNE MA(2+DISPW MA 0) 06276 DC40308B 214 CALLNP LOCKWAIT 06277 60000412 0 215 LD R0 CPPSA 06278 60081F12 0 0 ZBM 216 LD R0 R0,PSPROCCB R0 => PCB for process 06279 E4168808 0 2 BASE 217 ST R0 R2,LPCPCADRS save pointer to us as user 0627A 5C168806 2 BASE 218 CMZ R2,LPCBUFPTR buffer allocated? 0627B FE0C6289 219 JNE HAVELPBUF jump if so 0627C DC002ED0 220 CALL SGETMEM allocate LP buffer block 0627D 40440008 IMM 221 PARVL LPBLOG 0627E EE160800 0 BASE 222 STZ2 R0,0 clear out first four words 0627F EE160802 0 BASE 223 STZ2 R0,2 06280 E4D78801 3 6 BASE 224 ST PFPTR SP,TEMP save this register 06281 60CA1C80 3 0 CBM 225 LD PFPTR R0/PAGEFIELD 06282 7CC40080 3 IMM 226 IOR PFPTR MONPF create page file addr of buffer 06283 8092C000 3 REG 227 PFRD PFPTR get physical page number 06284 E4CAD4C0 3 3 CBM 228 ST PFPTR PFPTR/FLDABSPG 06285 EC0AECA0 3 CBM 229 STZ PFPTR/DISPFIELD PFPTRs physical address of page 06286 E4D60800 3 0 BASE 230 ST PFPTR R0,LPBPHYSADR save it for use by controller 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1362 (INITFILE) F 75 FREQ - Open service routines 06287 60D78801 3 6 BASE 231 LD PFPTR SP,TEMP restore this register 06288 E4168806 0 2 BASE 232 ST R0 R2,LPCBUFPTR save pointer to LP buffer block 00006289 233 HAVELPBUF LABEL 06289 E4895F16 2 5 ZBM 234 ST R2 FCB,FCDCBPTR 235 PUNLOCK (R2,LPCELOCK) unlock the controller 0628A EC168805 2 BASE 235 STZ (R2,LPCELOCK) 0628B 0C800000 235 ION 0628C 19C40001 7 IMM 236 ADD R7 1 take skip return 0000628D 237 BADRTN LABEL (R0 = error code) 0628D 5D1F8002 6 STAK 238 LEAVE POP 239 * --- 240 0000628E 241 LPAU LABEL 0628E 60040089 0 IMM 242 LD R0 XREQERFAU return file abnormal/unavailable 0628F FE0E628D 243 JMP BADRTN 244 * --- 245 00006290 246 LPBZY LABEL 06290 6004008A 0 IMM 247 LD R0 XREQERFBZ return file busy error 06291 FE0E628D 248 JMP BADRTN 249 * --- 250 251 END of LINKTERM 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1363 (INITFILE) F 75 FREQ - Open service routines 253 254 ********************************************************************************** 255 * * 256 * LINKTAPE. Find its control block and claim it for me. * 257 * * 258 * LD FCB => file control block (FCHTYPE set) * 259 * CALLNP LINKTAPE * 260 * JMP cannot do it (R0 = error code) * 261 * R2 -> TAPE element * 262 * * 263 * Eats R0:R2. * 264 * Stack required = 2 * 265 * 1 + max ( REALDEVICE (1) ) * 266 * * 267 ********************************************************************************** 268 269 BLOCK LINKTAPE 270 ENTRY LINKTAPE 271 272 BEGFRAME 273 ENDFRAME 274 06292 DD5F8001 6 STAK 275 LINKTAPE ENTRNP PUSH 06293 DC40621B 276 CALLNP REALDEVICE check for bogus file 06294 FE0E62A8 277 JMP PHYSDAU do not allow linkup 278 * \ / 06295 60801F1E 2 279 LD R2 CTULIST asssume CT 06296 60096665 0 5 ZBM 280 LD R0 FCB,FCHTYPE get the hardware type 06297 6404000D 0 IMM 281 CPR R0 HTYPECT is it a CT? 06298 FE02629D 282 JEQ PHYSISCT if so then we guessed right 06299 60801F1D 2 283 LD R2 MTULIST not CT, try for MT next 0629A 6404000C 0 IMM 284 CPR R0 HTYPEMT is it an MT? 0629B FE02629D 285 JEQ PHYSISCT if so then use this list 0629C 60801F1F 2 286 LD R2 VTULIST otherwise, must be video 0000629D 287 PHYSISCT LABEL 0629D 6017480A 0 5 BASE 288 LD R0 FCB,FCSERIAL(1) get the unit number associated 0629E 3C088460 0 2 ZBM 289 LSRCH R0 R2,MTUDNUM look for the specified unit 0629F FE0C62A8 290 JNE PHYSDAU no such unit - abnormal 062A0 5C168803 2 BASE 291 CMZ R2,MTUPCADRS is the unit in use? 062A1 FE0C62AA 292 JNE PHYSDBZY if it is busy, we may not have it 062A2 60000412 0 293 LD R0 CPPSA get the current PSA pointer 062A3 60081F12 0 0 ZBM 294 LD R0 R0,PSPROCCB get the current PCB 062A4 E4168803 0 2 BASE 295 ST R0 R2,MTUPCADRS claim the device 062A5 E4895F16 2 5 ZBM 296 ST R2 FCB,FCDCBPTR save pointer to DCB 062A6 19C40001 7 IMM 297 ADD R7 1 take skip return 000062A7 298 BADRTN LABEL (R0 = error code) 062A7 5D1F8001 6 STAK 299 LEAVE POP 300 * --- 301 000062A8 302 PHYSDAU LABEL 062A8 60040089 0 IMM 303 LD R0 XREQERFAU return file abnormal/unavailable 062A9 FE0E62A7 304 JMP BADRTN 305 * --- 306 000062AA 307 PHYSDBZY LABEL 062AA 6004008A 0 IMM 308 LD R0 XREQERFBZ return file busy error 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1364 (INITFILE) F 75 FREQ - Open service routines 062AB FE0E62A7 309 JMP BADRTN 310 * --- 311 312 END of LINKLP 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1365 (INITFILE) F 75 FREQ - Open service routines 314 315 ********************************************************************************** 316 * * 317 * UNLINKTERM. Given a linked up FCB, we remove any association it * 318 * may have with a terminal. * 319 * Call: * 320 * LD FCB => file control block * 321 * CALLNP UNLINKTERM * 322 * * 323 * Eats R0:R3 * 324 * stack required = 12 * 325 * 2 + max ( RESETTERM (10) ) * 326 * * 327 ********************************************************************************** 328 329 BLOCK subroutine UNLINKTERM 330 331 ENTRY UNLINKTERM 332 333 BEGFRAME 00178801 6 BASE 334 R4SAVE BSS 1 335 ENDFRAME 336 062AC DD5F8002 6 STAK 337 UNLINKTERM ENTRNP PUSH 062AD E5178801 4 6 BASE 338 ST R4 SP,R4SAVE save this register 062AE 61095F16 4 5 ZBM 339 LD TCB FCB,FCDCBPTR TCB => terminal control block 062AF FB3062BF 4 340 JZA TCB NOTERM don't reset if no terminal 062B0 60095835 0 5 ZBM 341 LD R0 FCB,FCACCESS get the current access 062B1 64040000 0 IMM 342 CPR R0 FSACSRW is it RW? 062B2 FE0262C1 343 JEQ TERMACSRW jump if so 062B3 64040001 0 IMM 344 CPR R0 FSACSRO then it should be RO 062B4 FE0C62BF 345 JNE NOTERM if not ignore it 062B5 EC091215 4 ZBM 346 STZ TCB,TCACSRO clear the RO access 347 * \ / 348 000062B6 349 SEEIFDONE LABEL 062B6 5C091225 4 ZBM 350 CMZ TCB,TCACS is there any access left to this terminal? 062B7 FE0C62BF 351 JNE NOTERM if so then don't reset it 352 062B8 DC409840 353 CALLNP RESETTERM reset him to initial state 062B9 EC091F17 4 ZBM 354 STZ TCB,TCPCADRS he's not ours any more 062BA 65491F15 5 4 ZBM 355 CPR FCB TCB,TCFCB is the TCB pointing to us? 062BB FE0C62BF 356 JNE DONTCLEAR if not, then don't clear it 062BC EC091615 4 ZBM 357 STZ TCB,TCINTTCG no trapper 062BD EC091815 4 ZBM 358 STZ TCB,TCRDRTCG no reader 062BE EC091F15 4 ZBM 359 STZ TCB,TCFCB no more FCB pointing 000062BF 360 DONTCLEAR LABEL 000062BF 361 NOTERM LABEL 062BF 61178801 4 6 BASE 362 LD R4 SP,R4SAVE restore this register 062C0 5D1F8002 6 STAK 363 LEAVE POP return to caller 364 * --- 365 000062C1 366 TERMACSRW LABEL 062C1 EC091415 4 ZBM 367 STZ TCB,TCACSRW clear the RW access bit 062C2 FE0E62B6 368 JMP SEEIFDONE 369 * --- 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1366 (INITFILE) F 75 FREQ - Open service routines 370 371 END of UNLINKTERM 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1367 (INITFILE) F 75 FREQ - Open service routines 373 374 ********************************************************************************** 375 * * 376 * UNLINKLP. Given a linked up FCB, we remove any association it * 377 * may have with a LP. * 378 * Call: * 379 * LD FCB => file control block * 380 * CALLNP UNLINKLP * 381 * * 382 * Eats R0:R1 * 383 * stack required = 1 * 384 * 1 + max ( LOCKWAIT (0) ) * 385 * * 386 ********************************************************************************** 387 388 BLOCK UNLINKLP subroutine 389 ENTRY UNLINKLP 390 391 BEGFRAME 392 ENDFRAME 393 062C3 DD5F8001 6 STAK 394 UNLINKLP ENTRNP PUSH 062C4 60495F16 1 5 ZBM 395 LD R1 FCB,FCDCBPTR 396 PLOCK R1,LPCELOCK 062C5 0CC00000 396 IOFF 062C6 D1D64805 1 BASE 396 SETT R1,LPCELOCK 062C7 FE0C62C9 396 JNE MA(2+DISPW MA 0) 062C8 DC40308B 396 CALLNP LOCKWAIT 397 CLRTBIT R1,LPCOPEN I'm no longer using it 062C9 60024000 0 IMM 397 LD R0 1*BIT(((R1,LPCOPEN) DISP (R1,0))/BITS 0:4) 062CA A8164807 0 1 BASE 397 BRSBM R0 R1,(((R1,LPCOPEN) DISP (R1,0))/BITS 15:31) 398 PUNLOCK R1,LPCELOCK 062CB EC164805 1 BASE 398 STZ R1,LPCELOCK 062CC 0C800000 398 ION 062CD 5D1F8001 6 STAK 399 LEAVE POP return to caller 400 * --- 401 402 END of UNLINKLP 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1368 (INITFILE) F 75 FREQ - Open service routines 404 405 ********************************************************************************** 406 * * 407 * UNLINKTAPE. Given a linked up FCB, we remove any association it * 408 * may have with a tape. * 409 * Call: * 410 * LD FCB => file control block * 411 * CALLNP UNLINKTAPE * 412 * * 413 * Eats R0 * 414 * Stack required = 1 * 415 * * 416 ********************************************************************************** 417 418 BLOCK UNLINKTAPE subroutine 419 ENTRY UNLINKTAPE 420 421 BEGFRAME 422 ENDFRAME 423 062CE DD5F8001 6 STAK 424 UNLINKTAPE ENTRNP PUSH 062CF 60095F16 0 5 ZBM 425 LD R0 FCB,FCDCBPTR 062D0 EC160803 0 BASE 426 STZ R0,MTUPCADRS I'm no longer using it 062D1 5D1F8001 6 STAK 427 LEAVE POP return to caller 428 * --- 429 430 END of UNLINKTAPE 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1369 (INITFILE) F 75 FREQ - Open service routines 432 433 BLOCK 434 435 ENTRY CREATEDEV 436 437 ********************************************************************************** 438 * * 439 * CREATEDEV. Create an unsaved device. Given an uninitialized * 440 * FCB with a device type specified in it, this routine creates an * 441 * unsaved device of that type and links it onto the FCB. * 442 * Call: * 443 * * 444 * LD FCB => file control block * 445 * FCB,FCHTYPE = type of device to create * 446 * FCB,FCACCESS = access to the device * 447 * CALLNP CREATEDEV * 448 * JMP couldn't do it (R0 = error code) * 449 * * 450 * Eats R0:R3 * 451 * Stack required = 9 * 452 * 2 + max ( FINDVNAME (2), GETFREEW1 (6), GETFSEQN (1), * 453 * GRUBWNDO1 (7), LIMITCHECK (1), SETWNDO1 (4), * 454 * DMOTEWNDO1(7), UNSRCHLIST (1) ) * 455 * * 456 ********************************************************************************** 457 458 BEGFRAME 00178801 6 BASE 459 R4SAVE BSS 1 460 ENDFRAME 461 062D2 DD5F8002 6 STAK 462 CREATEDEV ENTRNP PUSH 062D3 E5178801 4 6 BASE 463 ST R4 SP,R4SAVE save contents of this register 062D4 60096665 0 5 ZBM 464 LD R0 FCB,FCHTYPE 062D5 64040010 0 IMM 465 CPR R0 HTABL 062D6 FE06634E 466 JGE OKRTN 062D7 61095114 4 5 ZBM 467 LD ULB FCB,FCLIMITPTR 062D8 5CA062D9 0 468 LDPC HTAB(R0) 469 * --- 470 062D9 0000634E 471 HTAB VFD ADR OKRTN 062DA 000062E9 472 VFD ADR CRTSAF SAF 062DB 000062F9 473 VFD ADR CRTRAF RAF 062DC 00006300 474 VFD ADR CRTCODE CODE 062DD 0000634E 475 VFD ADR OKRTN PATH 062DE 00006312 476 VFD ADR CRTDIR DIR 062DF 00006334 477 VFD ADR CRTNULL NULL 062E0 0000634E 478 VFD ADR OKRTN TERM 062E1 0000634E 479 VFD ADR OKRTN former LOCK 062E2 000062E9 480 VFD ADR CRTSAF BATCH 062E3 0000633F 481 VFD ADR FNFRTN CDR 062E4 00006339 482 VFD ADR CRTLP LP 062E5 0000633F 483 VFD ADR FNFRTN MT 062E6 0000633F 484 VFD ADR FNFRTN CT 062E7 0000631F 485 VFD ADR CRTVOL VOL 062E8 0000633F 486 VFD ADR FNFRTN VT 00000010 ABS 487 HTABL EQU DISPW HTAB 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1370 (INITFILE) F 75 FREQ - Open service routines 488 489 490 ********************************************************************************** 491 * * 492 * CRTSAF. Create unsaved SAF. After checking for size allowance * 493 * of account, get and initialize the root block of the SAF. * 494 * * 495 ********************************************************************************** 496 000062E9 497 CRTSAF LABEL 062E9 DC404555 498 CALLNP GETFSEQN get new file serial number 062EA E6174809 015 BASE 499 ST2 R0 FCB,FCSERIAL save in file control block 062EB 60440001 1 IMM 500 LD R1 1 adding one block 062EC DC405C7B 501 CALLNP LIMITCHECK does the guy have space 062ED FE0E634F 502 JMP LIMITERR jump if limits exceeded 062EE DC005C5B 503 CALL GETFREEW1 get a block 062EF 4144000C IMM 504 PARV FBITSAF pass type of new block 062F0 40440000 IMM 505 PARVL 0 relative block number 062F1 FE0E6349 506 JMP DISKFULL the disk is full 507 * \ / 062F2 E4097182 0 5 ZBM 508 ST R0 FCB,FCLPBLK this is the block number 062F3 E4095186 0 5 ZBM 509 ST R0 FCB,FCEND also end block number 510 * FCEPP is zero by default 062F4 EDC94182 5 ZBM 511 STW FCB,FCTFL length is one 062F5 60032000 0 IMM 512 LD R0 ((FILNEOD*FILTYPE)/BITS 8:15)*BITS 0:7 062F6 E4000800 0 513 ST R0 WNDO1 place EOD in the window 062F7 DC40315C 514 CALLNP DMOTEWNDO1 unlock and demote 062F8 FE0E634E 515 JMP OKRTN done 516 * --- 517 518 ********************************************************************************** 519 * * 520 * CRTRAF. Create an unsaved RAF. * 521 * * 522 ********************************************************************************** 523 000062F9 524 CRTRAF LABEL 062F9 DC404555 525 CALLNP GETFSEQN get new file serial number 062FA E6174809 015 BASE 526 ST2 R0 FCB,FCSERIAL save in file control block 062FB EC094182 5 ZBM 527 STZ FCB,FCTFL no block in file 062FC EC095181 5 ZBM 528 STZ FCB,FCMSBLK no blocks here yet 062FD EDC95C16 5 ZBM 529 STW FCB,FCRESEEK don't have position yet 062FE EC095826 5 ZBM 530 STZ FCB,FCRAFTYPE RAF type is empty 062FF FE0E634E 531 JMP OKRTN done 532 * --- 533 534 ********************************************************************************** 535 * * 536 * CRTCODE. Create an unsaved code file. After checking for size allowance * 537 * of account get and initialize code control block. * 538 * * 539 ********************************************************************************** 540 00006300 541 CRTCODE LABEL 06300 DC404555 542 CALLNP GETFSEQN get new file serial number 06301 E6174809 015 BASE 543 ST2 R0 FCB,FCSERIAL save in file control block 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1371 (INITFILE) F 75 FREQ - Open service routines 06302 60440001 1 IMM 544 LD R1 1 adding one block 06303 DC405C7B 545 CALLNP LIMITCHECK see if we may have one block 06304 FE0E634F 546 JMP LIMITERR jump if not 06305 DC005C5B 547 CALL GETFREEW1 get one block 06306 41440013 IMM 548 PARV FBITCCB make it a CCB 06307 40440000 IMM 549 PARVL 0 relative block number 06308 FE0E6349 550 JMP DISKFULL no disk blocks to spare 551 * \ / 06309 E4097182 0 5 ZBM 552 ST R0 FCB,FCLPBLK this is root block 0630A 60040002 0 IMM 553 LD R0 RAFTSMALL code files are like small RAFs 0630B E4095826 0 5 ZBM 554 ST R0 FCB,FCRAFTYPE so we will know 0630C 60020200 0 IMM 555 LD R0 1*BIT CAIMALLXR assume XREQ error traps 0630D E4000BFB 0 556 ST R0 WNDO1/CCBINFO/CCBPREGS/CAINTMASK 0630E DC40315C 557 CALLNP DMOTEWNDO1 unlock and demote 0630F EDC94182 5 ZBM 558 STW FCB,FCTFL file contains one block 06310 EDC95C16 5 ZBM 559 STW FCB,FCRESEEK don't know position 06311 FE0E634E 560 JMP OKRTN 561 * --- 562 563 ********************************************************************************** 564 * * 565 * CRTDIR. Here we are to create a DIR associated with * 566 * the current default directory. Since some xreqs use the * 567 * FCB serial number, we must ensure that it gets set properly. * 568 * So the directory gets read and the serial number is copied * 569 * into the FCB. The disk read is really not an overhead, since * 570 * generally after the open of a DIR, an access to it is bound * 571 * to follow. * 572 * * 573 ********************************************************************************** 574 00006312 575 CRTDIR LABEL 06312 DC003205 576 CALL SETWNDO1 request to mapin directory 06313 41440001 IMM 577 PARV VPCNTLRO only need read access 06314 41534000 5 REG 578 PARV FCB associated FCB 06315 4100631C 579 PAR CRTDIRDSE disk error recovery address 06316 41570801 4 BASE 580 PARV ULB,ULBLOCK actual directory address 06317 40440009 IMM 581 PARVL FBITUDIR1 expected FBI type 582 * \ / 06318 62000820 01 583 LD2 R0 WNDO1(UDSERNO) get this accounts serial number 06319 E6174809 015 BASE 584 ST2 R0 FCB,FCSERIAL place into FCB 0631A DC403150 585 CALLNP GRUBWNDO1 unmap window 1 0631B FE0E634E 586 JMP OKRTN thats all there is to it 587 * --- 588 0000631C 589 CRTDIRDSE LABEL 0631C DC403150 590 CALLNP GRUBWNDO1 unmap busted window 0631D 6004009F 0 IMM 591 LD R0 XREQERDSE indicate disk structure error 0631E FE0E634F 592 JMP BADRTN report news to caller 593 * --- 594 595 ********************************************************************************** 596 * * 597 * CRTVOL. Create an unsaved VOL. This is the request opens a * 598 * .VOL on an already mounted volume. If the volume is NOT mounted * 599 * or the volume IS maintenance mounted we just return a volume busy * 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1372 (INITFILE) F 75 FREQ - Open service routines 600 * error. Note that mulitple .VOLs can be open on the same volume, * 601 * this might cause interlock problems but we haven't run accross any * 602 * yet. * 603 * * 604 ********************************************************************************** 605 00000320 ABS 606 PRIVOLMSK EQU 1*UPBACKUPB+1*UPMANAGRB+1*UPOPREQB 607 0000631F 608 CRTVOL LABEL 0631F DC404555 609 CALLNP GETFSEQN get new file serial number 06320 E6174809 015 BASE 610 ST2 R0 FCB,FCSERIAL save in file control block 06321 60000414 0 611 LD R0 CPCUPC lets see exactly who we are 06322 600800F0 0 0 ZBM 612 LD R0 R0,UPCPRIV get privileges of this process 06323 78040320 0 IMM 613 AND R0 PRIVOLMSK enough privilege to open a .VOL 06324 64040320 0 IMM 614 CPR R0 PRIVOLMSK have any privileges been enabled 06325 FE026341 615 JEQ VOLERPNS give privilege not sufficient error 06326 DC009E55 616 CALL FINDVNAME try to find the mounted volume 06327 4257480B 5 BASE 617 PARV2L FCB,FCVNAME pass the volume name looking for 06328 FE0E6343 618 JMP VOLERNSE jump if volume not currently mounted 619 * \ / 620 06329 5C090E10 4 ZBM 621 CMZ VLN,VOLNMAIM is this volume maintenance mounted 0632A FE0C6345 622 JNE VOLERBUS give volume busy error 0632B D0170815 4 BASE 623 INC VLN,VOLNBUSY increment the volume busy count 0632C DC0030B7 624 CALL UNSRCHLIST release access to the volume list 0632D 40001F22 625 PARL VOLNLOCK lock we currently hold 0632E E5095F16 4 5 ZBM 626 ST VLN FCB,FCDCBPTR initialize DCB pointer 0632F 60090086 0 4 ZBM 627 LD R0 VLN,VOLNNUM get the volume number 06330 E4094081 0 5 ZBM 628 ST R0 FCB,FCDRIVE and set into MS address prototype 06331 EDC94080 5 ZBM 629 STW FCB,FCBUSYCNT initialize file busy count 06332 EDC94C15 5 ZBM 630 STW FCB,FCLOADPT indicate this file at load point 06333 FE0E634E 631 JMP OKRTN 632 * --- 633 634 ********************************************************************************** 635 * * 636 * CRTNULL. Create an unsaved NULL. Just zero (hopefully) * 637 * unused stuff. * 638 * * 639 ********************************************************************************** 640 00006334 641 CRTNULL LABEL 06334 DC404555 642 CALLNP GETFSEQN get new file serial number 06335 E6174809 015 BASE 643 ST2 R0 FCB,FCSERIAL save in file control block 06336 EC095181 5 ZBM 644 STZ FCB,FCMSBLK clear out some disk pointers 06337 EC097182 5 ZBM 645 STZ FCB,FCLPBLK 06338 FE0E634E 646 JMP OKRTN 647 * --- 648 649 ********************************************************************************** 650 * * 651 * CRTLP. This exists here only because the system * 652 * could be patched to run without a spooler. We create * 653 * a dummy entry that LINKPHYSDV will initialize with * 654 * the actual physical information. * 655 * * 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1373 (INITFILE) F 75 FREQ - Open service routines 656 ********************************************************************************** 657 00006339 658 CRTLP LABEL 06339 EC174801 5 BASE 659 STZ FCB,FCBLOCK no volume or block 0633A 6004000B 0 IMM 660 LD R0 HTYPELP hardware type indicating LP 0633B E4174809 0 5 BASE 661 ST R0 FCB,FCSERIAL(0) this is a line printer 0633C EC17480A 5 BASE 662 STZ FCB,FCSERIAL(1) assume unit number of zero 0633D EC095114 5 ZBM 663 STZ FCB,FCLIMITPTR no limits 0633E FE0E634E 664 JMP OKRTN 665 * --- 666 667 ********************************************************************************** 668 * * 669 * Error return labels. The error is placed in R0 and * 670 * off we go from there. * 671 * * 672 ********************************************************************************** 673 674 * Device creation would exceed account limits 675 LIMITERR EQU BADRTN 676 0000633F 677 FNFRTN LABEL 0633F 6004008D 0 IMM 678 LD R0 XREQERFNF file not found 06340 FE0E634F 679 JMP BADRTN 680 * --- 681 00006341 682 VOLERPNS LABEL 06341 60040094 0 IMM 683 LD R0 XREQERPNS privilege not sufficient 06342 FE0E634F 684 JMP BADRTN 685 * --- 686 00006343 687 VOLERNSE LABEL 06343 600400AB 0 IMM 688 LD R0 XREQERNSE no such entry, volume not currently mounted 06344 FE0E634F 689 JMP BADRTN 690 * --- 691 00006345 692 VOLERBUS LABEL 06345 DC0030B7 693 CALL UNSRCHLIST release access to the volume list 06346 40001F22 694 PARL VOLNLOCK lock we currently hold 06347 600400A1 0 IMM 695 LD R0 XREQERVIU volume in use 06348 FE0E634F 696 JMP BADRTN 697 * --- 698 00006349 699 DISKFULL LABEL 06349 6047FFFF 1 IMM 700 LD R1 -1 0634A DC405C7B 701 CALLNP LIMITCHECK remove space from allocation 0634B 00131132 702 HALT HALTS1132 bogus return from LIMITCHECK 0634C 6004009D 0 IMM 703 LD R0 XREQERNFSV "not sufficient space on volume" 0634D FE0E634F 704 JMP BADRTN 705 * --- 706 707 * Successful execution 708 0000634E 709 OKRTN LABEL 0634E 19C40001 7 IMM 710 ADD R7 1 0000634F 711 BADRTN LABEL 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1374 (INITFILE) F 75 FREQ - Open service routines 0634F 61178801 4 6 BASE 712 LD R4 SP,R4SAVE 06350 5D1F8002 6 STAK 713 LEAVE POP 714 * --- 715 716 END of CREATEDEV 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1375 (INITFILE) F 75 FREQ - Open service routines 718 719 BLOCK 720 721 ENTRY DSTRYDEV destroy an unsaved device 722 ENTRY RAFFBITABP pointer to table of RAF FBI types 723 724 ********************************************************************************** 725 * * 726 * DSTRYDEV. Destroy an unsaved device. Given an unsaved * 727 * FCB with some device initialized, this routine removes resources * 728 * and otherwise destroys the device. This assumes that any * 729 * physical device association is undone and that any disk * 730 * limit changing has been done. * 731 * Call: * 732 * LD FCB => file control block * 733 * CALLNP DSTRYDEV * 734 * JMP could not do it (R0 = code) * 735 * * 736 * Eats R0:R3. * 737 * stack required = 14 * 738 * 3 + max ( CREATEUCE (2), DISMOUNT (3), DOREWINDA (3), * 739 * FCFREEMEM (0), FCGETMEM (0), FREEFILE (3), * 740 * FREEULB (11), LIMITCHECK (1), LINKFCBIN (1), * 741 * LINKUCEIN (3), SFREEMEM (0), UNLINKFCB (1), * 742 * UNLINKUCE (1), USEULB (4), WSXCLNALL(10) ) * 743 * * 744 ********************************************************************************** 745 746 BEGFRAME 00178801 6 BASE 747 FCBSAVE BSS 1 00178802 6 BASE 748 R4SAVE BSS 1 749 ENDFRAME 750 06351 DD5F8003 6 STAK 751 DSTRYDEV ENTRNP PUSH 06352 E5178802 4 6 BASE 752 ST R4 SP,R4SAVE 06353 60096665 0 5 ZBM 753 LD R0 FCB,FCHTYPE get type of the device 06354 64040010 0 IMM 754 CPR R0 HTABL within table? 06355 FE0663D0 755 JGE OKRTN jump if not - fake OKness 06356 61095114 4 5 ZBM 756 LD ULB FCB,FCLIMITPTR ULB => ULB for file 06357 5CA06358 0 757 LDPC HTAB(R0) 758 * --- 759 06358 000063D0 760 HTAB VFD ADR OKRTN 06359 00006368 761 VFD ADR DSTSAF SAF 0635A 00006371 762 VFD ADR DSTRAF RAF 0635B 00006380 763 VFD ADR DSTCODE CODE 0635C 000063D0 764 VFD ADR OKRTN PATH 0635D 000063D0 765 VFD ADR OKRTN DIR 0635E 000063D0 766 VFD ADR OKRTN NULL 0635F 000063D0 767 VFD ADR OKRTN TERM 06360 000063D0 768 VFD ADR OKRTN former LOCK 06361 0000639F 769 VFD ADR DSTBATCH BATCH 06362 000063D0 770 VFD ADR OKRTN CDR 06363 000063D0 771 VFD ADR OKRTN LP 06364 000063D0 772 VFD ADR OKRTN MT 06365 000063D0 773 VFD ADR OKRTN CT 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1376 (INITFILE) F 75 FREQ - Open service routines 06366 0000638B 774 VFD ADR DSTVOL VOL 06367 000063D0 775 VFD ADR OKRTN VT 00000010 ABS 776 HTABL EQU DISPW HTAB 777 778 779 ********************************************************************************** 780 * * 781 * DSTSAF. Destroy SAF. Release disk space. * 782 * * 783 ********************************************************************************** 784 00006368 785 DSTSAF LABEL 06368 60097182 0 5 ZBM 786 LD R0 FCB,FCLPBLK 06369 E4095181 0 5 ZBM 787 ST R0 FCB,FCMSBLK root block into prototype 0636A 70494182 1 5 ZBM 788 LDN R1 FCB,FCTFL 0636B DC405C7B 789 CALLNP LIMITCHECK reduce the limits of the requester 0636C 00131133 790 HALT HALTS1133 bogus return from LIMITCHECK 0636D DC004FEA 791 CALL FREEFILE 0636E 41574801 5 BASE 792 PARV FCB,FCBLOCK 0636F 4044000C IMM 793 PARVL FBITSAF 06370 FE0E63D0 794 JMP OKRTN 795 * --- 796 797 ********************************************************************************** 798 * * 799 * DSTRAF. Destroy RAF. Have to check for large and tiny * 800 * RAFs and free differently. Can not assume that FCB,FCDCBPTR * 801 * points to a GFC (it might already have been freed). * 802 * * 803 ********************************************************************************** 804 00006371 805 DSTRAF LABEL 06371 70494182 1 5 ZBM 806 LDN R1 FCB,FCTFL current file length 06372 DC405C7B 807 CALLNP LIMITCHECK release the space from limits 06373 00131134 808 HALT HALTS1134 bogus return from LIMITCHECK 06374 60095826 0 5 ZBM 809 LD R0 FCB,FCRAFTYPE determine the type of the RAF 06375 FA0263D0 0 810 JEQZ R0 OKRTN don't free if empty 06376 5D606CEC 0 811 XCT RAFROOTGET(R0) get the root block 06377 E4095181 0 5 ZBM 812 ST R0 FCB,FCMSBLK set at common location 06378 DC004FEA 813 CALL FREEFILE free the large RAF 06379 41574801 5 BASE 814 PARV FCB,FCBLOCK root block 0637A 60095826 0 5 ZBM 815 LD R0 FCB,FCRAFTYPE determine the type of the RAF 0637B 6030637F 0 0 @ 816 LD R0 @RAFFBITABP(R0) get the matching FBI type 0637C 40520000 0 REG 817 PARVL R0 0637D FE0E63D0 818 JMP OKRTN 819 * --- 820 821 * Table of FBI types indexed by RAF type 0000637E 822 RAFFBITAB LABEL 0637D 00000000 823 VFDB 8:0 empty RAF 0637D 0000000F 824 VFDB 8:FBITRAFD tiny RAF 0637D 0000000E 825 VFDB 8:FBITSRAF small RAF 0637E 0000000D 826 VFDB 8:FBITLRAF large RAF 0637F 020C637E 827 RAFFBITABP PTR RAFFBITAB/BITS 0:7 828 829 ********************************************************************************** 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1377 (INITFILE) F 75 FREQ - Open service routines 830 * * 831 * DSTCODE. Destroy the code file. Release disk space. * 832 * * 833 ********************************************************************************** 834 00006380 835 DSTCODE LABEL 06380 60097182 0 5 ZBM 836 LD R0 FCB,FCLPBLK 06381 E4095181 0 5 ZBM 837 ST R0 FCB,FCMSBLK root block into prototype 06382 70494182 1 5 ZBM 838 LDN R1 FCB,FCTFL 06383 DC405C7B 839 CALLNP LIMITCHECK reduce his limits 06384 00131135 840 HALT HALTS1135 bogus return from LIMITCHECK 06385 60095826 0 5 ZBM 841 LD R0 FCB,FCRAFTYPE a CODE can be empty if recovery 06386 FA0263D0 0 842 JEQZ R0 OKRTN was interrupted don't free if so 06387 DC004FEA 843 CALL FREEFILE release the disk space 06388 41574801 5 BASE 844 PARV FCB,FCBLOCK root block 06389 40440013 IMM 845 PARVL FBITCCB type 0638A FE0E63D0 846 JMP OKRTN 847 * --- 848 849 ********************************************************************************** 850 * * 851 * DSTVOL. Destroy a .VOL. Basically this entails * 852 * decrementing the volume busy count and continuing on our way. * 853 * However if the volume had been maintenance mounted we want to * 854 * clean up and dismount the volume when the busy count reaches * 855 * zero. To accomplish this we call DISMOUNT which builds a * 856 * simple element that indicates what volume is to be dismounted. * 857 * When the dispatcher is entered a separate process is started * 858 * to actually perform the dismount. Note that no one may use * 859 * that volume once it is to be dismounted, and that the busy * 860 * count should never again indicate the volume is in use. * 861 * * 862 ********************************************************************************** 863 0000638B 864 DSTVOL LABEL 0638B 60C40000 3 IMM 865 LD R3 0 marker for all pages 0638C DC4032EA 866 CALLNP WSXCLNALL zap the working set extension list 0638D 61095F16 4 5 ZBM 867 LD VLN FCB,FCDCBPTR pointer to the VOLN element 0638E 5C090E10 4 ZBM 868 CMZ VLN,VOLNMAIM check the maintenance mount flag 0638F FE0C6392 869 JNE DOANOEL if set, cleanup and dismount volume 06390 D0570815 4 BASE 870 DEC VLN,VOLNBUSY adjust for .VOL closing 06391 FE0E63D0 871 JMP OKRTN 872 * --- 873 00006392 874 DOANOEL LABEL 06392 60D70818 3 4 BASE 875 LD R3 VLN,VOLNINLIST any bad block elements left 06393 FAF0639A 3 876 JZA R3 VOLNOEL jump if list is non-existent 06394 6096C800 2 3 BASE 877 LD R2 R3,VINLINK get next one in the list 06395 E4970818 2 4 BASE 878 ST R2 VLN,VOLNINLIST make him the head guy 06396 DC002F5D 879 CALL SFREEMEM and get rid of the current one 06397 41440001 IMM 880 PARV VINLOG pass log base 2 block size 06398 4052C000 3 REG 881 PARVL R3 and address of the block 06399 FE0E6392 882 JMP DOANOEL see if any more to take care of 883 * --- 884 0000639A 885 VOLNOEL LABEL 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1378 (INITFILE) F 75 FREQ - Open service routines 0639A D0570815 4 BASE 886 DEC VLN,VOLNBUSY adjust for .VOL closing 0639B FE0C63D0 887 JNE OKRTN jump if dismount needs to happen later 0639C DC005034 888 CALL DISMOUNT call to vanish this volume 0639D 40530000 4 REG 889 PARVL VLN address of the VOLN element 0639E FE0E63D0 890 JMP OKRTN 891 * --- 892 893 ********************************************************************************** 894 * * 895 * DSTBATCH. If there is no spooler, we can be patched to * 896 * do s. They are written into as if they were a SAF and * 897 * when they are closed, we here submit it. We must create a * 898 * duplicate FCB because our callers have pointers to it. The * 899 * FCB that is returned, is a NULL so that routines that are * 900 * called after this do not freak out. * 901 * We do not release the disk space here. That job is left * 902 * up to the closing of SAF after the batch job is done. * 903 * * 904 ********************************************************************************** 905 0000639F 906 DSTBATCH LABEL 0639F DC4073AF 907 CALLNP DOREWINDA place file to beginning 063A0 DC002F0A 908 CALL FCGETMEM get a new FCB 063A1 40440004 IMM 909 PARVL FCLOG 063A2 60D20000 3 0 REG 910 LD R3 R0 R3=>new FCB 063A3 60134000 0 5 REG 911 LD R0 FCB 063A4 60440040 1 IMM 912 LD R1 (2 POWER FCLOG)*CPW length of FCB in bytes 063A5 6092C000 2 3 REG 913 LD R2 R3 063A6 FE400000 914 CMOVE create identical FCB 063A7 EDC8C080 3 ZBM 915 STW R3,FCBUSYCNT say one user of this FCB 916 * \ / 063A8 DC405569 917 CALLNP USEULB one more user of the account 063A9 60040001 0 IMM 918 LD R0 HTYPESAF get file type code for SAF 063AA E408E665 0 3 ZBM 919 ST R0 R3,FCHTYPE make the new file a SAF 920 * \ / 921 * link new FCB onto PSA list 063AB DC005DA8 922 CALL LINKFCBIN we got a routine to do it 063AC 4052C000 3 REG 923 PARVL R3 pass the FCB address 924 * \ / 925 * make and link a UCE for standard input pointing to new FCB 063AD DC003635 926 CALL CREATEUCE make a UCE for our FCB 063AE 41440001 IMM 927 PARV LUNSIN use unit 1 063AF 4052C000 3 REG 928 PARVL R3 pass the FCB address 063B0 DC005DB2 929 CALL LINKUCEIN add new UCE to local list 063B1 41520000 0 REG 930 PARV R0 pass new UCE 063B2 41400414 931 PARV CPCUPC pass present underprocess 063B3 40440000 IMM 932 PARVL 0 no need for PSA address 933 * \ / 934 * submit the job, no operator privs to start 063B4 60800414 2 935 LD R2 CPCUPC get pointer to current UPC 063B5 60489210 1 2 ZBM 936 LD R1 R2,UPOPREQ get the existing OPR privs 063B6 EC089210 2 ZBM 937 STZ R2,UPOPREQ say that I am and OPR 063B7 60040182 0 IMM 938 LD R0 ORSTRTJOB start the job 063B8 09440001 IMM 939 OPREQ 1 try to submit the file 063B9 E4489210 1 2 ZBM 940 ST R1 R2,UPOPREQ restore the old OPR privs 063BA FA0863C0 0 941 JLTZ R0 DIDNTGO jump if the file didn't submit 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1379 (INITFILE) F 75 FREQ - Open service routines 942 * \ / 943 * finish demoralizing the old FCB 063BB 60040006 0 IMM 944 LD R0 HTYPENULL 063BC E4096665 0 5 ZBM 945 ST R0 FCB,FCHTYPE this is now a harmless NULL 063BD EC094182 5 ZBM 946 STZ FCB,FCTFL no length 063BE EC095181 5 ZBM 947 STZ FCB,FCMSBLK no root block 063BF FE0E63D0 948 JMP OKRTN its done 949 * --- 950 951 * The thing would not submit. We must back out of the extra FCB and 952 * then just get rid of the file. 000063C0 953 DIDNTGO LABEL 063C0 DC405526 954 CALLNP FREEULB release the extra ULB toucher 063C1 61095114 4 5 ZBM 955 LD ULB FCB,FCLIMITPTR get ULB for later limit check 063C2 E5578801 5 6 BASE 956 ST FCB SP,FCBSAVE save old unit to destroy it later 957 * \ / 958 * remove the unit we couldn't submit 063C3 DC005DD0 959 CALL UNLINKUCE unlink the new UCE 063C4 40440001 IMM 960 PARVL LUNSIN standard input 063C5 61481F11 5 0 ZBM 961 LD FCB R0,UCEFCB get the FCB for it 063C6 60520000 1 0 REG 962 LD R1 R0 for call 063C7 DC002F8F 963 CALL UCFREEMEM free the extra element 063C8 41440001 IMM 964 PARV UCELOG 063C9 40524000 1 REG 965 PARVL R1 063CA DC405DC3 966 CALLNP UNLINKFCB remove the unwanted thing 063CB DC002F8F 967 CALL FCFREEMEM release the new block 063CC 41440004 IMM 968 PARV FCLOG 063CD 40534000 5 REG 969 PARVL FCB 970 063CE 61578801 5 6 BASE 971 LD FCB SP,FCBSAVE retrieve oldies FCB address 063CF FE0E6368 972 JMP DSTSAF fake like a SAF going away 973 * --- 974 975 ********************************************************************************** 976 * * 977 * Returns. * 978 * * 979 ********************************************************************************** 980 000063D0 981 OKRTN LABEL 063D0 19C40001 7 IMM 982 ADD R7 1 skip return means success 063D1 61178802 4 6 BASE 983 LD R4 SP,R4SAVE 063D2 5D1F8003 6 STAK 984 LEAVE POP 985 * --- 986 987 END of DSTRYDEV 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1380 (INITFILE) F 75 FREQ - Open service routines 989 990 ********************************************************************************** 991 * * 992 * MAKEADEV. Make a device given an FCB with the hardware * 993 * type initialized therein. By "making a device" I mean that a * 994 * sequence number for the file is gotten, access legality is * 995 * checked, the device is created, the device is initialized for * 996 * the access, and the access is set into the FCB. * 997 * Call: * 998 * * 999 * LD FCB => FCB * 1000 * FCB,FCHTYPE = hardware type to create * 1001 * FCB,FCPRIV = FSPRIVMOD (except for DIR and TERM) * 1002 * FCB,FCACCESS= FSACSNDA * 1003 * CALL MAKEADEV * 1004 * PARVL access to get * 1005 * JMP error (code in R0) * 1006 * * 1007 * Eats R0:R3. * 1008 * Stack required = 20 * 1009 * 2 + max ( CREATEDEV (9), DSTRYDEV (11), FNDOPNACS (1), * 1010 * GETFSEQN (1), INITDEVACS(18), PRIV2MOD (2) ) * 1011 * * 1012 ********************************************************************************** 1013 1014 BLOCK 1015 1016 ENTRY MAKEADEV make a device 1017 1018 BEGFRAME 00178801 6 BASE 1019 THEACS BSS 1 the requested access 1020 ENDFRAME 1021 063D3 05020000 1022 MDTYPT VFD 1*(BIT HTYPEDIR)+1*(BIT HTYPETERM)+1*(BIT HTYPEVOL) 063D4 004863D3 1023 MDTYPP PTR MDTYPT/BIT 0 bit pointer to unsavable devices 1024 063D5 DD1F8002 6 STAK 1025 MAKEADEV ENTR PUSH 063D6 C0578801 6 BASE 1026 STPVL SP,THEACS save the requested access 063D7 60096665 0 5 ZBM 1027 LD R0 FCB,FCHTYPE get the type to create 063D8 5C3063D4 0 @ 1028 CMZ @MDTYPP(R0) can this device be saved in user's directory? 063D9 FE0C63DE 1029 JNE MAKEIT jump if it can't, no need to check PRIV2MOD 063DA DC005BF2 1030 CALL PRIV2MOD enough privs to create stuff 063DB 41440000 IMM 1031 PARV 0 indicate file not opened for the spooler 063DC 40494E45 5 ZBM 1032 PARVL FCB,FCPRIV 063DD FE0E63F6 1033 JMP RETURNFNF if not, file not found 000063DE 1034 MAKEIT LABEL 063DE 60178801 0 6 BASE 1035 LD R0 SP,THEACS 063DF DC005FB0 1036 CALL FNDOPNACS check access legality 063E0 40520000 0 REG 1037 PARVL R0 pass requested access 063E1 FE0E63F5 1038 JMP RETURNERR jump if access not allowed 063E2 E4178801 0 6 BASE 1039 ST R0 SP,THEACS store the access we're getting 063E3 DC404555 1040 CALLNP GETFSEQN set a sequence number for the file 063E4 E6174809 015 BASE 1041 ST2 R0 FCB,FCSERIAL 063E5 60178801 0 6 BASE 1042 LD R0 SP,THEACS 063E6 DC4062D2 1043 CALLNP CREATEDEV make one of these things 063E7 FE0E63F5 1044 JMP RETURNERR jump if it didn't work 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1381 (INITFILE) F 75 FREQ - Open service routines 063E8 60C40000 3 IMM 1045 LD R3 0 (no directory entry) 063E9 60178801 0 6 BASE 1046 LD R0 SP,THEACS 063EA DC006087 1047 CALL INITDEVACS initialize the device to the access 063EB 40520000 0 REG 1048 PARVL R0 063EC FE0E63F1 1049 JMP RETURNERRX return error if it won't go 063ED 60178801 0 6 BASE 1050 LD R0 SP,THEACS 063EE E4095835 0 5 ZBM 1051 ST R0 FCB,FCACCESS place the access into the FCB 063EF 19C40001 7 IMM 1052 ADD R7 1 success return 063F0 5D1F8002 6 STAK 1053 LEAVE POP 1054 * --- 1055 1056 * Remove the created device so we can return an errors 000063F1 1057 RETURNERRX LABEL 063F1 E4178801 0 6 BASE 1058 ST R0 SP,THEACS save error code here 063F2 DC406351 1059 CALLNP DSTRYDEV destroy the created device 063F3 FEC00000 1060 NOP 0 any errors we cannot do anything about 063F4 60178801 0 6 BASE 1061 LD R0 SP,THEACS get error code back 1062 * \ / 1063 1064 * Return the error code in R0 000063F5 1065 RETURNERR LABEL 063F5 5D1F8002 6 STAK 1066 LEAVE POP 1067 * --- 1068 1069 * If no privilege, return "File Not Found" 000063F6 1070 RETURNFNF LABEL 063F6 6004008D 0 IMM 1071 LD R0 XREQERFNF 063F7 FE0E63F5 1072 JMP RETURNERR 1073 * --- 1074 1075 END of MAKEADEV 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1382 (INITFILE) F 75 FREQ - Open service routines 1077 1078 ********************************************************************************** 1079 * * 1080 * KNOWDEVICE. This will look up a device name and see if it * 1081 * is a device type known as a type we can create. * 1082 * Call: * 1083 * * 1084 * LD2 R0 PAK12 device name * 1085 * CALLNP KNOWDEVICE * 1086 * JEQZ R0 device not known * 1087 * ST R0 HTYPE code * 1088 * * 1089 * Eats R0:R2. * 1090 * Stack required = 1 * 1091 * * 1092 ********************************************************************************** 1093 1094 BLOCK 1095 1096 ENTRY KNOWDEVICE 1097 1098 BEGFRAME 1099 ENDFRAME 1100 063F8 DD5F8001 6 STAK 1101 KNOWDEVICE ENTRNP PUSH 063F9 60840007 2 IMM 1102 LD R2 KDEVTLEN-1 000063FA 1103 CHECKALL LABEL 063FA 66246401 01 2 1104 CPR2 R0 KDEVS(R2) this a known device? 063FB FE0263FF 1105 JEQ FNDDEV jump if so 063FC FAA663FA 2 1106 JDR R2 CHECKALL loop through all 1107 * \ / 063FD 60040000 0 IMM 1108 LD R0 0 not found, return not found code 063FE 5D1F8001 6 STAK 1109 LEAVE POP 1110 * --- 1111 1112 * Device found 000063FF 1113 FNDDEV LABEL 063FF 60246415 0 2 1114 LD R0 KDEVHT(R2) return found hardware type 06400 5D1F8001 6 STAK 1115 LEAVE POP 1116 * --- 1117 00006401 1118 KDEVS LABEL 06401 B2BDD000 1119 PAK12 SAF 06403 ACA35000 1120 PAK12 RAF 06405 533719C0 1121 PAK12 CODE 06407 A07C6C80 1122 PAK12 PATH 06409 974CF580 1123 PAK12 NULL 0640B B980D7C0 1124 PAK12 TERM 0640D 58748800 1125 PAK12 DIR 0640F C7360C00 1126 PAK12 VOL 00000008 ABS 1127 KDEVTLEN EQU DISP2 KDEVS 06411 8A3EA000 1128 PAK12 LP 06413 4B095010 1129 PAK12 BATCH 0000000A ABS 1130 KDEVTLENT EQU DISP2 KDEVS 1131 00006415 1132 KDEVHT LABEL 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1383 (INITFILE) F 75 FREQ - Open service routines 06415 00000001 1133 VFD HTYPESAF 06416 00000002 1134 VFD HTYPERAF 06417 00000003 1135 VFD HTYPECODE 06418 00000004 1136 VFD HTYPEPATH 06419 00000006 1137 VFD HTYPENULL 0641A 00000007 1138 VFD HTYPETERM 0641B 00000005 1139 VFD HTYPEDIR 0641C 0000000E 1140 VFD HTYPEVOL 0641D 0000000B 1141 VFD HTYPELP 0641E 00000009 1142 VFD HTYPETASK 1143 1144 END of KNOWDEVICE 127 INPUT PTHANDLOCK utilities for path and lock handling 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1384 (PTHANDLOCK) F 76 FREQ - Lock and Path management 3 4 BLOCK Path and Lock Managers 5 6 ENTRY CHKLOKWAIT check SQLOCKWAIT for waiters 7 ENTRY FINDLOKHD find a lock control block 8 ENTRY FINDPTHE find a PATH control block 9 ENTRY FREELOK free a lock control block 10 ENTRY FREERCE free a resource control element 11 ENTRY FREELID find and free a lock user identifier 12 ENTRY PLACEPTHE place a PATH control block in list 13 ENTRY PLACELOKHD place a LOK into list 14 ENTRY UNDOFILELK release access to a lock 15 ENTRY UNDOPATH release access to a path 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1385 (PTHANDLOCK) F 76 FREQ - Lock and Path management 17 18 ********************************************************************************** 19 * * 20 * FINDPTHE. Routine to search the path control block list * 21 * and find the requested element. It is assumed the caller has * 22 * gotten the necessary list access. Call: * 23 * * 24 * LD SP => return address stack * 25 * LD FCB => file control block of a .PATH * 26 * CALLNP FINDPTHE * 27 * JMP found (R3 => the element) * 28 * * 29 * * 30 * Eats R0, R1, and R3. * 31 * Stack required = 1 * 32 * * 33 ********************************************************************************** 34 35 BLOCK FINDPTHE subroutine 36 ENTRY FINDPTHE 37 38 BEGFRAME 39 ENDFRAME 40 0641F DD5F8001 6 STAK 41 FINDPTHE ENTRNP PUSH 06420 62174809 015 BASE 42 LD2 R0 FCB,FCSERIAL get the ID of the path 06421 60C01EC7 3 43 LD R3 PATHLIST 00006422 44 FNDPTHEL LABEL 06422 3C56C805 1 3 BASE 45 LSRCH R1 R3,PTHID(1) find partial match or not 06423 FE0C642B 46 JNE FNDPTHENF jump if no such occurrance 06424 6408E8C4 0 3 ZBM 47 CPR R0 R3,PTHIDTOP does the other part match? 06425 FE0C642A 48 JNE FNDPTHEGO jump if not - try another 06426 60094081 0 5 ZBM 49 LD R0 FCB,FCDRIVE check for volume match 06427 6408C084 0 3 ZBM 50 CPR R0 R3,PTHVOL (this catches paths from other systems) 06428 FE02642C 51 JEQ FNDPTHEF jump if all criterion match 06429 60174809 0 5 BASE 52 LD R0 FCB,FCSERIAL 0000642A 53 FNDPTHEGO LABEL 0642A FAF66422 3 54 LJNA R3 FNDPTHEL jump back to try more 0000642B 55 FNDPTHENF LABEL entry not found 0642B 19C40001 7 IMM 56 ADD R7 1 0000642C 57 FNDPTHEF LABEL entry found 0642C 5D1F8001 6 STAK 58 LEAVE POP 59 * --- 60 61 END FINDPTHE subroutine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1386 (PTHANDLOCK) F 76 FREQ - Lock and Path management 63 64 ********************************************************************************** 65 * * 66 * PLACEPTHE. Routine to search the path control list and * 67 * either enter a new entry or increment the busy counters in an * 68 * existing entry. Call: * 69 * * 70 * LD SP => return address stack * 71 * LD FCB => file control block for a path * 72 * CALLNP PLACEPTHE * 73 * entry > * 74 * * 75 * Gets R0:R2. Sets R3. * 76 * Stack required = 5 * 77 * 1 + max ( DQUEONE (4), FINDPTHE (1), LOCKLIST (1), * 78 * LOCKWAIT (0), SGETMEM (0), SRCHLIST (1), * 79 * UNLOCKLIST(1), UNSRCHLIST(1), ZEROIT (1) ) * 80 * * 81 ********************************************************************************** 82 83 BLOCK PLACEPTHE subroutine 84 ENTRY PLACEPTHE 85 86 BEGFRAME 87 ENDFRAME 88 0642D DD5F8001 6 STAK 89 PLACEPTHE ENTRNP PUSH 0000642E 90 SRCHAGN LABEL 0642E DC0030AA 91 CALL SRCHLIST get access to control list 0642F 40001EC6 92 PARL PATHLOCK 06430 DC40641F 93 CALLNP FINDPTHE find our entry 06431 FE0E6448 94 JMP ENTRYFND jump if it already exists 06432 DC0030B7 95 CALL UNSRCHLIST 06433 40001EC6 96 PARL PATHLOCK 06434 DC002ED0 97 CALL SGETMEM create the new element 06435 40440003 IMM 98 PARVL PTHLOG 06436 60920000 2 0 REG 99 LD R2 R0 06437 DC003090 100 CALL ZEROIT initialize it 06438 41168800 2 BASE 101 PAR R2,0 06439 40440008 IMM 102 PARVL 2 POWER PTHLOG 0643A 62174809 015 BASE 103 LD2 R0 FCB,FCSERIAL 0643B E6168804 012 BASE 104 ST2 R0 R2,PTHID place identifying number in element 0643C 60094081 0 5 ZBM 105 LD R0 FCB,FCDRIVE 0643D E4088084 0 2 ZBM 106 ST R0 R2,PTHVOL place identifying volume 0643E 60040200 0 IMM 107 LD R0 MAXPATHCORE 0643F E40888B1 0 2 ZBM 108 ST R0 R2,PTHSIZE set allowable core usage 06440 DC003096 109 CALL LOCKLIST get access allowing pointer changing 06441 40001EC6 110 PARL PATHLOCK 111 * (we needn't check for duplication here because 112 * of the exclusive access to the directory.) 06442 60001EC7 0 113 LD R0 PATHLIST 06443 E4089F10 0 2 ZBM 114 ST R0 R2,PTHLINK link the new element in the list 06444 E4801EC7 2 115 ST R2 PATHLIST 06445 DC0030A4 116 CALL UNLOCKLIST let others use the list 06446 40001EC6 117 PARL PATHLOCK 06447 FE0E642E 118 JMP SRCHAGN try to find the new element 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1387 (PTHANDLOCK) F 76 FREQ - Lock and Path management 119 * --- 120 121 ********************************************************************************** 122 * * 123 * The path entry has been found. We increment the proper * 124 * busy counter and return success. * 125 * * 126 ********************************************************************************** 127 00006448 128 ENTRYFND LABEL 129 PLOCK R3,PTHLOCK lock this element 06448 0CC00000 129 IOFF 06449 D1D6C807 3 BASE 129 SETT R3,PTHLOCK 0644A FE0C644C 129 JNE MA(2+DISPW MA 0) 0644B DC40308B 129 CALLNP LOCKWAIT 0644C DC0030B7 130 CALL UNSRCHLIST release the list 0644D 40001EC6 131 PARL PATHLOCK 0644E D008D0C4 3 ZBM 132 INC R3,PTHBUSY one new user 0644F 60095835 0 5 ZBM 133 LD R0 FCB,FCACCESS 06450 64040007 0 IMM 134 CPR R0 FSACSNDA no data access? 06451 FE026467 135 JEQ TOUCHED is so don't touch direction counters 06452 F63E6458 0 136 JBT R0/FSACSNWB SAYREADR jump if a reader 06453 D016C806 3 BASE 137 INC R3,PTHWRTRS say a writer is here 06454 5C08C011 3 ZBM 138 CMZ R3,PTHRDR is there a reader present? 06455 FE026467 139 JEQ TOUCHED jump if not 06456 EDC8C211 3 ZBM 140 STW R3,PTHUSED otherwise, mark path hookup as being complete 06457 FE0E6467 141 JMP TOUCHED 142 * --- 143 00006458 144 SAYREADR LABEL 06458 EDC8C011 3 ZBM 145 STW R3,PTHRDR our reader is here 06459 E548E312 5 3 ZBM 146 ST FCB R3,PTHREADFCB remember the FCB opened to 0645A EDC8C411 3 ZBM 147 STW R3,PTHINTE assume interrupts 0645B 60000412 0 148 LD R0 CPPSA get the current PSA pointer 0645C 60081F12 0 0 ZBM 149 LD R0 R0,PSPROCCB get pointer to PCB 0645D E408C112 0 3 ZBM 150 ST R0 R3,PTHREADER indicate who is the reader 0645E 5C16C806 3 BASE 151 CMZ R3,PTHWRTRS is there at least one writer present? 0645F FE026467 152 JEQ TOUCHED jump if not (need not release non-existant writers) 06460 EDC8C211 3 ZBM 153 STW R3,PTHUSED otherwise, mark path hookup as being complete 00006461 154 ZOOMAGAIN LABEL 06461 DC00354F 155 CALL DQUEONE release waiting writers 06462 41001DB2 156 PAR SQPATHWAIT where waiting 06463 6012C000 0 3 REG 157 LD R0 R3 06464 7C030000 0 IMM 158 IOR R0 080000000 make flag for writers 06465 40520000 0 REG 159 PARVL R0 save we're looking for the writers 06466 FA326461 0 160 JNZA R0 ZOOMAGAIN jump if maybe another to push 00006467 161 TOUCHED LABEL 162 PUNLOCK R3,PTHLOCK release the element lock 06467 EC16C807 3 BASE 162 STZ R3,PTHLOCK 06468 0C800000 162 ION 06469 5D1F8001 6 STAK 163 LEAVE POP 164 * --- 165 166 END PLACEPTHE subroutine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1388 (PTHANDLOCK) F 76 FREQ - Lock and Path management 168 169 ********************************************************************************** 170 * * 171 * UNDOPATH. This routine undoes an association to a PATH. * 172 * We call this with the FCB associated to the PATH and the proper * 173 * busy counters are decremented and possibly the PATH control * 174 * element is destroyed. Also, others who may be waiting on this * 175 * PATH are pushed (other readers in FileWait, for instance). * 176 * Call: * 177 * * 178 * LD FCB => FCB assocoated with this PATH * 179 * CALLNP UNDOPATH * 180 * * 181 * Eats R0:R3. * 182 * Stack required = 10 * 183 * 2 + max ( CLRPTHEXCWR (1), DQUEONE (4), FINDPTHE (1), * 184 * GIVEUINT (8), LOCKLIST (1), LOCKWAIT (0), * 185 * SFREEMEM (0), SRCHLIST (1), UNLOCKLIST(1), * 186 * UNSRCHLIST (1) ) * 187 * * 188 ********************************************************************************** 189 190 BLOCK UNDOPATH routine 191 ENTRY UNDOPATH 192 193 BEGFRAME 00178801 6 BASE 194 R4SAVE BSS 1 195 ENDFRAME 196 0646A DD5F8002 6 STAK 197 UNDOPATH ENTRNP PUSH 0646B E5178801 4 6 BASE 198 ST R4 SP,R4SAVE 0646C DC0030AA 199 CALL SRCHLIST get access to the list 0646D 40001EC6 200 PARL PATHLOCK 0646E DC40641F 201 CALLNP FINDPTHE find the corresponding control element 0646F FE0E6471 202 JMP ENTRYFND jump if its there 06470 0013119A 203 HALT HALTS119A not found is impossible 204 * --- 205 00006471 206 ENTRYFND LABEL 207 PLOCK R3,PTHLOCK get access to the control element 06471 0CC00000 207 IOFF 06472 D1D6C807 3 BASE 207 SETT R3,PTHLOCK 06473 FE0C6475 207 JNE MA(2+DISPW MA 0) 06474 DC40308B 207 CALLNP LOCKWAIT 06475 DC0030B7 208 CALL UNSRCHLIST let the pointers go 06476 40001EC6 209 PARL PATHLOCK 06477 60095835 0 5 ZBM 210 LD R0 FCB,FCACCESS get the access we have 06478 64040007 0 IMM 211 CPR R0 FSACSNDA check for No Data Access 06479 FE026493 212 JEQ TOUCHED if NDA, don't alter read or write access counts 0647A F63E648A 0 213 JBT R0/FSACSNWB READING jump if reading access 214 * \ / 215 216 ********************************************************************************** 217 * * 218 * We have some kind of write access to the path. The writer busy * 219 * counter is decremented and we check if our process has this path * 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1389 (PTHANDLOCK) F 76 FREQ - Lock and Path management 220 * exclusive write locked, if so we unlock it. Then the reader is * 221 * signaled only in the case where we are the LAST writer. * 222 * * 223 ********************************************************************************** 224 225 * \ / 0647B 6112C000 4 3 REG 226 LD R4 R3 control block pointer to R4 0647C DC406D86 227 CALLNP CLRPTHEXCWR clear exclusive write flag, if need be 0647D D0570806 4 BASE 228 DEC R4,PTHWRTRS say one less writer 0647E FE0C6493 229 JNE TOUCHED only signal if last writer went away 230 * imply EOD. 0647F DC003457 231 CALL GIVEUINT give event to the reader 06480 41490112 4 ZBM 232 PARV R4,PTHREADER the reader to tell 06481 41530000 4 REG 233 PARV R4 parameter if waiting 06482 4147FFFF IMM 234 PARV ONEBITS we only want the reader 06483 41440009 IMM 235 PARV NQPATHWAIT where waiting if he's waiting 06484 41420080 IMM 236 PARV 1*BIT CAIMNEPATH interrupt enable if waiting for int 06485 41490411 4 ZBM 237 PARV R4,PTHINTE non=zero if ints enabled on device 06486 41440023 IMM 238 PARV UINTNEPATH code to give for interrupt 06487 40492312 4 ZBM 239 PARVL R4,PTHREADFCB who is giving the interrupt 06488 60D30000 3 4 REG 240 LD R3 R4 restore control block pointer to R3 06489 FE0E6493 241 JMP TOUCHED 242 * --- 243 244 ********************************************************************************** 245 * * 246 * We are the reader of the path. Any information associated with the * 247 * reader of the path is erased. A writer is awakened so that he may see that * 248 * the reader ceases to exist. Other writers, if any, will be signaled by the * 249 * writer we release here. * 250 * * 251 ********************************************************************************** 252 0000648A 253 READING LABEL 0648A EC08C011 3 ZBM 254 STZ R3,PTHRDR the reader is gone 0648B EC08C112 3 ZBM 255 STZ R3,PTHREADER indicate no reader now 0648C EC08E312 3 ZBM 256 STZ R3,PTHREADFCB indicate no unit is associated 0648D EC08C411 3 ZBM 257 STZ R3,PTHINTE and no interrupts are enabled 0648E DC00354F 258 CALL DQUEONE call to release a waiting writer 0648F 41001DB2 259 PAR SQPATHWAIT queue to look for him in 06490 6012C000 0 3 REG 260 LD R0 R3 06491 7C030000 0 IMM 261 IOR R0 080000000 indicate to look for a writer 06492 40520000 0 REG 262 PARVL R0 263 * \ / 264 00006493 265 TOUCHED LABEL 06493 EC095F16 5 ZBM 266 STZ FCB,FCDCBPTR no longer associated with control block 06494 D048D0C4 3 ZBM 267 DEC R3,PTHBUSY say one less path user 268 PUNLOCK R3,PTHLOCK release the path control block 06495 EC16C807 3 BASE 268 STZ R3,PTHLOCK 06496 0C800000 268 ION 06497 FE0C64BB 269 JNE UNDOPTHXIT jump if path is still in use 270 * \ / 271 06498 DC003096 272 CALL LOCKLIST get modify access to the list 06499 40001EC6 273 PARL PATHLOCK 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1390 (PTHANDLOCK) F 76 FREQ - Lock and Path management 0649A DC40641F 274 CALLNP FINDPTHE find our entry again 0649B FE0E649D 275 JMP STILLTHERE 0649C FE0E64B9 276 JMP GONEPATHE someone else got to it 277 * --- 278 0000649D 279 STILLTHERE LABEL 280 PLOCK R3,PTHLOCK get access to the control element 0649D 0CC00000 280 IOFF 0649E D1D6C807 3 BASE 280 SETT R3,PTHLOCK 0649F FE0C64A1 280 JNE MA(2+DISPW MA 0) 064A0 DC40308B 280 CALLNP LOCKWAIT 064A1 5C08D0C4 3 ZBM 281 CMZ R3,PTHBUSY is it still idle? 064A2 FE0C64B7 282 JNE BUSYAGAIN jump if not -- we leave it 064A3 38001EC7 0 283 LEA R0 PATHLIST 064A4 3CC81F10 3 0 ZBM 284 LSRCH R3 R0,PTHLINK find the entry pointing to ours 064A5 6048DF10 1 3 ZBM 285 LD R1 R3,PTHLINK 064A6 E4481F10 1 0 ZBM 286 ST R1 R0,PTHLINK unlink our element 064A7 0C800000 287 ION "PUNLOCK R3,PTHLOCK" (restore int level) 064A8 DC0030A4 288 CALL UNLOCKLIST free the links in the list 064A9 40001EC6 289 PARL PATHLOCK 064AA 6088DF11 2 3 ZBM 290 LD R2 R3,PTHQUE get pointer to queue of messages 064AB FAB064B3 2 291 JZA R2 NOPTHMES jump if no messages left in .PATH 000064AC 292 FREEPTHMES LABEL 064AC 60489F10 1 2 ZBM 293 LD R1 R2,PTHELINK get to next element (if any) 064AD E448DF11 1 3 ZBM 294 ST R1 R3,PTHQUE 064AE DC002F5D 295 CALL SFREEMEM call to free the message block 064AF 41489640 2 ZBM 296 PARV R2,PTHELOGL specify the length 064B0 40528000 2 REG 297 PARVL R2 and memory address 064B1 6088DF11 2 3 ZBM 298 LD R2 R3,PTHQUE get the pointer that we saved 064B2 FAB264AC 2 299 JNZA R2 FREEPTHMES go back if messages left 000064B3 300 NOPTHMES LABEL 064B3 DC002F5D 301 CALL SFREEMEM free the element 064B4 41440003 IMM 302 PARV PTHLOG 064B5 4052C000 3 REG 303 PARVL R3 064B6 FE0E64BB 304 JMP UNDOPTHXIT 305 * --- 306 307 ********************************************************************************** 308 * * 309 * Someone else got access to the element. Let him have it. * 310 * * 311 ********************************************************************************** 312 000064B7 313 BUSYAGAIN LABEL 314 PUNLOCK R3,PTHLOCK release the path control block 064B7 EC16C807 3 BASE 314 STZ R3,PTHLOCK 064B8 0C800000 314 ION 000064B9 315 GONEPATHE LABEL 064B9 DC0030A4 316 CALL UNLOCKLIST 064BA 40001EC6 317 PARL PATHLOCK 318 * \ / 319 000064BB 320 UNDOPTHXIT LABEL 064BB 61178801 4 6 BASE 321 LD R4 SP,R4SAVE 064BC 5D1F8002 6 STAK 322 LEAVE POP return 323 * --- 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1391 (PTHANDLOCK) F 76 FREQ - Lock and Path management 324 325 END UNDOPATH routine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1392 (PTHANDLOCK) F 76 FREQ - Lock and Path management 327 328 ********************************************************************************** 329 * * 330 * PLACELOKHD. This subroutine finds or creates a LOK element * 331 * for the file opened on the specified file control block. * 332 * * 333 * Call: FCB => file control block * 334 * CALLNP PLACELOKHD * 335 * return - LOK locked, interrupts -1 * 336 * * 337 * Sets R3 => LOK element * 338 * Eats R0:R1 * 339 * Stack required = 2 * 340 * 1 + max ( FINDLOKHD (1), LOCKLIST (1), LOCKWAIT (0), * 341 * SGETMEM (0), UNLOCKLIST(1) ) * 342 * * 343 ********************************************************************************** 344 345 BLOCK PLACELOKHD subroutine 346 347 ENTRY PLACELOKHD 348 349 BEGFRAME 350 ENDFRAME 351 064BD DD5F8001 6 STAK 352 PLACELOKHD ENTRNP PUSH 064BE DC003096 353 CALL LOCKLIST lock LOK list for modification 064BF 40001EC8 354 PARL DLOCKLOCK pass lock 064C0 DC4064D8 355 CALLNP FINDLOKHD see if LOK already exists 064C1 FE0E64C9 356 JMP MUSTCREATE jump if in other universe 357 PLOCK R3,LOKLOCK get exclusive access to resource list 064C2 0CC00000 357 IOFF 064C3 D1D6C801 3 BASE 357 SETT R3,LOKLOCK 064C4 FE0C64C6 357 JNE MA(2+DISPW MA 0) 064C5 DC40308B 357 CALLNP LOCKWAIT 358 000064C6 359 EXIT LABEL 064C6 DC0030A4 360 CALL UNLOCKLIST unlock LOK list 064C7 40001EC8 361 PARL DLOCKLOCK pass the lock 064C8 5D1F8001 6 STAK 362 LEAVE POP return 363 * --- 364 365 * must create and link new element 000064C9 366 MUSTCREATE LABEL 064C9 0CC00000 367 IOFF interrupts off until we're done! 064CA DC002ED0 368 CALL SGETMEM get chunk o' memory 064CB 40040003 IMM 369 PARL LOKLOG pass size 064CC EE160802 0 BASE 370 STZ2 R0,LOKRCELIST zap only the neccessary fields 064CD EE160804 0 BASE 371 STZ2 R0,4 also clear the filler fields 064CE 60D20000 3 0 REG 372 LD R3 R0 put pointer in useful register 064CF 62174809 015 BASE 373 LD2 R0 FCB,FCSERIAL get file identity 064D0 E616C806 013 BASE 374 ST2 R0 R3,LOKSERIAL save it 064D1 60094081 0 5 ZBM 375 LD R0 FCB,FCDRIVE get volume of origin 064D2 E408C086 0 3 ZBM 376 ST R0 R3,LOKVOL mix with SN for uniqueness 064D3 EDD6C801 3 BASE 377 STW R3,LOKLOCK lock the lock 064D4 60001EC9 0 378 LD R0 DLOCKLIST get head of LOK list 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1393 (PTHANDLOCK) F 76 FREQ - Lock and Path management 064D5 E416C800 0 3 BASE 379 ST R0 R3,LOKLINK tack after us 064D6 E4C01EC9 3 380 ST R3 DLOCKLIST finish insert 064D7 FE0E64C6 381 JMP EXIT say goodbye 382 * --- 383 384 END PLACELOKHD subroutine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1394 (PTHANDLOCK) F 76 FREQ - Lock and Path management 386 387 ********************************************************************************** 388 * * 389 * FINDLOKHD. Routine to search the lock control block list * 390 * and find the requested element. It is assumed that the caller * 391 * has gotten the necessary list access. * 392 * Call: * 393 * LD SP => return address stack * 394 * LD FCB => file control block of locked file * 395 * CALLNP FINDLOKHD * 396 * * 397 * the element> * 398 * * 399 * Sets R3 * 400 * Eats R0:R1 * 401 * Stack required = 1 * 402 * * 403 ********************************************************************************** 404 405 BLOCK FINDLOKHD subroutine 406 ENTRY FINDLOKHD 407 408 BEGFRAME 409 ENDFRAME 410 064D8 DD5F8001 6 STAK 411 FINDLOKHD ENTRNP PUSH 064D9 62174809 015 BASE 412 LD2 R0 FCB,FCSERIAL get the unique number of the file 064DA 60C94081 3 5 ZBM 413 LD R3 FCB,FCDRIVE get the drive number from whence it came 064DB E4CA0080 3 0 CBM 414 ST R3 R0/VOLFIELD merge in volume number to catch duplicates 415 * (from a different system and volume) 064DC 60C01EC9 3 416 LD R3 DLOCKLIST get ptr to list head element 000064DD 417 FNDLOKEL LABEL 064DD 3C56C807 1 3 BASE 418 LSRCH R1 R3,LOKSERIAL(1) does half of the serial number match? 064DE FE0C64E4 419 JNE FNDLOKENF if not, it cannot be here 064DF 6416C806 0 3 BASE 420 CPR R0 R3,LOKSERIAL(0) check the other half 064E0 FE0264E3 421 JEQ FNDLOKEF equal sez we found it 064E1 FAF664DD 3 422 LJNA R3 FNDLOKEL advance to next element and continue search 064E2 FE0E64E4 423 JMP FNDLOKENF jump if not found 424 * --- 425 000064E3 426 FNDLOKEF LABEL found return 064E3 19C40001 7 IMM 427 ADD R7 1 advance return address 000064E4 428 FNDLOKENF LABEL not found return 064E4 5D1F8001 6 STAK 429 LEAVE POP return 430 * --- 431 432 END FINDLOKHD subroutine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1395 (PTHANDLOCK) F 76 FREQ - Lock and Path management 434 435 ********************************************************************************** 436 * * 437 * UNDOFILELK. This subroutine is called when a lock user is going * 438 * away (e.g. he is closing the logical unit). It looks at the * 439 * list of resources for the file and frees all the LIDs which * 440 * belong to the specified FCB. If this ends up unlocking any * 441 * resources, the appropriate waiters are set going. If it * 442 * ends up that an RCE has no more LIDs, we free the RCE. If * 443 * the LOK then has no more RCEs, we free the LOK. * 444 * It's possible that we'll find a LOK with no RCEs in its * 445 * list. This happens because someone else is trying to free * 446 * the LOK and must release LOKLOCK in order to grab DLOCKLOCK. * 447 * We've been holding DLOCKLOCK and spinning on LOKLOCK so we * 448 * necessarily will get in ahead of him. In this case, however, * 449 * when we try to free the LOK WE must let go of LOKLOCK, letting * 450 * the other guy get in. What prevents this from becoming a big * 451 * mess when there is a bunch of people doing this is that when * 452 * the original guy relocks DLOCKLOCK, he does it for modification. * 453 * This prevents anybody else from even looking at DLOCKLIST. * 454 * Moral: the first guy will end up freeing the element, anybody * 455 * else will fail to see it when they try to re-find it. * 456 * * 457 * Call: FCB => file control block * 458 * CALLNP UNDOFILELK * 459 * * 460 * Eats R0:R3 * 461 * Stack required = 12 * 462 * 3 + max ( FINDLOKHD (1), FREELID (1), FREELOK (2), * 463 * FREERCE (9), LOCKWAIT (0), SRCHLIST (1), * 464 * UNSRCHLIST (1) ) * 465 * * 466 ********************************************************************************** 467 468 BLOCK UNDOFILELK subroutine and utilities 469 ENTRY UNDOFILELK 470 471 BLOCK UNDOFILELK subroutine 472 ENTRY UNDOFILELK 473 474 BEGFRAME 00178801 6 BASE 475 LOKADDRESS BSS 1 00178802 6 BASE 476 PREVRCE BSS 1 477 ENDFRAME 478 064E5 DD5F8003 6 STAK 479 UNDOFILELK ENTRNP PUSH 064E6 DC0030AA 480 CALL SRCHLIST call to lock LOK list 064E7 40001EC8 481 PARL DLOCKLOCK use this lock 064E8 DC4064D8 482 CALLNP FINDLOKHD get head of resource list 064E9 FE0E64FF 483 JMP NOFOUNDHD jump if no LOK to mess with 484 PLOCK R3,LOKLOCK get access to resource lists 064EA 0CC00000 484 IOFF 064EB D1D6C801 3 BASE 484 SETT R3,LOKLOCK 064EC FE0C64EE 484 JNE MA(2+DISPW MA 0) 064ED DC40308B 484 CALLNP LOCKWAIT 064EE DC0030B7 485 CALL UNSRCHLIST let go of major list 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1396 (PTHANDLOCK) F 76 FREQ - Lock and Path management 064EF 40001EC8 486 PARL DLOCKLOCK the lock we held 487 488 * R3 => locked LOK, interrupts are off 489 * Do it to it. 064F0 E4D78801 3 6 BASE 490 ST R3 SP,LOKADDRESS save address of list 064F1 3816C802 0 3 BASE 491 LEA R0 R3,LOKRCELIST get address of RCE list 064F2 E4178802 0 6 BASE 492 ST R0 SP,PREVRCE save it 064F3 60D6C802 3 3 BASE 493 LD R3 R3,LOKRCELIST get head element of resources 064F4 FAF0650C 3 494 JZA R3 QUICKKILL beat someone else to the punch 495 * \ / 496 497 * loop through all the RCEs, R3 => current RCE 000064F5 498 RCESHERE LABEL 064F5 DC40653F 499 CALLNP FREELID dump a LID, if ours 064F6 FE0E6502 500 JMP ATELID jump if we hit 000064F7 501 NEXTRCE LABEL 064F7 E4D78802 3 6 BASE 502 ST R3 SP,PREVRCE save current RCE 064F8 FAF664F5 3 503 LJNA R3 RCESHERE try next RCE 504 * \ / 505 506 * all RCEs have been done, do final check on the LOK 000064F9 507 DONERCE LABEL 064F9 60D78801 3 6 BASE 508 LD R3 SP,LOKADDRESS get address of LOK 064FA 5C16C802 3 BASE 509 CMZ R3,LOKRCELIST through? 064FB FE02650D 510 JEQ DISCARDLOK jump if LOK now in apparent disuse 511 PUNLOCK R3,LOKLOCK unlock LOK 064FC EC16C801 3 BASE 511 STZ R3,LOKLOCK 064FD 0C800000 511 ION 000064FE 512 PHEW! LABEL 064FE 5D1F8003 6 STAK 513 LEAVE POP 514 * --- 515 000064FF 516 NOFOUNDHD LABEL 064FF DC0030B7 517 CALL UNSRCHLIST let go of major list 06500 40001EC8 518 PARL DLOCKLOCK the lock we held 06501 FE0E64FE 519 JMP PHEW! jump if nothing to do 520 * --- 521 522 ********************************************************************************** 523 * The following code is executed when FREELID actually * 524 * found and freed a LID. We now check whether the * 525 * resource is still locked. If not, we free this RCE * 526 * and link to the next one. * 527 ********************************************************************************** 528 529 * a LID was devoured 00006502 530 ATELID LABEL 06502 5C16C803 3 BASE 531 CMZ R3,RCELIDLIST are there more LIDs? 06503 FE0C64F7 532 JNE NEXTRCE done with RCE, try another 533 * \ / 534 535 * RCE now has no users, dump it. 536 * This call frees the space and releases waiters 06504 60538000 1 6 REG 537 LD R1 SP der stack pointer 06505 DC00652F 538 CALL FREERCE dump the RCE, let waiters go 06506 41564801 1 BASE 539 PARV R1,LOKADDRESS pass address of lock 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1397 (PTHANDLOCK) F 76 FREQ - Lock and Path management 06507 40564802 1 BASE 540 PARVL R1,PREVRCE pass predecessor element 541 * \ / 542 543 * FREERCE returned in R3 the link field of the 544 * RCE we dumped, R3 either is 0 or it points 545 * to another resource to look at 06508 60178801 0 6 BASE 546 LD R0 SP,LOKADDRESS address of the LOK element 06509 D0560803 0 BASE 547 DEC R0,LOKRCECNT indicate one more RCE vanished 0650A FAF064F9 3 548 JZA R3 DONERCE jump if no more RCEs 0650B FE0E64F5 549 JMP RCESHERE otherwise, begin again 550 * --- 551 552 * LOK now has no users, dump it. 0000650C 553 QUICKKILL LABEL 0650C 60D78801 3 6 BASE 554 LD R3 SP,LOKADDRESS get lock, if necessary 0000650D 555 DISCARDLOK LABEL R3 => locked LOK 0650D DC40650F 556 CALLNP FREELOK unlink, free LOK 0650E FE0E64FE 557 JMP PHEW! 558 * --- 559 560 END UNDOFILELK subroutine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1398 (PTHANDLOCK) F 76 FREQ - Lock and Path management 562 563 ********************************************************************************** 564 * FREELOK, FREERCE, FREELID. Utility subroutines for UNDOFILELK. * 565 * These routines unlink and free the elements from the implicit * 566 * lock list structure. * 567 ********************************************************************************** 568 569 ********************************************************************************** 570 * * 571 * FREELOK. Discard a LOK element from DLOCKLIST. * 572 * * 573 * Call: FCB => file control block for locking unit * 574 * R3 => LOK element to remove, locked, IOFF by 1 * 575 * CALLNP FREELOK * 576 * return - LOK might be gone, interrupts ON! * 577 * * 578 * Eats R0:R1 * 579 * Stack required = 2 * 580 * 1 + max ( FINDLOKHD (1), LOCKLIST (1), LOCKWAIT (0), * 581 * SFREEMEM (0), UNLOCKLIST (1) ) * 582 * * 583 ********************************************************************************** 584 585 BLOCK FREELOK subroutine 586 ENTRY FREELOK 587 588 BEGFRAME 589 ENDFRAME 590 0650F DD5F8001 6 STAK 591 FREELOK ENTRNP PUSH 592 PUNLOCK R3,LOKLOCK unlock LOK 06510 EC16C801 3 BASE 592 STZ R3,LOKLOCK 06511 0C800000 592 ION 06512 DC003096 593 CALL LOCKLIST get mod access to LOK list 06513 40001EC8 594 PARL DLOCKLOCK pass the lockword 06514 DC4064D8 595 CALLNP FINDLOKHD get LOK to free 06515 FE0E6529 596 JMP BYENOW jump if not there any more 597 * \ / 598 599 PLOCK R3,LOKLOCK get access to resource lists 06516 0CC00000 599 IOFF 06517 D1D6C801 3 BASE 599 SETT R3,LOKLOCK 06518 FE0C651A 599 JNE MA(2+DISPW MA 0) 06519 DC40308B 599 CALLNP LOCKWAIT 0651A 5C16C802 3 BASE 600 CMZ R3,LOKRCELIST any resources in use? 0651B FE0C652C 601 JNE AGAINBUSY jump if we can not free LOK 0651C 6016C800 0 3 BASE 602 LD R0 R3,LOKLINK address of next LOK 0651D 60401EC9 1 603 LD R1 DLOCKLIST get address of LOK list 0651E 64D24000 3 1 REG 604 CPR R3 R1 are we the head element? 0651F FE026523 605 JEQ FIRSTONE jump if we're the first element 06520 3CD64800 3 1 BASE 606 LSRCH R3 R1,LOKLINK look for our predecessor 06521 FE026524 607 JEQ GOTPRED jump if found 06522 00131150 608 HALT HALTS1150 can this be? 609 * --- 610 00006523 611 FIRSTONE LABEL 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1399 (PTHANDLOCK) F 76 FREQ - Lock and Path management 06523 38401EC9 1 612 LEA R1 DLOCKLIST get address of list head 00006524 613 GOTPRED LABEL 06524 E4164800 0 1 BASE 614 ST R0 R1,LOKLINK unlink the element 06525 DC002F5D 615 CALL SFREEMEM free the unwanted space 06526 41440003 IMM 616 PARV LOKLOG pass the size 06527 4052C000 3 REG 617 PARVL R3 pass current element 618 619 * freeing the LOK "unlocks" it (!), but we must finish 620 * the equivalent of a PUNLOCK by restoring interrupts 06528 0C800000 621 ION interrupts on! 00006529 622 BYENOW LABEL 06529 DC0030A4 623 CALL UNLOCKLIST unlock LOK list 0652A 40001EC8 624 PARL DLOCKLOCK pass lockword 0652B 5D1F8001 6 STAK 625 LEAVE POP return 626 * --- 627 0000652C 628 AGAINBUSY LABEL 629 PUNLOCK R3,LOKLOCK unlock LOK 0652C EC16C801 3 BASE 629 STZ R3,LOKLOCK 0652D 0C800000 629 ION 0652E FE0E6529 630 JMP BYENOW 631 * --- 632 633 END FREELOK subroutine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1400 (PTHANDLOCK) F 76 FREQ - Lock and Path management 635 636 ********************************************************************************** 637 * * 638 * FREERCE. Discard an RCE from the list on a LOK. Warning: The * 639 * list head must be a full word for the unlink to work. * 640 * * 641 * Call: LOK element locked * 642 * R3 => RCE * 643 * CALL FREERCE * 644 * PARV * 645 * PARVL * 646 * * 647 * Sets R3 = link field from RCE * 648 * Eats R0:R1 * 649 * Stack required = 9 * 650 * 3 + max ( CLEANLOCKQ (6), SFREEMEM (0) ) * 651 * * 652 ********************************************************************************** 653 654 BLOCK FREERCE subroutine 655 ENTRY FREERCE 656 657 BEGFRAME 00178801 6 BASE 658 LOCKADR BSS 1 00178802 6 BASE 659 RESOURCE BSS 1 660 ENDFRAME 661 0652F DD1F8003 6 STAK 662 FREERCE ENTR PUSH 06530 C1578801 6 BASE 663 STPV SP,LOCKADR save address of LOK 06531 C0520000 0 REG 664 STPVL R0 get address of who points to us 06532 6056C801 1 3 BASE 665 LD R1 R3,RCERESRCE get resource # 06533 E4578802 1 6 BASE 666 ST R1 SP,RESOURCE save resource 06534 6056C800 1 3 BASE 667 LD R1 R3,RCELINK get following element 06535 E4560800 1 0 BASE 668 ST R1 R0,RCELINK disconnect us 06536 E052C000 1 3 REG 669 EXCH R1 R3 swap for call and our return 06537 DC002F5D 670 CALL SFREEMEM you guessed it 06538 41440002 IMM 671 PARV RCELOG pass size 06539 40524000 1 REG 672 PARVL R1 pass address 673 674 * The RCE was locked but now it is not. Release 675 * waiting readers or a writer. 0653A 60538000 1 6 REG 676 LD R1 SP get stack address 0653B DC006565 677 CALL CLEANLOCKQ release those waiters 0653C 41564801 1 BASE 678 PARV R1,LOCKADR pass shut parm 0653D 40564802 1 BASE 679 PARVL R1,RESOURCE pass shut second parm 0653E 5D1F8003 6 STAK 680 LEAVE POP 681 * --- 682 683 END FREERCE subroutine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1401 (PTHANDLOCK) F 76 FREQ - Lock and Path management 685 686 ********************************************************************************** 687 * * 688 * FREELID. Discard an LID from the list on an RCE. It discards * 689 * the LID which is associated with the specified File Control Block. * 690 * The first return is taken if such a LID existed. Otherwise, the * 691 * the second return is taken. If a matching LID is found, R0 is * 692 * returned 1 if the resource is still locked. * 693 * * 694 * Call: LOK element locked * 695 * FCB => file control block of unit * 696 * R3 => RCE to look on * 697 * CALLNP FREELID * 698 * * 699 * * 700 * * 701 * Eats R0:R2 * 702 * Stack required = 1 * 703 * 1 + SFREEMEM (0) * 704 * * 705 ********************************************************************************** 706 707 BLOCK FREELID subroutine 708 ENTRY FREELID 709 710 BEGFRAME 711 ENDFRAME 712 0653F DD5F8001 6 STAK 713 FREELID ENTRNP PUSH 06540 6016C803 0 3 BASE 714 LD R0 R3,RCELIDLIST get first in list 06541 FA326543 0 715 JNZA R0 NOHALT jump if something in the list 06542 00131151 716 HALT HALTS1151 no LIDs on an existing RCE 717 * --- 718 00006543 719 NOHALT LABEL 06543 60400412 1 720 LD R1 CPPSA get current session 06544 60485F12 1 1 ZBM 721 LD R1 R1,PSPROCCB get session # holder 06545 604840C3 1 1 ZBM 722 LD R1 R1,PCPROCNUM get session number 06546 60934000 2 5 REG 723 LD R2 FCB get FCB address 06547 E44A80C0 1 2 CBM 724 ST R1 R2/BITS 0:(PROCNUMSIZ-1) mix session # with FCB address 06548 3856C803 1 3 BASE 725 LEA R1 R3,RCELIDLIST get address of list pointer 06549 48960801 2 0 BASE 726 RLSRCH R2 R0,LIDTAG find match 0654A FE02654C 727 JEQ GOTIT jump if we found one 0654B FBE06552 7 728 IRJ R7 EXIT say goodnight 729 * --- 730 0000654C 731 GOTIT LABEL 0654C 60881F10 2 0 ZBM 732 LD R2 R0,LIDLINK get forward link 0654D E4885F10 2 1 ZBM 733 ST R2 R1,LIDLINK disconnect our LID 0654E 60920000 2 0 REG 734 LD R2 R0 R0 no good for call 0654F DC002F5D 735 CALL SFREEMEM you guessed it 06550 41440001 IMM 736 PARV LIDLOG pass size 06551 40528000 2 REG 737 PARVL R2 pass address 00006552 738 EXIT LABEL 06552 5D1F8001 6 STAK 739 LEAVE POP 740 * --- 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1402 (PTHANDLOCK) F 76 FREQ - Lock and Path management 741 742 END FREELID subroutine 743 744 END UNDOFILELK subroutine and utilities 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1403 (PTHANDLOCK) F 76 FREQ - Lock and Path management 746 747 ********************************************************************************** 748 * * 749 * CHKLOKWAIT. * 750 * This subroutine scans the SQLOCKWAIT queue to * 751 * determine whether anyone is waiting for the specified * 752 * resource lock. The parameters are mixed to form the * 753 * shutdown parameter for any such waiter. * 754 * * 755 * Eats R1 during parameter passing * 756 * Call: CALL CHKLOKWAIT * 757 * PARV * 758 * PARVL * 759 * * 760 * * 761 * * 762 * Eats R0:R1 * 763 * Stack required = 2 * 764 * 2 + LOCKWAIT (0) * 765 * * 766 ********************************************************************************** 767 768 BLOCK CHKLOKWAIT subroutine 769 770 ENTRY CHKLOKWAIT 771 772 BEGFRAME 00178801 6 BASE 773 TEMP BSS 1 774 ENDFRAME 775 06553 DD1F8002 6 STAK 776 CHKLOKWAIT ENTR PUSH 06554 C1524000 1 REG 777 STPV R1 LOK address in R1 06555 C0520000 0 REG 778 STPVL R0 resource in R0 06556 E4978801 2 6 BASE 779 ST R2 SP,TEMP save this register 06557 62564806 121 BASE 780 LD2 R1 R1,LOKSERIAL get file unique identifier in R1,R2 06558 E40A50C0 0 1 CBM 781 ST R0 R1/LOCKRESFLD mix with serial # 782 PLOCK SQLOCKS(NQLOCKWAIT) lock the lockwaiters 06559 0CC00000 782 IOFF 0655A D1C01DC1 782 SETT SQLOCKS(NQLOCKWAIT) 0655B FE0C655D 782 JNE MA(2+DISPW MA 0) 0655C DC40308B 782 CALLNP LOCKWAIT 0655D 60001DB0 0 783 LD R0 SQLOCKWAIT get list of all lock waiters 0655E 3E560801 120 BASE 784 LSRCH2 R1 R0,PCQPARM anyone for us? 0655F FE026561 785 JEQ BADSIGN jump if so 06560 19C40001 7 IMM 786 ADD R7 1 a good sign! 00006561 787 BADSIGN LABEL 788 PUNLOCK SQLOCKS(NQLOCKWAIT) 06561 EC001DC1 788 STZ SQLOCKS(NQLOCKWAIT) 06562 0C800000 788 ION 06563 60978801 2 6 BASE 789 LD R2 SP,TEMP restore this register 06564 5D1F8002 6 STAK 790 LEAVE POP 791 * --- 792 793 END CHKLOKWAIT subroutine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1404 (PTHANDLOCK) F 76 FREQ - Lock and Path management 795 796 ********************************************************************************** 797 * * 798 * CLEANLOCKQ. This subroutine scans from the head of the * 799 * SQLOCKWAIT queue for processes waiting on the specified lock. * 800 * It releases readers until it finds a process waiting for write * 801 * access. If no such readers exist, the first process waiting * 802 * for write access is released. It is vaguely possible that * 803 * the first reader will re-suspend and we will re-release him * 804 * (etc). This would only happen if we had a large number of * 805 * readers to release. Note that we avoid doing it to ourselves * 806 * by not releasing incompatible waiters. * 807 * * 808 * Call: CALL CLEANLOCKQ * 809 * PARV * 810 * PARVL * 811 * * 812 * Eats R0:R2 * 813 * Stack required = 6 * 814 * 4 + max ( LOCKWAIT (0), SETRUNNING (2) ) * 815 * * 816 ********************************************************************************** 817 818 BLOCK CLEANLOCKQ subroutine 819 820 ENTRY CLEANLOCKQ 821 822 BEGFRAME 00178801 6 BASE 823 PARAM1 BSS 1 00178802 6 BASE 824 SAVER3R4 BSS 2 825 ENDFRAME 826 827 RFLAGS EQU WREL+AREL flags in R7 to manage release 00000010 BYTE 828 WREL EQU BIT 0 says writer released 00000210 BYTE 829 AREL EQU BIT 1 says someone released 830 06565 DD1F8004 6 STAK 831 CLEANLOCKQ ENTR PUSH 06566 C1578801 6 BASE 832 STPV SP,PARAM1 save LOK address 06567 C0520000 0 REG 833 STPVL R0 resource in R0 06568 E6D78802 346 BASE 834 ST2 R3 SP,SAVER3R4 save these regs 835 06569 60578801 1 6 BASE 836 LD R1 SP,PARAM1 retrieve LOK address 0656A 62964806 231 BASE 837 LD2 R2 R1,LOKSERIAL get file unique identifier in R1,R2 0656B E40A90C0 0 2 CBM 838 ST R0 R2/LOCKRESFLD mix in resource # 0656C E4978801 2 6 BASE 839 ST R2 SP,PARAM1 save first half of target shutdown parm 0656D EC0BC020 7 CBM 840 STZ R7/RFLAGS no writer yet, no one released yet 841 842 * lock queue and find our man 0000656E 843 MAJORLOOP LABEL 844 PLOCK SQLOCKS(NQLOCKWAIT) lock the lock wait queue 0656E 0CC00000 844 IOFF 0656F D1C01DC1 844 SETT SQLOCKS(NQLOCKWAIT) 06570 FE0C6572 844 JNE MA(2+DISPW MA 0) 06571 DC40308B 844 CALLNP LOCKWAIT 06572 60001DB0 0 845 LD R0 SQLOCKWAIT get first guy there 06573 38401DB0 1 846 LEA R1 SQLOCKWAIT get address of list pointer 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1405 (PTHANDLOCK) F 76 FREQ - Lock and Path management 06574 60978801 2 6 BASE 847 LD R2 SP,PARAM1 get back first shut parameter 06575 4A960801 230 BASE 848 RLSCH2 R2 R0,PCQPARM any one with our numbers? 06576 FE0C6587 849 JNE ALLFREED jump if not complete match 850 * \ / 851 852 * found someone for our very resource 06577 5C160000 0 CACH 853 CMZ R0,PCQPARM2 is he waiting for write access? 06578 FE026585 854 JEQ AWRITER if so, we must look into it 855 * \ / 856 857 * we may set the guy running 00006579 858 BACKIN LABEL 06579 60881F10 2 0 ZBM 859 LD R2 R0,PCQLINK get link to next guy 0657A E4885F10 2 1 ZBM 860 ST R2 R1,PCQLINK remove guy from list 861 PUNLOCK SQLOCKS(NQLOCKWAIT) unlock list 0657B EC001DC1 861 STZ SQLOCKS(NQLOCKWAIT) 0657C 0C800000 861 ION 0657D 61120000 4 0 REG 862 LD PCB R0 for call 0657E 60081F13 0 0 ZBM 863 LD R0 R0,PCPSADRS get his PSA 0657F EDC80010 0 ZBM 864 STW R0,PSWAITED make sure he don't come back! 06580 DC402B99 865 CALLNP SETRUNNING make the guy runnable 06581 EDCBC210 7 CBM 866 STW R7/AREL say we dequeued someone 06582 F3C0656E 7 867 JBF R7/WREL MAJORLOOP do more if we didn't release writer 00006583 868 ADIOS LABEL 06583 62D78802 346 BASE 869 LD2 R3 SP,SAVER3R4 restore these regs 06584 5D1F8004 6 STAK 870 LEAVE POP back into it 871 * --- 872 873 * found someone waiting for write access 00006585 874 AWRITER LABEL 06585 EDCBC010 7 CBM 875 STW R7/WREL say we're looking at a writer 06586 F3C26579 7 876 JBF R7/AREL BACKIN jump if no one yet dequeued 877 * \ / 878 879 * release no more processes 00006587 880 ALLFREED LABEL 881 PUNLOCK SQLOCKS(NQLOCKWAIT) unlock list 06587 EC001DC1 881 STZ SQLOCKS(NQLOCKWAIT) 06588 0C800000 881 ION 06589 FE0E6583 882 JMP ADIOS return 883 * --- 884 885 END CLEANLOCKQ subroutine 886 887 END Path and Lock Managers 128 INPUT MTUTIL mag tape utilities 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1406 (MTUTIL) F 77 Mag Tape Utilities - MTREQUEST and SETMTSTAT 3 4 ********************************************************************************** 5 * * 6 * MTREQUEST * 7 * This routine is called for all function requests on * 8 * the magnetic tape units. For requests requiring anything * 9 * other than the request code, the caller should set the * 10 * other parameters in the MTU element first. * 11 * This routine may only be called when the user is * 12 * switched in. * 13 * Call: * 14 * R4 => MTU element * 15 * CALL MTREQUEST * 16 * PARVL request code (MTURQxxxx) * 17 * ST R0 error code (0 if OK) * 18 * * 19 * Eats R0-R2. * 20 * Stack required = 1. * 21 * 1 + max ( LOCKWAIT (0), SUSPENDME (0) ) * 22 * * 23 ********************************************************************************** 24 25 BLOCK MTREQUEST subroutine 26 ENTRY MTREQUEST 27 28 BEGFRAME 29 ENDFRAME 30 0658A DD1F8001 6 STAK 31 MTREQUEST ENTR PUSH 0658B C0524000 1 REG 32 STPVL R1 save request code 33 PLOCK MTREQLOCK gain access to the request word 0658C 0CC00000 33 IOFF 0658D D1C01F20 33 SETT MTREQLOCK 0658E FE0C6590 33 JNE MA(2+DISPW MA 0) 0658F DC40308B 33 CALLNP LOCKWAIT 06590 E4570008 1 4 CACH 34 ST R1 R4,MTUREQUEST place the request 06591 60091F11 0 4 ZBM 35 LD R0 R4,MTUCNTL R0 -> MTC element 06592 EDD60805 0 BASE 36 STW R0,MTCREQUEST say request pending for this controller 06593 60040020 0 IMM 37 LD R0 1*BIT FLMTPROC get flag bit indicating MT start 06594 FC001CF6 0 38 IORM R0 FLAGS set into dispatcher flags word 06595 DC00351C 39 CALL SUSPENDME call to shut down this user 06596 4100659A 40 PAR DONEREQ where to restart 06597 41530000 4 REG 41 PARV R4 pass restart parameter (MTU address) 06598 41001DAC 42 PAR SQDIOWAIT indicate which queue 06599 40001F20 43 PARL MTREQLOCK and what to unlock 44 * --- 45 0000659A 46 DONEREQ LABEL 0659A 600904A1 0 4 ZBM 47 LD R0 R4,MTUERRCODE retrieve the error code 0659B 5D1F8001 6 STAK 48 LEAVE POP return to caller 49 * --- 50 51 END MTREQUEST subroutine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1407 (MTUTIL) F 77 Mag Tape Utilities - MTREQUEST and SETMTSTAT 53 54 ********************************************************************************** 55 * * 56 * SETMTSTAT * 57 * Routine to get the current MT status and place * 58 * it into the FCB. * 59 * LD R4 => MTU element * 60 * LD FCB => FCB * 61 * CALLNP SETMTSTAT * 62 * * 63 * * 64 * * 65 * Eats only R1. Caution, add no parameters. * 66 * Stack required = 1. * 67 * * 68 ********************************************************************************** 69 70 BLOCK SETMTSTAT subroutine 71 ENTRY SETMTSTAT 72 73 BEGFRAME 74 ENDFRAME 75 0659C DD5F8001 6 STAK 76 SETMTSTAT ENTRNP PUSH 0659D 6057080B 1 4 BASE 77 LD R1 R4,MTUMTCSTAT get the last drive status 0659E F27665A1 1 78 JBF R1/MTDSTBOT NOTBOT jump if not at load point 0659F EDC94C15 5 ZBM 79 STW FCB,FCLOADPT otherwise, set load point bit 065A0 FE0E65A5 80 JMP RETURN1 and take skip return 81 * --- 82 000065A1 83 NOTBOT LABEL 065A1 EC094C15 5 ZBM 84 STZ FCB,FCLOADPT clear the load point bit 065A2 F27265A5 1 85 JBF R1/MTDSTEOT RETURN1 jump if not end of tape warning 065A3 60440009 1 IMM 86 LD R1 FILNEOD fake record type 000065A4 87 RETURN0 LABEL 065A4 5D1F8001 6 STAK 88 LEAVE POP return to caller 89 * --- 90 000065A5 91 RETURN1 LABEL 065A5 FA6065A4 1 92 IRJ R1 RETURN0 give skip return 93 * --- 94 95 END SETMTSTAT subroutine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1408 (MTUTIL) F 77 Mag Tape Utilities - MTREQUEST and SETMTSTAT 97 98 ********************************************************************************** 99 * * 100 * MTCHKWFM - Write tape marks if needed. * 101 * * 102 * This routine will write two tape marks and backspace over * 103 * them, if needed. It does this if FCBOPWRITE is set. In any * 104 * event, it clears FCBOPWRITE. * 105 * * 106 * LD FCB => FCB * 107 * LD R4 => MTU * 108 * CALLNP MTCHKWFM * 109 * ST R0 error code (0 if ok) * 110 * * 111 * Eats R0:R3 * 112 * Stack required = 2 * 113 * 1 + MTREQUEST (1). * 114 * * 115 ********************************************************************************** 116 117 BLOCK MTCHKWFM subroutine 118 ENTRY MTCHKWFM 119 120 BEGFRAME 121 ENDFRAME 122 065A6 DD5F8001 6 STAK 123 MTCHKWFM ENTRNP PUSH 065A7 60040000 0 IMM 124 LD R0 0 send return code 065A8 D1897215 5 ZBM 125 CLRT FCB,FCOPWRITE last operation a write? 065A9 FE0265B5 126 JEQ RETURN if not, do nothing 065AA DC00658A 127 CALL MTREQUEST request to 065AB 40440008 IMM 128 PARVL MTURQWFM write a filemark 065AC FA0C65B5 0 129 JNEZ R0 RETURN jump if didn't work 065AD DC00658A 130 CALL MTREQUEST request to 065AE 40440008 IMM 131 PARVL MTURQWFM write another filemark 065AF FA0C65B5 0 132 JNEZ R0 RETURN jump if didn't work 065B0 DC00658A 133 CALL MTREQUEST request to 065B1 40440005 IMM 134 PARVL MTURQBKSP backspace over filemark 065B2 FA0C65B5 0 135 JNEZ R0 RETURN jump if didn't work 065B3 DC00658A 136 CALL MTREQUEST request to 065B4 40440005 IMM 137 PARVL MTURQBKSP backspace over another filemark 138 * \ / 139 000065B5 140 RETURN LABEL 065B5 5D1F8001 6 STAK 141 LEAVE POP go back, R0 = error code 142 * --- 143 144 END MTCHKWFM subroutine 129 INPUT DIOSETUP setup for direct I/O operations 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1409 (DIOSETUP) F 78 Setup for Direct I/O 3 4 ********************************************************************************** 5 * * 6 * DIOSETUP - Sets up I/O for Tape Devices. * 7 * * 8 * This routine is provided for direct I/O type devices. * 9 * It locks the users buffer into physical memory so that it * 10 * can be used for real I/O. It also ensures, in the case of * 11 * reads, that the memory is all read/write. In the case of * 12 * writes, the memory must not be excluded. Call: * 13 * * 14 * CALL DIOSETUP * 15 * PARV * 16 * PARVL <0 for read operation, 1 for write operation> * 17 * JMP error (R0 = error code, R1 = sub-code) * 18 * chain of UBS elements, R1=count used> * 19 * NOTE: We get the buffer information from the registers in * 20 * PSCACHNP1. * 21 * * 22 * Registers Used = R0:R3. * 23 * Stack Required = 9. * 24 * * 25 * 7 + Max ( CLRMEMTRAP (1), DIODONE (2), LOCKPAGE (1), * 26 * SETMEMTRAP (1), SGETMEM (0), ULKPAGE (1)) * 27 * * 28 ********************************************************************************** 29 30 BLOCK DIOSETUP Routine 31 ENTRY DIOSETUP 32 33 BEGFRAME 00178801 6 BASE 34 DIRECTION BSS 1 direction of transfer (0=input, 1=output) 00178802 6 BASE 35 SETCOUNT BSS 1 byte count that was set up 00178803 6 BASE 36 COUNT BSS 2 byte count (running decremented) 00178804 6 BASE 37 BUFADDR EQU COUNT(1) transfer address (running incremented) 00178805 6 BASE 38 MSRMASK BSS 1 mask of bits to clear in MSR 00178806 6 BASE 39 FIRSTUBS BSS 1 address of first UBS block generated 40 ENDFRAME 41 065B6 DD1F8007 6 STAK 42 DIOSETUP ENTR PUSH 065B7 C1578803 6 BASE 43 STPV SP,COUNT save max allowed count 065B8 C0578801 6 BASE 44 STPVL SP,DIRECTION save direction (0 for read, 1 for write) 45 * \ / 065B9 60800412 2 46 LD R2 CPPSA PSA address 065BA 60889F11 2 2 ZBM 47 LD R2 R2,PSCACHNP1 R2 -> caller's console area 065BB 62168803 012 BASE 48 LD2 R0 R2,CAR1 R0 = count, R1 = address 065BC 50178803 0 6 BASE 49 MIN R0 SP,COUNT reduce count to maximum 065BD E6178803 016 BASE 50 ST2 R0 SP,COUNT save it in our area 065BE E4178802 0 6 BASE 51 ST R0 SP,SETCOUNT and save unmodified transfer count 065BF 60040000 0 IMM 52 LD R0 0 initialize MSR bits 065C0 5C178801 6 BASE 53 CMZ SP,DIRECTION 065C1 ED8A3210 0 CBM 54 STLNE R0/MSRFRELOCB set bit for write (fetch from memory) 065C2 EC4A3010 0 CBM 55 STLEQ R0/MSRSRELOCB set bit for read (store into memory) 065C3 28168801 0 2 BASE 56 BSUB R0 R2,CAMSR R0 = bit in MSR to clear before reference 065C4 E4178805 0 6 BASE 57 ST R0 SP,MSRMASK save it 065C5 5C120000 0 REG 58 CMZ R0 check for operation from/into monitor space 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1410 (DIOSETUP) F 78 Setup for Direct I/O 065C6 EC499C14 6 ZBM 59 STLEQ SP,BUFADDR/PAGEFIELD/MONBIT set monitor bit in address reg 60 * \ / 065C7 DC005BCF 61 CALL SETMEMTRAP set up a memory trap 065C8 400065FE 62 PARL USERMEMBAD where to go 63 * \ / 065C9 EC178806 6 BASE 64 STZ SP,FIRSTUBS start with empty list 065CA 38D78806 3 6 BASE 65 LEA R3 SP,FIRSTUBS R3 -> (SP,FIRSTUBS) 065CB 5C178803 6 BASE 66 CMZ SP,COUNT is there a byte-count? 065CC FE0A65F6 67 JLE ZEROLEN jump if zero-length 065CD 5C098024 6 ZBM 68 CMZ SP,BUFADDR/BITS 0:1 address must be on word boundary 065CE FE0C65FB 69 JNE BADADDRESS jump if it is not 70 * \ / 71 72 ********************************************************************************** 73 * * 74 * Loop to build small UBS elements. * 75 * * 76 ********************************************************************************** 77 78 * \ / 79 * R3 -> previous UBS (or root on stack) 000065CF 80 LOOP LABEL 065CF 60178804 0 6 BASE 81 LD R0 SP,BUFADDR R0 -> user buffer 065D0 60578801 1 6 BASE 82 LD R1 SP,DIRECTION R1 = 0 if read, 1 if write 065D1 59978805 6 BASE 83 CLBMSR SP,MSRMASK adjust the MSR 065D2 0CC00000 84 IOFF interrupts off! 065D3 FA4265D6 1 85 JEQZ R1 READOP jump if reading 065D4 5C160800 0 BASE 86 CMZ R0,0 touch the page 065D5 FE0E65D7 87 JMP TOUCHED 88 * --- 89 000065D6 90 READOP LABEL 065D6 FC560800 1 0 BASE 91 IORM R1 R0,0 touch (modify) the page 92 * \ / 000065D7 93 TOUCHED LABEL 065D7 59C400C0 IMM 94 IORMSR MSRFRELOC+MSRSRELOC restore our MSR 065D8 60099C84 0 6 ZBM 95 LD R0 SP,BUFADDR/PAGEFIELD get the page number 065D9 DC4031DE 96 CALLNP LOCKPAGE and lock into core 065DA DC002ED0 97 CALL SGETMEM get a UBS block 065DB 40440002 IMM 98 PARVL UBSLOG not long 065DC EC160800 0 BASE 99 STZ R0,0 clear first word of it 065DD E408DF10 0 3 ZBM 100 ST R0 R3,UBSLINK link it into the list 065DE 60D20000 3 0 REG 101 LD R3 R0 R3 -> new UBS block 065DF 60099C84 0 6 ZBM 102 LD R0 SP,BUFADDR/PAGEFIELD R0 = page number 065E0 E416C000 0 3 CACH 103 ST R0 R3,UBSVPN save virtual page number 065E1 60800414 2 104 LD R2 CPCUPC current process 065E2 6096880F 2 2 BASE 105 LD R2 R2,UPCVASP R2 -> working set page list 065E3 3C168000 0 2 CACH 106 LSRCH R0 R2,PAVPN find our PAL 065E4 FE0265E6 107 JEQ HAVEAPAL jump if found 065E5 00131300 108 HALT HALTS1300 locked page not found in VASP list 109 * --- 110 000065E6 111 HAVEAPAL LABEL 065E6 0C800000 112 ION interrupts back on 065E7 60168801 0 2 BASE 113 LD R0 R2,PAPMVALUE get page map value 065E8 6049ACA4 1 6 ZBM 114 LD R1 SP,BUFADDR/DISPFIELD pick up displacement part of buffer address 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1411 (DIOSETUP) F 78 Setup for Direct I/O 065E9 E40A54C0 0 1 CBM 115 ST R0 R1/FLDABSPG combine offset and page number 065EA E44A1560 1 0 CBM 116 ST R1 R0/PAGEANDISP combine in with slot number 065EB E416C801 0 3 BASE 117 ST R0 R3,UBSMAW save as memory address word 065EC 60040400 0 IMM 118 LD R0 WPP page size, in words 065ED 1009ACA4 0 6 ZBM 119 SUB R0 SP,BUFADDR/DISPFIELD take off usage 065EE 1C040004 0 IMM 120 MUL R0 CPW R0 = bytes remaining on page 065EF 50178803 0 6 BASE 121 MIN R0 SP,COUNT adjust for end of buffer 065F0 E416C802 0 3 BASE 122 ST R0 R3,UBSBCW save as byte-count word 065F1 604A01E0 1 0 CBM 123 LD R1 R0/BITS 0:29 convert back into words 065F2 98578804 1 6 BASE 124 ADDM R1 SP,BUFADDR adjust the address 065F3 B0178803 0 6 BASE 125 RSBM R0 SP,COUNT adjust the count 065F4 FE0465CF 126 JGT LOOP jump if more to do 065F5 EDC8E012 3 ZBM 127 STW R3,UBSBCW/PPUCLAST indicate last byte count 128 * \ / 000065F6 129 ZEROLEN LABEL 065F6 EC08DF10 3 ZBM 130 STZ R3,UBSLINK say end of list 065F7 DC405BD4 131 CALLNP CLRMEMTRAP clear the memory trap 065F8 60099F16 0 6 ZBM 132 LD R0 SP,FIRSTUBS/FLDADRS R0 -> first UBS block 065F9 60578802 1 6 BASE 133 LD R1 SP,SETCOUNT get count set up in UBS elements 065FA FBE06605 7 134 IRJ R7 RETURN good return 135 * --- 136 137 * User gave non-word aligned buffer address 000065FB 138 BADADDRESS LABEL 065FB DC405BD4 139 CALLNP CLRMEMTRAP clear the memory trap 065FC 60040082 0 IMM 140 LD R0 XREQERPOB error: parameter out of bounds 065FD FE0E6605 141 JMP RETURN 142 * --- 143 144 * User's memory flaked out 000065FE 145 USERMEMBAD LABEL 065FE 0C800000 146 ION interrutps on 065FF E6178803 016 BASE 147 ST2 R0 SP,COUNT save these registers 06600 DC405BD4 148 CALLNP CLRMEMTRAP clear the memory trap 06601 60178806 0 6 BASE 149 LD R0 SP,FIRSTUBS R0 -> list of UBS elements so far 06602 DC006606 150 CALL DIODONE clean up the previous elements 06603 40520000 0 REG 151 PARVL R0 pointer to list 06604 62178803 016 BASE 152 LD2 R0 SP,COUNT restore error codes 153 * \ / 00006605 154 RETURN LABEL 06605 5D1F8007 6 STAK 155 LEAVE POP and return 156 * --- 157 158 END DIOSETUP Routine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1412 (DIOSETUP) F 78 Setup for Direct I/O 160 161 ********************************************************************************** 162 * * 163 * DIODONE - Cleans up After Tape I/O Operation. * 164 * * 165 * This routine is provided to clean up after completion * 166 * of a direct I/O transfer. It unlocks the users pages and * 167 * frees the UBS elements corresponding. This routine may only * 168 * be called when the user is switched in. Call: * 169 * * 170 * CALL DIODONE * 171 * PARVL address of first UBS block * 172 * * 173 * Registers Used = R0:R3. * 174 * Stack Required = 2. * 175 * * 176 * 1 + max ( SFREEMEM (0), ULKPAGE (1) ) * 177 * * 178 ********************************************************************************** 179 180 BLOCK DIODONE Routine 181 ENTRY DIODONE 182 183 BEGFRAME 184 ENDFRAME 185 06606 DD1F8001 6 STAK 186 DIODONE ENTR PUSH 06607 C0528000 2 REG 187 STPVL R2 R2 -> list to free 188 * \ / 06608 FAB06611 2 189 JZA R2 RETURN jump if nothing to free 00006609 190 LOOP LABEL 06609 60168000 0 2 CACH 191 LD R0 R2,UBSVPN get the page number 0660A DC403279 192 CALLNP ULKPAGE unlock the page 0660B 60D28000 3 2 REG 193 LD R3 R2 R3 -> UBS block to free 0660C 60889F10 2 2 ZBM 194 LD R2 R2,UBSLINK R2 -> next UBS block 0660D DC002F5D 195 CALL SFREEMEM free the UBS block 0660E 41440002 IMM 196 PARV UBSLOG size of block 0660F 4052C000 3 REG 197 PARVL R3 address of block 06610 FAB26609 2 198 JNZA R2 LOOP jump if more to do 199 * \ / 00006611 200 RETURN LABEL 06611 5D1F8001 6 STAK 201 LEAVE POP all done 202 * --- 203 204 END DIODONE Routine 130 INPUT FRQNOPEN new lun assigner -- OPEN 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1413 (FRQNOPEN) F 79 FREQ - OPEN 3 4 BLOCK outer block for file open request 5 ENTRY FREQEQUIP open a file the old way 6 ENTRY FREQNOPEN open a file request 7 ENTRY FREQUOPEN open without program privs 8 ENTRY GETFCB get a FCB 9 10 ********************************************************************************** 11 * * 12 * "Open" a file for access. These two requests (the newer OPEN * 13 * and the old favorite EQUIP) associate a named system entity * 14 * (directory entry, "scratch" devices, and spooled devices) with a * 15 * "unit number" that may be used in the other IO FREQs. * 16 * * 17 * Stack required = 20 * 18 * 0 + max ( ACCTFILLOG (4), CHARTOINT (2), CHKBZYACS (2), * 19 * CLRMEMTRAP (1), CNTFCBUSER (1), CREATEUCE (2), * 20 * DEFAULTFS (1), DMOTEWNDO2 (7), DSTRYDEV (14), * 21 * FCFREEMEM (0), FINDULB (14), FNDOPNACS (1), * 22 * FNDSPLRULB (5), FREEDIR (5), FREETEMPS (16), * 23 * FREEULB (11), GETFCB (3), GETPKTEMP (2), * 24 * GRUBWNDOx (7), INITDEVACS (18), KNOWDEVICE (1), * 25 * LIBCHKALL (5), LINKFCBIN (1), LINKUCEIN (3), * 26 * LOCKWAIT (0), LUNSEARCH (2), MAKEADEV (20), * 27 * P12TOCHAR (6), PWMANGLE (3), SCANDEVSP (3), * 28 * SELFFWAIT (6), SETACCESS (2), SETMEMTRAP (1), * 29 * SFREEMEM (0), SGETMEM (0), SHLCHKALL (12), * 30 * SPLRIGNR (17), SPLRINIT (5), SPLRRECV (3), * 31 * SPLRSEND (12), SRCHDIR (11), SUSPENDFRQ (1), * 32 * ULKWNDO1 (1), UNLINKFCB (1), UNLINKUCE (1), * 33 * UNSPLRINIT (1), USEULB (4), USVREM (16), * 34 * ZEROIT (1) ) * 35 * * 36 ********************************************************************************** 37 38 ********************************************************************************** 39 * * 40 * FSPxxx. This temp block is used by NOPEN to hold the user's file * 41 * specification string. * 42 * * 43 ********************************************************************************** 44 00000006 ABS 45 FSPLOG EQU 6 log size of block 00000040 ABS 46 FSPWLEN EQU 2 POWER FSPLOG words in block 00000100 ABS 47 FSPCLEN EQU FSPWLEN*CPW characters in block 48 00006612 49 FSPROTO BASE R0 00160800 0 BASE 50 FSSTRINGB BSS 1 => beginning of device specification 00160801 0 BASE 51 FSSTRINGE BSS 1 => after terminator of string F 00160802 0 BASE 52 FSDEVICE BSS 2 device aqs specified 00000010 ABS 53 FSPHEADR EQU DISPC FSSTRINGB length of header 00160010 0 CACH 54 FSPFILESP BSSC FSPCLEN-FSPHEADR the file spec 000000EF ABS 55 FSPMAXFS EQU FSPCLEN-FSPHEADR-1 max length of file spec (w/room for term) 56 DRCT 57 ORG FSPROTO 58 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1414 (FRQNOPEN) F 79 FREQ - OPEN 00003A30 BYTE 59 REQACCESS EQU BITS 29:31 bits in request giving requested access 00003810 BYTE 60 REQCREAT EQU BIT 28 bit in request saying to create 61 00000210 BYTE 62 REQXXW EQU BIT(FRNOPENR-FRNOPEN) 00000010 BYTE 63 REQXXX EQU BIT(FRNOPENW-FRNOPEN) 00000810 BYTE 64 REQXXY EQU BIT(FRNOPENMW-FRNOPEN) 00000E10 BYTE 65 REQXXZ EQU BIT(FRNOPENNA-FRNOPEN) 00001210 BYTE 66 REQXYW EQU BIT(FRNOPENCR-FRNOPEN) 00001010 BYTE 67 REQXYX EQU BIT(FRNOPENCW-FRNOPEN) 00001810 BYTE 68 REQXYY EQU BIT(FRNOPENCMW-FRNOPEN) 00001E10 BYTE 69 REQXYZ EQU BIT(FRNOPENCNA-FRNOPEN) C9000000 ABS 70 LEGALOPP1 EQU 1*REQXXW+1*REQXXY+1*REQXXX+1*REQXXZ 00C90000 ABS 71 LEGALOPP2 EQU 1*REQXYW+1*REQXYX+1*REQXYY+1*REQXYZ 06612 C9C90000 72 LEGALOPB VFD LEGALOPP1+LEGALOPP2 06613 00486612 73 LEGALOPEN PTR LEGALOPB/BIT 0 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1415 (FRQNOPEN) F 79 FREQ - OPEN 75 76 ********************************************************************************** 77 * * 78 * In order to conserve stack space the following variables * 79 * are associated on a piece of system storage. So rather * 80 * than specifying these via the normal stack pointer we use * 81 * an alternate pointer in VAR (R7). * 82 * * 83 ********************************************************************************** 84 0013C000 7 REG 85 VAR EQU R7 00006614 86 FOPNSTK BASE VAR 0017C800 7 BASE 87 WORDA BSS 1 flags word 0009C010 7 ZBM 88 UNPRIVOPEN EQU WORDA/BIT 0 non-zero if unprivileged open 0009C210 7 ZBM 89 DIRLOCKD EQU WORDA/BIT 1 non-zero if directory locked 0009C410 7 ZBM 90 SAVFCBULB EQU WORDA/BIT 2 non-zero if to save FCB/ULB 0009C610 7 ZBM 91 FILEEXISTS EQU WORDA/BIT 3 non-zero if file exists 0017C801 7 BASE 92 EQTADDR BSS 1 => file spec packing block 0017C802 7 BASE 93 FCBADDR BSS 1 => FCB being built 0017C803 7 BASE 94 ULBADDR BSS 1 => ULB being used 0017C804 7 BASE 95 UNITNO BSS 1 number of unit being opened 0017C805 7 BASE 96 FSPARAM BSS 1 => parameter string block 0017C806 7 BASE 97 INDXPTR BSS 2 index into UDIR 0017C807 7 BASE 98 DIRENTPTR EQU INDXPTR(1) directory entry 0017C808 7 BASE 99 ERRTEMP BSS 2 temp for error processing 0017C809 7 BASE 100 MSGID EQU ERRTEMP(1) ID of spooler message sent 0017C80A 7 BASE 101 HANDLE BSS 1 handle to get at the spooler 0017C80B 7 BASE 102 MASKSAVE BSS 1 save of message status 0017C80C 7 BASE 103 QUEUEID BSS 1 spooler ID of OPEN request 0017C80D 7 BASE 104 ENDQUEID BSS 1 marks end for string converter 0017C808 7 BASE 105 FILEPWD EQU ERRTEMP temporary for mangled file password 0017C80E 7 BASE 106 SHARELIST BSS 4 hold file/account share list 107 DRCT 00000005 ABS 108 FOPNLOG EQU (DISPW FOPNSTK) LOG 2 109 ORG FOPNSTK 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1416 (FRQNOPEN) F 79 FREQ - OPEN 111 112 ********************************************************************************** 113 * * 114 * FREQEQUIP. * 115 * This code accepts the parameters already packed up into a * 116 * fifteen word block and proceeds to the common code. * 117 * * 118 * The user call is: * 119 * * 120 * LD R0 request+access+create flag * 121 * LD R1 ADR EQUIPDATA * 122 * FREQ * 123 * * 124 * where: * 125 *EQUIPDATA LABEL * 126 * BSS2 1 volume file on (PAK12) * 127 * BSS 1 system file is on * 128 * BSS2 1 password for above (PAK12) * 129 * BSS2 1 account file on (PAK12) * 130 * BSS 1 project of account * 131 * BSS2 1 password for account access (PAK12) * 132 * BSS2 1 file name (PAK12) * 133 * BSS 1 extension for filename * 134 * BSS2 1 password for file access * 135 * * 136 * All fields set to zero as assumed to be not specified * 137 * except the extensions (system, filename extension, and * 138 * project) where minus one (-1) indicates not specified. * 139 * * 140 * The EQUIP requests return in R0 either an error code * 141 * top bit is on) or the static status of the unit (top * 142 * bit off). * 143 * * 144 ********************************************************************************** 145 146 147 BLOCK 148 ENTRY FREQEQUIP open files the old way 149 ENTRY FREQNOPEN 150 ENTRY FREQUOPEN 151 00006614 152 FREQEQUIP LABEL 06614 5C346613 2 @ 153 CMZ @LEGALOPEN(R2) check for legal request 06615 FE0259D8 154 JEQ UERRORILR jump if not legal request 06616 FB7259C0 5 155 JNZA FCB FERRORLAE jump if unit already defined 06617 DC406886 156 CALLNP GETFCB check range of R3 and create FCB 06618 FE0E5988 157 JMP UERROR not in range or insufficient resources 06619 DC002ED0 158 CALL SGETMEM get storage for our temp variables 0661A 40440005 IMM 159 PARVL FOPNLOG log of the block size 0661B E413C000 0 7 REG 160 ST R0 VAR initialize our variables pointer 0661C DC003090 161 CALL ZEROIT zap the block we got 0661D 41160800 0 BASE 162 PAR R0,0 indicate its location 0661E 40440020 IMM 163 PARVL 2 POWER FOPNLOG and its length 164 * \ / 165 0661F E4D7C804 3 7 BASE 166 ST R3 VAR,UNITNO remember unit number 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1417 (FRQNOPEN) F 79 FREQ - OPEN 06620 E4895040 2 5 ZBM 167 ST R2 FCB,FCREQUEST save away the request code 06621 E557C802 5 7 BASE 168 ST FCB VAR,FCBADDR save the FCB address 06622 DC4059FA 169 CALLNP GETPKTEMP get the parameter temp block 06623 E557C801 5 7 BASE 170 ST EQT VAR,EQTADDR save address of param block 06624 DC005BCF 171 CALL SETMEMTRAP catch failures of user memory 06625 4000683D 172 PARL USRMEMBAD 173 * \ / 174 175 ********************************************************************************** 176 * * 177 * The user supplies the particulars -- copy them from his core * 178 * * 179 ********************************************************************************** 180 181 * \ / 06626 60091F13 0 4 ZBM 182 LD R0 R4,CAR1/FLDADRS get the address of the data 06627 6044003C 1 IMM 183 LD R1 EQELSIZE*3*CPW packing 3 elements 06628 38974801 2 5 BASE 184 LEA R2 EQT,EQVOLUME 06629 5C093211 4 ZBM 185 CMZ R4,CAMSR/MSRFRELOCB was it a request from the user? 0662A FE0C662C 186 JNE EQCOPYLP jump if not 0662B 59840040 IMM 187 CLBMSR MSRFRELOC fetch params from the user 0000662C 188 EQCOPYLP LABEL 0662C FE400000 189 CMOVE 0662D 59C40040 IMM 190 IORMSR MSRFRELOC relocate to the monitor again 191 * \ / 192 193 ********************************************************************************** 194 * * 195 * The parameters are now in our memory. Proceed. * 196 * * 197 ********************************************************************************** 198 199 * \ / 0662E DC405BD4 200 CALLNP CLRMEMTRAP release our responsibility for mem parity errors 0662F DC002ED0 201 CALL UGETMEM get the block for the string 06630 40440006 IMM 202 PARVL FSPLOG 06631 E417C805 0 7 BASE 203 ST R0 VAR,FSPARAM save the address of the block 06632 DC003090 204 CALL ZEROIT zap the entire block 06633 41160800 0 BASE 205 PAR R0,0 indicate its address 06634 40440040 IMM 206 PARVL 2 POWER FSPLOG and its length 06635 FE0E6671 207 JMP OPENCOMMON share code in the OPEN request 208 * --- 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1418 (FRQNOPEN) F 79 FREQ - OPEN 210 211 ********************************************************************************** 212 * * 213 * FRUOPEN. This open request is identical to FRNOPEN except * 214 * it doesn't use any program privilege when getting to the file. * 215 * "Program privileges" are those that come from privileges given * 216 * to the program that are active when the program is invoked. * 217 * In particular, OWNDIR and BACKUP privileges don't get you * 218 * anything with this form of open. Otherwise, this is identical * 219 * to FRNOPEN. * 220 * * 221 ********************************************************************************** 222 00006636 223 FREQUOPEN LABEL 06636 5C346613 2 @ 224 CMZ @LEGALOPEN(R2) check for a legal sub code 06637 FE0259D8 225 JEQ UERRORILR illegal request if not known 06638 FB7259C0 5 226 JNZA FCB FERRORLAE jump if unit already equipped 06639 DC406886 227 CALLNP GETFCB check range of R3 and create FCB 0663A FE0E5988 228 JMP UERROR not in range or insufficient resources 0663B DC002ED0 229 CALL SGETMEM get storage for our temp variables 0663C 40440005 IMM 230 PARVL FOPNLOG log of the block size 0663D E413C000 0 7 REG 231 ST R0 VAR initialize our variables pointer 0663E DC003090 232 CALL ZEROIT zero the block we got 0663F 41160800 0 BASE 233 PAR R0,0 indicate its location 06640 40440020 IMM 234 PARVL 2 POWER FOPNLOG and its length 06641 EDC9C010 7 ZBM 235 STW VAR,UNPRIVOPEN indicate to open without privileges 06642 FE0E664E 236 JMP OPENSHARE share all of the rest of the code 237 * --- 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1419 (FRQNOPEN) F 79 FREQ - OPEN 239 240 ********************************************************************************** 241 * * 242 * FRNOPEN. This request links a specified file/device to a "unit" so * 243 * that IO can be done. The thing opened may be a "saved" file, a Hardware * 244 * device (via the spooler usually), or an "unsaved" file. * 245 * * 246 * This request accepts a string of the form: * 247 * * 248 * [[[volume][.sys][(pw)]:]acct[.proj][(pw)]:]file[.ext][(pw)][] * 249 * * 250 * If no file specification is given and the "device" is not known to this, * 251 * we hand the problem off to the spooler to get us access. If a file * 252 * spec exists and the file was not found, then "device" is used to tell * 253 * what type of file to create (if not specified, SAF is assumed). * 254 * * 255 * The types of "devices" known to this code are: SAF, RAF, CODE, * 256 * PATH, DIR, and NULL. * 257 * * 258 * The form of the user call is: * 259 * * 260 * LD R0 request code * 261 * LD R1 size of file spec in characters * 262 * LD R2 => first char of file spec * 263 * FREQ unit * 264 * JLTZ R0 request error (R0=error code) * 265 * ST R0 units static status * 266 * * 267 * The file spec must completely fill the specified string or an error * 268 * will result. If an error occurs, the unit is not associated. If no * 269 * error, unit is linked to the specified device. * 270 * * 271 ********************************************************************************** 272 00006643 273 FREQNOPEN LABEL 06643 5C346613 2 @ 274 CMZ @LEGALOPEN(R2) check for a legal sub code 06644 FE0259D8 275 JEQ UERRORILR illegal request if not known 06645 FB7259C0 5 276 JNZA FCB FERRORLAE jump if unit already equipped 06646 DC406886 277 CALLNP GETFCB check range of R3 and create FCB 06647 FE0E5988 278 JMP UERROR not in range or insufficient resources 06648 DC002ED0 279 CALL SGETMEM get storage for our temp variables 06649 40440005 IMM 280 PARVL FOPNLOG log of the block size 0664A E413C000 0 7 REG 281 ST R0 VAR initialize our variables pointer 0664B DC003090 282 CALL ZEROIT zero the block we got 0664C 41160800 0 BASE 283 PAR R0,0 indicate its location 0664D 40440020 IMM 284 PARVL 2 POWER FOPNLOG and its length 285 * \ / 286 0000664E 287 OPENSHARE LABEL 0664E E4D7C804 3 7 BASE 288 ST R3 VAR,UNITNO remember unit number on stack 0664F E4895040 2 5 ZBM 289 ST R2 FCB,FCREQUEST save the request being made 06650 E557C802 5 7 BASE 290 ST FCB VAR,FCBADDR save address of FCB 291 * \ / 292 06651 DC4059FA 293 CALLNP GETPKTEMP get the file spec temp block 06652 E557C801 5 7 BASE 294 ST EQT VAR,EQTADDR remember where it is 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1420 (FRQNOPEN) F 79 FREQ - OPEN 06653 DC005BCF 295 CALL SETMEMTRAP set for un-usable user memory 06654 4000683D 296 PARL USRMEMBAD 06655 DC002ED0 297 CALL UGETMEM get file spec parameter block 06656 40440006 IMM 298 PARVL FSPLOG 06657 E417C805 0 7 BASE 299 ST R0 VAR,FSPARAM save addr of same 300 * \ / 301 302 ********************************************************************************** 303 * * 304 * Fetch the file specifier from the user * 305 * * 306 ********************************************************************************** 307 308 * \ / 06658 62570803 124 BASE 309 LD2 R1 R4,CAR1 R1 = byte count, R2 = addr 06659 684400EF 1 IMM 310 UCPR R1 FSPMAXFS within range? 0665A FE066874 311 JGE OPNERRPOB jump if string too long 0665B FA426874 1 312 JEQZ R1 OPNERRPOB zero is also useless 0665C 38168000 0 2 CACH 313 LEA R0 CACH R2,0 clean up byte pointer 0665D 60D7C805 3 7 BASE 314 LD R3 VAR,FSPARAM R3 => file string block 0665E 3896C010 2 3 CACH 315 LEA R2 R3,FSPFILESP R2 => place to put it 0665F E496C800 2 3 BASE 316 ST R2 R3,FSSTRINGB 06660 5C093211 4 ZBM 317 CMZ R4,CAMSR/MSRFRELOCB user or monitor? 06661 FE0C6663 318 JNE MONITORLIZ jump if monitor 06662 59840040 IMM 319 CLBMSR MSRFRELOC fetch from user space 00006663 320 MONITORLIZ LABEL 06663 FE400000 321 CMOVE get the file spec 06664 59C40040 IMM 322 IORMSR MSRFRELOC back to monitor 06665 EC168000 2 CACH 323 STZ CACH R2,0 place terminator at end 06666 E496C801 2 3 BASE 324 ST R2 R3,FSSTRINGE remember end of string 06667 DC405BD4 325 CALLNP CLRMEMTRAP indicate no longer handling errors 326 * \ / 327 328 ********************************************************************************** 329 * * 330 * Pack up the file specifier * 331 * * 332 ********************************************************************************** 333 334 * \ / 06668 60040102 0 IMM 335 LD R0 URPACKFS 06669 6056C800 1 3 BASE 336 LD R1 R3,FSSTRINGB R1 => beginning of string 0666A 6097C801 2 7 BASE 337 LD R2 VAR,EQTADDR R2 => place for file spec 0666B 38968801 2 2 BASE 338 LEA R2 R2,EQVOLUME 0666C 09040000 IMM 339 UREQ 0 pack the file specifier 0666D FA086876 0 340 JLTZ R0 OPNERR 0666E E456C800 1 3 BASE 341 ST R1 R3,FSSTRINGB save advanced string pointer 0666F DC4068C6 342 CALLNP SCANDEVSP scan the device spec 06670 FE0E6868 343 JMP OPNERRERR jump if spec doesn't fill string 344 * \ / 345 346 ********************************************************************************** 347 * * 348 * The FCB currently indicates the access to be NA and * 349 * the privilege to be none (no privilege to do open). Most * 350 * of the code that follows is the attempt to get privilege * 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1421 (FRQNOPEN) F 79 FREQ - OPEN 351 * top open the file as well as determine the access. First * 352 * of all however we need to default the fields in the file * 353 * that the user failed to set or examine for equivalencing. * 354 * * 355 ********************************************************************************** 356 357 * \ / 00006671 358 OPENCOMMON LABEL EQT => packed file spec 06671 DC40689B 359 CALLNP DEFAULTFS examine and default file spec 06672 FE0E67A0 360 JMP DOSCRDEV nothing or just extension spec'd 06673 FE0E6733 361 JMP DOEQUIV try for equivalencing 06674 FE0E672D 362 JMP DEFLTACCT default the unspecified account 06675 DC405574 363 CALLNP FINDULB find the account 06676 FB306781 4 364 JZA ULB MAYBEDIR no acct, check for 365 * \ / 366 00006677 367 THISULB LABEL 06677 6157C802 5 7 BASE 368 LD FCB VAR,FCBADDR retrieve pointer to FCB 06678 E5095114 4 5 ZBM 369 ST ULB FCB,FCLIMITPTR this is a ULB for this file 06679 E517C803 4 7 BASE 370 ST ULB VAR,ULBADDR remember where ULB is 0667A 60170801 0 4 BASE 371 LD R0 ULB,ULBLOCK pick up directory address 0667B E4174801 0 5 BASE 372 ST R0 FCB,FCBLOCK initialize volume number in FCB 0667C 60000412 0 373 LD R0 CPPSA 0667D 65081F13 4 0 ZBM 374 CPR ULB R0,PSUSERLIMP is this my own directory? 0667E FE026683 375 JEQ ITSMYFILE jump if the dir I'm logged onto 0667F 65081F14 4 0 ZBM 376 CPR ULB R0,PSDFLTDIR this is default (alias) account? 06680 FE0C6685 377 JNE NOTMYFILE jump if no special ownership 06681 60080044 0 0 ZBM 378 LD R0 R0,PSDDIRPRIV default to priv access 06682 FE0E6684 379 JMP SETPRVFILE 380 * --- 381 00006683 382 ITSMYFILE LABEL 06683 60040002 0 IMM 383 LD R0 FSPRIVMOD default to MOD for logon account 00006684 384 SETPRVFILE LABEL 06684 E4094E45 0 5 ZBM 385 ST R0 FCB,FCPRIV set the priv in the FCB 00006685 386 NOTMYFILE LABEL 387 * \ / 388 389 ********************************************************************************** 390 * * 391 * Convert passwords into their funny formats in * 392 * preparation for searching the shared lists. * 393 * * 394 ********************************************************************************** 395 396 * \ / 06685 60D7C801 3 7 BASE 397 LD R3 VAR,EQTADDR get temp block pointer 06686 6216C80B 013 BASE 398 LD2 R0 R3,EQFILENM copy the name of the file into the FCB 06687 E617480B 015 BASE 399 ST2 R0 FCB,FCNAME 06688 6016C80D 0 3 BASE 400 LD R0 R3,EQFILEEXT copy the extension also 06689 E417480D 0 5 BASE 401 ST R0 FCB,FCNAMEEXT 0668A DC005872 402 CALL PWMANGLE mangle file password 0668B 43170802 4 BASE 403 PAR2 ULB,ULACCNM 0668C 4216C80E 3 BASE 404 PAR2L R3,EQFILEPW 0668D E617C808 017 BASE 405 ST2 R0 VAR,FILEPWD hide file password in variable area 0668E 60D7C801 3 7 BASE 406 LD R3 VAR,EQTADDR get temp block pointer 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1422 (FRQNOPEN) F 79 FREQ - OPEN 0668F DC005872 407 CALL PWMANGLE mangle account password 06690 43170802 4 BASE 408 PAR2 ULB,ULACCNM 06691 4216C809 3 BASE 409 PAR2L R3,EQACCTPW 06692 E617480E 015 BASE 410 ST2 R0 FCB,FCPWORD account pw is main one for now 411 * \ / 412 413 ********************************************************************************** 414 * * 415 * Goto the directory and search the shared lists and find * 416 * the entry we're looking for. LIBCHKALL checks for implied * 417 * privileges that we may have inherited (ie. library account). * 418 * Even if we did inherit some privileges we still search the * 419 * share list to the END since this may afford us still greater * 420 * privileges. * 421 * * 422 ********************************************************************************** 423 424 * \ / 06693 60D3C000 3 7 REG 425 LD R3 VAR R3 => variables block 06694 DC005F39 426 CALL LIBCHKALL check for implied privileges 06695 4048C010 3 ZBM 427 PARVL R3,UNPRIVOPEN pass flag saying how much privilege to use 428 * \ / 06696 EDC9C210 7 ZBM 429 STW VAR,DIRLOCKD remember it is locked 06697 DC0082BF 430 CALL SRCHDIR try for the directory entry 06698 40006878 431 PARL OPNERRDSEN where to go if disk block is bad 06699 EC49C610 7 ZBM 432 STLEQ VAR,FILEEXISTS remember whether file exists or not 0669A E697C806 237 BASE 433 ST2 R2 VAR,INDXPTR save index into UDIR, and directory 0669B FE0C66B9 434 JNE NOUDIRENTRY jump if no file entry at all 435 * \ / 436 437 ********************************************************************************** 438 * * 439 * Check whether this is the first use of this file since * 440 * the current system boot. If so, update the indicator and * 441 * clear the use counts. Set the WWC flag as appropriate. If * 442 * the file was waiting to be unsaved when the system crashed, * 443 * we do it now, and retry the open. An important thing to * 444 * note here is the USVREM expects the directory to be locked * 445 * (which it is) and that it unlocks the directory upon exit. * 446 * * 447 ********************************************************************************** 448 449 * \ / 0669C 60101EFD 0 @ 450 LD R0 FILESUN current "system up number" 0669D 6416C000 0 3 CACH 451 CPR R0 R3,FDSUN was system crashed or booted since last use? 0669E FE0266B9 452 JEQ NOUDIRENTRY jump if used this booting 453 * \ / 454 455 * now see whether the file should be dumped 0669F 5C08DE10 3 ZBM 456 CMZ R3,FDFBD file being destroyed? 066A0 FE0266B0 457 JEQ RESETCNTS if not just reset the use counts 458 * \ / 459 460 * dir locked into window 1, window 2 UDIR1 if large .RAF 066A1 61095114 4 5 ZBM 461 LD ULB FCB,FCLIMITPTR ULB where the file resides 066A2 6217C806 017 BASE 462 LD2 R0 VAR,INDXPTR index and directory pointer 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1423 (FRQNOPEN) F 79 FREQ - OPEN 066A3 E617480E 015 BASE 463 ST2 R0 FCB,FCPWORD save for the USVREM routine 066A4 6008D186 0 3 ZBM 464 LD R0 R3,FDLEN pick up the file length 066A5 E4094182 0 5 ZBM 465 ST R0 FCB,FCTFL set in the FCB 066A6 DC40812E 466 CALLNP USVREM remove entry and update disk block count 066A7 00006878 467 ADR OPNERRDSEN jump if disk structure error 066A8 EC09C210 7 ZBM 468 STZ VAR,DIRLOCKD indicate directory unlocked 066A9 DC403150 469 CALLNP GRUBWNDO1 write the directory page 066AA DC403153 470 CALLNP GRUBWNDO2 UDIR1 if large directory 066AB DC405526 471 CALLNP FREEULB matches call to FINDULB 066AC DC406351 472 CALLNP DSTRYDEV release the file 066AD FEC00000 473 NOP 0 ignore error return 066AE 6157C801 5 7 BASE 474 LD EQT VAR,EQTADDR restore EQT pointer 066AF FE0E6671 475 JMP OPENCOMMON try again to open the file 476 * --- 477 478 * first access to this file since boot 000066B0 479 RESETCNTS LABEL 066B0 E416C000 0 3 CACH 480 ST R0 R3,FDSUN file used this session 066B1 6008E01C 0 3 ZBM 481 LD R0 R3,FDWACS accumulate previous write accesses 066B2 1808E2FC 0 3 ZBM 482 ADD R0 R3,FDMWACS and multiple write accesses 066B3 FA0266B5 0 483 JEQZ R0 RESETACS was file writing but not closed? 066B4 EDC8E610 3 ZBM 484 STW R3,FDFWWSC if so, set flag 485 * \ / 486 487 * zero out the busy counters 000066B5 488 RESETACS LABEL 066B5 EC08C10C 3 ZBM 489 STZ R3,FDRACS read count 066B6 EC08E01C 3 ZBM 490 STZ R3,FDWACS write count 066B7 EC08E2FC 3 ZBM 491 STZ R3,FDMWACS multiple write 066B8 EC08C101 3 ZBM 492 STZ R3,FDCUSE current use count 493 * \ / 494 495 ********************************************************************************** 496 * * 497 * Make temp copy of share list info to ensure we take any * 498 * disk error right now while recovery info is in place. * 499 * * 500 ********************************************************************************** 501 502 * \ / 000066B9 503 NOUDIRENTRY LABEL 066B9 60440010 1 IMM 504 LD R1 UDSHLSIZE*CPW load length of share list 066BA 3897C80E 2 7 BASE 505 LEA R2 VAR,SHARELIST load adr of temp storage 066BB 5C090410 4 ZBM 506 CMZ ULB,ULRAFDIR do we have a large directory? 066BC FE0C66C0 507 JNE HAVEBIGDIR jump if so 066BD 3800083C 0 508 LEA R0 WNDO1(UDSHLLIST) get pointer to share list in small .DIR 066BE FE400000 509 CMOVE move it to temporary storage 066BF FE0E66C3 510 JMP HVSWND1 continue 511 * --- 512 000066C0 513 HAVEBIGDIR LABEL 066C0 38000C3C 0 514 LEA R0 WNDO2(UDSHLLIST) get ptr to share list in large .DIR 066C1 FE400000 515 CMOVE move it to temporary storage 066C2 DC40315F 516 CALLNP DMOTEWNDO2 eliminate this window 517 * \ / 518 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1424 (FRQNOPEN) F 79 FREQ - OPEN 519 * check the account share list 000066C3 520 HVSWND1 LABEL 066C3 60D3C000 3 7 REG 521 LD R3 VAR R3 => variables block 066C4 DC005F90 522 CALL SHLCHKALL search the directory shared list 066C5 4116C80E 3 BASE 523 PAR R3,SHARELIST where the list is 066C6 4148C010 3 ZBM 524 PARV R3,UNPRIVOPEN pass flag saying how much priv to use 066C7 40440011 IMM 525 PARVL FBITASLB type of shared list block 066C8 FE0E687A 526 JMP OPNERRDSE jump if block is bad 527 066C9 5E17480B 5 BASE 528 CMZ2 FCB,FCNAME could it be a "hardware" device? 066CA FE0267C5 529 JEQ TRYSCRDEV try for it 066CB 5C09C610 7 ZBM 530 CMZ VAR,FILEEXISTS check if file exists 066CC FE026741 531 JEQ TRYCREATE if not, skip file share list 532 * \ / 533 534 ********************************************************************************** 535 * * 536 * The account share list has been examined and we know * 537 * that the file does exist and it is not some kind of * 538 * hardware specification. The next thing is to check the * 539 * file share list since that may still afford us greater * 540 * privilege. * 541 * * 542 ********************************************************************************** 543 544 * \ / 066CD 6217C808 017 BASE 545 LD2 R0 VAR,FILEPWD get file password 066CE E617480E 015 BASE 546 ST2 R0 FCB,FCPWORD place it for shl check 547 066CF 60D7C807 3 7 BASE 548 LD R3 VAR,DIRENTPTR R3 => directory address 066D0 3816C814 0 3 BASE 549 LEA R0 R3,FDSHL source for file share list 066D1 60440010 1 IMM 550 LD R1 UDSHLSIZE*CPW length of share list 066D2 3897C80E 2 7 BASE 551 LEA R2 VAR,SHARELIST destination 066D3 FE400000 552 CMOVE move it to temporary storage 553 * \ / 066D4 60D3C000 3 7 REG 554 LD R3 VAR R3 => variables block 066D5 DC005F90 555 CALL SHLCHKALL check the file shared list 066D6 4116C80E 3 BASE 556 PAR R3,SHARELIST where the list begins 066D7 4148C010 3 ZBM 557 PARV R3,UNPRIVOPEN pass flag saying how much priv to use 066D8 40440012 IMM 558 PARVL FBITFSLB pass FBI type for disk block 066D9 FE0E687A 559 JMP OPNERRDSE go here if disk block is bad 560 * \ / 066DA 60094E45 0 5 ZBM 561 LD R0 FCB,FCPRIV get privs as we know them 066DB 6404000F 0 IMM 562 CPR R0 FSPRIVNOT do we have any right to be here? 066DC FE026880 563 JEQ OPNERRFNF jump if no access privilege 564 * \ / 565 566 ********************************************************************************** 567 * * 568 * Directory entry has been found and user may look at the file. * 569 * * 570 ********************************************************************************** 571 572 * convey the file root info to the FCB 066DD 60D7C807 3 7 BASE 573 LD R3 VAR,DIRENTPTR get pointer to the directory back 066DE 6008D185 0 3 ZBM 574 LD R0 R3,FDDA root block for structure 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1425 (FRQNOPEN) F 79 FREQ - OPEN 066DF E4095181 0 5 ZBM 575 ST R0 FCB,FCMSBLK set root block into FCB 576 577 * handle RAF and CODE files, convert old RAFs to newer style 066E0 6048EA60 1 3 ZBM 578 LD R1 R3,FDET get the file type 066E1 E4496665 1 5 ZBM 579 ST R1 FCB,FCHTYPE save in the FCB 066E2 64440002 1 IMM 580 CPR R1 HTYPERAF are we dealing with a RAF? 066E3 FE0266E6 581 JEQ SETRAFTYPE if so then we need to set the RAF type 066E4 64440003 1 IMM 582 CPR R1 HTYPECODE how 'bout a code file? 066E5 FE0C66F6 583 JNE RAFSMALL set load point if not RAF file 584 * \ / 585 000066E6 586 SETRAFTYPE LABEL 066E6 6048FC20 1 3 ZBM 587 LD R1 R3,FDRAFTYPE pick up the type of RAF 066E7 E4495826 1 5 ZBM 588 ST R1 FCB,FCRAFTYPE save the type of the RAF 066E8 5CA266E9 1 589 LDPC RAFJTAB(R1) do the right thing 590 * --- 591 000066E9 592 RAFJTAB LABEL 066E9 000066ED 593 VFD ADR RAFEMPTY empty RAF or needs to be converted 066EA 000066F7 594 VFD ADR RAFDONE tiny RAF 066EB 000066F6 595 VFD ADR RAFSMALL small RAF 066EC 000066F4 596 VFD ADR RAFLARGE large RAF 597 000066ED 598 RAFEMPTY LABEL 066ED FA0266F7 0 599 JEQZ R0 RAFDONE done if actually empty 066EE 60440002 1 IMM 600 LD R1 RAFTSMALL assume small RAF 066EF D188E810 3 ZBM 601 CLRT R3,FDLRAF clear and check for large RAF 066F0 FE0266F2 602 JEQ ITSSMALL if not large then has to be small 066F1 60440003 1 IMM 603 LD R1 RAFTLARGE must be large 604 * \ / 605 000066F2 606 ITSSMALL LABEL 066F2 E448FC20 1 3 ZBM 607 ST R1 R3,FDRAFTYPE set the FDE 066F3 FE0E66E6 608 JMP SETRAFTYPE check if more fields need setting 609 * --- 610 000066F4 611 RAFLARGE LABEL 066F4 E4096183 0 5 ZBM 612 ST R0 FCB,FCMABLK set major access block 066F5 FE0E66F7 613 JMP RAFDONE move on 614 * --- 615 000066F6 616 RAFSMALL LABEL 066F6 E4097182 0 5 ZBM 617 ST R0 FCB,FCLPBLK set load point block 618 * \ / 619 000066F7 620 RAFDONE LABEL nothing more to do 621 * \ / 622 623 ********************************************************************************** 624 * * 625 * Move the remaining directory information into the FCB, * 626 * then check on the accessibility of the file. Most notably * 627 * if the access is legal for this device and if the busy counters * 628 * will allow the requested access. * 629 * * 630 ********************************************************************************** 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1426 (FRQNOPEN) F 79 FREQ - OPEN 631 632 * \ / 066F7 DC40315F 633 CALLNP DMOTEWNDO2 release the UDIR1 block, if mapped 066F8 60D7C807 3 7 BASE 634 LD R3 VAR,DIRENTPTR R3 => directory entry 066F9 5C08E410 3 ZBM 635 CMZ R3,FDPURG has the file been purged 066FA FE0C687C 636 JNE OPNERRPRG jump if file really not here 066FB 6008E610 0 3 ZBM 637 LD R0 R3,FDFWWSC 066FC E4096215 0 5 ZBM 638 ST R0 FCB,FCFEWSC whether crashed writing 066FD 6216C80A 013 BASE 639 LD2 R0 R3,FDSERNO 066FE E6174809 015 BASE 640 ST2 R0 FCB,FCSERIAL serial number of file 066FF 6008F810 0 3 ZBM 641 LD R0 R3,FDTRANS 06700 E4097615 0 5 ZBM 642 ST R0 FCB,FCTRANS indicates user program crashed 06701 EDC96415 5 ZBM 643 STW FCB,FCSAVED it is saved in the directory 06702 DC403276 644 CALLNP ULKWNDO1 unlock the window 645 * \ / 646 647 ********************************************************************************** 648 * * 649 * Check to see if our access can be allowed. FNDOPNACS * 650 * evaluate the requested access and determine that access to * 651 * get at the device. Generally the requested access is the * 652 * access one gets, except for AO and XO which tend to * 653 * override. Once this is all said and done the busy counters * 654 * are examined to see if this access can be granted. * 655 * * 656 ********************************************************************************** 657 658 * \ / 06703 DC005FB0 659 CALL FNDOPNACS see what access we can get 06704 40495230 5 ZBM 660 PARVL FCB,FCREQUEST/REQACCESS access asking for 06705 FE0E6868 661 JMP OPNERRERR jump if it cannot be (R0 = error code) 06706 E4095230 0 5 ZBM 662 ST R0 FCB,FCREQUEST/REQACCESS 06707 DC006013 663 CALL CHKBZYACS will busy counters allow this access 06708 40520000 0 REG 664 PARVL R0 what we're trying for 06709 FE0E6846 665 JMP OPNERRBZY jump if file is busy 666 * \ / 667 668 ********************************************************************************** 669 * * 670 * Access is possible, link to and initialize device. Note * 671 * that INITDEVACS may return an error if the requested access * 672 * is illegal for the device (e.g. /RW on write-protected tape). * 673 * * 674 * N.B. We must have the directory (ULB) locked so we can examine * 675 * and change the FDE atomically. Because we need to access the * 676 * FDE both before and after the INITDEVACS, and INITDEVACS can * 677 * suspend indefinitely for IO operations, the following section * 678 * can hang up the directory. New attempts to get to the directory * 679 * will cause the user to enter DIRWAIT, not satisfiable until we * 680 * leave MSWAIT or IOWAIT. Especially susceptible is Hardware.Sys, * 681 * since this is where all the devices live (tapes and TERMs). * 682 * * 683 ********************************************************************************** 684 685 * \ / 0670A 60D7C807 3 7 BASE 686 LD R3 VAR,DIRENTPTR R3 => directory entry 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1427 (FRQNOPEN) F 79 FREQ - OPEN 0670B DC006087 687 CALL INITDEVACS try to initialize the access 0670C 40495230 5 ZBM 688 PARVL FCB,FCREQUEST/REQACCESS pass the requested access 0670D FE0E6868 689 JMP OPNERRERR it won't do this (R0 = error code) 690 * \ / 691 692 ********************************************************************************** 693 * * 694 * Here we have the opportunity to create an accounting * 695 * entry that describes who opened the file and when. This * 696 * is done by setting a bit in the directory through Control * 697 * Mode and letting us do the dirty work. * 698 * * 699 ********************************************************************************** 700 701 702 * \ / 0670E 60D7C807 3 7 BASE 703 LD R3 VAR,DIRENTPTR R3 => dir entry 0670F 5C08FA10 3 ZBM 704 CMZ R3,FDFLOG should we log this open? 06710 FE026715 705 JEQ DONTLOG 06711 61095114 4 5 ZBM 706 LD ULB FCB,FCLIMITPTR get the ULB for file 06712 DC005C3D 707 CALL ACCTFILLOG log the file open 06713 4044000E IMM 708 PARVL APTFILOP indicate type is file open 06714 60D7C807 3 7 BASE 709 LD R3 VAR,DIRENTPTR R3 => dir entry 710 * \ / 711 712 ********************************************************************************** 713 * * 714 * We have the file. Set the access, which includes updating * 715 * the access, read and write dates plus possibly modifying the * 716 * file length depending on the new access (see SETACCESS). Last * 717 * we link in the FCB and release our temporary storage, not much * 718 * chance of us screwing that up. * 719 * * 720 ********************************************************************************** 721 722 * \ / 00006715 723 DONTLOG LABEL 06715 DC006184 724 CALL SETACCESS set our access into the file 06716 40495230 5 ZBM 725 PARVL FCB,FCREQUEST/REQACCESS pass the requested access 06717 D008C101 3 ZBM 726 INC R3,FDCUSE one more user 727 * \ / 728 00006718 729 INSERTFCB LABEL 06718 EDC94080 5 ZBM 730 STW FCB,FCBUSYCNT do this before adding to FCB list 06719 EDC9C410 7 ZBM 731 STW VAR,SAVFCBULB indicate to save the FCB and ULB 0671A DC005DA8 732 CALL LINKFCBIN now add the FCB 0671B 40534000 5 REG 733 PARVL FCB pass its address 734 * \ / 735 0000671C 736 CRTLNKUCE LABEL create, link a UCE for the linked FCB 0671C 6017C804 0 7 BASE 737 LD R0 VAR,UNITNO get the unit number back 0671D DC003635 738 CALL CREATEUCE routine to get a new element 0671E 41520000 0 REG 739 PARV R0 pass the unit number 0671F 40534000 5 REG 740 PARVL FCB and the file control block 06720 DC005DB2 741 CALL LINKUCEIN set unit into a list 06721 41520000 0 REG 742 PARV R0 pass new UCE 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1428 (FRQNOPEN) F 79 FREQ - OPEN 06722 41400414 743 PARV CPCUPC goes on current underprocess, if local 06723 40400412 744 PARVL CPPSA current process, if global 745 * \ / 746 00006724 747 RTNSTATST LABEL 06724 60D3C000 3 7 REG 748 LD R3 VAR copy variable pointer 06725 DC00690D 749 CALL FREETEMPS release temp storage 06726 4048C410 3 ZBM 750 PARVL R3,SAVFCBULB save or unsave the FCB/ULB flag 06727 DC002F5D 751 CALL UFREEMEM return memory back to the system 06728 41440005 IMM 752 PARV FOPNLOG log of the block size 06729 4052C000 3 REG 753 PARVL R3 and the address 0672A 60400412 1 754 LD R1 CPPSA 0672B 60094F25 0 5 ZBM 755 LD R0 FCB,FCSTATSTAT return static status 0672C FE0E5999 756 JMP STOREINR0 757 * --- 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1429 (FRQNOPEN) F 79 FREQ - OPEN 759 760 ********************************************************************************** 761 * * 762 * DEFLTACCT. Default the account -- it was not specified * 763 * specified in the passed file specification. We use the default * 764 * directory and also default the access priv to the account. * 765 * * 766 ********************************************************************************** 767 0000672D 768 DEFLTACCT LABEL 0672D 60000412 0 769 LD R0 CPPSA 0672E 61081F14 4 0 ZBM 770 LD ULB R0,PSDFLTDIR ULB => dir of default (alias) account 0672F 65001EAE 4 771 CPR ULB SYSTEMULB non-directory? 06730 FE026880 772 JEQ OPNERRFNF jump if using "system" directory 06731 DC405569 773 CALLNP USEULB make our usage for it 06732 FE0E6677 774 JMP THISULB share code to give priv 775 * --- 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1430 (FRQNOPEN) F 79 FREQ - OPEN 777 778 ********************************************************************************** 779 * * 780 * Equivalencing of units is requested. If the requested * 781 * unit exists we free the FCB that was fetched and simply add * 782 * a UCE pointer to the existing FCB. If the request unit does * 783 * not exists we return a gracious, 'unit not equipped' error. * 784 * * 785 ********************************************************************************** 786 00006733 787 DOEQUIV LABEL 06733 60D7480C 3 5 BASE 788 LD R3 EQT,EQFILENM(1) get requested unit number 789 * \ / 790 00006734 791 DOEQUIV2 LABEL 06734 DC405B39 792 CALLNP LUNSEARCH find the requested unit 06735 FB70687E 5 793 JZA FCB OPNERRLNE jump if no such unit 06736 DC405D9F 794 CALLNP CNTFCBUSER say one more user of FCB 06737 FE0E6868 795 JMP OPNERRERR R0 => error code 06738 FE0E671C 796 JMP CRTLNKUCE make a UCE and link it 797 * --- 798 799 ********************************************************************************** 800 * * 801 * Here we are attempting to open a .TERM. How we go * 802 * about this is to equivalence it to one of the absolute * 803 * I/O units depending on our requested access. If write * 804 * access then equivalence to 202 else equivalence to 201. * 805 * I believe this scheme works the same for non-interactive * 806 * sessions as well. * 807 * * 808 ********************************************************************************** 809 00006739 810 EQUIVTERM LABEL 06739 60C40000 3 IMM 811 LD R3 0 say no directory entry 0673A DC005FB0 812 CALL FNDOPNACS get legal access 0673B 40495230 5 ZBM 813 PARVL FCB,FCREQUEST/REQACCESS pass what the user wants 0673C FE0E6868 814 JMP OPNERRERR jump if he tried to outdo himself 0673D 60C400CA 3 IMM 815 LD R3 LUNAOUT assume he was getting a writer 0673E F23E6734 0 816 JBF R0/FSACSNWB DOEQUIV2 jump if we guessed right 0673F 60C400C9 3 IMM 817 LD R3 LUNAIN give a reader otherwise 06740 FE0E6734 818 JMP DOEQUIV2 jump to make equivalence 819 * --- 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1431 (FRQNOPEN) F 79 FREQ - OPEN 821 822 ********************************************************************************** 823 * * 824 * We have a ULB for an account but the specified file * 825 * does not exists. We see if the fellow wishes the file * 826 * created if it does not exist. * 827 * * 828 ********************************************************************************** 829 00006741 830 TRYCREATE LABEL 06741 DC40315F 831 CALLNP DMOTEWNDO2 release UDIR1 block, if mapped 06742 DC403276 832 CALLNP ULKWNDO1 unlock window 06743 DC405685 833 CALLNP FREEDIR release directory 06744 EC09C210 7 ZBM 834 STZ VAR,DIRLOCKD indicate now unlocked 06745 5C095010 5 ZBM 835 CMZ FCB,FCREQUEST/REQCREAT are we supposed to create? 06746 FE026880 836 JEQ OPNERRFNF if not, we say not found 06747 6117C805 4 7 BASE 837 LD R4 VAR,FSPARAM R4 => parameter block 06748 62170802 014 BASE 838 LD2 R0 R4,FSDEVICE get the device type code 06749 FA1C674C 01 839 JNEZ2 R0 DEVSPECD jump if a device specified 0674A 6200676D 01 840 LD2 R0 RADSAF assume a SAF if not specified 0674B E6170802 014 BASE 841 ST2 R0 R4,FSDEVICE place it in param block 842 * \ / 843 0000674C 844 DEVSPECD LABEL 0674C DC4063F8 845 CALLNP KNOWDEVICE do I know this type of device 0674D FA026882 0 846 JEQZ R0 OPNERRBFN jump if unknown type 0674E E4096665 0 5 ZBM 847 ST R0 FCB,FCHTYPE place type code in FCB 0674F 64040007 0 IMM 848 CPR R0 HTYPETERM making a scratch TERM? 06750 FE026739 849 JEQ EQUIVTERM if so, must do it another way 06751 6404000E 0 IMM 850 CPR R0 HTYPEVOL are we making a .VOL 06752 FE0C6757 851 JNE NOTVOL jump if no special processing required 06753 60D7C801 3 7 BASE 852 LD R3 VAR,EQTADDR R3 => packed equip block 06754 6256C801 123 BASE 853 LD2 R1 R3,EQVOLUME get the volume name 06755 E657480B 125 BASE 854 ST2 R1 FCB,FCVNAME save for the volume search routine 06756 EC17480D 5 BASE 855 STZ FCB,FCNAMEEXT clear this field 856 * \ / 857 00006757 858 NOTVOL LABEL 06757 DC0063D5 859 CALL MAKEADEV make one of this type of device 06758 40495230 5 ZBM 860 PARVL FCB,FCREQUEST/REQACCESS 06759 FE0E6868 861 JMP OPNERRERR jump if the making didn't work 862 * \ / 0675A EDC94080 5 ZBM 863 STW FCB,FCBUSYCNT say one user of the FCB 0675B DC005DA8 864 CALL LINKFCBIN add the FCB to the PSA 0675C 40534000 5 REG 865 PARVL FCB pass its address 0675D 6017C804 0 7 BASE 866 LD R0 VAR,UNITNO get the unit number back 0675E DC003635 867 CALL CREATEUCE routine to get a new element 0675F 41520000 0 REG 868 PARV R0 pass the unit number 06760 40534000 5 REG 869 PARVL FCB and the file control block 06761 DC005DB2 870 CALL LINKUCEIN set unit into a list 06762 41520000 0 REG 871 PARV R0 pass new UCE 06763 41400414 872 PARV CPCUPC goes on current underprocess, if local 06764 40400412 873 PARVL CPPSA current process, if global 874 * \ / R3 => packed equip block 06765 60040070 0 IMM 875 LD R0 FRSAVE save the device under the name 06766 6057480D 1 5 BASE 876 LD R1 FCB,FCNAMEEXT filename extension 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1432 (FRQNOPEN) F 79 FREQ - OPEN 06767 6297480B 235 BASE 877 LD2 R2 FCB,FCNAME filename 06768 0897C804 7 BASE 878 FREQ VAR,UNITNO try to save it 06769 FA08676F 0 879 JLTZ R0 NOCREATED jump if it wouldn't save 0676A EDC95615 5 ZBM 880 STW FCB,FCCRT file was created by me 0676B EDC9C410 7 ZBM 881 STW VAR,SAVFCBULB save the FCB and ULB, thank you 0676C FE0E6724 882 JMP RTNSTATST return to his userness 883 * --- 884 0676D B2BDD000 885 RADSAF PAK12 SAF 886 887 * The device would not save. Back out and return error. 888 0000676F 889 NOCREATED LABEL 0676F E417C808 0 7 BASE 890 ST R0 VAR,ERRTEMP R0 => error code 06770 6017C804 0 7 BASE 891 LD R0 VAR,UNITNO get the unit number 06771 DC005DD0 892 CALL UNLINKUCE remove UCE from process 06772 40520000 0 REG 893 PARVL R0 06773 61481F11 5 0 ZBM 894 LD FCB R0,UCEFCB make SURE we get right FCB 06774 60520000 1 0 REG 895 LD R1 R0 for call 06775 DC002F8F 896 CALL UCFREEMEM and free the space 06776 41440001 IMM 897 PARV UCELOG 06777 40524000 1 REG 898 PARVL R1 pass address of unlinked UCE 06778 DC405DC3 899 CALLNP UNLINKFCB remove the FCB 06779 60C40000 3 IMM 900 LD R3 0 (no directory entry) 0677A DC006087 901 CALL INITDEVACS back out of initialized access 0677B 40440007 IMM 902 PARVL FSACSNDA goto NDA which unlinks 0677C FEC00000 903 NOP 0 ignore error return 904 905 * Device would not initialize. Back out and return error. 906 0677D DC406351 907 CALLNP DSTRYDEV release fetched stuff 0677E FEC00000 908 NOP 0 0677F 6009EAB8 0 7 ZBM 909 LD R0 VAR,ERRTEMP/FDSTATERR 06780 FE0E6868 910 JMP OPNERRERR return the error 911 * --- 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1433 (FRQNOPEN) F 79 FREQ - OPEN 913 914 ********************************************************************************** 915 * * 916 * MAYBEDIR. The specified account does not exist. We see * 917 * if the requester is asking for a DIR on that account and if * 918 * so we give him a for the non-existent account. This is * 919 * so one cannot deduce whether an account exists by looking for * 920 * its directory. * 921 * * 922 ********************************************************************************** 923 00006781 924 MAYBEDIR LABEL 06781 6017C805 0 7 BASE 925 LD R0 VAR,FSPARAM R0 => file string block 06782 62160802 010 BASE 926 LD2 R0 R0,FSDEVICE was device DIR spec'd in device spec 06783 6600679E 01 927 CPR2 R0 RADDIR see if DIR 06784 FE02678A 928 JEQ ITSDIR jump if so 06785 5E17480B 5 BASE 929 CMZ2 EQT,EQFILENM could special ".DIR" syntax be true? 06786 FE0C6880 930 JNE OPNERRFNF 06787 6017480D 0 5 BASE 931 LD R0 EQT,EQFILEEXT get the extension 06788 6600679E 01 932 CPR2 R0 RADDIR is it for a directory? 06789 FE0C6880 933 JNE OPNERRFNF if not file is not found 934 * \ / 935 0000678A 936 ITSDIR LABEL 0678A 60D7C802 3 7 BASE 937 LD R3 VAR,FCBADDR R3 => FCB 0678B 62174806 015 BASE 938 LD2 R0 EQT,EQACCT 0678C E616C807 013 BASE 939 ST2 R0 R3,FCANAME move acct name into FCB 0678D 60174808 0 5 BASE 940 LD R0 EQT,EQACCTPROJ 0678E E416C80D 0 3 BASE 941 ST R0 R3,FCAPROJ 0678F EC08D114 3 ZBM 942 STZ R3,FCLIMITPTR no acct ULB 06790 60040005 0 IMM 943 LD R0 HTYPEDIR 06791 E408E665 0 3 ZBM 944 ST R0 R3,FCHTYPE hardware type is a DIR 06792 6152C000 5 3 REG 945 LD FCB R3 06793 DC005FB0 946 CALL FNDOPNACS get access code for this device 06794 40495230 5 ZBM 947 PARVL FCB,FCREQUEST/REQACCESS 06795 FE0E6868 948 JMP OPNERRERR jump if requested access is not legal 06796 E4095230 0 5 ZBM 949 ST R0 FCB,FCREQUEST/REQACCESS 06797 60C40000 3 IMM 950 LD R3 0 (no directory entry) 06798 DC006087 951 CALL INITDEVACS do any initialization 06799 40495230 5 ZBM 952 PARVL FCB,FCREQUEST/REQACCESS 0679A FE0E6868 953 JMP OPNERRERR jump if it didn't work 0679B 60095230 0 5 ZBM 954 LD R0 FCB,FCREQUEST/REQACCESS 0679C E4095835 0 5 ZBM 955 ST R0 FCB,FCACCESS use this access 0679D FE0E6718 956 JMP INSERTFCB link in the FCB and return 957 * --- 958 0679E 58748800 959 RADDIR PAK12 DIR 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1434 (FRQNOPEN) F 79 FREQ - OPEN 961 962 ********************************************************************************** 963 * * 964 * DOSCRDEV. Nothing was specified for the file spec so * 965 * that just leaves the device spec. If the spec is for a device * 966 * we know about we create it on our own account. Otherwise we go * 967 * talk to the spooler. * 968 * * 969 ********************************************************************************** 970 000067A0 971 DOSCRDEV LABEL 972 * first, associate the file with the default account 067A0 6157C802 5 7 BASE 973 LD FCB VAR,FCBADDR FCB => FCB 067A1 60000412 0 974 LD R0 CPPSA user descriptor 067A2 61081F14 4 0 ZBM 975 LD ULB R0,PSDFLTDIR ULB => default (alias) account 067A3 E5095114 4 5 ZBM 976 ST ULB FCB,FCLIMITPTR set as file owner 067A4 E517C803 4 7 BASE 977 ST ULB VAR,ULBADDR remember where the ULB is 067A5 EC09C210 7 ZBM 978 STZ VAR,DIRLOCKD remember that dir is not locked 067A6 60080044 0 0 ZBM 979 LD R0 R0,PSDDIRPRIV privilege to access default acct 067A7 E4094E45 0 5 ZBM 980 ST R0 FCB,FCPRIV set as priv for unit 067A8 DC405569 981 CALLNP USEULB account for ULB access 067A9 60170801 0 4 BASE 982 LD R0 ULB,ULBLOCK volume number for this account 067AA E4174801 0 5 BASE 983 ST R0 FCB,FCBLOCK set in MS address 984 985 * then determine the device type 067AB 6117C801 4 7 BASE 986 LD R4 VAR,EQTADDR try to get ... 067AC 6017080D 0 4 BASE 987 LD R0 R4,EQFILEEXT ... an extension 067AD 60440000 1 IMM 988 LD R1 0 PAK6 becomes PAK12 067AE 60D7C805 3 7 BASE 989 LD R3 VAR,FSPARAM R3 => parameter block 067AF FA2C67B1 0 990 JEQMW R0 NOEXT jump if device type not in extension 067B0 E616C802 013 BASE 991 ST2 R0 R3,FSDEVICE store specified device type 000067B1 992 NOEXT LABEL 067B1 6216C802 013 BASE 993 LD2 R0 R3,FSDEVICE get specified device name 067B2 FA126882 01 994 JEQZ2 R0 OPNERRBFN if zero, we cannot do it 067B3 DC4063F8 995 CALLNP KNOWDEVICE do I know this device type 067B4 FA0267C2 0 996 JEQZ R0 TRYSPOOLR2 jump if not - try the spooler 067B5 E4096665 0 5 ZBM 997 ST R0 FCB,FCHTYPE the type of device to create 998 * \ / 999 1000 * then actually create the device 000067B6 1001 CRTDEV LABEL 067B6 64040007 0 IMM 1002 CPR R0 HTYPETERM creating a scratch TERM? 067B7 FE026739 1003 JEQ EQUIVTERM must do it a different way 067B8 6404000E 0 IMM 1004 CPR R0 HTYPEVOL creating a .VOL 067B9 FE0C67BE 1005 JNE NOTVOL1 if not, no special processing 067BA 60D7C801 3 7 BASE 1006 LD R3 VAR,EQTADDR R3 => equip block 067BB 6256C801 123 BASE 1007 LD2 R1 R3,EQVOLUME get the volume name 067BC E657480B 125 BASE 1008 ST2 R1 FCB,FCVNAME save if for the volume search routine 067BD EC17480D 5 BASE 1009 STZ FCB,FCNAMEEXT clear this field 1010 * \ / 1011 000067BE 1012 NOTVOL1 LABEL 067BE DC0063D5 1013 CALL MAKEADEV make a device of the correct type 067BF 40495230 5 ZBM 1014 PARVL FCB,FCREQUEST/REQACCESS 067C0 FE0E6868 1015 JMP OPNERRERR jump if it wouldn't make 067C1 FE0E6718 1016 JMP INSERTFCB add unit to user's list 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1435 (FRQNOPEN) F 79 FREQ - OPEN 1017 * --- 1018 000067C2 1019 TRYSPOOLR2 LABEL give the spooler a hack at unknown type 067C2 6017080D 0 4 BASE 1020 LD R0 R4,EQFILEEXT do we have to make a string first? 067C3 FA2E67D3 0 1021 JNEMW R0 MAKESPLSTR jump if so 067C4 FE0E67DC 1022 JMP TRYSPOOLR otherwise, just do it 1023 * --- 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1436 (FRQNOPEN) F 79 FREQ - OPEN 1025 1026 ********************************************************************************** 1027 * * 1028 * TRYSCRDEV. We've searched the account shared lists * 1029 * and have noticed that the file name could not be in the * 1030 * directory (the file name part was all zeros). This may * 1031 * be a scratch device for a spooler file. * 1032 * * 1033 ********************************************************************************** 1034 000067C5 1035 TRYSCRDEV LABEL 067C5 DC40315F 1036 CALLNP DMOTEWNDO2 release UDIR1 block, if mapped 067C6 DC403276 1037 CALLNP ULKWNDO1 unlock window 067C7 DC405685 1038 CALLNP FREEDIR release directory 067C8 EC09C210 7 ZBM 1039 STZ VAR,DIRLOCKD indicate directory no longer locked 067C9 6017480D 0 5 BASE 1040 LD R0 FCB,FCNAMEEXT ".dev" type spec 067CA 60440000 1 IMM 1041 LD R1 0 067CB 60D7C805 3 7 BASE 1042 LD R3 VAR,FSPARAM R3 => parameter block 067CC FA0267CE 0 1043 JEQZ R0 NOTHERE jump if device type not in extension 067CD E616C802 013 BASE 1044 ST2 R0 R3,FSDEVICE store specified device type 1045 * \ / 1046 000067CE 1047 NOTHERE LABEL 067CE 6216C802 013 BASE 1048 LD2 R0 R3,FSDEVICE get the device wanted 067CF FA126882 01 1049 JEQZ2 R0 OPNERRBFN jump if nothing to work with 067D0 DC4063F8 1050 CALLNP KNOWDEVICE get code for recognized type or 0 067D1 E4096665 0 5 ZBM 1051 ST R0 FCB,FCHTYPE remember the type of device to create 067D2 FA0C67B6 0 1052 JNEZ R0 CRTDEV jump if we know the type 1053 * \ / 1054 000067D3 1055 MAKESPLSTR LABEL make a string suitable for the spooler 067D3 DC005926 1056 CALL P12TOCHAR convert name to string 067D4 4356C802 3 BASE 1057 PARV2 R3,FSDEVICE where the P12 name is 067D5 4016C010 3 CACH 1058 PARL R3,FSPFILESP where to put the string 1059 * \ / R2 => null at end of result string 067D6 60D7C805 3 7 BASE 1060 LD R3 VAR,FSPARAM R3 => parameter block 067D7 3816C010 0 3 CACH 1061 LEA R0 R3,FSPFILESP R0 => first char of the string 067D8 E416C800 0 3 BASE 1062 ST R0 R3,FSSTRINGB this is the beginning 067D9 6007FFFF 0 IMM 1063 LD R0 -1 067DA 385A8000 1 20 CACH 1064 LEA R1 CACH R2,0(R0) R1 => last char of the string 067DB E456C801 1 3 BASE 1065 ST R1 R3,FSSTRINGE this is the last char 1066 * \ / 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1437 (FRQNOPEN) F 79 FREQ - OPEN 1068 1069 ********************************************************************************** 1070 * * 1071 * TRYSPOOLR. The requester has passed a device spec for a * 1072 * device I do not know about. Here we talk to the spooler in * 1073 * an attempt to get access to the actual device. * 1074 * * 1075 ********************************************************************************** 1076 1077 * \ / 000067DC 1078 TRYSPOOLR LABEL 067DC 60D3C000 3 7 REG 1079 LD R3 VAR R3 => variable block 067DD DC005DF5 1080 CALL SPLRINIT initialize spooler 067DE 4116C80A 3 BASE 1081 PAR R3,HANDLE place to store spooler handle 067DF 4016C80B 3 BASE 1082 PARL R3,MASKSAVE place to save acceptable message mask 067E0 FE0E6884 1083 JMP OPNERRSCU jump if no spooler to talk to 1084 * \ / 067E1 60D3C000 3 7 REG 1085 LD R3 VAR pointer to variable block 067E2 DC005E08 1086 CALL SPLRSEND send the message to the spooler 067E3 4156C80A 3 BASE 1087 PARV R3,HANDLE the handle to the spooler 067E4 4140680A 1088 PARV OUTPRIVS the privileges I wish to send 067E5 4140680B 1089 PARV OPNHEADR 067E6 6056C805 1 3 BASE 1090 LD R1 R3,FSPARAM R1 => user's string 067E7 60164800 0 1 BASE 1091 LD R0 R1,FSSTRINGB R0 => first char of device spec 067E8 60564801 1 1 BASE 1092 LD R1 R1,FSSTRINGE R1 => last char 067E9 604A5F30 1 1 CBM 1093 LD R1 R1/FLDCHARS 067EA 104A1F30 1 0 CBM 1094 SUB R1 R0/FLDCHARS R1 = length of string minus one 067EB 41160400 0 @R 1095 PAR @R0 where the params are 067EC 40565001 1 REG 1096 PARVL R1+1 length of params 067ED FE0E6884 1097 JMP OPNERRSCU spooler will not talk! 067EE E417C809 0 7 BASE 1098 ST R0 VAR,MSGID the ID for the message 1099 * \ / 1100 000067EF 1101 TRYAGAIN LABEL 067EF 6157C805 5 7 BASE 1102 LD R5 VAR,FSPARAM R5 => file string block 067F0 39574010 5 5 CACH 1103 LEA R5 R5,FSPFILESP 067F1 39574000 5 5 CACH 1104 LEA R5 CACH R5,0 R5=>first character of message 067F2 DC005E4D 1105 CALL SPLRRECV read the spooler's response 067F3 41174400 5 @R 1106 PAR @R5 place to put the message 067F4 404400EF IMM 1107 PARVL FSPMAXFS the size of the buffer 067F5 FE0E6837 1108 JMP IGNRIT the spooler is not talking 067F6 FE0E67FA 1109 JMP CHECKMSG message didn't fit, R1 < 0 067F7 EC1B4C00 51 @R 1110 STZ @R5(R1) place terminator 067F8 60D7C805 3 7 BASE 1111 LD R3 VAR,FSPARAM R3 => file string block 067F9 E456C801 1 3 BASE 1112 ST R1 R3,FSSTRINGE save length of string. 1113 * \ / 1114 1115 ********************************************************************************** 1116 * * 1117 * Check what the response was from the SPOOLER, but make * 1118 * sure that we are looking at the correct response. * 1119 * * 1120 * R3 => FSPARAM block, R5 => beginning of received message * 1121 * * 1122 ********************************************************************************** 1123 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1438 (FRQNOPEN) F 79 FREQ - OPEN 1124 * \ / 000067FA 1125 CHECKMSG LABEL 067FA 60094100 0 5 ZBM 1126 LD R0 R5,MSGPROC who sent this message 067FB 6417C80A 0 7 BASE 1127 CPR R0 VAR,HANDLE was it the spooler? 067FC FE0C67EF 1128 JNE TRYAGAIN jump if not - ignore message 067FD 6017C809 0 7 BASE 1129 LD R0 VAR,MSGID 067FE 64174807 0 5 BASE 1130 CPR R0 R5,MSGRTEXT is this the ID I need? 067FF FE0C67EF 1131 JNE TRYAGAIN I wonder what happened? 06800 FA486808 1 1132 JLTZ R1 SPLRFNF jump if message was too big 06801 60174809 0 5 BASE 1133 LD R0 R5,MSGRTEXT(2) get the spooler's response 06802 6400680C 0 1134 CPR R0 TEXTAA success code? 06803 FE026815 1135 JEQ ITSTEXTAA jump if so 06804 6400680D 0 1136 CPR R0 TEXTAB error code? 06805 FE02680E 1137 JEQ ITSTEXTAB jump if so 06806 6004008F 0 IMM 1138 LD R0 XREQERBFN "Bad File Name" 06807 FE0E680F 1139 JMP BAILSPLR return saying thing does not scan 1140 * --- 1141 1142 ********************************************************************************** 1143 * * 1144 * The SPOOLER bombed on the request. Back out and give * 1145 * some error. * 1146 * * 1147 ********************************************************************************** 1148 06808 6004008D 0 IMM 1149 SPLRFNF LD R0 XREQERFNF fake "file not found" 06809 FE0E680F 1150 JMP BAILSPLR 1151 * --- 1152 0680A C0000000 1153 OUTPRIVS VFD 1*MSGPRIVID+1*MSGPRIVOS 0680B 4F504E20 1154 OPNHEADR ASCII 1,OPN 0680C 41412020 1155 TEXTAA ASCII 1,AA 0680D 41422020 1156 TEXTAB ASCII 1,AB 1157 1158 ********************************************************************************** 1159 * * 1160 * The spooler claims error. Get error code and return same * 1161 * * 1162 ********************************************************************************** 1163 0000680E 1164 ITSTEXTAB LABEL 0680E 6017480A 0 5 BASE 1165 LD R0 R5,MSGRTEXT(3) R0 = reported error 0000680F 1166 BAILSPLR LABEL 0680F E417C808 0 7 BASE 1167 ST R0 VAR,ERRTEMP save in temp 00006810 1168 BAILSPLRX LABEL 06810 60D3C000 3 7 REG 1169 LD R3 VAR R3 => variable block 06811 DC005E02 1170 CALL UNSPLRINIT undo setup for spooler talking 06812 4056C80B 3 BASE 1171 PARVL R3,MASKSAVE 06813 6017C808 0 7 BASE 1172 LD R0 VAR,ERRTEMP R0 = error code 06814 FE0E6868 1173 JMP OPNERRERR return error to caller 1174 * --- 1175 1176 ********************************************************************************** 1177 * * 1178 * The spooler claims success. We must open the file he sez. * 1179 * * 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1439 (FRQNOPEN) F 79 FREQ - OPEN 1180 ********************************************************************************** 1181 00006815 1182 ITSTEXTAA LABEL 06815 6017480A 0 5 BASE 1183 LD R0 R5,MSGRTEXT(3) get the proper queue ID 06816 E417C80C 0 7 BASE 1184 ST R0 VAR,QUEUEID 06817 60D3C000 3 7 REG 1185 LD R3 VAR R3 => variable block 06818 DC006946 1186 CALL FNDSPLRULB find the privs of spooler 06819 4056C80A 3 BASE 1187 PARVL R3,HANDLE 0681A FE0E6836 1188 JMP NOTOPENABL jump if spooler is not there 0681B 60000414 0 1189 LD R0 CPCUPC 0681C E1081F13 4 0 ZBM 1190 EXCH ULB R0,UPCPRIVULB place as my privs 0681D 3897480B 2 5 BASE 1191 LEA R2 R5,MSGRTEXT(4) R2 => name of file to open 0681E 60D7C805 3 7 BASE 1192 LD R3 VAR,FSPARAM R3 => string parameter block 0681F 6056C801 1 3 BASE 1193 LD R1 R3,FSSTRINGE 06820 1044002C 1 IMM 1194 SUB R1 (MSGRTEXT DISPC MSGPROC)+(4*CPW) R1 = file spec length 06821 60040260 0 IMM 1195 LD R0 FRNOPEN open request 06822 60D7C802 3 7 BASE 1196 LD R3 VAR,FCBADDR R3 => FCB 06823 1808D040 0 3 ZBM 1197 ADD R0 R3,FCREQUEST R0 = FRNOPEN + requested access 06824 0897C804 7 BASE 1198 FREQ VAR,UNITNO try to open it 06825 E417C808 0 7 BASE 1199 ST R0 VAR,ERRTEMP save the results 06826 60000414 0 1200 LD R0 CPCUPC 06827 E1081F13 4 0 ZBM 1201 EXCH ULB R0,UPCPRIVULB restore my access privs 06828 DC405526 1202 CALLNP FREEULB release the ULB 06829 6017C808 0 7 BASE 1203 LD R0 VAR,ERRTEMP get results back 0682A FA086836 0 1204 JLTZ R0 NOTOPENABL jump if we may not have it 1205 * \ / 1206 1207 ********************************************************************************** 1208 * * 1209 * We've linked the file the spooler told us about. Find again * 1210 * and mark as spooled. * 1211 * * 1212 ********************************************************************************** 1213 1214 * \ / 0682B 60D7C804 3 7 BASE 1215 LD R3 VAR,UNITNO get the unit number we opened 0682C DC405B39 1216 CALLNP LUNSEARCH find the FCB 0682D EDC97415 5 ZBM 1217 STW FCB,FCSPOOLED say from the spooler 0682E EC17C80D 7 BASE 1218 STZ VAR,ENDQUEID mark end for string converter 1219 1220 * The following is only until the spooler is ever changed from 1221 * using ASCII to represent queue ids. 1222 0682F 60D3C000 3 7 REG 1223 LD R3 VAR R3 => variable block 06830 DC0058E5 1224 CALL CHARTOINT convert string to hex 06831 4016C80C 3 BASE 1225 PARL R3,QUEUEID pass address to char string 1226 * LD R1 VAR,QUEUEID get the queue id the spooler assigned 06832 E4497CA5 1 5 ZBM 1227 ST R1 FCB,FCQUEUEID save this value away 06833 DC005E02 1228 CALL UNSPLRINIT undo spooler talking setup 06834 4056C80B 3 BASE 1229 PARVL R3,MASKSAVE 06835 FE0E6724 1230 JMP RTNSTATST return status to caller 1231 * --- 1232 1233 ********************************************************************************** 1234 * * 1235 * They told us about a file but we cannot open it. Tell the * 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1440 (FRQNOPEN) F 79 FREQ - OPEN 1236 * SPOOLER that we don't want it and return the error. * 1237 * * 1238 ********************************************************************************** 1239 00006836 1240 NOTOPENABL LABEL 06836 600A2AB0 0 0 CBM 1241 LD R0 R0/FDSTATERR 00006837 1242 IGNRIT LABEL 06837 E417C808 0 7 BASE 1243 ST R0 VAR,ERRTEMP save error temp 06838 60D3C000 3 7 REG 1244 LD R3 VAR R3 => variable block 06839 DC005E94 1245 CALL SPLRIGNR tell the spooler to close the file 0683A 4156C809 3 BASE 1246 PARV R3,MSGID the ID for the file 0683B 4056C80A 3 BASE 1247 PARVL R3,HANDLE the handle to the spooler 0683C FE0E6810 1248 JMP BAILSPLRX return error to caller 1249 * --- 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1441 (FRQNOPEN) F 79 FREQ - OPEN 1251 1252 ********************************************************************************** 1253 * * 1254 * USRMEMBAD. While getting the string from the user, his * 1255 * memory went bad. We free up any temp blocks gotten so far, * 1256 * and return to the caller. * 1257 * * 1258 ********************************************************************************** 1259 0000683D 1260 USRMEMBAD LABEL 0683D E614C000 0134 PAIR 1261 ST2 R0 PAIR R3 save the error code 0683E DC00690D 1262 CALL FREETEMPS release the temp blocks 0683F 40440000 IMM 1263 PARVL 0 zap the FCB and ULB 06840 6093C000 2 7 REG 1264 LD R2 VAR R2 => variables block 06841 DC002F5D 1265 CALL UFREEMEM return storage to the system 06842 41440005 IMM 1266 PARV FOPNLOG log of the block size 06843 40528000 2 REG 1267 PARVL R2 address of the block 06844 6214C000 0134 PAIR 1268 LD2 R0 PAIR R3 retrieve the error code 06845 FE0E5B5F 1269 JMP PASSERRUP pass error codes to the caller 1270 * --- 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1442 (FRQNOPEN) F 79 FREQ - OPEN 1272 1273 ********************************************************************************** 1274 * * 1275 * File is busy. If the file is busy, then the requester * 1276 * has the option of either getting himself suspended until * 1277 * the file is available or returning with a code saying * 1278 * file in use. * 1279 * When we get here, we know that the directory is locked * 1280 * and that the ULB needs releasing and the temps need freeing * 1281 * (including the FCB that we're working on). * 1282 * * 1283 ********************************************************************************** 1284 00006846 1285 OPNERRBZY LABEL 06846 62D74809 345 BASE 1286 LD2 R3 FCB,FCSERIAL get real identifier of the file 06847 60040001 0 IMM 1287 LD R0 1 assume volume 1 06848 60895114 2 5 ZBM 1288 LD R2 FCB,FCLIMITPTR R2 => ULB of acct being used 06849 FAB0684B 2 1289 JZA R2 BZYNOULB1 jump if no ULB 0684A 60088081 0 2 ZBM 1290 LD R0 R2,ULDRIVE pick up drive number to make unique 1291 * \ / 1292 0000684B 1293 BZYNOULB1 LABEL 0684B E40AC080 0 3 CBM 1294 ST R0 R3/VOLFIELD add volume number for true uniqueness 1295 PLOCK FILEWAITL get global file waiting lock 0684C 0CC00000 1295 IOFF 0684D D1C01D0F 1295 SETT FILEWAITL 0684E FE0C6850 1295 JNE MA(2+DISPW MA 0) 0684F DC40308B 1295 CALLNP LOCKWAIT 06850 60895230 2 5 ZBM 1296 LD R2 FCB,FCREQUEST/REQACCESS requested access 06851 DC00690D 1297 CALL FREETEMPS release the temp blocks 06852 40440000 IMM 1298 PARVL 0 free the FCB and ULB 06853 6057C804 1 7 BASE 1299 LD R1 VAR,UNITNO get the unit number before we go 06854 E053C000 1 7 REG 1300 EXCH R1 VAR 06855 DC002F5D 1301 CALL UFREEMEM return memory to the system 06856 41440005 IMM 1302 PARV FOPNLOG log of the block size 06857 40524000 1 REG 1303 PARVL R1 and the address 06858 DC007DFE 1304 CALL SELFFWAIT see if we will wait on ourself 06859 41440000 IMM 1305 PARV 0 no excluding FCB 0685A 414AC080 3 CBM 1306 PARV R3/VOLFIELD the volume that file is on 0685B 6214C000 0134 PAIR 1307 LD2 R0 PAIR R3 get the unique ID 0685C EC0A0080 0 CBM 1308 STZ R0/VOLFIELD remove extra fields to get serial number 0685D 42540000 01 PAIR 1309 PARV2L PAIR R0 pass file serial number 0685E FE0E6863 1310 JMP CANNOTSUSP jump if we would wait on ourself 1311 * R2 = requested access 0685F DC003541 1312 CALL SUSPENDFRQ suspend an FREQ call 06860 4354C000 34 PAIR 1313 PARV2 PAIR R3 the ID that we will wait on 06861 41001DB1 1314 PAR SQFILEWAIT where to wait - in filewait 06862 40001D0F 1315 PARL FILEWAITL what to unlock 1316 * \ / 1317 1318 ********************************************************************************** 1319 * * 1320 * We came back. The user wishes to get the error. * 1321 * * 1322 ********************************************************************************** 1323 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1443 (FRQNOPEN) F 79 FREQ - OPEN 1324 * \ / 00006863 1325 CANNOTSUSP LABEL 1326 PUNLOCK FILEWAITL release global write 06863 EC001D0F 1326 STZ FILEWAITL 06864 0C800000 1326 ION 06865 60CBDF10 3 7 CBM 1327 LD R3 R7/FLDADRS R3 => unit number 06866 6004008A 0 IMM 1328 LD R0 XREQERFBZ R0 = file is busy - error to return 06867 FE0E5987 1329 JMP FERROR3 1330 * --- 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1444 (FRQNOPEN) F 79 FREQ - OPEN 1332 1333 ********************************************************************************** 1334 * * 1335 * Error processing. We accept an error code and release * 1336 * any temp blocks allocated, back out of any processing and * 1337 * return the error. Note that R0 => error code * 1338 * * 1339 ********************************************************************************** 1340 00006868 1341 OPNERRERR LABEL 06868 6404008A 0 IMM 1342 CPR R0 XREQERFBZ 06869 FE026846 1343 JEQ OPNERRBZY do busy processing if that's the error 0000686A 1344 OPNERRSHAR1 LABEL 0686A E4130000 0 4 REG 1345 ST R0 R4 save error code here 1346 * \ / 1347 0000686B 1348 OPNERRSHARE LABEL 0686B DC00690D 1349 CALL FREETEMPS release temp blocks 0686C 40440000 IMM 1350 PARVL 0 release the FCB and the ULB 0686D 60D7C804 3 7 BASE 1351 LD R3 VAR,UNITNO R3 => unit number 0686E 6093C000 2 7 REG 1352 LD R2 VAR R2 => variables block 0686F DC002F5D 1353 CALL UFREEMEM return storage to the system 06870 41440005 IMM 1354 PARV FOPNLOG log of the block size 06871 40528000 2 REG 1355 PARVL R2 and the address 06872 60130000 0 4 REG 1356 LD R0 R4 R0 => error code 06873 FE0E5987 1357 JMP FERROR3 return error without FCB 1358 * --- 1359 1360 * Parameter out of bounds 1361 00006874 1362 OPNERRPOB LABEL 06874 61040082 4 IMM 1363 LD R4 XREQERPOB "Parameter out of bounds" 06875 FE0E686B 1364 JMP OPNERRSHARE 1365 * --- 1366 1367 * R0 = signed error code for XREQ 1368 00006876 1369 OPNERR LABEL 06876 610A2AB0 4 0 CBM 1370 LD R4 R0/FDSTATERR extract error 06877 FE0E686B 1371 JMP OPNERRSHARE 1372 * --- 1373 1374 * Disk structure error, everything cleaned up 1375 00006878 1376 OPNERRDSEN LABEL 06878 EC09C210 7 ZBM 1377 STZ VAR,DIRLOCKD indicate directory unlocked 06879 FE0E686A 1378 JMP OPNERRSHAR1 error code in R0 1379 * --- 1380 1381 * Disk structure error 1382 0000687A 1383 OPNERRDSE LABEL 0687A 6104009F 4 IMM 1384 LD R4 XREQERDSE "Disk structure error" 0687B FE0E686B 1385 JMP OPNERRSHARE 1386 * --- 1387 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1445 (FRQNOPEN) F 79 FREQ - OPEN 1388 * File is purged 1389 0000687C 1390 OPNERRPRG LABEL 0687C 61040092 4 IMM 1391 LD R4 XREQERFPRG "File is purged" 0687D FE0E686B 1392 JMP OPNERRSHARE 1393 * --- 1394 1395 * Lun not equipped 1396 0000687E 1397 OPNERRLNE LABEL 0687E 61040081 4 IMM 1398 LD R4 XREQERLNE "Lun not equipped" 0687F FE0E686B 1399 JMP OPNERRSHARE 1400 * --- 1401 1402 * File not found 1403 00006880 1404 OPNERRFNF LABEL 06880 6104008D 4 IMM 1405 LD R4 XREQERFNF "File not found" 06881 FE0E686B 1406 JMP OPNERRSHARE 1407 * --- 1408 1409 * Bad file name 1410 00006882 1411 OPNERRBFN LABEL 06882 6104008F 4 IMM 1412 LD R4 XREQERBFN "Bad file name" 06883 FE0E686B 1413 JMP OPNERRSHARE 1414 * --- 1415 1416 * Spooler is currently unavailable 1417 00006884 1418 OPNERRSCU LABEL 06884 610400C7 4 IMM 1419 LD R4 XREQERSCU "Spooler is currently unavailable" 06885 FE0E686B 1420 JMP OPNERRSHARE 1421 * --- 1422 1423 END of main control for FREQNOPEN 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1446 (FRQNOPEN) F 79 FREQ - OPEN 1425 1426 ********************************************************************************** 1427 * * 1428 * GETFCB. This subroutine checks to see that the number passed in * 1429 * R3 is in the range of acceptable unit numbers for the current * 1430 * underprocess and, if acceptable, creates a new FCB. If the * 1431 * acceptable unit number is LUNAIN or LUNAOUT the FCABSIO flag is * 1432 * set to indicate that fact. * 1433 * * 1434 * Call: CPUPC => underprogram doing the open * 1435 * R3 = potential unit number * 1436 * CALLNP GETFCB * 1437 * JMP error, R0 = error code * 1438 * new element> * 1439 * * 1440 * Eats: R0,R1 * 1441 * Stack Usage: 3 * 1442 * 1 + MAX( GETVGNFCB (2) + SFREEMEM (0) ) * 1443 * * 1444 ********************************************************************************** 1445 1446 BLOCK GETFCB subroutine 1447 ENTRY GETFCB 1448 1449 BEGFRAME 1450 ENDFRAME 1451 06886 DD5F8001 6 STAK 1452 GETFCB ENTRNP PUSH 06887 68C400FF 3 IMM 1453 UCPR R3 MAXUNIT check upper bound and negative 06888 FE046899 1454 JGT ERRPOB no good if it seems greater 06889 FAC26899 3 1455 JEQZ R3 ERRPOB 0 is no good either 0688A DC405D88 1456 CALLNP GETVGNFCB guess he'll need a new one of these 0688B FE0E689A 1457 JMP EXIT insufficient system resources 1458 * \ / 0688C 64C400C9 3 IMM 1459 CPR R3 LUNCMLOW is it in the CM range? 0688D FE086895 1460 JLT USEIT jump if all is normal 0688E 60000414 0 1461 LD R0 CPCUPC otherwise, see who's asking 0688F 5C080610 0 ZBM 1462 CMZ R0,UPCNTLMODE is it control mode? 06890 FE026896 1463 JEQ ERRPOBFC if not, no go! 06891 EDC97A15 5 ZBM 1464 STW FCB,FCCMUNIT say that unit is in CM range 06892 64C400CA 3 IMM 1465 CPR R3 LUNAOUT is the new unit absolute output? 06893 FE046895 1466 JGT USEIT jump if not, nothing special 06894 EDC96015 5 ZBM 1467 STW FCB,FCABSIO say that FCB is unalterable 1468 * \ / 00006895 1469 USEIT LABEL FCB is ready 06895 FBE0689A 7 1470 IRJ R7 EXIT set up good exit 1471 * --- 1472 00006896 1473 ERRPOBFC LABEL free unusable FCB and flee 06896 DC002F8F 1474 CALL FCFREEMEM free the new element 06897 41440004 IMM 1475 PARV FCLOG this size 06898 40534000 5 REG 1476 PARVL FCB at this location 1477 * \ / 00006899 1478 ERRPOB LABEL 06899 60040082 0 IMM 1479 LD R0 XREQERPOB parameter out of bounds 1480 * \ / 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1447 (FRQNOPEN) F 79 FREQ - OPEN 0000689A 1481 EXIT LABEL 0689A 5D1F8001 6 STAK 1482 LEAVE POP return to caller 1483 * --- 1484 1485 END GETFCB subroutine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1448 (FRQNOPEN) F 79 FREQ - OPEN 1487 1488 ********************************************************************************** 1489 * * 1490 * DEFAULTFS. Routine that examines a file specification and sees if it * 1491 * is defaultable and defaults what is necessary. It first sees if nothing * 1492 * is specified and returns that information. It also sees if maybe just * 1493 * another unit was specified and returns that information. Otherwise, the * 1494 * system and the account are defaulted. * 1495 * If no system specified, we assume current system. * 1496 * If no project specified, we assume project of alias account. * 1497 * If no account or project specified, we assume alias account. * 1498 * If no volume specified we leave the field unspecified as FINDULB may * 1499 * look up the volume. * 1500 * Call: * 1501 * * 1502 * CPPSA,PSDFLTDIR => ULB for default (alias) account * 1503 * LD EQT => EQT block with file spec * 1504 * CALLNP DEFAULTFS * 1505 * JMP * 1506 * JMP * 1507 * JMP * 1508 * * 1509 * * 1510 * Gets R0 thru R3. * 1511 * Stack required = 1 * 1512 * * 1513 ********************************************************************************** 1514 1515 BLOCK 1516 ENTRY DEFAULTFS 1517 1518 BEGFRAME 1519 ENDFRAME 1520 0689B DD5F8001 6 STAK 1521 DEFAULTFS ENTRNP PUSH 0689C 62174801 015 BASE 1522 LD2 R0 EQT,EQVOLUME merge what should be zero 0689D 7E174804 015 BASE 1523 IOR2 R0 EQT,EQVOLPW 0689E 7E174809 015 BASE 1524 IOR2 R0 EQT,EQACCTPW 0689F 7E17480E 015 BASE 1525 IOR2 R0 EQT,EQFILEPW 068A0 7E174806 015 BASE 1526 IOR2 R0 EQT,EQACCT 068A1 FA1C68AF 01 1527 JNEZ2 R0 SOMETHERE jump if some specified 068A2 60174803 0 5 BASE 1528 LD R0 EQT,EQSYSTEM 068A3 FA0268A5 0 1529 JEQZ R0 L1 068A4 FA2E68AF 0 1530 JNEMW R0 SOMETHERE 1531 * \ / 1532 000068A5 1533 L1 LABEL 068A5 60174808 0 5 BASE 1534 LD R0 EQT,EQACCTPROJ 068A6 FA0268A8 0 1535 JEQZ R0 L2 068A7 FA2E68AF 0 1536 JNEMW R0 SOMETHERE 1537 * \ / 1538 000068A8 1539 L2 LABEL 068A8 6217480B 015 BASE 1540 LD2 R0 EQT,EQFILENM 068A9 FA0C68AF 0 1541 JNEZ R0 SOMETHERE 068AA 684400FF 1 IMM 1542 UCPR R1 MAXUNIT 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1449 (FRQNOPEN) F 79 FREQ - OPEN 068AB FE0468AF 1543 JGT SOMETHERE 1544 * \ / 1545 1546 ********************************************************************************** 1547 * * 1548 * There is nothing specified anywhere but in the file name. If totally * 1549 * nothing we return saying nothing specified else we say a unit number spec'd. * 1550 * * 1551 ********************************************************************************** 1552 1553 * \ / 068AC FA4268AE 1 1554 JEQZ R1 NONESPEC jump if nothing 068AD 19C40001 7 IMM 1555 ADD R7 1 000068AE 1556 NONESPEC LABEL 068AE 5D1F8001 6 STAK 1557 LEAVE POP 1558 * --- 1559 1560 ********************************************************************************** 1561 * * 1562 * Something besides a unit number was specified. Default system, * 1563 * account, and file extension. * 1564 * * 1565 ********************************************************************************** 1566 000068AF 1567 SOMETHERE LABEL 1568 * Default system. 068AF 60174803 0 5 BASE 1569 LD R0 EQT,EQSYSTEM 068B0 FA0268B2 0 1570 JEQZ R0 L4 068B1 FA2E68B4 0 1571 JNEMW R0 NODFLTSYS jump if a system specified 000068B2 1572 L4 LABEL 068B2 60001EFB 0 1573 LD R0 SYSTEMNM 068B3 E4174803 0 5 BASE 1574 ST R0 EQT,EQSYSTEM default the system 000068B4 1575 NODFLTSYS LABEL 1576 * \ / 1577 1578 * The file name is not defaulted but extensions are defaulted to nulls. 1579 068B4 6017480D 0 5 BASE 1580 LD R0 EQT,EQFILEEXT 068B5 FA2E68B7 0 1581 JNEMW R0 NODFLTEXT jump if extension given 068B6 EC17480D 5 BASE 1582 STZ EQT,EQFILEEXT default to null 000068B7 1583 NODFLTEXT LABEL 1584 * \ / 1585 1586 * If the account is completely missing, return that info. 068B7 5E174806 5 BASE 1587 CMZ2 EQT,EQACCT 068B8 FE0C68BE 1588 JNE NODFLTACCT jump if account specified 068B9 60174808 0 5 BASE 1589 LD R0 EQT,EQACCTPROJ is project specified 068BA FA0268BC 0 1590 JEQZ R0 L5 068BB FA2E68C4 0 1591 JNEMW R0 NODFLTPROJ jump if form is ".proj" 000068BC 1592 L5 LABEL 068BC 19C40002 7 IMM 1593 ADD R7 2 return saying acct not specified 068BD 5D1F8001 6 STAK 1594 LEAVE POP 1595 * --- 1596 000068BE 1597 NODFLTACCT LABEL 068BE 60174808 0 5 BASE 1598 LD R0 EQT,EQACCTPROJ 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1450 (FRQNOPEN) F 79 FREQ - OPEN 068BF FA2E68C4 0 1599 JNEMW R0 NODFLTPROJ jump if a project specified 068C0 60800412 2 1600 LD R2 CPPSA 068C1 60889F14 2 2 ZBM 1601 LD R2 R2,PSDFLTDIR 068C2 60168804 0 2 BASE 1602 LD R0 R2,ULACCPROJ get the name of the default project 068C3 E4174808 0 5 BASE 1603 ST R0 EQT,EQACCTPROJ default it 000068C4 1604 NODFLTPROJ LABEL 1605 * \ / 1606 068C4 19C40003 7 IMM 1607 ADD R7 3 defaulted return 068C5 5D1F8001 6 STAK 1608 LEAVE POP 1609 * --- 1610 1611 END of DEFAULTFS 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1451 (FRQNOPEN) F 79 FREQ - OPEN 1613 1614 ********************************************************************************** 1615 * * 1616 * SCANDEVSP. Scan device specification. A pointer is passed to the * 1617 * file spec block and FSSTRINGB points to the end of the first-part of the * 1618 * name and FSSTRINGE points after the last character of the passed spec. * 1619 * We here scan over the device spec part and extract the device type given * 1620 * and return with the B and E pointers to the enclosed spec (or zero if * 1621 * none). We also check to see that the eventual end of the spec is * 1622 * the actual string end - error if not. Call: * 1623 * * 1624 * LD R3 => FSP block * 1625 * R3,FSSTRINGB => "<" if one exists * 1626 * R3,FSSTRINGE => after the last character of string * 1627 * CALLNP SCANDEVSP * 1628 * JMP file spec does not fill string (R0 = error code). * 1629 * FSP,FSSTRINGB = 0 if no device spec * 1630 * FSP,FSSTRINGB => first char of device spec (after "<") * 1631 * FSP,FSSTRINGE => last char of device spec (before "<") * 1632 * FSP,FSDEVICE = 0 if no device specified * 1633 * FSP,FSDEVICE = PAK-12 device name if specified * 1634 * * 1635 * The scanning is done by matching brokets ("<") and scanning over quoted * 1636 * strings (with double quotes being one). * 1637 * * 1638 * Gets R0 thru R4 * 1639 * Stack required = 3 * 1640 * * 1641 ********************************************************************************** 1642 1643 BLOCK 1644 ENTRY SCANDEVSP 1645 1646 BEGFRAME 00178801 6 BASE 1647 FSPBLOCK BSS 1 => FSP block 00178802 6 BASE 1648 GROUPLVL BSS 1 broket grouper level (0 = done) 1649 ENDFRAME 1650 068C6 DD5F8003 6 STAK 1651 SCANDEVSP ENTRNP PUSH 068C7 E4D78801 3 6 BASE 1652 ST R3 SP,FSPBLOCK save the file spec block pointer 068C8 6116C800 4 3 BASE 1653 LD R4 R3,FSSTRINGB R4 => first char 068C9 EE16C802 3 BASE 1654 STZ2 R3,FSDEVICE initialize name field 068CA DC406902 1655 CALLNP GETIT get one character 068CB 64040032 0 IMM 1656 CPR R0 PCLBROK is it a broket? 068CC FE0268D2 1657 JEQ SCANSP jump if a specification 1658 * \ / 1659 1660 * No specification - clean up pointers and check for string and match. 068CD EC16C800 3 BASE 1661 STZ R3,FSSTRINGB say no device spec 068CE 6516C801 4 3 BASE 1662 CPR R4 R3,FSSTRINGE does end of file spec and string match? 068CF FE0C68F3 1663 JNE RTNBFN jump if not - error 068D0 19C40001 7 IMM 1664 ADD R7 1 skip to success return 068D1 5D1F8003 6 STAK 1665 LEAVE POP 1666 * --- 1667 1668 * Scan the file specifier. Find the first item and pack it. 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1452 (FRQNOPEN) F 79 FREQ - OPEN 000068D2 1669 SCANSP LABEL 068D2 EDD78802 6 BASE 1670 STW SP,GROUPLVL leading grouper = 1 068D3 DC406902 1671 SKIPTOK CALLNP GETIT skip up to first token 068D4 64040031 0 IMM 1672 CPR R0 PCDELIM space to skip over? 068D5 FE0268D3 1673 JEQ SKIPTOK jump if so 068D6 D04B1F30 4 CBM 1674 DEC R4/FLDCHARS 068D7 E516C800 4 3 BASE 1675 ST R4 R3,FSSTRINGB beginning of spec 068D8 60040100 0 IMM 1676 LD R0 URPACKI 068D9 60530000 1 4 REG 1677 LD R1 R4 pack up the identifier 068DA 09040000 IMM 1678 UREQ 0 068DB FA0868E0 0 1679 JLTZ R0 NODEVSYM jump if it isn't there 068DC 60178801 0 6 BASE 1680 LD R0 SP,FSPBLOCK 068DD E6960802 230 BASE 1681 ST2 R2 R0,FSDEVICE device spec 068DE 60D20000 3 0 REG 1682 LD R3 R0 068DF 39164000 4 1 CACH 1683 LEA R4 CACH R1,0 move over symbol 000068E0 1684 NODEVSYM LABEL 1685 * Scan the rest of the device spec 068E0 DC406902 1686 NEXTSCAN CALLNP GETIT get another character 068E1 64040035 0 IMM 1687 QUOTEEND CPR R0 PCEOL end of line? 068E2 FE0268F2 1688 JEQ PROCEOL 068E3 64040033 0 IMM 1689 CPR R0 PCRBROK right broket ">" 068E4 FE0268F8 1690 JEQ PROCRBROK 068E5 64040032 0 IMM 1691 CPR R0 PCLBROK left broket "<" 068E6 FE0268F6 1692 JEQ PROCLBROK 068E7 64040034 0 IMM 1693 CPR R0 PCQUOTE quote mark """ 068E8 FE0C68E0 1694 JNE NEXTSCAN 1695 * \ / 1696 1697 * Quoted string scan to closing quote 068E9 DC406902 1698 QUOTELOOP CALLNP GETIT get next character 068EA 64040035 0 IMM 1699 CPR R0 PCEOL end of line is a failure 068EB FE0268F2 1700 JEQ PROCEOL 068EC 64040034 0 IMM 1701 CPR R0 PCQUOTE see if closing quote 068ED FE0C68E9 1702 JNE QUOTELOOP if not, try another char 068EE DC406902 1703 CALLNP GETIT double quote is not an end 068EF 64040034 0 IMM 1704 CPR R0 PCQUOTE two in a row 068F0 FE0C68E1 1705 JNE QUOTEEND if not, we are out of the quote string 068F1 FE0E68E9 1706 JMP QUOTELOOP if two then stay in string 1707 * --- 1708 1709 * End of line encountered. This means no closing broket so return error. 068F2 60D78801 3 6 BASE 1710 PROCEOL LD R3 SP,FSPBLOCK 000068F3 1711 RTNBFN LABEL 068F3 EC16C800 3 BASE 1712 STZ R3,FSSTRINGB no parameter string 068F4 6004008F 0 IMM 1713 LD R0 XREQERBFN "Bad File Name" 068F5 5D1F8003 6 STAK 1714 LEAVE POP rtn 1 sez error 1715 * --- 1716 1717 * Left broket. Enclosing another file spec. 000068F6 1718 PROCLBROK LABEL 068F6 D0178802 6 BASE 1719 INC SP,GROUPLVL count number of RBROKs to stop 068F7 FE0E68E0 1720 JMP NEXTSCAN 1721 * --- 1722 1723 * Right broket. See if down to level one and thus at the end. 000068F8 1724 PROCRBROK LABEL 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1453 (FRQNOPEN) F 79 FREQ - OPEN 068F8 D0578802 6 BASE 1725 DEC SP,GROUPLVL count our right brokets 068F9 FE0468E0 1726 JGT NEXTSCAN jump if not the rightmost one 1727 * \ / 1728 1729 * Device spec scanned. Return end pointer and check to see at end of string. 068FA 60D78801 3 6 BASE 1730 LD R3 SP,FSPBLOCK 068FB 6516C801 4 3 BASE 1731 CPR R4 R3,FSSTRINGE does dev spec match string end 068FC FE0C68F3 1732 JNE RTNBFN if not, we have an error 068FD D04B1F30 4 CBM 1733 DEC R4/FLDCHARS 068FE D04B1F30 4 CBM 1734 DEC R4/FLDCHARS 068FF E516C801 4 3 BASE 1735 ST R4 R3,FSSTRINGE 06900 19C40001 7 IMM 1736 ADD R7 1 06901 5D1F8003 6 STAK 1737 LEAVE POP return 1738 * --- 1739 1740 ********************************************************************************** 1741 * * 1742 * GETIT. Get one character and advance char pointer if not EOL. * 1743 * Returns the code for the character. * 1744 * Call: * 1745 * * 1746 * LD R4 => character * 1747 * SP,FSPBLOCK,FSSTRINGE = pointer to string terminator * 1748 * CALLNP GETIT * 1749 * ST R0 character code * 1750 * * 1751 * Gets R0 & R1 and advances R4 if not EOL. * 1752 * * 1753 ********************************************************************************** 1754 06902 DD524000 1 REG 1755 GETIT ENTRNP R1 06903 60178801 0 6 BASE 1756 LD R0 SP,FSPBLOCK get the file spec block ptr 06904 65160801 4 0 BASE 1757 CPR R4 R0,FSSTRINGE pointing after the end? 06905 FE02690B 1758 JEQ ITSEOL 06906 60170000 0 4 CACH 1759 LD R0 CACH R4,0 pick up the next character 06907 39170001 4 4 CACH 1760 LEA R4 CACH R4,1 advance the character pointer 06908 7804007F 0 IMM 1761 AND R0 07F mask off the high bit 06909 60305A49 0 0 @ 1762 LD R0 CONVTAB(R0) 0690A 5D124000 1 REG 1763 LEAVE R1 1764 * --- 1765 1766 * EOL - return code. 0690B 60040035 0 IMM 1767 ITSEOL LD R0 PCEOL 0690C 5D124000 1 REG 1768 LEAVE R1 1769 * --- 1770 1771 END of SCANDEVSP 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1454 (FRQNOPEN) F 79 FREQ - OPEN 1773 1774 ********************************************************************************** 1775 * * 1776 * FREETEMPS. This routine frees the FCB, EQT and file spec blocks * 1777 * if the pointers to these things are non-zero on the NOPEN stack. * 1778 * It also will do a FREEDIR if FCDIRINUSE is on. * 1779 * Call: * 1780 * * 1781 * R7 => variables block * 1782 * CALL FREETEMPS * 1783 * PARVL zero if to free FCB and ULB, non-zero if not * 1784 * * 1785 * Note: Even if you ask us not to free the ULB, if the saved ULB differs * 1786 * from FCLIMITPTR, we will free the ULB anyway. * 1787 * * 1788 * Gets R0:R1 * 1789 * Stack required = 16 * 1790 * 5 + max ( DMOTEWNDO1 (7), FCFREEMEM (0), FREEDIR (5), * 1791 * FREEULB (11), FREEULBLK (11), GRUBWNDO1 (7), * 1792 * SFREEMEM (0) ) * 1793 * * 1794 ********************************************************************************** 1795 1796 BLOCK 1797 ENTRY FREETEMPS 1798 1799 BEGFRAME 00178801 6 BASE 1800 SAVER2 BSS 1 00178802 6 BASE 1801 STACKSAVE BSS 2 00178804 6 BASE 1802 ZAPFCB BSS 1 non-zero if to not zap FCB and ULB 1803 ENDFRAME 1804 0690D DD1F8005 6 STAK 1805 FREETEMPS ENTR PUSH 0690E C0578804 6 BASE 1806 STPVL SP,ZAPFCB save zapping flag 0690F E4978801 2 6 BASE 1807 ST R2 SP,SAVER2 save a reg 06910 E6D78802 346 BASE 1808 ST2 R3 SP,STACKSAVE save two regs 06911 60D78800 3 6 BASE 1809 LD R3 SP,0 get original value of R7 06912 5C178804 6 BASE 1810 CMZ SP,ZAPFCB supposed to save FCB or ULB? 06913 FE026922 1811 JEQ ZAPTHEM jump if supposed to zap them 1812 * \ / 1813 1814 * Retain the FCB and ULB but release the directory if locked 1815 06914 6116C803 4 3 BASE 1816 LD ULB R3,ULBADDR ULB => ULB 06915 FB306931 4 1817 JZA ULB NOFCB if not ULB then no dir locked 06916 5C08C210 3 ZBM 1818 CMZ R3,DIRLOCKD is the directory locked? 06917 FE02691B 1819 JEQ NOTLOCKD1 jump if not 06918 DC405685 1820 CALLNP FREEDIR unlock the directory 06919 60D78800 3 6 BASE 1821 LD R3 SP,0 R3 => variables block 0691A EC08C210 3 ZBM 1822 STZ R3,DIRLOCKD remember dir not locked now 1823 * \ / 1824 0000691B 1825 NOTLOCKD1 LABEL 0691B 6116C803 4 3 BASE 1826 LD ULB R3,ULBADDR ULB => saved limit block 0691C 6016C802 0 3 BASE 1827 LD R0 R3,FCBADDR get the FCB address 0691D 65081114 4 0 ZBM 1828 CPR ULB R0,FCLIMITPTR is it the same as the one being used? 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1455 (FRQNOPEN) F 79 FREQ - OPEN 0691E FE026931 1829 JEQ NOFCB jump if not 0691F DC405526 1830 CALLNP FREEULB free the saved one 06920 60D78800 3 6 BASE 1831 LD R3 SP,0 R3 => variables block 06921 FE0E6931 1832 JMP NOFCB 1833 * --- 1834 1835 * The FCB and ULB are to be freed. Also check for unlocking the directory 1836 00006922 1837 ZAPTHEM LABEL 06922 6116C803 4 3 BASE 1838 LD ULB R3,ULBADDR ULB => ULB 06923 FB30692B 4 1839 JZA ULB NOULB jump if no ULB to zap 06924 5C08C210 3 ZBM 1840 CMZ R3,DIRLOCKD is the directory locked? 06925 FE026928 1841 JEQ NOTLOCKD jump if not 06926 DC405521 1842 CALLNP FREEULBLK release the ULB, already locked 06927 FE0E6929 1843 JMP SAYULBGONE 1844 * --- 1845 00006928 1846 NOTLOCKD LABEL 06928 DC405526 1847 CALLNP FREEULB release the ULB 00006929 1848 SAYULBGONE LABEL 06929 60D78800 3 6 BASE 1849 LD R3 SP,0 R3 => variables block 0692A EC16C803 3 BASE 1850 STZ R3,ULBADDR remember no ULB 0000692B 1851 NOULB LABEL 0692B 5C16C802 3 BASE 1852 CMZ R3,FCBADDR is there an FCB to zap? 0692C FE026931 1853 JEQ NOFCB jump if nothing to free 0692D DC002F8F 1854 CALL FCFREEMEM release the storage 0692E 41440004 IMM 1855 PARV FCLOG 0692F 4056C802 3 BASE 1856 PARVL R3,FCBADDR 06930 EC16C802 3 BASE 1857 STZ R3,FCBADDR remember no FCB any more 1858 * \ / 1859 00006931 1860 NOFCB LABEL 06931 5C16C801 3 BASE 1861 CMZ R3,EQTADDR an EQT to free 06932 FE026937 1862 JEQ NOEQT jump if not 06933 DC002F5D 1863 CALL UFREEMEM free the EQT 06934 41440004 IMM 1864 PARV EQTEMPLOG 06935 4056C801 3 BASE 1865 PARVL R3,EQTADDR 06936 EC16C801 3 BASE 1866 STZ R3,EQTADDR 1867 * \ / 1868 00006937 1869 NOEQT LABEL 06937 5C16C805 3 BASE 1870 CMZ R3,FSPARAM a file spec block to free? 06938 FE02693D 1871 JEQ NOPARAM jump if not 06939 DC002F5D 1872 CALL UFREEMEM force the file spec block 0693A 41440006 IMM 1873 PARV FSPLOG 0693B 4056C805 3 BASE 1874 PARVL R3,FSPARAM 0693C EC16C805 3 BASE 1875 STZ R3,FSPARAM 1876 * \ / 1877 0000693D 1878 NOPARAM LABEL 0693D 60000414 0 1879 LD R0 CPCUPC current running process 0693E 5C080C10 0 ZBM 1880 CMZ R0,UPBACKUP is this backup? 0693F FE0C6942 1881 JNE NOTBACKUP jump if no backup privileges granted 06940 DC40315C 1882 CALLNP DMOTEWNDO1 attempt to conserve our disk writes 06941 FE0E6943 1883 JMP EXITNOW self-explanatory 1884 * --- 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1456 (FRQNOPEN) F 79 FREQ - OPEN 1885 00006942 1886 NOTBACKUP LABEL 06942 DC403150 1887 CALLNP GRUBWNDO1 if user, write the directory ASAP 1888 * \ / 1889 00006943 1890 EXITNOW LABEL 06943 60978801 2 6 BASE 1891 LD R2 SP,SAVER2 restore a reg 06944 62D78802 346 BASE 1892 LD2 R3 SP,STACKSAVE restore two regs 06945 5D1F8005 6 STAK 1893 LEAVE POP 1894 * --- 1895 1896 END of FREETEMPS 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1457 (FRQNOPEN) F 79 FREQ - OPEN 1898 1899 ********************************************************************************** 1900 * * 1901 * FNDSPLRULB. Find the spooler's privilege ULB. This routine * 1902 * searches the process list for the spooler's process and finds the * 1903 * ULB that goes with his privileges. This ULB is then busied and * 1904 * returned. Call: * 1905 * * 1906 * CALL FNDSPLRULB * 1907 * PARVL process number of the spooler * 1908 * JMP no spooler process * 1909 * ST ULB => priv ULB * 1910 * * 1911 * Gets R0 thru R4. * 1912 * Stack required = 5 * 1913 * 1 + max ( MAPINMEM (3), MAPOUTMEM (1), SRCHLIST (1), * 1914 * UNSRCHLIST (1), USEULB (4) * 1915 * * 1916 ********************************************************************************** 1917 1918 BLOCK 1919 ENTRY FNDSPLRULB 1920 1921 BEGFRAME 1922 ENDFRAME 1923 06946 DD1F8001 6 STAK 1924 FNDSPLRULB ENTR PUSH 06947 C052C000 3 REG 1925 STPVL R3 store the process of the spooler 06948 DC0030AA 1926 CALL SRCHLIST get access to proces list 06949 40001EB2 1927 PARL PCNTLLOCK 0694A 60801EB1 2 1928 LD R2 PCONTROL R2 => root of process list 0000694B 1929 NEXTPCB LABEL 0694B 64C880C3 3 2 ZBM 1930 CPR R3 R2,PCPROCNUM is this the process> 0694C FE026950 1931 JEQ THISISIT jump if so 0694D 60889F14 2 2 ZBM 1932 LD R2 R2,PCNXTCB move to the next element 0694E FAB2694B 2 1933 JNZA R2 NEXTPCB jump if there is a next 0694F FE0E695C 1934 JMP NOSPLR there is no spooler 1935 * --- 1936 00006950 1937 THISISIT LABEL 06950 61089F13 4 2 ZBM 1938 LD R4 R2,PCPSADRS R4 => PSA 06951 FB30695C 4 1939 JZA R4 NOSPLR jump if no process 06952 DC0025EB 1940 CALL MAPINMEM mapin to get access to the correct UPC 06953 40530000 4 REG 1941 PARVL R4 pointer to the PSA 06954 61090116 4 4 ZBM 1942 LD R4 R4,PSCURRPROC R4 => UPC 06955 61091F13 4 4 ZBM 1943 LD ULB R4,UPCPRIVULB ULB => privilege ULB 06956 DC4025FC 1944 CALLNP MAPOUTMEM reset page map values 06957 DC0025EB 1945 CALL MAPINMEM re-map original requester 06958 40400412 1946 PARVL CPPSA current PSA pointer 06959 FB30695C 4 1947 JZA ULB NOSPLR 0695A DC405569 1948 CALLNP USEULB make the ULB busy 0695B 19C40001 7 IMM 1949 ADD R7 1 success return 1950 * \ / 1951 0000695C 1952 NOSPLR LABEL 0695C DC0030B7 1953 CALL UNSRCHLIST release the process list 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1458 (FRQNOPEN) F 79 FREQ - OPEN 0695D 40001EB2 1954 PARL PCNTLLOCK 0695E 5D1F8001 6 STAK 1955 LEAVE POP 1956 * --- 1957 1958 END of FNDSPLRULB 1959 1960 END of FRNOPEN 131 INPUT FRQWRITE write to lun processor 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1459 (FRQWRITE) F 80 FREQ - Write Processor 3 4 WRITE BLOCK Write FREQ Routines 5 6 ENTRY CLRPTHEXCWR clear exclusive write flag 7 ENTRY FREQWRITE write request 8 ENTRY INITWRITE initialize variables for writing 9 ENTRY PLACEEOD place and EOD in a SAF 10 ENTRY PREPAREWR repare a .SAF for write 11 ENTRY PUTRECHEAD place record header in a SAF 12 ENTRY PUTSAFREC put a record into a SAF 13 ENTRY PVCBIN previous record on .TERM was binary 14 ENTRY RAFCURCHEK 15 ENTRY RAFEXPAND make a small raf into a large one 16 ENTRY RESSAFPOS reset position in a SAF 17 ENTRY RTBIN .TERM record type of binary 18 ENTRY RTINPUT .TERM record type of input 19 ENTRY SAFWRITE SAF write entry 20 ENTRY TERMAFORMR after record terminal control characters 21 ENTRY TERMBFORMR before record terminal control characters 22 ENTRY WFMPATH write a filemark onto a PATH 23 ENTRY WSEEK position a RAF for writing 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1460 (FRQWRITE) F 80 FREQ - Write Processor 25 26 ********************************************************************************** 27 * * 28 * File request that writes user information into a lun. Call: * 29 * * 30 * LD R0 * 31 * LD R1 bytecount * 32 * LD R2 buffer address * 33 * FREQ lun * 34 * * 35 * and it returns with R0=new status (possibly with error) * 36 * and R1 thru R7 unchanged. * 37 * * 38 * The interrupt processor sets up the registers as follows: * 39 * SP => return address stack * 40 * FCB = R5 => lunlist element if it exists * 41 * condition bits = EQ if lun exists * 42 * R4 => CA of trapper * 43 * R3 = operand of instruction (lun number) * 44 * R2 = sub-operation code * 45 * Stack required = 21 ( plus write setup from INITWRITE ) * 46 * 0 + max ( CODEWRITE (21), FERRORILOP (3), LPTWRITE (11), * 47 * MTWRITE (9), NULLWRITE (17), PATHWRITE (8), * 48 * SAFWRITE (17), TTYWRITE (8) ) * 49 * * 50 ********************************************************************************** 51 52 BLOCK FREQWRITE routine 53 ENTRY FREQWRITE 54 0000695F 55 FREQWRITE LABEL 0695F DC406975 56 CALLNP INITWRITE init vars, stack, and regs 06960 EDC97215 5 ZBM 57 STW FCB,FCOPWRITE indicate last op a write 06961 60096665 0 5 ZBM 58 LD R0 FCB,FCHTYPE get hardware type of device 06962 64040010 0 IMM 59 CPR R0 HTYPELAST is this a known device? 06963 FE0659A5 60 JGE ILLWRITE illegal write if not 06964 5CA06965 0 61 LDPC HTWRITE(R0) goto processing routine 62 * --- 63 * routines entered with: 64 * R2 = record type 65 * R3 => dynamic status of lun 66 * R4 => limit block of device owner 67 * R5 => FCB 68 * R6 = SP => stack top 69 00006965 70 HTWRITE LABEL 06965 000059A5 71 ADR ILLWRITE 06966 000069DB 72 ADR SAFWRITE .SAF 06967 00006AF4 73 ADR RAFWRITE .RAF 06968 00006AF4 74 ADR CODEWRITE .CODE 06969 00006CF4 75 ADR PATHWRITE .PATH 0696A 000059A5 76 ADR ILLWRITE .DIR 0696B 000069F1 77 ADR NULLWRITE .NULL 0696C 00006D8E 78 ADR TTYWRITE .TTY 0696D 000059A5 79 ADR ILLWRITE formerly .LOCK 0696E 000069DB 80 ADR TASKWRITE .TASK 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1461 (FRQWRITE) F 80 FREQ - Write Processor 0696F 000059A5 81 ADR ILLWRITE .CDR 06970 00006E5C 82 ADR LPTWRITE .LP 06971 00006E93 83 ADR MTWRITE .MT 06972 00006E93 84 ADR MTWRITE .CT 06973 000059A5 85 ADR ILLWRITE .VOL 06974 00006E93 86 ADR MTWRITE .VT 87 * table must contain all legal entries 88 89 90 ********************************************************************************** 91 * * 92 * Error routines for WRITE * 93 * * 94 ********************************************************************************** 95 000059A5 96 ILLWRITE EQU FERRORILOP 97 98 END FREQWRITE routine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1462 (FRQWRITE) F 80 FREQ - Write Processor 100 101 ********************************************************************************** 102 * * 103 * INITWRITE * 104 * Routine that does the set up for the write requests. This routine: * 105 * * 106 * 1) makes sure the unit is opened * 107 * 2) makes sure the write access is allowed * 108 * 3) allocates the write temp area on the stack * 109 * 4) copies the requester's parameters into the temp area * 110 * 5) checks the parameters for being in bounds * 111 * * 112 * Calling sequence is: * 113 * * 114 * LD SP => top of stack * 115 * LD FCB => FCB of device to write on * 116 * LD R4 => console area of requester * 117 * LD R2 XREQ sub operation code * 118 * CALLNP INITWRITE * 119 * ST R3 dynamic status of unit * 120 * ST R2 record type * 121 * ST ULB => file's user limit block * 122 * SP,COREADR = address of first byte of record * 123 * SP,IRGWORD = inner record gap word for record to write * 124 * SP,COPYCNT = length of the record in bytes * 125 * FCB,FCRELOC = relocation bit for where the record is * 126 * Stack required. This routine allocates a RWSTKSIZ word * 127 * chunk of stack and initializes it. * 128 * * 129 ********************************************************************************** 130 131 BLOCK INITWRITE subroutine 132 ENTRY INITWRITE 133 00006975 134 STAKPROTO BASE SP define stack area 135 BSS 1 location for callers R7 136 DRCT 00000001 ABS 137 INITWRITES EQU DISPW STAKPROTO specify size of stack 00000001 DISP 138 D EQU DISP STAKPROTO specify offset for outer references 139 ORG STAKPROTO reclaim space used by the prototype 140 06975 DD5F8008 6 STAK 141 INITWRITE ENTRNP STAK SP,(INITWRITES+RWSTKSIZ) 06976 FB7059B8 5 142 JZA FCB FERRORLNE3 jump if lun not equipped 06977 5C095C15 5 ZBM 143 CMZ FCB,FCACCESS/FSACSNWB examine no write bit 06978 FE0C59AC 144 JNE FERRORPFM jump if no writing allowed 06979 60C94455 3 5 ZBM 145 LD R3 FCB,FCDYNSTAT fetch the dynamic status 0697A 60CAD600 3 3 CBM 146 LD R3 R3*FCDSTATPLC move dynamic status to proper bit position 147 * \ / 148 149 ********************************************************************************** 150 * * 151 * Fetch the user's parameters * 152 * * 153 ********************************************************************************** 154 0697B EC178801 6 BASE 155 STZ SP,D/IRGWORD make IRGWORD virgin 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1463 (FRQWRITE) F 80 FREQ - Write Processor 0697C 60170804 0 4 BASE 156 LD R0 R4,CAR2 fetch the users buffer address 0697D 38160000 0 0 CACH 157 LEA R0 CACH R0,0 convert to a character pointer 0697E E4178803 0 6 BASE 158 ST R0 SP,D/COREADR and save for later use 0697F 78840007 2 IMM 159 AND R2 07 only user record type 06980 E4899041 2 6 ZBM 160 ST R2 SP,D/IRGRTYP get the record type 06981 60170803 0 4 BASE 161 LD R0 R4,CAR1 06982 68020010 0 IMM 162 UCPR R0 NPS*CPP check for too many characters 06983 FE0659B0 163 JGE FERRORPOB 06984 E4099B31 0 6 ZBM 164 ST R0 SP,D/IRGRLEN get the record length 06985 E4178802 0 6 BASE 165 ST R0 SP,D/COPYCNT 06986 5C093211 4 ZBM 166 CMZ R4,CAMSR/MSRFRELOCB check the operand fetch relocation 06987 ED895A10 5 ZBM 167 STLNE FCB,FCRELOC save the relocation locally 06988 61095114 4 5 ZBM 168 LD ULB FCB,FCLIMITPTR get pointer to user limit block 06989 60174808 0 5 BASE 169 LD R0 FCB,FCCPP get position... 0698A 60574801 1 5 BASE 170 LD R1 FCB,FCBLOCK ...and block and... 0698B E6178805 016 BASE 171 ST2 R0 SP,D/RWERINFO ...save for error recovery 0698C 5D1F8001 6 STAK 172 LEAVE STAK SP,INITWRITES 173 * --- 174 175 END INITWRITE subroutine 132 INPUT FRQSWRITE sequential write 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1464 (FRQSWRITE) F 81 Sequential Write 3 4 ********************************************************************************** 5 * * 6 * All file types except for CODE may be written sequentially. For * 7 * all other file types except RAF, "sequential" reads/writes are * 8 * identical to their normal counterparts. RAFs, then, are the * 9 * only files that are treated specially by these requests. * 10 * * 11 * A sequential RAF write begins at the current position (CPP) and * 12 * continues for the specified number of bytes. An ASCII line-feed * 13 * (LF) is appended and the CPP is set to the following byte * 14 * position (i.e. after the LF). The end position pointer (EPP) * 15 * is set to the maximum of the EPP and CPP. * 16 * * 17 * The RAF record type is "binary" regardless of how the file was * 18 * written to. The sequential write requests allow for type only for * 19 * compatibility when switching to a normal request for non-RAF units. * 20 * * 21 * Disk errors cause the FCLASTREAD to say "abnormal end of data" * 22 * and the XREQERFAU error is returned. * 23 * * 24 * Operations on sequential RAFs: * 25 * * 26 * Read (see FRSREAD FREQ comments). * 27 * SEOD sets CPP = EPP. * 28 * Release sets EPP=CPP=0. * 29 * Rewind sets CPP=0, EPP unchanged. * 30 * FWSP sets CPP to the beginning of the next record. * 31 * BKSP sets CPP to the beginning of the previous record. * 32 * Position clears the at EOD bits. * 33 * * 34 * Call: * 35 * LD R0 FRSWRITE + * 36 * LD R1 * 37 * LD R2 * 38 * FREQ * 39 * JLTZ R0 * 40 * ST R0 * 41 * ST R1 * 42 * * 43 * Stack required = 21 ( plus write setup from INITWRITE ) * 44 * 0 + max ( DMOTEWNDO1 (7), GRUBWNDO1 (7), RSEEK (10), * 45 * SETMEMTRAP (1), SETWNDO1 (4), WSEEK (21) ) * 46 * * 47 ********************************************************************************** 48 49 BLOCK SEQWRITE routine 50 ENTRY FREQSEQWRT 51 0000698D 52 FREQSEQWRT LABEL 0698D FB7059BA 5 53 JZA FCB FERRORNSL better have a unit opened 0698E 60096665 0 5 ZBM 54 LD R0 FCB,FCHTYPE get what type of file we are dealing with 0698F 64040003 0 IMM 55 CPR R0 HTYPECODE is it a code file? 06990 FE0259A5 56 JEQ FERRORILOP can't write sequentially on a code file 06991 64040002 0 IMM 57 CPR R0 HTYPERAF is it a RAF? 06992 FE0C695F 58 JNE FREQWRITE if not go process like a normal write 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1465 (FRQSWRITE) F 81 Sequential Write 06993 FA8C59A5 2 59 JNEZ R2 FERRORILOP we don't want subops 60 * \ / 61 06994 DC406975 62 CALLNP INITWRITE set up our stack 06995 DC005BCF 63 CALL SETMEMTRAP place to go if user memory error 06996 40005B63 64 PARL PASSERRW1 PASSERRUP and grub window 1 06997 DC006B31 65 CALL WSEEK position the RAF 06998 410069D3 66 PAR SEQWRDERR 06999 40574808 5 BASE 67 PARVL FCB,FCCPP 0699A FE0E5983 68 JMP FERROR rtn1: limit violation 69 * \ / 70 0000699B 71 SEQWRITW LABEL 0699B DC003205 72 CALL SETWNDO1 get the data page in 0699C 41440000 IMM 73 PARV VPCNTLW want write access to it 0699D 41534000 5 REG 74 PARV FCB indicate lun associated with block 0699E 410069D3 75 PAR SEQWRDERR error address 0699F 41574801 5 BASE 76 PARV FCB,FCBLOCK the block we want 069A0 4044000F IMM 77 PARVL FBITRAFD type is RAF data block 069A1 704968C8 1 5 ZBM 78 LDN R1 FCB,FCCBYTE negate offset of final byte in block 069A2 18441000 1 IMM 79 ADD R1 CPP calculate unused size 069A3 50578801 1 6 BASE 80 MIN R1 SP,COPYCNT don't want more than this 069A4 E4578800 1 6 BASE 81 ST R1 SP,FCRTEMP save the bytes to be moved 069A5 608968C8 2 5 ZBM 82 LD R2 FCB,FCCBYTE get the byte location in the block 069A6 608ABC00 2 2 CBM 83 LD R2 R2*FLDCHARS turn into a byte pointer 069A7 18840800 2 IMM 84 ADD R2 ADR WNDO1 calculate the addr of first byte 069A8 60178802 0 6 BASE 85 LD R0 SP,COREADR get the user's source address 069A9 5C095A10 5 ZBM 86 CMZ FCB,FCRELOC see where the data is 069AA FE0C69AC 87 JNE RELOCIT jump if data in monitor space 069AB 59840040 IMM 88 CLBMSR MSRFRELOC else, make data fetch from user side 000069AC 89 RELOCIT LABEL 069AC FE400000 90 CMOVE move the bytes 069AD 59C40040 IMM 91 IORMSR MSRFRELOC restore monitor fetching 069AE E4178802 0 6 BASE 92 ST R0 SP,COREADR save the new source address 069AF 60D78800 3 6 BASE 93 LD R3 SP,FCRTEMP get the number of bytes moved 069B0 B0D78801 3 6 BASE 94 RSBM R3 SP,COPYCNT remove moved from requested 069B1 18D74808 3 5 BASE 95 ADD R3 FCB,FCCPP calculate new position in RAF 069B2 5C178801 6 BASE 96 CMZ SP,COPYCNT is there any more to move? 069B3 FE0269B9 97 JEQ SEQWRITDN jump if not 069B4 DC006B31 98 CALL WSEEK move in the RAF 069B5 410069D4 99 PAR SEQWRDERS give error address 069B6 4052C000 3 REG 100 PARVL R3 give destination 069B7 FE0E69D8 101 JMP SEQXPNDERR (rtn1: limit exception) 069B8 FE0E699B 102 JMP SEQWRITW go move some more 103 * --- 104 105 ********************************************************************************** 106 * * 107 * The record has been written. Tack on the terminating * 108 * LF, update current position pointer and end position pointer, * 109 * then exit. * 110 * * 111 ********************************************************************************** 112 000069B9 113 SEQWRITDN LABEL 069B9 5C0AE8C0 3 CBM 114 CMZ R3/BYTEDISP see if we ran off the page 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1466 (FRQSWRITE) F 81 Sequential Write 069BA FE0C69C7 115 JNE PUTINLF if not then there is room for the terminator 116 * \ / 117 069BB DC006B31 118 CALL WSEEK set up to put in the LF 069BC 410069D4 119 PAR SEQWRDERS give error address 069BD 4052C000 3 REG 120 PARVL R3 give destination 069BE FE0E69D8 121 JMP SEQXPNDERR (rtn1: limit exception) 122 * \ / 123 069BF DC003205 124 CALL SETWNDO1 get the data page in 069C0 41440000 IMM 125 PARV VPCNTLW want write access to it 069C1 41534000 5 REG 126 PARV FCB indicate lun associated with block 069C2 410069D3 127 PAR SEQWRDERR error address 069C3 41574801 5 BASE 128 PARV FCB,FCBLOCK the block we want 069C4 4044000F IMM 129 PARVL FBITRAFD type is RAF data block 069C5 60D74808 3 5 BASE 130 LD R3 FCB,FCCPP restore the current position pointer 069C6 60840800 2 IMM 131 LD R2 ADR WNDO1 R2 -> where to put the LF 132 * \ / 133 134 * R2 -> next byte position, R3 = CPP 000069C7 135 PUTINLF LABEL 069C7 6044000A 1 IMM 136 LD R1 LF add in the LF 069C8 E4568000 1 2 CACH 137 ST R1 CACH R2,0 tack it on 138 069C9 DC0070CD 139 CALL RSEEK position file 069CA 410069D4 140 PAR SEQWRDERS mass storage error address 069CB 4056D001 3 REG 141 PARVL R3+1 new seek address (beyond the LF) 069CC DC40315C 142 CALLNP DMOTEWNDO1 free the window 143 144 * Update the end position pointer. 069CD 60174807 0 5 BASE 145 LD R0 FCB,FCEPP get the end position pointer 069CE 58C40010 IMM 146 IORPSR PSRMODIF magical math time 069CF 54174808 0 5 BASE 147 MAX R0 FCB,FCCPP unsigned max with the current position 069D0 58840010 IMM 148 CLBPSR PSRMODIF turn off the magic 069D1 E4174807 0 5 BASE 149 ST R0 FCB,FCEPP update the end position pointer 069D2 FE0E69F1 150 JMP NULLWRITE go to common exit 151 * --- 152 153 ********************************************************************************** 154 * * 155 * A disk error while writing into the RAF. Say in core pointers * 156 * are not good and return the error to the user. * 157 * * 158 ********************************************************************************** 159 000069D3 160 SEQWRDERR LABEL 069D3 DC403150 161 CALLNP GRUBWNDO1 clean out buffer 000069D4 162 SEQWRDERS LABEL 069D4 EDC95C16 5 ZBM 163 STW FCB,FCRESEEK in-core pointers not good 069D5 60C4000B 3 IMM 164 LD R3 FILAEOD get appropriate status bit 069D6 E4C94445 3 5 ZBM 165 ST R3 FCB,FCLASTREAD the last read was with error 069D7 FE0E59AA 166 JMP FERRORFAU file is bad 167 * --- 168 169 ********************************************************************************** 170 * * 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1467 (FRQSWRITE) F 81 Sequential Write 171 * The user ran out of disk space while expanding to a large * 172 * RAF. Grub window 1 before returning the error. * 173 * * 174 ********************************************************************************** 175 000069D8 176 SEQXPNDERR LABEL 069D8 61D20000 7 0 REG 177 LD R7 R0 save the error code 069D9 DC403150 178 CALLNP GRUBWNDO1 069DA FE0E5997 179 JMP FERROR7 report the error 180 * --- 181 182 END of SEQWRITE routine 133 INPUT FRQWRSAF write to sequential file 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1468 (FRQWRSAF) F 82 FREQ - Write Processor (.SAF) 3 4 BLOCK SAF Write Processor 5 6 ENTRY NULLWRITE write onto .NULL 7 ENTRY PLACEEOD place an EOD into a .SAF 8 ENTRY PREPAREWR prepare .SAF for write 9 ENTRY PUTRECHEAD place record header into a .SAF 10 ENTRY PUTSAFREC put record in a SAF 11 ENTRY RESSAFPOS restore previous position 12 ENTRY SAFWRITE write a record into a .SAF 13 ENTRY TASKWRITE write a record into a .TASK 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1469 (FRQWRSAF) F 82 FREQ - Write Processor (.SAF) 15 16 ********************************************************************************** 17 * * 18 * This FREQ writes a user record into a sequential * 19 * file. The record is copied out of the callers memory. * 20 * The form of the request is: * 21 * LD R0 FRWRITE+record type * 22 * LD R1 * 23 * LD R2 =>first character in buffer * 24 * FREQ lun * 25 * JLTZ R0 request error * 26 * ST R0 * 27 * * 28 * Stack required (beyond initial stack) = 17 * 29 * 0 + max (DMOTEWNDO1 (7), PLACEEOD (0), PREPAREWR (11), * 30 * PUTSAFREC (17), SETMEMTRAP (1) ) * 31 * * 32 ********************************************************************************** 33 34 BLOCK SAFWRITE, TASKWRITE, NULLWRITE routines 35 ENTRY SAFWRITE 36 ENTRY TASKWRITE 37 ENTRY NULLWRITE 38 000069DB 39 SAFWRITE LABEL 000069DB 40 TASKWRITE LABEL 069DB DC005BCF 41 CALL SETMEMTRAP place to go if user memory error 069DC 40005B63 42 PARL PASSERRW1 PASSERRUP and grub window 1 069DD 60095835 0 5 ZBM 43 LD R0 FCB,FCACCESS get the type of access 069DE 64040002 0 IMM 44 CPR R0 FSACSAO is this an append only file? 069DF FE0C69E8 45 JNE NOSKIPAO definitely not 069E0 F2E069E2 3 46 JBF R3/FDSTATRTYP/FILSFLAGB SKIPAO jump if not system record type 069E1 F2E669E8 3 47 JBF R3/FDSTATRTYP/FILEODB NOSKIPAO don't do it if already at EOD 000069E2 48 SKIPAO LABEL 069E2 60D78800 3 6 BASE 49 LD R3 SP,IRGWORD save record attributes 069E3 60040014 0 IMM 50 LD R0 FRSEOD 069E4 81524000 1 REG 51 STCAR R1 get access to unit # in console area 069E5 0896480E 1 BASE 52 FREQ R1,CAXOPERAND skip to the end of data 069E6 FA0859A9 0 53 JLTZ R0 FERRORFAUR only error is bad file 069E7 E4D78800 3 6 BASE 54 ST R3 SP,IRGWORD restore record attributes to SP 000069E8 55 NOSKIPAO LABEL 56 * \ / 57 * calculate the new length of the file and check for limiting 069E8 60099B30 0 6 ZBM 58 LD R0 SP,IRGRLEN get the length of the present record 069E9 DC406AC3 59 CALLNP PREPAREWR prepare the file for writing 60 * \ / 069EA DC4069FA 61 CALLNP PUTSAFREC place record into the file 069EB FE0E5983 62 JMP FERROR bail out on error 069EC 60094148 0 5 ZBM 63 LD R0 FCB,FCCBLK get current relative position 069ED 18040001 0 IMM 64 ADD R0 1 add one since first block is number zero 069EE E4094182 0 5 ZBM 65 ST R0 FCB,FCTFL save new length of file 069EF DC406AE9 66 CALLNP PLACEEOD put down an end-of-data 069F0 DC40315C 67 CALLNP DMOTEWNDO1 unmap the window 68 * \ / 69 000069F1 70 NULLWRITE LABEL entry for bit bucket write 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1470 (FRQWRSAF) F 82 FREQ - Write Processor (.SAF) 069F1 60040009 0 IMM 71 LD R0 FILNEOD get the EOD status bit 069F2 E4094445 0 5 ZBM 72 ST R0 FCB,FCLASTREAD indicate at EOD after write 069F3 EC094C15 5 ZBM 73 STZ FCB,FCLOADPT definitely not at load point 069F4 60400412 1 74 LD R1 CPPSA process status area 069F5 60485F11 1 1 ZBM 75 LD R1 R1,PSCACHNP1 callers console area 069F6 EC164803 1 BASE 76 STZ R1,CAR1 indicate whole buffer written 069F7 60178802 0 6 BASE 77 LD R0 SP,COREADR get ending address 069F8 E4164804 0 1 BASE 78 ST R0 R1,CAR2 update requesters buffer pointer 069F9 FE0E5982 79 JMP FNOERROR exit to caller 80 * --- 81 82 END SAFWRITE, TASKWRITE, NULLWRITE routines 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1471 (FRQWRSAF) F 82 FREQ - Write Processor (.SAF) 84 85 ********************************************************************************** 86 * * 87 * PUTSAFREC * 88 * Routine that copys a record from memory into an initialized SAF. * 89 * Headers and trailers are added to the record. This is a rather * 90 * internal routine requiring lots of set up. Call: * 91 * * 92 * LD SP =>write temp area * 93 * LD FCB =>file control block * 94 * CALLNP PUTSAFREC * 95 * JMP FERROR * 96 * (window 1 mapped with the last data block) * 97 * * 98 * * 99 * Stack required = 17 * 100 * 2 + max (DMOTEWNDO1 (7), FREEFILE (3), GRUBWNDO1 (7), * 101 * LIMITCHECK (1), MAPOUTFBI (2), PLACEEOD (0), * 102 * PUTRECHEAD (15), SETWNDO1 (3), WFILEMOVE(13), * 103 * WSXCLNALL (10) * 104 * * 105 ********************************************************************************** 106 107 BLOCK PUTSAFREC subroutine 108 ENTRY PUTSAFREC copy record into SAF blocks 109 00000001 ABS 110 PUTSAFERC EQU 1 place on stack to save error code 00000002 ABS 111 PUTSAFRECS EQU 2 size of stack area used 00000002 ABS 112 D EQU PUTSAFRECS used to offset stack references 113 069FA DD5F8002 6 STAK 114 PUTSAFREC ENTRNP STAK SP,PUTSAFRECS 069FB DC003205 115 CALL SETWNDO1 map in the current data block 069FC 41440000 IMM 116 PARV VPCNTLW specify read/write 069FD 41534000 5 REG 117 PARV FCB indicate lun associated with block 069FE 41006A22 118 PAR SAFWERFAU indicate error address 069FF 41574801 5 BASE 119 PARV FCB,FCBLOCK pass MS address 06A00 4044000C IMM 120 PARVL FBITSAF type of block expected 06A01 5C000800 121 CMZ WNDO1 get disk error before tied up in knots 06A02 60578802 1 6 BASE 122 LD R1 SP,D/IRGWORD get the header 06A03 DC406A4E 123 CALLNP PUTRECHEAD place the record header 06A04 FE0E6A22 124 JMP SAFWERFAU mass storage error 06A05 FE0E6A48 125 JMP SAFWEROOS out of storage 126 * \ / 127 00006A06 128 MOVEON LABEL 06A06 704968C8 1 5 ZBM 129 LDN R1 FCB,FCCBYTE get the current position 06A07 18441000 1 IMM 130 ADD R1 CPP calculate characters left in this page 06A08 50578803 1 6 BASE 131 MIN R1 SP,D/COPYCNT 06A09 FA426A17 1 132 JEQZ R1 NOMOVE jump if nothing (remains) to move 06A0A 60D24000 3 1 REG 133 LD R3 R1 copy the move count 06A0B 608968C8 2 5 ZBM 134 LD R2 FCB,FCCBYTE get the current position in this block 06A0C 608ABC00 2 2 CBM 135 LD R2 R2*FLDCHARS make into word pointer 06A0D 18840800 2 IMM 136 ADD R2 ADR WNDO1 calculate destination in file 06A0E 60178804 0 6 BASE 137 LD R0 SP,D/COREADR get source in callers memory 06A0F 5C095A10 5 ZBM 138 CMZ FCB,FCRELOC is the caller in monitor space? 06A10 FE0C6A12 139 JNE MONTANA jump if it is a monitor request 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1472 (FRQWRSAF) F 82 FREQ - Write Processor (.SAF) 06A11 59840040 IMM 140 CLBMSR MSRFRELOC relocate fetching to users memory 141 * \ / 142 00006A12 143 MONTANA LABEL 06A12 FE400000 144 CMOVE move the characters 06A13 59C40040 IMM 145 IORMSR MSRFRELOC restore monitor fetching 06A14 E4178804 0 6 BASE 146 ST R0 SP,D/COREADR remember where to start next time 06A15 B0D78803 3 6 BASE 147 RSBM R3 SP,D/COPYCNT reduce the record remaining count 148 * \ / 149 150 ********************************************************************************** 151 * * 152 * Now check for transfer done. If the count remaining is * 153 * zero, then we place the end of record header (footer). If * 154 * more record remains, then we move forward ( creating a new * 155 * block on the end of the file ) and then loop to do more copying. * 156 * * 157 ********************************************************************************** 158 159 * \ / 06A16 6052C000 1 3 REG 160 LD R1 R3 00006A17 161 NOMOVE LABEL 06A17 DC406A71 162 CALLNP WFILEMOVE move and create a new block 06A18 00006A22 163 ADR SAFWERFAU MS error address 06A19 FE0E6A48 164 JMP SAFWEROOS out of storage error 06A1A 5C178803 6 BASE 165 CMZ SP,D/COPYCNT is there any record left? 06A1B FE0C6A06 166 JNE MOVEON back to continue moving the record 167 168 * The record has been copied - lay down the footer 06A1C 60578802 1 6 BASE 169 LD R1 SP,D/IRGWORD get the footer (same as header) 06A1D DC406A4E 170 CALLNP PUTRECHEAD place end of record header 06A1E FE0E6A22 171 JMP SAFWERFAU MS error address 06A1F FE0E6A48 172 JMP SAFWEROOS out of storage 06A20 19C40001 7 IMM 173 ADD R7 1 skip over error return 06A21 5D1F8002 6 STAK 174 LEAVE STAK SP,PUTSAFRECS 175 * --- 176 177 ********************************************************************************** 178 * * 179 * The stupid disk went bad on us, so we have to reposition * 180 * the file to where it was in the beginning and fob the problem * 181 * off on the user. Note the recovery process involves the * 182 * following: resetting current position pointers, restoring * 183 * the file lengths and account limits, placing an EOD at the * 184 * file end, and freeing any blocks containing partial records. * 185 * I think that just about covers it. * 186 * * 187 ********************************************************************************** 188 00006A22 189 SAFWERFAU LABEL 06A22 6004000B 0 IMM 190 LD R0 FILAEOD get an abnormal end of data status 06A23 E4094445 0 5 ZBM 191 ST R0 FCB,FCLASTREAD and indicate last record seriously ill 06A24 60040089 0 IMM 192 LD R0 XREQERFAU error to give to the caller 193 * \ / 194 00006A25 195 SAFWERSHR LABEL 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1473 (FRQWRSAF) F 82 FREQ - Write Processor (.SAF) 06A25 E4178801 0 6 BASE 196 ST R0 SP,PUTSAFERC save the error code 06A26 62178806 016 BASE 197 LD2 R0 SP,D/RWERINFO retrieve the old positions 06A27 E4174808 0 5 BASE 198 ST R0 FCB,FCCPP set the current relative position 06A28 E4574801 1 5 BASE 199 ST R1 FCB,FCBLOCK restore old MS address, too 06A29 604A0140 1 0 CBM 200 LD R1 R0/SAFBLKNUM relative block number 06A2A 18440001 1 IMM 201 ADD R1 1 account for first one being zero 06A2B E4494182 1 5 ZBM 202 ST R1 FCB,FCTFL reset file length 06A2C 60800412 2 203 LD R2 CPPSA process status area 06A2D 60889F11 2 2 ZBM 204 LD R2 R2,PSCACHNP1 requesters console area 06A2E 18168803 0 2 BASE 205 ADD R0 R2,CAR1 add record length 06A2F 18041006 0 IMM 206 ADD R0 6+CPP account for headers and first block being zero 06A30 104A0140 1 0 CBM 207 SUB R1 R0/SAFBLKNUM blocks need for current record 06A31 61095114 4 5 ZBM 208 LD ULB FCB,FCLIMITPTR account of file owner 06A32 DC405C7B 209 CALLNP LIMITCHECK call to remove space from ULB 06A33 00131108 210 HALT HALTS1108 LIMITCHECK gave bogus return 211 * \ / 06A34 DC003205 212 CALL SETWNDO1 get the old data block back 06A35 41440002 IMM 213 PARV VPCNTLW+VPCNTLLK writable and locked 06A36 41534000 5 REG 214 PARV FCB indicate lun associated with block 06A37 41006A4A 215 PAR SAFWERDSE error here just bungs out 06A38 41574801 5 BASE 216 PARV FCB,FCBLOCK specify the MS address 06A39 4044000C IMM 217 PARVL FBITSAF indicate type of FBI expected 06A3A 61089180 4 2 ZBM 218 LD R4 R2,FBIFLINK get forward link, if any 06A3B EC089180 2 ZBM 219 STZ R2,FBIFLINK indicate no blocks to follow 06A3C DC40261B 220 CALLNP MAPOUTFBI unmap FBI window 06A3D DC406AE9 221 CALLNP PLACEEOD place an EOD there 06A3E DC40315C 222 CALLNP DMOTEWNDO1 unmap the window 06A3F FB026A46 4 223 JEQZ R4 SAFWERXIT if no blocks to free, just return 06A40 DC4032EA 224 CALLNP WSXCLNALL remove file pages from working set 06A41 60094081 0 5 ZBM 225 LD R0 FCB,FCDRIVE drive file resides on 06A42 E40B0080 0 4 CBM 226 ST R0 R4/VOLFIELD combine with disk address 06A43 DC004FEA 227 CALL FREEFILE release unwanted file pages 06A44 41530000 4 REG 228 PARV R4 root of the structure 06A45 4044000C IMM 229 PARVL FBITSAF structure type is SAF 230 * \ / 231 00006A46 232 SAFWERXIT LABEL 06A46 60178801 0 6 BASE 233 LD R0 SP,PUTSAFERC retrieve the error code 06A47 5D1F8002 6 STAK 234 LEAVE STAK SP,PUTSAFRECS return to error return 235 * --- 236 237 * The volume is out of storage - pass the error off to the user 00006A48 238 SAFWEROOS LABEL 06A48 6004009D 0 IMM 239 LD R0 XREQERNFSV 'no free storage on volume' 06A49 FE0E6A25 240 JMP SAFWERSHR share code with other errors 241 * --- 242 243 * Disk error during error recovery, what's the world comming to 00006A4A 244 SAFWERDSE LABEL 06A4A DC40261B 245 CALLNP MAPOUTFBI FBI window unneeded 06A4B DC403150 246 CALLNP GRUBWNDO1 unmap window 06A4C 6004009F 0 IMM 247 LD R0 XREQERDSE disk structure error 06A4D 5D1F8002 6 STAK 248 LEAVE STAK SP,PUTSAFRECS return to error return 249 * --- 250 251 END PUTSAFREC subroutine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1474 (FRQWRSAF) F 82 FREQ - Write Processor (.SAF) 253 254 ********************************************************************************** 255 * * 256 * PUTRECHEAD * 257 * Routine that puts the three character long header that * 258 * is before and after each record in a sequential file. It * 259 * picks up the word from FCB,IRGWORD and it moves the three * 260 * characters (calling WFILEMOVE if necessary) into the mass * 261 * storage block in window 1. It assumes the current block * 262 * is mapped into window 1 and it will return with the current * 263 * position pointer moved past the new record header and the * 264 * current data block mapped into window 1. No check is made * 265 * for limits when extending the file. This must be done by * 266 * the caller! Call: * 267 * LD R1
* 268 * LD SP * 269 * LD FCB => file control block * 270 * CALLNP PUTRECHEAD * 271 * JMP * 272 * JMP * 273 * Eats R0 thru R3 * 274 * Stack required = 15. * 275 * 3 + max ( SETERRW1 (1), WFILEMOVE (12) ) * 276 * * 277 ********************************************************************************** 278 279 BLOCK PUTRECHEAD subroutine 280 ENTRY PUTRECHEAD 281 282 BEGFRAME 00178801 6 BASE 283 PUTRECHDR4 BSS 1 R4 save 00178802 6 BASE 284 PUTRHIRG BSS 1 holds header being layed down 285 ENDFRAME 286 06A4E DD5F8003 6 STAK 287 PUTRECHEAD ENTRNP PUSH 06A4F 600968C8 0 5 ZBM 288 LD R0 FCB,FCCBYTE get displacement within page 06A50 64040FFD 0 IMM 289 CPR R0 CPP-3 will whole header fit within page? 06A51 FE066A59 290 JGE SLOWMETHOD jump if not - do it one at a time 06A52 600A3C00 0 0 CBM 291 LD R0 R0*FLDCHARS convert char position to word pointer 06A53 18040800 0 IMM 292 ADD R0 ADR WNDO1 R0 now points to the first character 06A54 E4480180 1 0 ZBM 293 ST R1 ZBM R0,0/BITS 0:23 place header in buffer 06A55 60040003 0 IMM 294 LD R0 3 load the header size 06A56 98174808 0 5 BASE 295 ADDM R0 FCB,FCCPP advance the current position beyond header 00006A57 296 PUTRECXOK LABEL 06A57 61D7D002 7 7 REG 297 LD R7 R7+2 skip the two loser returns 00006A58 298 PUTRECEXIT LABEL 06A58 5D1F8003 6 STAK 299 LEAVE POP return to the caller 300 * --- 301 302 ********************************************************************************** 303 * Either the header or the current position pointer will * 304 * move over the block boundary so we do this the slow * 305 * way so that the proper page will get mapped. * 306 ********************************************************************************** 307 00006A59 308 SLOWMETHOD LABEL 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1475 (FRQWRSAF) F 82 FREQ - Write Processor (.SAF) 06A59 E4578802 1 6 BASE 309 ST R1 SP,PUTRHIRG save IRG data 06A5A E5178801 4 6 BASE 310 ST R4 SP,PUTRECHDR4 save R4 06A5B 61040002 4 IMM 311 LD R4 3-1 number of chars to move 00006A5C 312 NXTHDBYTE LABEL 06A5C 600968C8 0 5 ZBM 313 LD R0 FCB,FCCBYTE get displacement into current block 06A5D 600A3C00 0 0 CBM 314 LD R0 R0*FLDCHARS 06A5E 18040800 0 IMM 315 ADD R0 ADR WNDO1 calculate memory position 06A5F 5D686A6E 4 316 XCT SLOWLOADT(R4) get a character 06A60 E4560000 1 0 CACH 317 ST R1 CACH R0,0 place it in the data block 06A61 60440001 1 IMM 318 LD R1 1 06A62 DC406A71 319 CALLNP WFILEMOVE move the one character 06A63 00006A6A 320 ADR PUTRECHDDE disk error 06A64 FE0E6A6C 321 JMP PUTHDOOS out of storage 06A65 FB266A5C 4 322 JDR R4 NXTHDBYTE move all three 323 * \ / 324 325 * New header has been put down. Return success. 06A66 6013C000 0 7 REG 326 LD R0 R7 06A67 DC403190 327 CALLNP SETERRW1 reference errors goto caller 06A68 61178801 4 6 BASE 328 LD R4 SP,PUTRECHDR4 restore R4 06A69 FE0E6A57 329 JMP PUTRECXOK leave 330 * --- 331 332 ********************************************************************************** 333 * * 334 * Disk error -- return the bad news. * 335 * * 336 ********************************************************************************** 337 00006A6A 338 PUTRECHDDE LABEL 06A6A 61178801 4 6 BASE 339 LD R4 SP,PUTRECHDR4 restore R4 06A6B FE0E6A57 340 JMP PUTRECXOK disk error return 341 * --- 342 343 ********************************************************************************** 344 * * 345 * Out of storage -- give it as a separate error. * 346 * * 347 ********************************************************************************** 348 00006A6C 349 PUTHDOOS LABEL 06A6C 61178801 4 6 BASE 350 LD R4 SP,PUTRECHDR4 restore R4 06A6D FBE06A58 7 351 IRJ R7 PUTRECEXIT no disk space return 352 * --- 353 354 * Instructions to fetch characters from the IRG word 00006A6E 355 SLOWLOADT LABEL 06A6E 6049B082 1 6 ZBM 356 LD R1 SP,PUTRHIRG/CH3 06A6F 6049A082 1 6 ZBM 357 LD R1 SP,PUTRHIRG/CH2 06A70 60499082 1 6 ZBM 358 LD R1 SP,PUTRHIRG/CH1 359 * --- 360 361 END PUTRECHEAD subroutine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1476 (FRQWRSAF) F 82 FREQ - Write Processor (.SAF) 363 364 ********************************************************************************** 365 * * 366 * WFILEMOVE. This subroutine will move the current position * 367 * pointer forward in a sequential file and add blocks to the end * 368 * of the file if necessary. It DOES NOT account for the limit * 369 * usage -- this must be done by the caller. Call: * 370 * * 371 * LD SP => return addr stack * 372 * LD FCB => file control block * 373 * LD R1 characters to move * 374 * CALLNP WFILEMOVE * 375 * ADR error addr file abnormal/unavailable * 376 * JMP out of storage disk volume is full * 377 * R0 thru R3 are mangled. * 378 * * 379 * If a new block is moved into then that block will be in window * 380 * 1 otherwise the windows are not touched. * 381 * Stack required = 12. * 382 * 5 + max ( GETFREEW1 (6), GRUBWNDOx (7), MAPINFBI (2), * 383 * MAPOUTFBI (2), SETERRW1 (1), SETMODIFWx (1), * 384 * SETWNDOx (4), WSXCLNALL (10) ) * 385 * * 386 ********************************************************************************** 387 388 BLOCK WFILEMOVE subroutine 389 ENTRY WFILEMOVE 390 391 BEGFRAME 00178801 6 BASE 392 CHAR2MOVE BSS 1 characters to move 00178802 6 BASE 393 WFILER4 BSS 1 save for R4 00178803 6 BASE 394 NEXTBLK BSS 1 temp holds block address 00178804 6 BASE 395 W2PPLADR BSS 1 address of PPL for window 2 396 ENDFRAME 397 06A71 DD5F8005 6 STAK 398 WFILEMOVE ENTRNP PUSH 06A72 E4578801 1 6 BASE 399 ST R1 SP,CHAR2MOVE remember number to move 400 00006A73 401 MOVEMORE LABEL 06A73 60578801 1 6 BASE 402 LD R1 SP,CHAR2MOVE pick up the number of characters to advance 06A74 18574808 1 5 BASE 403 ADD R1 FCB,FCCPP calculate new position 06A75 600A4140 0 1 CBM 404 LD R0 R1/SAFBLKNUM fetch up the block number part 06A76 10094148 0 5 ZBM 405 SUB R0 FCB,FCCBLK within the same data block? 06A77 FA026AB5 0 406 JEQZ R0 MOVEDONE if so, we needn't add a block 407 * \ / 408 409 ********************************************************************************** 410 * * 411 * The movement in this file requires the adding of a new block * 412 * to the file. Here we add the block and move the position pointer * 413 * into the newly created block and then loop around to move again. * 414 * * 415 ********************************************************************************** 416 417 * \ / 06A78 E5178802 4 6 BASE 418 ST R4 SP,WFILER4 save R4 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1477 (FRQWRSAF) F 82 FREQ - Write Processor (.SAF) 06A79 60174801 0 5 BASE 419 LD R0 FCB,FCBLOCK fetch current position 06A7A E4178803 0 6 BASE 420 ST R0 SP,NEXTBLK save the last block in the file 06A7B DC0031FF 421 CALL SETWNDO2 get the old block in 06A7C 41440002 IMM 422 PARV VPCNTLW+VPCNTLLK locked with write access 06A7D 41534000 5 REG 423 PARV FCB indicate lun associated with block 06A7E 41006AB8 424 PAR WFMDISKERR 06A7F 41574801 5 BASE 425 PARV FCB,FCBLOCK 06A80 4044000C IMM 426 PARVL FBITSAF pass expected FBI type 06A81 E4D78804 3 6 BASE 427 ST R3 SP,W2PPLADR save the addr of PPL for window 2 06A82 60489180 1 2 ZBM 428 LD R1 R2,FBIFLINK already a next block? 06A83 DC40261B 429 CALLNP MAPOUTFBI unmap FBI, ION 06A84 60840000 2 IMM 430 LD R2 0 DEBUG safety, kill pointer 06A85 FA4C6AA4 1 431 JNEZ R1 EXTNDWR jump if existing file (ReWrite only) 432 * \ / 433 434 * pick up a new block 06A86 60494148 1 5 ZBM 435 LD R1 FCB,FCCBLK get current rel block (w/ zero origin) 06A87 18440001 1 IMM 436 ADD R1 1 new block gets next number 06A88 DC005C5B 437 CALL GETFREEW1 get a new block 06A89 4144000C IMM 438 PARV FBITSAF pass expected FBI type 06A8A 40524000 1 REG 439 PARVL R1 relative block number 06A8B FE0E6ABD 440 JMP WFMDISKFUL block creation error (maybe disk full) 441 * \ / GETFREEWx leaves block number in FCMSBLK 442 443 * R3 => PPL for new block, R2 => FBI (unmapped) 06A8C DC002606 444 CALL MAPINFBI get access to FBI, IOFF 06A8D 4052C000 3 REG 445 PARVL R3 pass physical page 06A8E 60178803 0 6 BASE 446 LD R0 SP,NEXTBLK get address of previous end 06A8F E4089182 0 2 ZBM 447 ST R0 R2,FBIBLINK link new block back to old 06A90 DC40261B 448 CALLNP MAPOUTFBI unmap FBI, ION 06A91 DC403260 449 CALLNP SETMODIFW1 let the new block swap 450 * \ / 451 452 * point previous block to new one 06A92 60578804 1 6 BASE 453 LD R1 SP,W2PPLADR R1 => PPL of previous block 06A93 DC002606 454 CALL MAPINFBI get access to its FBI, IOFF 06A94 40524000 1 REG 455 PARVL R1 pass physical page 06A95 60095181 0 5 ZBM 456 LD R0 FCB,FCMSBLK pick up this blocks address 06A96 E4085180 0 1 ZBM 457 ST R0 R1,FBIFLINK link old block to the new one 06A97 DC40261B 458 CALLNP MAPOUTFBI unmap FBI 06A98 60840000 2 IMM 459 LD R2 0 DEBUG safety, kill pointer 06A99 DC40325A 460 CALLNP SETMODIFW2 fix it so it gets written out 06A9A DC403153 461 CALLNP GRUBWNDO2 release window with the prior block 462 * since we're done with it 06A9B D0094182 5 ZBM 463 INC FCB,FCTFL increase known size of the file 464 465 * \ / 00006A9C 466 MOVECPP LABEL 06A9C 60041000 0 IMM 467 LD R0 CPP 06A9D 100968C8 0 5 ZBM 468 SUB R0 FCB,FCCBYTE calculate chars skipped in last block 06A9E 98174808 0 5 BASE 469 ADDM R0 FCB,FCCPP make new position in new block 06A9F B0178801 0 6 BASE 470 RSBM R0 SP,CHAR2MOVE count down chars moved over 06AA0 6017C800 0 7 BASE 471 LD R0 R7,0 since we won't reference it again... 06AA1 DC403190 472 CALLNP SETERRW1 ...let errors goto caller 06AA2 61178802 4 6 BASE 473 LD R4 SP,WFILER4 restore register 06AA3 FE0E6A73 474 JMP MOVEMORE 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1478 (FRQWRSAF) F 82 FREQ - Write Processor (.SAF) 475 * --- 476 477 ********************************************************************************** 478 * * 479 * The current block seems to have a block after it. This only happens * 480 * with the ReWrite request. We check for the correct pointers and map * 481 * the new one in. * 482 * * 483 ********************************************************************************** 484 00006AA4 485 EXTNDWR LABEL 06AA4 E4495181 1 5 ZBM 486 ST R1 FCB,FCMSBLK 06AA5 DC003205 487 CALL SETWNDO1 map in the pointed to block 06AA6 41440002 IMM 488 PARV VPCNTLW+VPCNTLLK access for write and locked 06AA7 41534000 5 REG 489 PARV FCB pass associated unit 06AA8 41006AB8 490 PAR WFMDISKERR 06AA9 41574801 5 BASE 491 PARV FCB,FCBLOCK 06AAA 4044000C IMM 492 PARVL FBITSAF pass expected FBI type 06AAB 60489182 1 2 ZBM 493 LD R1 R2,FBIBLINK load back pointer from new block 06AAC DC40261B 494 CALLNP MAPOUTFBI unmap FBI, ION 06AAD 64499183 1 6 ZBM 495 CPR R1 SP,NEXTBLK/MSBLKFIELD new block point to previous? 06AAE FE0C6AB2 496 JNE BADBLINK jump if not 06AAF DC403153 497 CALLNP GRUBWNDO2 done with the previous block 06AB0 DC403276 498 CALLNP ULKWNDO1 current block need not be locked 06AB1 FE0E6A9C 499 JMP MOVECPP move the pointers in the file 500 * --- 501 502 * The pointed to block does not point back -- the file is abnormal 00006AB2 503 BADBLINK LABEL 06AB2 60840000 2 IMM 504 LD R2 0 DEBUG safety, kill pointer 06AB3 DC403150 505 CALLNP GRUBWNDO1 get rid of the mappings 06AB4 FE0E6AB9 506 JMP WFMDISKER1 return error to caller 507 * --- 508 509 ********************************************************************************** 510 * * 511 * Current position moved sufficiently. Set new current position * 512 * and return success. * 513 * * 514 ********************************************************************************** 515 00006AB5 516 MOVEDONE LABEL 06AB5 19C40002 7 IMM 517 ADD R7 2 successful return 06AB6 E4574808 1 5 BASE 518 ST R1 FCB,FCCPP store new calculated position 06AB7 5D1F8005 6 STAK 519 LEAVE POP 520 * --- 521 522 ********************************************************************************** 523 * * 524 * Disk error while going back to old block. Just return the * 525 * error and wash our hands of the mess. * 526 * * 527 ********************************************************************************** 528 00006AB8 529 WFMDISKERR LABEL 06AB8 DC40261B 530 CALLNP MAPOUTFBI unmap FBI, ION 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1479 (FRQWRSAF) F 82 FREQ - Write Processor (.SAF) 00006AB9 531 WFMDISKER1 LABEL 06AB9 DC403153 532 CALLNP GRUBWNDO2 06ABA 61178802 4 6 BASE 533 LD R4 SP,WFILER4 restore R4 06ABB 61D7C800 7 7 BASE 534 LD R7 R7,0 return to where the user says error 06ABC 5D1F8005 6 STAK 535 LEAVE POP 536 * --- 537 538 ********************************************************************************** 539 * * 540 * Disk error creating the new data block. Most likely an out of * 541 * storage error (the disk volume is full) so we separate that from * 542 * run of the mill disk crap-outs and pass them on to the user. * 543 * * 544 ********************************************************************************** 545 00006ABD 546 WFMDISKFUL LABEL 06ABD 64040072 0 IMM 547 CPR R0 UINTVMFIDS disk full? 06ABE FE0C6AB9 548 JNE WFMDISKER1 if not just make it a disk error 06ABF DC403153 549 CALLNP GRUBWNDO2 06AC0 61178802 4 6 BASE 550 LD R4 SP,WFILER4 restore register 06AC1 19C40001 7 IMM 551 ADD R7 1 skip error pointer 06AC2 5D1F8005 6 STAK 552 LEAVE POP goto error return 553 * --- 554 555 END WFILEMOVE subroutine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1480 (FRQWRSAF) F 82 FREQ - Write Processor (.SAF) 557 558 ********************************************************************************** 559 * * 560 * PREPAREWR. Routine that prepares a .SAF for writing. The * 561 * new length of the file is calculated and any additions are checked * 562 * against the accounts limits while any extra file is given to the * 563 * file freer to be disposed of. Call: * 564 * * 565 * LD SP => return addr stack * 566 * LD FCB => to file control block * 567 * LD R0 length of record being added * 568 * CALLNP PREPAREWR * 569 * * 570 * Routine zaps R0 thru R4. * 571 * Stack required = 11 * 572 * 1 + max ( FREEFILE (3), GRUBWNDO1 (7), LIMITCHECK (1), * 573 * MAPOUTFBI (2), SETMODIFW1 (1), SETWNDO1 (3), * 574 * WSXCLNALL (10) ) * 575 * * 576 ********************************************************************************** 577 578 BLOCK PREPAREWR subroutine 579 ENTRY PREPAREWR 580 581 BEGFRAME 582 ENDFRAME 583 06AC3 DD5F8001 6 STAK 584 PREPAREWR ENTRNP PUSH 06AC4 18174808 0 5 BASE 585 ADD R0 FCB,FCCPP calculate new position after write 06AC5 18041006 0 IMM 586 ADD R0 6+CPP account for headers and first block being number 0 06AC6 70494182 1 5 ZBM 587 LDN R1 FCB,FCTFL get length of file 06AC7 184A0140 1 0 CBM 588 ADD R1 R0/SAFBLKNUM R1=block length change in file 06AC8 61095114 4 5 ZBM 589 LD ULB FCB,FCLIMITPTR get pointer to guys limit block 06AC9 DC405C7B 590 CALLNP LIMITCHECK see if the guy has room 06ACA FE0E5983 591 JMP FERROR jump if not 592 * \ / 593 594 ********************************************************************************** 595 * check for blocks beyond current position and free * 596 * any found. * 597 ********************************************************************************** 598 599 * \ / 06ACB 60094182 0 5 ZBM 600 LD R0 FCB,FCTFL get the current file length 06ACC 10094148 0 5 ZBM 601 SUB R0 FCB,FCCBLK form difference between length and position 06ACD 10040001 0 IMM 602 SUB R0 1 account for first block being number 0 06ACE FA0A6AE4 0 603 JLEZ R0 PREPAREXIT jump if nothing hereafter, do write 06ACF DC003205 604 CALL SETWNDO1 get the current block in 06AD0 41440002 IMM 605 PARV VPCNTLW+VPCNTLLK specify read/write and locked 06AD1 41534000 5 REG 606 PARV FCB indicate lun associated with block 06AD2 41006AE5 607 PAR BLOCKDE where to go on error 06AD3 41574801 5 BASE 608 PARV FCB,FCBLOCK indicate the block address 06AD4 4044000C IMM 609 PARVL FBITSAF indicate the type expected 06AD5 61089180 4 2 ZBM 610 LD R4 R2,FBIFLINK get the forward link 06AD6 EC089180 2 ZBM 611 STZ R2,FBIFLINK destroy pointer to part of file being freed 06AD7 DC40261B 612 CALLNP MAPOUTFBI unmap FBI, ION 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1481 (FRQWRSAF) F 82 FREQ - Write Processor (.SAF) 06AD8 60840000 2 IMM 613 LD R2 0 DEBUG safety, kill pointer 06AD9 DC403260 614 CALLNP SETMODIFW1 indicate window modified and unlock it 06ADA FB026AE4 4 615 JEQZ R4 PREPAREXIT jump if bunged up TFL (previous crashes) 06ADB DC4032EA 616 CALLNP WSXCLNALL remove file's pages from working set 06ADC 60094081 0 5 ZBM 617 LD R0 FCB,FCDRIVE get the proper volume number 06ADD E40B0080 0 4 CBM 618 ST R0 R4/VOLFIELD insert volume number into MS address 06ADE DC004FEA 619 CALL FREEFILE free the unneeded blocks 06ADF 41530000 4 REG 620 PARV R4 pass the head address 06AE0 4044000C IMM 621 PARVL FBITSAF and indicate the type of structure 06AE1 60094148 0 5 ZBM 622 LD R0 FCB,FCCBLK load current relative block number 06AE2 18040001 0 IMM 623 ADD R0 1 advance for first block being zero! 06AE3 E4094182 0 5 ZBM 624 ST R0 FCB,FCTFL store recalculated file length 00006AE4 625 PREPAREXIT LABEL 06AE4 5D1F8001 6 STAK 626 LEAVE POP 627 * --- 628 629 * Disk error occurred 00006AE5 630 BLOCKDE LABEL 06AE5 DC40261B 631 CALLNP MAPOUTFBI unmap FBI, ION 06AE6 DC403150 632 CALLNP GRUBWNDO1 get rid of the window 06AE7 61C459AA 7 IMM 633 LD R7 ADR FERRORFAU "abnormal/unavailable" 06AE8 5D1F8001 6 STAK 634 LEAVE POP 635 * --- 636 637 END PREPAREWR subroutine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1482 (FRQWRSAF) F 82 FREQ - Write Processor (.SAF) 639 640 ********************************************************************************** 641 * * 642 * PLACEEOD. A small routine to place an End-Of-Data mark in * 643 * the file at the current position. It assumes that the current * 644 * block is mapped into window 1 and it doesn't use the stack to * 645 * save its return address so disk errors are not a problem. Note * 646 * that we always update the end block and position pointer. This * 647 * may not be necessary all the time but it localizes and minimizes * 648 * the code required to do this. Call: * 649 * * 650 * LD FCB => file control block * 651 * CALLNP PLACEEOD * 652 * * 653 * Eats R0, R1, and R2 * 654 * Stack required = 0 * 655 * * 656 ********************************************************************************** 657 658 BLOCK PLACEEOD subroutine 659 ENTRY PLACEEOD 660 06AE9 DD528000 2 REG 661 PLACEEOD ENTRNP R2 06AEA 604968C8 1 5 ZBM 662 LD R1 FCB,FCCBYTE 06AEB 604A7C00 1 1 CBM 663 LD R1 R1*FLDCHARS 06AEC 18440800 1 IMM 664 ADD R1 ADR WNDO1 calculate memory location 06AED 60040090 0 IMM 665 LD R0 (FILNEOD*FILTYPE)/BITS 8:15 06AEE E4164000 0 1 CACH 666 ST R0 CACH R1,0 place the EOD 06AEF 60095181 0 5 ZBM 667 LD R0 FCB,FCMSBLK get the last block MS address 06AF0 E4095186 0 5 ZBM 668 ST R0 FCB,FCEND update this value 06AF1 60174808 0 5 BASE 669 LD R0 FCB,FCCPP current position pointer 06AF2 E4174807 0 5 BASE 670 ST R0 FCB,FCEPP update end position pointer 06AF3 5D128000 2 REG 671 LEAVE R2 672 * --- 673 674 END PLACEEOD subroutine 675 676 677 END SAF Write Processor 134 INPUT FRQWRRAF write to a RAF or CODE 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1483 (FRQWRRAF) F 83 FREQ - Write Processor (.RAF and .CODE) 3 4 BLOCK RAF Write Routines 5 6 ENTRY CODEWRITE 7 ENTRY RAFWRITE 8 ENTRY WSEEK position in RAF for write 9 ENTRY RAFCURCHEK ensure correct RAF ptrs in FCB 10 ENTRY RAFEXPAND make a small RAF large 11 ENTRY RAFROOTGET XCT table for getting RAF root 12 ENTRY XPANDTRAF make tiny RAF small 13 ENTRY MAKETRAF make a tiny RAF from an empty RAF 14 ENTRY TRAFDIR update DIR for new TRAF 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1484 (FRQWRRAF) F 83 FREQ - Write Processor (.RAF and .CODE) 16 17 ********************************************************************************** 18 * * 19 * write onto a .RAF * 20 * Stack required = 21 * 21 * 0 + max ( DMOTEWNDO1 (7), GRUBWNDO1 (7), RSEEK (10), * 22 * SETMEMTRAP (1), SETWNDO1 (4), WSEEK (21) ) * 23 * * 24 ********************************************************************************** 25 26 BLOCK RAFWRITE and CODEWRITE routine 27 ENTRY RAFWRITE 28 ENTRY CODEWRITE 29 00006AF4 30 RAFWRITE LABEL 00006AF4 31 CODEWRITE LABEL 06AF4 5C178801 6 BASE 32 CMZ SP,COPYCNT check for zero length write 06AF5 FE0269F1 33 JEQ NULLWRITE don't fool with nothing 06AF6 DC005BCF 34 CALL SETMEMTRAP place to go if user memory error 06AF7 40005B63 35 PARL PASSERRW1 PASSERRUP and grub window 1 06AF8 DC006B31 36 CALL WSEEK position the RAF 06AF9 41006B29 37 PAR RAFWRDERR 06AFA 40574808 5 BASE 38 PARVL FCB,FCCPP 06AFB FE0E5983 39 JMP FERROR rtn1: limit violation 00006AFC 40 RAFWRITW LABEL 06AFC DC003205 41 CALL SETWNDO1 get the data page in 06AFD 41440000 IMM 42 PARV VPCNTLW 06AFE 41534000 5 REG 43 PARV FCB indicate lun associated with block 06AFF 41006B29 44 PAR RAFWRDERR 06B00 41574801 5 BASE 45 PARV FCB,FCBLOCK 06B01 6004000F 0 IMM 46 LD R0 FBITRAFD get raf data block type 06B02 60496665 1 5 ZBM 47 LD R1 FCB,FCHTYPE get type of file 06B03 64440003 1 IMM 48 CPR R1 HTYPECODE is it a code? 06B04 FE0C6B06 49 JNE RAFWRITF jump if not 06B05 60040014 0 IMM 50 LD R0 FBITCODED get code data type 00006B06 51 RAFWRITF LABEL 06B06 40520000 0 REG 52 PARVL R0 pass type of the block 06B07 704968C8 1 5 ZBM 53 LDN R1 FCB,FCCBYTE 06B08 18441000 1 IMM 54 ADD R1 CPP calculate the bytes left in the data block 06B09 50578801 1 6 BASE 55 MIN R1 SP,COPYCNT 06B0A E4578800 1 6 BASE 56 ST R1 SP,FCRTEMP save the chars to be moved 06B0B 608968C8 2 5 ZBM 57 LD R2 FCB,FCCBYTE 06B0C 608ABC00 2 2 CBM 58 LD R2 R2*FLDCHARS 06B0D 18840800 2 IMM 59 ADD R2 ADR WNDO1 calculate the addr of first byte 06B0E 60178802 0 6 BASE 60 LD R0 SP,COREADR get the user's source address 06B0F 5C095A10 5 ZBM 61 CMZ FCB,FCRELOC see where the data is 06B10 FE0C6B12 62 JNE RAFWRITL 06B11 59840040 IMM 63 CLBMSR MSRFRELOC if within user's core point there 00006B12 64 RAFWRITL LABEL 06B12 FE400000 65 CMOVE move the characters 06B13 59C40040 IMM 66 IORMSR MSRFRELOC restore monitor fetching 06B14 E4178802 0 6 BASE 67 ST R0 SP,COREADR save the new source address 06B15 60D78800 3 6 BASE 68 LD R3 SP,FCRTEMP get the number of chars moved 06B16 B0D78801 3 6 BASE 69 RSBM R3 SP,COPYCNT remove moved from requested 06B17 18D74808 3 5 BASE 70 ADD R3 FCB,FCCPP calculate new position in RAF 06B18 5C178801 6 BASE 71 CMZ SP,COPYCNT is there any more to move? 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1485 (FRQWRRAF) F 83 FREQ - Write Processor (.RAF and .CODE) 06B19 FE026B1F 72 JEQ RAFWRITDN jump if not 06B1A DC006B31 73 CALL WSEEK move in the RAF 06B1B 41006B2A 74 PAR RAFWRDERS 06B1C 4052C000 3 REG 75 PARVL R3 06B1D FE0E6B2E 76 JMP RAFXPNDERR (rtn1: limit exception) 06B1E FE0E6AFC 77 JMP RAFWRITW go move some more 78 * --- 79 80 ********************************************************************************** 81 * Writing done, update current position pointer and exit * 82 ********************************************************************************** 83 00006B1F 84 RAFWRITDN LABEL 06B1F DC0070CD 85 CALL RSEEK position file 06B20 41006B2A 86 PAR RAFWRDERS mass storage error address 06B21 4052C000 3 REG 87 PARVL R3 new seek address 06B22 DC40315C 88 CALLNP DMOTEWNDO1 free the window 89 * Update the end position pointer. 06B23 60174807 0 5 BASE 90 LD R0 FCB,FCEPP get the end position pointer 06B24 58C40010 IMM 91 IORPSR PSRMODIF magical math time 06B25 54174808 0 5 BASE 92 MAX R0 FCB,FCCPP unsigned max with the current position 06B26 58840010 IMM 93 CLBPSR PSRMODIF turn off the magic 06B27 E4174807 0 5 BASE 94 ST R0 FCB,FCEPP update the end position pointer 06B28 FE0E69F1 95 JMP NULLWRITE go to common exit 96 * --- 97 98 ********************************************************************************** 99 * * 100 * A disk error while writing into the RAF. Say in core pointers * 101 * are not good and return the error to the user. * 102 * * 103 ********************************************************************************** 104 00006B29 105 RAFWRDERR LABEL 06B29 DC403150 106 CALLNP GRUBWNDO1 clean out buffer 00006B2A 107 RAFWRDERS LABEL 06B2A EDC95C16 5 ZBM 108 STW FCB,FCRESEEK in-core pointers not good 06B2B 60C4000B 3 IMM 109 LD R3 FILAEOD get appropriate status bit 06B2C E4C94445 3 5 ZBM 110 ST R3 FCB,FCLASTREAD the last read was with error 06B2D FE0E59AA 111 JMP FERRORFAU file is bad 112 * --- 113 114 ********************************************************************************** 115 * * 116 * The user ran out of disk space while expanding to a large * 117 * RAF. Grub window 1 before returning the error. * 118 * * 119 ********************************************************************************** 120 00006B2E 121 RAFXPNDERR LABEL 06B2E 61D20000 7 0 REG 122 LD R7 R0 save the error code 06B2F DC403150 123 CALLNP GRUBWNDO1 06B30 FE0E5997 124 JMP FERROR7 report the error 125 * --- 126 127 END RAFWRITE and CODEWRITE routine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1486 (FRQWRRAF) F 83 FREQ - Write Processor (.RAF and .CODE) 129 130 ********************************************************************************** 131 * * 132 * WSEEK * 133 * This routine is provided for use by routines that are * 134 * seeking to a RAF or CODE file location where they are * 135 * committed to write. It does the position operation, * 136 * creating any index or data blocks that it must to ensure * 137 * that the byte at the current position is a writable part * 138 * of the file. * 139 * The operating system no longer creates a minor access * 140 * block upon the creation of a RAF. Instead only an FDE entry * 141 * is made and no FDDA is set. When the first write is made into * 142 * the RAF a data block is created and becomes FDDA (the root of * 143 * the file). When the RAF is expanded beyond the first data * 144 * block's addressing range a minor access block is created which * 145 * thus becomes FDDA. * 146 * Internally we refer to these new extra small RAFs as * 147 * 'tiny RAFs'. The advantage of creating them in this manor * 148 * is the saving of disk space for very small RAFs since no * 149 * minor access block is necessary. * 150 * Note that if the first address written to in the RAF is * 151 * outside of the first data block's addressing range then a * 152 * minor access block must be created even though there will * 153 * only be one data block associated with the file. * 154 * There is a new field in the FDE used to determine the * 155 * type of RAF. FDRAFTYPE is a 2 bit field decoded as: * 156 * * 157 * symbolic value type root block type * 158 * -------- ----- ---- --------------- * 159 * RAFTEMPTY 0 empty none * 160 * RAFTTINY 1 tiny RAF data block * 161 * RAFTSMALL 2 small RAF minor access block * 162 * RAFTLARGE 3 large RAF major access block * 163 * * 164 * FDRAFTYPE is also set for code files (always RAFTSMALL). * 165 * Note that FDLRAF is no longer used, but on old volumes it is * 166 * necessary to check. A safe check for this is if FDRAFTYPE * 167 * equals zero then FDDA must also be zero. If not then use FDLRAF * 168 * to determine if it is a large or small RAF. * 169 * * 170 * Call: * 171 * * 172 * *** WARNING *** Caller needs to SETMEMTRAP an error address * 173 * to handle disk errors (typically "insufficient disk space") * 174 * we might incur attempting to get new blocks for the file. * 175 * * 176 * SP => return address stack * 177 * LD ULB => limit block for he who is being charged * 178 * LD FCB * 179 * CALL WSEEK * 180 * PAR * 181 * PARL * 182 * * 183 * * 184 * FCB,FCMSBLK = block number being written into * 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1487 (FRQWRRAF) F 83 FREQ - Write Processor (.RAF and .CODE) 185 * Eats R0:R3. * 186 * Uses windows 1 and 2. * 187 * Stack required = 21 * 188 * 3 + max ( DMOTEWNDOx (7), FREEFILE ( 3), GETFREEWx ( 6), * 189 * GRUBWNDOx (7), LIMITCHECK (1), LOCKWAIT (0), * 190 * MAKETRAF (13), RAFCURCHEK (1), RAFEXPAND (18), * 191 * SETWNDOx (4), XPANDTRAF (15) ) * 192 * * 193 ********************************************************************************** 194 195 BLOCK WSEEK subroutine 196 ENTRY WSEEK 197 198 BEGFRAME 00178801 6 BASE 199 WSEEKT BSS 1 stack temporary to hold seek address 00178802 6 BASE 200 WSEEKER BSS 1 error address 201 ENDFRAME 202 06B31 DD1F8003 6 STAK 203 WSEEK ENTR PUSH 06B32 C1178802 6 BASE 204 STP SP,WSEEKER save the error address 06B33 C0578801 6 BASE 205 STPVL SP,WSEEKT save new seek address 06B34 DC406CDF 206 CALLNP RAFCURCHEK check if the FCB is current with the GFC 06B35 60178801 0 6 BASE 207 LD R0 SP,WSEEKT pick up the seek address 06B36 60495826 1 5 ZBM 208 LD R1 FCB,FCRAFTYPE get the RAF type 06B37 5CA26B38 1 209 LDPC WSEEKRAFT(R1) act accordingly 210 * --- 211 00006B38 212 WSEEKRAFT LABEL 06B38 00006B3C 213 VFD ADR WSEEKEMPTY 06B39 00006B41 214 VFD ADR WSEEKTINY 06B3A 00006B49 215 VFD ADR WSEEKSMALL 06B3B 00006B53 216 VFD ADR WSEEKLG 217 00006B3C 218 WSEEKEMPTY LABEL 06B3C 68041000 0 IMM 219 UCPR R0 CPP is it within first block? 06B3D FE066B43 220 JGE WSEEKMAKEM if not then make into a small RAF 06B3E DC406C2D 221 CALLNP MAKETRAF get us a data block and update dir 06B3F FE0E6BD9 222 JMP WSEEKLIMBD could not do it (R0=error code) 06B40 FE0E6BCC 223 JMP WSEEKDATA done now 224 * --- 225 00006B41 226 WSEEKTINY LABEL 06B41 68041000 0 IMM 227 UCPR R0 CPP is it within first block? 06B42 FE086BCC 228 JLT WSEEKDATA jump if we have our data block 229 * \ / 230 231 * The RAF is an empty or tiny RAF that needs to grow. 00006B43 232 WSEEKMAKEM LABEL 06B43 68002550 0 233 UCPR R0 MAXSRAF within the range of a small RAF? 06B44 FE066B4C 234 JGE MAKELARGE if not then make a large RAF 06B45 60C40000 3 IMM 235 LD R3 0 no directory pointer 06B46 DC406BE1 236 CALLNP XPANDTRAF expand the tiny RAF 06B47 FE0E6BDE 237 JMP WSEEKEXIT rtn1: insufficient disk space 06B48 FE0E6BD7 238 JMP WSEEKDERR rtn2: disk error 239 * \ / 240 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1488 (FRQWRRAF) F 83 FREQ - Write Processor (.RAF and .CODE) 241 * We now have a small RAF. 00006B49 242 WSEEKSMALL LABEL 06B49 60178801 0 6 BASE 243 LD R0 SP,WSEEKT 06B4A 68002550 0 244 UCPR R0 MAXSRAF is this within range of a small RAF? 06B4B FE086B53 245 JLT WSEEKLG jump if it stays small 246 * \ / 247 248 ********************************************************************************** 249 * * 250 * A seek off the end of a small RAF. Check for CODE file * 251 * (cannot be expanded). * 252 * * 253 ********************************************************************************** 254 255 * \ / 00006B4C 256 MAKELARGE LABEL 06B4C 60040003 0 IMM 257 LD R0 HTYPECODE 06B4D 64096665 0 5 ZBM 258 CPR R0 FCB,FCHTYPE is this a CODE file? 06B4E FE026BDF 259 JEQ WSEEKXPCD jump if off end of CODE file 260 * \ / 06B4F 60C40000 3 IMM 261 LD R3 0 don't know where dir is 06B50 DC406C5B 262 CALLNP RAFEXPAND make the small thing large 06B51 FE0E6BDE 263 JMP WSEEKEXIT rtn1: insufficent space (R0=code) 06B52 FE0E6BD7 264 JMP WSEEKDERR rtn2: disk error (R0=code) 265 * \ / rtn3: success 266 267 ********************************************************************************** 268 * * 269 * The RAF is expanded if need be. Check if resident pointers * 270 * to RAF are good (check RESEEK) and if so, see if the new address * 271 * is within range of known pointers. Also check if pointers are * 272 * to holes -- for writes we must fill in the holes. * 273 * * 274 ********************************************************************************** 275 276 * \ / 00006B53 277 WSEEKLG LABEL 06B53 5C095C16 5 ZBM 278 CMZ FCB,FCRESEEK are in core pointers good? 06B54 FE0C6B58 279 JNE WSEEKMAJOR jump if we must look it up 06B55 600980A1 0 6 ZBM 280 LD R0 SP,WSEEKT/RAFMAJINDX 06B56 640940A8 0 5 ZBM 281 CPR R0 FCB,FCCPP/RAFMAJINDX is address within current minor block? 06B57 FE026B8A 282 JEQ WSEEKINMA jump if minor block known 283 * \ / 284 285 ********************************************************************************** 286 * * 287 * Come here to find the destination data block from the root * 288 * of the RAF. This entry gets the major access block and looks * 289 * for the minor. Any hole is filled in. Notice that a major * 290 * block address of zero is passed over and the minor access block * 291 * is used -- this makes CODE files and small RAFs work. * 292 * * 293 ********************************************************************************** 294 295 * \ / 00006B58 296 WSEEKMAJOR LABEL 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1489 (FRQWRRAF) F 83 FREQ - Write Processor (.RAF and .CODE) 06B58 60096183 0 5 ZBM 297 LD R0 FCB,FCMABLK get the address of major block 06B59 FA026B91 0 298 JEQZ R0 WSEEKMINOR jump if no major access block 06B5A E4095181 0 5 ZBM 299 ST R0 FCB,FCMSBLK 06B5B DC003205 300 CALL SETWNDO1 get the access block in 06B5C 41440000 IMM 301 PARV VPCNTLW indicate write access 06B5D 41534000 5 REG 302 PARV FCB indicate lun associated with block 06B5E 41006BD7 303 PAR WSEEKDERR pass error address 06B5F 41574801 5 BASE 304 PARV FCB,FCBLOCK 06B60 4044000D IMM 305 PARVL FBITLRAF indicate type of block expected 00006B61 306 WSEEKMAJAG LABEL 06B61 600980A1 0 6 ZBM 307 LD R0 SP,WSEEKT/RAFMAJINDX 06B62 60200800 0 0 308 LD R0 WNDO1(R0) get pointer to minor access block 06B63 7800254F 0 309 AND R0 MSBLKMASK remove unwanted garbage 06B64 E4097182 0 5 ZBM 310 ST R0 FCB,FCLPBLK 06B65 FA0C6B91 0 311 JNEZ R0 WSEEKMINOR jump if block really exists 06B66 60440001 1 IMM 312 LD R1 1 must add one more disk block 06B67 DC405C7B 313 CALLNP LIMITCHECK see if the user has the space 06B68 FE0E6BD9 314 JMP WSEEKLIMBD jump if no space available 06B69 604980A1 1 6 ZBM 315 LD R1 SP,WSEEKT/RAFMAJINDX get relative block number 06B6A DC005C60 316 CALL GETFREEW2 get new block in FCBLOCK 06B6B 4144000E IMM 317 PARV FBITSRAF RAF minor access 06B6C 40524000 1 REG 318 PARVL R1 relative block number 06B6D FE0E6BD2 319 JMP WSEEKNOSP error, couldn't do it 06B6E 604980A1 1 6 ZBM 320 LD R1 SP,WSEEKT/RAFMAJINDX get index into major access block 06B6F 60895181 2 5 ZBM 321 LD R2 FCB,FCMSBLK and the disk address of the new minor 06B70 60C95F16 3 5 ZBM 322 LD R3 FCB,FCDCBPTR get pointer to global control block 06B71 FAF26B75 3 323 JNZA R3 LOCKIT if there is a global lock then lock it 324 * \ / 325 06B72 E4A20800 2 1 326 ST R2 WNDO1(R1) set the minor access block pointer 06B73 D0094182 5 ZBM 327 INC FCB,FCTFL increase known size of file 06B74 FE0E6B61 328 JMP WSEEKMAJAG try for the minor again 329 * --- 330 331 ********************************************************************************** 332 * * 333 * The file is a multiple write one. We must lock the expanding * 334 * lock of this file before updating any pointers. * 335 * * 336 ********************************************************************************** 337 00006B75 338 LOCKIT LABEL 339 PLOCK R3,GFXPNDLOCK let no one else change the pointers 06B75 0CC00000 339 IOFF 06B76 D1D6C805 3 BASE 339 SETT R3,GFXPNDLOCK 06B77 FE0C6B79 339 JNE MA(2+DISPW MA 0) 06B78 DC40308B 339 CALLNP LOCKWAIT 06B79 5C220800 1 340 CMZ WNDO1(R1) does a block exist there? 06B7A FE026B84 341 JEQ WSEEKNWMIN jump if I may put it there 342 PUNLOCK R3,GFXPNDLOCK let others work 06B7B EC16C805 3 BASE 342 STZ R3,GFXPNDLOCK 06B7C 0C800000 342 ION 06B7D 6047FFFF 1 IMM 343 LD R1 -1 remove the block from the account limits 06B7E DC405C7B 344 CALLNP LIMITCHECK 06B7F 00131114 345 HALT HALTS1114 06B80 DC004FEA 346 CALL FREEFILE return the minor block we don't need 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1490 (FRQWRRAF) F 83 FREQ - Write Processor (.RAF and .CODE) 06B81 41574801 5 BASE 347 PARV FCB,FCBLOCK indicate MS address 06B82 40440000 IMM 348 PARVL FFTUNKNOWN say single block, unknown type 06B83 FE0E6B61 349 JMP WSEEKMAJAG try for the minor again 350 * --- 351 352 ********************************************************************************** 353 * * 354 * Place for a new minor access block has been found. Place * 355 * it in the RAF and go to where the new data block will be * 356 * created. * 357 * * 358 ********************************************************************************** 359 00006B84 360 WSEEKNWMIN LABEL 06B84 E4A20800 2 1 361 ST R2 WNDO1(R1) place into the major index 06B85 E4897182 2 5 ZBM 362 ST R2 FCB,FCLPBLK current minor access block 06B86 D0094182 5 ZBM 363 INC FCB,FCTFL increase known size of file 364 PUNLOCK R3,GFXPNDLOCK let others RAF pointers change 06B87 EC16C805 3 BASE 364 STZ R3,GFXPNDLOCK 06B88 0C800000 364 ION 06B89 FE0E6B9E 365 JMP WSEEKMINAG minor block already in window 2 366 * --- 367 368 ********************************************************************************** 369 * * 370 * In-core pointers are good and the new access is within * 371 * the known minor access block. See if the minor access block * 372 * exists. If it doesn't we must go to the major access block. * 373 * If it exists we see if the access is within the currently * 374 * known data block thus possibly saving even another disk access. * 375 * * 376 ********************************************************************************** 377 00006B8A 378 WSEEKINMA LABEL 06B8A 5C097182 5 ZBM 379 CMZ FCB,FCLPBLK test the address of the minor block 06B8B FE026B58 380 JEQ WSEEKMAJOR jump if minor doesn't exist 06B8C 600994A1 0 6 ZBM 381 LD R0 SP,WSEEKT/RAFMININDX desired minor index 06B8D 640954A8 0 5 ZBM 382 CPR R0 FCB,FCCPP/RAFMININDX see if new address is within known data 06B8E FE0C6B91 383 JNE WSEEKMINOR jump if not 06B8F 5C095181 5 ZBM 384 CMZ FCB,FCMSBLK does the data block exist? 06B90 FE0C6BCC 385 JNE WSEEKDATA jump if so, we're done 386 * \ / 387 388 ********************************************************************************** 389 * * 390 * The data block is unknown. Look it up in the known minor * 391 * access block and create it if it doesn't exist. * 392 * * 393 ********************************************************************************** 394 395 * \ / 00006B91 396 WSEEKMINOR LABEL 06B91 60097182 0 5 ZBM 397 LD R0 FCB,FCLPBLK 06B92 E4095181 0 5 ZBM 398 ST R0 FCB,FCMSBLK 06B93 DC0031FF 399 CALL SETWNDO2 get the minor access block in 06B94 41440000 IMM 400 PARV VPCNTLW 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1491 (FRQWRRAF) F 83 FREQ - Write Processor (.RAF and .CODE) 06B95 41534000 5 REG 401 PARV FCB indicate lun associated with block 06B96 41006BD7 402 PAR WSEEKDERR 06B97 41574801 5 BASE 403 PARV FCB,FCBLOCK 06B98 6004000E 0 IMM 404 LD R0 FBITSRAF assume a RAF minor access block 06B99 60496665 1 5 ZBM 405 LD R1 FCB,FCHTYPE get the file type 06B9A 64440003 1 IMM 406 CPR R1 HTYPECODE check for a code file 06B9B FE0C6B9D 407 JNE WSEEKLG2 jump if not a code file 06B9C 60040013 0 IMM 408 LD R0 FBITCCB change our mind, since this is a code file 00006B9D 409 WSEEKLG2 LABEL 06B9D 40520000 0 REG 410 PARVL R0 00006B9E 411 WSEEKMINAG LABEL 06B9E 600994A1 0 6 ZBM 412 LD R0 SP,WSEEKT/RAFMININDX 06B9F 60200C00 0 0 413 LD R0 WNDO2(R0) get the pointer to the data block 06BA0 7800254F 0 414 AND R0 MSBLKMASK remove any control bits 06BA1 E4095181 0 5 ZBM 415 ST R0 FCB,FCMSBLK save the data block MS address 06BA2 FA0C6BCC 0 416 JNEZ R0 WSEEKDATA jump if the block exists 417 * \ / 418 419 * Must get a data block. 06BA3 60440001 1 IMM 420 LD R1 1 must add one more disk block 06BA4 DC405C7B 421 CALLNP LIMITCHECK see if the user has the room 06BA5 FE0E6BD9 422 JMP WSEEKLIMBD jump if user is limited 06BA6 6004000F 0 IMM 423 LD R0 FBITRAFD guess RAF data 06BA7 60496665 1 5 ZBM 424 LD R1 FCB,FCHTYPE get type of file 06BA8 64440003 1 IMM 425 CPR R1 HTYPECODE is it a code? 06BA9 FE0C6BAB 426 JNE WSEEKMIN2 jump if not 06BAA 60040014 0 IMM 427 LD R0 FBITCODED CODE data 00006BAB 428 WSEEKMIN2 LABEL 06BAB 60898141 2 6 ZBM 429 LD R2 SP,WSEEKT/PGNUMFLD get relative block number 06BAC DC005C5B 430 CALL GETFREEW1 get new block in FCBLOCK 06BAD 41520000 0 REG 431 PARV R0 pass type of the block 06BAE 40528000 2 REG 432 PARVL R2 pass relative block number 06BAF FE0E6BD2 433 JMP WSEEKNOSP error, couldn't do it 06BB0 5C097182 5 ZBM 434 CMZ FCB,FCLPBLK is there a minor access block? 06BB1 FE026BCC 435 JEQ WSEEKDATA if not then don't update it 436 * \ / 437 06BB2 604994A1 1 6 ZBM 438 LD R1 SP,WSEEKT/RAFMININDX get index into minor access block 06BB3 60895181 2 5 ZBM 439 LD R2 FCB,FCMSBLK and the disk address of the new minor 06BB4 60C95F16 3 5 ZBM 440 LD R3 FCB,FCDCBPTR get pointer to global control block 06BB5 FAF26BB9 3 441 JNZA R3 LOCKGFC if there is a global lock then lock it 442 * \ / 443 06BB6 E4A20C00 2 1 444 ST R2 WNDO2(R1) set the minor access block pointer 06BB7 D0094182 5 ZBM 445 INC FCB,FCTFL increase known size of file 06BB8 FE0E6B9E 446 JMP WSEEKMINAG try for the minor again 447 * --- 448 449 ********************************************************************************** 450 * * 451 * The file is a multiple write one. We must lock the expanding * 452 * lock of this file before updating any pointers. * 453 * * 454 ********************************************************************************** 455 00006BB9 456 LOCKGFC LABEL 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1492 (FRQWRRAF) F 83 FREQ - Write Processor (.RAF and .CODE) 457 PLOCK R3,GFXPNDLOCK let no one else change the pointers 06BB9 0CC00000 457 IOFF 06BBA D1D6C805 3 BASE 457 SETT R3,GFXPNDLOCK 06BBB FE0C6BBD 457 JNE MA(2+DISPW MA 0) 06BBC DC40308B 457 CALLNP LOCKWAIT 06BBD 5C220C00 1 458 CMZ WNDO2(R1) does a block exist there? 06BBE FE026BC8 459 JEQ WSEEKNWDAT jump if I may put it there 460 PUNLOCK R3,GFXPNDLOCK let others work 06BBF EC16C805 3 BASE 460 STZ R3,GFXPNDLOCK 06BC0 0C800000 460 ION 06BC1 6047FFFF 1 IMM 461 LD R1 -1 remove the block from the account limits 06BC2 DC405C7B 462 CALLNP LIMITCHECK 06BC3 00131115 463 HALT HALTS1115 06BC4 DC004FEA 464 CALL FREEFILE return the data block we don't need 06BC5 41574801 5 BASE 465 PARV FCB,FCBLOCK indicate MS address 06BC6 40440000 IMM 466 PARVL FFTUNKNOWN say single block, unknown type 06BC7 FE0E6B9E 467 JMP WSEEKMINAG try for the minor again 468 * --- 469 470 ********************************************************************************** 471 * * 472 * Place for the new data block has been found -- place it * 473 * in the RAF and fall through to completion. * 474 * * 475 ********************************************************************************** 476 00006BC8 477 WSEEKNWDAT LABEL 06BC8 E4A20C00 2 1 478 ST R2 WNDO2(R1) set our new block 06BC9 D0094182 5 ZBM 479 INC FCB,FCTFL increase known size of file 480 PUNLOCK R3,GFXPNDLOCK let other pointers change 06BCA EC16C805 3 BASE 480 STZ R3,GFXPNDLOCK 06BCB 0C800000 480 ION 481 * \ / 482 483 ********************************************************************************** 484 * * 485 * The data block has been found and FCB,FCMSBLK points to it. * 486 * Do return type things. * 487 * * 488 ********************************************************************************** 489 490 * \ / 00006BCC 491 WSEEKDATA LABEL 06BCC 60178801 0 6 BASE 492 LD R0 SP,WSEEKT 06BCD E4174808 0 5 BASE 493 ST R0 FCB,FCCPP set up our new position 06BCE EC095C16 5 ZBM 494 STZ FCB,FCRESEEK say in-core pointers good 06BCF DC40315C 495 CALLNP DMOTEWNDO1 don't leave anything mapped in 06BD0 DC40315F 496 CALLNP DMOTEWNDO2 don't leave anything mapped in 06BD1 FBE06BDE 7 497 IRJ R7 WSEEKEXIT do a return 2 498 * --- 499 500 ********************************************************************************** 501 * * 502 * Error processing * 503 * We set the FCRESEEK bit to indicate that the resident pointers * 504 * are no longer valid, since we might have jumped out of the middle * 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1493 (FRQWRRAF) F 83 FREQ - Write Processor (.RAF and .CODE) 505 * of processing, etc. We unmap the windows for cleanliness, and * 506 * these exits all return the error code in R0. * 507 * WSEEKNOSP sez ran out of space trying to fetch a block to * 508 * expand into. Fix the limits and return the error. * 509 * WSEEKDERR sez disk error while fooling with the RAF. * 510 * Go to the error address. The RAF should still be accessable in * 511 * those areas not affected by this mass storage error. * 512 * WSEEKLIMBD sez there was a limit violation. * 513 * We give a no skip return with the error code in R0. * 514 * * 515 ********************************************************************************** 516 00006BD2 517 WSEEKNOSP LABEL 06BD2 E4178801 0 6 BASE 518 ST R0 SP,WSEEKT save the error code 06BD3 6047FFFF 1 IMM 519 LD R1 -1 06BD4 DC405C7B 520 CALLNP LIMITCHECK remove from the user's limits 06BD5 00131111 521 HALT HALTS1111 shouldn't have errors when returning 06BD6 60178801 0 6 BASE 522 LD R0 SP,WSEEKT retrieve the error code 00006BD7 523 WSEEKDERR LABEL 06BD7 EC095181 5 ZBM 524 STZ FCB,FCMSBLK 06BD8 61D78802 7 6 BASE 525 LD R7 SP,WSEEKER error addr to return to 00006BD9 526 WSEEKLIMBD LABEL 06BD9 EDC95C16 5 ZBM 527 STW FCB,FCRESEEK the in core pointers are no good 06BDA E4178801 0 6 BASE 528 ST R0 SP,WSEEKT save the error code 06BDB DC403150 529 CALLNP GRUBWNDO1 don't leave anything mapped in 06BDC DC403153 530 CALLNP GRUBWNDO2 don't leave anything mapped in 06BDD 60178801 0 6 BASE 531 LD R0 SP,WSEEKT retrieve the error code 00006BDE 532 WSEEKEXIT LABEL 06BDE 5D1F8003 6 STAK 533 LEAVE POP 534 * --- 535 536 ********************************************************************************** 537 * * 538 * Trying to write off the end of a CODE file. Return error code. * 539 * * 540 ********************************************************************************** 541 00006BDF 542 WSEEKXPCD LABEL 06BDF 600400A0 0 IMM 543 LD R0 XREQEROFC off end of CODE file 06BE0 FE0E6BD9 544 JMP WSEEKLIMBD 545 * --- 546 547 END WSEEK subroutine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1494 (FRQWRRAF) F 83 FREQ - Write Processor (.RAF and .CODE) 549 550 ********************************************************************************** 551 * * 552 * Convert a tiny RAF into a small one. * 553 * Note that if we could always be called with no pointer to the * 554 * FDE we could do away with all the bothersome calls to save and * 555 * restore window. * 556 * Call: * 557 * LD ULB => limit block for he who is being charged * 558 * LD FCB => file control block for RAF * 559 * LD R3 => directory entry or zero if directory not * 560 * searched. If zero is specified, the directory * 561 * will be locked, searched, updated, and unlocked. * 562 * If the file is unsaved, this flag is not checked. * 563 * CALLNP XPANDTRAF * 564 * rtn1: insufficient file space (R0=code) * 565 * rtn2: disk error while expanding (R0=code and, in theory, * 566 * the RAF is still good) * 567 * rtn3: success * 568 * Eats R0:R3. * 569 * Stack required = 15 * 570 * 4 + max ( BACKOUTRAF (5), DMOTEWNDOx (7), FORCEWRW1 (7), * 571 * FREEDIR (5), GETFREEW1 (6), GRUBWNDO1 (7), * 572 * LIMITCHECK (1), RSTRWNDO (7), SAVEWNDO1 (2), * 573 * SRCHDIRSN (11), UPDATEGFC (8), * 574 * * 575 ********************************************************************************** 576 577 BLOCK XPANDTRAF subroutine 578 ENTRY XPANDTRAF 579 580 BEGFRAME 00178801 6 BASE 581 DIRPNTR BSS 1 => directory entry if known 00178802 6 BASE 582 XPNDTEMP BSS 1 00178803 6 BASE 583 DATABLK BSS 1 data MS address 584 ENDFRAME 585 06BE1 DD5F8004 6 STAK 586 XPANDTRAF ENTRNP PUSH 06BE2 E4D78801 3 6 BASE 587 ST R3 SP,DIRPNTR save pointer to directory entry 06BE3 5C097182 5 ZBM 588 CMZ FCB,FCLPBLK is this already a small RAF? 06BE4 FE0C6C16 589 JNE XPNDTRTN3 don't if already 590 * \ / 591 06BE5 EDC95C16 5 ZBM 592 STW FCB,FCRESEEK no matter what, we start from scratch 06BE6 60440001 1 IMM 593 LD R1 1 must add one more block 06BE7 DC405C7B 594 CALLNP LIMITCHECK see if the user has the space 06BE8 FE0E6C18 595 JMP XPNDTRTN1 not enough disk space 596 06BE9 38178802 0 6 BASE 597 LEA R0 SP,XPNDTEMP R0 -> spot to save window 1 info 06BEA DC00328A 598 CALL SAVEWNDO1 save window 1 info 06BEB 40160400 0 @R 599 PARL @R0 where to save it at 06BEC 60095181 0 5 ZBM 600 LD R0 FCB,FCMSBLK pick up the current data block number 06BED E4178803 0 6 BASE 601 ST R0 SP,DATABLK save on stack 06BEE DC005C5B 602 CALL GETFREEW1 get new block in FCBLOCK 06BEF 4144000E IMM 603 PARV FBITSRAF RAF minor access 06BF0 40440000 IMM 604 PARVL 0 relative block number 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1495 (FRQWRRAF) F 83 FREQ - Write Processor (.RAF and .CODE) 06BF1 FE0E6C24 605 JMP XPNDTDERR could not do it 06BF2 E4097182 0 5 ZBM 606 ST R0 FCB,FCLPBLK store the new minor block addr 06BF3 D0094182 5 ZBM 607 INC FCB,FCTFL add on to the file length 06BF4 60440002 1 IMM 608 LD R1 RAFTSMALL going to a small RAF 06BF5 DC406CC0 609 CALLNP UPDATEGFC fix up the GFC 06BF6 FE0E6C16 610 JMP XPNDTRTN3 all done if someone else already did it 06BF7 60178803 0 6 BASE 611 LD R0 SP,DATABLK get the data block number 06BF8 E4095181 0 5 ZBM 612 ST R0 FCB,FCMSBLK set the address of possible data block 06BF9 E4000800 0 613 ST R0 WNDO1(0) point minor to data 06BFA 60040002 0 IMM 614 LD R0 RAFTSMALL now a small RAF 06BFB E4095826 0 5 ZBM 615 ST R0 FCB,FCRAFTYPE set in FCB 06BFC DC40319D 616 CALLNP FORCEWRW1 force it to the disk 06BFD DC403150 617 CALLNP GRUBWNDO1 unmap it 06BFE 38178802 0 6 BASE 618 LEA R0 SP,XPNDTEMP 06BFF DC0032A0 619 CALL RSTRWNDO restore window 1 06C00 40160400 0 @R 620 PARL @R0 621 * \ / 622 623 ********************************************************************************** 624 * * 625 * The tiny RAF is now a small RAF (we have a minor access block). * 626 * Update the directory if necessary. * 627 * * 628 ********************************************************************************** 629 630 * \ / 06C01 5C096415 5 ZBM 631 CMZ FCB,FCSAVED is this a saved file? 06C02 FE026C16 632 JEQ XPNDTRTN3 jump if not -- we're done 633 * \ / 634 06C03 60D78801 3 6 BASE 635 LD R3 SP,DIRPNTR get pointer to directory 06C04 FAF26C0C 3 636 JNZA R3 RAFXPENF jump if we know where it is 06C05 DC0082BB 637 CALL SRCHDIRSN look for the directory entry 06C06 40006C19 638 PARL XPNDTDIRBD address for bad directory 06C07 FE026C09 639 JEQ RAFXPENFD2 jump if entry found 06C08 00131118 640 HALT HALTS1118 existing DIR entry disappeared 641 * --- 642 00006C09 643 RAFXPENFD2 LABEL 06C09 E4D78802 3 6 BASE 644 ST R3 SP,XPNDTEMP save the FDE address from call 06C0A DC40315F 645 CALLNP DMOTEWNDO2 release UDIR1 if large directory 06C0B 60D78802 3 6 BASE 646 LD R3 SP,XPNDTEMP restore FDE address 647 * \ / 648 00006C0C 649 RAFXPENF LABEL 06C0C 60040002 0 IMM 650 LD R0 RAFTSMALL 06C0D E408FC20 0 3 ZBM 651 ST R0 R3,FDRAFTYPE say it is no longer a tiny RAF 06C0E 60097182 0 5 ZBM 652 LD R0 FCB,FCLPBLK 06C0F E408D185 0 3 ZBM 653 ST R0 R3,FDDA give our new root address 06C10 D008D186 3 ZBM 654 INC R3,FDLEN account for our block 06C11 5C178801 6 BASE 655 CMZ SP,DIRPNTR did we lock the dir or the caller? 06C12 FE0C6C16 656 JNE XPNDTRTN3 jump if I didn't lock it 06C13 DC40319D 657 CALLNP FORCEWRW1 put out the directory 06C14 DC40315C 658 CALLNP DMOTEWNDO1 and demote window to WSX 06C15 DC405685 659 CALLNP FREEDIR release grip on directory 660 * \ / 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1496 (FRQWRRAF) F 83 FREQ - Write Processor (.RAF and .CODE) 661 00006C16 662 XPNDTRTN3 LABEL 06C16 19C40001 7 IMM 663 ADD R7 1 00006C17 664 XPNDTRTN2 LABEL 06C17 19C40001 7 IMM 665 ADD R7 1 00006C18 666 XPNDTRTN1 LABEL 06C18 5D1F8004 6 STAK 667 LEAVE POP 668 * --- 669 670 ********************************************************************************** 671 * * 672 * Directory gave us a disk error. Tell the poor user that the * 673 * RAF cannot be expanded for one reason or another. Note that no * 674 * windows are mapped when we get here. * 675 * * 676 ********************************************************************************** 677 00006C19 678 XPNDTDIRBD LABEL 06C19 60097182 0 5 ZBM 679 LD R0 FCB,FCLPBLK pick up block number 06C1A E4095181 0 5 ZBM 680 ST R0 FCB,FCMSBLK put in FCB 06C1B EC097182 5 ZBM 681 STZ FCB,FCLPBLK there is no minor block now 06C1C 60578803 1 6 BASE 682 LD R1 SP,DATABLK get the old root block 06C1D 60840001 2 IMM 683 LD R2 RAFTTINY raf type should be tiny 06C1E FA4C6C20 1 684 JNEZ R1 RIGHTTYPE but if the root block was zero.. 06C1F 60840000 2 IMM 685 LD R2 RAFTEMPTY then the type was empty 00006C20 686 RIGHTTYPE LABEL 06C20 DC006CA7 687 CALL BACKOUTRAF back out of the expansion 06C21 41524000 1 REG 688 PARV R1 root block 06C22 40528000 2 REG 689 PARVL R2 RAF type 06C23 FE0E6C17 690 JMP XPNDTRTN2 return saying RAF is bad 691 * --- 692 693 ********************************************************************************** 694 * * 695 * A disk error on the new minor access block we're creating. * 696 * This only happens when there is no free space on the disk to * 697 * expand onto. In any case, we tell the user it cannot be done. * 698 * * 699 ********************************************************************************** 700 00006C24 701 XPNDTDERR LABEL 06C24 6047FFFF 1 IMM 702 LD R1 -1 06C25 DC405C7B 703 CALLNP LIMITCHECK restore the user's limits 06C26 0013111A 704 HALT HALTS111A shouldn't have errors when returning 06C27 38178802 0 6 BASE 705 LEA R0 SP,XPNDTEMP 06C28 DC0032A0 706 CALL RSTRWNDO 06C29 40160400 0 @R 707 PARL @R0 06C2A EC097182 5 ZBM 708 STZ FCB,FCLPBLK make sure it stays tiny 06C2B 6004009D 0 IMM 709 LD R0 XREQERNFSV No Free Space on Volume 06C2C FE0E6C17 710 JMP XPNDTRTN2 give error return 711 * --- 712 713 END XPANDTRAF subroutine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1497 (FRQWRRAF) F 83 FREQ - Write Processor (.RAF and .CODE) 715 716 ********************************************************************************** 717 * * 718 * MAKETRAF * 719 * * 720 * This subroutine turns an empty RAF into a tiny raf. * 721 * The data block is allocated and FDE and FCB are updated. * 722 * Call: * 723 * FCB, ULB * 724 * CALLNP MAKETRAF * 725 * * 726 * * 727 * Normal return: * 728 * If saved file: Window 1 and 2 are unmapped. * 729 * If not saved file: Window 1 unknown (may be still mapped), * 730 * window 2 not altered. * 731 * * 732 * Error return: * 733 * If saved file: Window 1 and 2 unmapped. * 734 * If not saved file: Window 1 unmapped, window 2 not * 735 * altered. * 736 * * 737 * Eats R0:R3 * 738 * Stack required = 13 * 739 * 1 + max ( BACKOUTRAF (5), DMOTEWNDO1 (7), GERFREEW1 (6), * 740 * GRUBWNDO1 (7), LIMITCHECK (1), TRAFDIR (12), * 741 * UPDATEGFC (8) ) * 742 * * 743 ********************************************************************************** 744 745 BLOCK MAKETRAF subroutine 746 747 ENTRY MAKETRAF 748 749 BEGFRAME 750 ENDFRAME 751 06C2D DD5F8001 6 STAK 752 MAKETRAF ENTRNP PUSH 06C2E 60440001 1 IMM 753 LD R1 1 need one block for this 06C2F DC405C7B 754 CALLNP LIMITCHECK make sure we can have it 06C30 FE0E6C40 755 JMP CANTDOIT jump if we cannot do it 06C31 DC005C5B 756 CALL GETFREEW1 get new block in FCBLOCK 06C32 4144000F IMM 757 PARV FBITRAFD RAF data 06C33 40440000 IMM 758 PARVL 0 relative block number 06C34 FE0E6C41 759 JMP MKTRNOSP (out of disk space only error possible) 760 * \ / 761 06C35 60440001 1 IMM 762 LD R1 RAFTTINY going to a tiny RAF 06C36 E4495826 1 5 ZBM 763 ST R1 FCB,FCRAFTYPE set it in the FCB 06C37 D0094182 5 ZBM 764 INC FCB,FCTFL count this block 06C38 DC406CC0 765 CALLNP UPDATEGFC make changes known 06C39 FE0E6C3F 766 JMP BEAT we were beaten 06C3A DC40315C 767 CALLNP DMOTEWNDO1 done with this for now 06C3B 5C096415 5 ZBM 768 CMZ FCB,FCSAVED is this file saved? 06C3C FE026C3F 769 JEQ NOTSAVED jump if not 770 * \ / 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1498 (FRQWRRAF) F 83 FREQ - Write Processor (.RAF and .CODE) 771 06C3D DC406C4B 772 CALLNP TRAFDIR update the directory 06C3E FE0E6C47 773 JMP TRAFDSEN if directory went bad 774 * \ / 775 00006C3F 776 BEAT LABEL 00006C3F 777 NOTSAVED LABEL 06C3F 19C40001 7 IMM 778 ADD R7 1 good return 00006C40 779 CANTDOIT LABEL 06C40 5D1F8001 6 STAK 780 LEAVE POP 781 * --- 782 00006C41 783 MKTRNOSP LABEL 06C41 60D20000 3 0 REG 784 LD R3 R0 copy error code 06C42 6047FFFF 1 IMM 785 LD R1 -1 to reverse 06C43 DC405C7B 786 CALLNP LIMITCHECK restore users limits 06C44 0013111B 787 HALT HALTS111B impossible return 06C45 6012C000 0 3 REG 788 LD R0 R3 get back error code 06C46 FE0E6C40 789 JMP CANTDOIT and return error 790 * --- 791 00006C47 792 TRAFDSEN LABEL 06C47 DC006CA7 793 CALL BACKOUTRAF 06C48 41440000 IMM 794 PARV 0 no root block 06C49 40440000 IMM 795 PARVL RAFTEMPTY back to an empty RAF 06C4A FE0E6C40 796 JMP CANTDOIT 797 * --- 798 799 END of MAKETRAF subroutine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1499 (FRQWRRAF) F 83 FREQ - Write Processor (.RAF and .CODE) 801 802 ********************************************************************************** 803 * * 804 * TRAFDIR * 805 * * 806 * This subroutine updates the directory for a saved RAF * 807 * that has just been expanded from an empty file to a tiny RAF. * 808 * Call: * 809 * FCB -> FCB of saved tiny RAF * 810 * CALLNP TRAFDIR * 811 * * 812 * * 813 * Eats R0:R3. * 814 * On error, error code in R0, UDIR unlocked, windows unmapped. * 815 * Stack required = 12 * 816 * 1 + max ( FORCEWRW1 (7), FREEDIR (5), GRUBWNDOx (7), * 817 * SRCHDIRSN (11) ) * 818 * * 819 ********************************************************************************** 820 821 BLOCK TRAFDIR subroutine 822 823 ENTRY TRAFDIR 824 825 BEGFRAME 826 ENDFRAME 827 06C4B DD5F8001 6 STAK 828 TRAFDIR ENTRNP PUSH 06C4C DC0082BB 829 CALL SRCHDIRSN find the directory 06C4D 40006C5A 830 PARL TRAFDIRDSE disk error 06C4E FE026C50 831 JEQ FOUNDIT jump if it is there 06C4F 0013111C 832 HALT HALTS111C save file not found in directory 833 * --- 834 00006C50 835 FOUNDIT LABEL 06C50 60095181 0 5 ZBM 836 LD R0 FCB,FCMSBLK get the disk block address 06C51 E408D185 0 3 ZBM 837 ST R0 R3,FDDA set in the directory 06C52 60040001 0 IMM 838 LD R0 RAFTTINY tiny RAF now 06C53 E408FC20 0 3 ZBM 839 ST R0 R3,FDRAFTYPE let all know this 06C54 D008D186 3 ZBM 840 INC R3,FDLEN account for the extra block 06C55 DC40319D 841 CALLNP FORCEWRW1 force it out 06C56 DC403150 842 CALLNP GRUBWNDO1 clean things up 06C57 DC403153 843 CALLNP GRUBWNDO2 06C58 DC405685 844 CALLNP FREEDIR through with the directory 06C59 19C40001 7 IMM 845 ADD R7 1 good return 00006C5A 846 TRAFDIRDSE LABEL 06C5A 5D1F8001 6 STAK 847 LEAVE POP 848 * --- 849 850 END of TRAFDIR subroutine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1500 (FRQWRRAF) F 83 FREQ - Write Processor (.RAF and .CODE) 852 853 ********************************************************************************** 854 * * 855 * Convert a small RAF into a large one. Must have plain vanilla * 856 * write access to the RAF. * 857 * * 858 * LD ULB => limit block for he who is being charged * 859 * LD FCB => file control block for RAF * 860 * LD R3 => directory entry or zero if directory not * 861 * searched. If zero is specified, the directory * 862 * will be locked, searched, updated, and unlocked. * 863 * If the file is unsaved, this flag is not checked. * 864 * CALLNP RAFEXPAND * 865 * rtn1: insufficient file space (R0=code) * 866 * rtn2: disk error while expanding (R0=code and, in theory, * 867 * the RAF is still good) * 868 * rtn3: success * 869 * Eats R0:R3. * 870 * Stack required = 18 * 871 * 3 + max ( BACKOUTRAF (5), DMOTEWNDOx (7), FORCEWRW1 (7), * 872 * FREEDIR (5), GETFREEW1 (6), GRUBWNDO1 (7), * 873 * LIMITCHK (1), RSTRWNDO (7), SAVEWNDO1 (2), * 874 * SRCHDIRSN (11), UPDATEGFC (8), XPANDTRAF (15) ) * 875 * * 876 ********************************************************************************** 877 878 BLOCK RAFEXPAND subroutine 879 ENTRY RAFEXPAND 880 881 BEGFRAME 00178801 6 BASE 882 DIRPNTR BSS 1 => directory entry if known 00178802 6 BASE 883 GENTEMP BSS 1 884 ENDFRAME 885 06C5B DD5F8003 6 STAK 886 RAFEXPAND ENTRNP PUSH 06C5C E4D78801 3 6 BASE 887 ST R3 SP,DIRPNTR save pointer to directory entry 06C5D 60095826 0 5 ZBM 888 LD R0 FCB,FCRAFTYPE see what type of RAF this is 06C5E 5CA06C5F 0 889 LDPC XPNDJTAB(R0) and act accordingly 890 * --- 891 00006C5F 892 XPNDJTAB LABEL 06C5F 00006C66 893 VFD ADR HAVEMIN empty RAF 06C60 00006C63 894 VFD ADR TINYRAF tiny RAF 06C61 00006C66 895 VFD ADR HAVEMIN small RAF 06C62 00006C93 896 VFD ADR XPANDRTN3 large RAF 897 00006C63 898 TINYRAF LABEL 06C63 DC406BE1 899 CALLNP XPANDTRAF must first make this into a small RAF 06C64 FE0E6C95 900 JMP XPANDRTN1 insufficient disk space 06C65 FE0E6C94 901 JMP XPANDRTN2 disk error 902 * \ / 903 00006C66 904 HAVEMIN LABEL 06C66 EDC95C16 5 ZBM 905 STW FCB,FCRESEEK no matter what, we start from scratch 06C67 60440001 1 IMM 906 LD R1 1 must add one more block 06C68 DC405C7B 907 CALLNP LIMITCHECK see if the user has the space 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1501 (FRQWRRAF) F 83 FREQ - Write Processor (.RAF and .CODE) 06C69 FE0E6C95 908 JMP XPANDRTN1 error return 06C6A 38178802 0 6 BASE 909 LEA R0 SP,GENTEMP for SAVEWNDO1 06C6B DC00328A 910 CALL SAVEWNDO1 remember mapping of WNDO1 06C6C 40160400 0 @R 911 PARL @R0 place to save VP pointer 06C6D DC005C5B 912 CALL GETFREEW1 get new block in FCBLOCK 06C6E 4144000D IMM 913 PARV FBITLRAF RAF major access 06C6F 40440000 IMM 914 PARVL 0 relative block number 06C70 FE0E6C9D 915 JMP XPANDDERR error return 06C71 E4096183 0 5 ZBM 916 ST R0 FCB,FCMABLK store the new major block addr 06C72 D0094182 5 ZBM 917 INC FCB,FCTFL add on to the file length 06C73 60440003 1 IMM 918 LD R1 RAFTLARGE type code for large RAF 06C74 E4495826 1 5 ZBM 919 ST R1 FCB,FCRAFTYPE it is the new RAF type 06C75 DC406CC0 920 CALLNP UPDATEGFC update the GFC 06C76 FE0E6C93 921 JMP XPANDRTN3 all done if we were beat 06C77 60097182 0 5 ZBM 922 LD R0 FCB,FCLPBLK get the address of the minor block 06C78 E4000800 0 923 ST R0 WNDO1(0) point major to minor 06C79 DC40319D 924 CALLNP FORCEWRW1 force it to the disk 06C7A DC403150 925 CALLNP GRUBWNDO1 unmap it 06C7B 38178802 0 6 BASE 926 LEA R0 SP,GENTEMP address for RSTRWNDO 06C7C DC0032A0 927 CALL RSTRWNDO recover WNDO1 mapping 06C7D 40160400 0 @R 928 PARL @R0 address of VP pointer 929 * \ / 930 931 ********************************************************************************** 932 * * 933 * The RAF is expanded. Update the directory if necessary. * 934 * * 935 ********************************************************************************** 936 937 * \ / 06C7E 5C096415 5 ZBM 938 CMZ FCB,FCSAVED is this a saved file? 06C7F FE026C93 939 JEQ XPANDRTN3 jump if not -- we're done 06C80 60D78801 3 6 BASE 940 LD R3 SP,DIRPNTR get pointer to directory 06C81 FAF26C89 3 941 JNZA R3 RAFXPENF jump if we know where it is 06C82 DC0082BB 942 CALL SRCHDIRSN look for the directory entry 06C83 40006C96 943 PARL XPANDDIRBD address for bad directory 06C84 FE026C86 944 JEQ RAFXPENFD2 jump if entry found 06C85 00131110 945 HALT HALTS1110 existing DIR entry disappeared 946 * --- 947 00006C86 948 RAFXPENFD2 LABEL 06C86 E4D78802 3 6 BASE 949 ST R3 SP,GENTEMP save the FDE address from call 06C87 DC40315F 950 CALLNP DMOTEWNDO2 release UDIR1 if large directory 06C88 60D78802 3 6 BASE 951 LD R3 SP,GENTEMP restore FDE address 00006C89 952 RAFXPENF LABEL 06C89 60040003 0 IMM 953 LD R0 RAFTLARGE now a large RAF 06C8A E408FC20 0 3 ZBM 954 ST R0 R3,FDRAFTYPE say the thing is a large RAF 06C8B 60096183 0 5 ZBM 955 LD R0 FCB,FCMABLK 06C8C E408D185 0 3 ZBM 956 ST R0 R3,FDDA give our new root address 06C8D D008D186 3 ZBM 957 INC R3,FDLEN update the length of the file 06C8E 5C178801 6 BASE 958 CMZ SP,DIRPNTR did we lock the dir or the caller? 06C8F FE0C6C93 959 JNE XPANDRTN3 jump if I didn't lock it 06C90 DC40319D 960 CALLNP FORCEWRW1 put out the directory 06C91 DC40315C 961 CALLNP DMOTEWNDO1 and demote window to WSX 06C92 DC405685 962 CALLNP FREEDIR release grip on directory 963 * \ / 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1502 (FRQWRRAF) F 83 FREQ - Write Processor (.RAF and .CODE) 964 00006C93 965 XPANDRTN3 LABEL 06C93 19C40001 7 IMM 966 ADD R7 1 00006C94 967 XPANDRTN2 LABEL 06C94 19C40001 7 IMM 968 ADD R7 1 00006C95 969 XPANDRTN1 LABEL 06C95 5D1F8003 6 STAK 970 LEAVE POP 971 * --- 972 973 ********************************************************************************** 974 * * 975 * Directory gave us a disk error. Tell the poor user that the * 976 * RAF cannot be expanded for one reason or another. Note that no * 977 * windows are mapped when we get here. * 978 * * 979 ********************************************************************************** 980 00006C96 981 XPANDDIRBD LABEL 06C96 60096183 0 5 ZBM 982 LD R0 FCB,FCMABLK 06C97 E4095181 0 5 ZBM 983 ST R0 FCB,FCMSBLK remember the block to go away 06C98 EC096183 5 ZBM 984 STZ FCB,FCMABLK there is no major block now 06C99 DC006CA7 985 CALL BACKOUTRAF 06C9A 41497182 5 ZBM 986 PARV FCB,FCLPBLK new root block 06C9B 40440002 IMM 987 PARVL RAFTSMALL new RAF type 06C9C FE0E6C94 988 JMP XPANDRTN2 return saying RAF is bad 989 * --- 990 991 ********************************************************************************** 992 * * 993 * A disk error on the new major access block we're creating. * 994 * This only happens when there is no free space on the disk to * 995 * expand onto. In any case, we tell the user it cannot be done. * 996 * * 997 ********************************************************************************** 998 00006C9D 999 XPANDDERR LABEL 06C9D DC403150 1000 CALLNP GRUBWNDO1 unmap the trashed window 06C9E 6047FFFF 1 IMM 1001 LD R1 -1 06C9F DC405C7B 1002 CALLNP LIMITCHECK remove from the user's limits 06CA0 00131113 1003 HALT HALTS1113 shouldn't have errors when returning 06CA1 38178802 0 6 BASE 1004 LEA R0 SP,GENTEMP 06CA2 DC0032A0 1005 CALL RSTRWNDO 06CA3 40160400 0 @R 1006 PARL @R0 06CA4 EC096183 5 ZBM 1007 STZ FCB,FCMABLK make sure it stays small 06CA5 6004009D 0 IMM 1008 LD R0 XREQERNFSV No Free Space on Volume 06CA6 FE0E6C94 1009 JMP XPANDRTN2 give error return 1010 * --- 1011 1012 END RAFEXPAND subroutine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1503 (FRQWRRAF) F 83 FREQ - Write Processor (.RAF and .CODE) 1014 1015 ********************************************************************************** 1016 * * 1017 * BACKOUTRAF * 1018 * * 1019 * Subroutine that backs out of a RAF expansion if a directory * 1020 * error occurred. * 1021 * Call: * 1022 * FCB -> FCB * 1023 * FCB,FCMSBLK = new root block * 1024 * ULB => current limit block * 1025 * CALL BACKOUTRAF * 1026 * PARV old root block * 1027 * PARVL old RAF type * 1028 * * 1029 * Window mapping not altered. * 1030 * * 1031 * Eats R0:R3 * 1032 * Stack Required = 5 * 1033 * 2 + max ( FREEFILE (3), LIMITCHECK (1), LOCKWAIT (0) ) * 1034 * * 1035 ********************************************************************************** 1036 1037 BLOCK BACKOUTRAF subroutine 1038 1039 ENTRY BACKOUTRAF 1040 1041 BEGFRAME 00178801 6 BASE 1042 STACKWORD BSS 1 the word on the stack 00099181 6 ZBM 1043 ROOT EQU STACKWORD/MSBLKFIELD root address of file 00098021 6 ZBM 1044 TYPE EQU STACKWORD/BITS 0:1 RAF type 1045 ENDFRAME 1046 06CA7 DD1F8002 6 STAK 1047 BACKOUTRAF ENTR PUSH 06CA8 C1499181 6 ZBM 1048 STPV SP,ROOT save old root block address 06CA9 C0498021 6 ZBM 1049 STPVL SP,TYPE and the type of the old raf 06CAA D0494182 5 ZBM 1050 DEC FCB,FCTFL remove the one block from the length 06CAB 6047FFFF 1 IMM 1051 LD R1 -1 06CAC DC405C7B 1052 CALLNP LIMITCHECK remove from the user's limits 06CAD 00131112 1053 HALT HALTS1112 shouldn't have errors when returning 06CAE DC004FEA 1054 CALL FREEFILE return the unwanted block 06CAF 41574801 5 BASE 1055 PARV FCB,FCBLOCK 06CB0 40440000 IMM 1056 PARVL FFTUNKNOWN 06CB1 EC095181 5 ZBM 1057 STZ FCB,FCMSBLK no block here 06CB2 60C95F16 3 5 ZBM 1058 LD R3 FCB,FCDCBPTR pick up global pointer 06CB3 FAF06CBE 3 1059 JZA R3 ALLDONE 1060 * \ / 1061 1062 * Update the global control block. 1063 PLOCK R3,GFXPNDLOCK 06CB4 0CC00000 1063 IOFF 06CB5 D1D6C805 3 BASE 1063 SETT R3,GFXPNDLOCK 06CB6 FE0C6CB8 1063 JNE MA(2+DISPW MA 0) 06CB7 DC40308B 1063 CALLNP LOCKWAIT 06CB8 60098021 0 6 ZBM 1064 LD R0 SP,TYPE 06CB9 E408C021 0 3 ZBM 1065 ST R0 R3,GFRAFTYPE set the new type 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1504 (FRQWRRAF) F 83 FREQ - Write Processor (.RAF and .CODE) 06CBA 60099181 0 6 ZBM 1066 LD R0 SP,ROOT 06CBB E408D182 0 3 ZBM 1067 ST R0 R3,GFMSBLK set the new root block 1068 PUNLOCK R3,GFXPNDLOCK 06CBC EC16C805 3 BASE 1068 STZ R3,GFXPNDLOCK 06CBD 0C800000 1068 ION 1069 * \ / 1070 00006CBE 1071 ALLDONE LABEL 06CBE 6004009F 0 IMM 1072 LD R0 XREQERDSE disk structure error (meaning the 1073 * data still is there). 06CBF 5D1F8002 6 STAK 1074 LEAVE POP 1075 * --- 1076 1077 END of BACKOUTRAF subroutine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1505 (FRQWRRAF) F 83 FREQ - Write Processor (.RAF and .CODE) 1079 1080 ********************************************************************************** 1081 * * 1082 * UPDATEGFC * 1083 * * 1084 * When a MW RAF is expanded the global file control block * 1085 * for the file must be updated. Here we lock the GFC, and check * 1086 * if we have been beaten in the attempt to expand the file. If * 1087 * we were beaten then we go ahead and return the block to free * 1088 * storage, decrement the account use of the block, and update the * 1089 * FCB to reflect the increased size. * 1090 * Also, since everyone who expands a RAF increments the size * 1091 * in the FDE we do not want to count this in the FCB for the MW * 1092 * files. If we did count this then when the file is closed it * 1093 * would be added in again to FDLEN (since FCTFL is a relative count). * 1094 * Call: * 1095 * R1 = * 1096 * FCB -> FCB * 1097 * FCB,FCMSBLK = new root block * 1098 * FCB,FCDCBPTR -> GFC (if any) * 1099 * WNDO1 contains the new root block * 1100 * CALLNP UPDATEGFC * 1101 * JMP beaten at the expansion effort (wndo1 grubbed) * 1102 * normal return - GFC updated or no GFC to update * 1103 * * 1104 * Eats R0:R3 * 1105 * Stack required = 8 * 1106 * 1 + max ( FREEFILE (3), GRUBWNDO1 (7), LIMITCHECK (1), * 1107 * LOCKWAIT (0), RAFCURCHEK (1) ) * 1108 * * 1109 ********************************************************************************** 1110 1111 BLOCK UPDATEGFC subroutine 1112 1113 ENTRY UPDATEGFC 1114 1115 BEGFRAME 1116 ENDFRAME 1117 06CC0 DD5F8001 6 STAK 1118 UPDATEGFC ENTRNP PUSH 06CC1 60C95F16 3 5 ZBM 1119 LD R3 FCB,FCDCBPTR get pointer to GFC 06CC2 FAF26CC4 3 1120 JNZA R3 HAVEGFC jump if there is one 06CC3 FBE06CD3 7 1121 IRJ R7 NOTSAVED else, leave 1122 * --- 1123 00006CC4 1124 HAVEGFC LABEL 1125 PLOCK R3,GFXPNDLOCK 06CC4 0CC00000 1125 IOFF 06CC5 D1D6C805 3 BASE 1125 SETT R3,GFXPNDLOCK 06CC6 FE0C6CC8 1125 JNE MA(2+DISPW MA 0) 06CC7 DC40308B 1125 CALLNP LOCKWAIT 06CC8 6448C021 1 3 ZBM 1126 CPR R1 R3,GFRAFTYPE has the new type already been set? 06CC9 FE0A6CD4 1127 JLE BEATEN jump if so, we were beaten 1128 * \ / 1129 06CCA E448C021 1 3 ZBM 1130 ST R1 R3,GFRAFTYPE set the new type 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1506 (FRQWRRAF) F 83 FREQ - Write Processor (.RAF and .CODE) 06CCB 60095181 0 5 ZBM 1131 LD R0 FCB,FCMSBLK pick up the new root block 06CCC E408D182 0 3 ZBM 1132 ST R0 R3,GFMSBLK set the new root block 1133 PUNLOCK R3,GFXPNDLOCK 06CCD EC16C805 3 BASE 1133 STZ R3,GFXPNDLOCK 06CCE 0C800000 1133 ION 06CCF 19C40001 7 IMM 1134 ADD R7 1 indicate we were successful 00006CD0 1135 BEATRETURN LABEL 06CD0 5C096415 5 ZBM 1136 CMZ FCB,FCSAVED is it a saved file? 06CD1 FE026CD3 1137 JEQ NOTSAVED jump if not 06CD2 D0494182 5 ZBM 1138 DEC FCB,FCTFL remove one from the file length 00006CD3 1139 NOTSAVED LABEL 06CD3 5D1F8001 6 STAK 1140 LEAVE POP 1141 * --- 1142 00006CD4 1143 BEATEN LABEL 1144 PUNLOCK R3,GFXPNDLOCK 06CD4 EC16C805 3 BASE 1144 STZ R3,GFXPNDLOCK 06CD5 0C800000 1144 ION 06CD6 DC403150 1145 CALLNP GRUBWNDO1 clean up this window 06CD7 6047FFFF 1 IMM 1146 LD R1 -1 returning a block 06CD8 DC405C7B 1147 CALLNP LIMITCHECK 06CD9 00131116 1148 HALT HALTS1116 06CDA DC004FEA 1149 CALL FREEFILE 06CDB 41574801 5 BASE 1150 PARV FCB,FCBLOCK block we are returning 06CDC 40440000 IMM 1151 PARVL FFTUNKNOWN don't know the block type 06CDD DC406CDF 1152 CALLNP RAFCURCHEK make our FCB current 06CDE FE0E6CD0 1153 JMP BEATRETURN indicate we were beaten 1154 * --- 1155 1156 END of UPDATEGFC subroutine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1507 (FRQWRRAF) F 83 FREQ - Write Processor (.RAF and .CODE) 1158 1159 ********************************************************************************** 1160 * * 1161 * RAFCURCHEK * 1162 * * 1163 * The RAF root pointers in the FCB can become obsolete as * 1164 * other processes modify the file. This routine gets them back * 1165 * in sync. * 1166 * * 1167 * Call: * 1168 * FCB -> FCB * 1169 * FCB,FCDCBPTR -> GFC * 1170 * CALLNP RAFCURCHEK * 1171 * R3 -> GFC (FCDCBPTR) | 0 * 1172 * * 1173 * Eats R0:R1, sets R3 * 1174 * Stack required = 1 * 1175 * * 1176 ********************************************************************************** 1177 1178 BLOCK RAFCURCHEK subroutine 1179 1180 ENTRY RAFCURCHEK 1181 ENTRY RAFROOTGET 1182 1183 BEGFRAME 1184 ENDFRAME 1185 06CDF DD5F8001 6 STAK 1186 RAFCURCHEK ENTRNP PUSH 06CE0 60C95F16 3 5 ZBM 1187 LD R3 FCB,FCDCBPTR get GFC address 06CE1 FAF06CEB 3 1188 JZA R3 ALLOK jump if nothing to work on 06CE2 60095826 0 5 ZBM 1189 LD R0 FCB,FCRAFTYPE get local current RAF type 06CE3 5D606CEC 0 1190 XCT RAFROOTGET(R0) pick up the root block 06CE4 6408D182 0 3 ZBM 1191 CPR R0 R3,GFMSBLK does this match? 06CE5 FE026CEB 1192 JEQ ALLOK things are current if so 06CE6 6048C021 1 3 ZBM 1193 LD R1 R3,GFRAFTYPE get the actual RAF type 06CE7 E4495826 1 5 ZBM 1194 ST R1 FCB,FCRAFTYPE set into the FCB 06CE8 6008D182 0 3 ZBM 1195 LD R0 R3,GFMSBLK get the current root block 06CE9 5D626CF0 1 1196 XCT RAFROOTPUT(R1) set the root in the FCB 06CEA EDC95C16 5 ZBM 1197 STW FCB,FCRESEEK better reseek 00006CEB 1198 ALLOK LABEL 06CEB 5D1F8001 6 STAK 1199 LEAVE POP 1200 * --- 1201 1202 * table for picking up the root block of a RAF from the FCB (indexed by RAFTYPE) 00006CEC 1203 RAFROOTGET LABEL 06CEC 60040000 0 IMM 1204 LD R0 0 empty RAF 06CED 60095181 0 5 ZBM 1205 LD R0 FCB,FCMSBLK tiny RAF 06CEE 60097182 0 5 ZBM 1206 LD R0 FCB,FCLPBLK small RAF 06CEF 60096183 0 5 ZBM 1207 LD R0 FCB,FCMABLK large RAF 1208 1209 * table for storing the root block into the FCB (indexed by RAFTYPE) 00006CF0 1210 RAFROOTPUT LABEL 06CF0 EC095181 5 ZBM 1211 STZ FCB,FCMSBLK empty RAF 06CF1 E4095181 0 5 ZBM 1212 ST R0 FCB,FCMSBLK tiny RAF 06CF2 E4097182 0 5 ZBM 1213 ST R0 FCB,FCLPBLK small RAF 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1508 (FRQWRRAF) F 83 FREQ - Write Processor (.RAF and .CODE) 06CF3 E4096183 0 5 ZBM 1214 ST R0 FCB,FCMABLK large RAF 1215 1216 END of RAFCURCHEK subroutine 1217 1218 END RAF Write Routines 135 INPUT FRQWRPATH write to a PATH 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1509 (FRQWRPATH) F 84 Write Processor (.PATH) 3 4 ********************************************************************************** 5 * * 6 * This is the routine that performs writes onto PATH devices. * 7 * From the users point of view he may write any length record. If * 8 * the record the user wants to write is less than MAXRECWR then we * 9 * just write the record whenever the room exists. If the record is * 10 * larger than MAXRECWR then we lock the path so that only the current * 11 * writer may write to it. The writes are done in sizes of MAXRECWR, * 12 * except the last, until the write has finished. Note that the path * 13 * never grows larger than MAXPATHCORE. * 14 * * 15 * Stack required = 8 * 16 * 0 + max ( CLRPTHEXCWR (1), DQUEONE (4), GIVEUINT (8), * 17 * LOCKWAIT (0), SETMEMTRAP (1), SFREEMEM (0), * 18 * SGETMEM (0), SUSPENDFRQ (1) ) * 19 * * 20 ********************************************************************************** 21 22 BLOCK PATHWRITE subroutine 23 ENTRY PATHWRITE write a record on a .PATH 24 ENTRY WFMPATH write a filemark on a .PATH 25 ENTRY CLRPTHEXCWR clear the exclusive write flag 26 00006CF4 27 PATHWRITE LABEL 06CF4 61C00412 7 28 LD R7 CPPSA pointer to the process status area 06CF5 61C9DF11 7 7 ZBM 29 LD R7 R7,PSCACHNP1 permanent pointer to the users registers 06CF6 61095F16 4 5 ZBM 30 LD R4 FCB,FCDCBPTR get the pointer to the control block 31 PLOCK R4,PTHLOCK get exclusive access to the PATH 06CF7 0CC00000 31 IOFF 06CF8 D1D70807 4 BASE 31 SETT R4,PTHLOCK 06CF9 FE0C6CFB 31 JNE MA(2+DISPW MA 0) 06CFA DC40308B 31 CALLNP LOCKWAIT 06CFB 5C090011 4 ZBM 32 CMZ R4,PTHRDR see if a reader exists before we work 06CFC FE026D48 33 JEQ NOREADER if no readers then we must wait 06CFD 60091373 0 4 ZBM 34 LD R0 R4,PTHEXCWR anyone have exclusive write to the PATH? 06CFE FA026D02 0 35 JEQZ R0 PTHWRITEOK no problem, we can write 06CFF 60400414 1 36 LD R1 CPCUPC get current UPC pointer 06D00 64085371 0 1 ZBM 37 CPR R0 R1,UPCSERNM check if the PATH write locked by us 06D01 FE0C6D53 38 JNE STOPMENOW not locked by us, jump to release another 39 * \ / 40 41 ********************************************************************************** 42 * * 43 * At this point we have the path critical region locked. We * 44 * determine whether we should lock the for path exclusive write. * 45 * Once this is accomplished we figure out exactly how many * 46 * characters we can write to the path. * 47 * * 48 ********************************************************************************** 49 50 * \ / 00006D02 51 PTHWRITEOK LABEL 06D02 6097C803 2 7 BASE 52 LD R2 R7,CAR1 record length user wants to write 06D03 648400FB 2 IMM 53 CPR R2 MAXRECWR compare against the maximum 06D04 FE0A6D09 54 JLE RECSIZEOK no problem with size here 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1510 (FRQWRPATH) F 84 Write Processor (.PATH) 06D05 60000414 0 55 LD R0 CPCUPC get pointer to UPC block 06D06 60081371 0 0 ZBM 56 LD R0 R0,UPCSERNM serial number of the process 06D07 E4091373 0 4 ZBM 57 ST R0 R4,PTHEXCWR lock the path exclusive write 06D08 608400FB 2 IMM 58 LD R2 MAXRECWR restrict write to maximum allowed 59 * \ / 00006D09 60 RECSIZEOK LABEL 06D09 5C569004 2 REG 61 HIB R2+PTHEHDR-1 find power of two including header 06D0A 70D20000 3 0 REG 62 LDN R3 R0 06D0B 18C4001E 3 IMM 63 ADD R3 WORDLNTH-(CPW LOG 2) R3 has the log size of block to hold record 06D0C 6026255E 0 3 64 LD R0 BITTAB(R3) get the size required 06D0D 300908B1 0 4 ZBM 65 RSB R0 R4,PTHSIZE check if our record will fit 06D0E FA086D53 0 66 JLTZ R0 STOPMENOW suspend me if not enough room 06D0F E40908B1 0 4 ZBM 67 ST R0 R4,PTHSIZE take the space from the PATH 68 PUNLOCK R4,PTHLOCK unlock the list 06D10 EC170807 4 BASE 68 STZ R4,PTHLOCK 06D11 0C800000 68 ION 69 * \ / 70 71 ********************************************************************************** 72 * * 73 * We are assured that our record will fit onto the PATH. We * 74 * set up to catch user errors, and then basically build the record. * 75 * Once we are satisfied the record is complete we lock the path, link * 76 * the new record in, and return information into the FCB. * 77 * * 78 ********************************************************************************** 79 80 * \ / 06D12 DC005BCF 81 CALL SETMEMTRAP this is to catch any user screw-ups 06D13 40006D60 82 PARL UMEMBAD error address if any problems arise 06D14 DC002ED0 83 CALL SGETMEM get a block for the message 06D15 4052C000 3 REG 84 PARVL R3 06D16 E4C81640 3 0 ZBM 85 ST R3 R0,PTHELOGL remember its log 2 size 06D17 E48800B0 2 0 ZBM 86 ST R2 R0,PTHENCHARS number of characters in this block 06D18 60D20000 3 0 REG 87 LD R3 R0 switch pointers around 06D19 60528000 1 2 REG 88 LD R1 R2 R1 needs the character count 06D1A 60099040 0 6 ZBM 89 LD R0 SP,IRGRTYP get the type of record we have 06D1B E416C004 0 3 CACH 90 ST R0 R3,PTHECHARB remember the record type & clear continue flag 06D1C 6017C804 0 7 BASE 91 LD R0 R7,CAR2 source character address 06D1D 3896C005 2 3 CACH 92 LEA R2 R3,PTHECHARS destination character address 06D1E 5C095A10 5 ZBM 93 CMZ FCB,FCRELOC check requesters fetch relocation 06D1F FE0C6D21 94 JNE MONTANA 06D20 59840040 IMM 95 CLBMSR MSRFRELOC switch to other address space if needed 96 * \ / 97 00006D21 98 MONTANA LABEL 06D21 FE400000 99 CMOVE 06D22 59C40040 IMM 100 IORMSR MSRFRELOC 101 PLOCK R4,PTHLOCK lock access to path control 06D23 0CC00000 101 IOFF 06D24 D1D70807 4 BASE 101 SETT R4,PTHLOCK 06D25 FE0C6D27 101 JNE MA(2+DISPW MA 0) 06D26 DC40308B 101 CALLNP LOCKWAIT 102 * \ / 103 00006D27 104 SETPATHEOF LABEL 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1511 (FRQWRPATH) F 84 Write Processor (.PATH) 06D27 38491F11 1 4 ZBM 105 LEA R1 R4,PTHQUE get pointer to queue of messages 06D28 60040000 0 IMM 106 LD R0 0 zero marks the end 06D29 3C085F10 0 1 ZBM 107 LSRCH R0 R1,PTHELINK find the end of the message list 06D2A EC08DF10 3 ZBM 108 STZ R3,PTHELINK set this elements forward ptr to null 06D2B E4C85F10 3 1 ZBM 109 ST R3 R1,PTHELINK place new entry at the end 110 * \ / 111 112 ********************************************************************************** 113 * * 114 * Here we need to set the type for a path message. We get the type * 115 * from the header associated with each PATH. We wait until the PATH * 116 * is linked in before the type is set. Note that once the element has * 117 * been linked in we hopefully signal the waiting reader. * 118 * * 119 ********************************************************************************** 120 121 * \ / 06D2C 6008C271 0 3 ZBM 122 LD R0 R3,PTHERTYPE get the path record type 06D2D E4094445 0 5 ZBM 123 ST R0 FCB,FCLASTREAD set type of record just read 06D2E EC094C15 5 ZBM 124 STZ FCB,FCLOADPT definitly not at load point 06D2F E4DF8001 3 6 STAK 125 ST R3 STAK SP,1 save the pointers to the path element 06D30 DC003457 126 CALL GIVEUINT tell reader about the event 06D31 41490112 4 ZBM 127 PARV R4,PTHREADER PCB of reader 06D32 41530000 4 REG 128 PARV R4 PCQPARM if waiting 06D33 4147FFFF IMM 129 PARV ONEBITS mask if waiting 06D34 41440009 IMM 130 PARV NQPATHWAIT queue number if waiting 06D35 41420080 IMM 131 PARV 1*BIT CAIMNEPATH program interrupt mask bit 06D36 41490411 4 ZBM 132 PARV R4,PTHINTE device interrupt enable bit 06D37 41440023 IMM 133 PARV UINTNEPATH interrupt code 06D38 40492312 4 ZBM 134 PARVL R4,PTHREADFCB interrupt subcode 06D39 60DF8001 3 6 STAK 135 LD R3 STAK SP,1 restore the pointers to path element 06D3A 5C091373 4 ZBM 136 CMZ R4,PTHEXCWR do we have more to write? 06D3B FE026D45 137 JEQ ALLDONE jump if no more to write (not continuation) 138 * \ / 139 140 ********************************************************************************** 141 * * 142 * Here is where we know that we have to continue writing our record * 143 * to the path. We update the users registers and check to see if we * 144 * may continue to write, if so we jump to do just that. However if we * 145 * have finished writing our record we return to the user. * 146 * * 147 ********************************************************************************** 148 149 * \ / 06D3C 6048C0B0 1 3 ZBM 150 LD R1 R3,PTHENCHARS this is the number of character we wrote 06D3D 6017C804 0 7 BASE 151 LD R0 R7,CAR2 get the users current destination pointer 06D3E 984A1F30 1 0 CBM 152 ADDM R1 R0/FLDCHARS advance the character address 06D3F E417C804 0 7 BASE 153 ST R0 R7,CAR2 put it back into the users console area 06D40 B057C803 1 7 BASE 154 RSBM R1 R7,CAR1 decrease the character count 06D41 FE0A6D44 155 JLE PATHDONE no more of this record to write 06D42 EDC8C011 3 ZBM 156 STW R3,PTHECONTN mark this element as being continued 06D43 FE0E6D02 157 JMP PTHWRITEOK jump to write more if we can 158 * --- 159 00006D44 160 PATHDONE LABEL 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1512 (FRQWRPATH) F 84 Write Processor (.PATH) 06D44 EC091373 4 ZBM 161 STZ R4,PTHEXCWR clear the exclusive write flag 162 * \ / 163 00006D45 164 ALLDONE LABEL 165 PUNLOCK R4,PTHLOCK let go of the control block 06D45 EC170807 4 BASE 165 STZ R4,PTHLOCK 06D46 0C800000 165 ION 06D47 FE0E5982 166 JMP FNOERROR finish with success 167 * --- 168 169 ********************************************************************************** 170 * * 171 * A reader does not exist. If he was there before then we give * 172 * an error and if he hasn't ever been there then we suspend ourselves * 173 * and wait for his existance (cleans up error recovery). * 174 * * 175 ********************************************************************************** 176 00006D48 177 NOREADER LABEL 06D48 5C090211 4 ZBM 178 CMZ R4,PTHUSED has this link been good? 06D49 FE026D56 179 JEQ STOPME jump if not, we wait 180 * \ / if so, our reader has gone away 181 182 ********************************************************************************** 183 * * 184 * The path has been broken, give an abnormal status. * 185 * * 186 ********************************************************************************** 187 188 * \ / 06D4A DC406D86 189 CALLNP CLRPTHEXCWR clear the exclusive write flag 190 PUNLOCK R4,PTHLOCK let go of the control block 06D4B EC170807 4 BASE 190 STZ R4,PTHLOCK 06D4C 0C800000 190 ION 06D4D DC00354F 191 CALL DQUEONE need to release any other writers 06D4E 41001DB2 192 PAR SQPATHWAIT 06D4F 60130000 0 4 REG 193 LD R0 R4 copy the path control block address 06D50 7C030000 0 IMM 194 IOR R0 080000000 looking for waiting writers 06D51 40520000 0 REG 195 PARVL R0 06D52 FE0E59AA 196 JMP FERRORFAU the path is bad 197 * --- 198 199 ********************************************************************************** 200 * * 201 * A reader exists but my message will not fit. We set the * 202 * possible stopped reader going and we stop ourselves waiting for the * 203 * queue to empty a little. * 204 * * 205 ********************************************************************************** 206 00006D53 207 STOPMENOW LABEL 06D53 DC00354F 208 CALL DQUEONE call to remove one process waiting 06D54 41001DB2 209 PAR SQPATHWAIT in this queue 06D55 40530000 4 REG 210 PARVL R4 for this control block 211 * \ / 212 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1513 (FRQWRPATH) F 84 Write Processor (.PATH) 213 ********************************************************************************** 214 * * 215 * Suspend a path writer. We go into the queue with a parameter * 216 * for this path and a flag saying waiting to write * 217 * * 218 ********************************************************************************** 219 220 * \ / 00006D56 221 STOPME LABEL 06D56 DC003541 222 CALL SUSPENDFRQ stop me pointing at the XREQ 06D57 60130000 0 4 REG 223 LD R0 R4 06D58 7C030000 0 IMM 224 IOR R0 080000000 flag saying a writer 06D59 41520000 0 REG 225 PARV R0 suspension parameter 06D5A 41001DB2 226 PAR SQPATHWAIT queue to suspend in 06D5B 40170807 4 BASE 227 PARL R4,PTHLOCK and lock 228 * \ / returns iff requester said no suspension 229 06D5C DC406D86 230 CALLNP CLRPTHEXCWR clear the exclusive write flag 231 PUNLOCK R4,PTHLOCK let go of the control block 06D5D EC170807 4 BASE 231 STZ R4,PTHLOCK 06D5E 0C800000 231 ION 06D5F FE0E59D4 232 JMP FERRORSUSP he wouldn't let us suspend 233 * --- 234 235 ********************************************************************************** 236 * * 237 * Error from referencing the users memory, most likely a memory * 238 * protect violation. What we need to do is return the space back to * 239 * the path and free the memory we got a hold of. Last but not least * 240 * pass the error to whoever is responsible for this program. * 241 * * 242 ********************************************************************************** 243 00006D60 244 UMEMBAD LABEL 06D60 E61F8002 016 STAK 245 ST2 R0 STAK SP,2 save the error code 246 PLOCK R4,PTHLOCK get access to the PATH 06D61 0CC00000 246 IOFF 06D62 D1D70807 4 BASE 246 SETT R4,PTHLOCK 06D63 FE0C6D65 246 JNE MA(2+DISPW MA 0) 06D64 DC40308B 246 CALLNP LOCKWAIT 06D65 6008D640 0 3 ZBM 247 LD R0 R3,PTHELOGL log of the block size 06D66 6060255E 1 0 248 LD R1 BITTAB(R0) space that needs to be returned 06D67 984908B1 1 4 ZBM 249 ADDM R1 R4,PTHSIZE return the space back to the pool 06D68 EC091373 4 ZBM 250 STZ R4,PTHEXCWR allow others to write onto the path 251 PUNLOCK R4,PTHLOCK release hold of the path 06D69 EC170807 4 BASE 251 STZ R4,PTHLOCK 06D6A 0C800000 251 ION 06D6B DC002F5D 252 CALL SFREEMEM return the block 06D6C 4148D640 3 ZBM 253 PARV R3,PTHELOGL block size ( log 2 ) 06D6D 4052C000 3 REG 254 PARVL R3 address of the block 06D6E 621F8002 016 STAK 255 LD2 R0 STAK SP,2 restore the error code 06D6F FE0E5B5F 256 JMP PASSERRUP 257 * --- 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1514 (FRQWRPATH) F 84 Write Processor (.PATH) 259 260 ********************************************************************************** 261 * * 262 * This is the code that will write a filemark onto a PATH device. * 263 * We build a path element and mark this element with an EOF in the type * 264 * field of the header for a path message. Also note that the message * 265 * length is explicitly set to zero. * 266 * * 267 ********************************************************************************** 268 00006D70 269 WFMPATH LABEL 06D70 61095F16 4 5 ZBM 270 LD R4 FCB,FCDCBPTR pointer to the PATH control block 271 PLOCK R4,PTHLOCK lock this PATH control block 06D71 0CC00000 271 IOFF 06D72 D1D70807 4 BASE 271 SETT R4,PTHLOCK 06D73 FE0C6D75 271 JNE MA(2+DISPW MA 0) 06D74 DC40308B 271 CALLNP LOCKWAIT 06D75 5C090011 4 ZBM 272 CMZ R4,PTHRDR do any readers exist? 06D76 FE026D48 273 JEQ NOREADER no, so we must suspend until one exists 06D77 5C091373 4 ZBM 274 CMZ R4,PTHEXCWR is the PATH locked for writing 06D78 FE0C6D53 275 JNE STOPMENOW suspend, we must wait our turn 06D79 60440002 1 IMM 276 LD R1 (PTHEHDR+CPW-1)/CPW get the size required 06D7A 304908B1 1 4 ZBM 277 RSB R1 R4,PTHSIZE remove this record from the pool 06D7B FA486D53 1 278 JLTZ R1 STOPMENOW wait until enough room exists 06D7C E44908B1 1 4 ZBM 279 ST R1 R4,PTHSIZE indicate how much we have left 06D7D DC002ED0 280 CALL SGETMEM get a block of free storage 06D7E 40440001 IMM 281 PARVL ((PTHEHDR+CPW-1)/CPW) LOG 2 06D7F EE160800 0 BASE 282 STZ2 R0,0 zero out the critter 06D80 60C40001 3 IMM 283 LD R3 ((PTHEHDR+CPW-1)/CPW) LOG 2 header length (log 2) 06D81 E4C81640 3 0 ZBM 284 ST R3 R0,PTHELOGL save this block length 06D82 60C40008 3 IMM 285 LD R3 FILEOF get a filemark 06D83 E4C80271 3 0 ZBM 286 ST R3 R0,PTHERTYPE set message as EOF 06D84 60D20000 3 0 REG 287 LD R3 R0 R3 gets the block address 288 * \ / 289 290 ********************************************************************************** 291 * * 292 * Message element is completely built. Now all we have * 293 * to do is link in this element and let the reader ( if one * 294 * exists ) know that the path has a message pending. * 295 * * 296 ********************************************************************************** 297 298 * \ / 06D85 FE0E6D27 299 JMP SETPATHEOF place the filemark onto the path 300 * --- 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1515 (FRQWRPATH) F 84 Write Processor (.PATH) 302 303 ********************************************************************************** 304 * * 305 * This routine is called to see if we may clear the exclusive write * 306 * flag. This is especially important if the writer somehow goes away * 307 * and never gets around to clearing this flag. Note that if the flag * 308 * is not set by us we leave it alone. * 309 * * 310 * Stack required = 1 * 311 * * 312 ********************************************************************************** 313 314 BLOCK CLRPTHEXCWR routine 315 ENTRY CLRPTHEXCWR 316 317 BEGFRAME 318 ENDFRAME 319 06D86 DD5F8001 6 STAK 320 CLRPTHEXCWR ENTRNP PUSH 06D87 60091373 0 4 ZBM 321 LD R0 R4,PTHEXCWR is the flag currently set 06D88 FA026D8D 0 322 JEQZ R0 RETURN if not, just return 06D89 60400414 1 323 LD R1 CPCUPC get pointer to current UPC block 06D8A 64085371 0 1 ZBM 324 CPR R0 R1,UPCSERNM did we lock the path exclusive write 06D8B FE0C6D8D 325 JNE RETURN if not us, leave it alone 06D8C EC091373 4 ZBM 326 STZ R4,PTHEXCWR clear the flag so others may write 327 * \ / 328 00006D8D 329 RETURN LABEL 06D8D 5D1F8001 6 STAK 330 LEAVE POP return to the caller 331 * --- 332 333 END CLRPTHEXCWR routine 334 335 END PATHWRITE routine 136 INPUT FRQWRTERM write to a terminal 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1516 (FRQWRTERM) F 85 FREQ - Write Processor (.TERM) 3 4 BLOCK TERM Write Routines 5 6 ENTRY PVCBIN previous record on .TERM was binary 7 ENTRY RTBIN .TERM record type of binary 8 ENTRY RTINPUT .TERM record type of input 9 ENTRY TERMAFORMR after record terminal chars 10 ENTRY TERMBFORMR before record terminal control characters 11 ENTRY TTYWRITE 12 13 * Stack allocation. 00178800 6 BASE 14 TWFCB EQU IRGWORD place to save the FCB 00178803 6 BASE 15 TWRELOC EQU BUFSIZ relocation of caller 00178801 6 BASE 16 TWRECSIZ EQU COPYCNT record size in characters 00178802 6 BASE 17 TWCOREADR EQU COREADR core address moving from 00178804 6 BASE 18 TWRLIST EQU RWERINFO first element in TCQ list being made 00178805 6 BASE 19 TWCHNUM EQU RWERINFO(1) number of characters in list 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1517 (FRQWRTERM) F 85 FREQ - Write Processor (.TERM) 21 22 ********************************************************************************** 23 * * 24 * Write onto a terminal (ASCII char output device). The * 25 * record is output as is if binary and carriage control is added * 26 * if it is text with forms record (uses the first char of the record to * 27 * specify carriage action). Text records are output using space * 28 * carriage control. * 29 * The characters given are copied into output queue elements * 30 * (TCQs) but these TCQs are not linked into the TCB lists until * 31 * all references to user memory are done. This prevents hangs * 32 * from having I/O queues tied up while page faults are occurring * 33 * in the user's memory. Checks are also made to see if the user * 34 * is exceeding his output queue size. If this is true, then the * 35 * user is suspended after his calling registers are changed so * 36 * next time I know he's restarting a write. * 37 * * 38 * Stack required = 8 * 39 * 6 + max ( CHECKDCH (0), CLRMEMTRAP (1), FILLTCQ (1), * 40 * LINKINTLST (3), MAKETRMSTAT (1), OUTTERMCH (5), * 41 * SETMEMTRAP (1), SFREEMEM (0), SUSPENDCAL (0), * 42 * TERMAFORMR (8), TERMBFORMR (8) ) * 43 * * 44 ********************************************************************************** 45 46 BLOCK TTYWRITE routine 47 ENTRY TTYWRITE 48 00006D8E 49 TTYWRITE LABEL 06D8E 60C00412 3 50 LD R3 CPPSA fetch the PSA pointer 06D8F 61095F16 4 5 ZBM 51 LD TCB FCB,FCDCBPTR get pointer to TCB 06D90 FB3059A5 4 52 JZA TCB FERRORILOP jump if fake terminal 06D91 E5578800 5 6 BASE 53 ST FCB SP,TWFCB save our FCB 06D92 60C8DF11 3 3 ZBM 54 LD R3 R3,PSCACHNP1 get the console area of the requesting process 06D93 6056C801 1 3 BASE 55 LD R1 R3,CAMSR 06D94 78440040 1 IMM 56 AND R1 MSRFRELOC 06D95 74440040 1 IMM 57 XOR R1 MSRFRELOC relocation bit is on if it needs changing 06D96 E4578803 1 6 BASE 58 ST R1 SP,TWRELOC save the relocation 59 * R2 = operation 60 * R4=>TCB for terminal 06D97 5CA46D98 2 61 LDPC TTYWRTYPE(R2) goto routine 62 * --- 63 00006D98 64 TTYWRTYPE LABEL 65 BASE 06D98 00006DAD 66 VFD ADR TTYWTEXT text 06D99 00006DA0 67 VFD ADR TTYWFORM text with forms char 06D9A 00006DAF 68 VFD ADR TTYWBIN binary write 06D9B 00006DAD 69 VFD ADR TTYWTEXT forms write 06D9C 00006DAD 70 VFD ADR TTYWTEXT label write 06D9D 00006DAD 71 VFD ADR TTYWTEXT comment write 06D9E 00006DAD 72 VFD ADR TTYWTEXT 06D9F 00006DB5 73 WRRESTART VFD ADR TTYRESTRT restart a write 74 DRCT 75 76 * Line to output with the forms control character 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1518 (FRQWRTERM) F 85 FREQ - Write Processor (.TERM) 00006DA0 77 TTYWFORM LABEL 06DA0 5C178801 6 BASE 78 CMZ SP,TWRECSIZ check the record size 06DA1 FE026DAD 79 JEQ TTYWTEXT if zero length, assume space cc 06DA2 60D78802 3 6 BASE 80 LD R3 SP,TWCOREADR fetch the memory address 06DA3 DC005BCF 81 CALL SETMEMTRAP catch user memory errors 06DA4 40005B5F 82 PARL PASSERRUP error address 06DA5 59978803 6 BASE 83 CLBMSR SP,TWRELOC relocate to user if necessary 06DA6 6016C000 0 3 CACH 84 LD R0 CACH R3,0 get the forms char 06DA7 59C40040 IMM 85 IORMSR MSRFRELOC restore fetch relocation 06DA8 D0978802 6 BASE 86 INCP SP,TWCOREADR advance over the forms character 06DA9 D0578801 6 BASE 87 DEC SP,TWRECSIZ remove it from the record length 06DAA 7804007F 0 IMM 88 AND R0 07F remove the extra group 06DAB 60706E46 1 0 @ 89 LD R1 @CCTABLEP(R0) get forms type for character 06DAC FE0E6DB0 90 JMP TTYKFORM 91 * --- 92 93 * Text record -- use "standard" single line spacing 00006DAD 94 TTYWTEXT LABEL 06DAD 60440000 1 IMM 95 LD R1 RTSINGL record type = single space 06DAE FE0E6DB0 96 JMP TTYKFORM jump as known forms type 97 * --- 98 99 * Binary record -- nothing before or after 00006DAF 100 TTYWBIN LABEL 06DAF 60440009 1 IMM 101 LD R1 RTBIN record type = binary 102 * \ / 103 00006DB0 104 TTYKFORM LABEL 06DB0 E4490040 1 4 ZBM 105 ST R1 TCB,TCRT save the code 06DB1 DC406E25 106 CALLNP TERMBFORMR add before the line characters 107 * in case of empty record, see if output queue full 06DB2 600900FA 0 4 ZBM 108 LD R0 TCB,TCTTOCNT get number of chars now in output queue 06DB3 640900A2 0 4 ZBM 109 CPR R0 TCB,TCMAXCHAR check against maximum allowed 06DB4 FE066DFC 110 JGE SUSPWRITEX jump if too many, shut user down 111 * \ / 112 113 ********************************************************************************** 114 * * 115 * The before print carriage control has been handled. * 116 * Copy the record out. Proceed by finding the maximum number * 117 * of characters that may be CMOVEd (length of record or up to a * 118 * character that requires a delay after it). * 119 * * 120 ********************************************************************************** 121 122 * \ / 00006DB5 123 TTYRESTRT LABEL Restart of a write operation 06DB5 EE178804 6 BASE 124 STZ2 SP,TWRLIST initialize TWRLIST and TWCHNUM 06DB6 60C40000 3 IMM 125 LD TCQ 0 indicate no list yet 06DB7 61578801 5 6 BASE 126 LD R5 SP,TWRECSIZ the length of the record 06DB8 FB426DE5 5 127 JEQZ R5 NORECORD jump if the record is null 06DB9 DC005BCF 128 CALL SETMEMTRAP set up to catch memory errors 06DBA 40006E0E 129 PARL TTYMEMERR 130 * \ / 131 00006DBB 132 OUTMORE LABEL 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1519 (FRQWRTERM) F 85 FREQ - Write Processor (.TERM) 06DBB 60178805 0 6 BASE 133 LD R0 SP,TWCHNUM get characters output so far 06DBC 180900FA 0 4 ZBM 134 ADD R0 TCB,TCTTOCNT add in chars in output queue 06DBD 300900A2 0 4 ZBM 135 RSB R0 TCB,TCMAXCHAR R0=room left in output queue 06DBE FA0A6DFD 0 136 JLEZ R0 SUSPWRITE jump if I must wait 06DBF 51520000 5 0 REG 137 MIN R5 R0 06DC0 51401F0B 5 138 MIN R5 TCQMAXSIZE limit to no more than largest size block 139 * \ / 140 06DC1 5C0928C2 4 ZBM 141 CMZ TCB,TCCRDELAY any CR delay? 06DC2 FE026DC5 142 JEQ NOCRDLY jump if not 06DC3 6084000D 2 IMM 143 LD R2 CR 06DC4 DC406E19 144 CALLNP CHECKDCH see if char is in string 00006DC5 145 NOCRDLY LABEL 06DC5 5C0900C3 4 ZBM 146 CMZ TCB,TCLFDELAY any LF delay? 06DC6 FE026DC9 147 JEQ NOLFDLY jump if not 06DC7 6084000A 2 IMM 148 LD R2 LF 06DC8 DC406E19 149 CALLNP CHECKDCH check for the delay char 00006DC9 150 NOLFDLY LABEL 06DC9 5C0918C3 4 ZBM 151 CMZ TCB,TCFFDELAY any formfeed delay? 06DCA FE026DCD 152 JEQ NOFFDLY jump if not 06DCB 6084000C 2 IMM 153 LD R2 FF 06DCC DC406E19 154 CALLNP CHECKDCH find the char if there 00006DCD 155 NOFFDLY LABEL 06DCD 5C0900C8 4 ZBM 156 CMZ TCB,TCHTDELAY any tab delay? 06DCE FE026DD1 157 JEQ NOHTDLY jump if not 06DCF 60840009 2 IMM 158 LD R2 HT 06DD0 DC406E19 159 CALLNP CHECKDCH find the char if there 00006DD1 160 NOHTDLY LABEL 06DD1 DC404D41 161 CALLNP FILLTCQ move chars into the TCQ 06DD2 60178802 0 6 BASE 162 LD R0 SP,TWCOREADR where chars are at 06DD3 59978803 6 BASE 163 CLBMSR SP,TWRELOC relocate if needed 06DD4 FE400000 164 CMOVE do the actual move 06DD5 59C40040 IMM 165 IORMSR MSRFRELOC return to monitor fetching 166 * \ / 06DD6 B1578801 5 6 BASE 167 RSBM R5 SP,TWRECSIZ reduce the remaining record 06DD7 99578805 5 6 BASE 168 ADDM R5 SP,TWCHNUM count the characters output 06DD8 E4178802 0 6 BASE 169 ST R0 SP,TWCOREADR remember next char to move 06DD9 5C178804 6 BASE 170 CMZ SP,TWRLIST do we have a pointer to the list 06DDA FE0C6DDC 171 JNE HAVELIST jump if we do 06DDB E4D78804 3 6 BASE 172 ST TCQ SP,TWRLIST else save the pointer to the list 173 * \ / 174 175 ********************************************************************************** 176 * * 177 * The last character moved could have been a character * 178 * that requires delays after it. Here we check for same and if * 179 * true we take and then replace the last character so that the * 180 * delay will be added properly. * 181 * * 182 ********************************************************************************** 183 184 * \ / 185 * R5=index to last character moved 00006DDC 186 HAVELIST LABEL 06DDC 6016C004 0 3 CACH 187 LD R0 TCQ,TCQLAST index to last char in TCQ 06DDD 609AC005 2 30 CACH 188 LD R2 TCQ,TCQCHARS(R0) 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1520 (FRQWRTERM) F 85 FREQ - Write Processor (.TERM) 06DDE 5C3449DB 2 @ 189 CMZ @DELAYCHS(R2) is this a delayable char? 06DDF FE026DE3 190 JEQ NOREPUT jump if the last char is fine 06DE0 D056C004 3 CACH 191 DEC TCQ,TCQLAST remove the char 06DE1 DC404994 192 CALLNP OUTTERMCH place the char in the queue element 06DE2 98178805 0 6 BASE 193 ADDM R0 SP,TWCHNUM add command burden into character total 194 * \ / 195 00006DE3 196 NOREPUT LABEL 06DE3 61578801 5 6 BASE 197 LD R5 SP,TWRECSIZ get the count of remaining chars 06DE4 FB446DBB 5 198 JGTZ R5 OUTMORE jump if more left to do 00006DE5 199 NORECORD LABEL 200 * \ / 201 202 ********************************************************************************** 203 * * 204 * Link the generated queue elements into the list and then * 205 * return the information to the user. * 206 * * 207 ********************************************************************************** 208 209 * \ / 06DE5 DC405BD4 210 CALLNP CLRMEMTRAP 06DE6 60938000 2 6 REG 211 LD R2 SP R2 => my stack top 06DE7 DC004A32 212 CALL LINKINTLST link the TCQs onto the terminal output queue 06DE8 41568805 2 BASE 213 PARV R2,TWCHNUM the number of characters going in 06DE9 41168C04 2 FPVR 214 PAR @(R2,TWRLIST) this is the head of the list 06DEA 4016C400 3 @R 215 PARL @TCQ this is the tail of the list 06DEB EC090E1D 4 ZBM 216 STZ TCB,TCINECHO cancel the character by character echo 06DEC EC092018 4 ZBM 217 STZ TCB,TCINECHOD and indicate to echo whole lines 218 PUNLOCK TCB,TCLOCK release the queue 06DED EC170818 4 BASE 218 STZ TCB,TCLOCK 06DEE 0C800000 218 ION 06DEF 60490040 1 4 ZBM 219 LD R1 TCB,TCRT get the record type 06DF0 DC406E31 220 CALLNP TERMAFORMR output the after characters 06DF1 60800412 2 221 LD R2 CPPSA 06DF2 60889F11 2 2 ZBM 222 LD R2 R2,PSCACHNP1 get pointer to the user's registers 06DF3 60040000 0 IMM 223 LD R0 0 number of chars left 06DF4 60578802 1 6 BASE 224 LD R1 SP,TWCOREADR after the last char 06DF5 E6168803 012 BASE 225 ST2 R0 R2,CAR1 say record consumed 06DF6 61578800 5 6 BASE 226 LD FCB SP,TWFCB restore our FCB 06DF7 DC404CBA 227 CALLNP MAKTRMSTAT get status for terminal 06DF8 60440009 1 IMM 228 LD R1 FILNEOD get code for end of data 06DF9 E44A2040 1 0 CBM 229 ST R1 R0/FDSTATRTYP since write always at end of data 06DFA E4494445 1 5 ZBM 230 ST R1 FCB,FCLASTREAD set for later status check 06DFB FE0E5988 231 JMP UERROR go return status to user 232 * --- 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1521 (FRQWRTERM) F 85 FREQ - Write Processor (.TERM) 234 235 ********************************************************************************** 236 * * 237 * The output queue won't hold all of our characters so we suspend * 238 * the caller after remembering (in his registers) where we are. * 239 * * 240 ********************************************************************************** 241 00006DFC 242 SUSPWRITEX LABEL 06DFC EE178804 6 BASE 243 STZ2 SP,TWRLIST indicate no list of characters 00006DFD 244 SUSPWRITE LABEL 06DFD DC405BD4 245 CALLNP CLRMEMTRAP 06DFE 61C00412 7 246 LD R7 CPPSA 06DFF 61C9DF11 7 7 ZBM 247 LD R7 R7,PSCACHNP1 R7=> user's registers 06E00 60578801 1 6 BASE 248 LD R1 SP,TWRECSIZ R1=chars remaining 06E01 60978802 2 6 BASE 249 LD R2 SP,TWCOREADR R2=> next char to output 06E02 E657C803 127 BASE 250 ST2 R1 R7,CAR1 place in user's registers 06E03 60040047 0 IMM 251 LD R0 FRWRITE+WRRESTART 06E04 E417C802 0 7 BASE 252 ST R0 R7,CAR0 see that he restarts 06E05 60938000 2 6 REG 253 LD R2 SP R2 => my stack top 06E06 DC004A32 254 CALL LINKINTLST link the TCQs onto the terminal output queue 06E07 41568805 2 BASE 255 PARV R2,TWCHNUM the number of characters going in 06E08 41168C04 2 FPVR 256 PAR @(R2,TWRLIST) this is the head of the list 06E09 4016C400 3 @R 257 PARL @TCQ this is the tail of the list 06E0A DC00353B 258 CALL SUSPENDCAL suspend to restart the XREQ 06E0B 41530000 4 REG 259 PARV TCB suspend for this TCB 06E0C 41001DB6 260 PAR SQTRMOWAIT 06E0D 40170818 4 BASE 261 PARL TCB,TCLOCK what to unlock when suspended 262 * --- 263 264 * An error has occurred in the user's memory during the write. 265 * Return all TCQs we have created to free storage and give error to user. 00006E0E 266 TTYMEMERR LABEL 06E0E 60D78804 3 6 BASE 267 LD TCQ SP,TWRLIST get pointer to list of TCQs we built 06E0F FAF05B5F 3 268 JZA TCQ PASSERRUP jump if no TCQs to free 06E10 E6178802 016 BASE 269 ST2 R0 SP,TWCOREADR save error code 270 * \ / 00006E11 271 RETURNTCQ LABEL 06E11 6108DF10 4 3 ZBM 272 LD R4 TCQ,TCQLINK get link to next element 06E12 DC002F5D 273 CALL SFREEMEM return element to free storage 06E13 4148D060 3 ZBM 274 PARV TCQ,TCQLOG how much to return 06E14 4052C000 3 REG 275 PARVL TCQ where it is 06E15 60D30000 3 4 REG 276 LD TCQ R4 next element becomes current one 06E16 FAF26E11 3 277 JNZA TCQ RETURNTCQ return all of them 278 * \ / 06E17 62178802 016 BASE 279 LD2 R0 SP,TWCOREADR restore error code 06E18 FE0E5B5F 280 JMP PASSERRUP pass error to over process 281 * --- 282 283 END TTYWRITE routine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1522 (FRQWRTERM) F 85 FREQ - Write Processor (.TERM) 285 286 ********************************************************************************** 287 * * 288 * CHECKDCH. Routine to check in the input line for a * 289 * character and to return the number of characters up to it. * 290 * Call: * 291 * LD R2 character * 292 * LD R5 length of record * 293 * CALLNP CHECKDCH * 294 * * 295 * Returns R5=same or length up to and including the char. * 296 * Gets R0 and R1. * 297 * Stack required = 0 * 298 * Stores return address on preallocated stack. * 299 * * 300 ********************************************************************************** 301 302 BLOCK CHECKDCH subroutine 303 ENTRY CHECKDCH 304 06E19 DD578806 6 BASE 305 CHECKDCH ENTRNP SP,RWRETADDR 06E1A 60178802 0 6 BASE 306 LD R0 SP,TWCOREADR get addr of first char 06E1B 60534000 1 5 REG 307 LD R1 R5 06E1C 59978803 6 BASE 308 CLBMSR SP,TWRELOC see if user or monitor 06E1D FE560000 309 CSRCH find the char 06E1E 59C40040 IMM 310 IORMSR MSRFRELOC 06E1F 30534000 1 5 REG 311 RSB R1 R5 calculate index to the char 06E20 64534000 1 5 REG 312 CPR R1 R5 is this closer to the beginning? 06E21 FE066E24 313 JGE NOTLESS 06E22 18440001 1 IMM 314 ADD R1 1 and one to fix index 06E23 E4534000 1 5 REG 315 ST R1 R5 return to caller 00006E24 316 NOTLESS LABEL 06E24 5D178806 6 BASE 317 LEAVE SP,RWRETADDR 318 * --- 319 320 END CHECKDCH subroutine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1523 (FRQWRTERM) F 85 FREQ - Write Processor (.TERM) 322 323 ********************************************************************************** 324 * * 325 * Output the forms chars that go before the line. * 326 * Call: * 327 * LD R1 record type code (RTxxxx) * 328 * LD R4 => TCB * 329 * CALLNP TERMBFORMR * 330 * * 331 * Gets R0 thru R3. * 332 * Stack required = 8 * 333 * 2 + max ( PLACEOUTCH (6) ) * 334 * * 335 ********************************************************************************** 336 337 BLOCK TERMBFORMR, TERMAFORMR 338 ENTRY TERMBFORMR 339 ENTRY TERMAFORMR 340 341 BEGFRAME 00178801 6 BASE 342 TEMP BSS 1 343 ENDFRAME 344 06E25 DD5F8002 6 STAK 345 TERMBFORMR ENTRNP PUSH 06E26 604A4400 1 1 CBM 346 LD R1 R1*BIT (31-PVCSIZLOG) adjust position 06E27 18491838 1 4 ZBM 347 ADD R1 TCB,TCPVC add in previous control from TCB 06E28 60326E56 0 1 @ 348 LD R0 @PCOPER(R1) get the operation function 00006E29 349 TERMBFORMX LABEL 06E29 60E06E47 3 0 350 LD R3 PCCHARS(R0) get the characters to output 06E2A FAC26E30 3 351 JEQZ R3 TERMBFORMD exit if none 00006E2B 352 TERMBFORML LABEL 06E2B 608AF080 2 3 CBM 353 LD R2 R3/CH3 get the rightmost character 06E2C E4D78801 3 6 BASE 354 ST R3 SP,TEMP save the chars to be output 06E2D DC404983 355 CALLNP PLACEOUTCH output the char 06E2E 60C98181 3 6 ZBM 356 LD R3 SP,TEMP/BITS 0:23 pick up the characters not yet handled 06E2F FACC6E2B 3 357 JNEZ R3 TERMBFORML jump back if any left 00006E30 358 TERMBFORMD LABEL 06E30 5D1F8002 6 STAK 359 LEAVE POP return to caller 360 * --- 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1524 (FRQWRTERM) F 85 FREQ - Write Processor (.TERM) 362 363 ********************************************************************************** 364 * * 365 * This routine outputs the forms control characters that go * 366 * after the line. * 367 * Call: * 368 * LD R1 record type code (RTxxxx) * 369 * LD R4 => TCB * 370 * CALLNP TERMAFORMR * 371 * * 372 * Gets R0 thru R4. * 373 * Stack required = 8 * 374 * 2 + max ( PLACEOUTCH (6) ) * 375 * * 376 ********************************************************************************** 377 06E31 DD5F8002 6 STAK 378 TERMAFORMR ENTRNP PUSH 06E32 60326E5B 0 1 @ 379 LD R0 @PCNXTSTAT(R1) get the next state 06E33 E4091838 0 4 ZBM 380 ST R0 TCB,TCPVC place next state into TCB 06E34 60326E59 0 1 @ 381 LD R0 @PCAFTER(R1) get characters to output code 06E35 FE0E6E29 382 JMP TERMBFORMX output them 383 * --- 384 385 END TERMBFORMR, TERMAFORMR 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1525 (FRQWRTERM) F 85 FREQ - Write Processor (.TERM) 387 388 ********************************************************************************** 389 * * 390 ** Table of ASCII characters with their parity bit correct. * 391 ** Not used. * 392 * * 393 *TTYPARTAB LABEL * 394 * VFD 000818203 * 395 * VFD 084050687 * 396 * VFD 088090A8B * 397 * VFD 00C8D8E0F * 398 * VFD 090111293 * 399 * VFD 014959617 * 400 * VFD 018999A1B * 401 * VFD 09C1D1E9F * 402 * VFD 0A02122A3 * 403 * VFD 024A5A627 * 404 * VFD 028A9AA2B * 405 * VFD 0AC2D2EAF * 406 * VFD 030B1B233 * 407 * VFD 0B43536B7 * 408 * VFD 0B8393ABB * 409 * VFD 03CBDBE3F * 410 * VFD 0C04142C3 * 411 * VFD 044C5C647 * 412 * VFD 048C9CA4B * 413 * VFD 0CC4D4ECF * 414 * VFD 050D1D253 * 415 * VFD 0D45556D7 * 416 * VFD 0D8595ADB * 417 * VFD 05CDDDE5F * 418 * VFD 060E1E263 * 419 * VFD 0E46566E7 * 420 * VFD 0E8696AEB * 421 * VFD 06CEDEE6F * 422 * VFD 0F07172F3 * 423 * VFD 074F5F677 * 424 * VFD 078F9FA7B * 425 * VFD 0FC7D7EFF * 426 *TTYPARTABP PTR TTYPARTAB/BITS 0:7 * 427 ********************************************************************************** 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1526 (FRQWRTERM) F 85 FREQ - Write Processor (.TERM) 429 430 ********************************************************************************** 431 * * 432 * current state * 433 * PVCNML PVCunused PVCBIN | after next state * 434 * ------ ------- ------ ----- ---- ----- * 435 * RTSINGL - - - | PCCRLF PVCNML * 436 *0 RTDUBL PCLF - PCLF | PCCRLF PVCNML * 437 *- RTTRPL PC2LF - PC2LF | PCCRLF PVCNML * 438 *+ RTOVERP - - - | PCCR PVCNML * 439 ** RTPROMPT - - - | - PVCNML * 440 *1 RTTOF PCFF - PCFF | PCCRLF PVCNML * 441 *M RTRSINGL PFLF - - | PCCR PVCNML * 442 *N RTRDUBL PF2LF - - | PCCR PVCNML * 443 *O RTRTRPL PF3LF - - | PCCR PVCNML * 444 * RTBIN - - - | - PVCBIN * 445 * RTINPUT - - - | PCLF PVCNML for cr * 446 * PVCBIN otherwise * 447 * * 448 ********************************************************************************** 449 450 ********************************************************************************** 451 * * 452 * The unused state in the above table is left over from an * 453 * old way of doing things and is left so that a state may be * 454 * easily added in the future (if you ever need to). * 455 * * 456 ********************************************************************************** 457 458 ********************************************************************************** 459 * * 460 * Tables for terminal carriage control * 461 * The current line being printed has a carriage control * 462 * type ( RTxxxx ) that is matched against the printing done * 463 * by the previous line ( PVCxxxx ). This F(RT,PVC) gives a * 464 * group of characters to output before the current line is * 465 * printed ( PCOPER ) and after the current line is printed * 466 * ( PCAFTER ) as well as the next state, which affects the * 467 * next line printed ( PCNXTSTAT ). * 468 * * 469 ********************************************************************************** 470 471 * record type codes ( do not re-arrange codes - 472 * not totally symbolic in below tables) 473 00000000 ABS 474 RTSINGL EQU 0 single space (space and everything not below) 00000001 ABS 475 RTDUBL EQU 1 double space("0") 00000002 ABS 476 RTTRPL EQU 2 triple space ("-") 00000003 ABS 477 RTOVERP EQU 3 overprint ("+") 00000004 ABS 478 RTPROMPT EQU 4 prompt for input ("*") 00000005 ABS 479 RTTOF EQU 5 top of form ("1") 00000006 ABS 480 RTRSINGL EQU 6 reverse single space ("M") 00000007 ABS 481 RTRDUBL EQU 7 reverse double space ("N") 00000008 ABS 482 RTRTRPL EQU 8 reverse triple space ("O") 00000009 ABS 483 RTBIN EQU 9 binary record 0000000A ABS 484 RTINPUT EQU 10 input record 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1527 (FRQWRTERM) F 85 FREQ - Write Processor (.TERM) 0000000A ABS 485 RTLAST EQU 10 the last code 00000004 ABS 486 RTLOG EQU (RTLAST+1) LOG 2 487 * If the value of RTLOG changes, change the definition of TCRT in TCB def. 488 489 * Table to convert forms character into current line code. 06E35 00000000 490 CCTABLE VFD RTLOG:RTSINGL,RTSINGL,RTSINGL,RTSINGL 00-03 06E36 00000000 491 VFDB RTLOG:RTSINGL,RTSINGL,RTSINGL,RTSINGL 04-07 06E36 00000000 492 VFDB RTLOG:RTSINGL,RTSINGL,RTSINGL,RTSINGL 08-0B 06E37 00000000 493 VFDB RTLOG:RTSINGL,RTSINGL,RTSINGL,RTSINGL 0C-0F 06E37 00000000 494 VFDB RTLOG:RTSINGL,RTSINGL,RTSINGL,RTSINGL 10-13 06E38 00000000 495 VFDB RTLOG:RTSINGL,RTSINGL,RTSINGL,RTSINGL 14-17 06E38 00000000 496 VFDB RTLOG:RTSINGL,RTSINGL,RTSINGL,RTSINGL 18-1B 06E39 00000000 497 VFDB RTLOG:RTSINGL,RTSINGL,RTSINGL,RTSINGL 1C-1F 06E39 00000000 498 VFDB RTLOG:RTSINGL,RTSINGL,RTSINGL,RTSINGL 20-23 06E3A 00000000 499 VFDB RTLOG:RTSINGL,RTSINGL,RTSINGL,RTSINGL 24-27 06E3A 00000003 500 VFDB RTLOG:RTSINGL,RTSINGL,RTPROMPT,RTOVERP 28-2B 06E3B 00000000 501 VFDB RTLOG:RTSINGL,RTTRPL,RTSINGL,RTSINGL 2C-2F 06E3B 00000000 502 VFDB RTLOG:RTDUBL,RTTOF,RTSINGL,RTSINGL 30-33 06E3C 00000000 503 VFDB RTLOG:RTSINGL,RTSINGL,RTSINGL,RTSINGL 34-37 06E3C 00000000 504 VFDB RTLOG:RTSINGL,RTSINGL,RTSINGL,RTSINGL 38-3B 06E3D 00000000 505 VFDB RTLOG:RTSINGL,RTSINGL,RTSINGL,RTSINGL 3C-3F 06E3D 00000000 506 VFDB RTLOG:RTSINGL,RTSINGL,RTSINGL,RTSINGL 40-43 06E3E 00000000 507 VFDB RTLOG:RTSINGL,RTSINGL,RTSINGL,RTSINGL 44-47 06E3E 00000000 508 VFDB RTLOG:RTSINGL,RTSINGL,RTSINGL,RTSINGL 48-4B 06E3F 00000008 509 VFDB RTLOG:RTSINGL,RTRSINGL,RTRDUBL,RTRTRPL 4C-4F 06E3F 00000000 510 VFDB RTLOG:RTSINGL,RTSINGL,RTSINGL,RTSINGL 50-53 06E40 00000000 511 VFDB RTLOG:RTSINGL,RTSINGL,RTSINGL,RTSINGL 54-57 06E40 00000000 512 VFDB RTLOG:RTSINGL,RTSINGL,RTSINGL,RTSINGL 58-5B 06E41 00000000 513 VFDB RTLOG:RTSINGL,RTSINGL,RTSINGL,RTSINGL 5C-5F 06E41 00000000 514 VFDB RTLOG:RTSINGL,RTSINGL,RTSINGL,RTSINGL 60-63 06E42 00000000 515 VFDB RTLOG:RTSINGL,RTSINGL,RTSINGL,RTSINGL 64-67 06E42 00000000 516 VFDB RTLOG:RTSINGL,RTSINGL,RTSINGL,RTSINGL 68-6B 06E43 00000000 517 VFDB RTLOG:RTSINGL,RTSINGL,RTSINGL,RTSINGL 6C-6F 06E43 00000000 518 VFDB RTLOG:RTSINGL,RTSINGL,RTSINGL,RTSINGL 70-73 06E44 00000000 519 VFDB RTLOG:RTSINGL,RTSINGL,RTSINGL,RTSINGL 74-77 06E44 00000000 520 VFDB RTLOG:RTSINGL,RTSINGL,RTSINGL,RTSINGL 78-7B 06E45 00000000 521 VFDB RTLOG:RTSINGL,RTSINGL,RTSINGL,RTSINGL 7C-7F 06E46 01086E36 522 CCTABLEP PTR CCTABLE 523 524 * previous control codes ( do not re-arrange codes - 525 * not totally symbolic in below tables ) 526 00000000 ABS 527 PVCNML EQU 0 previous print left carriage at left 528 * margin and over the line printed 529 *PVCunused equ 1 state left over - unused 00000002 ABS 530 PVCBIN EQU 2 last print was binary 00000002 ABS 531 PVCLAST EQU 2 highest PVC code 00000002 ABS 532 PVCSIZLOG EQU (PVCLAST+1) LOG 2 bits to hold PVC code 533 534 * table of characters to output - code generated by displacement 535 00006E47 536 PCCHARS BASE 06E47 0000000A 537 PCLF VFDC 0,0,0,LF 06E48 0000000A 538 PC2LF VFDC 0,0,LF,LF 06E49 0000000A 539 PC3LF VFDC 0,LF,LF,LF 06E4A 0000000D 540 PCCRLF VFDC 0,0,LF,CR 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1528 (FRQWRTERM) F 85 FREQ - Write Processor (.TERM) 06E4B 0000000D 541 PCCR2LF VFDC 0,LF,LF,CR 06E4C 0000000C 542 PCFF VFDC 0,0,0,FF 06E4D 00000000 543 PCNONE VFDC 0,0,0,0 06E4E 0000000D 544 PCCRFF VFDC 0,0,FF,CR 06E4F 0000000D 545 PCCR VFDC 0,0,0,CR 546 DRCT 00000004 ABS 547 PCLOG EQU (DISPW PCCHARS) LOG 2 548 549 * Function table: each line corresponds to an RT code 550 * and each column element corresponds to a PVC code 551 06E4F 02000006 552 PCOPERT VFD PCLOG:PCNONE,PCNONE,PCNONE,PCNONE RTSINGL 06E50 02000006 553 VFDB PCLOG:PCLF,PCNONE,PCLF,PCNONE RTDUBL 06E50 02000006 554 VFDB PCLOG:PC2LF,PCNONE,PC2LF,PCNONE RTTRPL 06E51 02000006 555 VFDB PCLOG:PCNONE,PCNONE,PCNONE,PCNONE RTOVERP 06E51 02000006 556 VFDB PCLOG:PCNONE,PCNONE,PCNONE,PCNONE RTPROMPT 06E52 02000006 557 VFDB PCLOG:PCFF,PCNONE,PCFF,PCNONE RTTOF 06E52 02000008 558 VFDB PCLOG:PCLF,PCNONE,PCNONE,PCCR RTRSINGL 06E53 02000008 559 VFDB PCLOG:PC2LF,PCNONE,PCNONE,PCCR RTRDUBL 06E53 02000008 560 VFDB PCLOG:PC3LF,PCNONE,PCNONE,PCCR RTRTRPL 06E54 02000006 561 VFDB PCLOG:PCNONE,PCNONE,PCNONE,PCNONE RTBIN 06E54 02000006 562 VFDB PCLOG:PCNONE,PCNONE,PCNONE,PCNONE RTINPUT 563 BSS 0 align to word boundary 06E56 01086E50 564 PCOPER PTR PCOPERT pointer into function table 565 566 * after record character table - each entry corresponds to 567 * an RT code. 568 06E56 02000008 569 PCAFTERT VFD PCLOG:PCCRLF,PCCRLF,PCCRLF,PCCR 06E57 02000008 570 VFDB PCLOG:PCNONE,PCCRLF,PCCR,PCCR 06E57 02000000 571 VFDB PCLOG:PCCR,PCNONE,PCLF 572 BSS 0 align to word boundary 06E59 01086E57 573 PCAFTER PTR PCAFTERT pointer into table 574 575 * code for the next state - the code to leave in 576 * PVC for the next print 577 06E59 00000000 578 PCNXTSTATT VFD PVCSIZLOG:PVCNML,PVCNML,PVCNML,PVCNML 06E59 00000000 579 VFDB PVCSIZLOG:PVCNML,PVCNML,PVCNML,PVCNML 06E59 00000000 580 VFDB PVCSIZLOG:PVCNML,PVCBIN,PVCNML 581 BSS 0 align to word boundary 06E5B 00886E5A 582 PCNXTSTAT PTR PCNXTSTATT pointer into this table 583 584 585 END TERM Write Routines 137 INPUT FRQWRLP write to a line printer 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1529 (FRQWRLP) F 86 FREQ - Write Processor (.LP) 3 4 ********************************************************************************** 5 * * 6 * Routine to write on a line printer. * 7 * * 8 * Stack required = 11 * 9 * 0 + max ( LOCKWAIT (0), LPCSTART (11), SETMEMTRAP (1), * 10 * SUSPENDFRQ (1) ) * 11 * * 12 ********************************************************************************** 13 14 BLOCK LPTWRITE routine 15 ENTRY LPTWRITE 16 00006E5C 17 LPTWRITE LABEL 06E5C DC005BCF 18 CALL SETMEMTRAP place to go if user memory error 06E5D 40005B5F 19 PARL PASSERRUP 06E5E 60C95F16 3 5 ZBM 20 LD LPC FCB,FCDCBPTR get pointer to controller 21 PLOCK (LPC,LPCELOCK) lock the controller 06E5F 0CC00000 21 IOFF 06E60 D1D6C805 3 BASE 21 SETT (LPC,LPCELOCK) 06E61 FE0C6E63 21 JNE MA(2+DISPW MA 0) 06E62 DC40308B 21 CALLNP LOCKWAIT 06E63 6116C806 4 3 BASE 22 LD R4 LPC,LPCBUFPTR get pointer to buffer block 06E64 60170801 0 4 BASE 23 LD R0 R4,LPBLINECNT get number of lines in buffer 06E65 64040007 0 IMM 24 CPR R0 LPBMAXCNT will this new line fit? 06E66 FE086E70 25 JLT WEFIT jump if so 26 SETTBIT LPC,LPCWAITING 06E67 60022000 0 IMM 26 LD R0 1*BIT(((LPC,LPCWAITING) DISP (LPC,0))/BITS 0:4) 06E68 FC16C807 0 3 BASE 26 IORM R0 LPC,(((LPC,LPCWAITING) DISP (LPC,0))/BITS 15:31) 06E69 DC003541 27 CALL SUSPENDFRQ else suspend this guy 06E6A 4152C000 3 REG 28 PARV LPC suspension parameter 06E6B 41001DAC 29 PAR SQDIOWAIT direct I/O wait queue 06E6C 4016C805 3 BASE 30 PARL LPC,LPCELOCK thing to unlock 31 * \ / return if he doesn't want to suspend 32 PUNLOCK (LPC,LPCELOCK) unlock his controller 06E6D EC16C805 3 BASE 32 STZ (LPC,LPCELOCK) 06E6E 0C800000 32 ION 06E6F FE0E59D4 33 JMP FERRORSUSP and say we wanted to suspend but couldn't 34 * --- 35 00006E70 36 WEFIT LABEL 37 PUNLOCK (LPC,LPCELOCK) release the controller 06E70 EC16C805 3 BASE 37 STZ (LPC,LPCELOCK) 06E71 0C800000 37 ION 06E72 60170803 0 4 BASE 38 LD R0 R4,LPBNEXTLN index for next line 06E73 1C040024 0 IMM 39 MUL R0 LPBLINESZ offset to beginning of line 06E74 60578801 1 6 BASE 40 LD R1 SP,COPYCNT get record size 06E75 5044008C 1 IMM 41 MIN R1 (LPBLINESZ-1)*CPW upper bound it 06E76 FA446E7C 1 42 JGTZ R1 NOTNULL 43 * We're writing a null line. Convert to a single blank w/forms control. 06E77 60450001 1 IMM 44 LD R1 1+1*LPWRFORM 06E78 E45D0004 1 40 BASE 45 ST R1 R4,LPBLINES(R0) 06E79 60424000 1 IMM 46 LD R1 " "*CH0 06E7A E45D0005 1 40 BASE 47 ST R1 R4,LPBLINES(1)(R0) 06E7B FE0E6E86 48 JMP DATAMOVED 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1530 (FRQWRLP) F 86 FREQ - Write Processor (.LP) 49 * --- 50 00006E7C 51 NOTNULL LABEL 06E7C E48A5E10 2 1 CBM 52 ST R2 R1/LPWRFORM save form control indicator 06E7D E45D0004 1 40 BASE 53 ST R1 R4,LPBLINES(R0) save count and indicator 06E7E 389D0005 2 40 BASE 54 LEA R2 R4,LPBLINES(1)(R0) address where data goes 06E7F 28450000 1 IMM 55 BSUB R1 1*LPWRFORM R1 = character count 06E80 60178802 0 6 BASE 56 LD R0 SP,COREADR R0 = source address 06E81 5C095A10 5 ZBM 57 CMZ FCB,FCRELOC user or supervisor? 06E82 FE0C6E84 58 JNE FROMSYS jump if system 06E83 59840040 IMM 59 CLBMSR MSRFRELOC fetch from user state 00006E84 60 FROMSYS LABEL 06E84 FE400000 61 CMOVE copy the data 06E85 59C40040 IMM 62 IORMSR MSRFRELOC restore fetch bit 63 00006E86 64 DATAMOVED LABEL 65 PLOCK (LPC,LPCELOCK) re-lock the controller 06E86 0CC00000 65 IOFF 06E87 D1D6C805 3 BASE 65 SETT (LPC,LPCELOCK) 06E88 FE0C6E8A 65 JNE MA(2+DISPW MA 0) 06E89 DC40308B 65 CALLNP LOCKWAIT 06E8A BC170803 0 4 BASE 66 INCL R0 R4,LPBNEXTLN bump index to next line 06E8B 64040007 0 IMM 67 CPR R0 LPBMAXCNT should it wrap around? 06E8C FE086E8E 68 JLT NOWRAP jump if not 06E8D EC170803 4 BASE 69 STZ R4,LPBNEXTLN else wrap it 00006E8E 70 NOWRAP LABEL 06E8E D0170801 4 BASE 71 INC R4,LPBLINECNT increment count of lines waiting to go 06E8F DC404D8B 72 CALLNP LPCSTART start the printer if necessary 73 PUNLOCK (LPC,LPCELOCK) unlock the controller 06E90 EC16C805 3 BASE 73 STZ (LPC,LPCELOCK) 06E91 0C800000 73 ION 06E92 FE0E69F1 74 JMP NULLWRITE and all done 75 * --- 76 77 END LPTWRITE routine 138 INPUT FRQWRMT write to a MT 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1531 (FRQWRMT) F 87 FREQ - Write Processor (.MT, .CT, and VT) 3 4 ********************************************************************************** 5 * * 6 * File request processor for write cartridge tape. This * 7 * request writes onto the cartridge mag tape directly from * 8 * the callers memory. The form of the request is: * 9 * LD R0 FRWRITE * 10 * LD R1 * 11 * LD R2
* 12 * FREQ * 13 * JLTZ R0 * 14 * ST R0 * 15 * * 16 * Stack required = 9 * 17 * 0 + max ( CLRMEMTRAP (1), DIODONE (2), DIOSETUP (9), * 18 * MTREQUEST (1), SETMEMTRAP (1), SETMTSTAT (1) ) * 19 * * 20 ********************************************************************************** 21 22 BLOCK MTWRITE routine 23 ENTRY MTWRITE entry for user write request 24 00006E93 25 MTWRITE LABEL 06E93 EDC97215 5 ZBM 26 STW FCB,FCOPWRITE did a write operation 00006E94 27 AGAIN LABEL 06E94 61095F16 4 5 ZBM 28 LD R4 FCB,FCDCBPTR get pointer to the unit control element 06E95 60490021 1 4 ZBM 29 LD R1 R4,MTUTYPE R1 = 0 if CT, 1 if MT, 2 if VT 06E96 60099B30 0 6 ZBM 30 LD R0 SP,IRGRLEN get the buffer length requested 06E97 68226EBD 0 1 31 UCPR R0 MAXRECSIZE(R1) is it too big? 06E98 FE0459B0 32 JGT FERRORPOB give error if so 33 06E99 DC0065B6 34 CALL DIOSETUP create the UBS elements 06E9A 4145FFFF IMM 35 PARV ONEBITS/FLDADRS max record length (already checked for) 06E9B 40440001 IMM 36 PARVL 1 for write operation 06E9C FE0E6EB9 37 JMP GIVEERR jump if he has flako memory 06E9D E4170808 0 4 BASE 38 ST R0 R4,MTUUBS save pointer to UBS chain 06E9E E4570806 1 4 BASE 39 ST R1 R4,MTURECLEN save the record size for driver 40 06E9F DC00658A 41 CALL MTREQUEST request the operation 06EA0 40440007 IMM 42 PARVL MTURQWRITE a write 06EA1 61D20000 7 0 REG 43 LD R7 R0 R7 = error code 44 06EA2 DC006606 45 CALL DIODONE free the UBS elements 06EA3 40570808 4 BASE 46 PARVL R4,MTUUBS pointer to list 06EA4 EC170808 4 BASE 47 STZ R4,MTUUBS cleanliness is next to godliness 48 06EA5 EC094445 5 ZBM 49 STZ FCB,FCLASTREAD clear type of last record read 06EA6 DC40659C 50 CALLNP SETMTSTAT set current MT status 06EA7 E4494445 1 5 ZBM 51 ST R1 FCB,FCLASTREAD set indication of EOT 52 * \ / 53 54 * Here, R7 = the error code from the operation. If it 55 * is UINTVMFPE, then we had a memory parity error. In 56 * this case, we use CMS to fetch the entire buffer, to 57 * cause a parity error interrupt, to let the memory 58 * error handler deal with it. 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1532 (FRQWRMT) F 87 FREQ - Write Processor (.MT, .CT, and VT) 59 60 * \ / 06EA8 6013C000 0 7 REG 61 LD R0 R7 put code back into R0 06EA9 64040070 0 IMM 62 CPR R0 UINTVMFPE was this a parity error? 06EAA FE0C6EB9 63 JNE GIVEERR jump if not 64 06EAB DC005BCF 65 CALL SETMEMTRAP trap memory errors 06EAC 40005B5F 66 PARL PASSERRUP and pass up to user 67 06EAD 60C00412 3 68 LD R3 CPPSA 06EAE 60C8DF11 3 3 ZBM 69 LD R3 R3,PSCACHNP1 R3 -> caller's CA 06EAF 6016C804 0 3 BASE 70 LD R0 R3,CAR2 R0 -> user buffer 06EB0 6056C803 1 3 BASE 71 LD R1 R3,CAR1 R1 = buffer length 06EB1 60840040 2 IMM 72 LD R2 MSRFRELOC 06EB2 2896C801 2 3 BASE 73 BSUB R2 R3,CAMSR R2 = bit in MSR to clear 06EB3 59928000 2 REG 74 CLBMSR R2 change fetching as needed 06EB4 60920000 2 0 REG 75 LD R2 R0 R2 -> user buffer 06EB5 FE540000 76 CMS fetch all of user buffer (twice) 77 * \ / 78 79 * If we get here, then the memory error handler must have 80 * corrected the problem (by paging in a fresh copy). So 81 * we just retry the operation. 82 * \ / 83 06EB6 59C40040 IMM 84 IORMSR MSRFRELOC fix up our MSR 06EB7 DC405BD4 85 CALLNP CLRMEMTRAP clear the memory trap 06EB8 FE0E6E94 86 JMP AGAIN and try the operation again 87 * --- 88 89 * Operation has completed. Error code, if any, is in R0. 90 00006EB9 91 GIVEERR LABEL 06EB9 FA025983 0 92 JEQZ R0 FERROR jump if no error occurred 06EBA 64040080 0 IMM 93 CPR R0 XREQERILR is code an interrupt code? 06EBB FE085B5F 94 JLT PASSERRUP if so, handle as interrupt 06EBC FE0E5983 95 JMP FERROR else handle as error code 96 * --- 97 98 * max record size for CT, MT, VT 06EBF 0000C000 99 MAXRECSIZE VFD CTDIOSIZE,MTDIOSIZE,VTDIOSIZE 100 101 END MTWRITE routine 139 INPUT FRQWREND end of lun write code 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1533 (FRQWREND) F 88 CREF of WRITE to a user device 3 4 END WRITE Write FREQ Routines 140 INPUT FRQREWRITE rewrite a record 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1534 (FRQREWRITE) F 89 FREQ - Rewrite to a SAF 3 4 ********************************************************************************** 5 * * 6 * File request that will rewrite a record of the same size * 7 * on top of a previously existing record in a sequential file. * 8 * The request works by looking to see what size record is * 9 * present, and if the size of the record is the same as the * 10 * record being written, the new record is copied over the * 11 * existing one. * 12 * The call is identical to the FRWRITE request and they * 13 * share many routines in common. * 14 * * 15 * Stack required = 17 ( plus write setup from INITWRITE ) * 16 * 0 + max ( DMOTEWNDO1 (7), GETRECHEAD (13), GRUBWNDO1 (7), * 17 * PUTSAFREC (17), SETMEMTRAP (1), SETWNDO1 (4) ) * 18 * * 19 ********************************************************************************** 20 21 BLOCK FREQRWRIT routine 22 ENTRY FREQRWRIT rewrite to a SAF 23 00006EC0 24 FREQRWRIT LABEL 06EC0 DC406975 25 CALLNP INITWRITE set up stack temps and do checking 06EC1 EDC97215 5 ZBM 26 STW FCB,FCOPWRITE the last operation was this write 06EC2 60096665 0 5 ZBM 27 LD R0 FCB,FCHTYPE get the device type of the file 06EC3 64040001 0 IMM 28 CPR R0 HTYPESAF only legal on a SAF... 06EC4 FE026EC7 29 JEQ OK2RWRIT 06EC5 64040009 0 IMM 30 CPR R0 HTYPETASK ...and BATCH 06EC6 FE0C59A5 31 JNE FERRORILOP 00006EC7 32 OK2RWRIT LABEL 06EC7 60095835 0 5 ZBM 33 LD R0 FCB,FCACCESS get the access allowed on the file 06EC8 64040002 0 IMM 34 CPR R0 FSACSAO this is not legal on append only files 06EC9 FE0259A5 35 JEQ FERRORILOP 06ECA DC005BCF 36 CALL SETMEMTRAP place to go if user memory error 06ECB 40005B63 37 PARL PASSERRW1 PASSERRUP and grub window 1 06ECC F2E06ECE 3 38 JBF R3/FDSTATRTYP/FILSFLAGB NOTEOD check for EOD 06ECD F6E669DB 3 39 JBT R3/FDSTATRTYP/FILEODB SAFWRITE if at end of data, just write the record 00006ECE 40 NOTEOD LABEL 41 * \ / 42 06ECE DC003205 43 CALL SETWNDO1 get window in for header fetching 06ECF 41440001 IMM 44 PARV VPCNTLRO only get read access 06ED0 41534000 5 REG 45 PARV FCB the is the associated lun 06ED1 41006EE6 46 PAR FILEISAU place to go when file bad 06ED2 41574801 5 BASE 47 PARV FCB,FCBLOCK the disk block to get in 06ED3 4044000C IMM 48 PARVL FBITSAF the type of block it should be 06ED4 5C000800 49 CMZ WNDO1 get disk error now rather then later 50 * \ / 06ED5 DC407034 51 CALLNP GETRECHEAD get the header of the next record 06ED6 FE0E6EE6 52 JMP FILEISAU disk error 06ED7 62978804 236 BASE 53 LD2 R2 SP,RWERINFO get the prev position back 06ED8 E4974808 2 5 BASE 54 ST R2 FCB,FCCPP 06ED9 E4D74801 3 5 BASE 55 ST R3 FCB,FCBLOCK 06EDA 600A1B30 0 0 CBM 56 LD R0 R0/FILRLEN extract the actual record length 06EDB 68178801 0 6 BASE 57 UCPR R0 SP,COPYCNT same as the record being written? 06EDC FE0C6EE4 58 JNE NOMATCH no write if not 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1535 (FRQREWRITE) F 89 FREQ - Rewrite to a SAF 06EDD DC4069FA 59 CALLNP PUTSAFREC place the new record on top 06EDE FE0E5983 60 JMP FERROR 06EDF DC40315C 61 CALLNP DMOTEWNDO1 clean out the window 06EE0 60099040 0 6 ZBM 62 LD R0 SP,IRGWORD/IRGRTYP get the type of the record written 06EE1 E4094445 0 5 ZBM 63 ST R0 FCB,FCLASTREAD save as the last record 06EE2 EC094C15 5 ZBM 64 STZ FCB,FCLOADPT not at load point any more 06EE3 FE0E5982 65 JMP FNOERROR 66 * --- 67 68 ********************************************************************************** 69 * * 70 * If the writing record is not the same size as the written * 71 * record then we return an error. * 72 * * 73 ********************************************************************************** 74 00006EE4 75 NOMATCH LABEL 06EE4 DC40315C 76 CALLNP DMOTEWNDO1 clean up our buffers 06EE5 FE0E59B0 77 JMP FERRORPOB 78 * --- 79 80 ********************************************************************************** 81 * * 82 * Unfortunatly, disks sometimes go bad. We come here if * 83 * our SAF has finked out on us. * 84 * * 85 ********************************************************************************** 86 00006EE6 87 FILEISAU LABEL 06EE6 62178804 016 BASE 88 LD2 R0 SP,RWERINFO get prev position info back 06EE7 E4174808 0 5 BASE 89 ST R0 FCB,FCCPP 06EE8 E4574801 1 5 BASE 90 ST R1 FCB,FCBLOCK 06EE9 DC403150 91 CALLNP GRUBWNDO1 release the window 06EEA FE0E59AA 92 JMP FERRORFAU 93 * --- 94 95 END FREQRWRIT routine 141 INPUT FRQREAD read from lun processor 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1536 (FRQREAD) F 90 FREQ - Read Processor 3 4 READROU BLOCK Read FREQ Routines 5 6 ENTRY CHKPTHREC check if records on a .PATH 7 ENTRY DIRENTWIDE size of a directory read entry 8 ENTRY DIRHWIDE size of a directory read header 9 ENTRY DIRINFOHD routine to place a directory read header 10 ENTRY DIRINFOP routine to place a directory read entry 11 ENTRY FREQREAD 12 ENTRY GETNXTBLK 13 ENTRY GETRECHEAD get .SAF record header 14 ENTRY RFILEMOVE move position pointer in .SAF 15 ENTRY RSEEK position in .RAF for read 16 ENTRY ULINKPTHR unlink a .PATH record 17 ENTRY FRQREADJMP jump location for normal read processing 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1537 (FRQREAD) F 90 FREQ - Read Processor 19 20 ********************************************************************************** 21 * * 22 * File request that reads user information from a lun. Call: * 23 * * 24 * LD R0 FRREAD get code for file read * 25 * LD R1 * 26 * LD R2 * 27 * FREQ * 28 * JLTZ R0 * 29 * ST R0 * 30 * ST R1 * 31 * ST R2 * 32 * * 33 * If the record read is longer than the given buffer, as much * 34 * of the record as will fit into the buffer is copied and the * 35 * remainder is lost. The overflow can be detected by the negative * 36 * "buffer remaining count" in R1. * 37 * * 38 * The read requests are: READ - reads record and if shorter than * 39 * the specified buffer length will * 40 * leave the remainder of the buffer * 41 * unchanged (except for terminal read). * 42 * The interrupt processor sets up the registers as follows: * 43 * SP => return address stack * 44 * FCB = R5 => lunlist element if it exists * 45 * FCB = 0 if no lun * 46 * R4 => CA of trapper * 47 * R3 = operand of instruction (lun number) * 48 * R2 = sub-operation code * 49 * Stack required = 21 * 50 * 7 + max ( CDRREAD (13), CODEREAD (10), DIRREAD (11), * 51 * FERRORILOP (3), FRQREADSEQ (12), MTREAD (9), * 52 * NULLREAD (0), PATHREAD (5), TERMREAD (14) ) * 53 * * 54 ********************************************************************************** 55 56 BLOCK FREQREAD routine 57 ENTRY FREQREAD 58 ENTRY FRQREADJMP jump location for normal read processing 59 06EEB 31000000 60 ILLEGALACT VFD (1*BIT FSACSAO)+(1*BIT FSACSXO)+(1*BIT FSACSNDA) 06EEC 00486EEB 61 ILLEGALACS PTR ILLEGALACT/BIT 0 62 00006EED 63 FREQREAD LABEL 06EED EC1F8007 6 STAK 64 STZ STAK SP,RWSTKSIZ allocate stack space 06EEE 68840004 2 IMM 65 UCPR R2 READOPMAX is this a legal read? 06EEF FE0459D8 66 JGT UERRORILR jump if not 06EF0 FB7059B8 5 67 JZA FCB READERLNE jump if the lun is not equipped 06EF1 60095835 0 5 ZBM 68 LD R0 FCB,FCACCESS get the access code 06EF2 5C306EEC 0 @ 69 CMZ @ILLEGALACS(R0) See if legal 06EF3 FE026EF9 70 JEQ NOPROBLEM jump if OK 06EF4 64040003 0 IMM 71 CPR R0 FSACSXO is it XO? 06EF5 FE0C59AE 72 JNE READERRNA jump if not, illegal 06EF6 60000414 0 73 LD R0 CPCUPC get current underprocess 06EF7 65481F14 5 0 ZBM 74 CPR FCB R0,UPCRUNFCB OK to read from XO 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1538 (FRQREAD) F 90 FREQ - Read Processor 06EF8 FE0C59AE 75 JNE READERRNA device only if it is the run unit 00006EF9 76 NOPROBLEM LABEL 06EF9 E4895040 2 5 ZBM 77 ST R2 FCB,FCREQUEST save the request being made 06EFA EC097215 5 ZBM 78 STZ FCB,FCOPWRITE indicate last op not write 06EFB 60570803 1 4 BASE 79 LD R1 R4,CAR1 get callers buffer size 06EFC 64420010 1 IMM 80 CPR R1 NPS*CPP check for too many characters 06EFD FE0659B0 81 JGE FERRORPOB indicate parameter out of bounds 06EFE FA466F04 1 82 JGEZ R1 READLENOK read length is ok 06EFF 6443FFF0 1 IMM 83 CPR R1 -NPS*CPP check for large negative numbers 06F00 FE0859B0 84 JLT FERRORPOB number is too negative 06F01 60096665 0 5 ZBM 85 LD R0 FCB,FCHTYPE get the hardware type of lun 06F02 64040004 0 IMM 86 CPR R0 HTYPEPATH is it a .PATH 06F03 FE0C59B0 87 JNE FERRORPOB only .PATH'S are allowed negative counts 88 * \ / 89 00006F04 90 READLENOK LABEL 06F04 E4578803 1 6 BASE 91 ST R1 SP,BUFSIZ save the calling params 06F05 60570804 1 4 BASE 92 LD R1 R4,CAR2 get the callers buffer location 06F06 38564000 1 1 CACH 93 LEA R1 CACH R1,0 make a pointer to the source buffer 06F07 E4578802 1 6 BASE 94 ST R1 SP,COREADR 06F08 5C093011 4 ZBM 95 CMZ R4,CAMSR/MSRSRELOCB find relocation caller is using 06F09 ED895A10 5 ZBM 96 STLNE FCB,FCRELOC and save for later tests 06F0A 5CA46F0B 2 97 LDPC READOP(R2) goto to approriate read routine 98 * --- 99 00006F0B 100 READOP LABEL 06F0B 00006F0F 101 VFD ADR FRQREADJMP normal read 06F0C 00006F0F 102 VFD ADR FRQREADJMP binary read 06F0D 00006F23 103 VFD ADR FRQREADSEQ sequential read 06F0E 00006F23 104 VFD ADR FRQREADSEQ sequential read 00000004 ABS 105 READOPMAX EQU DISPW READOP 106 00006F0F 107 FRQREADJMP LABEL 06F0F 60096665 0 5 ZBM 108 LD R0 FCB,FCHTYPE get the hardware type of lun 06F10 64040010 0 IMM 109 CPR R0 HTYPELAST is it a known quantity? 06F11 FE0659A5 110 JGE ILLREAD jump if not 06F12 5CA06F13 0 111 LDPC HTREAD(R0) goto processing routine 112 * --- 113 114 * Called routines entered with: R1=>place to store chars 115 * R2 = sub operation 116 * R4=>CA of caller 117 * R5=>FCB of lun 118 00006F13 119 HTREAD LABEL 06F13 000059A5 120 VFD ADR ILLREAD 06F14 00006FA8 121 VFD ADR SAFREAD .SAF 06F15 0000708D 122 VFD ADR RAFREAD .RAF 06F16 0000708D 123 VFD ADR CODEREAD .CODE 06F17 0000711E 124 VFD ADR PATHREAD .PATH 06F18 00007184 125 VFD ADR DIRREAD .DIR 06F19 00007267 126 VFD ADR NULLREAD .NULL 06F1A 0000726D 127 VFD ADR TERMREAD .TERM 06F1B 000059A5 128 VFD ADR ILLREAD undefined (former .LOCK) 06F1C 000059A5 129 VFD ADR ILLREAD .BATCH 06F1D 00006FA8 130 VFD ADR CDRREAD .CDR 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1539 (FRQREAD) F 90 FREQ - Read Processor 06F1E 000059A5 131 VFD ADR ILLREAD .LP 06F1F 00007325 132 VFD ADR MTREAD .MT 06F20 00007325 133 VFD ADR MTREAD .CT 06F21 000059A5 134 VFD ADR ILLREAD .VOL 06F22 00007325 135 VFD ADR MTREAD .VT 136 * table must contain all legal entries 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1540 (FRQREAD) F 90 FREQ - Read Processor 138 139 ********************************************************************************** 140 * * 141 * Errors for the read routines * 142 * * 143 ********************************************************************************** 144 000059A5 145 ILLREAD EQU FERRORILOP 146 000059B8 147 READERLNE EQU FERRORLNE3 000059AE 148 READERRNA EQU FERRORRNA read not allowed 149 150 END FREQREAD routine 142 INPUT FRQSREAD sequential read 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1541 (FRQSREAD) F 91 FREQ - Read Processor 2 3 ********************************************************************************** 4 * * 5 * All file types except for CODE may be read sequentially. For * 6 * all other file types except RAF, "sequential" reads/writes are * 7 * identical to their normal counterparts. RAFs, then, are the * 8 * only files that are treated specially by these requests. * 9 * * 10 * A sequential RAF read starts at the CPP and continues until a LF * 11 * or the buffer count is exhausted. The LF is "read" into R2 as * 12 * the terminating character rather than into the buffer (a la .TERM * 13 * reads). The resulting CPP addresses the byte following the last * 14 * one read. * 15 * * 16 * The byte count returned in R1 always represents the difference * 17 * between the record size (not including the LF) and the buffer * 18 * size. This can be negative. The CPP is updated according to * 19 * the number of bytes that were actually copied. * 20 * * 21 * End-of-data is returned if the CPP matches the EPP. The third * 22 * time this occurs while the CPP has not moved causes an XREQ error * 23 * (XREQERREOD). This error will give control to the overprocess * 24 * unless the "pass up XREQ error" bit in the IMR is off. * 25 * * 26 * The bytes actually read into the user's buffer are written (using * 27 * FRSWRITE) to the "echo unit", if one exists. * 28 * * 29 * The RAF record type is "binary" regardless of how the file was * 30 * written to. * 31 * * 32 * Disk errors cause the FCLASTREAD to say "abnormal end of data" and * 33 * the XREQERFAU error is returned. The same occurs if the read finds * 34 * a hole page or the EPP before finding a LF (regardless of the user's * 35 * buffer length). * 36 * * 37 * Call: * 38 * LD R0 FRSREAD | FRSREADB * 39 * LD R1 * 40 * LD R2 * 41 * FREQ * 42 * JLTZ R0 * 43 * ST R0 * 44 * ST R1 * 45 * * 46 * Stack required = 12 * 47 * 0 + max ( DMOTEWNDO1 (7), GETNXTBLK (12), GRUBWNDO1 (7), * 48 * RSEEK (10), SETMEMTRAP (1) ) * 49 * * 50 ********************************************************************************** 51 52 BLOCK RAFREAD and CODEREAD routine 53 ENTRY FRQREADSEQ 54 ENTRY GETNXTBLK 55 00000010 BYTE 56 LFFLAG EQU BIT 0 1 sez we have found the LF 57 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1542 (FRQSREAD) F 91 FREQ - Read Processor 00006F23 58 FRQREADSEQ LABEL 06F23 60096665 0 5 ZBM 59 LD R0 FCB,FCHTYPE get what type of file we are dealing with 06F24 64040003 0 IMM 60 CPR R0 HTYPECODE is it a code file? 06F25 FE0259A5 61 JEQ FERRORILOP can't read sequentially from a code file 06F26 10840002 2 IMM 62 SUB R2 2 turn sub-op into same as for normal reads 06F27 E4895040 2 5 ZBM 63 ST R2 FCB,FCREQUEST set in FCB 06F28 64040002 0 IMM 64 CPR R0 HTYPERAF is it a RAF? 06F29 FE0C6F0F 65 JNE FRQREADJMP if not go process like a normal read 66 * \ / 67 06F2A 60094445 0 5 ZBM 68 LD R0 FCB,FCLASTREAD check for rereading an EOD 06F2B F2386F33 0 69 JBF R0/FILSFLAGB NOTEODR jump if previous read was not special type 06F2C F23E6F33 0 70 JBF R0/FILEODB NOTEODR if not EOD then no special check 06F2D 60400414 1 71 LD R1 CPCUPC 06F2E 5C084610 1 ZBM 72 CMZ R1,UPCNTLMODE control mode doesn't get this check 06F2F FE0C6F33 73 JNE NOTEODR 06F30 F63A59CC 0 74 JBT R0/FILREODB FERRORREOD jump if EOD has been read already 06F31 EDC94615 5 ZBM 75 STW FCB,FCLASTREAD/FILREODB say the end of data was read twice 06F32 FE0E5982 76 JMP FNOERROR 77 * --- 78 00006F33 79 NOTEODR LABEL 06F33 60174808 0 5 BASE 80 LD R0 FCB,FCCPP get the current position 06F34 60574801 1 5 BASE 81 LD R1 FCB,FCBLOCK and current block 06F35 E6178804 016 BASE 82 ST2 R0 SP,RWERINFO save for error recovery 06F36 68174807 0 5 BASE 83 UCPR R0 FCB,FCEPP are we at the end? 06F37 FE026F8A 84 JEQ RETURNEOD return EOD if so 06F38 FE046F8E 85 JGT RETURNAEOD return abnormal EOD if CPP > EPP 86 * \ / 87 06F39 DC005BCF 88 CALL SETMEMTRAP catch protected memory 06F3A 40006F95 89 PARL USRMEMBAD 06F3B EC0BC010 7 CBM 90 STZ R7/LFFLAG say we have not found the line feed yet 06F3C 60D74808 3 5 BASE 91 LD R3 FCB,FCCPP get seek position 92 * \ / 93 94 * R3 = byte address for seek 00006F3D 95 SEQREADW LABEL 06F3D DC006F97 96 CALL GETNXTBLK get the next data block 06F3E 40006F8E 97 PARL RETURNAEOD next data block is a hole or A/U 98 * \ / 99 06F3F 704968C8 1 5 ZBM 100 LDN R1 FCB,FCCBYTE get byte pos in current block (neg) 06F40 18441000 1 IMM 101 ADD R1 CPP calculate bytes left in block 06F41 50578803 1 6 BASE 102 MIN R1 SP,BUFSIZ move no more than wanted 06F42 E4578800 1 6 BASE 103 ST R1 SP,FCRTEMP save number of bytes moving 104 06F43 600968C8 0 5 ZBM 105 LD R0 FCB,FCCBYTE get byte pos in current block 06F44 600A3C00 0 0 CBM 106 LD R0 R0*FLDCHARS rotate to make character address 06F45 18040800 0 IMM 107 ADD R0 ADR WNDO1 calc addr of first byte to move 06F46 60D20000 3 0 REG 108 LD R3 R0 keep this safe from CSRCH 06F47 6084000A 2 IMM 109 LD R2 LF want to find a LF 06F48 FE560000 110 CSRCH look for a line feed 06F49 FE0C6F4C 111 JNE NOLFHERE jump if we don't have a line feed 06F4A B0578800 1 6 BASE 112 RSBM R1 SP,FCRTEMP determine the number of chars to move 06F4B EDCBC010 7 CBM 113 STW R7/LFFLAG say we found the LF 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1543 (FRQSREAD) F 91 FREQ - Read Processor 00006F4C 114 NOLFHERE LABEL 06F4C 60578800 1 6 BASE 115 LD R1 SP,FCRTEMP see how far we must go 06F4D 18574808 1 5 BASE 116 ADD R1 FCB,FCCPP add in the current position pointer 06F4E 68574807 1 5 BASE 117 UCPR R1 FCB,FCEPP are we too far out? 06F4F FE046F8E 118 JGT RETURNAEOD if so bomb out 119 * \ / 120 06F50 60578800 1 6 BASE 121 LD R1 SP,FCRTEMP how far we will go 06F51 6012C000 0 3 REG 122 LD R0 R3 R0 -> starting location of characters 06F52 60978802 2 6 BASE 123 LD R2 SP,COREADR destination address 06F53 5C095A10 5 ZBM 124 CMZ FCB,FCRELOC use the caller's storing reloc 06F54 FE0C6F56 125 JNE GOTRELOC jump if it stays the same 06F55 59840080 IMM 126 CLBMSR MSRSRELOC relocate to the user 00006F56 127 GOTRELOC LABEL 06F56 FE400000 128 CMOVE move the chars 06F57 59C40080 IMM 129 IORMSR MSRSRELOC restore monitor storing 06F58 E4978802 2 6 BASE 130 ST R2 SP,COREADR save new destination addr 06F59 60D78800 3 6 BASE 131 LD R3 SP,FCRTEMP get chars moved 06F5A B0D78803 3 6 BASE 132 RSBM R3 SP,BUFSIZ calc remaining (set condition bits) 06F5B 18D74808 3 5 BASE 133 ADD R3 FCB,FCCPP calculate new RAF position 06F5C F7C06F71 7 134 JBT R7/LFFLAG SEQRDDONE all done if we have processed the LF 06F5D FE046F3D 135 JGT SEQREADW jump if RSBM left BUFSIZ >= 0 136 * \ / 137 138 * The user buffer is full but we have not reached the end of the record 139 * yet. We will continue to search for the elusive LF. 06F5E 704AE8C0 1 3 CBM 140 LDN R1 R3/BYTEDISP pick up remaining bytes in current block 06F5F FA426F6B 1 141 JEQZ R1 ENDOFBLK jump if at the end of the block 06F60 18441000 1 IMM 142 ADD R1 CPP determine number of chars left on page 143 * \ / 144 145 * R0 -> byte address to start searching at, R1 = number of bytes left on page, 146 * R3 = current position in RAF. 00006F61 147 FINDTHELF LABEL 06F61 E4578800 1 6 BASE 148 ST R1 SP,FCRTEMP save this 06F62 6084000A 2 IMM 149 LD R2 LF the terminator 06F63 FE560000 150 CSRCH look for it 06F64 EC4BC010 7 CBM 151 STLEQ R7/LFFLAG remember if we found it 152 * \ / 153 06F65 30578800 1 6 BASE 154 RSB R1 SP,FCRTEMP see how far we had to go 06F66 B0578803 1 6 BASE 155 RSBM R1 SP,BUFSIZ remember where we are in the user's buffer 06F67 18D24000 3 1 REG 156 ADD R3 R1 add to the current position 06F68 68D74807 3 5 BASE 157 UCPR R3 FCB,FCEPP have we exceeded the end position 06F69 FE046F8E 158 JGT RETURNAEOD if so then file went bad 06F6A F7C06F71 7 159 JBT R7/LFFLAG SEQRDDONE get out of here if we have the LF 160 00006F6B 161 ENDOFBLK LABEL 06F6B DC006F97 162 CALL GETNXTBLK get the next data block 06F6C 40006F8E 163 PARL RETURNAEOD next data block is a hole 164 06F6D 60D74808 3 5 BASE 165 LD R3 FCB,FCCPP get the current position 06F6E 60441000 1 IMM 166 LD R1 CPP number of bytes remaining on the page 06F6F 60040800 0 IMM 167 LD R0 ADR WNDO1 R0 -> next char to search 06F70 FE0E6F61 168 JMP FINDTHELF look for the line feed 169 * --- 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1544 (FRQSREAD) F 91 FREQ - Read Processor 170 00006F71 171 SEQRDDONE LABEL 06F71 DC0070CD 172 CALL RSEEK reposition the RAF 06F72 41006F8E 173 PAR RETURNAEOD 06F73 4056D001 3 REG 174 PARVL R3+1 go past the LF 175 06F74 61000412 4 176 LD R4 CPPSA get current PSA pointer 06F75 61091F11 4 4 ZBM 177 LD R4 R4,PSCACHNP1 => user registers 06F76 60C97484 3 5 ZBM 178 LD R3 FCB,FCECHOLUN pick up any possible echo 06F77 FAC26F82 3 179 JEQZ R3 NOECHO jump if nothing to echo 180 * \ / 181 06F78 600402A0 0 IMM 182 LD R0 FRSWRITE sequential write time 06F79 60570803 1 4 BASE 183 LD R1 R4,CAR1 get size of user's buffer 06F7A 10578803 1 6 BASE 184 SUB R1 SP,BUFSIZ determine how much we used 06F7B 50570803 1 4 BASE 185 MIN R1 R4,CAR1 don't let us overflow the buffer 06F7C 60970804 2 4 BASE 186 LD R2 R4,CAR2 point to the user's buffer 06F7D 5C095A10 5 ZBM 187 CMZ FCB,FCRELOC from monitor or user space? 06F7E FE0C6F80 188 JNE OKREL jump if from monitor 06F7F 59840040 IMM 189 CLBMSR MSRFRELOC relocate as necessary 00006F80 190 OKREL LABEL 06F80 0892C000 3 REG 191 FREQ R3 write the record 192 * ignore errors 06F81 59C40040 IMM 193 IORMSR MSRFRELOC relocate to us 194 * \ / 195 00006F82 196 NOECHO LABEL 06F82 60578803 1 6 BASE 197 LD R1 SP,BUFSIZ get how much of the buffer we used 06F83 E4570803 1 4 BASE 198 ST R1 R4,CAR1 set in the user's registers 06F84 EC094445 5 ZBM 199 STZ FCB,FCLASTREAD no special record type read 06F85 6004000A 0 IMM 200 LD R0 LF get a carriage return 06F86 E4170804 0 4 BASE 201 ST R0 R4,CAR2 return terminator in users R2 06F87 EC094C15 5 ZBM 202 STZ FCB,FCLOADPT indicate file not at load point 06F88 DC40315C 203 CALLNP DMOTEWNDO1 clean up our window 06F89 FE0E5982 204 JMP FNOERROR indicate success 205 * --- 206 00006F8A 207 RETURNEOD LABEL 06F8A 60040009 0 IMM 208 LD R0 FILNEOD get file end of data status 06F8B E4094445 0 5 ZBM 209 ST R0 FCB,FCLASTREAD indicate type last read 06F8C DC403150 210 CALLNP GRUBWNDO1 call to free up this window 06F8D FE0E5982 211 JMP FNOERROR 212 * --- 213 00006F8E 214 RETURNAEOD LABEL 06F8E DC403150 215 CALLNP GRUBWNDO1 call to free up this window 06F8F 6004000B 0 IMM 216 LD R0 FILAEOD get the abnormal status 06F90 E4094445 0 5 ZBM 217 ST R0 FCB,FCLASTREAD save as last thing read 06F91 62178804 016 BASE 218 LD2 R0 SP,RWERINFO retrieve the previous position 06F92 E4174808 0 5 BASE 219 ST R0 FCB,FCCPP restore previous position 06F93 E4574801 1 5 BASE 220 ST R1 FCB,FCBLOCK and previous block 06F94 FE0E59AA 221 JMP FERRORFAU file abnormal/unavailable 222 * --- 223 224 * Bad user memory -- probably protect violation 00006F95 225 USRMEMBAD LABEL 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1545 (FRQSREAD) F 91 FREQ - Read Processor 06F95 EDC95C16 5 ZBM 226 STW FCB,FCRESEEK raf disk pointers bad 06F96 FE0E5B63 227 JMP PASSERRW1 give error to program controller 228 * --- 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1546 (FRQSREAD) F 91 FREQ - Read Processor 230 231 ********************************************************************************** 232 * * 233 * GETNXTBLK * 234 * * 235 * This subroutine seeks to the desired RAF address and maps * 236 * in the data block containing the address. Note that the page * 237 * is not locked, so the actual trap (and possible error return) * 238 * cannot happen in this routine. * 239 * Call: * 240 * R3 = seek address * 241 * FCB = FCB * 242 * CALL GETNXTBLK * 243 * PARL in a hole or disk error * 244 * WNDO1 contains data block * 245 * * 246 * Eats R0:R4. * 247 * Stack required = 12 * 248 * 2 + max ( RSEEK (10), SETWNDO1 ( 4) ) * 249 * * 250 ********************************************************************************** 251 252 BLOCK GETNXTBLK subroutine 253 254 ENTRY GETNXTBLK 255 256 BEGFRAME 00178801 6 BASE 257 GNBERRADR BSS 1 error return address 258 ENDFRAME 259 06F97 DD1F8002 6 STAK 260 GETNXTBLK ENTR PUSH 06F98 C0178801 6 BASE 261 STPL SP,GNBERRADR save callers error address 06F99 DC0070CD 262 CALL RSEEK reposition the RAF 06F9A 41006FA6 263 PAR ERROR 06F9B 4052C000 3 REG 264 PARVL R3 go past the LF 06F9C FA026FA6 0 265 JEQZ R0 ERROR go to error return if in a hole 266 06F9D E1178801 4 6 BASE 267 EXCH R4 SP,GNBERRADR pick up error address (save R4) 06F9E DC003205 268 CALL SETWNDO1 get the data block in 06F9F 41440001 IMM 269 PARV VPCNTLRO with read only access 06FA0 41534000 5 REG 270 PARV FCB sez which lun associated with block 06FA1 41170800 4 BASE 271 PAR R4,0 error address 06FA2 41574801 5 BASE 272 PARV FCB,FCBLOCK 06FA3 4044000F IMM 273 PARVL FBITRAFD type for RAF data block 06FA4 E1178801 4 6 BASE 274 EXCH R4 SP,GNBERRADR restore R4, error address back to 275 * stack for cleanliness 06FA5 5D1F8002 6 STAK 276 LEAVE POP 277 * --- 278 00006FA6 279 ERROR LABEL 06FA6 61D78801 7 6 BASE 280 LD R7 SP,GNBERRADR return to error address 06FA7 5D1F8002 6 STAK 281 LEAVE POP 282 * --- 283 284 END of GETNXTBLK subroutine 285 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1547 (FRQSREAD) F 91 FREQ - Read Processor 286 END SEQREAD routine 143 INPUT FRQRDSAF read from a .SAF 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1548 (FRQRDSAF) F 92 FREQ - Read Processor (.SAF & .CDR) 3 4 BLOCK SAF Read Routines 5 6 ENTRY CDRREAD read from a .CDR 7 ENTRY GETRECHEAD fetch a record header in a .SAF 8 ENTRY RFILEMOVE move CPP in a .SAF 9 ENTRY SAFREAD read from a .SAF 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1549 (FRQRDSAF) F 92 FREQ - Read Processor (.SAF & .CDR) 11 12 ********************************************************************************** 13 * * 14 * This FREQ reads records from a sequential file and places * 15 * them into the callers memory. The form of the request is: * 16 * LD R0 FRREAD get code for file read * 17 * LD R1 * 18 * LD R2 * 19 * FREQ * 20 * JLTZ R0 * 21 * ST R0 * 22 * ST R1 * 23 * ST R2 * 24 * * 25 * If the record read is longer than the given buffer, as much * 26 * of the record as will fit into the buffer is copied and the * 27 * remainder is lost. The overflow can be detected by the negative * 28 * "buffer remaining count" in R1. * 29 * Stack required = 13 * 30 * 0 + max ( DMOTEWNDO1 (7), GETRECHEAD (13), GRUBWNDO1 (7), * 31 * RFILEMOVE (10), SETMEMTRAP (1), SETWNDO1 (4) ) * 32 * * 33 ********************************************************************************** 34 35 BLOCK SAFREAD and CDRREAD routine 36 ENTRY SAFREAD 37 ENTRY CDRREAD 38 00006FA8 39 SAFREAD LABEL 00006FA8 40 CDRREAD LABEL 06FA8 60094445 0 5 ZBM 41 LD R0 FCB,FCLASTREAD check for rereading an EOD 06FA9 F2386FB1 0 42 JBF R0/FILSFLAGB NOTEODR jump if previous read was not special type 06FAA F23E6FB1 0 43 JBF R0/FILEODB NOTEODR if not EOD no special check 06FAB 60400414 1 44 LD R1 CPCUPC 06FAC 5C084610 1 ZBM 45 CMZ R1,UPCNTLMODE control mode doesn't get this check 06FAD FE0C6FB1 46 JNE NOTEODR 06FAE F63A59CC 0 47 JBT R0/FILREODB FERRORREOD jump if EOD has been read already 06FAF EDC94615 5 ZBM 48 STW FCB,FCLASTREAD/FILREODB say the end of data was read twice 06FB0 FE0E5982 49 JMP FNOERROR 50 * --- 51 00006FB1 52 NOTEODR LABEL 06FB1 60174808 0 5 BASE 53 LD R0 FCB,FCCPP get the current position 06FB2 60574801 1 5 BASE 54 LD R1 FCB,FCBLOCK and the current block number 06FB3 E6178804 016 BASE 55 ST2 R0 SP,RWERINFO save current position for error recovery 06FB4 DC003205 56 CALL SETWNDO1 set up the window 06FB5 41440001 IMM 57 PARV VPCNTLRO indicate read only 06FB6 41534000 5 REG 58 PARV FCB indicate lun associated with block 06FB7 4100702A 59 PAR SAFRERFAU pass error address 06FB8 41574801 5 BASE 60 PARV FCB,FCBLOCK indicate MS address 06FB9 4044000C IMM 61 PARVL FBITSAF indicate type of block expected 06FBA 60000800 0 62 LD R0 WNDO1 get mass storage errors early 63 ***** maybe should just lock in the window 64 06FBB DC407034 65 CALLNP GETRECHEAD get the record header 06FBC FE0E702A 66 JMP SAFRERFAU file is in bad shape 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1550 (FRQRDSAF) F 92 FREQ - Read Processor (.SAF & .CDR) 06FBD E4178800 0 6 BASE 67 ST R0 SP,IRGWORD save the record header 06FBE F2106FC8 0 68 JBF R0/FILTYPE/FILSFLAGB SAFRNSTYP jump if not a system record 06FBF F6166FC4 0 69 JBT R0/FILTYPE/FILEODB SAFREOD jump if EOD 00006FC0 70 SAFRDOEOD LABEL 06FC0 600A1040 0 0 CBM 71 LD R0 R0/FILTYPE get file mark record status 00006FC1 72 SAFRDOEOF LABEL 06FC1 E4094445 0 5 ZBM 73 ST R0 FCB,FCLASTREAD indicate type last read 06FC2 DC403150 74 CALLNP GRUBWNDO1 call to free up this window 06FC3 FE0E5982 75 JMP FNOERROR exit 76 * --- 77 78 * end of data read 00006FC4 79 SAFREOD LABEL 06FC4 62978804 236 BASE 80 LD2 R2 SP,RWERINFO recover original position 06FC5 E4974808 2 5 BASE 81 ST R2 FCB,FCCPP restore position so EOD repeats 06FC6 E4C95181 3 5 ZBM 82 ST R3 FCB,FCMSBLK block number too 06FC7 FE0E6FC0 83 JMP SAFRDOEOD go to return 84 * --- 85 86 * record is not a special type - take the length and run with it. 00006FC8 87 SAFRNSTYP LABEL 06FC8 DC005BCF 88 CALL SETMEMTRAP catch user memory failures 06FC9 40007032 89 PARL USRMEMBAD 06FCA 60099B30 0 6 ZBM 90 LD R0 SP,IRGRLEN get the record length 06FCB E4178801 0 6 BASE 91 ST R0 SP,COPYCNT set how far to move 06FCC EC0BC010 7 CBM 92 STZ R7/BIT 0 flag to say first time 00006FCD 93 MOVEON LABEL 06FCD 704968C8 1 5 ZBM 94 LDN R1 FCB,FCCBYTE get position in block 06FCE 18441000 1 IMM 95 ADD R1 CPP calculate characters left in block 06FCF 50578801 1 6 BASE 96 MIN R1 SP,COPYCNT 06FD0 50578803 1 6 BASE 97 MIN R1 SP,BUFSIZ 06FD1 FA427005 1 98 JEQZ R1 SAFRNOMOV jump if nothing to move 06FD2 60D24000 3 1 REG 99 LD R3 R1 save count of characters to move 06FD3 600968C8 0 5 ZBM 100 LD R0 FCB,FCCBYTE load current position within block 06FD4 600A3C00 0 0 CBM 101 LD R0 R0*FLDCHARS convert to 'word' count 06FD5 18040800 0 IMM 102 ADD R0 ADR WNDO1 make pointer to current memory address 103 * \ / 104 105 ********************************************************************************** 106 * * 107 * Here we check to see if the lun being read from is within the * 108 * control mode lun range. If so, special processing is done with * 109 * records that begin with the control mode prompt. A record beginning * 110 * thusly can only be read by control mode -- a user gets end-of-data. * 111 * If the record has two prompts then it is passed to a non-control * 112 * mode reader as a filemark. * 113 * This checking is for DO files and .CDRs, the latter which can * 114 * only occur equipped to the standard input unit. * 115 * * 116 ********************************************************************************** 117 118 * \ / 06FD6 F7C06FFB 7 119 JBT R7/BIT 0 NOTCMSPEC jump if not the first time through 06FD7 7DC30000 7 IMM 120 IOR R7 1*BIT 0 remember through here once 06FD8 5C097A15 5 ZBM 121 CMZ FCB,FCCMUNIT is this a control mode unit? 06FD9 FE026FFB 122 JEQ NOTCMSPEC jump if not special 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1551 (FRQRDSAF) F 92 FREQ - Read Processor (.SAF & .CDR) 06FDA 60899040 2 6 ZBM 123 LD R2 SP,IRGRTYP get the type of the record 06FDB 64840000 2 IMM 124 CPR R2 RTYPETEXT only text records interest us 06FDC FE0C6FFB 125 JNE NOTCMSPEC so leave if not text 06FDD 60960000 2 0 CACH 126 LD R2 CACH R0,0 get the first char of the record 06FDE 6484003E 2 IMM 127 CPR R2 CMCHAR is it the control mode prompt? 06FDF FE0C6FFB 128 JNE NOTCMSPEC if not no special processing 06FE0 60800414 2 129 LD R2 CPCUPC 06FE1 5C088610 2 ZBM 130 CMZ R2,UPCNTLMODE are we control mode? 06FE2 FE0C6FFB 131 JNE NOTCMSPEC if we are then reading it is allowed 06FE3 64440001 1 IMM 132 CPR R1 1 record length of one can only be an EOD 06FE4 FE026FF8 133 JEQ CDREODFND jump if only an EOD 06FE5 D00A1F30 0 CBM 134 INC R0/FLDCHARS move to next char in record 06FE6 64040C00 0 IMM 135 CPR R0 ADR WNDO1(WPP) does the record lap over? 06FE7 FE0C6FEC 136 JNE NOOVERLAP jump if not 06FE8 60440001 1 IMM 137 LD R1 1 we must move into the next block 06FE9 DC00705B 138 CALL RFILEMOVE get the next page in 06FEA 4000702A 139 PARL SAFRERFAU 06FEB 60040800 0 IMM 140 LD R0 ADR WNDO1 next char will be the first 141 * \ / 00006FEC 142 NOOVERLAP LABEL 06FEC 60960000 2 0 CACH 143 LD R2 CACH R0,0 get the second char 06FED 6484003E 2 IMM 144 CPR R2 CMCHAR is it a prompt char too? 06FEE FE0C6FF8 145 JNE CDREODFND if not it's just an EOD 06FEF 62978804 236 BASE 146 LD2 R2 SP,RWERINFO it's an EOF so 06FF0 E4974808 2 5 BASE 147 ST R2 FCB,FCCPP restore to beginning of record 06FF1 E4C95181 3 5 ZBM 148 ST R3 FCB,FCMSBLK block too 06FF2 60040015 0 IMM 149 LD R0 FRFWSP 06FF3 81524000 1 REG 150 STCAR R1 get access to unit # in our console area 06FF4 0896480E 1 BASE 151 FREQ R1,CAXOPERAND move over the filemark record 06FF5 FA08702A 0 152 JLTZ R0 SAFRERFAU 06FF6 60040008 0 IMM 153 LD R0 FILEOF return end of file status 06FF7 FE0E6FC1 154 JMP SAFRDOEOF 155 * --- 156 157 * End-of-data for a card reader 00006FF8 158 CDREODFND LABEL 06FF8 FB28702C 4 159 JSR R4 RESETPOS position so it will get reread 06FF9 60040009 0 IMM 160 LD R0 FILNEOD return normal end of data 06FFA FE0E6FC1 161 JMP SAFRDOEOF 162 * --- 163 164 * The record may be read. 00006FFB 165 NOTCMSPEC LABEL 06FFB 60978802 2 6 BASE 166 LD R2 SP,COREADR get destination address in caller memory 06FFC 5C095A10 5 ZBM 167 CMZ FCB,FCRELOC chars going to user or monitor? 06FFD FE0C6FFF 168 JNE SAFRUSRR jump if destination in monitor memory 06FFE 59840080 IMM 169 CLBMSR MSRSRELOC direct characters to user memory 06FFF FE400000 170 SAFRUSRR CMOVE move the characters 07000 59C40080 IMM 171 IORMSR MSRSRELOC restore monitor storing! 07001 E4978802 2 6 BASE 172 ST R2 SP,COREADR remember where to start next time 07002 B0D78801 3 6 BASE 173 RSBM R3 SP,COPYCNT reduce record remaining 07003 B0D78803 3 6 BASE 174 RSBM R3 SP,BUFSIZ reduce buffer remaining 175 * \ / 176 177 ********************************************************************************** 178 * * 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1552 (FRQRDSAF) F 92 FREQ - Read Processor (.SAF & .CDR) 179 * Now check for transfer done. If the record remaining is zero, * 180 * we check the end length of the record and if it matches, then we're * 181 * complete. If it doesn't match, then error. If the remaining user * 182 * buffer is zero then we skip forward until we have completely * 183 * covered the record, then we do normal end of record processing. * 184 * * 185 ********************************************************************************** 186 187 * \ / 07004 6052C000 1 3 REG 188 LD R1 R3 00007005 189 SAFRNOMOV LABEL 07005 5C178803 6 BASE 190 CMZ SP,BUFSIZ is the users buffer consumed? 07006 FE02700C 191 JEQ SAFRNOBUF if so, skip over record and eor processing 07007 DC00705B 192 CALL RFILEMOVE move forward into next block 07008 4000702A 193 PARL SAFRERFAU errors give file abnormal/unavailable 07009 5C178801 6 BASE 194 CMZ SP,COPYCNT is the record used up? 0700A FE0C6FCD 195 JNE MOVEON move some more of the record 0700B FE0E700F 196 JMP SAFRNOREC end of record processing 197 * --- 198 199 ********************************************************************************** 200 * The users buffer is used up. Skip over the remaining * 201 * record before doing the normal end of record processing. * 202 ********************************************************************************** 203 0000700C 204 SAFRNOBUF LABEL 0700C 18578801 1 6 BASE 205 ADD R1 SP,COPYCNT get characters remaining in record 0700D DC00705B 206 CALL RFILEMOVE skip over the rest 0700E 4000702A 207 PARL SAFRERFAU error address 208 * \ / 209 210 ********************************************************************************** 211 * We fetch the header ( or footer ) at the end of the record * 212 * and see if it is good. If it matches the one at the beginning, * 213 * we've been successful. * 214 ********************************************************************************** 215 216 * \ / 0000700F 217 SAFRNOREC LABEL 0700F DC407034 218 CALLNP GETRECHEAD get the one at the end 07010 FE0E702A 219 JMP SAFRERFAU error return 07011 64178800 0 6 BASE 220 CPR R0 SP,IRGWORD compare footer to header word 07012 FE0C702A 221 JNE SAFRERFAU if not same, a bad record 07013 DC40315C 222 CALLNP DMOTEWNDO1 put window away since it might be used soon 07014 61000412 4 223 LD R4 CPPSA get the current PSA pointer 07015 61091F11 4 4 ZBM 224 LD R4 R4,PSCACHNP1 get pointer to callers registers 225 226 * \ / 227 228 ********************************************************************************** 229 * Do unit record device record echoing. If an echo unit is * 230 * specified we write the read record out of the user's address * 231 * space onto that device. * 232 ********************************************************************************** 233 234 * \ / 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1553 (FRQRDSAF) F 92 FREQ - Read Processor (.SAF & .CDR) 235 07016 60C97484 3 5 ZBM 236 LD R3 FCB,FCECHOLUN Echo device specified? 07017 FAC27022 3 237 JEQZ R3 NOURECHO Nope, skip this 07018 600402A0 0 IMM 238 LD R0 FRSWRITE sequential write 07019 18099040 0 6 ZBM 239 ADD R0 SP,IRGRTYP Write proper record type 0701A 60570803 1 4 BASE 240 LD R1 R4,CAR1 users character count 0701B 50499B30 1 6 ZBM 241 MIN R1 SP,IRGRLEN Length is smaller of record size and buffer 0701C 60970804 2 4 BASE 242 LD R2 R4,CAR2 From user's buffer 0701D 5C095A10 5 ZBM 243 CMZ FCB,FCRELOC Is user outside monitor? 0701E FE0C7020 244 JNE OK2ECHO 0701F 59840040 IMM 245 CLBMSR MSRFRELOC Point at him if yes 246 00007020 247 OK2ECHO LABEL 07020 0892C000 3 REG 248 FREQ R3 Write onto the specified unit 249 * Ignore any error 07021 59C40040 IMM 250 IORMSR MSRFRELOC 00007022 251 NOURECHO LABEL 252 * \ / 253 254 ********************************************************************************** 255 * Do final read cleanup. Return to the requester the residual * 256 * buffer, the terminating character (always carriage return) and * 257 * the type of record read in the dynamic status. * 258 ********************************************************************************** 259 260 * \ / 07022 60099B30 0 6 ZBM 261 LD R0 SP,IRGRLEN get the record length 07023 B0170803 0 4 BASE 262 RSBM R0 R4,CAR1 remove actual length from the buffer size 263 * this might borrow from garbage in the users upper R1 07024 60099040 0 6 ZBM 264 LD R0 SP,IRGRTYP get the record type 07025 E4094445 0 5 ZBM 265 ST R0 FCB,FCLASTREAD save in the FCB 07026 6004000D 0 IMM 266 LD R0 CR get a carriage return 07027 E4170804 0 4 BASE 267 ST R0 R4,CAR2 save terminator in user register 07028 EC094C15 5 ZBM 268 STZ FCB,FCLOADPT indicate no longer at load point 07029 FE0E5982 269 JMP FNOERROR no error - dynamic status to R0 270 * --- 271 272 ********************************************************************************** 273 * The file has given mass storage errors. We restore the * 274 * previous position and return the error. * 275 ********************************************************************************** 276 0000702A 277 SAFRERFAU LABEL 0702A DC403150 278 CALLNP GRUBWNDO1 clean up the window 0702B 610459AA 4 IMM 279 LD R4 ADR FERRORFAU set up for call to RESETPOS 280 * \ / 281 282 * Routine to reset position (call is JSR R4) 0000702C 283 RESETPOS LABEL 0702C 6084000B 2 IMM 284 LD R2 FILAEOD get the abnormal status 0702D E4894445 2 5 ZBM 285 ST R2 FCB,FCLASTREAD save as last thing read 0702E 62978804 236 BASE 286 LD2 R2 SP,RWERINFO retrieve the previous position 0702F E4974808 2 5 BASE 287 ST R2 FCB,FCCPP restore previous position 07030 E4C95181 3 5 ZBM 288 ST R3 FCB,FCMSBLK and previous block 07031 5C930000 4 REG 289 LDPC R4 return 290 * --- 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1554 (FRQRDSAF) F 92 FREQ - Read Processor (.SAF & .CDR) 291 292 * User's memory went bad (probably memory protect violation) 00007032 293 USRMEMBAD LABEL 07032 61045B63 4 IMM 294 LD R4 ADR PASSERRW1 GRUBWNDO1 and generate interrupt 07033 FE0E702C 295 JMP RESETPOS share code 296 * --- 297 298 END SAFREAD and CDRREAD routine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1555 (FRQRDSAF) F 92 FREQ - Read Processor (.SAF & .CDR) 300 301 ********************************************************************************** 302 * * 303 * GETRECHEAD * 304 * Routine that gets the 3 character long header that is * 305 * before and after each record in a sequential file. It first * 306 * zeros SP,GETRHIRG, then it moves the characters one at a time * 307 * ( calling RFILEMOVE if necessary ) into said word. It assumes * 308 * that the current block is mapped into window 1 and it will * 309 * return with the current position pointer moved past the record * 310 * header and the current data block mapped into window 1, unless * 311 * the header was an end of data in which case CPP is not moved. * 312 * Call: * 313 * CALLNP GETRECHEAD * 314 * JMP * 315 * ST R0 * 316 * Eats R1 - R3 * 317 * Stack required = 13 * 318 * 3 + max ( RFILEMOVE (10), SETERRW1 (1) ) * 319 * * 320 ********************************************************************************** 321 322 BLOCK GETRECHEAD subroutine 323 ENTRY GETRECHEAD 324 325 BEGFRAME 00178801 6 BASE 326 GETRECHDR4 BSS 1 save spot for R4 00178802 6 BASE 327 GETRHIRG BSS 1 holds the inter record gap word 328 ENDFRAME 329 07034 DD5F8003 6 STAK 330 GETRECHEAD ENTRNP PUSH 07035 600968C8 0 5 ZBM 331 LD R0 FCB,FCCBYTE get displacement within page 07036 64040FFD 0 IMM 332 CPR R0 CPP-3 whole header and following char within page? 07037 FE067041 333 JGE SLOWMETHOD jump if not - we must work 07038 600A3C00 0 0 CBM 334 LD R0 R0*FLDCHARS make into word count 07039 18040800 0 IMM 335 ADD R0 ADR WNDO1 R0 is pointer to first character 0703A 60080180 0 0 ZBM 336 LD R0 ZBM R0,0/BITS 0:23 get the three characters 0703B F210703D 0 337 JBF R0/FILTYPE/FILSFLAGB GETRECHDNS jump if it can't be an EOD 0703C F616703F 0 338 JBT R0/FILTYPE/FILEODB GETRECHDNE don't advance if EOD 0000703D 339 GETRECHDNS LABEL 0703D 60440003 1 IMM 340 LD R1 3 size of header 0703E 98574808 1 5 BASE 341 ADDM R1 FCB,FCCPP move over the header 0000703F 342 GETRECHDNE LABEL 0703F 19C40001 7 IMM 343 ADD R7 1 give success return 07040 5D1F8003 6 STAK 344 LEAVE POP return to caller 345 * --- 346 347 ********************************************************************************** 348 * Either the header or the current position pointer will move * 349 * over the block boundary so we do this the slow way so the * 350 * proper page will get mapped. * 351 ********************************************************************************** 352 00007041 353 SLOWMETHOD LABEL 07041 E5178801 4 6 BASE 354 ST R4 SP,GETRECHDR4 save R4 07042 61040002 4 IMM 355 LD R4 3-1 number of characters to pick up 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1556 (FRQRDSAF) F 92 FREQ - Read Processor (.SAF & .CDR) 07043 EC178802 6 BASE 356 STZ SP,GETRHIRG initialize word 00007044 357 NXTHDBYTE LABEL 07044 600968C8 0 5 ZBM 358 LD R0 FCB,FCCBYTE get the current location in this block 07045 600A3C00 0 0 CBM 359 LD R0 R0*FLDCHARS make into a word count 07046 18040800 0 IMM 360 ADD R0 ADR WNDO1 make pointer to character 07047 60160000 0 0 CACH 361 LD R0 CACH R0,0 get the next character 07048 5D687058 4 362 XCT SLOWSTORET(R4) store the character into the IRG word 07049 65040002 4 IMM 363 CPR R4 3-1 first byte? 0704A FE0C704E 364 JNE NOTEODGET jump if not 0704B 60178802 0 6 BASE 365 LD R0 SP,GETRHIRG get the record gap word 0704C F210704E 0 366 JBF R0/FILTYPE/FILSFLAGB NOTEODGET jump if not special record 0704D F6167052 0 367 JBT R0/FILTYPE/FILEODB GETRECHRTN jump if EOD 368 * EODs are only one byte long 0000704E 369 NOTEODGET LABEL 0704E 60440001 1 IMM 370 LD R1 1 amount to advance 0704F DC00705B 371 CALL RFILEMOVE move over the just gotten character 07050 40007056 372 PARL GETRECHDDE error return 373 * \ / 07051 FB267044 4 374 JDR R4 NXTHDBYTE get next header byte 375 * \ / 376 377 * header has been picked up - return success 00007052 378 GETRECHRTN LABEL 07052 6013C000 0 7 REG 379 LD R0 R7 copy the return address 07053 DC403190 380 CALLNP SETERRW1 errors now go to caller 07054 60178802 0 6 BASE 381 LD R0 SP,GETRHIRG load the header 07055 19C40001 7 IMM 382 ADD R7 1 skip the error return 383 * A mass storage error - unravel me and return to error place 00007056 384 GETRECHDDE LABEL 07056 61178801 4 6 BASE 385 LD R4 SP,GETRECHDR4 restore R4 07057 5D1F8003 6 STAK 386 LEAVE POP return to caller 387 * --- 388 389 * execute table to place characters into FCB,IRGWORD 00007058 390 SLOWSTORET LABEL 07058 E409B082 0 6 ZBM 391 ST R0 SP,GETRHIRG/CH3 07059 E409A082 0 6 ZBM 392 ST R0 SP,GETRHIRG/CH2 0705A E4099082 0 6 ZBM 393 ST R0 SP,GETRHIRG/CH1 394 * --- 395 396 END GETRECHEAD subroutine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1557 (FRQRDSAF) F 92 FREQ - Read Processor (.SAF & .CDR) 398 399 ********************************************************************************** 400 * * 401 * RFILEMOVE * 402 * This subroutine will move forward the specified number * 403 * of characters in a sequential file. This routine is for * 404 * reading as no blocks will be added. Call: * 405 * LD SP * 406 * LD FCB < => file control block> * 407 * LD R1 * 408 * CALL RFILEMOVE * 409 * PARL * 410 * * 411 * If the number of characters to move is positive then the * 412 * current position moves forward. If negative, the CPP moves * 413 * backwards. Any new block moved into is mapped into window * 414 * 1, otherwise, the windows are not touched. * 415 * * 416 * Eats R0:R3 * 417 * Stack required = 10 * 418 * 3 + max ( GRUBWNDO1 (7), MAPOUTFBI (2), SETWNDO1 (4) ) * 419 * * 420 ********************************************************************************** 421 422 BLOCK RFILEMOVE subroutine 423 ENTRY RFILEMOVE 424 425 BEGFRAME 00178801 6 BASE 426 CHAR2MOVE BSS 1 characters to move 00178802 6 BASE 427 ERRJUMP BSS 1 save for error address 428 ENDFRAME 429 0705B DD1F8003 6 STAK 430 RFILEMOVE ENTR PUSH 0705C C0178802 6 BASE 431 STPL SP,ERRJUMP save the error address 0705D E4578801 1 6 BASE 432 ST R1 SP,CHAR2MOVE remember character count 433 * \ / 434 0000705E 435 MOVEMORE LABEL 0705E 60578801 1 6 BASE 436 LD R1 SP,CHAR2MOVE get character count for move 0705F 18574808 1 5 BASE 437 ADD R1 FCB,FCCPP calculate new position 07060 600A4140 0 1 CBM 438 LD R0 R1/BITS 0:19 get just the new block number 07061 10094148 0 5 ZBM 439 SUB R0 FCB,FCCBLK do we remain within the same data block? 07062 FA027087 0 440 JEQZ R0 MOVEDONE jump if so, an easy move 07063 DC003205 441 CALL SETWNDO1 get the current block in 07064 41440003 IMM 442 PARV VPCNTLLK+VPCNTLRO locked this time 07065 41534000 5 REG 443 PARV FCB indicate lun associated with block 07066 41007089 444 PAR DISKERROR error address 07067 41574801 5 BASE 445 PARV FCB,FCBLOCK indicate the MS address 07068 4044000C IMM 446 PARVL FBITSAF indicate FBI type 07069 5C178801 6 BASE 447 CMZ SP,CHAR2MOVE check direction of move 0706A FE08707E 448 JLT BACKFMOVE jump if moving backward 0706B 60489180 1 2 ZBM 449 LD R1 R2,FBIFLINK get the forward link 0706C DC40261B 450 CALLNP MAPOUTFBI unmap FBI, ION 0706D 60840000 2 IMM 451 LD R2 0 DEBUG safety, kill pointer 0706E FA42708A 1 452 JEQZ R1 DISKERROR1 disk error if zero ( no link ) 0706F E4495181 1 5 ZBM 453 ST R1 FCB,FCMSBLK place as new block 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1558 (FRQRDSAF) F 92 FREQ - Read Processor (.SAF & .CDR) 454 * \ / 455 07070 DC403150 456 CALLNP GRUBWNDO1 no further interest in old SAF block 07071 60041000 0 IMM 457 LD R0 CPP get characters per page 07072 100968C8 0 5 ZBM 458 SUB R0 FCB,FCCBYTE calculate bytes remaining in last 00007073 459 ACCTMOVE LABEL 07073 98174808 0 5 BASE 460 ADDM R0 FCB,FCCPP account for distance moved 07074 B0178801 0 6 BASE 461 RSBM R0 SP,CHAR2MOVE decrease the remaining count 07075 E1178802 4 6 BASE 462 EXCH R4 SP,ERRJUMP fetch up the error address 07076 DC003205 463 CALL SETWNDO1 set up this window 07077 41440001 IMM 464 PARV VPCNTLRO indicate read only 07078 41534000 5 REG 465 PARV FCB indicate lun associated with block 07079 41170800 4 BASE 466 PAR R4,0 pass error address 0707A 41574801 5 BASE 467 PARV FCB,FCBLOCK pass new MS address 0707B 4044000C IMM 468 PARVL FBITSAF indicate FBI type expected 0707C E1178802 4 6 BASE 469 EXCH R4 SP,ERRJUMP restore things 0707D FE0E705E 470 JMP MOVEMORE continue with move 471 * --- 472 473 * Moving backwards 474 0000707E 475 BACKFMOVE LABEL 0707E 60489182 1 2 ZBM 476 LD R1 R2,FBIBLINK get the link to the previous block 0707F DC40261B 477 CALLNP MAPOUTFBI unmap FBI, ION 07080 60840000 2 IMM 478 LD R2 0 DEBUG safety, kill pointer 07081 FA42708A 1 479 JEQZ R1 DISKERROR1 if zero, then bad file 07082 E4495181 1 5 ZBM 480 ST R1 FCB,FCMSBLK save as the new current block 07083 DC403150 481 CALLNP GRUBWNDO1 no further interest in old SAF block 07084 700968C8 0 5 ZBM 482 LDN R0 FCB,FCCBYTE get old position in block 07085 10040001 0 IMM 483 SUB R0 1 ensure one character after pointer in block 07086 FE0E7073 484 JMP ACCTMOVE go finish counter diddle 485 * --- 486 487 * move is complete - update new position pointer 00007087 488 MOVEDONE LABEL 07087 E4574808 1 5 BASE 489 ST R1 FCB,FCCPP set as new current position 07088 5D1F8003 6 STAK 490 LEAVE POP return 491 * --- 492 493 * mass storage error - return to the error address 00007089 494 DISKERROR LABEL 07089 DC40261B 495 CALLNP MAPOUTFBI unmap FBI, ION 0000708A 496 DISKERROR1 LABEL 0708A DC403150 497 CALLNP GRUBWNDO1 dump the window 0708B 61D78802 7 6 BASE 498 LD R7 SP,ERRJUMP place error address as return address 0708C 5D1F8003 6 STAK 499 LEAVE POP return 500 * --- 501 502 END RFILEMOVE subroutine 503 504 505 END SAF Read Routines 144 INPUT FRQRDRAF read from a RAF or CODE 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1559 (FRQRDRAF) F 93 FREQ - Read Processor (.RAF & .CODE) 3 4 RAFREADB BLOCK RAF Read Routines 5 6 ENTRY CODEREAD read from a CODE file 7 ENTRY RAFREAD read from a RAF 8 ENTRY RSEEK position RAF for read 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1560 (FRQRDRAF) F 93 FREQ - Read Processor (.RAF & .CODE) 10 11 ********************************************************************************** 12 * * 13 * Read from a RAF or CODE file. * 14 * LD R0 FRREAD get code for file read * 15 * LD R1 * 16 * LD R2 * 17 * FREQ * 18 * JLTZ R0 * 19 * ST R0 * 20 * ST R1 * 21 * * 22 * Stack required = 10 * 23 * 0 + max ( DMOTEWNDO1 (7), GRUBWNDO1 (7), RSEEK (10), * 24 * SETMEMTRAP (1), SETWNDO1 (4) ) * 25 * * 26 ********************************************************************************** 27 28 BLOCK RAFREAD and CODEREAD routine 29 ENTRY RAFREAD 30 ENTRY CODEREAD 31 0000708D 32 RAFREAD LABEL 0000708D 33 CODEREAD LABEL 0708D 5C178803 6 BASE 34 CMZ SP,BUFSIZ check for zero length read 0708E FE0270BA 35 JEQ RAFREADDN do nothing for nothing 0708F DC005BCF 36 CALL SETMEMTRAP catch protected memory 07090 400070C7 37 PARL USRMEMBAD 07091 DC0070CD 38 CALL RSEEK position the RAF 07092 410070C3 39 PAR RAFRDDERS 07093 40574808 5 BASE 40 PARVL FCB,FCCPP 00007094 41 RAFREADW LABEL 07094 FA0270A1 0 42 JEQZ R0 RAFREADH jump if we are reading from a hole 07095 DC003205 43 CALL SETWNDO1 get the data block in 07096 41440001 IMM 44 PARV VPCNTLRO with read only access 07097 41534000 5 REG 45 PARV FCB sez which lun associated with block 07098 410070C2 46 PAR RAFRDDERR 07099 41574801 5 BASE 47 PARV FCB,FCBLOCK 0709A 6004000F 0 IMM 48 LD R0 FBITRAFD get type for RAF data block 0709B 60496665 1 5 ZBM 49 LD R1 FCB,FCHTYPE get actual type of file 0709C 64440003 1 IMM 50 CPR R1 HTYPECODE is it a code file? 0709D FE0C709F 51 JNE RAFREADF jump if not 0709E 60040014 0 IMM 52 LD R0 FBITCODED if code, set proper FBI type 0000709F 53 RAFREADF LABEL 0709F 40520000 0 REG 54 PARVL R0 pass FBI type expected 070A0 60040001 0 IMM 55 LD R0 1 indicate not reading from a hole 000070A1 56 RAFREADH LABEL 070A1 60920000 2 0 REG 57 LD R2 R0 R2 = 0 if reading from a hole 070A2 704968C8 1 5 ZBM 58 LDN R1 FCB,FCCBYTE 070A3 18441000 1 IMM 59 ADD R1 CPP calculate bytes left in block 070A4 50578803 1 6 BASE 60 MIN R1 SP,BUFSIZ 070A5 E4578800 1 6 BASE 61 ST R1 SP,FCRTEMP save number of bytes moving 070A6 600968C8 0 5 ZBM 62 LD R0 FCB,FCCBYTE 070A7 600A3C00 0 0 CBM 63 LD R0 R0*FLDCHARS 070A8 18040800 0 IMM 64 ADD R0 ADR WNDO1 calc addr of first byte to move 070A9 5C095A10 5 ZBM 65 CMZ FCB,FCRELOC use the caller's storing reloc 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1561 (FRQRDRAF) F 93 FREQ - Read Processor (.RAF & .CODE) 070AA FE0C70AC 66 JNE RAFREADL jump if it stays the same 070AB 59840080 IMM 67 CLBMSR MSRSRELOC relocate to the user 000070AC 68 RAFREADL LABEL 070AC FA8270CA 2 69 JEQZ R2 RAFREADHM jump if dealing with a hole 070AD 60978802 2 6 BASE 70 LD R2 SP,COREADR get destination address 070AE FE400000 71 CMOVE move the chars 000070AF 72 RAFREADHD LABEL 070AF 59C40080 IMM 73 IORMSR MSRSRELOC restore monitor storing 070B0 E4978802 2 6 BASE 74 ST R2 SP,COREADR save new destination addr 070B1 60D78800 3 6 BASE 75 LD R3 SP,FCRTEMP get chars moved 070B2 B0D78803 3 6 BASE 76 RSBM R3 SP,BUFSIZ remove moved from requested 070B3 18D74808 3 5 BASE 77 ADD R3 FCB,FCCPP calculate new RAF position 070B4 DC0070CD 78 CALL RSEEK reposition the RAF 070B5 410070C2 79 PAR RAFRDDERR 070B6 4052C000 3 REG 80 PARVL R3 070B7 5C178803 6 BASE 81 CMZ SP,BUFSIZ any more room to move to? 070B8 FE047094 82 JGT RAFREADW jump if more to do 070B9 DC40315C 83 CALLNP DMOTEWNDO1 make sure this gets released 000070BA 84 RAFREADDN LABEL 070BA 61000412 4 85 LD R4 CPPSA get current PSA pointer 070BB 61091F11 4 4 ZBM 86 LD R4 R4,PSCACHNP1 => user registers 070BC EC170803 4 BASE 87 STZ R4,CAR1 indicate whole buffer read 070BD EC094445 5 ZBM 88 STZ FCB,FCLASTREAD no special record type read 070BE 6004000D 0 IMM 89 LD R0 CR get a carriage return 070BF E4170804 0 4 BASE 90 ST R0 R4,CAR2 return terminator in users R2 070C0 EC094C15 5 ZBM 91 STZ FCB,FCLOADPT indicate file not at load point 070C1 FE0E5982 92 JMP FNOERROR indicate success 93 * --- 94 95 ********************************************************************************** 96 * * 97 * A disk error in referencing the RAF. Say the resident * 98 * pointers aren't good and return the error to the user. * 99 * * 100 ********************************************************************************** 101 000070C2 102 RAFRDDERR LABEL 070C2 DC403150 103 CALLNP GRUBWNDO1 dump file page 000070C3 104 RAFRDDERS LABEL 070C3 EDC95C16 5 ZBM 105 STW FCB,FCRESEEK in-core pointers bad 070C4 60C4000B 3 IMM 106 LD R3 FILAEOD load appropriate status bit 070C5 E4C94445 3 5 ZBM 107 ST R3 FCB,FCLASTREAD file goes abnormal 070C6 FE0E59AA 108 JMP FERRORFAU 109 * --- 110 111 * Bad user memory -- probably protect violation 000070C7 112 USRMEMBAD LABEL 070C7 DC403150 113 CALLNP GRUBWNDO1 dump file page 070C8 EDC95C16 5 ZBM 114 STW FCB,FCRESEEK saf disk pointers bad 070C9 FE0E5B5F 115 JMP PASSERRUP give error to program controller 116 * --- 117 118 ********************************************************************************** 119 * * 120 * The user is reading from a hole in the RAF -- give him zeros. * 121 * We might consider returning a status saying the read came from a hole. * 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1562 (FRQRDRAF) F 93 FREQ - Read Processor (.RAF & .CODE) 122 * * 123 ********************************************************************************** 124 000070CA 125 RAFREADHM LABEL 070CA 60978802 2 6 BASE 126 LD R2 SP,COREADR get destination address 070CB FE580000 127 CFILL 0 fake like reading zeros 070CC FE0E70AF 128 JMP RAFREADHD 129 * --- 130 131 END RAFREAD and CODEREAD routine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1563 (FRQRDRAF) F 93 FREQ - Read Processor (.RAF & .CODE) 133 134 ********************************************************************************** 135 * * 136 * Routine to position a RAF or CODE file for reading. * 137 * * 138 * SP => return address stack * 139 * LD FCB * 140 * CALL RSEEK do a raf seek for read * 141 * PAR * 142 * PARL * 143 * returns with: FCB,FCMSBLK = block number being read from * 144 * R0 = 0 if no data block ( RAF hole ) * 145 * Eats R0:R3. Uses window 1. * 146 * Stack required = 10 * 147 * 3 + max ( DMOTEWNDO1 (7), GRUBWNDO1 (7), RAFCURCHEK (1), * 148 * SETWNDO1 (4) ) * 149 * * 150 ********************************************************************************** 151 152 BLOCK RSEEK subroutine 153 ENTRY RSEEK 154 155 BEGFRAME 00178801 6 BASE 156 RSEEKT BSS 1 stack temporary to hold new seek address 00178802 6 BASE 157 RSEEKERR BSS 1 save location for error code 158 ENDFRAME 159 070CD DD1F8003 6 STAK 160 RSEEK ENTR PUSH 070CE C1178802 6 BASE 161 STP SP,RSEEKERR save the error address 070CF C0578801 6 BASE 162 STPVL SP,RSEEKT save new seek address 070D0 DC406CDF 163 CALLNP RAFCURCHEK make sure the RAF is current 070D1 60178801 0 6 BASE 164 LD R0 SP,RSEEKT get the seek address 070D2 60495826 1 5 ZBM 165 LD R1 FCB,FCRAFTYPE and the RAF type 070D3 5CA270D4 1 166 LDPC RSEEKRAFT(R1) act on the type 167 * --- 168 000070D4 169 RSEEKRAFT LABEL 070D4 000070DA 170 VFD ADR RSEEKHOLE empty RAF 070D5 000070D8 171 VFD ADR RSEEKTINY tiny RAF 070D6 000070DE 172 VFD ADR HAVESRAF small RAF 070D7 000070E0 173 VFD ADR RSEEKLG large RAF 174 175 * The RAF is a tiny one. If the seek position is not on data page 0 176 * then the seek destination is a hole. 000070D8 177 RSEEKTINY LABEL 070D8 68041000 0 IMM 178 UCPR R0 CPP is the seek position within the data page? 070D9 FE087103 179 JLT RSEEKDATA if so then we have it 000070DA 180 RSEEKHOLE LABEL 070DA E4174808 0 5 BASE 181 ST R0 FCB,FCCPP set new seek addr as current position 070DB 60040000 0 IMM 182 LD R0 0 indicate a hole 070DC EDC95C16 5 ZBM 183 STW FCB,FCRESEEK indicate in core pointers are not current 070DD FE0E7107 184 JMP RSEEKEXIT we have a hole 185 * --- 186 000070DE 187 HAVESRAF LABEL 070DE 68002550 0 188 UCPR R0 MAXSRAF is the new address off end? 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1564 (FRQRDRAF) F 93 FREQ - Read Processor (.RAF & .CODE) 070DF FE047108 189 JGT RSEEKOFSM jump if off end of small raf - return zero 000070E0 190 RSEEKLG LABEL 070E0 5C095C16 5 ZBM 191 CMZ FCB,FCRESEEK must we go to disk? 070E1 FE0C70E5 192 JNE RSEEKMAJOR jump if resident data not available 070E2 600A00A0 0 0 CBM 193 LD R0 R0/RAFMAJINDX 070E3 640940A8 0 5 ZBM 194 CPR R0 FCB,FCCPP/RAFMAJINDX is new address within current minor ab? 070E4 FE02710A 195 JEQ RSEEKINMA jump if yes 000070E5 196 RSEEKMAJOR LABEL 070E5 60096183 0 5 ZBM 197 LD R0 FCB,FCMABLK load address of major access block 070E6 FA0270F1 0 198 JEQZ R0 RSEEKMINOR jump if a small raf 070E7 E4095181 0 5 ZBM 199 ST R0 FCB,FCMSBLK 070E8 DC003205 200 CALL SETWNDO1 map in the major access block 070E9 41440001 IMM 201 PARV VPCNTLRO set the control for read only 070EA 41534000 5 REG 202 PARV FCB sez which lun associated with block 070EB 41007119 203 PAR RSEEKDERR pass an error address 070EC 41574801 5 BASE 204 PARV FCB,FCBLOCK pass the desired block address 070ED 4044000D IMM 205 PARVL FBITLRAF indicate the FBI type required 070EE 600980A1 0 6 ZBM 206 LD R0 SP,RSEEKT/RAFMAJINDX 070EF 60200800 0 0 207 LD R0 WNDO1(R0) get the pointer to the minor AB 070F0 E4097182 0 5 ZBM 208 ST R0 FCB,FCLPBLK save as new minor AB 000070F1 209 RSEEKMINOR LABEL 070F1 60097182 0 5 ZBM 210 LD R0 FCB,FCLPBLK 070F2 E4095181 0 5 ZBM 211 ST R0 FCB,FCMSBLK 070F3 FA027102 0 212 JEQZ R0 RSEEKZMIN jump if minor AB in a hole 070F4 DC003205 213 CALL SETWNDO1 make the minor AB resident 070F5 41440001 IMM 214 PARV VPCNTLRO set the control for read only 070F6 41534000 5 REG 215 PARV FCB sez which lun associated with block 070F7 41007119 216 PAR RSEEKDERR pass an error address 070F8 41574801 5 BASE 217 PARV FCB,FCBLOCK pass the desired block address 070F9 6004000E 0 IMM 218 LD R0 FBITSRAF a small raf block 070FA 60496665 1 5 ZBM 219 LD R1 FCB,FCHTYPE is this a CODE file? 070FB 64440003 1 IMM 220 CPR R1 HTYPECODE 070FC FE0C70FE 221 JNE RSEEKLG2 jump if not 070FD 60040013 0 IMM 222 LD R0 FBITCCB CODE file access code 000070FE 223 RSEEKLG2 LABEL 070FE 40520000 0 REG 224 PARVL R0 pass the expected FBI type 225 * \ / 070FF 600994A1 0 6 ZBM 226 LD R0 SP,RSEEKT/RAFMININDX get index into minor AB 07100 60200800 0 0 227 LD R0 WNDO1(R0) get the pointer to the data block 07101 E4095181 0 5 ZBM 228 ST R0 FCB,FCMSBLK 00007102 229 RSEEKZDAT LABEL 07102 DC40315C 230 CALLNP DMOTEWNDO1 free up the window 00007103 231 RSEEKDATA LABEL 07103 60178801 0 6 BASE 232 LD R0 SP,RSEEKT 07104 E4174808 0 5 BASE 233 ST R0 FCB,FCCPP set new seek addr as current position 07105 60095181 0 5 ZBM 234 LD R0 FCB,FCMSBLK return zero if hole is here 07106 EC095C16 5 ZBM 235 STZ FCB,FCRESEEK indicate that resident pointers are up to date 00007107 236 RSEEKEXIT LABEL 07107 5D1F8003 6 STAK 237 LEAVE POP return to caller 238 * --- 239 240 * reading off the end of a small RAF - say no data here 00007108 241 RSEEKOFSM LABEL 07108 EC095181 5 ZBM 242 STZ FCB,FCMSBLK data block in a hole 07109 FE0E7103 243 JMP RSEEKDATA 244 * --- 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1565 (FRQRDRAF) F 93 FREQ - Read Processor (.RAF & .CODE) 245 246 * pointer is within current minor access block - see if 247 * data is within current data block thus saving all of the 248 * look up. 0000710A 249 RSEEKINMA LABEL 0710A 600994A1 0 6 ZBM 250 LD R0 SP,RSEEKT/RAFMININDX 0710B 640954A8 0 5 ZBM 251 CPR R0 FCB,FCCPP/RAFMININDX data within current data block? 0710C FE027113 252 JEQ RSEEKINDA jump if to use current data block 0000710D 253 RSEEKZINMA LABEL 0710D 5C097182 5 ZBM 254 CMZ FCB,FCLPBLK is the known minor block a hole? 0710E FE0C70F1 255 JNE RSEEKMINOR jump if not 0710F 60040004 0 IMM 256 LD R0 FSACSMW if so, - if multiple write file we . . . 07110 64095835 0 5 ZBM 257 CPR R0 FCB,FCACCESS ...should check to see if the contents... 07111 FE0270E5 258 JEQ RSEEKMAJOR ...appeared in the hole 07112 FE0E70F1 259 JMP RSEEKMINOR 260 * --- 261 00007113 262 RSEEKINDA LABEL 07113 5C095181 5 ZBM 263 CMZ FCB,FCMSBLK 07114 FE0C7103 264 JNE RSEEKDATA jump if not a hole 07115 60040004 0 IMM 265 LD R0 FSACSMW is the access multiple write? 07116 64095835 0 5 ZBM 266 CPR R0 FCB,FCACCESS if it is, look through minor again to... 07117 FE02710D 267 JEQ RSEEKZINMA ...see if the hole has been filled 07118 FE0E7103 268 JMP RSEEKDATA 269 * --- 270 271 * zero pointer to minor AB - all data therein is zeros 00007102 272 RSEEKZMIN EQU RSEEKZDAT 273 274 * disk error traipsing through the RAF access blocks 00007119 275 RSEEKDERR LABEL 07119 DC403150 276 CALLNP GRUBWNDO1 0711A EDC95C16 5 ZBM 277 STW FCB,FCRESEEK indicate resident pointers bad 0711B EC095181 5 ZBM 278 STZ FCB,FCMSBLK no data is any good 0711C 61D78802 7 6 BASE 279 LD R7 SP,RSEEKERR fetch up the error address 0711D 5D1F8003 6 STAK 280 LEAVE POP and return thereto 281 * --- 282 283 END RSEEK subroutine 284 285 286 END RAFREADB RAF Read Routines 145 INPUT FRQRDPATH read from a PATH 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1566 (FRQRDPATH) F 94 Read Processor (.PATH) 3 4 ********************************************************************************** 5 * * 6 * Routine to read a record from a .PATH. We check for data in * 7 * the path and if none there we attempt to release any waiting * 8 * writers. If no writers exists we check to see if they ever * 9 * existed, if not we suspend waiting for them, if so we return an * 10 * an end of data. * 11 * * 12 * Stack required = 5 * 13 * 0 + max ( CHKPTHREC (5), DQUEONE (4), LOCKWAIT (0), * 14 * SETMEMTRAP (1), SFREEMEM (0), ULINKPTHR (1) ) * 15 * * 16 ********************************************************************************** 17 18 BLOCK PATHREAD routine 19 ENTRY PATHREAD 20 0000711E 21 PATHREAD LABEL 0711E 60095835 0 5 ZBM 22 LD R0 FCB,FCACCESS am I a reader or writer? 0711F F23E59A5 0 23 JBF R0/FSACSNWB FERRORILOP if writer, error! 24 * \ / 25 26 ********************************************************************************** 27 * * 28 * Here we check if there is anything for us to read. If not we * 29 * must wait for a writer. If there is something for us to read * 30 * we set up to catch user errors and attempt the read. Note that * 31 * if the users read length is less than the record length the user * 32 * will get only part of the record. * 33 * * 34 ********************************************************************************** 35 07120 61C00412 7 36 LD R7 CPPSA pointer to the process status area 07121 61C9DF11 7 7 ZBM 37 LD R7 R7,PSCACHNP1 permanent user console area pointer 07122 61095F16 4 5 ZBM 38 LD R4 FCB,FCDCBPTR get the pointer to the control block 07123 DC005BCF 39 CALL SETMEMTRAP catch user memory errors 07124 4000714E 40 PARL UMEMBAD error processing address 41 * \ / 42 00007125 43 READMORE LABEL 07125 DC40714F 44 CALLNP CHKPTHREC check if any path elements 07126 FE0E5983 45 JMP FERROR possible error or writers gone 46 * \ / PTHLOCK locked, R3 = message element 07127 6008C271 0 3 ZBM 47 LD R0 R3,PTHERTYPE get the record type 07128 64040008 0 IMM 48 CPR R0 FILEOF is it a filemark? 07129 FE02713A 49 JEQ PATHEOF if so, jump to process a filemark 50 PUNLOCK R4,PTHLOCK release access to the control block 0712A EC170807 4 BASE 50 STZ R4,PTHLOCK 0712B 0C800000 50 ION 0712C 6048C0B0 1 3 ZBM 51 LD R1 R3,PTHENCHARS number of characters in this record 0712D 5057C803 1 7 BASE 52 MIN R1 R7,CAR1 this is how much we should read 0712E FA4A7136 1 53 JLEZ R1 SKIPCMOVE jump if nothing to read 0712F 3816C005 0 3 CACH 54 LEA R0 R3,PTHECHARS source address 07130 6097C804 2 7 BASE 55 LD R2 R7,CAR2 destination address 07131 5C095A10 5 ZBM 56 CMZ FCB,FCRELOC user or monitor address space 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1567 (FRQRDPATH) F 94 Read Processor (.PATH) 07132 FE0C7134 57 JNE MONTANA jump if monitor relocation desired 07133 59840080 IMM 58 CLBMSR MSRSRELOC change relocation to user address space 59 * \ / 60 00007134 61 MONTANA LABEL 07134 FE400000 62 CMOVE move the message 07135 59C40080 IMM 63 IORMSR MSRSRELOC restore monitor store relocation 64 * \ / 65 66 ********************************************************************************** 67 * * 68 * We come here if the move was successful, no memory protect * 69 * violations etc. We unlink the message and update the users * 70 * registers. Note that we leave the message on the .PATH * 71 * until after the move, this makes error recovery much easier. * 72 * * 73 ********************************************************************************** 74 75 * \ / 00007136 76 SKIPCMOVE LABEL 77 PLOCK R4,PTHLOCK get exclusive access to the .PATH 07136 0CC00000 77 IOFF 07137 D1D70807 4 BASE 77 SETT R4,PTHLOCK 07138 FE0C713A 77 JNE MA(2+DISPW MA 0) 07139 DC40308B 77 CALLNP LOCKWAIT 78 * \ / 79 0000713A 80 PATHEOF LABEL 81 * PTHLOCK locked, R3<=message element, R4<=.PATH control block, R7<=CA 0713A DC407179 82 CALLNP ULINKPTHR unlink the first path message 83 PUNLOCK R4,PTHLOCK release access to the .PATH 0713B EC170807 4 BASE 83 STZ R4,PTHLOCK 0713C 0C800000 83 ION 0713D 6008C0B0 0 3 ZBM 84 LD R0 R3,PTHENCHARS count of characters in the block 0713E B017C803 0 7 BASE 85 RSBM R0 R7,CAR1 remove length of record from buffer 0713F 5C08C011 3 ZBM 86 CMZ R3,PTHECONTN check for a continuation block 07140 DC002F5D 87 CALL SFREEMEM return the message block 07141 4148D640 3 ZBM 88 PARV R3,PTHELOGL log 2 of the block size 07142 4052C000 3 REG 89 PARVL R3 address of the block 07143 FE027146 90 JEQ PTHRDONE not continuous record, return to the caller 91 * this condition is set from the CMZ above 92 * \ / 93 94 ********************************************************************************** 95 * * 96 * The record we are reading is larger than the system will * 97 * allow in memory at one time. We just keep reading messages * 98 * until we have read the whole record, indicated by PTHECONTN * 99 * set to zero. * 100 * * 101 ********************************************************************************** 102 103 * \ / 07144 E497C804 2 7 BASE 104 ST R2 R7,CAR2 address to place the next message 07145 FE0E7125 105 JMP READMORE back to read more if possible 106 * --- 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1568 (FRQRDPATH) F 94 Read Processor (.PATH) 107 00007146 108 PTHRDONE LABEL 07146 6084000D 2 IMM 109 LD R2 CR get the terminate character 07147 E497C804 2 7 BASE 110 ST R2 R7,CAR2 give back to the user 07148 DC00354F 111 CALL DQUEONE release any waiting writers 07149 41001DB2 112 PAR SQPATHWAIT waiting in this queue 0714A 60130000 0 4 REG 113 LD R0 R4 get address of .PATH 0714B 7C030000 0 IMM 114 IOR R0 080000000 indicate we want writers 0714C 40520000 0 REG 115 PARVL R0 and pass the parameter 0714D FE0E5982 116 JMP FNOERROR return to caller 117 * --- 118 119 ********************************************************************************** 120 * * 121 * Error from referencing the user's memory (most likely memory * 122 * protect violation). Return the error to the program controller. * 123 * * 124 ********************************************************************************** 125 0000714E 126 UMEMBAD LABEL 0714E FE0E5B5F 127 JMP PASSERRUP 128 * --- 129 130 END PATHREAD routine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1569 (FRQRDPATH) F 94 Read Processor (.PATH) 132 133 ********************************************************************************** 134 * * 135 * CHKPTHREC. This routine checks if a message is on the * 136 * path. If one is found we return while still holding the * 137 * .PATH lock. Note that this routine is capable of suspending * 138 * itself if we are unable to perform a read. If all the writers * 139 * disappear we set EOD on the .PATH, it is up to the caller to * 140 * check for this status. The non-skip return does NOT leave the * 141 * .PATH locked, the skip return DOES. Call: * 142 * * 143 * FCB <= file control block (.PATH) * 144 * R4 <= .PATH control block * 145 * CALLNP CHKPTHREC * 146 * JMP * 147 * ST R3 * 148 * * 149 * Eats R0:R1 * 150 * Sets R3 * 151 * Stack required = 5 * 152 * 1 + max ( DQUEONE (4), LOCKWAIT (0), SUSPENDFRQ (1) ) * 153 * * 154 ********************************************************************************** 155 156 BLOCK CHKPTHREC routine 157 ENTRY CHKPTHREC 158 159 BEGFRAME 160 ENDFRAME 161 0714F DD5F8001 6 STAK 162 CHKPTHREC ENTRNP PUSH 163 PLOCK R4,PTHLOCK gain exclusive access to the .PATH 07150 0CC00000 163 IOFF 07151 D1D70807 4 BASE 163 SETT R4,PTHLOCK 07152 FE0C7154 163 JNE MA(2+DISPW MA 0) 07153 DC40308B 163 CALLNP LOCKWAIT 07154 60C91F11 3 4 ZBM 164 LD R3 R4,PTHQUE get an element from the .PATH 07155 FAF07158 3 165 JZA R3 NODATA jump if the .PATH is empty 07156 D013C000 7 REG 166 INC R7 advance the return address 167 * \ / 168 00007157 169 CHKPTHXIT LABEL 07157 5D1F8001 6 STAK 170 LEAVE POP leave this routine 171 * --- 172 173 ********************************************************************************** 174 * * 175 * There is no data in the path so we must decide whether to * 176 * suspend, return EOD if all the writer have gone away, or return * 177 * an error if the caller does not want to suspend. * 178 * * 179 ********************************************************************************** 180 00007158 181 NODATA LABEL 07158 5C170806 4 BASE 182 CMZ R4,PTHWRTRS are there any writers left? 07159 FE0C7164 183 JNE CHECKWAIT if so we wait for them 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1570 (FRQRDPATH) F 94 Read Processor (.PATH) 0715A 5C090211 4 ZBM 184 CMZ R4,PTHUSED has this path ever been hooked up? 0715B FE0C716A 185 JNE WRTRGONE if so the writers have disappeared 186 * \ / 187 0000715C 188 WAIT4MES LABEL 0715C DC003541 189 CALL SUSPENDFRQ let the caller wait 0715D 41530000 4 REG 190 PARV R4 pass shutdown parameter 0715E 41001DB2 191 PAR SQPATHWAIT queue to suspend in 0715F 40170807 4 BASE 192 PARL R4,PTHLOCK lock field 193 * \ / returns iff requester said no suspension 194 195 PUNLOCK R4,PTHLOCK release the control block 07160 EC170807 4 BASE 195 STZ R4,PTHLOCK 07161 0C800000 195 ION 07162 600400AD 0 IMM 196 LD R0 XREQERSUSP he doesn't want to suspend 07163 FE0E7157 197 JMP CHKPTHXIT exit, .PATH unlocked 198 * --- 199 200 ********************************************************************************** 201 * * 202 * Release a waiting writer of this PATH and jump to * 203 * suspend. * 204 * * 205 ********************************************************************************** 206 00007164 207 CHECKWAIT LABEL 07164 DC00354F 208 CALL DQUEONE set .PATH writer going 07165 41001DB2 209 PAR SQPATHWAIT 07166 60130000 0 4 REG 210 LD R0 R4 copy the path control block address 07167 7C030000 0 IMM 211 IOR R0 080000000 look for a waiting writer 07168 40520000 0 REG 212 PARVL R0 07169 FE0E715C 213 JMP WAIT4MES jump to suspend 214 * --- 215 216 ********************************************************************************** 217 * * 218 * The writers are gone, return an end of data. Give * 219 *error if user saw this on preceding read also. * 220 * * 221 ********************************************************************************** 222 0000716A 223 WRTRGONE LABEL 224 PUNLOCK R4,PTHLOCK release the control block 0716A EC170807 4 BASE 224 STZ R4,PTHLOCK 0716B 0C800000 224 ION 0716C 60494445 1 5 ZBM 225 LD R1 FCB,FCLASTREAD check the last record read 0716D F2787170 1 226 JBF R1/FILSFLAGB NOTPTHEODR not a special system record 0716E 600400A4 0 IMM 227 LD R0 XREQERREOD prepare error code 0716F F67E7157 1 228 JBT R1/FILEODB CHKPTHXIT EOD has been read twice, return error 00007170 229 NOTPTHEODR LABEL 07170 60040009 0 IMM 230 LD R0 FILNEOD normal end of data 07171 E4094445 0 5 ZBM 231 ST R0 FCB,FCLASTREAD return the end of data 07172 EDC94C15 5 ZBM 232 STW FCB,FCLOADPT indicate file is at load point 07173 60000412 0 233 LD R0 CPPSA current process status are 07174 60081F11 0 0 ZBM 234 LD R0 R0,PSCACHNP1 console area 07175 6044000D 1 IMM 235 LD R1 CR get terminator, carriage return 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1571 (FRQRDPATH) F 94 Read Processor (.PATH) 07176 E4560804 1 0 BASE 236 ST R1 R0,CAR2 return terminator to user 07177 60040000 0 IMM 237 LD R0 0 indicate no error 07178 FE0E7157 238 JMP CHKPTHXIT leave this routine 239 * --- 240 241 END CHKPTHREC routine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1572 (FRQRDPATH) F 94 Read Processor (.PATH) 243 244 ********************************************************************************** 245 * * 246 * ULINKPTHR. This routine simply unlinks the message * 247 * from the .PATH and updates the amount of resident storage * 248 * the .PATH is using, along with a few dynamic file goodies. * 249 * Call: * 250 * * 251 * FCB <= file control block (.PATH) * 252 * R4 <= .PATH control block * 253 * R3 <= .PATH element to unlink * 254 * PTHLOCK <= locked!!! * 255 * CALLNP ULINKPTHR * 256 * * 257 * Eats R0 * 258 * Stack required = 1 * 259 * * 260 ********************************************************************************** 261 262 BLOCK ULINKPTHR routine 263 ENTRY ULINKPTHR 264 265 BEGFRAME 266 ENDFRAME 267 07179 DD5F8001 6 STAK 268 ULINKPTHR ENTRNP PUSH 0717A 6008C271 0 3 ZBM 269 LD R0 R3,PTHERTYPE get the record type 0717B E4094445 0 5 ZBM 270 ST R0 FCB,FCLASTREAD update FCB last record type 0717C 6008DF10 0 3 ZBM 271 LD R0 R3,PTHLINK get next element in the list 0717D E4091F11 0 4 ZBM 272 ST R0 R4,PTHQUE that should do it 0717E 5C120000 0 REG 273 CMZ R0 are there any more messages 0717F EC494C15 5 ZBM 274 STLEQ FCB,FCLOADPT set load point appropriately 07180 6008D640 0 3 ZBM 275 LD R0 R3,PTHELOGL log base 2 of the block size 07181 6020255E 0 0 276 LD R0 BITTAB(R0) actual length in characters 07182 980908B1 0 4 ZBM 277 ADDM R0 R4,PTHSIZE return the space used 07183 5D1F8001 6 STAK 278 LEAVE POP return to the caller 279 * --- 280 281 END ULINKPTHR subroutine 146 INPUT FRQRDDIR read from a directory 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1573 (FRQRDDIR) F 95 FREQ - Read Processor (.DIR) 3 4 BLOCK DIR Read Routines 5 6 ENTRY DIRENTWIDE size of directory entry output 7 ENTRY DIRHWIDE size of directory header output 8 ENTRY DIRINFOHD Routine to place directory header info 9 ENTRY DIRINFOP Routine to place directory entry 10 ENTRY DIRREAD to read from a directory 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1574 (FRQRDDIR) F 95 FREQ - Read Processor (.DIR) 12 13 ********************************************************************************** 14 * * 15 * A read from the device .DIR will copy into the user's * 16 * memory information about the directory that the .DIR is * 17 * associated with. The first thing placed in the user's * 18 * buffer is a header giving information about the account * 19 * and that is followed by as many entries for the files as * 20 * will fit in the buffer. The header only occurs when the * 21 * .DIR is at load point (after a REWIND or initial equip). * 22 * In theory, only those entries that the reader is allowed * 23 * to look at (from shared list) are copied so no security * 24 * is given up. * 25 * LD R0 FRREAD get code for file read * 26 * LD R1 * 27 * LD R2 * 28 * FREQ * 29 * JLTZ R0 * 30 * ST R0 * 31 * ST R1 * 32 * * 33 * If the record read is longer than the given buffer, as much * 34 * of the record as will fit into the buffer is copied and the * 35 * remainder is lost. The overflow can be detected by the negative * 36 * "buffer remaining count" in R1. * 37 * Stack required = 11 * 38 * 0 + max ( DIRINFOHD (1), DIRINFOP (1), DMOTEWNDOx (7), * 39 * FREEDIR (5), GRUBWNDOx (7), SETMEMTRAP (1), * 40 * SETWNDO1 (4), SRCHDIR (11), ULKWNDO1 (1) ) * 41 * * 42 ********************************************************************************** 43 44 BLOCK DIRREAD routine 45 ENTRY DIRREAD 46 00007184 47 DIRREAD LABEL 07184 60000414 0 48 LD R0 CPCUPC get the current UPC pointer 07185 604A5F10 1 1 CBM 49 LD R1 R1/FLDADRS restrict buffer address to word boundaries 07186 E4578802 1 6 BASE 50 ST R1 SP,COREADR save back in the control block 07187 60D24000 3 1 REG 51 LD R3 R1 R3 => store area 07188 61095114 4 5 ZBM 52 LD ULB FCB,FCLIMITPTR get pointer to the directory being examined 07189 FB30718E 4 53 JZA ULB NORESTR skip if directory is fake 0718A 5C090616 4 ZBM 54 CMZ ULB,ULRSTRG2 does this account restrict catalog reading? 0718B FE02718E 55 JEQ NORESTR no, go ahead and read 0718C 5C081A10 0 ZBM 56 CMZ R0,UPRSTCTG2 does process have an override? 0718D FE0C59C8 57 JNE FERRORPNS no, can't help him 0000718E 58 NORESTR LABEL 0718E 5C094C15 5 ZBM 59 CMZ FCB,FCLOADPT are we at the beginning? 0718F FE02719B 60 JEQ NOHEADR jump if not, no dir info header 61 * \ / 62 63 ********************************************************************************** 64 * * 65 * The directory reader is at load point. In this case, * 66 * we place a header explaining the account into the read data. * 67 * * 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1575 (FRQRDDIR) F 95 FREQ - Read Processor (.DIR) 68 ********************************************************************************** 69 70 * \ / 07190 DC005BCF 71 CALL SETMEMTRAP catch protected memory 07191 40005B5F 72 PARL PASSERRUP just pass error to over process 07192 60040020 0 IMM 73 LD R0 DIRHWIDE*CPW get the header size 07193 64178803 0 6 BASE 74 CPR R0 SP,BUFSIZ is there room for the header? 07194 FE0471C1 75 JGT NOMOREX jump if not, reads make no progress 07195 DC4071E4 76 CALLNP DIRINFOHD read the dir header 07196 98178802 0 6 BASE 77 ADDM R0 SP,COREADR advance the buffer address 07197 B00981E3 0 6 ZBM 78 RSBM R0 SP,BUFSIZ/BITS 0:29 and decrease the remaining count 07198 FB3071C1 4 79 JZA ULB NOMOREX if no account, then no directory 07199 EE17480B 5 BASE 80 STZ2 FCB,FCNAME clear out the name for initial start 0719A EC17480D 5 BASE 81 STZ FCB,FCNAMEEXT same with the extension 82 * \ / 83 84 ********************************************************************************** 85 * * 86 * We look up the directory and position ourself in it * 87 * by searching for the most recently processed name (zero * 88 * if at load point). * 89 * * 90 ********************************************************************************** 91 92 * \ / 0000719B 93 NOHEADR LABEL 0719B FB3071C1 4 94 JZA ULB NOMOREX if no account, then no directory 0719C DC005BCF 95 CALL SETMEMTRAP catch protected memory 0719D 400071D2 96 PARL USRMEMBAD need to unlock the directory 0719E DC0082BF 97 CALL SRCHDIR look for our entry 0719F 40005983 98 PARL FERROR address for MS error 071A0 E4978800 2 6 BASE 99 ST R2 SP,DIRMINDX save index to major block 071A1 DC403276 100 CALLNP ULKWNDO1 release this window for swapping 071A2 FE0C71A4 101 JNE CHECKROOM jump if the named entry not found 102 * \ / 103 000071A3 104 MOVE2NEXT LABEL 071A3 18C40018 3 IMM 105 ADD R3 FDLNTH advance over the last used entry 106 * \ / 107 000071A4 108 CHECKROOM LABEL 071A4 60040044 0 IMM 109 LD R0 DIRENTWIDE*CPW get the length of one entry 071A5 64178803 0 6 BASE 110 CPR R0 SP,BUFSIZ room for another entry? 071A6 FE0471BE 111 JGT NOMORE jump if not 112 * \ / 113 000071A7 114 ENDYET LABEL 071A7 64C40BE8 3 IMM 115 CPR R3 ADR WNDO1(UDLFDE) are we at the end of the dir block 071A8 FE0471AB 116 JGT BLKEMPTY jump if no more entries here 071A9 5C16C800 3 BASE 117 CMZ R3,0 is there another entry here? 071AA FE0C71D7 118 JNE COPYENTRY jump if so, process it 119 * \ / 120 000071AB 121 BLKEMPTY LABEL 071AB 5C090410 4 ZBM 122 CMZ ULB,ULRAFDIR is this a two level directory 071AC FE0271BE 123 JEQ NOMORE jump if not, we're done 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1576 (FRQRDDIR) F 95 FREQ - Read Processor (.DIR) 071AD 60978800 2 6 BASE 124 LD R2 SP,DIRMINDX get index into major access block 071AE 18840005 2 IMM 125 ADD R2 UDINDXLEN move over the current minor block pointr 071AF 64840FF8 2 IMM 126 CPR R2 ADR WNDO2(UD1LINDX) more entries to examine? 071B0 FE0471BE 127 JGT NOMORE jump if not, done 071B1 5C168800 2 BASE 128 CMZ R2,0 another secondary block? 071B2 FE0271BE 129 JEQ NOMORE jump if not, done 071B3 E4978800 2 6 BASE 130 ST R2 SP,DIRMINDX save major index 071B4 60089183 0 2 ZBM 131 LD R0 R2,UDINDXADR get the secondary block address 071B5 E4095181 0 5 ZBM 132 ST R0 FCB,FCMSBLK pointer to new directory block 071B6 DC003205 133 CALL SETWNDO1 get in the next block 071B7 41440001 IMM 134 PARV VPCNTLRO indicate access requested 071B8 41534000 5 REG 135 PARV FCB indicate what lun associated here 071B9 410071CE 136 PAR DIRDIRBAD error address 071BA 41574801 5 BASE 137 PARV FCB,FCBLOCK the block to map in 071BB 4044000A IMM 138 PARVL FBITUDIR2 the type that we expect 071BC 60C40800 3 IMM 139 LD R3 ADR WNDO1 search from the beginning 071BD FE0E71A7 140 JMP ENDYET try for an entry 141 * --- 142 143 ********************************************************************************** 144 * * 145 * There are no more directory entries so we update the * 146 * users registers and return our successful information. * 147 * * 148 ********************************************************************************** 149 000071BE 150 NOMORE LABEL 071BE DC405685 151 CALLNP FREEDIR let go of the directory 071BF DC40315C 152 CALLNP DMOTEWNDO1 clear directory page from window 071C0 DC40315F 153 CALLNP DMOTEWNDO2 clear directory page from window (only present if large dir) 154 * \ / 155 000071C1 156 NOMOREX LABEL 071C1 61000412 4 157 LD R4 CPPSA get the current PSA pointer 071C2 61091F11 4 4 ZBM 158 LD R4 R4,PSCACHNP1 get pointer to callers registers 071C3 60178803 0 6 BASE 159 LD R0 SP,BUFSIZ get remaining count in buffer 071C4 60840002 2 IMM 160 LD R2 RTYPEBIN get type for binary record 071C5 64091B33 0 4 ZBM 161 CPR R0 R4,CAR1/BITS 13:31 was anything moved? 071C6 FE0C71C8 162 JNE MOVESOME jump if there is data 071C7 60840009 2 IMM 163 LD R2 FILNEOD if no data, end of data status 164 * \ / 165 000071C8 166 MOVESOME LABEL 071C8 E4894445 2 5 ZBM 167 ST R2 FCB,FCLASTREAD indicate type of last read 071C9 E4170803 0 4 BASE 168 ST R0 R4,CAR1 save the buffer count remaining 071CA 6004000D 0 IMM 169 LD R0 CR get a carriage return 071CB E4170804 0 4 BASE 170 ST R0 R4,CAR2 return to user with term in R2 071CC EC094C15 5 ZBM 171 STZ FCB,FCLOADPT indicate not at load point 071CD FE0E5982 172 JMP FNOERROR return no error 173 * --- 174 175 ********************************************************************************** 176 * * 177 * The directory went bad -- we release our grip on the * 178 * directory and return the error to the user. * 179 * * 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1577 (FRQRDDIR) F 95 FREQ - Read Processor (.DIR) 180 ********************************************************************************** 181 000071CE 182 DIRDIRBAD LABEL 071CE DC405685 183 CALLNP FREEDIR release access to the directory 071CF DC403150 184 CALLNP GRUBWNDO1 dump this window 071D0 DC403153 185 CALLNP GRUBWNDO2 dump this window, too 071D1 FE0E59CA 186 JMP FERRORDSE give a "disk structure error" error 187 * --- 188 189 * User memory went bad -- probably protect violation 000071D2 190 USRMEMBAD LABEL 191 * error comes from subroutine, so 192 * one stack location is already allocated. 071D2 19840001 6 IMM 193 ADD SP 1 (sic) adjust stack frame 071D3 E6178800 016 BASE 194 ST2 R0 SP,IRGWORD save error codes 071D4 DC405685 195 CALLNP FREEDIR release the directory 071D5 62178800 016 BASE 196 LD2 R0 SP,IRGWORD restore error codes 071D6 FE0E5B5F 197 JMP PASSERRUP give error to program controller 198 * --- 199 200 ********************************************************************************** 201 * * 202 * The directory entry has been found so we copy the information * 203 * into the user's memory. This is done brute force because it * 204 * is faster than tables. Within code R3 => FD entry, and * 205 * R2 => user memory * 206 * * 207 ********************************************************************************** 208 000071D7 209 COPYENTRY LABEL 210 ***** Check shared list for access 211 * For the moment, just give the entry only if he has 212 * access to the directory. The shared list searching 213 * is hard to implement because of no free windows. 071D7 60094E45 0 5 ZBM 214 LD R0 FCB,FCPRIV get the privilege 071D8 6404000F 0 IMM 215 CPR R0 FSPRIVNOT check for not authorized 071D9 FE0271DF 216 JEQ DONTGIVE jump if a badness 071DA 60978802 2 6 BASE 217 LD R2 SP,COREADR get location in user's memory 071DB DC407214 218 CALLNP DIRINFOP make information for one entry 071DC 60040011 0 IMM 219 LD R0 DIRENTWIDE length of an entry (words) 071DD 98178802 0 6 BASE 220 ADDM R0 SP,COREADR move user's core pointer up 071DE B00981E3 0 6 ZBM 221 RSBM R0 SP,BUFSIZ/BITS 0:29 account for buffer space used 222 * \ / 223 000071DF 224 DONTGIVE LABEL 071DF 6216C802 013 BASE 225 LD2 R0 R3,FDNAME get the name of the current entry 071E0 E617480B 015 BASE 226 ST2 R0 FCB,FCNAME remember current position 071E1 6016C804 0 3 BASE 227 LD R0 R3,FDEXTEN get extension 071E2 E417480D 0 5 BASE 228 ST R0 FCB,FCNAMEEXT save as other part of position 071E3 FE0E71A3 229 JMP MOVE2NEXT move to next entry 230 * --- 231 232 END DIRREAD routine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1578 (FRQRDDIR) F 95 FREQ - Read Processor (.DIR) 234 235 ********************************************************************************** 236 * * 237 * DIRINFOHD. Routine to produce the directory header block. * 238 * * 239 * Call: FCB,FCRELOC=store relocation bit * 240 * ULB=user limit block * 241 * R3=>place to put info * 242 * CALLNP DIRINFOHD * 243 * R0 = header length * 244 * * 245 * Sets R0 * 246 * Eats R1:R2 * 247 * Stack required = 1 * 248 * * 249 ********************************************************************************** 250 251 BLOCK DIRINFOHD subroutine 252 ENTRY DIRINFOHD 253 254 BEGFRAME 255 ENDFRAME 256 071E4 DD5F8001 6 STAK 257 DIRINFOHD ENTRNP PUSH welcome 071E5 5C095A10 5 ZBM 258 CMZ FCB,FCRELOC where do we relocate? 071E6 FE0C71E8 259 JNE MONTANA jump if stay with monitor store relocation 071E7 59840080 IMM 260 CLBMSR MSRSRELOC relocate to user 000071E8 261 MONTANA LABEL 071E8 60001EFB 0 262 LD R0 SYSTEMNM get this systems name 071E9 E416C804 0 3 BASE 263 ST R0 R3,DIRSYSTEM say owning system 264 265 * volume info, use system volume if not privileged 071EA 60040001 0 IMM 266 LD R0 1 default to system volume 071EB FB3071F4 4 267 JZA ULB DIRRDHVDRV jump if .TERM or fake .DIR 071EC 60494E45 1 5 ZBM 268 LD R1 FCB,FCPRIV get privilege over DIR 071ED 6444000F 1 IMM 269 CPR R1 FSPRIVNOT do we have any privilege? 071EE FE0271F4 270 JEQ DIRRDHVDRV jump if not 071EF 60090081 0 4 ZBM 271 LD R0 ULB,ULDRIVE volume number that we're looking for 272 * Special case if hardware type is .VOL 071F0 60496665 1 5 ZBM 273 LD R1 FCB,FCHTYPE get the hardware type 071F1 6444000E 1 IMM 274 CPR R1 HTYPEVOL do we have a .VOL 071F2 FE0C71F4 275 JNE DIRRDHVDRV jump if not 071F3 60094081 0 5 ZBM 276 LD R0 FCB,FCDRIVE this is the correct drive 277 * \ / 278 279 * ULB => user limit block | 0 000071F4 280 DIRRDHVDRV LABEL 071F4 EC16C801 3 BASE 281 STZ R3,DIRFLAGS clear flags word 071F5 60A01F22 2 0 282 LD R2 VOLNTABLE(R0) get the VOLN element pointer 071F6 62168811 012 BASE 283 LD2 R0 R2,VOLNNAME get the name of our element 071F7 E616C802 013 BASE 284 ST2 R0 R3,DIRVOLUME set the volume in place 071F8 FB307208 4 285 JZA ULB ELSEWAYS jump if using fake ULB 071F9 5C090210 4 ZBM 286 CMZ ULB,ULFOREIGN is this account a foreign account? 071FA ED88C211 3 ZBM 287 STLNE R3,DIRFOREIGN set bit if shadow account 071FB 5C090010 4 ZBM 288 CMZ ULB,ULSHADOW is this account a shadow account? 071FC ED88C011 3 ZBM 289 STLNE R3,DIRSHADOW set bit if shadow account 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1579 (FRQRDDIR) F 95 FREQ - Read Processor (.DIR) 071FD 60496665 1 5 ZBM 290 LD R1 FCB,FCHTYPE get the hardware type again 071FE 6444000E 1 IMM 291 CPR R1 HTYPEVOL do we have a .VOL 071FF FE027204 292 JEQ DIRRDLV account name makes no sense with .VOL 07200 62170802 014 BASE 293 LD2 R0 ULB,ULACCNM get the account name 07201 60970804 2 4 BASE 294 LD R2 ULB,ULACCPROJ get the project 00007202 295 DIRRDFIN LABEL 07202 E616C805 013 BASE 296 ST2 R0 R3,DIRACCOUNT save account name 07203 E496C807 2 3 BASE 297 ST R2 R3,DIRPROJECT save division/project 00007204 298 DIRRDLV LABEL 07204 60040008 0 IMM 299 LD R0 DIRHWIDE get the header length 07205 E416C800 0 3 BASE 300 ST R0 R3,DIRHLNTH save 07206 59C40080 IMM 301 IORMSR MSRSRELOC back to monitor relocation 07207 5D1F8001 6 STAK 302 LEAVE POP return to caller 303 * --- 304 305 * No ULB. Unit is either fake .DIR or a .TERM 00007208 306 ELSEWAYS LABEL 07208 60096665 0 5 ZBM 307 LD R0 FCB,FCHTYPE get device type 07209 64040005 0 IMM 308 CPR R0 HTYPEDIR is it a .DIR? 0720A FE0C7210 309 JNE ZIPNAME jump if not 0720B 5C088215 2 ZBM 310 CMZ R2,VOLNFOREN system volume from another system? 0720C ED88C211 3 ZBM 311 STLNE R3,DIRFOREIGN set bit if a foreign account 0720D 62174807 015 BASE 312 LD2 R0 FCB,FCANAME get the account name 0720E 6097480D 2 5 BASE 313 LD R2 FCB,FCAPROJ and get the extension (project) 0720F FE0E7202 314 JMP DIRRDFIN jump to clean up 315 * --- 316 317 * No ULB, unit not .DIR ... probably a terminal, nuke the account name 00007210 318 ZIPNAME LABEL 07210 EE16C802 3 BASE 319 STZ2 R3,DIRVOLUME zero the volume name 07211 EE16C805 3 BASE 320 STZ2 R3,DIRACCOUNT zero the name 07212 EC16C807 3 BASE 321 STZ R3,DIRPROJECT zero the division/project 07213 FE0E7204 322 JMP DIRRDLV jump to clean up 323 * --- 324 325 END DIRINFOHD subroutine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1580 (FRQRDDIR) F 95 FREQ - Read Processor (.DIR) 327 328 ********************************************************************************** 329 * * 330 * DIRINFOP * 331 * Routine to produce a single catalog entry. * 332 * Call with: * 333 * FCB,FCRELOC=store relocation bit * 334 * R2=>address in user memory * 335 * R3=>directory entry * 336 * CALLNP DIRINFOP * 337 * Gets R1 and R0=entry length in words. * 338 * Stack required = 1 * 339 * * 340 ********************************************************************************** 341 342 BLOCK DIRINFOP subroutine 343 ENTRY DIRINFOP 344 345 BEGFRAME 346 ENDFRAME 347 07214 DD5F8001 6 STAK 348 DIRINFOP ENTRNP PUSH welcome 07215 5C095A10 5 ZBM 349 CMZ FCB,FCRELOC going to user or monitor mem? 07216 FE0C7218 350 JNE MONTIGUE 07217 59840080 IMM 351 CLBMSR MSRSRELOC going to user 00007218 352 MONTIGUE LABEL 07218 6216C802 013 BASE 353 LD2 R0 R3,FDNAME 07219 E6168801 012 BASE 354 ST2 R0 R2,DIRNAME name of file 0721A 6016C804 0 3 BASE 355 LD R0 R3,FDEXTEN 0721B E4168803 0 2 BASE 356 ST R0 R2,DIREXT filename extension 0721C 6016C80F 0 3 BASE 357 LD R0 R3,FDCREDAT 0721D E4168804 0 2 BASE 358 ST R0 R2,DIRCREATD creation date 0721E 6016C808 0 3 BASE 359 LD R0 R3,FDLACC 0721F E4168805 0 2 BASE 360 ST R0 R2,DIRLACSD last read date 07220 6016C807 0 3 BASE 361 LD R0 R3,FDLCD 07221 E4168806 0 2 BASE 362 ST R0 R2,DIRLMODD last write date 07222 6016C809 0 3 BASE 363 LD R0 R3,FDLBU 07223 E4168807 0 2 BASE 364 ST R0 R2,DIRLBKUPD last backup date 07224 6008C10D 0 3 ZBM 365 LD R0 R3,FDRUSE 07225 E4088108 0 2 ZBM 366 ST R0 R2,DIRTOTRACS total read access 07226 6008E10D 0 3 ZBM 367 LD R0 R3,FDWUSE 07227 E408A108 0 2 ZBM 368 ST R0 R2,DIRTOTWACS total write access 07228 6008C101 0 3 ZBM 369 LD R0 R3,FDCUSE 07229 E408850D 0 2 ZBM 370 ST R0 R2,DIRCUSE current use count 0722A 6008C10C 0 3 ZBM 371 LD R0 R3,FDRACS 0722B E4088109 0 2 ZBM 372 ST R0 R2,DIRRACS current read access 0722C 6008E01C 0 3 ZBM 373 LD R0 R3,FDWACS 0722D E408A109 0 2 ZBM 374 ST R0 R2,DIRWACS current write access 0722E 6008E2FC 0 3 ZBM 375 LD R0 R3,FDMWACS 0722F E408810A 0 2 ZBM 376 ST R0 R2,DIRMWACS current multiple write access 07230 6008E610 0 3 ZBM 377 LD R0 R3,FDFWWSC 07231 E408B61C 0 2 ZBM 378 ST R0 R2,DIRFWWSC file writing when system crashed 07232 60101EFD 0 @ 379 LD R0 FILESUN get the current start up number 07233 6416C000 0 3 CACH 380 CPR R0 R3,FDSUN see if this file is current 07234 FE02723D 381 JEQ GOODCOUNTS jump if it is current 07235 EC08850D 2 ZBM 382 STZ R2,DIRCUSE otherwise, set all counts to zero 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1581 (FRQRDDIR) F 95 FREQ - Read Processor (.DIR) 07236 EC088109 2 ZBM 383 STZ R2,DIRRACS 07237 EC08A109 2 ZBM 384 STZ R2,DIRWACS 07238 EC08810A 2 ZBM 385 STZ R2,DIRMWACS 07239 6008E01C 0 3 ZBM 386 LD R0 R3,FDWACS get count of current write access 0723A 1808E2FC 0 3 ZBM 387 ADD R0 R3,FDMWACS and add count of multiple write access 0723B FA02723D 0 388 JEQZ R0 GOODCOUNTS jump if not writing, leave earlier set FWWSC 0723C EDC8B61C 2 ZBM 389 STW R2,DIRFWWSC it was being written, so indicate 390 * \ / 391 0000723D 392 GOODCOUNTS LABEL 0723D 6008D186 0 3 ZBM 393 LD R0 R3,FDLEN 0723E E408A18A 0 2 ZBM 394 ST R0 R2,DIRTFL total file length 0723F 60040000 0 IMM 395 LD R0 0 07240 60400414 1 396 LD R1 CPCUPC 07241 5C085010 1 ZBM 397 CMZ R1,UPMAINTR is this a maintenance guy? 07242 FE0C7244 398 JNE NOTSMART1 jump if not special program 07243 6008D185 0 3 ZBM 399 LD R0 R3,FDDA 400 * \ / 401 00007244 402 NOTSMART1 LABEL 07244 E408918B 0 2 ZBM 403 ST R0 R2,DIRROOTBLK root disk block of file 07245 6008F610 0 3 ZBM 404 LD R0 R3,FDGHOST 07246 E408BA1C 0 2 ZBM 405 ST R0 R2,DIRGHOST ghost bit (not recovered yet) 07247 6008F810 0 3 ZBM 406 LD R0 R3,FDTRANS 07248 E408BC1C 0 2 ZBM 407 ST R0 R2,DIRTRANS indicates user program crashedon this file 07249 6008FA10 0 3 ZBM 408 LD R0 R3,FDFLOG 0724A E408BE1C 0 2 ZBM 409 ST R0 R2,DIRFLOG log file access flag 0724B 6008D830 0 3 ZBM 410 LD R0 R3,FDPRIV 0724C E408904C 0 2 ZBM 411 ST R0 R2,DIRACCESS access privilege of file 0724D 6016C018 0 3 CACH 412 LD R0 R3,FDPURGE 0724E E4168032 0 2 CACH 413 ST R0 R2,DIRPRGINT purge interval of file 0724F 6008E410 0 3 ZBM 414 LD R0 R3,FDPURG 07250 E408B01C 0 2 ZBM 415 ST R0 R2,DIRPRGFLG on if file purged 07251 6008DE10 0 3 ZBM 416 LD R0 R3,FDFBD 07252 E408B81C 0 2 ZBM 417 ST R0 R2,DIRFBC on if file being closed 07253 6008E010 0 3 ZBM 418 LD R0 R3,FDNBU 07254 E408B21C 0 2 ZBM 419 ST R0 R2,DIRNOBKUP on if not to backup 07255 6008E210 0 3 ZBM 420 LD R0 R3,FDRFB 07256 E408B41C 0 2 ZBM 421 ST R0 R2,DIRRCVRD on if recovered from backup 07257 6016C80E 0 3 BASE 422 LD R0 R3,FDUSRFLD 07258 E416880E 0 2 BASE 423 ST R0 R2,DIRUSRFLD user defined number 07259 6008EA60 0 3 ZBM 424 LD R0 R3,FDET 0725A E4168030 0 2 CACH 425 ST R0 R2,DIRTYPE type of file 426 * It doesn't hurt anything to set DIRRAFTYPE for non-raf files 0725B 6008FC20 0 3 ZBM 427 LD R0 R3,FDRAFTYPE get raf type 0725C FA0C7260 0 428 JNEZ R0 GOTRTYPE if new-format volume, we have right value 0725D 5C08D185 3 ZBM 429 CMZ R3,FDDA is there a root block? 0725E FE027260 430 JEQ GOTRTYPE no, really is empty 0725F 60040002 0 IMM 431 LD R0 RAFTSMALL yes, it's an old-style small raf 00007260 432 GOTRTYPE LABEL 07260 E408982C 0 2 ZBM 433 ST R0 R2,DIRRAFTYPE 07261 6216C80A 013 BASE 434 LD2 R0 R3,FDSERNO 07262 E616880F 012 BASE 435 ST2 R0 R2,DIRSERNO file serial number 07263 60040011 0 IMM 436 LD R0 DIRENTWIDE 07264 E4168800 0 2 BASE 437 ST R0 R2,DIRENTLEN known length of entry 438 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1582 (FRQRDDIR) F 95 FREQ - Read Processor (.DIR) 07265 59C40080 IMM 439 IORMSR MSRSRELOC restore monitor storing 07266 5D1F8001 6 STAK 440 LEAVE POP return to caller 441 * --- 442 443 END DIRINFOP subroutine 444 445 446 END DIR Read Routines 147 INPUT FRQRDNULL read from a NULL 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1583 (FRQRDNULL) F 96 Read Processor (.NULL) 3 4 ********************************************************************************** 5 * * 6 * Routine to execute a read from a .NULL. * 7 * Nothing is done except returning an end of data. * 8 * * 9 * Stack required = 0 * 10 * * 11 ********************************************************************************** 12 13 BLOCK NULLREAD routine 14 ENTRY NULLREAD 15 00007267 16 NULLREAD LABEL 07267 60040009 0 IMM 17 LD R0 FILNEOD get end-of-data status 07268 E4094445 0 5 ZBM 18 ST R0 FCB,FCLASTREAD indicate that this was last type read 07269 EC094C15 5 ZBM 19 STZ FCB,FCLOADPT indicate file not at load point 0726A 6004000D 0 IMM 20 LD R0 CR get a carriage return 0726B E4170804 0 4 BASE 21 ST R0 R4,CAR2 return terminator in users R2 0726C FE0E5982 22 JMP FNOERROR return indicating success 23 * --- 24 25 END NULLREAD routine 148 INPUT FRQRDTERM read from a .TERM 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1584 (FRQRDTERM) F 97 FREQ - Read Processor (.TERM) 3 4 ********************************************************************************** 5 * * 6 * This request reads from the terminal a "record" terminated by * 7 * a character from the terminating character set that is selected. * 8 * The thing also handles the backspace character and the line kill * 9 * character (which may not be terminating characters). * 10 * LD R0 FRREAD get code for file read * 11 * LD R1 * 12 * LD R2 * 13 * FREQ * 14 * JLTZ R0 * 15 * ST R0 * 16 * ST R1 * 17 * ST R2 * 18 * * 19 * If the record read is longer than the given buffer, as much * 20 * of the record as will fit into the buffer is copied and the * 21 * remainder is lost. The overflow can be detected by the negative * 22 * "buffer remaining count" in R1. * 23 * Stack required = 14 * 24 * 0 + max ( CALCTERMC (2), ECHOLINE (14), LOCKWAIT (0), * 25 * RESETTCG (1), SETMEMTRAP (1), SETREADER (3), * 26 * SFREEMEM (0), SUSPENDFRQ (1), TERMAFORMR (8), * 27 * TERMBFORMR (8) ) * 28 * * 29 ********************************************************************************** 30 31 BLOCK TERMREAD routine 32 ENTRY TERMREAD read from terminal entry 33 34 * This thing uses a few locations on the stack as temps 35 * (remember that the .TERM drivers cannot use the FCB because 36 * of the "default terminals" shared by all users for input 37 * and output). 38 00178802 6 BASE 39 TRCHARPTR EQU COREADR pointer to char destination 00178803 6 BASE 40 TRBUFSIZ EQU BUFSIZ (+ or -) size of buffer 00178800 6 BASE 41 TRRELOC EQU IRGWORD relocation of caller 00178804 6 BASE 42 TRCHARMASK EQU RWERINFO mask for received character 00178806 6 BASE 43 TRERROR EQU RWRETADDR error code 44 0000726D 45 TERMREAD LABEL 0726D E4978804 2 6 BASE 46 ST R2 SP,TRCHARMASK save function code 0726E 60170801 0 4 BASE 47 LD R0 R4,CAMSR get the callers relocation 0726F 7407FFFF 0 IMM 48 XOR R0 -1 flip sense of bit 07270 78040080 0 IMM 49 AND R0 MSRSRELOC leave only the store relocation bit 07271 E4178800 0 6 BASE 50 ST R0 SP,TRRELOC and save for later use 07272 61095F16 4 5 ZBM 51 LD TCB FCB,FCDCBPTR get addr of TCB 07273 FB3059A5 4 52 JZA TCB FERRORILOP jump if fake terminal 53 * R4=>TCB, FCB=>file control block 54 * \ / 55 56 ********************************************************************************** 57 * * 58 * We now output any carriage control that is to go out * 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1585 (FRQRDTERM) F 97 FREQ - Read Processor (.TERM) 59 * before the input. Notice that after the characters are * 60 * output, the previous line control code is set to binary. * 61 * This ensures that if the READ is restarted ( might happen * 62 * if timed out of ) no new carriage control characters will * 63 * go out. * 64 * * 65 ********************************************************************************** 66 67 * \ / 07274 6044000A 1 IMM 68 LD R1 RTINPUT indicate that this new record is input 07275 DC406E25 69 CALLNP TERMBFORMR put out the control characters 07276 60040002 0 IMM 70 LD R0 PVCBIN get type code for binary 07277 E4091838 0 4 ZBM 71 ST R0 TCB,TCPVC set previous record to type binary 72 * \ / 73 74 ********************************************************************************** 75 * * 76 * Set up complete -- now we get the chars and store them. * 77 * * 78 ********************************************************************************** 79 80 * \ / 07278 6004007F 0 IMM 81 LD R0 07F get a mask to remove the parity bit 07279 5C178804 6 BASE 82 CMZ SP,TRCHARMASK check the request 0727A FE02727C 83 JEQ TOPBITOFF jump if a text read 0727B 600400FF 0 IMM 84 LD R0 0FF on binary read, no bits masked off 0000727C 85 TOPBITOFF LABEL 0727C E4178804 0 6 BASE 86 ST R0 SP,TRCHARMASK save the char mask 0727D 70978803 2 6 BASE 87 LDN R2 SP,TRBUFSIZ get -(buffer size) 0727E E4978803 2 6 BASE 88 ST R2 SP,TRBUFSIZ and put back on stack 0727F 60578802 1 6 BASE 89 LD R1 SP,TRCHARPTR get destination pointer 07280 B08A5F30 2 1 CBM 90 RSBM R2 R1/FLDCHARS make so CACH R1,0(R2) is first char 07281 E4578802 1 6 BASE 91 ST R1 SP,TRCHARPTR save end pointer 92 * \ / 93 94 ********************************************************************************** 95 * * 96 * Read from the input queue. This code works under * 97 * the assumption that (since I am the process associated * 98 * with this terminal and no others should be flushing my * 99 * queues) once a terminator is in the queue it will * 100 * never leave. This means that, if the terminator count * 101 * is non-zero, the first queue element cannot go away * 102 * unless I, the reader, free it. * 103 * * 104 ********************************************************************************** 105 106 * \ / 107 PLOCK TCB,TCLOCK lock the list 07282 0CC00000 107 IOFF 07283 D1D70818 4 BASE 107 SETT TCB,TCLOCK 07284 FE0C7286 107 JNE MA(2+DISPW MA 0) 07285 DC40308B 107 CALLNP LOCKWAIT 108 07286 DC407312 109 CALLNP SETREADER saddle up the TCG/TCA 07287 5C17080E 4 BASE 110 CMZ TCB,TCTERMLOC is there a terminator in the list? 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1586 (FRQRDTERM) F 97 FREQ - Read Processor (.TERM) 07288 FE027303 111 JEQ RTERMSUSP jump if no terminator in 07289 EDC9041D 4 ZBM 112 STW TCB,TCREADIP say read in progress 0728A 60093C21 0 4 ZBM 113 LD R0 TCB,TCECHO get the echo mode 0728B 64040003 0 IMM 114 CPR R0 ECHOMREAD special echo? 0728C FE0C7291 115 JNE OK2READ jump if not 0728D 5C092018 4 ZBM 116 CMZ TCB,TCINECHOD were characters echoed? 0728E FE0C7290 117 JNE OK2READX don't echo again 0728F DC404CC6 118 CALLNP ECHOLINE echo the characters 00007290 119 OK2READX LABEL 07290 EC092018 4 ZBM 120 STZ TCB,TCINECHOD remove flag so new line will be echoed 00007291 121 OK2READ LABEL 07291 EC178806 6 BASE 122 STZ SP,TRERROR no errors 07292 EC09061D 4 ZBM 123 STZ TCB,TCINQFILL clear input overflow deadman flag 124 PUNLOCK TCB,TCLOCK release the list 07293 EC170818 4 BASE 124 STZ TCB,TCLOCK 07294 0C800000 124 ION 07295 DC005BCF 125 CALL SETMEMTRAP catch user memory errors 07296 40005B5F 126 PARL TERMMEMBAD where to go on errors 07297 60978802 2 6 BASE 127 LD R2 SP,TRCHARPTR R2 => buffer + buffer length 07298 61D78803 7 6 BASE 128 LD R7 SP,TRBUFSIZ R7 = -buffer length 07299 60C9231C 3 4 ZBM 129 LD TCQ TCB,TCTTIBP TCQ = R3 => first block 0000729A 130 BLOKTOP LABEL 0729A 5C08DC10 3 ZBM 131 CMZ TCQ,TCQCOMND is this an error element? 0729B FE02729F 132 JEQ NOTANERR jump if not an error 133 * \ / 134 0729C 6008D181 0 3 ZBM 135 LD R0 TCQ,TCQCPARMS pick up the error code 0729D E4178806 0 6 BASE 136 ST R0 SP,TRERROR and save to give to the user 0729E FE0E72BE 137 JMP NEXTTCQ get the next TCQ 138 * --- 139 0000729F 140 NOTANERR LABEL 0729F 6056C004 1 3 CACH 141 LD R1 TCQ,TCQLAST get index to last character 072A0 64C91F1E 3 4 ZBM 142 CPR TCQ TCB,TCTERMTCQ is this the block with the terminator? 072A1 FE0C72A3 143 JNE GOTOEND jump if not, move whole TCQ 072A2 604900FE 1 4 ZBM 144 LD R1 TCB,TCTERMCHLC pick up index to terminator (place to stop) 000072A3 145 GOTOEND LABEL 072A3 E4578805 1 6 BASE 146 ST R1 SP,TRCHARMASK(1) save for loop stopper 072A4 6056C000 1 3 CACH 147 LD R1 TCQ,TCQFIRST get index to first character in block 072A5 59978800 6 BASE 148 CLBMSR SP,TRRELOC relocate stores to requester 072A6 FE0E72B9 149 JMP MOVEON1 enter character move loop 150 * --- 151 000072A7 152 NEXTCHAR LABEL 072A7 601AC806 0 31 CACH 153 LD R0 TCQ,TCQCHARS(1)(R1) get the character 072A8 78178804 0 6 BASE 154 AND R0 SP,TRCHARMASK remove parity bit if required 072A9 64091077 0 4 ZBM 155 CPR R0 TCB,TCBKSPC is this a backspace char? 072AA FE0C72B0 156 JNE NOTBKSP jump if not a backspace 072AB FA0272B5 0 157 JEQZ R0 DOSTORE a backspace of null is not really a backspace 158 * Backspace. move pointer back one 072AC 65D78803 7 6 BASE 159 CPR R7 SP,TRBUFSIZ already at beginning? 072AD FE0272B8 160 JEQ MOVEON if so, we needn't move 072AE FBE272B8 7 161 DRJ R7 MOVEON move back over last char 072AF FE0E72B8 162 JMP MOVEON returning to the user's buffer 163 * --- 164 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1587 (FRQRDTERM) F 97 FREQ - Read Processor (.TERM) 000072B0 165 NOTBKSP LABEL 072B0 64091076 0 4 ZBM 166 CPR R0 TCB,TCLKILLC is this a line kill? 072B1 FE0C72B5 167 JNE DOSTORE jump if no match 072B2 FA0272B5 0 168 JEQZ R0 DOSTORE a null specification is a no match 169 * Line kill, we just ignore all the characters we've gotten so far 072B3 61D78803 7 6 BASE 170 LD R7 SP,TRBUFSIZ begin over at the beginning 072B4 FE0E72B8 171 JMP MOVEON and continue 172 * --- 173 000072B5 174 DOSTORE LABEL 072B5 FBC672B7 7 175 JGEZ R7 OFFEND jump if off the end of the requesters buffer 072B6 E41AB800 0 27 CACH 176 ST R0 CACH R2,0(R7) store the char into the requesters buffer 000072B7 177 OFFEND LABEL 072B7 19C40001 7 IMM 178 ADD R7 1 move the buffer pointer 000072B8 179 MOVEON LABEL 072B8 18440001 1 IMM 180 ADD R1 1 move the char pointer 000072B9 181 MOVEON1 LABEL 072B9 64578805 1 6 BASE 182 CPR R1 SP,TRCHARMASK(1) done with block? 072BA FE0872A7 183 JLT NEXTCHAR do next character if not 072BB 59C40080 IMM 184 IORMSR MSRSRELOC back to monitor relocation 072BC 64C91F1E 3 4 ZBM 185 CPR TCQ TCB,TCTERMTCQ is this the block with the terminator? 072BD FE0272C0 186 JEQ PTERM jump if so 187 * \ / 188 000072BE 189 NEXTTCQ LABEL 072BE FAF6729A 3 190 LJNA TCQ BLOKTOP continue to next TCQ 072BF 00131120 191 HALT HALTS1120 no terminator in list 192 * --- 193 194 * The line terminator has been found. We're done storing 195 * so we save away the terminator and we release all of 196 * the data blocks used up during this read. 197 000072C0 198 PTERM LABEL 072C0 601AC806 0 31 CACH 199 LD R0 TCQ,TCQCHARS(1)(R1) pick up the actual terminator 072C1 78178804 0 6 BASE 200 AND R0 SP,TRCHARMASK mask off the terminator 072C2 E4178805 0 6 BASE 201 ST R0 SP,TRCHARMASK(1) save the terminator 072C3 18440001 1 IMM 202 ADD R1 1 move over the terminator 072C4 E5D78803 7 6 BASE 203 ST R7 SP,TRBUFSIZ save buffer remaining 204 PLOCK TCB,TCLOCK lock up the list 072C5 0CC00000 204 IOFF 072C6 D1D70818 4 BASE 204 SETT TCB,TCLOCK 072C7 FE0C72C9 204 JNE MA(2+DISPW MA 0) 072C8 DC40308B 204 CALLNP LOCKWAIT 072C9 6456C004 1 3 CACH 205 CPR R1 TCQ,TCQLAST is this block now empty? 072CA FE0872CD 206 JLT STUFFLEFT jump if not 072CB 60C8DF10 3 3 ZBM 207 LD TCQ TCQ,TCQLINK just fake like block is empty 072CC FE0E72D0 208 JMP FLUSHUSED and go to dump blocks used up 209 * --- 210 211 * Characters left in the last block so we must calculate 212 * characters removed 000072CD 213 STUFFLEFT LABEL 072CD E056C000 1 3 CACH 214 EXCH R1 TCQ,TCQFIRST update the first used char position 072CE 3056C000 1 3 CACH 215 RSB R1 TCQ,TCQFIRST R1 = characters removed 072CF B04922FB 1 4 ZBM 216 RSBM R1 TCB,TCTTICNT remove from chars in input list 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1588 (FRQRDTERM) F 97 FREQ - Read Processor (.TERM) 000072D0 217 FLUSHUSED LABEL 072D0 E0C9231C 3 4 ZBM 218 EXCH TCQ TCB,TCTTIBP set new beginning of list 000072D1 219 NOTEMPTY LABEL 072D1 64C9231C 3 4 ZBM 220 CPR TCQ TCB,TCTTIBP have all used blocks been freed? 072D2 FE0272DE 221 JEQ DONEFREE jump if done freeing 072D3 6016C004 0 3 CACH 222 LD R0 TCQ,TCQLAST get the end pointer 072D4 1016C000 0 3 CACH 223 SUB R0 TCQ,TCQFIRST R0 = characters in this block 072D5 B00922FB 0 4 ZBM 224 RSBM R0 TCB,TCTTICNT remove from input count 072D6 6088DF10 2 3 ZBM 225 LD R2 TCQ,TCQLINK save forward link 072D7 DC002F5D 226 CALL SFREEMEM free the block 072D8 4148D060 3 ZBM 227 PARV TCQ,TCQLOG indicate its size 072D9 4052C000 3 REG 228 PARVL TCQ and address 072DA 60D28000 3 2 REG 229 LD TCQ R2 TCQ => next block 072DB FAF272D1 3 230 JNZA TCQ NOTEMPTY jump if more to do 072DC EC0922FB 4 ZBM 231 STZ TCB,TCTTICNT list is empty, justify count 072DD EC09011C 4 ZBM 232 STZ TCB,TCTTIEP clean up the end pointer 233 * \ / 000072DE 234 DONEFREE LABEL 072DE EC09041D 4 ZBM 235 STZ TCB,TCREADIP read is done 072DF 5C09083D 4 ZBM 236 CMZ TCB,TCTERMGRP terminator group zero? 072E0 EC4BC010 7 CBM 237 STLEQ R7/BIT 0 save answer 072E1 60091F15 0 4 ZBM 238 LD R0 TCB,TCFCB get FCB 072E2 5C082015 0 ZBM 239 CMZ R0,FCABSIO console terminal? 072E3 FE0272E5 240 JEQ JUSTCALC if not, only CALCTERMC is needed 072E4 DC403358 241 CALLNP RESETTCG else, reset TCG/TCS, then CALCTERMC 000072E5 242 JUSTCALC LABEL 072E5 DC404CA6 243 CALLNP CALCTERMC set up TCTERMLOC 244 PUNLOCK TCB,TCLOCK unlock the list 072E6 EC170818 4 BASE 244 STZ TCB,TCLOCK 072E7 0C800000 244 ION 072E8 70978803 2 6 BASE 245 LDN R2 SP,TRBUFSIZ R2=buffer remaining 072E9 60178805 0 6 BASE 246 LD R0 SP,TRCHARMASK(1) R0 = the terminating character 247 * \ / 248 249 ********************************************************************************** 250 * * 251 * Output end of record characters and set previous ( this ) * 252 * record type. The type will be set to "normal" if terminated by * 253 * a CR and binary if not. * 254 * This code also checks the terminating character and if * 255 * it was a control-W then if the user is using terminating * 256 * character group zero (record input from the terminal) and * 257 * the record was of zero length, then a record type of end-of-file * 258 * is returned rather then the normal text type. * 259 * * 260 ********************************************************************************** 261 262 * \ / 072EA 60C00412 3 263 LD R3 CPPSA get the current PSA pointer 072EB 60C8DF11 3 3 ZBM 264 LD R3 R3,PSCACHNP1 get pointer to callers registers 072EC E416C804 0 3 BASE 265 ST R0 R3,CAR2 save the terminating char in user register 072ED 7804007F 0 IMM 266 AND R0 07F remove high bit for these checks 072EE 60440000 1 IMM 267 LD R1 RTYPETEXT presume TEXT record 072EF 64040017 0 IMM 268 CPR R0 ETB was terminator cntl-W? 072F0 FE0C72F5 269 JNE TRNOTEOF if not, then text record read 072F1 6488DB33 2 3 ZBM 270 CPR R2 R3,CAR1/BITS 13:31 and was the record empty? 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1589 (FRQRDTERM) F 97 FREQ - Read Processor (.TERM) 072F2 FE0C72F5 271 JNE TRNOTEOF if not then a text record 072F3 F3C072F5 7 272 JBF R7/BIT 0 TRNOTEOF jump if not normal term group 072F4 60440008 1 IMM 273 LD R1 FILEOF return an EOF for the read 000072F5 274 TRNOTEOF LABEL 072F5 E4494445 1 5 ZBM 275 ST R1 FCB,FCLASTREAD set record type of read 072F6 E496C803 2 3 BASE 276 ST R2 R3,CAR1 return R1=buffsiz-charsread 072F7 60440009 1 IMM 277 LD R1 RTBIN assume binary record for the moment 278 * CMZ FCB,FCREQUEST is this a binary read? 072F8 5C09B014 6 ZBM 279 CMZ SP,TRCHARMASK/BIT 24 did we leave the high bits? 072F9 FE0C72FE 280 JNE TRITISCR if so, this is a binary record 072FA 6404000D 0 IMM 281 CPR R0 CR check for ending with a CR 072FB FE0C72FE 282 JNE TRITISCR if not term. with CR, then BIN record 072FC F3C072FE 7 283 JBF R7/BIT 0 TRITISCR jump if not normal term group 072FD 6044000A 1 IMM 284 LD R1 RTINPUT label this input as a regular record 000072FE 285 TRITISCR LABEL 072FE DC406E31 286 CALLNP TERMAFORMR put out the after control characters 287 072FF 5C17080E 4 BASE 288 CMZ TCB,TCTERMLOC check for anything present 07300 EC494C15 5 ZBM 289 STLEQ FCB,FCLOADPT set load point if empty 07301 60178806 0 6 BASE 290 LD R0 SP,TRERROR pick up the error code 07302 FE0E5983 291 JMP FERROR 292 * --- 293 294 ********************************************************************************** 295 * * 296 * Nothing to read. Wait for a line. If we are doing the special * 297 * echo mode, we echo any outstanding characters and then set the flags * 298 * saying that we have done so and telling the CIA to echo the characters. * 299 * This suspension will cause the read request to be re-executed when * 300 * the terminator comes in so we must remember that this echo has been * 301 * done. * 302 * * 303 ********************************************************************************** 304 00007303 305 RTERMSUSP LABEL 07303 60093C21 0 4 ZBM 306 LD R0 TCB,TCECHO check the type of echo 07304 64040003 0 IMM 307 CPR R0 ECHOMREAD doing special read echo? 07305 FE0C730B 308 JNE SUSPME nothing special if not 07306 5C092018 4 ZBM 309 CMZ TCB,TCINECHOD already have enabled echoing? 07307 FE0C730B 310 JNE SUSPME if so, don't do another ECHOLINE 07308 EDC90E1D 4 ZBM 311 STW TCB,TCINECHO tell comm to echo 07309 EDC92018 4 ZBM 312 STW TCB,TCINECHOD remember that we told it 0730A DC404CC6 313 CALLNP ECHOLINE echo any characters already recovered 0000730B 314 SUSPME LABEL 0730B DC003541 315 CALL SUSPENDFRQ suspend and the XREQ call 0730C 41530000 4 REG 316 PARV TCB pass suspend parameter (TCB address) 0730D 41001DB5 317 PAR SQTERMWAIT indicate which queue 0730E 40170818 4 BASE 318 PARL TCB,TCLOCK indicate what to unlock 319 PUNLOCK TCB,TCLOCK release the lock 0730F EC170818 4 BASE 319 STZ TCB,TCLOCK 07310 0C800000 319 ION 07311 FE0E59D4 320 JMP FERRORSUSP he won't let us suspend 321 * --- 322 323 ********************************************************************************** 324 * * 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1590 (FRQRDTERM) F 97 FREQ - Read Processor (.TERM) 325 * The user's memory went bad. Probably memory protect violation. * 326 * Don't move any more characters and return error. This * 327 * allows the user to fix his problem and to do a re-read * 328 * to pick up the record. Fat chance. * 329 * * 330 ********************************************************************************** 331 00005B5F 332 TERMMEMBAD EQU PASSERRUP 333 334 335 END TERMREAD routine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1591 (FRQRDTERM) F 97 FREQ - Read Processor (.TERM) 337 338 ********************************************************************************** 339 * * 340 * SETREADER. Routine to swap current underprocess' TCG and * 341 * TCA into the TCB. Nothing done if already the case. The * 342 * input buffer is scanned for terminators (setting TCTERMLOC) * 343 * if need be. * 344 * * 345 * Call: * 346 * LD R4 TCB (locked) * 347 * CALLNP SETREADER * 348 * * 349 * Eats R0:R2 * 350 * Stack usage: 3 * 351 * 1 + max ( CALCTERMC (2) ) * 352 * * 353 ********************************************************************************** 354 355 BLOCK SETREADER subroutine 356 ENTRY SETREADER move "reader's" TCG/TCA into TCB 357 358 BEGFRAME 359 ENDFRAME 360 07312 DD5F8001 6 STAK 361 SETREADER ENTRNP PUSH 07313 5C091815 4 ZBM 362 CMZ TCB,TCRDRTCG TCG/TCA belong to reader (us)? 07314 FE0C7324 363 JNE TRUSTLOC if so, no work 07315 EC091E18 4 ZBM 364 STZ TCB,TCINTE no ints please! 07316 EDC91815 4 ZBM 365 STW TCB,TCRDRTCG say readers TCG 07317 EC091615 4 ZBM 366 STZ TCB,TCINTTCG say not trappers TCG 07318 60800414 2 367 LD R2 CPCUPC our process 07319 60488041 1 2 ZBM 368 LD R1 R2,UPCTERMGRP get the current term group ptr 0731A 6449083D 1 4 ZBM 369 CPR R1 TCB,TCTERMGRP old and new the same? 0731B FE0C731E 370 JNE MUSTRESCAN jump if not 0731C 64440001 1 IMM 371 CPR R1 TCTERMGRP1 were they normal, too? 0731D FE0A7324 372 JLE TRUSTLOC jump if TCTERMLOC handy answer 373 * \ / 374 0000731E 375 MUSTRESCAN LABEL 0731E E449083D 1 4 ZBM 376 ST R1 TCB,TCTERMGRP store readers TCG into the TCB 0731F 38168812 0 2 BASE 377 LEA R0 R2,UPCTERMA get address of UPC term array 07320 60440020 1 IMM 378 LD R1 256/WORDLNTH*CPW get size to move 07321 3897080F 2 4 BASE 379 LEA R2 TCB,TCTERMA get destination address in TCB 07322 FE400000 380 CMOVE move new TCA into TCB 07323 DC404CA6 381 CALLNP CALCTERMC find any terminators 382 * \ / 383 00007324 384 TRUSTLOC LABEL 07324 5D1F8001 6 STAK 385 LEAVE POP 386 * --- 387 388 END SETREADER subroutine 149 INPUT FRQRDMT read from a MT 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1592 (FRQRDMT) F 98 FREQ - Read Processor (.MT, .CT and .VT) 3 4 ********************************************************************************** 5 * * 6 * File request processor for read tape. This request reads * 7 * from the tape directly into the callers memory. * 8 * User call: * 9 * LD R0 FRREAD * 10 * LD R1 * 11 * LD R2
* 12 * FREQ * 13 * JLTZ R0 * 14 * ST R0 * 15 * ST R1 * 16 * ST R2 * 17 * Note that a maximum record size exists. No portion * 18 * of any record longer than this may be given to a user. * 19 * If we see one, we completely zap the callers buffer. * 20 * * 21 * Stack required = 9 * 22 * 0 + max ( DIODONE (2), DIOSETUP (9), MTREQUEST (1), * 23 * SETMTSTAT (1) ) * 24 * * 25 ********************************************************************************** 26 27 BLOCK MTREAD routine 28 ENTRY MTREAD entry for user read request 29 00007325 30 MTREAD LABEL 07325 61095F16 4 5 ZBM 31 LD R4 FCB,FCDCBPTR get pointer to the unit control element 32 07326 60090021 0 4 ZBM 33 LD R0 R4,MTUTYPE R0 = 0 if CT, 1 if MT, 2 if VT 07327 DC0065B6 34 CALL DIOSETUP setup for DMA operation 07328 41607354 0 35 PARV MAXRECSIZE(R0) max record size allowed 07329 40440000 IMM 36 PARVL 0 for read operation 0732A FE0E7350 37 JMP GIVEERR jump if his memory is flako 0732B E4170808 0 4 BASE 38 ST R0 R4,MTUUBS save pointer to UBS list for driver 0732C E4570807 1 4 BASE 39 ST R1 R4,MTUREQLEN save the record size for driver 40 0732D DC00658A 41 CALL MTREQUEST request a tape operation 0732E 40440006 IMM 42 PARVL MTURQREAD a read request 0732F 61D20000 7 0 REG 43 LD R7 R0 R7 = error code 44 07330 DC006606 45 CALL DIODONE release the user buffer 07331 40570808 4 BASE 46 PARVL R4,MTUUBS pointer to UBS list 07332 EC170808 4 BASE 47 STZ R4,MTUUBS clean out the pointer 48 07333 60091810 0 4 ZBM 49 LD R0 R4,MTUEOF R0 = 0 if not tape mark, 1 if tape mark 07334 1C040008 0 IMM 50 MUL R0 FILEOF R0 = 0 if record, FILEOF if tape mark 07335 E4094445 0 5 ZBM 51 ST R0 FCB,FCLASTREAD save as type of last record read 52 07336 DC40659C 53 CALLNP SETMTSTAT update our tape status 07337 FEC00000 54 NOP 0 ignore EOT warning 55 * \ / 56 57 ********************************************************************************** 58 * * 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1593 (FRQRDMT) F 98 FREQ - Read Processor (.MT, .CT and .VT) 59 * The cartridge mag tape has a record size limit dictated * 60 * by security considerations. The source of the problem is * 61 * that the 5000 backup tapes on DEIs were not encrypted. * 62 * Unfortunately, this controller reads those tapes quite * 63 * easily. Therefore, we must short out the information * 64 * leak here in the driver, since the 8000 cartridge is * 65 * simply another user device. No part of a record that * 66 * we determine to be from a 5000 may be given to a user * 67 * since the passwords (for instance) occur scattered through * 68 * the tape record. If the record is longer than the longest * 69 * record that we can write, we assume that it is from a 5000 * 70 * system, and therefore we must clear out the residue that * 71 * was left in the user's address space. * 72 * * 73 ********************************************************************************** 74 75 * \ / 07338 60090021 0 4 ZBM 76 LD R0 R4,MTUTYPE R0 = 0 if CT, 1 if MT, 2 if VT 07339 60570806 1 4 BASE 77 LD R1 R4,MTURECLEN R1 = actual record length 0733A 64607354 1 0 78 CPR R1 MAXRECSIZE(R0) is it too big? 0733B FE0A7349 79 JLE NOTTOOBIG jump if not 0733C FBCC733E 7 80 JNEZ R7 HAVEERR jump if we already have an error code 0733D 61C40082 7 IMM 81 LD R7 XREQERPOB else give "out of bounds" error 0000733E 82 HAVEERR LABEL 0733E FA0C7349 0 83 JNEZ R0 NOTTOOBIG jump if this is a MT (no need to clear buf) 84 0733F 60407354 1 85 LD R1 MAXRECSIZE R1 = max size that we could have read 07340 60C00412 3 86 LD R3 CPPSA 07341 60C8DF11 3 3 ZBM 87 LD R3 R3,PSCACHNP1 R3 -> caller's console area 07342 5056C803 1 3 BASE 88 MIN R1 R3,CAR1 adjust for size of caller's buffer 07343 6096C804 2 3 BASE 89 LD R2 R3,CAR2 R2 = address of caller's buffer 07344 60040080 0 IMM 90 LD R0 MSRSRELOC 07345 2816C801 0 3 BASE 91 BSUB R0 R3,CAMSR R0 = bit in MSR to clear 07346 59920000 0 REG 92 CLBMSR R0 adjust MSR for user's buffer 07347 FE5800FF 93 CFILL 0FF fill buffer with one bits 07348 59C40080 IMM 94 IORMSR MSRSRELOC fix up our MSR 95 * \ / 96 00007349 97 NOTTOOBIG LABEL 07349 60000412 0 98 LD R0 CPPSA 0734A 60081F11 0 0 ZBM 99 LD R0 R0,PSCACHNP1 R0 -> caller's CA 0734B 60570806 1 4 BASE 100 LD R1 R4,MTURECLEN get actual record length 0734C B0560803 1 0 BASE 101 RSBM R1 R0,CAR1 adjust caller's buffer size 102 0734D 6084000D 2 IMM 103 LD R2 CR terminating character 0734E E4960804 2 0 BASE 104 ST R2 R0,CAR2 save that too 105 0734F 6013C000 0 7 REG 106 LD R0 R7 put error code back into R0 107 * \ / 108 00007350 109 GIVEERR LABEL 07350 FA025983 0 110 JEQZ R0 FERROR jump if no error occurred 07351 64040080 0 IMM 111 CPR R0 XREQERILR is this an interrupt code? 07352 FE085B5F 112 JLT PASSERRUP if so, pass it up 07353 FE0E5983 113 JMP FERROR else give as return code 114 * --- 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1594 (FRQRDMT) F 98 FREQ - Read Processor (.MT, .CT and .VT) 115 116 * max size for CT, MT, VT 07356 0000C000 117 MAXRECSIZE VFD CTDIOSIZE,MTDIOSIZE,VTDIOSIZE 118 119 END MTREAD routine 150 INPUT FRQRDEND end of lun read code 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1595 (FRQRDEND) F 99 CREF of READ user file 3 4 END READROU Read FREQ Routines 151 INPUT FRQCNTL file positioning control 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1596 (FRQCNTL) F 100 FREQ - File Control Processor 3 4 CNTL BLOCK File Control Routines 5 6 ENTRY FREQCNTL Control FREQ's 7 ENTRY DOREWIND perform a rewind, depending on no-rewind bit 8 ENTRY DOREWINDA perform a rewind, no questions 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1597 (FRQCNTL) F 100 FREQ - File Control Processor 10 11 ********************************************************************************** 12 * * 13 * The file control FREQs provide control of sequential files * 14 * and return some information on units in general. * 15 * Stack required = 1 * 16 * 0 + max ( CNTLCLEAR (0), CNTLSTATUS (1) ) * 17 * * 18 ********************************************************************************** 19 20 BLOCK FREQCNTL routine 21 ENTRY FREQCNTL 22 00007357 23 FREQCNTL LABEL 07357 64840010 2 IMM 24 CPR R2 FREQCNTLTL see if request is in range 07358 FE0659D8 25 JGE UERRORILR jump if illegal request 07359 FB72735C 5 26 JNZA FCB LUNISEQP jump if unit is opened 0735A FA8259BA 2 27 JEQZ R2 FERRORNSL error doesn't pass up (FRSTATUS) 0735B FE0E59B8 28 JMP FERRORLNE3 however this error does (all others) 29 * --- 30 0000735C 31 LUNISEQP LABEL 0735C 60495835 1 5 ZBM 32 LD R1 FCB,FCACCESS get access we have to this file 0735D 3044001F 1 IMM 33 RSB R1 WORDLNTH-1 convert to proper index 0735E 6022255E 0 1 34 LD R0 BITTAB(R1) this is the bit we need to check 0735F 78247362 0 2 35 AND R0 FREQCNTLT(R2) get restrictions and jump address 07360 FA0C59AC 0 36 JNEZ R0 FERRORPFM jump if protected from modification 07361 5CA47362 2 37 LDPC FREQCNTLT(R2) goto proper routine 38 * --- 39 40 ********************************************************************************** 41 * * 42 * The following are definitions defining bit positions with * 43 * particular access codes. The upper 15 bits of the jump table * 44 * address contains the access codes that restrict the individual * 45 * file control operations. * 46 * * 47 ********************************************************************************** 48 80000000 ABS 49 RSTRW EQU 1*BIT FSACSRW 40000000 ABS 50 RSTRO EQU 1*BIT FSACSRO 20000000 ABS 51 RSTAO EQU 1*BIT FSACSAO 10000000 ABS 52 RSTXO EQU 1*BIT FSACSXO 08000000 ABS 53 RSTMW EQU 1*BIT FSACSMW 04000000 ABS 54 RSTDR EQU 1*BIT FSACSDR 01000000 ABS 55 RSTNDA EQU 1*BIT FSACSNDA 56 00007362 57 FREQCNTLT LABEL 07362 00007372 58 VFD ADR CNTLSTATUS 10 - get unit status 07363 00007387 59 VFD ADR CNTLCLEAR 11 - clear unit conditions 07364 350073A5 60 VFD RSTNDA+RSTDR+RSTXO+RSTAO+ADR CNTLREWIND 12 - rewind 07365 7D0073E0 61 VFD RSTNDA+RSTDR+RSTMW+RSTXO+RSTAO+RSTRO+ADR CNTLRELESE 13 - release data 07366 11007570 62 VFD RSTNDA+RSTXO+ADR CNTLSEOD 14 - search to end of data 07367 310074F3 63 VFD RSTNDA+RSTXO+RSTAO+ADR CNTLFWSP 15 - forward space one record 07368 31007512 64 VFD RSTNDA+RSTXO+RSTAO+ADR CNTLBKSP 16 - back space one record 07369 31007535 65 VFD RSTNDA+RSTXO+RSTAO+ADR CNTLSEFF 17 - search forward past file mark 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1598 (FRQCNTL) F 100 FREQ - File Control Processor 0736A 31007555 66 VFD RSTNDA+RSTXO+RSTAO+ADR CNTLSEFB 18 - search backward past file mark 0736B 55007599 67 VFD RSTNDA+RSTDR+RSTXO+RSTRO+ADR CNTLWFM 19 - write file mark 0736C 510075D5 68 VFD RSTNDA+RSTXO+RSTRO+ADR CNTLFORCE 1A - force write 0736D 310059A5 69 VFD RSTNDA+RSTXO+RSTAO+ADR FERRORILOP 1B - select recording density 0736E 510075D3 70 VFD RSTNDA+RSTXO+RSTRO+ADR CNTLWRITMO 1C - write out modified pages of unit 0736F 01007610 71 VFD RSTNDA+ADR CNTLCYCLE 1D - cycle cartridge tape 07370 0100761A 72 VFD RSTNDA+ADR CNTLEPP 1E - return EPP of SAF or RAF 07371 1000738F 73 VFD RSTXO+ADR FRQDEVSTAT 1F - return detailed device error status 00000010 ABS 74 FREQCNTLTL EQU DISPW FREQCNTLT 75 76 END FREQCNTL routine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1599 (FRQCNTL) F 100 FREQ - File Control Processor 78 79 ********************************************************************************** 80 * * 81 * Status gets the status of a logical unit: * 82 * * 83 * LD R0 FRSTATUS * 84 * FREQ unit * 85 * returns: R0=dynamic unit status * 86 * R1=static unit status * 87 * * 88 * if the unit was undefined then an error code is returned in * 89 * R0 (unit not open) and R1 is unchanged. * 90 * * 91 * Stack required = 1 * 92 * 0 + max ( MAKTRMSTAT (1) ) * 93 * * 94 ********************************************************************************** 95 96 BLOCK CNTLSTATUS routine 97 ENTRY CNTLSTATUS 98 00007372 99 CNTLSTATUS LABEL 07372 60096665 0 5 ZBM 100 LD R0 FCB,FCHTYPE status depends on type 07373 64040010 0 IMM 101 CPR R0 HTYPELAST is this a legal type? 07374 FE067384 102 JGE EASYSTATR jump if not recognized 07375 6030737B 0 0 @ 103 LD R0 @STATCNTL(R0) 07376 5CA07377 0 104 LDPC STATJMP(R0) goto status calculating routine 105 * --- 106 00007377 107 STATJMP BASE an entry for each hardware type 07377 00007384 108 EASY VFD ADR EASYSTATR devices that just get FCB status 07378 00007380 109 PATHSTAT VFD ADR PATHSTATR dynamic status for a .PATH 07379 0000737C 110 TERMSTAT VFD ADR TERMSTATR dynamic status for a terminal 111 DRCT 00000002 ABS 112 SSIZE EQU (DISPW STATJMP) LOG 2 113 07379 00000000 114 STATCNTLT VFDB SSIZE:EASY,EASY,EASY,EASY undef,SAF,RAF,CODE 07379 00000002 115 VFDB SSIZE:PATHSTAT,EASY,EASY,TERMSTAT PATH,DIR,NULL,TERM 07379 00000000 116 VFDB SSIZE:EASY,EASY,EASY,EASY LOCK,TASK,CDR,LP 0737A 00000000 117 VFDB SSIZE:EASY,EASY,EASY,EASY MT,CT,VOL,VT 0737B 0088737A 118 STATCNTL PTR STATCNTLT 119 120 * Status of a TERM - we check to see if a terminator is 121 * there ( If a read would complete ) and set the load 122 * point bit if the reader would suspend. 123 0000737C 124 TERMSTATR LABEL 0737C 60094F25 0 5 ZBM 125 LD R0 FCB,FCSTATSTAT pick up the static status 0737D E4170803 0 4 BASE 126 ST R0 R4,CAR1 return status in R1 0737E DC404CBA 127 CALLNP MAKTRMSTAT get the dynamic status 0737F FE0E5988 128 JMP UERROR return 129 * --- 130 131 * Status of a .PATH -- we check to see if anything in queue and 132 * set the load point bit if it is empty. 00007380 133 PATHSTATR LABEL 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1600 (FRQCNTL) F 100 FREQ - File Control Processor 07380 60095F16 0 5 ZBM 134 LD R0 FCB,FCDCBPTR get pointer to control block 07381 FA307384 0 135 JZA R0 EASYSTATR some cases might not have control 07382 5C081F11 0 ZBM 136 CMZ R0,PTHQUE anything in the path? 07383 EC494C15 5 ZBM 137 STLEQ FCB,FCLOADPT set load point if empty 138 * \ / 139 140 * Status consists of just fetching the status from the FCB. 141 * \ / 00007384 142 EASYSTATR LABEL 07384 60094F25 0 5 ZBM 143 LD R0 FCB,FCSTATSTAT pick up the static status 07385 E4170803 0 4 BASE 144 ST R0 R4,CAR1 return status in R1 07386 FE0E5982 145 JMP FNOERROR 146 * --- 147 148 END CNTLSTATUS routine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1601 (FRQCNTL) F 100 FREQ - File Control Processor 150 151 ********************************************************************************** 152 * * 153 * The CLEAR request clears an error on a unit: * 154 * * 155 * LD R0 FRCLEAR * 156 * FREQ unit * 157 * returns: R0=dynamic status of unit * 158 * * 159 * Stack required = 0 * 160 * * 161 ********************************************************************************** 162 163 BLOCK CNTLCLEAR routine 164 ENTRY CNTLCLEAR 165 00007387 166 CNTLCLEAR LABEL 07387 EC094445 5 ZBM 167 STZ FCB,FCLASTREAD 07388 FE0E5982 168 JMP FNOERROR 169 * --- 170 171 END CNTLCLEAR routine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1602 (FRQCNTL) F 100 FREQ - File Control Processor 173 174 ********************************************************************************** 175 * * 176 * FRDEVSTAT - return device status * 177 * * 178 * Returns the PPU and controller status of a specific * 179 * hardware device. The unit must be opened to a .CT, .MT, .VT * 180 * or a .VOL. Status will only be returned for a .VOL if * 181 * the disk is maintenance mounted and spinning. * 182 * Call: * 183 * LD R0 FRDEVSTAT * 184 * FREQ * 185 * JLTZ R0 error * 186 * R1 = PPU status * 187 * R2 = controller status * 188 * * 189 * Stack required = 3 * 190 * 0 + max ( FERRORILOP (3) ) * 191 * * 192 ********************************************************************************** 193 194 BLOCK FRQDEVSTAT request 195 ENTRY FRQDEVSTAT 196 00007389 197 LGLDEVTAB LABEL 07389 000059A5 198 VFD ADR(FERRORILOP) return .CDR status 0738A 000059A5 199 VFD ADR(FERRORILOP) return .LP status 0738B 00007395 200 VFD ADR(RTNTAPSTAT) return .MT status 0738C 00007395 201 VFD ADR(RTNTAPSTAT) return .CT status 0738D 0000739B 202 VFD ADR(RTNVOLSTAT) return .VOL status 0738E 00007395 203 VFD ADR(RTNTAPSTAT) return .VT status 00000006 ABS 204 LGLDEVMAX EQU DISPW LGLDEVTAB 205 0000738F 206 FRQDEVSTAT LABEL 0738F 60096665 0 5 ZBM 207 LD R0 FCB,FCHTYPE pick up the type of device 07390 1004000A 0 IMM 208 SUB R0 HTYPECDR convert type to index 07391 68040006 0 IMM 209 UCPR R0 LGLDEVMAX within range? 07392 FE0659A5 210 JGE FERRORILOP this device type is not legal 07393 60495F16 1 5 ZBM 211 LD R1 FCB,FCDCBPTR pointer to device control block 07394 5CA07389 0 212 LDPC LGLDEVTAB(R0) goto appropriate routine 213 * --- 214 00007395 215 RTNTAPSTAT LABEL 07395 60095835 0 5 ZBM 216 LD R0 FCB,FCACCESS get current open access 07396 64040007 0 IMM 217 CPR R0 FSACSNDA is the access no-data 07397 FE0259A5 218 JEQ FERRORILOP illegal request if so 07398 6216480A 011 BASE 219 LD2 R0 R1,MTUPPUSTAT get the PPU and controller status 07399 E6170803 014 BASE 220 ST2 R0 R4,CAR1 put into caller's registers 0739A FE0E5982 221 JMP FNOERROR 222 * --- 223 0000739B 224 RTNVOLSTAT LABEL 0739B 5C084E10 1 ZBM 225 CMZ R1,VOLNMAIM is volume maintenance mounted 0739C FE0259A5 226 JEQ FERRORILOP illegal request if not 0739D 60485F15 1 1 ZBM 227 LD R1 R1,VOLNHCB pointer to MDV element 0739E FA7073A3 1 228 JZA R1 RTNDEVNRDY disk could of spun down 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1603 (FRQCNTL) F 100 FREQ - File Control Processor 0739F 6216480B 011 BASE 229 LD2 R0 R1,MDVLOPSTAT get last operation statuses 073A0 E4170804 0 4 BASE 230 ST R0 R4,CAR2 return controller status 073A1 E4570803 1 4 BASE 231 ST R1 R4,CAR1 and return PPU status 073A2 FE0E5982 232 JMP FNOERROR 233 * --- 234 000073A3 235 RTNDEVNRDY LABEL 073A3 600400AE 0 IMM 236 LD R0 XREQERDNR device not ready, probably offline 073A4 FE0E5983 237 JMP FERROR give news to caller 238 * --- 239 240 END FRQDEVSTAT request 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1604 (FRQCNTL) F 100 FREQ - File Control Processor 242 243 ********************************************************************************** 244 * * 245 * Rewind (place device at load point) the specified * 246 * device. Only works on some devices and the others give * 247 * errors. Additionally, the standard input device (especially) * 248 * and other units reserved for CM may only be rewound by CM. * 249 * Request form: * 250 * LD R0 FRREWIND * 251 * FREQ unit * 252 * JLTZ R0 * 253 * * 254 * Stack required = 3 * 255 * 0 + max ( CHECK4CM (1), DOREWIND (3) ) * 256 * * 257 ********************************************************************************** 258 259 BLOCK CNTLREWIND routine 260 ENTRY CNTLREWIND 261 000073A5 262 CNTLREWIND LABEL 073A5 60096665 0 5 ZBM 263 LD R0 FCB,FCHTYPE fetch the hardware type 073A6 5C3073AE 0 @ 264 CMZ @CNTLRWLGLP(R0) check for legal request 073A7 FE0259A5 265 JEQ FERRORILOP jump if not recognized on this device 073A8 DC405B55 266 CALLNP CHECK4CM make sure only CM is diddling with its units 073A9 FA0C5983 0 267 JNEZ R0 FERROR jump if someone else is trying 268 * \ / 269 073AA DC4073B2 270 CALLNP DOREWIND okay, go do it 073AB EC097215 5 ZBM 271 STZ FCB,FCOPWRITE indicate last op not write 073AC FE0E5983 272 JMP FERROR return to caller 273 * --- 274 70000000 ABS 275 CNLGL1 EQU 1*(BIT HTYPESAF)+1*(BIT HTYPERAF)+1*(BIT HTYPECODE) 06200000 ABS 276 CNLGL2 EQU 1*(BIT HTYPENULL)+1*(BIT HTYPEDIR)+1*(BIT HTYPECDR) 000D0000 ABS 277 CNLGL3 EQU 1*(BIT HTYPEMT)+1*(BIT HTYPECT)+1*(BIT HTYPEVT) 073AD 762D0000 278 CNTLRWLGL VFD CNLGL1+CNLGL2+CNLGL3 mask for legal devices 073AE 004873AD 279 CNTLRWLGLP PTR CNTLRWLGL/BIT 0 280 281 END CNTLREWIND routine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1605 (FRQCNTL) F 100 FREQ - File Control Processor 283 284 ********************************************************************************** 285 * * 286 * Routine to do a rewind. Note the special check for .MTs, CTs, * 287 * and .VTs that if the no-rewind bit is set we skip the rewind, * 288 * most useful on opens and closes. The additional entry DOREWINDA * 289 * ignores the no-rewind bit and always attempts the rewind. * 290 * Call: * 291 * CALLNP DOREWIND/DOREWINDA * 292 * returns, R0 = error code or zero * 293 * * 294 * Eats R0:R4 * 295 * Stack required = 3 * 296 * 1 + max ( MTCHKWFM (2), MTREQUEST (1) ) * 297 * * 298 ********************************************************************************** 299 300 BLOCK DOREWIND subroutine 301 ENTRY DOREWIND 302 ENTRY DOREWINDA 303 304 BEGFRAME 305 ENDFRAME 306 073AF DD5F8001 6 STAK 307 DOREWINDA ENTRNP PUSH 073B0 EDCBC010 7 CBM 308 STW R7/BIT 0 always attempt the rewind 073B1 FE0E73B4 309 JMP REWNDSHR share code 310 * --- 311 073B2 DD5F8001 6 STAK 312 DOREWIND ENTRNP PUSH 073B3 EC0BC010 7 CBM 313 STZ R7/BIT 0 rewind based on bit in request code 314 * \ / 315 000073B4 316 REWNDSHR LABEL 073B4 60096665 0 5 ZBM 317 LD R0 FCB,FCHTYPE fetch the hardware type 073B5 68040010 0 IMM 318 UCPR R0 HTYPELAST check against highest allowed rewind 073B6 FE0673CD 319 JGE DORWNDXIT skip function and exit if too big 073B7 5CA073B8 0 320 LDPC DORWNDTAB(R0) go to proper routine for device 321 * --- 322 000073B8 323 DORWNDTAB LABEL 073B8 000073CD 324 VFD ADR DORWNDXIT undefined 073B9 000073C8 325 VFD ADR DORWNDSAF .SAF 073BA 000073CF 326 VFD ADR DORWNDRAF .RAF 073BB 000073CF 327 VFD ADR DORWNDRAF .CODE 073BC 000073CD 328 VFD ADR DORWNDXIT .PATH 073BD 000073CC 329 VFD ADR DORWNDLDPT .DIR 073BE 000073CC 330 VFD ADR DORWNDLDPT .NULL 073BF 000073CC 331 VFD ADR DORWNDLDPT .TERM 073C0 000073CC 332 VFD ADR DORWNDLDPT .LOCK 073C1 000073C8 333 VFD ADR DORWNDSAF .TASK 073C2 000073C8 334 VFD ADR DORWNDSAF .CDR 073C3 000073CD 335 VFD ADR DORWNDXIT .LP 073C4 000073D3 336 VFD ADR DORWNDMT .MT 073C5 000073D3 337 VFD ADR DORWNDMT .CT 073C6 000073CD 338 VFD ADR DORWNDXIT .VOL 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1606 (FRQCNTL) F 100 FREQ - File Control Processor 073C7 000073D3 339 VFD ADR DORWNDMT .VT 00000010 ABS 340 HTABL EQU DISPW DORWNDTAB length of jump table 341 ASSERTEQ HTABL,HTYPELAST 341 BSS HTABL-HTYPELAST error if HTABL < HTYPELAST 341 BSS HTYPELAST-HTABL error if HTYPELAST < HTABL 342 343 * Rewind a sequential file 000073C8 344 DORWNDSAF LABEL 073C8 EC174808 5 BASE 345 STZ FCB,FCCPP set back to first location 073C9 60097182 0 5 ZBM 346 LD R0 FCB,FCLPBLK get the load point blocks MS address 073CA E4095181 0 5 ZBM 347 ST R0 FCB,FCMSBLK set current block 073CB EC094445 5 ZBM 348 STZ FCB,FCLASTREAD clear out last record status 349 * \ / 350 000073CC 351 DORWNDLDPT LABEL 073CC EDC94C15 5 ZBM 352 STW FCB,FCLOADPT indicate back at load point 353 * \ / 354 000073CD 355 DORWNDXIT LABEL 073CD 60040000 0 IMM 356 LD R0 0 indicate no error 357 * \ / 358 000073CE 359 LEAVENOW LABEL 073CE 5D1F8001 6 STAK 360 LEAVE POP return to caller 361 * --- 362 363 * Rewind a random access file 000073CF 364 DORWNDRAF LABEL 073CF EDC95C16 5 ZBM 365 STW FCB,FCRESEEK say to follow access tree anew 073D0 EC174808 5 BASE 366 STZ FCB,FCCPP go to the first character 073D1 EC094445 5 ZBM 367 STZ FCB,FCLASTREAD clear out last record status 073D2 FE0E73CC 368 JMP DORWNDLDPT set load point bit and flee 369 * --- 370 000073D3 371 DORWNDMT LABEL 073D3 60000412 0 372 LD R0 CPPSA current session status area 073D4 60081F11 0 0 ZBM 373 LD R0 R0,PSCACHNP1 callers console area 073D5 F7C073D8 7 374 JBT R7/BIT 0 ALWAYSRWND do the rewind regardless 073D6 5C082212 0 ZBM 375 CMZ R0,CAR0/XRFLDNRWD no rewind bit set? 073D7 FE0C73CD 376 JNE DORWNDXIT if set, skip doing the rewind 377 * \ / 378 000073D8 379 ALWAYSRWND LABEL 073D8 61095F16 4 5 ZBM 380 LD R4 FCB,FCDCBPTR get pointer to MTU 073D9 FB3073CD 4 381 JZA R4 DORWNDXIT jump if device does not exist 073DA DC4065A6 382 CALLNP MTCHKWFM write file marks if needed 073DB DC00658A 383 CALL MTREQUEST call to do a request 073DC 40440001 IMM 384 PARVL MTURQREW the request 385 * R0 <= error code or zero if no error 073DD EC094445 5 ZBM 386 STZ FCB,FCLASTREAD indicate no record read 073DE EDC94C15 5 ZBM 387 STW FCB,FCLOADPT we should be at load point 073DF FE0E73CE 388 JMP LEAVENOW do what the label says 389 * --- 390 391 END DOREWIND subroutine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1607 (FRQCNTL) F 100 FREQ - File Control Processor 393 394 ********************************************************************************** 395 * * 396 * Release the data on the specified device. A new load point * 397 * block is acquired, the FCB is updated, the FD is updated if the * 398 * file is saved, then the old file is released. The device always * 399 * ends up at load point. Request format: * 400 * * 401 * LD R0 FRRELEASE * 402 * FREQ unit * 403 * JLTZ R0 * 404 * * 405 * Stack required = 15 * 406 * 3 + max ( DMOTEWNDO2 (7), DOREWINDA (3), FERRORILOP (3), * 407 * FNOERROR (3), FORCEWRW1 (5), FREEDIR (5), * 408 * FREEFILE (3), GETFREEW1 (6), GRUBWNDO1 (7), * 409 * LIMITCHECK (1), PLACEEOD (0), RAFCURCHEK (1), * 410 * SRCHDIRSN (11), UNMAPFILE (12), WSXCLNALL (10) ) * 411 * * 412 ********************************************************************************** 413 414 BLOCK CNTLRELESE routine 415 ENTRY CNTLRELESE 416 417 BEGFRAME2 00178800 6 BASE 418 BLKNUM BSS 2 00178801 6 BASE 419 BLKTYPE EQU BLKNUM(1) 00178802 6 BASE 420 FILSIZE BSS 1 421 ENDFRAME 422 000073E0 423 CNTLRELESE LABEL 073E0 EC1F8003 6 STAK 424 STZ PUSH allocate stack frame 073E1 DC405EE3 425 CALLNP UNMAPFILE disassociate any file pages 073E2 60D34000 3 5 REG 426 LD R3 FCB pass the file control block address 073E3 DC4032EA 427 CALLNP WSXCLNALL remove file from working set 073E4 DC4073AF 428 CALLNP DOREWINDA reposition to load point 073E5 EDC97215 5 ZBM 429 STW FCB,FCOPWRITE indicate last op write 073E6 60096665 0 5 ZBM 430 LD R0 FCB,FCHTYPE get the hardware type 073E7 68040010 0 IMM 431 UCPR R0 HTYPELAST check to see if within range we understand 073E8 FE0659A5 432 JGE FERRORILOP jump if not, illegal operation 073E9 5CA073EA 0 433 LDPC CNTLRELTAB(R0) okay, go to the proper routine 434 * --- 435 000073EA 436 CNTLRELTAB LABEL 073EA 000059A5 437 VFD ADR FERRORILOP undefined hardware type 073EB 0000741A 438 VFD ADR DORELSSAF .SAF 073EC 000073FA 439 VFD ADR DORELSRAF .RAF 073ED 00007418 440 VFD ADR DORELSCODE .CODE 073EE 000059A5 441 VFD ADR FERRORILOP .PATH 073EF 000059A5 442 VFD ADR FERRORILOP .DIR 073F0 00005982 443 VFD ADR FNOERROR .NULL 073F1 000059A5 444 VFD ADR FERRORILOP .TERM 073F2 000059A5 445 VFD ADR FERRORILOP .LOCK 073F3 0000741A 446 VFD ADR DORELSSAF .TASK 073F4 000059A5 447 VFD ADR FERRORILOP .CDR 073F5 000059A5 448 VFD ADR FERRORILOP .LP 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1608 (FRQCNTL) F 100 FREQ - File Control Processor 073F6 00005982 449 VFD ADR FNOERROR .MT 073F7 00005982 450 VFD ADR FNOERROR .CT 073F8 000059A5 451 VFD ADR FERRORILOP .VOL 073F9 00005982 452 VFD ADR FNOERROR .VT 00000010 ABS 453 HTABL EQU DISPW CNTLRELTAB length of jump table 454 ASSERTEQ HTABL,HTYPELAST 454 BSS HTABL-HTYPELAST error if HTABL < HTYPELAST 454 BSS HTYPELAST-HTABL error if HTYPELAST < HTABL 455 000073FA 456 DORELSRAF LABEL 073FA EC178802 6 BASE 457 STZ SP,FILSIZE released file has length of zero 073FB EDC95C16 5 ZBM 458 STW FCB,FCRESEEK cause later use to re-index 073FC DC406CDF 459 CALLNP RAFCURCHEK make sure file is up to date 073FD 60095826 0 5 ZBM 460 LD R0 FCB,FCRAFTYPE get the type of the RAF 073FE FA025982 0 461 JEQZ R0 FNOERROR nothing to release if empty 073FF 6070637F 1 0 @ 462 LD R1 @RAFFBITABP(R0) pick up the proper FBI type 07400 E4578801 1 6 BASE 463 ST R1 SP,BLKTYPE and save for later 07401 60574801 1 5 BASE 464 LD R1 FCB,FCBLOCK get the volume number 07402 5D606CEC 0 465 XCT RAFROOTGET(R0) pick up the root block 07403 E40A5180 0 1 CBM 466 ST R0 R1/MSBLKFIELD and put in with the volume number 07404 E4578800 1 6 BASE 467 ST R1 SP,BLKNUM save this, too 468 * \ / 07405 5C096415 5 ZBM 469 CMZ FCB,FCSAVED is it a saved file? 07406 FE02740F 470 JEQ RAFNOTSAVD jump if the raf is not saved 471 * \ / 07407 DC0082BB 472 CALL SRCHDIRSN need to update the FDE 07408 40007448 473 PARL DORELSSDEX where to go if error 07409 FE02740B 474 JEQ RAFFOUND jump if we found it 0740A 00131142 475 HALT HALTS1142 saved file dir entry disappeared 476 * --- 477 0000740B 478 RAFFOUND LABEL 0740B EC08D185 3 ZBM 479 STZ R3,FDDA no more root block 0740C EC08D186 3 ZBM 480 STZ R3,FDLEN length is now zero 0740D 60040000 0 IMM 481 LD R0 RAFTEMPTY now is an empty RAF 0740E E408FC20 0 3 ZBM 482 ST R0 R3,FDRAFTYPE set this field 483 * \ / 484 0000740F 485 RAFNOTSAVD LABEL 0740F EC095181 5 ZBM 486 STZ FCB,FCMSBLK this block is gone 07410 EC097182 5 ZBM 487 STZ FCB,FCLPBLK this block is gone 07411 EC096183 5 ZBM 488 STZ FCB,FCMABLK this block is gone 07412 EC174807 5 BASE 489 STZ FCB,FCEPP end position is nowhere 07413 60040000 0 IMM 490 LD R0 RAFTEMPTY now is an empty RAF 07414 E4095826 0 5 ZBM 491 ST R0 FCB,FCRAFTYPE set this field 07415 5C096415 5 ZBM 492 CMZ FCB,FCSAVED do we have a directory to free 07416 FE02743B 493 JEQ NOTSAVEDX if not then go free the file 07417 FE0E7437 494 JMP DORELDIR release the directory 495 * --- 496 00007418 497 DORELSCODE LABEL 07418 60840013 2 IMM 498 LD R2 FBITCCB 07419 FE0E741B 499 JMP DORSHARE 500 * --- 501 0000741A 502 DORELSSAF LABEL 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1609 (FRQCNTL) F 100 FREQ - File Control Processor 0741A 6084000C 2 IMM 503 LD R2 FBITSAF 504 * \ / 505 0000741B 506 DORSHARE LABEL share code for release 0741B EDD78802 6 BASE 507 STW SP,FILSIZE save size of released file 0741C 60097182 0 5 ZBM 508 LD R0 FCB,FCLPBLK 0741D 60574801 1 5 BASE 509 LD R1 FCB,FCBLOCK get word with volume number 0741E E40A5180 0 1 CBM 510 ST R0 R1/MSBLKFIELD combine load point block with volume num 0741F E6578800 126 BASE 511 ST2 R1 SP,BLKNUM save volatile registers 512 07420 DC005C5B 513 CALL GETFREEW1 get a free block in window 1 07421 41528000 2 REG 514 PARV R2 type of block 07422 40440000 IMM 515 PARVL 0 relative block number 07423 FE0E744B 516 JMP DORDSKFULL pass error back 07424 E4097182 0 5 ZBM 517 ST R0 FCB,FCLPBLK save number of new lp block 07425 EC096183 5 ZBM 518 STZ FCB,FCMABLK indicate not a large RAF 07426 60096665 0 5 ZBM 519 LD R0 FCB,FCHTYPE get device type 07427 64040001 0 IMM 520 CPR R0 HTYPESAF is it a SAF? 07428 FE0C742B 521 JNE NOTSAF jump if not 07429 DC406AE9 522 CALLNP PLACEEOD if so, put an EOD on it 0742A FE0E742D 523 JMP AFTERTYPE 524 * --- 525 0000742B 526 NOTSAF LABEL 0742B 60020200 0 IMM 527 LD R0 1*BIT CAIMALLXR 0742C E4000BFB 0 528 ST R0 WNDO1/CCBINFO/CCBPREGS/CAINTMASK 0000742D 529 AFTERTYPE LABEL 0742D DC40319D 530 CALLNP FORCEWRW1 force out the new LP block 0742E 5C096415 5 ZBM 531 CMZ FCB,FCSAVED is the file saved? 0742F FE02743A 532 JEQ NOTSAVED jump if not 07430 DC0082BB 533 CALL SRCHDIRSN else find the directory entry 07431 40007448 534 PARL DORELSSDEX where to go if error 07432 FE027434 535 JEQ DORFDFND jump if file found 07433 00131140 536 HALT HALTS1140 saved file not found in directory 537 * --- 538 00007434 539 DORFDFND LABEL 07434 60097182 0 5 ZBM 540 LD R0 FCB,FCLPBLK get load point block number 07435 E408D185 0 3 ZBM 541 ST R0 R3,FDDA save in directory 07436 EDC8D186 3 ZBM 542 STW R3,FDLEN file is one block big 00007437 543 DORELDIR LABEL 07437 DC40319D 544 CALLNP FORCEWRW1 rewrite the directory 07438 DC405685 545 CALLNP FREEDIR and free it up 07439 DC40315F 546 CALLNP DMOTEWNDO2 release UDIR1 if large directory 0000743A 547 NOTSAVED LABEL 0743A DC403150 548 CALLNP GRUBWNDO1 unmap block from window 0000743B 549 NOTSAVEDX LABEL 0743B 60938000 2 6 REG 550 LD R2 SP make copy of stack pointer 0743C DC004FEA 551 CALL FREEFILE free up the old file 0743D 41568800 2 BASE 552 PARV R2,BLKNUM pass address 0743E 40568801 2 BASE 553 PARVL R2,BLKTYPE and type 554 0743F 70494182 1 5 ZBM 555 LDN R1 FCB,FCTFL 07440 18578802 1 6 BASE 556 ADD R1 SP,FILSIZE calculate the blocks freed 07441 FA467445 1 557 JGEZ R1 NOLIMCHNG jump if no limit change 07442 61095114 4 5 ZBM 558 LD ULB FCB,FCLIMITPTR load ptr to appropriate ULB 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1610 (FRQCNTL) F 100 FREQ - File Control Processor 07443 DC405C7B 559 CALLNP LIMITCHECK adjust the limits 07444 00131141 560 HALT HALTS1141 error return not possible 00007445 561 NOLIMCHNG LABEL 07445 60178802 0 6 BASE 562 LD R0 SP,FILSIZE size of the released file 07446 E4094182 0 5 ZBM 563 ST R0 FCB,FCTFL set in the FCB 07447 FE0E5982 564 JMP FNOERROR done and successful 565 * --- 566 567 * I can't believe it! A disk error?! Well, just fob the 568 * problem off onto the user. 00007448 569 DORELSSDEX LABEL 07448 6004000B 0 IMM 570 LD R0 FILAEOD get bit indicating abnormal 07449 E4094445 0 5 ZBM 571 ST R0 FCB,FCLASTREAD save as result of this operation 0744A FE0E59A9 572 JMP FERRORFAUR go give caller the error 573 * --- 574 0000744B 575 DORDSKFULL LABEL disk is full 0744B DC403150 576 CALLNP GRUBWNDO1 undo mapping (no disk block, though!) 0744C FE0E59DE 577 JMP UERRORNFSV reflect error to user 578 * --- 579 580 END CNTLRELESE routine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1611 (FRQCNTL) F 100 FREQ - File Control Processor 582 583 ********************************************************************************** 584 * * 585 * DOFWSP. Subroutine to move forward one record in a .SAF. * 586 * It assumes that the FCB passed is a sequential file. The CPP * 587 * is moved unless the record is an end-of-data or an abnormality * 588 * is found. Call: * 589 * * 590 * LD SP => return address stack * 591 * LD FCB => file control block of a sequential file * 592 * CALL DOFWSP * 593 * PARL disk error * 594 * ST R0 inter-record gap chars * 595 * * 596 * Mangles R0 thru R4. The current data block is mapped into * 597 * window 1 but beware that its error address points off into * 598 * the night. * 599 * Stack required = 18 * 600 * 5 + max ( DMOTEWNDO1 (7), GETRECHEAD (13), GRUBWNDO1 (7), * 601 * RFILEMOVE (10), SETWNDO1 (4) ) * 602 * * 603 ********************************************************************************** 604 605 BLOCK DOBKSP and DOFWSP subroutines 606 ENTRY DOBKSP move back on record in a .SAF 607 ENTRY DOFWSP move forward one record in a .SAF 608 609 BEGFRAME 00178801 6 BASE 610 DOFWSPERR BSS 1 user's error address 00178802 6 BASE 611 LASTPOS BSS 2 (double) last good position in file 00178804 6 BASE 612 DOFIRG BSS 1 holds the inter record gap word 613 ENDFRAME 614 0744D DD1F8005 6 STAK 615 DOFWSP ENTR PUSH 0744E C0178801 6 BASE 616 STPL SP,DOFWSPERR 0744F EDCBC010 7 CBM 617 STW R7/BIT 0 set flag saying moving forward 07450 60174808 0 5 BASE 618 LD R0 FCB,FCCPP get current position 00007451 619 DOFWSPSHR LABEL 07451 60574801 1 5 BASE 620 LD R1 FCB,FCBLOCK 07452 E6178802 016 BASE 621 ST2 R0 SP,LASTPOS remember the last good pos 07453 DC003205 622 CALL SETWNDO1 get the current data block in 07454 41440001 IMM 623 PARV VPCNTLRO 07455 41534000 5 REG 624 PARV FCB indicate which unit associated 07456 41007479 625 PAR DISKBAD 07457 41574801 5 BASE 626 PARV FCB,FCBLOCK 07458 4044000C IMM 627 PARVL FBITSAF 07459 5C000800 628 CMZ WNDO1 get any disk error 0745A F7C0745F 7 629 JBT R7/BIT 0 NOTBKSP2 jump if forward spacing 0745B 6047FFFD 1 IMM 630 LD R1 -3 move back into the last record 0745C DC00705B 631 CALL RFILEMOVE 0745D 40007479 632 PARL DISKBAD 0745E 5C000800 633 CMZ WNDO1 get the disk error 0000745F 634 NOTBKSP2 LABEL 0745F DC407034 635 CALLNP GETRECHEAD get the header of the record 07460 FE0E7479 636 JMP DISKBAD 07461 E4178804 0 6 BASE 637 ST R0 SP,DOFIRG save the record header 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1612 (FRQCNTL) F 100 FREQ - File Control Processor 07462 F210746E 0 638 JBF R0/FILTYPE/FILSFLAGB NOTSYSREC 00007463 639 DOFWSPXIT LABEL 07463 F7C07467 7 640 JBT R7/BIT 0 NOTBKSP3 jump if forward spacing 07464 6047FFFD 1 IMM 641 LD R1 -3 if backspacing leave before gap 07465 DC00705B 642 CALL RFILEMOVE 07466 40007479 643 PARL DISKBAD 00007467 644 NOTBKSP3 LABEL 07467 DC40315C 645 CALLNP DMOTEWNDO1 demote current data block from window 00007468 646 DOFWSPXITX LABEL 07468 5C174808 5 BASE 647 CMZ FCB,FCCPP are we now at the load point? 07469 EC494C15 5 ZBM 648 STLEQ FCB,FCLOADPT set status appropriately 0746A 60099044 0 6 ZBM 649 LD R0 SP,DOFIRG/FILTYPE get the type of record 0746B E4094445 0 5 ZBM 650 ST R0 FCB,FCLASTREAD set status to record passed over 0746C 60178804 0 6 BASE 651 LD R0 SP,DOFIRG return the gap to the caller 0746D 5D1F8005 6 STAK 652 LEAVE POP 653 * --- 654 655 * Not a special record so we skip over the data 0000746E 656 NOTSYSREC LABEL 0746E 60499B34 1 6 ZBM 657 LD R1 SP,DOFIRG/FILRLEN get the length of the record 0746F F7C07472 7 658 JBT R7/BIT 0 NOTBKSP4 07470 70524000 1 1 REG 659 LDN R1 R1 for backspace we move a negative length 07471 10440006 1 IMM 660 SUB R1 6 account for gaps at each end 00007472 661 NOTBKSP4 LABEL 07472 DC00705B 662 CALL RFILEMOVE move in the file 07473 40007479 663 PARL DISKBAD 07474 5C000800 664 CMZ WNDO1 07475 DC407034 665 CALLNP GETRECHEAD get the info at the other end 07476 FE0E7479 666 JMP DISKBAD 07477 64178804 0 6 BASE 667 CPR R0 SP,DOFIRG do beginning and end match? 07478 FE027463 668 JEQ DOFWSPXIT if they do we're done 669 * \ / 670 671 * The disk was bad so we tell the caller that it can't be done. 00007479 672 DISKBAD LABEL 07479 DC403150 673 CALLNP GRUBWNDO1 unmap useless window 0747A 62178802 016 BASE 674 LD2 R0 SP,LASTPOS restore position info 0747B E4174808 0 5 BASE 675 ST R0 FCB,FCCPP record last known good position offset 0747C E4495181 1 5 ZBM 676 ST R1 FCB,FCMSBLK and block number 0747D 61D78801 7 6 BASE 677 LD R7 SP,DOFWSPERR set up funny return address 0747E 5D1F8005 6 STAK 678 LEAVE POP return to his error address 679 * --- 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1613 (FRQCNTL) F 100 FREQ - File Control Processor 681 682 ********************************************************************************** 683 * * 684 * DOBKSP. Just like forward space except we move backward * 685 * in the sequential file. * 686 * Call: * 687 * LD SP => return addr stack * 688 * LD FCB => control block of sequential file * 689 * CALL DOBKSP * 690 * PARL disk error * 691 * ST R0 inner record gap chars * 692 * * 693 * Mangles R0 thru R4. * 694 * Stack required = 18 (see DOFWSP) * 695 * * 696 ********************************************************************************** 697 0747F DD1F8005 6 STAK 698 DOBKSP ENTR PUSH 07480 C0178801 6 BASE 699 STPL SP,DOFWSPERR 07481 EC0BC010 7 CBM 700 STZ R7/BIT 0 flag to say backspacing 07482 60174808 0 5 BASE 701 LD R0 FCB,FCCPP get current position 07483 FA0C7451 0 702 JNEZ R0 DOFWSPSHR jump if okay to backspace 703 * \ / at load point 07484 EC178804 6 BASE 704 STZ SP,DOFIRG initialize IRG type 07485 FE0E7468 705 JMP DOFWSPXITX and exit to shared code 706 * --- 707 708 END DOBKSP and DOFWSP subroutines 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1614 (FRQCNTL) F 100 FREQ - File Control Processor 710 711 ********************************************************************************** 712 * * 713 * FWSPRAF * 714 * * 715 * Subroutine that will forward space one record in a * 716 * sequential format RAF. * 717 * Call: * 718 * FCB -> FCB of RAF * 719 * CALL FWSPRAF * 720 * PARL error * 721 * * 722 * Eats R0:R3. * 723 * Stack required = 15 * 724 * 3 + max ( DMOTEWNDO1 ( 7), GETNXTBLK (12), GRUBWNDO1 (7), * 725 * RSEEK (10) ) * 726 * * 727 ********************************************************************************** 728 729 BLOCK FWSPRAF and BKSPRAF routines 730 731 ENTRY FWSPRAF 732 ENTRY BKSPRAF 733 734 BEGFRAME2 00178800 6 BASE 735 LASTPOS BSS 2 last position (for error recovery) 736 * word one = FCMSBLK 737 * word two = FCCPP 00178802 6 BASE 738 ERRADR BSS 1 where to go if error 739 ENDFRAME 740 07486 DD1F8003 6 STAK 741 FWSPRAF ENTR PUSH 07487 C0178802 6 BASE 742 STPL SP,ERRADR save the error address 07488 60895181 2 5 ZBM 743 LD R2 FCB,FCMSBLK and current block 07489 60D74808 3 5 BASE 744 LD R3 FCB,FCCPP get the current position 0748A E6978800 236 BASE 745 ST2 R2 SP,LASTPOS save away 0748B 68D74807 3 5 BASE 746 UCPR R3 FCB,FCEPP are we already beyond the end? 0748C FE0474D1 747 JGT FWSPAEOD abnormal if so 0748D FE0274B5 748 JEQ EASYOUT out of here the easy way 749 * \ / 750 0748E DC006F97 751 CALL GETNXTBLK get the current data block 0748F 400074D1 752 PARL FWSPAEOD error address for positioned in a hole 753 07490 60D74808 3 5 BASE 754 LD R3 FCB,FCCPP get current position 07491 704AE8C0 1 3 CBM 755 LDN R1 R3/BYTEDISP byte displacement into current block 07492 18441000 1 IMM 756 ADD R1 CPP number of bytes remaining on the page 07493 600AE8C0 0 3 CBM 757 LD R0 R3/BYTEDISP pick up the byte displacement on the page 07494 600A3C00 0 0 CBM 758 LD R0 R0*FLDCHARS turn into a character address 07495 18040800 0 IMM 759 ADD R0 ADR WNDO1 calc addr of first byte to move 760 * \ / 761 00007496 762 LOOKFORLF LABEL 07496 18D24000 3 1 REG 763 ADD R3 R1 keep current position current 07497 68D74807 3 5 BASE 764 UCPR R3 FCB,FCEPP have we exceeded the entire file 07498 FE0A749C 765 JLE STILLMORE jump if still more 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1615 (FRQCNTL) F 100 FREQ - File Control Processor 07499 60D74807 3 5 BASE 766 LD R3 FCB,FCEPP don't let CPP go beyond EPP 0749A 60574808 1 5 BASE 767 LD R1 FCB,FCCPP get the current position 0749B 3052C000 1 3 REG 768 RSB R1 R3 don't look beyond the end 0000749C 769 STILLMORE LABEL 0749C 6084000A 2 IMM 770 LD R2 LF the terminator 0749D FE560000 771 CSRCH look for it 0749E FE0274A7 772 JEQ FOUNDLF jump if it was found 773 * \ / 774 0749F 68D74807 3 5 BASE 775 UCPR R3 FCB,FCEPP are we to the end? 074A0 FE0674D1 776 JGE FWSPAEOD abnormal EOD if so 074A1 DC006F97 777 CALL GETNXTBLK get the current data block 074A2 400074D1 778 PARL FWSPAEOD error address for positioned in a hole 074A3 60D74808 3 5 BASE 779 LD R3 FCB,FCCPP get the current position 074A4 60040800 0 IMM 780 LD R0 ADR WNDO1 point to characters to search 074A5 60441000 1 IMM 781 LD R1 CPP how far to search 074A6 FE0E7496 782 JMP LOOKFORLF 783 * --- 784 000074A7 785 FOUNDLF LABEL 074A7 18C40001 3 IMM 786 ADD R3 1 point us to beyond the LF 000074A8 787 FOUNDLFX LABEL 074A8 10D24000 3 1 REG 788 SUB R3 R1 R3 = position of LF 000074A9 789 ATLOADPNT LABEL 074A9 5C12C000 3 REG 790 CMZ R3 are we at load point 074AA EC494C15 5 ZBM 791 STLEQ FCB,FCLOADPT set load point indicating which 074AB 60040000 0 IMM 792 LD R0 0 assume no last read info 074AC 68D74807 3 5 BASE 793 UCPR R3 FCB,FCEPP are we at the end? 074AD FE0874AF 794 JLT NOTATEND don't set end status if not 074AE 60040009 0 IMM 795 LD R0 FILNEOD get EOD status 000074AF 796 NOTATEND LABEL 074AF E4094445 0 5 ZBM 797 ST R0 FCB,FCLASTREAD set last read status 074B0 E4D74808 3 5 BASE 798 ST R3 FCB,FCCPP set this in the FCB 074B1 DC0070CD 799 CALL RSEEK position us 074B2 410074D1 800 PAR FWSPAEOD error address 074B3 4052C000 3 REG 801 PARVL R3 where we want to be 074B4 DC40315C 802 CALLNP DMOTEWNDO1 clean up after ourselves 000074B5 803 EASYOUT LABEL 074B5 5D1F8003 6 STAK 804 LEAVE POP 805 * --- 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1616 (FRQCNTL) F 100 FREQ - File Control Processor 807 808 ********************************************************************************** 809 * * 810 * BKSPRAF routine * 811 * Same as FWSPRAF routine above except we go the opposite * 812 * direction. * 813 * * 814 ********************************************************************************** 815 074B6 DD1F8003 6 STAK 816 BKSPRAF ENTR PUSH 074B7 C0178802 6 BASE 817 STPL SP,ERRADR save the error address 074B8 60895181 2 5 ZBM 818 LD R2 FCB,FCMSBLK get current block 074B9 60D74808 3 5 BASE 819 LD R3 FCB,FCCPP and current position 074BA E6978800 236 BASE 820 ST2 R2 SP,LASTPOS save away 074BB FAC274A9 3 821 JEQZ R3 ATLOADPNT jump if at load point 822 * \ / 823 074BC 10C40001 3 IMM 824 SUB R3 1 point to the LF 074BD DC006F97 825 CALL GETNXTBLK get the current data block 074BE 400074D1 826 PARL FWSPAEOD error address for positioned in a hole 827 074BF 60D74808 3 5 BASE 828 LD R3 FCB,FCCPP get current position 074C0 704AE8C0 1 3 CBM 829 LDN R1 R3/BYTEDISP how many chars to search 074C1 600AE8C0 0 3 CBM 830 LD R0 R3/BYTEDISP pick up the byte displacement on the page 074C2 600A3C00 0 0 CBM 831 LD R0 R0*FLDCHARS turn into an address 074C3 18040800 0 IMM 832 ADD R0 ADR WNDO1 calc addr of first byte to move 000074C4 833 KEEPLOOKIN LABEL 074C4 18D24000 3 1 REG 834 ADD R3 R1 keep our current position current 074C5 6084000A 2 IMM 835 LD R2 LF the terminator 074C6 FE560000 836 CSRCH look for it 074C7 FE0274A8 837 JEQ FOUNDLFX jump if LF was found 838 * \ / 839 074C8 FAC274A9 3 840 JEQZ R3 ATLOADPNT jump if at load point 074C9 10C40001 3 IMM 841 SUB R3 1 put us to last position on previous page 074CA DC006F97 842 CALL GETNXTBLK get the current data block 074CB 400074D1 843 PARL FWSPAEOD error address for positioned in a hole 844 074CC 60D74808 3 5 BASE 845 LD R3 FCB,FCCPP get the current position 074CD 18C40001 3 IMM 846 ADD R3 1 current position is really first char on 847 * previous page 074CE 6047F000 1 IMM 848 LD R1 -CPP how much to search 074CF 60040C00 0 IMM 849 LD R0 ADR WNDO1(WPP) point to first char beyond our page 074D0 FE0E74C4 850 JMP KEEPLOOKIN 851 * --- 852 853 ********************************************************************************** 854 * * 855 * Various errors will dump us here. They are disk structure * 856 * errors, holes in the file, and CPP exceeding EPP. All give the * 857 * same, good ole Abnormal/Unavailble error. * 858 * Grub the window, and reset FCB pointers as if we were never * 859 * here. Then return to the given error address. * 860 * * 861 ********************************************************************************** 862 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1617 (FRQCNTL) F 100 FREQ - File Control Processor 000074D1 863 FWSPAEOD LABEL 074D1 DC403150 864 CALLNP GRUBWNDO1 dump file page 074D2 62178800 016 BASE 865 LD2 R0 SP,LASTPOS get starting position 074D3 E4095181 0 5 ZBM 866 ST R0 FCB,FCMSBLK reset the original MS block address 074D4 E4574808 1 5 BASE 867 ST R1 FCB,FCCPP reset the current position 074D5 61D78802 7 6 BASE 868 LD R7 SP,ERRADR pick up the error address 074D6 5D1F8003 6 STAK 869 LEAVE POP 870 * --- 871 872 END of FWSPRAF and BKSPRAF routine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1618 (FRQCNTL) F 100 FREQ - File Control Processor 874 875 ********************************************************************************** 876 * * 877 * DOFWSPATH. This routine advance one record through * 878 * the .PATH. This routine is capable of suspending itself * 879 * if there are no records to read or no writers that have * 880 * opened the .PATH. Call: * 881 * * 882 * FCB <= .PATH file control block * 883 * CALLNP DOFWSPATH * 884 * ST R0 * 885 * * 886 * Eats R1, R3:R4 * 887 * Sets R0 * 888 * Stack required = 6 * 889 * 1 + max ( CHKPTHREC (5), DQUEONE (4), SFREEMEM (0), * 890 * ULINKPTHR (1) ) * 891 * * 892 ********************************************************************************** 893 894 BLOCK DOFWSPATH subroutine 895 ENTRY DOFWSPATH 896 897 BEGFRAME 898 ENDFRAME 899 074D7 DD5F8001 6 STAK 900 DOFWSPATH ENTRNP PUSH 074D8 60095835 0 5 ZBM 901 LD R0 FCB,FCACCESS only readers may FWSP 074D9 F23E74EF 0 902 JBF R0/FSACSNWB ILLFWSP if writer give illegal request error 074DA 60094445 0 5 ZBM 903 LD R0 FCB,FCLASTREAD get the last record read 074DB F23874DD 0 904 JBF R0/FILSFLAGB NOTSYSREC jump if not a system record 074DC F63E74F1 0 905 JBT R0/FILEODB REREADERR attempted reread at EOD 906 * \ / 907 000074DD 908 NOTSYSREC LABEL 074DD 61095F16 4 5 ZBM 909 LD R4 FCB,FCDCBPTR pointer to the hardware control block 000074DE 910 FWSPLOOP LABEL 074DE DC40714F 911 CALLNP CHKPTHREC any records attached yet 074DF FE0E74EE 912 JMP WORKDONE error or zero if writers went away 913 * PTHLOCK locked, R3 <= message element 074E0 DC407179 914 CALLNP ULINKPTHR unlink the path record 915 PUNLOCK R4,PTHLOCK release hold of the .PATH 074E1 EC170807 4 BASE 915 STZ R4,PTHLOCK 074E2 0C800000 915 ION 074E3 5C08C011 3 ZBM 916 CMZ R3,PTHECONTN is this a continuation element 074E4 DC002F5D 917 CALL SFREEMEM return the message block 074E5 4148D640 3 ZBM 918 PARV R3,PTHELOGL log 2 of the block size 074E6 4052C000 3 REG 919 PARVL R3 address of the block 074E7 FE0C74DE 920 JNE FWSPLOOP jump to read rest of the record 921 * \ / 922 074E8 DC00354F 923 CALL DQUEONE release any waiting writers 074E9 41001DB2 924 PAR SQPATHWAIT which queue to look in 074EA 60130000 0 4 REG 925 LD R0 R4 address of .PATH control block 074EB 7C030000 0 IMM 926 IOR R0 080000000 indicate we want writers 074EC 40520000 0 REG 927 PARVL R0 and pass the parameter 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1619 (FRQCNTL) F 100 FREQ - File Control Processor 074ED 60040000 0 IMM 928 LD R0 0 indicate no errors 929 * \ / 930 000074EE 931 WORKDONE LABEL 074EE 5D1F8001 6 STAK 932 LEAVE POP 933 * --- 934 000074EF 935 ILLFWSP label 074EF 60040091 0 IMM 936 LD R0 XREQERILOP indicate illegal request 074F0 FE0E74EE 937 JMP WORKDONE give error to user 938 000074F1 939 REREADERR LABEL 074F1 600400A4 0 IMM 940 LD R0 XREQERREOD indicate reread at EOD 074F2 FE0E74EE 941 JMP WORKDONE give error to user 942 * --- 943 944 END DOFWSPATH subroutine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1620 (FRQCNTL) F 100 FREQ - File Control Processor 946 947 ********************************************************************************** 948 * * 949 * FWSP. Move forward one record. * 950 * Stack required = 18 * 951 * 0 + max ( DOFWSP (18), DOFWSPATH (6), FWSPRAF (15), * 952 * MTREQUEST (1), SETMTSTAT (1) ) * 953 * * 954 ********************************************************************************** 955 956 BLOCK CNTLFWSP routine 957 ENTRY CNTLFWSP 958 000074F3 959 CNTLFWSP LABEL 074F3 EC097215 5 ZBM 960 STZ FCB,FCOPWRITE indicate last op not write 074F4 60096665 0 5 ZBM 961 LD R0 FCB,FCHTYPE get the hardware file type 074F5 64040001 0 IMM 962 CPR R0 HTYPESAF check for a .SAF 074F6 FE02750A 963 JEQ FWSPSAF 074F7 64040002 0 IMM 964 CPR R0 HTYPERAF check fo a RAF 074F8 FE02750D 965 JEQ FWSPARAF 074F9 6404000C 0 IMM 966 CPR R0 HTYPEMT check for a MT 074FA FE027501 967 JEQ FWSPMT 074FB 6404000F 0 IMM 968 CPR R0 HTYPEVT check for a VT 074FC FE027501 969 JEQ FWSPMT 074FD 64040004 0 IMM 970 CPR R0 HTYPEPATH check if a .PATH 074FE FE027510 971 JEQ PATHFWSP 074FF 6404000D 0 IMM 972 CPR R0 HTYPECT check for a CT 07500 FE0C59A5 973 JNE FERRORILOP jump if not a good type 974 * \ / fall through for cartridge tape 975 00007501 976 FWSPMT LABEL 07501 61095F16 4 5 ZBM 977 LD R4 FCB,FCDCBPTR get pointer to MTU 07502 DC00658A 978 CALL MTREQUEST call to do the request 07503 40440004 IMM 979 PARVL MTURQFWSP indicate a forward space 07504 60491810 1 4 ZBM 980 LD R1 R4,MTUEOF 07505 1C440008 1 IMM 981 MUL R1 FILEOF 07506 E4494445 1 5 ZBM 982 ST R1 FCB,FCLASTREAD 07507 DC40659C 983 CALLNP SETMTSTAT call to set the status 07508 E4494445 1 5 ZBM 984 ST R1 FCB,FCLASTREAD set last record type to EOD if present 07509 FE0E5983 985 JMP FERROR return with error code in R0 986 * --- 987 0000750A 988 FWSPSAF LABEL 0750A DC00744D 989 CALL DOFWSP move forward 0750B 40007552 990 PARL CNTLSEFFDE 0750C FE0E5982 991 JMP FNOERROR 992 * --- 993 0000750D 994 FWSPARAF LABEL 0750D DC007486 995 CALL FWSPRAF move forward 0750E 40007552 996 PARL CNTLSEFFDE 0750F FE0E5982 997 JMP FNOERROR 998 * --- 999 00007510 1000 PATHFWSP LABEL 07510 DC4074D7 1001 CALLNP DOFWSPATH forward space one record 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1621 (FRQCNTL) F 100 FREQ - File Control Processor 07511 FE0E5983 1002 JMP FERROR give good return 1003 * --- 1004 1005 END CNTLFWSP routine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1622 (FRQCNTL) F 100 FREQ - File Control Processor 1007 1008 ********************************************************************************** 1009 * * 1010 * BKSP. Move backward one record. Do nothing if at load point. * 1011 * Stack required = 18 * 1012 * 0 + max ( BKSPRAF (15), CHECK4CM (1), DOBKSP (18), * 1013 * MTCHKWFM (2), MTREQUEST (1), SETMTSTAT (1) ) * 1014 * * 1015 ********************************************************************************** 1016 1017 BLOCK CNTLBKSP routine 1018 ENTRY CNTLBKSP 1019 00007512 1020 CNTLBKSP LABEL 07512 DC405B55 1021 CALLNP CHECK4CM make sure only CM is diddling with its units 07513 FA0C5983 0 1022 JNEZ R0 FERROR jump if someone else is trying 1023 * \ / 07514 60096665 0 5 ZBM 1024 LD R0 FCB,FCHTYPE 07515 64040001 0 IMM 1025 CPR R0 HTYPESAF check for a SAF 07516 FE027529 1026 JEQ BKSPSAF jump if a SAF 07517 64040002 0 IMM 1027 CPR R0 HTYPERAF check for a RAF 07518 FE02752F 1028 JEQ BKSPARAF jump if a RAF 07519 6404000C 0 IMM 1029 CPR R0 HTYPEMT check for a MT 0751A FE02751F 1030 JEQ BKSPMT jump if a MT 0751B 6404000F 0 IMM 1031 CPR R0 HTYPEVT check for a VT 0751C FE02751F 1032 JEQ BKSPMT jump if a VT 0751D 6404000D 0 IMM 1033 CPR R0 HTYPECT check for a CT 0751E FE0C59A5 1034 JNE FERRORILOP give error if not legal type 1035 * \ / fall through if CT 0000751F 1036 BKSPMT LABEL 0751F 61095F16 4 5 ZBM 1037 LD R4 FCB,FCDCBPTR load the MTU pointer 07520 DC4065A6 1038 CALLNP MTCHKWFM 07521 DC00658A 1039 CALL MTREQUEST call to do a request 07522 40440005 IMM 1040 PARVL MTURQBKSP indicate a backspace 07523 60491810 1 4 ZBM 1041 LD R1 R4,MTUEOF 07524 1C440008 1 IMM 1042 MUL R1 FILEOF 07525 E4494445 1 5 ZBM 1043 ST R1 FCB,FCLASTREAD 07526 DC40659C 1044 CALLNP SETMTSTAT check out the status 07527 FEC00000 1045 NOP 0 ignore EOT status 07528 FE0E5983 1046 JMP FERROR return, error code in R0 1047 * --- 1048 00007529 1049 BKSPSAF LABEL 07529 EC097215 5 ZBM 1050 STZ FCB,FCOPWRITE 0752A 5C174808 5 BASE 1051 CMZ FCB,FCCPP if at load point do nothing 0752B FE025982 1052 JEQ FNOERROR 0752C DC00747F 1053 CALL DOBKSP move back the record 0752D 40007552 1054 PARL CNTLSEFFDE 0752E FE0E5982 1055 JMP FNOERROR 1056 * --- 1057 0000752F 1058 BKSPARAF LABEL 0752F EC097215 5 ZBM 1059 STZ FCB,FCOPWRITE 07530 5C174808 5 BASE 1060 CMZ FCB,FCCPP if at load point do nothing 07531 FE025982 1061 JEQ FNOERROR 07532 DC0074B6 1062 CALL BKSPRAF move back the record 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1623 (FRQCNTL) F 100 FREQ - File Control Processor 07533 40007552 1063 PARL CNTLSEFFDE 07534 FE0E5982 1064 JMP FNOERROR 1065 * --- 1066 1067 END CNTLBKSP routine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1624 (FRQCNTL) F 100 FREQ - File Control Processor 1069 1070 ********************************************************************************** 1071 * * 1072 * SEFF. Skip to the end-of-file forward. * 1073 * Stack required = 18 * 1074 * 0 + max ( DOFWSP (18), DOFWSPATH (6), MTREQUEST (1), * 1075 * SETMTSTAT (1) ) * 1076 * * 1077 ********************************************************************************** 1078 1079 BLOCK CNTLSEFF routine 1080 ENTRY CNTLSEFF 1081 ENTRY CNTLSEFFDE 1082 00007535 1083 CNTLSEFF LABEL 07535 EC097215 5 ZBM 1084 STZ FCB,FCOPWRITE indicate last op not write 07536 60096665 0 5 ZBM 1085 LD R0 FCB,FCHTYPE get the hardware device type 07537 64040001 0 IMM 1086 CPR R0 HTYPESAF check for a .SAF 07538 FE027549 1087 JEQ NOTEOFYET if SAF, enter loop to fwsp until EOF 07539 6404000C 0 IMM 1088 CPR R0 HTYPEMT check for a MT 0753A FE027541 1089 JEQ SEFFMT jump if a MT 0753B 6404000F 0 IMM 1090 CPR R0 HTYPEVT check for a VT 0753C FE027541 1091 JEQ SEFFMT jump if a VT 0753D 64040004 0 IMM 1092 CPR R0 HTYPEPATH check for a PATH 0753E FE02754D 1093 JEQ PATHSFFM 0753F 6404000D 0 IMM 1094 CPR R0 HTYPECT check for a CT 07540 FE0C59A5 1095 JNE FERRORILOP jump if not legal type 1096 * \ / 1097 00007541 1098 SEFFMT LABEL 07541 61095F16 4 5 ZBM 1099 LD R4 FCB,FCDCBPTR get pointer to MTU element 07542 DC00658A 1100 CALL MTREQUEST call to do a request 07543 40440002 IMM 1101 PARVL MTURQSEFF indicate a search end file forward 07544 60440008 1 IMM 1102 LD R1 FILEOF 07545 E4494445 1 5 ZBM 1103 ST R1 FCB,FCLASTREAD 07546 DC40659C 1104 CALLNP SETMTSTAT call to set the status 07547 FEC00000 1105 NOP 0 ignore EOT status 07548 FE0E5983 1106 JMP FERROR return, error code in R0 1107 * --- 1108 00007549 1109 NOTEOFYET LABEL 07549 DC00744D 1110 CALL DOFWSP move one record 0754A 40007552 1111 PARL CNTLSEFFDE 0754B F2107549 0 1112 JBF R0/FILTYPE/FILSFLAGB NOTEOFYET jump if not special record 0754C FE0E5982 1113 JMP FNOERROR its a EOD or EOF 1114 * --- 1115 0000754D 1116 PATHSFFM LABEL 0754D DC4074D7 1117 CALLNP DOFWSPATH forward space on a .PATH 0754E FA0C5983 0 1118 JNEZ R0 FERROR jump if some kind of problem 0754F 60094445 0 5 ZBM 1119 LD R0 FCB,FCLASTREAD check last record read 07550 F238754D 0 1120 JBF R0/FILSFLAGB PATHSFFM jump if not special record 07551 FE0E5982 1121 JMP FNOERROR 1122 * --- 1123 1124 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1625 (FRQCNTL) F 100 FREQ - File Control Processor 1125 * Disk error -- mark file as abnormal and return error. 00007552 1126 CNTLSEFFDE LABEL 07552 6004000B 0 IMM 1127 LD R0 FILAEOD 07553 E4094445 0 5 ZBM 1128 ST R0 FCB,FCLASTREAD set record type of abnormal 07554 FE0E59AA 1129 JMP FERRORFAU return file abnormal error 1130 * --- 1131 1132 END CNTLSEFF routine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1626 (FRQCNTL) F 100 FREQ - File Control Processor 1134 1135 ********************************************************************************** 1136 * * 1137 * SEFB. Skip to filemark backward. * 1138 * Stack required = 18 * 1139 * 0 + max ( CHECK4CM (1), DOBKSP (18), MTCHKWFM (2), * 1140 * MTREQUEST (1), SETMTSTAT (1) ) * 1141 * * 1142 ********************************************************************************** 1143 1144 BLOCK CNTLSEFB routine 1145 ENTRY CNTLSEFB 1146 00007555 1147 CNTLSEFB LABEL 07555 DC405B55 1148 CALLNP CHECK4CM make sure only CM is diddling with its units 07556 FA0C5983 0 1149 JNEZ R0 FERROR jump if someone else is trying 1150 * \ / 07557 60096665 0 5 ZBM 1151 LD R0 FCB,FCHTYPE 07558 64040001 0 IMM 1152 CPR R0 HTYPESAF check for a SAF 07559 FE027569 1153 JEQ SEFBSAF if SAF, enter loop to bksp until EOF 0755A 6404000C 0 IMM 1154 CPR R0 HTYPEMT check for a MT 0755B FE027560 1155 JEQ SEFBMT jump if MT 0755C 6404000F 0 IMM 1156 CPR R0 HTYPEVT check for a VT 0755D FE027560 1157 JEQ SEFBMT jump if VT 0755E 6404000D 0 IMM 1158 CPR R0 HTYPECT check for a CT 0755F FE0C59A5 1159 JNE FERRORILOP jump if not legal type 1160 * \ / 1161 00007560 1162 SEFBMT LABEL 07560 61095F16 4 5 ZBM 1163 LD R4 FCB,FCDCBPTR get pointer to MTU element 07561 DC4065A6 1164 CALLNP MTCHKWFM 07562 DC00658A 1165 CALL MTREQUEST call to do a request 07563 40440003 IMM 1166 PARVL MTURQSEFB indicate a search end file backward 07564 60440008 1 IMM 1167 LD R1 FILEOF 07565 E4494445 1 5 ZBM 1168 ST R1 FCB,FCLASTREAD 07566 DC40659C 1169 CALLNP SETMTSTAT set up the status 07567 FEC00000 1170 NOP 0 ignore EOT status 07568 FE0E5983 1171 JMP FERROR return, error code in R0 1172 * --- 1173 00007569 1174 SEFBSAF LABEL 07569 EC097215 5 ZBM 1175 STZ FCB,FCOPWRITE 0000756A 1176 NOTEOFYETB LABEL 0756A 5C174808 5 BASE 1177 CMZ FCB,FCCPP done if at beginning position 0756B FE025982 1178 JEQ FNOERROR 0756C DC00747F 1179 CALL DOBKSP move back one record 0756D 40007552 1180 PARL CNTLSEFFDE 0756E F210756A 0 1181 JBF R0/FILTYPE/FILSFLAGB NOTEOFYETB jump if not EOF yet 0756F FE0E5982 1182 JMP FNOERROR 1183 * --- 1184 1185 END CNTLSEFB routine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1627 (FRQCNTL) F 100 FREQ - File Control Processor 1187 1188 ********************************************************************************** 1189 * * 1190 * SEOD. Skip forward to the end of data. * 1191 * If a SAF then hopefully the last disk block address and * 1192 * the last byte position pointer are available. If not we have * 1193 * to search through the whole damm file a record at a time. * 1194 * If a RAF then we just set the CPP to EPP and indicate * 1195 * next access needs to reseek through the structure. * 1196 * * 1197 * Eats R0:R4 * 1198 * Stack required = 18 * 1199 * 0 + max ( DOFWSP (18) ) * 1200 * * 1201 ********************************************************************************** 1202 1203 BLOCK CNTLSEOD routine 1204 ENTRY CNTLSEOD 1205 00007570 1206 CNTLSEOD LABEL 07570 EC097215 5 ZBM 1207 STZ FCB,FCOPWRITE indicate last op not write 07571 60096665 0 5 ZBM 1208 LD R0 FCB,FCHTYPE 07572 64040002 0 IMM 1209 CPR R0 HTYPERAF is it a RAF? 07573 FE02758C 1210 JEQ SEODRAF if so do it 07574 64040001 0 IMM 1211 CPR R0 HTYPESAF only legal on a .SAF or .RAF 07575 FE0C59A5 1212 JNE FERRORILOP 1213 * \ / 1214 1215 * SAF SEOD, use end position if known, else space to the end 07576 5C095186 5 ZBM 1216 CMZ FCB,FCEND check if last block address available 07577 FE0C757D 1217 JNE CHECKEPP go check EPP if it is 1218 * \ / 1219 00007578 1220 NOTEODYET LABEL 07578 DC00744D 1221 CALL DOFWSP move forward one record 07579 40007552 1222 PARL CNTLSEFFDE pass disk error address 0757A F2107578 0 1223 JBF R0/FILTYPE/FILSFLAGB NOTEODYET jump if not system record 0757B F2167578 0 1224 JBF R0/FILTYPE/FILEODB NOTEODYET jump if not EOD 0757C FE0E7587 1225 JMP UPDATEFCB we're here! 1226 * --- 1227 0000757D 1228 CHECKEPP LABEL 0757D 5C174807 5 BASE 1229 CMZ FCB,FCEPP check if EOD record byte offset is known 0757E FE027578 1230 JEQ NOTEODYET if not must search the slow way 1231 * \ / 1232 1233 * take shortcut to known end position 0757F 60095186 0 5 ZBM 1234 LD R0 FCB,FCEND get the last block MS address 07580 E0095181 0 5 ZBM 1235 EXCH R0 FCB,FCMSBLK make it the current one 07581 E4095186 0 5 ZBM 1236 ST R0 FCB,FCEND save old value in case of disk error 07582 60174807 0 5 BASE 1237 LD R0 FCB,FCEPP get the end position pointer 07583 E0174808 0 5 BASE 1238 EXCH R0 FCB,FCCPP make it the current position pointer 07584 E4174807 0 5 BASE 1239 ST R0 FCB,FCEPP save the old value 07585 DC00744D 1240 CALL DOFWSP make sure no disk errors 07586 40007590 1241 PARL DISKPROBS where to go if there are 1242 * \ / 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1628 (FRQCNTL) F 100 FREQ - File Control Processor 1243 1244 * we are at the end, update end pointers 00007587 1245 UPDATEFCB LABEL 07587 60095181 0 5 ZBM 1246 LD R0 FCB,FCMSBLK current block 07588 E4095186 0 5 ZBM 1247 ST R0 FCB,FCEND update the old value 07589 60174808 0 5 BASE 1248 LD R0 FCB,FCCPP current position 0758A E4174807 0 5 BASE 1249 ST R0 FCB,FCEPP update old value 0758B FE0E5982 1250 JMP FNOERROR done 1251 * --- 1252 1253 * RAF SEOD is easy 0000758C 1254 SEODRAF LABEL 0758C 60174807 0 5 BASE 1255 LD R0 FCB,FCEPP current position 0758D E4174808 0 5 BASE 1256 ST R0 FCB,FCCPP update old value 0758E EDC95C16 5 ZBM 1257 STW FCB,FCRESEEK indicate in core pointers are not up to date 0758F FE0E5982 1258 JMP FNOERROR done 1259 * --- 1260 1261 ********************************************************************************** 1262 * * 1263 * This is where we attempt to recover from any disk errors. * 1264 * First we reset the current block and the current position * 1265 * pointer to what they originally were. Then we zero the * 1266 * last block and last position pointer so any subsequent SEODs * 1267 * will force a sequential search up to the first bad block. * 1268 * * 1269 ********************************************************************************** 1270 00007590 1271 DISKPROBS LABEL 07590 60095186 0 5 ZBM 1272 LD R0 FCB,FCEND get the old current disk block 07591 E4095181 0 5 ZBM 1273 ST R0 FCB,FCMSBLK restore original value 07592 EC095186 5 ZBM 1274 STZ FCB,FCEND end block is unknown 07593 60174807 0 5 BASE 1275 LD R0 FCB,FCEPP get old position pointer 07594 E4174808 0 5 BASE 1276 ST R0 FCB,FCCPP again restore original value 07595 EC174807 5 BASE 1277 STZ FCB,FCEPP end byte position is also unknown 07596 6004000B 0 IMM 1278 LD R0 FILAEOD indicate abnormal EOD 07597 E4094445 0 5 ZBM 1279 ST R0 FCB,FCLASTREAD update last read status 07598 FE0E59AA 1280 JMP FERRORFAU abnormal/unavailable 1281 * -- 1282 1283 END CNTLSEOD routine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1629 (FRQCNTL) F 100 FREQ - File Control Processor 1285 1286 ********************************************************************************** 1287 * * 1288 * WFM. Write file mark. The operation works like a file write * 1289 * in freeing any data after the current block. First we check for * 1290 * limit changing and adjust the file length and the user's limits. * 1291 * Finally the filemark is set down followed by the required EOD. * 1292 * * 1293 * Stack required = 17 * 1294 * 2 + max ( DMOTEWNDO1 (7), GRUBWNDO1 (7), MTREQUEST (1), * 1295 * PLACEEOD (0), PREPAREWR (11), PUTRECHEAD (15), * 1296 * SETMTSTAT (1), SETWNDO1 (4) ) * 1297 * * 1298 ********************************************************************************** 1299 1300 BLOCK CNTLWFM routine 1301 ENTRY CNTLWFM 1302 1303 BEGFRAME2 00178800 6 BASE 1304 POSITION BSS 2 last good position 1305 ENDFRAME 1306 00007599 1307 CNTLWFM LABEL 07599 EC1F8002 6 STAK 1308 STZ PUSH allocate stack frame 0759A EDC97215 5 ZBM 1309 STW FCB,FCOPWRITE indicate last op write 0759B 60096665 0 5 ZBM 1310 LD R0 FCB,FCHTYPE 0759C 6404000C 0 IMM 1311 CPR R0 HTYPEMT check for MT 0759D FE0275C1 1312 JEQ WFMMT jump if MT 0759E 6404000F 0 IMM 1313 CPR R0 HTYPEVT check for VT 0759F FE0275C1 1314 JEQ WFMMT jump if VT 075A0 6404000D 0 IMM 1315 CPR R0 HTYPECT check for cartridge mag tape 075A1 FE0275C1 1316 JEQ WFMMT jump if CT 075A2 64040006 0 IMM 1317 CPR R0 HTYPENULL check for NULL 075A3 FE0275BB 1318 JEQ RTNSTATUS jump if NULL 075A4 64040004 0 IMM 1319 CPR R0 HTYPEPATH check for PATH 075A5 FE026D70 1320 JEQ WFMPATH jump to write filemark 075A6 5C3075C0 0 @ 1321 CMZ @WFMLGLP(R0) see who legal with 075A7 FE0259A5 1322 JEQ FERRORILOP 075A8 5C095C15 5 ZBM 1323 CMZ FCB,FCACCESS/FSACSNWB 075A9 FE0C59AC 1324 JNE FERRORPFM jump if device protected from modification 075AA 6007FFFD 0 IMM 1325 LD R0 -3 not placing 2 gaps 075AB DC406AC3 1326 CALLNP PREPAREWR prepare the file for writing 075AC 60174808 0 5 BASE 1327 LD R0 FCB,FCCPP 075AD 60574801 1 5 BASE 1328 LD R1 FCB,FCBLOCK 075AE E6178800 016 BASE 1329 ST2 R0 SP,POSITION remember the last good position 075AF DC003205 1330 CALL SETWNDO1 get the initial page in 075B0 41440000 IMM 1331 PARV VPCNTLW 075B1 41534000 5 REG 1332 PARV FCB indicate which unit associated 075B2 410075C9 1333 PAR CNTLWFMDE 075B3 41574801 5 BASE 1334 PARV FCB,FCBLOCK 075B4 4044000C IMM 1335 PARVL FBITSAF 075B5 60420100 1 IMM 1336 LD R1 FILEOF*FILTYPE make a file mark 075B6 DC406A4E 1337 CALLNP PUTRECHEAD place the filemark in the file 075B7 FE0E75C9 1338 JMP CNTLWFMDE disk error 075B8 FE0E75D1 1339 JMP CNTLWFMOOS volume out of storage 075B9 DC406AE9 1340 CALLNP PLACEEOD place the EOD after the filemark 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1630 (FRQCNTL) F 100 FREQ - File Control Processor 075BA DC40315C 1341 CALLNP DMOTEWNDO1 done with the window 1342 * \ / 1343 000075BB 1344 RTNSTATUS LABEL 075BB 60040009 0 IMM 1345 LD R0 FILNEOD normal EOD status 075BC E4094445 0 5 ZBM 1346 ST R0 FCB,FCLASTREAD indicate at EOD after write 075BD EC094C15 5 ZBM 1347 STZ FCB,FCLOADPT not at load point 075BE FE0E5982 1348 JMP FNOERROR give good account of ourselves 1349 * --- 1350 1351 ********************************************************************************** 1352 * * 1353 * Devices WFM legal on other than direct I/O devices * 1354 * * 1355 ********************************************************************************** 1356 075BF 40400000 1357 WFMLGL VFD 1*(BIT HTYPESAF)+1*(BIT HTYPETASK) 075C0 004875BF 1358 WFMLGLP PTR WFMLGL/BIT 0 1359 1360 ********************************************************************************** 1361 * * 1362 * Write filemark on MT, CT, or VT * 1363 * * 1364 ********************************************************************************** 1365 000075C1 1366 WFMMT LABEL 075C1 61095F16 4 5 ZBM 1367 LD R4 FCB,FCDCBPTR get pointer to MTU element 075C2 DC00658A 1368 CALL MTREQUEST call to do request 075C3 40440008 IMM 1369 PARVL MTURQWFM which is to write a file mark 075C4 60440008 1 IMM 1370 LD R1 FILEOF 075C5 E4494445 1 5 ZBM 1371 ST R1 FCB,FCLASTREAD 075C6 DC40659C 1372 CALLNP SETMTSTAT call to set up the status 075C7 E4494445 1 5 ZBM 1373 ST R1 FCB,FCLASTREAD if EOD, set record type as such 075C8 FE0E5983 1374 JMP FERROR return, error code in R0 1375 * --- 1376 1377 ********************************************************************************** 1378 * * 1379 * Disk error -- restore the old position and give error * 1380 * * 1381 ********************************************************************************** 1382 000075C9 1383 CNTLWFMDE LABEL 075C9 60040089 0 IMM 1384 LD R0 XREQERFAU "abnormal/unavailable" 000075CA 1385 CNTLWFMSHR LABEL 075CA 62978800 236 BASE 1386 LD2 R2 SP,POSITION get good pointers 075CB E4974808 2 5 BASE 1387 ST R2 FCB,FCCPP record last known good position offset 075CC E4C95181 3 5 ZBM 1388 ST R3 FCB,FCMSBLK and block number 075CD E6178800 016 BASE 1389 ST2 R0 SP,POSITION save error code and R1 075CE DC403150 1390 CALLNP GRUBWNDO1 lose useless window 075CF 62178800 016 BASE 1391 LD2 R0 SP,POSITION restore error code 075D0 FE0E5983 1392 JMP FERROR error on a file 1393 * --- 1394 1395 ********************************************************************************** 1396 * * 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1631 (FRQCNTL) F 100 FREQ - File Control Processor 1397 * Volume out of storage, return error to user * 1398 * * 1399 ********************************************************************************** 1400 000075D1 1401 CNTLWFMOOS LABEL 075D1 6004009D 0 IMM 1402 LD R0 XREQERNFSV "No free storage on volume" 075D2 FE0E75CA 1403 JMP CNTLWFMSHR 1404 * --- 1405 1406 END CNTLWFM routine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1632 (FRQCNTL) F 100 FREQ - File Control Processor 1408 1409 ********************************************************************************** 1410 * * 1411 * FRFORCE. FRWRITEMOD. Write out any modified pages belonging * 1412 * to this file. FRFORCE suspends the user until last write is done. * 1413 * FRWRITEMOD does not wait. * 1414 * * 1415 * Stack required = 10 * 1416 * 0 + max ( LOCKWAIT (0), SUSPENDME (0), VASPCLNALL (10), * 1417 * WSXCLNALL (10) ) * 1418 * * 1419 ********************************************************************************** 1420 1421 BLOCK CNTLFORCE and CNTLWRITMO routines 1422 ENTRY CNTLFORCE 1423 ENTRY CNTLWRITMO 1424 000075D3 1425 CNTLWRITMO LABEL 075D3 EC0BC010 7 CBM 1426 STZ R7/BIT 0 say to not wait for xfers 075D4 FE0E75D6 1427 JMP SHAREFORCE 1428 * --- 1429 000075D5 1430 CNTLFORCE LABEL 075D5 EDCBC010 7 CBM 1431 STW R7/BIT 0 say to wait for xfers 000075D6 1432 SHAREFORCE LABEL 075D6 60096665 0 5 ZBM 1433 LD R0 FCB,FCHTYPE get type of file 075D7 5C3075FB 0 @ 1434 CMZ @CFORLGLTYPE(R0) check to ensure that it is associated with a volume 075D8 FE0259A5 1435 JEQ FERRORILOP if not, give error 075D9 60D34000 3 5 REG 1436 LD R3 FCB get the FCB address 075DA DC4032EA 1437 CALLNP WSXCLNALL flush anything from the working set extension 075DB DC4032FA 1438 CALLNP VASPCLNALL and anything that's currently mapped and present 075DC F3C05982 7 1439 JBF R7/BIT 0 FNOERROR just return, if that's the request 1440 * \ / 1441 1442 * set up to wait for last block to be written 1443 PLOCK MSQINLOCK lock MS input 075DD 0CC00000 1443 IOFF 075DE D1C01F16 1443 SETT MSQINLOCK 075DF FE0C75E1 1443 JNE MA(2+DISPW MA 0) 075E0 DC40308B 1443 CALLNP LOCKWAIT 1444 PLOCK MSQOUTLOCK lock MS output queue 075E1 0CC00000 1444 IOFF 075E2 D1C01F17 1444 SETT MSQOUTLOCK 075E3 FE0C75E5 1444 JNE MA(2+DISPW MA 0) 075E4 DC40308B 1444 CALLNP LOCKWAIT 075E5 60494081 1 5 ZBM 1445 LD R1 FCB,FCDRIVE get volume number we're forcing 075E6 60621F22 1 1 1446 LD R1 VOLNTABLE(R1) get VOLN pointer 075E7 60040000 0 IMM 1447 LD R0 0 get marker for list end 075E8 60564817 1 1 BASE 1448 LD R1 R1,VOLNWRITEQ get address of first output element 075E9 3C085F10 0 1 ZBM 1449 LSRCH R0 R1,MSQLINK search for the list end 075EA FE0C75F5 1450 JNE NOLIST jump if no list was present 075EB 60164802 0 1 BASE 1451 LD R0 R1,MSQPPPTR get pointer to PPL 075EC 60D60801 3 0 BASE 1452 LD R3 R0,PPBLOCK pick up MS address that we should wait on 1453 PUNLOCK MSQOUTLOCK release the output queue 075ED EC001F17 1453 STZ MSQOUTLOCK 075EE 0C800000 1453 ION 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1633 (FRQCNTL) F 100 FREQ - File Control Processor 075EF 608400FF 2 IMM 1454 LD R2 NOSUCHVPN pass secondary shutdown parameter 075F0 DC00351C 1455 CALL SUSPENDME and shut down this user 075F1 41005982 1456 PAR FNOERROR where we restart 075F2 4152C000 3 REG 1457 PARV R3 MS block address is shutdown parameter 075F3 41001DAB 1458 PAR SQMSWAIT indicate which queue 075F4 40001F16 1459 PARL MSQINLOCK and what to unlock 1460 * --- 1461 000075F5 1462 NOLIST LABEL 1463 PUNLOCK MSQINLOCK release this list 075F5 EC001F16 1463 STZ MSQINLOCK 075F6 0C800000 1463 ION 1464 PUNLOCK MSQOUTLOCK and this one 075F7 EC001F17 1464 STZ MSQOUTLOCK 075F8 0C800000 1464 ION 075F9 FE0E5982 1465 JMP FNOERROR exit with no error 1466 * --- 1467 1468 075FA 70000000 1469 CFORLGLTYPT VFD 1*(BIT HTYPESAF)+1*(BIT HTYPERAF)+1*(BIT HTYPECODE) 075FB 004875FA 1470 CFORLGLTYPE PTR CFORLGLTYPT/BIT 0 bit pointer to legal vector 1471 1472 END of CNTLFORCE and CNTLWRITMO 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1634 (FRQCNTL) F 100 FREQ - File Control Processor 1474 1475 ********************************************************************************** 1476 * * 1477 * FRDENSITY. Select density recording format for * 1478 * cartridge tape. The two possible alternates are MFM, * 1479 * modified frequency modulation and GCR, group code * 1480 * recording. * 1481 * * 1482 * Stack required = 3 * 1483 * 0 + max ( DOREWINDA (3), LOCKWAIT (0), MTREQUEST (1) ) * 1484 * * 1485 ********************************************************************************** 1486 1487 BLOCK CNTLDENSITY routine 1488 ENTRY CNTLDENSITY 1489 1490 BEGFRAME2 1491 ENDFRAME 1492 000075FC 1493 CNTLDENSITY LABEL 075FC 60096665 0 5 ZBM 1494 LD R0 FCB,FCHTYPE check the hardware type 075FD 6404000D 0 IMM 1495 CPR R0 HTYPECT do we have a .CT 075FE FE0C59A5 1496 JNE FERRORILOP if not, illegal operation 1497 * \ / 1498 075FF 61095F16 4 5 ZBM 1499 LD R4 FCB,FCDCBPTR pointer to the MTU element 07600 60891F11 2 4 ZBM 1500 LD R2 R4,MTUCNTL pointer to MTC element 07601 60400412 1 1501 LD R1 CPPSA current process status area 07602 60485F11 1 1 ZBM 1502 LD R1 R1,PSCACHNP1 pointer to users console area 07603 60564803 1 1 BASE 1503 LD R1 R1,CAR1 get the requested value 1504 PLOCK R2,MTCELOCK lock critical region 07604 0CC00000 1504 IOFF 07605 D1D68803 2 BASE 1504 SETT R2,MTCELOCK 07606 FE0C7608 1504 JNE MA(2+DISPW MA 0) 07607 DC40308B 1504 CALLNP LOCKWAIT 07608 E4491A20 1 4 ZBM 1505 ST R1 R4,MTUDENSITY set the density 1506 PUNLOCK R2,MTCELOCK release lock 07609 EC168803 2 BASE 1506 STZ R2,MTCELOCK 0760A 0C800000 1506 ION 0760B DC00658A 1507 CALL MTREQUEST request the change 0760C 4044000A IMM 1508 PARVL MTURQSET density parameter 0760D FA0C5983 0 1509 JNEZ R0 FERROR jump if errors 0760E DC4073AF 1510 CALLNP DOREWINDA set back to load point 0760F FE0E5982 1511 JMP FNOERROR and return error free 1512 * --- 1513 1514 END of CNTLDENSITY 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1635 (FRQCNTL) F 100 FREQ - File Control Processor 1516 1517 ********************************************************************************** 1518 * * 1519 * FRCYCLE. This request causes the cartridge tape to skip * 1520 * forward to the EOT and then rewind to the BOT. If not at * 1521 * the BOT initially the controller will rewind a bit in an * 1522 * attempt to find the BOT, if not found then the controller * 1523 * proceeds as normal. * 1524 * * 1525 * Stack required = 1 * 1526 * 0 + max ( MTREQUEST (1) ) * 1527 * * 1528 ********************************************************************************** 1529 1530 BLOCK FRCYCLE request 1531 ENTRY CNTLCYCLE 1532 00007610 1533 CNTLCYCLE LABEL 07610 60096665 0 5 ZBM 1534 LD R0 FCB,FCHTYPE get the file hardware type 07611 6404000D 0 IMM 1535 CPR R0 HTYPECT do we have a .CT? 07612 FE0C59A5 1536 JNE FERRORILOP illegal operation if not 1537 * \ / 07613 61095F16 4 5 ZBM 1538 LD R4 FCB,FCDCBPTR pointer to MTU element 07614 DC00658A 1539 CALL MTREQUEST call to do a request 07615 4044000B IMM 1540 PARVL MTURQCYCLE ask controller to cycle tape 1541 * R0 <= error code , or 0 if none 07616 EC097215 5 ZBM 1542 STZ FCB,FCOPWRITE last operation not a write 07617 EC094445 5 ZBM 1543 STZ FCB,FCLASTREAD last operation not a read 07618 EDC94C15 5 ZBM 1544 STW FCB,FCLOADPT now at load point 07619 FE0E5983 1545 JMP FERROR return to caller 1546 * --- 1547 1548 END FRCYCLE request 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1636 (FRQCNTL) F 100 FREQ - File Control Processor 1550 1551 ********************************************************************************** 1552 * * 1553 * FREPP request returns the end position pointer of a RAF or SAF. * 1554 * Call: * 1555 * LD R0 FREPP * 1556 * FREQ * 1557 * JLTZ R0 error * 1558 * R1 = EPP * 1559 * * 1560 * Stack required = 0 * 1561 * * 1562 ********************************************************************************** 1563 1564 BLOCK FREPP routine 1565 ENTRY CNTLEPP 1566 0000761A 1567 CNTLEPP LABEL 0761A 60096665 0 5 ZBM 1568 LD R0 FCB,FCHTYPE get the hardware type 0761B 64040002 0 IMM 1569 CPR R0 HTYPERAF is it a RAF? 0761C FE02761F 1570 JEQ OKTYPE ok if so 0761D 64040001 0 IMM 1571 CPR R0 HTYPESAF how about a SAF? 0761E FE0C59A5 1572 JNE FERRORILOP illegal operation if not 1573 * \ / 1574 0000761F 1575 OKTYPE LABEL 0761F 60174807 0 5 BASE 1576 LD R0 FCB,FCEPP get the end position pointer 07620 E4170803 0 4 BASE 1577 ST R0 R4,CAR1 and give it to the user 07621 FE0E5982 1578 JMP FNOERROR simple as that!! 1579 * --- 1580 1581 END of FREPP 1582 1583 1584 END CNTL File Control Routines 152 INPUT FRQRAFCNTL RAF and CODE control functions 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1637 (FRQRAFCNTL) F 101 FREQ - RAF control requests 3 4 RAFCNTLB BLOCK RAF Control Routines 5 6 ENTRY FRQRAFCNTL entry for user request 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1638 (FRQRAFCNTL) F 101 FREQ - RAF control requests 8 9 ********************************************************************************** 10 * * 11 * RAF control * 12 * This code provides miscellaneous functions that may be * 13 * done on files. The files are usually RAF or CODE types, but * 14 * a few requests are used for other devices also. * 15 * * 16 * Stack required = 24 * 17 * 0 + max ( DOREWIND (3), FRQCURPOS (0), FRQDELETE (13), * 18 * FRQMAPIN (24), FRQMAPINOC (24), FRQMAPINR (24), * 19 * FRQPOSITN (10), FRQPORTG (7), FRQPROTS (7), * 20 * FRQRAFLAST (8), FRQRAFNEXT (9), LOCKWAIT (0), * 21 * MTCHKWFM (2), MTREQUEST (1) ) * 22 * * 23 ********************************************************************************** 24 25 BLOCK FRQRAFCNTL routine 26 ENTRY FRQRAFCNTL 27 00007622 28 FRQRAFCNTL LABEL 07622 FB7059B8 5 29 JZA FCB FERRORLNE3 jump if lun not equipped 07623 60095835 0 5 ZBM 30 LD R0 FCB,FCACCESS see if any access allowed 07624 64040007 0 IMM 31 CPR R0 FSACSNDA is access only 'no data access'? 07625 FE0259AC 32 JEQ FERRORPFM if so, say cannot touch 07626 60096665 0 5 ZBM 33 LD R0 FCB,FCHTYPE fetch the type of device 07627 64040002 0 IMM 34 CPR R0 HTYPERAF is this operation legal? 07628 FE027645 35 JEQ TYPEISRAF jump if type is RAF, okay 07629 64040003 0 IMM 36 CPR R0 HTYPECODE check for type CODE 0762A FE027645 37 JEQ TYPEISRAF jump if type is CODE, okay 0762B 6404000D 0 IMM 38 CPR R0 HTYPECT final resort, is this a cartridge tape? 0762C FE0C59A5 39 JNE FERRORILOP otherwise, illegal operation 40 41 ********************************************************************************** 42 * Do operations pertaining to CTs * 43 ********************************************************************************** 0762D 61D30000 7 4 REG 44 LD R7 R4 save access to user's CA 0762E 61095F16 4 5 ZBM 45 LD R4 FCB,FCDCBPTR pick up pointer to DCB 0762F 64840005 2 IMM 46 CPR R2 GETPOSSUBOP position operation allowed on CTs 07630 FE027642 47 JEQ GETCTTRACK 07631 64840000 2 IMM 48 CPR R2 SETPOSSUBOP and get position also allowed 07632 FE0C59D8 49 JNE UERRORILR 50 * Select the requested track 07633 DC4065A6 51 CALLNP MTCHKWFM check for write file mark processing 52 * LD R1 CPPSA current process status area 53 * LD R1 R1,PSCACHNP1 R1=>the caller's registers 07634 6057C803 1 7 BASE 54 LD R1 R7,CAR1 get seek address 07635 60891F11 2 4 ZBM 55 LD R2 R4,MTUCNTL pointer to MTU element 56 PLOCK R2,MTCELOCK get access to critical region 07636 0CC00000 56 IOFF 07637 D1D68803 2 BASE 56 SETT R2,MTCELOCK 07638 FE0C763A 56 JNE MA(2+DISPW MA 0) 07639 DC40308B 56 CALLNP LOCKWAIT 0763A E4491831 1 4 ZBM 57 ST R1 R4,MTUTRACK save the new track number 58 PUNLOCK R2,MTCELOCK release lock 0763B EC168803 2 BASE 58 STZ R2,MTCELOCK 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1639 (FRQRAFCNTL) F 101 FREQ - RAF control requests 0763C 0C800000 58 ION 0763D DC00658A 59 CALL MTREQUEST call to do request 0763E 4044000A IMM 60 PARVL MTURQSET function to select track 0763F FA0C5983 0 61 JNEZ R0 FERROR return if error 07640 DC4073B2 62 CALLNP DOREWIND put unit back to load point 07641 FE0E5982 63 JMP FNOERROR and return no error 64 * --- 00007642 65 GETCTTRACK LABEL 07642 60091831 0 4 ZBM 66 LD R0 R4,MTUTRACK pick up selected track number 07643 E417C803 0 7 BASE 67 ST R0 R7,CAR1 and return in user's R1 07644 FE0E5982 68 JMP FNOERROR 69 * --- 70 00007645 71 TYPEISRAF LABEL 07645 6484000A 2 IMM 72 CPR R2 RAFUNCTMAX is this a legal request? 07646 FE0659D8 73 JGE UERRORILR jump if illegal request 07647 5CA47648 2 74 LDPC RAFFUNCTT(R2) do the function 75 * --- 76 00007648 77 RAFFUNCTT LABEL 00000000 ABS 78 SETPOSSUBOP EQU DISPW RAFFUNCTT 07648 00007652 79 VFD ADR FRQPOSITN move RAF to a new position 07649 0000765B 80 VFD ADR FRQMAPIN map a RAF page into memory 0764A 00007690 81 VFD ADR FRQMAPINR map in with read only access 0764B 0000769C 82 VFD ADR FRQRAFLAST give last data addr in RAF 0764C 00007699 83 VFD ADR FRQMAPINOC map in file so modify does not change RAF 00000005 ABS 84 GETPOSSUBOP EQU DISPW RAFFUNCTT 0764D 000076D7 85 VFD ADR FRQCURPOS return current RAF position 0764E 000076DA 86 VFD ADR FRQPROTG get page protection 0764F 00007708 87 VFD ADR FRQPROTS set page protection 07650 0000770C 88 VFD ADR FRQDELETE delete RAF or CODE page 07651 00007760 89 VFD ADR FRQRAFNEXT find next non-hole page 0000000A ABS 90 RAFUNCTMAX EQU DISPW RAFFUNCTT 91 92 END FRQRAFCNTL routine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1640 (FRQRAFCNTL) F 101 FREQ - RAF control requests 94 95 ********************************************************************************** 96 * * 97 * File request to position a random access file (RAF) or * 98 * CODE file. The user call is: * 99 * * 100 * LD R0 FRPOSITION code into R0 * 101 * LD R1 * 102 * FREQ * 103 * * 104 * Returns with: * 105 * R0 = dynamic status of the lun * 106 * R1 is zero if RAF now positioned in a hole * 107 * R2:R7 unchanged * 108 * * 109 * stack required = 10. * 110 * 0 + max ( RSEEK (10) ) * 111 * * 112 ********************************************************************************** 113 114 BLOCK FRQPOSITN routine 115 ENTRY FRQPOSITN 116 00007652 117 FRQPOSITN LABEL 07652 DC0070CD 118 CALL RSEEK position the RAF 07653 410059AA 119 PAR FERRORFAU pass error address 07654 40570803 4 BASE 120 PARVL R4,CAR1 pass requested position 07655 5C174808 5 BASE 121 CMZ FCB,FCCPP are we back at load point? 07656 EC494C15 5 ZBM 122 STLEQ FCB,FCLOADPT set load point bit appropriately 07657 5C120000 0 REG 123 CMZ R0 are we in a hole? 07658 ED970803 4 BASE 124 STLNE R4,CAR1 return status to caller 07659 EC094445 5 ZBM 125 STZ FCB,FCLASTREAD clear the last read status 0765A FE0E5982 126 JMP FNOERROR say success 127 * --- 128 129 END FRQPOSITN routine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1641 (FRQRAFCNTL) F 101 FREQ - RAF control requests 131 132 ********************************************************************************** 133 * * 134 * File request to map a RAF or CODE file page into the * 135 * users address space. Anything currently mapped at that * 136 * location in the user's address space is released and the * 137 * new thing is mapped in. The FRMAPIN request requires that * 138 * the requester have write access. The page referenced will * 139 * be created if it does not exist in the file. * 140 * User call is: * 141 * * 142 * LD R0 FRMAPIN the request code * 143 * LD R1 * 144 * LD R2 * 145 * FREQ * 146 * * 147 * returns with R0 = dynamic status of the lun and rest of the * 148 * registers unchanged. * 149 * * 150 * Stack required = 24 * 151 * 3 + max ( CLRMEMTRAP (1), CREATEVP (2), DMOTEPAGE (7), * 152 * RSEEK (10), SETMEMTRAP(1), WSEEK (21) ) * 153 * * 154 ********************************************************************************** 155 156 BLOCK FRQMAPIN, FRQMAPINR, FRQMAPINOC routines 157 ENTRY FRQMAPIN 158 ENTRY FRQMAPINR 159 ENTRY FRQMAPINOC 160 161 BEGFRAME2 00178800 6 BASE 162 MAPFNCTN BSS 1 saves access type to page 00178801 6 BASE 163 USERPAGE BSS 1 user page number 00178802 6 BASE 164 RAFADD BSS 1 RAF seek address 165 ENDFRAME 166 0000765B 167 FRQMAPIN LABEL 0765B EC1F8003 6 STAK 168 STZ PUSH allocate stack frame 0765C 60095C15 0 5 ZBM 169 LD R0 FCB,FCACCESS/FSACSNWB check for write allowed 170 171 ********************************************************************************** 172 * * 173 * The next two instructions should really be -- * 174 * * 175 * LD R0 R0*VPCNTLROB move to proper position * 176 * JNEZ R0 FERRORPFM can't write if no write allowed! * 177 * * 178 * Unfortunately, some unnamed utilities rely on being able to * 179 * use FRMAPIN to work on RO units (the map in is made RO). * 180 * This is not quite right, but until the utilities have * 181 * changed we must bear with them. * 182 * * 183 ********************************************************************************** 184 0765D 600A0000 0 0 CBM 185 LD R0 R0*VPCNTLROB move to proper position 0765E FE0E7692 186 JMP FRQMAPXO see if file access is only XO 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1642 (FRQRAFCNTL) F 101 FREQ - RAF control requests 0000765F 187 FRQMAPSHR LABEL 0765F E4178800 0 6 BASE 188 ST R0 SP,MAPFNCTN save access type 07660 60C91943 3 4 ZBM 189 LD R3 R4,CAR1/BITS 12:31 pick up requester RAF/CODE page number 07661 60CAD800 3 3 CBM 190 LD R3 R3*(RAFMAJINDX+RAFMININDX) RAF addr in R3 07662 60093274 0 4 ZBM 191 LD R0 R4,CAR2/(BITS (32-(NPS LOG 2)):31) 07663 E4178801 0 6 BASE 192 ST R0 SP,USERPAGE place user page number onto stack 07664 61095114 4 5 ZBM 193 LD ULB FCB,FCLIMITPTR get who is to be charged 07665 5C09BE10 6 ZBM 194 CMZ SP,MAPFNCTN/VPCNTLROB is this a read access? 07666 FE0C766E 195 JNE MAPINRO jump if read only access 07667 DC006B31 196 CALL WSEEK get the data page for the RAF 07668 410059AA 197 PAR FERRORFAU pass error address 07669 4052C000 3 REG 198 PARVL R3 and RAF address 0766A FE0E5983 199 JMP FERROR (limit violation) 0766B 60D78801 3 6 BASE 200 LD R3 SP,USERPAGE get page number back 0766C DC403159 201 CALLNP DMOTEPAGE release any page there 0766D FE0E7676 202 JMP MAPINMAKE 203 * --- 204 205 * Page will be read only so we needn't create the RAF page 206 * if it doesn't exist. 0000766E 207 MAPINRO LABEL R0 = user's core page 0766E E4D78802 3 6 BASE 208 ST R3 SP,RAFADD save the RAF address 0766F 60D20000 3 0 REG 209 LD R3 R0 pass page number in R3 07670 DC403159 210 CALLNP DMOTEPAGE zap anything in the user's memory 07671 60D78802 3 6 BASE 211 LD R3 SP,RAFADD get the page in the RAF 07672 DC0070CD 212 CALL RSEEK position in the RAF without creating page 07673 410059AA 213 PAR FERRORFAU 07674 4052C000 3 REG 214 PARVL R3 pass seek address 07675 FA025982 0 215 JEQZ R0 FNOERROR leave zeropage if positioned in a hole 00007676 216 MAPINMAKE LABEL 07676 60D38000 3 6 REG 217 LD R3 SP copy the stack pointer 07677 DC0030C9 218 CALL CREATEVP call to make a VM list element 07678 4156C801 3 BASE 219 PARV R3,USERPAGE specify page number 07679 41574801 5 BASE 220 PARV FCB,FCBLOCK mass storage address 0767A 6004000F 0 IMM 221 LD R0 FBITRAFD get data block type for RAF 0767B 60896665 2 5 ZBM 222 LD R2 FCB,FCHTYPE get actual type of file 0767C 64840003 2 IMM 223 CPR R2 HTYPECODE is it a code file? 0767D FE0C767F 224 JNE MPIRAF jump if not, must be RAF 0767E 60040014 0 IMM 225 LD R0 FBITCODED get data block type for CODE 0000767F 226 MPIRAF LABEL 0767F 41520000 0 REG 227 PARV R0 pass expected block type 07680 41534000 5 REG 228 PARV FCB FCB associated with this page 07681 4056C800 3 BASE 229 PARVL R3,MAPFNCTN specify type of access 07682 60800414 2 230 LD R2 CPCUPC get pointer to current UPC 07683 6016880D 0 2 BASE 231 LD R0 R2,UPCVMLIST get pointer to virtual memory list 07684 E4085F10 0 1 ZBM 232 ST R0 R1,VPLINK place existing chain behind new element 07685 E456880D 1 2 BASE 233 ST R1 R2,UPCVMLIST new element is now list head 234 235 * Touch the page, to find out if it is good on disk 07686 DC005BCF 236 CALL SETMEMTRAP set up the trap routine 07687 400059AA 237 PARL FERRORFAU where to go on error 07688 60440000 1 IMM 238 LD R1 0 initialize displacement part 07689 60178801 0 6 BASE 239 LD R0 SP,USERPAGE pick up user page number 0768A E40A5C80 0 1 CBM 240 ST R0 R1/PAGEFIELD R1 = virtual address of data 0768B 59840040 IMM 241 CLBMSR MSRFRELOC set to user state fetches 0768C 5C164800 1 BASE 242 CMZ R1,0 touch the page (take page fault) 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1643 (FRQRAFCNTL) F 101 FREQ - RAF control requests 0768D 59C40040 IMM 243 IORMSR MSRFRELOC back to monitor fetches 0768E DC405BD4 244 CALLNP CLRMEMTRAP clear the memory traps 0768F FE0E5982 245 JMP FNOERROR say it was done 246 * --- 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1644 (FRQRAFCNTL) F 101 FREQ - RAF control requests 248 249 ********************************************************************************** 250 * * 251 * Request to map in a RAF page read only. If the page * 252 * does not exist in the RAF, then a zero page is left in the * 253 * users virtual space for him to reference. The access is * 254 * created in such a way that any store into the page gives a * 255 * memory protect violation. * 256 * User call is: * 257 * * 258 * LD R0 FRMAPINR * 259 * LD R1 page number in RAF * 260 * LD R2 page number in address space * 261 * FREQ lun * 262 * * 263 * returns with R0 = dynamic status of the lun and the rest of * 264 * the registers unchanged. * 265 * * 266 * Stack required (see FRMAPIN) * 267 * * 268 ********************************************************************************** 269 00007690 270 FRQMAPINR LABEL 07690 EC1F8003 6 STAK 271 STZ PUSH allocate stack space 07691 60040001 0 IMM 272 LD R0 VPCNTLRO 00007692 273 FRQMAPXO LABEL can only read if not XO or run unit 07692 60495835 1 5 ZBM 274 LD R1 FCB,FCACCESS get the open access 07693 64440003 1 IMM 275 CPR R1 FSACSXO is it XO? 07694 FE0C765F 276 JNE FRQMAPSHR no special treatment if not 07695 60400414 1 277 LD R1 CPCUPC get underprocess 07696 65485F14 5 1 ZBM 278 CPR FCB R1,UPCRUNFCB are we mapping from his run unit 07697 FE02765F 279 JEQ FRQMAPSHR fantastic! 07698 FE0E59AE 280 JMP FERRORRNA so sorry! 281 * --- 282 283 284 ********************************************************************************** 285 * * 286 * Request that is identical to the above read only * 287 * request except that if the page is stored into no protect * 288 * violation is made and the users gets his own copy of the * 289 * data for evermore. Note that the original file is * 290 * unchanged, and that the new page is a swapping page. * 291 * The only way to save the swapping page is to do a write * 292 * somewhere. This type of mapping is normally used to allow * 293 * pre-defined variables to exist in a code file, etc. User * 294 * call same as FRMAPINR. * 295 * * 296 * Stack required (see FRMAPIN) * 297 * * 298 ********************************************************************************** 299 00007699 300 FRQMAPINOC LABEL 07699 EC1F8003 6 STAK 301 STZ PUSH allocate stack space 0769A 60040005 0 IMM 302 LD R0 VPCNTLRO+VPCNTLOC 0769B FE0E7692 303 JMP FRQMAPXO see if he can read 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1645 (FRQRAFCNTL) F 101 FREQ - RAF control requests 304 * --- 305 306 END FRQMAPIN, FRQMAPINR, FRQMAPINOC routines 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1646 (FRQRAFCNTL) F 101 FREQ - RAF control requests 308 309 ********************************************************************************** 310 * * 311 * This request returns to the user the seek address * 312 * of the last data byte of a .RAF or .CODE. The current * 313 * file position is not changed. * 314 * Call: * 315 * LD R0 FRRAFLAST * 316 * FREQ lun * 317 * JLTZ R0 * 318 * ST R1 * 319 * * 320 * If the file is empty, R1 is returned as zero. * 321 * * 322 * Stack required = 8. * 323 * 1 + max ( DMOTEWNDO1 (7), GRUBWNDO1 (7), RAFCURCHEK (1), * 324 * SETWNDO1 (4) ) * 325 * * 326 ********************************************************************************** 327 328 BLOCK FRQRAFLAST routine 329 ENTRY FRQRAFLAST 330 331 BEGFRAME2 00178800 6 BASE 332 POSITION BSS 1 last position 333 ENDFRAME 334 0000769C 335 FRQRAFLAST LABEL 0769C EC1F8001 6 STAK 336 STZ PUSH allocate stack frame 0769D DC406CDF 337 CALLNP RAFCURCHEK make sure file is up to date 0769E EDC95C16 5 ZBM 338 STW FCB,FCRESEEK user will get repositioned 0769F EC178800 6 BASE 339 STZ SP,POSITION assume address of zero 340 076A0 61C403FF 7 IMM 341 LD R7 WPP-1 load index to last pointer 000076A1 342 MAPMAJOR LABEL 076A1 60096183 0 5 ZBM 343 LD R0 FCB,FCMABLK get pointer to major access block 076A2 FA0276C9 0 344 JEQZ R0 NOTLRGRAF jump if not a large RAF 076A3 E4095181 0 5 ZBM 345 ST R0 FCB,FCMSBLK save block number on drive 076A4 DC003205 346 CALL SETWNDO1 get the major access block in 076A5 41440001 IMM 347 PARV VPCNTLRO indicate read only 076A6 41534000 5 REG 348 PARV FCB indicate which FCB associated with block 076A7 410076D5 349 PAR BADRAFBLK error address 076A8 41574801 5 BASE 350 PARV FCB,FCBLOCK indicate the MS address 076A9 4044000D IMM 351 PARVL FBITLRAF indicate the type expected 352 * \ / 353 000076AA 354 SRCHMAJOR LABEL 076AA 5C2E0800 7 355 CMZ WNDO1(R7) is this block here? 076AB FE0C76AE 356 JNE MINORFND jump if last minor block found 076AC FBE676AA 7 357 JDR R7 SRCHMAJOR count down to previous block 076AD FE0E76C3 358 JMP BLKEMPTY the major block is empty, empty file 359 * --- 360 361 * A minor access block was found in the major block. 362 * Set the position and search it. 363 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1647 (FRQRAFCNTL) F 101 FREQ - RAF control requests 000076AE 364 MINORFND LABEL 076AE 602E0800 0 7 365 LD R0 WNDO1(R7) load the minor access block address 000076AF 366 MINORFNDX LABEL 076AF 610403FF 4 IMM 367 LD R4 WPP-1 load index to last pointer 000076B0 368 MINORSET LABEL 076B0 E4095181 0 5 ZBM 369 ST R0 FCB,FCMSBLK set the minor access block address 076B1 DC003205 370 CALL SETWNDO1 get the minor access block in 076B2 41440001 IMM 371 PARV VPCNTLRO indicate read only 076B3 41534000 5 REG 372 PARV FCB indicate which FCB associated with block 076B4 410076D5 373 PAR BADRAFBLK error address 076B5 41574801 5 BASE 374 PARV FCB,FCBLOCK indicate the MS address 076B6 6004000E 0 IMM 375 LD R0 FBITSRAF get type for RAF minor access block 076B7 650403FF 4 IMM 376 CPR R4 WPP-1 see if a RAF or a CODE by checking pointer size 076B8 FE0276BA 377 JEQ MINORRAF jump if RAF 076B9 60040013 0 IMM 378 LD R0 FBITCCB otherwise, change to code control block type 000076BA 379 MINORRAF LABEL 076BA 40520000 0 REG 380 PARVL R0 pass the FBI type of the block 000076BB 381 SRCHMINOR LABEL 076BB 5C280800 4 382 CMZ WNDO1(R4) is there a block here? 076BC FE0C76C0 383 JNE DATABFND jump if a data block found 076BD FB2676BB 4 384 JDR R4 SRCHMINOR go search the entire minor access block 076BE FBE676A1 7 385 JDR R7 MAPMAJOR minor empty, try another 076BF FE0E76C3 386 JMP BLKEMPTY file has no data 387 * --- 388 389 * A data block was found in the last minor block - set position 390 000076C0 391 DATABFND LABEL 076C0 E50994A0 4 6 ZBM 392 ST R4 SP,POSITION/RAFMININDX save this part of seek address 076C1 D149A8C0 6 ZBM 393 STMW SP,POSITION/RAFCHARIDX indicate last char on page 076C2 E5C980A0 7 6 ZBM 394 ST R7 SP,POSITION/RAFMAJINDX save the position 000076C3 395 BLKEMPTY LABEL 076C3 DC40315C 396 CALLNP DMOTEWNDO1 demote access block from window 000076C4 397 BLKEMPTYX LABEL 076C4 60000412 0 398 LD R0 CPPSA get the current PSA pointer 076C5 60081F11 0 0 ZBM 399 LD R0 R0,PSCACHNP1 get the pointer to his CA 076C6 60578800 1 6 BASE 400 LD R1 SP,POSITION get the last address that we just discovered 076C7 E4560803 1 0 BASE 401 ST R1 R0,CAR1 set into users R1 076C8 FE0E5982 402 JMP FNOERROR return 403 * --- 404 405 * This is not a large RAF so we only search the small block 406 000076C9 407 NOTLRGRAF LABEL 076C9 60097182 0 5 ZBM 408 LD R0 FCB,FCLPBLK get pointer to only minor block 076CA FA0276D1 0 409 JEQZ R0 NOTSMRAF jump if not a small RAF 076CB 61C40000 7 IMM 410 LD R7 0 fake first minor in a large raf 076CC 610403E7 4 IMM 411 LD R4 CCBMAXPAGE-1 get index to last possible data page 076CD 60496665 1 5 ZBM 412 LD R1 FCB,FCHTYPE get type of file 076CE 64440003 1 IMM 413 CPR R1 HTYPECODE check for code file 076CF FE0C76AF 414 JNE MINORFNDX jump if not 076D0 FE0E76B0 415 JMP MINORSET go search this index 416 * --- 417 000076D1 418 NOTSMRAF LABEL 076D1 60095181 0 5 ZBM 419 LD R0 FCB,FCMSBLK pick up the data block 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1648 (FRQRAFCNTL) F 101 FREQ - RAF control requests 076D2 FA0276C4 0 420 JEQZ R0 BLKEMPTYX completely empty RAF 076D3 D149A8C0 6 ZBM 421 STMW SP,POSITION/RAFCHARIDX say last position is end 422 * of first data block 076D4 FE0E76C4 423 JMP BLKEMPTYX and get out of here 424 * --- 425 426 * MS errors - palm it off onto user, rewind RAF, and do reseek 427 000076D5 428 BADRAFBLK LABEL 076D5 DC403150 429 CALLNP GRUBWNDO1 clean up window 076D6 FE0E59A9 430 JMP FERRORFAUR return abnormal/unavailable error 431 432 END FRQRAFLAST routine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1649 (FRQRAFCNTL) F 101 FREQ - RAF control requests 434 435 ********************************************************************************** 436 * * 437 * Request to get the current position in a RAF or CODE. * 438 * User call: * 439 * * 440 * LD R0 FRRAFCPOS * 441 * FREQ * 442 * JEQZ R0 * 443 * ST R0 * 444 * ST R1 * 445 * * 446 * Stack required = 0 * 447 * * 448 ********************************************************************************** 449 450 BLOCK FRQCURPOS routine 451 ENTRY FRQCURPOS 452 000076D7 453 FRQCURPOS LABEL 076D7 60174808 0 5 BASE 454 LD R0 FCB,FCCPP get the current position 076D8 E4170803 0 4 BASE 455 ST R0 R4,CAR1 return it in user's R1 076D9 FE0E5982 456 JMP FNOERROR success 457 * --- 458 459 END FRQCURPOS routine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1650 (FRQRAFCNTL) F 101 FREQ - RAF control requests 461 462 ********************************************************************************** 463 * * 464 * Request to get the state of the protection bit on a * 465 * particular CODE file page. The user specifies which page * 466 * to check and the current file position is not changed. * 467 * User call: * 468 * * 469 * LD R0 FRPGPROTG * 470 * LD R1 page number in CODE * 471 * FREQ lun * 472 * JLTZ R0 request error * 473 * ST R0 dynamic status * 474 * ST R2 non-zero if protected * 475 * * 476 * Stack required = 7 * 477 * 0 + max ( DMOTEWNDO1 (7), GRUBWNDO1 (7), MAPOUTFBI (2), * 478 * SETWNDO1 (4) ) * 479 * * 480 ********************************************************************************** 481 482 BLOCK FRQPROTG and FRQPROTS routines 483 ENTRY FRQPROTG 484 ENTRY FRQPROTS 485 000076DA 486 FRQPROTG LABEL 076DA EC0BC010 7 CBM 487 STZ R7/BIT 0 set flag saying get request 000076DB 488 FRQPROTSHR LABEL 076DB 60096665 0 5 ZBM 489 LD R0 FCB,FCHTYPE get the type of the file 076DC 64040003 0 IMM 490 CPR R0 HTYPECODE is this a CODE file? 076DD FE0C59A5 491 JNE FERRORILOP if not - illegal operation 076DE 60092CA3 0 4 ZBM 492 LD R0 R4,CAR1/BITS 22:31 get the specified page number 076DF 640403E8 0 IMM 493 CPR R0 CCBMAXPAGE is it within range? 076E0 FE0659B0 494 JGE FERRORPOB 495 * \ / 496 076E1 61174801 4 5 BASE 497 LD R4 FCB,FCBLOCK need volume number 076E2 60097182 0 5 ZBM 498 LD R0 FCB,FCLPBLK pick up CCB address 076E3 E40B1180 0 4 CBM 499 ST R0 R4/MSBLKFIELD turn into a complete address 076E4 F7C076F2 7 500 JBT R7/BIT 0 PROTSETR jump if a set request 501 * \ / 502 076E5 DC003205 503 CALL SETWNDO1 map in the CCB 076E6 41440001 IMM 504 PARV VPCNTLRO want it read only 076E7 41534000 5 REG 505 PARV FCB file it is associated with 076E8 41007706 506 PAR PROTGSDE error address 076E9 41530000 4 REG 507 PARV R4 block address 076EA 40440013 IMM 508 PARVL FBITCCB FBI type (CCB) 509 076EB 61000412 4 510 LD R4 CPPSA R4 -> PSA 076EC 61091F11 4 4 ZBM 511 LD R4 R4,PSCACHNP1 R4 -> caller's registers 076ED 60092CA3 0 4 ZBM 512 LD R0 R4,CAR1/BITS 22:31 pick up the requested 076EE 5C200800 0 513 CMZ WNDO1(R0) test for the protection bit 076EF ED170804 4 BASE 514 STLLT R4,CAR2 set user's reg non-zero if protected 076F0 DC40315C 515 CALLNP DMOTEWNDO1 demote raf index block 076F1 FE0E5982 516 JMP FNOERROR success 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1651 (FRQRAFCNTL) F 101 FREQ - RAF control requests 517 * --- 518 519 ********************************************************************************** 520 * * 521 * Setting protection on a non-hole. We map in the page * 522 * to get write access to it, then modify the entry. * 523 * * 524 ********************************************************************************** 525 000076F2 526 PROTSETR LABEL 076F2 DC003205 527 CALL SETWNDO1 map in the code control block 076F3 41440002 IMM 528 PARV VPCNTLW+VPCNTLLK get write access so the block may change 076F4 41534000 5 REG 529 PARV FCB indicate which FCB associated with block 076F5 41007705 530 PAR PROTSFAU pass error address 076F6 41530000 4 REG 531 PARV R4 pass MS address 076F7 40440013 IMM 532 PARVL FBITCCB we only do this to code files 076F8 DC40261B 533 CALLNP MAPOUTFBI unmap FBI, ION 534 076F9 61000412 4 535 LD R4 CPPSA R4 -> PSA 076FA 61091F11 4 4 ZBM 536 LD R4 R4,PSCACHNP1 R4 -> caller's registers 076FB 60092CA3 0 4 ZBM 537 LD R0 R4,CAR1/BITS 22:31 index into CCB 076FC 60600800 1 0 538 LD R1 WNDO1(R0) pick up the entry 076FD FA427703 1 539 JEQZ R1 PROTHOLE jump if a hole 076FE 5C170804 4 BASE 540 CMZ R4,CAR2 convert value to boolean 076FF ED8A4010 1 CBM 541 STLNE R1/CCBPROTECT protect/unprotect the page 07700 E4600800 1 0 542 ST R1 WNDO1(R0) place it back 07701 DC403150 543 CALLNP GRUBWNDO1 see that the CCB gets written out 07702 FE0E5982 544 JMP FNOERROR 545 * --- 546 547 ********************************************************************************** 548 * * 549 * A hole while setting protection. Give an error. * 550 * * 551 ********************************************************************************** 552 00007703 553 PROTHOLE LABEL 07703 DC40315C 554 CALLNP DMOTEWNDO1 demote raf index block 07704 FE0E59C6 555 JMP FERRORNSE "No such entry" if setting 556 * --- 557 558 ********************************************************************************** 559 * * 560 * The file went bad. Restore the pointer and return an error. * 561 * * 562 ********************************************************************************** 563 00007705 564 PROTSFAU LABEL 07705 DC40261B 565 CALLNP MAPOUTFBI unmap FBI, ION 566 * \ / 567 00007706 568 PROTGSDE LABEL 07706 DC403150 569 CALLNP GRUBWNDO1 release the window 07707 FE0E59AA 570 JMP FERRORFAU file abnormal! 571 * --- 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1652 (FRQRAFCNTL) F 101 FREQ - RAF control requests 573 574 ********************************************************************************** 575 * * 576 * Request to set the protection bit on a CODE file page. * 577 * The request will give an error if the thing being protected * 578 * is a hole. The current file position is not changed. * 579 * User call: * 580 * * 581 * LD R0 FRPGPROTS * 582 * LD R1 page number in the CODE file * 583 * LD R2 non-zero if to protect, zero if to unprotect * 584 * FREQ unit * 585 * JLTZ R0 request error * 586 * ST R0 dynamic status * 587 * * 588 * Stack required (see FRQPROTG) * 589 * * 590 ********************************************************************************** 591 00007708 592 FRQPROTS LABEL 07708 EDCBC010 7 CBM 593 STW R7/BIT 0 set flag saying 'set protection' 07709 60095835 0 5 ZBM 594 LD R0 FCB,FCACCESS get the access he has 0770A F23E76DB 0 595 JBF R0/FSACSNWB FRQPROTSHR do the set if its not protected 0770B FE0E59AC 596 JMP FERRORPFM "Protected from modification" 597 * --- 598 599 END FRQPROTG and FRQPROTS routines 600 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1653 (FRQRAFCNTL) F 101 FREQ - RAF control requests 602 ********************************************************************************** 603 * * 604 * This request will delete a page from either a Code or * 605 * a Raf. The file must not be open as multiple write. * 606 * User call is of the form: * 607 * * 608 * LD R0 request * 609 * LD R1 * 610 * FREQ * 611 * JLTZ R0 request error * 612 * * 613 * stack required = 13. * 614 * 1 + max ( FREEDIR (5), FREEFILE (3), GRUBWNDOx (7), * 615 * LIMITCHECK (1), SETWNDO1 (4), SRCHDIRSN (11), * 616 * UNMAPPAGE (12) ) * 617 * * 618 ********************************************************************************** 619 620 BLOCK 621 ENTRY FRQDELETE 622 623 BEGFRAME2 00178800 6 BASE 624 PAGETODEL BSS 1 the page to delete 625 ENDFRAME 626 0000770C 627 FRQDELETE LABEL 0770C 60170803 0 4 BASE 628 LD R0 R4,CAR1 get byte address 0770D E41F8001 0 6 STAK 629 ST R0 PUSH create stack and save address 0770E 60095835 0 5 ZBM 630 LD R0 FCB,FCACCESS get the current file access 0770F 64040000 0 IMM 631 CPR R0 FSACSRW is access read/write? 07710 FE0C59A5 632 JNE FERRORILOP if not then illegal operation 07711 EDC95C16 5 ZBM 633 STW FCB,FCRESEEK after this is done, do a reseek 07712 60496665 1 5 ZBM 634 LD R1 FCB,FCHTYPE get the type of device 07713 64440002 1 IMM 635 CPR R1 HTYPERAF either a Raf or a Code 07714 FE0C773F 636 JNE ITSACODE jump if a Code file 637 * \ / 07715 60496183 1 5 ZBM 638 LD R1 FCB,FCMABLK is this a large or small Raf? 07716 FA427725 1 639 JEQZ R1 NOTALARGE1 jump if a small Raf 07717 E4495181 1 5 ZBM 640 ST R1 FCB,FCMSBLK make this the current address 07718 DC003205 641 CALL SETWNDO1 get in the major access block 07719 41440001 IMM 642 PARV VPCNTLRO need read access 0771A 41534000 5 REG 643 PARV FCB indicate FCB associated 0771B 4100775D 644 PAR PDELDSKERR jump address on disk structure error 0771C 41574801 5 BASE 645 PARV FCB,FCBLOCK 0771D 4044000D IMM 646 PARVL FBITLRAF indicate file block is large RAF index 0771E 600980A0 0 6 ZBM 647 LD R0 SP,PAGETODEL/RAFMAJINDX get offset in major block 0771F 60200800 0 0 648 LD R0 WNDO1(R0) get address of minor access block 07720 FA02775B 0 649 JEQZ R0 NOPGTHERE no minor access block found 07721 E4095181 0 5 ZBM 650 ST R0 FCB,FCMSBLK this is the minor block 07722 DC403150 651 CALLNP GRUBWNDO1 release this block 07723 6104000E 4 IMM 652 LD R4 FBITSRAF next block is a raf minor index 07724 FE0E7745 653 JMP SHARERESTX go share the rest of the code 654 * --- 655 656 * It's not a large RAF or code file. See if it is a small 657 * or tiny RAF. 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1654 (FRQRAFCNTL) F 101 FREQ - RAF control requests 00007725 658 NOTALARGE1 LABEL 07725 6104000E 4 IMM 659 LD R4 FBITSRAF assume a small RAF 07726 60497182 1 5 ZBM 660 LD R1 FCB,FCLPBLK get the minor access block address 07727 FA4C7744 1 661 JNEZ R1 SHAREREST jump if we have a minor 662 * \ / 663 664 * We are deleting a page from a tiny RAF. If the page is not 665 * data page zero then it is already gone. If data page zero 666 * does not exist then we are done, too. Otherwise we must 667 * remove data page zero and update the FDE if a saved file. 668 07728 60178800 0 6 BASE 669 LD R0 SP,PAGETODEL get the doomed page 07729 64041000 0 IMM 670 CPR R0 CPP is it within the first page 0772A FE065982 671 JGE FNOERROR if not, then it is already deleted 672 * \ / 673 0772B 5C095181 5 ZBM 674 CMZ FCB,FCMSBLK is there a block 0 to delete 0772C FE025982 675 JEQ FNOERROR if not then done 676 * \ / 677 0772D 5C096415 5 ZBM 678 CMZ FCB,FCSAVED is this a saved file? 0772E FE027738 679 JEQ NOTSAVED if not then things are much easier 680 * \ / 681 0772F DC0082BB 682 CALL SRCHDIRSN look for the directory entry 07730 40005983 683 PARL FERROR error address 07731 FE027733 684 JEQ FOUNDENT jump if we found the entry 07732 00131149 685 HALT HALTS1149 save file dir entry disappeared 686 * --- 687 00007733 688 FOUNDENT LABEL 07733 EC08D185 3 ZBM 689 STZ R3,FDDA no more root block 07734 EC08D186 3 ZBM 690 STZ R3,FDLEN zero length file 07735 DC403150 691 CALLNP GRUBWNDO1 release the window 07736 DC403153 692 CALLNP GRUBWNDO2 release the window 07737 DC405685 693 CALLNP FREEDIR release the dir 694 * \ / 695 00007738 696 NOTSAVED LABEL 07738 DC405EDF 697 CALLNP UNMAPPAGE unmap FCBLOCK from session's UPCs 07739 DC004FEA 698 CALL FREEFILE give back the block 0773A 41574801 5 BASE 699 PARV FCB,FCBLOCK the block we are returning 0773B 4044000F IMM 700 PARVL FBITRAFD RAF data block 0773C EC095181 5 ZBM 701 STZ FCB,FCMSBLK clear this 0773D EC094182 5 ZBM 702 STZ FCB,FCTFL and the file length too 0773E FE0E5982 703 JMP FNOERROR we are out of here 704 * --- 705 706 * It's a Code file -- check for smaller max 0000773F 707 ITSACODE LABEL 0773F 60098140 0 6 ZBM 708 LD R0 SP,PAGETODEL/(RAFMAJINDX+RAFMININDX) 07740 640403E8 0 IMM 709 CPR R0 CCBMAXPAGE beyond the end of the code file? 07741 FE0459DA 710 JGT UERRORPOB error if so 07742 61040013 4 IMM 711 LD R4 FBITCCB the type of the block 07743 60497182 1 5 ZBM 712 LD R1 FCB,FCLPBLK get addr of the root block 713 * \ / 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1655 (FRQRAFCNTL) F 101 FREQ - RAF control requests 00007744 714 SHAREREST LABEL 07744 E4495181 1 5 ZBM 715 ST R1 FCB,FCMSBLK make a full disk address 00007745 716 SHARERESTX LABEL 07745 DC003205 717 CALL SETWNDO1 get in the data's index block 07746 41440000 IMM 718 PARV VPCNTLW we'll need to write it 07747 41534000 5 REG 719 PARV FCB indicate associated file 07748 4100775D 720 PAR PDELDSKERR where to go on disk error 07749 41574801 5 BASE 721 PARV FCB,FCBLOCK pass MS address 0774A 40530000 4 REG 722 PARVL R4 the type of the FBI 723 * \ / 0774B 600994A0 0 6 ZBM 724 LD R0 SP,PAGETODEL/RAFMININDX pick up minor block index 0774C 60600800 1 0 725 LD R1 WNDO1(R0) get the address of the data page 0774D FA42775B 1 726 JEQZ R1 NOPGTHERE jump if there is no page to delete 727 * \ / 728 729 * Adjust the index block and free up the page 0774E E4495181 1 5 ZBM 730 ST R1 FCB,FCMSBLK remember the deleted block 0774F EC200800 0 731 STZ WNDO1(R0) delete the page 07750 DC403150 732 CALLNP GRUBWNDO1 unmap the window 733 07751 DC405EDF 734 CALLNP UNMAPPAGE unmap FCBLOCK from session's UPCs 07752 DC004FEA 735 CALL FREEFILE release the deleted block 07753 41574801 5 BASE 736 PARV FCB,FCBLOCK the block to go 07754 40440000 IMM 737 PARVL FFTUNKNOWN just some block 738 * \ / 739 740 * Remove space from use 07755 D0494182 5 ZBM 741 DEC FCB,FCTFL remove the block from the file 07756 61095114 4 5 ZBM 742 LD ULB FCB,FCLIMITPTR get ULB pointer 07757 6047FFFF 1 IMM 743 LD R1 -1 indicate one block removed 07758 DC405C7B 744 CALLNP LIMITCHECK remove space from this user 07759 00131148 745 HALT HALTS1148 bogus return from LIMITCHECK 0775A FE0E5982 746 JMP FNOERROR 747 * --- 748 0000775B 749 NOPGTHERE LABEL 0775B DC403150 750 CALLNP GRUBWNDO1 get rid of access block 0775C FE0E5982 751 JMP FNOERROR 752 * --- 753 0000775D 754 PDELDSKERR LABEL 0775D 61D20000 7 0 REG 755 LD R7 R0 copy the error code 0775E DC403150 756 CALLNP GRUBWNDO1 get rid of access block 0775F FE0E5997 757 JMP FERROR7 jump with error in R7 758 * --- 759 760 END of FRQDELETE 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1656 (FRQRAFCNTL) F 101 FREQ - RAF control requests 762 763 ********************************************************************************** 764 * * 765 * This request will find the next non-hole in a RAF or * 766 * CODE starting from the current position. To find the next * 767 * non-hole one will have to position forward to the next * 768 * block, otherwise the search will find the same block * 769 * again. User call is of the form: * 770 * * 771 * LD R0 FRRAFNEXT * 772 * FREQ * 773 * JLTZ R0 request error * 774 * ST R1 new current position * 775 * * 776 * Stack required = 9 * 777 * 1 + max ( DMOTEWNDOx (7), FNDNONHOLE (8), RAFCURCHEK (1) ) * 778 * * 779 ********************************************************************************** 780 781 BLOCK FRQRAFNEXT routine 782 ENTRY FRQRAFNEXT 783 784 BEGFRAME2 00178800 6 BASE 785 LASTCPP BSS 1 last current position pointer 786 ENDFRAME 787 00007760 788 FRQRAFNEXT LABEL 07760 EC1F8001 6 STAK 789 STZ PUSH allocate stack frame 07761 DC406CDF 790 CALLNP RAFCURCHEK make sure file is up to date 07762 60174808 0 5 BASE 791 LD R0 FCB,FCCPP get our current position pointer 07763 E4178800 0 6 BASE 792 ST R0 SP,LASTCPP save for possible later use 793 * \ / 07764 DC405D33 794 CALLNP FNDNONHOLE find next non-hole page 07765 FE0E59CA 795 JMP FERRORDSE disk structure error 07766 FE0E7771 796 JMP NOPAGES jump if no more blocks 797 * \ / 07767 DC40315F 798 CALLNP DMOTEWNDO2 clean up MAJ access block 07768 DC40315C 799 CALLNP DMOTEWNDO1 also MIN access block 07769 EDC95C16 5 ZBM 800 STW FCB,FCRESEEK indicate next operation requires a reseek 0776A 5C174808 5 BASE 801 CMZ FCB,FCCPP are we positioned at load point 0776B EC494C15 5 ZBM 802 STLEQ FCB,FCLOADPT remember for the users sake 0776C 60000412 0 803 LD R0 CPPSA current process status 0776D 60081F11 0 0 ZBM 804 LD R0 R0,PSCACHNP1 pointer to callers console area 0776E 60574808 1 5 BASE 805 LD R1 FCB,FCCPP get the new current position 0776F E4560803 1 0 BASE 806 ST R1 R0,CAR1 stuff into users R1 07770 FE0E5982 807 JMP FNOERROR return to caller 808 * --- 809 00007771 810 NOPAGES LABEL 07771 60178800 0 6 BASE 811 LD R0 SP,LASTCPP get starting position pointer 07772 E4174808 0 5 BASE 812 ST R0 FCB,FCCPP and make it current 07773 EDC95C16 5 ZBM 813 STW FCB,FCRESEEK indicate next operation requires a reseek 07774 FE0E5982 814 JMP FNOERROR return to caller 815 * --- 816 817 END FRQRAFNEXT routine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1657 (FRQRAFCNTL) F 101 Fetch code control block information 820 821 ********************************************************************************** 822 * * 823 * These requests are to get and set the information that * 824 * is in the code control block of the code file. It is * 825 * privileges and other information that is related to a program. * 826 * These are the old form requests. See FREQCCBGET and * 827 * FREQCCBSET for the new requests. * 828 * * 829 * Stack required = 7. * 830 * 0 + max ( ACCESSMASK (6), DMOTEWNDO1 (7), GRUBWNDO1 (7), * 831 * PRIV2MACCT (1), SETWNDO1 (4) ) * 832 * * 833 ********************************************************************************** 834 835 BLOCK FREQCODEIG and FREQCODEIS routines 836 ENTRY FREQCODEIG entry to get code info 837 ENTRY FREQCODEIS entry to set code stuff 838 839 * Get information from the code control block. 00007775 840 FREQCODEIG LABEL 07775 6484000F 2 IMM 841 CPR R2 0F check for new code 07776 FE0277ED 842 JEQ FREQCCBGET jump if new form 07777 EC0BC010 7 CBM 843 STZ R7/BIT 0 say get 07778 FE0E777C 844 JMP SHARECODE 845 * --- 846 00007779 847 FREQCODEIS LABEL 07779 6484000F 2 IMM 848 CPR R2 0F check for new code 0777A FE0277F8 849 JEQ FREQCCBSET jump if new form 0777B EDCBC010 7 CBM 850 STW R7/BIT 0 flag to say set 0000777C 851 SHARECODE LABEL 0777C 6484000D 2 IMM 852 CPR R2 CODEIMAX see if the request in bounds 0777D FE0659D8 853 JGE UERRORILR 0777E FB7059B8 5 854 JZA FCB FERRORLNE3 make sure lun equipped 0777F 60096665 0 5 ZBM 855 LD R0 FCB,FCHTYPE pick up type of this unit 07780 64040003 0 IMM 856 CPR R0 HTYPECODE the device must be a code file 07781 FE0C59A5 857 JNE FERRORILOP 07782 60095835 0 5 ZBM 858 LD R0 FCB,FCACCESS see if access is allowed 07783 64040007 0 IMM 859 CPR R0 FSACSNDA 07784 FE0259AC 860 JEQ FERRORPFM jump if no data access 07785 F3C07787 7 861 JBF R7/BIT 0 INFOGET jump if not modifying 07786 F63E59AC 0 862 JBT R0/FSACSNWB FERRORPFM jump if file protected 00007787 863 INFOGET LABEL 07787 E49F8001 2 6 STAK 864 ST R2 STAK SP,1 save the operation code 07788 60097182 0 5 ZBM 865 LD R0 FCB,FCLPBLK 07789 E0095181 0 5 ZBM 866 EXCH R0 FCB,FCMSBLK save the current data block 0778A E41F8001 0 6 STAK 867 ST R0 STAK SP,1 save the data block 0778B DC003205 868 CALL SETWNDO1 get the information block in 0778C 41440000 IMM 869 PARV VPCNTLW with write access 0778D 41534000 5 REG 870 PARV FCB indicate which FCB associated with block 0778E 410077A7 871 PAR CCBWENTBAD 0778F 41574801 5 BASE 872 PARV FCB,FCBLOCK pass the MS address 07790 40440013 IMM 873 PARVL FBITCCB indicate the type of block expected 07791 621F8002 016 STAK 874 LD2 R0 STAK SP,2 07792 E4095181 0 5 ZBM 875 ST R0 FCB,FCMSBLK restore "current" data block 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1658 (FRQRAFCNTL) F 101 Fetch code control block information 07793 5C000800 876 CMZ WNDO1 get any disk errors 07794 60170803 0 4 BASE 877 LD R0 R4,CAR1 R1=user's new value 07795 60C40BE8 3 IMM 878 LD R3 ADR WNDO1(CCBINFO) R3=>root of information 07796 F3C077AA 7 879 JBF R7/BIT 0 CODEIGET jump if a get 07797 64440003 1 IMM 880 CPR R1 JSDIF see if bit field change 07798 FE0677C8 881 JGE DIDDLEBIT jump if so 07799 5CA2779A 1 882 LDPC CODEIJMP(R1) put information 883 * --- 884 0000779A 885 CODEIJMP LABEL 0779A 000077BB 886 VFD ADR CODEPTSET set primary transfer addr 0779B 000077BD 887 VFD ADR CODE2TSET set secondary transfer addr 0779C 000077BF 888 VFD ADR CODEODSET set own directory bit 889 0000779D 890 GETTAB LABEL below are bit twiddles 00000003 ABS 891 JSDIF EQU GETTAB DISPW CODEIJMP 0779D 4008C050 3 ZBM 892 PARL R3,CCBRSTCTG1 0779E 4008CA50 3 ZBM 893 PARL R3,CCBRSTCTG2 0779F 4008D450 3 ZBM 894 PARL R3,CCBRSTCTG3 077A0 4008DE50 3 ZBM 895 PARL R3,CCBRSTCTG4 077A1 4008E850 3 ZBM 896 PARL R3,CCBRSTCTG5 077A2 4008F620 3 ZBM 897 PARL R3,CCBOPREQ 077A3 4008FA40 3 ZBM 898 PARL R3,CCBMANAGR 077A4 4008F210 3 ZBM 899 PARL R3,CCBMAINTR 077A5 4008F410 3 ZBM 900 PARL R3,CCBMAINTW 077A6 4008C421 3 ZBM 901 PARL R3,CCBBACKUP 0000000D ABS 902 CODEIMAX EQU DISPW CODEIJMP 903 904 ********************************************************************************** 905 * * 906 * The stupid code control block went bad. Pass the * 907 * problem off to the user. * 908 * * 909 ********************************************************************************** 910 000077A7 911 CCBWENTBAD LABEL 077A7 EDC95C16 5 ZBM 912 STW FCB,FCRESEEK say known pointers bad 077A8 DC403150 913 CALLNP GRUBWNDO1 release the window 077A9 FE0E59AA 914 JMP FERRORFAU 915 * --- 916 917 ********************************************************************************** 918 * * 919 * Get code file information -- a simple matter of fetching * 920 * through a table. * 921 * * 922 ********************************************************************************** 923 000077AA 924 CODEIGET LABEL 077AA 5D6277AE 1 925 XCT CODEIGETT(R1) get the code 077AB E4170803 0 4 BASE 926 ST R0 R4,CAR1 place gotten value in R1 000077AC 927 CODEXIT LABEL 077AC DC40315C 928 CALLNP DMOTEWNDO1 free up the window 077AD FE0E5982 929 JMP FNOERROR 930 * --- 931 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1659 (FRQRAFCNTL) F 101 Fetch code control block information 000077AE 932 CODEIGETT LABEL 077AE 6008DF18 0 3 ZBM 933 LD R0 R3,CCBPTRANS 077AF 6016C80A 0 3 BASE 934 LD R0 R3,CCB2TRANS 077B0 6008C211 0 3 ZBM 935 LD R0 R3,CCBOWNDIR 077B1 6008C050 0 3 ZBM 936 LD R0 R3,CCBRSTCTG1 077B2 6008CA50 0 3 ZBM 937 LD R0 R3,CCBRSTCTG2 077B3 6008D450 0 3 ZBM 938 LD R0 R3,CCBRSTCTG3 077B4 6008DE50 0 3 ZBM 939 LD R0 R3,CCBRSTCTG4 077B5 6008E850 0 3 ZBM 940 LD R0 R3,CCBRSTCTG5 077B6 6008F620 0 3 ZBM 941 LD R0 R3,CCBOPREQ 077B7 6008FA40 0 3 ZBM 942 LD R0 R3,CCBMANAGR 077B8 6008F210 0 3 ZBM 943 LD R0 R3,CCBMAINTR 077B9 6008F410 0 3 ZBM 944 LD R0 R3,CCBMAINTW 077BA 6008C421 0 3 ZBM 945 LD R0 R3,CCBBACKUP 946 947 ********************************************************************************** 948 * * 949 * Set primary transfer address. * 950 * * 951 ********************************************************************************** 952 000077BB 953 CODEPTSET LABEL 077BB E408DF18 0 3 ZBM 954 ST R0 R3,CCBPTRANS 077BC FE0E77AC 955 JMP CODEXIT 956 * --- 957 958 ********************************************************************************** 959 * * 960 * Set secondary transfer address. * 961 * * 962 ********************************************************************************** 963 000077BD 964 CODE2TSET LABEL 077BD E416C80A 0 3 BASE 965 ST R0 R3,CCB2TRANS 077BE FE0E77AC 966 JMP CODEXIT 967 * --- 968 969 ********************************************************************************** 970 * * 971 * Set own directory bit. Must have modify access to do * 972 * this. * 973 * * 974 ********************************************************************************** 975 000077BF 976 CODEODSET LABEL 077BF DC005C07 977 CALL PRIV2MACCT enough privs to change? 077C0 40494E45 5 ZBM 978 PARVL FCB,FCPRIV pass the privs found in open 077C1 FE0E77C6 979 JMP CODERPFM no, give protected error 077C2 60170803 0 4 BASE 980 LD R0 R4,CAR1 reload his value 077C3 5C120000 0 REG 981 CMZ R0 convert to boolean 077C4 ED88C211 3 ZBM 982 STLNE R3,CCBOWNDIR save as value<>0 077C5 FE0E77AC 983 JMP CODEXIT done 984 * --- 985 000077C6 986 CODERPFM LABEL 077C6 DC403150 987 CALLNP GRUBWNDO1 release the window 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1660 (FRQRAFCNTL) F 101 Fetch code control block information 077C7 FE0E59AC 988 JMP FERRORPFM and give the error 989 * --- 990 991 ********************************************************************************** 992 * * 993 * The field being mangled is bit encoded as to the level * 994 * in the account tree the privilege is being forced. The * 995 * following code figures out the level the modifier has then * 996 * sees that privileges from above are not changed and that * 997 * the privileges below are modifiable by the caller. If the * 998 * caller specifies to change a bit above his level, only his * 999 * level bit will be changed (thus a request to set the * 1000 * "always" bit will only set the requesters bit). * 1001 * * 1002 ********************************************************************************** 1003 000077C8 1004 DIDDLEBIT LABEL 077C8 DC005BBA 1005 CALL ACCESSMASK merge the new bits in field 077C9 41170803 4 BASE 1006 PAR R4,CAR1 the requested contents 077CA 5D62779A 1 1007 XCT GETTAB(R1-JSDIF) (this is a PARL) 077CB FE0E77AC 1008 JMP CODEXIT 1009 * --- 1010 1011 END FREQCODEIG and FREQCODEIS routines 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1661 (FRQRAFCNTL) F 101 FREQ - Get/Set Code Control Block Info 1014 1015 ********************************************************************************** 1016 * * 1017 * These requests are the new form of CCB info requests. * 1018 * To get a field: * 1019 * LD R0 FRGETCCB * 1020 * LD R1 * 1021 * FREQ * 1022 * JLTZ R0 * 1023 * ST R2 * 1024 * * 1025 * To set a field: * 1026 * LD R0 FRSETCCB * 1027 * LD R1 * 1028 * LD R2 * 1029 * FREQ * 1030 * JLTZ R0 * 1031 * * 1032 * The privileges in a CCB are considered sensitive information. * 1033 * You must have modify privilege over the file in order to * 1034 * set them. Also, the data is passed through a filter so that * 1035 * you will only set those bits that you are allowed. * 1036 * * 1037 * Stack required = 9. * 1038 * 0 + max ( ACCESSMASK (6), CCBGETINIT (9), DMOTEWNOD1 (7), * 1039 * GRUBWNDO1 (7), PRIV2MACCT (1) ) * 1040 * * 1041 ********************************************************************************** 1042 1043 BLOCK FREQCCBGET and FREQCCBSET routines 1044 ENTRY FREQCCBGET get info from CCB 1045 ENTRY FREQCCBSET set info into CCB 1046 000077CC 1047 FIELDTAB LABEL table of the field numbers 077CC 00000BF2 1048 PTR WNDO1/CCBINFO/CCBPREGS/CAR0 R0 077CD 00000BF3 1049 PTR WNDO1/CCBINFO/CCBPREGS/CAR1 R1 077CE 00000BF4 1050 PTR WNDO1/CCBINFO/CCBPREGS/CAR2 R2 077CF 00000BF5 1051 PTR WNDO1/CCBINFO/CCBPREGS/CAR3 R3 077D0 00000BF6 1052 PTR WNDO1/CCBINFO/CCBPREGS/CAR4 R4 077D1 00000BF7 1053 PTR WNDO1/CCBINFO/CCBPREGS/CAR5 R5 077D2 00000BF8 1054 PTR WNDO1/CCBINFO/CCBPREGS/CAR6 R6 077D3 00000BF9 1055 PTR WNDO1/CCBINFO/CCBPREGS/CAR7 R7 077D4 7C480BF0 1056 PTR WNDO1/CCBINFO/CCBPREGS/CAPC PC 077D5 03C80BF0 1057 PTR WNDO1/CCBINFO/CCBPREGS/CAPSR PSR 077D6 00000BFB 1058 PTR WNDO1/CCBINFO/CCBPREGS/CAINTMASK interrupt mask register 077D7 7C480BFA 1059 PTR WNDO1/CCBINFO/CCBPREGS/CAINTADR/FLDADRS interrupt address 077D8 00000000 1060 VFD 0 room to expand 077D9 00000000 1061 VFD 0 room to expand 077DA 00000000 1062 VFD 0 room to expand 077DB 00000000 1063 VFD 0 room to expand 00000010 ABS 1064 SENSITIVE EQU DISPW FIELDTAB fields from here on are sensitive 077DC 08480BE9 1065 PTR WNDO1/CCBINFO/CCBOWNDIR own directory bit 00000011 ABS 1066 MASKEDFLDS EQU DISPW FIELDTAB fields from here on need masking 077DD 01480BE8 1067 PTR WNDO1/CCBINFO/CCBRSTCTG1 restriction group 1 077DE 29480BE8 1068 PTR WNDO1/CCBINFO/CCBRSTCTG2 restriction group 2 077DF 51480BE8 1069 PTR WNDO1/CCBINFO/CCBRSTCTG3 restriction group 3 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1662 (FRQRAFCNTL) F 101 FREQ - Get/Set Code Control Block Info 077E0 79480BE8 1070 PTR WNDO1/CCBINFO/CCBRSTCTG4 restriction group 4 077E1 A1480BE8 1071 PTR WNDO1/CCBINFO/CCBRSTCTG5 restriction group 5 077E2 C8480BE8 1072 PTR WNDO1/CCBINFO/CCBMAINTR maintenance read 077E3 D0480BE8 1073 PTR WNDO1/CCBINFO/CCBMAINTW maintenance write 077E4 D8880BE8 1074 PTR WNDO1/CCBINFO/CCBOPREQ operator privileges 077E5 E9080BE8 1075 PTR WNDO1/CCBINFO/CCBMANAGR manager privilege 077E6 10880BE9 1076 PTR WNDO1/CCBINFO/CCBBACKUP backup privilege 077E7 00000000 1077 VFD 0 unused codes 077E8 00000000 1078 VFD 0 unused codes 077E9 00000000 1079 VFD 0 unused codes 077EA 00000000 1080 VFD 0 unused codes 077EB 00000000 1081 VFD 0 unused codes 077EC 00000000 1082 VFD 0 unused codes 00000021 ABS 1083 ENDTAB EQU DISPW FIELDTAB 1084 1085 ********************************************************************************** 1086 * This is the code for getting the CCB information. * 1087 ********************************************************************************** 1088 000077ED 1089 FREQCCBGET LABEL 077ED DC407811 1090 CALLNP CCBGETINIT initialize 077EE 68440021 1 IMM 1091 UCPR R1 ENDTAB check to see if beyond end of table 077EF FE0677F6 1092 JGE FRCCGILR illegal request if so 077F0 602277CC 0 1 1093 LD R0 FIELDTAB(R1) R0 => field we want 077F1 FA0277F3 0 1094 JEQZ R0 NOLOAD jump if doesn't exist 077F2 60160400 0 0 @R 1095 LD R0 @R0 get the value 000077F3 1096 NOLOAD LABEL 077F3 E4170804 0 4 BASE 1097 ST R0 R4,CAR2 put into users R2 077F4 DC40315C 1098 CALLNP DMOTEWNDO1 release the window 077F5 FE0E5982 1099 JMP FNOERROR return, no error 1100 * --- 1101 000077F6 1102 FRCCGILR LABEL 077F6 DC403150 1103 CALLNP GRUBWNDO1 release the window 077F7 FE0E59D8 1104 JMP UERRORILR and report the error 1105 * --- 1106 1107 ********************************************************************************** 1108 * * 1109 * This is where we come to do the setting of * 1110 * the CCB information. * 1111 * * 1112 ********************************************************************************** 1113 000077F8 1114 FREQCCBSET LABEL 077F8 DC407811 1115 CALLNP CCBGETINIT initialize 077F9 68440021 1 IMM 1116 UCPR R1 ENDTAB check to see if beyond end of table 077FA FE0677F6 1117 JGE FRCCGILR illegal request if so 077FB 60095835 0 5 ZBM 1118 LD R0 FCB,FCACCESS check the users access to this file 077FC F63E780F 0 1119 JBT R0/FSACSNWB FRCCGPFM jump if write not allowed 077FD 64440010 1 IMM 1120 CPR R1 SENSITIVE are we into the sensitive stuff? 077FE FE08780A 1121 JLT DOSET jump if not 1122 * \ / 077FF DC005C07 1123 CALL PRIV2MACCT enough privs to change? 07800 40494E45 5 ZBM 1124 PARVL FCB,FCPRIV 07801 FE0E780F 1125 JMP FRCCGPFM jump if not enough privs 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1663 (FRQRAFCNTL) F 101 FREQ - Get/Set Code Control Block Info 1126 * \ / 07802 64440011 1 IMM 1127 CPR R1 MASKEDFLDS are we into the bit fields? 07803 FE08780A 1128 JLT DOSET jump if not 1129 * \ / 07804 606277CC 1 1 1130 LD R1 FIELDTAB(R1) R1 => field to modify 07805 FA42780D 1 1131 JEQZ R1 NOSTORE jump if no field 07806 DC005BBA 1132 CALL ACCESSMASK do mask and place field 07807 41528000 2 REG 1133 PARV R2 what to set to 07808 40164400 1 @R 1134 PARL @R1 field to set 07809 FE0E780D 1135 JMP NOSTORE return, done 1136 * --- 1137 0000780A 1138 DOSET LABEL 0780A 606277CC 1 1 1139 LD R1 FIELDTAB(R1) get the address 0780B FA42780D 1 1140 JEQZ R1 NOSTORE jump if no field corresponding 0780C E4964400 2 1 @R 1141 ST R2 @R1 do the store 0000780D 1142 NOSTORE LABEL 0780D DC40315C 1143 CALLNP DMOTEWNDO1 release the window 0780E FE0E5982 1144 JMP FNOERROR return, no error 1145 * --- 1146 0000780F 1147 FRCCGPFM LABEL 0780F DC403150 1148 CALLNP GRUBWNDO1 release the window 07810 FE0E59AC 1149 JMP FERRORPFM and report the error 1150 * --- 1151 1152 END FREQCCBGET and FREQCCBSET routines 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1664 (FRQRAFCNTL) F 101 FREQ - Get/Set Code Control Block Info 1154 1155 ********************************************************************************** 1156 * * 1157 * CCBGETINIT - Initialize for CCB Get/Set requests. * 1158 * This routine will: * 1159 * Verify that the requested file is open and a code file. * 1160 * Verify that the file is not open NDA. * 1161 * Map the CCB into Wndo1, RW. * 1162 * Set R1, R2 to the callers R1 and R2 * 1163 * Call: * 1164 * FCB => FCB * 1165 * CALLNP GETCCBINIT * 1166 * Eats R0:R3. Sets R0, R1, WNDO1. * 1167 * Does not return on errors. * 1168 * * 1169 * Stack required = 9. * 1170 * 2 + max ( GRUBWNDO1 (7), SETWNDO1 (4) ) * 1171 * * 1172 ********************************************************************************** 1173 1174 BLOCK CCBGETINIT subroutine 1175 ENTRY CCBGETINIT initializer for CCB get/set 1176 1177 BEGFRAME 00178801 6 BASE 1178 SAVEMSBLK BSS 1 to save MS address 1179 ENDFRAME 1180 07811 DD5F8002 6 STAK 1181 CCBGETINIT ENTRNP PUSH 07812 FB7059B8 5 1182 JZA FCB FERRORLNE3 jump if no unit 07813 60096665 0 5 ZBM 1183 LD R0 FCB,FCHTYPE get the hardware type 07814 64040003 0 IMM 1184 CPR R0 HTYPECODE it must be a code 07815 FE0C59A5 1185 JNE FERRORILOP jump to error if not 07816 60095835 0 5 ZBM 1186 LD R0 FCB,FCACCESS check the users access 07817 64040007 0 IMM 1187 CPR R0 FSACSNDA is it NDA? 07818 FE0259AC 1188 JEQ FERRORPFM can't even look, if only NDA 1189 * (because CCB info is data from the file) 07819 60097182 0 5 ZBM 1190 LD R0 FCB,FCLPBLK get the head block of the file 0781A E0095181 0 5 ZBM 1191 EXCH R0 FCB,FCMSBLK build complete MS address 0781B E4178801 0 6 BASE 1192 ST R0 SP,SAVEMSBLK and save the old MS address 1193 0781C DC003205 1194 CALL SETWNDO1 call to map in the CCB 0781D 41440000 IMM 1195 PARV VPCNTLW we want it with write access 0781E 41534000 5 REG 1196 PARV FCB pass the associated FCB 0781F 41007826 1197 PAR BADCCB where to go on error 07820 41574801 5 BASE 1198 PARV FCB,FCBLOCK pass the MS address 07821 40440013 IMM 1199 PARVL FBITCCB indicate it's to be a code control block 07822 60178801 0 6 BASE 1200 LD R0 SP,SAVEMSBLK retrieve the old MS address 07823 E4095181 0 5 ZBM 1201 ST R0 FCB,FCMSBLK and restore 07824 62570803 124 BASE 1202 LD2 R1 R4,CAR1 get the users registers 07825 5D1F8002 6 STAK 1203 LEAVE POP return 1204 * --- 1205 00007826 1206 BADCCB LABEL 07826 EDC95C16 5 ZBM 1207 STW FCB,FCRESEEK indicate that we need to reseek this file 07827 DC403150 1208 CALLNP GRUBWNDO1 release the window 07828 FE0E59AA 1209 JMP FERRORFAU and indicate problem 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1665 (FRQRAFCNTL) F 101 FREQ - Get/Set Code Control Block Info 1210 * --- 1211 1212 END CCBGETINIT subroutine 1213 1214 1215 END RAFCNTLB RAF Control Routines 153 INPUT FRQRLOCK file resource locking control 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1666 (FRQRLOCK) F 102 FREQ - Saved File Resource Locks 3 4 ********************************************************************************** 5 * * 6 * Control of access to a file requires a queuing * 7 * semaphore. Rather than locking the file, however, we * 8 * allow users to lock "resources" out of the file. The lock * 9 * is on the combination of file serial number and a * 10 * resource. To us, a resource is simply some integer. It * 11 * is up to the user to decide what it will represent and to * 12 * maintain consistency in the use of that representation. * 13 * Any 32 bit value is a valid resource number, however only a * 14 * maximum of MAXRESRCE (128) will be allowed per file. The * 15 * structure we use is a three-fold linked list. DLOCKLIST * 16 * holds the list of LOK elements on the system (files that * 17 * have resources locked). Off of each LOK is a list of RCEs * 18 * indicating which resources from that file are locked. Off * 19 * of each RCE is a list of LIDs identifying the locker(s) of * 20 * those resources. A resource is locked if there exists for * 21 * it a RCE (which must have a LID). The LIDREADING flag * 22 * indicates whether the lock is held for reading access. * 23 * * 24 * Stack required = 9. * 25 * 0 + max ( CHKLOKWAIT (2), FINDLOKHD (1), FREELID (1), * 26 * FREELOK (2), FREERCE (9), LOCKWAIT(0), * 27 * PLACELOKHD (2), SGETMEM (0), SRCHLIST(1), * 28 * SUSPENDCAL (0), UNSRCHLIST(1) ) * 29 * * 30 ********************************************************************************** 31 32 BLOCK FREQRLOCK routine 33 ENTRY FREQRLOCK 34 00007829 35 FREQRLOCK LABEL 07829 68840007 2 IMM 36 UCPR R2 FREQRLOCKM is the sub operation in bounds? 0782A FE0659D8 37 JGE UERRORILR illegal request if not 0782B FB7059B8 5 38 JZA FCB FERRORLNE3 error if unit not opened 0782C 5C096415 5 ZBM 39 CMZ FCB,FCSAVED the file must be saved 0782D FE0259BE 40 JEQ FERRORLNS error if not 0782E 5CA4782F 2 41 LDPC FREQRLOCKT(R2) decode the sub-operation code 42 * --- 43 0000782F 44 FREQRLOCKT LABEL 0782F 00007836 45 VFD ADR IMPLOCK 0 - lock resource 0 for write 07830 00007887 46 VFD ADR IMPLOCKU 1 - unlock resource 0 07831 000078B0 47 VFD ADR IMPLOCKT 2 - test state of resource 0 07832 0000783D 48 VFD ADR ILOCKR 3 - lock for reading access 07833 0000783B 49 VFD ADR ILOCKW 4 - lock for writing access 07834 00007889 50 VFD ADR IUNLOCK 5 - unlock 07835 000078B3 51 VFD ADR ILOCKTEST 6 - test state of the lock 00000007 ABS 52 FREQRLOCKM EQU DISPW FREQRLOCKT 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1667 (FRQRLOCK) F 102 FREQ - Saved File Resource Locks 54 55 ********************************************************************************** 56 * * 57 * FRFILELOCK. This request in conjunction with FRFILEULOK * 58 * and FRFILELOKT implement implicit locks over the entire * 59 * file. Approximately. * 60 * * 61 * LD R0 FRFILELOCK * 62 * FREQ * 63 * R0 = error code | dynamic status * 64 * * 65 ********************************************************************************** 66 00007836 67 IMPLOCK LABEL 07836 EC0BC010 7 CBM 68 STZ R7/BIT 0 write access ... 07837 5C091E22 4 ZBM 69 CMZ R4,CAR0/XRFLDSUSP will user want to suspend? 07838 EC4BC210 7 CBM 70 STLEQ R7/BIT 1 save the answer for later 07839 61040000 4 IMM 71 LD R4 0 on resource 0 0783A FE0E7841 72 JMP OLDANDNEW jump into new code 73 * --- 74 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1668 (FRQRLOCK) F 102 FREQ - Saved File Resource Locks 76 77 ********************************************************************************** 78 * * 79 * FRRESLOCKW. FRRESLOCKR. These requests lock the implicit lock * 80 * associated with the specified file resource. FRRESLOCKW locks it * 81 * for write access. FRRESLOCKR locks it for read access. * 82 * * 83 * LD R0 * 84 * LD R1 * 85 * FREQ * 86 * R0 = error code | dynamic status * 87 * * 88 ********************************************************************************** 89 0000783B 90 ILOCKW LABEL 0783B EC0BC010 7 CBM 91 STZ R7/BIT 0 say that we'll want write access 0783C FE0E783E 92 JMP LOCKSHR share some code 93 * --- 94 0000783D 95 ILOCKR LABEL 0783D EDCBC010 7 CBM 96 STW R7/BIT 0 say that we'll want read access 97 * \ / 98 99 * Shared code from here on out 0000783E 100 LOCKSHR LABEL 101 * \ / 0783E 5C091E22 4 ZBM 102 CMZ R4,CAR0/XRFLDSUSP will user want to suspend? 0783F EC4BC210 7 CBM 103 STLEQ R7/BIT 1 save the answer for later 07840 61170803 4 4 BASE 104 LD R4 R4,CAR1 get the resource number 105 * \ / 106 107 * jumping in point for backwards compatibility 00007841 108 OLDANDNEW LABEL 07841 60000412 0 109 LD R0 CPPSA get current session 07842 D1880010 0 ZBM 110 CLRT R0,PSWAITED just released from lockwait? 07843 ED8BC410 7 CBM 111 STLNE R7/BIT 2 save answer for later 112 113 * Create a new resource list head (LOK) if necessary. 114 * Either way, return with our quarry locked and IOFF. 07844 DC4064BD 115 CALLNP PLACELOKHD find or create head for this file 116 * \ / 117 118 ********************************************************************************** 119 * R3 now points to a LOK element. DLOCKLIST is unlocked, the * 120 * resource structure for the LOK is locked. Search for the * 121 * resource the guy wants. * 122 ********************************************************************************** 123 07845 6096C802 2 3 BASE 124 LD R2 R3,LOKRCELIST get head of resource locks 07846 3D168801 4 2 BASE 125 LSRCH R4 R2,RCERESRCE scan for ours 07847 FE0C7868 126 JNE FIRSTUSER jump if resource so far unused 127 * \ / 128 129 * R2=>RCE, check list of users to make sure we don't 130 * already hold the lock. 07848 60568803 1 2 BASE 131 LD R1 R2,RCELIDLIST list of lock users 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1669 (FRQRLOCK) F 102 FREQ - Saved File Resource Locks 07849 FA707858 1 132 JZA R1 LOCKOK jump if no one holds it 0784A 60000412 0 133 LD R0 CPPSA get PCB holder 0784B 60081F12 0 0 ZBM 134 LD R0 R0,PSPROCCB get session # holder 0784C 600800C3 0 0 ZBM 135 LD R0 R0,PCPROCNUM get session # 0784D 3C0840C1 0 1 ZBM 136 LSRCH R0 R1,LIDSESSION our session already locking? 0784E FE027884 137 JEQ PROTOERROR 'lock protocol error' 138 * \ / 139 140 ********************************************************************************** 141 * Someone else has this resource locked. We may get it also * 142 * only if both guys are reading. Otherwise, we are hung by * 143 * our suspenders til the cows come home. * 144 ********************************************************************************** 145 0784F 60568803 1 2 BASE 146 LD R1 R2,RCELIDLIST get representative user 07850 5C084010 1 ZBM 147 CMZ R1,LIDREADING locked for write? 07851 FE027874 148 JEQ SUSPEND must suspend then 07852 F3C07874 7 149 JBF R7/BIT 0 SUSPEND can't get write when read-locked 150 * \ / 151 152 ********************************************************************************** 153 * The lock is held for read, we want read access * 154 * so we must make sure that there no one else * 155 * is waiting. Make test right here to see if the * 156 * guy was just released from lock wait, otherwise * 157 * he'd go right back to end(!) of the queue if * 158 * there was somebody who wasn't released. * 159 ********************************************************************************** 160 07853 F7C47858 7 161 JBT R7/BIT 2 LOCKOK jump if on parole 07854 DC006553 162 CALL CHKLOKWAIT look for a waiter (garcon!) 07855 4152C000 3 REG 163 PARV R3 pass popular lock 07856 40530000 4 REG 164 PARVL R4 pass resource 07857 FE0E7874 165 JMP SUSPEND jump if others are waiting 166 * \ / 167 168 ********************************************************************************** 169 * Either the lock is unlocked or it is locked for read, we want * 170 * read access, and either no one is waiting or we were just * 171 * released from SQLOCKWAIT. Go ahead and lock it. * 172 ********************************************************************************** 173 174 * \ / 00007858 175 LOCKOK LABEL 07858 DC002ED0 176 CALL SGETMEM make our own LID 07859 40440001 IMM 177 PARVL LIDLOG pass size 0785A EE160800 0 BASE 178 STZ2 R0,0 clear it out 0785B E5481F11 5 0 ZBM 179 ST FCB R0,LIDFCB say this FCB is using 0785C 60400412 1 180 LD R1 CPPSA get current session 0785D 60485F12 1 1 ZBM 181 LD R1 R1,PSPROCCB get holder of session number 0785E 604840C3 1 1 ZBM 182 LD R1 R1,PCPROCNUM get session number 0785F E44800C1 1 0 ZBM 183 ST R1 R0,LIDSESSION plant it in the LID 07860 604BC010 1 7 CBM 184 LD R1 R7/BIT 0 get access type 07861 E4480010 1 0 ZBM 185 ST R1 R0,LIDREADING put in meaningful place 07862 60568803 1 2 BASE 186 LD R1 R2,RCELIDLIST get head of LIDs 07863 E4481F10 1 0 ZBM 187 ST R1 R0,LIDLINK put behind us 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1670 (FRQRLOCK) F 102 FREQ - Saved File Resource Locks 07864 E4168803 0 2 BASE 188 ST R0 R2,RCELIDLIST set new list in place 189 190 PUNLOCK R3,LOKLOCK unlock resource list 07865 EC16C801 3 BASE 190 STZ R3,LOKLOCK 07866 0C800000 190 ION 07867 FE0E5982 191 JMP FNOERROR all is cool 192 * --- 193 194 * No one is using this resource. Create a new resource 195 * control element. 00007868 196 FIRSTUSER LABEL 07868 BC16C803 0 3 BASE 197 INCL R0 R3,LOKRCECNT add to count of RCEs 07869 6400255D 0 198 CPR R0 MAXRESRCE compare against maximum limit 0786A FE047880 199 JGT LOCKISYR if over give insufficient system resources 0786B DC002ED0 200 CALL SGETMEM get some memory 0786C 40440002 IMM 201 PARVL RCELOG 0786D EE160802 0 BASE 202 STZ2 R0,2 clear out unset fields 0786E 60920000 2 0 REG 203 LD R2 R0 put address in useful register 0786F E5168801 4 2 BASE 204 ST R4 R2,RCERESRCE put ID tag on it 07870 6016C802 0 3 BASE 205 LD R0 R3,LOKRCELIST get address of app. list 07871 E4168800 0 2 BASE 206 ST R0 R2,RCELINK tack behind new 07872 E496C802 2 3 BASE 207 ST R2 R3,LOKRCELIST make new list head 07873 FE0E7858 208 JMP LOCKOK back into the action! 209 * --- 210 211 * So sorry! The lock is locked and we'll just have to wait 212 * R3 => LOK element, R4 = resource 00007874 213 SUSPEND LABEL 07874 F3C2787D 7 214 JBF R7/BIT 1 LOCKBUSY FREQ error if user's impatient 07875 60130000 0 4 REG 215 LD R0 R4 save this reg from next instruction 07876 6316C806 453 BASE 216 LD2 R4 R3,LOKSERIAL get file unique identifier 07877 E40B10C0 0 4 CBM 217 ST R0 R4/LOCKRESFLD save resource in extra bits 07878 608BC010 2 7 CBM 218 LD R2 R7/BIT 0 wait for this access 07879 DC00353B 219 CALL SUSPENDCAL suspend me 0787A 43550000 45 PAIR 220 PARV2 PAIR R4 waiting on this file/resource 0787B 41001DB0 221 PAR SQLOCKWAIT on this queue 0787C 4016C801 3 BASE 222 PARL R3,LOKLOCK for suspend to unlock 223 * --- 224 225 * Lock is hopelessly locked, and the user won't wait 0000787D 226 LOCKBUSY LABEL 227 PUNLOCK R3,LOKLOCK unlock LOK 0787D EC16C801 3 BASE 227 STZ R3,LOKLOCK 0787E 0C800000 227 ION 0787F FE0E59B4 228 JMP FERRORLBZ "lock is busy" 229 * --- 230 231 * Too many RCEs for this LOK 00007880 232 LOCKISYR LABEL 07880 D056C803 3 BASE 233 DEC R3,LOKRCECNT undo the previous INCL 234 PUNLOCK R3,LOKLOCK unlock LOK 07881 EC16C801 3 BASE 234 STZ R3,LOKLOCK 07882 0C800000 234 ION 07883 FE0E59D2 235 JMP FERRORISYR insufficient system resources 236 * --- 237 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1671 (FRQRLOCK) F 102 FREQ - Saved File Resource Locks 238 * Guy attempted to lock the same lock twice 00007884 239 PROTOERROR LABEL 240 PUNLOCK R3,LOKLOCK unlock LOK 07884 EC16C801 3 BASE 240 STZ R3,LOKLOCK 07885 0C800000 240 ION 07886 FE0E59A7 241 JMP FERRORLPE "lock protocol error" 242 * --- 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1672 (FRQRLOCK) F 102 FREQ - Saved File Resource Locks 244 245 ********************************************************************************** 246 * * 247 * FRFILEULOK. Unlock file's implicit lock. This request is * 248 * used in conjunction with the FRFILELOCK and FRFILELOKT * 249 * requests. See the notes on FRFILELOCK. * 250 * * 251 * LD R0 FRFILEULOK * 252 * FREQ * 253 * R0 = error code | dynamic status * 254 * * 255 ********************************************************************************** 256 00007887 257 IMPLOCKU LABEL 07887 60840000 2 IMM 258 LD R2 0 always use resource 0 07888 FE0E788A 259 JMP UNLOCKSHR 260 * --- 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1673 (FRQRLOCK) F 102 FREQ - Saved File Resource Locks 262 263 ********************************************************************************** 264 * * 265 * FRRUNLOCK. This request relinquishes the requester's contribution * 266 * to the implicit lock associated with the specified file and * 267 * resource. If the requester held the lock for writing or if he * 268 * was the only reader currently holding the lock, the lock is * 269 * unlocked. If the lock becomes unlocked, the next process * 270 * waiting for the resource is released. Nothing more is done if * 271 * that waiter was waiting for write access. If the process was * 272 * waiting for read access, all subsequent waiters are released * 273 * until a writer is encountered. * 274 * * 275 * LD R0 FRRUNLOCK * 276 * LD R1 * 277 * FREQ * 278 * R0 = error code | dynamic status * 279 * * 280 ********************************************************************************** 281 00007889 282 IUNLOCK LABEL 07889 60970803 2 4 BASE 283 LD R2 R4,CAR1 get the desired resource 284 * \ / 0000788A 285 UNLOCKSHR LABEL 0788A DC0030AA 286 CALL SRCHLIST prepare to look for LOK 0788B 40001EC8 287 PARL DLOCKLOCK lock the list 0788C DC4064D8 288 CALLNP FINDLOKHD get the LOK element 0788D FE0E789E 289 JMP NOGOOD jump if not really there 290 PLOCK R3,LOKLOCK get exclusive access to resource list 0788E 0CC00000 290 IOFF 0788F D1D6C801 3 BASE 290 SETT R3,LOKLOCK 07890 FE0C7892 290 JNE MA(2+DISPW MA 0) 07891 DC40308B 290 CALLNP LOCKWAIT 07892 DC0030B7 291 CALL UNSRCHLIST let go of list 07893 40001EC8 292 PARL DLOCKLOCK pass lock word 293 * \ / 294 295 * R3 => locked LOK, interrupts are off by one 07894 61D2C000 7 3 REG 296 LD R7 R3 save address of LOK 07895 3916C802 4 3 BASE 297 LEA R4 R3,LOKRCELIST address of resource list 07896 60D6C802 3 3 BASE 298 LD R3 R3,LOKRCELIST first resource 07897 4896C801 2 3 BASE 299 RLSRCH R2 R3,RCERESRCE find our resource 07898 FE0C789B 300 JNE NOFIND leave if resource not used 07899 DC40653F 301 CALLNP FREELID dump a LID, if ours 0789A FE0E78A1 302 JMP ATELID jump if we hit 303 * \ / 304 305 ********************************************************************************** 306 * Crazy guy! He tried to unlock a lock that he didn't * 307 * hold. Return an error after unlocking either the * 308 * LOK or the resource list. * 309 ********************************************************************************** 310 311 * \ / 0000789B 312 NOFIND LABEL 313 PUNLOCK R7,LOKLOCK let go of LOK 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1674 (FRQRLOCK) F 102 FREQ - Saved File Resource Locks 0789B EC17C801 7 BASE 313 STZ R7,LOKLOCK 0789C 0C800000 313 ION 0789D FE0E59A7 314 JMP FERRORLPE "lock protocol error" 315 * --- 316 0000789E 317 NOGOOD LABEL 0789E DC0030B7 318 CALL UNSRCHLIST let go of list 0789F 40001EC8 319 PARL DLOCKLOCK pass lock word 078A0 FE0E59A7 320 JMP FERRORLPE "lock protocol error" 321 * --- 322 323 ********************************************************************************** 324 * We have relinquished the guy's use. Now check if we should * 325 * free the resource and release waiters. * 326 ********************************************************************************** 327 000078A1 328 ATELID LABEL 078A1 5C16C803 3 BASE 329 CMZ R3,RCELIDLIST is resource still used? 078A2 FE0C78AB 330 JNE BESTEXIT jump if we didn't unlock resource 078A3 6053C000 1 7 REG 331 LD R1 R7 for call 078A4 DC00652F 332 CALL FREERCE free RCE and loosen waiters 078A5 41524000 1 REG 333 PARV R1 pass address of LOK 078A6 40530000 4 REG 334 PARVL R4 pass address of previous RCE 078A7 60D3C000 3 7 REG 335 LD R3 R7 again retrieve address of LOK 078A8 5C16C802 3 BASE 336 CMZ R3,LOKRCELIST any more resources 078A9 FE0278AE 337 JEQ DUMPLOK jump if LOK now unused 078AA D056C803 3 BASE 338 DEC R3,LOKRCECNT one less RCE to worry about 339 * \ / 000078AB 340 BESTEXIT LABEL 341 PUNLOCK R7,LOKLOCK let others use resource locks 078AB EC17C801 7 BASE 341 STZ R7,LOKLOCK 078AC 0C800000 341 ION 000078AD 342 GOODEXIT LABEL 078AD FE0E5982 343 JMP FNOERROR return to caller 344 * --- 345 000078AE 346 DUMPLOK LABEL 078AE DC40650F 347 CALLNP FREELOK remove the evidence 078AF FE0E78AD 348 JMP GOODEXIT 349 * --- 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1675 (FRQRLOCK) F 102 FREQ - Saved File Resource Locks 351 352 ********************************************************************************** 353 * * 354 * FRFILELOKT. Test the state of a file's implicit lock. This * 355 * request in conjunction with FRFILELOCK and FRFILEULOK * 356 * manage the implicit lock facility for a whole file. See * 357 * FRFILELOCK comments for more information. * 358 * * 359 * LD R0 FRFILELOKT * 360 * FREQ * 361 * R0 = error code | dynamic status * 362 * R1 = 0 (no lock/unlocked) * 363 * | 2 (locked, but by someone else) * 364 * | 3 (locked by requester) * 365 * * 366 * * 367 ********************************************************************************** 368 000078B0 369 IMPLOCKT LABEL 078B0 EC0BC010 7 CBM 370 STZ R7/BIT 0 say we want old info 078B1 60840000 2 IMM 371 LD R2 0 use resource 0 078B2 FE0E78B5 372 JMP TESTSHR share some code 373 * --- 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1676 (FRQRLOCK) F 102 FREQ - Saved File Resource Locks 375 376 ********************************************************************************** 377 * * 378 * FRRESLOCKT. This request returns the current state of the specified * 379 * resource. If the resource is locked, the session number of an * 380 * active locker is also returned. If unlocked, R2 is not changed. * 381 * * 382 * LD R0 FRRESLOCKT * 383 * LD R1 * 384 * FREQ * 385 * R0 = error code | dynamic status * 386 * R1 = 0 (unlocked) | 1 (locked for write) | 2 (locked for read) * 387 * R2 = locking session if locked * 388 * * 389 ********************************************************************************** 390 000078B3 391 ILOCKTEST LABEL 078B3 EDCBC010 7 CBM 392 STW R7/BIT 0 say we want new info 078B4 60970803 2 4 BASE 393 LD R2 R4,CAR1 get resource # 394 * \ / 000078B5 395 TESTSHR LABEL 078B5 DC0030AA 396 CALL SRCHLIST lock the LOK list 078B6 40001EC8 397 PARL DLOCKLOCK designated lock 078B7 EC170803 4 BASE 398 STZ R4,CAR1 0 = unlocked 078B8 DC4064D8 399 CALLNP FINDLOKHD scan for our LOK 078B9 FE0E78CE 400 JMP NOGOTLOK jump if file not in use 401 PLOCK R3,LOKLOCK get exclusive access to resource list 078BA 0CC00000 401 IOFF 078BB D1D6C801 3 BASE 401 SETT R3,LOKLOCK 078BC FE0C78BE 401 JNE MA(2+DISPW MA 0) 078BD DC40308B 401 CALLNP LOCKWAIT 078BE DC0030B7 402 CALL UNSRCHLIST unlock LOK list 078BF 40001EC8 403 PARL DLOCKLOCK use same lock word 404 * \ / 405 406 * R3 => locked LOK, interrupts off! 078C0 6056C802 1 3 BASE 407 LD R1 R3,LOKRCELIST get list of resources 078C1 3C964801 2 1 BASE 408 LSRCH R2 R1,RCERESRCE search for our resource 078C2 FE0C78CB 409 JNE NOTLOCKED jump if resource never used 078C3 60564803 1 1 BASE 410 LD R1 R1,RCELIDLIST get list of users 078C4 FA7078CB 1 411 JZA R1 NOTLOCKED jump if all talk 078C5 F3C078D1 7 412 JBF R7/BIT 0 OLDSTYLE jump to return old info 078C6 60084010 0 1 ZBM 413 LD R0 R1,LIDREADING get bit saying whether reader 078C7 18040001 0 IMM 414 ADD R0 1 1 = write, 2 = read 078C8 E4170803 0 4 BASE 415 ST R0 R4,CAR1 give it to requester 078C9 600840C1 0 1 ZBM 416 LD R0 R1,LIDSESSION get number of user 078CA E4170804 0 4 BASE 417 ST R0 R4,CAR2 give it to requester 418 * \ / 419 000078CB 420 TESTDONE LABEL 000078CB 421 NOTLOCKED LABEL 422 * \ / 423 PUNLOCK R3,LOKLOCK unlock resource list 078CB EC16C801 3 BASE 423 STZ R3,LOKLOCK 078CC 0C800000 423 ION 078CD FE0E5982 424 JMP FNOERROR all done 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1677 (FRQRLOCK) F 102 FREQ - Saved File Resource Locks 425 * --- 426 000078CE 427 NOGOTLOK LABEL 078CE DC0030B7 428 CALL UNSRCHLIST unlock LOK list 078CF 40001EC8 429 PARL DLOCKLOCK use same lock word! 078D0 FE0E5982 430 JMP FNOERROR all done 431 * --- 432 433 * R1 => LID, R4 => users CA 000078D1 434 OLDSTYLE LABEL 078D1 60000412 0 435 LD R0 CPPSA get current session 078D2 60081F12 0 0 ZBM 436 LD R0 R0,PSPROCCB get session number holder 078D3 600800C3 0 0 ZBM 437 LD R0 R0,PCPROCNUM get session number 078D4 640840C1 0 1 ZBM 438 CPR R0 R1,LIDSESSION same as locker? 078D5 EC520000 0 REG 439 STLEQ R0 0=no, 1=yes 078D6 18040002 0 IMM 440 ADD R0 2 2=locked by other, 3=locked by other 078D7 E4170803 0 4 BASE 441 ST R0 R4,CAR1 tell the user 078D8 FE0E78CB 442 JMP TESTDONE 443 * --- 444 445 END FREQRLOCK routine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1678 F 0 FREQ - Saved File Resource Locks 155 156 ********************************************************************************** 157 * * 158 * Place to break the listing. * 159 * * 160 ********************************************************************************** 161 162 INPUT GETSETTERM terminal option modification 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1679 (GETSETTERM) F 103 FREQ - Get terminal control info 3 4 BLOCK Terminal Control FREQs 5 6 ENTRY CALCSUSP to calculate the TCB suspend constants 7 ENTRY FREQGETTM2 terminal status getting requests 8 ENTRY FREQGETTRM 9 ENTRY FREQSETTM2 terminal setting requests 10 ENTRY FREQSETTRM 11 ENTRY FREQTRMCTL terminal control 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1680 (GETSETTERM) F 103 FREQ - Get terminal control info 13 14 ********************************************************************************** 15 * * 16 * These requests get information on the terminal that is * 17 * associated with the specified lun. The information is * 18 * returned in R1 and the dynamic status of the lun is returned * 19 * in R0. * 20 * * 21 * Stack required = 7 * 22 * 0 + max ( CLRMEMTRAP (1), GETPINFO (7), GETTERMPTR (1), * 23 * LOCKWAIT (0), MAKTRMSTAT(1), SETMEMTRAP (1) ) * 24 * * 25 ********************************************************************************** 26 27 BLOCK FREQGETTRM and FREQGETTM2 routines 28 29 ENTRY FREQGETTRM 30 ENTRY FREQGETTM2 31 000078D9 32 FREQGETTM2 LABEL 078D9 18840010 2 IMM 33 ADD R2 ONEBITS/XRFLDSUBOP+1 set new subop code 000078DA 34 FREQGETTRM LABEL 078DA FB7059B8 5 35 JZA FCB FERRORLNE3 jump if lun not equipped 078DB 60096665 0 5 ZBM 36 LD R0 FCB,FCHTYPE get the type of the device 078DC 64040007 0 IMM 37 CPR R0 HTYPETERM is this a terminal? 078DD FE0C59A5 38 JNE FERRORILOP jump if not a good device 078DE 64840016 2 IMM 39 CPR R2 GTDOTBLL is request within range? 078DF FE0659D8 40 JGE UERRORILR not a defined request 078E0 60D30000 3 4 REG 41 LD R3 R4 copy the CA address 078E1 61095F16 4 5 ZBM 42 LD TCB FCB,FCDCBPTR get pointer to TCB 078E2 FB3059A5 4 43 JZA TCB FERRORILOP jump if fake terminal 078E3 5D6478E7 2 44 XCT GTDOTBL(R2) get the information 000078E4 45 GTTERMXIT LABEL 078E4 E416C803 0 3 BASE 46 ST R0 R3,CAR1 return the value in R1 000078E5 47 GTEXIT LABEL 078E5 DC404CBA 48 CALLNP MAKTRMSTAT go set load point status 078E6 FE0E5988 49 JMP UERROR return 50 * --- 51 52 * Table of commands to get the value corresponding to the request. 53 * R4 => TCB 000078E7 54 GTDOTBL LABEL 078E7 FE0E7921 55 JMP GETTERMTYPE 0 - terminal type 078E8 600928C2 0 4 ZBM 56 LD R0 TCB,TCCRDELAY 1 - CR delay (MS) 078E9 600900C3 0 4 ZBM 57 LD R0 TCB,TCLFDELAY 2 - LF delay (MS) 078EA 600918C3 0 4 ZBM 58 LD R0 TCB,TCFFDELAY 3 - FF delay (MS) 078EB 60091077 0 4 ZBM 59 LD R0 TCB,TCBKSPC 4 - backspace character 078EC 60091076 0 4 ZBM 60 LD R0 TCB,TCLKILLC 5 - line kill character 078ED 60170010 0 4 CACH 61 LD R0 TCB,TCCRWIDTH 6 - carriage width 078EE 60170011 0 4 CACH 62 LD R0 TCB,TCSCRNHTH 7 - screen heigth 078EF 60093C21 0 4 ZBM 63 LD R0 TCB,TCECHO 8 - echo control 078F0 60091EF1 0 4 ZBM 64 LD R0 TCB,TCORATE 9 - output baud rate 078F1 FE0E7914 65 JMP GTTERMGRP 0A - terminating character group 078F2 FE0E78FD 66 JMP GTTERMARY 0B - get the terminal array 078F3 600900F1 0 4 ZBM 67 LD R0 TCB,TCIRATE 0C - input baud rate 078F4 FE0E59A5 68 JMP FERRORILOP 0D - unused 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1681 (GETSETTERM) F 103 FREQ - Get terminal control info 078F5 60090890 0 4 ZBM 69 LD R0 TCB,TCTNUM 0E - port number 078F6 FE0E791A 70 JMP GTTERMRCV 0F - receiver state 078F7 60093C28 0 4 ZBM 71 LD R0 TCB,TCINTPROTO 10 - interface mode 078F8 60170013 0 4 CACH 72 LD R0 TCB,TCLASTCOM2 11 - selected CIA port options 078F9 600900C8 0 4 ZBM 73 LD R0 TCB,TCHTDELAY 12 - HT delay (MS) 078FA 60170018 0 4 CACH 74 LD R0 TCB,TCBRCH 13 - 'break' character 078FB FE0E791E 75 JMP GTTERMINFO 14 - return full port status 078FC 60091015 0 4 ZBM 76 LD R0 TCB,TCXOFFIQ 15 - get XOFF on input buffer full bit 00000016 ABS 77 GTDOTBLL EQU DISPW GTDOTBL 78 79 ********************************************************************************** 80 * * 81 * Trying to fetch the terminating character array. If console, * 82 * use UPCTERMA since TCTERMA could be different. * 83 * * 84 ********************************************************************************** 85 000078FD 86 GTTERMARY LABEL 078FD DC005BCF 87 CALL SETMEMTRAP set up for user memory errors 078FE 40005B5F 88 PARL PASSERRUP use default handling 89 078FF 60400414 1 90 LD R1 CPCUPC current process 07900 38564812 1 1 BASE 91 LEA R1 R1,UPCTERMA address of set 07901 38484010 1 1 ZBM 92 LEA R1 R1,0/BIT 0 bit address thereof 07902 5C096015 5 ZBM 93 CMZ FCB,FCABSIO console terminal? 07903 FE0C790B 94 JNE GTTGOTA jump if so 95 PLOCK TCB,TCLOCK get access to TCB 07904 0CC00000 95 IOFF 07905 D1D70818 4 BASE 95 SETT TCB,TCLOCK 07906 FE0C7908 95 JNE MA(2+DISPW MA 0) 07907 DC40308B 95 CALLNP LOCKWAIT 07908 DC404C8B 96 CALLNP GETTERMPTR R1 => term array 97 PUNLOCK TCB,TCLOCK release the TCB 07909 EC170818 4 BASE 97 STZ TCB,TCLOCK 0790A 0C800000 97 ION 98 * \ / 99 100 * R1 => set to use 0000790B 101 GTTGOTA LABEL 0790B 5C08F011 3 ZBM 102 CMZ R3,CAMSR/MSRSRELOCB users store relocation 0790C FE0C790E 103 JNE GTTGNUSR jump if request from monitor 0790D 59840080 IMM 104 CLBMSR MSRSRELOC store data in user PF half 0000790E 105 GTTGNUSR LABEL 0790E 60840020 2 IMM 106 LD R2 (256/WORDLNTH)*CPW get size to move 0790F 60C8DF13 3 3 ZBM 107 LD R3 R3,CAR1/FLDADRS get the pointer to his block 07910 DAC85000 3 12 108 MOVE R3 R1 R2 copy the array 07911 59C40080 IMM 109 IORMSR MSRSRELOC restore monitor storing 07912 DC405BD4 110 CALLNP CLRMEMTRAP release handling of memory errors 07913 FE0E78E5 111 JMP GTEXIT go set load point status 112 * --- 113 114 ********************************************************************************** 115 * * 116 * Fetching the terminating character group. If console, use * 117 * UPC value since TCB could be different. * 118 * * 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1682 (GETSETTERM) F 103 FREQ - Get terminal control info 119 ********************************************************************************** 120 00007914 121 GTTERMGRP LABEL 07914 6009083D 0 4 ZBM 122 LD R0 TCB,TCTERMGRP get the group code 07915 5C096015 5 ZBM 123 CMZ FCB,FCABSIO console terminal? 07916 FE0278E4 124 JEQ GTTERMXIT jump if not 07917 60000414 0 125 LD R0 CPCUPC process 07918 60080041 0 0 ZBM 126 LD R0 R0,UPCTERMGRP group code therein 07919 FE0E78E4 127 JMP GTTERMXIT return value 128 * --- 129 130 ********************************************************************************** 131 * Make up the receiver status to return * 132 ********************************************************************************** 133 0000791A 134 GTTERMRCV LABEL 0791A 60092289 0 4 ZBM 135 LD R0 TCB,TCLASTST get last status 0791B 60490019 1 4 ZBM 136 LD R1 TCB,TCMODEM get modem control 0791C E44A0010 1 0 CBM 137 ST R1 R0/BIT 0 0791D FE0E78E4 138 JMP GTTERMXIT return 139 * --- 140 141 ********************************************************************************** 142 * Return full port status * 143 ********************************************************************************** 144 0000791E 145 GTTERMINFO LABEL 0791E DC409733 146 CALLNP GETPINFO call routine to get info 0791F FE0E5B5F 147 JMP PASSERRUP pass error up if we got one 07920 FE0E78E5 148 JMP GTEXIT return 149 * --- 150 151 ********************************************************************************** 152 * Change the terminal type * 153 ********************************************************************************** 154 00007921 155 GETTERMTYPE LABEL 07921 62170819 014 BASE 156 LD2 R0 TCB,TCTERMTYPE get the terminal type (2 words) 07922 E616C803 013 BASE 157 ST2 R0 R3,CAR1 return the info to the user 07923 FE0E78E5 158 JMP GTEXIT goodbye folks 159 * --- 160 161 END FREQGETTRM and FREQGETTM2 routines 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1683 (GETSETTERM) F 103 FREQ - Set terminal controls 164 165 ********************************************************************************** 166 * * 167 * These requests set the terminal attributes and return the * 168 * old values. For most of the cases the new value is passed * 169 * in R1 and the old value is returned in R1. * 170 * * 171 * Stack required = 16 * 172 * 0 + max ( LOCKWAIT (0), MAKTRMSTAT (1), STTERMARY (5), * 173 * STTERMECHO (16), STTERMIMOD (10), STTERMIRAT (6), * 174 * STTERMORAT (6), STTERMPOPT (6), STTERMRATE (8), * 175 * STTERMTGRP (5), STTERMTRNS (6), SUSPENDCAL (0) ) * 176 * * 177 ********************************************************************************** 178 179 BLOCK FREQSETTRM and FREQSETTM2 routines 180 181 ENTRY FREQSETTRM 182 ENTRY FREQSETTM2 183 00007924 184 FREQSETTM2 LABEL 07924 18840010 2 IMM 185 ADD R2 ONEBITS/XRFLDSUBOP+1 add bit for new operations 00007925 186 FREQSETTRM LABEL 07925 64840015 2 IMM 187 CPR R2 STDOTBLL see if the request is in bounds 07926 FE0659D8 188 JGE UERRORILR jump if not 07927 FB7059B8 5 189 JZA FCB FERRORLNE3 jump if lun not equipped 07928 60096665 0 5 ZBM 190 LD R0 FCB,FCHTYPE get the type of the lun 07929 64040007 0 IMM 191 CPR R0 HTYPETERM is it a terminal? 0792A FE0C59A5 192 JNE FERRORILOP jump if illegal operation 0792B 60D30000 3 4 REG 193 LD R3 R4 R3 => user's registers 0792C 61095F16 4 5 ZBM 194 LD TCB FCB,FCDCBPTR get the pointer to TCB 0792D FB3059A5 4 195 JZA TCB FERRORILOP jump if fake terminal 0792E 60040007 0 IMM 196 LD R0 FSACSNDA unwanted access 0792F 64095835 0 5 ZBM 197 CPR R0 FCB,FCACCESS is that what we have? 07930 FE0259A5 198 JEQ FERRORILOP jump if no changing allowed 199 PLOCK TCB,TCLOCK lock up this terminal 07931 0CC00000 199 IOFF 07932 D1D70818 4 BASE 199 SETT TCB,TCLOCK 07933 FE0C7935 199 JNE MA(2+DISPW MA 0) 07934 DC40308B 199 CALLNP LOCKWAIT 07935 600900FA 0 4 ZBM 200 LD R0 TCB,TCTTOCNT get output buffer current size 07936 640900A2 0 4 ZBM 201 CPR R0 TCB,TCMAXCHAR check against suspend limit 07937 FE08793C 202 JLT GOAHEAD jump if okay 203 * \ / we will add space to an already full buffer. 204 * shut him down instead. 07938 DC00353B 205 CALL SUSPENDCAL shut down to re-execute XREQ 07939 41530000 4 REG 206 PARV TCB indicate parameter 0793A 41001DB6 207 PAR SQTRMOWAIT indicate which queue 0793B 40170818 4 BASE 208 PARL TCB,TCLOCK and what to unlock 209 * ---- 210 0000793C 211 GOAHEAD LABEL 212 PUNLOCK TCB,TCLOCK release this terminal 0793C EC170818 4 BASE 212 STZ TCB,TCLOCK 0793D 0C800000 212 ION 0793E 6216C803 013 BASE 213 LD2 R0 R3,CAR1 get the parameter to set 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1684 (GETSETTERM) F 103 FREQ - Set terminal controls 0793F 68247949 0 2 214 UCPR R0 STTOPTBL(R2) see if it's within bounds 07940 FE0459B0 215 JGT FERRORPOB 07941 5D64795E 2 216 XCT STDOTBL(R2) set the value and get the old 07942 61000412 4 217 LD R4 CPPSA 07943 61091F11 4 4 ZBM 218 LD R4 R4,PSCACHNP1 R4 => user's registers 07944 E4170803 0 4 BASE 219 ST R0 R4,CAR1 return the old value in R1 07945 FA8C7947 2 220 JNEZ R2 NO2STORE no need for double store 07946 E4570804 1 4 BASE 221 ST R1 R4,CAR2 store rest of term type 222 * \ / 223 00007947 224 NO2STORE LABEL 07947 DC404CBA 225 CALLNP MAKTRMSTAT go set load point status 07948 FE0E5988 226 JMP UERROR return 227 * --- 228 229 * Table of maximum values for values 00007949 230 STTOPTBL LABEL 07949 FFFFFFFF 231 VFD 0FFFFFFFF terminal type 0794A 00000FFF 232 VFD (2 POWER 12)-1 CR delay (MS) 0794B 00000FFF 233 VFD (2 POWER 12)-1 LF delay (MS) 0794C 00000FFF 234 VFD (2 POWER 12)-1 FF delay (MS) 0794D 000000FF 235 VFD 0FF backspace char 0794E 000000FF 236 VFD 0FF line kill char 0794F 000000FF 237 VFD 0FF carriage width 07950 000000FF 238 VFD 0FF screen height 07951 00000003 239 VFD 03 echo mode 07952 FFFFFFFF 240 VFD 0FFFFFFFF baud rate 07953 00000003 241 VFD 03 term char group 07954 FFFFFFFF 242 VFD 0FFFFFFFF set array group 07955 FFFFFFFF 243 VFD 0FFFFFFFF input baud rate 07956 FFFFFFFF 244 VFD 0FFFFFFFF output baud rate 07957 FFFFFFFF 245 VFD 0FFFFFFFF unused 07958 000000FF 246 VFD 0FF set transmitters 07959 00000002 247 VFD 2 interface mode 0795A 000000FF 248 VFD 0FF CIA port options 0795B 00000FFF 249 VFD (2 POWER 12)-1 HT delay (MS) 0795C 000000FF 250 VFD 0FF 'break' character 0795D 00000001 251 VFD 1 XOFF on input buffer full bit 252 253 ********************************************************************************** 254 * * 255 * Table of commands to get the value corresponding to the request. * 256 * This table is executed with the registers set as: * 257 * R0 = value to set * 258 * R3 => console area for the invoking program * 259 * TCB => terminal control block * 260 * After the execution, the caller expects: * 261 * R0 = old value for the terminal attribute * 262 * * 263 ********************************************************************************** 264 0000795E 265 STDOTBL LABEL 0795E E2170819 014 BASE 266 EXCH2 R0 TCB,TCTERMTYPE 0 - terminal type 0795F E00928C2 0 4 ZBM 267 EXCH R0 TCB,TCCRDELAY 1 - CR delay (MS) 07960 E00900C3 0 4 ZBM 268 EXCH R0 TCB,TCLFDELAY 2 - LF delay (MS) 07961 E00918C3 0 4 ZBM 269 EXCH R0 TCB,TCFFDELAY 3 - FF delay (MS) 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1685 (GETSETTERM) F 103 FREQ - Set terminal controls 07962 E0091077 0 4 ZBM 270 EXCH R0 TCB,TCBKSPC 4 - backspace character 07963 E0091076 0 4 ZBM 271 EXCH R0 TCB,TCLKILLC 5 - line kill character 07964 E0170010 0 4 CACH 272 EXCH R0 TCB,TCCRWIDTH 6 - carriage width 07965 E0170011 0 4 CACH 273 EXCH R0 TCB,TCSCRNHTH 7 - screen heigth 07966 DC4079D4 274 CALLNP STTERMECHO 8 - set echo 07967 DC40799D 275 CALLNP STTERMRATE 9 - set I/O baud rate 07968 DC4079BC 276 CALLNP STTERMTGRP 0A - set terminating character group 07969 DC407973 277 CALLNP STTERMARY 0B - set the terminal array 0796A DC4079B3 278 CALLNP STTERMIRAT 0C - set input baud rate 0796B DC4079A4 279 CALLNP STTERMORAT 0D - set output baud rate 0796C FE0E59A5 280 JMP FERRORILOP 0E - unused 0796D DC4079FB 281 CALLNP STTERMTRNS 0F - set transmitters 0796E DC407A0D 282 CALLNP STTERMIMOD 10 - set interface mode 0796F DC407A04 283 CALLNP STTERMPOPT 11 - set CIA port options 07970 E00900C8 0 4 ZBM 284 EXCH R0 TCB,TCHTDELAY 12 - HT delay (MS) 07971 E0170018 0 4 CACH 285 EXCH R0 TCB,TCBRCH 13 - 'break' character 07972 E0091015 0 4 ZBM 286 EXCH R0 TCB,TCXOFFIQ 14 - set XOFF on input buffer full bit 00000015 ABS 287 STDOTBLL EQU DISPW STDOTBL 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1686 (GETSETTERM) F 103 FREQ - Set terminal controls 289 290 ********************************************************************************** 291 * * 292 * STTERMARY. Set the terminal array. The array is copied from * 293 * the requester's memory (pointed to by his R1) into the TCB. It * 294 * is also copied into the UPC block if this is his main terminal. * 295 * Call: * 296 * * 297 * LD R3 => invoker's console area * 298 * LD TCB => terminal control block * 299 * CALLNP STTERMARY * 300 * ST R0 * 301 * Eats R0:R2 * 302 * * 303 * Stack required = 4 * 304 * 2 + max ( CALCTERMC (2), CLRMEMTRAP (1), LOCKWAIT (0), * 305 * SETMEMTRAP(1) ) * 306 * * 307 ********************************************************************************** 308 309 BLOCK 310 311 ENTRY STTERMARY 312 313 BEGFRAME 00178801 6 BASE 314 SAVER3 BSS 1 to save register 315 ENDFRAME 316 07973 DD5F8002 6 STAK 317 STTERMARY ENTRNP PUSH 07974 DC005BCF 318 CALL SETMEMTRAP set up user mem error address 07975 40005B5F 319 PARL PASSERRUP address of handler 07976 6008DF13 0 3 ZBM 320 LD R0 R3,CAR1/FLDADRS user's array 07977 60440020 1 IMM 321 LD R1 (256/WORDLNTH)*CPW char length of array 07978 60891F15 2 4 ZBM 322 LD R2 TCB,TCFCB unit open to term 07979 5C08A015 2 ZBM 323 CMZ R2,FCABSIO absolute I/O unit? 0797A FE027986 324 JEQ INTOTCB jump if not 325 * \ / 326 327 ********************************************************************************** 328 * * 329 * Setting console TCA. Put copy in UPC for sure, put copy * 330 * in TCB only if no one ELSE is currently trapping NE term * 331 * on the unit. * 332 * * 333 ********************************************************************************** 334 0797B 60800414 2 335 LD R2 CPCUPC process 0797C 38968812 2 2 BASE 336 LEA R2 R2,UPCTERMA address of UPC copy 0797D 5C08F211 3 ZBM 337 CMZ R3,CAMSR/MSRFRELOCB check reloc 0797E FE0C7980 338 JNE STTSNUSR jump if not user 0797F 59840040 IMM 339 CLBMSR MSRFRELOC say user fetch 00007980 340 STTSNUSR LABEL 07980 FE400000 341 CMOVE move array into UPC 07981 59C40040 IMM 342 IORMSR MSRFRELOC 07982 5C091815 4 ZBM 343 CMZ TCB,TCRDRTCG TCB reads ours? 07983 FE02799A 344 JEQ STTSEXIT jump if not 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1687 (GETSETTERM) F 103 FREQ - Set terminal controls 07984 6008DF13 0 3 ZBM 345 LD R0 R3,CAR1/FLDADRS reload regs 07985 60440020 1 IMM 346 LD R1 (256/WORDLNTH)*CPW char length of array 347 * \ / 348 00007986 349 INTOTCB LABEL 07986 3897080F 2 4 BASE 350 LEA R2 TCB,TCTERMA address of TCB copy 07987 5C08F211 3 ZBM 351 CMZ R3,CAMSR/MSRFRELOCB check reloc 07988 FE0C798A 352 JNE STTSNUSR2 jump if not user 07989 59840040 IMM 353 CLBMSR MSRFRELOC say user fetch 0000798A 354 STTSNUSR2 LABEL 0798A FE400000 355 CMOVE make actual move 0798B 59C40040 IMM 356 IORMSR MSRFRELOC restore mon fetch 0798C 6009083D 0 4 ZBM 357 LD R0 TCB,TCTERMGRP 0798D 64040003 0 IMM 358 CPR R0 TCTERMGRPU user term group? 0798E FE0C799A 359 JNE STTSEXIT jump if not 0798F 5C091815 4 ZBM 360 CMZ TCB,TCRDRTCG other trappers? 07990 FE02799A 361 JEQ STTSEXIT jump if so 362 * \ / 363 364 * rescan for terminators with new set 07991 E4D78801 3 6 BASE 365 ST R3 SP,SAVER3 save a reg 366 PLOCK TCB,TCLOCK get access to TCB 07992 0CC00000 366 IOFF 07993 D1D70818 4 BASE 366 SETT TCB,TCLOCK 07994 FE0C7996 366 JNE MA(2+DISPW MA 0) 07995 DC40308B 366 CALLNP LOCKWAIT 07996 DC404CA6 367 CALLNP CALCTERMC relocate terminators 368 PUNLOCK TCB,TCLOCK release TCB 07997 EC170818 4 BASE 368 STZ TCB,TCLOCK 07998 0C800000 368 ION 07999 60D78801 3 6 BASE 369 LD R3 SP,SAVER3 restore a reg 370 * \ / 371 0000799A 372 STTSEXIT LABEL 0799A 6016C803 0 3 BASE 373 LD R0 R3,CAR1 get requester's R1 0799B DC405BD4 374 CALLNP CLRMEMTRAP done with user errors 0799C 5D1F8002 6 STAK 375 LEAVE POP 376 * --- 377 378 END STTERMARY 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1688 (GETSETTERM) F 103 FREQ - Set terminal controls 380 381 ********************************************************************************** 382 * * 383 * STTERMRATE. Set both the terminal's input and output baud rates. * 384 * Call: * 385 * LD R0 buad rate to set * 386 * LD TCB => the terminal control block * 387 * CALLNP STTERMRATE * 388 * ST R0 the old input baud rate * 389 * * 390 * Eats R0:R3. * 391 * Stack required = 8 * 392 * 2 + max ( STTERMIRAT(6), STTERMORAT(6) ) * 393 * * 394 ********************************************************************************** 395 396 BLOCK 397 398 ENTRY STTERMRATE 399 400 BEGFRAME 00178801 6 BASE 401 RATETEMP BSS 1 the save for the old input rate 402 ENDFRAME 403 0799D DD5F8002 6 STAK 404 STTERMRATE ENTRNP PUSH 0799E E4178801 0 6 BASE 405 ST R0 SP,RATETEMP save the rate setting 0799F DC4079B3 406 CALLNP STTERMIRAT set the input rate 079A0 E0178801 0 6 BASE 407 EXCH R0 SP,RATETEMP save the old input and get new for output 079A1 DC4079A4 408 CALLNP STTERMORAT set the output baud rate 079A2 60178801 0 6 BASE 409 LD R0 SP,RATETEMP return the old input baud rate 079A3 5D1F8002 6 STAK 410 LEAVE POP 411 * --- 412 413 END STTERMRATE 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1689 (GETSETTERM) F 103 FREQ - Set terminal controls 415 416 ********************************************************************************** 417 * * 418 * STTERMORAT. Set the output baud rate. If the rate is illegal * 419 * then this routine does not return but jumps directly to FERRORPOB. * 420 * Call: * 421 * LD R0 rate to set (if pos, must be in "legal" table * 422 * if neg, must be doable by ACC within 3%) * 423 * LD TCB => terminal control block * 424 * CALLNP STTERMORAT * 425 * ST R0 old output baud rate * 426 * * 427 * Eats R0:R3. * 428 * Stack required = 6 * 429 * 2 + max ( CALCSUSP (1), CHECKBAUD (1), LINK1CMND(4) ) * 430 * * 431 ********************************************************************************** 432 433 BLOCK 434 435 ENTRY STTERMORAT 436 437 BEGFRAME 00178801 6 BASE 438 SAVEORAT BSS 1 save for the old rate 439 ENDFRAME 440 079A4 DD5F8002 6 STAK 441 STTERMORAT ENTRNP PUSH 079A5 DC407A13 442 CALLNP CHECKBAUD check the baud for legality 079A6 E0091EF1 0 4 ZBM 443 EXCH R0 TCB,TCORATE set the new and get the old 079A7 E4178801 0 6 BASE 444 ST R0 SP,SAVEORAT save the old rate 445 446 * We calculate TCBAUDROOM every time that the output baud rate is set. 447 * This assures the value is current and saves the driver from computing it. 079A8 60091EF1 0 4 ZBM 448 LD R0 TCB,TCORATE get the current rate 079A9 14040019 0 IMM 449 DIV R0 (CIATPS*10)/4 determine how much we will allow in 450 * the output buffer at any given time 079AA 30040100 0 IMM 451 RSB R0 CIATRMBUFL invert it 079AB 54040000 0 IMM 452 MAX R0 0 make sure it is not negative 079AC E4170014 0 4 CACH 453 ST R0 TCB,TCBAUDROOM save for the driver 454 079AD DC004A5F 455 CALL LINK1CMND place one command in the list 079AE 41440082 IMM 456 PARV PORTCORATE setting output rate 079AF 4052C000 3 REG 457 PARVL R3 pass the ACC rate funny number 079B0 DC407A7F 458 CALLNP CALCSUSP recalculate the suspend values 079B1 60178801 0 6 BASE 459 LD R0 SP,SAVEORAT returning the old rate 079B2 5D1F8002 6 STAK 460 LEAVE POP 461 * --- 462 463 END STTERMORAT 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1690 (GETSETTERM) F 103 FREQ - Set terminal controls 465 466 ********************************************************************************** 467 * * 468 * STTERMIRAT. Set the input baud rate. If the rate is illegal * 469 * then this routine does not return but jumps directly to FERRORPOB. * 470 * Call: * 471 * LD R0 rate to set (if pos, must be in "legal" table * 472 * if neg, must be doable by ACC within 3%) * 473 * LD TCB => terminal control block * 474 * CALLNP STTERMIRAT * 475 * ST R0 old input baud rate * 476 * * 477 * Eats R0:R3. * 478 * Stack required = 6 * 479 * 2 + max ( CHECKBAUD (1), LINK1CMND(4) ) * 480 * * 481 ********************************************************************************** 482 483 BLOCK 484 485 ENTRY STTERMIRAT 486 487 BEGFRAME 00178801 6 BASE 488 SAVEIRAT BSS 1 save for the old rate 489 ENDFRAME 490 079B3 DD5F8002 6 STAK 491 STTERMIRAT ENTRNP PUSH 079B4 DC407A13 492 CALLNP CHECKBAUD check the baud for legality 079B5 E00900F1 0 4 ZBM 493 EXCH R0 TCB,TCIRATE set the new and get the old 079B6 E4178801 0 6 BASE 494 ST R0 SP,SAVEIRAT save the old rate 079B7 DC004A5F 495 CALL LINK1CMND place one command in the list 079B8 41440081 IMM 496 PARV PORTCIRATE setting output rate 079B9 4052C000 3 REG 497 PARVL R3 pass the ACC rate funny number 079BA 60178801 0 6 BASE 498 LD R0 SP,SAVEIRAT returning the old rate 079BB 5D1F8002 6 STAK 499 LEAVE POP 500 * --- 501 502 END STTERMIRAT 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1691 (GETSETTERM) F 103 FREQ - Set terminal controls 504 505 ********************************************************************************** 506 * * 507 * STTERMTGRP. Set the terminating character group. Check to * 508 * see if it is changing and if so cause the list to be rescanned * 509 * to find the first terminator. We also check the array setting * 510 * to to see if it is all zeros (no terminators which doesn't work * 511 * too hot). If so, we set all of the control characters to work. * 512 * Call: * 513 * LD R0 new group to select * 514 * LD TCB => terminal control block * 515 * CALLNP STTERMTGRP * 516 * ST R0 group previously selected * 517 * * 518 * Eats R0:R2 * 519 * Stack required = 5 * 520 * 3 + max ( CALCTERMC (2), LOCKWAIT (0) ) * 521 * * 522 ********************************************************************************** 523 524 BLOCK 525 526 ENTRY STTERMTGRP 527 528 BEGFRAME 00178801 6 BASE 529 OLDCODE BSS 1 to save this register 00178802 6 BASE 530 SAVER3 BSS 1 to save this register 531 ENDFRAME 532 079BC DD5F8003 6 STAK 533 STTERMTGRP ENTRNP PUSH 079BD E4178801 0 6 BASE 534 ST R0 SP,OLDCODE code in safe spot 535 PLOCK TCB,TCLOCK get access to TCB 079BE 0CC00000 535 IOFF 079BF D1D70818 4 BASE 535 SETT TCB,TCLOCK 079C0 FE0C79C2 535 JNE MA(2+DISPW MA 0) 079C1 DC40308B 535 CALLNP LOCKWAIT 079C2 60178801 0 6 BASE 536 LD R0 SP,OLDCODE get code back 079C3 5C096015 5 ZBM 537 CMZ FCB,FCABSIO main terminal? 079C4 FE0279C9 538 JEQ STTGNEZ jump if not 539 * \ / 540 541 ********************************************************************************** 542 * Terminal is absolute I/O unit. We can change/use * 543 * TCTERMTCG only if no one ELSE is currently trapping * 544 * NE term ints for it. TCRDRTCG tells us this. * 545 * We can always change UPCTERMGRP. Its value * 546 * is what we put in TCTERMGRP when we can, so * 547 * its value is used for the "old value". * 548 ********************************************************************************** 549 079C5 60400414 1 550 LD R1 CPCUPC process 079C6 E4084041 0 1 ZBM 551 ST R0 R1,UPCTERMGRP place new 079C7 5C091815 4 ZBM 552 CMZ TCB,TCRDRTCG our TCG in TCB? 079C8 FE0279D1 553 JEQ NORECALC jump if can't touch 554 * \ / 555 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1692 (GETSETTERM) F 103 FREQ - Set terminal controls 000079C9 556 STTGNEZ LABEL 079C9 E009083D 0 4 ZBM 557 EXCH R0 TCB,TCTERMGRP place new, get old 079CA 64178801 0 6 BASE 558 CPR R0 SP,OLDCODE old = new? 079CB FE0279D1 559 JEQ NORECALC jump if no change 560 * \ / 561 562 * recalculate location of first terminator 079CC E4178801 0 6 BASE 563 ST R0 SP,OLDCODE save old 079CD E4D78802 3 6 BASE 564 ST R3 SP,SAVER3 save a reg 079CE DC404CA6 565 CALLNP CALCTERMC find terminator 079CF 60D78802 3 6 BASE 566 LD R3 SP,SAVER3 restore a reg 079D0 60178801 0 6 BASE 567 LD R0 SP,OLDCODE and another 568 * \ / 569 000079D1 570 NORECALC LABEL R0 = previous TCG 571 PUNLOCK TCB,TCLOCK allow access to TCB 079D1 EC170818 4 BASE 571 STZ TCB,TCLOCK 079D2 0C800000 571 ION 079D3 5D1F8003 6 STAK 572 LEAVE POP return 573 * --- 574 575 END STTERMTGRP 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1693 (GETSETTERM) F 103 FREQ - Set terminal controls 577 578 ********************************************************************************** 579 * * 580 * STTERMECHO. Set the terminal's echo mode. A check is made * 581 * for the special mode where characters are echoed when read. * 582 * If we are leaving this mode and are entering another mode that * 583 * does echoing ( i.e. not going to echo off ) then all * 584 * characters currently in the input buffer are echoed. Call: * 585 * * 586 * LD R0 mode to set * 587 * LD TCB => terminal control block * 588 * CALLNP STTERMECHO * 589 * ST R0 the previous echo mode * 590 * * 591 * Eats R0:R3. * 592 * Stack required = 16 * 593 * 2 + max ( ECHOALL (14), LINK1CMND (4), LOCKWAIT (0) ) * 594 * * 595 ********************************************************************************** 596 597 BLOCK 598 599 ENTRY STTERMECHO 600 601 BEGFRAME 00178801 6 BASE 602 OLDECHO BSS 1 save for the previous echo mode 603 ENDFRAME 604 079D4 DD5F8002 6 STAK 605 STTERMECHO ENTRNP PUSH 079D5 5C091A10 4 ZBM 606 CMZ TCB,TCRFP SSU port? 079D6 FE0279DA 607 JEQ NOSWITCHY jump if not 079D7 64040001 0 IMM 608 CPR R0 ECHOMCIA asking CIA echo? 079D8 FE0C79DA 609 JNE NOSWITCHY jump if not 079D9 60040002 0 IMM 610 LD R0 ECHOMSOFT SSU cannot echo, let software do it 000079DA 611 NOSWITCHY LABEL 079DA E0093C21 0 4 ZBM 612 EXCH R0 TCB,TCECHO swap new for old 079DB E4178801 0 6 BASE 613 ST R0 SP,OLDECHO save old for a moment 079DC 64093C21 0 4 ZBM 614 CPR R0 TCB,TCECHO see if any change 079DD FE0279EB 615 JEQ ECHOOK nothing special if no change 079DE 64040003 0 IMM 616 CPR R0 ECHOMREAD exitting the special echo mode? 079DF FE0C79EB 617 JNE ECHOOK if not exitting special echo mode, don't worry 618 PLOCK TCB,TCLOCK get access to TCB 079E0 0CC00000 618 IOFF 079E1 D1D70818 4 BASE 618 SETT TCB,TCLOCK 079E2 FE0C79E4 618 JNE MA(2+DISPW MA 0) 079E3 DC40308B 618 CALLNP LOCKWAIT 079E4 EC090E1D 4 ZBM 619 STZ TCB,TCINECHO clear flags 620 PUNLOCK TCB,TCLOCK release the TCB 079E5 EC170818 4 BASE 620 STZ TCB,TCLOCK 079E6 0C800000 620 ION 079E7 EC092018 4 ZBM 621 STZ TCB,TCINECHOD 079E8 60093C21 0 4 ZBM 622 LD R0 TCB,TCECHO pick up the new echo type 079E9 FA0279EB 0 623 JEQZ R0 ECHOOK jump if echo being discontinued altogether 079EA DC404D16 624 CALLNP ECHOALL echo characters in buffer 000079EB 625 ECHOOK LABEL 079EB 60093C21 0 4 ZBM 626 LD R0 TCB,TCECHO get the new echo control 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1694 (GETSETTERM) F 103 FREQ - Set terminal controls 079EC 5CA079ED 0 627 LDPC ECHOTYPE(R0) and go to the appropriate place 628 * --- 629 000079ED 630 ECHOTYPE LABEL 079ED 000079F1 631 VFD ADR ECHOTYPOFF 0 = echo off 079EE 000079F6 632 VFD ADR ECHOTYPON 1 = CIA echo on 079EF 000079F1 633 VFD ADR ECHOTYPOFF 2 = software echo 079F0 000079F1 634 VFD ADR ECHOTYPOFF 3 = software echo when chars read 635 636 * turn the echo off 000079F1 637 ECHOTYPOFF LABEL 079F1 DC004A5F 638 CALL LINK1CMND place the command to the ACC 079F2 41440089 IMM 639 PARV PORTECHOOF turn the echo off 079F3 40440000 IMM 640 PARVL 0 no parameter 079F4 60178801 0 6 BASE 641 LD R0 SP,OLDECHO return the old echo mode 079F5 5D1F8002 6 STAK 642 LEAVE POP 643 * --- 644 645 * turn the echo on 000079F6 646 ECHOTYPON LABEL 079F6 DC004A5F 647 CALL LINK1CMND place the command to the ACC 079F7 41440088 IMM 648 PARV PORTECHOON turn the echo on 079F8 40440000 IMM 649 PARVL 0 no parameter 079F9 60178801 0 6 BASE 650 LD R0 SP,OLDECHO return the old echo mode 079FA 5D1F8002 6 STAK 651 LEAVE POP 652 * --- 653 654 END STTERMECHO 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1695 (GETSETTERM) F 103 FREQ - Set terminal controls 656 657 ********************************************************************************** 658 * * 659 * STTERMTRNS. Set the port's transmitters. Call: * 660 * * 661 * LD R0 what to set them to * 662 * LD TCB => terminal control block * 663 * CALLNP STTERMTRNS * 664 * ST R0 what they were set to before * 665 * * 666 * Eats R0:R3. * 667 * Stack required = 6 * 668 * 2 + LINK1CNMD (4) * 669 * * 670 ********************************************************************************** 671 672 BLOCK 673 674 ENTRY STTERMTRNS 675 676 BEGFRAME 00178801 6 BASE 677 OLDSAVE BSS 1 save for the olde transmitters 678 ENDFRAME 679 079FB DD5F8002 6 STAK 680 STTERMTRNS ENTRNP PUSH 079FC 780400E8 0 IMM 681 AND R0 1*PORTSRI+1*PORTSCD+1*PORTSDTR+1*PORTSRTS 079FD E0170012 0 4 CACH 682 EXCH R0 TCB,TCLASTCOM set new and get old 079FE E4178801 0 6 BASE 683 ST R0 SP,OLDSAVE save the old conditions 079FF DC004A5F 684 CALL LINK1CMND place one command on end of list 07A00 41440083 IMM 685 PARV PORTCSTAT setting the port status 07A01 40570012 4 CACH 686 PARVL TCB,TCLASTCOM what setting it to 07A02 60178801 0 6 BASE 687 LD R0 SP,OLDSAVE return the old setting 07A03 5D1F8002 6 STAK 688 LEAVE POP 689 * --- 690 691 END STTERMTRNS 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1696 (GETSETTERM) F 103 FREQ - Set terminal controls 693 694 ********************************************************************************** 695 * * 696 * STTERMPOPT. Set the port's options. Call: * 697 * * 698 * LD R0 what to set them to * 699 * LD TCB => terminal control block * 700 * CALLNP STTERMPOPT * 701 * ST R0 what they were set to before * 702 * * 703 * Eats R0:R3. * 704 * Stack required = 6 * 705 * 2 + LINK1CMND (4) * 706 * * 707 ********************************************************************************** 708 709 BLOCK 710 711 ENTRY STTERMPOPT 712 713 BEGFRAME 00178801 6 BASE 714 OLDSAVE BSS 1 save for the olde transmitters 715 ENDFRAME 716 07A04 DD5F8002 6 STAK 717 STTERMPOPT ENTRNP PUSH 07A05 780400F7 0 IMM 718 AND R0 1*PORTSCTS+1*PORTSXOF+1*PORTSBRK+1*PORTSRDE+1*PORTSSTOP2+3*PORTPARITY 07A06 E0170013 0 4 CACH 719 EXCH R0 TCB,TCLASTCOM2 set new and get old 07A07 E4178801 0 6 BASE 720 ST R0 SP,OLDSAVE save the old conditions 07A08 DC004A5F 721 CALL LINK1CMND place one command on end of list 07A09 4144008D IMM 722 PARV PORTCSTAT2 setting the port status 07A0A 40570013 4 CACH 723 PARVL TCB,TCLASTCOM2 what setting it to 07A0B 60178801 0 6 BASE 724 LD R0 SP,OLDSAVE return the old setting 07A0C 5D1F8002 6 STAK 725 LEAVE POP 726 * --- 727 728 END STTERMPOPT 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1697 (GETSETTERM) F 103 FREQ - Set terminal controls 730 731 ********************************************************************************** 732 * * 733 * STTERMIMOD. Set the port's interface mode. The ACC is reset * 734 * so that the interface state will be acted upon. Call: * 735 * * 736 * LD R0 mode to set * 737 * LD TCB => terminal control block * 738 * CALLNP STTERMIMOD * 739 * ST R0 what the mode was set to * 740 * * 741 * Eats R0:R3. * 742 * Stack required = 10 * 743 * 2 + OUTTSET (8) * 744 * * 745 ********************************************************************************** 746 747 BLOCK 748 749 ENTRY STTERMIMOD 750 751 BEGFRAME 00178801 6 BASE 752 OLDSAVE BSS 1 save for the previous mode 753 ENDFRAME 754 07A0D DD5F8002 6 STAK 755 STTERMIMOD ENTRNP PUSH 07A0E E0093C28 0 4 ZBM 756 EXCH R0 TCB,TCINTPROTO set the new and get the old 07A0F E4178801 0 6 BASE 757 ST R0 SP,OLDSAVE remember the old to return 07A10 DC404A85 758 CALLNP OUTTSET set port params and get status int 07A11 60178801 0 6 BASE 759 LD R0 SP,OLDSAVE return the old value 07A12 5D1F8002 6 STAK 760 LEAVE POP 761 * --- 762 763 END STTERMIMOD 764 765 END FREQSETTRM and FREQSETTM2 routines 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1698 (GETSETTERM) F 103 FREQ - Set terminal controls 767 768 ********************************************************************************** 769 * * 770 * CHECKBAUD. Routine that calculates the baud rate * 771 * constant and jumps to the parameter out of bounds error * 772 * if the rate cannot be done by the COMM. Call: * 773 * LD R0 [ 110 < baud rate <= 19200] * 774 * CALLNP CHECKBAUD * 775 * ST R0 baud rate (unchanged) * 776 * ST R3 rate constant for COMM * 777 * Eats R1 also * 778 * Stack required = 1 * 779 * * 780 ********************************************************************************** 781 782 BLOCK CHECKBAUD subroutine 783 784 ENTRY CHECKBAUD 785 786 BEGFRAME 787 ENDFRAME 788 07A13 DD5F8001 6 STAK 789 CHECKBAUD ENTRNP PUSH 07A14 FA067A20 0 790 JGEZ R0 CKBAUDTAB if positive, must be in table to be accepted 07A15 70120000 0 0 REG 791 LDN R0 R0 if negative, do 3% check 00007A16 792 BAUDINTAB LABEL 07A16 60D20000 3 0 REG 793 LD R3 R0 get the requested rate 07A17 34C71F00 3 IMM 794 RDV R3 -19200*3 compute the constant 07A18 7CC7F000 3 IMM 795 IOR R3 -(2 POWER 12) (12 bits in comm counter) 07A19 7052C000 1 3 REG 796 LDN R1 R3 07A1A 3444E100 1 IMM 797 RDV R1 19200*3 R1=actual rate, R0=requested rate 07A1B 1C440064 1 IMM 798 MUL R1 100 07A1C 14520000 1 0 REG 799 DIV R1 R0 R1=100+percent difference 07A1D 64440067 1 IMM 800 CPR R1 103 3% is allowable difference 07A1E FE047A24 801 JGT NOTGOODB jump if not good rate 07A1F 5D1F8001 6 STAK 802 LEAVE POP return 803 * --- 804 805 * See if baud rate in table of usual rates 00007A20 806 CKBAUDTAB LABEL 07A20 6047FFF5 1 IMM 807 LD R1 -BAUDTABL get table length 00007A21 808 CKBAUDTABL LABEL 07A21 64227A31 0 1 809 CPR R0 BAUDTAB(BAUDTABL)(R1) is this it? 07A22 FE027A16 810 JEQ BAUDINTAB jump if found 07A23 FA607A21 1 811 IRJ R1 CKBAUDTABL search entire table 812 * \ / 813 814 * The baud rate doesn't represent itself in the comms format 815 * \ / 00007A24 816 NOTGOODB LABEL 07A24 601F8001 0 6 STAK 817 LD R0 POP clean off the stack 07A25 FE0E59B0 818 JMP FERRORPOB return 'parameter out of bounds' error 819 * --- 820 00007A26 821 BAUDTAB LABEL 07A26 0000006E 822 VFD 110 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1699 (GETSETTERM) F 103 FREQ - Set terminal controls 07A27 00000096 823 VFD 150 07A28 0000012C 824 VFD 300 07A29 00000258 825 VFD 600 07A2A 000004B0 826 VFD 1200 07A2B 00000708 827 VFD 1800 07A2C 00000960 828 VFD 2400 07A2D 000012C0 829 VFD 4800 07A2E 00001C20 830 VFD 7200 07A2F 00002580 831 VFD 9600 07A30 00004B00 832 VFD 19200 0000000B ABS 833 BAUDTABL EQU DISPW BAUDTAB length of table 834 835 END CHECKBAUD subroutine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1700 (GETSETTERM) F 103 FREQ - Terminal Control Operations 838 839 ********************************************************************************** 840 * * 841 * These requests provide control operations that are legal * 842 * only on terminals. * 843 * * 844 * Stack required = 10 * 845 * 0 + max ( CTBREAK (8), CTCLRXOFF (5), CTDELAY (8), * 846 * CTFLUSHI (5), CTFLUSHIO (5), CTFLUSHO (5), * 847 * MAKTRMSTAT (1), RESETTERMX (10) ) * 848 * * 849 ********************************************************************************** 850 851 BLOCK FREQTRMCTL routine 852 853 ENTRY FREQTRMCTL 854 00007A31 855 FREQTRMCTL LABEL 07A31 64840007 2 IMM 856 CPR R2 CTRMTABL see if subop in range 07A32 FE0659D8 857 JGE UERRORILR 07A33 FB7059B8 5 858 JZA FCB FERRORLNE3 jump if lun not equipped 07A34 60096665 0 5 ZBM 859 LD R0 FCB,FCHTYPE get the type of the device 07A35 64040007 0 IMM 860 CPR R0 HTYPETERM is this a terminal? 07A36 FE0C59A5 861 JNE FERRORILOP if not, illegal operation 07A37 60D30000 3 4 REG 862 LD R3 R4 copy pointer to user registers 07A38 61095F16 4 5 ZBM 863 LD TCB FCB,FCDCBPTR get the pointer to the TCB 07A39 FB307A3E 4 864 JZA TCB SKIPOP jump if fake terminal 07A3A 60040007 0 IMM 865 LD R0 FSACSNDA unwanted access 07A3B 64095835 0 5 ZBM 866 CPR R0 FCB,FCACCESS is that what we have? 07A3C FE0259A5 867 JEQ FERRORILOP jump if no changing allowed 07A3D 5D647A40 2 868 XCT CTRMTABJ(R2) do the operation 00007A3E 869 SKIPOP LABEL 07A3E DC404CBA 870 CALLNP MAKTRMSTAT set the load point bit 07A3F FE0E5988 871 JMP UERROR return 872 * --- 873 00007A40 874 CTRMTABJ LABEL 07A40 DC407A47 875 CALLNP CTFLUSHO 0 - flush output queue 07A41 DC407A4D 876 CALLNP CTFLUSHI 1 - flush input queue 07A42 DC407A53 877 CALLNP CTFLUSHIO 2 - flush both input and output 07A43 DC409860 878 CALLNP RESETTERMX 3 - restore terminal to "default" configuration 07A44 DC407A5A 879 CALLNP CTDELAY 4 - delay terminal outputting 07A45 DC407A65 880 CALLNP CTBREAK 5 - output break 07A46 DC407A6D 881 CALLNP CTCLRXOFF 6 - clear XOFF 00000007 ABS 882 CTRMTABL EQU DISPW CTRMTABJ 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1701 (GETSETTERM) F 103 FREQ - Terminal Control Operations 884 885 ********************************************************************************** 886 * * 887 * CTFLUSHO. Flush the output queue. * 888 * Call: * 889 * LD R4 => terminal control block * 890 * CALLNP CTFLUSHO * 891 * * 892 * Eats R0:R3. * 893 * Stack required = 5. * 894 * 1 + max ( FLUSHOQ (1), LINK1CMND (4) ) * 895 * * 896 ********************************************************************************** 897 898 BLOCK 899 900 ENTRY CTFLUSHO 901 902 BEGFRAME 903 ENDFRAME 904 07A47 DD5F8001 6 STAK 905 CTFLUSHO ENTRNP PUSH 07A48 DC404AE3 906 CALLNP FLUSHOQ get rid of anything in core 07A49 DC004A5F 907 CALL LINK1CMND make command and link it in 07A4A 4144008F IMM 908 PARV PORTCZAP 07A4B 40440002 IMM 909 PARVL 1*PORTCRFO 07A4C 5D1F8001 6 STAK 910 LEAVE POP 911 * --- 912 913 END CTFLUSHO 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1702 (GETSETTERM) F 103 FREQ - Terminal Control Operations 915 916 ********************************************************************************** 917 * * 918 * CTFLUSHI. Flush the input queue. * 919 * Call: * 920 * LD R4 => terminal control block * 921 * CALLNP CTFLUSHI * 922 * * 923 * Eats R0:R3 * 924 * Stack required = 5 * 925 * 1 + max ( FLUSHIQ (2), LINK1CMND (4) ) * 926 * * 927 ********************************************************************************** 928 929 BLOCK 930 931 ENTRY CTFLUSHI 932 933 BEGFRAME 934 ENDFRAME 935 07A4D DD5F8001 6 STAK 936 CTFLUSHI ENTRNP PUSH 07A4E DC404AF8 937 CALLNP FLUSHIQ get rid of anything in core 07A4F DC004A5F 938 CALL LINK1CMND make command and link it in 07A50 4144008F IMM 939 PARV PORTCZAP 07A51 40440001 IMM 940 PARVL 1*PORTCRFI 07A52 5D1F8001 6 STAK 941 LEAVE POP 942 * --- 943 944 END CTFLUSHI 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1703 (GETSETTERM) F 103 FREQ - Terminal Control Operations 946 947 ********************************************************************************** 948 * * 949 * CTFLUSHIO. Flush the input and output queues. * 950 * Call: * 951 * LD R4 => terminal control block * 952 * CALLNP CTFLUSHIO * 953 * * 954 * Eats R0:R3 * 955 * Stack required = 5 * 956 * 1 + max (FLUSHIQ(2), FLUSHOQ(1), LINK1CMND(4) ) * 957 * * 958 ********************************************************************************** 959 960 BLOCK 961 962 ENTRY CTFLUSHIO 963 964 BEGFRAME 965 ENDFRAME 966 07A53 DD5F8001 6 STAK 967 CTFLUSHIO ENTRNP PUSH 07A54 DC404AF8 968 CALLNP FLUSHIQ get rid of anything in core 07A55 DC404AE3 969 CALLNP FLUSHOQ get rid of anything in core 07A56 DC004A5F 970 CALL LINK1CMND make command and link it in 07A57 4144008F IMM 971 PARV PORTCZAP 07A58 40440003 IMM 972 PARVL (1*PORTCRFI)+(1*PORTCRFO) 07A59 5D1F8001 6 STAK 973 LEAVE POP 974 * --- 975 976 END CTFLUSHIO 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1704 (GETSETTERM) F 103 FREQ - Terminal Control Operations 978 979 ********************************************************************************** 980 * * 981 * CTDELAY. The requester specifies the time in milliseconds * 982 * to pause the terminal output stream. We convert the milliseconds * 983 * into character times (since that's what the ACC wants) and then * 984 * create one or more delay commands for the port (more then one * 985 * because one delay command can only be for TQMXDELAY characters * 986 * and we allow the user to pause for up to 10 seconds). * 987 * Call: * 988 * LD R3 => console area of the requester * 989 * R3,CAR1 is the delay in milliseconds * 990 * LD R4 => terminal control block * 991 * CALLNP CTDELAY * 992 * * 993 * Eats R0:R3. * 994 * Stack required = 8 * 995 * 1 + OUTDELAYS (7) * 996 * * 997 ********************************************************************************** 998 999 BLOCK 1000 1001 ENTRY CTDELAY 1002 1003 BEGFRAME 1004 ENDFRAME 1005 07A5A DD5F8001 6 STAK 1006 CTDELAY ENTRNP PUSH 07A5B 6056C803 1 3 BASE 1007 LD R1 R3,CAR1 get milliseconds to delay 07A5C 64442710 1 IMM 1008 CPR R1 1000*10 only can delay up to 10 seconds 07A5D FE0459B0 1009 JGT FERRORPOB error if more 07A5E 1C491EF1 1 4 ZBM 1010 MUL R1 TCB,TCORATE 07A5F 1844270F 1 IMM 1011 ADD R1 1000*10-1 round up 07A60 14442710 1 IMM 1012 DIV R1 1000*10 make R1=character times 07A61 DC007A72 1013 CALL OUTDELAYS output the delay commands 07A62 41440086 IMM 1014 PARV PORTDWELL delay with a dwell 07A63 40524000 1 REG 1015 PARVL R1 the character times to delay 07A64 5D1F8001 6 STAK 1016 LEAVE POP 1017 * --- 1018 1019 END CTDELAY 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1705 (GETSETTERM) F 103 FREQ - Terminal Control Operations 1021 1022 ********************************************************************************** 1023 * * 1024 * CTBREAK. Output a break. * 1025 * Call: * 1026 * LD R3 => requester's console area * 1027 * R3,CAR1 = number of character times to BREAK * 1028 * LD R4 => terminal control block * 1029 * CALLNP CTBREAK * 1030 * * 1031 * Eats R0:R3. * 1032 * Stack required = 8 * 1033 * 1 + OUTDELAYS (7) * 1034 * * 1035 ********************************************************************************** 1036 1037 BLOCK 1038 1039 ENTRY CTBREAK 1040 1041 BEGFRAME 1042 ENDFRAME 1043 07A65 DD5F8001 6 STAK 1044 CTBREAK ENTRNP PUSH 07A66 6056C803 1 3 BASE 1045 LD R1 R3,CAR1 07A67 68491EF1 1 4 ZBM 1046 UCPR R1 TCB,TCORATE no breaks more than 10 secs 07A68 FE0659B0 1047 JGE FERRORPOB 07A69 DC007A72 1048 CALL OUTDELAYS output the delay 07A6A 41440087 IMM 1049 PARV PORTBREAK output as a break 07A6B 40524000 1 REG 1050 PARVL R1 the character times to delay 07A6C 5D1F8001 6 STAK 1051 LEAVE POP 1052 * --- 1053 1054 END CTBREAK 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1706 (GETSETTERM) F 103 FREQ - Terminal Control Operations 1056 1057 ********************************************************************************** 1058 * * 1059 * CTCLRXOFF. This routine terminates the wait for an XON that occurs * 1060 * following the reception of an XOFF. * 1061 * Call: * 1062 * LD R4 => TCB * 1063 * CALLNP CTCLRXOFF * 1064 * Eats R0-R3. * 1065 * Stack required = 5 * 1066 * 1 + LNKCMNDBEG (4) * 1067 * * 1068 ********************************************************************************** 1069 1070 BLOCK CTCLRXOFF subroutine 1071 ENTRY CTCLRXOFF 1072 1073 BEGFRAME 1074 ENDFRAME 1075 07A6D DD5F8001 6 STAK 1076 CTCLRXOFF ENTRNP PUSH 07A6E DC004A6C 1077 CALL LNKCMNDBEG put command at start of queue for comm 07A6F 4144008F IMM 1078 PARV PORTCZAP force it out 07A70 40440004 IMM 1079 PARVL 1*PORTCRCXON set clear XOFF bit 07A71 5D1F8001 6 STAK 1080 LEAVE POP return 1081 * --- 1082 1083 END 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1707 (GETSETTERM) F 103 FREQ - Terminal Control Operations 1085 1086 ********************************************************************************** 1087 * * 1088 * OUTDELAYS. This routine will output one or more command * 1089 * elements to the specified port of the given type of delay. More * 1090 * then one may be output because only TCQMXDELAY will fit into * 1091 * one command element. * 1092 * Call: * 1093 * LD TCB => terminal control block * 1094 * CALL OUTDELAYS * 1095 * PARV command code to delay with * 1096 * PARVL number of character times to delay * 1097 * * 1098 * Eats R0:R3. * 1099 * Stack required = 7 * 1100 * 3 + LINK1CMND (4) * 1101 * * 1102 ********************************************************************************** 1103 1104 BLOCK 1105 1106 ENTRY OUTDELAYS 1107 1108 BEGFRAME 00178801 6 BASE 1109 OUTCMND BSS 1 the command outputting 00178802 6 BASE 1110 OUTCOUNT BSS 1 the character times to output 1111 ENDFRAME 1112 07A72 DD1F8003 6 STAK 1113 OUTDELAYS ENTR PUSH 07A73 C1578801 6 BASE 1114 STPV SP,OUTCMND the command to output 07A74 C0578802 6 BASE 1115 STPVL SP,OUTCOUNT the number of character times 00007A75 1116 MOREDELAY LABEL 07A75 60D78802 3 6 BASE 1117 LD R3 SP,OUTCOUNT 07A76 50C400FF 3 IMM 1118 MIN R3 TCQMXDELAY 07A77 B0D78802 3 6 BASE 1119 RSBM R3 SP,OUTCOUNT remove the number outputting this time 07A78 60938000 2 6 REG 1120 LD R2 SP remember my frame address 07A79 DC004A5F 1121 CALL LINK1CMND place one command out there 07A7A 41568801 2 BASE 1122 PARV R2,OUTCMND 07A7B 4052C000 3 REG 1123 PARVL R3 07A7C 5C178802 6 BASE 1124 CMZ SP,OUTCOUNT any more to output? 07A7D FE047A75 1125 JGT MOREDELAY jump if more to do 07A7E 5D1F8003 6 STAK 1126 LEAVE POP 1127 * --- 1128 1129 END OUTDELAYS 1130 1131 END FREQTRMCTL routine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1708 (GETSETTERM) F 103 FREQ - Terminal Control Operations 1133 1134 ********************************************************************************** 1135 * * 1136 * The output baud rate has been changed so we need * 1137 * to recalculate the suspend timing constants. * 1138 * Call: * 1139 * R4 => TCB * 1140 * CALLNP CALCSUSP * 1141 * Stack used = 1 * 1142 * * 1143 ********************************************************************************** 1144 1145 BLOCK CALCSUSP subroutine 1146 1147 ENTRY CALCSUSP 1148 1149 BEGFRAME 1150 ENDFRAME 1151 07A7F DD5F8001 6 STAK 1152 CALCSUSP ENTRNP PUSH 07A80 60091EF1 0 4 ZBM 1153 LD R0 TCB,TCORATE get the current output rate 07A81 14040005 0 IMM 1154 DIV R0 10/2 two seconds worth of characters 07A82 500403FF 0 IMM 1155 MIN R0 1023 make sure it's not too big 07A83 E40900A2 0 4 ZBM 1156 ST R0 TCB,TCMAXCHAR save the maximum allowed output size 07A84 60091EF1 0 4 ZBM 1157 LD R0 TCB,TCORATE get the current output rate 07A85 14040014 0 IMM 1158 DIV R0 10*2 one half second worth of characters 07A86 5404000B 0 IMM 1159 MAX R0 11 make it at least 11 07A87 E40914A2 0 4 ZBM 1160 ST R0 TCB,TCUNSUSP set the new restart buffer size 07A88 5D1F8001 6 STAK 1161 LEAVE POP return 1162 * --- 1163 1164 END CALCSUSP subroutine 1165 1166 END Terminal Control FREQs 163 INPUT FREQUNIT unit interrupt control 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1709 (FREQUNIT) F 104 FREQ - Unit Record Echo Control 3 4 ********************************************************************************** 5 * * 6 * To aid in the usability of a batch or do stream, the unit record * 7 * device being read from may be commanded to write the read line onto * 8 * some output unit. This will make card readers and do units like a * 9 * terminal in that input appears on the output unit. * 10 * The flag used to enable this is the unit number of the unit to * 11 * echo on. * 12 * * 13 * Stack required = 2 * 14 * 0 + LUNSEARCH (2) * 15 * * 16 ********************************************************************************** 17 18 BLOCK FREQECHO routine 19 ENTRY FREQECHO 20 00007A89 21 FREQECHO LABEL 07A89 64840003 2 IMM 22 CPR R2 FREQECHOM is subop within range? 07A8A FE0659D8 23 JGE UERRORILR jump if not 07A8B FB7059B8 5 24 JZA FCB FERRORLNE3 error if unit not equipped 07A8C 60096665 0 5 ZBM 25 LD R0 FCB,FCHTYPE get hardware type 07A8D 5C307A91 0 @ 26 CMZ @LEGALDVP(R0) legal on this device? 07A8E FE0259A5 27 JEQ FERRORILOP "illegal operation" if not 07A8F 5CA47A92 2 28 LDPC FREQECHOT(R2) do operation 29 * --- 30 07A90 60200000 31 LEGALDV VFD (1*BIT HTYPESAF)+(1*BIT HTYPECDR)+(1*BIT HTYPERAF) 07A91 00487A90 32 LEGALDVP PTR LEGALDV/BIT 0 33 00007A92 34 FREQECHOT LABEL 07A92 00007A95 35 ADR SETECHO 0 - set echo unit 07A93 00007A9C 36 ADR CLRECHO 1 - clear echo unit 07A94 00007A9E 37 ADR GETECHO 2 - get echo unit 00000003 ABS 38 FREQECHOM EQU DISPW FREQECHOT 39 40 * set the echo device - requester's R1 = unit number. 00007A95 41 SETECHO LABEL 07A95 61D34000 7 5 REG 42 LD R7 FCB R7 -> FCB to set echo from 07A96 60D70803 3 4 BASE 43 LD R3 R4,CAR1 get requested echo unit 07A97 DC405B39 44 CALLNP LUNSEARCH does it exist? 07A98 E1D34000 7 5 REG 45 EXCH R7 FCB restore our FCB pointer 07A99 FBF059B8 7 46 JZA R7 FERRORLNE3 jump if LUN not equipped 07A9A E4C97484 3 5 ZBM 47 ST R3 FCB,FCECHOLUN this is our echo unit 07A9B FE0E5982 48 JMP FNOERROR success! 49 * --- 50 51 * clear the echo to device 00007A9C 52 CLRECHO LABEL 07A9C EC097484 5 ZBM 53 STZ FCB,FCECHOLUN 07A9D FE0E5982 54 JMP FNOERROR 55 * --- 56 57 * return echo unit - zero returned if no echo 00007A9E 58 GETECHO LABEL 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1710 (FREQUNIT) F 104 FREQ - Unit Record Echo Control 07A9E 60097484 0 5 ZBM 59 LD R0 FCB,FCECHOLUN 07A9F E4170803 0 4 BASE 60 ST R0 R4,CAR1 07AA0 FE0E5982 61 JMP FNOERROR 62 * --- 63 64 END FREQECHO routine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1711 (FREQUNIT) F 104 FREQ - Unit Interrupt Control 67 68 ********************************************************************************** 69 * * 70 * Several devices (TERM and PATH in particular) have interrupts * 71 * associated with them. These requests control the states of the * 72 * interrupt enable bits for the devices. Normally, the enable bit * 73 * is turned on when OPENed, but if controlling several such devices, * 74 * the interrupts might need to be turned off for some of the devices * 75 * while leaving them on for the others. This controls those enables. * 76 * When changing the state, we do a cheap dump and re-check for * 77 * interrupts. * 78 * * 79 * Subcode: 0 - disable ints on device * 80 * 1 - enable ints on device * 81 * 2 - return state of device int enable flag * 82 * Stack required = 5 * 83 * 0 + max ( CHECKNOINT (2), CHECKUINT (5), LOCKWAIT (0), * 84 * MOVETRMGP (3) ) * 85 * * 86 ********************************************************************************** 87 88 BLOCK FREQUNIT routine 89 ENTRY FREQUNIT 90 00007AA1 91 FREQUNIT LABEL 07AA1 64840003 2 IMM 92 CPR R2 3 subcode in bounds? 07AA2 FE0659D8 93 JGE UERRORILR jump if not 07AA3 FB7059B8 5 94 JZA FCB FERRORLNE3 jump if no such unit 95 * \ / 96 97 * request OK only for path and real terminal 07AA4 61C95F16 7 5 ZBM 98 LD R7 FCB,FCDCBPTR device control block 07AA5 60096665 0 5 ZBM 99 LD R0 FCB,FCHTYPE device type 07AA6 64040004 0 IMM 100 CPR R0 HTYPEPATH path? 07AA7 FE027AC9 101 JEQ ITSPATH jump if so 07AA8 64040007 0 IMM 102 CPR R0 HTYPETERM terminal? 07AA9 FE0C59A5 103 JNE FERRORILOP jump if not 07AAA FBF059A5 7 104 JZA R7 FERRORILOP jump if not a real terminal 07AAB 60440007 1 IMM 105 LD R1 FSACSNDA unwanted access 07AAC 64495835 1 5 ZBM 106 CPR R1 FCB,FCACCESS is that what we have? 07AAD FE0259A5 107 JEQ FERRORILOP jump if no changing allowed 108 * \ / 109 110 * device is a terminal, R7 -> TCB 07AAE 3849DE18 1 7 ZBM 111 LEA R1 R7,TCINTE address of device int control 00007AAF 112 GOTBIT LABEL 07AAF 64840002 2 IMM 113 CPR R2 2 subcode say no change? 07AB0 FE027ACB 114 JEQ CHECK jump if so 07AB1 64964400 2 1 @R 115 CPR R2 @R1 would we actually change anything? 07AB2 FE025982 116 JEQ FNOERROR jump if not 07AB3 E4964400 2 1 @R 117 ST R2 @R1 use subcode to set flag 07AB4 5C096015 5 ZBM 118 CMZ FCB,FCABSIO dealing with absolute I/O unit? 07AB5 FE027AC2 119 JEQ CHECKINTS jump if not 07AB6 64040007 0 IMM 120 CPR R0 HTYPETERM abs I/O a terminal? 07AB7 FE0C7AC2 121 JNE CHECKINTS jump if not 07AB8 60000414 0 122 LD R0 CPCUPC get current process 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1712 (FREQUNIT) F 104 FREQ - Unit Interrupt Control 07AB9 E4881011 2 0 ZBM 123 ST R2 R0,UPCNETINTE change its abs I/O int flag 07ABA 6113C000 4 7 REG 124 LD TCB R7 set reg for call 125 PLOCK TCB,TCLOCK get access to TCB 07ABB 0CC00000 125 IOFF 07ABC D1D70818 4 BASE 125 SETT TCB,TCLOCK 07ABD FE0C7ABF 125 JNE MA(2+DISPW MA 0) 07ABE DC40308B 125 CALLNP LOCKWAIT 07ABF DC403379 126 CALLNP MOVETRMGP shuffle TCG/TCS 127 PUNLOCK TCB,TCLOCK get access to TCB 07AC0 EC170818 4 BASE 127 STZ TCB,TCLOCK 07AC1 0C800000 127 ION 128 * \ / 129 00007AC2 130 CHECKINTS LABEL 07AC2 60C00414 3 131 LD R3 CPCUPC get current process 07AC3 60C8DF12 3 3 ZBM 132 LD R3 R3,UPCCONSOLE get his console area 07AC4 60D6C80B 3 3 BASE 133 LD R3 R3,CAINTMASK mask of current interruptables 07AC5 78C20180 3 IMM 134 AND R3 (1*BIT CAIMNETERM) + (1*BIT CAIMNEPATH) for int checks 07AC6 DC40343C 135 CALLNP CHECKNOINT dump current ints 07AC7 DC4033C2 136 CALLNP CHECKUINT look for newly possible interrupts 07AC8 FE0E5982 137 JMP FNOERROR say goodnight 138 * --- 139 140 * device is a path, R7 -> path control block 00007AC9 141 ITSPATH LABEL 07AC9 3849C411 1 7 ZBM 142 LEA R1 R7,PTHINTE address of device int control 07ACA FE0E7AAF 143 JMP GOTBIT rejoin code 144 * --- 145 146 * subcode says only to return current value 00007ACB 147 CHECK LABEL 07ACB 60164400 0 1 @R 148 LD R0 @R1 get device int control flag 07ACC E4170803 0 4 BASE 149 ST R0 R4,CAR1 save in users registers 07ACD FE0E5982 150 JMP FNOERROR return to him now 151 * --- 152 153 END FREQUNIT routine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1713 (FREQUNIT) F 104 FREQ - Switch Resources Associated with 2 Units 156 157 ********************************************************************************** 158 * * 159 * FRRESSWTCH request. * 160 * * 161 * This request swaps one unit for another within a * 162 * session. All unit lists are scanned for matches to either * 163 * units FCB. If found the opposite FCB is stored into the * 164 * UCE FCB field. We then switch the busy count, and absolute * 165 * i/o and CM unit flags between the 2 FCBs. * 166 * Call: * 167 * * 168 * LD R0 FRRESSWTCH * 169 * LD R1 * 170 * FREQ * 171 * JLTZ R0 error * 172 * R0 = dynamic status of unit number given as operand * 173 * * 174 * Stack usage = 2 * 175 * 0 + max ( CHECK4CM (1), LUNSEARCHX (2), SWTCHUNITS (1) ) * 176 * * 177 ********************************************************************************** 178 179 BLOCK FRSWITCH request 180 ENTRY FREQSWITCH 181 00007ACE 182 FREQSWITCH LABEL 07ACE FA8C59D8 2 183 JNEZ R2 ILLREQ no subop please 07ACF DC405B4F 184 CALLNP LUNSEARCHX do control mode unit checking 07AD0 FB7059BA 5 185 JZA FCB FERRORNSL what? no unit? 07AD1 60D70803 3 4 BASE 186 LD R3 R4,CAR1 pick up the other unit number 07AD2 61134000 4 5 REG 187 LD R4 FCB put FCB pointer in safe reg 07AD3 DC405B4F 188 CALLNP LUNSEARCHX find the other FCB to swap 07AD4 FB7059BA 5 189 JZA FCB FERRORNSL we wanted another FCB 07AD5 65134000 4 5 REG 190 CPR R4 FCB are the two units actually the same? 07AD6 FE025982 191 JEQ FNOERROR if so, no more to do 192 * \ / 193 07AD7 DC405B55 194 CALLNP CHECK4CM make sure only CM is diddling with its units 07AD8 FA0C5983 0 195 JNEZ R0 FERROR jump if someone else is trying 196 * \ / 197 07AD9 60400412 1 198 LD R1 CPPSA R1 -> our PSA 07ADA 60486316 1 1 ZBM 199 LD R1 R1,PSUNITS R1 -> list of global units 07ADB DC407AF1 200 CALLNP SWTCHUNITS swap the suckers 201 * \ / 202 07ADC 60400412 1 203 LD R1 CPPSA R1 -> our PSA 07ADD 60885F15 2 1 ZBM 204 LD R2 R1,PSPROCLIST point to our list of UPCs 00007ADE 205 SWITCHLOOP LABEL 07ADE 60D28000 3 2 REG 206 LD R3 R2 move to a working register 07ADF 60489F15 1 2 ZBM 207 LD R1 R2,UPCUNITS R1 -> local units of this process 07AE0 DC407AF1 208 CALLNP SWTCHUNITS swap units 07AE1 6088DF10 2 3 ZBM 209 LD R2 R3,UPCSONPTR check out the son process 07AE2 FAB27ADE 2 210 JNZA R2 SWITCHLOOP clean his units 211 * \ / 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1714 (FREQUNIT) F 104 FREQ - Switch Resources Associated with 2 Units 212 00007AE3 213 BROLOOP LABEL 07AE3 6088DF16 2 3 ZBM 214 LD R2 R3,UPCBROPTR R2 -> brother process 07AE4 FAB27ADE 2 215 JNZA R2 SWITCHLOOP go clean his kids 07AE5 60C8DF17 3 3 ZBM 216 LD R3 R3,UPCDADPTR point to out father 07AE6 FAF27AE3 3 217 JNZA R3 BROLOOP clean out his brothers 218 * \ / 219 220 * All local and global units have been swapped. A few FCB fields 221 * need to be swapped, then we will be done. 222 * First swap the busy count... 07AE7 60090080 0 4 ZBM 223 LD R0 R4,FCBUSYCNT get the busy count from this FCB 07AE8 E0094080 0 5 ZBM 224 EXCH R0 FCB,FCBUSYCNT swap it with this one 07AE9 E4090080 0 4 ZBM 225 ST R0 R4,FCBUSYCNT give us the others 226 227 * ...then the absolute I/O flag... 07AEA 60092015 0 4 ZBM 228 LD R0 R4,FCABSIO get the absolute i/o flag from this FCB 07AEB E0096015 0 5 ZBM 229 EXCH R0 FCB,FCABSIO swap it with this one 07AEC E4092015 0 4 ZBM 230 ST R0 R4,FCABSIO give us the others 231 232 * ...and finish up with the control mode unit flag. 07AED 60093A15 0 4 ZBM 233 LD R0 R4,FCCMUNIT get the cm unit flag from this FCB 07AEE E0097A15 0 5 ZBM 234 EXCH R0 FCB,FCCMUNIT swap it with this one 07AEF E4093A15 0 4 ZBM 235 ST R0 R4,FCCMUNIT give us the others 07AF0 FE0E59D6 236 JMP NOERROR 237 * --- 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1715 (FREQUNIT) F 104 FREQ - Switch Resources Associated with 2 Units 239 240 ********************************************************************************** 241 * * 242 * SWTCHUNITS. This subroutine swoops down the given UCE * 243 * list and swaps occurrences of the given FCB addresses. * 244 * * 245 * Call: * 246 * R1 -> list of UCEs * 247 * R4 -> FCB * 248 * R5 -> FCB * 249 * CALLNP SWTCHUNITS * 250 * * 251 * Eats R1. * 252 * Stack used = 1 * 253 * * 254 ********************************************************************************** 255 256 BLOCK SWTCHUNITS subroutine 257 258 ENTRY SWTCHUNITS 259 260 BEGFRAME 261 ENDFRAME 262 07AF1 DD5F8001 6 STAK 263 SWTCHUNITS ENTRNP PUSH 07AF2 FA707AF8 1 264 JZA R1 NOSWTCH jump if nothing to swap 00007AF3 265 UCESWTCHLP LABEL 07AF3 65085F11 4 1 ZBM 266 CPR R4 R1,UCEFCB is this one of our units? 07AF4 FE027AF9 267 JEQ MATCH1 first one matched 07AF5 65485F11 5 1 ZBM 268 CPR FCB R1,UCEFCB check for the other unit 07AF6 FE027AFB 269 JEQ MATCH2 jump for a match 270 * \ / 271 00007AF7 272 TRYNEXT LABEL 07AF7 FA767AF3 1 273 LJNA R1 UCESWTCHLP do the whole list 274 * \ / 275 00007AF8 276 NOSWTCH LABEL 07AF8 5D1F8001 6 STAK 277 LEAVE POP 278 * --- 279 00007AF9 280 MATCH1 LABEL 07AF9 E5485F11 5 1 ZBM 281 ST FCB R1,UCEFCB put in this FCB address 07AFA FE0E7AF7 282 JMP TRYNEXT keep going 283 * --- 284 00007AFB 285 MATCH2 LABEL 07AFB E5085F11 4 1 ZBM 286 ST R4 R1,UCEFCB put in this FCB address 07AFC FE0E7AF7 287 JMP TRYNEXT keep going 288 * --- 289 290 END of SWTCHUNITS subroutine 291 292 END of FRSWTCH request 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1716 (FREQUNIT) F 104 FREQ - Open Both Ends of a PATH 295 296 ********************************************************************************** 297 * * 298 * FREQMKPATH - Open Both Ends of a PATH * 299 * * 300 * This FREQ returns two units describing the same * 301 * path. One of them is useable for reading and the * 302 * other is useable for writing. * 303 * * 304 * R4 -> Caller's Console Area * 305 * R4,CAR1 = unit number for reading * 306 * R3 = unit number for writing * 307 * FCB -> FCB for unit R3 (0 if none) * 308 * R2 = sub-op code (must be zero) * 309 * JMP FREQMKPATH * 310 * * 311 * Stack required = 9 * 312 * 4 + max ( CREATEUCE (2), GETFSEQN (1), GETVGNFCB (2), * 313 * LINKFCBIN (1), LINKUCEIN (3), LUNSEARCH (2), * 314 * PLACEPTHE (5), PRIV2MOD (2), USEULB (4) ) * 315 * * 316 * Exits via XREQRETURN. * 317 * * 318 ********************************************************************************** 319 320 BLOCK FREQMKPATH routine 321 ENTRY FREQMKPATH 322 323 BEGFRAME2 00178800 6 BASE 324 READUNIT BSS 1 unit number for reading path 00178801 6 BASE 325 WRITEUNIT BSS 1 unit number for writing path 00178802 6 BASE 326 READFCB BSS 1 address of FCB for reading path 00178803 6 BASE 327 WRITEFCB BSS 1 address of FCB for writing path 328 ENDFRAME 329 07AFD EC1F8004 6 STAK 330 FREQMKPATH STZ PUSH 07AFE FA8C59D8 2 331 JNEZ R2 UERRORILR jump if illegal request 07AFF E4D78801 3 6 BASE 332 ST R3 SP,WRITEUNIT save write unit number 07B00 FB7259C0 5 333 JNZA FCB FERRORLAE jump if already equipped 07B01 60D70803 3 4 BASE 334 LD R3 R4,CAR1 R3 = read unit number 07B02 E4D78800 3 6 BASE 335 ST R3 SP,READUNIT save it 07B03 DC405B39 336 CALLNP LUNSEARCH find its FCB 07B04 FB7259C0 5 337 JNZA FCB FERRORLAE jump if already equipped 07B05 FACA59DA 3 338 JLEZ R3 UERRORPOB jump if unit number too small 07B06 64D78801 3 6 BASE 339 CPR R3 SP,WRITEUNIT making two of the same unit? 07B07 FE0259DA 340 JEQ UERRORPOB if so, he cannot do it 07B08 64C400FF 3 IMM 341 CPR R3 MAXUNIT 07B09 FE0459DA 342 JGT UERRORPOB jump if unit number too big 07B0A 60978801 2 6 BASE 343 LD R2 SP,WRITEUNIT R2 = write unit number 07B0B FA8A59DA 2 344 JLEZ R2 UERRORPOB jump if unit number too small 07B0C 648400FF 2 IMM 345 CPR R2 MAXUNIT 07B0D FE0459DA 346 JGT UERRORPOB jump if unit number too big 07B0E 61000414 4 347 LD R4 CPCUPC R4 -> our UPC 07B0F 5C090610 4 ZBM 348 CMZ R4,UPCNTLMODE are we control mode? 07B10 FE0C7B15 349 JNE UNITSOK jump if so, no furthur checks needed 07B11 64C400C9 3 IMM 350 CPR R3 LUNCMLOW is this unit legal for not CM? 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1717 (FREQUNIT) F 104 FREQ - Open Both Ends of a PATH 07B12 FE0659DA 351 JGE UERRORPOB error if not 07B13 648400C9 2 IMM 352 CPR R2 LUNCMLOW is this one legal, too? 07B14 FE0659DA 353 JGE UERRORPOB error if not 354 * \ / 355 00007B15 356 UNITSOK LABEL 07B15 DC005BF2 357 CALL PRIV2MOD may paths be created 07B16 41440000 IMM 358 PARV 0 indicate file not opened for the spooler 07B17 60000412 0 359 LD R0 CPPSA current process status area 07B18 40480044 0 ZBM 360 PARVL R0,PSDDIRPRIV 07B19 FE0E59F4 361 JMP UERRORPNS jump if not 362 07B1A DC405D88 363 CALLNP GETVGNFCB get reading FCB 07B1B FE0E5988 364 JMP UERROR insufficient system resources 07B1C E5578802 5 6 BASE 365 ST FCB SP,READFCB save pointer to FCB 07B1D DC405D88 366 CALLNP GETVGNFCB get writing FCB 07B1E FE0E5988 367 JMP UERROR insufficient system resources 07B1F E5578803 5 6 BASE 368 ST FCB SP,WRITEFCB save pointer to FCB 369 07B20 61000412 4 370 LD R4 CPPSA R4 -> our PSA 07B21 61091F14 4 4 ZBM 371 LD ULB R4,PSDFLTDIR R4 -> default ULB 07B22 DC405569 372 CALLNP USEULB count reader FCB use 07B23 DC405569 373 CALLNP USEULB count writer FCB use 07B24 60D78802 3 6 BASE 374 LD R3 SP,READFCB R3 -> reader, FCB -> writer 07B25 E508D114 4 3 ZBM 375 ST ULB R3,FCLIMITPTR 07B26 E5095114 4 5 ZBM 376 ST ULB FCB,FCLIMITPTR set ULB pointer 377 * R3 <= FCB of reader, FCB <= FCB of writer 07B27 60000412 0 378 LD R0 CPPSA current process status area 07B28 60080044 0 0 ZBM 379 LD R0 R0,PSDDIRPRIV priv from alias acct. 07B29 E408CE45 0 3 ZBM 380 ST R0 R3,FCPRIV set priv in reader FCB 07B2A E4094E45 0 5 ZBM 381 ST R0 FCB,FCPRIV set priv in writer FCB 382 07B2B 60170801 0 4 BASE 383 LD R0 ULB,ULBLOCK 07B2C E416C801 0 3 BASE 384 ST R0 R3,FCBLOCK 07B2D E4174801 0 5 BASE 385 ST R0 FCB,FCBLOCK set volume number 07B2E 60040004 0 IMM 386 LD R0 HTYPEPATH 07B2F E408E665 0 3 ZBM 387 ST R0 R3,FCHTYPE 07B30 E4096665 0 5 ZBM 388 ST R0 FCB,FCHTYPE set hardware type 389 07B31 EDC8D835 3 ZBM 390 STW R3,FCACCESS set reader's access 07B32 EC095835 5 ZBM 391 STZ FCB,FCACCESS set writer's access 392 07B33 DC404555 393 CALLNP GETFSEQN 07B34 E616C809 013 BASE 394 ST2 R0 R3,FCSERIAL 07B35 E6174809 015 BASE 395 ST2 R0 FCB,FCSERIAL set file serial number 396 07B36 EDC8CC15 3 ZBM 397 STW R3,FCLOADPT 07B37 EDC94C15 5 ZBM 398 STW FCB,FCLOADPT set load point 399 07B38 6112C000 4 3 REG 400 LD R4 R3 R4 -> reader, FCB -> writer 07B39 DC40642D 401 CALLNP PLACEPTHE create path element for writer 07B3A E4C95F16 3 5 ZBM 402 ST R3 FCB,FCDCBPTR set pointer to it 07B3B E1134000 4 5 REG 403 EXCH R4 FCB R4 -> writer, FCB -> reader 07B3C DC40642D 404 CALLNP PLACEPTHE create path element for reader 07B3D E4C95F16 3 5 ZBM 405 ST R3 FCB,FCDCBPTR set pointer to it 07B3E E1134000 4 5 REG 406 EXCH R4 FCB R4 -> reader, FCB -> writer 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1718 (FREQUNIT) F 104 FREQ - Open Both Ends of a PATH 407 07B3F EDC90080 4 ZBM 408 STW R4,FCBUSYCNT say one user of this FCB 07B40 EDC94080 5 ZBM 409 STW FCB,FCBUSYCNT and this one 07B41 DC005DA8 410 CALL LINKFCBIN add reader to list 07B42 40530000 4 REG 411 PARVL R4 pass FCB address 07B43 DC005DA8 412 CALL LINKFCBIN add writer to list 07B44 40534000 5 REG 413 PARVL FCB pass FCB address 414 07B45 60D38000 3 6 REG 415 LD R3 SP copy stack pointer 07B46 DC003635 416 CALL CREATEUCE make a UCE for the writer 07B47 4156C801 3 BASE 417 PARV R3,WRITEUNIT unit number 07B48 4056C803 3 BASE 418 PARVL R3,WRITEFCB file control block 07B49 DC005DB2 419 CALL LINKUCEIN add this to a list 07B4A 41520000 0 REG 420 PARV R0 UCE address goes on 07B4B 41400414 421 PARV CPCUPC current underprocess or 07B4C 40400412 422 PARVL CPPSA current process 07B4D DC003635 423 CALL CREATEUCE make a UCE for the reader 07B4E 4156C800 3 BASE 424 PARV R3,READUNIT unit number 07B4F 4056C802 3 BASE 425 PARVL R3,READFCB file control block 07B50 DC005DB2 426 CALL LINKUCEIN add this to a list 07B51 41520000 0 REG 427 PARV R0 UCE address goes on 07B52 41400414 428 PARV CPCUPC current underprocess or 07B53 40400412 429 PARVL CPPSA current process 07B54 FE0E5982 430 JMP FNOERROR and all done! 431 * --- 432 433 END FREQMKPATH routine 164 INPUT FREQLPVVFU line printer virtual vertical forms unit 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1719 (FREQLPVVFU) F 105 FREQ - Control Line Printer VVFU 3 4 ********************************************************************************** 5 * * 6 * These FREQ's manipulate the line printer's virtual vertical * 7 * forms unit (carriage tape simulator). FRSETVVFU will load and * 8 * enable the VVFU. FRCLRVVFU will disable the VVFU. * 9 * * 10 * The VVFU consists of two characters (16 bits) for each line * 11 * of the virtual carriage tape. Bits 0:11 of each two-character * 12 * group correspond with channels 1:12 of the carriage tape. Bits * 13 * 12:15 of each two-character group are ignored. The line printer * 14 * controller requires that the first line of the VVFU have a one * 15 * in channel 1 (bit 0), and that all other lines have a zero in * 16 * channel 1. * 17 * * 18 * User calls: * 19 * LD R0 FRSETVVFU * 20 * LD R1 buffer size ( = 2 * number of lines ) * 21 * LD R2 address of VVFU data * 22 * FREQ unit number of line printer * 23 * - or - * 24 * LD R0 FRCLRVVFU * 25 * FREQ unit number of line printer * 26 * * 27 * We get here via: * 28 * LD R5 => FCB (if any) * 29 * LD R4 => caller's console area * 30 * LD R3 unit number * 31 * LD R2 sub-operation code (0 for SET, 1 for CLR) * 32 * JMP FREQVVFU * 33 * * 34 * Stack required = 11 * 35 * 0 + max (CLRMEMTRAP (1), LOCKWAIT (0), LPCSTART (11), * 36 * SETMEMTRAP (1), SUSPENDFRQ(1), SUSPENDME (0) ) * 37 * * 38 ********************************************************************************** 39 40 BLOCK FREQVVFU routine 41 ENTRY FREQVVFU 42 00007B55 43 FREQVVFU LABEL 07B55 68840001 2 IMM 44 UCPR R2 1 largest legal sub-op code 07B56 FE0459D8 45 JGT UERRORILR jump if illegal request 07B57 E48BC010 2 7 CBM 46 ST R2 R7/BIT 0 save flag for sub-op code 07B58 FB7059B8 5 47 JZA FCB FERRORLNE3 jump if unit not opened 07B59 60096665 0 5 ZBM 48 LD R0 FCB,FCHTYPE get device type 07B5A 6404000B 0 IMM 49 CPR R0 HTYPELP is this a line printer? 07B5B FE0C59A5 50 JNE FERRORILOP error if not 07B5C 60C95F16 3 5 ZBM 51 LD LPC FCB,FCDCBPTR get pointer to LPC element 52 PLOCK (LPC,LPCELOCK) lock the controller 07B5D 0CC00000 52 IOFF 07B5E D1D6C805 3 BASE 52 SETT (LPC,LPCELOCK) 07B5F FE0C7B61 52 JNE MA(2+DISPW MA 0) 07B60 DC40308B 52 CALLNP LOCKWAIT 53 * \ / 54 * Wait for any lines that were previously placed in the 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1720 (FREQLPVVFU) F 105 FREQ - Control Line Printer VVFU 55 * LP buffer to be written out. 56 * \ / 07B61 6116C806 4 3 BASE 57 LD R4 LPC,LPCBUFPTR R4 -> line printer buffer block 07B62 5C170801 4 BASE 58 CMZ R4,LPBLINECNT any lines in the buffer? 07B63 FE027B6F 59 JEQ NOLINES jump if empty 60 SETTBIT LPC,LPCWAITING else say we are waiting 07B64 60022000 0 IMM 60 LD R0 1*BIT(((LPC,LPCWAITING) DISP (LPC,0))/BITS 0:4) 07B65 FC16C807 0 3 BASE 60 IORM R0 LPC,(((LPC,LPCWAITING) DISP (LPC,0))/BITS 15:31) 07B66 DC003541 61 CALL SUSPENDFRQ and suspend us 07B67 4152C000 3 REG 62 PARV LPC queue parameter 07B68 41001DAC 63 PAR SQDIOWAIT queue header 07B69 4016C805 3 BASE 64 PARL LPC,LPCELOCK lock to release 65 * \ / return if can't suspend 66 CLRTBIT LPC,LPCWAITING say we're not really waiting 07B6A 60022000 0 IMM 66 LD R0 1*BIT(((LPC,LPCWAITING) DISP (LPC,0))/BITS 0:4) 07B6B A816C807 0 3 BASE 66 BRSBM R0 LPC,(((LPC,LPCWAITING) DISP (LPC,0))/BITS 15:31) 67 PUNLOCK (LPC,LPCELOCK) unlock the printer 07B6C EC16C805 3 BASE 67 STZ (LPC,LPCELOCK) 07B6D 0C800000 67 ION 07B6E FE0E59D4 68 JMP FERRORSUSP and say we couldn't suspend 69 * --- 70 00007B6F 71 NOLINES LABEL 72 CLRTBIT LPC,LPCVVFUON say VVFU should be disabled 07B6F 60020080 0 IMM 72 LD R0 1*BIT(((LPC,LPCVVFUON) DISP (LPC,0))/BITS 0:4) 07B70 A816C807 0 3 BASE 72 BRSBM R0 LPC,(((LPC,LPCVVFUON) DISP (LPC,0))/BITS 15:31) 07B71 DC404D8B 73 CALLNP LPCSTART call driver so he does it 74 PUNLOCK (LPC,LPCELOCK) unlock the controller 07B72 EC16C805 3 BASE 74 STZ (LPC,LPCELOCK) 07B73 0C800000 74 ION 07B74 F7C05982 7 75 JBT R7/BIT 0 FNOERROR done if this was a disable request 76 * \ / 77 * This was a set VVFU request. Copy the buffer into 78 * the LPC element. 79 * \ / 07B75 DC005BCF 80 CALL SETMEMTRAP 07B76 40005B5F 81 PARL PASSERRUP trap errors and pass 'em up 82 07B77 61000412 4 83 LD R4 CPPSA 07B78 61091F11 4 4 ZBM 84 LD R4 R4,PSCACHNP1 R4 -> caller's CA 07B79 60570803 1 4 BASE 85 LD R1 R4,CAR1 R1 = number of characters 07B7A 684400B4 1 IMM 86 UCPR R1 2*LPCVVFUMAX check for max length 07B7B FE0459B0 87 JGT FERRORPOB error if too big 07B7C FA4259B0 1 88 JEQZ R1 FERRORPOB error if too small 07B7D F67E59B0 1 89 JBT R1/BIT 31 FERRORPOB error if odd number 07B7E 600A41F0 0 1 CBM 90 LD R0 R1/BITS 0:30 number of lines in buffer 07B7F E416C809 0 3 BASE 91 ST R0 LPC,LPCVVFULNS save it 07B80 60170804 0 4 BASE 92 LD R0 R4,CAR2 where to move data from 07B81 60840040 2 IMM 93 LD R2 MSRFRELOC 07B82 28970801 2 4 BASE 94 BSUB R2 R4,CAMSR bit to clear in MSR before move 07B83 59928000 2 REG 95 CLBMSR R2 (see ?) 07B84 3896C80A 2 3 BASE 96 LEA R2 LPC,LPCVVFUDAT r2 -> where to put data 07B85 FE400000 97 CMOVE copy the data 07B86 59C40040 IMM 98 IORMSR MSRFRELOC restore our MSR fetch bit 07B87 DC405BD4 99 CALLNP CLRMEMTRAP and clear the user memory trap 100 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1721 (FREQLPVVFU) F 105 FREQ - Control Line Printer VVFU 101 PLOCK (LPC,LPCELOCK) lock the controller again 07B88 0CC00000 101 IOFF 07B89 D1D6C805 3 BASE 101 SETT (LPC,LPCELOCK) 07B8A FE0C7B8C 101 JNE MA(2+DISPW MA 0) 07B8B DC40308B 101 CALLNP LOCKWAIT 102 SETTBIT LPC,LPCVVFUON say VVFU should be enabled 07B8C 60020080 0 IMM 102 LD R0 1*BIT(((LPC,LPCVVFUON) DISP (LPC,0))/BITS 0:4) 07B8D FC16C807 0 3 BASE 102 IORM R0 LPC,(((LPC,LPCVVFUON) DISP (LPC,0))/BITS 15:31) 07B8E DC404D8B 103 CALLNP LPCSTART call driver so he does it 104 * \ / 105 00007B8F 106 WAITLOOP LABEL 07B8F 5C08D017 3 ZBM 107 CMZ LPC,LPCLDVVFU is loading in progress? 07B90 FE027B9D 108 JEQ VVFULOADED jump if not 109 SETTBIT LPC,LPCWAITING else say we are waiting for it 07B91 60022000 0 IMM 109 LD R0 1*BIT(((LPC,LPCWAITING) DISP (LPC,0))/BITS 0:4) 07B92 FC16C807 0 3 BASE 109 IORM R0 LPC,(((LPC,LPCWAITING) DISP (LPC,0))/BITS 15:31) 07B93 DC00351C 110 CALL SUSPENDME and suspend 07B94 41007B98 111 PAR RELOCK where to restart 07B95 4152C000 3 REG 112 PARV LPC queue parameter 07B96 41001DAC 113 PAR SQDIOWAIT queue header 07B97 4016C805 3 BASE 114 PARL LPC,LPCELOCK lock to release 115 * --- 116 00007B98 117 RELOCK LABEL 118 PLOCK (LPC,LPCELOCK) get the lock again 07B98 0CC00000 118 IOFF 07B99 D1D6C805 3 BASE 118 SETT (LPC,LPCELOCK) 07B9A FE0C7B9C 118 JNE MA(2+DISPW MA 0) 07B9B DC40308B 118 CALLNP LOCKWAIT 07B9C FE0E7B8F 119 JMP WAITLOOP and try again 120 * --- 121 122 * Here, the VVFU is no longer being loaded. If it is enabled, 123 * then we have succeeded. Otherwise, there must be something 124 * wrong with the data supplied by the user, and we give him 125 * an error message. 126 00007B9D 127 VVFULOADED LABEL 07B9D 5C08D217 3 ZBM 128 CMZ LPC,LPCVVFUON is the VVFU enabled? 129 PUNLOCK (LPC,LPCELOCK) (unlock the controller) 07B9E EC16C805 3 BASE 129 STZ (LPC,LPCELOCK) 07B9F 0C800000 129 ION 07BA0 FE0259B0 130 JEQ FERRORPOB error if VVFU not enabled 07BA1 FE0E5982 131 JMP FNOERROR else all done 132 * --- 133 134 END FREQVVFU routine 165 INPUT FRQLIMGET supplies lun limits 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1722 (FRQLIMGET) F 106 FREQ - Get Lun limiting limits 3 4 ********************************************************************************** 5 * * 6 * These requests fetch the mass storage limits for the * 7 * specified unit. * 8 * Request has the form: * 9 * LD R0 request * 10 * FREQ unit * 11 * JLTZ R0 request error * 12 * ST R0 unit's dynamic status * 13 * ST R1 unit's account's hard limit or used * 14 * ST R2 unit's account's soft limit * 15 * ST R3 unit's account's saved limit * 16 * * 17 * Stack required = 1 * 18 * 0 + max ( FLGUSED (1) ) * 19 * * 20 ********************************************************************************** 21 22 BLOCK FREQLIMGET routine 23 ENTRY FREQLIMGET request for limits 24 00007BA2 25 FREQLIMGET LABEL 07BA2 64840002 2 IMM 26 CPR R2 TABLEMAX request in range? 07BA3 FE0659D8 27 JGE UERRORILR 07BA4 FB7059B8 5 28 JZA FCB FERRORLNE3 unit must be opened 07BA5 60096665 0 5 ZBM 29 LD R0 FCB,FCHTYPE get unit type 07BA6 5C307BB4 0 @ 30 CMZ @LEGALTAB(R0) is this request legal for device? 07BA7 FE0259A5 31 JEQ FERRORILOP jump if not 07BA8 60C95114 3 5 ZBM 32 LD R3 FCB,FCLIMITPTR R3=>file's limits 07BA9 FAF059A5 3 33 JZA R3 FERRORILOP 07BAA 5D647BB1 2 34 XCT TABLE1(R2) get limit or used 07BAB E4170803 0 4 BASE 35 ST R0 R4,CAR1 user's R1 := limit or used 07BAC 6008F18C 0 3 ZBM 36 LD R0 R3,ULDSKWARN 07BAD E4170804 0 4 BASE 37 ST R0 R4,CAR2 user's R2 := soft limit 07BAE 6008C18C 0 3 ZBM 38 LD R0 R3,ULDSKSAVL 07BAF E4170805 0 4 BASE 39 ST R0 R4,CAR3 user's R3 := saved limit 07BB0 FE0E5982 40 JMP FNOERROR 41 * --- 42 00007BB1 43 TABLE1 LABEL 07BB1 6008E18D 0 3 ZBM 44 LD R0 R3,ULDSKLIM 07BB2 DC407BB5 45 CALLNP FLGUSED total up space used 00000002 ABS 46 TABLEMAX EQU DISPW TABLE1 47 48 70000000 ABS 49 IBITS1 EQU 1*BIT HTYPESAF+1*BIT HTYPERAF+1*BIT HTYPECODE 00600000 ABS 50 IBITS2 EQU 1*BIT HTYPETASK+1*BIT HTYPECDR 51 07BB3 70600000 52 LTABACCT VFD IBITS1+IBITS2 07BB4 00487BB3 53 LEGALTAB PTR LTABACCT/BIT 0 54 END FREQLIMGET routine 55 * --- 56 57 * Stack required = 1 58 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1723 (FRQLIMGET) F 106 FREQ - Get Lun limiting limits 59 BLOCK FLGUSED routine 60 61 ENTRY FLGUSED 62 07BB5 DD5F8001 6 STAK 63 FLGUSED ENTRNP STAK SP,1 07BB6 6008D18E 0 3 ZBM 64 LD R0 R3,ULDSKUSD get the total saved space 07BB7 1816C80F 0 3 BASE 65 ADD R0 R3,ULSCRDSK and add the total scratch 07BB8 5D1F8001 6 STAK 66 LEAVE STAK SP,1 67 * --- 68 69 END FLGUSED routine 166 INPUT FRQCHAIN chain routine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1724 (FRQCHAIN) F 107 FREQ - CHAIN to another program 3 4 BLOCK Program Setup FREQs 5 ENTRY FREQCHAIN 6 7 ********************************************************************************** 8 * * 9 * This FREQ controls the creation of other programs to * 10 * run. Some will destroy the current program and run another * 11 * while some will just create programs to run "underneath" * 12 * the current program or to run concurrently. * 13 * * 14 * Stack required = 18 * 15 * 0 + max ( FREQCHN (1), FREQCONCP (18), FREQCREATP (8) ) * 16 * FREQINSP (8), FREQSETUPP (8) ) * 17 * * 18 ********************************************************************************** 19 20 BLOCK FREQCHAIN routine 21 ENTRY FREQCHAIN 22 00007BB9 23 FREQCHAIN LABEL 07BB9 64840005 2 IMM 24 CPR R2 FRCHNMAX is the request in bounds? 07BBA FE0659D8 25 JGE UERRORILR if not then illegal request 07BBB FB7059B8 5 26 JZA FCB FERRORLNE3 error if lun not equipped 07BBC 60095835 0 5 ZBM 27 LD R0 FCB,FCACCESS 07BBD F23E59CE 0 28 JBF R0/FSACSNWB FERRORWANA must not have write access 07BBE 64040007 0 IMM 29 CPR R0 FSACSNDA cannot use if no data access 07BBF FE0259AC 30 JEQ FERRORPFM 07BC0 60096665 0 5 ZBM 31 LD R0 FCB,FCHTYPE device type to R0 07BC1 5CA47BC2 2 32 LDPC FRCHNJMP(R2) to routine 33 * --- 34 00007BC2 35 FRCHNJMP LABEL 07BC2 00007BC7 36 VFD ADR FREQCHN "CHAIN" to new program 07BC3 00007BCF 37 VFD ADR FREQSETUPP FRSETUPP - set up an under program 07BC4 00007BF4 38 VFD ADR FREQINSP FRINSRTP - insert an under program 07BC5 000094CA 39 VFD ADR FREQCONCP FRCONCP - create a concurrent process 07BC6 00007BE0 40 VFD ADR FREQCREATP FRCREATP - create another under program 00000005 ABS 41 FRCHNMAX EQU DISPW FRCHNJMP 42 43 END FREQCHAIN routine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1725 (FRQCHAIN) F 107 FREQ - Chain to another program 46 47 ********************************************************************************** 48 * * 49 * This request passes control to the next higher level * 50 * requesting that the current program be destroyed and that * 51 * the program specified in the .CODE be run. If the lun is a * 52 * .SAF then it is a "command file". * 53 * Call: * 54 * LD R0 FRCHAIN * 55 * FREQ lun * 56 * JLTZ R0 request error * 57 * Stack required = 1. 0 + UERRSET(1) * 58 * * 59 ********************************************************************************** 60 61 BLOCK FREQCHN routine 62 ENTRY FREQCHN 63 00007BC7 64 FREQCHN LABEL 07BC7 64040003 0 IMM 65 CPR R0 HTYPECODE is the device a .CODE file? 07BC8 FE027BCB 66 JEQ FREQCHNOKL jump if an OK lun 07BC9 64040001 0 IMM 67 CPR R0 HTYPESAF is it a .SAF? 07BCA FE0C59A5 68 JNE FERRORILOP if not this is an illegal operation 69 * \ / 70 71 * request control mode to chain the program 72 * R2=request, FCB => file control block (set in interrupt processor) 00007BCB 73 FREQCHNOKL LABEL 07BCB 6084007B 2 IMM 74 LD R2 UINTCHAIN request for the chain 07BCC 60D34000 3 5 REG 75 LD R3 FCB subcode is the FCB address 07BCD DC403589 76 CALLNP UERRSET give an error that will go up 07BCE FE0E38DF 77 JMP XREQRTNX bypass the R0 storer 78 * --- 79 80 END FREQCHN routine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1726 (FRQCHAIN) F 107 FREQ - Setup an under program 83 84 ********************************************************************************** 85 * * 86 * This request sets up a program in an address space * 87 * below the current program. It only works on a .CODE. Note * 88 * that an underprocess may NOT already exists. * 89 * Call: * 90 * LD R0 FRSETUPP * 91 * FREQ lun * 92 * JLTZ R0 request error * 93 * * 94 * Eats R0:R5 * 95 * Stack required = 8 * 96 * 0 + max ( CREATEUPC (8) ) * 97 * * 98 ********************************************************************************** 99 100 BLOCK FREQSETUPP subroutine 101 ENTRY FREQSETUPP 102 ENTRY FREQSETSHR 103 00007BCF 104 FREQSETUPP LABEL 07BCF 64040003 0 IMM 105 CPR R0 HTYPECODE is it a .CODE? 07BD0 FE0C59A5 106 JNE FERRORILOP this only works on same 07BD1 60000414 0 107 LD R0 CPCUPC 07BD2 5C081F10 0 ZBM 108 CMZ R0,UPCSONPTR anything below us? 07BD3 FE0C59E2 109 JNE UERRORNSPP 110 * \ / 111 00007BD4 112 FREQSETSHR LABEL 07BD4 DC407C06 113 CALLNP CREATEUPC create and initialize the UPC block 07BD5 FA0C5983 0 114 JNEZ R0 FERROR R0 <= error code or 0 if no error 115 * R4 <= pointer to the UPC block 07BD6 60000414 0 116 LD R0 CPCUPC get the current UPC pointer 07BD7 60481F10 1 0 ZBM 117 LD R1 R0,UPCSONPTR get pointer to first underprocess 07BD8 E4491F10 1 4 ZBM 118 ST R1 R4,UPCSONPTR link existing list behind our element 07BD9 E4091F17 0 4 ZBM 119 ST R0 R4,UPCDADPTR say this one is our father 07BDA E5081F10 4 0 ZBM 120 ST R4 R0,UPCSONPTR and we are the new element in the list 121 * Give the user the serial number of the new process 07BDB 60091371 0 4 ZBM 122 LD R0 R4,UPCSERNM get the new UPC's serial number 07BDC 60400412 1 123 LD R1 CPPSA current process status area 07BDD 60485F11 1 1 ZBM 124 LD R1 R1,PSCACHNP1 pointer to the callers console area 07BDE E4164803 0 1 BASE 125 ST R0 R1,CAR1 give the serial number to the user 07BDF FE0E5982 126 JMP FNOERROR jump good return 127 * --- 128 129 END FREQSETUPP routine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1727 (FRQCHAIN) F 107 FREQ - Setup an under program 131 ********************************************************************************** 132 * * 133 * This request creates another under program in the * 134 * address space below the current program. This request only * 135 * works on .CODEs. Note that under process may already * 136 * exists when this request is called. * 137 * Call: * 138 * LD R0 FRCREATP * 139 * FREQ lun * 140 * JLTZ R0 request error * 141 * * 142 * Eats R0:R5 * 143 * Stack required = 8 * 144 * 0 + max ( CREATEUPC (8) ) * 145 * * 146 ********************************************************************************** 147 148 BLOCK FREQCREATP subroutine 149 ENTRY FREQCREATP 150 00007BE0 151 FREQCREATP LABEL 07BE0 64040003 0 IMM 152 CPR R0 HTYPECODE is it a .CODE? 07BE1 FE0C59A5 153 JNE FERRORILOP this only works on same 07BE2 60000414 0 154 LD R0 CPCUPC 07BE3 5C081F10 0 ZBM 155 CMZ R0,UPCSONPTR anything below us? 07BE4 FE027BD4 156 JEQ FREQSETSHR go create first under program 07BE5 DC407C06 157 CALLNP CREATEUPC create and initialize the UPC block 07BE6 FA0C5983 0 158 JNEZ R0 FERROR R0 <= error code or 0 if no error 159 * R4 <= pointer to the UPC block 07BE7 60000414 0 160 LD R0 CPCUPC get the current UPC pointer 07BE8 60481F10 1 0 ZBM 161 LD R1 R0,UPCSONPTR get pointer to first underprocess 162 * \ / 163 00007BE9 164 FNDLASTSON LABEL 07BE9 5C085F16 1 ZBM 165 CMZ R1,UPCBROPTR look for the last son 07BEA FE027BED 166 JEQ ENDFND found the end 07BEB 60485F16 1 1 ZBM 167 LD R1 R1,UPCBROPTR move along the list 07BEC FE0E7BE9 168 JMP FNDLASTSON check if this guy is the last 169 * --- 170 00007BED 171 ENDFND LABEL 07BED E4091F17 0 4 ZBM 172 ST R0 R4,UPCDADPTR indicate who our father process is 07BEE E5085F16 4 1 ZBM 173 ST R4 R1,UPCBROPTR link us on the end of the list 174 * Give the user the serial number of the new process 07BEF 60091371 0 4 ZBM 175 LD R0 R4,UPCSERNM get the new UPC's serial number 07BF0 60400412 1 176 LD R1 CPPSA current process status area 07BF1 60485F11 1 1 ZBM 177 LD R1 R1,PSCACHNP1 pointer to the callers console area 07BF2 E4164803 0 1 BASE 178 ST R0 R1,CAR1 give the serial number to the user 07BF3 FE0E5982 179 JMP FNOERROR jump good return 180 * --- 181 182 END FREQCREATP subroutine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1728 (FRQCHAIN) F 107 FREQ - Setup an under program 184 185 ********************************************************************************** 186 * * 187 * This request inserts an address space between the * 188 * current program and its immediate under program. It only * 189 * works on a .CODE. * 190 * Call: * 191 * LD R0 FRINSRTP * 192 * FREQ lun * 193 * JLTZ R0 request error * 194 * * 195 * Eats R0:R5 * 196 * Stack required = 8 * 197 * 0 + max ( CREATEUPC (8) ) * 198 * * 199 ********************************************************************************** 200 201 BLOCK FREQINSP routine 202 ENTRY FREQINSP 203 00007BF4 204 FREQINSP LABEL 07BF4 64040003 0 IMM 205 CPR R0 HTYPECODE check type of this entry 07BF5 FE0C59A5 206 JNE FERRORILOP only works on .CODE 07BF6 DC407C06 207 CALLNP CREATEUPC create and initialize the UPC block 07BF7 FA0C5983 0 208 JNEZ R0 FERROR if non-zero we have problems 209 * R4 <= pointer to the UPC block 07BF8 60000414 0 210 LD R0 CPCUPC get the current UPC pointer 07BF9 60481F10 1 0 ZBM 211 LD R1 R0,UPCSONPTR get pointer to first underprocess 07BFA E4491F10 1 4 ZBM 212 ST R1 R4,UPCSONPTR link existing list behind our element 07BFB E4091F17 0 4 ZBM 213 ST R0 R4,UPCDADPTR say this one is our father 07BFC E5081F10 4 0 ZBM 214 ST R4 R0,UPCSONPTR and we are the new element in the list 215 * \ / 216 00007BFD 217 FRINSBRO LABEL 07BFD FA707C01 1 218 JZA R1 NOUNDERP jump if no underprocess exists 07BFE E5085F17 4 1 ZBM 219 ST R4 R1,UPCDADPTR he now has a new father 07BFF 60485F16 1 1 ZBM 220 LD R1 R1,UPCBROPTR update any brothers also 07C00 FE0E7BFD 221 JMP FRINSBRO jump for more adjustment 222 * --- 223 00007C01 224 NOUNDERP LABEL 225 * Give the user the serial number of the new process 07C01 60091371 0 4 ZBM 226 LD R0 R4,UPCSERNM get the new UPC's serial number 07C02 60400412 1 227 LD R1 CPPSA current process status area 07C03 60485F11 1 1 ZBM 228 LD R1 R1,PSCACHNP1 pointer to the callers console area 07C04 E4164803 0 1 BASE 229 ST R0 R1,CAR1 give the serial number to the user 07C05 FE0E5982 230 JMP FNOERROR good return 231 * --- 232 233 END FREQINSP routine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1729 (FRQCHAIN) F 107 FREQ - Setup an under program 235 236 ********************************************************************************** 237 * * 238 * This routine creates and initializes a UPC block. * 239 * First a check is made to see if enough user memory is left, * 240 * there must be at least a page. It then proceeds by getting * 241 * the code control block (CCB) and creating a virtual memory * 242 * list corresponding to its pages. The proper privileges are * 243 * checked and bits set, a console area is created for the * 244 * program with the proper startup program counter, and the * 245 * default directory set up. This routine does not link in * 246 * the UPC. * 247 * Call: * 248 * R3 <= unit number code file opened to * 249 * FCB <= file control block for .CODE * 250 * CALLNP CREATEUPC * 251 * returns R0 <= error code or zero * 252 * R4 <= pointer to the newly created UPC * 253 * * 254 * Eats R0:R3 * 255 * Sets R4 <= newly created UPC * 256 * Stack required = 8 * 257 * 1 + max ( CREATEVP (2), GRUBWNDO1 (7), PRIVUPC (7), * 258 * QUICKUCE (3), SETWNDO1 (4), UPCLIMCHK (5), * 259 * UPCGETMEM (0), UGETMEM (0), ZEROIT (1) ) * 260 * * 261 ********************************************************************************** 262 263 BLOCK CREATEUPC routine 264 ENTRY CREATEUPC 265 266 BEGFRAME 267 ENDFRAME 268 07C06 DD5F8001 6 STAK 269 CREATEUPC ENTRNP PUSH 07C07 DC007C9D 270 CALL UPCLIMCHK check if enough resources exists 07C08 4052C000 3 REG 271 PARVL R3 pass the unit number 07C09 FA0C7C57 0 272 JNEZ R0 CUPCEXIT jump if error code in R0 273 * \ / 07C0A EDC95C16 5 ZBM 274 STW FCB,FCRESEEK say that I've destroyed the data block pointer 07C0B 60097182 0 5 ZBM 275 LD R0 FCB,FCLPBLK get the head block number 07C0C E4095181 0 5 ZBM 276 ST R0 FCB,FCMSBLK combine with volume number 07C0D DC003205 277 CALL SETWNDO1 map in the code control block (CCB) 07C0E 41440001 IMM 278 PARV VPCNTLRO indicate access (read only) 07C0F 41534000 5 REG 279 PARV FCB indicate which FCB associated with block 07C10 41007C58 280 PAR CUPCFAU error address 07C11 41574801 5 BASE 281 PARV FCB,FCBLOCK indicate where it is 07C12 40440013 IMM 282 PARVL FBITCCB indicate type of block we expect 07C13 5C000800 283 CMZ WNDO1 fetch in the block ( to force occurance 284 * of MS error before we're tied up in knots ) 07C14 DC002F0A 285 CALL UPCGETMEM get a program control block 07C15 40440005 IMM 286 PARVL UPCLOG indicate its length 07C16 60D20000 3 0 REG 287 LD R3 R0 copy the pointer 07C17 DC003090 288 CALL ZEROIT call to clear the UPC 07C18 41160800 0 BASE 289 PAR R0,0 indicate where it is 07C19 40440020 IMM 290 PARVL 2 POWER UPCLOG and how much to clear 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1730 (FRQCHAIN) F 107 FREQ - Setup an under program 07C1A EDC8D011 3 ZBM 291 STW R3,UPCNETINTE enable console terminal interrupts 07C1B EC16C80C 3 BASE 292 STZ R3,UPCINTTIME indicate no time interrupt 293 * \ / 294 00007C1C 295 PSNZERO LABEL 07C1C BC001D12 0 296 INCL R0 PROCSERNM get a new process serial number 07C1D 5C0A1370 0 CBM 297 CMZ R0/UPCSRLFLD cann't allow process serial numbers of zero 07C1E FE027C1C 298 JEQ PSNZERO jump back to try again 07C1F E408D371 0 3 ZBM 299 ST R0 R3,UPCSERNM and brand this UPC 07C20 DC002ED0 300 CALL UGETMEM get a console area 07C21 40440004 IMM 301 PARVL CALOG indicate its length 07C22 61120000 4 0 REG 302 LD R4 R0 move the pointer to this register 07C23 E508DF12 4 3 ZBM 303 ST R4 R3,UPCCONSOLE save CA address in UPC 07C24 DC003090 304 CALL ZEROIT zero all of the registers ( and stuff ) 07C25 41160800 0 BASE 305 PAR R0,0 say where block starts 07C26 40440010 IMM 306 PARVL 2 POWER CALOG indicate how many words 07C27 60040BF0 0 IMM 307 LD R0 ADR WNDO1/CCBINFO/CCBPREGS 07C28 60440030 1 IMM 308 LD R1 CANUMREGS*CPW get size for move 07C29 60930000 2 4 REG 309 LD R2 R4 get address of CA 07C2A FE400000 310 CMOVE 07C2B 6004F000 0 IMM 311 LD R0 USERMSR get the proper MSR value 07C2C E4170801 0 4 BASE 312 ST R0 R4,CAMSR and set into CA 07C2D DC407C5B 313 CALLNP PRIVUPC give privileges to the UPC 07C2E 60095835 0 5 ZBM 314 LD R0 FCB,FCACCESS check users access to this file 07C2F 64040003 0 IMM 315 CPR R0 FSACSXO is the program execute only? 07C30 EC48C810 3 ZBM 316 STLEQ R3,UPEXECUTO if so, flag as such 07C31 E548DF14 5 3 ZBM 317 ST FCB R3,UPCRUNFCB and set FCB as run unit 07C32 D0094080 5 ZBM 318 INC FCB,FCBUSYCNT say one more user d'run unit 07C33 6217480B 015 BASE 319 LD2 R0 FCB,FCNAME get the program name 07C34 E616C809 013 BASE 320 ST2 R0 R3,UPCPROCNM remember the current program 321 * \ / 322 323 ********************************************************************************** 324 * * 325 * This next section creates units 1, 2, and 3 for the new * 326 * underprocess. They are equivalenced to the units of those * 327 * numbers in the current process. If one of these units does * 328 * not exist in the current process no corresponding unit is * 329 * opened in the underprocess. The FCB use counts are adjusted * 330 * as necessary. * 331 * * 332 ********************************************************************************** 333 334 * \ / 07C35 61000414 4 335 LD R4 CPCUPC get repository for local units 07C36 60840000 2 IMM 336 LD R2 0 make this UCE the last 07C37 60040003 0 IMM 337 LD R0 LUNSERR number for error output 07C38 60491F15 1 4 ZBM 338 LD R1 R4,UPCUNITS get local list 07C39 DC407CBF 339 CALLNP QUICKUCE create UCE, R2 => new UCE 340 * \ / 341 07C3A 60040002 0 IMM 342 LD R0 LUNSOUT number for standard output 07C3B 60491F15 1 4 ZBM 343 LD R1 R4,UPCUNITS get back head of list 07C3C DC407CBF 344 CALLNP QUICKUCE create UCE, R2 => new UCE 345 * \ / 346 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1731 (FRQCHAIN) F 107 FREQ - Setup an under program 07C3D 60040001 0 IMM 347 LD R0 LUNSIN number for standard input 07C3E 60491F15 1 4 ZBM 348 LD R1 R4,UPCUNITS get back list head 07C3F DC407CBF 349 CALLNP QUICKUCE create UCE, R2 => new UCE 07C40 E488DF15 2 3 ZBM 350 ST R2 R3,UPCUNITS give complete list to new UPC 351 * \ / 352 353 ********************************************************************************** 354 * * 355 * Now pass through the CCB and create the users virtual * 356 * memory. * 357 * * 358 ********************************************************************************** 359 360 * \ / 07C41 6104007F 4 IMM 361 LD R4 NPS-1 number of pages in each state 00007C42 362 TRYNXTPG LABEL 07C42 60280800 0 4 363 LD R0 WNDO1(R4) get page pointer 07C43 FA027C53 0 364 JEQZ R0 NOTTHISPG jump if no page specified 07C44 EDC95C16 5 ZBM 365 STW FCB,FCRESEEK resident pointers need fixing 07C45 E4095181 0 5 ZBM 366 ST R0 FCB,FCMSBLK combine with volume number 07C46 DC0030C9 367 CALL CREATEVP create a virtual page element 07C47 41530000 4 REG 368 PARV R4 indicate the virtual page number 07C48 41574801 5 BASE 369 PARV FCB,FCBLOCK the MS address 07C49 41440014 IMM 370 PARV FBITCODED expecting code data page 07C4A 41534000 5 REG 371 PARV FCB the FCB controlling these pages 07C4B 60840005 2 IMM 372 LD R2 VPCNTLRO+VPCNTLOC bits for read only and own copy 07C4C 60280800 0 4 373 LD R0 WNDO1(R4) get the page pointer back 07C4D F2007C4F 0 374 JBF R0/CCBPROTECT NOPROTECT jump if user may have altered copy 07C4E 60840001 2 IMM 375 LD R2 VPCNTLRO indicate page is read only, damnit! 376 * \ / 377 00007C4F 378 NOPROTECT LABEL 07C4F 40528000 2 REG 379 PARVL R2 pass the VPCNTL field 07C50 6016C80D 0 3 BASE 380 LD R0 R3,UPCVMLIST get the virtual memory list pointer 07C51 E4085F10 0 1 ZBM 381 ST R0 R1,VPLINK link list behind this element 07C52 E456C80D 1 3 BASE 382 ST R1 R3,UPCVMLIST we are now new head of list 383 * \ / 384 00007C53 385 NOTTHISPG LABEL 07C53 FB267C42 4 386 JDR R4 TRYNXTPG continue for all possible virtual pages 07C54 6112C000 4 3 REG 387 LD R4 R3 place the UPC pointer here temporarily 07C55 DC403150 388 CALLNP GRUBWNDO1 get rid of the CCB block 07C56 EC120000 0 REG 389 STZ R0 indicate all went well 390 * \ / 391 00007C57 392 CUPCEXIT LABEL 07C57 5D1F8001 6 STAK 393 LEAVE POP back to the real world 394 * --- 395 00007C58 396 CUPCFAU LABEL 07C58 DC403150 397 CALLNP GRUBWNDO1 destroy the VP element 07C59 60040089 0 IMM 398 LD R0 XREQERFAU indicate file abnormal/unavailable 07C5A FE0E7C57 399 JMP CUPCEXIT go give user the bad news 400 * --- 401 402 END CREATEUPC routine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1732 (FRQCHAIN) F 107 FREQ - Setup an under program 404 405 ********************************************************************************** 406 * * 407 * This routine is called when it is necessary to grant * 408 * privileges to the newly created UPC. The ULB is determined * 409 * based on whether owndir is set on the code file or not. If * 410 * set then we use the directory where the file was found, * 411 * else we use the callers. Once this has been decided the * 412 * other privileges are granted or revoked depending on the * 413 * directory entry. * 414 * Call: * 415 * R3 <= * 416 * FCB <= * 417 * CALLNP PRIVUPC * 418 * * 419 * Eats R0:R2 * 420 * Stack required = 7 * 421 * 3 + max ( LEVELMASK (2), USEULB (4) ). * 422 * * 423 ********************************************************************************** 424 425 BLOCK PRIVUPC routine 426 ENTRY PRIVUPC 427 428 BEGFRAME 00178801 6 BASE 429 REGAREA BSS 1 save register R4 00178802 6 BASE 430 PRIVMASK BSS 1 privilege mask from LEVELMASK 431 ENDFRAME 432 07C5B DD5F8003 6 STAK 433 PRIVUPC ENTRNP PUSH 07C5C E5178801 4 6 BASE 434 ST R4 SP,REGAREA place this register here 07C5D 61040BE8 4 IMM 435 LD R4 ADR WNDO1(CCBINFO) get pointer to CCB control information 07C5E 5C090211 4 ZBM 436 CMZ R4,CCBOWNDIR does the file request its own directory? 07C5F FE027C63 437 JEQ USECALRDIR jump if not, use invokers directory 438 * \ / 439 07C60 61095114 4 5 ZBM 440 LD ULB FCB,FCLIMITPTR use the files directory 07C61 5C090010 4 ZBM 441 CMZ ULB,ULSHADOW is file from a shadow? 07C62 FE027C65 442 JEQ USETHISDIR jump if not from shadow 07C62 FE027C65 443 shadows have no privileges, so OWNDIR is no-no 444 * \ / 445 00007C63 446 USECALRDIR LABEL 07C63 60000412 0 447 LD R0 CPPSA get pointer to current PSA 07C64 61081F13 4 0 ZBM 448 LD ULB R0,PSUSERLIMP get ULB for default 449 * \ / 450 00007C65 451 USETHISDIR LABEL 07C65 DC405569 452 CALLNP USEULB say one more user of the directory 07C66 E508DF13 4 3 ZBM 453 ST ULB R3,UPCPRIVULB save in UPC block 07C67 DC005B67 454 CALL LEVELMASK get account tree relationship 07C68 41530000 4 REG 455 PARV ULB pass the ULB ptr 07C69 40495114 5 ZBM 456 PARVL FCB,FCLIMITPTR 07C6A E4178802 0 6 BASE 457 ST R0 SP,PRIVMASK copy relationship mask 07C6B 61040BE8 4 IMM 458 LD R4 ADR WNDO1(CCBINFO) restore pointer to CCB control info 07C6C 60400412 1 459 LD R1 CPPSA get the current PSA pointer 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1733 (FRQCHAIN) F 107 FREQ - Setup an under program 07C6D 60484854 1 1 ZBM 460 LD R1 R1,PSPRIVMASK get the privilege mask 07C6E 7C4403E0 1 IMM 461 IOR R1 UPDFLTREST restrict things normally not allowed 07C6F E448C0F0 1 3 ZBM 462 ST R1 R3,UPCPRIV set defaults 07C70 60840004 2 IMM 463 LD R2 5-1 number of restricted groups 464 * \ / 465 00007C71 466 GIVEPRIVLP LABEL 07C71 60178802 0 6 BASE 467 LD R0 SP,PRIVMASK copy the relationship mask 07C72 5D647C98 2 468 XCT ANDINRSTCT(R2) match position in tree with force 07C73 FA027C75 0 469 JEQZ R0 DONOTFORCE jump if restriction not being forced clear 07C74 5D647C93 2 470 XCT STZINPRIV(R2) clear restriction 00007C75 471 DONOTFORCE LABEL 07C75 FAA27C71 2 472 DRJ R2 GIVEPRIVLP continue for all restricted groups 473 * \ / 474 07C76 6088DF13 2 3 ZBM 475 LD R2 R3,UPCPRIVULB get privilege account 07C77 62168802 012 BASE 476 LD2 R0 R2,ULACCNM get the account name 07C78 66002556 01 477 CPR2 R0 RADMANAGER is this guy a manager? 07C79 FE0C7C7E 478 JNE NOTMANAGER jump if not 07C7A 60178802 0 6 BASE 479 LD R0 SP,PRIVMASK copy relationship mask 07C7B 78093A40 0 4 ZBM 480 AND R0 R4,CCBMANAGR see if manager 07C7C FA027C7E 0 481 JEQZ R0 NOTMANAGER jump if not allowed 07C7D EC08CA10 3 ZBM 482 STZ R3,UPMANAGR say that he can do managering 483 * \ / 484 00007C7E 485 NOTMANAGER LABEL 07C7E 60168804 0 2 BASE 486 LD R0 R2,ULACCPROJ get the division and project 07C7F 10002551 0 487 SUB R0 DOTBTI within the manuf project? 07C80 6804FA00 0 IMM 488 UCPR R0 DVSNDISP 07C81 FE067C8B 489 JGE NOTBTI jump if not in special project 07C82 5C093210 4 ZBM 490 CMZ R4,CCBMAINTR get the maintenance read indicator 07C83 EC48D010 3 ZBM 491 STLEQ R3,UPMAINTR set into UPC block 07C84 5C093410 4 ZBM 492 CMZ R4,CCBMAINTW get the maintenance write indicator 07C85 EC48CE10 3 ZBM 493 STLEQ R3,UPMAINTW set into UPC block 07C86 5C093810 4 ZBM 494 CMZ R4,CCBOPREQ/CCBALWFRC does prog want operator privs? 07C87 EC48D210 3 ZBM 495 STLEQ R3,UPOPREQ store the answer 07C88 5C090611 4 ZBM 496 CMZ R4,CCBBACKUP/CCBALWFRC does prog want backup privilege? 07C89 EC48CC10 3 ZBM 497 STLEQ R3,UPBACKUP indicate answer in UPC block 07C8A FE0E7C91 498 JMP PRIVUPCXIT goodnight folks 499 * --- 500 00007C8B 501 NOTBTI LABEL 07C8B 60168804 0 2 BASE 502 LD R0 R2,ULACCPROJ 07C8C 10002555 0 503 SUB R0 DOTSYS within the owner's project? 07C8D 6804FA00 0 IMM 504 UCPR R0 DVSNDISP 07C8E FE067C91 505 JGE PRIVUPCXIT jump if not possibly an operator 07C8F 5C093620 4 ZBM 506 CMZ R4,CCBOPREQ check on operator privileges 07C90 EC48D210 3 ZBM 507 STLEQ R3,UPOPREQ set if so 508 * \ / 509 00007C91 510 PRIVUPCXIT LABEL 07C91 61178801 4 6 BASE 511 LD R4 SP,REGAREA restore this register 07C92 5D1F8003 6 STAK 512 LEAVE POP 513 * --- 514 00007C93 515 STZINPRIV LABEL 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1734 (FRQCHAIN) F 107 FREQ - Setup an under program 07C93 EC08D410 3 ZBM 516 STZ R3,UPRSTCTG5 07C94 EC08D610 3 ZBM 517 STZ R3,UPRSTCTG4 07C95 EC08D810 3 ZBM 518 STZ R3,UPRSTCTG3 07C96 EC08DA10 3 ZBM 519 STZ R3,UPRSTCTG2 07C97 EC08DC10 3 ZBM 520 STZ R3,UPRSTCTG1 521 00007C98 522 ANDINRSTCT LABEL 07C98 78092850 0 4 ZBM 523 AND R0 R4,CCBRSTCTG5 07C99 78091E50 0 4 ZBM 524 AND R0 R4,CCBRSTCTG4 07C9A 78091450 0 4 ZBM 525 AND R0 R4,CCBRSTCTG3 07C9B 78090A50 0 4 ZBM 526 AND R0 R4,CCBRSTCTG2 07C9C 78090050 0 4 ZBM 527 AND R0 R4,CCBRSTCTG1 528 529 END PRIVUPC routine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1735 (FRQCHAIN) F 107 FREQ - Setup an under program 531 532 ********************************************************************************** 533 * * 534 * This routine does some limit checking before we jump * 535 * into creating an underprocess. * 536 * The specific checks are: * 537 * 1) is there enough user virtual memory available (there * 538 * should be at least a page), * 539 * 2) and do the standard input, output and run units have * 540 * too many equivalences already. * 541 * Call: * 542 * CALL UPCLIMCHK * 543 * PARVL * 544 * JNEZ R0 * 545 * * 546 * Eats R0:R1, R3 * 547 * Stack required = 5 * 548 * 2 + max ( CHKUSECNT (3) ) * 549 * * 550 ********************************************************************************** 551 552 BLOCK UPCLIMCHK routine 553 ENTRY UPCLIMCHK 554 555 BEGFRAME 00178801 6 BASE 556 SAVEFCB BSS 1 place to save register 5 557 ENDFRAME 558 00000300 ABS 559 MINWRDCNT EQU (1024*3)/4 minimum is 3/4 of a page 560 07C9D DD1F8002 6 STAK 561 UPCLIMCHK ENTR PUSH 07C9E C052C000 3 REG 562 STPVL R3 get the run unit number 07C9F E5578801 5 6 BASE 563 ST FCB SP,SAVEFCB save away this register 07CA0 60000412 0 564 LD R0 CPPSA current process status area 07CA1 60440003 1 IMM 565 LD R1 MAXMAPVALS-1 counter for user page check 566 * \ / 567 00007CA2 568 LIMITCHK LABEL 07CA2 5C1C081B 01 BASE 569 CMZ R0,PSMAPVALS(R1) is this page available 07CA3 FE027CAE 570 JEQ LIMITOK indicates at least one page left 07CA4 FA667CA2 1 571 JDR R1 LIMITCHK jump and check the next page 572 * \ / 573 574 * No pages available, lets see how much space we actually have 07CA5 EC120000 0 REG 575 STZ R0 initialize our counter 07CA6 60440009 1 IMM 576 LD R1 09 start at the top of the memory lists 577 * \ / 578 00007CA7 579 DOITOVER LABEL 07CA7 3963F000 5 1 580 LEA R5 USERMEM(R1) generate address to the list 581 * \ / 582 00007CA8 583 LISTLOOP LABEL 07CA8 FB747CAB 5 584 LJZA R5 NEXTLIST is there an element to count 07CA9 1822255E 0 1 585 ADD R0 BITTAB(R1) add up the word count 07CAA FE0E7CA8 586 JMP LISTLOOP continue our search 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1736 (FRQCHAIN) F 107 FREQ - Setup an under program 587 * --- 588 00007CAB 589 NEXTLIST LABEL 07CAB FA667CA7 1 590 JDR R1 DOITOVER jump if more list to search 07CAC 64040300 0 IMM 591 CPR R0 MINWRDCNT compare against the minimum word count 07CAD FE087CBD 592 JLT UPCERRISYR looks we are low on the space scene 593 * \ / 594 00007CAE 595 LIMITOK LABEL 07CAE DC007CCA 596 CALL CHKUSECNT see if run FCB will take one more 07CAF 4052C000 3 REG 597 PARVL R3 unit number from interrupt processor 07CB0 FE0E7CBD 598 JMP UPCERRISYR give insufficient system resource error 599 * \ / 600 07CB1 DC007CCA 601 CALL CHKUSECNT check FCBUSYCNT 07CB2 40440001 IMM 602 PARVL LUNSIN requesters standard input 07CB3 FE0E7CBD 603 JMP UPCERRISYR give insufficient system resource error 604 * \ / 605 07CB4 DC007CCA 606 CALL CHKUSECNT check FCBUSYCNT 07CB5 40440002 IMM 607 PARVL LUNSOUT requesters standard output 07CB6 FE0E7CBD 608 JMP UPCERRISYR give insufficient system resource error 609 * \ / 610 07CB7 DC007CCA 611 CALL CHKUSECNT check FCBUSYCNT 07CB8 40440003 IMM 612 PARVL LUNSERR requesters standard error output 07CB9 FE0E7CBD 613 JMP UPCERRISYR give insufficient system resource error 07CBA EC120000 0 REG 614 STZ R0 indicate no screwups 615 * \ / 616 00007CBB 617 RETURN LABEL 07CBB 61578801 5 6 BASE 618 LD FCB SP,SAVEFCB save away this register 07CBC 5D1F8002 6 STAK 619 LEAVE POP return to caller 620 * --- 621 00007CBD 622 UPCERRISYR LABEL 07CBD 60040093 0 IMM 623 LD R0 XREQERISYR give insufficient system resources 07CBE FE0E7CBB 624 JMP RETURN 625 * --- 626 627 END UPCLIMCHK routine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1737 (FRQCHAIN) F 107 FREQ - Setup an under program 629 630 ********************************************************************************** 631 * * 632 * QUICKUCE is used to create a UCE element with the same * 633 * UCEUNIT and UCEFCB as that of the UCE in the list pointed * 634 * to by R1 with a unit number matching the one passed. The * 635 * new UCE is linked before the one addressed by R2. * 636 * Call: * 637 * R2 => address of existing UCE or 0 * 638 * R1 => unit list containing UCE to copy * 639 * R0 => unit number * 640 * CALLNP QUICKUCE * 641 * new UCE> * 642 * * 643 * Eats R0:R1 * 644 * Sets R2 <= new UCE * 645 * Stack required = 3 * 646 * 1 + CREATEUCE (2) * 647 * * 648 ********************************************************************************** 649 650 BLOCK QUICKUCE 651 ENTRY QUICKUCE to build a duplicate UCE 652 653 BEGFRAME 654 ENDFRAME 655 07CBF DD5F8001 6 STAK 656 QUICKUCE ENTRNP PUSH 07CC0 3C084080 0 1 ZBM 657 LSRCH R0 R1,UCEUNIT look for it 07CC1 FE0C7CC9 658 JNE NOFIND if it isn't here, don't copy 07CC2 60485F11 1 1 ZBM 659 LD R1 R1,UCEFCB R1 => FCB for other's unit 07CC3 D0084080 1 ZBM 660 INC R1,FCBUSYCNT say one more user 07CC4 DC003635 661 CALL CREATEUCE make a new UCE for this unit 07CC5 41520000 0 REG 662 PARV R0 pass unit number 07CC6 40524000 1 REG 663 PARVL R1 FCB address 07CC7 E4881F10 2 0 ZBM 664 ST R2 R0,UCELINK place passed UCE after new 07CC8 60920000 2 0 REG 665 LD R2 R0 save address of UCE 00007CC9 666 NOFIND LABEL 07CC9 5D1F8001 6 STAK 667 LEAVE POP 668 * --- 669 670 END of QUICKUCE 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1738 (FRQCHAIN) F 107 FREQ - Setup an under program 672 673 ********************************************************************************** 674 * * 675 * CHKUSECNT. This subroutine verifies that an * 676 * equivalence can be made to the specified unit by comparing * 677 * the current count against the max allowed. * 678 * Call: * 679 * CALL CHKUSECNT * 680 * PARVL * 681 * JMP * 682 * * 683 * * 684 * Eats R0,R3,R5 * 685 * Stack required = 3 * 686 * 1 + max ( LUNSEARCH (2) ) * 687 * * 688 ********************************************************************************** 689 690 BLOCK CHKUSECNT subroutine 691 ENTRY CHKUSECNT 692 693 BEGFRAME 694 ENDFRAME 695 07CCA DD1F8001 6 STAK 696 CHKUSECNT ENTR POP 07CCB C052C000 3 REG 697 STPVL R3 store unit number for call 07CCC DC405B39 698 CALLNP LUNSEARCH find this unit 07CCD FB707CD1 5 699 JZA FCB CUCNOLUN can't check if it don't exist 07CCE 600400F0 0 IMM 700 LD R0 (2 POWER 8)-16 field size - max CPUs 07CCF 64094080 0 5 ZBM 701 CPR R0 FCB,FCBUSYCNT are we at max equivs? 07CD0 FE0A7CD2 702 JLE CUCXIT jump if no more allowed 00007CD1 703 CUCNOLUN LABEL 07CD1 19C40001 7 IMM 704 ADD R7 1 advance the return address 705 * \ / 706 00007CD2 707 CUCXIT LABEL 07CD2 5D1F8001 6 STAK 708 LEAVE POP bye! 709 * --- 710 711 END CHKUSECNT subroutine 712 713 END Program Setup FREQs 167 INPUT FRQACSCHNG change file access and attributes 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1739 (FRQACSCHNG) F 108 FREQ - Modify file attribute 3 4 BLOCK Modify Attribute and Change Access 5 6 ENTRY ENDFILWAIT release from file access suspension 7 ENTRY FREQACCESS change equip access 8 ENTRY FREQMODIFY modify file attributes 9 ENTRY SELFFWAIT check to see if will be waiting on self 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1740 (FRQACSCHNG) F 108 FREQ - Modify file attribute 11 12 ********************************************************************************** 13 * * 14 * These requests modify the directory attributes of the * 15 * specified saved file or the access code on the specified * 16 * unsaved file. Usually R1=new value for attribute. * 17 * Stack required = 20 * 18 * 2 + max ( DMOTEWNDOx (7), FREEDIR (5), GETFDATE (1), * 19 * INITDEVACS (18), PRIV2MOD (2), SRCHDIRSN (11), * 20 * ULKWNDO1 (1) ) * 21 * * 22 ********************************************************************************** 23 24 BLOCK FREQMODIFY routine 25 ENTRY FREQMODIFY 26 ENTRY VERIFYTABP 27 28 BEGFRAME2 00178800 6 BASE 29 TEMP BSS 2 temp stack locs 00178801 6 BASE 30 DIRPTRSAVE EQU TEMP(1) save for directory pointer 31 ENDFRAME 32 00007CD3 33 FREQMODIFY LABEL 07CD3 EC1F8002 6 STAK 34 STZ PUSH allocate stack frame 07CD4 6484000C 2 IMM 35 CPR R2 FRMODMAX sub op within bounds? 07CD5 FE0659D8 36 JGE UERRORILR jump if illegal code 07CD6 FB7059B8 5 37 JZA FCB FERRORLNE3 see that lun is equipped 07CD7 DC005BF2 38 CALL PRIV2MOD may I diddle dir? 07CD8 41440000 IMM 39 PARV 0 indicate file not opened for the spooler 07CD9 40494E45 5 ZBM 40 PARVL FCB,FCPRIV 07CDA FE0E59AC 41 JMP FERRORPFM protected from mod if not 07CDB 5C096415 5 ZBM 42 CMZ FCB,FCSAVED is file saved? 07CDC FE027CFB 43 JEQ MODLNSCK must be for except FRMODACS 44 * \ / 45 07CDD E4978800 2 6 BASE 46 ST R2 SP,TEMP save the sub command 07CDE DC0082BB 47 CALL SRCHDIRSN find the directory entry for the file 07CDF 40007D01 48 PARL MODDIRBAD disk error address 07CE0 FE027CE2 49 JEQ MODFOK jump if element found 07CE1 00131160 50 HALT HALTS1160 impossible to not find it 51 * --- 52 00007CE2 53 MODFOK LABEL 07CE2 E4D78801 3 6 BASE 54 ST R3 SP,DIRPTRSAVE save the directory pointer 07CE3 DC403276 55 CALLNP ULKWNDO1 we don't need the page locked 07CE4 60978800 2 6 BASE 56 LD R2 SP,TEMP get subop and entry index back 07CE5 60D78801 3 6 BASE 57 LD R3 SP,DIRPTRSAVE restore directory pointer 00007CE6 58 MODGETPARM LABEL 07CE6 60000412 0 59 LD R0 CPPSA current session 07CE7 60081F11 0 0 ZBM 60 LD R0 R0,PSCACHNP1 current console area 07CE8 60160803 0 0 BASE 61 LD R0 R0,CAR1 get the passed parameter 07CE9 5D647CEF 2 62 XCT FRMODXCT(R2) do it, or jump to routine 63 * \ / shared exit code, ULB => ULB for saved file directory 00007CEA 64 MODDONE LABEL enter here for no problems 07CEA 61C40000 7 IMM 65 LD R7 0 indicate no error 00007CEB 66 MODERROR LABEL enter here with error code in R7 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1741 (FRQACSCHNG) F 108 FREQ - Modify file attribute 07CEB DC405685 67 CALLNP FREEDIR release the directory 07CEC DC40315C 68 CALLNP DMOTEWNDO1 unmap the windows 07CED DC40315F 69 CALLNP DMOTEWNDO2 both of them, in case large UDIR 07CEE FE0E5997 70 JMP FERROR7 now go process return 71 * --- 72 00007CEF 73 FRMODXCT LABEL execute table 07CEF FE0E7D18 74 JMP MODACS change access code 07CF0 FE0E59D8 75 JMP UERRORILR (was change access lock) 07CF1 FE0E7D03 76 JMP MODPRGI change purge interval 07CF2 E408E010 0 3 ZBM 77 ST R0 R3,FDNBU set no backup flag 07CF3 E408E610 0 3 ZBM 78 ST R0 R3,FDFWWSC set file writing when system crashed 07CF4 E416C80E 0 3 BASE 79 ST R0 R3,FDUSRFLD set user defined number 07CF5 FE0E7D0A 80 JMP MODLBKUP modify backup date 07CF6 E408F610 0 3 ZBM 81 ST R0 R3,FDGHOST set ghost flag 07CF7 FE0E7D12 82 JMP MODLWD modify last write date 07CF8 FE0E7D14 83 JMP MODLRD modify last read date 07CF9 E408F810 0 3 ZBM 84 ST R0 R3,FDTRANS set transaction in progress flag 07CFA E408FA10 0 3 ZBM 85 ST R0 R3,FDFLOG set file logging flag 0000000C ABS 86 FRMODMAX EQU DISPW FRMODXCT 87 88 ********************************************************************************** 89 * * 90 * Lun is not saved - this is only acceptable for modify access. * 91 * * 92 ********************************************************************************** 93 00007CFB 94 MODLNSCK LABEL 07CFB 64840000 2 IMM 95 CPR R2 FRMODACS/XRFLDSUBOP is it access modification? 07CFC FE0C59BE 96 JNE FERRORLNS error if not 07CFD 5C096015 5 ZBM 97 CMZ FCB,FCABSIO setting for the console? 07CFE FE0C59AC 98 JNE FERRORPFM if so, "protected from modification" 07CFF 60C40000 3 IMM 99 LD R3 0 return zero entry pointer as flag 07D00 FE0E7CE6 100 JMP MODGETPARM rejoin main code 101 * --- 102 103 ********************************************************************************** 104 * * 105 * The directory went bad. Give him an error that will say * 106 * that the directory is bad and not his file. * 107 * * 108 ********************************************************************************** 109 00007D01 110 MODDIRBAD LABEL 07D01 6004009F 0 IMM 111 LD R0 XREQERDSE give 'disk structure error' 07D02 FE0E5983 112 JMP FERROR and leave 113 * --- 114 115 ********************************************************************************** 116 * * 117 * Change purge interval. * 118 * * 119 ********************************************************************************** 120 00007D03 121 MODPRGI LABEL 07D03 68040100 0 IMM 122 UCPR R0 0100 is the new value in bounds? 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1742 (FRQACSCHNG) F 108 FREQ - Modify file attribute 07D04 FE067D07 123 JGE MODPRGIPOB jump if not 07D05 E416C018 0 3 CACH 124 ST R0 R3,FDPURGE set it 07D06 FE0E7CEA 125 JMP MODDONE and leave 126 * --- 127 128 * Parameter out of bounds 00007D07 129 MODPRGIPOB LABEL 07D07 FAC259B0 3 130 JEQZ R3 FERRORPOB jump if no directory to free 07D08 61C40082 7 IMM 131 LD R7 XREQERPOB give 'parameter out of bounds' error 07D09 FE0E7CEB 132 JMP MODERROR go to free up directory 133 * --- 134 135 ********************************************************************************** 136 * * 137 * Change date requests. Legal only if requester has backup * 138 * privilege. If the requester sez to set to -1, "now" is set. * 139 * * 140 ********************************************************************************** 141 00007D0A 142 MODLBKUP LABEL 07D0A 39D6C809 7 3 BASE 143 LEA R7 R3,FDLBU get address of last backup date field 00007D0B 144 MODSHARE LABEL 07D0B 60400414 1 145 LD R1 CPCUPC current process 07D0C 5C084C10 1 ZBM 146 CMZ R1,UPBACKUP is requester backup? 07D0D FE0C7D16 147 JNE GIVEPNS say "priv not sufficient" if not 148 * \ / 07D0E FA2E7D10 0 149 JNEMW R0 USERDATE jump if he passed a date 07D0F DC40454F 150 CALLNP GETFDATE get "now" 00007D10 151 USERDATE LABEL 07D10 E417C400 0 7 @R 152 ST R0 @R7 set date into appropriate field 07D11 FE0E7CEA 153 JMP MODDONE done with success 154 * --- 155 00007D12 156 MODLWD LABEL 07D12 39D6C807 7 3 BASE 157 LEA R7 R3,FDLCD get address of last change date field 07D13 FE0E7D0B 158 JMP MODSHARE and go process date 159 * --- 160 00007D14 161 MODLRD LABEL 07D14 39D6C808 7 3 BASE 162 LEA R7 R3,FDLACC get address of last access date field 07D15 FE0E7D0B 163 JMP MODSHARE and go process date 164 * --- 165 00007D16 166 GIVEPNS LABEL 07D16 61C40094 7 IMM 167 LD R7 XREQERPNS error is 'privilege not sufficient' 07D17 FE0E7CEB 168 JMP MODERROR go release directory 169 * --- 170 171 ********************************************************************************** 172 * * 173 * Change access code. Not an easy proposition since we must * 174 * see that the new access is legal for this type of device and * 175 * that the new access does not compromise the security of either * 176 * the file owner or referencer. * 177 * R3 => dir entry, 0 sez not saved * 178 * * 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1743 (FRQACSCHNG) F 108 FREQ - Modify file attribute 179 ********************************************************************************** 180 00007D18 181 MODACS LABEL 07D18 68040008 0 IMM 182 UCPR R0 8 range check 07D19 FE067D07 183 JGE MODPRGIPOB see that the new code is good 07D1A FAC27D1F 3 184 JEQZ R3 ANYACSOK if not saved may be anything 07D1B 64040007 0 IMM 185 CPR R0 FSACSNDA check for no data access 07D1C FE027D27 186 JEQ MODILOPX jump if NDA 07D1D 64040005 0 IMM 187 CPR R0 FSACSDR some things are not good on saved files 07D1E FE067D27 188 JGE MODILOPX no destructive reads! 189 * \ / 190 00007D1F 191 ANYACSOK LABEL 07D1F 60496665 1 5 ZBM 192 LD R1 FCB,FCHTYPE get the type of the device 07D20 184061AB 1 193 ADD R1 VERIFYTABP generate pointer to word 07D21 5C1A4400 10 @R 194 CMZ @R1(R0) check for legality on this device 07D22 FE027D26 195 JEQ MODILOP jump if type not allowed 07D23 FACC7D29 3 196 JNEZ R3 MODSAVED jump if file saved - harder work 07D24 E4095835 0 5 ZBM 197 ST R0 FCB,FCACCESS change the access code 07D25 FE0E5982 198 JMP FNOERROR 199 * --- 200 201 ********************************************************************************** 202 * * 203 * Cannot change this type of device to the specified access. * 204 * * 205 ********************************************************************************** 206 00007D26 207 MODILOP LABEL 07D26 FAC259A5 3 208 JEQZ R3 FERRORILOP 'illegal op' for scratch files 00007D27 209 MODILOPX LABEL 07D27 61C40080 7 IMM 210 LD R7 XREQERILR error is 'illegal request' 07D28 FE0E7CEB 211 JMP MODERROR go free up directory 212 * --- 213 214 ********************************************************************************** 215 * * 216 * The file is saved. This means we must verify the * 217 * legality of the change depending on the current restrictions * 218 * on the file owner and the file requester. * 219 * * 220 * N.B. We must have the directory (ULB) locked so we can examine * 221 * and change the FDE atomically. Because we need to access the * 222 * FDE both before and after the INITDEVACS, and INITDEVACS can * 223 * suspend indefinitely for IO operations, the following section * 224 * can hang up the directory. New attempts to get to the * 225 * directory will cause the user to enter DIRWAIT, not * 226 * satisfiable until we leave MSWAIT or IOWAIT. Especially * 227 * susceptible is Hardware.Sys, since this is where all the * 228 * devices live (tapes and TERMs). * 229 * * 230 * * 231 * R0 = requested access * 232 * R3 => FDE in WNDO1, .DIR locked * 233 * * 234 * * 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1744 (FRQACSCHNG) F 108 FREQ - Modify file attribute 235 ********************************************************************************** 236 00007D29 237 MODSAVED LABEL 07D29 6048C101 1 3 ZBM 238 LD R1 R3,FDCUSE get use count from FDE 07D2A 64440001 1 IMM 239 CPR R1 1 only I must have access 07D2B FE0C7D48 240 JNE MODFBZY otherwise the file is busy 07D2C 60400414 1 241 LD R1 CPCUPC get the current UPC pointer 07D2D 6048D830 1 3 ZBM 242 LD R1 R3,FDPRIV fetch current file access 07D2E 604A4600 1 1 CBM 243 LD R1 R1*BIT (31-3) multiply by 8 07D2F 18520000 1 0 REG 244 ADD R1 R0 calculate index into array 07D30 61F27D4E 7 1 @ 245 LD R7 @CHNGRULESP(R1) get bits to control conversion 07D31 F3FC7D3D 7 246 JBF R7/CKTYP NOSETACS jump if not to set new access in FCB 07D32 E4178800 0 6 BASE 247 ST R0 SP,TEMP save the setting access 07D33 DC006087 248 CALL INITDEVACS initialize device to access 07D34 40520000 0 REG 249 PARVL R0 pass the new access 07D35 FE0E7D27 250 JMP MODILOPX error exit if not legal or possible 07D36 60D78801 3 6 BASE 251 LD R3 SP,DIRPTRSAVE restore pointer to dir entry 07D37 60895835 2 5 ZBM 252 LD R2 FCB,FCACCESS get current open access 07D38 5D6461D4 2 253 XCT UPDATEDR(R2) update directory, if necessary 07D39 60978800 2 6 BASE 254 LD R2 SP,TEMP restore new access code 07D3A 5D6461DC 2 255 XCT INITFCB(R2) reinitialize the FCB 07D3B 60128000 0 2 REG 256 LD R0 R2 now we can continue 07D3C E4095835 0 5 ZBM 257 ST R0 FCB,FCACCESS set new type 258 * \ / 259 00007D3D 260 NOSETACS LABEL 07D3D F3FE7D43 7 261 JBF R7/CKBZY NOBUSYFIX jump if busy counters don't need updating 07D3E EC08C10C 3 ZBM 262 STZ R3,FDRACS remove any old access 07D3F EC08E01C 3 ZBM 263 STZ R3,FDWACS 07D40 EC08E2FC 3 ZBM 264 STZ R3,FDMWACS 07D41 5D6061AC 0 265 XCT ACSSETTAB(R0) count new access 07D42 5D6061BC 0 266 XCT ACSUSECNTB(R0) count new TOTR and TOTW 00007D43 267 NOBUSYFIX LABEL 268 * \ / 07D43 64040004 0 IMM 269 CPR R0 FSACSMW check for multiple write 07D44 FE0C7D46 270 JNE NOTMW jump if not 07D45 60040000 0 IMM 271 LD R0 FDACSRW these guys are saved as RW 00007D46 272 NOTMW LABEL 07D46 E408D830 0 3 ZBM 273 ST R0 R3,FDPRIV set new access in file 07D47 FE0E7CEA 274 JMP MODDONE release the directory and return 275 * --- 276 277 ********************************************************************************** 278 * * 279 * File was busy. * 280 * * 281 ********************************************************************************** 282 00007D48 283 MODFBZY LABEL 07D48 61C4008A 7 IMM 284 LD R7 XREQERFBZ error is 'file busy' 07D49 FE0E7CEB 285 JMP MODERROR release directory before giving error 286 * --- 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1745 (FRQACSCHNG) F 108 FREQ - Modify file attribute 288 289 ********************************************************************************** 290 * * 291 * Below is a table giving the operations to be * 292 * performed when changing a file from one access type to * 293 * another. The operations are bit encoded and are defined * 294 * below. The table is a two dimensional array with an index * 295 * of *8+. The operations to be * 296 * performed on type change are: * 297 * CKBZY - reset busy counters for file. * 298 * CKTYP - change the type of access in the FCB. * 299 * * 300 ********************************************************************************** 301 00003E10 BYTE 302 CKBZY EQU BIT 31 change busy counters 00003C10 BYTE 303 CKTYP EQU BIT 30 change type in FCB 00000002 ABS 304 CKLOG EQU 2 size of field to hold bits 305 00000001 ABS 306 BZYF EQU 1*CKBZY 00000002 ABS 307 TYPF EQU 1*CKTYP 308 00007D4A 309 CHNGRULES LABEL 310 * Changing from RW - change busy counters and type if changing 311 * to more restrictive. 07D49 00000000 312 VFD CKLOG:0 RW=>RW 07D49 00000003 313 VFDB CKLOG:BZYF+TYPF RW=>RO 07D49 00000002 314 VFDB CKLOG:TYPF RW=>AO 07D49 00000003 315 VFDB CKLOG:BZYF+TYPF RW=>XO 07D49 00000000 316 VFDB CKLOG:0 RW=>MW 07D49 00000000 317 VFDB CKLOG:0,0,0 RW=>DR, RW=>xx, RW=>NA 318 * Changing from RO - 319 * Some cases are solved by not changing FCB access. 07D49 00000000 320 VFDB CKLOG:0 RO=>RW 07D49 00000000 321 VFDB CKLOG:0 RO=>RO 07D49 00000003 322 VFDB CKLOG:BZYF+TYPF RO=>AO 07D49 00000002 323 VFDB CKLOG:TYPF RO=>XO 07D49 00000000 324 VFDB CKLOG:0 RO=>MW 07D4A 00000000 325 VFDB CKLOG:0,0,0 RO=>DR, RO=>xx, RO=>NA 326 * Changing from AO - 07D4A 00000002 327 VFDB CKLOG:TYPF AO=>RW 07D4A 00000003 328 VFDB CKLOG:TYPF+BZYF AO=>RO 07D4A 00000000 329 VFDB CKLOG:0 AO=>AO 07D4A 00000003 330 VFDB CKLOG:TYPF+BZYF AO=>XO 07D4A 00000003 331 VFDB CKLOG:TYPF+BZYF AO=>MW 07D4A 00000000 332 VFDB CKLOG:0,0,0 AO=>DR, AO=>xx, AO=>NA 333 * Changing from XO - change type 07D4A 00000003 334 VFDB CKLOG:TYPF+BZYF XO=>RW 07D4A 00000002 335 VFDB CKLOG:TYPF XO=>RO 07D4A 00000003 336 VFDB CKLOG:TYPF+BZYF XO=>AO 07D4A 00000000 337 VFDB CKLOG:0 XO=>XO 07D4A 00000003 338 VFDB CKLOG:TYPF+BZYF XO=>MW 07D4B 00000000 339 VFDB CKLOG:0,0,0 XO=>DR, XO=>xx, XO=>NA 340 * Changing from MW - just change busy counters and access codes 07D4B 00000003 341 VFDB CKLOG:TYPF+BZYF MW=>RW 07D4B 00000003 342 VFDB CKLOG:TYPF+BZYF MW=>RO 07D4B 00000003 343 VFDB CKLOG:TYPF+BZYF MW=>AO 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1746 (FRQACSCHNG) F 108 FREQ - Modify file attribute 07D4B 00000003 344 VFDB CKLOG:TYPF+BZYF MW=>XO 07D4B 00000000 345 VFDB CKLOG:0 MW=>MW 07D4B 00000000 346 VFDB CKLOG:0,0,0 MW=>DR, MW=>xx, MW=>NA 07D4C 00000000 347 VFDB CKLOG:0,0,0,0,0,0,0,0 07D4C 00000000 348 VFDB CKLOG:0,0,0,0,0,0,0,0 07D4D 00000000 349 VFDB CKLOG:0,0,0,0,0,0,0,0 350 BSS 0 take up any slack 07D4E 00887D4A 351 CHNGRULESP PTR CHNGRULES/BITS 0:(CKLOG-1) 352 353 END FREQMODIFY routine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1747 (FRQACSCHNG) F 108 Change EQUIP file access 356 357 ********************************************************************************** 358 * * 359 * FREQACCESS. This routine changes the OPEN access the * 360 * requester has to the file. If the file is unsaved, it's * 361 * easy -- we just make sure that the requested access is * 362 * legal for the device and then we set it. If the file is * 363 * saved, we search the directory for it and then check the * 364 * busy counters and finally set the access on the device. * 365 * The form the user uses to get to the FREQ's is: * 366 * * 367 * LD R0 request * 368 * LD R1 new code * 369 * FREQ unit * 370 * JLTZ R0 request error (R0=error code) * 371 * ST R0 unit's dynamic status * 372 * * 373 * Stack required = 20 * 374 * 2 + max ( CHKBZYACS (2), DMOTEWNDOx (7), ENDFILWAIT (9), * 375 * FNDOPNACS (1), FREEDIR (5), INITDEVACS(18), * 376 * LOCKWAIT (0), SELFFWAIT (6), SETACCESS (2), * 377 * SRCHDIRSN (11), SUSPENDFRQ (1) ) * 378 * * 379 ********************************************************************************** 380 381 BLOCK 382 ENTRY FREQACCESS 383 384 BEGFRAME2 00178800 6 BASE 385 DIRPNTR BSS 1 pointer to directory entry 00178801 6 BASE 386 NEWACCESS BSS 1 the access setting on the device 387 ENDFRAME 388 00007D4F 389 FREQACCESS LABEL 07D4F EC1F8002 6 STAK 390 STZ PUSH allocate the stack area 07D50 64840003 2 IMM 391 CPR R2 FRQATRMAX is the subop within range 07D51 FE0659D8 392 JGE UERRORILR jump if illegal request 07D52 FB7059B8 5 393 JZA FCB FERRORLNE3 unit must be opened 07D53 5CA47D54 2 394 LDPC FRQATRJMP(R2) off to do the processing 395 * --- 396 00007D54 397 FRQATRJMP LABEL 07D54 00007D57 398 VFD ADR FRQACCESS 07D55 00007DB4 399 VFD ADR FRQCHGTRNS 07D56 00007DB7 400 VFD ADR FRQGETTRNS 00000003 ABS 401 FRQATRMAX EQU DISPW FRQATRJMP 402 00007D57 403 FRQACCESS LABEL 07D57 5C096015 5 ZBM 404 CMZ FCB,FCABSIO is this (equiv to) 201 or 202? 07D58 FE0C59AC 405 JNE FERRORPFM if so, "protected from modification" 07D59 60170803 0 4 BASE 406 LD R0 R4,CAR1 get the requested access 07D5A E4178801 0 6 BASE 407 ST R0 SP,NEWACCESS save it 07D5B 5C096415 5 ZBM 408 CMZ FCB,FCSAVED is this a saved unit? 07D5C FE0C7D69 409 JNE TMPITSSVD **do lots of work 410 * \ / 411 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1748 (FRQACSCHNG) F 108 Change EQUIP file access 412 ********************************************************************************** 413 * * 414 * The file is not saved. We make sure the access is * 415 * legal and then we set that access onto the device. * 416 * * 417 ********************************************************************************** 418 419 * \ / 07D5D 60578801 1 6 BASE 420 LD R1 SP,NEWACCESS R1=requested access 07D5E DC005FB0 421 CALL FNDOPNACS check legality on device 07D5F 40524000 1 REG 422 PARVL R1 07D60 FE0E5983 423 JMP FERROR cannot do it (R0=error code) 07D61 E4178801 0 6 BASE 424 ST R0 SP,NEWACCESS save what will get set 07D62 60C40000 3 IMM 425 LD R3 0 no dir entry 07D63 DC006087 426 CALL INITDEVACS change the device to this access 07D64 40520000 0 REG 427 PARVL R0 07D65 FE0E5983 428 JMP FERROR cannot do it (R0=error code) 07D66 60178801 0 6 BASE 429 LD R0 SP,NEWACCESS 07D67 E4095835 0 5 ZBM 430 ST R0 FCB,FCACCESS store new access on device 07D68 FE0E5982 431 JMP FNOERROR done with no problems 432 * --- 433 434 ********************************************************************************** 435 * * 436 * The unit is saved. We check to make sure that other * 437 * user's of the file don't conflict with the new access (by * 438 * checking the busy counters) and we must handle others that * 439 * may be waiting on the file. * 440 * * 441 ********************************************************************************** 442 443 *********** begin temporary stuff 444 ********************************************************************************** 445 * The following is temporary code to prevent deadlock when * 446 * setting a Hardware.Sys saved terminal logical unit to * 447 * "no data access." The problem is that the directory needs * 448 * to be locked while we're fooling with use counts, etc., but * 449 * RESETTERM (called in UNLNKPHYSDEV from INITDEVACS) needs the * 450 * directory to get to Terminal.Config. * 451 * To restore, the JNE TMPITSSVD just below FRQACCESS above * 452 * is replaced by JNE ITSSAVED, and TMPREENTER LABEL (under * 453 * ITSSAVED) is removed. * 454 ********************************************************************************** 00007D69 455 TMPITSSVD LABEL 07D69 64040007 0 IMM 456 CPR R0 FSACSNDA **to "no data access" 07D6A FE0C7D75 457 JNE ITSSAVED **jump if not special case 07D6B 60C40000 3 IMM 458 LD R3 0 **no known directory address 07D6C DC006087 459 CALL INITDEVACS **undo unit 07D6D 40440007 IMM 460 PARVL FSACSNDA **pass access 07D6E FE0E5983 461 JMP FERROR **for error return 07D6F DC0082BB 462 CALL SRCHDIRSN **now find the dir entry 07D70 40007D96 463 PARL DIRISBAD **pass error address 07D71 FE0C7D95 464 JNE FILENF **oops test 07D72 E4D78800 3 6 BASE 465 ST R3 SP,DIRPNTR **save dir entry loc 07D73 61095114 4 5 ZBM 466 LD ULB FCB,FCLIMITPTR **get users limits 07D74 FE0E7D88 467 JMP TMPREENTER **continue 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1749 (FRQACSCHNG) F 108 Change EQUIP file access 468 * --- 469 *********** end temporary stuff 470 00007D75 471 ITSSAVED LABEL 07D75 DC0082BB 472 CALL SRCHDIRSN find the file in the directory 07D76 40007D96 473 PARL DIRISBAD where to go if it's bad 07D77 FE0C7D95 474 JNE FILENF jump if the file was not found 07D78 E4D78800 3 6 BASE 475 ST R3 SP,DIRPNTR save address of the entry 07D79 61095114 4 5 ZBM 476 LD ULB FCB,FCLIMITPTR ULB=>limits of the file owner 477 * \ / 478 07D7A 60578801 1 6 BASE 479 LD R1 SP,NEWACCESS 07D7B DC005FB0 480 CALL FNDOPNACS see if access is legal on this device 07D7C 40524000 1 REG 481 PARVL R1 07D7D FE0E7D98 482 JMP DIRLERR jump if not legal (R0=error code) 07D7E E4178801 0 6 BASE 483 ST R0 SP,NEWACCESS save the access to set 07D7F DC006013 484 CALL CHKBZYACS check the busy counters for the file 07D80 40520000 0 REG 485 PARVL R0 07D81 FE0E7D9A 486 JMP FILEISBZY jump if I cannot get my access 07D82 60578801 1 6 BASE 487 LD R1 SP,NEWACCESS 07D83 60D78800 3 6 BASE 488 LD R3 SP,DIRPNTR => dir entry 07D84 DC006087 489 CALL INITDEVACS change device to the new access 07D85 40524000 1 REG 490 PARVL R1 07D86 FE0E7D98 491 JMP DIRLERR jump if nogo (R0=error code) 07D87 60D78800 3 6 BASE 492 LD R3 SP,DIRPNTR 00007D88 493 TMPREENTER LABEL **temporary 07D88 60578801 1 6 BASE 494 LD R1 SP,NEWACCESS 07D89 DC006184 495 CALL SETACCESS set the access on the file 07D8A 40524000 1 REG 496 PARVL R1 07D8B 60D78800 3 6 BASE 497 LD R3 SP,DIRPNTR => directory entry 07D8C DC007DCA 498 CALL ENDFILWAIT call to release someone waiting for this file 07D8D 43574809 5 BASE 499 PARV2 FCB,FCSERIAL identify file by SN 07D8E 41494081 5 ZBM 500 PARV FCB,FCDRIVE indicate which volume 07D8F 4056C80C 3 BASE 501 PARVL R3,FDACCESSES and what type of access 502 * \ / 503 07D90 61C40000 7 IMM 504 LD R7 0 indicate no error 00007D91 505 FCLEANUP LABEL 07D91 DC405685 506 CALLNP FREEDIR release the directory 07D92 DC40315C 507 CALLNP DMOTEWNDO1 clear directory page from window 07D93 DC40315F 508 CALLNP DMOTEWNDO2 clear directory page from window (present if large dir) 07D94 FE0E5997 509 JMP FERROR7 and go give return 510 * --- 511 512 ********************************************************************************** 513 * We should be able to find the file again. Halt if * 514 * the file serial number cannot be refound. * 515 ********************************************************************************** 516 07D95 00131163 517 FILENF HALT HALTS1163 file serial number could not be re-found 518 * --- 519 520 ********************************************************************************** 521 * * 522 * The directory is bad on the disk. Return * 523 * the error to the user. * 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1750 (FRQACSCHNG) F 108 Change EQUIP file access 524 * * 525 ********************************************************************************** 526 00007D96 527 DIRISBAD LABEL 07D96 6004009F 0 IMM 528 LD R0 XREQERDSE 'disk structure error' 07D97 FE0E5983 529 JMP FERROR and do error return 530 * --- 531 532 ********************************************************************************** 533 * * 534 * Error with the directory locked. Error code in R0. * 535 * * 536 ********************************************************************************** 537 00007D98 538 DIRLERR LABEL 07D98 61D20000 7 0 REG 539 LD R7 R0 save away the error code 07D99 FE0E7D91 540 JMP FCLEANUP and go share the cleanup 541 * --- 542 543 ********************************************************************************** 544 * * 545 * The file is busy. Suspend the caller if it is not * 546 * resricted or we would be suspending on ourself. * 547 * Directory is locked when we get here. * 548 * * 549 ********************************************************************************** 550 00007D9A 551 FILEISBZY LABEL 552 PLOCK FILEWAITL get access to the wait list (for unlock) 07D9A 0CC00000 552 IOFF 07D9B D1C01D0F 552 SETT FILEWAITL 07D9C FE0C7D9E 552 JNE MA(2+DISPW MA 0) 07D9D DC40308B 552 CALLNP LOCKWAIT 07D9E DC405685 553 CALLNP FREEDIR release the directory 07D9F DC40315C 554 CALLNP DMOTEWNDO1 clear directory page from window 07DA0 DC40315F 555 CALLNP DMOTEWNDO2 clear directory page from window (present if large dir) 07DA1 60095835 0 5 ZBM 556 LD R0 FCB,FCACCESS get current access 07DA2 64040007 0 IMM 557 CPR R0 FSACSNDA is it no data access? 07DA3 FE0C7DB1 558 JNE CANNOTSUSP if not, can't wait for file 07DA4 DC007DFE 559 CALL SELFFWAIT see if I would suspend on myself 07DA5 41534000 5 REG 560 PARV FCB the file not to look at 07DA6 41490081 4 ZBM 561 PARV ULB,ULDRIVE drive of the file 07DA7 42574809 5 BASE 562 PARV2L FCB,FCSERIAL serial number of same 07DA8 FE0E7DB1 563 JMP CANNOTSUSP jump if I would susp on myself 564 * \ / 565 07DA9 60978801 2 6 BASE 566 LD R2 SP,NEWACCESS get new access requested 07DAA DC003541 567 CALL SUSPENDFRQ suspend the caller 07DAB 62174809 015 BASE 568 LD2 R0 FCB,FCSERIAL 07DAC 60C90081 3 4 ZBM 569 LD R3 ULB,ULDRIVE 07DAD E4CA0080 3 0 CBM 570 ST R3 R0/VOLFIELD construct whole MS address 07DAE 43540000 01 PAIR 571 PARV2 PAIR R0 07DAF 41001DB1 572 PAR SQFILEWAIT where to wait (for a file) 07DB0 40001D0F 573 PARL FILEWAITL what to unlock 574 * \ / 575 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1751 (FRQACSCHNG) F 108 Change EQUIP file access 576 * The user does not want to suspend 00007DB1 577 CANNOTSUSP LABEL 578 PUNLOCK FILEWAITL release global file locker 07DB1 EC001D0F 578 STZ FILEWAITL 07DB2 0C800000 578 ION 07DB3 FE0E59B2 579 JMP FERRORFBZ return "File is busy" error 580 * --- 581 582 ********************************************************************************** 583 * * 584 * This request modifies the transaction in progress bit * 585 * in the FCB. The directory is not changed until the unit is * 586 * closed, so the bit may be set and cleared many times * 587 * without affecting its directory entry. The transaction * 588 * bit is used to indicate that a user program has crashed * 589 * while having this particular file open. Note that the * 590 * system does NOT diddle with this field, completely user * 591 * controlled. * 592 * * 593 ********************************************************************************** 594 00007DB4 595 FRQCHGTRNS LABEL 07DB4 60170803 0 4 BASE 596 LD R0 R4,CAR1 get the new value 07DB5 E4097615 0 5 ZBM 597 ST R0 FCB,FCTRANS set it into the FCB 07DB6 FE0E5982 598 JMP FNOERROR we ride off into the sunset 599 * --- 600 601 ********************************************************************************** 602 * * 603 * This request returns the value of the transaction in * 604 * progress bit from the FCB. To get the value of the transaction * 605 * flag from the directory see the FRCATALOG request. * 606 * * 607 ********************************************************************************** 608 00007DB7 609 FRQGETTRNS LABEL 07DB7 60097615 0 5 ZBM 610 LD R0 FCB,FCTRANS get the value from the FCB 07DB8 E4170803 0 4 BASE 611 ST R0 R4,CAR1 give it back to the user 07DB9 FE0E5982 612 JMP FNOERROR back to return status on the unit 613 * --- 614 615 END FREQACCESS routines 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1752 (FRQACSCHNG) F 108 Change EQUIP file access 617 618 ********************************************************************************** 619 * * 620 * ENDFILWAIT. Wake up processes waiting on a file. * 621 * * 622 * Call this routine when you have decreased one or more * 623 * busy counters of a file, and we will wake up someone who is * 624 * waiting to use the file. * 625 * * 626 * The rules are: * 627 * - If nobody is waiting to use this file, nobody gets awakened. * 628 * - If the first process waiting for the file cannot go now, * 629 * nobody gets awakened. * 630 * - If the first process waiting for the file can go now, then * 631 * we awaken all processes waiting for the file that can go now. * 632 * * 633 * Call: * 634 * (directory must be locked) * 635 * CALL ENDFILWAIT * 636 * PAR2 file serial number * 637 * PARV volume number * 638 * PARVL * 639 * Gets R0-R3. * 640 * Stack required = 9 * 641 * 7 + max ( LOCKWAIT (0), SETRUNNING (2) ) * 642 * * 643 ********************************************************************************** 644 645 BLOCK ENDFILWAIT subroutine 646 ENTRY ENDFILWAIT call when done with a file 647 648 BEGFRAME 00178801 6 BASE 649 SAVER4R5 BSS 2 save area for these registers 00178803 6 BASE 650 FSN BSS 2 file serial number 00178805 6 BASE 651 RUNLIST BSS 1 head of list of processes to set running 652 * note that only the address of RUNLIST is used. 00178806 6 BASE 653 USECOUNTS BSS 1 presumed use counts of file 654 ENDFRAME 655 656 * Definitions of fields within USECOUNTS. These MUST 657 * match the definitions of the fields within FDACCESSES. 658 00000100 BYTE 659 READERS EQU BITS 0:15 count of readers 00002010 BYTE 660 WRITERS EQU BIT 16 count of writers 000022F0 BYTE 661 MWRITERS EQU BITS 17:31 count of multi-writers 662 FFFF0000 ABS 663 READMASK EQU ONEBITS/READERS*READERS to isolate readers field 00008000 ABS 664 WRITEMASK EQU ONEBITS/WRITERS*WRITERS 00007FFF ABS 665 MWRITEMASK EQU ONEBITS/MWRITERS*MWRITERS FFFFFFFF ABS 666 ALLMASK EQU READMASK+WRITEMASK+MWRITEMASK 667 668 * The following table, indexed by file access, gives a 669 * mask of incompatible accesses. 670 00007DBA 671 MASKTABLE LABEL 07DBA FFFFFFFF 672 VFD ALLMASK 0 - write 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1753 (FRQACSCHNG) F 108 Change EQUIP file access 07DBB 0000FFFF 673 VFD WRITEMASK+MWRITEMASK 1 - read 07DBC FFFFFFFF 674 VFD ALLMASK 2 - append 07DBD 0000FFFF 675 VFD WRITEMASK+MWRITEMASK 3 - execute 07DBE FFFF8000 676 VFD READMASK+WRITEMASK 4 - multi-write 07DBF FFFFFFFF 677 VFD ALLMASK 5 - destructive read 07DC0 FFFFFFFF 678 VFD ALLMASK 6 - unused 07DC1 00000000 679 VFD 0 7 - no data access 680 681 * The following table, indexed by file access, gives 682 * the amount by which to increase USECOUNTS when we start 683 * a process to use the file. 684 00007DC2 685 INCTABLE LABEL 07DC2 00008000 686 VFD 1*WRITERS 0 - write 07DC3 00010000 687 VFD 1*READERS 1 - read 07DC4 00008000 688 VFD 1*WRITERS 2 - append 07DC5 00010000 689 VFD 1*READERS 3 - execute 07DC6 00000001 690 VFD 1*MWRITERS 4 - multi-write 07DC7 00008000 691 VFD 1*WRITERS 5 - destructive read 07DC8 00008000 692 VFD 1*WRITERS 6 - unused 07DC9 00000000 693 VFD 0 7 - no data access 694 695 07DCA DD1F8007 6 STAK 696 ENDFILWAIT ENTR PUSH 07DCB C3578803 6 BASE 697 STPV2 SP,FSN file serial number 07DCC C1498083 6 ZBM 698 STPV SP,FSN/VOLFIELD volume number 07DCD C0578806 6 BASE 699 STPVL SP,USECOUNTS save current use counts 700 07DCE E7178801 456 BASE 701 ST2 R4 SP,SAVER4R5 save these registers 702 PLOCK FILEWAITL lock file wait lock 07DCF 0CC00000 702 IOFF 07DD0 D1C01D0F 702 SETT FILEWAITL 07DD1 FE0C7DD3 702 JNE MA(2+DISPW MA 0) 07DD2 DC40308B 702 CALLNP LOCKWAIT 703 PLOCK SQLOCKS(NQFILEWAIT) lock file wait list 07DD3 0CC00000 703 IOFF 07DD4 D1C01DC2 703 SETT SQLOCKS(NQFILEWAIT) 07DD5 FE0C7DD7 703 JNE MA(2+DISPW MA 0) 07DD6 DC40308B 703 CALLNP LOCKWAIT 704 705 * Register usage: 706 * R1,R2 = file serial number 707 * R3 => last PCB on RUNLIST 708 * R4 => current PCB on SQFILEWAIT 709 * R5 => previous PCB on SQFILEWAIT 710 07DD7 62578803 126 BASE 711 LD2 R1 SP,FSN get file serial number 07DD8 38D78805 3 6 BASE 712 LEA R3 SP,RUNLIST make pointer to head of prospective queue 07DD9 61001DB1 4 713 LD R4 SQFILEWAIT load pointer to first filewaiter 07DDA 61441DB1 5 IMM 714 LD R5 ADR SQFILEWAIT load pointer to head of file wait queue 715 07DDB 4A570801 124 BASE 716 RLSCH2 R1 R4,PCQPARM find a waiter for this file 07DDC FE0C7DEF 717 JNE GOTALL jump if none 07DDD 60170000 0 4 CACH 718 LD R0 R4,PCQPARM2 R0=requested access 07DDE 60207DBA 0 0 719 LD R0 MASKTABLE(R0) R0 = incompatibility mask 07DDF 78178806 0 6 BASE 720 AND R0 SP,USECOUNTS can he go now? 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1754 (FRQACSCHNG) F 108 Change EQUIP file access 07DE0 FA0C7DEF 0 721 JNEZ R0 GOTALL jump if first one is incompatible 722 * \ / 00007DE1 723 GETLOOP LABEL 07DE1 60170000 0 4 CACH 724 LD R0 R4,PCQPARM2 R0 = requested access 07DE2 60207DC2 0 0 725 LD R0 INCTABLE(R0) R0 = value by which to adjust counts 07DE3 98178806 0 6 BASE 726 ADDM R0 SP,USECOUNTS adjust the use counts 07DE4 E508DF10 4 3 ZBM 727 ST R4 R3,PCQLINK put new one onto the end of RUNLIST 07DE5 60D30000 3 4 REG 728 LD R3 R4 R3 => new end of RUNLIST 07DE6 61091F10 4 4 ZBM 729 LD R4 R4,PCQLINK R4 => next one on SQFILEWAIT 07DE7 E5095F10 4 5 ZBM 730 ST R4 R5,PCQLINK remove old one from SQFILEWAIT 731 * \ / 00007DE8 732 FINDLOOP LABEL 07DE8 4A570801 124 BASE 733 RLSCH2 R1 R4,PCQPARM find next waiter for this file 07DE9 FE0C7DEF 734 JNE GOTALL jump if no more 07DEA 60170000 0 4 CACH 735 LD R0 R4,PCQPARM2 get requested access 07DEB 60207DBA 0 0 736 LD R0 MASKTABLE(R0) R0 = incompatibility mask 07DEC 78178806 0 6 BASE 737 AND R0 SP,USECOUNTS can he go now? 07DED FA027DE1 0 738 JEQZ R0 GETLOOP jump if so 07DEE FB3A7DE8 45 739 RLJNA R4 FINDLOOP else find next waiter 740 * \ / 741 742 * Here, RUNLIST => list of processes to awaken. 743 * R3 => last element of list. They have been removed 744 * from SQFILEWAIT. 745 746 * \ / 00007DEF 747 GOTALL LABEL 07DEF EC08DF10 3 ZBM 748 STZ R3,PCQLINK flag end of list 749 PUNLOCK SQLOCKS(NQFILEWAIT) release SQFILEWAIT list 07DF0 EC001DC2 749 STZ SQLOCKS(NQFILEWAIT) 07DF1 0C800000 749 ION 07DF2 61099F15 4 6 ZBM 750 LD R4 SP,RUNLIST/FLDADRS R4 => first job to awaken 00007DF3 751 RUNLOOP LABEL 07DF3 FB307DFA 4 752 JZA R4 DONE jump if none 07DF4 60091F13 0 4 ZBM 753 LD R0 R4,PCPSADRS R0 => process in question 07DF5 EDC80010 0 ZBM 754 STW R0,PSWAITED say doing OPEN over again 07DF6 61491F10 5 4 ZBM 755 LD R5 R4,PCQLINK R5 => next one 07DF7 DC402B99 756 CALLNP SETRUNNING make one go 07DF8 61134000 4 5 REG 757 LD R4 R5 R4 => next one 07DF9 FE0E7DF3 758 JMP RUNLOOP keep doing them 759 * --- 760 00007DFA 761 DONE LABEL 762 PUNLOCK FILEWAITL release file wait lock 07DFA EC001D0F 762 STZ FILEWAITL 07DFB 0C800000 762 ION 07DFC 63178801 456 BASE 763 LD2 R4 SP,SAVER4R5 restore registers 07DFD 5D1F8007 6 STAK 764 LEAVE POP and all done 765 * --- 766 767 END ENDFILWAIT subroutine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1755 (FRQACSCHNG) F 108 Change EQUIP file access 769 770 ********************************************************************************** 771 * * 772 * SELFFWAIT. This routine is called when we are about to * 773 * suspend ourself for file waiting. The routine checks to see * 774 * if we will be waiting on ourself (which is a distinctly * 775 * unfriendly thing to do). * 776 * Call: * 777 * LD SP stack pointer * 778 * CALL SELFFWAIT * 779 * PARV => FCB not to check * 780 * PARV volume file is on * 781 * PARV2L serial number of the file * 782 * JMP I have the file busy myself * 783 * * 784 * Gets R0:R1. * 785 * Stack required = 6. * 786 * * 787 ********************************************************************************** 788 789 BLOCK SELFFWAIT subroutine 790 ENTRY SELFFWAIT 791 792 BEGFRAME 00178801 6 BASE 793 SFWVOL BSS 1 volume number of file 00178802 6 BASE 794 SFWSERIAL BSS 2 serial number of file 00178804 6 BASE 795 SFWNOFCB BSS 1 ptr to FCB not to check 00178805 6 BASE 796 SFWSAVER2 BSS 1 reg saver 797 ENDFRAME 798 07DFE DD1F8006 6 STAK 799 SELFFWAIT ENTR PUSH 07DFF C1578804 6 BASE 800 STPV SP,SFWNOFCB 07E00 C1578801 6 BASE 801 STPV SP,SFWVOL 07E01 C2578802 6 BASE 802 STPV2L SP,SFWSERIAL 07E02 E4978805 2 6 BASE 803 ST R2 SP,SFWSAVER2 save a reg 804 07E03 60800412 2 805 LD R2 CPPSA current user's PSA 07E04 60889F17 2 2 ZBM 806 LD R2 R2,PSFCBLIST start of lun list 07E05 FAB07E12 2 807 JZA R2 SFWNOTUS jump if no luns - can't be us 808 00007E06 809 SFWMORE LABEL 07E06 62168809 012 BASE 810 LD2 R0 R2,FCSERIAL get the serial number 07E07 66178802 016 BASE 811 CPR2 R0 SP,SFWSERIAL does it match? 07E08 FE0C7E11 812 JNE SFWNEXT jump if not 07E09 60088081 0 2 ZBM 813 LD R0 R2,FCDRIVE get volume of this file 07E0A 64178801 0 6 BASE 814 CPR R0 SP,SFWVOL does it match? 07E0B FE0C7E11 815 JNE SFWNEXT jump if not 07E0C 60089835 0 2 ZBM 816 LD R0 R2,FCACCESS get current access 07E0D 64040007 0 IMM 817 CPR R0 FSACSNDA is this no data access? 07E0E FE027E11 818 JEQ SFWNEXT ignore it if so 07E0F 64978804 2 6 BASE 819 CPR R2 SP,SFWNOFCB should we ignore this one? 07E10 FE0C7E13 820 JNE SFWITISUS jump if this is our baby 00007E11 821 SFWNEXT LABEL 07E11 FAB67E06 2 822 LJNA R2 SFWMORE try next one 823 * \ / 824 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1756 (FRQACSCHNG) F 108 Change EQUIP file access 00007E12 825 SFWNOTUS LABEL we will not wait on ourself 07E12 61D7D001 7 7 REG 826 LD R7 R7+1 take good return 827 * \ / 828 00007E13 829 SFWITISUS LABEL we would wait on ourself - don't inc R7 07E13 60978805 2 6 BASE 830 LD R2 SP,SFWSAVER2 restore a reg 07E14 5D1F8006 6 STAK 831 LEAVE POP 832 * --- 833 834 END SELFFWAIT subroutine 835 836 837 END Modify Attribute and Change Access 168 INPUT FREQDHEAD the enclosing block for directory routines 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1757 (FREQDHEAD) F 109 FREQ - Directory utility 3 4 DHEAD BLOCK Directory Manipulation FREQs 5 6 ENTRY FREQDESTR entry for DESTROY 7 ENTRY FREQRENAME entry for RENAME 8 ENTRY FREQSAVE entry for SAVE 9 ENTRY FREQUEQUIP entry for UNEQUIP 10 ENTRY FREQUSAVE entry for UNSAVE 11 ENTRY FREQXSAVE entry for exchange save 12 169 INPUT FREQSAVE the save code 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1758 (FREQSAVE) F 110 FREQ - Directory Save 3 4 BLOCK Save and Exchange-Save FREQs 5 ENTRY FREQSAVE entry for save code 6 ENTRY FREQXSAVE entry for exchange save 7 8 ********************************************************************************** 9 * * 10 * SAVE * 11 * This is the routine to make a temporary file permanent * 12 * by inserting a new entry into the file directory. * 13 * Request is called: * 14 * * 15 * LD R0 * 16 * LD R1 * 17 * LD2 R2 * 18 * FREQ * 19 * * 20 * Returns, R0 = error code|dynamic status * 21 * * 22 * stack required = 20 * 23 * 7 + max ( ACCTFILLOG (4), BLKSPLIT (13), BMOVE (0), * 24 * CHECKNAME (7), DIRXPAND (12), DMOTEWNDOx (7), * 25 * FREEDIR (5), GRUBWNDOx (7), LOCKWAIT (0), * 26 * LUNSEARCH (2), MAPOUTFBI (2), SETMODIFW3 (1), * 27 * SETWNDO3 (4), SRCHDIR (11), SRCHDIRSN (11), * 28 * ULKWNDO1 (1), UNDOA (1), UNDOB (8), * 29 * WSXCLNALL (10) ) * 30 * * 31 ********************************************************************************** 32 33 BLOCK FREQSAVE and FREQXSAVE routines 34 ENTRY FREQSAVE 35 ENTRY FREQXSAVE 36 37 BEGFRAME2 00178800 6 BASE 38 FJSFCB BSS 1 holds FCB pointer of file being saved 00178801 6 BASE 39 FJST1 BSS 1 general temp 00178802 6 BASE 40 FJSR4 BSS 1 save for R4 (keep after FJST1 for LD2) 00178803 6 BASE 41 FJSXFCB BSS 1 #0 sez exchange save ( FCB pointer of saved file ) 00178804 6 BASE 42 SAVENAME BSS 2 00178806 6 BASE 43 SAVEEXT BSS 1 44 ENDFRAME 45 46 * a bit array used to tell if a hardware type can be saved 70000000 ABS 47 SAVEABLEP1 EQU 1*(BIT HTYPESAF)+1*(BIT HTYPERAF)+1*(BIT HTYPECODE) 0A000000 ABS 48 SAVEABLEP2 EQU 1*(BIT HTYPEPATH)+1*(BIT HTYPENULL) 07E15 7A000000 49 SAVEABLET VFD SAVEABLEP1+SAVEABLEP2 07E16 00487E15 50 SAVEABLE PTR SAVEABLET/BIT 0 51 00007E17 52 FREQSAVE LABEL 07E17 EC1F8007 6 STAK 53 STZ PUSH allocate stack frame 07E18 FA8C59D8 2 54 JNEZ R2 UERRORILR illegal request (unassigned sub-op) 55 * R2 = subop, R4 => user process console area, FCB, SP 07E19 FB7059B8 5 56 JZA FCB FERRORLNE3 jump if lun not equipped 07E1A 5C096415 5 ZBM 57 CMZ FCB,FCSAVED check for a unit already saved 07E1B FE0C59C2 58 JNE FERRORLAS jump if lun already saved 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1759 (FREQSAVE) F 110 FREQ - Directory Save 07E1C 60096665 0 5 ZBM 59 LD R0 FCB,FCHTYPE fetch this units hardware type 07E1D 5C307E16 0 @ 60 CMZ @SAVEABLE(R0) check the informative bit 07E1E FE0259A5 61 JEQ FERRORILOP illegal operation on this type file 07E1F 60095835 0 5 ZBM 62 LD R0 FCB,FCACCESS check for type of access 07E20 64040005 0 IMM 63 CPR R0 FSACSDR trying to save a file with destructive read set? 07E21 FE0259A5 64 JEQ FERRORILOP jump if illegal operation 07E22 E5578800 5 6 BASE 65 ST FCB SP,FJSFCB save the FCB pointer 07E23 EC178803 6 BASE 66 STZ SP,FJSXFCB indicate not XSAVE 67 68 * The user supplies the parameters already packed. 69 * Copy them from his registers. 70 07E24 60170803 0 4 BASE 71 LD R0 R4,CAR1 fetch callers R1 07E25 FA2E7E27 0 72 JNEMW R0 NOTDFLTEXT jump if legal default spec 07E26 60040000 0 IMM 73 LD R0 0 user sed -1 for default, can't allow that 00007E27 74 NOTDFLTEXT LABEL 07E27 E417480D 0 5 BASE 75 ST R0 FCB,FCNAMEEXT which is the filename extension 07E28 62170804 014 BASE 76 LD2 R0 R4,CAR2 fetch callers R2 and R3 07E29 E617480B 015 BASE 77 ST2 R0 FCB,FCNAME which contain the file name 07E2A 60D34000 3 5 REG 78 LD R3 FCB get the associated FCB 07E2B DC4032EA 79 CALLNP WSXCLNALL release its pages 07E2C DC005CAD 80 CALL CHECKNAME check for a valid name 07E2D 4017480B 5 BASE 81 PARL FCB,FCNAME pass the name to be checked 07E2E FE0E7F06 82 JMP SVBADNAME error return, no good name 07E2F 61095114 4 5 ZBM 83 LD ULB FCB,FCLIMITPTR get the limit block pointer 07E30 60494182 1 5 ZBM 84 LD R1 FCB,FCTFL fetch the files length 07E31 1849118E 1 4 ZBM 85 ADD R1 ULB,ULDSKUSD see what this would make saved total 07E32 6449018C 1 4 ZBM 86 CPR R1 ULB,ULDSKSAVL and is that over the limit? 07E33 FE047F08 87 JGT SVLIMERR jump if so, give limit error 88 * \ / 89 00007E34 90 RESERC LABEL 07E34 61578800 5 6 BASE 91 LD FCB SP,FJSFCB restore the FCB pointer 07E35 DC0082BF 92 CALL SRCHDIR find the dir entry or insertion point 07E36 40007F1A 93 PARL SAVMSERR error address 07E37 FE027F1E 94 JEQ SVERRNAE name already exists 95 * \ / 96 00007E38 97 XSVSHAR LABEL share code between XSAVE and SAVE 07E38 E497480E 2 5 BASE 98 ST R2 FCB,FCJCXH save UDIR1 index pointer 07E39 E4D7480F 3 5 BASE 99 ST R3 FCB,FCJCDE save directory entry pointer 07E3A 5C090410 4 ZBM 100 CMZ ULB,ULRAFDIR check for a big directory 07E3B FE0C7E49 101 JNE SAVENT2 jump if big DIR, UDIR2 block in 102 * \ / 103 104 ********************************************************************************** 105 * * 106 * We have the UDIR1 of a small directory in WNDO1. * 107 * R3 points to the proper location for the new entry. * 108 * * 109 ********************************************************************************** 110 111 * \ / 07E3C 5C000BD8 112 CMZ WNDO1(UD1LFDE) check for entry in last possible location 07E3D FE0C7E44 113 JNE SAXPND jump if directory will expand 114 * \ / 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1760 (FREQSAVE) F 110 FREQ - Directory Save 07E3E 6096D018 2 3 REG 115 LD R2 R3+FDLNTH produce destination address 07E3F 7052C000 1 3 REG 116 LDN R1 R3 07E40 18440BD8 1 IMM 117 ADD R1 ADR(WNDO1(UD1LFDE)) produce the word count 07E41 FBE8811C 7 118 JSR R7 BMOVE open up a hole 07E42 FBE87EA0 7 119 JSR R7 MAKENTRY place an FD entry there 07E43 FE0E7E67 120 JMP SAVEXIT exit 121 * --- 122 123 ********************************************************************************** 124 * * 125 * The directory is expanding to a RAF type directory. * 126 * Transfer the existing entries to a new block and reprocess * 127 * this request. * 128 * * 129 ********************************************************************************** 130 00007E44 131 SAXPND LABEL 07E44 DC408186 132 CALLNP DIRXPAND convert the dir to raf type 07E45 00007F1A 133 ADR SAVMSERR pass error address 07E46 61578803 5 6 BASE 134 LD FCB SP,FJSXFCB get the second FCB pointer 07E47 FB707E34 5 135 JZA FCB RESERC jump if not exchange save 07E48 FE0E7E94 136 JMP REXSERC exchange save, search directory differently 137 * --- 138 139 ********************************************************************************** 140 * * 141 * We have a UDIR2 of a large directory in WNDO1. * 142 * FCB,FCJCXH points to the proper index in UDIR1 and R3 and * 143 * FCB,FCJCDE point to the proper location for the new entry. * 144 * * 145 ********************************************************************************** 146 00007E49 147 SAVENT2 LABEL 07E49 5C000BD8 148 CMZ WNDO1(UD2LFDE) check for an entry in the last possible spot 07E4A FE0C7E6E 149 JNE SBLKSPLIT jump if the block will split 150 * \ / 07E4B 6096D018 2 3 REG 151 LD R2 R3+FDLNTH produce the destination pointer for the move 07E4C 7052C000 1 3 REG 152 LDN R1 R3 07E4D 18440BD8 1 IMM 153 ADD R1 ADR(WNDO1(UD2LFDE)) produce the word count 07E4E FBE8811C 7 154 JSR R7 BMOVE open up a hole 07E4F FBE87EA0 7 155 JSR R7 MAKENTRY place the new entry there 07E50 DC403276 156 CALLNP ULKWNDO1 release this window for swapping 157 * \ / 158 159 ********************************************************************************** 160 * * 161 * Count the number of entries in this block * 162 * This count is done from scratch rather than derived from the * 163 * previous count because crashes may cause the count to be * 164 * incorrect. * 165 * * 166 ********************************************************************************** 167 168 * \ / 07E51 EDD78801 6 BASE 169 STW SP,FJST1 initialize entry count 07E52 60440818 1 IMM 170 LD R1 ADR WNDO1(FDLNTH) initialize scan address 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1761 (FREQSAVE) F 110 FREQ - Directory Save 171 * These skip one entry since there must 172 * be at least one (we just put one in). 173 * \ / 00007E53 174 ECNLP LABEL 07E53 5C164800 1 BASE 175 CMZ R1,0 is this entry the end? 07E54 FE027E59 176 JEQ ECNLVP zero indicates not an entry 07E55 D0178801 6 BASE 177 INC SP,FJST1 count this entry 07E56 18440018 1 IMM 178 ADD R1 FDLNTH advance pointer to next entry 07E57 64440BE8 1 IMM 179 CPR R1 ADR WNDO1(UDLFDE) check for end of this block 07E58 FE0A7E53 180 JLE ECNLP return iff not off end 181 * \ / 182 00007E59 183 ECNLVP LABEL entry count in SP,FJST1 07E59 62000802 01 184 LD2 R0 WNDO1/FDNAME fetch the name of the first entry 07E5A E6178804 016 BASE 185 ST2 R0 SP,SAVENAME save the name for later 07E5B 60000804 0 186 LD R0 WNDO1/FDEXTEN get the extension 07E5C E4178806 0 6 BASE 187 ST R0 SP,SAVEEXT and save temporarily 188 * \ / 189 190 ********************************************************************************** 191 * * 192 * We go back and update the UDIR1 block. The * 193 * UDIR1 may be left unlocked because it may be swapped with * 194 * or without these updates. In order to save disk transfers, * 195 * especially on disk recover, we merely demote the UDIR1 * 196 * block. This should cut lots of disk transfers from the * 197 * whole disk recovery. The only problem is that it increases * 198 * the chances that a UDIR1 does not correspond * 199 * to a UDIR2, but this was never guaranteed anyway. * 200 * * 201 ********************************************************************************** 202 203 * \ / 07E5D 6097480E 2 5 BASE 204 LD R2 FCB,FCJCXH load the index pointer 07E5E 60178806 0 6 BASE 205 LD R0 SP,SAVEEXT retrieve the extension 07E5F E4168802 0 2 BASE 206 ST R0 R2,UDINDXEXT and save in index 07E60 62178804 016 BASE 207 LD2 R0 SP,SAVENAME fetch the first entry file name 07E61 E6168800 012 BASE 208 ST2 R0 R2,UDINDXNAM set that into the index 07E62 60178801 0 6 BASE 209 LD R0 SP,FJST1 fetch the count of entries 07E63 E416800C 0 2 CACH 210 ST R0 R2,UDINDXNUM set the new block count 07E64 E4D78801 3 6 BASE 211 ST R3 SP,FJST1 save pointer to DIR entry 07E65 DC40315F 212 CALLNP DMOTEWNDO2 release the primary directory block 07E66 60D78801 3 6 BASE 213 LD R3 SP,FJST1 restore pointer to DIR entry 214 * \ / 215 216 ********************************************************************************** 217 * * 218 * The stack pointer is discarded on exit. * 219 * * 220 ********************************************************************************** 221 222 * \ / 00007E67 223 SAVEXIT LABEL 07E67 5C08D186 3 ZBM 224 CMZ R3,FDLEN check for a nothing file 07E68 FE027E6B 225 JEQ SVDMOT if no data, save forcing a write 226 * \ / 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1762 (FREQSAVE) F 110 FREQ - Directory Save 227 * Call GRUBWNDO here to get the altered file directory queued up for 228 * write. Any pages in the file that have been altered (to this point) 229 * will be written to mass storage first, since the write queue is not 230 * re-ordered. 231 * \ / 07E69 DC403150 232 CALLNP GRUBWNDO1 force out the directory 07E6A FE0E7E6C 233 JMP SAVGRUBBED exit 234 * --- 235 236 * This code frees up the window without causing a write of 237 * the newly modified UDIR block. We use this only when the 238 * file length is zero (i.e. not a SAF, RAF, or CODE). In 239 * this case, we feel confident that full crashproofing is 240 * not mandatory. This saves many writes when doing backup! 241 00007E6B 242 SVDMOT LABEL 07E6B DC40315C 243 CALLNP DMOTEWNDO1 free up the window 00007E6C 244 SAVGRUBBED LABEL 07E6C DC405685 245 CALLNP FREEDIR release grip on directory 07E6D FE0E5982 246 JMP FNOERROR exit 247 * --- 248 249 ********************************************************************************** 250 * * 251 * The current UDIR2 block is splitting. Ensure that the UDIR1 * 252 * block has room to index another UDIR2. Fetch two new blocks and * 253 * divide the current block between them. * 254 * * 255 ********************************************************************************** 256 00007E6E 257 SBLKSPLIT LABEL 07E6E 5C000FF8 258 CMZ WNDO2(UD1LINDX) is last available index used? 07E6F FE0C7F1C 259 JNE SVIDS jump if UDIR1 full 260 * \ / 07E70 DC4081C2 261 CALLNP BLKSPLIT call to split the current UDIR2 block 07E71 00007F1A 262 ADR SAVMSERR pass ms error address 07E72 61578803 5 6 BASE 263 LD FCB SP,FJSXFCB get the second FCB pointer 07E73 FB707E34 5 264 JZA FCB RESERC jump if not exchange save 07E74 FE0E7E94 265 JMP REXSERC exchange save, search directory differently 266 * --- 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1763 (FREQSAVE) F 110 FREQ - Directory Save 268 269 ********************************************************************************** 270 * * 271 * EXCHANGE SAVE ( REPLACE ) * 272 * This FREQ provides the means by which a user may * 273 * completely replace a file in a crashproof manner. That * 274 * is, either the old file or the new file will be present in * 275 * the directory at all times. * 276 * The call must provide the LUN number of the old * 277 * file ( an already saved file ) in R1, and the LUN number * 278 * of the new file ( an unsaved file ) ( in the * 279 * FREQ ). The old file is marked in the directory as a * 280 * file being closed, and is doomed, at the same time that * 281 * a new entry is made for the new file ( with the old name ). * 282 * If the user can UNSAVE the old unit ( not in use * 283 * elsewhere ) then he can do as he pleases with it, but * 284 * the intention is that he will UNEQUIP the unit at which * 285 * time it will go away. * 286 * * 287 * stack required (see FREQSAVE) * 288 * * 289 ********************************************************************************** 290 291 * FCB => FCB for new (unsaved) file 292 00007E75 293 FREQXSAVE LABEL 07E75 EC1F8007 6 STAK 294 STZ PUSH allocate stack frame 07E76 FA8C59D8 2 295 JNEZ R2 UERRORILR illegal request (unassigned sub-op) 07E77 FB7059B8 5 296 JZA FCB FERRORLNE3 jump if lun not equipped 07E78 E5578800 5 6 BASE 297 ST FCB SP,FJSFCB save FCB pointer of new file and 298 * allocate stack space 299 * FCB ptr to new (unsaved) file now in FJSFCB 300 * R2 = subop, R4 => user process console area, FCB, SP 07E79 5C096415 5 ZBM 301 CMZ FCB,FCSAVED check for a unit already saved 07E7A FE0C59C2 302 JNE FERRORLAS jump if lun already saved 07E7B 60096665 0 5 ZBM 303 LD R0 FCB,FCHTYPE fetch this units hardware type 07E7C 5C307E16 0 @ 304 CMZ @SAVEABLE(R0) check this informative bit 07E7D FE0259A5 305 JEQ FERRORILOP illegal operation on this type file 07E7E 60095835 0 5 ZBM 306 LD R0 FCB,FCACCESS check for type of access 07E7F 64040007 0 IMM 307 CPR R0 FSACSNDA trying to save a file with no data access? 07E80 FE0259A5 308 JEQ FERRORILOP jump if illegal operation 07E81 64040005 0 IMM 309 CPR R0 FSACSDR trying to save a file with destructive read set? 07E82 FE0259A5 310 JEQ FERRORILOP jump if illegal operation 07E83 60170803 0 4 BASE 311 LD R0 R4,CAR1 get the LUN number of the old file 07E84 E4178801 0 6 BASE 312 ST R0 SP,FJST1 save this number temporarily 313 314 * This call to WSXCLEAN will cause any altered pages to be queued 315 * for idle write. 07E85 60D34000 3 5 REG 316 LD R3 FCB get the FCB of the unsaved file 07E86 DC4032EA 317 CALLNP WSXCLNALL release its pages 07E87 61095114 4 5 ZBM 318 LD ULB FCB,FCLIMITPTR get the limit block pointer (new files DIR) 07E88 60494182 1 5 ZBM 319 LD R1 FCB,FCTFL fetch the new files length 07E89 1849118E 1 4 ZBM 320 ADD R1 ULB,ULDSKUSD see what this would make saved total 07E8A 6449018C 1 4 ZBM 321 CPR R1 ULB,ULDSKSAVL and is that over the limit? 07E8B FE047F08 322 JGT SVLIMERR jump if so, give limit error 323 * \ / 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1764 (FREQSAVE) F 110 FREQ - Directory Save 07E8C 60D78801 3 6 BASE 324 LD R3 SP,FJST1 retrieve the unit number of the old (saved) file 07E8D DC405B39 325 CALLNP LUNSEARCH find the FCB for that LUN 07E8E FB707F25 5 326 JZA FCB XSVERRLNE jump if no such LUN 07E8F 5C096415 5 ZBM 327 CMZ FCB,FCSAVED check to see if saved 07E90 FE027F29 328 JEQ XSVERRLNS old LUN not saved 329 * since the old LUN must be saved, and 330 * the new unit must not be saved, the two 331 * units are now guarenteed to be different 07E91 65095114 4 5 ZBM 332 CPR ULB FCB,FCLIMITPTR ensure that the two files are 07E92 FE0C7F20 333 JNE XSVERRILR on the same account 07E93 E5578803 5 6 BASE 334 ST FCB SP,FJSXFCB save pointer to old (saved) file 335 * \ / 336 00007E94 337 REXSERC LABEL 07E94 DC0082BB 338 CALL SRCHDIRSN find the existing files dir entry 07E95 40007F1A 339 PARL SAVMSERR error address 340 * \ / 07E96 FE027E98 341 JEQ REXSOK jump if entry found okay 07E97 00131170 342 HALT HALTS1170 a saved file was not found in DIR 343 * --- 344 345 ********************************************************************************** 346 * * 347 * Here we get the new file name out of the directory instead * 348 * of the FCB because it is possible that the original file got * 349 * renamed right out from under us. * 350 * * 351 ********************************************************************************** 352 00007E98 353 REXSOK LABEL 07E98 61578800 5 6 BASE 354 LD FCB SP,FJSFCB retrieve FCB pointer for new file 07E99 6216C802 013 BASE 355 LD2 R0 R3,FDNAME get the files proper name 07E9A E617480B 015 BASE 356 ST2 R0 FCB,FCNAME copy to the new files FCB 07E9B 6016C804 0 3 BASE 357 LD R0 R3,FDEXTEN and extension 07E9C E417480D 0 5 BASE 358 ST R0 FCB,FCNAMEEXT save the extension 07E9D 5C08DE10 3 ZBM 359 CMZ R3,FDFBD check status of previous entry 07E9E FE0C7F23 360 JNE XSVERRPUG prior unit has already been destroyed!! 07E9F FE0E7E38 361 JMP XSVSHAR go share code with save 362 * --- 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1765 (FREQSAVE) F 110 FREQ - Directory Save 364 365 ********************************************************************************** 366 * * 367 * Routine to produce a directory entry, given a pointer * 368 * to the open place in the file directory in R3, and the FCB * 369 * pointer in FCB. * 370 * JSR R7 MAKENTRY * 371 * * 372 * Eats R0:R2, R4 * 373 * * 374 ********************************************************************************** 375 00007EA0 376 MAKENTRY LABEL 07EA0 60440060 1 IMM 377 LD R1 FDLNTH*CPW load length of a file directory entry 07EA1 6092C000 2 3 REG 378 LD R2 R3 copy the entry address 07EA2 FE580000 379 CFILL 000 and clear the entry position 380 * \ / 381 07EA3 60001EFC 0 382 LD R0 SYSTEMSUN get the start up number 07EA4 E416C000 0 3 CACH 383 ST R0 R3,FDSUN place into the new FD entry 384 07EA5 60101EE7 0 @ 385 LD R0 @FDATEPTR fetch the date 07EA6 E416C807 0 3 BASE 386 ST R0 R3,FDLCD set the last changed date 07EA7 E416C808 0 3 BASE 387 ST R0 R3,FDLACC set the last accessed date 07EA8 EC16C809 3 BASE 388 STZ R3,FDLBU indicate never backed up 07EA9 6004005A 0 IMM 389 LD R0 PURGESDV load the purge default value 07EAA E416C018 0 3 CACH 390 ST R0 R3,FDPURGE set the purge interval 391 07EAB 60096665 0 5 ZBM 392 LD R0 FCB,FCHTYPE get type of file 07EAC E408EA60 0 3 ZBM 393 ST R0 R3,FDET set the type into the directory entry 07EAD 64040002 0 IMM 394 CPR R0 HTYPERAF is this a RAF? 07EAE FE027EB1 395 JEQ ITSARAF need to set the RAF type field 07EAF 64040003 0 IMM 396 CPR R0 HTYPECODE is this a code file? 07EB0 FE0C7EB5 397 JNE NOTARAF treat normal then 398 * \ / 399 00007EB1 400 ITSARAF LABEL 07EB1 60095826 0 5 ZBM 401 LD R0 FCB,FCRAFTYPE determine the type of RAF 07EB2 E408FC20 0 3 ZBM 402 ST R0 R3,FDRAFTYPE set it in the FDE 07EB3 5D606CEC 0 403 XCT RAFROOTGET(R0) pick up the root block 07EB4 FE0E7EB6 404 JMP SETTHEDA go set the disk address 405 * --- 406 00007EB5 407 NOTARAF LABEL 07EB5 60097182 0 5 ZBM 408 LD R0 FCB,FCLPBLK load the load point block 00007EB6 409 SETTHEDA LABEL 07EB6 E408D185 0 3 ZBM 410 ST R0 R3,FDDA store into the entry 411 * \ / 07EB7 60494182 1 5 ZBM 412 LD R1 FCB,FCTFL fetch the total file length 413 PLOCK ULLIMLOCK critical region to update ULB limits 07EB8 0CC00000 413 IOFF 07EB9 D1C01EAF 413 SETT ULLIMLOCK 07EBA FE0C7EBC 413 JNE MA(2+DISPW MA 0) 07EBB DC40308B 413 CALLNP LOCKWAIT 07EBC 9849118E 1 4 ZBM 414 ADDM R1 ULB,ULDSKUSD update the total saved space 07EBD B057080F 1 4 BASE 415 RSBM R1 ULB,ULSCRDSK remove from scratch space 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1766 (FREQSAVE) F 110 FREQ - Directory Save 07EBE FE067EC0 416 JGE SCRNONNEG check for total going negative 07EBF EC17080F 4 BASE 417 STZ ULB,ULSCRDSK iff negative, start over at zero 418 * \ / 419 00007EC0 420 SCRNONNEG LABEL 421 PUNLOCK ULLIMLOCK release held lock 07EC0 EC001EAF 421 STZ ULLIMLOCK 07EC1 0C800000 421 ION 07EC2 5D4061D4 422 XCT UPDATEDR(0) set file length and end pointers 07EC3 60095835 0 5 ZBM 423 LD R0 FCB,FCACCESS get current access 07EC4 5D6061DC 0 424 XCT INITFCB(R0) initialize file length 07EC5 62174809 015 BASE 425 LD2 R0 FCB,FCSERIAL get the file serial number 07EC6 E616C80A 013 BASE 426 ST2 R0 R3,FDSERNO save all important number 07EC7 6217480B 015 BASE 427 LD2 R0 FCB,FCNAME fetch name from FCB 07EC8 E616C802 013 BASE 428 ST2 R0 R3,FDNAME save name in dir entry 07EC9 6017480D 0 5 BASE 429 LD R0 FCB,FCNAMEEXT get the file name extension 07ECA E416C804 0 3 BASE 430 ST R0 R3,FDEXTEN save in the directory entry 07ECB 60440000 1 IMM 431 LD R1 FDACSRW creator of file starts with RW privilege 07ECC E448D830 1 3 ZBM 432 ST R1 R3,FDPRIV and put in FDE 07ECD 60095835 0 5 ZBM 433 LD R0 FCB,FCACCESS get the user's current access 07ECE 5D607ED6 0 434 XCT CAKTAB(R0) set the appropriate current access count 435 * for this LUNs reference 07ECF EDC8C101 3 ZBM 436 STW R3,FDCUSE one current user 07ED0 EDC96415 5 ZBM 437 STW FCB,FCSAVED indicate that this lun is now saved 07ED1 5C178803 6 BASE 438 CMZ SP,FJSXFCB check for exchange save operation 07ED2 FE0C7EDE 439 JNE FIXSAVE jump if exchange save 07ED3 60096809 0 5 ZBM 440 LD R0 FCB,FCSERIAL/DATEHORD get time from serial number 07ED4 E416C80F 0 3 BASE 441 ST R0 R3,FDCREDAT and use as creation date 00007ED5 442 RETURNTC LABEL 07ED5 5CD3C000 7 REG 443 LDPCS R7 return to caller 444 * --- 445 00007ED6 446 CAKTAB LABEL 07ED6 EDC8E01C 3 ZBM 447 STW R3,FDWACS access is RW 07ED7 EDC8C10C 3 ZBM 448 STW R3,FDRACS access is RO 07ED8 EDC8E01C 3 ZBM 449 STW R3,FDWACS access is AO 07ED9 EDC8C10C 3 ZBM 450 STW R3,FDRACS access is XO 07EDA EDC8E2FC 3 ZBM 451 STW R3,FDMWACS access is MW 07EDB 00131171 452 HALT HALTS1171 access is DR 07EDC 00131172 453 HALT HALTS1172 unused code 07EDD FEC00000 454 NOP 0 access is NDA 455 456 ********************************************************************************** 457 * * 458 * Fixup for exchange save. Copies the share list from * 459 * the old entry into the new entry and clears it in the old. * 460 * Sets the "file being closed" bit in the old entry. * 461 * Clears the file log flag in the old entry if set, then sets * 462 * it in the new entry and calls accounting routine to log this. * 463 * Moves USRFLD into the new entry. * 464 * R3 => new entry, old entry is FDLNTH words higher * 465 * * 466 ********************************************************************************** 467 00007EDE 468 FIXSAVE LABEL 07EDE 6016C826 0 3 BASE 469 LD R0 R3,FDUSRFLD(FDLNTH) pick up the old user defined field 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1767 (FREQSAVE) F 110 FREQ - Directory Save 07EDF E416C80E 0 3 BASE 470 ST R0 R3,FDUSRFLD set it in the new entry 07EE0 5C16C82C 3 BASE 471 CMZ R3,FDSHL(FDLNTH) is this a pointer to a block? 07EE1 FE087EF5 472 JLT FIXFSN if so adjust the FSN in the block 473 * \ / 474 00007EE2 475 FIXFINISH LABEL 07EE2 60440003 1 IMM 476 LD R1 UDSHLSIZE-1 set count for move 00007EE3 477 FIXLOOP LABEL 07EE3 601CC82C 0 31 BASE 478 LD R0 R3,FDSHL(FDLNTH)(R1) load word from old share list 07EE4 EC1CC82C 31 BASE 479 STZ R3,FDSHL(FDLNTH)(R1) clear that word 07EE5 E41CC814 0 31 BASE 480 ST R0 R3,FDSHL(R1) set into new entry share list 07EE6 FA667EE3 1 481 JDR R1 FIXLOOP count out entire share list 482 * \ / 483 07EE7 6016C827 0 3 BASE 484 LD R0 R3,FDCREDAT(FDLNTH) get the original files creation date 07EE8 E416C80F 0 3 BASE 485 ST R0 R3,FDCREDAT and copy as new files 07EE9 6016C821 0 3 BASE 486 LD R0 R3,FDLBU(FDLNTH) get the old last-back-up date 07EEA E416C809 0 3 BASE 487 ST R0 R3,FDLBU and save as new files 07EEB 6016D018 0 3 REG 488 LD R0 R3+FDLNTH get pointer to old entry 07EEC EDC81E10 0 ZBM 489 STW R0,FDFBD set the "file being destroyed" bit 07EED D1883A10 0 ZBM 490 CLRT R0,FDFLOG clear this bit and see if set 07EEE FE027ED5 491 JEQ RETURNTC return if not logging 07EEF EDC8FA10 3 ZBM 492 STW R3,FDFLOG set bit in new FDE 07EF0 E4D78801 3 6 BASE 493 ST R3 SP,FJST1 save FDE pointer 07EF1 DC005C3D 494 CALL ACCTFILLOG log this historic event 07EF2 40440015 IMM 495 PARVL APTXSAVE an exchange save happened!!! 07EF3 60D78801 3 6 BASE 496 LD R3 SP,FJST1 restore the FDE pointer 07EF4 FE0E7ED5 497 JMP RETURNTC return to caller 498 * --- 499 500 ********************************************************************************** 501 * * 502 * Adjust the file serial number in the FBI of the share list * 503 * block to be that of the new file. * 504 * * 505 ********************************************************************************** 506 00007EF5 507 FIXFSN LABEL 07EF5 E6D78801 346 BASE 508 ST2 R3 SP,FJST1 save addr of new entry 07EF6 6116C82C 4 3 BASE 509 LD R4 R3,FDSHL(FDLNTH) get the block's address 510 * (from old entry, one down the line) 07EF7 60494081 1 5 ZBM 511 LD R1 FCB,FCDRIVE get the volume number 07EF8 E44B0080 1 4 CBM 512 ST R1 R4/VOLFIELD and add to block address 07EF9 DC003202 513 CALL SETWNDO3 read in the block 07EFA 41440002 IMM 514 PARV VPCNTLW+VPCNTLLK write access and locked 07EFB 41534000 5 REG 515 PARV FCB new file's FCB 07EFC 41007F0B 516 PAR BADMSSL where to go if errors 07EFD 41530000 4 REG 517 PARV R4 address of block 07EFE 40440012 IMM 518 PARVL FBITFSLB expected FBI type 519 07EFF 62174809 015 BASE 520 LD2 R0 FCB,FCSERIAL get the new file's serial number 07F00 E6168808 012 BASE 521 ST2 R0 R2,FBISERNO set the serial number in the FSLB's FBI 07F01 DC40261B 522 CALLNP MAPOUTFBI ION, FBI gone 523 07F02 DC40325D 524 CALLNP SETMODIFW3 say window is modified 07F03 DC403156 525 CALLNP GRUBWNDO3 release the window 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1768 (FREQSAVE) F 110 FREQ - Directory Save 07F04 62D78801 346 BASE 526 LD2 R3 SP,FJST1 restore addr of new entry 07F05 FE0E7EE2 527 JMP FIXFINISH 528 * --- 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1769 (FREQSAVE) F 110 FREQ - Directory Save 530 531 ********************************************************************************** 532 * * 533 * Error routines. These routines first call the appropriate * 534 * subroutines to undo the partial save, then cause the * 535 * proper error code to be issued. * 536 * Note that the stack pointer is abandoned when exitting. * 537 * * 538 ********************************************************************************** 539 00007F06 540 SVBADNAME LABEL 'bad file name' 07F06 DC407F2C 541 CALLNP UNDOA undo FCNAME 07F07 FE0E59B6 542 JMP FERRORBFN call the error processor 543 * --- 544 00007F08 545 SVLIMERR LABEL 07F08 DC407F2C 546 CALLNP UNDOA undo FCNAME 07F09 60040088 0 IMM 547 LD R0 XREQERISAV 'insufficient saved space' 07F0A FE0E5983 548 JMP FERROR call the error processor 549 * --- 550 00007F0B 551 BADMSSL LABEL 07F0B DC40261B 552 CALLNP MAPOUTFBI ION, FBI gone 07F0C 60978801 2 6 BASE 553 LD R2 SP,FJST1 R2 -> new entry 07F0D 60128000 0 2 REG 554 LD R0 R2 07F0E 18040018 0 IMM 555 ADD R0 FDLNTH R0 -> old entry 07F0F 604A2CA0 1 0 CBM 556 LD R1 R0/DISPFIELD displacement in the block 07F10 30440400 1 IMM 557 RSB R1 WPP R1 = number of words to move 07F11 1C440004 1 IMM 558 MUL R1 CPW turn into a character count 07F12 FE400000 559 CMOVE close our new entry 07F13 60440060 1 IMM 560 LD R1 FDLNTH*CPW number of chars in an entry 07F14 FE580000 561 CFILL 000 zero-fill last entry 562 07F15 EC096415 5 ZBM 563 STZ FCB,FCSAVED say file is not saved 07F16 61178802 4 6 BASE 564 LD ULB SP,FJSR4 restore ULD pointer 07F17 DC403156 565 CALLNP GRUBWNDO3 get rid of offending window 07F18 DC407F30 566 CALLNP UNDOB undo FCNAME and dispose of other windows 07F19 FE0E59CA 567 JMP FERRORDSE disk error handler 568 * --- 569 00007F1A 570 SAVMSERR LABEL mass storage error 07F1A DC407F2C 571 CALLNP UNDOA call to undo some work 07F1B FE0E59CA 572 JMP FERRORDSE give user disk structure error 573 * --- 574 00007F1C 575 SVIDS LABEL directory overflow 07F1C DC407F30 576 CALLNP UNDOB undo limit adjustments 07F1D FE0E59D2 577 JMP FERRORISYR give insufficient system resources 578 * --- 579 00007F1E 580 SVERRNAE LABEL name already exists 07F1E DC407F30 581 CALLNP UNDOB undo the limit adjustments 07F1F FE0E59C4 582 JMP FERRORNAE go do the error 583 * --- 584 00007F20 585 XSVERRILR LABEL 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1770 (FREQSAVE) F 110 FREQ - Directory Save 07F20 61578800 5 6 BASE 586 LD FCB SP,FJSFCB get the scratch file FCB back 07F21 DC407F2C 587 CALLNP UNDOA undo local stuff 07F22 FE0E59A5 588 JMP FERRORILOP go do the error 589 * --- 590 00007F23 591 XSVERRPUG LABEL prior unit already destroyed 07F23 DC407F30 592 CALLNP UNDOB undo lots of stuff 07F24 FE0E59BC 593 JMP FERRORFHBD indicate appropriate error 594 * --- 595 00007F25 596 XSVERRLNE LABEL prior unit does not exist 07F25 61578800 5 6 BASE 597 LD FCB SP,FJSFCB => FCB of new (unsaved) unit 07F26 DC407F2C 598 CALLNP UNDOA undo local stuff 07F27 60D78801 3 6 BASE 599 LD R3 SP,FJST1 get the unit number that we couldn't find 07F28 FE0E59B8 600 JMP FERRORLNE3 indicate appropriate error 601 * --- 602 00007F29 603 XSVERRLNS LABEL prior unit was not saved 07F29 61578800 5 6 BASE 604 LD FCB SP,FJSFCB => FCB of new (unsaved) unit 07F2A DC407F2C 605 CALLNP UNDOA undo local stuff 07F2B FE0E59BE 606 JMP FERRORLNS indicate unit not saved 607 * --- 608 609 END FREQSAVE and FREQXSAVE routines 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1771 (FREQSAVE) F 110 FREQ - Directory Save 611 612 ********************************************************************************** 613 * * 614 * A group of routines to undo things. They are called * 615 * when errors occur and the partially completed save must * 616 * be undone. * 617 * Call with FCB => file control block * 618 * * 619 * UNDOA stack required = 1 * 620 * UNDOB stack required = 8 * 621 * 1 + max ( FREEDIR (5), GRUBWNDOx (7), UNDOA (1) ) * 622 * * 623 ********************************************************************************** 624 625 BLOCK UNDOA subroutine 626 ENTRY UNDOA 627 628 BEGFRAME 629 ENDFRAME 630 07F2C DD5F8001 6 STAK 631 UNDOA ENTRNP PUSH 07F2D EE17480B 5 BASE 632 STZ2 FCB,FCNAME clear the name for cleanliness 07F2E EC17480D 5 BASE 633 STZ FCB,FCNAMEEXT (next to godliness, you know) 07F2F 5D1F8001 6 STAK 634 LEAVE POP 635 * --- 636 637 END UNDOA subroutine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1772 (FREQSAVE) F 110 FREQ - Directory Save 639 640 BLOCK UNDOB subroutine 641 ENTRY UNDOB 642 643 BEGFRAME 644 ENDFRAME 645 07F30 DD5F8001 6 STAK 646 UNDOB ENTRNP PUSH 07F31 DC403150 647 CALLNP GRUBWNDO1 unlock the directory page 07F32 DC403153 648 CALLNP GRUBWNDO2 make clean sweep 649 * (may be called with window not mapped) 07F33 DC405685 650 CALLNP FREEDIR release grip on directory 07F34 DC407F2C 651 CALLNP UNDOA do earlier level 07F35 5D1F8001 6 STAK 652 LEAVE POP 653 * --- 654 655 END UNDOB subroutine 656 657 658 END Save and Exchange-Save FREQs 170 INPUT FREQUSAVE the code for unsave 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1773 (FREQUSAVE) F 111 FREQ - Directory Unsave 3 4 BLOCK Unsave FREQ 5 6 ENTRY FREQUSAVE entry for unsave code 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1774 (FREQUSAVE) F 111 FREQ - Directory Unsave 8 9 ********************************************************************************** 10 * This is the routine to remove an entry from the file * 11 * directory, thereby making a permanent file back into a temporary * 12 * file. * 13 * * 14 * Stack required = 16 * 15 * 0 + max ( ACCTFILLOG (4), FERROR (3), FREEDIR (5), * 16 * GRUBWNDOx (7), PRIV2MOD (2), SRCHDIRSN (11), * 17 * USVREM (16) ) * 18 * * 19 ********************************************************************************** 20 21 * This code stores nothing on the stack although it 22 * calls routines that do use the stack 23 24 BLOCK FREQUSAVE routine 25 ENTRY FREQUSAVE 26 00007F36 27 FREQUSAVE LABEL 07F36 FA8C59D8 2 28 JNEZ R2 UERRORILR illegal request (unassigned sup-op) 07F37 FB7059B8 5 29 JZA FCB FERRORLNE3 jump if lun not equipped 07F38 5C096415 5 ZBM 30 CMZ FCB,FCSAVED check for unit saved 07F39 FE0259BE 31 JEQ FERRORLNS jump if lun not saved 32 * \ / 07F3A DC005BF2 33 CALL PRIV2MOD may I diddle this dir? 07F3B 41497415 5 ZBM 34 PARV FCB,FCSPOOLED indicates whether file opened for the spooler 07F3C 40494E45 5 ZBM 35 PARVL FCB,FCPRIV priv code 07F3D FE0E59AC 36 JMP FERRORPFM give error if can't 37 * \ / 38 39 ********************************************************************************** 40 * * 41 * Unsave uses no parameters. Proceed with the actual * 42 * directory lookup. * 43 * * 44 ********************************************************************************** 45 46 * \ / 07F3E 61095114 4 5 ZBM 47 LD ULB FCB,FCLIMITPTR get the limit block pointer 48 07F3F DC0082BB 49 CALL SRCHDIRSN find the dir entry 07F40 40005983 50 PARL FERROR error address 51 07F41 FE027F43 52 JEQ FUSOKAY jump if entry found okay 07F42 00131180 53 HALT HALTS1180 saved file no longer in DIR 54 * --- 55 00007F43 56 FUSOKAY LABEL 07F43 E497480E 2 5 BASE 57 ST R2 FCB,FCJCXH save UDIR1 index pointer 07F44 E4D7480F 3 5 BASE 58 ST R3 FCB,FCJCDE save pointer to this entry 07F45 6008C101 0 3 ZBM 59 LD R0 R3,FDCUSE check the current use count 07F46 64040001 0 IMM 60 CPR R0 1 should be exactly one ( for us ) 07F47 FE0C7F4F 61 JNE USVERFBZ jump if file busy error 07F48 5C08FA10 3 ZBM 62 CMZ R3,FDFLOG should we log this destroy? 07F49 FE027F4C 63 JEQ NOLOG 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1775 (FREQUSAVE) F 111 FREQ - Directory Unsave 07F4A DC005C3D 64 CALL ACCTFILLOG log the file access in the accounting files 07F4B 40440010 IMM 65 PARVL APTFBC file being destroyed 66 * \ / 67 00007F4C 68 NOLOG LABEL 07F4C DC40812E 69 CALLNP USVREM call to remove the directory entry 07F4D 00005983 70 ADR FERROR mass storage error address 71 * \ / 07F4E FE0E5982 72 JMP FNOERROR exit 73 * --- 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1776 (FREQUSAVE) F 111 FREQ - Directory Unsave 75 76 ********************************************************************************** 77 * * 78 * Cleanup and give the file busy error * 79 * * 80 ********************************************************************************** 81 00007F4F 82 USVERFBZ LABEL file in use 07F4F DC405685 83 CALLNP FREEDIR release the directory 07F50 DC403150 84 CALLNP GRUBWNDO1 unlock the directory page 07F51 DC403153 85 CALLNP GRUBWNDO2 make a clean sweep 07F52 FE0E59B2 86 JMP FERRORFBZ go do the error 87 * --- 88 89 END FREQUSAVE routine 90 91 END Unsave FREQ 171 INPUT FREQUEQUIP code for unequip 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1777 (FREQUEQUIP) F 112 FREQ - unequip processor 3 4 BLOCK Unequip and Destroy FREQs 5 6 ENTRY FREQDESTR entry for the DESTROY operation 7 ENTRY FREQUEQUIP entry for the unequip operation 8 ENTRY CLOSEUNIT close device, given UCE 9 ENTRY CLOSEUNITF close device, given FCB 10 ENTRY CLEANUNITS remove all local units 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1778 (FREQUEQUIP) F 112 FREQ - unequip processor 12 13 ********************************************************************************** 14 * * 15 * UNEQUIP * 16 * This routine unlinks a file. To do so, the FCB is * 17 * removed from the lunlist and the ULB is released from this * 18 * access. * 19 * The data on the file is disposed of as follows: * 20 * 1.) a saved file - decrement the current use count * 21 * 2.) a saved file being closed - decrement the current * 22 * use count, if it becomes zero, remove the dir entry * 23 * and free the data. * 24 * 3.) a scratch file - free the data. * 25 * 4.) a hardware type - pass to the proper device driver * 26 * * 27 * Stack required = 22 * 28 * 0 + max ( CLOSEUNIT (22), PRIV2MOD (2), UNLINKUCE (1) ) * 29 * * 30 ********************************************************************************** 31 32 33 BLOCK FREQDESTR and FREQUEQUIP routines 34 ENTRY FREQDESTR 35 ENTRY FREQUEQUIP 36 37 00007F53 38 FREQUEQUIP LABEL 07F53 64840001 2 IMM 39 CPR R2 UNEQPMAX sub op a legal operation 07F54 FE0659D8 40 JGE UERRORILR illegal request (unassigned sub-op) 07F55 5CA47F56 2 41 LDPC UNEQPJMP(R2) go to appropriate routine 42 * --- 43 00007F56 44 UNEQPJMP LABEL 07F56 00007F57 45 VFD ADR FRUEQUIPR do close with rewind 00000001 ABS 46 UNEQPMAX EQU DISPW UNEQPJMP largest allowable sub-op 47 00007F57 48 FRUEQUIPR LABEL close with rewind 07F57 FB7059BA 5 49 JZA FCB FERRORNSL jump if unit not opened 50 * \ / 51 00007F58 52 FREQUDEN LABEL 07F58 64C400CA 3 IMM 53 CPR R3 LUNAOUT is he closing 202? 07F59 FE0259AC 54 JEQ FERRORPFM no such luck! 07F5A 64C400C9 3 IMM 55 CPR R3 LUNAIN is he closing 201? 07F5B FE0259AC 56 JEQ FERRORPFM no such luck! 07F5C DC005DD0 57 CALL UNLINKUCE remove the UCE 07F5D 4052C000 3 REG 58 PARVL R3 indicate unit number 07F5E 60D20000 3 0 REG 59 LD R3 R0 set R3 for the CALL 07F5F DC407F6E 60 CALLNP CLOSEUNIT close the file 07F60 FE0E59CA 61 JMP FERRORDSE jump for disk errors 07F61 FE0E59D6 62 JMP NOERROR return 63 * --- 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1779 (FREQUEQUIP) F 112 FREQ - unequip processor 65 66 ********************************************************************************** 67 * * 68 * DESTROY * 69 * This routine is used to get rid of a file without * 70 * needing to worry about scratch space limits and whether it * 71 * is currently in use or not. ( if currently in use, it will * 72 * go away when its use count goes to zero ) * 73 * * 74 * stack required (see FREQUEQUIP) * 75 * * 76 ********************************************************************************** 77 00007F62 78 FREQDESTR LABEL entry for destroy 07F62 FA8C59D8 2 79 JNEZ R2 UERRORILR illegal request (unassigned sub-op) 07F63 FB7059BA 5 80 JZA FCB FERRORNSL jump if not equipped 07F64 DC005BF2 81 CALL PRIV2MOD may I diddle this dir? 07F65 41497415 5 ZBM 82 PARV FCB,FCSPOOLED indicates whether file opened for the spooler 07F66 40494E45 5 ZBM 83 PARVL FCB,FCPRIV 07F67 FE0E59AC 84 JMP FERRORPFM give error if not 07F68 EDC97815 5 ZBM 85 STW FCB,FCFBD set bit to OR into dir entry 07F69 EC130000 4 REG 86 STZ R4 indicate to do a rewind 07F6A FE0E7F58 87 JMP FREQUDEN go share some code 88 * --- 89 90 END FREQDESTR and FREQUEQUIP routines 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1780 (FREQUEQUIP) F 112 FREQ - unequip processor 92 93 ********************************************************************************** 94 * * 95 * CLOSEUNITF closes the file or device associated with * 96 * the given FCB. CLOSEUNIT closes the file or device * 97 * associated with the given unlinked UCE. Both assume that the * 98 * necessary checking, if any, has been done. CLOSEUNIT frees * 99 * the unused UCE. The FCB is dismantled only if the use count * 100 * goes to 0. * 101 * Call: * 102 * FCB => file control block for CLOSEUNITF, * 103 * R3 => unit control element for CLOSEUNIT * 104 * CALLNP CLOSEUNIT/CLOSEUNITF * 105 * * 106 * * 107 * * 108 * Eats R0:R3 * 109 * Stack required: 22 * 110 * 4 + max ( ACCTFILLOG (4), DMOTEWNDOx (7), DSTRYDEV (14), * 111 * ENDFILWAIT (9), FCFREEMEM (0), FETCHDIR (4), * 112 * FREEDIR (5), FREEULB (11), GRUBWNDOx (7), * 113 * INITDEVACS (18), SAFENDFIX (9), SETACCESS (2), * 114 * SPLRCLOSE (18), SRCHDIRLKS (11), ULKWNDO1 (1), * 115 * UNDOFILELK (12), UNLINKFCB (1), USVREM (16), * 116 * WSXCLNALL (10) ) * 117 * * 118 ********************************************************************************** 119 120 BLOCK CLOSEUNITF and CLOSEUNIT subroutines 121 ENTRY CLOSEUNITF 122 ENTRY CLOSEUNIT 123 124 BEGFRAME 00178801 6 BASE 125 LCD BSS 1 last change date of the file 00178802 6 BASE 126 SAVER45 BSS 2 a safe place! 127 ENDFRAME 128 07F6B DD5F8004 6 STAK 129 CLOSEUNITF ENTRNP PUSH 07F6C E7178802 456 BASE 130 ST2 R4 SP,SAVER45 tuck these away 07F6D FE0E7F74 131 JMP NOUCE go share some code 132 * --- 133 07F6E DD5F8004 6 STAK 134 CLOSEUNIT ENTRNP PUSH 07F6F E7178802 456 BASE 135 ST2 R4 SP,SAVER45 tuck these away 07F70 6148DF11 5 3 ZBM 136 LD FCB R3,UCEFCB get the associated FCB 07F71 DC002F8F 137 CALL UCFREEMEM free the extra element 07F72 41440001 IMM 138 PARV UCELOG indicate size 07F73 4052C000 3 REG 139 PARVL R3 and location 140 * \ / 141 00007F74 142 NOUCE LABEL no more UCE associated with this FCB 07F74 D0494080 5 ZBM 143 DEC FCB,FCBUSYCNT say one less user 07F75 FE047FC7 144 JGT EXIT leave if there are others 07F76 FE027F78 145 JEQ ALLSWELL 07F77 00131191 146 HALT HALTS1191 FCB use count goes negative! 147 * --- 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1781 (FREQUEQUIP) F 112 FREQ - unequip processor 148 149 ********************************************************************************** 150 * * 151 * Check to see if a page is mapped in by any of the above * 152 * and below program areas. This makes sure that no one is * 153 * using the pages of the file that we are trying to give up. * 154 * The system currently ensures that no pages from a file are * 155 * left mapped into any windows when returning from a user * 156 * request. Consequently, we know that the windows do not * 157 * contain any pages from this file. * 158 * * 159 ********************************************************************************** 160 00007F78 161 ALLSWELL LABEL 07F78 60D34000 3 5 REG 162 LD R3 FCB copy FCB for WSXCLNALL routine 07F79 DC4032EA 163 CALLNP WSXCLNALL clean out any old pages from WSX 164 * \ / 07F7A DC405DC3 165 CALLNP UNLINKFCB remove this FCB from the list 07F7B 60C40000 3 IMM 166 LD R3 0 no known directory address 07F7C DC006087 167 CALL INITDEVACS clean up, unlink device 07F7D 40440007 IMM 168 PARVL FSACSNDA indicate new access 07F7E FEC00000 169 NOP 0 allow for error return 07F7F 61095114 4 5 ZBM 170 LD ULB FCB,FCLIMITPTR restore ULB pointer 07F80 FB307FD5 4 171 JZA ULB NOLIMITS jump if none associated with file 07F81 DC405667 172 CALLNP FETCHDIR request access to the directory 07F82 5C096415 5 ZBM 173 CMZ FCB,FCSAVED check for a saved unit 07F83 FE027FB6 174 JEQ FREQUENSV jump to do resident tables if not saved 175 176 * search the directory for this entry 177 00007F84 178 REMAPDIR LABEL 07F84 DC0082B6 179 CALL SRCHDIRLKS find the dir entry 07F85 40007F88 180 PARL DSRMSERR error address 181 * note that this routine loads ULB 07F86 FE027F8E 182 JEQ UEQPELOKAY jump if dir entry found 07F87 00131192 183 HALT HALTS1192 saved file no longer in DIR 184 * --- 185 00007F88 186 DSRMSERR LABEL 07F88 E4178801 0 6 BASE 187 ST R0 SP,LCD save error code 07F89 DC002F8F 188 CALL FCFREEMEM free the unusable FCB 07F8A 41440004 IMM 189 PARV FCLOG specify its length 07F8B 40534000 5 REG 190 PARVL FCB and address 07F8C 60178801 0 6 BASE 191 LD R0 SP,LCD restore error code 07F8D FE0E7FC8 192 JMP ERREXIT leave without incrementing R7 193 * --- 194 00007F8E 195 UEQPELOKAY LABEL 07F8E E497480E 2 5 BASE 196 ST R2 FCB,FCJCXH save UDIR1 index pointer 07F8F E4D7480F 3 5 BASE 197 ST R3 FCB,FCJCDE save pointer to this dir entry 07F90 60097815 0 5 ZBM 198 LD R0 FCB,FCFBD get flag indicating possible destroy 07F91 FC08DE10 0 3 ZBM 199 IORM R0 R3,FDFBD it's this simple 07F92 60097615 0 5 ZBM 200 LD R0 FCB,FCTRANS bit indicating file opened during user update 07F93 FC08F810 0 3 ZBM 201 IORM R0 R3,FDTRANS set into directory 07F94 60096665 0 5 ZBM 202 LD R0 FCB,FCHTYPE pick up type of device 07F95 64040001 0 IMM 203 CPR R0 HTYPESAF check for a SAF 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1782 (FREQUEQUIP) F 112 FREQ - unequip processor 07F96 FE0C7F9B 204 JNE NOENDFIX jump if not 07F97 60096183 0 5 ZBM 205 LD R0 FCB,FCMABLK check for SAF not properly recovered 07F98 FA027F9B 0 206 JEQZ R0 NOENDFIX jump if okay 07F99 DC407FDA 207 CALLNP SAFENDFIX otherwise, fix that last block 07F9A FE0E7F84 208 JMP REMAPDIR SAFENDFIX unmaps the directory window, get it back 209 * --- 00007F9B 210 NOENDFIX LABEL 07F9B DC006184 211 CALL SETACCESS set access info 07F9C 40440007 IMM 212 PARVL FSACSNDA now no data access 07F9D 6016C807 0 3 BASE 213 LD R0 R3,FDLCD get the last change date 07F9E E4178801 0 6 BASE 214 ST R0 SP,LCD save for spooler PW 07F9F DC007DCA 215 CALL ENDFILWAIT see if a waiter can be set going 07FA0 43574809 5 BASE 216 PARV2 FCB,FCSERIAL pass the file serial number 07FA1 41490081 4 ZBM 217 PARV ULB,ULDRIVE and the volume that it is on 07FA2 4056C80C 3 BASE 218 PARVL R3,FDACCESSES and the new accesses 07FA3 60D7480F 3 5 BASE 219 LD R3 FCB,FCJCDE recover pointer to this dir entry 07FA4 5C08FA10 3 ZBM 220 CMZ R3,FDFLOG should we log this close? 07FA5 FE027FA9 221 JEQ DONTLOG 222 * \ / 223 07FA6 DC005C3D 224 CALL ACCTFILLOG log the file access in the accounting files 07FA7 4044000F IMM 225 PARVL APTFILCL file being closed 07FA8 60D7480F 3 5 BASE 226 LD R3 FCB,FCJCDE recover pointer to this dir entry 227 * \ / 228 00007FA9 229 DONTLOG LABEL 07FA9 D048C101 3 ZBM 230 DEC R3,FDCUSE one less current user 07FAA FE027FAD 231 JEQ FILENOTBZY zero sez not busy 07FAB FE047FCA 232 JGT UEQSAVED jump if still busy 07FAC 0013119C 233 HALT HALTS119C more unequips than equips! 234 * --- 235 00007FAD 236 FILENOTBZY LABEL 07FAD 5C08DE10 3 ZBM 237 CMZ R3,FDFBD check for file being destroyed 07FAE FE027FCA 238 JEQ UEQSAVED jump if a regular saved file 239 * \ / 240 241 ********************************************************************************** 242 * Oh boy! We've got a live one! This file has been * 243 * destroyed by some user while we were using it. We are * 244 * nominated to remove this file from the user directory. * 245 * We call USVREM to excise the DIR entry and share list, * 246 * then we update the session and scratch limits. * 247 ********************************************************************************** 248 249 * \ / 07FAF 5C08FA10 3 ZBM 250 CMZ R3,FDFLOG should we log this destroy? 07FB0 FE027FB3 251 JEQ NOLOG 07FB1 DC005C3D 252 CALL ACCTFILLOG log the file access in the accounting files 07FB2 40440010 IMM 253 PARVL APTFBC file being destroyed 254 * \ / 255 00007FB3 256 NOLOG LABEL 07FB3 DC40812E 257 CALLNP USVREM call to remove the directory entry 07FB4 00007F88 258 ADR DSRMSERR error address 07FB5 FE0E7FBB 259 JMP DOLIMITS do limit updating 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1783 (FREQUEQUIP) F 112 FREQ - unequip processor 260 * --- 261 262 ********************************************************************************** 263 * * 264 * Release the directory then destroy the device we are * 265 * linked to. * 266 * * 267 ********************************************************************************** 268 00007FB6 269 FREQUENSV LABEL 07FB6 DC007DCA 270 CALL ENDFILWAIT see if a waiter can be set going 07FB7 43574809 5 BASE 271 PARV2 FCB,FCSERIAL pass the file serial number 07FB8 41490081 4 ZBM 272 PARV ULB,ULDRIVE pass the volume number to ensure uniqueness 07FB9 40440000 IMM 273 PARVL 0 indicate that the file has no use now 07FBA DC405685 274 CALLNP FREEDIR release access to the directory 275 00007FBB 276 DOLIMITS LABEL 07FBB DC406351 277 CALLNP DSTRYDEV deallocate resources 07FBC FEC00000 278 NOP 0 allow for error return 279 00007FBD 280 UEQDONE LABEL 07FBD DC4064E5 281 CALLNP UNDOFILELK release implicit lock 07FBE 60D38000 3 6 REG 282 LD R3 SP for passing parameters 07FBF DC005E60 283 CALL SPLRCLOSE release claim of spooler 07FC0 4056C801 3 BASE 284 PARVL R3,LCD last change date 07FC1 61095114 4 5 ZBM 285 LD ULB FCB,FCLIMITPTR get the ULB pointer 07FC2 FB027FC4 4 286 JEQZ ULB NOULBPTR only for non-existant .DIRs, LUNAIN, and LUNAOUT) 07FC3 DC405526 287 CALLNP FREEULB release our count of the ULB 00007FC4 288 NOULBPTR LABEL 07FC4 DC002F8F 289 CALL FCFREEMEM discard the FCB 07FC5 41440004 IMM 290 PARV FCLOG specify its length 07FC6 40534000 5 REG 291 PARVL FCB and address 00007FC7 292 EXIT LABEL 07FC7 19C40001 7 IMM 293 ADD R7 1 increment return address 00007FC8 294 ERREXIT LABEL 07FC8 63178802 456 BASE 295 LD2 R4 SP,SAVER45 restore these regs 07FC9 5D1F8004 6 STAK 296 LEAVE POP exit with unequip done 297 * --- 298 299 ********************************************************************************** 300 * * 301 * Unequipping a saved file that will remain in the * 302 * directory. Diddling of directory entry is done. We just * 303 * release the directory and then release any association with * 304 * a physical device. * 305 * * 306 ********************************************************************************** 307 00007FCA 308 UEQSAVED LABEL 07FCA DC403276 309 CALLNP ULKWNDO1 release directory window 07FCB DC405685 310 CALLNP FREEDIR release the directory 07FCC 60000414 0 311 LD R0 CPCUPC current process control info 07FCD 5C080C10 0 ZBM 312 CMZ R0,UPBACKUP have we been granted backup privilege 07FCE FE0C7FD2 313 JNE DOGRUBS if not we must write out the directory 07FCF DC40315C 314 CALLNP DMOTEWNDO1 release these windows 07FD0 DC40315F 315 CALLNP DMOTEWNDO2 might want pre-aged dmote here 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1784 (FREQUEQUIP) F 112 FREQ - unequip processor 07FD1 FE0E7FBD 316 JMP UEQDONE release ULB and remove FCB 317 * --- 318 00007FD2 319 DOGRUBS LABEL 07FD2 DC403150 320 CALLNP GRUBWNDO1 write out these blocks 07FD3 DC403153 321 CALLNP GRUBWNDO2 07FD4 FE0E7FBD 322 JMP UEQDONE release ULB and remove FCB 323 * --- 324 00007FD5 325 NOLIMITS LABEL release file containing no ULB 07FD5 DC007DCA 326 CALL ENDFILWAIT let other users go 07FD6 43574809 5 BASE 327 PARV2 FCB,FCSERIAL pass the file serial number 07FD7 41440001 IMM 328 PARV 1 pass the system volume number 07FD8 40440000 IMM 329 PARVL 0 current use counts 07FD9 FE0E7FBB 330 JMP DOLIMITS and continue 331 * --- 332 333 END CLOSEUNITF and CLOSEUNIT subroutines 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1785 (FREQUEQUIP) F 112 FREQ - unequip processor 335 336 ********************************************************************************** 337 * * 338 * SAFENDFIX * 339 * This routine is provided to fix up the last block in a * 340 * SAF that was being recovered when backup died (or ?). We * 341 * found the last block pointer in FCMABLK. This means that * 342 * RCVR allocated the block, but has not done anything with it. * 343 * FCMSBLK has the address of the second to last file block. * 344 * We get it in window 2 by doing a no-read mapin (since we * 345 * know it has never been mapped) and provide a fixed up FBI * 346 * and an EOD in the data area. * 347 * Call: * 348 * ULB <= account of file owner * 349 * FCB <= file control block * 350 * R0 <= disk address of last block * 351 * CALLNP SAFENDFIX * 352 * * 353 * Eats R0:R3 * 354 * * 355 * Stack required = 9 * 356 * 2 + max ( GRUBWNDO2 (7), MAPOUTFBI (2), SETWNDO2 (4) ) * 357 * * 358 ********************************************************************************** 359 360 BLOCK 361 ENTRY SAFENDFIX 362 363 BEGFRAME 00178801 6 BASE 364 PRIORBLOCK BSS 1 365 ENDFRAME 366 07FDA DD5F8002 6 STAK 367 SAFENDFIX ENTRNP PUSH 07FDB E0095181 0 5 ZBM 368 EXCH R0 FCB,FCMSBLK produce whole disk address and 07FDB E0095181 0 5 ZBM 369 fetch address of previous block 07FDC E4178801 0 6 BASE 370 ST R0 SP,PRIORBLOCK 371 07FDD DC0031FF 372 CALL SETWNDO2 call to produce the block 07FDE 4144001A IMM 373 PARV VPCNTLW+VPCNTLLK+VPCNTLNR indicate locked, no read 07FDF 41534000 5 REG 374 PARV FCB indicate what file 07FE0 41007FEF 375 PAR DSKERROR indicate error address 07FE1 41574801 5 BASE 376 PARV FCB,FCBLOCK indicate disk address 07FE2 40443F8C IMM 377 PARVL FBITFREE*VPFBIOLDB+FBITSAF indicate we want a saf block 378 07FE3 60170804 0 4 BASE 379 LD R0 ULB,ULACCPROJ pick up project 07FE4 E4168807 0 2 BASE 380 ST R0 R2,FBIPROJ and place into FBI 07FE5 62170802 014 BASE 381 LD2 R0 ULB,ULACCNM pick up account 07FE6 E6168805 012 BASE 382 ST2 R0 R2,FBIACCT and place into FBI 07FE7 62174809 015 BASE 383 LD2 R0 FCB,FCSERIAL pick up serial number 07FE8 E6168808 012 BASE 384 ST2 R0 R2,FBISERNO and set into FBI 07FE9 60094148 0 5 ZBM 385 LD R0 FCB,FCCBLK get current block number 07FEA E4089184 0 2 ZBM 386 ST R0 R2,FBIRELBLK and set into FBI 07FEB 60178801 0 6 BASE 387 LD R0 SP,PRIORBLOCK get second-to-last block number 07FEC E4089182 0 2 ZBM 388 ST R0 R2,FBIBLINK and set backward link in FBI 07FED D1400C00 389 STMW WNDO2 set EOD into first word of block 07FEE EC096183 5 ZBM 390 STZ FCB,FCMABLK clear being-recovered flag 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1786 (FREQUEQUIP) F 112 FREQ - unequip processor 391 00007FEF 392 DSKERROR LABEL 07FEF DC40261B 393 CALLNP MAPOUTFBI release the FBI 07FF0 DC403153 394 CALLNP GRUBWNDO2 and dump this block 07FF1 5D1F8002 6 STAK 395 LEAVE POP return 396 * --- 397 398 END of SAFENDFIX routine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1787 (FREQUEQUIP) F 112 FREQ - unequip processor 400 401 ********************************************************************************** 402 * * 403 * CLEANUNITS. * 404 * Takes a pointer to a chain of UCEs in R3 and closes all * 405 * of the UCEs in that chain. * 406 * Call: * 407 * R3 => chain of UCEs * 408 * CALLNP CLEANUNITS * 409 * * 410 * Eats R0:R5 * 411 * Stack required: 24 * 412 * 2 + max ( CLOSEUNIT (22) ) * 413 * * 414 ********************************************************************************** 415 416 BLOCK CLEANUNITS 417 ENTRY CLEANUNITS 418 419 BEGFRAME 00178801 6 BASE 420 CUPTR BSS 1 pointer to remainder of list 421 ENDFRAME 422 07FF2 DD5F8002 6 STAK 423 CLEANUNITS ENTRNP PUSH 07FF3 FAF07FFA 3 424 JZA R3 GONE jump if not among us 00007FF4 425 OVPCFLOOP LABEL loop to close all local units 07FF4 6108DF10 4 3 ZBM 426 LD R4 R3,UCELINK pointer to rest of list 07FF5 E5178801 4 6 BASE 427 ST R4 SP,CUPTR save pointer to list remainder 07FF6 DC407F6E 428 CALLNP CLOSEUNIT close this unit 07FF7 00131193 429 HALT HALTS1193 disk error while closing unit list 430 * \ / 07FF8 60D78801 3 6 BASE 431 LD R3 SP,CUPTR get pointer to next element 07FF9 FAF27FF4 3 432 JNZA R3 OVPCFLOOP do next unit 433 * \ / 434 00007FFA 435 GONE LABEL 07FFA 5D1F8002 6 STAK 436 LEAVE POP 437 * --- 438 439 END CLEANUNITS subroutine 440 441 END Unequip and Destroy FREQs 172 INPUT FREQRENAME code to rename a file 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1788 (FREQRENAME) F 113 FREQ - Rename 3 4 BLOCK Rename FREQ 5 6 ENTRY FREQRENAME entry to rename a file 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1789 (FREQRENAME) F 113 FREQ - Rename 8 9 ********************************************************************************** 10 * * 11 * RENAME * 12 * This request associates a new name with an already * 13 * existing saved file. The file may be in use, since any * 14 * one who needs to use the directory entry will search for * 15 * it by serial number. * 16 * The entry is moved to its new spot in the directory * 17 * (alphabetical sort). This may sound easy to you, but * 18 * remember that it must be crashproof! * 19 * * 20 * Stack required = 25 * 21 * 12 + max ( BLKSPLIT (13), BMOVE (0), CHECKNAME (7), * 22 * DIRSHRINK (13), FORCEWRWx (5), FREEDIR (5), * 23 * FREEFILE (3), GRUBWNDOx (7), LOCKDIR (5), * 24 * PRIV2MOD (2), SETERRW1 (1), SETWNDO1 (4), * 25 * SFREEMEM (0), SGETMEM (0), SRCHDIR (11), * 26 * SRCHDIRLKS (11), TABFREEW2 (7), ULKWNDOx (1), * 27 * UNDOA (1), UNDOB (8) ) * 28 * * 29 ********************************************************************************** 30 31 BLOCK FREQRENAME routine 32 ENTRY FREQRENAME 33 ENTRY FRNAME1 34 ENTRY FROLDEXT 35 36 BEGFRAME2 00178800 6 BASE 37 FRMS1 BSS 1 holds a complete MS address 00178801 6 BASE 38 FRMS2 BSS 1 holds a complete MS address 00178802 6 BASE 39 FRBLOCK BSS 1 holds ptr to block of free storage 00178803 6 BASE 40 FRNCXH BSS 1 (old entry) UDIR1 index 00178804 6 BASE 41 FRNCDE BSS 1 (old entry) directory entry pointer 00178805 6 BASE 42 FROLDEXT BSS 1 holds files old extension 00178806 6 BASE 43 FRNAME1 BSS 2 (double) holds various file names 00178808 6 BASE 44 FREXT1 BSS 1 to hold extension 00178809 6 BASE 45 FRNAME2 BSS 2 (double) holds various file names 0017880B 6 BASE 46 FREXT2 BSS 1 to hold extension 47 ENDFRAME 48 00007FFB 49 FREQRENAME LABEL change name of a file 07FFB EC1F800C 6 STAK 50 STZ PUSH allocate stack frame 07FFC FA8C59D8 2 51 JNEZ R2 UERRORILR illegal request (unassigned sub-op) 07FFD FB7059B8 5 52 JZA FCB FERRORLNE3 jump if lun not equipped 07FFE 5C096415 5 ZBM 53 CMZ FCB,FCSAVED check for unit saved 07FFF FE0259BE 54 JEQ FERRORLNS jump to error if not 55 * \ / 08000 DC005BF2 56 CALL PRIV2MOD may I modify this dir? 08001 41497415 5 ZBM 57 PARV FCB,FCSPOOLED indicates whether file opened for the spooler 08002 40494E45 5 ZBM 58 PARVL FCB,FCPRIV 08003 FE0E59AC 59 JMP FERRORPFM give error if I can't 60 08004 6217480B 015 BASE 61 LD2 R0 FCB,FCNAME save the old file name 08005 E6178806 016 BASE 62 ST2 R0 SP,FRNAME1 for later use (also error recovery) 08006 6017480D 0 5 BASE 63 LD R0 FCB,FCNAMEEXT fetch the current extension 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1790 (FREQRENAME) F 113 FREQ - Rename 08007 E4178805 0 6 BASE 64 ST R0 SP,FROLDEXT and save it on the stack 65 66 * R2 = subop, R4 => user process console area, FCB, SP 67 68 * The user supplies the parameters already packed. 69 * Copy them from his registers. 70 08008 60170803 0 4 BASE 71 LD R0 R4,CAR1 fetch callers R1 08009 FA2C800B 0 72 JEQMW R0 RENMEXT no change to extension if not specified 0800A E417480D 0 5 BASE 73 ST R0 FCB,FCNAMEEXT which is the filename extension 0000800B 74 RENMEXT LABEL 0800B 62170804 014 BASE 75 LD2 R0 R4,CAR2 fetch callers R2 and R3 0800C E617480B 015 BASE 76 ST2 R0 FCB,FCNAME which contain the file name 0800D E6178809 016 BASE 77 ST2 R0 SP,FRNAME2 save the files new name 78 * FCB, SP 0800E DC005CAD 79 CALL CHECKNAME check name for good form 0800F 4017480B 5 BASE 80 PARL FCB,FCNAME pass the name to check 08010 FE0E80D4 81 JMP SUBADNAME jump if not acceptable 00008011 82 RETRY LABEL 08011 DC0082BF 83 CALL SRCHDIR look for the new name 08012 400080D2 84 PARL RNMSERRN error address 85 08013 FE0280D6 86 JEQ FRNERRDE duplicate entry error 08014 E497480E 2 5 BASE 87 ST R2 FCB,FCJCXH save UDIR1 index 08015 E4D7480F 3 5 BASE 88 ST R3 FCB,FCJCDE save the insertion point 08016 5C090410 4 ZBM 89 CMZ ULB,ULRAFDIR check for small directory 08017 FE02801F 90 JEQ FRNSKDOV jump if small dir. - no overflow possible 08018 5C000BD8 91 CMZ WNDO1(UD2LFDE) is this secondary block full? 08019 FE02801F 92 JEQ FRNSKDOV jump if overflow completely ruled out 0801A 5C000FF8 93 CMZ WNDO2(UD1LINDX) is the UDIR1 full up? 0801B FE0C80D9 94 JNE FRNERRDF directory full error 0801C DC4081C2 95 CALLNP BLKSPLIT split the current secondary block 0801D 000080D2 96 ADR RNMSERRN error address 0801E FE0E8011 97 JMP RETRY re-search the directory 98 * --- 99 0000801F 100 FRNSKDOV LABEL the moved entry cannot make a block overflow 0801F 62178806 016 BASE 101 LD2 R0 SP,FRNAME1 get back the old name 08020 E617480B 015 BASE 102 ST2 R0 FCB,FCNAME save in FCB to cut down search time 103 08021 DC0082B6 104 CALL SRCHDIRLKS find the existing directory entry 08022 400080D2 105 PARL RNMSERRN error address 106 08023 FE028025 107 JEQ FRNSFOK jump if element found okay 08024 001311A0 108 HALT HALTS11A0 saved file no longer in directory 109 * --- 00008025 110 FRNSFOK LABEL 08025 E4978803 2 6 BASE 111 ST R2 SP,FRNCXH save the UDIR1 index pointer 08026 E4D78804 3 6 BASE 112 ST R3 SP,FRNCDE save ptr to this entry 08027 600480CB 0 IMM 113 LD R0 ADR RNMERDBLK get the error handler address 08028 DC403190 114 CALLNP SETERRW1 and set for this section 08029 DC002ED0 115 CALL UGETMEM get a block of memory 0802A 40440005 IMM 116 PARVL FDLNTH LOG 2 big enough to hold the dir entry 0802B E4178802 0 6 BASE 117 ST R0 SP,FRBLOCK save the pointer 0802C 60920000 2 0 REG 118 LD R2 R0 make destination address for move 0802D 6012C000 0 3 REG 119 LD R0 R3 get pointer to entry 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1791 (FREQRENAME) F 113 FREQ - Rename 0802E 60440060 1 IMM 120 LD R1 FDLNTH*CPW character count for the move 0802F FE400000 121 CMOVE copy the dir entry into the block 122 08030 60978802 2 6 BASE 123 LD R2 SP,FRBLOCK get a pointer to the block 08031 62178809 016 BASE 124 LD2 R0 SP,FRNAME2 get the new file name 08032 E6168802 012 BASE 125 ST2 R0 R2,FDNAME set the new name into the stashed dir entry 08033 E617480B 015 BASE 126 ST2 R0 FCB,FCNAME put back into the FCB 08034 6017480D 0 5 BASE 127 LD R0 FCB,FCNAMEEXT get the new file extension 08035 E4168804 0 2 BASE 128 ST R0 R2,FDEXTEN and save it 08036 5C090410 4 ZBM 129 CMZ ULB,ULRAFDIR check for a big directory 08037 FE02803B 130 JEQ SMALLDIR small dir will move in place 08038 60978803 2 6 BASE 131 LD R2 SP,FRNCXH get the old entry UDIR1 index 08039 6497480E 2 5 BASE 132 CPR R2 FCB,FCJCXH check for a move to a new block 0803A FE0C8062 133 JNE BIGDIR jump for complicated between block move 134 * \ / 0000803B 135 SMALLDIR LABEL easy move inside one block 0803B 60978804 2 6 BASE 136 LD R2 SP,FRNCDE => existing entry 0803C 6497480F 2 5 BASE 137 CPR R2 FCB,FCJCDE compare with pointer to insertion point 0803D FE02804B 138 JEQ DONTMOVE equal, such luck, just move entry back 0803E FE088046 139 JLT MOVEDOWN jump if old entry below insertion point 140 * \ / old entry is higher than insertion point 0803F 60D7480F 3 5 BASE 141 LD R3 FCB,FCJCDE => insertion point (source for bmove) 08040 6096D018 2 3 REG 142 LD R2 R3+FDLNTH make destination for BMOVE 143 * (move up by one dir entry) 08041 60578804 1 6 BASE 144 LD R1 SP,FRNCDE load location of old entry 08042 1052C000 1 3 REG 145 SUB R1 R3 calculate displacement (size of move) 08043 FBE8811C 7 146 JSR R7 BMOVE move in proper direction 08044 6097480F 2 5 BASE 147 LD R2 FCB,FCJCDE => insertion point 08045 FE0E804B 148 JMP DONTMOVE go move in the modified entry 149 * --- 150 00008046 151 MOVEDOWN LABEL old entry is lower than insertion point 152 * R2 => entry to remove 08046 60169018 0 2 REG 153 LD R0 R2+FDLNTH load source address for move 154 * this moves higher entries down on top of us 08047 6057480F 1 5 BASE 155 LD R1 FCB,FCJCDE get the insertion point 08048 10520000 1 0 REG 156 SUB R1 R0 calculate displacement 08049 604A5F30 1 1 CBM 157 LD R1 R1/FLDCHARS turn into character displacement 0804A FE400000 158 CMOVE move part in between entries 159 * \ / R2 => insertion point!! 0000804B 160 DONTMOVE LABEL 0804B 60178802 0 6 BASE 161 LD R0 SP,FRBLOCK load the source address 0804C 60440060 1 IMM 162 LD R1 FDLNTH*CPW load the move count 0804D FE400000 163 CMOVE move in existing dir entry 0804E 62000802 01 164 LD2 R0 WNDO1/FDNAME get the current first name in block 165 * or garbage if UDIR1 block 0804F E6178806 016 BASE 166 ST2 R0 SP,FRNAME1 save close to us 08050 60000804 0 167 LD R0 WNDO1/FDEXTEN get the extension 08051 E4178808 0 6 BASE 168 ST R0 SP,FREXT1 and save 08052 DC40319D 169 CALLNP FORCEWRW1 force out the altered block 08053 DC403150 170 CALLNP GRUBWNDO1 and unmap the window 171 08054 5C090410 4 ZBM 172 CMZ ULB,ULRAFDIR check for a large directory 08055 FE02805C 173 JEQ NOUPDATE jump if small 08056 60D7480E 3 5 BASE 174 LD R3 FCB,FCJCXH get pointer to current UDIR1 index 08057 62178806 016 BASE 175 LD2 R0 SP,FRNAME1 get the current first name in block 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1792 (FREQRENAME) F 113 FREQ - Rename 08058 E616C800 013 BASE 176 ST2 R0 R3,UDINDXNAM update the index 08059 60178808 0 6 BASE 177 LD R0 SP,FREXT1 retrieve the extension 0805A E416C802 0 3 BASE 178 ST R0 R3,UDINDXEXT and save in the index entry 0805B DC403153 179 CALLNP GRUBWNDO2 release secondary directory block 0000805C 180 NOUPDATE LABEL 0805C DC405685 181 CALLNP FREEDIR let go the directory 0805D 60978802 2 6 BASE 182 LD R2 SP,FRBLOCK get a pointer to the memory chunk 0805E DC002F5D 183 CALL UFREEMEM free up the entry holder 0805F 41440005 IMM 184 PARV FDLNTH LOG 2 specify its length 08060 40528000 2 REG 185 PARVL R2 and address 08061 FE0E5982 186 JMP FNOERROR exit done 187 * --- 188 189 ********************************************************************************** 190 * This section is to handle the case where RENAME * 191 * causes an entry to move between secondary blocks in a * 192 * RAF type directory. We get two new free blocks and * 193 * create two new UDIR2 blocks in them. After they are * 194 * forced out, we update the pointers in the UDIR1 block, * 195 * force it out, and then free the old blocks. * 196 * We have already ensured that the UDIR2 block has room for the * 197 * new entry, so we have one less problem to worry about. * 198 * At this point, window 1 has the UDIR2 block containing * 199 * the existing entry. We make a copy of the window without * 200 * the entry, and so on. * 201 * Window 2 has the UDIR1 mapped in. * 202 ********************************************************************************** 203 00008062 204 BIGDIR LABEL 08062 DC403276 205 CALLNP ULKWNDO1 release this window for swapping 206 207 * While we have UDIR1 mapped in, get the MS address 208 * for the next UDIR2 block and the account serial number. 209 08063 60570801 1 4 BASE 210 LD R1 ULB,ULBLOCK get a prototype MS address 08064 E4578800 1 6 BASE 211 ST R1 SP,FRMS1 initialize protos on stack 08065 E4578801 1 6 BASE 212 ST R1 SP,FRMS2 08066 6097480E 2 5 BASE 213 LD R2 FCB,FCJCXH get the index for the insertion spot 08067 60089183 0 2 ZBM 214 LD R0 R2,UDINDXADR get the MS address of that block 08068 E4099181 0 6 ZBM 215 ST R0 SP,FRMS2/MSBLKFIELD build complete MS address 08069 62800C20 23 216 LD2 R2 WNDO2(UDSERNO) get the account serial number 0806A E6978809 236 BASE 217 ST2 R2 SP,FRNAME2 and save ASN 218 219 ********************************************************************************** 220 * Handle the block that we are moving the entry from. * 221 * Get a new block and copy the old block into it, skipping * 222 * the entry being moved. * 223 ********************************************************************************** 224 0806B DC0080F6 225 CALL TABFREEW2 get a free block in window 2 0806C 4144000A IMM 226 PARV FBITUDIR2 make it a UDIR2 block 0806D 42548000 23 PAIR 227 PARV2L PAIR R2 for this account serial number 0806E 000080CB 228 ADR RNMERDBLK pass error address 0806F E4099180 0 6 ZBM 229 ST R0 SP,FRMS1/MSBLKFIELD save the block number acquired 08070 DC403270 230 CALLNP ULKWNDO2 release this block to swap 231 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1793 (FREQRENAME) F 113 FREQ - Rename 08071 60040800 0 IMM 232 LD R0 ADR WNDO1 get the source pointer 08072 60840C00 2 IMM 233 LD R2 ADR WNDO2 and the destination 08073 60578804 1 6 BASE 234 LD R1 SP,FRNCDE get the existing entry pointer 08074 10440800 1 IMM 235 SUB R1 ADR WNDO1 produce a word count 08075 604A5F30 1 1 CBM 236 LD R1 R1/FLDCHARS make a character count 08076 FE400000 237 CMOVE copy the block up to the existing entry 08077 18040018 0 IMM 238 ADD R0 FDLNTH skip over the entry 08078 60440FD8 1 IMM 239 LD R1 ADR WNDO2(UD2LFDE) get pointer to the end 08079 10528000 1 2 REG 240 SUB R1 R2 make word count to go 0807A 604A5F30 1 1 CBM 241 LD R1 R1/FLDCHARS turn into a character count 0807B FE400000 242 CMOVE move the dir part after the affected entry 0807C 60440060 1 IMM 243 LD R1 FDLNTH*CPW 0807D FE580000 244 CFILL 0 0807E 62000C02 01 245 LD2 R0 WNDO2/FDNAME get the first name in the new block 0807F E6178806 016 BASE 246 ST2 R0 SP,FRNAME1 save on stack 08080 60000C04 0 247 LD R0 WNDO2/FDEXTEN get the extension 08081 E4178808 0 6 BASE 248 ST R0 SP,FREXT1 and save 08082 DC4031A0 249 CALLNP FORCEWRW2 force out the block 250 251 ********************************************************************************** 252 * Handle the block that receives the entry. Get a new * 253 * block and copy the old block into it, including the moved * 254 * entry along the way. * 255 ********************************************************************************** 256 08083 61178801 4 6 BASE 257 LD R4 SP,FRMS2 pick up the insertion point MS address 08084 DC003205 258 CALL SETWNDO1 set up window 1 08085 41440001 IMM 259 PARV VPCNTLRO just reading this UDIR2 block 08086 41440000 IMM 260 PARV VPNOFCB indicate no lun associated with this block 08087 410080CB 261 PAR RNMERDBLK errors not handled 08088 41530000 4 REG 262 PARV R4 UDIR2 block with insertion point 08089 4044000A IMM 263 PARVL FBITUDIR2 specify UDIR2 264 0808A 61095114 4 5 ZBM 265 LD ULB FCB,FCLIMITPTR retrieve the limit pointer 0808B 62978809 236 BASE 266 LD2 R2 SP,FRNAME2 pick up account serial number 0808C DC0080F6 267 CALL TABFREEW2 get a free block in the other window 0808D 4144000A IMM 268 PARV FBITUDIR2 indicate its type 0808E 42548000 23 PAIR 269 PARV2L PAIR R2 indicate account serial number 0808F 000080CB 270 ADR RNMERDBLK error address 08090 E4099181 0 6 ZBM 271 ST R0 SP,FRMS2/MSBLKFIELD save the new address 08091 DC403270 272 CALLNP ULKWNDO2 release for swapping 273 08092 60040800 0 IMM 274 LD R0 ADR WNDO1 get the source address 08093 60840C00 2 IMM 275 LD R2 ADR WNDO2 and the destination 08094 6057480F 1 5 BASE 276 LD R1 FCB,FCJCDE get the insertion point 08095 10440800 1 IMM 277 SUB R1 ADR WNDO1 make a word count 08096 604A5F30 1 1 CBM 278 LD R1 R1/FLDCHARS make into a character count 08097 FE400000 279 CMOVE move block up to new entry 08098 60D20000 3 0 REG 280 LD R3 R0 save the current source position 08099 60178802 0 6 BASE 281 LD R0 SP,FRBLOCK set source to saved dir entry 0809A 60440060 1 IMM 282 LD R1 FDLNTH*CPW get character count for the move in 0809B FE400000 283 CMOVE move in the saved directory entry 0809C 6012C000 0 3 REG 284 LD R0 R3 get back the old block current position 0809D 60440BD8 1 IMM 285 LD R1 ADR WNDO1(UD2LFDE) get pointer to the block end 0809E 10520000 1 0 REG 286 SUB R1 R0 make word count remaining 0809F 604A5F30 1 1 CBM 287 LD R1 R1/FLDCHARS turn into character count 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1794 (FREQRENAME) F 113 FREQ - Rename 080A0 FE400000 288 CMOVE move over remainder of original block 080A1 62000C02 01 289 LD2 R0 WNDO2/FDNAME get the current first name in the block 080A2 E6178809 016 BASE 290 ST2 R0 SP,FRNAME2 save for later UDIR1 update 080A3 60000C04 0 291 LD R0 WNDO2/FDEXTEN retrieve the extension 080A4 E417880B 0 6 BASE 292 ST R0 SP,FREXT2 and save 080A5 DC4031A0 293 CALLNP FORCEWRW2 force out the window 080A6 60978802 2 6 BASE 294 LD R2 SP,FRBLOCK load the temp block address 080A7 DC002F5D 295 CALL UFREEMEM call to get rid of it 080A8 41440005 IMM 296 PARV FDLNTH LOG 2 indicate its length 080A9 40528000 2 REG 297 PARVL R2 and address 080AA DC403150 298 CALLNP GRUBWNDO1 free up the window 299 300 ********************************************************************************** 301 * Make the block number switches in the primary directory * 302 * block. After we force out the primary block, the two old * 303 * blocks will be freed. * 304 ********************************************************************************** 305 080AB DC40811E 306 CALLNP LOCKDIR set up the primary directory block 080AC 000080CF 307 ADR RNMSERR error address 308 080AD 60D78803 3 6 BASE 309 LD R3 SP,FRNCXH => UDIR1 index for old entry 080AE 62178806 016 BASE 310 LD2 R0 SP,FRNAME1 get the name that is first now 080AF E616C800 013 BASE 311 ST2 R0 R3,UDINDXNAM update the UDIR1 080B0 60178808 0 6 BASE 312 LD R0 SP,FREXT1 retrieve the extension 080B1 E416C802 0 3 BASE 313 ST R0 R3,UDINDXEXT and save in the index 080B2 60178800 0 6 BASE 314 LD R0 SP,FRMS1 get the block that is there now 080B3 E008D183 0 3 ZBM 315 EXCH R0 R3,UDINDXADR put new block in and retrieve old block address 080B4 E4099180 0 6 ZBM 316 ST R0 SP,FRMS1/MSBLKFIELD save the old block address 080B5 D056C00C 3 CACH 317 DEC R3,UDINDXNUM too lazy to recount the number of entries 318 080B6 60D7480E 3 5 BASE 319 LD R3 FCB,FCJCXH => UDIR1 index for new entry 080B7 62178809 016 BASE 320 LD2 R0 SP,FRNAME2 get the name that is first now 080B8 E616C800 013 BASE 321 ST2 R0 R3,UDINDXNAM update the UDIR1 080B9 6017880B 0 6 BASE 322 LD R0 SP,FREXT2 retrieve the extension 080BA E416C802 0 3 BASE 323 ST R0 R3,UDINDXEXT and save in the index 080BB 60178801 0 6 BASE 324 LD R0 SP,FRMS2 get the block that is there now 080BC E008D183 0 3 ZBM 325 EXCH R0 R3,UDINDXADR put new block in and get old block address 080BD E4099181 0 6 ZBM 326 ST R0 SP,FRMS2/MSBLKFIELD save the old block address 080BE D016C00C 3 CACH 327 INC R3,UDINDXNUM too lazy to recount the number of entries 328 080BF DC4031A0 329 CALLNP FORCEWRW2 force out the UDIR1 block 080C0 DC408213 330 CALLNP DIRSHRINK try to recover space and release dir 080C1 000080D2 331 ADR RNMSERRN 332 080C2 61178800 4 6 BASE 333 LD R4 SP,FRMS1 get a MS address for one of the old blocks 080C3 DC004FEA 334 CALL FREEFILE free the first extra block 080C4 41530000 4 REG 335 PARV R4 specify its address 080C5 40440000 IMM 336 PARVL FFTUNKNOWN indicate single random type block 337 080C6 61178801 4 6 BASE 338 LD R4 SP,FRMS2 pick up the other old block address 080C7 DC004FEA 339 CALL FREEFILE free the second extra block 080C8 41530000 4 REG 340 PARV R4 specify its address 080C9 40440000 IMM 341 PARVL FFTUNKNOWN indicate single block, type uncared 342 080CA FE0E5982 343 JMP FNOERROR return, done 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1795 (FREQRENAME) F 113 FREQ - Rename 344 * --- 345 000080CB 346 RNMERDBLK LABEL mass storage error 080CB 60978802 2 6 BASE 347 LD R2 SP,FRBLOCK get a pointer to the memory chunk 080CC DC002F5D 348 CALL UFREEMEM free up the entry holder 080CD 41440005 IMM 349 PARV FDLNTH LOG 2 specify its length 080CE 40528000 2 REG 350 PARVL R2 and address 000080CF 351 RNMSERR LABEL mass storage error 080CF DC4080DC 352 CALLNP UNDOA clean up stuff 080D0 DC4080E2 353 CALLNP UNDOB undo window mapping 080D1 FE0E59CA 354 JMP FERRORDSE pass disk structure error 355 * --- 356 000080D2 357 RNMSERRN LABEL mass storage error 080D2 DC4080DC 358 CALLNP UNDOA undo window mapping 080D3 FE0E5983 359 JMP FERROR pass disk structure error 360 * --- 361 362 363 ********************************************************************************** 364 * Error routines. These routines may call subroutines * 365 * to undo work already accomplished when the error was discovered, * 366 * then cause the proper error code to be issued. * 367 * Note that the stack pointer is abandoned when exiting. * 368 ********************************************************************************** 369 370 * Passed a new name that does not follow the system's 371 * idea of being in good form. We return an error message 372 * to that affect. 000080D4 373 SUBADNAME LABEL 080D4 DC4080DC 374 CALLNP UNDOA clean up the FCB 080D5 FE0E59B6 375 JMP FERRORBFN give 'bad file name' error 376 * --- 377 000080D6 378 FRNERRDE LABEL duplicate entry error 080D6 DC4080DC 379 CALLNP UNDOA clean up stuff 080D7 DC4080E2 380 CALLNP UNDOB clean up stuff 080D8 FE0E59C4 381 JMP FERRORNAE and give the error message 382 * --- 383 000080D9 384 FRNERRDF LABEL the directory is full 385 * (or so close that we punt) 080D9 DC4080DC 386 CALLNP UNDOA clean up stuff 080DA DC4080E2 387 CALLNP UNDOB clean up stuff 080DB FE0E59D2 388 JMP FERRORISYR insufficient syestem resources 389 * --- 390 391 END FREQRENAME routine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1796 (FREQRENAME) F 113 FREQ - Rename 393 394 ********************************************************************************** 395 * Misc clean up routines for use during error backing up. * 396 * * 397 * Stack required: 1 * 398 * * 399 ********************************************************************************** 400 401 BLOCK UNDOA subroutine 402 ENTRY UNDOA 403 404 BEGFRAME 405 ENDFRAME 406 080DC DD5F8001 6 STAK 407 UNDOA ENTRNP PUSH 080DD 62178807 016 BASE 408 LD2 R0 SP,ZZ!LEN/FRNAME1 080DE E617480B 015 BASE 409 ST2 R0 FCB,FCNAME restore old name 080DF 60178806 0 6 BASE 410 LD R0 SP,ZZ!LEN/FROLDEXT 080E0 E417480D 0 5 BASE 411 ST R0 FCB,FCNAMEEXT restore old extension 080E1 5D1F8001 6 STAK 412 LEAVE POP 413 * --- 414 415 END UNDOA subroutine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1797 (FREQRENAME) F 113 FREQ - Rename 417 418 ********************************************************************************** 419 * Misc clean up routines for use during error backing up. * 420 * * 421 * Stack required: 8 * 422 * 1 + max ( FREEDIR (5), GRUBWNDOx (7) ) * 423 * * 424 ********************************************************************************** 425 426 BLOCK UNDOB subroutine 427 ENTRY UNDOB 428 429 BEGFRAME 430 ENDFRAME 431 080E2 DD5F8001 6 STAK 432 UNDOB ENTRNP PUSH 080E3 DC403150 433 CALLNP GRUBWNDO1 release window with DIR 080E4 DC403153 434 CALLNP GRUBWNDO2 and this one if in use 080E5 DC405685 435 CALLNP FREEDIR and allow others to have the dir 080E6 5D1F8001 6 STAK 436 LEAVE POP 437 * --- 438 439 END UNDOB subroutine 440 441 442 END Rename FREQ 173 INPUT TABUTIL fetch free block utility 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1798 (TABUTIL) F 114 FREQ - Table Generation Utility 3 4 ********************************************************************************** 5 * * 6 * Routines to fetch and set up new blocks. * 7 * FCB => file control block * 8 * SP => return address stack * 9 * LD FCB * 10 * CALL TABFREEWx * 11 * PARV * 12 * PARV2L * 13 * ADR * 14 * : zeropage in window * 15 * R0 = new block number (no volume number embedded) * 16 * ULB => user limit block * 17 * * 18 * Eats R1:R3 * 19 * Stack required: 7 * 20 * 3 + max ( MAPOUTFBI (2), SETERRWx (1), SETWNDOx (4) ) * 21 * * 22 ********************************************************************************** 23 24 BLOCK TABFREEW1 and TABFREEW2 subroutines 25 ENTRY TABFREEW1 sets up a new block in window 1 26 ENTRY TABFREEW2 sets up a new block in window 2 27 28 BEGFRAME 00178801 6 BASE 29 TABFASN BSS2 1 to hold account serial number 30 ENDFRAME 31 080E7 DD1F8003 6 STAK 32 TABFREEW1 ENTR PUSH 080E8 C1530000 4 REG 33 STPV ULB save FBI type out of the way 080E9 C2578801 6 BASE 34 STPV2L SP,TABFASN save account serial number 080EA DC003205 35 CALL SETWNDO1 setup window 080EB 4144000A IMM 36 PARV VPCNTLW+VPCNTLLK+VPZEROPG pass VPCNTL field 37 * note that this is a zeropage request and therefore 38 * requests a new MS block. Since it is requested 39 * locked, SETWINDOW forces it in now. 080EC 41440000 IMM 40 PARV VPNOFCB indicate no lun associated with this block 080ED 41008116 41 PAR TABFREEDE error address 080EE 41574801 5 BASE 42 PARV FCB,FCBLOCK pass the block number (indicates volume) 080EF 6004007F 0 IMM 43 LD R0 FBITFREE get FBI type for expected free block 080F0 E40B2470 0 4 CBM 44 ST R0 ULB/VPFBIOLDB insert into register 080F1 40530000 4 REG 45 PARVL ULB pass the FBI type desired 46 * the FBI pointer is returned in R2 080F2 6017C800 0 7 BASE 47 LD R0 R7,0 load the error return address 080F3 E492C000 2 3 REG 48 ST R2 R3 save the FBI pointer 080F4 DC403190 49 CALLNP SETERRW1 setup the error address for this window 080F5 FE0E8104 50 JMP TABFREESHR 51 * --- 52 080F6 DD1F8003 6 STAK 53 TABFREEW2 ENTR PUSH 080F7 C1530000 4 REG 54 STPV ULB save FBI type out of the way 080F8 C2578801 6 BASE 55 STPV2L SP,TABFASN save account serial number 080F9 DC0031FF 56 CALL SETWNDO2 setup window 080FA 4144000A IMM 57 PARV VPCNTLW+VPCNTLLK+VPZEROPG pass VPCNTL field 58 * note that this is a zeropage request and therefore 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1799 (TABUTIL) F 114 FREQ - Table Generation Utility 59 * requests a new MS block. Since it is requested 60 * locked, SETWINDOW forces it in now. 080FB 41440000 IMM 61 PARV VPNOFCB indicate no lun associated with this block 080FC 41008116 62 PAR TABFREEDE error address 080FD 41574801 5 BASE 63 PARV FCB,FCBLOCK pass the block number (indicates volume) 080FE 6004007F 0 IMM 64 LD R0 FBITFREE get FBI type for expected free block 080FF E40B2470 0 4 CBM 65 ST R0 ULB/VPFBIOLDB insert into register 08100 40530000 4 REG 66 PARVL ULB pass the FBI type desired 67 * the FBI pointer is returned in R2 08101 6017C800 0 7 BASE 68 LD R0 R7,0 load the error return address 08102 E492C000 2 3 REG 69 ST R2 R3 save the FBI pointer 08103 DC40318D 70 CALLNP SETERRW2 setup the error address for this window 00008104 71 TABFREESHR LABEL 08104 6092C000 2 3 REG 72 LD R2 R3 restore the FBI pointer 08105 EC089180 2 ZBM 73 STZ R2,FBIFLINK zero pointers for good measure 08106 EC089182 2 ZBM 74 STZ R2,FBIBLINK 08107 EE168808 2 BASE 75 STZ2 R2,FBISERNO no serial number used (yet) 08108 61095114 4 5 ZBM 76 LD ULB FCB,FCLIMITPTR load up the ULB pointer 08109 62170802 014 BASE 77 LD2 R0 ULB,ULACCNM get the users account number 0810A E6168805 012 BASE 78 ST2 R0 R2,FBIACCT set that into the FBI 0810B 60170804 0 4 BASE 79 LD R0 ULB,ULACCPROJ get the account extension 0810C E4168807 0 2 BASE 80 ST R0 R2,FBIPROJ and into the FBI 0810D 62178801 016 BASE 81 LD2 R0 SP,TABFASN pick up account serial number 0810E E6168808 012 BASE 82 ST2 R0 R2,FBISERNO and place into FBI 0810F EC089184 2 ZBM 83 STZ R2,FBIRELBLK clear the relative block number 08110 60489181 1 2 ZBM 84 LD R1 R2,FBIDA copy the block number to R1 08111 DC40261B 85 CALLNP MAPOUTFBI unmap FBI 08112 60840000 2 IMM 86 LD R2 0 DEBUG safety, kill pointer 08113 60124000 0 1 REG 87 LD R0 R1 put block # in correct reg 08114 19C40001 7 IMM 88 ADD R7 1 advance return over the error address 08115 5D1F8003 6 STAK 89 LEAVE POP return to caller 90 * --- 91 00008116 92 TABFREEDE LABEL 08116 DC40261B 93 CALLNP MAPOUTFBI unmap FBI 08117 61095114 4 5 ZBM 94 LD ULB FCB,FCLIMITPTR load up the ULB pointer 08118 61D7C800 7 7 BASE 95 LD R7 R7,0 load the error return address 08119 5D1F8003 6 STAK 96 LEAVE POP return to callers error address 97 * --- 98 99 END TABFREEW1 and TABFREEW2 subroutines 174 INPUT FREQUDR user directory utilities 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1800 (FREQUDR) F 115 FREQ - Utilities for Directory Routines 3 4 BLOCK Directory Manipulation Routines 5 6 ENTRY BMOVE move routine used to open holes in tables 7 ENTRY LOCKDIR to fetch and lock the UDIR1 block 8 ENTRY USVREM routine to remove a dir entry 9 ENTRY DIRXPAND routine to make small dir into big dir 10 ENTRY BLKSPLIT entry to split a UDIR2 block 11 ENTRY DIRSHRINK to check for combination of two UDIR2 blocks 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1801 (FREQUDR) F 115 FREQ - Utilities for Directory Routines 13 14 ********************************************************************************** 15 * * 16 * BMOVE * 17 * Funny move routine. The first word moved is the one * 18 * with the highest address. This is provided to open up holes * 19 * in tables by pushing the high section of the table up. This * 20 * way, the low stuff doesn't destroy the high stuff before it * 21 * is moved. Call: * 22 * R3 = source address * 23 * R2 = destination address * 24 * both R2 and R3 point to the low address * 25 * of their respective blocks * 26 * R1 = WORD count * 27 * JSR R7 BMOVE * 28 * * 29 * Eats R0:R1 and R7 * 30 * Stack required = 0 * 31 * * 32 ********************************************************************************** 33 34 BLOCK BMOVE subroutine 35 ENTRY BMOVE move routine used to open holes in tables 36 0000811A 37 BMFLP LABEL 0811A 601CC800 0 31 BASE 38 LD R0 R3,0(R1) load the source word 0811B E41C8800 0 21 BASE 39 ST R0 R2,0(R1) store into the new location 0000811C 40 BMOVE LABEL 0811C FA66811A 1 41 JDR R1 BMFLP count and jump 0811D 5CD3C000 7 REG 42 LDPCS R7 return to caller 43 * --- 44 45 END BMOVE subroutine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1802 (FREQUDR) F 115 FREQ - Utilities for Directory Routines 47 48 ********************************************************************************** 49 * * 50 * Routine to lock the UDIR1 block into window 2. * 51 * Call with ULB => user limit block * 52 * Call: * 53 * CALLNP LOCKDIR * 54 * ADR * 55 * * 56 * Eats R0:R3 * 57 * Stack required = 5 * 58 * 1 + max( MAPOUTFBI (2), SETERRW2 (1), SETWNDO2 (4) ) * 59 * * 60 ********************************************************************************** 61 62 LOCKDIR BLOCK LOCKDIR subroutine 63 ENTRY LOCKDIR to fetch and lock the UDIR1 block 64 65 BEGFRAME 66 ENDFRAME 67 0811E DD5F8001 6 STAK 68 LOCKDIR ENTRNP PUSH 0811F DC0031FF 69 CALL SETWNDO2 set up this window with different privs 08120 41440002 IMM 70 PARV VPCNTLW+VPCNTLLK control field ( R/W and locked ) 08121 41440000 IMM 71 PARV VPNOFCB indicate no lun associated with this block 08122 4100812A 72 PAR LOCKERR error return 08123 41570801 4 BASE 73 PARV ULB,ULBLOCK specify the primary directory block 08124 40440009 IMM 74 PARVL FBITUDIR1 type of block expected 08125 DC40261B 75 CALLNP MAPOUTFBI unmap FBI, ION 08126 60840000 2 IMM 76 LD R2 0 DEBUG safety, kill pointer 08127 6017C800 0 7 BASE 77 LD R0 R7,0 fetch the error address 08128 DC40318D 78 CALLNP SETERRW2 set the error address for the caller 08129 FBE0812D 7 79 IRJ R7 LDEXIT advance return over the error address 80 * --- 81 0000812A 82 LOCKERR LABEL 0812A DC40261B 83 CALLNP MAPOUTFBI unmap FBI, ION 84 * we could grub the window here, but all callers share 85 * error recovery that does it anyway. 0812B 60840000 2 IMM 86 LD R2 0 DEBUG safety, kill pointer 0812C 61D7C800 7 7 BASE 87 LD R7 R7,0 get the error address 0812D 5D1F8001 6 STAK 88 LDEXIT LEAVE POP and split to the error return 89 * --- 90 91 END LOCKDIR 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1803 (FREQUDR) F 115 FREQ - Utilities for Directory Routines 93 94 ********************************************************************************** 95 * * 96 * USVREM * 97 * This routine removes the indicated entry * 98 * from a directory. * 99 * FCB => file control block * 100 * ULB => user limit block * 101 * directory block with entry locked into window 1, * 102 * if a large DIR, UDIR1 in window 2 R/W * 103 * FCB,FCJCDE => entry to be removed * 104 * FCB,FCJCXH => current index entry in UDIR1 (if large DIR) * 105 * CALLNP USVREM * 106 * ADR * 107 * * 108 * no window is mapped, the DIR is unlocked * 109 * On an error return, the directory is still held, * 110 * and the window(s) are still mapped. * 111 * * 112 * Eats R0:R3 * 113 * Stack required = 16 * 114 * 3 + max ( DIRSHRINK (13), FORCEWRW1 (5), FREEDIR (5), * 115 * FREEFILE (3), GRUBWNDOx (7), LIMITCHECK (1), * 116 * LOCKWAIT (0), SETERRWx (1), ULKWNDOx (1) ) * 117 * * 118 ********************************************************************************** 119 120 BLOCK USVREM subroutine 121 ENTRY USVREM routine to remove a dir entry 122 123 BEGFRAME 00178801 6 BASE 124 USVT1 BSS 1 temp to hold the count of entries 00178802 6 BASE 125 USVMS1 BSS 1 holds MS address 126 ENDFRAME 127 0812E DD5F8003 6 STAK 128 USVREM ENTRNP PUSH 0812F 6004815D 0 IMM 129 LD R0 ADR RMEMSERR get our error address 08130 DC403190 130 CALLNP SETERRW1 and set this window 08131 60D7480F 3 5 BASE 131 LD R3 FCB,FCJCDE retrieve the entry pointer 08132 60095835 0 5 ZBM 132 LD R0 FCB,FCACCESS get the current access 08133 5D6061D4 0 133 XCT UPDATEDR(R0) update current file lengths 08134 6092C000 2 3 REG 134 LD R2 R3 place entry pointer in this register 08135 60168814 0 2 BASE 135 LD R0 R2,FDSHL/SHLFLAGW fetch the share list info 08136 E4178802 0 6 BASE 136 ST R0 SP,USVMS1 save for later analysis 08137 60169018 0 2 REG 137 LD R0 R2+FDLNTH produce source address 08138 70528000 1 2 REG 138 LDN R1 R2 08139 18440BE8 1 IMM 139 ADD R1 ADR(WNDO1(UDLFDE)) produce the word count 0813A 604A5F30 1 1 CBM 140 LD R1 R1/FLDCHARS make a character count 0813B FE400000 141 CMOVE walk on the current entry 142 0813C 60440060 1 IMM 143 LD R1 FDLNTH*CPW 0813D FE580000 144 CFILL 0 zero the block 145 0813E 5C090410 4 ZBM 146 CMZ ULB,ULRAFDIR check for a big directory 0813F FE0C8167 147 JNE USVREM2 jump if big directory 148 * \ / 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1804 (FREQUDR) F 115 FREQ - Utilities for Directory Routines 149 150 ********************************************************************************** 151 * We have a small UDIR. The directory is in window * 152 * one with write access and locked. * 153 ********************************************************************************** 154 155 * \ / 08140 DC40319D 156 CALLNP FORCEWRW1 force out the directory 08141 DC403150 157 CALLNP GRUBWNDO1 and unmap the window 08142 DC405685 158 CALLNP FREEDIR let go the directory 08143 19C40001 7 IMM 159 ADD R7 1 advance the return over the error address 00008144 160 USVSHLFREE LABEL section to free share list (if present) 08144 60978802 2 6 BASE 161 LD R2 SP,USVMS1 fetch first share list word 08145 F280814E 2 162 JBF R2/SHLDSKFLGB USVXIT jump if it's not an MS address 08146 60090081 0 4 ZBM 163 LD R0 ULB,ULDRIVE fetch the volume number 08147 E40A8080 0 2 CBM 164 ST R0 R2/VOLFIELD produce complete MS address 08148 DC004FEA 165 CALL FREEFILE call to release the block 08149 41528000 2 REG 166 PARV R2 pass the MS address 0814A 40440000 IMM 167 PARVL FFTUNKNOWN and its type 0814B 6047FFFF 1 IMM 168 LD R1 -1 deleting one block 0814C DC405C7B 169 CALLNP LIMITCHECK call to remove space from ULB disk used total 0814D 00131181 170 HALT HALTS1181 bogus return from LIMITCHECK 171 * \ / 0000814E 172 USVXIT LABEL 0814E EC096415 5 ZBM 173 STZ FCB,FCSAVED indicate the lun is now scratch 0814F EE17480B 5 BASE 174 STZ2 FCB,FCNAME clear name 08150 EC17480D 5 BASE 175 STZ FCB,FCNAMEEXT and extension 08151 60494182 1 5 ZBM 176 LD R1 FCB,FCTFL get the total file length 177 PLOCK ULLIMLOCK critical region to update ULB limits 08152 0CC00000 177 IOFF 08153 D1C01EAF 177 SETT ULLIMLOCK 08154 FE0C8156 177 JNE MA(2+DISPW MA 0) 08155 DC40308B 177 CALLNP LOCKWAIT 08156 9857080F 1 4 BASE 178 ADDM R1 ULB,ULSCRDSK add this space into the scratch total 08157 B049118E 1 4 ZBM 179 RSBM R1 ULB,ULDSKUSD while removing from saved total 08158 FE06815A 180 JGE USDNONNEG jump if sign okay 08159 EC09118E 4 ZBM 181 STZ ULB,ULDSKUSD prevent negative totals 0000815A 182 USDNONNEG LABEL 183 PUNLOCK ULLIMLOCK release hold of lock 0815A EC001EAF 183 STZ ULLIMLOCK 0815B 0C800000 183 ION 0815C 5D1F8003 6 STAK 184 LEAVE POP return 185 * --- 186 187 * Error while trying to do the removal. Indicate that the 188 * file is unsaved, but we really don't know what is happening. 0000815D 189 RMEMSERR LABEL 0815D E5D78802 7 6 BASE 190 ST R7 SP,USVMS1 copy error code to R7 0815E DC403150 191 CALLNP GRUBWNDO1 release this window 0815F DC403153 192 CALLNP GRUBWNDO2 release this window 08160 DC405685 193 CALLNP FREEDIR release the directory 08161 60178802 0 6 BASE 194 LD R0 SP,USVMS1 get back the error code 08162 EE17480B 5 BASE 195 STZ2 FCB,FCNAME remove the old name 08163 EC17480D 5 BASE 196 STZ FCB,FCNAMEEXT 08164 EC096415 5 ZBM 197 STZ FCB,FCSAVED indicate not saved 08165 61D7C800 7 7 BASE 198 LD R7 R7,0 load the error return address 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1805 (FREQUDR) F 115 FREQ - Utilities for Directory Routines 08166 5D1F8003 6 STAK 199 LEAVE POP return to the error location 200 * --- 201 202 203 ********************************************************************************** 204 * This section updates the UDIR1 block of a large directory. * 205 ********************************************************************************** 206 207 00008167 208 USVREM2 LABEL 08167 DC403276 209 CALLNP ULKWNDO1 release this window for swapping 210 * \ / 211 212 * Count the number of entries in this block 213 08168 EC178801 6 BASE 214 STZ SP,USVT1 initialize entry count 08169 60440800 1 IMM 215 LD R1 ADR WNDO1 initialize the scan address 0000816A 216 ECNLP LABEL 0816A 5C164800 1 BASE 217 CMZ R1,0 is this entry the end? 0816B FE028170 218 JEQ ECNLVP zero indicates not an entry 0816C D0178801 6 BASE 219 INC SP,USVT1 advance the entry count 0816D 18440018 1 IMM 220 ADD R1 FDLNTH advance pointer to next entry 0816E 64440BE8 1 IMM 221 CPR R1 ADR WNDO1(UDLFDE) check for at end of block 0816F FE0A816A 222 JLE ECNLP jump back if more entries 223 * \ / 00008170 224 ECNLVP LABEL entry count in SP,USVT1 08170 62000802 01 225 LD2 R0 WNDO1/FDNAME get the first entry file name 08171 E617480B 015 BASE 226 ST2 R0 FCB,FCNAME save it while we force out the block 08172 60000804 0 227 LD R0 WNDO1/FDEXTEN get the extension 08173 E417480D 0 5 BASE 228 ST R0 FCB,FCNAMEEXT and save it 08174 DC40319D 229 CALLNP FORCEWRW1 force out the block 08175 DC403150 230 CALLNP GRUBWNDO1 and unmap the window 231 232 * go back and update the UDIR1 block. 233 08176 60048182 0 IMM 234 LD R0 ADR IQMSERR load the error address 08177 DC40318D 235 CALLNP SETERRW2 set up this window 08178 6097480E 2 5 BASE 236 LD R2 FCB,FCJCXH load the index pointer 08179 6217480B 015 BASE 237 LD2 R0 FCB,FCNAME fetch the first entry file name 0817A E6168800 012 BASE 238 ST2 R0 R2,UDINDXNAM set that into the index 0817B 6017480D 0 5 BASE 239 LD R0 FCB,FCNAMEEXT retrieve the extension 0817C E4168802 0 2 BASE 240 ST R0 R2,UDINDXEXT and save in directory index 0817D 60178801 0 6 BASE 241 LD R0 SP,USVT1 get the count of entries 0817E E416800C 0 2 CACH 242 ST R0 R2,UDINDXNUM set the new block count 243 * \ / 244 ********************************************************************************** 245 * * 246 * The updating for the unsave is done. Call to see * 247 * if the directory can have two blocks combined to reduce * 248 * its size. DIRSHRINK releases the windows and unlocks * 249 * the directory. * 250 * * 251 ********************************************************************************** 252 253 * \ / 0817F DC408213 254 CALLNP DIRSHRINK check for contracting directory 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1806 (FREQUDR) F 115 FREQ - Utilities for Directory Routines 08180 00008184 255 ADR IVMSERR pass the error address 08181 FBE08144 7 256 IRJ R7 USVSHLFREE increment to normal return and go finish processing 257 * --- 258 259 * Error while trying to update the UDIR1 of a large directory. 260 * The UNSAVE is actually done, go finish it. 00008182 261 IQMSERR LABEL 08182 DC403153 262 CALLNP GRUBWNDO2 release this window 08183 DC405685 263 CALLNP FREEDIR release the directory 00008184 264 IVMSERR LABEL 08184 61D7C800 7 7 BASE 265 LD R7 R7,0 pick up error address 08185 FE0E8144 266 JMP USVSHLFREE go off to finish UNSAVE work 267 * --- 268 269 END USVREM subroutine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1807 (FREQUDR) F 115 FREQ - Utilities for Directory Routines 271 272 ********************************************************************************** 273 * * 274 * DIRXPAND * 275 * This routine assumes that the UDIR1 block is in * 276 * WNDO1 and that the DIR is held. It fetches a new block, * 277 * copies all of the directory entries into it, forces it * 278 * to mass storage, and converts the primary block to * 279 * an index. * 280 * Call: * 281 * FCB => file control block * 282 * ULB => user limit block * 283 * SP * 284 * CALLNP DIRXPAND * 285 * ADR * 286 * * 287 * Eats R0:R3 * 288 * Both normal and error returns free the directory and * 289 * unmap windows 1 and 2. * 290 * Stack required = 12 * 291 * 5 + max ( FORCEWRWx (5), FREEDIR (5), GRUBWNDOx (7), * 292 * LOCKLIST (1), LOCKPAGE (1), LOCKWAIT (0), * 293 * SETERRW1 (1), TABFREEW2 (7), ULKWNDOx (1), * 294 * UNLOCKLIST (1) ) * 295 * * 296 ********************************************************************************** 297 298 BLOCK DIRXPAND subroutine 299 ENTRY DIRXPAND routine to make small dir into big dir 300 301 BEGFRAME 00178801 6 BASE 302 DIRXBLK BSS 1 temp to hold the new block number 00178802 6 BASE 303 DIRXNAME BSS 2 (double) holds name of first entry 00178804 6 BASE 304 DIRXEXT BSS 1 place to hold the extension 305 ENDFRAME 306 08186 DD5F8005 6 STAK 307 DIRXPAND ENTRNP PUSH 08187 600481BB 0 IMM 308 LD R0 ADR DRXMSERR get the local error address 08188 DC403190 309 CALLNP SETERRW1 set up our ms error return 310 PLOCK ULLIMLOCK critical region to update ULB limits 08189 0CC00000 310 IOFF 0818A D1C01EAF 310 SETT ULLIMLOCK 0818B FE0C818D 310 JNE MA(2+DISPW MA 0) 0818C DC40308B 310 CALLNP LOCKWAIT 0818D D009118E 4 ZBM 311 INC ULB,ULDSKUSD count up saved space used 312 PUNLOCK ULLIMLOCK release hold on lock 0818E EC001EAF 312 STZ ULLIMLOCK 0818F 0C800000 312 ION 08190 DC403276 313 CALLNP ULKWNDO1 can't lock two windows at once! 314 * \ / 08191 DC0080F6 315 CALL TABFREEW2 get a free block in a window 08192 4144000A IMM 316 PARV FBITUDIR2 specify the type it will be 08193 42400820 317 PARV2L WNDO1(UDSERNO) pass account serial number 08194 000081BB 318 ADR DRXMSERR pass error address 08195 E4178801 0 6 BASE 319 ST R0 SP,DIRXBLK save the new block MS address 08196 DC403270 320 CALLNP ULKWNDO2 release this window for swapping 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1808 (FREQUDR) F 115 FREQ - Utilities for Directory Routines 321 * \ / 08197 60040860 0 IMM 322 LD R0 ADR(WNDO1(UDFDLIST)) load up the source address 08198 60840C00 2 IMM 323 LD R2 ADR WNDO2 load up the destination 08199 60440E40 1 IMM 324 LD R1 CPW*UDFDECNT*FDLNTH load total move length 0819A FE400000 325 CMOVE move over the file directory part 0819B 62000C02 01 326 LD2 R0 WNDO2/FDNAME load name of first entry 0819C E6178802 016 BASE 327 ST2 R0 SP,DIRXNAME save the name near us 0819D 60000C04 0 328 LD R0 WNDO2/FDEXTEN get the first extension 0819E E4178804 0 6 BASE 329 ST R0 SP,DIRXEXT and save it 0819F DC4031A0 330 CALLNP FORCEWRW2 force out the new block 081A0 DC403153 331 CALLNP GRUBWNDO2 and release the window 332 * \ / 333 334 ********************************************************************************** 335 * * 336 * The primary directory block is in window 1, but it * 337 * must be changed to the RAF type format. * 338 * Note that the UDIR1 block must be locked in at time * 339 * this. This is so that a partially modified block will * 340 * not be swapped out to the volume, resulting in garbage * 341 * in the event of a crash. * 342 * * 343 ********************************************************************************** 344 345 * \ / 081A1 60040082 0 IMM 346 LD R0 PNWNDO1 get page number for window 1 081A2 DC4031DE 347 CALLNP LOCKPAGE call to lock it resident 348 * \ / 081A3 60840860 2 IMM 349 LD R2 ADR WNDO1(UDFDLIST) get start address 081A4 60440E80 1 IMM 350 LD R1 UDFDSIZE*CPW get size 081A5 FE580000 351 CFILL 0 clear out the index area of the directory 352 * \ / 081A6 60840860 2 IMM 353 LD R2 ADR(WNDO1(UDFDLIST)) load pointer to the first index entry 081A7 60178801 0 6 BASE 354 LD R0 SP,DIRXBLK fetch the UDIR2 block number 081A8 E4089183 0 2 ZBM 355 ST R0 R2,UDINDXADR store into the index 081A9 60040026 0 IMM 356 LD R0 UDFDECNT load count of entries in new UDIR2 081AA E416800C 0 2 CACH 357 ST R0 R2,UDINDXNUM set into the new index entry 081AB 62178802 016 BASE 358 LD2 R0 SP,DIRXNAME get the first name 081AC E6168800 012 BASE 359 ST2 R0 R2,UDINDXNAM set into the index entry 081AD 60178804 0 6 BASE 360 LD R0 SP,DIRXEXT retrieve the extension 081AE E4168802 0 2 BASE 361 ST R0 R2,UDINDXEXT and save in the index entry 081AF 60040800 0 IMM 362 LD R0 ADR WNDO1 load pointer to UDIR1 begin 081B0 EDC8001A 0 ZBM 363 STW R0,UDTYPE set directory type to RAF type 364 * \ / 081B1 DC003096 365 CALL LOCKLIST modify ULB in ULLIST 081B2 40001EAC 366 PARL ULLOCK lock to hold 081B3 EDC90410 4 ZBM 367 STW ULB,ULRAFDIR indicate in user limit block also 081B4 DC0030A4 368 CALL UNLOCKLIST release list 081B5 40001EAC 369 PARL ULLOCK lock word to release 370 * \ / 081B6 DC40319D 371 CALLNP FORCEWRW1 force out the window 081B7 DC403150 372 CALLNP GRUBWNDO1 and unmap the window 081B8 DC405685 373 CALLNP FREEDIR release grip on directory 081B9 19C40001 7 IMM 374 ADD R7 1 advance return over the error address 081BA 5D1F8005 6 STAK 375 LEAVE POP return to caller 376 * --- 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1809 (FREQUDR) F 115 FREQ - Utilities for Directory Routines 377 000081BB 378 DRXMSERR LABEL 081BB E4178803 0 6 BASE 379 ST R0 SP,DIREXT save the error code 081BC DC403150 380 CALLNP GRUBWNDO1 release this window 081BD DC403153 381 CALLNP GRUBWNDO2 release this window 081BE DC405685 382 CALLNP FREEDIR release the directory 081BF 60178803 0 6 BASE 383 LD R0 SP,DIREXT restore the error code 081C0 61D7C800 7 7 BASE 384 LD R7 R7,0 get the error return address 081C1 5D1F8005 6 STAK 385 LEAVE POP return to error address 386 * --- 387 388 END DIRXPAND subroutine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1810 (FREQUDR) F 115 FREQ - Utilities for Directory Routines 390 391 ********************************************************************************** 392 * * 393 * BLKSPLIT * 394 * Routine to split the current UDIR2 block. The * 395 * block is evenly divided between two new blocks which * 396 * are forced out, the UDIR1 block is updated and forced * 397 * out, and the old UDIR2 block is freed. * 398 * FCB => file control block * 399 * ULB => user limit block * 400 * current secondary block locked in window 1 * 401 * FCB,FCJCXH => current index entry in UDIR1 * 402 * CALLNP BLKSPLIT * 403 * ADR * 404 * * 405 * on normal or error return, no window is mapped, * 406 * the DIR is unlocked * 407 * * 408 * Eats R0:R3 * 409 * Stack required = 13 * 410 * 6 + max ( DMOTEWNDO1 (7), FORCEWRW2 (5), FREEDIR (5), * 411 * FREEFILE (3), GRUBWNDO2 (7), LOCKDIR (5), * 412 * LOCKWAIT (0), SETERRW1 (1), TABFREEW2 (7), * 413 * ULKWNDOx (1) ) * 414 * * 415 ********************************************************************************** 416 417 BLOCK BLKSPLIT subroutine 418 ENTRY BLKSPLIT entry to split a UDIR2 block 419 420 BEGFRAME 00178801 6 BASE 421 FJSBLK1 BSS 1 temp for first new block number 00178802 6 BASE 422 FJSBLK2 BSS 1 temp for the second new block number 00178803 6 BASE 423 FJSNAM2 BSS 2 (double) temp for the first name in second block 00178805 6 BASE 424 FJSEXT2 BSS 1 temp for extension 425 ENDFRAME 426 081C2 DD5F8006 6 STAK 427 BLKSPLIT ENTRNP PUSH 081C3 DC403276 428 CALLNP ULKWNDO1 release this window for swapping 081C4 6004820C 0 IMM 429 LD R0 ADR BLKSERR get error address 081C5 DC403190 430 CALLNP SETERRW1 and set on this window 431 * \ / 081C6 62800C20 23 432 LD2 R2 WNDO2(UDSERNO) pick up account serial number 081C7 E6978803 236 BASE 433 ST2 R2 SP,FJSNAM2 and save for later 081C8 DC0080F6 434 CALL TABFREEW2 call for a free block in window 2 081C9 4144000A IMM 435 PARV FBITUDIR2 this is the type it will become 081CA 42548000 23 PAIR 436 PARV2L PAIR R2 pass account serial number 081CB 0000820C 437 ADR BLKSERR error return 081CC E4178801 0 6 BASE 438 ST R0 SP,FJSBLK1 save the block number acquired 081CD DC403270 439 CALLNP ULKWNDO2 release this window for swapping 440 * \ / 081CE 60040800 0 IMM 441 LD R0 ADR WNDO1 set up source address 081CF 60840C00 2 IMM 442 LD R2 ADR WNDO2 set up the destination address 081D0 604407E0 1 IMM 443 LD R1 CPW*(((UD2FDECNT+1)/2)*FDLNTH) load move count for first half 081D1 FE400000 444 CMOVE move first half into new block 081D2 DC4031A0 445 CALLNP FORCEWRW2 force block to the disk 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1811 (FREQUDR) F 115 FREQ - Utilities for Directory Routines 446 * \ / 081D3 62978803 236 BASE 447 LD2 R2 SP,FJSNAM2 pick up account serial number 081D4 DC0080F6 448 CALL TABFREEW2 get another free block 081D5 4144000A IMM 449 PARV FBITUDIR2 indicate what type of block it becomes 081D6 42548000 23 PAIR 450 PARV2L PAIR R2 pass account serial number 081D7 0000820C 451 ADR BLKSERR error address 081D8 E4178802 0 6 BASE 452 ST R0 SP,FJSBLK2 save the new blocks address 081D9 DC403270 453 CALLNP ULKWNDO2 release this window for swapping 454 * \ / 081DA 600409F8 0 IMM 455 LD R0 ADR(WNDO1(((UD2FDECNT+1)/2)*FDLNTH)) load halfway address 081DB 604407E0 1 IMM 456 LD R1 CPW*((UD2FDECNT/2)*FDLNTH) get the character count 457 * for the second half 081DC 60840C00 2 IMM 458 LD R2 ADR WNDO2 load the destination address 081DD FE400000 459 CMOVE move over the second half 081DE 62000C02 01 460 LD2 R0 WNDO2/FDNAME fetch the first name in the block 081DF E6178803 016 BASE 461 ST2 R0 SP,FJSNAM2 save for a while 081E0 60000C04 0 462 LD R0 WNDO2/FDEXTEN get the extension 081E1 E4178805 0 6 BASE 463 ST R0 SP,FJSEXT2 and save 081E2 DC40315C 464 CALLNP DMOTEWNDO1 release window with old UDIR2 block 465 * We use demote to save a useless write, 466 * since we will free this block 081E3 DC4031A0 467 CALLNP FORCEWRW2 force out the new block 468 * \ / 081E4 DC40811E 469 CALLNP LOCKDIR lock the UDIR1 into window 2 081E5 0000820C 470 ADR BLKSERR pass error address 471 * \ / 081E6 60D7480E 3 5 BASE 472 LD R3 FCB,FCJCXH fetch the address of the current index 081E7 6096D005 2 3 REG 473 LD R2 R3+UDINDXLEN make the destination address 081E8 7052C000 1 3 REG 474 LDN R1 R3 081E9 18440FF8 1 IMM 475 ADD R1 ADR(WNDO2(UD1LINDX)) make the word count 081EA FE0E81ED 476 JMP BKSPND go to end of loop 477 * --- 000081EB 478 BKSFLP LABEL 081EB 601CC800 0 31 BASE 479 LD R0 R3,0(R1) load the source word 081EC E41C8800 0 21 BASE 480 ST R0 R2,0(R1) store into the new location 000081ED 481 BKSPND LABEL 081ED FA6681EB 1 482 JDR R1 BKSFLP count down the index 483 * \ / 081EE 60178801 0 6 BASE 484 LD R0 SP,FJSBLK1 fetch the first new block MS address 081EF E008D183 0 3 ZBM 485 EXCH R0 R3,UDINDXADR set up the new entry 486 * also fetching address of old block 081F0 E417480E 0 5 BASE 487 ST R0 FCB,FCJCXH save for a later freeing operation 081F1 60040015 0 IMM 488 LD R0 (UD2FDECNT+1)/2 fetch the first new block count 081F2 E416C00C 0 3 CACH 489 ST R0 R3,UDINDXNUM 490 * \ / name already in place, same as original block 081F3 60178802 0 6 BASE 491 LD R0 SP,FJSBLK2 get the second new block MS address 081F4 E4089183 0 2 ZBM 492 ST R0 R2,UDINDXADR set into new index entry 081F5 60040015 0 IMM 493 LD R0 UD2FDECNT/2 get the count of entries in the second block 081F6 E416800C 0 2 CACH 494 ST R0 R2,UDINDXNUM 081F7 62178803 016 BASE 495 LD2 R0 SP,FJSNAM2 load the first name in the second block 081F8 E6168800 012 BASE 496 ST2 R0 R2,UDINDXNAM set the second blocks first entry 081F9 60178805 0 6 BASE 497 LD R0 SP,FJSEXT2 retrieve the extension 081FA E4168802 0 2 BASE 498 ST R0 R2,UDINDXEXT and place into the index entry 499 * \ / 500 PLOCK ULLIMLOCK critical region to update ULB limits 081FB 0CC00000 500 IOFF 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1812 (FREQUDR) F 115 FREQ - Utilities for Directory Routines 081FC D1C01EAF 500 SETT ULLIMLOCK 081FD FE0C81FF 500 JNE MA(2+DISPW MA 0) 081FE DC40308B 500 CALLNP LOCKWAIT 081FF D009118E 4 ZBM 501 INC ULB,ULDSKUSD count up saved space used 502 PUNLOCK ULLIMLOCK release lock 08200 EC001EAF 502 STZ ULLIMLOCK 08201 0C800000 502 ION 503 * \ / 08202 DC4031A0 504 CALLNP FORCEWRW2 force out the newly expanded directory 08203 DC403153 505 CALLNP GRUBWNDO2 and release the window 08204 DC405685 506 CALLNP FREEDIR let go the directory 507 * \ / 08205 60090081 0 4 ZBM 508 LD R0 ULB,ULDRIVE get the volume for this account 08206 E409408E 0 5 ZBM 509 ST R0 FCB,FCJCXH/VOLFIELD set into this MS address 510 * \ / 08207 DC004FEA 511 CALL FREEFILE call to free this block 08208 4157480E 5 BASE 512 PARV FCB,FCJCXH block address 08209 40440000 IMM 513 PARVL FFTUNKNOWN indicate single misc. block 0820A 19C40001 7 IMM 514 ADD R7 1 advance return over error address 0820B 5D1F8006 6 STAK 515 LEAVE POP return 516 * --- 517 0000820C 518 BLKSERR LABEL 0820C E4178805 0 6 BASE 519 ST R0 SP,FJSEXT2 save error code 0820D DC403150 520 CALLNP GRUBWNDO1 release window 0820E DC403153 521 CALLNP GRUBWNDO2 release window with directory block 0820F DC405685 522 CALLNP FREEDIR release the directory 08210 60178805 0 6 BASE 523 LD R0 SP,FJSEXT2 restore error code 08211 61D7C800 7 7 BASE 524 LD R7 R7,0 load the error return address 08212 5D1F8006 6 STAK 525 LEAVE POP return to error return 526 * --- 527 528 END BLKSPLIT subroutine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1813 (FREQUDR) F 115 FREQ - Utilities for Directory Routines 530 531 ********************************************************************************** 532 * * 533 * DIRSHRINK * 534 * Routine to check through UDIR1 and see if any two UDIR2 * 535 * blocks can be combined into one block less than 2/3 full. * 536 * The counts in the UDIR1 index may be incorrect to the extent * 537 * that we select two blocks that cannot really be combined. In * 538 * this case, back off and do nothing. In later versions, * 539 * we might fix the counts. * 540 * The directory must already be held by the calling process. The * 541 * UDIR1 block must be in WNDO2. FCB, ULB, and SP must all be * 542 * set up. * 543 * Call: * 544 * ULB, FCB * 545 * CALLNP DIRSHRINK * 546 * ADR * 547 * * 548 * On normal or error returns, the windows are unmapped * 549 * and the directory is released. * 550 * * 551 * Eats R0:R3 * 552 * Stack required = 13 * 553 * 6 + max ( FORCEWRWx (5), FREEDIR (5), FREEFILE (3), * 554 * GRUBWNDOx (7), LOCKDIR (5), LOCKLIST (1), * 555 * LOCKWAIT (0), SETERRW2 (1), SETWNDO2 (4), * 556 * TABFREEW1 (7), ULKWNDO1 (1), UNLOCKLIST (1) ) * 557 * * 558 ********************************************************************************** 559 560 BLOCK DIRSHRINK subroutine 561 ENTRY DIRSHRINK to check for combination of two UDIR2 blocks 562 563 BEGFRAME 00178801 6 BASE 564 DSHNBLK BSS 1 temp for new block number 00178802 6 BASE 565 DSHHLDX BSS 1 location to store the UDIR1 index 00178803 6 BASE 566 DSHNAME BSS 2 (double) holds first name in block 00178805 6 BASE 567 DSHEXT BSS 1 holds the extension 568 ENDFRAME 569 08213 DD5F8006 6 STAK 570 DIRSHRINK ENTRNP PUSH 08214 60048279 0 IMM 571 LD R0 ADR DSHMSERR load the address of our error routine 08215 DC40318D 572 CALLNP SETERRW2 set up this window error return 573 08216 60170801 0 4 BASE 574 LD R0 ULB,ULBLOCK get a MS address prototype 08217 E417480F 0 5 BASE 575 ST R0 FCB,FCJCDE set up the local prototypes 08218 E417480E 0 5 BASE 576 ST R0 FCB,FCJCXH 577 08219 60840C60 2 IMM 578 LD R2 ADR WNDO2(UDFDLIST) load pointer to index 0821A 60489183 1 2 ZBM 579 LD R1 R2,UDINDXADR fetch MS address of first UDIR2 0000821B 580 DIRSHNXT LABEL 0821B 6016800C 0 2 CACH 581 LD R0 R2,UDINDXNUM load number of entries in this block 0821C E449518F 1 5 ZBM 582 ST R1 FCB,FCJCDE/MSBLKFIELD save MS address of this block 0821D FA02828D 0 583 JEQZ R0 DIRMTB check for an unused block 0821E 18840005 2 IMM 584 ADD R2 UDINDXLEN advance to the next index 0821F 64840FF8 2 IMM 585 CPR R2 ADR WNDO2(UD1LINDX) check for absolute end of table 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1814 (FREQUDR) F 115 FREQ - Utilities for Directory Routines 08220 FE0482AC 586 JGT DIRDUMP2 jump if beyond end 08221 60489183 1 2 ZBM 587 LD R1 R2,UDINDXADR load the MS address of this block 08222 FA4282AC 1 588 JEQZ R1 DIRDUMP2 jump if no entry here 08223 1816800C 0 2 CACH 589 ADD R0 R2,UDINDXNUM total the number of entries 08224 6404001C 0 IMM 590 CPR R0 (UD2FDECNT*2)/3 check for a small total 08225 FE06821B 591 JGE DIRSHNXT try next pair if too large 08226 E449518E 1 5 ZBM 592 ST R1 FCB,FCJCXH/MSBLKFIELD save MS address of second block 08227 10840005 2 IMM 593 SUB R2 UDINDXLEN back up to first entry of pair 594 * being combined 08228 E4978802 2 6 BASE 595 ST R2 SP,DSHHLDX save the index pointer 596 08229 DC0080E7 597 CALL TABFREEW1 call for a free block in window 1 0822A 4144000A IMM 598 PARV FBITUDIR2 this is the type it will become 0822B 42400C20 599 PARV2L WNDO2(UDSERNO) pass the account serial number 0822C 00008279 600 ADR DSHMSERR indicate error address 0822D E4178801 0 6 BASE 601 ST R0 SP,DSHNBLK save the block number acquired 0822E DC403276 602 CALLNP ULKWNDO1 release this window for swapping 603 0822F DC0031FF 604 CALL SETWNDO2 set up the first of the blocks 08230 41440001 IMM 605 PARV VPCNTLRO pass the control field 08231 41440000 IMM 606 PARV VPNOFCB indicate no lun associated with this block 08232 41008280 607 PAR HFMSERR error address 08233 4157480F 5 BASE 608 PARV FCB,FCJCDE the first of the two UDIR2 blocks 08234 4044000A IMM 609 PARVL FBITUDIR2 type of block expected 610 08235 FA2882AE 0 611 JSR R0 D2CNTR count and find end of entries 08236 604A5F30 1 1 CBM 612 LD R1 R1/FLDCHARS make into a character count 08237 60040C00 0 IMM 613 LD R0 ADR WNDO2 the source address 08238 60840800 2 IMM 614 LD R2 ADR WNDO1 the destination address 08239 FE400000 615 CMOVE copy the first block 0823A 61128000 4 2 REG 616 LD R4 R2 save the next available char address 617 0823B DC0031FF 618 CALL SETWNDO2 set up for the second block 0823C 41440001 IMM 619 PARV VPCNTLRO specify the control field 0823D 41440000 IMM 620 PARV VPNOFCB indicate no lun associated with this block 0823E 41008280 621 PAR HFMSERR error on block retrieval 0823F 4157480E 5 BASE 622 PARV FCB,FCJCXH the second block MS address 08240 4044000A IMM 623 PARVL FBITUDIR2 the type of the block 624 08241 60930000 2 4 REG 625 LD R2 R4 retrieve the destination address 08242 61095114 4 5 ZBM 626 LD ULB FCB,FCLIMITPTR restore the ULB ptr 08243 FA2882AE 0 627 JSR R0 D2CNTR find end of entries 08244 60D24000 3 1 REG 628 LD R3 R1 08245 604ADF30 1 3 CBM 629 LD R1 R3/FLDCHARS make into a character count 08246 18D28000 3 2 REG 630 ADD R3 R2 produce LWA of move 08247 64C40C00 3 IMM 631 CPR R3 ADR WNDO1(WPP) check for overflow of destination block 08248 FE048282 632 JGT DIRSHBCNT jump if UDIR1 has bad counts 08249 60040C00 0 IMM 633 LD R0 ADR WNDO2 the source address 0824A FE400000 634 CMOVE copy over the second block 0824B 10840800 2 IMM 635 SUB R2 ADR WNDO1 get length of this new block 0824C 14840018 2 IMM 636 DIV R2 FDLNTH make entry count 0824D E4898081 2 6 ZBM 637 ST R2 SP,DSHNBLK/VOLFIELD save the count for later 0824E 62000802 01 638 LD2 R0 WNDO1/FDNAME fetch the first name in the block 0824F E6178803 016 BASE 639 ST2 R0 SP,DSHNAME save for later 08250 60000804 0 640 LD R0 WNDO1/FDEXTEN get the extension 08251 E4178805 0 6 BASE 641 ST R0 SP,DSHEXT and save it 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1815 (FREQUDR) F 115 FREQ - Utilities for Directory Routines 08252 DC40319D 642 CALLNP FORCEWRW1 force out the new block 08253 DC403150 643 CALLNP GRUBWNDO1 and unmap the window 644 645 * \ / 646 08254 DC40811E 647 CALLNP LOCKDIR lock the UDIR1 into window 2 08255 00008279 648 ADR DSHMSERR pass the error address 649 08256 60978802 2 6 BASE 650 LD R2 SP,DSHHLDX fetch back the current UDIR1 index 08257 60169005 0 2 REG 651 LD R0 R2+UDINDXLEN make the source address 08258 70528000 1 2 REG 652 LDN R1 R2 08259 18440FF8 1 IMM 653 ADD R1 ADR(WNDO2(UD1LINDX)) make the word count 0825A 604A5F30 1 1 CBM 654 LD R1 R1/FLDCHARS produce a character count 0825B FE400000 655 CMOVE close up the index 0825C 60440014 1 IMM 656 LD R1 UDINDXLEN*CPW 0825D FE580000 657 CFILL 0 zero the vacated entry 658 0825E 60978802 2 6 BASE 659 LD R2 SP,DSHHLDX fetch back the current UDIR1 index 0825F 60178801 0 6 BASE 660 LD R0 SP,DSHNBLK fetch the new blocks MS address 08260 E4168803 0 2 BASE 661 ST R0 R2,UDINDXDAW set up the new entry 662 08261 62178803 016 BASE 663 LD2 R0 SP,DSHNAME get the name of the first entry 08262 E6168800 012 BASE 664 ST2 R0 R2,UDINDXNAM set the UDIR2 first entry into UDIR1 08263 60178805 0 6 BASE 665 LD R0 SP,DSHEXT retrieve the extension 08264 E4168802 0 2 BASE 666 ST R0 R2,UDINDXEXT and place into index entry 667 08265 DC4031A0 668 CALLNP FORCEWRW2 force out the newly expanded directory 08266 DC403153 669 CALLNP GRUBWNDO2 and unmap the window 670 08267 DC004FEA 671 CALL FREEFILE call to free this block 08268 4157480E 5 BASE 672 PARV FCB,FCJCXH block address 08269 40440000 IMM 673 PARVL FFTUNKNOWN don't care about the type 674 * \ / 675 0000826A 676 DIRSHXITY LABEL 0826A DC004FEA 677 CALL FREEFILE call to free this block 0826B 4157480F 5 BASE 678 PARV FCB,FCJCDE block address 0826C 40440000 IMM 679 PARVL FFTUNKNOWN don't care about the type 680 PLOCK ULLIMLOCK critical region for updating ULB limits 0826D 0CC00000 680 IOFF 0826E D1C01EAF 680 SETT ULLIMLOCK 0826F FE0C8271 680 JNE MA(2+DISPW MA 0) 08270 DC40308B 680 CALLNP LOCKWAIT 08271 D049118E 4 ZBM 681 DEC ULB,ULDSKUSD count down the saved total 08272 FE068274 682 JGE DIRSHULK jump if sign okay 08273 EC09118E 4 ZBM 683 STZ ULB,ULDSKUSD otherwise, prevent negative 00008274 684 DIRSHULK LABEL 685 PUNLOCK ULLIMLOCK release hold of lock 08274 EC001EAF 685 STZ ULLIMLOCK 08275 0C800000 685 ION 686 * \ / 687 00008276 688 DIRSHXIT LABEL 08276 DC405685 689 CALLNP FREEDIR release the directory 08277 19C40001 7 IMM 690 ADD R7 1 advance over the error address 08278 5D1F8006 6 STAK 691 LEAVE POP return 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1816 (FREQUDR) F 115 FREQ - Utilities for Directory Routines 692 * --- 693 00008279 694 DSHMSERR LABEL 08279 E4178805 0 6 BASE 695 ST R0 SP,DSHEXT save error code 0827A DC403150 696 CALLNP GRUBWNDO1 release window 0827B DC403153 697 CALLNP GRUBWNDO2 release window with directory block 0827C DC405685 698 CALLNP FREEDIR release the directory 0827D 60178805 0 6 BASE 699 LD R0 SP,DSHEXT restore error code 0827E 61D7C800 7 7 BASE 700 LD R7 R7,0 load the error return address 0827F 5D1F8006 6 STAK 701 LEAVE POP return to error address 702 * --- 703 704 ********************************************************************************** 705 * We have discovered that the UDIR1 counts were * 706 * screwed up. Release the new block that we had * 707 * gotten and exit. Later we might consider fixing * 708 * the counts here. For now, let the guy save or unsave a * 709 * file in this block to fix the count. * 710 ********************************************************************************** 711 00008280 712 HFMSERR LABEL 08280 61D7C800 7 7 BASE 713 LD R7 R7,0 pick up error address 08281 FE0E8283 714 JMP DIRSHARE share code 715 * --- 716 00008282 717 DIRSHBCNT LABEL 08282 19C40001 7 IMM 718 ADD R7 1 advance to good return 719 * \ / 720 00008283 721 DIRSHARE LABEL 08283 60978801 2 6 BASE 722 LD R2 SP,DSHNBLK fetch the new blocks number 08284 60094081 0 5 ZBM 723 LD R0 FCB,FCDRIVE load the correct volume number 08285 E40A8080 0 2 CBM 724 ST R0 R2/VOLFIELD place volume with the block 08286 DC004FEA 725 CALL FREEFILE call to release the block 08287 41528000 2 REG 726 PARV R2 pass the block number 08288 40440000 IMM 727 PARVL FFTUNKNOWN indicate type is single block 08289 DC403150 728 CALLNP GRUBWNDO1 release the window with the free block 0828A DC403153 729 CALLNP GRUBWNDO2 release the UDIR2 block 0828B DC405685 730 CALLNP FREEDIR release the directory 0828C 5D1F8006 6 STAK 731 LEAVE POP return with no changes to directory 732 * --- 733 734 ********************************************************************************** 735 * * 736 * A block appears to be empty. We check to verify this. If * 737 * it is empty, we dump it and close up the UDIR1. * 738 * * 739 ********************************************************************************** 740 0000828D 741 DIRMTB LABEL 0828D E4978802 2 6 BASE 742 ST R2 SP,DSHHLDX save pointer into UDIR1 block 0828E DC0031FF 743 CALL SETWNDO2 get the UDIR2 block in 0828F 41440001 IMM 744 PARV VPCNTLRO 08290 41440000 IMM 745 PARV VPNOFCB indicate no lun associated with this block 08291 41008279 746 PAR DSHMSERR 08292 4157480F 5 BASE 747 PARV FCB,FCJCDE 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1817 (FREQUDR) F 115 FREQ - Utilities for Directory Routines 08293 4044000A IMM 748 PARVL FBITUDIR2 08294 5C000C00 749 CMZ WNDO2 see if entry in first spot 750 * tested after call 08295 DC40811E 751 CALLNP LOCKDIR lock the UDIR1 into window 2 08296 00008279 752 ADR DSHMSERR pass the error address 753 * \ / 08297 60978802 2 6 BASE 754 LD R2 SP,DSHHLDX fetch back the current UDIR1 index 755 * condition bits set before subroutine call 08298 FE0C82AA 756 JNE DIRSHNONZ jump if there are really entries here 08299 60169005 0 2 REG 757 LD R0 R2+UDINDXLEN make the source address 0829A 70528000 1 2 REG 758 LDN R1 R2 0829B 18440FF8 1 IMM 759 ADD R1 ADR(WNDO2(UD1LINDX)) make the word count 0829C 604A5F30 1 1 CBM 760 LD R1 R1/FLDCHARS produce a character count 0829D FE400000 761 CMOVE close up the index 0829E 5C000C60 762 CMZ WNDO2(UDFDLIST) check for at least one secondary block 0829F FE0C82A7 763 JNE STILLRAF jump if still a UDIR2 block 082A0 60040C00 0 IMM 764 LD R0 ADR WNDO2 get the UDIR1 address 082A1 EC08001A 0 ZBM 765 STZ R0,UDTYPE indicate in UDIR1 that it's now small 766 * \ / 082A2 DC003096 767 CALL LOCKLIST request modify access to ULB list 082A3 40001EAC 768 PARL ULLOCK lock to hold 082A4 EC090410 4 ZBM 769 STZ ULB,ULRAFDIR and in the ULB 082A5 DC0030A4 770 CALL UNLOCKLIST release list for others to search/modify 082A6 40001EAC 771 PARL ULLOCK lock to release 772 * \ / 773 000082A7 774 STILLRAF LABEL 082A7 DC4031A0 775 CALLNP FORCEWRW2 force out the newly modified directory 082A8 DC403153 776 CALLNP GRUBWNDO2 and release the window 082A9 FE0E826A 777 JMP DIRSHXITY count down saved and exit 778 * --- 779 000082AA 780 DIRSHNONZ LABEL UDIR2 actually has an entry 082AA EDD6800C 2 CACH 781 STW R2,UDINDXNUM indicate in UDIR1 that UDIR2 is not empty 082AB DC4031A0 782 CALLNP FORCEWRW2 force out the directory 000082AC 783 DIRDUMP2 LABEL 082AC DC403153 784 CALLNP GRUBWNDO2 and release the window 082AD FE0E8276 785 JMP DIRSHXIT go and return 786 * --- 787 788 ********************************************************************************** 789 * * 790 * Routine to find after the last entry in the UD2 block in * 791 * window 2. * 792 * Call: * 793 * JSR R0 D2CNTR * 794 * * 795 * Returns R1=count (in words) used in the UD2 block. * 796 * Gets R0 and R1. * 797 * * 798 ********************************************************************************** 799 000082AE 800 D2CNTR LABEL 082AE 60440000 1 IMM 801 LD R1 0 initialize scan address 000082AF 802 NTNLP LABEL 082AF 5C220C00 1 803 CMZ WNDO2(R1) is this entry the end? 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1818 (FREQUDR) F 115 FREQ - Utilities for Directory Routines 082B0 FE0282B5 804 JEQ NTNLVP zero indicates not an entry 082B1 18440018 1 IMM 805 ADD R1 FDLNTH advance pointer to next entry 082B2 644403E8 1 IMM 806 CPR R1 UDLFDE check for beyond end 082B3 FE0A82AF 807 JLE NTNLP go back to check next entry 082B4 FE0E8282 808 JMP DIRSHBCNT this block clear full, obvious count error 809 * --- 810 000082B5 811 NTNLVP LABEL 082B5 5CD20000 0 REG 812 LDPCS R0 return 813 * --- 814 815 END DIRSHRINK subroutine 816 817 END Directory Manipulation Routines 175 INPUT FREQDEND the end of the directory routines block 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1819 (FREQDEND) F 116 CREF of the directory routines 3 4 END DHEAD Directory Manipulation FREQs 176 INPUT SRCHDIR directory search routine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1820 (SRCHDIR) F 117 Directory Searching Routines 3 4 ********************************************************************************** 5 * * 6 * SRCHDIR. Search for a directory entry. * 7 * Called with information in FCB and will search the * 8 * directory for an entry with a matching name. A file being * 9 * closed is ignored unless the files validation SUN is * 10 * different from the current system SUN. This is possible * 11 * only in the event that the system crashed while a doomed * 12 * file was still equipped. We find such files and * 13 * EQUIP has the smarts to promptly UNEQUIP them, after * 14 * which they go away. * 15 * The SRCHDIRSN entry is provided to search the * 16 * directory for a particular file (by serial number match). * 17 * Note that SRCHDIRSN chooses the starting location for the * 18 * directory search assuming that the file has the same name * 19 * as in the FCB. This will normally be true and will ensure * 20 * a rapid lookup in the normal case. If the file has been * 21 * RENAMEd, the searcher will continue through all blocks of * 22 * the directory looking for the current location of the file. * 23 * The SRCHDIRLKS entry is provided to search by serial * 24 * number a directory that is already locked. * 25 * Call: * 26 * FCB => file control block * 27 * CALL SRCHDIR * 28 * PARL * 29 * * 30 * * 31 * On the normal return, the directory is locked to this * 32 * process. The block (UDIR1 or UDIR2, as appropriate) * 33 * containing the directory entry (or the insertion point) is * 34 * left in window 1 with read/write access and locked. If the * 35 * directory is a RAF type directory, then the primary block * 36 * is left in window 2 with read/write access (but not * 37 * locked). The condition bits are EQ if found, NE if not. * 38 * R2 => UDIR1 index (if raf type directory otherwise, garbage) * 39 * R3 => entry if found, insertion point if not found. * 40 * ULB => user limit block * 41 * FCB => file control block * 42 * * 43 * If an error occurs on the directory window (usually a * 44 * disk error on the directory) both WNDO1 and WNDO2 are grubbed, * 45 * the directory is freed, and the return is to . * 46 * * 47 * Eats R0:R3, ULB * 48 * Stack required = 11 * 49 * 4 + max ( FETCHDIR (4), FREEDIR (5), GRUBWNDOx (7), * 50 * MAPOUTFBI (2), SETERRWx (1), SETWNDOx (4) ) * 51 * * 52 ********************************************************************************** 53 54 DIRECTORY BLOCK SRCHDIR, SRCHDIRLKS, SRCHDIRSN subroutines 55 ENTRY SRCHDIR search for a named file 56 ENTRY SRCHDIRLKS search for serial number, dir already locked 57 ENTRY SRCHDIRSN search for specific serial number 58 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1821 (SRCHDIR) F 117 Directory Searching Routines 59 BEGFRAME 00178801 6 BASE 60 SRCDIRENTE BSS 1 error address return 00178802 6 BASE 61 SRCDIRENTT BSS 1 temp for position in index 00178803 6 BASE 62 SRCDIREF BSS 1 end flag 63 ENDFRAME 64 082B6 DD1F8004 6 STAK 65 SRCHDIRLKS ENTR PUSH 082B7 C0178801 6 BASE 66 STPL SP,SRCDIRENTE save the error address 082B8 EDC97214 5 ZBM 67 STW FCB,FCSRCHSN indicate looking by serial number 082B9 61095114 4 5 ZBM 68 LD ULB FCB,FCLIMITPTR load the limit block pointer 082BA FE0E82C4 69 JMP SRCHDIRALK enter after locking 70 * --- 71 082BB DD1F8004 6 STAK 72 SRCHDIRSN ENTR PUSH 082BC C0178801 6 BASE 73 STPL SP,SRCDIRENTE save the error address 082BD EDC97214 5 ZBM 74 STW FCB,FCSRCHSN indicate looking by serial number 082BE FE0E82C2 75 JMP SRCHDIREN share code as much as possible 76 * --- 77 082BF DD1F8004 6 STAK 78 SRCHDIR ENTR PUSH 082C0 C0178801 6 BASE 79 STPL SP,SRCDIRENTE save the error address 082C1 EC097214 5 ZBM 80 STZ FCB,FCSRCHSN indicate looking by name 81 000082C2 82 SRCHDIREN LABEL 082C2 61095114 4 5 ZBM 83 LD ULB FCB,FCLIMITPTR fetch limit block pointer 082C3 DC405667 84 CALLNP FETCHDIR lock up the directory 000082C4 85 SRCHDIRALK LABEL 082C4 5C090410 4 ZBM 86 CMZ ULB,ULRAFDIR is it a RAF type directory? 082C5 FE0C82FB 87 JNE SRCDIRRAF jump if RAF type directory 88 082C6 DC003205 89 CALL SETWNDO1 set up this window 082C7 41440002 IMM 90 PARV VPCNTLW+VPCNTLLK pass the control field 082C8 41440000 IMM 91 PARV VPNOFCB indicate no lun associated with this block 082C9 41008355 92 PAR SRCDIRDERR pass the error address 082CA 41570801 4 BASE 93 PARV ULB,ULBLOCK mass storage address of UDIR1 082CB 40440009 IMM 94 PARVL FBITUDIR1 type of block expected 082CC DC40261B 95 CALLNP MAPOUTFBI unmap FBI, ION 96 082CD 60C40860 3 IMM 97 LD R3 ADR (WNDO1(UDFDLIST)) make initial address for search 082CE 5C097214 5 ZBM 98 CMZ FCB,FCSRCHSN check kind of search 082CF FE0C82F2 99 JNE SRCDIRSERN jump if search by serial number 100 * \ / 101 ********************************************************************************** 102 * Search a small UDIR for a file by name. * 103 ********************************************************************************** 104 * \ / 082D0 6217480B 015 BASE 105 LD2 R0 FCB,FCNAME get name to search for 000082D1 106 SRCDIRENLP LABEL 082D1 5C16C800 3 BASE 107 CMZ R3,0 is this past the last entry in the UDIR? 082D2 FE0282D9 108 JEQ SRCDIRENNF if so, jump to give not found exit 082D3 6A16C802 013 BASE 109 UCPR2 R0 R3,FDNAME is this the file? 082D4 FE0282DB 110 JEQ SRCDIRFND jump if match on name 082D5 FE0882D9 111 JLT SRCDIRENNF if past sort point, give not found exit 000082D6 112 SRCDIRGO LABEL 082D6 18C40018 3 IMM 113 ADD R3 FDLNTH increment pointer 082D7 64C40BE8 3 IMM 114 CPR R3 ADR (WNDO1(UDLFDE)) beyond end of block? 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1822 (SRCHDIR) F 117 Directory Searching Routines 082D8 FE0A82D1 115 JLE SRCDIRENLP jump if more to search 116 * \ / 117 * file not found - set condition to not equal 000082D9 118 SRCDIRENNF LABEL 082D9 5C040001 IMM 119 CMZ 1 set condition to not equal 082DA FE0E82EA 120 JMP SRCHXIT give condition to the caller 121 * --- 122 123 * Name match, check the extension. 000082DB 124 SRCDIRFND LABEL 082DB 6017480D 0 5 BASE 125 LD R0 FCB,FCNAMEEXT get this files extension 082DC 6816C804 0 3 BASE 126 UCPR R0 R3,FDEXTEN does the extension match? 082DD FE0882D9 127 JLT SRCDIRENNF jump if past sort point 082DE FE0C82F0 128 JNE SRCDIRRESN jump if not a match, keep looking 129 * File found - is this one usable? 082DF 5C08DE10 3 ZBM 130 CMZ R3,FDFBD is this file being destroyed? 082E0 FE0282E4 131 JEQ SRCDIRXIT jump if good file 082E1 6016C000 0 3 CACH 132 LD R0 R3,FDSUN get file validation SUN 082E2 64101EFD 0 @ 133 CPR R0 FILESUN compare to current system up number 082E3 FE0282F0 134 JEQ SRCDIRRESN jump if doomed - try for another 000082E4 135 SRCDIRXIT LABEL 136 ********************************************************************************** 137 * Temporary fix to get rid of MW privilege. * 138 ********************************************************************************** 139 082E4 6008D830 0 3 ZBM 140 LD R0 R3,FDPRIV * pick up the current privilege 082E5 64040004 0 IMM 141 CPR R0 FDACSMW * check for multiple write 082E6 FE0C82E9 142 JNE SDNOTMW * jump if not 082E7 60040000 0 IMM 143 LD R0 FDACSRW * load read/write instead 082E8 E408D830 0 3 ZBM 144 ST R0 R3,FDPRIV * and store into entry 000082E9 145 SDNOTMW LABEL * 146 * entry found - set condition to equal 082E9 5C040000 IMM 147 CMZ 0 set condition to equal 000082EA 148 SRCHXIT LABEL 082EA D80BDA20 7 CBM 149 STPSR R7/BITS 13:14 set into return PSR/PC 082EB 60178801 0 6 BASE 150 LD R0 SP,SRCDIRENTE get error address 082EC DC403190 151 CALLNP SETERRW1 see that errors goto caller 082ED DC40318D 152 CALLNP SETERRW2 082EE 60978802 2 6 BASE 153 LD R2 SP,SRCDIRENTT load the UDIR1 index ptr 082EF 5D1F8004 6 STAK 154 LEAVE POP 155 * --- 156 157 * Restore the file name in the registers and continue searching 000082F0 158 SRCDIRRESN LABEL 082F0 6217480B 015 BASE 159 LD2 R0 FCB,FCNAME reload the name 082F1 FE0E82D6 160 JMP SRCDIRGO ...and continue on 161 * --- 162 163 ********************************************************************************** 164 * Search a small UDIR for a file by serial number. * 165 ********************************************************************************** 166 000082F2 167 SRCDIRSERN LABEL 082F2 62174809 015 BASE 168 LD2 R0 FCB,FCSERIAL get the file serial number 000082F3 169 SRCDIRSERT LABEL 082F3 5C16C800 3 BASE 170 CMZ R3,0 is this past the last entry in the UDIR? 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1823 (SRCHDIR) F 117 Directory Searching Routines 082F4 FE0282D9 171 JEQ SRCDIRENNF if so, jump to give not found exit 082F5 6616C80A 013 BASE 172 CPR2 R0 R3,FDSERNO is this the file we're looking for? 082F6 FE0282E4 173 JEQ SRCDIRXIT jump if it is 082F7 18C40018 3 IMM 174 ADD R3 FDLNTH advance to the next entry 082F8 64C40BE8 3 IMM 175 CPR R3 ADR(WNDO1(UDLFDE)) check for end of directory 082F9 FE0A82F3 176 JLE SRCDIRSERT jump if more to search 082FA FE0E82D9 177 JMP SRCDIRENNF end of DIR, entry not found 178 * --- 179 180 ********************************************************************************** 181 * Directory is in a RAF type format. Fetch in the * 182 * UDIR1 (index) block and see which UDIR2 block might * 183 * contain our entry. We also do this for a search by * 184 * serial number since that provides the best possible * 185 * guess as to its location. * 186 ********************************************************************************** 187 000082FB 188 SRCDIRRAF LABEL 082FB EC178803 6 BASE 189 STZ SP,SRCDIREF indicate no encounter with directory end 082FC DC0031FF 190 CALL SETWNDO2 set up this window 082FD 41440000 IMM 191 PARV VPCNTLW pass the control field 082FE 41440000 IMM 192 PARV VPNOFCB indicate no lun associated with this block 082FF 41008356 193 PAR SRCDIRDER1 pass the error address 08300 41570801 4 BASE 194 PARV ULB,ULBLOCK mass storage address of UDIR1 08301 40440009 IMM 195 PARVL FBITUDIR1 type of block expected 08302 60840C60 2 IMM 196 LD R2 ADR(WNDO2(UDFDLIST)) load pointer to the dir index 08303 6217480B 015 BASE 197 LD2 R0 FCB,FCNAME get name to search for 00008304 198 SRCDIRRFLP LABEL 08304 5C089183 2 ZBM 199 CMZ R2,UDINDXADR is there an entry? 08305 FE028310 200 JEQ SRCDIRRFLK jump if entry not found 08306 6A168800 012 BASE 201 UCPR2 R0 R2,UDINDXNAM is this the proper entry? 08307 FE088310 202 JLT SRCDIRRFLK jump if it might be earlier block 08308 FE04830D 203 JGT SRCDIRSGL jump if name completely determines block 08309 6017480D 0 5 BASE 204 LD R0 FCB,FCNAMEEXT otherwise, get the extension 0830A 68168802 0 2 BASE 205 UCPR R0 R2,UDINDXEXT and check against entry 0830B FE0A8310 206 JLE SRCDIRRFLK jump if we back up one 0830C 6017480B 0 5 BASE 207 LD R0 FCB,FCNAME otherwise, restore the first half name 208 0000830D 209 SRCDIRSGL LABEL 0830D 18840005 2 IMM 210 ADD R2 UDINDXLEN move to the next entry 0830E 64840FF8 2 IMM 211 CPR R2 ADR (WNDO2(UD1LINDX)) are we past the end of the block? 0830F FE0A8304 212 JLE SRCDIRRFLP jump if not - search on 213 * \ / the insertion point is in the last block 214 215 216 * A block has been found that may contain our entry - get it 217 * \ / 00008310 218 SRCDIRRFLK LABEL 08310 64840C60 2 IMM 219 CPR R2 ADR (WNDO2(UDFDLIST)) is there a previous block? 08311 FE028313 220 JEQ SRCDIRRGA if not, then look in the first block 08312 10840005 2 IMM 221 SUB R2 UDINDXLEN move back to the previous entry 00008313 222 SRCDIRRGA LABEL 08313 E4978802 2 6 BASE 223 ST R2 SP,SRCDIRENTT save the current position 08314 61174801 4 5 BASE 224 LD R4 FCB,FCBLOCK fetch an MS address on our volume 08315 60089183 0 2 ZBM 225 LD R0 R2,UDINDXADR get UDIR2 MS address 08316 E40B1180 0 4 CBM 226 ST R0 R4/MSBLKFIELD use volume field from FCBLOCK 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1824 (SRCHDIR) F 117 Directory Searching Routines 227 08317 DC003205 228 CALL SETWNDO1 get the block in 08318 41440002 IMM 229 PARV VPCNTLW+VPCNTLLK indicate RW and locked 08319 41440000 IMM 230 PARV VPNOFCB indicate no lun associated with this block 0831A 41008355 231 PAR SRCDIRDERR indicate error address 0831B 41530000 4 REG 232 PARV R4 specify the MS address 0831C 4044000A IMM 233 PARVL FBITUDIR2 indicate block type expected 0831D DC40261B 234 CALLNP MAPOUTFBI unmap FBI, ION 235 0831E 61095114 4 5 ZBM 236 LD ULB FCB,FCLIMITPTR restore the ULB pointer (R4) 0831F 60C40800 3 IMM 237 LD R3 ADR WNDO1 get the first addr to search 08320 5C097214 5 ZBM 238 CMZ FCB,FCSRCHSN check kind of search 08321 FE0C8343 239 JNE SRCLKSERN jump if search by serial number 08322 6217480B 015 BASE 240 LD2 R0 FCB,FCNAME pick up name 00008323 241 SRCDISENLP LABEL 08323 5C16C800 3 BASE 242 CMZ R3,0 is this past the last entry in the UDIR? 08324 FE02832B 243 JEQ SRCDIRRFNF jump if not found 08325 6A16C802 013 BASE 244 UCPR2 R0 R3,FDNAME is this the file? 08326 FE028338 245 JEQ SRCDISFND jump if found 08327 FE0882D9 246 JLT SRCDIRENNF not found if past sort point 00008328 247 SRCDISGO LABEL 08328 18C40018 3 IMM 248 ADD R3 FDLNTH increment pointer 08329 64C40BE8 3 IMM 249 CPR R3 ADR (WNDO1(UDLFDE)) off the end? 0832A FE0A8323 250 JLE SRCDISENLP jump if more to search 251 * \ / 252 253 * Entry was not found in the last block - try adjacent ones 254 * \ / 0000832B 255 SRCDIRRFNF LABEL 0832B 60978802 2 6 BASE 256 LD R2 SP,SRCDIRENTT get our previous position 0832C 18840005 2 IMM 257 ADD R2 UDINDXLEN advance to the next index entry 0832D 64840FF8 2 IMM 258 CPR R2 ADR(WNDO2(UD1LINDX)) are we past the last index entry? 0832E FE0482D9 259 JGT SRCDIRENNF jump if directory exhausted 0832F 5C089183 2 ZBM 260 CMZ R2,UDINDXADR check for non-existant entry 08330 FE0282D9 261 JEQ SRCDIRENNF jump at end of index 08331 6217480B 015 BASE 262 LD2 R0 FCB,FCNAME 08332 6A168800 012 BASE 263 UCPR2 R0 R2,UDINDXNAM check where this block begins 08333 FE0882D9 264 JLT SRCDIRENNF jump if it can't be in this farther block 265 * name must be equal 08334 6017480D 0 5 BASE 266 LD R0 FCB,FCNAMEEXT get the extension and see what it sez 08335 68168802 0 2 BASE 267 UCPR R0 R2,UDINDXEXT do the compare 08336 FE068313 268 JGE SRCDIRRGA go try if it might be in this block 08337 FE0E82D9 269 JMP SRCDIRENNF end of index, entry not found 270 * --- 271 272 ********************************************************************************** 273 * We think that we have found the entry. Check the extension * 274 * to see if it matches, then check to see if we have a file * 275 * being closed. * 276 ********************************************************************************** 277 00008338 278 SRCDISFND LABEL 08338 6017480D 0 5 BASE 279 LD R0 FCB,FCNAMEEXT get this files extension 08339 6816C804 0 3 BASE 280 UCPR R0 R3,FDEXTEN does the extension match? 0833A FE0882D9 281 JLT SRCDIRENNF jump if after sort point - not found 0833B FE048341 282 JGT SRCDISRESN jump if before sort point - keep looking 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1825 (SRCHDIR) F 117 Directory Searching Routines 0833C 5C08DE10 3 ZBM 283 CMZ R3,FDFBD is this file being destroyed? 0833D FE0282E4 284 JEQ SRCDIRXIT jump if not being destroyed, good entry 0833E 6016C000 0 3 CACH 285 LD R0 R3,FDSUN get file validation SUN 0833F 64101EFD 0 @ 286 CPR R0 FILESUN compare to current system up number 08340 FE0C82E4 287 JNE SRCDIRXIT jump if semi-doomed, allow equip 288 * \ / 289 00008341 290 SRCDISRESN LABEL 08341 6217480B 015 BASE 291 LD2 R0 FCB,FCNAME reload the name 08342 FE0E8328 292 JMP SRCDISGO ... and continue 293 * --- 294 295 ********************************************************************************** 296 * We are looking for a specified serial number in a * 297 * large UDIR. Good luck. The user may have renamed the file, * 298 * so it might be anywhere. However, we assume that the file * 299 * has the same name for the search starting point. We limit * 300 * our scan to two encounters of the end. * 301 ********************************************************************************** 302 00008343 303 SRCLKSERN LABEL 08343 62174809 015 BASE 304 LD2 R0 FCB,FCSERIAL get the file serial number 00008344 305 SRCLKSERT LABEL 08344 5C16C800 3 BASE 306 CMZ R3,0 is this past the last entry in the UDIR? 08345 FE02834B 307 JEQ SRCLKNTB jump if done with block 08346 6616C80A 013 BASE 308 CPR2 R0 R3,FDSERNO check for serial number match 08347 FE0282E4 309 JEQ SRCDIRXIT jump on a find 08348 18C40018 3 IMM 310 ADD R3 FDLNTH advance to the next dir. entry 08349 64C40BE8 3 IMM 311 CPR R3 ADR(WNDO1(UDLFDE)) are we at the end yet? 0834A FE0A8344 312 JLE SRCLKSERT jump if more to search 313 * \ / 314 * The serial number was not found in this block. 315 * Try the next available UDIR2 block. 316 * \ / 0000834B 317 SRCLKNTB LABEL 0834B 60978802 2 6 BASE 318 LD R2 SP,SRCDIRENTT get the index location 0834C 18840005 2 IMM 319 ADD R2 UDINDXLEN advance to the next index entry 0834D 64840FF8 2 IMM 320 CPR R2 ADR(WNDO2(UD1LINDX)) check for the end of the UDIR1 block 0834E FE048351 321 JGT SRCLKED jump at end 0834F 5C089183 2 ZBM 322 CMZ R2,UDINDXADR check for no more entries 08350 FE0C8313 323 JNE SRCDIRRGA jump to load this entry 324 * \ / 00008351 325 SRCLKED LABEL 08351 D1D78803 6 BASE 326 SETT SP,SRCDIREF check for the second hit on the dir end 08352 FE0282D9 327 JEQ SRCDIRENNF if flag already set, we've been here before 08353 60840C60 2 IMM 328 LD R2 ADR(WNDO2(UDFDLIST)) point back to the dir begin 08354 FE0E8313 329 JMP SRCDIRRGA go load the first UDIR2 block. 330 * --- 331 332 * disk error, return to callers location 333 00008355 334 SRCDIRDERR LABEL 335 * note MAPOUTFBI call preserves error code in R0 08355 DC40261B 336 CALLNP MAPOUTFBI unmap FBI, ION 00008356 337 SRCDIRDER1 LABEL 08356 61D20000 7 0 REG 338 LD R7 R0 save error code 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1826 (SRCHDIR) F 117 Directory Searching Routines 08357 DC403150 339 CALLNP GRUBWNDO1 release the windows if we had them 08358 DC403153 340 CALLNP GRUBWNDO2 08359 61095114 4 5 ZBM 341 LD ULB FCB,FCLIMITPTR restore the ULB pointer 0835A DC405685 342 CALLNP FREEDIR release the directory 0835B 6013C000 0 7 REG 343 LD R0 R7 restore error code to R0 0835C 61D78801 7 6 BASE 344 LD R7 SP,SRCDIRENTE load the error return address 0835D 5D1F8004 6 STAK 345 LEAVE POP split indicating no find 346 * --- 347 348 END DIRECTORY SRCHDIR, SRCHDIRLKS, SRCHDIRSN subroutines 177 INPUT FRQSMALL directory alias routine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1827 (FRQSMALL) F 118 FREQ - directory alias 3 4 ********************************************************************************** 5 * * 6 * FREQ that sets another directory as the default * 7 * directory (or alias) to be used when looking up files, * 8 * The object of the request is a lun which must be a .DIR * 9 * to which the requester has access. * 10 * Call: * 11 * LD R0 FRALIAS * 12 * FREQ lun * 13 * JLTZ R0 * 14 * * 15 * Stack required = 11 * 16 * 0 + max ( ACCOUNT (2), ACCTALIAS (4), ACCTPSA (2), * 17 * ACCTQUE (3), FREEULB (11), USEULB (4) ) * 18 * * 19 ********************************************************************************** 20 21 BLOCK FREQALIAS routine 22 ENTRY FREQALIAS change default directory 23 0000835E 24 FREQALIAS LABEL 0835E FA8C59D8 2 25 JNEZ R2 UERRORILR dis-allow undefined sub-ops 0835F FB7059B8 5 26 JZA FCB FERRORLNE3 say lun not equipped 08360 60096665 0 5 ZBM 27 LD R0 FCB,FCHTYPE get the type of the lun 08361 64040005 0 IMM 28 CPR R0 HTYPEDIR must be a .DIR 08362 FE0C59A5 29 JNE FERRORILOP otherwise, operation not allowed 08363 61C00412 7 30 LD R7 CPPSA get the current PSA pointer 08364 60095114 0 5 ZBM 31 LD R0 FCB,FCLIMITPTR get the ULB pointer 08365 FA308379 0 32 JZA R0 ALIASPNS jump if not a real .DIR 08366 6409DF13 0 7 ZBM 33 CPR R0 R7,PSUSERLIMP are we setting to ourself? 08367 FE02836D 34 JEQ ALIASOK OK to do it if so 08368 60000414 0 35 LD R0 CPCUPC get pointer to current UPC 08369 61081F13 4 0 ZBM 36 LD ULB R0,UPCPRIVULB get ULB for our privileges 0836A 60094E45 0 5 ZBM 37 LD R0 FCB,FCPRIV get our privileges 0836B 6404000F 0 IMM 38 CPR R0 FSPRIVNOT make sure that we have some privilege 0836C FE028379 39 JEQ ALIASPNS need some access to directory to alias 40 * \ / 41 42 ********************************************************************************** 43 * * 44 * Potential for interlock problem exists here. See NOTE * 45 *in PSA definition comment box regarding PSDFLTDIR. * 46 * * 47 ********************************************************************************** 48 49 * \ / 0000836D 50 ALIASOK LABEL 0836D 61095114 4 5 ZBM 51 LD ULB FCB,FCLIMITPTR get the new alias account ULB ptr 0836E DC405569 52 CALLNP USEULB indicate one more user 0836F E109DF14 4 7 ZBM 53 EXCH ULB R7,PSDFLTDIR get/set pointer to alias 08370 60094E45 0 5 ZBM 54 LD R0 FCB,FCPRIV get privilege to .VOL unit 08371 E409C044 0 7 ZBM 55 ST R0 R7,PSDDIRPRIV set access to directory 08372 DC005C2A 56 CALL ACCTALIAS log the end of the present alias 08373 40440007 IMM 57 PARVL APTALOFF type code 08374 DC405526 58 CALLNP FREEULB decrement use of old alias 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1828 (FRQSMALL) F 118 FREQ - directory alias 08375 6109DF14 4 7 ZBM 59 LD ULB R7,PSDFLTDIR get pointer to new alias 08376 DC005C2A 60 CALL ACCTALIAS call the accounting routine 08377 40440004 IMM 61 PARVL APTALIAS indicate alias 08378 FE0E5982 62 JMP FNOERROR go operation complete 63 * --- 64 00008379 65 ALIASPNS LABEL 08379 DC00505F 66 CALL ACCOUNT call the accounting routine 0837A 41440005 IMM 67 PARV APTALIER indicate alias failure 0837B 41440034 IMM 68 PARV AFRFILLEN length of record 0837C 4047FFFF IMM 69 PARVL -1 log whereever possible 70 * \ / 0837D 60800412 2 71 LD R2 CPPSA process status area 0837E DC405C0D 72 CALLNP ACCTPSA fill in stuff from PSA 0837F 61089F13 4 2 ZBM 73 LD ULB R2,PSUSERLIMP get the logon ULB pointer 08380 62170802 014 BASE 74 LD2 R0 ULB,ULACCNM get the account name 08381 E616C80B 013 BASE 75 ST2 R0 R3,APRECORD/AFRFILNAM place into accounting record 08382 60170804 0 4 BASE 76 LD R0 ULB,ULACCPROJ get the div/proj name 08383 E416C80D 0 3 BASE 77 ST R0 R3,APRECORD/AFRFILEXT 78 * \ / 08384 60895114 2 5 ZBM 79 LD R2 FCB,FCLIMITPTR owner of this file 08385 FAB08389 2 80 JZA R2 ALINOULB this is a fake DIR 08386 62168802 012 BASE 81 LD2 R0 R2,ULACCNM target account name 08387 60968804 2 2 BASE 82 LD R2 R2,ULACCPROJ and the project name 08388 FE0E838B 83 JMP ALIPUTREC put into accounting record 84 * --- 85 00008389 86 ALINOULB LABEL 08389 62174807 015 BASE 87 LD2 R0 FCB,FCANAME account name for fake DIR 0838A 6097480D 2 5 BASE 88 LD R2 FCB,FCAPROJ this is the project 89 * \ / 90 0000838B 91 ALIPUTREC LABEL 0838B E616C803 013 BASE 92 ST2 R0 R3,APRECORD/AFRACCT in the record it goes 0838C E496C805 2 3 BASE 93 ST R2 R3,APRECORD/AFRPROJ same with the project name 94 0838D DC405025 95 CALLNP ACCTQUE send it to the queue 0838E FE0E59C8 96 JMP FERRORPNS give privilege not sufficient 97 * --- 98 99 END FREQALIAS routine 178 INPUT FRQSHARE share/unshare routines 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1829 (FRQSHARE) F 119 FREQ - SHARE/UNSHARE 3 4 BLOCK Share and Unshare FREQs 5 6 ENTRY FREQSHARE 7 ENTRY FREQUSHARE 8 ENTRY MOVEINSHLT table of SHL entry lengths 9 10 ********************************************************************************** 11 * * 12 * These requests add and remove shared list entries from * 13 * directory and file shared lists. Each entry in the SHL * 14 * is unique given the account and the access so that there * 15 * may be several shared list entries for one account each * 16 * with different accesses (and passwords, for instance). * 17 * * 18 * See the description of the shared lists in DISKDEFS. * 19 * * 20 * User call is: * 21 * * 22 * LD R0 (FRSHARE or FRUNSHARE)+access * 23 * LD R1 pointer to volume and account block * 24 * FREQ lun of saved file or DIR * 25 * JLTZ R0 request error * 26 * * 27 * The block is of the form: * 28 * * 29 *BLOCK VFD 0,0 (volume not used) * 30 * PAK6 system, or 0 or -1 if none * 31 * VFD 0,0 (password unused) * 32 * PAK12 account * 33 * PAK6 project, if -1 then project of requester is used * 34 * PAK12 password for SHL entry * 35 * * 36 * If the first word of account is -1, all share list entries are removed * 37 * * 38 * Stack required = 16. * 39 * 5 + max( CHECKSYM (5), CLRMEMTRAP (1), DISKIT (9), * 40 * EMBED (2), FETCHDIR (4), FIXEXTEN (1), * 41 * FORCEWRWx (5), FREEDIR (5), FREEFILE (3), * 42 * GETPKTEMP (2), GRUBWNDOx (7), LIMITCHECK (1), * 43 * MAPOUTFBI (2), PLACESHL (1), PRIV2MACCT (1), * 44 * PRIV2MOD (2), PWMANGLE (3), SETMEMTRAP (1), * 45 * SETWNDOx (4), SFREEMEM (0), SRCHDIRLKS (11) ) * 46 * * 47 ********************************************************************************** 48 49 BLOCK FREQSHARE and FREQUSHARE routines 50 ENTRY FREQSHARE 51 ENTRY FREQUSHARE 52 ENTRY MOVEINSHLT 53 54 BEGFRAME2 00000010 BYTE 55 NONAME EQU BIT 0 in R7, sez SHARE acct name empty 00178800 6 BASE 56 FSHRFLAG BSS 1 zero if SHARE, one if UNSHARE, two if UNSHAREALL 00000002 ABS 57 UNSHAREALL EQU 2 00178801 6 BASE 58 FSHRDISKA BSS 1 disk addr of new SHL block 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1830 (FRQSHARE) F 119 FREQ - SHARE/UNSHARE 00178802 6 BASE 59 FSHRIPP BSS 1 in place pointer (WNDO1) 00178803 6 BASE 60 FSHRFCB BSS 1 => FCB 00178804 6 BASE 61 FSHREQT BSS 1 => EQT 62 ENDFRAME 63 64 * Bit array giving legal subopcodes for the XREQ C0000000 ABS 65 LEGALSHX EQU (1*BIT SHLACTPRVW)+(1*BIT SHLACTPRVR) 30000000 ABS 66 LEGALSHY EQU (1*BIT SHLACTPRVM)+(1*BIT SHLACTPRVX) 0838F F0800000 67 LEGALSHA VFD LEGALSHX+LEGALSHY+(1*BIT 8) 08390 0048838F 68 LEGALSH PTR LEGALSHA/BIT 0 69 00008391 70 FREQSHARE LABEL 08391 EC1F8005 6 STAK 71 STZ PUSH 08392 EC178800 6 BASE 72 STZ SP,FSHRFLAG set flag saying share 08393 FE0E8396 73 JMP SHARESHARE 74 * --- 75 00008394 76 FREQUSHARE LABEL 08394 EC1F8005 6 STAK 77 STZ PUSH 08395 EDD78800 6 BASE 78 STW SP,FSHRFLAG set flag saying unshare 00008396 79 SHARESHARE LABEL 08396 5C348390 2 @ 80 CMZ @LEGALSH(R2) is this a legal sub operation? 08397 FE0259D8 81 JEQ UERRORILR if not "ILLEGAL REQUEST" 08398 FB7059B8 5 82 JZA FCB FERRORLNE3 give error if lun not equipped 83 * \ / 08399 60096665 0 5 ZBM 84 LD R0 FCB,FCHTYPE 0839A 64040005 0 IMM 85 CPR R0 HTYPEDIR is this a directory? 0839B FE0283A3 86 JEQ SHOKDIR if a .DIR, doesn't need saving 87 * \ / 0839C DC005BF2 88 CALL PRIV2MOD privilege to modify? 0839D 41497415 5 ZBM 89 PARV FCB,FCSPOOLED indicates whether file opened for the spooler 0839E 40494E45 5 ZBM 90 PARVL FCB,FCPRIV 0839F FE0E59AC 91 JMP FERRORPFM give "protected from modification" error 083A0 5C096415 5 ZBM 92 CMZ FCB,FCSAVED is the file saved? 083A1 FE0259BE 93 JEQ FERRORLNS can only share a saved file 083A2 FE0E83A6 94 JMP OKPRIV 95 * --- 96 000083A3 97 SHOKDIR LABEL 083A3 DC005C07 98 CALL PRIV2MACCT privilege to share dir? 083A4 40494E45 5 ZBM 99 PARVL FCB,FCPRIV 083A5 FE0E59AC 100 JMP FERRORPFM give error if he can't 000083A6 101 OKPRIV LABEL 083A6 E4895040 2 5 ZBM 102 ST R2 FCB,FCREQUEST save request code 083A7 E5578803 5 6 BASE 103 ST FCB SP,FSHRFCB save the pointer to the FCB 104 * \ / 105 083A8 DC4059FA 106 CALLNP GETPKTEMP get a filename packing block 083A9 E5578804 5 6 BASE 107 ST EQT SP,FSHREQT save the address of the block 083AA DC005BCF 108 CALL SETMEMTRAP set recovery from user memory failure 083AB 40008412 109 PARL USRMEMBAD 110 * \ / 111 112 ********************************************************************************** 113 * * 114 * The user supplies the particulars packed up -- fetch same. * 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1831 (FRQSHARE) F 119 FREQ - SHARE/UNSHARE 115 * * 116 ********************************************************************************** 117 118 * \ / 083AC 60091F13 0 4 ZBM 119 LD R0 R4,CAR1/FLDADRS 083AD 60440028 1 IMM 120 LD R1 EQELSIZE*2*CPW number of characters to move 083AE 38974801 2 5 BASE 121 LEA R2 EQT,EQVOLUME place to put the characters 083AF 5C093211 4 ZBM 122 CMZ R4,CAMSR/MSRFRELOCB from the user or the monitor? 083B0 FE0C83B2 123 JNE SHARMMEM 083B1 59840040 IMM 124 CLBMSR MSRFRELOC from user 000083B2 125 SHARMMEM LABEL 083B2 FE400000 126 CMOVE get the data 083B3 59C40040 IMM 127 IORMSR MSRFRELOC restore monitor fetching 128 * \ / 129 130 ********************************************************************************** 131 * * 132 * Parameters available. Clean up by doing defaults, checking * 133 * account name for validity, and mangling the password. * 134 * * 135 ********************************************************************************** 136 137 * \ / 083B4 DC405BD4 138 CALLNP CLRMEMTRAP no more user memory errors 083B5 60174808 0 5 BASE 139 LD R0 EQT,EQACCTPROJ was a project specified? 083B6 FA2E83BB 0 140 JNEMW R0 PROJSPEC jump if specified 083B7 60000412 0 141 LD R0 CPPSA 083B8 60081F14 0 0 ZBM 142 LD R0 R0,PSDFLTDIR get alias ULB pointer 083B9 60160804 0 0 BASE 143 LD R0 R0,ULACCPROJ default to the alias project 083BA E4174808 0 5 BASE 144 ST R0 EQT,EQACCTPROJ 145 * \ / 000083BB 146 PROJSPEC LABEL 083BB DC405A13 147 CALLNP FIXEXTEN fix up the other defaults 083BC 5E174801 5 BASE 148 CMZ2 EQT,EQVOLUME check for what shouldn't be here 083BD FE0C8419 149 JNE GIVEBFN 083BE 5C174803 5 BASE 150 CMZ EQT,EQSYSTEM (I don't know about systems yet) 083BF FE0C8419 151 JNE GIVEBFN 083C0 5E174804 5 BASE 152 CMZ2 EQT,EQVOLPW 083C1 FE0C8419 153 JNE GIVEBFN 083C2 5C178800 6 BASE 154 CMZ SP,FSHRFLAG is this a share? 083C3 FE0283C8 155 JEQ NAMECHK yes, check format 083C4 60174806 0 5 BASE 156 LD R0 EQT,EQACCT it's an unshare 083C5 FA2E83D5 0 157 JNEMW R0 NONAMECHK is an account specified? 083C6 D0178800 6 BASE 158 INC SP,FSHRFLAG no, record an UNSHAREALL 083C7 FE0E83D5 159 JMP NONAMECHK skip name checking 160 * --- 000083C8 161 NAMECHK LABEL 083C8 EC0BC010 7 CBM 162 STZ R7/NONAME assume name part exists 083C9 DC005CD3 163 CALL CHECKSYM check account name format 083CA 42174806 5 BASE 164 PAR2L EQT,EQACCT pass the symbol 083CB FE0E8419 165 JMP GIVEBFN jump if bad 083CC EDCBC010 7 CBM 166 STW R7/NONAME all blanks - okay, but flag it 083CD 60974808 2 5 BASE 167 LD R2 EQT,EQACCTPROJ get the project 083CE DC405CC0 168 CALLNP EMBED check its format 083CF FE0E8419 169 JMP GIVEBFN jump if bad 083D0 F7C08419 7 170 JBT R7/NONAME GIVEBFN all blanks - okay iff name exists 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1832 (FRQSHARE) F 119 FREQ - SHARE/UNSHARE 083D1 60974803 2 5 BASE 171 LD R2 EQT,EQSYSTEM get the system name 083D2 DC405CC0 172 CALLNP EMBED check for embedded blanks 083D3 FE0E8419 173 JMP GIVEBFN jump if bad 083D4 FEC00000 174 NOP 0 all blanks okay 000083D5 175 NONAMECHK LABEL 083D5 60D78803 3 6 BASE 176 LD R3 SP,FSHRFCB 083D6 6108D114 4 3 ZBM 177 LD ULB R3,FCLIMITPTR get ULB of file owner 083D7 FB30841B 4 178 JZA ULB NULLDIRPRC if a null directory, fake success 179 * (probably can't happen) 083D8 DC005872 180 CALL PWMANGLE make the PW unknowable 083D9 43170802 4 BASE 181 PAR2 ULB,ULACCNM encoded relative to the file's account name 083DA 42174809 5 BASE 182 PAR2L EQT,EQACCTPW 083DB E6174809 015 BASE 183 ST2 R0 EQT,EQACCTPW store the mangled PW 184 * \ / 185 186 ********************************************************************************** 187 * * 188 * See if the thing being accessed is a file or a * 189 * directory. The access is different. * 190 * * 191 ********************************************************************************** 192 193 * \ / 083DC 60578803 1 6 BASE 194 LD R1 SP,FSHRFCB 083DD 60085420 0 1 ZBM 195 LD R0 R1,FCREQUEST/BITS 30:31 083DE E4174800 0 5 BASE 196 ST R0 EQT,EQWORDA save the access code in the EQT 083DF 61524000 5 1 REG 197 LD FCB R1 083E0 61095114 4 5 ZBM 198 LD ULB FCB,FCLIMITPTR ULB => directory control stuff 083E1 DC405667 199 CALLNP FETCHDIR get access to the directory 083E2 60096665 0 5 ZBM 200 LD R0 FCB,FCHTYPE get the type of the device 083E3 64040005 0 IMM 201 CPR R0 HTYPEDIR is this a directory? 083E4 FE0C83ED 202 JNE NOTDIR if not, search for the file 083E5 DC003205 203 CALL SETWNDO1 map the dir block into WNDO1 083E6 41440000 IMM 204 PARV VPCNTLW indicate write access 083E7 41534000 5 REG 205 PARV FCB indicate lun associated with our block 083E8 41008489 206 PAR SHRDIRDE 083E9 41570801 4 BASE 207 PARV ULB,ULBLOCK pass the block number 083EA 40440009 IMM 208 PARVL FBITUDIR1 and the expected FBI type 083EB 60C4083C 3 IMM 209 LD R3 ADR WNDO1(UDSHLLIST) R3 => root of SHL 083EC FE0E83F1 210 JMP SRCHSHL check whats there 211 * --- 212 213 ********************************************************************************** 214 * The access is not to a directory, so we find the file * 215 ********************************************************************************** 216 000083ED 217 NOTDIR LABEL 083ED DC0082B6 218 CALL SRCHDIRLKS find the file 083EE 4000848B 219 PARL SHRDIRDEN pass error address 083EF FE0C8411 220 JNE NOSUCHFILE jump if not found 083F0 38D6C814 3 3 BASE 221 LEA R3 R3,FDSHL R3 => shared list (in window 1) 222 * \ / 223 224 ********************************************************************************** 225 * See if this is a disk shared list, if not, just search, * 226 * if so, read it in * 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1833 (FRQSHARE) F 119 FREQ - SHARE/UNSHARE 227 ********************************************************************************** 228 229 * \ / 000083F1 230 SRCHSHL LABEL 083F1 E4D78802 3 6 BASE 231 ST R3 SP,FSHRIPP save the root pointer 083F2 5C16C800 3 BASE 232 CMZ R3,0 check for empty list 083F3 FE028430 233 JEQ FSHLEMPTY jump if nothing in shared list 083F4 FE08843B 234 JLT FSHLDISK jump if shared list on mass storage 235 * \ / 236 237 ********************************************************************************** 238 * There is something in the in-core shared list. See * 239 * if the entry matches. * 240 ********************************************************************************** 241 242 * \ / 083F5 60178800 0 6 BASE 243 LD R0 SP,FSHRFLAG get share request type 083F6 64040002 0 IMM 244 CPR R0 UNSHAREALL remove all entries? 083F7 FE028404 245 JEQ CLRINCORENT yes, needn't check for an account match 083F8 60978804 2 6 BASE 246 LD R2 SP,FSHREQT recover the temp block pointer 083F9 62168806 012 BASE 247 LD2 R0 R2,EQACCT get the account name 083FA 6616C801 013 BASE 248 CPR2 R0 R3,SHLACCT is the account the same? 083FB FE0C841F 249 JNE FSHRNOTIP jump if not 083FC 60168808 0 2 BASE 250 LD R0 R2,EQACCTPROJ get the division-project 083FD 6416C803 0 3 BASE 251 CPR R0 R3,SHLACCTP is the project the same? 083FE FE0C841F 252 JNE FSHRNOTIP jump if not 083FF 60168800 0 2 BASE 253 LD R0 R2,EQWORDA get the requested access 08400 6408C630 0 3 ZBM 254 CPR R0 R3,SHLACTPRIV is the access the same? 08401 FE0C841F 255 JNE FSHRNOTIP jump if not 256 * \ / 257 258 ********************************************************************************** 259 * The in-place shared list contains a duplicate for us. * 260 * If share, error. If unshare, remove it. * 261 ********************************************************************************** 262 263 * \ / 08402 5C178800 6 BASE 264 CMZ SP,FSHRFLAG check share/unshare flag 08403 FE02842C 265 JEQ FSHRDUP jump if doing a share, duplicate entry 00008404 266 CLRINCORENT LABEL 08404 EC16C800 3 BASE 267 STZ R3,SHLFLAGW remove the entry there 08405 EE16C801 3 BASE 268 STZ2 R3,SHLACCT 08406 EC16C803 3 BASE 269 STZ R3,SHLACCTP 270 * \ / 271 272 ********************************************************************************** 273 * The thing in window one has been modified - make it written. * 274 ********************************************************************************** 275 276 * \ / 00008407 277 FSHRFW1 LABEL 08407 DC40319D 278 CALLNP FORCEWRW1 put it out 00008408 279 FSHRWNE LABEL 08408 61C40000 7 IMM 280 LD R7 0 indicate no error 00008409 281 FSHRERRW1 LABEL 08409 DC403150 282 CALLNP GRUBWNDO1 and unmap the window 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1834 (FRQSHARE) F 119 FREQ - SHARE/UNSHARE 0840A DC403153 283 CALLNP GRUBWNDO2 release UDIR1 or SHL block 0840B DC405685 284 CALLNP FREEDIR release access to the directory 0000840C 285 FSHRERRX LABEL 0840C 60D78804 3 6 BASE 286 LD R3 SP,FSHREQT retrieve pointer to the temp block 0840D DC002F5D 287 CALL UFREEMEM release the packing storage 0840E 41440004 IMM 288 PARV EQTEMPLOG indicate its length 0840F 4052C000 3 REG 289 PARVL R3 and address 08410 FE0E5997 290 JMP FERROR7 return any errors 291 * --- 292 293 ********************************************************************************** 294 * The file belonging to the FCB has disappeared. * 295 * Either the FCB got garbaged or the directory got * 296 * garbaged. This is a system error. * 297 ********************************************************************************** 298 08411 001311B0 299 NOSUCHFILE HALT HALTS11B0 saved file disappeared 300 301 ********************************************************************************** 302 * The caller's memory is bad. Return the error. * 303 ********************************************************************************** 304 00008412 305 USRMEMBAD LABEL 08412 61578804 5 6 BASE 306 LD EQT SP,FSHREQT get the pointer to the block 08413 62940000 2301 PAIR 307 LD2 R2 PAIR R0 save the error parameters 08414 DC002F5D 308 CALL UFREEMEM return the temp block 08415 41440004 IMM 309 PARV EQTEMPLOG 08416 40534000 5 REG 310 PARVL EQT 08417 62148000 0123 PAIR 311 LD2 R0 PAIR R2 get back the parameters 08418 FE0E5B5F 312 JMP PASSERRUP pass the error to the program controller 313 * --- 314 315 ********************************************************************************** 316 * The name given for a share is not in a good format. * 317 ********************************************************************************** 318 00008419 319 GIVEBFN LABEL 08419 61C4008F 7 IMM 320 LD R7 XREQERBFN 'bad file name' 0841A FE0E841C 321 JMP ZAPEQTXIT 322 * --- 323 324 ********************************************************************************** 325 * A null directory (a .DIR equipped to a non-existant * 326 * account) is being shared. Fake success. * 327 ********************************************************************************** 328 0000841B 329 NULLDIRPRC LABEL 0841B 61C40000 7 IMM 330 LD R7 0 return no error 0000841C 331 ZAPEQTXIT LABEL 0841C 61578803 5 6 BASE 332 LD FCB SP,FSHRFCB 0841D 61095114 4 5 ZBM 333 LD ULB FCB,FCLIMITPTR get ULB pointer for this file 0841E FE0E840C 334 JMP FSHRERRX 335 * --- 336 337 ********************************************************************************** 338 * There is something in the in place shared list, but * 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1835 (FRQSHARE) F 119 FREQ - SHARE/UNSHARE 339 * it is not us. If share, expand to a mass storage shared * 340 * list. If unshare, our entry does not exist, so return * 341 * the error. * 342 ********************************************************************************** 343 0000841F 344 FSHRNOTIP LABEL 0841F 5C178800 6 BASE 345 CMZ SP,FSHRFLAG check share/unshare flag 08420 FE0C842E 346 JNE FSHRNOSUCH jump if unshare - entry not found 00008421 347 FSHR2DISK LABEL 08421 DC4084A0 348 CALLNP DISKIT move the shared list onto the disk 08422 FE0E8409 349 JMP FSHRERRW1 jump if error 08423 E4178801 0 6 BASE 350 ST R0 SP,FSHRDISKA save the location of the block 08424 60978804 2 6 BASE 351 LD R2 SP,FSHREQT point to the account being shared with 08425 DC40848D 352 CALLNP PLACESHL place the entry 08426 DC4031A0 353 CALLNP FORCEWRW2 force the new block out 08427 60D78802 3 6 BASE 354 LD R3 SP,FSHRIPP get root pointer 08428 60099181 0 6 ZBM 355 LD R0 SP,FSHRDISKA/MSBLKFIELD get the mass storage address 08429 7C030000 0 IMM 356 IOR R0 1*SHLDSKFLGB set flag indicating on MS 0842A E416C800 0 3 BASE 357 ST R0 R3,SHLFLAGW point this to the disk 0842B FE0E8407 358 JMP FSHRFW1 output window 1, then return no error 359 * --- 360 361 ********************************************************************************** 362 * The entry already exists in a share, duplicate * 363 * entry error. * 364 ********************************************************************************** 365 0000842C 366 FSHRDUP LABEL 0842C 61C4008E 7 IMM 367 LD R7 XREQERNAE error 'name already exists' 0842D FE0E8409 368 JMP FSHRERRW1 369 * --- 370 371 ********************************************************************************** 372 * Unshare cannot find its entry. No such entry error. * 373 ********************************************************************************** 374 0000842E 375 FSHRNOSUCH LABEL 0842E 61C400AB 7 IMM 376 LD R7 XREQERNSE error 'no such entry' 0842F FE0E8409 377 JMP FSHRERRW1 378 * --- 379 380 ********************************************************************************** 381 * The shared list is empty. An unshare will give an * 382 * error, an unshareall will return with no error. A share * 383 * will see if its entry will fit and place it if so. Otherwise, * 384 * a disk block will be created and the entry placed there. * 385 ********************************************************************************** 386 00008430 387 FSHLEMPTY LABEL 08430 60178800 0 6 BASE 388 LD R0 SP,FSHRFLAG get share request type 08431 64040001 0 IMM 389 CPR R0 1 08432 FE02842E 390 JEQ FSHRNOSUCH unshare give "no such entry" 08433 FE048408 391 JGT FSHRWNE unshareall return with no error 08434 60978804 2 6 BASE 392 LD R2 SP,FSHREQT retrieve the temp block pointer 08435 5C168803 2 BASE 393 CMZ R2,EQSYSTEM is a system specified? 08436 FE0C8421 394 JNE FSHR2DISK if so, it won't fit in place 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1836 (FRQSHARE) F 119 FREQ - SHARE/UNSHARE 08437 5C168809 2 BASE 395 CMZ R2,EQACCTPW is a password specified? 08438 FE0C8421 396 JNE FSHR2DISK if so, it won't fit in place 08439 DC40848D 397 CALLNP PLACESHL place entry in place 0843A FE0E8407 398 JMP FSHRFW1 force out window 1, then return no error 399 * --- 400 401 ********************************************************************************** 402 * The shared list is on the disk so we read the block * 403 * in then search for our entry. The result then depends * 404 * on whether it's a SHARE or UNSHARE. * 405 ********************************************************************************** 406 0000843B 407 FSHLDISK LABEL 0843B 60178800 0 6 BASE 408 LD R0 SP,FSHRFLAG check share request type 0843C 64040002 0 IMM 409 CPR R0 UNSHAREALL if unsharing all ... 0843D FE02846F 410 JEQ FREESLB ... just delete the share block 0843E 6116C800 4 3 BASE 411 LD R4 R3,0 pick up the MS address of the SLB 0843F 60094081 0 5 ZBM 412 LD R0 FCB,FCDRIVE pick up the volume number 08440 E40B0080 0 4 CBM 413 ST R0 R4/VOLFIELD make a complete MS address 08441 61C40011 7 IMM 414 LD R7 FBITASLB get the FBI type for an account share list 08442 64C4083C 3 IMM 415 CPR R3 ADR WNDO1(UDSHLLIST) is this an account share list? 08443 FE028445 416 JEQ DIRRING jump if so 08444 61C40012 7 IMM 417 LD R7 FBITFSLB not ASL, must be file share list 00008445 418 DIRRING LABEL 08445 DC0031FF 419 CALL SETWNDO2 get the share list block in 08446 41440002 IMM 420 PARV VPCNTLW+VPCNTLLK writable and locked 08447 41534000 5 REG 421 PARV FCB indicate lun associated with our block 08448 41008488 422 PAR BADSHLB pass error address 08449 41530000 4 REG 423 PARV R4 pass the MS address 0844A 40578800 6 BASE 424 PARVL SP,0 and pass the expected FBI type 0844B DC40261B 425 CALLNP MAPOUTFBI unmap FBI, ION 426 * \ / 427 428 ********************************************************************************** 429 * Search for our entry. * 430 ********************************************************************************** 431 432 * \ / 0844C 60C40C00 3 IMM 433 LD R3 ADR WNDO2 get base of the list 0844D 61178804 4 6 BASE 434 LD R4 SP,FSHREQT retrieve EQT pointer 0844E 62170806 014 BASE 435 LD2 R0 R4,EQACCT get the account desired 0000844F 436 NEXTSHLE LABEL 0844F 60970808 2 4 BASE 437 LD R2 R4,EQACCTPROJ get the division-project 08450 5C16C800 3 BASE 438 CMZ R3,0 any entry here? 08451 FE02847D 439 JEQ NOTINSHL jump if not 08452 6616C801 013 BASE 440 CPR2 R0 R3,SHLACCT check the account name 08453 FE0C8459 441 JNE MOVEINSHL jump if not this entry 08454 6496C803 2 3 BASE 442 CPR R2 R3,SHLACCTP check division-project 08455 FE0C8459 443 JNE MOVEINSHL jump if not this entry 08456 60970800 2 4 BASE 444 LD R2 R4,EQWORDA check the access 08457 6488C630 2 3 ZBM 445 CPR R2 R3,SHLACTPRIV 08458 FE028460 446 JEQ FNDITINSHL jump if our entry is found 00008459 447 MOVEINSHL LABEL 08459 6088C220 2 3 ZBM 448 LD R2 R3,SHLACTOPT get flags for optional stuff 0845A 18E4845C 3 2 449 ADD R3 MOVEINSHLT(R2) add in the length of the entry 0845B FE0E844F 450 JMP NEXTSHLE go on to next entry 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1837 (FRQSHARE) F 119 FREQ - SHARE/UNSHARE 451 * --- 452 0000845C 453 MOVEINSHLT LABEL 0845C 00000004 454 VFD SHLENTLEN no password, no system 0845D 00000007 455 VFD SHLENTSLEN no password, system 0845E 00000006 456 VFD SHLENTPLEN password, no system 0845F 00000007 457 VFD SHLENTSLEN password, system 458 459 ********************************************************************************** 460 * The specified entry was found in the disk shared list * 461 * block. R3 points to it. If this is SHARE, then error. If * 462 * this is UNSHARE, then remove the entry and check for * 463 * removing the last entry. * 464 ********************************************************************************** 465 00008460 466 FNDITINSHL LABEL 08460 61095114 4 5 ZBM 467 LD ULB FCB,FCLIMITPTR get ULB pointer for this file 08461 5C178800 6 BASE 468 CMZ SP,FSHRFLAG check share/unshare flag 08462 FE02842C 469 JEQ FSHRDUP duplicate error if share 08463 6012C000 0 3 REG 470 LD R0 R3 R0 => first of entry 08464 6092C000 2 3 REG 471 LD R2 R3 08465 6048C220 1 3 ZBM 472 LD R1 R3,SHLACTOPT get optional flags 08466 1822845C 0 1 473 ADD R0 MOVEINSHLT(R1) R0 => next entry 08467 60520000 1 0 REG 474 LD R1 R0 copy the pointer to next entry 08468 30441000 1 IMM 475 RSB R1 ADR WNDO2(WPP) get word count remaining in this block 08469 604A5F30 1 1 CBM 476 LD R1 R1/FLDCHARS make into character count 0846A FE400000 477 CMOVE close the hole 478 * \ / 0846B 60440010 1 IMM 479 LD R1 SHLENTLEN*CPW get the size of an entry 0846C FE580000 480 CFILL 000 zap out the end 0846D 5C000C00 481 CMZ WNDO2 is the block now empty? 0846E FE0C8408 482 JNE FSHRWNE no, we're done 483 * \ / 484 485 ********************************************************************************** 486 * The block is now empty so we return it and * 487 * zap the pointer in WNDO1. * 488 ********************************************************************************** 489 490 * \ / 0000846F 491 FREESLB LABEL 0846F 6047FFFF 1 IMM 492 LD R1 -1 amount of space freeing 08470 DC405C7B 493 CALLNP LIMITCHECK call to adjust the allocation 08471 001311B1 494 HALT HALTS11B1 LIMITCHECK returned impossible error 08472 60978802 2 6 BASE 495 LD R2 SP,FSHRIPP get the root pointer 08473 61168800 4 2 BASE 496 LD R4 R2,0 get the MS address of the share list 08474 EC168800 2 BASE 497 STZ R2,0 and remove pointer to this block 08475 DC40319D 498 CALLNP FORCEWRW1 force out the change 08476 60094081 0 5 ZBM 499 LD R0 FCB,FCDRIVE get the volume number 08477 E40B0080 0 4 CBM 500 ST R0 R4/VOLFIELD make a complete MS address 08478 DC004FEA 501 CALL FREEFILE release the file 08479 41530000 4 REG 502 PARV R4 pass the MS address 0847A 40440000 IMM 503 PARVL FFTUNKNOWN indicate single block 0847B 61095114 4 5 ZBM 504 LD ULB FCB,FCLIMITPTR restore the controlling ULB pointer 0847C FE0E8408 505 JMP FSHRWNE jump to finish up 506 * --- 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1838 (FRQSHARE) F 119 FREQ - SHARE/UNSHARE 507 508 ********************************************************************************** 509 * * 510 * Our entry was not found in the disk shared list. If * 511 * UNSHARE, then error. If SHARE, then place the entry, after * 512 * checking for space. * 513 * * 514 ********************************************************************************** 515 0000847D 516 NOTINSHL LABEL 0847D 61095114 4 5 ZBM 517 LD ULB FCB,FCLIMITPTR restore the controlling ULB pointer 0847E 5C178800 6 BASE 518 CMZ SP,FSHRFLAG check share/unshare flag 0847F FE0C842E 519 JNE FSHRNOSUCH jump and give error if unshare 08480 64C40FF6 3 IMM 520 CPR R3 ADR WNDO2(WPP-SHLENTLEN-SHLENTPLEN) 08481 FE068486 521 JGE SHLFULL jump if not enough room 08482 60978804 2 6 BASE 522 LD R2 SP,FSHREQT retrieve the temp block pointer 08483 DC40848D 523 CALLNP PLACESHL make the entry 524 * \ / 525 526 ********************************************************************************** 527 * * 528 * The update is made. WNDO2 is written, the directory * 529 * is let go. * 530 * * 531 ********************************************************************************** 532 533 * \ / 08484 DC403150 534 CALLNP GRUBWNDO1 unmap any directory stuff 08485 FE0E8408 535 JMP FSHRWNE complete return 536 * --- 537 538 ********************************************************************************** 539 * The shared list is full. Tell the caller the bad news. * 540 * Notice that at this point WNOD2 may or may not be changed * 541 * so we must call GRUBWNDO on it. Luckily, GRUBWNDO * 542 * is smart enough not to write what was not modified. * 543 ********************************************************************************** 544 00008486 545 SHLFULL LABEL 08486 61C400AC 7 IMM 546 LD R7 XREQERNR "NO ROOM FOR ENTRY" 08487 FE0E8409 547 JMP FSHRERRW1 548 * --- 549 550 ********************************************************************************** 551 * The shared list disk block is bad * 552 ********************************************************************************** 553 00008488 554 BADSHLB LABEL 08488 DC40261B 555 CALLNP MAPOUTFBI unmap FBI, ION 556 * \ / 557 558 ********************************************************************************** 559 * The poor directory went bad. Pass the news to the caller. * 560 ********************************************************************************** 561 562 * \ / 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1839 (FRQSHARE) F 119 FREQ - SHARE/UNSHARE 00008489 563 SHRDIRDE LABEL 08489 61C4009F 7 IMM 564 LD R7 XREQERDSE error 'disk structure error' 0848A FE0E8409 565 JMP FSHRERRW1 566 * --- 0000848B 567 SHRDIRDEN LABEL 0848B 61D20000 7 0 REG 568 LD R7 R0 copy the error code 0848C FE0E840C 569 JMP FSHRERRX 570 * --- 571 572 END FREQSHARE and FREQUSHARE routines 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1840 (FRQSHARE) F 119 FREQ - SHARE/UNSHARE 574 575 ********************************************************************************** 576 * * 577 * PLACESHL. Routine to place a shared list entry. * 578 * Call: * 579 * LD SP => stack top * 580 * LD R2 => block containing account to share to * 581 * LD R3 => place to put entry * 582 * CALLNP PLACESHL * 583 * * 584 * Eats R0:R3 * 585 * Stack required = 1 * 586 * * 587 ********************************************************************************** 588 589 BLOCK PLACESHL subroutine 590 ENTRY PLACESHL 591 592 BEGFRAME 593 ENDFRAME 594 0848D DD5F8001 6 STAK 595 PLACESHL ENTRNP PUSH 0848E EC16C800 3 BASE 596 STZ R3,SHLFLAGW initialize first word 0848F EDC8CC10 3 ZBM 597 STW R3,SHLENTRYF indicate that an entry is here 08490 60168800 0 2 BASE 598 LD R0 R2,EQWORDA get the privilege information 08491 E408C630 0 3 ZBM 599 ST R0 R3,SHLACTPRIV place privilege 08492 62168806 012 BASE 600 LD2 R0 R2,EQACCT 08493 E616C801 013 BASE 601 ST2 R0 R3,SHLACCT place account name 08494 60168808 0 2 BASE 602 LD R0 R2,EQACCTPROJ 08495 E416C803 0 3 BASE 603 ST R0 R3,SHLACCTP and division-project 08496 60168803 0 2 BASE 604 LD R0 R2,EQSYSTEM was a system specified? 08497 FA02849B 0 605 JEQZ R0 NOSYSPLACE jump if not 08498 EE16C804 3 BASE 606 STZ2 R3,SHLPWORD no password present (yet) 08499 E416C806 0 3 BASE 607 ST R0 R3,SHLACCTSYS place the system name 0849A EDC8C410 3 ZBM 608 STW R3,SHLACTSYS indicate system name present 0000849B 609 NOSYSPLACE LABEL 0849B 62168809 012 BASE 610 LD2 R0 R2,EQACCTPW 0849C FA12849F 01 611 JEQZ2 R0 NOPWPLACE was a password specified? 0849D E616C804 013 BASE 612 ST2 R0 R3,SHLPWORD place if present 0849E EDC8C210 3 ZBM 613 STW R3,SHLACTPW indicate that a password is present 0000849F 614 NOPWPLACE LABEL 0849F 5D1F8001 6 STAK 615 LEAVE POP return to caller 616 * --- 617 618 END PLACESHL subroutine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1841 (FRQSHARE) F 119 FREQ - SHARE/UNSHARE 620 621 ********************************************************************************** 622 * * 623 * DISKIT. Routine that moves the in-place entry * 624 * onto the disk and creates the disk shared list block * 625 * in the proper format. * 626 * Call: * 627 * LD SP => stack top * 628 * LD R3 => in place entry * 629 * FCB, ULB * 630 * CALLNP DISKIT * 631 * JMP (R7 = error code) * 632 * ST R3 => first open location in new block * 633 * ST R0 disk block address * 634 * * 635 * Eats R0:R3 * 636 * Stack required = 9. * 637 * 3 + max ( GETFREEW2 (6), LIMITCHECK (1) ) * 638 * * 639 ********************************************************************************** 640 641 BLOCK DISKIT subroutine 642 ENTRY DISKIT 643 644 BEGFRAME 00178801 6 BASE 645 DISKITDA BSS 1 address of gotten block 00178802 6 BASE 646 DISKITR3 BSS 1 R3 save 647 ENDFRAME 648 084A0 DD5F8003 6 STAK 649 DISKIT ENTRNP PUSH 084A1 E4D78802 3 6 BASE 650 ST R3 SP,DISKITR3 save R3 084A2 60440001 1 IMM 651 LD R1 1 count of blocks being added 084A3 DC405C7B 652 CALLNP LIMITCHECK add to the saved limit 084A4 FE0E84C0 653 JMP NOROOM jump if limit error 084A5 60840011 2 IMM 654 LD R2 FBITASLB get the FBI type for account SLB 084A6 6004083C 0 IMM 655 LD R0 ADR WNDO1(UDSHLLIST) see if in UDIR 084A7 64178802 0 6 BASE 656 CPR R0 SP,DISKITR3 084A8 FE0284AA 657 JEQ NOTFILESL jump if it is a directory share list 084A9 60840012 2 IMM 658 LD R2 FBITFSLB it's a file, so use its code 000084AA 659 NOTFILESL LABEL 084AA 60174801 0 5 BASE 660 LD R0 FCB,FCBLOCK get the current data block 084AB E4178801 0 6 BASE 661 ST R0 SP,DISKITDA save so that it may be restored 084AC DC005C60 662 CALL GETFREEW2 get a free block mapped into window 2 084AD 41528000 2 REG 663 PARV R2 indicate type desired 084AE 40440000 IMM 664 PARVL 0 084AF FE0E84C2 665 JMP NODISKROOM error return, no space left on disk 084B0 60178801 0 6 BASE 666 LD R0 SP,DISKITDA get the original block number 084B1 E0174801 0 5 BASE 667 EXCH R0 FCB,FCBLOCK restore the FCB 084B2 E4178801 0 6 BASE 668 ST R0 SP,DISKITDA save the SLB MS address 084B3 60C40C00 3 IMM 669 LD R3 ADR WNDO2 => root of list 084B4 60978802 2 6 BASE 670 LD R2 SP,DISKITR3 R2=> in place entry 084B5 60168800 0 2 BASE 671 LD R0 R2,SHLFLAGW see if anything is there 084B6 FA0284BD 0 672 JEQZ R0 NOCOPY jump if nothing there 084B7 E416C800 0 3 BASE 673 ST R0 R3,SHLFLAGW copy over the first word 674 * \ / 084B8 62168801 012 BASE 675 LD2 R0 R2,SHLACCT get the account 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1842 (FRQSHARE) F 119 FREQ - SHARE/UNSHARE 084B9 E616C801 013 BASE 676 ST2 R0 R3,SHLACCT and move over 084BA 60168803 0 2 BASE 677 LD R0 R2,SHLACCTP also division-project 084BB E416C803 0 3 BASE 678 ST R0 R3,SHLACCTP 679 * \ / 680 681 ********************************************************************************** 682 * We know that an in-place shared list cannot * 683 * contain a password or system. * 684 ********************************************************************************** 685 686 * \ / 084BC 18C40004 3 IMM 687 ADD R3 SHLENTLEN move R3 to after the entry 000084BD 688 NOCOPY LABEL 084BD 60178801 0 6 BASE 689 LD R0 SP,DISKITDA return R0 = MS address of SLB 084BE 19C40001 7 IMM 690 ADD R7 1 give good return 084BF 5D1F8003 6 STAK 691 LEAVE POP return to caller 692 * --- 693 694 ********************************************************************************** 695 * * 696 * This user is up against his saved space limit. Therefore, * 697 * no room is available in which to expand. Return code in R7. * 698 * * 699 ********************************************************************************** 700 000084C0 701 NOROOM LABEL 084C0 E4178800 0 6 BASE 702 ST R0 SP,0 place code in callers R7 084C1 5D1F8003 6 STAK 703 LEAVE POP return to error return 704 * --- 705 706 ********************************************************************************** 707 * The disk doesn't like us - we're out of space * 708 * so return the error. * 709 ********************************************************************************** 710 000084C2 711 NODISKROOM LABEL 084C2 E4178800 0 6 BASE 712 ST R0 SP,0 return the error code in callers R7 084C3 6047FFFF 1 IMM 713 LD R1 -1 change in MS allocation 084C4 DC405C7B 714 CALLNP LIMITCHECK remove the stuff we gave earlier 084C5 001311B2 715 HALT HALTS11B2 LIMITCHECK returned impossible error 084C6 5D1F8003 6 STAK 716 LEAVE POP return to error return 717 * --- 718 719 END DISKIT subroutine 720 721 722 END Share and Unshare FREQs 179 INPUT FREQCATINF catalog information request 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1843 (FREQCATINF) F 120 FREQ - File Catalog Information Fetch 3 4 ********************************************************************************** 5 * * 6 * Requests to read assorted catalog related information * 7 * given a lun number. * 8 * * 9 * Stack Required: 18 * 10 * 7 + max ( DIRINFOHD (1), DIRINFOP (1), DMOTEWNDOx (7), * 11 * FETCHDIR (4), FREEDIR (5), GRUBWNDOx (7), * 12 * SETMEMTRAP (1), SETWNDOx (4), SRCHDIRSN (11) ) * 13 * * 14 ********************************************************************************** 15 16 BLOCK FREQCATINF routine 17 ENTRY FREQCATINF return catalog information 18 000084C7 19 FREQCATINF LABEL 084C7 EC1F8007 6 STAK 20 STZ STAK SP,RWSTKSIZ allocate stack area 084C8 64840002 2 IMM 21 CPR R2 CATINFJTL check for a legal request 084C9 FE0659D8 22 JGE UERRORILR jump if sub-op too large 084CA FB7059B8 5 23 JZA FCB FERRORLNE3 ensure that lun exists 084CB 60091B33 0 4 ZBM 24 LD R0 R4,CAR1/BITS 13:31 get the users buffer size 084CC E4178803 0 6 BASE 25 ST R0 SP,BUFSIZ and save it 084CD 60491F14 1 4 ZBM 26 LD R1 R4,CAR2/FLDADRS force users buffer address to word boundary 084CE E4578802 1 6 BASE 27 ST R1 SP,COREADR save buffer address 084CF 5C093011 4 ZBM 28 CMZ R4,CAMSR/MSRSRELOCB check the store relocation 084D0 ED895A10 5 ZBM 29 STLNE FCB,FCRELOC and save the information 084D1 61095114 4 5 ZBM 30 LD ULB FCB,FCLIMITPTR get the corresponding ULB ptr 084D2 5CA484D3 2 31 LDPC CATINFJT(R2) decode the sub-op 32 * --- 33 000084D3 34 CATINFJT LABEL 084D3 000084D5 35 VFD ADR CATINFLUN fetch lun catalog info 084D4 00008507 36 VFD ADR CATINFSHL fetch shared list info 00000002 ABS 37 CATINFJTL EQU DISPW CATINFJT size of the table 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1844 (FREQCATINF) F 120 FREQ - File Catalog Information Fetch 39 40 ********************************************************************************** 41 * * 42 * Get catalog information for a specified lun. The user * 43 * request looks like a read from a .DIR. If catalog reading * 44 * is not allowed, then no information is returned. The first * 45 * thing layed down is the account name header. If the file is * 46 * saved, this is followed by the file information. * 47 * * 48 ********************************************************************************** 49 000084D5 50 CATINFLUN LABEL 084D5 FB0284DB 4 51 JEQZ ULB NORESTR skip check if a fake or device file 084D6 5C090616 4 ZBM 52 CMZ ULB,ULRSTRG2 is file in a restrictive account? 084D7 FE0284DB 53 JEQ NORESTR 084D8 60000414 0 54 LD R0 CPCUPC get current UPC pointer 084D9 5C081A10 0 ZBM 55 CMZ R0,UPRSTCTG2 can process override the restriction? 084DA FE0C59F6 56 JNE UERRORURX no information given - restricted request 000084DB 57 NORESTR LABEL 58 * Give account header 084DB 60040020 0 IMM 59 LD R0 DIRHWIDE*CPW get its length 084DC 64178803 0 6 BASE 60 CPR R0 SP,BUFSIZ compare against the users buffer 084DD FE0484F6 61 JGT NOMOREX jump if users buffer too small for header 084DE DC005BCF 62 CALL SETMEMTRAP set up to catch user memory errors 084DF 40005B5F 63 PARL PASSERRUP pass error address 084E0 60D78802 3 6 BASE 64 LD R3 SP,COREADR get the buffer address 084E1 DC4071E4 65 CALLNP DIRINFOHD place the header info 084E2 98178802 0 6 BASE 66 ADDM R0 SP,COREADR advance the store address 084E3 B00981E3 0 6 ZBM 67 RSBM R0 SP,BUFSIZ/BITS 0:29 remove space from buffer 68 * \ / 69 * If saved, find the entry, then give the information 084E4 5C096415 5 ZBM 70 CMZ FCB,FCSAVED is it saved? 084E5 FE0284F6 71 JEQ NOMOREX jump if not - no information 084E6 60040044 0 IMM 72 LD R0 DIRENTWIDE*CPW get the information size 084E7 64178803 0 6 BASE 73 CPR R0 SP,BUFSIZ compare to the users buffer remaining 084E8 FE0484F6 74 JGT NOMOREX jump if not room 084E9 DC0082BB 75 CALL SRCHDIRSN find the file entry 084EA 40005983 76 PARL FERROR indicate error address 084EB FE0284ED 77 JEQ CILUNFND jump if found 084EC 001311C0 78 HALT HALTS11C0 serious error, saved file not in DIR 79 * --- 80 000084ED 81 CILUNFND LABEL 084ED DC005BCF 82 CALL SETMEMTRAP catch user memory protect errors 084EE 400084FB 83 PARL CIMEMBAD error address 084EF 60978802 2 6 BASE 84 LD R2 SP,COREADR get the users buffer address 084F0 DC407214 85 CALLNP DIRINFOP move the information 084F1 98178802 0 6 BASE 86 ADDM R0 SP,COREADR advance the buffer address 084F2 B00981E3 0 6 ZBM 87 RSBM R0 SP,BUFSIZ/BITS 0:29 remove the space from the buffer 88 * \ / 89 000084F3 90 CISHLXIT LABEL 084F3 DC40315C 91 CALLNP DMOTEWNDO1 release the block with FDE 084F4 DC40315F 92 CALLNP DMOTEWNDO2 release UDIR1 block (if RAF type dir) 084F5 DC405685 93 CALLNP FREEDIR release the directory 94 * \ / 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1845 (FREQCATINF) F 120 FREQ - File Catalog Information Fetch 95 000084F6 96 NOMOREX LABEL 084F6 61000412 4 97 LD R4 CPPSA get the current PSA pointer 084F7 61091F11 4 4 ZBM 98 LD R4 R4,PSCACHNP1 R4 => callers registers 084F8 60178803 0 6 BASE 99 LD R0 SP,BUFSIZ get the buffer remaining 084F9 E4170803 0 4 BASE 100 ST R0 R4,CAR1 return buffer size remaining 084FA FE0E5982 101 JMP FNOERROR exit, done 102 * --- 103 104 * The user memory went bad, fob error off on user 000084FB 105 CIMEMBAD LABEL 084FB E6178804 016 BASE 106 ST2 R0 SP,RWERINFO save the parameters 084FC DC403150 107 CALLNP GRUBWNDO1 release the block with FDE 084FD DC403153 108 CALLNP GRUBWNDO2 release UDIR1 block (if RAF type dir) 084FE DC405685 109 CALLNP FREEDIR free the directory access 084FF 62178804 016 BASE 110 LD2 R0 SP,RWERINFO retrieve the error parameters 08500 FE0E5B5F 111 JMP PASSERRUP go give the error 112 * --- 113 114 * Disk error while reading in the directory or share list 00008501 115 CIDIRBAD LABEL 08501 61D20000 7 0 REG 116 LD R7 R0 copy the error code 08502 DC403150 117 CALLNP GRUBWNDO1 release the block with FDE 08503 DC403153 118 CALLNP GRUBWNDO2 release UDIR1 block (if RAF type dir) 08504 61095114 4 5 ZBM 119 LD ULB FCB,FCLIMITPTR restore ULB pointer 08505 DC405685 120 CALLNP FREEDIR most definitely locked, release access 08506 FE0E5997 121 JMP FERROR7 jump with error code in R7 122 * --- 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1846 (FREQCATINF) F 120 FREQ - File Catalog Information Fetch 124 125 ********************************************************************************** 126 * * 127 * Read a shared list. This request reads the shared list * 128 * of the specified lun. The read gives the shared list as * 129 * blocks of entries. The first word gives the access and * 130 * whether a password is required. This is followed by the * 131 * specified system and the account and project. * 132 * * 133 ********************************************************************************** 134 00008507 135 CATINFSHL LABEL 08507 DC005BCF 136 CALL SETMEMTRAP where to go for bad memory 08508 400084FB 137 PARL CIMEMBAD shared error handler 08509 60096665 0 5 ZBM 138 LD R0 FCB,FCHTYPE get the hardware type of the entry 0850A 64040005 0 IMM 139 CPR R0 HTYPEDIR directories are different 0850B FE028512 140 JEQ DIRSHL shared list for directory 0850C 5C096415 5 ZBM 141 CMZ FCB,FCSAVED is this file saved? 0850D FE0259BE 142 JEQ FERRORLNS jump if not - 'lun not saved' 0850E DC0082BB 143 CALL SRCHDIRSN find the entry 0850F 40005983 144 PARL FERROR pass error address 08510 FE02851F 145 JEQ CISHLFND jump if entry found 08511 001311C1 146 HALT HALTS11C1 serious error, saved file not in DIR 147 * --- 148 00008512 149 DIRSHL LABEL 08512 FB3084F6 4 150 JZA ULB NOMOREX check for non-existent dir 08513 60094E45 0 5 ZBM 151 LD R0 FCB,FCPRIV get privilege to access this device 08514 6404000F 0 IMM 152 CPR R0 FSPRIVNOT check for no privilege 08515 FE0284F6 153 JEQ NOMOREX don't give out the information 154 * \ / 08516 DC405667 155 CALLNP FETCHDIR get access to the directory 08517 DC003205 156 CALL SETWNDO1 call to map in the directory 08518 41440001 IMM 157 PARV VPCNTLRO indicate read only 08519 41534000 5 REG 158 PARV FCB indicate lun associated with this block 0851A 41008501 159 PAR CIDIRBAD error address 0851B 41570801 4 BASE 160 PARV ULB,ULBLOCK pass the directory MS address 0851C 40440009 IMM 161 PARVL FBITUDIR1 and indicate the FBI type expected 0851D 60C4083C 3 IMM 162 LD R3 ADR WNDO1(UDSHLLIST) get address of share list 0851E FE0E8520 163 JMP MOVESHLF go share code 164 * --- 165 0000851F 166 CISHLFND LABEL 0851F 38D6C814 3 3 BASE 167 LEA R3 R3,FDSHL R3 => base of the list 00008520 168 MOVESHLF LABEL 08520 5C16C800 3 BASE 169 CMZ R3,0 is anything present? 08521 FE0284F3 170 JEQ CISHLXIT jump if nothing there 08522 FE088525 171 JLT CISHLDISK jump if it's on the disk 172 * \ / 173 * just a short share list. Move the one entry. 08523 FBE8853C 7 174 JSR R7 MOVE1SHL move the one entry 08524 FE0E84F3 175 JMP CISHLXIT return 176 * --- 177 178 * The shared list is on the disk. Go look for it. 00008525 179 CISHLDISK LABEL 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1847 (FREQCATINF) F 120 FREQ - File Catalog Information Fetch 08525 6116C800 4 3 BASE 180 LD R4 R3,0 get the MS address 08526 60094081 0 5 ZBM 181 LD R0 FCB,FCDRIVE get the volume number 08527 E40B0080 0 4 CBM 182 ST R0 R4/VOLFIELD fix R4 to be a complete MS address 08528 61C40011 7 IMM 183 LD R7 FBITASLB get the type of FBI expected 08529 64C4083C 3 IMM 184 CPR R3 ADR WNDO1(UDSHLLIST) verify really an account 0852A FE02852C 185 JEQ DIRRING go read in dir if correct guess 0852B 61C40012 7 IMM 186 LD R7 FBITFSLB this is a file shared list 187 * \ / 188 0000852C 189 DIRRING LABEL 0852C DC0031FF 190 CALL SETWNDO2 get the block into core 0852D 41440001 IMM 191 PARV VPCNTLRO read only 0852E 41534000 5 REG 192 PARV FCB indicate lun associated with this block 0852F 41008501 193 PAR CIDIRBAD indicate error address 08530 41530000 4 REG 194 PARV R4 pass the MS address 08531 40578800 6 BASE 195 PARVL SP,0 and pass the expected FBI type 08532 60C40C00 3 IMM 196 LD R3 ADR WNDO2 R3 => root of list 08533 61095114 4 5 ZBM 197 LD ULB FCB,FCLIMITPTR restore ULB pointer 198 * \ / 199 00008534 200 MOVESHL LABEL 08534 5C16C800 3 BASE 201 CMZ R3,0 any entry here? 08535 FE0284F3 202 JEQ CISHLXIT jump if no more 08536 FE08853B 203 JLT CISHLBAD jump if fatal data error (freed block?) 08537 FBE8853C 7 204 JSR R7 MOVE1SHL move this one entry 08538 6008C220 0 3 ZBM 205 LD R0 R3,SHLACTOPT get optional flags 08539 18E0845C 3 0 206 ADD R3 MOVEINSHLT(R0) advance address over this entry 0853A FE0E8534 207 JMP MOVESHL go do the next entry 208 * --- 209 210 * Unknown garbage in the share list 0000853B 211 CISHLBAD LABEL 0853B 001311C2 212 HALT HALTS11C2 garbage in share list 213 * --- 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1848 (FREQCATINF) F 120 FREQ - File Catalog Information Fetch 215 216 ********************************************************************************** 217 * * 218 * MOVE1SHL. Moves one shared list entry into the users * 219 * memory. Call: * 220 * LD R3 => shared list entry * 221 * JSR R7 MOVE1SHL * 222 * Gets R0 thru R2. Routine returns directly to the exit if * 223 * the buffer is not big enough. * 224 * * 225 ********************************************************************************** 226 227 SHLINFORD LIST 227 ********************************************************************************** 227 * * 227 * Shared list information read format. * 227 * * 227 ********************************************************************************** 227 0000853C 227 SHRPROTO BASE R0 00160000 0 CACH 227 SHRACCESS BSSB 8 access given (codes for FSPRIVxx) 00081010 0 ZBM 227 SHRPW BSSB 1 on if password present 227 BSSB 6 filler 00081F10 0 ZBM 227 SHRENLEN BSSB 17 contains length of this entry 00160801 0 BASE 227 SHRSYS BSS 1 system shared with 00160802 0 BASE 227 SHRACCT BSS 2 account shared with 00160804 0 BASE 227 SHRPROJ BSS 1 project shared with 227 DRCT 00000005 ABS 227 SHRLNTH EQU DISPW SHRPROTO length of an entry 227 ORG SHRPROTO 228 0000853C 229 MOVE1SHL LABEL 0853C 60040014 0 IMM 230 LD R0 SHRLNTH*CPW get size of one entry 0853D 64178803 0 6 BASE 231 CPR R0 SP,BUFSIZ is the buffer big enough? 0853E FE0484F3 232 JGT CISHLXIT jump if this entry won't fit 0853F 5C095A10 5 ZBM 233 CMZ FCB,FCRELOC check relocation of user bufer 08540 FE0C8542 234 JNE MONGO jump if monitor 08541 59840080 IMM 235 CLBMSR MSRSRELOC otherwise, relocate to user 236 * \ / 237 00008542 238 MONGO LABEL 08542 60978802 2 6 BASE 239 LD R2 SP,COREADR get the buffer address 08543 60040005 0 IMM 240 LD R0 SHRLNTH load length of an entry 08544 E4168800 0 2 BASE 241 ST R0 R2,0 initialize the first word and entry size 08545 6008C630 0 3 ZBM 242 LD R0 R3,SHLACTPRIV get the privilege 08546 E4168000 0 2 CACH 243 ST R0 R2,SHRACCESS move the access over 08547 5C08C210 3 ZBM 244 CMZ R3,SHLACTPW is a password present? 08548 ED889010 2 ZBM 245 STLNE R2,SHRPW set flag if password present 08549 60040000 0 IMM 246 LD R0 0 0854A 5C08C410 3 ZBM 247 CMZ R3,SHLACTSYS is a system name present? 0854B FE02854D 248 JEQ MOVE1SHLS jump if not, return 'local system' 0854C 6016C806 0 3 BASE 249 LD R0 R3,SHLACCTSYS get the real name 250 * \ / 251 0000854D 252 MOVE1SHLS LABEL 0854D E4168801 0 2 BASE 253 ST R0 R2,SHRSYS set the system name 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1849 (FREQCATINF) F 120 FREQ - File Catalog Information Fetch 0854E 6216C801 013 BASE 254 LD2 R0 R3,SHLACCT get the account shared with 0854F E6168802 012 BASE 255 ST2 R0 R2,SHRACCT and store into block 08550 6016C803 0 3 BASE 256 LD R0 R3,SHLACCTP get the project 08551 E4168804 0 2 BASE 257 ST R0 R2,SHRPROJ and store into block 08552 59C40080 IMM 258 IORMSR MSRSRELOC back to monitor relocation 08553 60040005 0 IMM 259 LD R0 SHRLNTH get the length of one entry 08554 98178802 0 6 BASE 260 ADDM R0 SP,COREADR advance the buffer address 08555 B00981E3 0 6 ZBM 261 RSBM R0 SP,BUFSIZ/BITS 0:29 remove the space from the size 08556 5C93C000 7 REG 262 LDPC R7 return 263 * --- 264 265 END FREQCATINF routine 180 INPUT ACCTDIDDLE get/set account attributes 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1850 (ACCTDIDDLE) F 121 FREQ - Get account attributes 3 4 GETSETAA BLOCK Get/Set Account Attributes 5 6 ENTRY FREQGACCT get access attributes 7 ENTRY FREQGACCT2 more get access attributes 8 ENTRY FREQSACCT set account attributes 9 ENTRY FREQSACCT2 more set account attributes 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1851 (ACCTDIDDLE) F 121 FREQ - Get account attributes 11 12 ********************************************************************************** 13 * * 14 * Requests that fetch account attributes. The parameter * 15 * is a .DIR of the account to be looked at. Managers may * 16 * look at accounts below them in the hierarchy. A user may * 17 * look at any account that he has access to (except those * 18 * with just XO). This is determined by using the FCPRIV field * 19 * set when the .DIR was opened. * 20 * User call: * 21 * LD R0 * 22 * LD R1 * 23 * FREQ (lun = .DIR to look at) * 24 * JLTZ R0 * 25 * ST R1 * 26 * * 27 * Stack required = 7. * 28 * 0 + max ( DMOTEWNDO1 (7), FETCHDIR (4), FREEDIR (5), * 29 * GRUBWNDO1 (7), LEVELBIT (3), SETMEMTRAP (1), * 30 * SETWNDO1 (4) ) * 31 * * 32 ********************************************************************************** 33 34 BLOCK FREQGACCT and FREQGACCT2 routines 35 ENTRY FREQGACCT get access attributes 36 ENTRY FREQGACCT2 more get access attributes 37 00008557 38 FREQGACCT2 LABEL 08557 18840010 2 IMM 39 ADD R2 ONEBITS/XRFLDSUBOP+1 second code is continuation of first 00008558 40 FREQGACCT LABEL 08558 64840014 2 IMM 41 CPR R2 MAXGET match against allowed 08559 FE0659D8 42 JGE ILLREQ jump if request not in bounds 0855A FB7059B8 5 43 JZA FCB FERRORLNE3 jump if no .DIR 0855B 60096665 0 5 ZBM 44 LD R0 FCB,FCHTYPE get the files hardware type 0855C 64040005 0 IMM 45 CPR R0 HTYPEDIR check for a directory 0855D FE0C59A5 46 JNE FERRORILOP give error if not! 0855E 61095114 4 5 ZBM 47 LD ULB FCB,FCLIMITPTR is there a real acct here? 0855F FB3059C8 4 48 JZA ULB FERRORPNS if not, say PNS so grunts cannot tell if here 08560 61D28000 7 2 REG 49 LD R7 R2 sub op into R7 to save it 50 * \ / 08561 60000414 0 51 LD R0 CPCUPC get requesters current UPC pointer 08562 DC005B84 52 CALL LEVELBIT check our relationship 08563 41481F13 0 ZBM 53 PARV R0,UPCPRIVULB requesters privilege account 08564 40495114 5 ZBM 54 PARVL FCB,FCLIMITPTR who's being looked at 08565 FA4C8569 1 55 JNEZ R1 LOOKATHIM jump if manager or self 08566 60094E45 0 5 ZBM 56 LD R0 FCB,FCPRIV what privilege do we have here? 08567 6404000F 0 IMM 57 CPR R0 FSPRIVNOT none? 08568 FE0259C8 58 JEQ FERRORPNS get outa here!!! 59 * \ / 60 * Note that ULB register is properly set 00008569 61 LOOKATHIM LABEL 08569 5D6E856E 7 62 XCT GETITTAB(R7) R0 := the value 63 * \ / 0000856A 64 RTNVALUE LABEL 0856A 61000412 4 65 LD R4 CPPSA get the current PSA pointer 0856B 61091F11 4 4 ZBM 66 LD R4 R4,PSCACHNP1 R4 => callers registers 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1852 (ACCTDIDDLE) F 121 FREQ - Get account attributes 0856C E4170803 0 4 BASE 67 ST R0 R4,CAR1 return value in callers R1 0856D FE0E5982 68 JMP FNOERROR return success 69 * --- 70 71 ********************************************************************************** 72 * * 73 * Execute table to get the appropriate value. If the * 74 * value can be fetched by a simple load the load is placed * 75 * here. If the request requires more work, the execute * 76 * instruction finds a jump instruction here that takes * 77 * control off to the appropriate code. * 78 * * 79 ********************************************************************************** 80 0000856E 81 GETITTAB LABEL 0856E 60170808 0 4 BASE 82 LD R0 ULB,ULTIMLIM 000 - CPU time limit (sec) 0856F 60170809 0 4 BASE 83 LD R0 ULB,ULTIMUSD 001 - CPU time used (sec) 08570 6017080A 0 4 BASE 84 LD R0 ULB,ULWLCKLIM 002 - wall clock limit (min) 08571 6017080B 0 4 BASE 85 LD R0 ULB,ULWLCKUSD 003 - wall clock used (min) 08572 6009218D 0 4 ZBM 86 LD R0 ULB,ULDSKLIM 004 - blocks limit 08573 6009118E 0 4 ZBM 87 LD R0 ULB,ULDSKUSD 005 - saved blocks used 08574 6009318C 0 4 ZBM 88 LD R0 ULB,ULDSKWARN 006 - soft block limit 08575 6009018C 0 4 ZBM 89 LD R0 ULB,ULDSKSAVL 007 - saved block limit 08576 FE0E8582 90 JMP READDIRIN 008 - sub-system control flag 08577 60091F15 0 4 ZBM 91 LD R0 ULB,ULBUSYCTR 009 - account busy counter 08578 60090047 0 4 ZBM 92 LD R0 ULB,ULFACCESS 00A - file access 08579 60090847 0 4 ZBM 93 LD R0 ULB,ULPACCESS 00B - password access 0857A FE0E59D8 94 JMP ILLREQ 00C - not used 0857B 60091A57 0 4 ZBM 95 LD R0 ULB,ULLOGSPOT 00D - accounting control 0857C FE0E8582 96 JMP READDIRIN 00E - initial program 0857D FE0E8582 97 JMP READDIRIN 00F - account title 0857E FE0E8582 98 JMP READDIRIN 010 - serial number 0857F 60090010 0 4 ZBM 99 LD R0 ULB,ULSHADOW 011 - shadow 08580 60090056 0 4 ZBM 100 LD R0 ULB,ULRWORD/XREQRSTR 012 - default restrictions 08581 FE0E8582 101 JMP READDIRIN 013 - account encryption flag 00000014 ABS 102 MAXGET EQU DISPW GETITTAB size of table 103 104 ********************************************************************************** 105 * * 106 * Some requests require us to go to the directory block * 107 * on the disk. We here go fetch. * 108 * * 109 ********************************************************************************** 110 00008582 111 READDIRIN LABEL 08582 DC405667 112 CALLNP FETCHDIR get access to the directory 08583 DC003205 113 CALL SETWNDO1 get the directory block into core 08584 41440001 IMM 114 PARV VPCNTLRO only will read 08585 41534000 5 REG 115 PARV FCB a lun because we only demote him later 08586 410085D1 116 PAR DIRWENTBAD where to go on error 08587 41570801 4 BASE 117 PARV ULB,ULBLOCK address of directory block 08588 40440009 IMM 118 PARVL FBITUDIR1 type is main directory block 08589 60C40800 3 IMM 119 LD R3 ADR WNDO1 R3 => base of UDIR 0858A 603E8595 0 7 @ 120 LD R0 @DOITCODEP(R7) get code for next operation 0858B 5CA0858C 0 121 LDPC DOITCODE(R0) zoom off to fetch from directory 122 * --- 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1853 (ACCTDIDDLE) F 121 FREQ - Get account attributes 124 0000858C 125 DOITCODE BASE 0858C 00008596 126 BAD VFD ADR BADCODE not good code 0858D 0000859F 127 GETSSCF VFD ADR GETSSCFR get subsystem control flag 0858E 000085BC 128 GETINITP VFD ADR GETINITPR get initial program 0858F 000085A4 129 GETACCTT VFD ADR GETACCTTR get account title 08590 00008597 130 GETSERNO VFD ADR GETSERNOR get account serial number 08591 0000859C 131 GETDFLTR VFD ADR GETDFLTRR get default restrictions 08592 000085C9 132 GETENCRF VFD ADR GETENCRFR get account encryption flag 133 DRCT 00000003 ABS 134 DOITLOG EQU (DISPW DOITCODE) LOG 2 135 08592 00000000 136 DOITCODET VFD DOITLOG:BAD,BAD,BAD,BAD 08592 00000000 137 VFDB DOITLOG:BAD,BAD,BAD,BAD 08593 00000000 138 VFDB DOITLOG:GETSSCF,BAD,BAD,BAD 08593 00000003 139 VFDB DOITLOG:BAD,BAD,GETINITP,GETACCTT 08593 00000006 140 VFDB DOITLOG:GETSERNO,BAD,GETDFLTR,GETENCRF 141 BSS 0 08595 00C88593 142 DOITCODEP PTR DOITCODET ptr to table to re-decode super sub op 143 144 * Bad index after going to mass storage. No explanation. 08596 001311D0 145 BADCODE HALT HALTS11D0 bad index, was okay 146 * --- 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1854 (ACCTDIDDLE) F 121 FREQ - Get account attributes 148 149 ********************************************************************************** 150 * * 151 * Fetch the account serial number and return double value * 152 * * 153 ********************************************************************************** 154 00008597 155 GETSERNOR LABEL 08597 6216C820 013 BASE 156 LD2 R0 R3,UDSERNO pick up account serial number 08598 60800412 2 157 LD R2 CPPSA get the current PSA pointer 08599 60889F11 2 2 ZBM 158 LD R2 R2,PSCACHNP1 R2=> callers registers 0859A E6168803 012 BASE 159 ST2 R0 R2,CAR1 and return value in R0:R1 0859B FE0E85CE 160 JMP GETACCTLV vacate 161 * --- 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1855 (ACCTDIDDLE) F 121 FREQ - Get account attributes 163 164 ********************************************************************************** 165 * * 166 * Fetch the default logon restrictions * 167 * * 168 ********************************************************************************** 169 0000859C 170 GETDFLTRR LABEL 0859C 61D6C806 7 3 BASE 171 LD R7 R3,ULRWORD R7 = restriction word 0859D 61CBC050 7 7 CBM 172 LD R7 R7/XREQRSTR R7 = 'XREQ' restrictions 0859E FE0E85A0 173 JMP GETSSSHR share code 174 * --- 175 176 177 ********************************************************************************** 178 * * 179 * Fetch the subsystem control word out of dir * 180 * * 181 ********************************************************************************** 182 0000859F 183 GETSSCFR LABEL 0859F 61D6C81F 7 3 BASE 184 LD R7 R3,UDSFLAGS R7 := value 185 * \ / 186 000085A0 187 GETSSSHR LABEL 085A0 DC40315C 188 CALLNP DMOTEWNDO1 unmap the directory block 085A1 DC405685 189 CALLNP FREEDIR release access to the dir 085A2 6013C000 0 7 REG 190 LD R0 R7 R0 = value 085A3 FE0E856A 191 JMP RTNVALUE return it in callers R1 192 * --- 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1856 (ACCTDIDDLE) F 121 FREQ - Get account attributes 194 195 ********************************************************************************** 196 * * 197 * Fetch the account title. It is null filled, so we * 198 * must find the end of him. * 199 * * 200 ********************************************************************************** 201 000085A4 202 GETACCTTR LABEL 085A4 DC005BCF 203 CALL SETMEMTRAP set up for bad memory 085A5 400085D4 204 PARL USERMEMBAD 085A6 3816C84E 0 3 BASE 205 LEA R0 R3,UDTITLE R0 => the title string 085A7 60440048 1 IMM 206 LD R1 UDTITLEL R1 = max length 085A8 60840000 2 IMM 207 LD R2 0 this char marks the string end 085A9 FE560000 208 CSRCH find the end 085AA FE0285AC 209 JEQ CHARFND jump if character actually there 085AB 60440000 1 IMM 210 LD R1 0 use the whole thing if no null found 211 * \ / 212 000085AC 213 CHARFND LABEL 085AC 30440048 1 IMM 214 RSB R1 UDTITLEL R1 = length of title in chars 085AD FA4A85CE 1 215 JLEZ R1 GETACCTLV jump if nothing there 085AE 60800412 2 216 LD R2 CPPSA get the current PSA pointer 085AF 60889F11 2 2 ZBM 217 LD R2 R2,PSCACHNP1 R2 => users registers 085B0 68568803 1 2 BASE 218 UCPR R1 R2,CAR1 will title fit in the users buffer? 085B1 FE0A85B3 219 JLE ENOUGHBUF jump if so 085B2 60568803 1 2 BASE 220 LD R1 R2,CAR1 user the shorter user buffer size 221 * \ / 222 000085B3 223 ENOUGHBUF LABEL 085B3 B0568803 1 2 BASE 224 RSBM R1 R2,CAR1 count down part used 085B4 3816C84E 0 3 BASE 225 LEA R0 R3,UDTITLE R0 := source pointer 085B5 5C08B011 2 ZBM 226 CMZ R2,CAMSR/MSRSRELOCB storing into a user place? 085B6 FE0C85B8 227 JNE MONITZOT jump if into monitor 085B7 59840080 IMM 228 CLBMSR MSRSRELOC relocate to user space 229 * \ / 230 000085B8 231 MONITZOT LABEL 085B8 60968804 2 2 BASE 232 LD R2 R2,CAR2 R2 => users destination 085B9 FE400000 233 CMOVE move over the title 085BA 59C40080 IMM 234 IORMSR MSRSRELOC restore store relocation to monitor 085BB FE0E85CE 235 JMP GETACCTLV done 236 * --- 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1857 (ACCTDIDDLE) F 121 FREQ - Get account attributes 238 239 ********************************************************************************** 240 * * 241 * Fetch initialization program name * 242 * * 243 ********************************************************************************** 244 000085BC 245 GETINITPR LABEL 085BC DC005BCF 246 CALL SETMEMTRAP set up for bad memory 085BD 400085D4 247 PARL USERMEMBAD 085BE 3816C80B 0 3 BASE 248 LEA R0 R3,UDHPRAC R3 => base of program name 085BF 60440028 1 IMM 249 LD R1 10*CPW R1 = size in characters 085C0 60800412 2 250 LD R2 CPPSA get the current PSA pointer 085C1 60889F11 2 2 ZBM 251 LD R2 R2,PSCACHNP1 R2 => requesters registers 085C2 5C08B011 2 ZBM 252 CMZ R2,CAMSR/MSRSRELOCB in the monitor? 085C3 FE0C85C5 253 JNE MONITZAP jump if so 085C4 59840080 IMM 254 CLBMSR MSRSRELOC relocate storing into user 255 * \ / 256 000085C5 257 MONITZAP LABEL 085C5 60968803 2 2 BASE 258 LD R2 R2,CAR1 R2 => place to put them 085C6 FE400000 259 CMOVE move the characters 085C7 59C40080 IMM 260 IORMSR MSRSRELOC storing relocation back to monitor space 085C8 FE0E85CE 261 JMP GETACCTLV vacate 262 * --- 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1858 (ACCTDIDDLE) F 121 FREQ - Get account attributes 264 265 ********************************************************************************** 266 * * 267 * Get the 'encryption for backup' flag. The flag is * 268 * on if should be encrypted. * 269 * * 270 ********************************************************************************** 271 000085C9 272 GETENCRFR LABEL 085C9 60000412 0 273 LD R0 CPPSA get the current PSA pointer 085CA 60481F11 1 0 ZBM 274 LD R1 R0,PSCACHNP1 point to the user registers 085CB 6080081F 2 275 LD R2 WNDO1(UDSFLAGS) get flag from dir 085CC 608A8010 2 2 CBM 276 LD R2 R2/UDENCRFLG just one bit from this word 085CD E4964803 2 1 BASE 277 ST R2 R1,CAR1 give user the flag 278 * \ / 279 280 * general exit 000085CE 281 GETACCTLV LABEL 085CE DC40315C 282 CALLNP DMOTEWNDO1 unmap the directory block 085CF DC405685 283 CALLNP FREEDIR release access to the directory 085D0 FE0E5982 284 JMP FNOERROR return success 285 * --- 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1859 (ACCTDIDDLE) F 121 FREQ - Get account attributes 287 288 ********************************************************************************** 289 * * 290 * The directory bit the dust. Return error to the poor * 291 * user. * 292 * * 293 ********************************************************************************** 294 000085D1 295 DIRWENTBAD LABEL 085D1 DC405685 296 CALLNP FREEDIR release access to the directory 085D2 DC403150 297 CALLNP GRUBWNDO1 release window with directory block 085D3 FE0E59CA 298 JMP FERRORDSE 'data structure error' 299 * --- 300 301 ********************************************************************************** 302 * * 303 * The users memory doesn't want the data. Give him the * 304 * error. * 305 * * 306 ********************************************************************************** 307 000085D4 308 USERMEMBAD LABEL 085D4 E61F8002 016 STAK 309 ST2 R0 STAK SP,2 save the error parameters 085D5 DC405685 310 CALLNP FREEDIR release grip on directory 085D6 DC403150 311 CALLNP GRUBWNDO1 release window with directory block 085D7 621F8002 016 STAK 312 LD2 R0 STAK SP,2 retrieve the error parameters 085D8 FE0E5B5F 313 JMP PASSERRUP pass the error to the caller 314 * --- 315 316 END FREQGACCT and FREQGACCT2 routines 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1860 (ACCTDIDDLE) F 121 FREQ - Set account attribute 319 320 ********************************************************************************** 321 * * 322 * Requests that set account attributes. The parameter * 323 * is a .DIR of the account to be modified. First we sort the * 324 * requests into groups that require different privileges and * 325 * set up. Then we perform the separate requests. Note that * 326 * the stack definitions are only used by a few. * 327 * User call: * 328 * LD R0 request * 329 * LD R1 * 330 * LD R2 * 331 * FREQ lun (.DIR to modify) * 332 * JLTZ R0 * 333 * ST R1 * 334 * * 335 * Stack required = 21 * 336 * 0 + max ( FERRORILOP (3), SETACC (13), SETCPUL (21), * 337 * SETCPUU (21), SETDRST (8), SETDSKL (21), * 338 * SETENCR (8), SETFAC (13), SETLOP (8), * 339 * SETLOPW (12), SETPWA (13), SETSAVL (21), * 340 * SETSSCF (8), SETTIT (8), SETWARN (13), * 341 * SETWLCKL (13), SETWLCKU (13) ) * 342 * * 343 ********************************************************************************** 344 345 BLOCK FREQSACCT and FREQSACCT2 routines 346 ENTRY FREQSACCT set account attributes 347 ENTRY FREQSACCT2 more set account attributes 348 000085D9 349 FREQSACCT2 LABEL 085D9 18840010 2 IMM 350 ADD R2 ONEBITS/XRFLDSUBOP+1 second code is a continuation of first 000085DA 351 FREQSACCT LABEL 085DA 64840014 2 IMM 352 CPR R2 SETMAX check for legal code 085DB FE0659D8 353 JGE ILLREQ see that the request is in bounds 354 * \ / 085DC FB7059B8 5 355 JZA FCB FERRORLNE3 error if lun isn't there 085DD 60096665 0 5 ZBM 356 LD R0 FCB,FCHTYPE get the files hardware type 085DE 64040005 0 IMM 357 CPR R0 HTYPEDIR check for a directory 085DF FE0C59A5 358 JNE FERRORILOP give error if not! 085E0 60094E45 0 5 ZBM 359 LD R0 FCB,FCPRIV get privilege 085E1 6404000F 0 IMM 360 CPR R0 FSPRIVNOT do we have any 085E2 FE0259C8 361 JEQ FERRORPNS jump if no rights exists 362 * \ / 085E3 61095114 4 5 ZBM 363 LD ULB FCB,FCLIMITPTR get this users ULB 085E4 FB3059C8 4 364 JZA ULB FERRORPNS fake unprivileged if no real account 085E5 5C090416 4 ZBM 365 CMZ ULB,ULRSTRG3 does this account restrict attr changing? 085E6 FE0285EA 366 JEQ NORESTR no, go ahead and do it 085E7 60C00414 3 367 LD R3 CPCUPC get current program info 085E8 5C08D810 3 ZBM 368 CMZ R3,UPRSTCTG3 can we override the restriction? 085E9 FE0C59C8 369 JNE FERRORPNS no, can't make the change 370 * \ / 000085EA 371 NORESTR LABEL 085EA 60C00412 3 372 LD R3 CPPSA 085EB 5CA485EC 2 373 LDPC DOITT(R2) modify the attribute 374 * --- 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1861 (ACCTDIDDLE) F 121 FREQ - Set account attribute 375 000085EC 376 DOITT LABEL 085EC 0000861E 377 VFD ADR SETCPUL 0 - set acct CPU limit 085ED 00008600 378 VFD ADR SETCPUU 1 - set acct CPU used 085EE 000086B4 379 VFD ADR SETWLCKL 2 - set acct wallclock limit 085EF 000086AD 380 VFD ADR SETWLCKU 3 - set acct wall clock used 085F0 00008648 381 VFD ADR SETDSKL 4 - set acct disk block limit 085F1 000059A5 382 VFD ADR MOREBAD 5 085F2 000086A6 383 VFD ADR SETWARN 6 - set acct soft limit 085F3 00008677 384 VFD ADR SETSAVL 7 - set acct saved limit 085F4 000086BB 385 VFD ADR SETSSCF 8 - set acct subsystem control flags 085F5 000059A5 386 VFD ADR MOREBAD 9 085F6 000086C1 387 VFD ADR SETFAC A - set acct file access control 085F7 000086D7 388 VFD ADR SETPWA B - set acct password access 085F8 000059A5 389 VFD ADR MOREBAD C - not used 085F9 000086D9 390 VFD ADR SETACC D - set acct accounting control 085FA 000086E5 391 VFD ADR SETLOP E - set acct initial program 085FB 000086FD 392 VFD ADR SETTIT F - set acct title 085FC 00008714 393 VFD ADR SETLOPW 010 - set acct logon password 085FD 000059A5 394 VFD ADR MOREBAD 011 085FE 000086E0 395 VFD ADR SETDRST 012 - default restrictions 085FF 0000873A 396 VFD ADR SETENCR 013 - backup encryption flag 00000014 ABS 397 SETMAX EQU DISPW DOITT size of table 398 399 * Codes that are not legal 000059A5 400 MOREBAD EQU FERRORILOP unused code -- return error 401 * --- 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1862 (ACCTDIDDLE) F 121 FREQ - Set account attribute 403 404 ********************************************************************************** 405 * * 406 * Setting CPU time used. CPU time used may only be set * 407 * down and setting used down is equivalent to setting the * 408 * limit up. Because of this, the managers authlist must be * 409 * present. * 410 * * 411 * Stack required = 21 * 412 * 0 + max ( CKPVM (4), DONEAUTH (14), FREEULB (11), * 413 * PRESETAUTH (21), PRESETREGX (1) ) * 414 * * 415 ********************************************************************************** 416 417 BLOCK Set CPU Time Used 418 ENTRY SETCPUU 419 00008600 420 SETCPUU LABEL 08600 DC408754 421 CALLNP CKPVM only managers may change 422 * R0 <= manager power bits, ULB <= ULB of victim account 08601 61D30000 7 4 REG 423 LD R7 ULB save victim account ULB 08602 DC005D0A 424 CALL PRESETAUTH find the authorization list 08603 41520000 0 REG 425 PARV R0 power bits telling privilege over victim 08604 42440000 IMM 426 PARV2L 0 only want the authlist 08605 FE0E59CA 427 JMP FERRORDSE disk structure error 08606 FE0E59C6 428 JMP FERRORNSE authorization list not found 08607 FE0E861B 429 JMP CUSUPER super account needs no authorization 430 * \ / 431 432 * R3 <= WNDO1 <= Authlist, Dir locked, ULB <= ULB of manager account 433 * FCB <= .DIR of victim account, R7 <= ULB of victim account 08608 DC4087A0 434 CALLNP PRESETREGX R1 = new value 08609 FA488745 1 435 JLTZ R1 GIVEPOB new value must be a positive number 0860A 60124000 0 1 REG 436 LD R0 R1 copy new value 0860B 3017C809 0 7 BASE 437 RSB R0 R7,ULTIMUSD R0 <= reducing amount 0860C FA088745 0 438 JLTZ R0 GIVEPOB must be reducing the amount 0860D 6096C801 2 3 BASE 439 LD R2 R3,AUTHTIMEA get time already allocated 0860E FAAE8612 2 440 JNEMW R2 CALCCPUU calculate the new allocated amount 0860F 6016C800 0 3 BASE 441 LD R0 R3,AUTHTIME get time allocatable 08610 FAAC8616 2 442 JEQMW R2 SETCPUUX jump if unlimited CPU time 08611 FE0E8747 443 JMP GIVEINSA give insufficient authorization error 444 * --- 445 00008612 446 CALCCPUU LABEL 08612 18128000 0 2 REG 447 ADD R0 R2 R0 <= new amount authorized 08613 6816C800 0 3 BASE 448 UCPR R0 R3,AUTHTIME greater than what we can give 08614 FE048747 449 JGT GIVEINSA if above, insufficient authorization 08615 E416C801 0 3 BASE 450 ST R0 R3,AUTHTIMEA new amount authorized 451 * \ / 452 00008616 453 SETCPUUX LABEL 08616 E457C809 1 7 BASE 454 ST R1 R7,ULTIMUSD new used amount 08617 DC408790 455 CALLNP DONEAUTH write out AUTH and ULB 08618 FB305982 4 456 JZA ULB FNOERROR just exit if no manager ULB 08619 DC405526 457 CALLNP FREEULB decrement use count of manager ULB 0861A FE0E5982 458 JMP FNOERROR indicate all went smoothly 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1863 (ACCTDIDDLE) F 121 FREQ - Set account attribute 459 * --- 460 0000861B 461 CUSUPER LABEL 0861B DC4087A0 462 CALLNP PRESETREGX R1 <= new value 0861C FA488745 1 463 JLTZ R1 GIVEPOB no negatives! 0861D FE0E8616 464 JMP SETCPUUX go set the value, period 465 * --- 466 467 END Set CPU Time Used 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1864 (ACCTDIDDLE) F 121 FREQ - Set account attribute 469 470 ********************************************************************************** 471 * * 472 * Setting CPU time limit. If an authorized manager is * 473 * found, we adjust his time allocated and give the time to * 474 * the account. In the case of decrementing CPU time, if * 475 * excess is left over we attempt to find the next higher * 476 * level manager and benefit him with the extra. * 477 * * 478 * Stack required = 21 * 479 * 0 + max ( CKPVM (4), DONEAUTH (14), FIXUPVAL (4), * 480 * FNDMGRD (16), FREEDIR (5), FREEULB (11), * 481 * GETAUTHN (12), GRUBWNDO1 (7), PRESETAUTH (21), * 482 * PRESETREGX (1) ) * 483 * * 484 ********************************************************************************** 485 486 BLOCK Set CPU time limit 487 ENTRY SETCPUL 488 0000861E 489 SETCPUL LABEL 0861E DC408754 490 CALLNP CKPVM only managers may change 491 * R0 <= manager power bits, ULB <= ULB of victim account 0861F DC005D0A 492 CALL PRESETAUTH find the authorization list 08620 41520000 0 REG 493 PARV R0 power bits telling privilege over victim 08621 42440000 IMM 494 PARV2L 0 only want the auth list 08622 FE0E59CA 495 JMP FERRORDSE disk structure error 08623 FE0E59C6 496 JMP FERRORNSE authorization list not found 08624 FE0E8641 497 JMP CLSUPER super account needs no authorization 498 * \ / 499 500 * R3 <= WNDO1 <= Authlist, DIR locked, ULB <= ULB of manager account 501 * FCB <= .DIR of victim account 08625 DC4087A0 502 CALLNP PRESETREGX R1 <= new value 08626 60895114 2 5 ZBM 503 LD R2 FCB,FCLIMITPTR pointer to victim ULB 08627 DC0087A5 504 CALL FIXUPVAL update ULB and authlist 08628 4116C800 3 BASE 505 PAR R3,AUTHTIME address of authlist pair 08629 40168808 2 BASE 506 PARL R2,ULTIMLIM address of ULB limit 0862A FE0E8748 507 JMP ERRSHARE share routine 0862B E413C000 0 7 REG 508 ST R0 R7 save overflow amount 509 * \ / 510 0000862C 511 SETCPULX LABEL 0862C DC408790 512 CALLNP DONEAUTH write out AUTH and ULB 0862D FB305982 4 513 JZA ULB FNOERROR no ULB, just return 0862E DC405526 514 CALLNP FREEULB decrement use count for managers ULB 0862F FBC65982 7 515 JGEZ R7 FNOERROR jump if no overflow at all 516 * \ / 517 518 * Extra CPU time is left over, try to give it away 08630 61095114 4 5 ZBM 519 LD ULB FCB,FCLIMITPTR pointer to victim ULB 08631 DC405CED 520 CALLNP FNDMGRD search for the
manager 08632 FB305982 4 521 JZA ULB FNOERROR no one to give excess to 08633 DC009CE0 522 CALL GETAUTHN read in the authlist 08634 43440000 IMM 523 PARV2 0 only get the authlist 08635 40008743 524 PARL GIVEDSE address to go on disk error 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1865 (ACCTDIDDLE) F 121 FREQ - Set account attribute 08636 FE0E863F 525 JMP CLFORGET super account doesn't need it 08637 FE0E863F 526 JMP CLFORGET no authlist, can't give it away 527 * \ / 528 529 * R3 <= Wndo1 <= Authlist, Dir locked, ULB <= ULB of manager account 530 * FCB <= .dir of victim account, R7 <= negative overflow amount 08638 6016C801 0 3 BASE 531 LD R0 R3,AUTHTIMEA get amount allocated 08639 FA2C863D 0 532 JEQMW R0 NOOVERCPUL jump if allocated is maxed out 0863A 1813C000 0 7 REG 533 ADD R0 R7 adjust authorized amount 0863B 54040000 0 IMM 534 MAX R0 0 don't allow negative numbers 0863C E416C801 0 3 BASE 535 ST R0 R3,AUTHTIMEA update the authlist 536 * \ / 537 0000863D 538 NOOVERCPUL LABEL 0863D DC405685 539 CALLNP FREEDIR release hold on managers directory 0863E DC403150 540 CALLNP GRUBWNDO1 write out the authlist 541 * \ / 542 0000863F 543 CLFORGET LABEL 0863F DC405526 544 CALLNP FREEULB decrement use count for managers ULB 08640 FE0E5982 545 JMP FNOERROR nothing to it 546 * --- 547 00008641 548 CLSUPER LABEL 08641 DC4087A0 549 CALLNP PRESETREGX R1 <= new value 08642 6447FFFF 1 IMM 550 CPR R1 -1 range check 08643 FE088745 551 JLT GIVEPOB jump if not OK 08644 60895114 2 5 ZBM 552 LD R2 FCB,FCLIMITPTR pointer to victim ULB 08645 E4568808 1 2 BASE 553 ST R1 R2,ULTIMLIM adjust time limit appropriately 08646 EC13C000 7 REG 554 STZ R7 indicate no overflow amount 08647 FE0E862C 555 JMP SETCPULX just write out the ULB 556 * --- 557 558 END Set CPU time limit 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1866 (ACCTDIDDLE) F 121 FREQ - Set account attribute 560 561 ********************************************************************************** 562 * * 563 * Set disk block limit. Regardless if setting up or * 564 * down an auth list entry is required. However if we are a * 565 * super account and NO authlist is present we let this * 566 * condition go by. If setting to infinite, then the giver * 567 * must have infinite and his "allocated" is set to infinite * 568 * and will never come down. * 569 * * 570 * Stack required = 21 * 571 * 0 + max ( CKPVM (4), DONEAUTH (14), FIXUPVAL (4), * 572 * FNDMGRD (16), FREEDIR (5), FREEULB (11), * 573 * GETAUTHN (12), GRUBWNDO1 (7), PRESETAUTH (21), * 574 * PRESETREGX (1) ) * 575 * * 576 ********************************************************************************** 577 578 BLOCK Set DISKL limit 579 ENTRY SETDSKL 580 00008648 581 SETDSKL LABEL 08648 DC408754 582 CALLNP CKPVM only managers may change 583 * R0 <= manager power bits, ULB <= ULB of victim account 08649 60890081 2 4 ZBM 584 LD R2 ULB,ULDRIVE drive volume is mounted on 0864A 60A41F22 2 2 585 LD R2 VOLNTABLE(R2) R2 <= VOLN element 0864B DC005D0A 586 CALL PRESETAUTH find the authorization list 0864C 41520000 0 REG 587 PARV R0 power bits telling privilege over victim 0864D 42568811 2 BASE 588 PARV2L R2,VOLNNAME specific authlist entry required 0864E FE0E59CA 589 JMP FERRORDSE disk structure error 0864F FE0E59C6 590 JMP FERRORNSE authorization list not found 08650 FE0E8670 591 JMP DLSUPER super account needs no authorization 592 * \ / 593 594 * R3 <= WNDO1 <= Authlist, DIR locked, ULB <= ULB of manager account 595 * FCB <= .DIR of victim account 08651 DC4087A0 596 CALLNP PRESETREGX R1 <= new value 08652 60895114 2 5 ZBM 597 LD R2 FCB,FCLIMITPTR pointer to victim ULB 08653 DC0087A5 598 CALL FIXUPVAL update ULB and authlist 08654 4116C804 3 BASE 599 PAR R3,AUTHDSK address of authlist pair 08655 4008A18D 2 ZBM 600 PARL R2,ULDSKLIM address of ULB limit 08656 FE0E8748 601 JMP ERRSHARE share routine 08657 E413C000 0 7 REG 602 ST R0 R7 save overflow amount 603 * \ / 604 00008658 605 SETDSKLX LABEL 08658 DC408790 606 CALLNP DONEAUTH write out AUTH and ULB 08659 FB305982 4 607 JZA ULB FNOERROR just exit if no ULB pointer 0865A DC405526 608 CALLNP FREEULB decrement use count in managers ULB 0865B FBC65982 7 609 JGEZ R7 FNOERROR no extra authorization to give away 610 * \ / 611 612 * Extra disk space is left over, try to give it away 0865C 61095114 4 5 ZBM 613 LD ULB FCB,FCLIMITPTR pointer to victim ULB 0865D DC405CED 614 CALLNP FNDMGRD search for the
manager 0865E FB305982 4 615 JZA ULB FNOERROR no one to give excess to 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1867 (ACCTDIDDLE) F 121 FREQ - Set account attribute 0865F 60895114 2 5 ZBM 616 LD R2 FCB,FCLIMITPTR get pointer to victim ULB, again 08660 60888081 2 2 ZBM 617 LD R2 R2,ULDRIVE drive volume is mounted on 08661 60A41F22 2 2 618 LD R2 VOLNTABLE(R2) again, R2 <= VOLN element 08662 DC009CE0 619 CALL GETAUTHN read in the authlist 08663 43568811 2 BASE 620 PARV2 R2,VOLNNAME pass the volume name 08664 40008743 621 PARL GIVEDSE error address on disk error 08665 FE0E866E 622 JMP DLFORGET super account doesn't need it 08666 FE0E866E 623 JMP DLFORGET no authlist, can't give it away 624 * \ / 625 626 * R3 <= Wndo1 <= Authlist, Dir locked, ULB <= ULB of manager account 627 * FCB <= .dir of victim account, R7 <= negative overflow amount 08667 6016C805 0 3 BASE 628 LD R0 R3,AUTHDSKA disk limit allocated 08668 FA2C866C 0 629 JEQMW R0 NOOVERDSK can't give anymore back 08669 1813C000 0 7 REG 630 ADD R0 R7 adjust allocated amount 0866A 54040000 0 IMM 631 MAX R0 0 don't allow negative numbers 0866B E416C805 0 3 BASE 632 ST R0 R3,AUTHDSKA update the authlist 633 * \ / 634 0000866C 635 NOOVERDSK LABEL 0866C DC405685 636 CALLNP FREEDIR release hold on managers directory 0866D DC403150 637 CALLNP GRUBWNDO1 write out the authlist 638 * \ / 639 0000866E 640 DLFORGET LABEL 0866E DC405526 641 CALLNP FREEULB decrement use count for managers ULB 0866F FE0E5982 642 JMP FNOERROR glad that is over 643 * --- 644 00008670 645 DLSUPER LABEL 08670 DC4087A0 646 CALLNP PRESETREGX R1 <= new value 08671 6447FFFF 1 IMM 647 CPR R1 -1 range check 08672 FE088745 648 JLT GIVEPOB jump if not OK 08673 60895114 2 5 ZBM 649 LD R2 FCB,FCLIMITPTR pointer to victim ULB 08674 E448A18D 1 2 ZBM 650 ST R1 R2,ULDSKLIM adjust disk limit appropriately 08675 EC13C000 7 REG 651 STZ R7 indicate no overflow amount 08676 FE0E8658 652 JMP SETDSKLX go update the directory 653 * --- 654 655 END Set DISKL limit 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1868 (ACCTDIDDLE) F 121 FREQ - Set account attribute 657 658 ********************************************************************************** 659 * * 660 * Set saved disk block limit. Regardless if setting up * 661 * or down an authorization list entry is required. However, * 662 * if we are a super account and NO authlist is present we let * 663 * this condition go by. If setting to infinite, then the * 664 * giver must have infinite and his "allocated" is set to * 665 * infinite and will never come down. Unless his authlist is * 666 * destroyed and recreated, in which case his authorized * 667 * amounts will most definitely be screwed up. * 668 * * 669 * Stack required = 21 * 670 * 0 + max ( CKPVM (4), DONEAUTH (14), FIXUPVAL (4), * 671 * FNDMGRD (16), FREEDIR (5), FREEULB (11), * 672 * GETAUTHN (12), GRUBWNDO1 (7), PRESETAUTH (21), * 673 * PRESETREGX (1) ) * 674 * * 675 ********************************************************************************** 676 677 BLOCK Set DISKS limit 678 ENTRY SETSAVL 679 00008677 680 SETSAVL LABEL 08677 DC408754 681 CALLNP CKPVM only managers may change 682 * R0 <= manager power bits, ULB <= ULB of victim account 08678 60890081 2 4 ZBM 683 LD R2 ULB,ULDRIVE drive volume is mounted on 08679 60A41F22 2 2 684 LD R2 VOLNTABLE(R2) R2 <= VOLN element 0867A DC005D0A 685 CALL PRESETAUTH find the authorization list 0867B 41520000 0 REG 686 PARV R0 power bits telling privilege over victim 0867C 42568811 2 BASE 687 PARV2L R2,VOLNNAME specific authlist entry required 0867D FE0E59CA 688 JMP FERRORDSE disk structure error 0867E FE0E59C6 689 JMP FERRORNSE authorization list not found 0867F FE0E869F 690 JMP DSSUPER super account needs no authorization 691 * \ / 692 693 * R3 <= WNDO1 <= Authlist, DIR locked, ULB <= ULB of manager account 694 * FCB <= .DIR of victim account 08680 DC4087A0 695 CALLNP PRESETREGX R1 <= new value 08681 60895114 2 5 ZBM 696 LD R2 FCB,FCLIMITPTR pointer to victim ULB 08682 DC0087A5 697 CALL FIXUPVAL update ULB and authlist 08683 4116C806 3 BASE 698 PAR R3,AUTHSDSK address of authlist pair 08684 4008818C 2 ZBM 699 PARL R2,ULDSKSAVL address of ULB limit 08685 FE0E8748 700 JMP ERRSHARE share routine 08686 E413C000 0 7 REG 701 ST R0 R7 save overflow amount 702 * \ / 703 00008687 704 SETSDSKL LABEL 08687 DC408790 705 CALLNP DONEAUTH write out AUTH and ULB 08688 FB305982 4 706 JZA ULB FNOERROR if no ULB, all finished here 08689 DC405526 707 CALLNP FREEULB release use of the managers ULB 0868A FBC65982 7 708 JGEZ R7 FNOERROR return if no extra 709 * \ / 710 711 * Extra saved disk space is left over, try to give it away 0868B 61095114 4 5 ZBM 712 LD ULB FCB,FCLIMITPTR pointer to victim ULB 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1869 (ACCTDIDDLE) F 121 FREQ - Set account attribute 0868C DC405CED 713 CALLNP FNDMGRD search for the
manager 0868D FB305982 4 714 JZA ULB FNOERROR no one to give excess to 0868E 60895114 2 5 ZBM 715 LD R2 FCB,FCLIMITPTR get pointer to victim ULB back 0868F 60888081 2 2 ZBM 716 LD R2 R2,ULDRIVE drive volume is mounted on 08690 60A41F22 2 2 717 LD R2 VOLNTABLE(R2) R2 <= VOLN element 08691 DC009CE0 718 CALL GETAUTHN read in the authlist 08692 43568811 2 BASE 719 PARV2 R2,VOLNNAME pass the volume name 08693 40008743 720 PARL GIVEDSE disk error recovery address 08694 FE0E869D 721 JMP DSFORGET super account doesn't need it 08695 FE0E869D 722 JMP DSFORGET no authlist, can't give it away 723 * \ / 724 725 * R3 <= Wndo1 <= Authlist, Dir locked, ULB <= ULB of manager account 726 * FCB <= .dir of victim account, R7 <= negative overflow amount 08696 6016C807 0 3 BASE 727 LD R0 R3,AUTHSDSKA saved disk limit allocated 08697 FA2C869B 0 728 JEQMW R0 NOOVERSDSK can't give overflow away here 08698 1813C000 0 7 REG 729 ADD R0 R7 adjust saved disk limit 08699 54040000 0 IMM 730 MAX R0 0 don't allow negative numbers 0869A E416C807 0 3 BASE 731 ST R0 R3,AUTHSDSKA update the authlist 732 * \ / 733 0000869B 734 NOOVERSDSK LABEL 0869B DC405685 735 CALLNP FREEDIR unlock managers directory 0869C DC403150 736 CALLNP GRUBWNDO1 write out the authlist 737 * \ / 738 0000869D 739 DSFORGET LABEL 0869D DC405526 740 CALLNP FREEULB decrement use count for manager ULB 0869E FE0E5982 741 JMP FNOERROR miller time! (coors time in calif) 742 * --- 743 0000869F 744 DSSUPER LABEL 0869F DC4087A0 745 CALLNP PRESETREGX R1 <= new value 086A0 6447FFFF 1 IMM 746 CPR R1 -1 range check 086A1 FE088745 747 JLT GIVEPOB jump if not OK 086A2 60895114 2 5 ZBM 748 LD R2 FCB,FCLIMITPTR pointer to victim ULB 086A3 E448818C 1 2 ZBM 749 ST R1 R2,ULDSKSAVL adjust saved disk limit appropriately 086A4 EC13C000 7 REG 750 STZ R7 indicate no overflow amount 086A5 FE0E8687 751 JMP SETSDSKL go update directory 752 * --- 753 754 END Set DISKS limit 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1870 (ACCTDIDDLE) F 121 FREQ - Set account attribute 756 757 ********************************************************************************** 758 * * 759 * Set account soft disk block limit. This is only a * 760 * warning point so it may be anything. * 761 * * 762 * Stack required = 13 * 763 * 0 + max ( CHKPVM (4), DONEULB (13), PRESETREG (1) ) * 764 * * 765 ********************************************************************************** 766 767 BLOCK Set Soft Disk Limit 768 ENTRY SETWARN 769 000086A6 770 SETWARN LABEL 086A6 DC408766 771 CALLNP CKPVMU managers or user 086A7 DC40879D 772 CALLNP PRESETREG R1 <= warning value 086A8 6447FFFF 1 IMM 773 CPR R1 -1 range check 086A9 FE0859B0 774 JLT FERRORPOB jump if not OK 086AA E449318C 1 4 ZBM 775 ST R1 ULB,ULDSKWARN set a new warn limit 086AB DC408796 776 CALLNP DONEULB write out ULB 086AC FE0E5982 777 JMP FNOERROR 778 * --- 779 780 END Set Soft Disk Limit 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1871 (ACCTDIDDLE) F 121 FREQ - Set account attribute 782 783 ********************************************************************************** 784 * * 785 * Set wall clock used - no auth so no work * 786 * * 787 * Stack required = 13 * 788 * 0 + max ( CHKPVM (4), DONEULB (13), PRESETREG (1) ) * 789 * * 790 ********************************************************************************** 791 792 BLOCK Set Wall Clock Used 793 ENTRY SETWLCKU 794 000086AD 795 SETWLCKU LABEL 086AD DC408754 796 CALLNP CKPVM only MANAGER 086AE DC40879D 797 CALLNP PRESETREG get user specified value 086AF 6857080B 1 4 BASE 798 UCPR R1 ULB,ULWLCKUSD compare to what it is now 086B0 FE0459B0 799 JGT FERRORPOB don't let them set it higher or negative 086B1 E457080B 1 4 BASE 800 ST R1 ULB,ULWLCKUSD reduce the used amount 086B2 DC408796 801 CALLNP DONEULB write out ULB 086B3 FE0E5982 802 JMP FNOERROR 803 * --- 804 805 END Set Wall Clock Used 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1872 (ACCTDIDDLE) F 121 FREQ - Set account attribute 807 808 ********************************************************************************** 809 * * 810 * Set wall clock limit * 811 * * 812 * Stack required = 13 * 813 * 0 + max ( CHKPVM (4), DONEULB (13), PRESETREG (1) ) * 814 * * 815 ********************************************************************************** 816 817 BLOCK Set Wall Clock Limit 818 ENTRY SETWLCKL 819 000086B4 820 SETWLCKL LABEL 086B4 DC408754 821 CALLNP CKPVM only MANAGER 086B5 DC40879D 822 CALLNP PRESETREG get the value to set 086B6 6447FFFF 1 IMM 823 CPR R1 -1 range check 086B7 FE0859B0 824 JLT FERRORPOB jump if not OK 086B8 E457080A 1 4 BASE 825 ST R1 ULB,ULWLCKLIM no special checking 086B9 DC408796 826 CALLNP DONEULB write out ULB 086BA FE0E5982 827 JMP FNOERROR done 828 * --- 829 830 END Set Wall Clock Limit 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1873 (ACCTDIDDLE) F 121 FREQ - Set account attribute 832 833 ********************************************************************************** 834 * * 835 * Set subsystem control flags * 836 * * 837 * Stack required = 8 * 838 * 0 + max ( CHKPVM (4), DONEDIR (8), PRESETDIR (8), * 839 * PRESETREG (1) ) * 840 * * 841 ********************************************************************************** 842 843 BLOCK Set Subsystem Control Flags 844 ENTRY SETSSCF 845 000086BB 846 SETSSCF LABEL 086BB DC408766 847 CALLNP CKPVMU manager or user 086BC DC40877C 848 CALLNP PRESETDIR access to directory 086BD DC40879D 849 CALLNP PRESETREG get caller's registers 086BE E456C81F 1 3 BASE 850 ST R1 R3,UDSFLAGS store raw value 086BF DC40878C 851 CALLNP DONEDIR finish the job 086C0 FE0E5982 852 JMP FNOERROR done 853 * --- 854 855 END Set Subsystem Control Flags 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1874 (ACCTDIDDLE) F 121 FREQ - Set account attribute 857 858 ********************************************************************************** 859 * * 860 * Set file access control. User may set, manager may * 861 * clear. * 862 * * 863 * Stack required = 13 * 864 * 0 + max ( CHKPVM (4), DONEULB (13), PRESETREG (1) ) * 865 * * 866 ********************************************************************************** 867 868 BLOCK Set FAC/PAC access 869 ENTRY SETFAC 870 ENTRY SETPWA 871 000086C1 872 SETFAC LABEL 086C1 39C90047 7 4 ZBM 873 LEA R7 ULB,ULFACCESS 874 * \ / 875 000086C2 876 SETFPSHR LABEL 086C2 DC408766 877 CALLNP CKPVMU MANAGER or user 086C3 DC40879D 878 CALLNP PRESETREG get new value to set 879 * R0 <= manager power bits, R1 <= new parameter, R7 <= pointer to ULB field 086C4 F63E86D5 0 880 JBT R0/CCBALWFRC SETFPNOW jump if manager.!!! requester 086C5 60800414 2 881 LD R2 CPCUPC get the current UPC pointer 086C6 5C088C10 2 ZBM 882 CMZ R2,UPBACKUP is requester backup 086C7 FE0286D5 883 JEQ SETFPNOW if so, just set field without questions 086C8 5C088A10 2 ZBM 884 CMZ R2,UPMANAGR a manager requesting? 086C9 FE0286CC 885 JEQ SETFACM jump if so 886 * \ / 887 000086CA 888 SETFACU LABEL 086CA FC57C400 1 7 @R 889 IORM R1 @R7 a user may set 086CB FE0E86D3 890 JMP SETFACX continue 891 * --- 892 000086CC 893 SETFACM LABEL 086CC F63686CA 0 894 JBT R0/CCBUSRFRC SETFACU jump if manager doing himself 086CD E4169001 0 2 REG 895 ST R0 R2+1 R2 := R0 - 1 086CE 28920000 2 0 REG 896 BSUB R2 R0 R2 := mask of bits above ours 086CF 7487FFFF 2 IMM 897 XOR R2 ONEBITS R2 := mask or bits at and below 086D0 7447FFFF 1 IMM 898 XOR R1 ONEBITS R1 = ones for bits to clear 086D1 78924000 2 1 REG 899 AND R2 R1 R2 = bits the manager may clear 086D2 A897C400 2 7 @R 900 BRSBM R2 @R7 clear any bits that might be allowed 901 * \ / 902 000086D3 903 SETFACX LABEL 086D3 DC408796 904 CALLNP DONEULB write out ULB 086D4 FE0E5982 905 JMP FNOERROR all done 906 * --- 907 000086D5 908 SETFPNOW LABEL 086D5 E457C400 1 7 @R 909 ST R1 @R7 set to bit specified 086D6 FE0E86D3 910 JMP SETFACX make changes permanent 911 * --- 912 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1875 (ACCTDIDDLE) F 121 FREQ - Set account attribute 913 ********************************************************************************** 914 * * 915 * Set password access. User may set, manager may clear * 916 * * 917 * Stack required = 13 * 918 * 0 + max ( CHKPVM (4), DONEULB (13), PRESETREG (1) ) * 919 * * 920 ********************************************************************************** 921 000086D7 922 SETPWA LABEL 086D7 39C90847 7 4 ZBM 923 LEA R7 ULB,ULPACCESS R7 => field to change 086D8 FE0E86C2 924 JMP SETFPSHR share code 925 * --- 926 927 END Set FAC/PAC Access 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1876 (ACCTDIDDLE) F 121 FREQ - Set account attribute 929 930 ********************************************************************************** 931 * * 932 * Set accounting control * 933 * * 934 * Stack required = 13 * 935 * 0 + max ( ACCESSMASK (6), CKPVMU (4), DONEULB (13), * 936 * PRESETREG (1) ) * 937 * * 938 ********************************************************************************** 939 940 BLOCK Set Accounting Control 941 ENTRY SETACC 942 000086D9 943 SETACC LABEL 086D9 DC408766 944 CALLNP CKPVMU user or MANAGER 086DA DC40879D 945 CALLNP PRESETREG get caller's regs 086DB DC005BBA 946 CALL ACCESSMASK change what bits we can 086DC 41524000 1 REG 947 PARV R1 pass caller's R1 086DD 40091A57 4 ZBM 948 PARL ULB,ULLOGSPOT 086DE DC408796 949 CALLNP DONEULB write out the ULB 086DF FE0E5982 950 JMP FNOERROR all done 951 * --- 952 953 END Set Accounting Control 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1877 (ACCTDIDDLE) F 121 FREQ - Set account attribute 955 956 ********************************************************************************** 957 * * 958 * Set account default restrictions * 959 * * 960 * Stack required = 8 * 961 * 0 + max ( CHKPVMU (4), DONEDIR (8), PRESETDIR (8), * 962 * PRESETREG (1) ) * 963 * * 964 ********************************************************************************** 965 966 BLOCK Set Default Restrictions 967 ENTRY SETDRST 968 000086E0 969 SETDRST LABEL 086E0 DC408766 970 CALLNP CKPVMU MANAGER or user 086E1 DC40879D 971 CALLNP PRESETREG get user's regs 086E2 E4490056 1 4 ZBM 972 ST R1 ULB,ULRWORD/XREQRSTR set the new restrictions 086E3 DC408796 973 CALLNP DONEULB write out dir 086E4 FE0E5982 974 JMP FNOERROR all done 975 * --- 976 977 END Set Default Restrictions 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1878 (ACCTDIDDLE) F 121 FREQ - Set account attribute 979 980 ********************************************************************************** 981 * * 982 * Set account initial program. Note that if the caller * 983 * failed to specify an account name we will provide one for * 984 * him. * 985 * * 986 * Stack required = 8 * 987 * 0 + max ( CHKPVM (4), DONEDIR (8), PRESETDIR (8), * 988 * PRESETREG (1), SETMEMTRAP (1) ) * 989 * * 990 ********************************************************************************** 991 992 BLOCK Set Initial Logon Program 993 ENTRY SETLOP 994 000086E5 995 SETLOP LABEL 086E5 DC408754 996 CALLNP CKPVM MANAGER only 086E6 DC40877C 997 CALLNP PRESETDIR get directory in 086E7 DC40879D 998 CALLNP PRESETREG get address and length 086E8 DC005BCF 999 CALL SETMEMTRAP catch user memory errors 086E9 4000874F 1000 PARL USERMEMBAD address of cleanup code 086EA 60168803 0 2 BASE 1001 LD R0 R2,CAR1 R0 => source address 086EB 60440028 1 IMM 1002 LD R1 2*EQELSIZE*CPW characters to move 086EC 5C08B211 2 ZBM 1003 CMZ R2,CAMSR/MSRFRELOCB check callers relocation 086ED FE0C86EF 1004 JNE MONSTORIN jump if monitor 086EE 59840040 IMM 1005 CLBMSR MSRFRELOC set fetch relocation to user 1006 * \ / 1007 000086EF 1008 MONSTORIN LABEL 086EF 3896C80B 2 3 BASE 1009 LEA R2 R3,UDHPRAC R2 => destination 086F0 FE400000 1010 CMOVE move new name in 086F1 59C40040 IMM 1011 IORMSR MSRFRELOC restore fetch relocation to monitor 086F2 5E16C80B 3 BASE 1012 CMZ2 R3,UDHPRAC check if account name specified 086F3 FE0C86FB 1013 JNE ACCTSPECF jump if something there 086F4 6016C80D 0 3 BASE 1014 LD R0 R3,UDHPRACP fetch project name user gave 086F5 FA0286F7 0 1015 JEQZ R0 DEFLTACCT if zero, account not specified 086F6 FA2E86FB 0 1016 JNEMW R0 ACCTSPECF jump if project acceptable 1017 * \ / 1018 000086F7 1019 DEFLTACCT LABEL 086F7 62170802 014 BASE 1020 LD2 R0 ULB,ULACCNM get victim account name 086F8 E616C80B 013 BASE 1021 ST2 R0 R3,UDHPRAC set hello account name 086F9 60170804 0 4 BASE 1022 LD R0 ULB,ULACCPROJ get victim project name 086FA E416C80D 0 3 BASE 1023 ST R0 R3,UDHPRACP and set into hello name 1024 * \ / 1025 000086FB 1026 ACCTSPECF LABEL 086FB DC40878C 1027 CALLNP DONEDIR write out the dir 086FC FE0E5982 1028 JMP FNOERROR 1029 * --- 1030 1031 END Set Initial Logon Program 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1879 (ACCTDIDDLE) F 121 FREQ - Set account attribute 1033 1034 ********************************************************************************** 1035 * * 1036 * Set account title * 1037 * * 1038 * Stack required = 8 * 1039 * 0 + max ( CHKPVM (4), DONEDIR (8), PRESETDIR (8), * 1040 * PRESETREG (1), SETMEMTRAP (1) ) * 1041 * * 1042 ********************************************************************************** 1043 1044 BLOCK Set Account Title 1045 ENTRY SETTIT 1046 000086FD 1047 SETTIT LABEL 086FD DC408754 1048 CALLNP CKPVM MANAGER only 086FE DC40877C 1049 CALLNP PRESETDIR get access of directory 086FF DC40879D 1050 CALLNP PRESETREG 08700 DC005BCF 1051 CALL SETMEMTRAP 08701 4000874F 1052 PARL USERMEMBAD 08702 60568803 1 2 BASE 1053 LD R1 R2,CAR1 get the users register 08703 68440048 1 IMM 1054 UCPR R1 UDTITLEL is the string small enough? 08704 FE0A8706 1055 JLE USEGIVEN jump if so 08705 60440048 1 IMM 1056 LD R1 UDTITLEL use the maximum length 00008706 1057 USEGIVEN LABEL 08706 60168804 0 2 BASE 1058 LD R0 R2,CAR2 R0 => string source 08707 5C08B211 2 ZBM 1059 CMZ R2,CAMSR/MSRFRELOCB user reference? 08708 FE0C870A 1060 JNE MONSTORINX jump if not 08709 59840040 IMM 1061 CLBMSR MSRFRELOC port to user 0000870A 1062 MONSTORINX LABEL 0870A 3896C84E 2 3 BASE 1063 LEA R2 R3,UDTITLE R3 => place to put title 0870B 60D24000 3 1 REG 1064 LD R3 R1 remember amount moved 0870C FE400000 1065 CMOVE move the title 0870D 59C40040 IMM 1066 IORMSR MSRFRELOC back to the system relocation 1067 * \ / 0870E 6052C000 1 3 REG 1068 LD R1 R3 0870F 30440048 1 IMM 1069 RSB R1 UDTITLEL R1 => characters not diddled 08710 FA4A8712 1 1070 JLEZ R1 SETTITX jump if nothing to pad 08711 FE580000 1071 CFILL 0 fill remainder with nulls 00008712 1072 SETTITX LABEL 08712 DC40878C 1073 CALLNP DONEDIR write out dir 08713 FE0E5982 1074 JMP FNOERROR 1075 * --- 1076 1077 END Set Account Title 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1880 (ACCTDIDDLE) F 121 FREQ - Set account attribute 1079 1080 ********************************************************************************** 1081 * * 1082 * Set logon password. Check to see if he knows what it * 1083 * was. * 1084 * * 1085 * Stack required = 12 * 1086 * 4 + max ( CHKPVMU (4), DONEDIR (8), FREEDIR (5), * 1087 * GRUBWNDO1 (7), PRESETDIR (8), PRESETREG (1), * 1088 * PWMANGLE (3), SETMEMTRAP (1) ) * 1089 * * 1090 ********************************************************************************** 1091 1092 BLOCK Set Logon Password 1093 ENTRY SETLOPW 1094 1095 BEGFRAME2 00178800 6 BASE 1096 OLDPASSWD BSS 2 old password 00178802 6 BASE 1097 NEWPASSWD BSS 2 new password 1098 ENDFRAME 1099 00008714 1100 SETLOPW LABEL 08714 EC1F8004 6 STAK 1101 STZ PUSH allocate stack frame 08715 DC408766 1102 CALLNP CKPVMU user or MANAGER 08716 DC40877C 1103 CALLNP PRESETDIR get directory in 08717 DC40879D 1104 CALLNP PRESETREG get user value 08718 60D24000 3 1 REG 1105 LD R3 R1 R3 => pointer to password parameters 08719 DC005BCF 1106 CALL SETMEMTRAP catch user memory errors 0871A 4000874F 1107 PARL USERMEMBAD error recovery address 0871B 5C08B211 2 ZBM 1108 CMZ R2,CAMSR/MSRFRELOCB check callers relocation 0871C FE0C871E 1109 JNE GETFROMMON jump if monitor 0871D 59840040 IMM 1110 CLBMSR MSRFRELOC set relocation to user space 1111 * \ / 1112 0000871E 1113 GETFROMMON LABEL 0871E 6216C800 013 BASE 1114 LD2 R0 R3,0 get the old password 0871F E6178800 016 BASE 1115 ST2 R0 SP,OLDPASSWD save on the stack 08720 6216C802 013 BASE 1116 LD2 R0 R3,2 get the new password 08721 E6178802 016 BASE 1117 ST2 R0 SP,NEWPASSWD save on the stack 08722 59C40040 IMM 1118 IORMSR MSRFRELOC fetching back to monitor space 08723 60800414 2 1119 LD R2 CPCUPC get the current UPC pointer 08724 5C088C10 2 ZBM 1120 CMZ R2,UPBACKUP is the requester BACKUP 08725 FE02872E 1121 JEQ SETNEWPW if so, he doesn't need the old one 08726 5C088A10 2 ZBM 1122 CMZ R2,UPMANAGR is this a manager? 08727 FE02872E 1123 JEQ SETNEWPW if so, he doesn't need the old one either 08728 62978800 236 BASE 1124 LD2 R2 SP,OLDPASSWD get the old password 08729 DC005872 1125 CALL PWMANGLE mangle the given PW 0872A 43170802 4 BASE 1126 PAR2 ULB,ULACCNM pass the parameter (account) 0872B 42548000 23 PAIR 1127 PARV2L PAIR R2 pass the old password 0872C 66000803 01 1128 CPR2 R0 WNDO1(UDPASS) is this the old password? 0872D FE0C8736 1129 JNE NONEWPW jump if he didn't know it 1130 * \ / 1131 0000872E 1132 SETNEWPW LABEL 0872E 62978802 236 BASE 1133 LD2 R2 SP,NEWPASSWD get the new password 0872F DC005872 1134 CALL PWMANGLE mangle the new password 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1881 (ACCTDIDDLE) F 121 FREQ - Set account attribute 08730 43170802 4 BASE 1135 PAR2 ULB,ULACCNM pass the parameter (account) 08731 42548000 23 PAIR 1136 PARV2L PAIR R2 do it to the new password 08732 E6000803 01 1137 ST2 R0 WNDO1(UDPASS) set the new password 08733 EE178802 6 BASE 1138 STZ2 SP,NEWPASSWD I'm a purist, zap sensitive residue 08734 DC40878C 1139 CALLNP DONEDIR write out directory 08735 FE0E5982 1140 JMP FNOERROR label speaks for itself 1141 * --- 1142 1143 * The requester doesn't know the old password 1144 00008736 1145 NONEWPW LABEL 08736 DC405685 1146 CALLNP FREEDIR release access to directory 08737 DC403150 1147 CALLNP GRUBWNDO1 release window with directory 08738 60040096 0 IMM 1148 LD R0 XREQERPWW password wrong 08739 FE0E5983 1149 JMP FERROR inform requester 1150 * --- 1151 1152 END Set Logon Password 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1882 (ACCTDIDDLE) F 121 FREQ - Set account attribute 1154 1155 ********************************************************************************** 1156 * * 1157 * Set or clear the 'encryption for backup' flag. If the * 1158 * user passed a zero, the flag is cleared, else it is set. * 1159 * * 1160 * Stack required = 8 * 1161 * 0 + max ( CHKPVM (4), DONEDIR (8), PRESETDIR (8), * 1162 * PRESETREG (1) ) * 1163 * * 1164 ********************************************************************************** 1165 1166 BLOCK Set Encryption Flag 1167 ENTRY SETENCR 1168 0000873A 1169 SETENCR LABEL 0873A DC408754 1170 CALLNP CKPVM must be manager 0873B DC40877C 1171 CALLNP PRESETDIR get the directory in 0873C DC40879D 1172 CALLNP PRESETREG load useful registers 0873D 6040081F 1 1173 LD R1 WNDO1(UDSFLAGS) get the flag word 0873E 5C168803 2 BASE 1174 CMZ R2,CAR1 is users flag zero? 0873F ED8A4010 1 CBM 1175 STLNE R1/UDENCRFLG if non-zero, store 1, else store 0 08740 E440081F 1 1176 ST R1 WNDO1(UDSFLAGS) put back the updated flag word 08741 DC40878C 1177 CALLNP DONEDIR release the directory 08742 FE0E5982 1178 JMP FNOERROR give happy return 1179 * --- 1180 1181 END Set Encryption Flag 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1883 (ACCTDIDDLE) F 121 FREQ - Set account attribute 1183 1184 ********************************************************************************** 1185 * * 1186 * The following are the generic error recovery routines. * 1187 * * 1188 ********************************************************************************** 1189 1190 * Disk structure error 1191 00008743 1192 GIVEDSE LABEL 08743 6004009F 0 IMM 1193 LD R0 XREQERDSE 'disk structure error' 08744 FE0E8748 1194 JMP ERRSHARE share code 1195 * --- 1196 1197 * The setting parameter is out of line 1198 00008745 1199 GIVEPOB LABEL 08745 60040082 0 IMM 1200 LD R0 XREQERPOB 'parameter out of bounds' 08746 FE0E8748 1201 JMP ERRSHARE share code 1202 * --- 1203 1204 * Insufficient authorization to do change 1205 00008747 1206 GIVEINSA LABEL 08747 600400A7 0 IMM 1207 LD R0 XREQERIAUT 'insufficient authorization' 1208 * \ / 1209 00008748 1210 ERRSHARE LABEL 08748 E413C000 0 7 REG 1211 ST R0 R7 save away error code 08749 FAF0874C 3 1212 JZA R3 NOAUTHMAP jump if no authlist mapped 0874A DC405685 1213 CALLNP FREEDIR allow other access to the directory 0874B DC403150 1214 CALLNP GRUBWNDO1 release mapping to window 1215 * \ / 1216 0000874C 1217 NOAUTHMAP LABEL 0874C FB305997 4 1218 JZA ULB FERROR7 no need to free ULB 0874D DC405526 1219 CALLNP FREEULB decrement use count on manager ULB 0874E FE0E5997 1220 JMP FERROR7 go inform requester of the problem 1221 * --- 1222 1223 * The user's memory went bad. Return the error to the user. 1224 0000874F 1225 USERMEMBAD LABEL 0874F E61F8002 016 STAK 1226 ST2 R0 STAK SP,2 save the error codes 08750 DC405685 1227 CALLNP FREEDIR done with the directory 08751 DC403150 1228 CALLNP GRUBWNDO1 release the dir block 08752 621F8002 016 STAK 1229 LD2 R0 STAK SP,2 get the error codes back 08753 FE0E5B5F 1230 JMP PASSERRUP pass the error on 1231 * --- 1232 1233 END FREQSACCT and FREQSACCT2 routines 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1884 (ACCTDIDDLE) F 121 FREQ - Set account attribute 1235 1236 ********************************************************************************** 1237 * * 1238 * CKPVM. Check for requester being a MANAGER. This * 1239 * routine exits directly to FERRORPNS if requester is not * 1240 * a MANAGER. * 1241 * Call: * 1242 * LD R3 => PSA of requester * 1243 * LD ULB => ULB of file's owner * 1244 * CALLNP CKPVM * 1245 * * 1246 * * 1247 * Eats R0:R2 * 1248 * Stack required = 4. * 1249 * 1 + max ( LEVELBIT (3) ) * 1250 * * 1251 ********************************************************************************** 1252 1253 BLOCK CKPVM subroutine 1254 ENTRY CKPVM 1255 1256 BEGFRAME 1257 ENDFRAME 1258 08754 DD5F8001 6 STAK 1259 CKPVM ENTRNP PUSH 08755 6088C116 2 3 ZBM 1260 LD R2 R3,PSCURRPROC get pointer to current UPC 08756 5C088C10 2 ZBM 1261 CMZ R2,UPBACKUP is requester BACKUP? 08757 FE028764 1262 JEQ CKPVMBKUP jump if so 08758 5C088A10 2 ZBM 1263 CMZ R2,UPMANAGR requester a MANAGER? 08759 FE0C8762 1264 JNE CKPVME jump if not 0875A 60889F13 2 2 ZBM 1265 LD R2 R2,UPCPRIVULB get privileged ULB 1266 * \ / 1267 0000875B 1268 CKPVMMGR LABEL 0875B DC005B84 1269 CALL LEVELBIT a MANAGER of this acct? 0875C 41528000 2 REG 1270 PARV R2 => ULB of requester 0875D 40530000 4 REG 1271 PARVL ULB => ULB of file owner 0875E FA028762 0 1272 JEQZ R0 CKPVME jump if no privileges at all 0875F F2368763 0 1273 JBF R0/CCBUSRFRC CKPVMX jump if not diddling self 08760 F63C8763 0 1274 JBT R0/CCBOWNFRC CKPVMX allow manager.sys to diddle self 08761 F63E8763 0 1275 JBT R0/CCBALWFRC CKPVMX allow manager.!!! to diddle self 1276 * \ / 1277 00008762 1278 CKPVME LABEL 08762 61C459C8 7 IMM 1279 LD R7 ADR FERRORPNS place to give error 1280 * \ / 1281 00008763 1282 CKPVMX LABEL 08763 5D1F8001 6 STAK 1283 LEAVE POP 1284 * --- 1285 00008764 1286 CKPVMBKUP LABEL 08764 6088DF13 2 3 ZBM 1287 LD R2 R3,PSUSERLIMP logon ULB 08765 FE0E875B 1288 JMP CKPVMMGR check manager privilege 1289 * --- 1290 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1885 (ACCTDIDDLE) F 121 FREQ - Set account attribute 1291 END CKPVM subroutine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1886 (ACCTDIDDLE) F 121 FREQ - Set account attribute 1293 1294 ********************************************************************************** 1295 * * 1296 * CKPVMU. Check for requester either being a MANAGER * 1297 * of this account (if he has PW access) or the user himself. * 1298 * This routine exits directly to FERRORPNS if requester has * 1299 * no privilege. * 1300 * Call: * 1301 * LD R3 => PSA of requester * 1302 * LD ULB => ULB of .DIR being accessed * 1303 * LD FCB => FCB of .DIR being accessed * 1304 * CALLNP CKPVMU * 1305 * * 1306 * * 1307 * Eats R0:R2 * 1308 * Stack required = 4. * 1309 * 1 + max ( LEVELBIT (3), PRIV2MACCT (1) ) * 1310 * * 1311 ********************************************************************************** 1312 1313 BLOCK CKPVMU subroutine 1314 ENTRY CKPVMU 1315 1316 BEGFRAME 1317 ENDFRAME 1318 08766 DD5F8001 6 STAK 1319 CKPVMU ENTRNP PUSH 08767 6088C116 2 3 ZBM 1320 LD R2 R3,PSCURRPROC get pointer to UPC 08768 5C088C10 2 ZBM 1321 CMZ R2,UPBACKUP is requester backup? 08769 FE028774 1322 JEQ CKPVMUBKUP jump if so 0876A 5C088A10 2 ZBM 1323 CMZ R2,UPMANAGR is requester a manager? 0876B FE0C8776 1324 JNE SELFCHECK see if self if not 0876C 60889F13 2 2 ZBM 1325 LD R2 R2,UPCPRIVULB use privilege ULB 1326 * \ / 1327 0000876D 1328 CKPVMUMGR LABEL 0876D DC005B84 1329 CALL LEVELBIT a manager of this account? 0876E 41528000 2 REG 1330 PARV R2 => ULB of requester 0876F 40530000 4 REG 1331 PARVL ULB => ULB of file owner 08770 F6368776 0 1332 JBT R0/CCBUSRFRC SELFCHECK jump if checking self (or shadow) 08771 78090847 0 4 ZBM 1333 AND R0 ULB,ULPACCESS do we have this type of access? 08772 FA02877A 0 1334 JEQZ R0 NOTMINE jump if we are not the proper manager 08773 FE0E877B 1335 JMP CKPVMUX he may do it. 1336 * --- 1337 00008774 1338 CKPVMUBKUP LABEL 08774 6088DF13 2 3 ZBM 1339 LD R2 R3,PSUSERLIMP get logon ULB 08775 FE0E876D 1340 JMP CKPVMUMGR continue with manager check 1341 * --- 1342 1343 * non-manager looking, must be self or have privilege 00008776 1344 SELFCHECK LABEL 08776 6508DF13 4 3 ZBM 1345 CPR ULB R3,PSUSERLIMP looking at self? 08777 FE02877B 1346 JEQ CKPVMUX OK if so 08778 DC005C07 1347 CALL PRIV2MACCT enough privilege over account? 08779 40494E45 5 ZBM 1348 PARVL FCB,FCPRIV privilege over dir 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1887 (ACCTDIDDLE) F 121 FREQ - Set account attribute 0877A 61C459C8 7 IMM 1349 NOTMINE LD R7 ADR FERRORPNS place to go on error 1350 * \ / 1351 0000877B 1352 CKPVMUX LABEL 0877B 5D1F8001 6 STAK 1353 LEAVE POP return 1354 * --- 1355 1356 END CKPVMU subroutine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1888 (ACCTDIDDLE) F 121 FREQ - Set account attribute 1358 1359 ********************************************************************************** 1360 * * 1361 * PRESETDIR. Get access to directory and map the * 1362 * directory block into window 1. We get write access to the * 1363 * directory block, lock the block in, and set the disk error * 1364 * address to DISKBURP. * 1365 * Call: * 1366 * LD ULB <= file's ULB * 1367 * LD FCB <= directory FCB * 1368 * CALLNP PRESETDIR * 1369 * ST R3 <= first word of directory block. * 1370 * * 1371 * Eats R0:R3. * 1372 * Stack required = 8. * 1373 * 1 + max ( FETCHDIR (1), FREEDIR (5), GRUBWNDO1 (7), * 1374 * MAPOUTFBI (2), SETWNDO1 (4) ) * 1375 * * 1376 ********************************************************************************** 1377 1378 BLOCK PRESETDIR subroutine 1379 ENTRY PRESETDIR 1380 1381 BEGFRAME 1382 ENDFRAME 1383 0877C DD5F8001 6 STAK 1384 PRESETDIR ENTRNP PUSH 0877D DC405667 1385 CALLNP FETCHDIR get access to directory 0877E DC003205 1386 CALL SETWNDO1 map the disk block in 0877F 41440002 IMM 1387 PARV VPCNTLW+VPCNTLLK writable and locked 08780 41534000 5 REG 1388 PARV FCB lun being mapped from 08781 41008787 1389 PAR DISKBURP where to go on disk errors 08782 41570801 4 BASE 1390 PARV ULB,ULBLOCK disk block to read in 08783 40440009 IMM 1391 PARVL FBITUDIR1 block must be a directory 08784 DC40261B 1392 CALLNP MAPOUTFBI unmap FBI, ION 08785 60C40800 3 IMM 1393 LD R3 ADR WNDO1 R3 => first word of block 08786 5D1F8001 6 STAK 1394 LEAVE POP 1395 * --- 1396 00008787 1397 DISKBURP LABEL 08787 DC40261B 1398 CALLNP MAPOUTFBI unmap FBI, ION 08788 61095114 4 5 ZBM 1399 LD ULB FCB,FCLIMITPTR make sure we have right ULB pointer 08789 DC405685 1400 CALLNP FREEDIR free the directory 0878A DC403150 1401 CALLNP GRUBWNDO1 grub the directory block 0878B FE0E59CA 1402 JMP FERRORDSE and claim a disk error 1403 * --- 1404 1405 END PRESETDIR subroutine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1889 (ACCTDIDDLE) F 121 FREQ - Set account attribute 1407 1408 ********************************************************************************** 1409 * * 1410 * DONEDIR. Undoes work done by PRESETDIR. The directory * 1411 * is written out and access is released. Note that the UDIR1 * 1412 * block is expected to be mapped into WNDO1. * 1413 * Call: * 1414 * LD ULB => ULB for directory page * 1415 * CALLNP DONEDIR * 1416 * * 1417 * Eats R0:R3 * 1418 * Stack required = 8. * 1419 * 1 + max ( FREEDIR (5), GRUBWNDO1 (7) ) * 1420 * * 1421 ********************************************************************************** 1422 1423 BLOCK DONEDIR subroutine 1424 ENTRY DONEDIR 1425 1426 BEGFRAME 1427 ENDFRAME 1428 0878C DD5F8001 6 STAK 1429 DONEDIR ENTRNP PUSH 0878D DC405685 1430 CALLNP FREEDIR 0878E DC403150 1431 CALLNP GRUBWNDO1 0878F 5D1F8001 6 STAK 1432 LEAVE POP 1433 * --- 1434 1435 END DONEDIR subroutine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1890 (ACCTDIDDLE) F 121 FREQ - Set account attribute 1437 1438 ********************************************************************************** 1439 * * 1440 * DONEAUTH. Routine that releases access fetched by * 1441 * PRESETAUTH. If R3 sez auth list fetched, it is written out * 1442 * and the directory is released. Then the ULB is written out. * 1443 * Call: * 1444 * LD R3 <= 0 if no auth, * 1445 * > 0 if auth block in WINDO1, dir locked * 1446 * CALLNP DONEAUTH * 1447 * * 1448 * Eats R0:R4. * 1449 * Stack required = 14 * 1450 * 1 + max ( DONEULB (13), FREEDIR (5), GRUBWNDO1 (7) ) * 1451 * * 1452 ********************************************************************************** 1453 1454 BLOCK DONEAUTH subroutine 1455 ENTRY DONEAUTH 1456 1457 BEGFRAME 1458 ENDFRAME 1459 08790 DD5F8001 6 STAK 1460 DONEAUTH ENTRNP PUSH 08791 FAC28794 3 1461 JEQZ R3 DONEAUTHE jump if no auth list 08792 DC405685 1462 CALLNP FREEDIR give others access to the directory 08793 DC403150 1463 CALLNP GRUBWNDO1 release mapping of window 1464 * \ / 1465 00008794 1466 DONEAUTHE LABEL 08794 DC408796 1467 CALLNP DONEULB write out the ULB 08795 5D1F8001 6 STAK 1468 LEAVE POP 1469 * --- 1470 1471 END DONEAUTH subroutine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1891 (ACCTDIDDLE) F 121 FREQ - Set account attribute 1473 1474 ********************************************************************************** 1475 * * 1476 * DONEULB. When done with ULB of acct being modified, * 1477 * this will cause it to be written out. * 1478 * Call: * 1479 * LD FCB => FCB of DIR of acct being modified * 1480 * CALLNP DONEULB * 1481 * * 1482 * Eats R0:R4. * 1483 * Stack required = 13 * 1484 * 2 + max ( FREEULBC (11), USEULB (4) ) * 1485 * * 1486 ********************************************************************************** 1487 1488 BLOCK DONEULB subroutine 1489 ENTRY DONEULB 1490 1491 BEGFRAME 00178801 6 BASE 1492 STOREULB BSS 1 place to save ULB pointer 1493 ENDFRAME 1494 08796 DD5F8002 6 STAK 1495 DONEULB ENTRNP PUSH 08797 E5178801 4 6 BASE 1496 ST ULB SP,STOREULB save passed ULB 08798 61095114 4 5 ZBM 1497 LD ULB FCB,FCLIMITPTR gets pointer to acct's ULB 08799 DC405569 1498 CALLNP USEULB make an access to the ULB 0879A DC405566 1499 CALLNP FREEULBC free access and write it out 0879B 61178801 4 6 BASE 1500 LD ULB SP,STOREULB restore passed ULB 0879C 5D1F8002 6 STAK 1501 LEAVE POP 1502 * --- 1503 1504 END DONEULB subroutine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1892 (ACCTDIDDLE) F 121 FREQ - Set account attribute 1506 1507 ********************************************************************************** 1508 * * 1509 * PRESETREG. Loads registers with very useful stuff. * 1510 * Call: * 1511 * LD FCB <= FCB of DIR for acct to modify * 1512 * CALLNP PRESETREG/PRESETREGX * 1513 * ST R1 <= new parameter value * 1514 * ST R2 <= caller's registers * 1515 * ST ULB <= ULB of victim account/or unmodified * 1516 * * 1517 * Sets R1 & R2 as above. Gets no other registers. * 1518 * Stack required = 1. * 1519 * * 1520 ********************************************************************************** 1521 1522 BLOCK PRESETREG/PRESETREGX subroutines 1523 ENTRY PRESETREG 1524 ENTRY PRESETREGX 1525 1526 BEGFRAME 1527 ENDFRAME 1528 0879D DD5F8001 6 STAK 1529 PRESETREG ENTRNP PUSH 0879E 61095114 4 5 ZBM 1530 LD ULB FCB,FCLIMITPTR ULB where file saved 0879F FE0E87A1 1531 JMP PSRSHARE go share code 1532 * --- 1533 087A0 DD5F8001 6 STAK 1534 PRESETREGX ENTRNP PUSH 000087A1 1535 PSRSHARE LABEL 087A1 60800412 2 1536 LD R2 CPPSA current session 087A2 60889F11 2 2 ZBM 1537 LD R2 R2,PSCACHNP1 R2 => caller's registers 087A3 60568803 1 2 BASE 1538 LD R1 R2,CAR1 R1 => value to set. 087A4 5D1F8001 6 STAK 1539 LEAVE POP return 1540 * --- 1541 1542 END PRESETREG/PRESETREGX subroutines 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1893 (ACCTDIDDLE) F 121 FREQ - Set account attribute 1544 1545 ********************************************************************************** 1546 * * 1547 * FIXUPVAL. This routine is used to update the ULB and * 1548 * manager authorization list given a new value to set. It * 1549 * does checking to see that the new value does not exceed the * 1550 * managers authorization. And as an added bonus, any * 1551 * overflow amount is return in a register. * 1552 * Call: * 1553 * * 1554 * LD R1 <= new value to set * 1555 * CALL FIXUPVAL * 1556 * PAR * 1557 * PARL * 1558 * JMP R0 <= error code * 1559 * ST R0 negative overflow amount * 1560 * * 1561 * Eats R0:R2 * 1562 * Stack required = 4 * 1563 * * 1564 ********************************************************************************** 1565 1566 BLOCK FIXUPVAL subroutine 1567 ENTRY FIXUPVAL 1568 1569 BEGFRAME 00178801 6 BASE 1570 SAVEREG BSS 1 place to save a register 00178802 6 BASE 1571 ULBLIMIT BSS 1 pointer to ULB field 00178803 6 BASE 1572 OVERFLOW BSS 1 overflow amount, if any 1573 ENDFRAME 1574 087A5 DD1F8004 6 STAK 1575 FIXUPVAL ENTR PUSH 087A6 E4D78801 3 6 BASE 1576 ST R3 SP,SAVEREG save R3 before anything is done 087A7 C112C000 3 REG 1577 STP R3 address of authlist pair 087A8 C0178802 6 BASE 1578 STPL SP,ULBLIMIT save pointer to ULB limit 087A9 EC178803 6 BASE 1579 STZ SP,OVERFLOW indicate no overflow amount 1580 * \ / 1581 087AA 60124000 0 1 REG 1582 LD R0 R1 copy new value 087AB FA6C87B8 1 1583 JEQMW R1 TRYINFVAL check if huge can be given away 087AC FA4887C4 1 1584 JLTZ R1 FXVPOB if garbage value, give error 087AD 6096C801 2 3 BASE 1585 LD R2 R3,1 fetch allocated amount 087AE FAAE87B3 2 1586 JNEMW R2 CALCVAL if not huge, calculate new authorized 087AF 6016C800 0 3 BASE 1587 LD R0 R3,0 get allocatable amount 087B0 FA2C87BB 0 1588 JEQMW R0 SETVALNOW jump if more than enough authorization 1589 * \ / 1590 000087B1 1591 FXVINSA LABEL 087B1 600400A7 0 IMM 1592 LD R0 XREQERIAUT insufficient authorization error 087B2 FE0E87C5 1593 JMP FXVEXIT return 1594 * --- 1595 000087B3 1596 CALCVAL LABEL 087B3 60178C02 0 6 FPVR 1597 LD R0 @(SP,ULBLIMIT) current account limit 087B4 30124000 0 1 REG 1598 RSB R0 R1 R0 <= amount adding 087B5 18128000 0 2 REG 1599 ADD R0 R2 R0 <= new amount allocated 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1894 (ACCTDIDDLE) F 121 FREQ - Set account attribute 087B6 E4178803 0 6 BASE 1600 ST R0 SP,OVERFLOW save overflow amount, if any 087B7 54040000 0 IMM 1601 MAX R0 0 prevent negative numbers 1602 * \ / 1603 000087B8 1604 TRYINFVAL LABEL 087B8 6816C800 0 3 BASE 1605 UCPR R0 R3,0 enough to give out 087B9 FE0487B1 1606 JGT FXVINSA if not, insufficient authorization 087BA E416C801 0 3 BASE 1607 ST R0 R3,1 new amount allocated 1608 * \ / 1609 000087BB 1610 SETVALNOW LABEL 1611 PLOCK ULLIMLOCK critical region for updating ULB limits 087BB 0CC00000 1611 IOFF 087BC D1C01EAF 1611 SETT ULLIMLOCK 087BD FE0C87BF 1611 JNE MA(2+DISPW MA 0) 087BE DC40308B 1611 CALLNP LOCKWAIT 087BF E4578C02 1 6 FPVR 1612 ST R1 @(SP,ULBLIMIT) set new account limit 1613 PUNLOCK ULLIMLOCK release hold of lock 087C0 EC001EAF 1613 STZ ULLIMLOCK 087C1 0C800000 1613 ION 087C2 60178803 0 6 BASE 1614 LD R0 SP,OVERFLOW return overflow amount 087C3 FBE087C5 7 1615 IRJ R7 FXVEXIT take good return 1616 * --- 1617 000087C4 1618 FXVPOB LABEL 087C4 60040082 0 IMM 1619 LD R0 XREQERPOB parameter out of bounds error 000087C5 1620 FXVEXIT LABEL 087C5 60D78801 3 6 BASE 1621 LD R3 SP,SAVEREG restore value of register 3 087C6 5D1F8004 6 STAK 1622 LEAVE POP exit the subroutine 1623 * --- 1624 1625 END FIXUPVAL subroutine 1626 1627 1628 END GETSETAA Get/Set Account Attributes 181 INPUT FREQEND end of the FREQ processor 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1895 (FREQEND) F 122 XREF for FREQ processor 3 4 END FREQPROC File Request Processor 182 INPUT XRQUREQ1 user request processor (1) 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1896 (XRQUREQ1) F 123 User Request Processor 3 4 UREQPROC BLOCK User Request Processor 5 6 ENTRY DISPPC displacement of PC in interrupt block 7 ENTRY DISPPSR displacement of PSR in interrupt block 8 ENTRY DISPR0 displacement of R0 in interrupt block 9 * (other registers follow sequentially) 10 ENTRY PROCPOWER find session & check privs 11 ENTRY PURGEGIFTU purge pending gift units 12 ENTRY PURGEMSGS purge pending inter session messages 13 ENTRY SRCHPSNM find UPC given process serial number 14 ENTRY UREQTRAP user requests 15 ENTRY URQNXTFREE *** 16 ENTRY URQNXTUSED *** until FREQs go away 17 ENTRY URSTATPI session info fetch routine 18 ENTRY WHOLOOK calculate looking power 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1897 (XRQUREQ1) F 123 User Request Processor 20 21 ********************************************************************************** 22 * * 23 * UREQTRAP * 24 * Processes user requests (UREQs). These requests do * 25 * not require luns but some do require PSNs (process serial * 26 * numbers for short). * 27 * * 28 * Stack required = 27 * 29 * 0 + max ( UERRORILR (3), UREQATTRIB (4), UREQBYE (1), * 30 * UREQCNTLP (7), UREQCPUL (4), UREQDATE (9), * 31 * UREQINT (11), UREQLEA (15), UREQLUNGET (4), * 32 * UREQMAPINA (7), UREQMSG (11), UREQPACK (6), * 33 * UREQPCNTL (27), UREQPGETR (4), UREQPNUM (14), * 34 * UREQPSETR (5), UREQSESL (4), UREQSTAT (11), * 35 * UREQSTOP (1), UREQTIMEC (7), UREQUNIT (12), * 36 * UREQVARGET (1), UREQVARSET (1), UROPMSG (6) ) * 37 * * 38 ********************************************************************************** 39 40 BLOCK UREQTRAP routine 41 42 ENTRY UREQTRAP 43 000087C7 44 UREQTRAP LABEL 087C7 60092C62 0 4 ZBM 45 LD R0 R4,CAR0/XRFLDREQ get the request code 087C8 6804001A 0 IMM 46 UCPR R0 UREQMAX is it a reasonable request? 087C9 FE0659D8 47 JGE UERRORILR jump if not 087CA 60893842 2 4 ZBM 48 LD R2 R4,CAR0/XRFLDSUBOP get the sub operation code 087CB 5CA087CC 0 49 LDPC UREQJMP(R0) goto routine 50 * --- 51 52 ********************************************************************************** 53 * * 54 * Routine entered with registers set as follows: * 55 * SP=>return address stack * 56 * R4=>CA of caller * 57 * R3=operand of instruction * 58 * R2=sub operation of UREQ * 59 * * 60 ********************************************************************************** 61 000087CC 62 UREQJMP LABEL 087CC 000059D8 63 ADR UERRORILR 00x - illegal 087CD 0000885E 64 ADR UREQVARSET 01x - set variable 087CE 0000885D 65 ADR UREQVARGET 02x - get variable 087CF 000059D8 66 ADR UERRORILR 03x - unassigned 087D0 000059D8 67 ADR UERRORILR 04x - unassigned 087D1 00008862 68 ADR UREQSTAT 05x - status fetch 087D2 00008AB3 69 ADR UREQDATE 06x - date/time fetch 087D3 00008AFE 70 ADR UREQSTOP 07x - terminate program 087D4 00008B04 71 ADR UREQINT 08x - control interrupt 087D5 00008B8C 72 ADR UREQBYE 09x - logoff request 087D6 00008B92 73 ADR UREQCPUL 0Ax - get/set CPU limit 087D7 00008BCF 74 ADR UREQSESL 0Bx - get/set session file limit 087D8 00008BF7 75 ADR UREQCNTLP 0Cx - control of memory pages 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1898 (XRQUREQ1) F 123 User Request Processor 087D9 00008C70 76 ADR UREQPCNTL 0Dx - control process 087DA 00008D10 77 ADR UREQPSETR 0Ex - set process registers 087DB 00008CF8 78 ADR UREQPGETR 0Fx - get process registers 087DC 00008D8D 79 ADR UREQPACK 10x - pack strings the system's way 087DD 00008DC2 80 ADR UREQMAPINA 11x - mapin page from other address space 087DE 00008DDC 81 ADR UREQLUNGET 12x - get assorted luns 087DF 00008D4E 82 ADR UREQLEA 13x - get effective addr in other addr space 087E0 00008E58 83 ADR UREQTIMEC 14x - process time control 087E1 000090D1 84 ADR UROPMSG 15x - operator message control 087E2 00008ECA 85 ADR UREQMSG 16x - inter-session message control 087E3 00009673 86 ADR UREQPNUM 17x - server name control 087E4 00008A72 87 ADR UREQATTRIB 18x - session/process attributes 087E5 00008FE7 88 ADR UREQUNIT 19x - inter-session unit transfers 0000001A ABS 89 UREQMAX EQU DISPW UREQJMP 90 91 END UREQTRAP routine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1899 (XRQUREQ1) F 123 UREQ - routine to find process from number 94 95 ********************************************************************************** 96 * * 97 * INDEXPROC. This routine returns a pointer to the PSA * 98 * and under program control block (if applicable) of the * 99 * process indexed by the passed process number. Access is * 100 * not given if the found process is execute-only. Positive * 101 * process numbers are assumed to be process serial numbers. * 102 * A negative process number represents a process that is * 103 * inferior to the current process in the process tree. This * 104 * feature is provided for compatibility with the old linear * 105 * process structure, so only the leftmost sons may be * 106 * accessed by negative process numbers. We may not access * 107 * processes not in our own session. A process serial number * 108 * of zero specifies the caller. * 109 * * 110 * INDEXPROCX is identical to INDEXPROC except that it * 111 * does does not check the referenced process for * 112 * execute/only-ness. Notice though, that Control Mode may * 113 * always look at a XO program. This is so that CM can get * 114 * and set the session variables. * 115 * Call: * 116 * R3 <= process serial number * 117 * CALLNP INDEXPROC/INDEXPROCX * 118 * JMP access not allowed * 119 * JMP reference to under program * 120 * reference to self * 121 * * 122 * Sets R0 <= previous brother under process, zero if none * 123 * R1 <= under process control block, may be zero * 124 * R3 <= PSA, session status area * 125 * Stack required = 4 * 126 * 1 + max ( SRCHPSNM (3) ) * 127 * * 128 ********************************************************************************** 129 130 BLOCK INDEXPROC and INDEXPROCX subroutines 131 132 ENTRY INDEXPROC 133 ENTRY INDEXPROCX 134 135 BEGFRAME 136 ENDFRAME 137 000BC010 7 CBM 138 NOXOFLAG EQU R7/BIT 0 flag for no check of XO 139 087E6 DD5F8001 6 STAK 140 INDEXPROCX ENTRNP PUSH 087E7 EDCBC010 7 CBM 141 STW NOXOFLAG say don't check execute-only 087E8 FE0E87EB 142 JMP IDXPROCSHR and go share code 143 * --- 144 087E9 DD5F8001 6 STAK 145 INDEXPROC ENTRNP PUSH 087EA EC0BC010 7 CBM 146 STZ NOXOFLAG must check execute-only 147 * \ / 148 000087EB 149 IDXPROCSHR LABEL 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1900 (XRQUREQ1) F 123 UREQ - routine to find process from number 087EB EC120000 0 REG 150 STZ R0 make sure no brothers found yet 087EC FAC687FA 3 151 JGEZ R3 IDXPSNM jump for process serial number 087ED 60400414 1 152 LD R1 CPCUPC get pointer to the current process 153 * \ / 154 000087EE 155 IDXPRCLOOP LABEL 087EE 60485F10 1 1 ZBM 156 LD R1 R1,UPCSONPTR get the next underprocess 087EF FA7087F7 1 157 JZA R1 IDXPRCFND if null pointer we are through here 087F0 FAE087EE 3 158 IRJ R3 IDXPRCLOOP continue the search 159 * \ / 160 161 ********************************************************************************** 162 * * 163 * We have found the under process that we were looking * 164 * for. R1 contains the pointer to the under process control * 165 * block. * 166 * * 167 ********************************************************************************** 168 169 * \ / 000087F1 170 IDXXOCHK LABEL 087F1 F7C087F7 7 171 JBT NOXOFLAG IDXPRCFND jump if no XO check 087F2 5C084810 1 ZBM 172 CMZ R1,UPEXECUTO cannot reference execute only memory 087F3 FE0287F7 173 JEQ IDXPRCFND jump if process is NOT execute only 087F4 60C00414 3 174 LD R3 CPCUPC get pointer to the calling process 087F5 5C08C610 3 ZBM 175 CMZ R3,UPCNTLMODE is caller Control Mode? 087F6 FE0287F9 176 JEQ IDXPRCXIT if not, may not reference this process 177 * \ / 178 000087F7 179 IDXPRCFND LABEL 087F7 19C40001 7 IMM 180 ADD R7 1 under process return 087F8 60C00412 3 181 LD R3 CPPSA get pointer to current PSA 182 * \ / 183 000087F9 184 IDXPRCXIT LABEL 087F9 5D1F8001 6 STAK 185 LEAVE PUSH exit 186 * --- 187 000087FA 188 IDXPSNM LABEL 087FA FAC487FD 3 189 JGTZ R3 IDXPRCSRCH if non zero we must search the process tree 087FB 60400414 1 190 LD R1 CPCUPC reference to ourselves 087FC FBE087F7 7 191 IRJ R7 IDXPRCFND leave this mess 192 * --- 193 000087FD 194 IDXPRCSRCH LABEL 087FD DC008805 195 CALL SRCHPSNM look for the specified process serial number 087FE 4152C000 3 REG 196 PARV R3 serial number to look for 087FF 40400414 197 PARVL CPCUPC place to start the search 08800 6052C000 1 3 REG 198 LD R1 R3 R1 <= under process control block, may be zero 08801 FAF087F7 3 199 JZA R3 IDXPRCFND if no UPC skip XO check 08802 64400414 1 200 CPR R1 CPCUPC are we looking at ourselves 08803 FE0C87F1 201 JNE IDXXOCHK looking at some other process, do XO check 08804 FBE087F7 7 202 IRJ R7 IDXPRCFND process serial number is our own, skip XO check 203 * --- 204 205 END INDEXPROC and INDEXPROCX subroutines 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1901 (XRQUREQ1) F 123 UREQ - routine to find process from number 207 208 ********************************************************************************** 209 * * 210 * This routine searches for the given process serial * 211 * number. The parameters are the serial number itself and * 212 * the process to start the search. If successful, R3 contains * 213 * a pointer to the under process control block otherwise * 214 * zero is returned. Note that we may only search for under * 215 * processes within our own session. To be helpful we also * 216 * return the previous brother for the found process if he * 217 * exists, this is helpful for unlinking a given process. * 218 * Call: * 219 * * 220 * CALL SRCHPSNM * 221 * PARV * 222 * PARVL * 223 * * 224 * Eats R1 * 225 * Sets R0 <= previous UPC, if he exists * 226 * R3 <= desired UPC, 0 if not found * 227 * Stack required = 3 * 228 * * 229 ********************************************************************************** 230 231 BLOCK SRCHPSNM routine 232 ENTRY SRCHPSNM 233 234 BEGFRAME 00178801 6 BASE 235 STARTUPC BSS 1 original UPC where the search started 00178802 6 BASE 236 SAVEREG2 BSS 1 this register needs saving 237 ENDFRAME 238 08805 DD1F8003 6 STAK 239 SRCHPSNM ENTR PUSH 08806 C1524000 1 REG 240 STPV R1 process serial number to search for 08807 C052C000 3 REG 241 STPVL R3 UPC to start the search, inclusive 08808 E4978802 2 6 BASE 242 ST R2 SP,SAVEREG2 save this register 08809 60040000 0 IMM 243 LD R0 0 say no brothers yet 0880A 6448D371 1 3 ZBM 244 CPR R1 R3,UPCSERNM is the first one the guy we want? 0880B FE02881F 245 JEQ SRCHEXIT if so, we got it made 0880C 6088DF10 2 3 ZBM 246 LD R2 R3,UPCSONPTR get the son pointer 0880D FAB0881E 2 247 JZA R2 SRCHNOUPC if zero then nothing to do 0880E E4D78801 3 6 BASE 248 ST R3 SP,STARTUPC else remember where we started 249 * \ / 250 0000880F 251 CHECKUPC LABEL 0880F 60D28000 3 2 REG 252 LD R3 R2 place UPC address in R3 for exit 08810 6448D371 1 3 ZBM 253 CPR R1 R3,UPCSERNM does the serial number match ourself? 08811 FE02881F 254 JEQ SRCHEXIT if so, that was so easy 255 * \ / 256 08812 6088DF10 2 3 ZBM 257 LD R2 R3,UPCSONPTR get the son pointer if any 08813 FAB08816 2 258 JZA R2 BROLOOP if no son, then check for brother 08814 60040000 0 IMM 259 LD R0 0 no brothers at this point 08815 FE0E880F 260 JMP CHECKUPC check if this is the one and only 261 * --- 262 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1902 (XRQUREQ1) F 123 UREQ - routine to find process from number 00008816 263 BROLOOP LABEL 08816 6088DF16 2 3 ZBM 264 LD R2 R3,UPCBROPTR get pointer to any brother processes 08817 FAB0881A 2 265 JZA R2 DADLOOP move up if no brothers 08818 E4D20000 3 0 REG 266 ST R3 R0 save the brother pointer 08819 FE0E880F 267 JMP CHECKUPC check this guy for a match 268 * --- 269 0000881A 270 DADLOOP LABEL 0881A 60040000 0 IMM 271 LD R0 0 no possible brothers yet 0881B 60C8DF17 3 3 ZBM 272 LD R3 R3,UPCDADPTR move up to the next higher process 0881C 64D78801 3 6 BASE 273 CPR R3 SP,STARTUPC is this where we started? 0881D FE0C8816 274 JNE BROLOOP look to see if more processes exists 275 * \ / 276 0000881E 277 SRCHNOUPC LABEL 0881E EC12C000 3 REG 278 STZ R3 indicate no UPC found 279 * \ / 280 0000881F 281 SRCHEXIT LABEL 0881F 60978802 2 6 BASE 282 LD R2 SP,SAVEREG2 restore this register 08820 5D1F8003 6 STAK 283 LEAVE POP return from where we came 284 * --- 285 286 END SRCHPSNM routine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1903 (XRQUREQ1) F 123 UREQ - Find and check power over session 289 290 ********************************************************************************** 291 * * 292 * PROCPOWER. This routine finds the specified session * 293 * and then also checks to see if the caller may diddle it. * 294 * If the requester is a foreign account then we further * 295 * restrict his access to only accounts on the same volume. * 296 * Call is of the form: * 297 * * 298 * LD ULB <= account of requester * 299 * LD R3 <= session number * 300 * CALLNP PROCPOWER * 301 * JMP * 302 * ST R3 * 303 * PCNTLLOCK is locked for searching and interrupts are off! * 304 * * 305 * Eats R0:R3 * 306 * Stack required = 4 * 307 * 1 + max ( LEVELBIT (3), PRIV2MACCT (1), SRCHLIST (1), * 308 * UNSRCHLIST(1) ) * 309 * * 310 ********************************************************************************** 311 312 BLOCK PROCPOWER subroutine 313 ENTRY PROCPOWER 314 315 BEGFRAME 316 ENDFRAME 317 08821 DD5F8001 6 STAK 318 PROCPOWER ENTRNP PUSH 08822 DC0030AA 319 CALL SRCHLIST get access to the session list 08823 40001EB2 320 PARL PCNTLLOCK 08824 FAC2882D 3 321 JEQZ R3 OUROWN jump if self spec 08825 60801EB1 2 322 LD R2 PCONTROL get root of list 323 * \ / 324 00008826 325 SRCHHIM LABEL 08826 64C880C3 3 2 ZBM 326 CPR R3 R2,PCPROCNUM is this our session? 08827 FE02882F 327 JEQ VICTIMFND jump if it is 08828 60889F14 2 2 ZBM 328 LD R2 R2,PCNXTCB move to the next control block 08829 FAB28826 2 329 JNZA R2 SRCHHIM loop if there is more 330 * \ / 331 0000882A 332 MNRPERROR LABEL 0882A DC0030B7 333 CALL UNSRCHLIST release the list 0882B 40001EB2 334 PARL PCNTLLOCK 0882C 5D1F8001 6 STAK 335 LEAVE POP 336 * --- 337 338 * Session number 0 means CPPSA 0000882D 339 OUROWN LABEL 0882D 60C00412 3 340 LD R3 CPPSA get user's session 0882E FE0E883F 341 JMP OK2DOIT naturally it's OK 342 * --- 343 344 * Specified session found -- check privs of the caller 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1904 (XRQUREQ1) F 123 UREQ - Find and check power over session 0000882F 345 VICTIMFND LABEL 0882F 5C089813 2 ZBM 346 CMZ R2,PCSYSPROC is this a system session? 08830 FE0C882A 347 JNE MNRPERROR if yes, say he cannot look 08831 60C89F13 3 2 ZBM 348 LD R3 R2,PCPSADRS get pointer to PSA 08832 6508DF13 4 3 ZBM 349 CPR ULB R3,PSUSERLIMP is requester and victim same? 08833 FE02883F 350 JEQ OK2DOIT no problems if they are 08834 5C081210 0 ZBM 351 CMZ R0,UPOPREQ granted operator privileges? 08835 FE02883F 352 JEQ OK2DOIT if so, let him do it 08836 5C090210 4 ZBM 353 CMZ ULB,ULFOREIGN is requester a foreign account? 08837 FE0C883B 354 JNE COMPACCTS if so, limit access 08838 60000414 0 355 LD R0 CPCUPC current underprocess 08839 5C080A10 0 ZBM 356 CMZ R0,UPMANAGR is the requester a manager? 0883A FE0C8841 357 JNE ONLYALMO jump if not 358 * \ / 359 0000883B 360 COMPACCTS LABEL 0883B DC005B84 361 CALL LEVELBIT check relation of manager over victim 0883C 41530000 4 REG 362 PARV ULB requesters ULB 0883D 4048DF13 3 ZBM 363 PARVL R3,PSUSERLIMP victims ULB 0883E FA02882A 0 364 JEQZ R0 MNRPERROR jump if this is the wrong manager 365 * \ / 366 0000883F 367 OK2DOIT LABEL 0883F 19C40001 7 IMM 368 ADD R7 1 move to success return 08840 5D1F8001 6 STAK 369 LEAVE POP and return 370 * --- 371 372 * The requester has no privs so he can only see himself. 373 * We already checked for self-specification, so ... 00008841 374 ONLYALMO LABEL 08841 6508DF14 4 3 ZBM 375 CPR ULB R3,PSDFLTDIR is victim using associated account? 08842 FE0C882A 376 JNE MNRPERROR not one of mine 08843 DC005C07 377 CALL PRIV2MACCT may I diddle with privs of alias acct? 08844 4048C044 3 ZBM 378 PARVL R3,PSDDIRPRIV privilege over alias DIR 08845 FE0E882A 379 JMP MNRPERROR not enough privs 08846 FE0E883F 380 JMP OK2DOIT we have enough to do it 381 * --- 382 383 END PROCPOWER subroutine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1905 (XRQUREQ1) F 123 UREQ - Check account look-at-ability 386 387 ********************************************************************************** 388 * * 389 * WHOLOOK. Routine that, given a ULB of a looker, * 390 * decides which groups of accounts that the looker may look * 391 * at. * 392 * Call: * 393 * * 394 * LD ULB => account of looker * 395 * CALLNP WHOLOOK * 396 * ST R0 priv: 0 - see all * 397 * 1 - see only self * 398 * 2 - same project * 399 * 3 - same division * 400 * * 401 * Eats R0:R1 * 402 * Stack required = 1 * 403 * * 404 ********************************************************************************** 405 406 BLOCK WHOLOOK subroutine 407 ENTRY WHOLOOK 408 409 BEGFRAME 410 ENDFRAME 411 08847 DD5F8001 6 STAK 412 WHOLOOK ENTRNP PUSH 08848 60400414 1 413 LD R1 CPCUPC R1=> UPC of the requester 08849 6004000F 0 IMM 414 LD R0 ONEBITS/PRIVBITS generate field 0884A 74084C40 0 1 ZBM 415 XOR R0 R1,UPCPRIV/PRIVBITS extract important privileges 0884B FA0C885B 0 416 JNEZ R0 BIGPRIV jump if we are in the big time 0884C 60040001 0 IMM 417 LD R0 1 1 means must match exactly (only self) 418 * \ / 419 420 * Nothing special, see if implied manager privileges 0884D 5C084A10 1 ZBM 421 CMZ R1,UPMANAGR doing manager stuff? 0884E FE0C885C 422 JNE USEPRIV if not, just give exact info 0884F 60490174 1 4 ZBM 423 LD R1 ULB,ULACCPROJ/DVSNPART1 get this guys division-project 08850 1444007D 1 IMM 424 DIV R1 DVSNPART2 dump project part 08851 1C44007D 1 IMM 425 MUL R1 DVSNPART2 R1 = division 08852 604A5200 1 1 CBM 426 LD R1 R1*DVSNPART1 08853 60040002 0 IMM 427 LD R0 2 code = 2 means same project 08854 64570804 1 4 BASE 428 CPR R1 ULB,ULACCPROJ is this the division manager? 08855 FE0C885C 429 JNE USEPRIV jump if not - only project 08856 60040003 0 IMM 430 LD R0 3 code = 3 means same division 08857 64402555 1 431 CPR R1 DOTSYS if super managers, give all info 08858 FE02885B 432 JEQ BIGPRIV 08859 64402551 1 433 CPR R1 DOTBTI manufactures account hot stuff 0885A FE0C885C 434 JNE USEPRIV 435 * \ / 436 0000885B 437 BIGPRIV LABEL 0885B 60040000 0 IMM 438 LD R0 0 code = 0 means may see all 0000885C 439 USEPRIV LABEL 0885C 5D1F8001 6 STAK 440 LEAVE POP 441 * --- 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1906 (XRQUREQ1) F 123 UREQ - Check account look-at-ability 442 00002E40 BYTE 443 PRIVBITS EQU BITS 23:26 privileges bits to inspect 444 445 END WHOLOOK subroutine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1907 (XRQUREQ1) F 123 UREQ - Variable get and set 448 449 ********************************************************************************** 450 * * 451 * These requests let programs get and set the values of * 452 * symbols. The symbols are kept by control mode and these * 453 * requests fob the actual returning or setting of the values * 454 * to CM. * 455 * Calls: * 456 * LD R0 URVARSET/GET * 457 * [LD R1 value] only if SET * 458 * LD2 R2 symbol.name * 459 * UREQ 0 * 460 * JLTZ R0 request.error * 461 * ST R1 old.value * 462 * * 463 * Stack required = 1 * 464 * 0 + max( UERRSET (1) ) * 465 * * 466 ********************************************************************************** 467 468 BLOCK UREQVARGET and UREQVARSET routines 469 470 ENTRY UREQVARGET 471 ENTRY UREQVARSET 472 0000885D 473 UREQVARGET LABEL 0885D 7CC30000 3 IMM 474 IOR R3 080000000 if get, add top bit 0000885E 475 UREQVARSET LABEL 0885E E48AC240 2 3 CBM 476 ST R2 R3/BITS 1:4 R3 is operand+sign if get+subop 0885F 6084107C 2 IMM 477 LD R2 UINTVAR+CMERR request for variable from CM 08860 DC403589 478 CALLNP UERRSET place error in list 08861 FE0E38DF 479 JMP XREQRTNX move to next higher level 480 * --- 481 482 END UREQVARGET and UREQVARSET routines 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1908 (XRQUREQ1) F 123 UREQ - Status Fetch 485 486 ********************************************************************************** 487 * * 488 * These requests fetch system status parameters. * 489 * * 490 * Stack required = 11 * 491 * 0 + max( UREQLUNITS (4), UREQUNDRP (1), URSTATLOAD (0), * 492 * URSTATPI (11), URSTATSSN (0), URSTATTRAF (0), * 493 * URSTATVERS (0), URSTRUNOK (6), UREQPROCLVL(0) ) * 494 * * 495 ********************************************************************************** 496 497 BLOCK UREQSTAT routine 498 499 ENTRY UREQSTAT 500 00008862 501 UREQSTAT LABEL 08862 64840009 2 IMM 502 CPR R2 URSTATMAX is it a reasonable request? 08863 FE0659D8 503 JGE UERRORILR jump if not 08864 5CA48865 2 504 LDPC URSTATJMP(R2) 505 * --- 506 00008865 507 URSTATJMP LABEL 08865 0000886E 508 VFD ADR URSTATTRAF get terminal/process numbers 08866 00008873 509 VFD ADR URSTATLOAD get system load factor 08867 00008876 510 VFD ADR URSTATPI get session information 08868 00008A52 511 VFD ADR URSTATSSN get system serial number and name 08869 00008A57 512 VFD ADR URSTATVERS get system version 0886A 00008A5A 513 VFD ADR URSTRUNOK is program allowed to run 0886B 000089B8 514 VFD ADR UREQUNDRP get under process information 0886C 00008A05 515 VFD ADR UREQLUNITS get local unit information 0886D 00008A6B 516 VFD ADR UREQPROCLVL get level in process tree 00000009 ABS 517 URSTATMAX EQU DISPW URSTATJMP 518 519 END UREQSTAT routine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1909 (XRQUREQ1) F 123 UREQ - Traffic request 522 523 ********************************************************************************** 524 * * 525 * URTRAFFIC. This request returns the number of * 526 * non-system sessions and the total number of sessions logged * 527 * on to the system. * 528 * Call: * 529 * * 530 * LD R0 URTRAFFIC * 531 * UREQ 0 * 532 * JLTZ R0 request error * 533 * ST R1 number of non-system sessions * 534 * ST R2 number of sessions * 535 * * 536 * Eats R1:R2 * 537 * Stack required = 0 * 538 * * 539 ********************************************************************************** 540 541 BLOCK URSTATTRAF routine 542 543 ENTRY URSTATTRAF 544 545 546 * Actual code to return things to the user's registers 0000886E 547 URSTATTRAF LABEL 0886E 60401F02 1 548 LD R1 TERMCOUNT get count of non-system sessions 0886F E4570803 1 4 BASE 549 ST R1 R4,CAR1 user's R1:=# non-system sessions 08870 60801EB0 2 550 LD R2 PCCOUNT get the total number of sessions 08871 E4970804 2 4 BASE 551 ST R2 R4,CAR2 user's R2:=number of sessions 08872 FE0E59D6 552 JMP NOERROR 553 * --- 554 555 END URSTATTRAF routine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1910 (XRQUREQ1) F 123 UREQ - Traffic request 557 558 ********************************************************************************** 559 * * 560 * URLOADFACT. Request that returns the load factor of * 561 * the system. This number is the running average of ten (10) * 562 * times the number of users found awaiting system resources * 563 * when we looked (at TICK interrupt time). We do not count * 564 * resources that the system has no control over, e.g. * 565 * terminal output wait. * 566 * Call: * 567 * LD R0 URLOADFACT * 568 * UREQ 0 * 569 * JLTZ R0 request.error * 570 * ST R1 load.factor * 571 * * 572 * Eats R1 * 573 * Stack required = 0 * 574 * * 575 ********************************************************************************** 576 577 BLOCK URSTATLOAD routine 578 579 ENTRY URSTATLOAD 580 00008873 581 URSTATLOAD LABEL 08873 60401DD7 1 582 LD R1 LOADFACT fetch up the current system load factor 08874 E4570803 1 4 BASE 583 ST R1 R4,CAR1 set into users R1 08875 FE0E59D6 584 JMP NOERROR 585 * --- 586 587 END URSTATLOAD routine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1911 (XRQUREQ1) F 123 UREQ - Fetch session information 590 591 ********************************************************************************** 592 * * 593 * This code is spaghetti and needs to be rewritten!! * 594 * * 595 ********************************************************************************** 596 597 598 ********************************************************************************** 599 * * 600 * User request that returns information about all of the * 601 * sessions in the system. For each session, the port * 602 * associated with it is returned and if the account of that * 603 * session is below or equal to the requester, detailed * 604 * information is returned. * 605 * User call: * 606 * LD R0 URPROCINFO * 607 * LD R1 * 608 * LD R2 * 609 * UREQ sessnum (if zero, return self. If -1, return all)* 610 * JLTZ R0 request error * 611 * ST R1 * 612 * * 613 * Eats R0:R5, R7 * 614 * Stack required = 11 * 615 * 0 + max( FREEULB (11), GETDATE (1), MAPINMEM (3), * 616 * PLACEULB (1), SETMEMTRAP (1), SFREEMEM (0), * 617 * SGETMEM (0), SRCHLIST (1), UNSRCHLIST (1), * 618 * USEULB (1), WHOLOOK (1) ) * 619 * * 620 * The entries returned are variable length and have * 621 * a length word in them. Their format is defined below. * 622 * * 623 ********************************************************************************** 624 625 BLOCK URSTATPI routine 626 ENTRY URSTATPI return session information 627 628 ********************************************************************************** 629 * * 630 * Since we can get page faults while storing information * 631 * into the users memory, we copy the information into a temp * 632 * block then move it into the users memory after the lists * 633 * are unlocked. * 634 * * 635 ********************************************************************************** 636 0013C000 7 REG 637 VAR EQU R7 00008876 638 PIVARBLK BASE VAR 0017C800 7 BASE 639 PISLPROC BSS 1 last session informed on ( - if only port ) 0017C801 7 BASE 640 PISPRIV BSS 1 privilege code of requester 0017C802 7 BASE 641 PISCOREA BSS 1 user core address 0017C803 7 BASE 642 PISBUFFR BSS 1 buffer remaining 0017C804 7 BASE 643 PIMOVELEN BSS 1 amount of characters to move to user 0017C805 7 BASE 644 PISRELOC BSS 1 relocation of requester 0017C806 7 BASE 645 PISULB BSS 1 => privileged ULB of requester 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1912 (XRQUREQ1) F 123 UREQ - Fetch session information 0017C807 7 BASE 646 PISLAULB BSS 1 => logged on ULB 0017C808 7 BASE 647 PISAAULB BSS 1 => alias ULB 0017C809 7 BASE 648 PISPSA BSS 1 => PSA of session being looked at 0017C80A 7 BASE 649 PIMYPROC BSS 1 requester's session number 0017C80B 7 BASE 650 PIFCBPTR BSS 1 pointer to the absolute input FCB 0017C80C 7 BASE 651 PITCBPTR BSS 1 pointer to the TCB, if terminal 0017C80D 7 BASE 652 PIDATE BSS 2 date of request 653 DRCT 00000004 ABS 654 PIVARLOG EQU (DISPW PIVARBLK) LOG 2 655 ORG PIVARBLK reclaim space 656 657 PROCINFORD LIST 657 ********************************************************************************** 657 * * 657 * The session information read request returns the * 657 * following block of information for each session. * 657 * * 657 ********************************************************************************** 657 657 * Format of session information returned 00008876 657 PIPROTO BASE R0 000800F0 0 ZBM 657 PIPROCNUM BSSB 32-17 session number 00081F10 0 ZBM 657 PIENTLEN BSSB 17 length of this entry in words 00080101 0 ZBM 657 PIWORDZ BSSB 32/2 bits giving more information 00081E11 0 ZBM 657 PIBATCH EQU PIWORDZ/BIT 31 on if a "batch" session 00081C11 0 ZBM 657 PIINTER EQU PIWORDZ/BIT 30 on if "interactive" session 00081A11 0 ZBM 657 PIDIALUP EQU PIWORDZ/BIT 29 on if a dialup port 00081811 0 ZBM 657 PIINHIB EQU PIWORDZ/BIT 28 on if this port is inhibited 00081611 0 ZBM 657 PIRFP EQU PIWORDZ/BIT 27 on if this is the special RFP term 00081411 0 ZBM 657 PISHADL EQU PIWORDZ/BIT 26 on if logged on acct is shadow 00081211 0 ZBM 657 PISHADA EQU PIWORDZ/BIT 25 on if alias acct is a shadow 00081011 0 ZBM 657 PISPECPROC EQU PIWORDZ/BIT 24 on if job is special (started by ORSTRTJOB) 00080E11 0 ZBM 657 PISYSPROC EQU PIWORDZ/BIT 23 on if job is system process 657 00082101 0 ZBM 657 PIPORTNUM BSSB 32/2 terminal port associated (-1 if none) 00000002 ABS 657 PISHORT EQU DISPW PIPROCNUM size of short element 657 * The above information is given for all sessions. The 657 * below information is only given if privileged. 00160802 0 BASE 657 PILOGACCT BSS 6 account logged on 00160802 0 BASE 657 PILAVOL EQU PILOGACCT(0) volume name 00160804 0 BASE 657 PILASYS EQU PILOGACCT(2) system name 00160805 0 BASE 657 PILAACCT EQU PILOGACCT(3) account name 00160807 0 BASE 657 PILAPROJ EQU PILOGACCT(5) division-project 00160808 0 BASE 657 PIALIASACT BSS 6 account aliased to 00160808 0 BASE 657 PIAAVOL EQU PIALIASACT(0) volume name 0016080A 0 BASE 657 PIAASYS EQU PIALIASACT(2) system name 0016080B 0 BASE 657 PIAAACCT EQU PIALIASACT(3) account name 0016080D 0 BASE 657 PIAAPROJ EQU PIALIASACT(5) division-project 0016080E 0 BASE 657 PIPROGNAME BSS 2 name of program (PAK12) 00160810 0 BASE 657 PISTATE BSS 2 program execution state (PAK12) 00160812 0 BASE 657 PIWCTIME BSS 1 wall clock time on (in minutes) 00160813 0 BASE 657 PICPUUSED BSS 1 cpu time used (in seconds) 00160814 0 BASE 657 PICPULIM BSS 1 cpu limit (in seconds) 00160815 0 BASE 657 PIDSKLIM BSS 1 disk space hard limit 00160816 0 BASE 657 PIDSKUSD BSS 1 disk space used 00160817 0 BASE 657 PISESUSD BSS 1 session space used 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1913 (XRQUREQ1) F 123 UREQ - Fetch session information 00160818 0 BASE 657 PISESLIM BSS 1 session space limit 00160819 0 BASE 657 PIWSSIZE BSS 1 working set size 0016081A 0 BASE 657 PIDSKWARN BSS 1 disk block soft limit 0016081B 0 BASE 657 PIPARENT BSS 1 session number of parent (or zero if none) 0016081C 0 BASE 657 PISITE BSS 2 site name for this session 0016081E 0 BASE 657 PILGFSESS BSS 1 session to send logoff message to 657 DRCT 0000001F ABS 657 PILONG EQU DISPW PIPROTO length of long information 00000005 ABS 657 PILOG EQU PILONG LOG 2 log length for getmem 657 ORG PIPROTO recover the space 658 00008876 659 URSTATPI LABEL 08876 FACC887A 3 660 JNEZ R3 OTHERSPEC check for self specification 08877 60000412 0 661 LD R0 CPPSA 08878 60081F12 0 0 ZBM 662 LD R0 R0,PSPROCCB 08879 60C800C3 3 0 ZBM 663 LD R3 R0,PCPROCNUM set R3 to our session number 664 * \ / 665 0000887A 666 OTHERSPEC LABEL 0887A FAC4887D 3 667 JGTZ R3 INDIVSPEC jump if specifying individual proc 0887B FAEE59DA 3 668 JNEMW R3 UERRORPOB only -1 is accepted 0887C 60C40000 3 IMM 669 LD R3 0 internal code of 0 sez to give all 670 * \ / 671 0000887D 672 INDIVSPEC LABEL 0887D 68C41000 3 IMM 673 UCPR R3 MAXPROCNUM check number size 0887E FE0659DA 674 JGE UERRORPOB 'parameter out of bounds' 0887F 70D2C000 3 3 REG 675 LDN R3 R3 negate session number ( 0 stays 0 ) 08880 DC002ED0 676 CALL UGETMEM request for some free storage 08881 40440004 IMM 677 PARVL PIVARLOG log of the block size 08882 E413C000 0 7 REG 678 ST R0 VAR initialize variables block pointer 08883 E4D7C800 3 7 BASE 679 ST R3 VAR,PISLPROC save PN requested 08884 600903F3 0 4 ZBM 680 LD R0 R4,CAR1/BITS 1:31 get users buffer size (less sign) 08885 E417C803 0 7 BASE 681 ST R0 VAR,PISBUFFR remember buffer remaining 08886 60091F14 0 4 ZBM 682 LD R0 R4,CAR2/FLDADRS get the buffer address 08887 E417C802 0 7 BASE 683 ST R0 VAR,PISCOREA keep core address 08888 60170801 0 4 BASE 684 LD R0 R4,CAMSR get the users MSR 08889 78040080 0 IMM 685 AND R0 MSRSRELOC isolate the store relocation 0888A 74040080 0 IMM 686 XOR R0 MSRSRELOC flip it 0888B E417C805 0 7 BASE 687 ST R0 VAR,PISRELOC save bit to change where moving 688 * \ / 689 * Remember which session we are - always get all for self 0888C 60000412 0 690 LD R0 CPPSA R0 -> our PSA 0888D 60081F12 0 0 ZBM 691 LD R0 R0,PSPROCCB R0 -> our PCB 0888E 600800C3 0 0 ZBM 692 LD R0 R0,PCPROCNUM R0 = our session number 0888F E417C80A 0 7 BASE 693 ST R0 VAR,PIMYPROC save it 694 * \ / 695 * figure out the access rights of the requester 08890 60000414 0 696 LD R0 CPCUPC get the current UPC pointer 08891 61081F13 4 0 ZBM 697 LD ULB R0,UPCPRIVULB ULB => requester power 08892 E517C806 4 7 BASE 698 ST ULB VAR,PISULB save the ULB pointer 08893 DC408847 699 CALLNP WHOLOOK see who I may see 08894 602088DB 0 0 700 LD R0 PIPRIVJ(R0) decode the privilege 08895 E417C801 0 7 BASE 701 ST R0 VAR,PISPRIV save the decoded version 702 * \ / 703 * Set date for logon time calculations 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1914 (XRQUREQ1) F 123 UREQ - Fetch session information 08896 DC404549 704 CALLNP GETDATE get date 08897 E617C80D 017 BASE 705 ST2 R0 VAR,PIDATE save for later 706 * \ / 707 * Get information block 08898 DC002ED0 708 CALL UGETMEM get a temp block 08899 40440005 IMM 709 PARVL PILOG indicate its length 0889A 61520000 5 0 REG 710 LD R5 R0 copy block pointer to R5 0889B DC005BCF 711 CALL SETMEMTRAP catch memory failures 0889C 40008969 712 PARL USERMEMBAD indicate bomb out address 713 * \ / 714 715 * Process the sessions 0000889D 716 NEXTPROC LABEL 0889D DC0030AA 717 CALL SRCHLIST lock the session list 0889E 40001EB2 718 PARL PCNTLLOCK 0000889F 719 TRYAGAIN LABEL 0889F 60D7C800 3 7 BASE 720 LD R3 VAR,PISLPROC get last one processed 088A0 FAC88976 3 721 JLTZ R3 FINDTHIS jump if single request 088A1 61040000 4 IMM 722 LD PCB 0 indicate nothing found (yet) 088A2 60841000 2 IMM 723 LD R2 MAXPROCNUM get the biggest allowable proc number 088A3 60401EB1 1 724 LD R1 PCONTROL R1 => root of list (non-empty, we are there) 725 * \ / 726 000088A4 727 LOOPINPCB LABEL 088A4 64C840C3 3 1 ZBM 728 CPR R3 R1,PCPROCNUM greater than last found? 088A5 FE0688AA 729 JGE NOTTHIS1 jump if not 088A6 648840C3 2 1 ZBM 730 CPR R2 R1,PCPROCNUM less than last known max? 088A7 FE0A88AA 731 JLE NOTTHIS1 we wish smallest that is greater than last 088A8 608840C3 2 1 ZBM 732 LD R2 R1,PCPROCNUM get this guys session number 088A9 61124000 4 1 REG 733 LD PCB R1 remember good element 000088AA 734 NOTTHIS1 LABEL 088AA 60485F14 1 1 ZBM 735 LD R1 R1,PCNXTCB link to next PCB 088AB FA7288A4 1 736 JNZA R1 LOOPINPCB jump if more to check 737 * \ / 088AC FB308973 4 738 JZA PCB PIDONEX jump if no block found 088AD E497C800 2 7 BASE 739 ST R2 VAR,PISLPROC remember session number 000088AE 740 TRYTHIS1 LABEL 088AE E48940F0 2 5 ZBM 741 ST R2 R5,PIPROCNUM also set into temp block 088AF 60C91260 3 4 ZBM 742 LD R3 PCB,PCQUEUE get ueue number 088B0 61091F13 4 4 ZBM 743 LD R4 PCB,PCPSADRS get pointer to PSA 088B1 FB30889F 4 744 JZA R4 TRYAGAIN skip this PCB if no PSA 745 * \ / 746 088B2 E517C809 4 7 BASE 747 ST R4 VAR,PISPSA save PSA pointer 088B3 62268989 01 3 748 LD2 R0 STATENAME(R3) ueue # to state name 088B4 E6174810 015 BASE 749 ST2 R0 R5,PISTATE save the state 088B5 EC094101 5 ZBM 750 STZ R5,PIWORDZ zap flags 088B6 D1496101 5 ZBM 751 STMW R5,PIPORTNUM assume no port 088B7 EC17C80C 7 BASE 752 STZ VAR,PITCBPTR say no TCB pointer 088B8 EC17C80B 7 BASE 753 STZ VAR,PIFCBPTR say no ABSIN FCB pointer 088B9 DC0025EB 754 CALL MAPINMEM map in this PSA's virtual tables 088BA 40530000 4 REG 755 PARVL R4 pass the PSA pointer 756 757 * give port number if absolute input is a terminal 088BB 60040001 0 IMM 758 LD R0 1 flag value for absolute IO 088BC 60491F17 1 4 ZBM 759 LD R1 R4,PSFCBLIST global FCBs 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1915 (XRQUREQ1) F 123 UREQ - Fetch session information 088BD 60840001 2 IMM 760 LD R2 FSACSRO unit access for input 000088BE 761 ABSSCAN LABEL 088BE 3C086015 0 1 ZBM 762 LSRCH R0 R1,FCABSIO find such a unit 088BF FE0C88CD 763 JNE NOTERMAS jump if none 088C0 64885835 2 1 ZBM 764 CPR R2 R1,FCACCESS is access such? 088C1 FE0288C3 765 JEQ DONEABSI jump if so 088C2 FA7688BE 1 766 LJNA R1 ABSSCAN else, try remainder of list 767 * \ / 768 000088C3 769 DONEABSI LABEL 088C3 E457C80B 1 7 BASE 770 ST R1 VAR,PIFCBPTR save RO ABSIO FCB 088C4 FA7088CD 1 771 JZA R1 NOTERMAS jump if nonexistent 088C5 60040007 0 IMM 772 LD R0 HTYPETERM type for terminal 088C6 64086665 0 1 ZBM 773 CPR R0 R1,FCHTYPE is input such? 088C7 FE0C88CD 774 JNE NOTERMAS jump if not 088C8 60485F16 1 1 ZBM 775 LD R1 R1,FCDCBPTR get TCB for input 088C9 FA7088CD 1 776 JZA R1 NOTERMAS jump if no real port here 777 * \ / 778 779 * claim our reward 088CA E457C80C 1 7 BASE 780 ST R1 VAR,PITCBPTR save TCB address 088CB 60484890 1 1 ZBM 781 LD R1 R1,TCTNUM fetch useful port number 088CC E4496101 1 5 ZBM 782 ST R1 R5,PIPORTNUM save it 783 * \ / 784 000088CD 785 NOTERMAS LABEL 088CD 61091F13 4 4 ZBM 786 LD ULB R4,PSUSERLIMP get pointer to ULB 088CE DC405569 787 CALLNP USEULB make ULB busy 088CF E517C807 4 7 BASE 788 ST ULB VAR,PISLAULB save the ULB pointer 088D0 6117C809 4 7 BASE 789 LD R4 VAR,PISPSA restore the PSA pointer 790 * \ / 791 792 ********************************************************************************** 793 * * 794 * Potential for interlock problem exists here. See NOTE * 795 * in PSA definition comment box regarding PSDFLTDIR. It is * 796 * possible that the PSDFLTDIR ULB can be freed between the * 797 * time we get it and the USEULB call. Interlock is tough, * 798 * so we hope for the best (else, USEULB gets HALTS10E1). * 799 * * 800 ********************************************************************************** 801 088D1 61091F14 4 4 ZBM 802 LD ULB R4,PSDFLTDIR get pointer to default ULB 088D2 DC405569 803 CALLNP USEULB make ULB busy 088D3 E517C808 4 7 BASE 804 ST ULB VAR,PISAAULB save as alias ULB 088D4 6117C809 4 7 BASE 805 LD R4 VAR,PISPSA restore the PSA pointer 806 * \ / 088D5 60D7C806 3 7 BASE 807 LD R3 VAR,PISULB get this guys ULB pointer 088D6 6096C804 2 3 BASE 808 LD R2 R3,ULACCPROJ get our division-project 088D7 6017C80A 0 7 BASE 809 LD R0 VAR,PIMYPROC get our session number 088D8 640940F0 0 5 ZBM 810 CPR R0 R5,PIPROCNUM looking at self 088D9 FE028903 811 JEQ SEEALL if so, may see all 088DA 5C97C801 7 BASE 812 LDPC VAR,PISPRIV see if he gets a lot of data or a little 813 * --- 814 000088DB 815 PIPRIVJ LABEL 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1916 (XRQUREQ1) F 123 UREQ - Fetch session information 088DB 00008903 816 ADR SEEALL 0 - sees all 088DC 000088DF 817 ADR CHECKALL 1 - may only see self 088DD 000088E9 818 ADR CHECKPROJ 2 - see same project 088DE 000088F0 819 ADR CHECKDIV 3 - see same division 820 821 * The requester can only see himself. Check for same. 000088DF 822 CHECKALL LABEL 088DF 6216C802 013 BASE 823 LD2 R0 R3,ULACCNM get my acct number 088E0 60D7C807 3 7 BASE 824 LD R3 VAR,PISLAULB R3 => logged on ULB 825 * \ / 826 000088E1 827 CHECKALLY LABEL 088E1 6616C802 013 BASE 828 CPR2 R0 R3,ULACCNM does it match? 088E2 FE0C88E5 829 JNE CHECKALLX if not, try alias 088E3 6496C804 2 3 BASE 830 CPR R2 R3,ULACCPROJ does the project match? 088E4 FE028903 831 JEQ SEEALL if it does, we succeed 832 * \ / 833 000088E5 834 CHECKALLX LABEL 088E5 64D7C808 3 7 BASE 835 CPR R3 VAR,PISAAULB was last the same as secondary? 088E6 FE0288FC 836 JEQ SEELITTLE if so, we only get a little info 088E7 60D7C808 3 7 BASE 837 LD R3 VAR,PISAAULB R3 => alias account 088E8 FE0E88E1 838 JMP CHECKALLY go try again 839 * --- 840 841 * The requester can only see those in his project 000088E9 842 CHECKPROJ LABEL 088E9 60D7C807 3 7 BASE 843 LD R3 VAR,PISLAULB get our ULB ptr 088EA 6496C804 2 3 BASE 844 CPR R2 R3,ULACCPROJ project of main acct match? 088EB FE028903 845 JEQ SEEALL if so, we may see it 088EC 60D7C808 3 7 BASE 846 LD R3 VAR,PISAAULB get our alias ULB 088ED 6496C804 2 3 BASE 847 CPR R2 R3,ULACCPROJ project of alias acct match? 088EE FE028903 848 JEQ SEEALL if so, we may see it 088EF FE0E88FC 849 JMP SEELITTLE otherwise, give minimal information 850 * --- 851 852 * The requester may see all in his division 000088F0 853 CHECKDIV LABEL 088F0 608A8170 2 2 CBM 854 LD R2 R2/DVSNPART1 088F1 1484007D 2 IMM 855 DIV R2 DVSNPART2 eliminate project 088F2 6057C807 1 7 BASE 856 LD R1 VAR,PISLAULB get victims ULB 088F3 60084174 0 1 ZBM 857 LD R0 R1,ULACCPROJ/DVSNPART1 get victims div-proj 088F4 1404007D 0 IMM 858 DIV R0 DVSNPART2 eliminate project 088F5 64128000 0 2 REG 859 CPR R0 R2 see if same division 088F6 FE028903 860 JEQ SEEALL jump if same division 088F7 6057C808 1 7 BASE 861 LD R1 VAR,PISAAULB get victims alias ULB 088F8 60084174 0 1 ZBM 862 LD R0 R1,ULACCPROJ/DVSNPART1 get our div-proj 088F9 1404007D 0 IMM 863 DIV R0 DVSNPART2 eliminate project 088FA 64128000 0 2 REG 864 CPR R0 R2 see if same division 088FB FE028903 865 JEQ SEEALL jump if same division 866 * \ / 867 * The requester may only see the session number and port number. 868 * Give them to him. 869 870 * \ / 000088FC 871 SEELITTLE LABEL 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1917 (XRQUREQ1) F 123 UREQ - Fetch session information 088FC DC0025EB 872 CALL MAPINMEM restore requesters original memory 088FD 40400412 873 PARVL CPPSA pointer to his PSA 088FE DC0030B7 874 CALL UNSRCHLIST release the list - we have our data 088FF 40001EB2 875 PARL PCNTLLOCK 08900 60040008 0 IMM 876 LD R0 PISHORT*CPW R0 => length of short element in chars 08901 E417C804 0 7 BASE 877 ST R0 VAR,PIMOVELEN save this length for later 08902 FE0E8942 878 JMP MOVEBLOCK move the information 879 * --- 880 881 * The requester gets all of the information - it will 882 * take a while. 00008903 883 SEEALL LABEL 884 * MOVE CORRESPONDING SYSTEM-PROCESS-INFORMATION TO TEMP-AREA 08903 60891F12 2 4 ZBM 885 LD R2 R4,PSPROCCB R2 -> PCB of victim 08904 6017C80B 0 7 BASE 886 LD R0 VAR,PIFCBPTR restore FCB pointer for absolute input 08905 FA308966 0 887 JZA R0 NOABSIHERE jump if no input 08906 6057C80C 1 7 BASE 888 LD R1 VAR,PITCBPTR get TCB for input 08907 FA708960 1 889 JZA R1 NOTERMHERE jump if no real port here 08908 EDC95C11 5 ZBM 890 STW R5,PIINTER if terminal say interactive session 08909 5C084019 1 ZBM 891 CMZ R1,TCMODEM is this a dialup port? 0890A ED895A11 5 ZBM 892 STLNE R5,PIDIALUP copy the information 0890B 5C085C10 1 ZBM 893 CMZ R1,TCINHIB is the port inhibited? 0890C ED895811 5 ZBM 894 STLNE R5,PIINHIB copy the information 0890D 5C085A10 1 ZBM 895 CMZ R1,TCRFP special SSU term? 0890E ED895611 5 ZBM 896 STLNE R5,PIRFP copy the information 897 * \ / 898 0000890F 899 MOVECORR LABEL 0890F 5C089A13 2 ZBM 900 CMZ R2,PCSPECPROC is this guy special? 08910 ED895011 5 ZBM 901 STLNE R5,PISPECPROC tell caller the answer 08911 5C089813 2 ZBM 902 CMZ R2,PCSYSPROC is this guy a system process? 08912 ED894E11 5 ZBM 903 STLNE R5,PISYSPROC tell caller the answer 08913 60090116 0 4 ZBM 904 LD R0 R4,PSCURRPROC get pointer to current UPC 08914 62160809 010 BASE 905 LD2 R0 R0,UPCPROCNM get progam name 08915 E617480E 015 BASE 906 ST2 R0 R5,PIPROGNAME tell the caller 08916 6217C80D 017 BASE 907 LD2 R0 VAR,PIDATE get date of request 08917 12170815 014 BASE 908 SUB2 R0 R4,PSHELDATE calculate WCT 08918 1604EA60 01 IMM 909 DIV2 R0 MSECSM make into minutes 08919 E4574812 1 5 BASE 910 ST R1 R5,PIWCTIME save wall clock time 0891A 60170810 0 4 BASE 911 LD R0 R4,PSTIMEUSED 0891B 140403E8 0 IMM 912 DIV R0 MSECSS convert to seconds 0891C E4174813 0 5 BASE 913 ST R0 R5,PICPUUSED save CPU time used 0891D 60170811 0 4 BASE 914 LD R0 R4,PSTIMLIM 0891E 140403E8 0 IMM 915 DIV R0 MSECSS convert to seconds 0891F E4174814 0 5 BASE 916 ST R0 R5,PICPULIM save CPU time limit 08920 60491F13 1 4 ZBM 917 LD R1 R4,PSUSERLIMP logon ULB 08921 6008618D 0 1 ZBM 918 LD R0 R1,ULDSKLIM 08922 E4174815 0 5 BASE 919 ST R0 R5,PIDSKLIM disk space limit 08923 6008718C 0 1 ZBM 920 LD R0 R1,ULDSKWARN 08924 E417481A 0 5 BASE 921 ST R0 R5,PIDSKWARN disk space warning 08925 6008518E 0 1 ZBM 922 LD R0 R1,ULDSKUSD get total saved space 08926 1816480F 0 1 BASE 923 ADD R0 R1,ULSCRDSK and add in scratch space in use 08927 E4174816 0 5 BASE 924 ST R0 R5,PIDSKUSD saved disk space in use 08928 60170812 0 4 BASE 925 LD R0 R4,PSSESUSD 08929 E4174817 0 5 BASE 926 ST R0 R5,PISESUSD session disk space in use 0892A 60170813 0 4 BASE 927 LD R0 R4,PSSESLIM 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1918 (XRQUREQ1) F 123 UREQ - Fetch session information 0892B E4174818 0 5 BASE 928 ST R0 R5,PISESLIM session disk space limit 0892C 600900F2 0 4 ZBM 929 LD R0 R4,PSWSSIZE 0892D E4174819 0 5 BASE 930 ST R0 R5,PIWSSIZE working set size 0892E 600880C4 0 2 ZBM 931 LD R0 R2,PCPARENT 0892F E417481B 0 5 BASE 932 ST R0 R5,PIPARENT parent session number 08930 62168805 012 BASE 933 LD2 R0 R2,PCBSITE 08931 E617481C 015 BASE 934 ST2 R0 R5,PISITE return the site name 08932 600908B3 0 4 ZBM 935 LD R0 R4,PSLGFSESS 08933 E417481E 0 5 BASE 936 ST R0 R5,PILGFSESS destination of logoff message 08934 DC0025EB 937 CALL MAPINMEM remap caller because we'll ION 08935 40400412 938 PARVL CPPSA pointer to the PSA 08936 DC0030B7 939 CALL UNSRCHLIST release access to PCB list 08937 40001EB2 940 PARL PCNTLLOCK lock word 08938 38D74802 3 5 BASE 941 LEA R3 R5,PILOGACCT users buffer address 08939 6117C807 4 7 BASE 942 LD ULB VAR,PISLAULB get ULB pointer 0893A DC4089AB 943 CALLNP PLACEULB place info for logged on ULB 0893B E4095411 0 5 ZBM 944 ST R0 R5,PISHADL set flag if logged on shadow 0893C 38D74808 3 5 BASE 945 LEA R3 R5,PIALIASACT 0893D 6117C808 4 7 BASE 946 LD ULB VAR,PISAAULB 0893E DC4089AB 947 CALLNP PLACEULB place info for alias ULB 0893F E4095211 0 5 ZBM 948 ST R0 R5,PISHADA set flag if alias is a shadow 949 * \ / 08940 6004007C 0 IMM 950 LD R0 PILONG*CPW get length of long block 08941 E417C804 0 7 BASE 951 ST R0 VAR,PIMOVELEN save this length for later 952 * \ / 953 00008942 954 MOVEBLOCK LABEL 08942 6117C807 4 7 BASE 955 LD ULB VAR,PISLAULB 08943 DC405526 956 CALLNP FREEULB free the logon ULB 08944 6117C808 4 7 BASE 957 LD ULB VAR,PISAAULB 08945 DC405526 958 CALLNP FREEULB free the alias ULB 08946 6057C804 1 7 BASE 959 LD R1 VAR,PIMOVELEN R1 => length to move 08947 6457C803 1 7 BASE 960 CPR R1 VAR,PISBUFFR will it all fit in his buffer 08948 FE048954 961 JGT PIDONE jump if it won't fit 08949 B057C803 1 7 BASE 962 RSBM R1 VAR,PISBUFFR remove space for buffer size 0894A 6097C802 2 7 BASE 963 LD R2 VAR,PISCOREA R2 = destination address for move 0894B 600A41E0 0 1 CBM 964 LD R0 R1/BITS 0:29 get the block length in words 0894C E4095F10 0 5 ZBM 965 ST R0 R5,PIENTLEN save in block 0894D 60134000 0 5 REG 966 LD R0 R5 R0 = source address for move 0894E 5997C805 7 BASE 967 CLBMSR VAR,PISRELOC relocate storeing to proper destination 0894F FE400000 968 CMOVE move block to users memory 08950 59C40080 IMM 969 IORMSR MSRSRELOC restore relocation to me 970 * \ / 08951 E497C802 2 7 BASE 971 ST R2 VAR,PISCOREA move over entry 08952 60D7C800 3 7 BASE 972 LD R3 VAR,PISLPROC was this an only fetch 08953 FAC6889D 3 973 JGEZ R3 NEXTPROC if not, loop to do next higher 974 * \ / 975 00008954 976 PIDONE LABEL 08954 DC002F5D 977 CALL UFREEMEM release the temp block 08955 41440005 IMM 978 PARV PILOG indicate its length 08956 40534000 5 REG 979 PARVL R5 and address 08957 61000412 4 980 LD R4 CPPSA get the current PSA pointer 08958 61091F11 4 4 ZBM 981 LD R4 R4,PSCACHNP1 R4 => callers registers 08959 6017C803 0 7 BASE 982 LD R0 VAR,PISBUFFR get the buffer remaining 0895A E4170803 0 4 BASE 983 ST R0 R4,CAR1 set the callers R1 to buffer remaining 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1919 (XRQUREQ1) F 123 UREQ - Fetch session information 0895B 60D3C000 3 7 REG 984 LD R3 VAR R3 => pointer to variables block 0895C DC002F5D 985 CALL UFREEMEM release the variables block 0895D 41440004 IMM 986 PARV PIVARLOG log of the block size 0895E 4052C000 3 REG 987 PARVL R3 and the address 0895F FE0E59D6 988 JMP NOERROR done successfully 989 * --- 990 991 ********************************************************************************** 992 * * 993 * Doing a SEEALL and there is an "absolute input" unit, but * 994 * it is not a terminal. There are several possibilities. The * 995 * session could be a batch or concurrent job, a system session, * 996 * or an interactive dialup job that Control Mode is timing out * 997 * after a UINTDISC interrupt. * 998 * The only sessions that get a .NULL input are disconnected * 999 * terminals and concurrent sessions. We check first for that, * 1000 * and call a disconnected session a "dialup" to provide ready * 1001 * identification (PIDIALUP=1, PIPORTNUM=-1). The check is weak, * 1002 * though, because a concurrent session might have had a dialup * 1003 * input that got disconnected. C'est la vie! * 1004 * Otherwise, we call the session "batch" if the PCB * 1005 * says it wasn't spawned by the system. * 1006 * * 1007 ********************************************************************************** 1008 1009 * R0 = absolute input FCB, R2 = PCB 00008960 1010 NOTERMHERE LABEL 08960 5C0880C4 2 ZBM 1011 CMZ R2,PCPARENT is this a conc session? 08961 FE0C8966 1012 JNE NOABSIHERE if so, probably not a disconnected 08962 60082665 0 0 ZBM 1013 LD R0 R0,FCHTYPE get device type 08963 64040006 0 IMM 1014 CPR R0 HTYPENULL is it a "disconnected terminal"? 08964 EC495A11 5 ZBM 1015 STLEQ R5,PIDIALUP save answer 08965 FE02890F 1016 JEQ MOVECORR jump if answer was yes 1017 * \ / 1018 1019 * Either there is no RO FCABSIO unit, or that unit is neither 1020 * a (real) .TERM nor a .NULL. 00008966 1021 NOABSIHERE LABEL 08966 5C089813 2 ZBM 1022 CMZ R2,PCSYSPROC if not system session... 08967 EC495E11 5 ZBM 1023 STLEQ R5,PIBATCH ...assume batch 08968 FE0E890F 1024 JMP MOVECORR move more information 1025 * --- 1026 1027 ********************************************************************************** 1028 * * 1029 * Come here if memory error ( probably memory protect * 1030 * violation ). We release our temp block, then pass the * 1031 * error to the caller. * 1032 * * 1033 ********************************************************************************** 1034 00008969 1035 USERMEMBAD LABEL 08969 62940000 2301 PAIR 1036 LD2 R2 PAIR R0 save the error code 0896A DC002F5D 1037 CALL UFREEMEM free the temp block 0896B 41440005 IMM 1038 PARV PILOG indicate its length 0896C 40534000 5 REG 1039 PARVL R5 and address 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1920 (XRQUREQ1) F 123 UREQ - Fetch session information 0896D 6153C000 5 7 REG 1040 LD R5 VAR R5 => pointer to variables block 0896E DC002F5D 1041 CALL UFREEMEM release the variables block 0896F 41440004 IMM 1042 PARV PIVARLOG log of the block size 08970 40534000 5 REG 1043 PARVL R5 and the address 08971 62148000 0123 PAIR 1044 LD2 R0 PAIR R2 get error codes back 08972 FE0E5B5F 1045 JMP PASSERRUP pass them up to overprocess 1046 * --- 1047 1048 ********************************************************************************** 1049 * * 1050 * No more PCBs. Unlock list and finish. * 1051 * * 1052 ********************************************************************************** 1053 00008973 1054 PIDONEX LABEL 08973 DC0030B7 1055 CALL UNSRCHLIST release the list 08974 40001EB2 1056 PARL PCNTLLOCK 08975 FE0E8954 1057 JMP PIDONE go to common finish 1058 * --- 1059 1060 ********************************************************************************** 1061 * * 1062 * The request is for a particular session. Find only him. * 1063 * * 1064 ********************************************************************************** 1065 00008976 1066 FINDTHIS LABEL 08976 7092C000 2 3 REG 1067 LDN R2 R3 R2 = session looking for 08977 61001EB1 4 1068 LD PCB PCONTROL get the list root 1069 * \ / 1070 00008978 1071 FINDTHISL LABEL 08978 648900C3 2 4 ZBM 1072 CPR R2 PCB,PCPROCNUM is this the one? 08979 FE02897D 1073 JEQ FNDTFND jump if so 0897A 61091F14 4 4 ZBM 1074 LD PCB PCB,PCNXTCB get link to next 0897B FB328978 4 1075 JNZA PCB FINDTHISL jump if there is a next 0897C FE0E897F 1076 JMP NOTTHERE no info to return 1077 * --- 1078 0000897D 1079 FNDTFND LABEL 0897D 5C091F13 4 ZBM 1080 CMZ PCB,PCPSADRS is there a PSA here? 0897E FE0C88AE 1081 JNE TRYTHIS1 if so, get the info 1082 * \ / 1083 1084 ********************************************************************************** 1085 * * 1086 * The requested session is not there -- give the asker * 1087 * an error. * 1088 * * 1089 ********************************************************************************** 1090 1091 * \ / 0000897F 1092 NOTTHERE LABEL 0897F DC0030B7 1093 CALL UNSRCHLIST release the list 08980 40001EB2 1094 PARL PCNTLLOCK 08981 DC002F5D 1095 CALL UFREEMEM free temp block 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1921 (XRQUREQ1) F 123 UREQ - Fetch session information 08982 41440005 IMM 1096 PARV PILOG indicate its length 08983 40534000 5 REG 1097 PARVL R5 pass pointer to block 08984 6153C000 5 7 REG 1098 LD R5 VAR R5 => pointer to variables block 08985 DC002F5D 1099 CALL UFREEMEM release the variables block 08986 41440004 IMM 1100 PARV PIVARLOG log of the block size 08987 40534000 5 REG 1101 PARVL R5 and the address 08988 FE0E59E4 1102 JMP UERRORNSE "No such entry" 1103 * --- 1104 1105 ********************************************************************************** 1106 * * 1107 * This table translates the ueue ordinal into the name * 1108 * of the ueue that it corresponds to. These names are the * 1109 * customer visible versions. * 1110 * * 1111 ********************************************************************************** 1112 00008989 1113 STATENAME LABEL 08989 AFB8F910 1114 PAK12 RUNNING 0898B AFB8F7C4 1115 PAK12 RUNNABLE 0898D 90EED1D6 1116 PAK12 MSWAIT 0898F 77E891D6 1117 PAK12 IOWAIT 08991 5875580B 1118 PAK12 DIRWAIT 08993 45647C0B 1119 PAK12 ADTWAIT 08995 763C640B 1120 PAK12 IDXWAIT 08997 8A24CA73 1121 PAK12 LOCKWAIT 08999 64A40EF3 1122 PAK12 FILEWAIT 0899B A07C71B3 1123 PAK12 PATHWAIT 0899D 90DFBA0B 1124 PAK12 MSGWAIT 0899F C0F24EB3 1125 PAK12 UNITWAIT 089A1 B980DCF3 1126 PAK12 TERMWAIT 089A3 B980DBC9 1127 PAK12 TERMOWAIT 089A5 BA1808F3 1128 PAK12 TIMEWAIT 089A7 B5AD71B3 1129 PAK12 STOPWAIT 089A9 B40A3AF3 1130 PAK12 SIZEWAIT 00000011 ABS 1131 STATENUM EQU (DISPW STATENAME)/2 1132 ASSERTEQ NQUEUES,STATENUM make sure we have right number 1132 BSS NQUEUES-STATENUM error if NQUEUES < STATENUM 1132 BSS STATENUM-NQUEUES error if STATENUM < NQUEUES 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1922 (XRQUREQ1) F 123 UREQ - Fetch session information 1134 1135 ********************************************************************************** 1136 * * 1137 * PLACEULB. Routine to place the ULB information into * 1138 * the temp block. * 1139 * Call: * 1140 * LD R3 => base of place to put * 1141 * LD ULB => ULB * 1142 * CALLNP PLACEULB * 1143 * ST R0 1 if shadow, 0 otherwise * 1144 * * 1145 * Eats R0:R2 * 1146 * Stack required = 1 * 1147 * * 1148 ********************************************************************************** 1149 1150 BLOCK PLACEULB routine 1151 ENTRY PLACEULB 1152 1153 BEGFRAME 1154 ENDFRAME 1155 089AB DD5F8001 6 STAK 1156 PLACEULB ENTRNP PUSH 089AC 60090081 0 4 ZBM 1157 LD R0 ULB,ULDRIVE R0 = drive looking for 089AD 60A01F22 2 0 1158 LD R2 VOLNTABLE(R0) get VOLN pointer 089AE 62168811 012 BASE 1159 LD2 R0 R2,VOLNNAME pick up the volume's name 089AF E616C800 013 BASE 1160 ST2 R0 R3,0 place volume name 089B0 60001EFB 0 1161 LD R0 SYSTEMNM rename the name of the system 089B1 E416C802 0 3 BASE 1162 ST R0 R3,2 089B2 62170802 014 BASE 1163 LD2 R0 ULB,ULACCNM get the account name 089B3 E616C803 013 BASE 1164 ST2 R0 R3,3 move account name 089B4 60170804 0 4 BASE 1165 LD R0 ULB,ULACCPROJ get the division-project 089B5 E416C805 0 3 BASE 1166 ST R0 R3,5 move division-project 089B6 60090010 0 4 ZBM 1167 LD R0 ULB,ULSHADOW return shadowness in R0 089B7 5D1F8001 6 STAK 1168 LEAVE POP return 1169 * --- 1170 1171 END PLACEULB routine 1172 1173 END URSTATPI routine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1923 (XRQUREQ1) F 123 UREQ - Get underprocess information 1176 1177 ********************************************************************************** 1178 * * 1179 * This routine returns all the information about the current * 1180 * structure of all under processes. The starting UPC is the * 1181 * current UPC. If a process is execute only his information * 1182 * is returned and the processes below are skipped. * 1183 * Call: * 1184 * LD R0 URUNDPINFO * 1185 * LD R1 * 1186 * LD R2 * 1187 * UREQ 0 * 1188 * JLTZ R0 * 1189 * ST R1 * 1190 * * 1191 * Eats R0:R5 * 1192 * Stack required = 1 * 1193 * 0 + max( GIVUPINFO (1), SETMEMTRAP (1), SFREEMEM (0), * 1194 * SGETMEM (0), ZEROIT (1) ) * 1195 * * 1196 ********************************************************************************** 1197 1198 BLOCK UREQUNDRP routine 1199 ENTRY UREQUNDRP 1200 000089B8 1201 UREQUNDRP LABEL 089B8 DC002ED0 1202 CALL UGETMEM get a chunk of memory 089B9 40440003 IMM 1203 PARVL UNDRPLOG log of the block size needed 089BA 61520000 5 0 REG 1204 LD R5 R0 move block address here 089BB DC003090 1205 CALL ZEROIT zap the entire block 089BC 41174800 5 BASE 1206 PAR R5,0 address of the block to zero 089BD 40440006 IMM 1207 PARVL UNDRPLONG length of blocks (words) 089BE DC005BCF 1208 CALL SETMEMTRAP set up to catch user errors 089BF 400089DF 1209 PARL USERERROR address to clean up 089C0 60C00414 3 1210 LD R3 CPCUPC current UPC pointer 089C1 EC128000 2 REG 1211 STZ R2 this is our level counter 089C2 DC4089E5 1212 CALLNP GIVUPINFO give info about ourselves 089C3 FE0E89DB 1213 JMP UNDRPXIT no more room in the users buffer 089C4 60C8DF10 3 3 ZBM 1214 LD R3 R3,UPCSONPTR any more to look at 089C5 FAF089DB 3 1215 JZA R3 UNDRPXIT if not then done here 089C6 D0128000 2 REG 1216 INC R2 advance our level counter 089C7 DC4089E5 1217 CALLNP GIVUPINFO give info about our immediate underprocess 089C8 FE0E89DB 1218 JMP UNDRPXIT no more room in the users buffer 1219 * \ / 1220 000089C9 1221 UNDRPSON LABEL 089C9 5C08DF10 3 ZBM 1222 CMZ R3,UPCSONPTR do we have offspring 089CA FE0289D2 1223 JEQ UNDRPBRO if not jump to brother check 1224 * \ / 1225 1226 ********************************************************************************** 1227 * * 1228 * Before we make the move down to the next child process * 1229 * we check if this process is execute only or not. If not * 1230 * then no problems but if so, then we can look no farther. * 1231 * * 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1924 (XRQUREQ1) F 123 UREQ - Get underprocess information 1232 ********************************************************************************** 1233 1234 * \ / 089CB 5C08C810 3 ZBM 1235 CMZ R3,UPEXECUTO is this guy execute-only 089CC FE0C89D2 1236 JNE UNDRPBRO jump if we may look no farther 089CD 60C8DF10 3 3 ZBM 1237 LD R3 R3,UPCSONPTR move down one level 089CE D0128000 2 REG 1238 INC R2 adjust our level counter 089CF DC4089E5 1239 CALLNP GIVUPINFO give information about this process 089D0 FE0E89DB 1240 JMP UNDRPXIT no more room in the users buffer 089D1 FE0E89C9 1241 JMP UNDRPSON back round for more 1242 * --- 1243 000089D2 1244 UNDRPBRO LABEL 089D2 5C08DF16 3 ZBM 1245 CMZ R3,UPCBROPTR any brothers at this level 089D3 FE0289D8 1246 JEQ UNDRPDAD move up to a higher level 089D4 60C8DF16 3 3 ZBM 1247 LD R3 R3,UPCBROPTR we are now pointing to our brother 089D5 DC4089E5 1248 CALLNP GIVUPINFO give information about our brother 089D6 FE0E89DB 1249 JMP UNDRPXIT no more room in the users buffer 089D7 FE0E89C9 1250 JMP UNDRPSON see if he has any offspring 1251 * --- 1252 000089D8 1253 UNDRPDAD LABEL 089D8 60C8DF17 3 3 ZBM 1254 LD R3 R3,UPCDADPTR move up to our father 089D9 D0528000 2 REG 1255 DEC R2 adjust the level counter appropriatly 089DA FE0C89D2 1256 JNE UNDRPBRO back from where we started 1257 * \ / 1258 000089DB 1259 UNDRPXIT LABEL 089DB DC002F5D 1260 CALL UFREEMEM call to free a chunck of memory 089DC 41440003 IMM 1261 PARV UNDRPLOG log of the block length 089DD 40534000 5 REG 1262 PARVL R5 address of the block 089DE FE0E59D6 1263 JMP NOERROR return with happy news 1264 * --- 1265 1266 ********************************************************************************** 1267 * * 1268 * We come here if memory error, most likely a memory * 1269 * protect violation. We give back our temp block and * 1270 * pass the error up to a higher authority. * 1271 * * 1272 ********************************************************************************** 1273 000089DF 1274 USERERROR LABEL 089DF 62940000 2301 PAIR 1275 LD2 R2 PAIR R0 save the error codes 089E0 DC002F5D 1276 CALL UFREEMEM free the temp block 089E1 41440003 IMM 1277 PARV UNDRPLOG indicate its length 089E2 40534000 5 REG 1278 PARVL R5 and the address 089E3 62148000 0123 PAIR 1279 LD2 R0 PAIR R2 restore the error codes 089E4 FE0E5B5F 1280 JMP PASSERRUP pass them up to the overprocess 1281 * --- 1282 1283 END UREQUNDRP routine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1925 (XRQUREQ1) F 123 UREQ - Get underprocess information 1285 1286 ********************************************************************************** 1287 * * 1288 * This routine moves information contained in the UPC to * 1289 * a system temporary block (see the definition of the macro * 1290 * UNDRPINFORD). That way we can give information to the user * 1291 * all at once and this makes life much easier. Note that we * 1292 * do NOT set up to catch memory protect violations, this MUST * 1293 * be done before this routine is called. * 1294 * Call: * 1295 * R2 <= level this UPC is at * 1296 * R3 <= UPC pointer * 1297 * R5 <= address of the system temp block * 1298 * CALLNP GIVUPINFO * 1299 * JMP * 1300 * * 1301 * Eats R0:R1 * 1302 * Stack required = 1 * 1303 * * 1304 ********************************************************************************** 1305 1306 BLOCK GIVUPINFO routine 1307 ENTRY GIVUPINFO 1308 1309 BEGFRAME 1310 ENDFRAME 1311 089E5 DD5F8001 6 STAK 1312 GIVUPINFO ENTRNP PUSH 089E6 60040018 0 IMM 1313 LD R0 UNDRPLONG*CPW length of the information block 089E7 64170803 0 4 BASE 1314 CPR R0 R4,CAR1 does the user have enough room 089E8 FE048A04 1315 JGT GIVUPDONE don't even bother working 089E9 E4894091 2 5 ZBM 1316 ST R2 R5,UNDRLEVEL give away the level number 089EA 6216C809 013 BASE 1317 LD2 R0 R3,UPCPROCNM get the process name 089EB E6174804 015 BASE 1318 ST2 R0 R5,UNDRNAME place it into the temp buffer 089EC 60040006 0 IMM 1319 LD R0 UNDRPLONG get the entry length (in words) 089ED E4095F10 0 5 ZBM 1320 ST R0 R5,UNDRELEN into the buffer it goes 089EE 6008D371 0 3 ZBM 1321 LD R0 R3,UPCSERNM get the serial number of this UPC 089EF E4095371 0 5 ZBM 1322 ST R0 R5,UNDRPSN into the buffer it goes 089F0 6008C0F0 0 3 ZBM 1323 LD R0 R3,UPCPRIV get this processes restrictions 089F1 E40940F0 0 5 ZBM 1324 ST R0 R5,UNDRRSTR into the buffer it goes 089F2 6008D378 0 3 ZBM 1325 LD R0 R3,UPCERRPSN get PSN to send our errors up to 089F3 E4096F72 0 5 ZBM 1326 ST R0 R5,UNDRDBG this process looks over us 089F4 EC094172 5 ZBM 1327 STZ R5,UNDRDPSN initialize this field just in case 089F5 6008DF17 0 3 ZBM 1328 LD R0 R3,UPCDADPTR do we have a father 089F6 FA3089F9 0 1329 JZA R0 GIVUPMOVE if not, some kind of mutant 089F7 60081371 0 0 ZBM 1330 LD R0 R0,UPCSERNM get our fathers serial number 089F8 E4094172 0 5 ZBM 1331 ST R0 R5,UNDRDPSN into the buffer it goes 1332 * \ / 1333 000089F9 1334 GIVUPMOVE LABEL 089F9 60134000 0 5 REG 1335 LD R0 R5 this is the source address 089FA 60440018 1 IMM 1336 LD R1 UNDRPLONG*CPW length of each entry in words 089FB 60970804 2 4 BASE 1337 LD R2 R4,CAR2 this is the users buffer 089FC 59840080 IMM 1338 CLBMSR MSRSRELOC store relocation into users address space 089FD FE400000 1339 CMOVE there!!! the user should have it now 089FE 59C40080 IMM 1340 IORMSR MSRSRELOC restore the MSR store relocation bit 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1926 (XRQUREQ1) F 123 UREQ - Get underprocess information 1341 * \ / 1342 1343 ********************************************************************************** 1344 * * 1345 * All that is left to do is update the users registers * 1346 * so he knows that we gave him the information he requested. * 1347 * * 1348 ********************************************************************************** 1349 1350 * \ / 089FF 60040018 0 IMM 1351 LD R0 UNDRPLONG*CPW number of characters we moved 08A00 B0170803 0 4 BASE 1352 RSBM R0 R4,CAR1 update the count register 08A01 E4970804 2 4 BASE 1353 ST R2 R4,CAR2 and update the address register 08A02 60894091 2 5 ZBM 1354 LD R2 R5,UNDRLEVEL restore the level number counter 08A03 19C40001 7 IMM 1355 ADD R7 1 indicate that something got done 1356 * \ / 1357 00008A04 1358 GIVUPDONE LABEL 08A04 5D1F8001 6 STAK 1359 LEAVE POP seeya all later 1360 * --- 1361 1362 END GIVUPINFO routine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1927 (XRQUREQ1) F 123 UREQ - Get local unit information 1365 1366 ********************************************************************************** 1367 * * 1368 * This routine returns information about a specific * 1369 * processes local units. For the exact details of the * 1370 * information returned see the macro expansion below. If the * 1371 * process is execute only, then tough luck no information is * 1372 * given. This is only true of non Control Mode callers. * 1373 * Call: * 1374 * LD R0 URLUNITS * 1375 * LD R1 * 1376 * LD R2 * 1377 * UREQ process serial number * 1378 * JLTZ R0 zero|request error * 1379 * ST R1 * 1380 * * 1381 * Eats R0:R3, R5. * 1382 * Stack required = 4 * 1383 * 0 + max( INDEXPROC (4), SETMEMTRAP (1), SFREEMEM (0), * 1384 * SGETMEM (0) ) * 1385 * * 1386 ********************************************************************************** 1387 1388 BLOCK UREQLUNITS routine 1389 ENTRY UREQLUNITS 1390 00008A05 1391 UREQLUNITS LABEL 08A05 DC4087E9 1392 CALLNP INDEXPROC try to find the UPC 08A06 FE0E59E0 1393 JMP UERRORMNRP process must not be execute only 08A07 FA7059E2 1 1394 JZA R1 UERRORNSPP this underprocess does not exist 08A08 60C85F15 3 1 ZBM 1395 LD R3 R1,UPCUNITS get head to local UCE list 08A09 FAF059D6 3 1396 JZA R3 NOERROR leave if no units, strange? 1397 * \ / 08A0A DC005BCF 1398 CALL SETMEMTRAP to catch user errors 08A0B 40008A4C 1399 PARL UERLUTRAP place to do the cleanup 1400 * \ / 08A0C DC002ED0 1401 CALL UGETMEM get a buffer to place information in 08A0D 40440004 IMM 1402 PARVL LULOG log of the word size 08A0E 61D20000 7 0 REG 1403 LD R7 R0 place buffer address in safe register also 1404 * \ / 1405 * R3 <= UCE list, R4 <= console area, R7 <= temp buffer 00008A0F 1406 NEXTLUNIT LABEL 08A0F 6044002C 1 IMM 1407 LD R1 LULONG*CPW character length of an entry 08A10 B0570803 1 4 BASE 1408 RSBM R1 R4,CAR1 adjust buffer size count 08A11 FE088A40 1409 JLT FORGETINFO jump if not enough room 1410 * \ / 08A12 6093C000 2 7 REG 1411 LD R2 R7 place address here 08A13 FE580000 1412 CFILL 0 zap the entire buffer 1413 * \ / 08A14 D157C804 7 BASE 1414 STMW R7,LUSYSNM default the system name 08A15 D157C807 7 BASE 1415 STMW R7,LUACCPROJ default the project name 08A16 6004000B 0 IMM 1416 LD R0 LULONG get the length of each entry 08A17 E409DF10 0 7 ZBM 1417 ST R0 R7,LUELEN 08A18 6008C080 0 3 ZBM 1418 LD R0 R3,UCEUNIT get this devices unit number 08A19 E417C004 0 7 CACH 1419 ST R0 R7,LUUNIT 08A1A 6148DF11 5 3 ZBM 1420 LD FCB R3,UCEFCB get the file control block pointer 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1928 (XRQUREQ1) F 123 UREQ - Get local unit information 08A1B 60094C15 0 5 ZBM 1421 LD R0 FCB,FCLOADPT get load point indicator 08A1C E409D810 0 7 ZBM 1422 ST R0 R7,LULOADPT 08A1D 60094445 0 5 ZBM 1423 LD R0 FCB,FCLASTREAD type of last record read 08A1E E409D040 0 7 ZBM 1424 ST R0 R7,LULASTREC 08A1F 60094F25 0 5 ZBM 1425 LD R0 FCB,FCSTATSTAT get the static status of this device 08A20 E409D121 0 7 ZBM 1426 ST R0 R7,LUSSTAT 08A21 60097615 0 5 ZBM 1427 LD R0 FCB,FCTRANS get the transaction flag 08A22 E409DA10 0 7 ZBM 1428 ST R0 R7,LUTRANS 08A23 60094080 0 5 ZBM 1429 LD R0 FCB,FCBUSYCNT number of units opened to this device 08A24 E417C000 0 7 CACH 1430 ST R0 R7,LUEQUIVS 1431 * The following is the case where we have a .VOL 08A25 60094081 0 5 ZBM 1432 LD R0 FCB,FCDRIVE this should be the correct drive 08A26 60496665 1 5 ZBM 1433 LD R1 FCB,FCHTYPE get the hardware device type 08A27 6444000E 1 IMM 1434 CPR R1 HTYPEVOL check if we do have a .VOL 08A28 FE028A34 1435 JEQ GIVVOLNAME if so do only what is necessary 08A29 6217480B 015 BASE 1436 LD2 R0 FCB,FCNAME get the name of this file 08A2A E617C808 017 BASE 1437 ST2 R0 R7,LUFILENM 08A2B 6017480D 0 5 BASE 1438 LD R0 FCB,FCNAMEEXT get the filename extension 08A2C E417C80A 0 7 BASE 1439 ST R0 R7,LUEXT 08A2D 61495114 5 5 ZBM 1440 LD R5 FCB,FCLIMITPTR ULB of account where file resides 08A2E FB708A46 5 1441 JZA R5 LUNOULB jump if system created file 08A2F 62174802 015 BASE 1442 LD2 R0 R5,ULACCNM get the account name 08A30 E617C805 017 BASE 1443 ST2 R0 R7,LUACCT 08A31 60174804 0 5 BASE 1444 LD R0 R5,ULACCPROJ get the project name 08A32 E417C807 0 7 BASE 1445 ST R0 R7,LUACCPROJ 08A33 60094081 0 5 ZBM 1446 LD R0 R5,ULDRIVE this is the volume number for this account 1447 * \ / 1448 00008A34 1449 GIVVOLNAME LABEL 08A34 60201F22 0 0 1450 LD R0 VOLNTABLE(R0) pointer to VOLN element 08A35 62160811 010 BASE 1451 LD2 R0 R0,VOLNNAME name of this volume 08A36 E617C802 017 BASE 1452 ST2 R0 R7,LUVOLNM 08A37 60001EFB 0 1453 LD R0 SYSTEMNM get the system name 08A38 E417C804 0 7 BASE 1454 ST R0 R7,LUSYSNM 1455 * \ / 1456 00008A39 1457 MOVETOUSR LABEL 08A39 60970804 2 4 BASE 1458 LD R2 R4,CAR2 destination address 08A3A 6044002C 1 IMM 1459 LD R1 LULONG*CPW number of characters to move 08A3B 6013C000 0 7 REG 1460 LD R0 R7 source address 08A3C 59840080 IMM 1461 CLBMSR MSRSRELOC clear store relocation bit in MSR 08A3D FE400000 1462 CMOVE 08A3E 59C40080 IMM 1463 IORMSR MSRSRELOC restore monitor store relocation 08A3F E4970804 2 4 BASE 1464 ST R2 R4,CAR2 update users register 1465 * \ / 1466 00008A40 1467 FORGETINFO LABEL 08A40 FAF68A0F 3 1468 LJNA R3 NEXTLUNIT move on to next UCE, if any 08A41 6153C000 5 7 REG 1469 LD R5 R7 pass temp block address 08A42 DC002F5D 1470 CALL UFREEMEM get rid of the information buffer 08A43 41440004 IMM 1471 PARV LULOG log of the block size 08A44 40534000 5 REG 1472 PARVL R5 address of the block in uestion 08A45 FE0E59D6 1473 JMP NOERROR return indicating no problems 1474 * --- 1475 1476 * Here we obviously have a fake .DIR, take care of it 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1929 (XRQUREQ1) F 123 UREQ - Get local unit information 00008A46 1477 LUNOULB LABEL 08A46 6148DF11 5 3 ZBM 1478 LD FCB R3,UCEFCB get FCB address back 08A47 62174807 015 BASE 1479 LD2 R0 FCB,FCANAME fake .DIR account name 08A48 E617C805 017 BASE 1480 ST2 R0 R7,LUACCT 08A49 6017480D 0 5 BASE 1481 LD R0 FCB,FCAPROJ fake .DIR project name 08A4A E417C807 0 7 BASE 1482 ST R0 R7,LUACCPROJ 08A4B FE0E8A39 1483 JMP MOVETOUSR return info to user 1484 * --- 1485 1486 * This is some kind of memory protect violation 00008A4C 1487 UERLUTRAP LABEL 08A4C E6148000 0123 PAIR 1488 ST2 R0 PAIR R2 save these registers 08A4D DC002F5D 1489 CALL UFREEMEM give back the information block 08A4E 41440004 IMM 1490 PARV LULOG log of block size 08A4F 40534000 5 REG 1491 PARVL R5 address 08A50 62148000 0123 PAIR 1492 LD2 R0 PAIR R2 get error codes back 08A51 FE0E5B5F 1493 JMP PASSERRUP pass error to our overprocess 1494 * --- 1495 1496 END UREQLUNITS routine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1930 (XRQUREQ1) F 123 UREQ - Get system serial number/name 1499 1500 ********************************************************************************** 1501 * * 1502 * This request returns the system serial number and the * 1503 * system name to the caller. * 1504 * User call: * 1505 * LD R0 URGETSSN * 1506 * UREQ 0 * 1507 * JLTZ R0 * 1508 * ST R1 * 1509 * ST R2 * 1510 * * 1511 * Eats R0 * 1512 * Stack required = 0 * 1513 * * 1514 ********************************************************************************** 1515 1516 BLOCK URSTATSSN routine 1517 ENTRY URSTATSSN get system serial number and name 1518 00008A52 1519 URSTATSSN LABEL 08A52 60001EFA 0 1520 LD R0 SYSTEMSN get the system serial number 08A53 E4170803 0 4 BASE 1521 ST R0 R4,CAR1 and place into users register 08A54 60001EFB 0 1522 LD R0 SYSTEMNM get the system name 08A55 E4170804 0 4 BASE 1523 ST R0 R4,CAR2 and place into users register 08A56 FE0E59D6 1524 JMP NOERROR and indicate no error 1525 * --- 1526 1527 END URSTATSSN routine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1931 (XRQUREQ1) F 123 UREQ - Get system version 1530 1531 ********************************************************************************** 1532 * * 1533 * This request gives the user the version of the system. * 1534 * User call: * 1535 * * 1536 * LD R0 URGETVERS * 1537 * UREQ 0 * 1538 * JLTZ R0 * 1539 * ST2 R2 * 1540 * * 1541 * Eats R0:R1 * 1542 * Stack required = 0 * 1543 * * 1544 ********************************************************************************** 1545 1546 BLOCK URSTATVERS routine 1547 1548 ENTRY URSTATVERS get the system version 1549 00008A57 1550 URSTATVERS LABEL 08A57 62002400 01 1551 LD2 R0 VERSION get the system version 08A58 E6170804 014 BASE 1552 ST2 R0 R4,CAR2 place into the callers registers 08A59 FE0E59D6 1553 JMP NOERROR and return completion 1554 * --- 1555 1556 END URSTATVERS routine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1932 (XRQUREQ1) F 123 UREQ - System code file death check 1559 1560 ********************************************************************************** 1561 * * 1562 * This request checks the deadman flags in the NVM and * 1563 * returns a 'privilege not sufficient' error if the cutoff * 1564 * time has been exceeded. See the notes in DISKDEFS for the * 1565 * definitions of the various locations in the NVM. Note * 1566 * that the READNVM routine returns the two byte death times * 1567 * already left justified so that they look like normal short * 1568 * form times. * 1569 * There is a special case for the system death itself. * 1570 * It works as follows... * 1571 * The original systems were distributed with no mechanism * 1572 * to shut them off when they were obsolete. This could * 1573 * be troublesome if some old system has serious security * 1574 * bugs. In order to make them die, the system death date * 1575 * is set to 'yesterday'. Any old system will see this * 1576 * date and fall over dead. This new system, however, will * 1577 * add a small bias to that date before checking it. Later * 1578 * systems can add progressive larger biases to ensure that * 1579 * this protection continues. Ultimately, we should put * 1580 * a specific 'too old' flag into the NVM. * 1581 * User call: * 1582 * LD R0 URMAYIRUN load the request code * 1583 * LD R1 * 1584 * UREQ 0 * 1585 * JLTZ R0 * 1586 * * 1587 * Stack required = 6 * 1588 * 0 + max ( READNVM (6) ) * 1589 * * 1590 ********************************************************************************** 1591 1592 BLOCK URSTRUNOK routine 1593 1594 ENTRY URSTRUNOK determine if BTI supplied process may run 1595 00008A5A 1596 URSTRUNOK LABEL 08A5A 61570803 5 4 BASE 1597 LD R5 R4,CAR1 fetch the users sub-system identifier 08A5B 69440010 5 IMM 1598 UCPR R5 NVMDEADCNT is it within range? 08A5C FE0659F4 1599 JGE UERRORPNS jump if not 08A5D 1D440002 5 IMM 1600 MUL R5 2 each entry is 2 long 08A5E 3144007E 5 IMM 1601 RSB R5 NVMDEATH-2 make the actual address in the NVM 08A5F DC0045EA 1602 CALL READNVM call for a read from the NVM 08A60 41440002 IMM 1603 PARV 2 indicate length of datum 08A61 40534000 5 REG 1604 PARVL R5 pass the offset of the datum 08A62 6544007E 5 IMM 1605 CPR R5 NVMDEATH-2 check for system test 08A63 FE0C8A67 1606 JNE NORMCHECK jump if not checking system 1607 * fall through if caller is checking operating system 08A64 68008A6A 0 1608 UCPR R0 DEATHBIAS check to see if already huge 08A65 FE068A67 1609 JGE NORMCHECK jump if system death date is 'never' 08A66 10008A6A 0 1610 SUB R0 DEATHBIAS add bias for system death checks 00008A67 1611 NORMCHECK LABEL 08A67 68101EE7 0 @ 1612 UCPR R0 @FDATEPTR compare against now 08A68 FE0659D6 1613 JGE NOERROR jump if still okay to run 08A69 FE0E59F4 1614 JMP UERRORPNS flag sez not allowed, give error 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1933 (XRQUREQ1) F 123 UREQ - System code file death check 1615 * --- 1616 08A6A FE9F91FD 1617 DEATHBIAS VFD -3*365*FOURSECSD three years 1618 1619 END URSTRUNOK routine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1934 (XRQUREQ1) F 123 UREQ - System code file death check 1621 BLOCK 1622 ENTRY UREQPROCLVL 1623 1624 ********************************************************************************** 1625 * This request is used to determine how far done in the * 1626 * process tree the current process is. Control Mode is * 1627 * defined to be at level zero, its immediate underprocess(es) * 1628 * are at level one, etc. * 1629 * Calling format: * 1630 * LD R0 URPROCLEVEL * 1631 * UREQ 0 * 1632 * ST R1 LEVEL * 1633 * * 1634 ********************************************************************************** 1635 00008A6B 1636 UREQPROCLVL LABEL 08A6B 60000414 0 1637 LD R0 CPCUPC get current program 08A6C 60440000 1 IMM 1638 LD R1 0 initialize level counter 00008A6D 1639 NEXT LABEL 08A6D 60081F17 0 0 ZBM 1640 LD R0 R0,UPCDADPTR get this program's father 08A6E FA308A70 0 1641 JZA R0 DONE if none, we're at controlmode 08A6F FA608A6D 1 1642 IRJ R1 NEXT count this level and proceed 1643 * --- 00008A70 1644 DONE LABEL 08A70 E4570803 1 4 BASE 1645 ST R1 R4,CAR1 and return level to the user 08A71 FE0E59D6 1646 JMP NOERROR 1647 * --- 1648 END 1650 1651 ********************************************************************************** 1652 * * 1653 * These routines change attributes of either a particular * 1654 * session or process. Currently the requests are designed to * 1655 * be directed at oneself. At some later time this may * 1656 * change, until then things will suffice. * 1657 * * 1658 * Stack required = 4 * 1659 * 0 + max ( UREQCNAME (4), UREQSLSSES (0), UREQDROPPRV (0) ) * 1660 * * 1661 ********************************************************************************** 1662 1663 BLOCK Change session/process attributes 1664 ENTRY UREQATTRIB 1665 00008A72 1666 UREQATTRIB LABEL 08A72 64840003 2 IMM 1667 CPR R2 URATTRMAX a legal request 08A73 FE0659D8 1668 JGE UERRORILR jump if not the case 08A74 5CA48A75 2 1669 LDPC URATTRJTAB(R2) goto processing location 1670 * --- 1671 00008A75 1672 URATTRJTAB LABEL 08A75 00008A78 1673 VFD ADR UREQCNAME change program name 08A76 00008A80 1674 VFD ADR UREQSLSESS set session to send message at logoff 08A77 00008A85 1675 VFD ADR UREQDROPPRV relinquish program privilege 00000003 ABS 1676 URATTRMAX EQU DISPW URATTRJTAB size of this jump table 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1935 (XRQUREQ1) F 123 UREQ - Change session/process attributes 1678 1679 ********************************************************************************** 1680 * * 1681 * UREQCNAME * 1682 * This routine will change the name of a program. * 1683 * Currently you may only change the name of the calling * 1684 * program, even if the program is execute-only, pretty * 1685 * nifty, eh! * 1686 * Call: * 1687 * LD R0 UREQCNAME * 1688 * LD2 R2 * 1689 * UREQ 0 * 1690 * JLTZ R0 * 1691 * ST2 R2 * 1692 * * 1693 * Stack required = 4 * 1694 * 0 + max ( INDEXPROCX (4) ) * 1695 * * 1696 ********************************************************************************** 1697 1698 BLOCK UREQCNAME subroutine 1699 ENTRY UREQCNAME 1700 00008A78 1701 UREQCNAME LABEL 08A78 DC4087E6 1702 CALLNP INDEXPROCX gets the pointer to the PSA and UPC 1703 * even if the program is execute only. 08A79 FE0E59E0 1704 JMP UERRORMNRP may not look at this process 08A7A FE0E59E0 1705 JMP UERRORMNRP same here! 08A7B 60924000 2 1 REG 1706 LD R2 R1 move R1 so we don't lose it 1707 1708 * R4 <= pointer to CA , R3 <= pointer to PSA, R2 <= pointer to UPC 08A7C 62170804 014 BASE 1709 LD2 R0 R4,CAR2 get the new name he wants to use 08A7D E2168809 012 BASE 1710 EXCH2 R0 R2,UPCPROCNM the name just got changed 08A7E E6170804 014 BASE 1711 ST2 R0 R4,CAR2 let user know the previous name 08A7F FE0E59D6 1712 JMP NOERROR everything went real smooth! 1713 * --- 1714 1715 END UREQCNAME subroutine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1936 (XRQUREQ1) F 123 UREQ - Change session/process attributes 1717 1718 ********************************************************************************** 1719 * * 1720 * URSETLGFSES. This request basically sets a field in * 1721 * the PSA that indicates what session is to receive a class 4 * 1722 * message at logoff time. The sending of the message is * 1723 * supervised by Control Mode. This keeps a lot of * 1724 * unnecessary code out of the system. To get the current * 1725 * value use the URSESSINFO request. To clear the field * 1726 * simply pass a session number of zero. * 1727 * Call: * 1728 * LD R0 URSETLGFSES * 1729 * UREQ * 1730 * JLTZ R0 * 1731 * * 1732 * Stack required = 0 * 1733 * * 1734 ********************************************************************************** 1735 1736 BLOCK UREQSLSESS subroutine 1737 ENTRY UREQSLSESS 1738 00008A80 1739 UREQSLSESS LABEL 1740 * R3 <= session number 08A80 64C41000 3 IMM 1741 CPR R3 MAXPROCNUM don't let things get out of hand 08A81 FE0659DA 1742 JGE UERRORPOB parameter out of bounds 08A82 60000412 0 1743 LD R0 CPPSA current process status area 08A83 E4C808B3 3 0 ZBM 1744 ST R3 R0,PSLGFSESS set the proper field 08A84 FE0E59D6 1745 JMP NOERROR no problems 1746 * --- 1747 1748 END UREQSLSESS subroutine 1749 1750 BLOCK 1751 ENTRY UREQDROPPRV 1752 1753 ********************************************************************************** 1754 * This request is used to relinquish a privilege that a * 1755 * program does not wish to have in effect. * 1756 * Calling format: * 1757 * * 1758 * LD R0 URDROPPRIV * 1759 * LD R1 set of privs to drop * 1760 * UREQ 0 * 1761 * * 1762 ********************************************************************************** 1763 00008A85 1764 UREQDROPPRV LABEL 08A85 60570803 1 4 BASE 1765 LD R1 R4,CAR1 R1 = set of privileges 08A86 6084000A 2 IMM 1766 LD R2 PRIVMAX-1 prepare to check each priv 08A87 61400414 5 1767 LD R5 CPCUPC most things will need current UPC 00008A88 1768 CHECKONE LABEL 08A88 F27E8A8A 1 1769 JBF R1/BIT 31 NEXT jump if not removing this one 08A89 5CA48A8D 2 1770 LDPC RMPRIV(R2) remove the privilege 00008A8A 1771 NEXT LABEL 08A8A 604A41F0 1 1 CBM 1772 LD R1 R1/BITS 0:30 move next priv bit into position 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1937 (XRQUREQ1) F 123 UREQ - Change session/process attributes 08A8B FAA68A88 2 1773 JDR R2 CHECKONE check the next privilege 08A8C FE0E59D6 1774 JMP NOERROR 1775 * --- 08A8D 00008AA9 1776 RMPRIV ADR RMRESTRG1 08A8E 00008AAB 1777 ADR RMRESTRG2 08A8F 00008AAD 1778 ADR RMRESTRG3 08A90 00008AAF 1779 ADR RMRESTRG4 08A91 00008AB1 1780 ADR RMRESTRG5 08A92 00008AA7 1781 ADR RMMAINTW 08A93 00008AA5 1782 ADR RMMAINTR 08A94 00008AA3 1783 ADR RMOPR 08A95 00008AA1 1784 ADR RMMGR 08A96 00008A9F 1785 ADR RMBACKUP 08A97 00008A98 1786 ADR RMOWNDIR 0000000B ABS 1787 PRIVMAX EQU DISPW RMPRIV 1788 1789 00008A98 1790 RMOWNDIR LABEL 08A98 61095F13 4 5 ZBM 1791 LD R4 R5,UPCPRIVULB get current privilege account 08A99 DC405526 1792 CALLNP FREEULB give up our access to it 08A9A 60C00412 3 1793 LD R3 CPPSA get pointer to current PSA 08A9B 6108DF13 4 3 ZBM 1794 LD R4 R3,PSUSERLIMP get pointer to logon ULB 08A9C E5095F13 4 5 ZBM 1795 ST R4 R5,UPCPRIVULB and make it the privilege acct 08A9D DC405569 1796 CALLNP USEULB say we're using it 08A9E FE0E8A8A 1797 JMP NEXT 1798 * --- 1799 00008A9F 1800 RMBACKUP LABEL 08A9F EDC94C10 5 ZBM 1801 STW R5,UPBACKUP 08AA0 FE0E8A8A 1802 JMP NEXT 1803 * --- 00008AA1 1804 RMMGR LABEL 08AA1 EDC94A10 5 ZBM 1805 STW R5,UPMANAGR 08AA2 FE0E8A8A 1806 JMP NEXT 1807 * --- 00008AA3 1808 RMOPR LABEL 08AA3 EDC95210 5 ZBM 1809 STW R5,UPOPREQ 08AA4 FE0E8A8A 1810 JMP NEXT 1811 * --- 00008AA5 1812 RMMAINTR LABEL 08AA5 EDC95010 5 ZBM 1813 STW R5,UPMAINTR 08AA6 FE0E8A8A 1814 JMP NEXT 1815 * --- 00008AA7 1816 RMMAINTW LABEL 08AA7 EDC94E10 5 ZBM 1817 STW R5,UPMAINTW 08AA8 FE0E8A8A 1818 JMP NEXT 1819 * --- 00008AA9 1820 RMRESTRG1 LABEL 08AA9 EDC95C10 5 ZBM 1821 STW R5,UPRSTCTG1 08AAA FE0E8A8A 1822 JMP NEXT 1823 * --- 00008AAB 1824 RMRESTRG2 LABEL 08AAB EDC95A10 5 ZBM 1825 STW R5,UPRSTCTG2 08AAC FE0E8A8A 1826 JMP NEXT 1827 * --- 00008AAD 1828 RMRESTRG3 LABEL 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1938 (XRQUREQ1) F 123 UREQ - Change session/process attributes 08AAD EDC95810 5 ZBM 1829 STW R5,UPRSTCTG3 08AAE FE0E8A8A 1830 JMP NEXT 1831 * --- 00008AAF 1832 RMRESTRG4 LABEL 08AAF EDC95610 5 ZBM 1833 STW R5,UPRSTCTG4 08AB0 FE0E8A8A 1834 JMP NEXT 1835 * --- 00008AB1 1836 RMRESTRG5 LABEL 08AB1 EDC95410 5 ZBM 1837 STW R5,UPRSTCTG5 08AB2 FE0E8A8A 1838 JMP NEXT 1839 * --- 1840 END UREQDROPPRV routine 1841 1842 END Change session/process attributes 183 INPUT XRQUREQ2 user request processor (2) 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1939 (XRQUREQ2) F 124 UREQ - date/time request 3 4 ********************************************************************************** 5 * * 6 * Requests that fetch the current date and time in * 7 * assorted formats. * 8 * * 9 * Stack required = 9 * 10 * 0 + max ( GETDATE (1), GETFSEQN (1), PACKDATE (8), * 11 * TIMENOW (1), UERRORILR (3), UNPACKDATE (9) ) * 12 * * 13 ********************************************************************************** 14 15 BLOCK UREQDATE routine 16 17 ENTRY UREQDATE 18 00008AB3 19 UREQDATE LABEL 08AB3 6484000E 2 IMM 20 CPR R2 URDATEMAX a reasonable request? 08AB4 FE0659D8 21 JGE UERRORILR 08AB5 5CA48AB6 2 22 LDPC URDATEJMP(R2) goto routine 23 * --- 24 00008AB6 25 URDATEJMP LABEL 08AB6 00008AC4 26 VFD ADR URRRAWDATE plain UT raw date 08AB7 00008AC9 27 VFD ADR USRFSERNO unassigned code 08AB8 00008ACE 28 VFD ADR UNRDATE unpack raw date 08AB9 00008AD0 29 VFD ADR UNLDATE convert now to local time and unpack 08ABA 00008AD9 30 VFD ADR DATECONV unpack given date 08ABB 00008AD2 31 VFD ADR UGLDATE unpack given date, make local first 08ABC 000059D8 32 ADR UERRORILR illegal request 08ABD 000059D8 33 ADR UERRORILR illegal request 08ABE 000059D8 34 ADR UERRORILR illegal request 08ABF 000059D8 35 ADR UERRORILR illegal request 08AC0 000059D8 36 ADR UERRORILR illegal request 08AC1 000059D8 37 ADR UERRORILR illegal request 08AC2 00008AE9 38 ADR PAKTIME pack date, given time zone 08AC3 00008AE6 39 ADR PAKTIML pack date, assume local 0000000E ABS 40 URDATEMAX EQU DISPW URDATEJMP 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1940 (XRQUREQ2) F 124 UREQ - Raw date/time fetch 43 44 ********************************************************************************** 45 * * 46 * URRAWDATE. Fetches the raw system time. The time is * 47 * given in the rawest form imaginable -- as a 64 bit number * 48 * which is the number of milliseconds since 0000 17 Nov 1858 * 49 * (can you believe it?). * 50 * URFSERNO. Essentially the same as URRAWDATE, except * 51 * that the time is guarenteed to be a unique number assigned * 52 * by the system. It is usually within 100 Ms of the current * 53 * rawdate. * 54 * Call: * 55 * LD R0 URRAWDATE * 56 * UREQ 0 * 57 * JLTZ R0 request.error * 58 * ST R1 timezone.info * 59 * ST2 R2 the.raw.time * 60 * * 61 ********************************************************************************** 62 00000170 BYTE 63 YEARBITS BITS 0:22 position in packed word of year 00080172 0 ZBM 64 YEAR EQU CAR0/YEARBITS holds year and partial sums thereto 65 * really only BITS 11:22, but this 66 * zeroes the remainder of CAR0 00002E40 BYTE 67 MONTHBITS BITS 23:26 position in packed word of month 00082E42 0 ZBM 68 MONTH EQU CAR0/MONTHBITS holds month, Jan=1 00003650 BYTE 69 DATEBITS BITS 27:31 position in packed word of date 00083652 0 ZBM 70 DATE EQU CAR0/DATEBITS holds day of month, First=1 00160803 0 BASE 71 TZONE EQU CAR1 gets the time zone word 00160804 0 BASE 72 TIME EQU CAR2 holds time of day in msec., midnite=0 00160805 0 BASE 73 DAY EQU CAR3 holds day of week, Sun=0 74 00008AC4 75 URRRAWDATE LABEL 08AC4 DC404532 76 CALLNP TIMENOW get the current time 08AC5 E6170804 014 BASE 77 ST2 R0 R4,CAR2 return to user in R2R3 08AC6 60001EEF 0 78 LD R0 TIMEZONE get the current time zone information 08AC7 E4170803 0 4 BASE 79 ST R0 R4,TZONE give to user 08AC8 FE0E59D6 80 JMP NOERROR 81 * --- 82 00008AC9 83 USRFSERNO LABEL 08AC9 DC404555 84 CALLNP GETFSEQN get a file serial number 08ACA E6170804 014 BASE 85 ST2 R0 R4,CAR2 return to user 08ACB 60001EEF 0 86 LD R0 TIMEZONE get the current time zone information 08ACC E4170803 0 4 BASE 87 ST R0 R4,TZONE return to user 08ACD FE0E59D6 88 JMP NOERROR 89 * --- 90 91 ********************************************************************************** 92 * Various date unpackers. * 93 ********************************************************************************** 94 00008ACE 95 UNRDATE LABEL 08ACE DC404549 96 CALLNP GETDATE get the current clock value 08ACF FE0E8ADA 97 JMP DATEUNPACK go share unpacker 98 * --- 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1941 (XRQUREQ2) F 124 UREQ - Raw date/time fetch 99 00008AD0 100 UNLDATE LABEL 08AD0 DC404549 101 CALLNP GETDATE get the current clock value 08AD1 FE0E8AD3 102 JMP TOLOCAL convert to local, unpack 103 * --- 104 00008AD2 105 UGLDATE LABEL 08AD2 62170804 014 BASE 106 LD2 R0 R4,CAR2 pick up the time given 00008AD3 107 TOLOCAL LABEL 08AD3 60C01EEF 3 108 LD R3 TIMEZONE get the time zone stuff 08AD4 708AF010 2 3 CBM 109 LDN R2 R3/BIT 24 get the sign bit of the byte 08AD5 E48AC180 2 3 CBM 110 ST R2 R3/BITS 0:23 sign extend the number 08AD6 1E80255A 23 111 MUL2 R2 ONEHOUR2 make time zone difference into msecs 08AD7 1A148000 0123 PAIR 112 ADD2 R0 PAIR R2 adjust time 08AD8 FE0E8ADA 113 JMP DATEUNPACK go share unpacker 114 * --- 115 116 ********************************************************************************** 117 * * 118 * DATE CONVERTER * 119 * I'll bet you didn't think that it was possible to * 120 * convert the raw date to a usable form. Watch my smoke! * 121 * The trick is to work with a pseudo-year that starts on * 122 * March first. That makes the troublesome leap day fall at * 123 * the end of the pseudo-year where it's easy to deal with. * 124 * We also work with four year chunks, again starting the day * 125 * after leap year. * 126 * * 127 ********************************************************************************** 128 00008AD9 129 DATECONV LABEL 08AD9 62170804 014 BASE 130 LD2 R0 R4,CAR2 get time to be unpacked 00008ADA 131 DATEUNPACK LABEL 08ADA 5C0A0140 0 CBM 132 CMZ R0/BITS 0:19 check for number out of bounds 08ADB FE0C59DA 133 JNE UERRORPOB we have a way of dealing with turkeys 08ADC DC005ACC 134 CALL UNPACKDATE unpack into the fields 08ADD 43540000 01 PAIR 135 PARV2 PAIR R0 the date to unpack 08ADE 41170804 4 BASE 136 PAR R4,TIME milliseconds in today 08ADF 41093652 4 ZBM 137 PAR R4,DATE the date in the month 08AE0 41092E42 4 ZBM 138 PAR R4,MONTH the month code (JAN=1) 08AE1 41090172 4 ZBM 139 PAR R4,YEAR the year 08AE2 40170805 4 BASE 140 PARL R4,DAY the day of the week 08AE3 60001EEF 0 141 LD R0 TIMEZONE get the current time zone information 08AE4 E4170803 0 4 BASE 142 ST R0 R4,TZONE give to user 08AE5 FE0E38CF 143 JMP XREQRETURN request done 144 * --- 145 146 ********************************************************************************** 147 * * 148 * Date Packer * 149 * Packs the user supplied date into the system date * 150 * format. Note that the user must supply YEAR (R3/bits * 151 * 0:22), MONTH (R3/bits 23:26), DATE (R3/bits 27:31), and the * 152 * time of day (R2). The year must be in the range of 1858 to * 153 * 2400 ( a 79 will NOT be assumed to be 1979). The right 8 * 154 * bits of R1 contain the timezone hour offset ( the PAKTIML * 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1942 (XRQUREQ2) F 124 UREQ - Raw date/time fetch 155 * request uses the system variable TIMEZONE, that is, local * 156 * time ). The result is returned in R0,R1. * 157 * * 158 ********************************************************************************** 159 00008AE6 160 PAKTIML LABEL 08AE6 DC005AFF 161 CALL PACKDATE pack up the date 08AE7 61401EEF 5 162 LD R5 TIMEZONE get the current time zone 08AE8 FE0E8AEA 163 JMP PAKTIMEN go enter pack time code 164 * --- 165 00008AE9 166 PAKTIME LABEL 08AE9 61570803 5 4 BASE 167 LD R5 R4,CAR1 get the time zone to be used 00008AEA 168 PAKTIMEN LABEL 08AEA 60490175 1 4 ZBM 169 LD R1 R4,CAR3/YEARBITS get the year indicated 08AEB 60892E45 2 4 ZBM 170 LD R2 R4,CAR3/MONTHBITS get the month 08AEC 64440742 1 IMM 171 CPR R1 1858 check for too early a year 08AED FE0859DA 172 JLT UERRORPOB give parameter out of bounds 08AEE 64440970 1 IMM 173 CPR R1 2416 or too long into the future 08AEF FE0459DA 174 JGT UERRORPOB give parameter out of bounds 08AF0 6484000C 2 IMM 175 CPR R2 12 check for a legal month 08AF1 FE0459DA 176 JGT UERRORPOB also a parameter out of bounds 08AF2 DC005AFF 177 CALL PACKDATE convert calander fields to 44 bits 08AF3 43170802 4 BASE 178 PAR2 R4,CAR0 return in the user's registers 08AF4 41570804 4 BASE 179 PARV R4,CAR2 milliseconds in today 08AF5 41493655 4 ZBM 180 PARV R4,CAR3/DATEBITS date in the month 08AF6 41492E45 4 ZBM 181 PARV R4,CAR3/MONTHBITS month code 08AF7 40490175 4 ZBM 182 PARVL R4,CAR3/YEARBITS the year 08AF8 60534000 1 5 REG 183 LD R1 R5 get the timezone code 08AF9 700A7010 0 1 CBM 184 LDN R0 R1/BIT 24 get the sign bit 08AFA E40A4180 0 1 CBM 185 ST R0 R1/BITS 0:23 sign extend the zone offset 08AFB 1E00255A 01 186 MUL2 R0 ONEHOUR2 convert to milliseconds 08AFC B2170802 014 BASE 187 RSB2M R0 R4,CAR0 remove zone (return UT) 08AFD FE0E38CF 188 JMP XREQRETURN done 189 * --- 190 191 END UREQDATE routine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1943 (XRQUREQ2) F 124 UREQ - Program Termination Request 194 195 ********************************************************************************** 196 * * 197 * This request is made to terminate a program. Control * 198 * is passed the next higher level with the UREQ sub operation * 199 * as the reason why the program stopped and any post-program * 200 * actions (release memory, reset luns, ...). The termination * 201 * code is placed in the error list and thus the program is * 202 * stopped and the next higher level gets the termination * 203 * code. * 204 * Depending on the sub operation code, we may also * 205 * increment the program counter of the requesting program. * 206 * * 207 * Stack required = 1 * 208 * 0 + max ( UERRSET (1) ) * 209 * * 210 ********************************************************************************** 211 212 BLOCK UREQSTOP routine 213 ENTRY UREQSTOP 214 00003A10 BYTE 215 INCPCBIT EQU BIT 29 if on in sub op code, we must increment PC 216 00008AFE 217 UREQSTOP LABEL 08AFE F2BA8B00 2 218 JBF R2/INCPCBIT NOINCPC jump if need not increment PC 08AFF D0091F10 4 ZBM 219 INC R4,CAPC increment the PC 220 * \ / 221 00008B00 222 NOINCPC LABEL 08B00 60D28000 3 2 REG 223 LD R3 R2 place the stop subcode in R3 08B01 6084007E 2 IMM 224 LD R2 UINTPTERM code for program stop 08B02 DC403589 225 CALLNP UERRSET set error code 08B03 FE0E38DF 226 JMP XREQRTNX 227 * --- 228 229 END UREQSTOP routine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1944 (XRQUREQ2) F 124 UREQ - user interrupt control 232 233 ********************************************************************************** 234 * * 235 * These requests handle the user interrupt system. The * 236 * requests to directly get and set the interrupt arming array * 237 * and the interrupt address are elsewhere. Two requests are * 238 * here that selectively set or clear the arming mask and one * 239 * request to return from an interrupt (since register setting * 240 * and enabling must be simulations). * 241 * Several other requests are for setting up an * 242 * underprocess to debug other underprocesses in the tree. * 243 * Two requests set and clear a flag in the current UPC saying * 244 * that the process is a debugger (needed to make debugger * 245 * transparent). One request sends an error code and * 246 * parameter to the specified underprocess (enables debugger * 247 * to look at errors and then pass them back through the * 248 * normal, direct parent process, route). * 249 * Two other requests indicate that errors on certain * 250 * processes are not to go directly up, but to a prespecified * 251 * process (i.e. a debugger). * 252 * * 253 * Stack required = 13 * 254 * 0 + max ( CHECKNOINT (2), CHECKUINT (5), INDEXPROC (4), * 255 * INDXPROCX (4), MOVETRMGX (5), SETMEMTRAP (1), * 256 * UREQCERRP (4), UREQSERRP (4), URQSENDERR (13) ) * 257 * * 258 ********************************************************************************** 259 260 BLOCK UREQINT routine 261 262 ENTRY UREQINT 263 00008B04 264 UREQINT LABEL 08B04 6884000B 2 IMM 265 UCPR R2 URINTMAX check for excessively large sub-op 08B05 FE0659D8 266 JGE UERRORILR if too big, illegal request 08B06 5CA48B07 2 267 LDPC URINTJMP(R2) go to appropriate routine 268 * --- 269 00008B07 270 URINTJMP LABEL 08B07 00008B12 271 VFD ADR SSARMM 0 - selectively set mask 08B08 00008B12 272 VFD ADR SCARMM 1 - selectively clear mask 08B09 00008B34 273 VFD ADR RTNFROMINT 2 - return from interrupt 08B0A 000059D8 274 VFD ADR UERRORILR 3 - illegal request 08B0B 000059D8 275 VFD ADR UERRORILR 4 - illegal request 08B0C 00008B51 276 VFD ADR URQSETDBUG 5 - set flag saying whether UPC is debugger 08B0D 00008B54 277 VFD ADR URQCLRDBUG 6 - clear flag saying whether UPC is debugger 08B0E 00008B58 278 VFD ADR URQSENDERR 7 - send error to an underprocess (and GO it) 08B0F 00008B7C 279 VFD ADR UREQSERRP 8 - set process to receive upward bound errors 08B10 00008B85 280 VFD ADR UREQCERRP 9 - clear process to receive upward bound errors 08B11 00008B2B 281 VFD ADR RTNANDGO A - return from interrupt, GO an underprocess 0000000B ABS 282 URINTMAX EQU DISPW URINTJMP specify largest sub-op allowed 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1945 (XRQUREQ2) F 124 Set/Clear interupt mask register 285 286 ********************************************************************************** 287 * * 288 * Selectively set/clear IMR bits. Once this is done we * 289 * remove any interrupts that are no longer selected and give * 290 * interrupts that are now pending. Also, if NE terminal * 291 * trapping by the current underprocess is affected, we must * 292 * ensure the TCG/TCS for the console terminal matches that of * 293 * the process (if any) now trapping that terminal. * 294 * * 295 * Stack required = 5 * 296 * 0 + max ( INDEXPROC (4), CHECKNOINT (2), CHECKUINT (5) ). * 297 * * 298 ********************************************************************************** 299 00008B12 300 SSARMM LABEL 00008B12 301 SCARMM LABEL 08B12 DC4087E9 302 CALLNP INDEXPROC evaluate the process pointer 08B13 FE0E59E0 303 JMP UERRORMNRP not legal reference 08B14 FA7059E2 1 304 JZA R1 UERRORNSPP jump if no such person 08B15 60C85F12 3 1 ZBM 305 LD R3 R1,UPCCONSOLE R3 => CA with IMR to change 08B16 60170803 0 4 BASE 306 LD R0 R4,CAR1 R0 = users selection mask 08B17 6156C80B 5 3 BASE 307 LD R5 R3,CAINTMASK get old mask 08B18 5D648B29 2 308 XCT SCARINST(R2) add or remove bits 08B19 6016C80B 0 3 BASE 309 LD R0 R3,CAINTMASK get the current interrupt mask 08B1A E4170803 0 4 BASE 310 ST R0 R4,CAR1 return new mask in R1 08B1B 64400414 1 311 CPR R1 CPCUPC doing current process? 08B1C FE0C38D4 312 JNE MONITORRTN jump if not 313 * \ / 314 315 ********************************************************************************** 316 * Changing the IMR of the current process. Re-evaluate * 317 *terminating character specifications on the absolute * 318 *input port, if either CAINTENABL or CAIMNETERM changed. * 319 *Remove pending, but now unwanted, interrupts. Issue * 320 *now wanted interrupts. * 321 ********************************************************************************** 322 323 * R0 = new IMR, R3 => victim's CA, R5 = old IMR 08B1D 74134000 0 5 REG 324 XOR R0 R5 R0 = bits that changed 08B1E FA088B20 0 325 JLTZ R0 YESRESET jump if bit 0 did 08B1F F2108B21 0 326 JBF R0/BIT CAIMNETERM NORESET jump if this one didn't 00008B20 327 YESRESET LABEL 08B20 DC40337E 328 CALLNP MOVETRMGX shuffle TCG/TCS on console TCB, if any 00008B21 329 NORESET LABEL 330 08B21 6112C000 4 3 REG 331 LD R4 R3 for calls 08B22 60D34000 3 5 REG 332 LD R3 R5 get old mask 08B23 28D7080B 3 4 BASE 333 BSUB R3 R4,CAINTMASK find bits turned off 08B24 DC40343C 334 CALLNP CHECKNOINT remove interrupts that were disabled 335 08B25 60D7080B 3 4 BASE 336 LD R3 R4,CAINTMASK new mask 08B26 28D34000 3 5 REG 337 BSUB R3 R5 find bits turned on 08B27 DC4033C2 338 CALLNP CHECKUINT add any interrupts that were enabled 339 08B28 FE0E38D4 340 JMP MONITORRTN return,done 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1946 (XRQUREQ2) F 124 Set/Clear interupt mask register 341 * --- 342 00008B29 343 SCARINST LABEL execute table for set/clear int mask 08B29 FC16C80B 0 3 BASE 344 IORM R0 R3,CAINTMASK set bits in interrupt mask 08B2A A816C80B 0 3 BASE 345 BRSBM R0 R3,CAINTMASK clear bits in interrupt mask 346 * --- 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1947 (XRQUREQ2) F 124 Return from interrupt 349 350 ********************************************************************************** 351 * * 352 * We are to return from a user interrupt. The operand * 353 * of the request is the address of where to get the * 354 * registers. So we restore the registers, turn on the * 355 * interrupts, then return to him. URINTRTN returns to a * 356 * the current underprocess, URINTRGO returns to the specified * 357 * underprocess (possibly the current one). * 358 * * 359 * LD R0 URINTRTN | URINTRGO * 360 * LD R1 for URINTRGO * 361 * UREQ * 362 * R0 = error code | * 363 * * 364 * Stack required = 6 * 365 * 0 + max ( CHECKUINT (5), INDEXPROCX (4), MOVETRMGX (6), * 366 * SETMEMTRAP (1) ) * 367 * * 368 ********************************************************************************** 369 00008B2B 370 RTNANDGO LABEL 08B2B 6152C000 5 3 REG 371 LD R5 R3 save reg buffer address 08B2C 60D70803 3 4 BASE 372 LD R3 R4,CAR1 get PSN to nudge 08B2D DC4087E6 373 CALLNP INDEXPROCX check w/respect to CPCUPC 08B2E FE0E59E0 374 JMP UERRORMNRP not legal reference 08B2F FA7059E0 1 375 JZA R1 UERRORMNRP no such UPC exit 08B30 60D34000 3 5 REG 376 LD R3 R5 restore reg buffer address 08B31 61524000 5 1 REG 377 LD R5 R1 save destination UPC 08B32 EDCBC010 7 CBM 378 STW R7/BIT 0 say to do GO 08B33 FE0E8B35 379 JMP RTNSHARE share some code 380 * --- 381 00008B34 382 RTNFROMINT LABEL 08B34 EC0BC010 7 CBM 383 STZ R7/BIT 0 say no GO 00008B35 384 RTNSHARE LABEL 08B35 DC005BCF 385 CALL SETMEMTRAP allow for user memory failure 08B36 40005B5F 386 PARL PASSERRUP indicate errors go up a level 08B37 5C093611 4 ZBM 387 CMZ R4,CAMSR/MSRIRELOCB check the users relocation 08B38 FE0C8B3A 388 JNE MONITROG jump if in monitor 08B39 59840040 IMM 389 CLBMSR MSRFRELOC otherwise, set to user space 00008B3A 390 MONITROG LABEL 08B3A 78C5FFFF 3 IMM 391 AND R3 ONEBITS/FLDADRS isolate address 08B3B 6016C808 0 3 BASE 392 LD R0 R3,DISPPC fetch PC from interrupt block 08B3C E4091F10 0 4 ZBM 393 ST R0 R4,CAPC set new PC 394 08B3D 6016C809 0 3 BASE 395 LD R0 R3,DISPPSR fetch PSR from interrupt block 08B3E 604A0080 1 0 CBM 396 LD R1 R0/CH0 retrieve instruction restart code 08B3F E4490081 1 4 ZBM 397 ST R1 R4,CAMSR/MSRRSTRT place into new MSR 08B40 EC0A0080 0 CBM 398 STZ R0/CH0 zero out field that held restart code 08B41 E40900F0 0 4 ZBM 399 ST R0 R4,CAPSR set new PSR 400 08B42 3816C800 0 3 BASE 401 LEA R0 R3,DISPR0 get address of registers in interrupt block 08B43 60440020 1 IMM 402 LD R1 8*CPW character count for move 08B44 38970802 2 4 BASE 403 LEA R2 R4,CAR0 get address in real CA 08B45 FE400000 404 CMOVE move the registers in 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1948 (XRQUREQ2) F 124 Return from interrupt 08B46 59C40040 IMM 405 IORMSR MSRFRELOC restore proper monitor relocation 08B47 EDC9001B 4 ZBM 406 STW R4,CAINTENABL interrupts on 08B48 F3C08B4C 7 407 JBF R7/BIT 0 KICKME jump if URINTRTN 08B49 60534000 1 5 REG 408 LD R1 R5 copy UPC ptr back 08B4A 64400414 1 409 CPR R1 CPCUPC returning to self? 08B4B FE0C8C81 410 JNE URQGODWN jump if URINTRGO to underling 00008B4C 411 KICKME LABEL 08B4C 60D7080B 3 4 BASE 412 LD R3 R4,CAINTMASK save for int check 08B4D F2D08B4F 3 413 JBF R3/BIT CAIMNETERM NOTTERM jump if not turning on this int 08B4E DC40337E 414 CALLNP MOVETRMGX install correct TCG/TCS in TCB 00008B4F 415 NOTTERM LABEL 08B4F DC4033C2 416 CALLNP CHECKUINT see if any interrupts are to happen 08B50 FE0E38DF 417 JMP XREQRTNX return without diddling registers 418 * --- 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1949 (XRQUREQ2) F 124 Set/clear debugger bit 421 422 ********************************************************************************** 423 * * 424 * URSETDEBUG. URCLRDEBUG. These requests manipulate * 425 * the flag UPC indicating whether the process is a debugger. * 426 * This is used to decide whether errors coming from the * 427 * immediate underprocess are given or passed up again. * 428 * * 429 * Call: LD R0 * 430 * UREQ 0 * 431 * * 432 * * 433 ********************************************************************************** 434 00008B51 435 URQSETDBUG LABEL 08B51 FACC59DA 3 436 JNEZ R3 UERRORPOB operand must be zero 08B52 60040001 0 IMM 437 LD R0 1 value to say UPC is debugger 08B53 FE0E8B55 438 JMP URQDBSHARE share the little remaining code 439 * --- 440 00008B54 441 URQCLRDBUG LABEL 08B54 60040000 0 IMM 442 LD R0 0 value to say UPC is not debugger 443 * \ / 444 00008B55 445 URQDBSHARE LABEL 08B55 60400414 1 446 LD R1 CPCUPC get current process 08B56 E4084E11 0 1 ZBM 447 ST R0 R1,UPCIMDBUG give value to flag 08B57 FE0E59D6 448 JMP NOERROR 449 * --- 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1950 (XRQUREQ2) F 124 Send error to underprocess 452 453 ********************************************************************************** 454 * * 455 * URSENDERR. This request creates a custom error element * 456 * from the users parameters, places it on the current * 457 * session, and then lets the specified under- process run to * 458 * handle it. * 459 * The messiness involves determining whether the error * 460 * code corresponds to a logical unit and, if so, when to * 461 * convert the parameter from a unit number to an FCB address. * 462 * The user sees the param as a unit number, but because of * 463 * local units it must be kept internally as the corresponding * 464 * FCB address. * 465 * The unit number may be negative, in which case it is * 466 * converted using the local unit list of the target * 467 * underprocess. This is provided so the requester can return * 468 * errors it received (as a debugger) from a local unit of the * 469 * process it is debugging. * 470 * Because the error might cause control to be returned * 471 * one of our overprocesses, and that overprocess could URPGO * 472 * on us we must take precautions to ensure that we do not * 473 * re-send the error. Therefore, we change the requesters R0 * 474 * to URPGO. This has the positive effect of starting the * 475 * underprocess (as we do when we first give the error, what * 476 * the requester expects) without duplicating the error. Got * 477 * anything cleaner? * 478 * * 479 * Call: LD R0 URSENDERR * 480 * LD R1 * 481 * LD R2 * 482 * UREQ * 483 * R0 = termination code | error code * 484 * R1 = termination subcode * 485 * R2 = process serial number * 486 * * 487 * Stack usage = 13 * 488 * 2 + max ( INDEXPROC (4), LUNSEARCH (2), OVPDOWNONE (11) * 489 * UERRSETY (1) ) * 490 * * 491 ********************************************************************************** 492 493 URQSENDERR BLOCK 494 ENTRY URQSENDERR 495 496 BEGFRAME2 00178800 6 BASE 497 ERRANDPARM BSS 2 498 ENDFRAME 499 00008B58 500 URQSENDERR LABEL 08B58 DC4087E9 501 CALLNP INDEXPROC can we touch the UPC? 08B59 FE0E59E0 502 JMP UERRORMNRP can't touch XO 08B5A FA7059E2 1 503 JZA R1 UERRORNSPP jump if no such underprocess 504 505 * R1 points to the proper UPC 08B5B EC1F8002 6 STAK 506 STZ PUSH allocate stack 08B5C 61400412 5 507 LD R5 CPPSA R5 => PSA 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1951 (XRQUREQ2) F 124 Send error to underprocess 08B5D 60095F11 0 5 ZBM 508 LD R0 R5,PSCACHNP1 get users console area 08B5E 608400D0 2 IMM 509 LD R2 URPGO get xreq code for GO 08B5F E4960802 2 0 BASE 510 ST R2 R0,CAR0 if re-executed, we do a URPGO 08B60 62960803 230 BASE 511 LD2 R2 R0,CAR1 get error code and param 08B61 788403FF 2 IMM 512 AND R2 (ONEBITS*CODEPART)/CODEPART isolate error code 08B62 E6978800 236 BASE 513 ST2 R2 SP,ERRANDPARM save on stack 08B63 60000414 0 514 LD R0 CPCUPC get requesters process 08B64 60080E11 0 0 ZBM 515 LD R0 R0,UPCIMDBUG get bit whether debugger 08B65 E409AA10 0 6 ZBM 516 ST R0 SP,ERRANDPARM/SKIPDEBUGB add into error code 517 * \ / 518 519 * R2 = error code, R3 = parameter, R5 = CPPSA 08B66 5C3434E9 2 @ 520 CMZ @SCCONPTR(R2) array sez whether error is for lun 08B67 ED93C000 7 REG 521 STLNE R7 save answer 08B68 FE028B6D 522 JEQ MOVEDOWN jump if param is OK 523 * \ / 524 525 * Code is for unit error. Param gives unit number. 526 * This is neg if unit is on target underprocess. 08B69 FACA8B6D 3 527 JLEZ R3 MOVEDOWN jump if "unit number" is negative 08B6A DC405B39 528 CALLNP LUNSEARCH convert unit to FCB address or 0 08B6B E5578801 5 6 BASE 529 ST FCB SP,ERRANDPARM(1) save param with code 08B6C 61C40000 7 IMM 530 LD R7 0 say there is no need to convert 531 * \ / 532 533 * Relocate to target underprocess. 534 * R1 still points to UPC, believe it or not! 00008B6D 535 MOVEDOWN LABEL 08B6D 64400414 1 536 CPR R1 CPCUPC sending to ourselves? 08B6E FE028B72 537 JEQ MOVED if so, no need for call 08B6F DC003330 538 CALL OVPDOWNONE move down to spec'd UPC 08B70 40524000 1 REG 539 PARVL R1 pass UPC address 08B71 001311E3 540 HALT HALTS11E3 halt if UPC disappeared 541 * \ / 542 543 * Now positioned at target UPC, try again to convert param. 544 * R7 is 0 if either the error is not for a logical unit 545 * or we have already converted the param to an FCB address. 546 * R7 = 1 means that the param is the neg of the real unit #. 00008B72 547 MOVED LABEL 08B72 FBC28B76 7 548 JEQZ R7 SCOK jump if param OK 08B73 70D78801 3 6 BASE 549 LDN R3 SP,ERRANDPARM(1) get param (unit) for call 08B74 DC405B39 550 CALLNP LUNSEARCH look on the target underprocess for FCB 08B75 E5578801 5 6 BASE 551 ST FCB SP,ERRANDPARM(1) save FCB with error code 552 * \ / 553 554 * R5 = CPPSA, error code and param OK on stack 00008B76 555 SCOK LABEL 08B76 0CC00000 556 IOFF turn off what UERRSETY will turn on 08B77 62978800 236 BASE 557 LD2 R2 SP,ERRANDPARM get codes to give 08B78 EC0AA810 2 CBM 558 STZ R2/VERYBADB don't let serious errors happen 08B79 61400412 5 559 LD R5 CPPSA help UERRSET by giving our PSA 08B7A DC4035B5 560 CALLNP UERRSETY give error to session 08B7B FE0E38DF 561 JMP XREQRTNX return without checking for session errors 562 * --- 563 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1952 (XRQUREQ2) F 124 Send error to underprocess 564 END URQSENDERR of URQSENDERR 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1953 (XRQUREQ2) F 124 Set/clear error process handler 567 568 ********************************************************************************** 569 * * 570 * These routines alter the flow of control from * 571 * underprocesses upward. Normally errors are passed to * 572 * Control Mode or the immediate overprocess. However, to * 573 * allow a debugger type of process to get errors passed * 574 * directly to it the following requests are available. * 575 * * 576 * Stack required = 4 * 577 * 0 + max ( INDEXPROC (4) ) * 578 * * 579 ********************************************************************************** 580 00008B7C 581 UREQSERRP LABEL 08B7C DC4087E9 582 CALLNP INDEXPROC search for the process to catch errors from 08B7D FE0E59E0 583 JMP UERRORMNRP may not look at execute only processes 08B7E FE0E8B80 584 JMP SETERPOK hopefully we have found it 08B7F FE0E59E0 585 JMP UERRORMNRP can not catch errors from ourselves 586 * --- 587 00008B80 588 SETERPOK LABEL 08B80 FA7059E2 1 589 JZA R1 UERRORNSPP underprocess does not exist 08B81 60000414 0 590 LD R0 CPCUPC current UPC pointer 08B82 60081371 0 0 ZBM 591 LD R0 R0,UPCSERNM serial number of the current process 08B83 E4085378 0 1 ZBM 592 ST R0 R1,UPCERRPSN process to pass errors directly to 08B84 FE0E59D6 593 JMP NOERROR thats all folks 594 * --- 595 00008B85 596 UREQCERRP LABEL 08B85 DC4087E9 597 CALLNP INDEXPROC search for the process to clear errors from 08B86 FE0E59E0 598 JMP UERRORMNRP may not look at execute only processes 08B87 FE0E8B89 599 JMP CLRERPOK hopefully we have found it 08B88 FE0E59E0 600 JMP UERRORMNRP can not catch errors from ourselves 601 * --- 602 00008B89 603 CLRERPOK LABEL 08B89 FA7059E2 1 604 JZA R1 UERRORNSPP underprocess does not exists 08B8A EC085378 1 ZBM 605 STZ R1,UPCERRPSN clear he who gets our errors 08B8B FE0E59D6 606 JMP NOERROR finished and no problems 607 * --- 608 609 END UREQINT routine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1954 (XRQUREQ2) F 124 UREQ - Logoff request 612 613 ********************************************************************************** 614 * * 615 * URBYE. Request to logoff the current process. This * 616 * information is merely passed to the over-process to handle * 617 * as he sees fit (control mode will log off the user while * 618 * debuggers intercept it and don't log off). * 619 * * 620 * Stack required = 1 * 621 * 0 + max ( UERRSET (1) ) * 622 * * 623 ********************************************************************************** 624 625 BLOCK UREQBYE routine 626 627 ENTRY UREQBYE 628 00008B8C 629 UREQBYE LABEL 08B8C FA8C59D8 2 630 JNEZ R2 UERRORILR if sub non-zero then illegal request 08B8D 60C00414 3 631 LD R3 CPCUPC current underprocess 08B8E 60C8D371 3 3 ZBM 632 LD R3 R3,UPCSERNM underprocess serial number 08B8F 6084007A 2 IMM 633 LD R2 UINTLOGOFF term code for logoff request 08B90 DC403589 634 CALLNP UERRSET set error - causes over proc to intervene 08B91 FE0E38DF 635 JMP XREQRTNX 636 * --- 637 638 END UREQBYE routine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1955 (XRQUREQ2) F 124 UREQ - get/set CPU time limit requests 641 642 ********************************************************************************** 643 * * 644 * URCPTIMES, URCPTIMEG. These requests get and set CPU * 645 * time limits. The UREQ specifies the process to perform the * 646 * operation to with zero meaning self. * 647 * Call: * 648 * LD R0 get/set.CPU.limit * 649 * [LD R1 new.limit] only if set * 650 * UREQ procnum * 651 * JLTZ R0 request.error * 652 * ST R1 previous.limit * 653 * ST R2 current.used * 654 * * 655 * Also included with this group are the requests to get the * 656 * usage and limits of CPU or wallclock time for the account * 657 * which limits the process, and one to get the wallclock time * 658 * usage and limit of the session. They have the same format as * 659 * above except that there is no set. * 660 * * 661 * Stack required = 4 * 662 * 0 + max ( GETDATE (1), INDEXPROC (4), UERRORILR (3) ) * 663 * * 664 ********************************************************************************** 665 666 BLOCK UREQCPUL routine 667 668 ENTRY UREQCPUL 669 00008B92 670 UREQCPUL LABEL 08B92 6484000A 2 IMM 671 CPR R2 URCPUMAX reasonable request? 08B93 FE0659D8 672 JGE UERRORILR sorry, no dice!!! 08B94 61528000 5 2 REG 673 LD R5 R2 place register here so it doesn't get zapped 674 * R5 <= request sub-code, R3 <= process serial number, 08B95 DC4087E9 675 CALLNP INDEXPROC get pointer to the process 08B96 FE0E59E0 676 JMP UERRORMNRP jump if access not allowed 08B97 FE0E59E0 677 JMP UERRORMNRP I don't do under programs 08B98 5CAA8B99 5 678 LDPC URCPUJMP(R5) goto routine 679 * --- 680 00008B99 681 URCPUJMP LABEL 08B99 00008BA3 682 VFD ADR UREQCPUS set 08B9A 00008BB2 683 VFD ADR UREQCPUG get 08B9B 000059D8 684 VFD ADR UERRORILR 08B9C 000059D8 685 VFD ADR UERRORILR 08B9D 000059D8 686 VFD ADR UERRORILR 08B9E 000059D8 687 VFD ADR UERRORILR 08B9F 000059D8 688 VFD ADR UERRORILR 08BA0 00008BB9 689 VFD ADR UREQSESWC get session wallclock used and limit 08BA1 00008BC3 690 VFD ADR UREQACCPL get limiting acct's CPU limit 08BA2 00008BC9 691 VFD ADR UREQACWCL get limiting acct's WC limit 0000000A ABS 692 URCPUMAX EQU DISPW URCPUJMP 693 694 * Set CPU limit 695 00008BA3 696 UREQCPUS LABEL 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1956 (XRQUREQ2) F 124 UREQ - get/set CPU time limit requests 08BA3 60000414 0 697 LD R0 CPCUPC get the current UPC pointer 08BA4 5C081C10 0 ZBM 698 CMZ R0,UPRSTCTG1 limit changing allowed? 08BA5 FE0C59F6 699 JNE UERRORURX jump if not 08BA6 60170803 0 4 BASE 700 LD R0 R4,CAR1 get the requested limit 08BA7 FA0859DA 0 701 JLTZ R0 UERRORPOB only 31 bits allowed 08BA8 6088DF13 2 3 ZBM 702 LD R2 R3,PSUSERLIMP logon ULB 08BA9 60568808 1 2 BASE 703 LD R1 R2,ULTIMLIM defined time limit 08BAA FA6C8BAE 1 704 JEQMW R1 SETTHISWAY jump if the account has no limits 08BAB 10568809 1 2 BASE 705 SUB R1 R2,ULTIMUSD R1 = seconds available on account 08BAC 50124000 0 1 REG 706 MIN R0 R1 limit limit 08BAD 54040000 0 IMM 707 MAX R0 0 ensure non-negative value 708 * \ / 709 00008BAE 710 SETTHISWAY LABEL 08BAE 1C0403E8 0 IMM 711 MUL R0 MSECSS convert seconds to miliseconds 08BAF FE1659DA 712 JOS UERRORPOB jump if too many ms 08BB0 E416C811 0 3 BASE 713 ST R0 R3,PSTIMLIM place as the new limit 08BB1 FE0E8BB3 714 JMP URCPUGSHR share some code 715 * --- 716 717 * Get CPU limit 718 00008BB2 719 UREQCPUG LABEL 08BB2 6016C811 0 3 BASE 720 LD R0 R3,PSTIMLIM get current limit 721 * \ / 722 00008BB3 723 URCPUGSHR LABEL 08BB3 140403E8 0 IMM 724 DIV R0 MSECSS convert milliseconds to seconds 08BB4 E4170803 0 4 BASE 725 ST R0 R4,CAR1 user's R1:=current limit 08BB5 6016C810 0 3 BASE 726 LD R0 R3,PSTIMEUSED time used 08BB6 140403E8 0 IMM 727 DIV R0 MSECSS convert milliseconds to seconds 08BB7 E4170804 0 4 BASE 728 ST R0 R4,CAR2 user's R2:=current used 08BB8 FE0E59D6 729 JMP NOERROR 730 * --- 731 732 * Get session wallclock used and remaining. Remaining is only an 733 * approximation because we do not consider other current users of 734 * the account. 735 00008BB9 736 UREQSESWC LABEL 08BB9 DC404549 737 CALLNP GETDATE get current date in R0,1 08BBA 1216C815 013 BASE 738 SUB2 R0 R3,PSHELDATE subtract off time of logon 08BBB 1604EA60 01 IMM 739 DIV2 R0 MSECSM turn into minutes 08BBC E4570804 1 4 BASE 740 ST R1 R4,CAR2 R2 := session wallclock used 08BBD 60C8DF13 3 3 ZBM 741 LD R3 R3,PSUSERLIMP get limiting ULB 08BBE 1856C80B 1 3 BASE 742 ADD R1 R3,ULWLCKUSD add in previous usage 08BBF 3056C80A 1 3 BASE 743 RSB R1 R3,ULWLCKLIM sub from limit 08BC0 54440000 1 IMM 744 MAX R1 0 disallow negative number 08BC1 E4570803 1 4 BASE 745 ST R1 R4,CAR1 R1 := session wallclock remaining 08BC2 FE0E59D6 746 JMP NOERROR make return 747 * --- 748 749 * Get limiting account's CPU limits 750 00008BC3 751 UREQACCPL LABEL 08BC3 6088DF13 2 3 ZBM 752 LD R2 R3,PSUSERLIMP logon ULB 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1957 (XRQUREQ2) F 124 UREQ - get/set CPU time limit requests 08BC4 60168808 0 2 BASE 753 LD R0 R2,ULTIMLIM defined limit 08BC5 E4170803 0 4 BASE 754 ST R0 R4,CAR1 user's R1:=CPU time limit 08BC6 60168809 0 2 BASE 755 LD R0 R2,ULTIMUSD time used 08BC7 E4170804 0 4 BASE 756 ST R0 R4,CAR2 user's R2:=CPU time used 08BC8 FE0E59D6 757 JMP NOERROR 758 * --- 759 760 * Get limiting account's wall clock limits 761 00008BC9 762 UREQACWCL LABEL 08BC9 6088DF13 2 3 ZBM 763 LD R2 R3,PSUSERLIMP get pointer to account that limits 08BCA 6016880A 0 2 BASE 764 LD R0 R2,ULWLCKLIM 08BCB E4170803 0 4 BASE 765 ST R0 R4,CAR1 user's R1:=WC limit (in sec.) 08BCC 6016880B 0 2 BASE 766 LD R0 R2,ULWLCKUSD 08BCD E4170804 0 4 BASE 767 ST R0 R4,CAR2 user's R2:=WC used (in sec) 08BCE FE0E59D6 768 JMP NOERROR 769 * --- 770 771 END UREQCPUL routine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1958 (XRQUREQ2) F 124 UREQ - get/set scratch file limit 774 775 ********************************************************************************** 776 * * 777 * URSCRTCHS. URSCRTCHG. Requests to get and set scratch * 778 * limits. The session scratch limit is kept in the PSA and * 779 * affects the process although it is limited by the absolute * 780 * account scratch limits. * 781 * Call: * 782 * LD R0 request * 783 * [LD R1 new.limit] needed only if set * 784 * UREQ procnum * 785 * JLTZ R0 request.error * 786 * ST R1 scratch.limit * 787 * ST R2 scratch.in.use * 788 * ST R3 maximum.scratch.used * 789 * * 790 * Stack required = 4 * 791 * 0 + max ( INDEXPROC (4) ) * 792 * * 793 ********************************************************************************** 794 795 BLOCK UREQSESL routine 796 797 ENTRY UREQSESL 798 00008BCF 799 UREQSESL LABEL 08BCF 64840004 2 IMM 800 CPR R2 URSESMAX a reasonable request? 08BD0 FE0659D8 801 JGE UERRORILR 08BD1 5CA48BD2 2 802 LDPC URSESJMP(R2) 803 * --- 804 00008BD2 805 URSESJMP LABEL 08BD2 00008BD6 806 ADR UREQSESS set session max 08BD3 00008BDF 807 ADR UREQSESG get session max 08BD4 00008BE9 808 ADR UREQGLIM get account's block limits 08BD5 00008BF2 809 ADR UREQGUSD get account's blocks used 00000004 ABS 810 URSESMAX EQU DISPW URSESJMP 811 812 * set session limit 00008BD6 813 UREQSESS LABEL 08BD6 60000414 0 814 LD R0 CPCUPC get the current UPC pointer 08BD7 5C081C10 0 ZBM 815 CMZ R0,UPRSTCTG1 limit changing allowed? 08BD8 FE0C59F6 816 JNE UERRORURX jump if not 08BD9 DC4087E9 817 CALLNP INDEXPROC get pointer to specified process 08BDA FE0E59E0 818 JMP UERRORMNRP jump if access not allowed 08BDB FE0E59E0 819 JMP UERRORMNRP I don't do under programs 08BDC 60170803 0 4 BASE 820 LD R0 R4,CAR1 get the new limit 08BDD E416C813 0 3 BASE 821 ST R0 R3,PSSESLIM adjust scratch limit 08BDE FE0E8BE3 822 JMP UREQSESSHR share some code 823 * --- 824 825 * Get current scratch and session limit 00008BDF 826 UREQSESG LABEL 08BDF DC4087E9 827 CALLNP INDEXPROC get pointer to process 08BE0 FE0E59E0 828 JMP UERRORMNRP jump if access not allowed 08BE1 FE0E59E0 829 JMP UERRORMNRP I don't do under programs 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1959 (XRQUREQ2) F 124 UREQ - get/set scratch file limit 08BE2 6016C813 0 3 BASE 830 LD R0 R3,PSSESLIM get current limit 00008BE3 831 UREQSESSHR LABEL 08BE3 E4170803 0 4 BASE 832 ST R0 R4,CAR1 user's R1:=current scratch limit 08BE4 6016C812 0 3 BASE 833 LD R0 R3,PSSESUSD 08BE5 E4170804 0 4 BASE 834 ST R0 R4,CAR2 user's R2:=current used 08BE6 6016C814 0 3 BASE 835 LD R0 R3,PSSESMAX 08BE7 E4170805 0 4 BASE 836 ST R0 R4,CAR3 user's R3:=maximum session point 08BE8 FE0E59D6 837 JMP NOERROR 838 * --- 839 840 * Get the account's block limits 00008BE9 841 UREQGLIM LABEL 08BE9 60400412 1 842 LD R1 CPPSA 08BEA 60485F14 1 1 ZBM 843 LD R1 R1,PSDFLTDIR R1 -> ULB for alias account 08BEB 6008618D 0 1 ZBM 844 LD R0 R1,ULDSKLIM users R1 <= hard disk limit 00008BEC 845 SHARER LABEL 08BEC E4170803 0 4 BASE 846 ST R0 R4,CAR1 set users R1 08BED 6008718C 0 1 ZBM 847 LD R0 R1,ULDSKWARN 08BEE E4170804 0 4 BASE 848 ST R0 R4,CAR2 user's R2 = warning limit 08BEF 6008418C 0 1 ZBM 849 LD R0 R1,ULDSKSAVL 08BF0 E4170805 0 4 BASE 850 ST R0 R4,CAR3 user's R3 = saved limit 08BF1 FE0E59D6 851 JMP NOERROR 852 * --- 853 854 * Get the account's block usage. 00008BF2 855 UREQGUSD LABEL 08BF2 60400412 1 856 LD R1 CPPSA 08BF3 60485F14 1 1 ZBM 857 LD R1 R1,PSDFLTDIR R1 -> ULB for alias account 08BF4 6008518E 0 1 ZBM 858 LD R0 R1,ULDSKUSD saved disk blocks used 08BF5 1816480F 0 1 BASE 859 ADD R0 R1,ULSCRDSK add scratch disk blocks in use 08BF6 FE0E8BEC 860 JMP SHARER users R1 <= total disk space in use 861 * --- 862 863 END UREQSESL routine 184 INPUT XRQUREQ3 user request processor (3) 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1960 (XRQUREQ3) F 125 UREQ - Page control 3 4 ********************************************************************************** 5 * * 6 * Requests to get and change the type of pages in the * 7 * address space. * 8 * * 9 * Stack required = 7 * 10 * 0 + max ( UERRORILR (3), UREQFORCEP (4), UREQFREEP (7), * 11 * UREQPGEXC (7), UREQPGTYP (4), UREQWRITEP (4) ) * 12 * * 13 ********************************************************************************** 14 15 BLOCK UREQCNTLP routine 16 17 ENTRY UREQCNTLP 18 00008BF7 19 UREQCNTLP LABEL 08BF7 64840006 2 IMM 20 CPR R2 PCNTLMAX check for request in range 08BF8 FE0659D8 21 JGE UERRORILR 08BF9 5CA48BFA 2 22 LDPC PCNTLJMP(R2) 23 * --- 24 00008BFA 25 PCNTLJMP LABEL 08BFA 00008C00 26 VFD ADR UREQFREEP free the association of a page 08BFB 00008C05 27 VFD ADR UREQPGTYP get page type 08BFC 00008C32 28 VFD ADR UREQPGEXC make a page unreferenceable 08BFD 000059D8 29 VFD ADR UERRORILR not implemented 08BFE 00008C44 30 VFD ADR UREQFORCEP force write a page, wait for xfer 08BFF 00008C42 31 VFD ADR UREQWRITEP write page, no unmap, no wait 00000006 ABS 32 PCNTLMAX EQU DISPW PCNTLJMP 33 34 END UREQCNTLP routine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1961 (XRQUREQ3) F 125 UREQ - free a page 37 38 ********************************************************************************** 39 * * 40 * URFREEPAGE. Request to free a page from the user's * 41 * address space. * 42 * Call: * 43 * LD R0 URFREEPAGE * 44 * UREQ pagenum * 45 * JLTZ R0 request.error * 46 * * 47 * Stack required = 7 * 48 * 0 + max ( GRUBPAGE (7) ) * 49 * * 50 ********************************************************************************** 51 52 BLOCK UREQFREEP routine 53 54 ENTRY UREQFREEP 55 00008C00 56 UREQFREEP LABEL 08C00 68C40080 3 IMM 57 UCPR R3 NPS reasonable page number? 08C01 FE0659DA 58 JGE UERRORPOB "parameter out of bounds" 08C02 6012C000 0 3 REG 59 LD R0 R3 08C03 DC4030E4 60 CALLNP GRUBPAGE remove the page from existence 08C04 FE0E59D6 61 JMP NOERROR 62 * --- 63 64 END UREQFREEP routine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1962 (XRQUREQ3) F 125 UREQ - get page type 67 68 ********************************************************************************** 69 * * 70 * Request to fetch the type of thing that is mapped into * 71 * the specified page. * 72 * User call: * 73 * LD R0 URPAGETYPE * 74 * LD R1 page number * 75 * UREQ process number * 76 * JLTZ R0 request error * 77 * ST R0 page type * 78 * ST R1 other info on page * 79 * * 80 * The things returned are: 0 - nothing, a hole (R1 undefined) * 81 * 0 - nothing, a hole (R1 undefined) * 82 * 1 - swapping page (R1/BIT 0 on iff writable) * 83 * 2 - RAF page (R1 = lun mapped from, * 84 * R1/BIT 0 on iff writable) * 85 * 3 - CODE page (R1 = lun mapped from, * 86 * R1/BIT 0 on iff writable) * 87 * 4 - indirect reference (R1 = page number * 88 * and process pointing to, * 89 * R1/BIT 0 on iff writable) * 90 * 5 - page of unknown type * 91 * (R1/BIT 0 on iff writable) * 92 * 6 - excluded page * 93 * * 94 * Stack required = 4 * 95 * 0 + max ( FINDUCE (2), INDEXPROC (4) ) * 96 * * 97 ********************************************************************************** 98 99 BLOCK UREQPGTYP routine 100 101 ENTRY UREQPGTYP 102 00008C05 103 UREQPGTYP LABEL 08C05 DC4087E9 104 CALLNP INDEXPROC find who he is referencing 08C06 FE0E59E0 105 JMP UERRORMNRP not able to reference 08C07 FE0E8C30 106 JMP PGTYPUPRG referencing under program 08C08 6048C116 1 3 ZBM 107 LD R1 R3,PSCURRPROC get current UPC pointer 108 * \ / 109 00008C09 110 PGTYPSHR LABEL 08C09 6152C000 5 3 REG 111 LD R5 R3 save the PSA of our process 08C0A 60D6480D 3 1 BASE 112 LD R3 R1,UPCVMLIST get root of list 08C0B 60093273 0 4 ZBM 113 LD R0 R4,CAR1/BITS (32-(NPS LOG 2)):31 08C0C 62440000 12 IMM 114 LD2 R1 0 type for not found 08C0D 3C16C004 0 3 CACH 115 LSRCH R0 R3,VPVPN find the requested page 08C0E FE0C8C2D 116 JNE STOREINFOX return hole condition if not found 08C0F 60840004 2 IMM 117 LD R2 4 type for indirect 08C10 6056C803 1 3 BASE 118 LD R1 R3,VPBLOCK possibly get page # and process 08C11 5C08D011 3 ZBM 119 CMZ R3,VPINDRCT is this an indirect reference? 08C12 FE0C8C2B 120 JNE STOREINFO jump if so 08C13 6008C2E2 0 3 ZBM 121 LD R0 R3,VPFBITYPE get code indicating page type 08C14 60440000 1 IMM 122 LD R1 0 don't give away any secrets 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1963 (XRQUREQ3) F 125 UREQ - get page type 08C15 60840006 2 IMM 123 LD R2 6 code for excluded page 08C16 6008CE80 0 3 ZBM 124 LD R0 R3,VPCNTL get control bits for the page 08C17 F6388C2A 0 125 JBT R0/VPZEROPGB GIVEUNK jump if zero 126 * \ / 08C18 F6368C2D 0 127 JBT R0/VPEXCLUDEB STOREINFOX jump if excluded 128 * \ / 129 * R1=0 08C19 6008C2E2 0 3 ZBM 130 LD R0 R3,VPFBITYPE restore page type code 08C1A 60840001 2 IMM 131 LD R2 1 type for a swapping page 08C1B 6404000B 0 IMM 132 CPR R0 FBITSYS is it a swapping page? 08C1C FE028C2B 133 JEQ STOREINFO jump if so 08C1D 6048DF11 1 3 ZBM 134 LD R1 R3,VPFCB get the FCB for this page 08C1E DC0035BB 135 CALL FINDUCE set R1 = unit number 08C1F 40534000 5 REG 136 PARVL R5 use the derived PSA 08C20 60440000 1 IMM 137 LD R1 0 use unit 0 if ... 08C21 FA308C23 0 138 JZA R0 GOTNUMBER ... unit is local to uncurrent UP 08C22 60480080 1 0 ZBM 139 LD R1 R0,UCEUNIT pick up the unit number 00008C23 140 GOTNUMBER LABEL 08C23 6008C2E2 0 3 ZBM 141 LD R0 R3,VPFBITYPE 08C24 60840003 2 IMM 142 LD R2 3 type for a CODE page 08C25 64040014 0 IMM 143 CPR R0 FBITCODED is it a CODE data page? 08C26 FE028C2B 144 JEQ STOREINFO jump if so 08C27 60840002 2 IMM 145 LD R2 2 type for RAF page 08C28 6404000F 0 IMM 146 CPR R0 FBITRAFD is it a RAF data page? 08C29 FE028C2B 147 JEQ STOREINFO jump if so 148 * \ / 00008C2A 149 GIVEUNK LABEL 08C2A 60840005 2 IMM 150 LD R2 5 type for an unknown type 00008C2B 151 STOREINFO LABEL 08C2B 5C08DC10 3 ZBM 152 CMZ R3,VPCNTL/VPCNTLROB check the read only bit 08C2C EC4A4010 1 CBM 153 STLEQ R1/BIT 0 set flag if not read-only 00008C2D 154 STOREINFOX LABEL 08C2D E4970802 2 4 BASE 155 ST R2 R4,CAR0 user's R0:=page type code 08C2E E4570803 1 4 BASE 156 ST R1 R4,CAR1 user's R1:=other info on page 08C2F FE0E38CF 157 JMP XREQRETURN return without diddling R0 158 * --- 159 160 * Referencing an under program -- just get root to VM list. 00008C30 161 PGTYPUPRG LABEL 08C30 FA7059E2 1 162 JZA R1 UERRORNSPP jump if no under program control block 08C31 FE0E8C09 163 JMP PGTYPSHR 164 * --- 165 166 END UREQPGTYP routine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1964 (XRQUREQ3) F 125 UREQ - Exclude a page 169 170 ********************************************************************************** 171 * * 172 * This request causes a VP element to be created that * 173 * contains a flag that will cause a user trap if that page is * 174 * ever referenced. This is mostly used for debugging by making * 175 * page 0 excluded so foolishness will show up. * 176 * User call: * 177 * LD R0 UREXCPAGE * 178 * UREQ page number * 179 * JLTZ R0 request.error * 180 * * 181 * Stack required = 7 * 182 * 0 + max ( CREATEVP (2), GRUBPAGE (7) ) * 183 * * 184 ********************************************************************************** 185 186 BLOCK UREQPGEXC routine 187 188 ENTRY UREQPGEXC 189 00008C32 190 UREQPGEXC LABEL 08C32 68C40080 3 IMM 191 UCPR R3 NPS see if within user's memory 08C33 FE0659DA 192 JGE UERRORPOB jump if not 08C34 6152C000 5 3 REG 193 LD R5 R3 save requested page 08C35 6012C000 0 3 REG 194 LD R0 R3 08C36 DC4030E4 195 CALLNP GRUBPAGE remove anything already there 08C37 DC0030C9 196 CALL CREATEVP create the new element 08C38 41534000 5 REG 197 PARV R5 page number 08C39 41440000 IMM 198 PARV 0 no block number 08C3A 41440000 IMM 199 PARV 0 FBI type - nothing here 08C3B 41440000 IMM 200 PARV VPNOFCB no associated lun 08C3C 40440010 IMM 201 PARVL VPEXCLUDE type is excluded 08C3D 60800414 2 202 LD R2 CPCUPC 08C3E 6016880D 0 2 BASE 203 LD R0 R2,UPCVMLIST 08C3F E4085F10 0 1 ZBM 204 ST R0 R1,VPLINK link it into the memory list 08C40 E456880D 1 2 BASE 205 ST R1 R2,UPCVMLIST 08C41 FE0E59D6 206 JMP NOERROR all done 207 * --- 208 209 END UREQPGEXC routine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1965 (XRQUREQ3) F 125 UREQ - force write a page 212 213 ********************************************************************************** 214 * * 215 * URFORCEP/URWRITEP. Requests to force write a page from * 216 * the user's address space. URFORCEP suspends the user until * 217 * the transfer is complete. URWRITEP sets up the transfer and * 218 * returns without waiting. Note that if the page has already * 219 * been written then we do not suspend. Call: * 220 * * 221 * LD R0 * 222 * UREQ pagenum * 223 * JLTZ R0 request.error * 224 * * 225 * Stack Required = 4. * 226 * 0 + max ( DISCARDPAL (4), FINDPAL (1), FINDVP (4), * 227 * LOCKWAIT (0), SUSPENDME (0) ) * 228 * * 229 ********************************************************************************** 230 231 BLOCK UREQFORCEP/UREQWRITEP routines 232 ENTRY UREQFORCEP 233 ENTRY UREQWRITEP 234 00008C42 235 UREQWRITEP LABEL 08C42 EC0BC010 7 CBM 236 STZ R7/BIT (0) sez not to suspend 08C43 FE0E8C45 237 JMP MERGECODE share code 238 * --- 239 00008C44 240 UREQFORCEP LABEL 08C44 EDCBC010 7 CBM 241 STW R7/BIT (0) sez suspend to await write completion 242 * \ / 00008C45 243 MERGECODE LABEL 08C45 68C40080 3 IMM 244 UCPR R3 NPS reasonable page number? 08C46 FE0659DA 245 JGE UERRORPOB "parameter out of bounds" 08C47 6012C000 0 3 REG 246 LD R0 R3 copy page number 08C48 60400412 1 247 LD R1 CPPSA current process status area 08C49 0CC00000 248 IOFF disallow interrupts 08C4A DC40265F 249 CALLNP FINDVP search for the VP element 08C4B FE0E59E4 250 JMP UERRORNSE error if not mapped 08C4C EC095A10 5 ZBM 251 STZ VPP,VPCNTL/VPCNTLLKB clear lock bit 08C4D 60095450 0 5 ZBM 252 LD R0 VPP,VPCNTL/VPCNTLFLD control field 08C4E FA0C8C6E 0 253 JNEZ R0 GIVEMPV jump if not read-write access 254 * \ / 255 PLOCK MSQINLOCK lock MS input queue 08C4F 0CC00000 255 IOFF 08C50 D1C01F16 255 SETT MSQINLOCK 08C51 FE0C8C53 255 JNE MA(2+DISPW MA 0) 08C52 DC40308B 255 CALLNP LOCKWAIT 08C53 DC40330C 256 CALLNP FINDPAL find and unmap PAL 08C54 FE0E8C58 257 JMP CHKQUEUE check if write already queued 08C55 DC402E15 258 CALLNP DISCARDPAL dump PAL and queue write if necessary 08C56 60000412 0 259 LD R0 CPPSA current process status area 08C57 D04800F2 0 ZBM 260 DEC R0,PSWSSIZE decrement working set size 261 * \ / 00008C58 262 CHKQUEUE LABEL 08C58 F3C08C6B 7 263 JBF R7/BIT (0) DONTWAIT jump if waiting not required 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1966 (XRQUREQ3) F 125 UREQ - force write a page 264 PLOCK MSQOUTLOCK lock MS output queue 08C59 0CC00000 264 IOFF 08C5A D1C01F17 264 SETT MSQOUTLOCK 08C5B FE0C8C5D 264 JNE MA(2+DISPW MA 0) 08C5C DC40308B 264 CALLNP LOCKWAIT 08C5D 60174803 0 5 BASE 265 LD R0 VPP,VPBLOCK value to search for 08C5E 60494083 1 5 ZBM 266 LD R1 VPP,VPDRIVE drive where this page resides 08C5F 60621F22 1 1 267 LD R1 VOLNTABLE(R1) VOLN element 08C60 60564817 1 1 BASE 268 LD R1 R1,VOLNWRITEQ list of write queue elements 08C61 3C164801 0 1 BASE 269 LSRCH R0 R1,MSQBLOCK see if write pending 270 PUNLOCK MSQOUTLOCK release lock 08C62 EC001F17 270 STZ MSQOUTLOCK 08C63 0C800000 270 ION 08C64 FE0C8C6B 271 JNE DONTWAIT jump if write not generated 272 * \ / 08C65 608400FF 2 IMM 273 LD R2 NOSUCHVPN secondary shutdown parameter 08C66 DC00351C 274 CALL SUSPENDME shut caller down 08C67 410059D6 275 PAR NOERROR restart address 08C68 41574803 5 BASE 276 PARV VPP,VPBLOCK shutdown parameter 08C69 41001DAB 277 PAR SQMSWAIT place into MS wait queue 08C6A 40001F16 278 PARL MSQINLOCK lock to release 279 * --- 280 00008C6B 281 DONTWAIT LABEL 282 PUNLOCK MSQINLOCK release MS lock 08C6B EC001F16 282 STZ MSQINLOCK 08C6C 0C800000 282 ION 08C6D FE0E59D6 283 JMP NOERROR return error free 284 * --- 285 00008C6E 286 GIVEMPV LABEL 08C6E 60040074 0 IMM 287 LD R0 UINTMPV memory protect violation 08C6F FE0E5988 288 JMP UERROR return error code 289 * --- 290 291 END UREQFORCEP/URWRITEP routines 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1967 (XRQUREQ3) F 125 UREQ - Program/process control 294 295 ********************************************************************************** 296 * * 297 * These requests perform operations solely on under * 298 * programs. Negative process serial numbers refer to immediate * 299 * under programs, positive process serial numbers denote under * 300 * programs in the under process tree and zero refers to * 301 * oneself. * 302 * User call is: * 303 * LD R0 * 304 * UREQ * 305 * JLTZ R0 * 306 * * 307 * Stack required = 28 * 308 * 0 + max ( UERRORILR (3), UREQDSTRY (27), UREQDSTRYA (27), * 309 * UREQDSTRYAP (28), UREQDSTRYP (27), UREQPGO (11), * 310 * UREQPSTEP (11) ) * 311 * * 312 ********************************************************************************** 313 314 BLOCK UREQPCNTL routine 315 316 ENTRY UREQPCNTL process control 317 ENTRY URQGODWN move down to and start UPC 318 00008C70 319 UREQPCNTL LABEL 08C70 64840007 2 IMM 320 CPR R2 URPCNTLMAX sub op a legal operation? 08C71 FE0659D8 321 JGE UERRORILR jump if not 08C72 5CA48C73 2 322 LDPC URPCNTLJMP(R2) go to appropriate routine 323 * --- 324 00008C73 325 URPCNTLJMP LABEL 08C73 00008C7A 326 VFD ADR UREQPGO set a program/process going 08C74 000059D8 327 VFD ADR UERRORILR unused - was to be stop another process 08C75 00008C90 328 VFD ADR UREQDSTRY destroy a program/process 08C76 00008CA5 329 VFD ADR UREQDSTRYA destroy all programs in a set 08C77 00008CE5 330 VFD ADR UREQPSTEP single step a program/process 08C78 00008CAC 331 VFD ADR UREQDSTRYP destroy a single under process 08C79 00008CB4 332 VFD ADR UREQDSTRYAP destroy all process below a given one 00000007 ABS 333 URPCNTLMAX EQU DISPW URPCNTLJMP largest allowable sub-op 334 335 END UREQPCNTL routine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1968 (XRQUREQ3) F 125 UREQ - Make a process/program go 338 339 ********************************************************************************** 340 * * 341 * This request makes the specified process/program run. * 342 * If the specified process number is positive and that process * 343 * is in the stopped queue, then it is begun ( suitable access * 344 * privileges are also required ). If the procnum is negative, * 345 * then the under program is begun and this request returns with * 346 * the reason why it stopped. * 347 * Call: * 348 * LD R0 URPGO * 349 * UREQ * 350 * JLTZ R0 * 351 * ST R1 * 352 * ST R2 * 353 * * 354 * Stack required = 11 * 355 * 0 + max ( INDEXPROC (4), OVPDOWNONE (11), UERRSET (1) ) * 356 * * 357 ********************************************************************************** 358 359 BLOCK UREQPGO routine 360 ENTRY UREQPGO to make a process go 361 ENTRY URQGODWN move down to and start UPC 362 00008C7A 363 UREQPGO LABEL 08C7A DC4087E6 364 CALLNP INDEXPROCX find who is being talked about 08C7B FE0E59E0 365 JMP UERRORMNRP access not allowed 08C7C FE0E8C81 366 JMP URQGODWN under program 367 * \ / 368 369 ********************************************************************************** 370 * * 371 * GOing myself. Clear XREQ status registers and set psn * 372 * register to our own for return. * 373 * * 374 ********************************************************************************** 375 376 * \ / 08C7D EE170802 4 BASE 377 STZ2 R4,CAR0 no error code if nothing happens 08C7E 60085371 0 1 ZBM 378 LD R0 R1,UPCSERNM get serial number 08C7F E4170804 0 4 BASE 379 ST R0 R4,CAR2 send it back, too 08C80 FE0E38CF 380 JMP XREQRETURN return to ourselves 381 * --- 382 383 ********************************************************************************** 384 * * 385 * We have got our man, OVPUTDOWN is called to initialize * 386 * the process that we found. * 387 * * 388 ********************************************************************************** 389 00008C81 390 URQGODWN LABEL 08C81 FA7059E2 1 391 JZA R1 UERRORNSPP split if no such process, error 08C82 DC003330 392 CALL OVPDOWNONE move down one level 08C83 40524000 1 REG 393 PARVL R1 UPC that is to become the current UPC 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1969 (XRQUREQ3) F 125 UREQ - Make a process/program go 08C84 FE0E8C8F 394 JMP URQGONFND jump if something back 395 * \ / 396 08C85 60000412 0 397 LD R0 CPPSA 08C86 60081F11 0 0 ZBM 398 LD R0 R0,PSCACHNP1 R0 => user's registers 08C87 5C082C11 0 ZBM 399 CMZ R0,CAMSR/MSRTRACEIB is trace on? 08C88 FE0238DF 400 JEQ XREQRTNX if not, return to him 08C89 EC082C11 0 ZBM 401 STZ R0,CAMSR/MSRTRACEIB clear the trace 08C8A 0CC00000 402 IOFF turn off interrupts 08C8B 6084001F 2 IMM 403 LD R2 UINTTRACEI get the trace interrupt code 08C8C 60C40000 3 IMM 404 LD R3 0 08C8D DC403589 405 CALLNP UERRSET place the trace error 08C8E FE0E38DF 406 JMP XREQRTNX 407 * --- 408 409 ********************************************************************************** 410 * * 411 * We didn't find the indexed under-program. This means * 412 * system table screw up. * 413 * * 414 ********************************************************************************** 415 00008C8F 416 URQGONFND LABEL 08C8F 001311E0 417 HALT HALTS11E0 couldn't find under program 418 * --- 419 420 421 END UREQPGO routine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1970 (XRQUREQ3) F 125 UREQ - Destroy a process/program 424 425 ********************************************************************************** 426 * * 427 * This request will destroy a session ( given proper * 428 * privileges ) or under programs. The funny nature of this * 429 * request (references either sessions or under-programs) is * 430 * due to its historical function in the system before under- * 431 * program trees. * 432 * Call: * 433 * LD R0 URPDESTROY * 434 * UREQ * 435 * JLTZ R0 * 436 * where is negative for the immediate under * 437 * programs. A different request is provided to destroy * 438 * all of the underprograms. * 439 * * 440 * Stack required = 27 * 441 * 0 + max ( CRUSHUPC (27), PROCPOWER (4), ROUST (4), * 442 * UERRSETY (1), UNSRCHLIST (1) ) * 443 * * 444 ********************************************************************************** 445 446 BLOCK UREQDSTRY routine 447 ENTRY UREQDSTRY entry to destroy a session 448 00008C90 449 UREQDSTRY LABEL 08C90 FAC48C98 3 450 JGTZ R3 DSTRYSESS jump if session number given 08C91 FAEE59E0 3 451 JNEMW R3 UERRORMNRP request currently knows only 452 * immediate under-process (-1) 08C92 60400414 1 453 LD R1 CPCUPC get the current UPC 08C93 60485F10 1 1 ZBM 454 LD R1 R1,UPCSONPTR get pointer to under-process to destroy 08C94 FA7059E2 1 455 JZA R1 UERRORNSPP jump if none, error 08C95 EC128000 2 REG 456 STZ R2 indicate that no brothers exists 457 * R1 <= UPC to unlink and destroy, R2 <= previous brother in the list 08C96 DC408CBE 458 CALLNP CRUSHUPC get rid of the UPC 08C97 FE0E59D6 459 JMP NOERROR return 460 * --- 461 462 ********************************************************************************** 463 * This will cause another session to be 'evicted' or * 464 * destroyed. The session is checked to see that it is * 465 * logged on 'under' the requester. If so, that session * 466 * is told to flush itself. * 467 ********************************************************************************** 468 00008C98 469 DSTRYSESS LABEL 08C98 60000414 0 470 LD R0 CPCUPC get the current UPC pointer 08C99 61081F13 4 0 ZBM 471 LD ULB R0,UPCPRIVULB get the ULB ptr 08C9A DC408821 472 CALLNP PROCPOWER find and see if I may see 08C9B FE0E59E0 473 JMP UERRORMNRP jump if I may not reference 08C9C 6152C000 5 3 REG 474 LD R5 R3 R5=>session being evicted 08C9D 6084107D 2 IMM 475 LD R2 UINTOPRQ+CMERR give error to CM 08C9E 60C40001 3 IMM 476 LD R3 UINTOPRQL subcode sez "logoff" 08C9F DC4035B5 477 CALLNP UERRSETY set evict request into his list 08CA0 DC0030B7 478 CALL UNSRCHLIST release the list 08CA1 40001EB2 479 PARL PCNTLLOCK 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1971 (XRQUREQ3) F 125 UREQ - Destroy a process/program 08CA2 60C95F12 3 5 ZBM 480 LD R3 R5,PSPROCCB get the PCB pointer 08CA3 DC403569 481 CALLNP ROUST set going if waiting 08CA4 FE0E59D6 482 JMP NOERROR go give return 483 * --- 484 485 END UREQDSTRY routine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1972 (XRQUREQ3) F 125 UREQ - destroy all under programs 488 489 ********************************************************************************** 490 * * 491 * This request is similar to the destroy single, except * 492 * that it will destroy all the under programs. It cannot * 493 * be used on single processes ( procnum must be less than * 494 * zero ). * 495 * * 496 * Stack required = 27 * 497 * 0 + max ( CRUSHUPC (27) ) * 498 * * 499 ********************************************************************************** 500 501 BLOCK UREQDSTRYA routine 502 ENTRY UREQDSTRYA to destroy all under processes 503 00008CA5 504 UREQDSTRYA LABEL 08CA5 FAEE59E0 3 505 JNEMW R3 UERRORMNRP don't know about other processes 00008CA6 506 DOITAGAIN LABEL 08CA6 60400414 1 507 LD R1 CPCUPC get the current UPC pointer 08CA7 60485F10 1 1 ZBM 508 LD R1 R1,UPCSONPTR get pointer to under program 08CA8 FA7059D6 1 509 JZA R1 NOERROR if nothing, then done 08CA9 EC128000 2 REG 510 STZ R2 indicate no previous brother process 511 * R1 <= UPC to unlink and destroy, R2 <= previous brother in the list 08CAA DC408CBE 512 CALLNP CRUSHUPC call to zap the UPC 08CAB FE0E8CA6 513 JMP DOITAGAIN 514 * --- 515 516 END UREQDSTRYA routine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1973 (XRQUREQ3) F 125 UREQ - destroy all under programs 518 519 ********************************************************************************** 520 * * 521 * UREQDSTRYP. This subroutine destroys the specified * 522 * process given the under process serial number. All sons of * 523 * this process now become brothers with the brothers of the * 524 * given process. * 525 * * 526 * Stack required = 27 * 527 * 0 + max ( CRUSHUPC (27), INDEXPROCX (4) ) * 528 * * 529 ********************************************************************************** 530 531 BLOCK UREQDSTRYP routine 532 ENTRY UREQDSTRYP 533 00008CAC 534 UREQDSTRYP LABEL 08CAC DC4087E6 535 CALLNP INDEXPROCX find the specified under process 08CAD FE0E59E0 536 JMP UERRORMNRP can't give access to this guy 08CAE FE0E8CB0 537 JMP DSTRYPP looks good so far 08CAF FE0E59E0 538 JMP UERRORMNRP may not specify ourself 539 * --- 540 00008CB0 541 DSTRYPP LABEL 08CB0 FA7059E2 1 542 JZA R1 UERRORNSPP no such under process exists 08CB1 60920000 2 0 REG 543 LD R2 R0 place here so doesn't get lost during call 544 * R1 <= UPC to unlink and destroy, R2 <= previous brother in the list 08CB2 DC408CBE 545 CALLNP CRUSHUPC give him the axe 08CB3 FE0E59D6 546 JMP NOERROR no problems here 547 * --- 548 549 END UREQDSTRYP routine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1974 (XRQUREQ3) F 125 UREQ - destroy all under programs 551 552 ********************************************************************************** 553 * * 554 * UREQDSTRYAP. This routine will destroy ALL under * 555 * processes below the specified process. * 556 * * 557 * Stack required = 28 * 558 * 1 + max ( CRUSHUPC (27), INDEXPROCX (4) ) * 559 * * 560 ********************************************************************************** 561 562 BLOCK UREQDSTRYAP routine 563 ENTRY UREQDSTRYAP 564 565 BEGFRAME2 00178800 6 BASE 566 UPCPTR BSS 1 pointer to target UPC 567 ENDFRAME 568 00008CB4 569 UREQDSTRYAP LABEL 08CB4 DC4087E6 570 CALLNP INDEXPROCX find the specified process 08CB5 FE0E59E0 571 JMP UERRORMNRP can't have access to this guy 08CB6 FA7059E2 1 572 JZA R1 UERRORNSPP no such under process 573 * return for self 08CB7 E45F8001 1 6 STAK 574 ST R1 PUSH save UPC pointer of target 575 * \ / 576 00008CB8 577 DSTRAPLOOP LABEL 08CB8 61178800 4 6 BASE 578 LD R4 SP,UPCPTR get pointer to target UPC 08CB9 60491F10 1 4 ZBM 579 LD R1 R4,UPCSONPTR any under process to hack 08CBA FA7059D6 1 580 JZA R1 NOERROR if not we are through here 08CBB EC128000 2 REG 581 STZ R2 indicate no previous brother process 582 * R1 <= UPC to unlink and destroy, R2 <= previous brother in the list 08CBC DC408CBE 583 CALLNP CRUSHUPC call to zap this UPC 08CBD FE0E8CB8 584 JMP DSTRAPLOOP jump for more punishment 585 * --- 586 587 END UREQDSTRYAP routine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1975 (XRQUREQ3) F 125 UREQ - destroy all under programs 589 590 ********************************************************************************** 591 * * 592 * CRUSHUPC. This routine will destroy the given UPC. * 593 * First, all the local units and pages (PALs) associated with * 594 * this underprocess are taken care of. Then we unlink the UPC * 595 * block from the process tree, not an easy matter. From there * 596 * we can give back the free storage for the UPC. * 597 * Call: * 598 * LD R1 * 599 * LD R2 * 600 * CALLNP CRUSHUPC * 601 * * 602 * Eats R0:R5 * 603 * Stack required = 27 * 604 * 3 + max ( CLEANUNITS (24), CLOSEUNITF (22), OVPDESTROY (14) ) * 605 * * 606 ********************************************************************************** 607 608 BLOCK CRUSHUPC routine 609 ENTRY CRUSHUPC 610 611 BEGFRAME 00178801 6 BASE 612 UPCREGS BSS 2 place to save some registers 613 ENDFRAME 614 08CBE DD5F8003 6 STAK 615 CRUSHUPC ENTRNP PUSH 08CBF E6578801 126 BASE 616 ST2 R1 SP,UPCREGS save the UPC pointers 08CC0 60C85F15 3 1 ZBM 617 LD R3 R1,UPCUNITS pointer to list of local UCEs 08CC1 EC085F15 1 ZBM 618 STZ R1,UPCUNITS remove any trace of these guys 08CC2 DC407FF2 619 CALLNP CLEANUNITS remove all the local units 08CC3 62578801 126 BASE 620 LD2 R1 SP,UPCREGS get back pointers to UPCs 08CC4 61485F14 5 1 ZBM 621 LD FCB R1,UPCRUNFCB get FCB for .CODE 08CC5 EC085F14 1 ZBM 622 STZ R1,UPCRUNFCB zero out the pointer 08CC6 DC407F6B 623 CALLNP CLOSEUNITF and close the run unit 08CC7 FEC00000 624 NOP 0 ignore error return 08CC8 62578801 126 BASE 625 LD2 R1 SP,UPCREGS one more time 08CC9 60085F10 0 1 ZBM 626 LD R0 R1,UPCSONPTR do we have any children 08CCA FA308CDB 0 627 JZA R0 NOSONS we are not a father 08CCB 60C85F17 3 1 ZBM 628 LD R3 R1,UPCDADPTR get our father 629 * \ / 630 00008CCC 631 CHILDLOOP LABEL 08CCC E4C81F17 3 0 ZBM 632 ST R3 R0,UPCDADPTR this is now our step-father 08CCD 5C081F16 0 ZBM 633 CMZ R0,UPCBROPTR any brothers needing a fixup 08CCE FE028CD1 634 JEQ ENDOFBROS all sons have fathers 08CCF 60081F16 0 0 ZBM 635 LD R0 R0,UPCBROPTR get the pointer to our brother 08CD0 FE0E8CCC 636 JMP CHILDLOOP back to give him a step-father 637 * --- 638 639 * R0 <= last son, R1 <= UPC to destroy, R2 <= previous brother 00008CD1 640 ENDOFBROS LABEL 08CD1 60C85F16 3 1 ZBM 641 LD R3 R1,UPCBROPTR get our brother pointer 08CD2 E4C81F16 3 0 ZBM 642 ST R3 R0,UPCBROPTR and link in the sons 08CD3 FAB08CD7 2 643 JZA R2 GIVETOPOP no previous brother, fixup or father 08CD4 60C85F10 3 1 ZBM 644 LD R3 R1,UPCSONPTR start of the new brother list 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1976 (XRQUREQ3) F 125 UREQ - destroy all under programs 08CD5 E4C89F16 3 2 ZBM 645 ST R3 R2,UPCBROPTR we are now unlinked from the tree 08CD6 FE0E8CE2 646 JMP FREEUPC we can now flush this program 647 * --- 648 00008CD7 649 GIVETOPOP LABEL 08CD7 60C85F10 3 1 ZBM 650 LD R3 R1,UPCSONPTR start of the new brother list 08CD8 60085F17 0 1 ZBM 651 LD R0 R1,UPCDADPTR get out father 08CD9 E4C81F10 3 0 ZBM 652 ST R3 R0,UPCSONPTR father now has a new family 08CDA FE0E8CE2 653 JMP FREEUPC clean up and give back the UPC 654 * --- 655 00008CDB 656 NOSONS LABEL 08CDB FAB08CDF 2 657 JZA R2 FIXUPDAD if no previous brother, fix up fathers pointer 08CDC 60085F16 0 1 ZBM 658 LD R0 R1,UPCBROPTR ger our next brother 08CDD E4089F16 0 2 ZBM 659 ST R0 R2,UPCBROPTR and give to our previous brother 08CDE FE0E8CE2 660 JMP FREEUPC release the UPC block 661 * --- 662 00008CDF 663 FIXUPDAD LABEL 08CDF 60085F16 0 1 ZBM 664 LD R0 R1,UPCBROPTR get link to our brothers 08CE0 60C85F17 3 1 ZBM 665 LD R3 R1,UPCDADPTR get address of our father 08CE1 E408DF10 0 3 ZBM 666 ST R0 R3,UPCSONPTR father has just lost a son 667 * \ / 668 00008CE2 669 FREEUPC LABEL 08CE2 60D24000 3 1 REG 670 LD R3 R1 place pointer to UPC in R3 08CE3 DC40338D 671 CALLNP OVPDESTROY remove from existence 08CE4 5D1F8003 6 STAK 672 LEAVE POP bye kids!!! 673 * --- 674 675 END CRUSHUPC routine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1977 (XRQUREQ3) F 125 UREQ - singlestep a program 678 679 ********************************************************************************** 680 * * 681 * This request is similar to the GO request except the * 682 * program is stepped only one instruction before returning. * 683 * Especially good since XREQ's can also be stepped this way. * 684 * Because single-stepping works by giving the requester * 685 * of this XREQ an error when the underprocess has completed * 686 * an instruction, we have to make sure the requester is in * 687 * a position to receive such an error. Specifically, the * 688 * requester must either be the immediate overprocess or be the * 689 * debugger of the underprocess. Otherwise, whichever process * 690 * is the debugger or overprocess would, quite unexpectedly, * 691 * receive the error instead. * 692 * * 693 * Stack required = 11 * 694 * 0 + max ( INDEXPROC (4), OVPDOWNONE (11) ) * 695 * * 696 ********************************************************************************** 697 698 BLOCK UREQPSTEP routine 699 ENTRY UREQPSTEP 700 00008CE5 701 UREQPSTEP LABEL 08CE5 DC4087E9 702 CALLNP INDEXPROC check access privilege 08CE6 FE0E59E0 703 JMP UERRORMNRP access not allowed 08CE7 FE0E8CE9 704 JMP URQSTDWN under program to step 08CE8 FE0E59E0 705 JMP UERRORMNRP cannot step ourselves 706 * --- 707 00008CE9 708 URQSTDWN LABEL 08CE9 FA7059E2 1 709 JZA R1 UERRORNSPP no such program/process 710 * \ / 711 712 * make sure the victim can be single-stepped 713 * by our process 08CEA 60000414 0 714 LD R0 CPCUPC get our UPC 08CEB 64085F17 0 1 ZBM 715 CPR R0 R1,UPCDADPTR are we the immediate overprocess? 08CEC FE028CF0 716 JEQ OURBABY jump if we are, we can do it 08CED 60081371 0 0 ZBM 717 LD R0 R0,UPCSERNM get our serial number 08CEE 64085378 0 1 ZBM 718 CPR R0 R1,UPCERRPSN are we the debugger (overprocess)? 08CEF FE0C59E0 719 JNE UERRORMNRP if not, we'd never see a single step! 00008CF0 720 OURBABY LABEL looks OK to do it 08CF0 EC170802 4 BASE 721 STZ R4,CAR0 no error if nothing happens 08CF1 DC003330 722 CALL OVPDOWNONE prepare the other process to run 08CF2 40524000 1 REG 723 PARVL R1 pass the UPC that will become the current one 08CF3 FE0E59E2 724 JMP UERRORNSPP jump if no such thing 08CF4 60000412 0 725 LD R0 CPPSA 08CF5 60081F11 0 0 ZBM 726 LD R0 R0,PSCACHNP1 get pointer to the registers about to use 08CF6 EDC82C11 0 ZBM 727 STW R0,CAMSR/MSRTRACEIB set the program to step once 08CF7 FE0E38DF 728 JMP XREQRTNX set him going 729 * --- 730 731 END UREQPSTEP routine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1978 (XRQUREQ3) F 125 UREQ - Get under program/process registers 734 735 ********************************************************************************** 736 * * 737 * This request gets register contents from the specified * 738 * process/under-program. * 739 * Call: * 740 * LD R0 URPGETREG+ * 741 * UREQ * 742 * JLTZ R0 * 743 * ST R1 * 744 * * 745 * Eats R0:R3 * 746 * Stack required = 4 * 747 * 0 + max ( INDEXPROC (4) ) * 748 * * 749 ********************************************************************************** 750 751 BLOCK UREQPGETR routine 752 ENTRY DISPPC displacement of PC in interrupt block 753 ENTRY DISPPSR displacement of PSR in interrupt block 754 ENTRY DISPR0 displacement of R0 in interrupt block 755 * (other registers follow sequentially) 756 ENTRY UREQPGETR request to get registers 757 00008CF8 758 UREQPGETR LABEL 08CF8 DC4087E9 759 CALLNP INDEXPROC get pointer to the requested one 08CF9 FE0E59E0 760 JMP UERRORMNRP no such person 08CFA FA7059E2 1 761 JZA R1 UERRORNSPP referencing an under program 762 * \ / 763 764 * Get console area pointer for an under program 765 08CFB 60C85F12 3 1 ZBM 766 LD R3 R1,UPCCONSOLE R3 is console area pointer 08CFC 5D648D00 2 767 XCT XEQTTAB(R2) get the contents ( or error ) 08CFD E4170803 0 4 BASE 768 ST R0 R4,CAR1 return contents in R1 08CFE EC170802 4 BASE 769 STZ R4,CAR0 no error code in R0 08CFF FE0E38D4 770 JMP MONITORRTN done, don't check windows 771 * --- 772 773 00008D00 774 XEQTTAB LABEL 775 BASE 08D00 6016C802 0 3 BASE 776 DISPR0 LD R0 R3,CAR0 08D01 6016C803 0 3 BASE 777 LD R0 R3,CAR1 08D02 6016C804 0 3 BASE 778 LD R0 R3,CAR2 08D03 6016C805 0 3 BASE 779 LD R0 R3,CAR3 08D04 6016C806 0 3 BASE 780 LD R0 R3,CAR4 08D05 6016C807 0 3 BASE 781 LD R0 R3,CAR5 08D06 6016C808 0 3 BASE 782 LD R0 R3,CAR6 08D07 6016C809 0 3 BASE 783 LD R0 R3,CAR7 08D08 6008DF10 0 3 ZBM 784 DISPPC LD R0 R3,CAPC 08D09 6008C0F0 0 3 ZBM 785 DISPPSR LD R0 R3,CAPSR 08D0A 6016C80B 0 3 BASE 786 LD R0 R3,CAINTMASK 08D0B 6016C80A 0 3 BASE 787 LD R0 R3,CAINTADR 08D0C FE0E59D8 788 JMP UERRORILR 00C 08D0D FE0E59D8 789 JMP UERRORILR 00D 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1979 (XRQUREQ3) F 125 UREQ - Get under program/process registers 08D0E FE0E59D8 790 JMP UERRORILR 00E 08D0F FE0E59D8 791 JMP UERRORILR 00F 792 DRCT 793 794 END UREQPGETR routine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1980 (XRQUREQ3) F 125 UREQ - Set underprogram/process registers 797 798 ********************************************************************************** 799 * * 800 * This request sets register contents from the specified * 801 * process/under-program. * 802 * Call: * 803 * LD R0 URPSETREG+ * 804 * LD R1 * 805 * UREQ * 806 * JLTZ R0 * 807 * ST R1 * 808 * * 809 * Eats R0:R3 * 810 * Stack required = 5 * 811 * 0 + max ( CHECKNOINT (2), CHECKUINT (5), INDEXPROC (4), * 812 * MOVETRMGX (5) ) * 813 * * 814 ********************************************************************************** 815 816 BLOCK UREQPSETR routine 817 ENTRY UREQPSETR request to set registers 818 00008D10 819 UREQPSETR LABEL 08D10 DC4087E9 820 CALLNP INDEXPROC find the referenced process 08D11 FE0E59E0 821 JMP UERRORMNRP jump if no access allowed 08D12 FA7059E2 1 822 JZA R1 UERRORNSPP no such under process exists 08D13 60C85F12 3 1 ZBM 823 LD R3 R1,UPCCONSOLE R3 -> CA of referenced UPC 08D14 61570803 5 4 BASE 824 LD R5 R4,CAR1 get new contents for register 08D15 5D648D35 2 825 XCT XEQTTAB(R2) place new and get old 08D16 E5570803 5 4 BASE 826 ST R5 R4,CAR1 save old for user 08D17 64400414 1 827 CPR R1 CPCUPC changing current's register? 08D18 FE0C59D6 828 JNE NOERROR jump if not 08D19 6484000B 2 IMM 829 CPR R2 REGIA setting vector address? 08D1A FE028D2A 830 JEQ CHECKIA jump if so 08D1B 6484000A 2 IMM 831 CPR R2 REGIM setting interrupt mask? 08D1C FE0C59D6 832 JNE NOERROR nothing special if not 833 * \ / 834 835 ********************************************************************************** 836 * Changing the IMR of the current process. Re-evaluate * 837 * terminating character specifications on the absolute input * 838 * port, if either CAINTENABL or CAIMNETERM changed. Remove * 839 * pending, but now unwanted, interrupts. Issue now wanted * 840 * interrupts. * 841 ********************************************************************************** 842 843 * R3 => victim's CA, R5 = old IMR 08D1D 60134000 0 5 REG 844 LD R0 R5 get old mask 08D1E 7416C80B 0 3 BASE 845 XOR R0 R3,CAINTMASK find bits that changed 08D1F FA088D21 0 846 JLTZ R0 SHUFFLE jump if bit 0 did 08D20 F2108D22 0 847 JBF R0/BIT CAIMNETERM NOSHUFFLE jump if this one didn't 00008D21 848 SHUFFLE LABEL 08D21 DC40337E 849 CALLNP MOVETRMGX shuffle TCG/TCS on console TCB, if any 00008D22 850 NOSHUFFLE LABEL 851 08D22 6112C000 4 3 REG 852 LD R4 R3 for calls 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1981 (XRQUREQ3) F 125 UREQ - Set underprogram/process registers 08D23 60D34000 3 5 REG 853 LD R3 R5 get old mask 08D24 28D7080B 3 4 BASE 854 BSUB R3 R4,CAINTMASK find bits turned off 08D25 DC40343C 855 CALLNP CHECKNOINT remove interrupts that were disabled 856 08D26 60D7080B 3 4 BASE 857 LD R3 R4,CAINTMASK new mask 08D27 28D34000 3 5 REG 858 BSUB R3 R5 find bits turned on 08D28 DC4033C2 859 CALLNP CHECKUINT add any interrupts that were enabled 860 08D29 FE0E59D6 861 JMP NOERROR exit done 862 * --- 863 864 ********************************************************************************** 865 * Changing the IAR (interrupt address register). Must * 866 * look re-evaluate interrupt situation if changing from * 867 * non-zero to zero, or vice versa. * 868 ********************************************************************************** 869 870 * R3 => victim's CA, R5 = old address 00008D2A 871 CHECKIA LABEL 08D2A 6556C80A 5 3 BASE 872 CPR R5 R3,CAINTADR changing at all? 08D2B FE0259D6 873 JEQ NOERROR jump if not 08D2C FB428D2F 5 874 JEQZ R5 DOINTS jump if changing from 0 08D2D 5C16C80A 3 BASE 875 CMZ R3,CAINTADR changing to 0? 08D2E FE0C59D6 876 JNE NOERROR jump if not 877 * \ / 878 00008D2F 879 DOINTS LABEL 08D2F 60D6C80B 3 3 BASE 880 LD R3 R3,CAINTMASK get mask of int bits 08D30 F2D08D32 3 881 JBF R3/BIT CAIMNETERM NOSWITCH skip switch if not trapping 08D31 DC40337E 882 CALLNP MOVETRMGX shuffle TCG/TCS on console TCB, if any 00008D32 883 NOSWITCH LABEL 08D32 DC40343C 884 CALLNP CHECKNOINT dump all enabled (R3=mask) 08D33 DC4033C2 885 CALLNP CHECKUINT try to regenerate all enabled (R3=mask) 08D34 FE0E59D6 886 JMP NOERROR all done 887 * --- 888 889 ********************************************************************************** 890 * Table of offsets * 891 ********************************************************************************** 892 00008D35 893 XEQTTAB BASE 08D35 E156C802 5 3 BASE 894 EXCH R5 R3,CAR0 08D36 E156C803 5 3 BASE 895 EXCH R5 R3,CAR1 08D37 E156C804 5 3 BASE 896 EXCH R5 R3,CAR2 08D38 E156C805 5 3 BASE 897 EXCH R5 R3,CAR3 08D39 E156C806 5 3 BASE 898 EXCH R5 R3,CAR4 08D3A E156C807 5 3 BASE 899 EXCH R5 R3,CAR5 08D3B E156C808 5 3 BASE 900 EXCH R5 R3,CAR6 08D3C E156C809 5 3 BASE 901 EXCH R5 R3,CAR7 08D3D E148DF10 5 3 ZBM 902 EXCH R5 R3,CAPC 08D3E E148C0F0 5 3 ZBM 903 EXCH R5 R3,CAPSR 08D3F E156C80B 5 3 BASE 904 REGIM EXCH R5 R3,CAINTMASK 08D40 E148DF1A 5 3 ZBM 905 REGIA EXCH R5 R3,CAINTADR/FLDADRS 08D41 FE0E59D8 906 JMP UERRORILR 00C 08D42 FE0E59D8 907 JMP UERRORILR 00D 08D43 FE0E59D8 908 JMP UERRORILR 00E 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1982 (XRQUREQ3) F 125 UREQ - Set underprogram/process registers 08D44 FE0E59D8 909 JMP UERRORILR 00F 910 DRCT 911 912 END UREQPSETR routine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1983 (XRQUREQ3) F 125 UREQ - LEA from address space 915 916 ********************************************************************************** 917 * * 918 * Debuggers and other program handlers need to evaluate * 919 * effective address expressions using the registers and the * 920 * memory associated with a different address space. Short of * 921 * complete address mode simulation, only the operating system * 922 * is capable of this. This is the request that allows a * 923 * program to take advantage of the operating system's * 924 * abilities. * 925 * User invocation is: * 926 * LD R0 URLEA or URLEA2 * 927 * LD R1 22 bit mode field * 928 * UREQ procnum * 929 * JLTZ R0 request error * 930 * JEQMW R1 could not calculate effective address * 931 * ST R1 pointer * 932 * * 933 * Stack required = 15 * 934 * 4 + max ( INDEXPROC (4), OVPDOWNONE (11), OVPUPONE (11), * 935 * SFREEMEM (0), SGETMEM (0) ) * 936 * * 937 * This request enables trap processing so that the LEA can * 938 * just be done and we'll get the trap if the passed mode is no * 939 * good. * 940 * * 941 ********************************************************************************** 942 943 BLOCK UREQLEA routine 944 ENTRY UREQLEA 945 946 BEGFRAME2 00178800 6 BASE 947 LEAINST BSS 1 the LEA instruction to execute 00178801 6 BASE 948 LEATEMPB BSS 1 pointer to the temp block 00178802 6 BASE 949 LEAUPCPTR BSS 1 place to keep a UPC pointer 00178803 6 BASE 950 LEASTRUPC BSS 1 UPC to move back up to 951 ENDFRAME 952 953 * The instructions are impure so we must put them in a temp block. 00008D45 954 LEATEMPBP BASE R0 08D45 63000000 45 955 LEATBR4 LD2 R4 MA 0 restore the last of the user's registers 08D46 59840000 IMM 956 LEATBMSR CLBMSR 0 relocate to him 08D47 38000000 0 957 LEATBLEA LEA R0 MA 0 do the calculation 08D48 59C400E0 IMM 958 IORMSR MSRSRELOC+MSRFRELOC+MSRPRELOC 08D49 39800000 6 959 LEATBSP1 LEA SP MA 0 restore the stack pointer 08D4A FE0E8D7D 960 JMP LEARETURN 961 * --- 962 08D4B 6007FFFF 0 IMM 963 LEATBTRAP LD R0 -1 say the LEA didn't work 08D4C 39800000 6 964 LEATBSP2 LEA SP MA 0 restore the stack pointer 08D4D FE0E8D7D 965 JMP LEARETURN back to main control 966 * --- 967 DRCT 00000009 ABS 968 LEATBLNTH EQU DISPW LEATEMPBP 00000004 ABS 969 LEATBLOG EQU LEATBLNTH LOG 2 970 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1984 (XRQUREQ3) F 125 UREQ - LEA from address space 00008D4E 971 UREQLEA LABEL 08D4E EC1F8004 6 STAK 972 STZ PUSH allocate stack frame 08D4F 68840002 2 IMM 973 UCPR R2 UREQLEAM request in bounds? 08D50 FE0659D8 974 JGE UERRORILR error if not 08D51 60248D8B 0 2 975 LD R0 UREQLEAI(R2) get the LEA inst to do 08D52 E4178800 0 6 BASE 976 ST R0 SP,LEAINST save instruction 08D53 DC4087E9 977 CALLNP INDEXPROC check for access priv 08D54 FE0E59E0 978 JMP UERRORMNRP may not reference 08D55 FE0E8D57 979 JMP UNDERTHERE the under process is there 08D56 FE0E59E0 980 JMP UERRORMNRP own proc ref is illegal 981 * --- 982 00008D57 983 UNDERTHERE LABEL 08D57 FA7059E2 1 984 JZA R1 UERRORNSPP no under process was found 08D58 E4578802 1 6 BASE 985 ST R1 SP,LEAUPCPTR save the UPC address away 08D59 DC002ED0 986 CALL UGETMEM get the temp block 08D5A 40440004 IMM 987 PARVL LEATBLOG 08D5B 61520000 5 0 REG 988 LD R5 R0 R5 points to the impure block 08D5C E5578801 5 6 BASE 989 ST R5 SP,LEATEMPB save the address of the temp block 08D5D 60048D45 0 IMM 990 LD R0 ADR LEATEMPBP 08D5E 60440024 1 IMM 991 LD R1 LEATBLNTH*CPW 08D5F 38974800 2 5 BASE 992 LEA R2 R5,0 08D60 FE400000 993 CMOVE move the impure instructions into the block 08D61 E5895F14 6 5 ZBM 994 ST SP R5,LEATBSP1/FLDADRS save the stack pointer for restoration 08D62 E5895F17 6 5 ZBM 995 ST SP R5,LEATBSP2/FLDADRS 08D63 60091563 0 4 ZBM 996 LD R0 R4,CAR1/FLDMODEADR 08D64 7C178800 0 6 BASE 997 IOR R0 SP,LEAINST create the instruction to do 08D65 E4174802 0 5 BASE 998 ST R0 R5,LEATBLEA place instruction in impure code 08D66 60000412 0 999 LD R0 CPPSA 08D67 60081F10 0 0 ZBM 1000 LD R0 R0,PSCACHN R0=>my console area 08D68 EDC8021B 0 ZBM 1001 STW R0,CAINTMASK/(BIT CAIMINST) say we'll accept instruction failures 08D69 38574806 1 5 BASE 1002 LEA R1 R5,LEATBTRAP get the trap location 08D6A E456080A 1 0 BASE 1003 ST R1 R0,CAINTADR set it as the interrupt address 1004 * \ / 1005 08D6B 60000414 0 1006 LD R0 CPCUPC pointer to the current UPC 08D6C E4178803 0 6 BASE 1007 ST R0 SP,LEASTRUPC save away for later use 08D6D 60578802 1 6 BASE 1008 LD R1 SP,LEAUPCPTR get the UPC pointer back 08D6E DC003330 1009 CALL OVPDOWNONE move to the under process 08D6F 40524000 1 REG 1010 PARVL R1 pass the UPC address 08D70 001311E1 1011 HALT HALTS11E1 stop if under program disappeared 1012 * \ / 1013 08D71 60000412 0 1014 LD R0 CPPSA 08D72 61081F11 4 0 ZBM 1015 LD R4 R0,PSCACHNP1 R4=>victims registers 08D73 38170806 0 4 BASE 1016 LEA R0 R4,CAR4 08D74 E4095F10 0 5 ZBM 1017 ST R0 R5,LEATBR4/FLDADRS set place to load regs from 08D75 60170801 0 4 BASE 1018 LD R0 R4,CAMSR 08D76 7407FFFF 0 IMM 1019 XOR R0 ONEBITS 08D77 780400E0 0 IMM 1020 AND R0 MSRFRELOC+MSRSRELOC+MSRPRELOC 08D78 E4095F11 0 5 ZBM 1021 ST R0 R5,LEATBMSR/FLDADRS the bits the user requires for relocation 08D79 62170802 014 BASE 1022 LD2 R0 R4,CAR0 restore most of the user's registers 08D7A 62970804 234 BASE 1023 LD2 R2 R4,CAR2 08D7B 63970808 674 BASE 1024 LD2 R6 R4,CAR6 08D7C 5C934000 5 REG 1025 LDPC R5 goto the impure code 1026 * --- 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1985 (XRQUREQ3) F 125 UREQ - LEA from address space 1027 1028 * Return from impure code. SP is restored and R0=effective addr 00008D7D 1029 LEARETURN LABEL 08D7D E4178800 0 6 BASE 1030 ST R0 SP,LEAINST save the effective addr 08D7E DC002F5D 1031 CALL UFREEMEM free the block with the inpure code 08D7F 41440004 IMM 1032 PARV LEATBLOG 08D80 40578801 6 BASE 1033 PARVL SP,LEATEMPB 1034 * \ / 1035 00008D81 1036 LEAUPPROC LABEL 08D81 DC40331B 1037 CALLNP OVPUPONE move back to our overprocess 08D82 001311E2 1038 HALT HALTS11E2 couldn't get back to over program, impossible 08D83 60000414 0 1039 LD R0 CPCUPC get the UPC we are currently at 08D84 64178803 0 6 BASE 1040 CPR R0 SP,LEASTRUPC is this where we started from 08D85 FE0C8D81 1041 JNE LEAUPPROC if not, continue our ascent 08D86 60000412 0 1042 LD R0 CPPSA 08D87 60081F11 0 0 ZBM 1043 LD R0 R0,PSCACHNP1 R0=>the reqestors registers 08D88 60578800 1 6 BASE 1044 LD R1 SP,LEAINST 08D89 E4560803 1 0 BASE 1045 ST R1 R0,CAR1 return the answer 08D8A FE0E59D6 1046 JMP NOERROR done 1047 * --- 1048 1049 * Tables of instructions to be done 00008D8B 1050 UREQLEAI LABEL 08D8B 38000000 0 1051 LEA R0 MA 0 08D8C 3A000000 0 1052 LEA2 R0 MA 0 00000002 ABS 1053 UREQLEAM EQU DISPW UREQLEAI 1054 1055 END UREQLEA routine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1986 (XRQUREQ3) F 125 UREQ - String packers 1058 1059 ********************************************************************************** 1060 * * 1061 * These requests pack up strings passed by the user into * 1062 * machine readable format. * 1063 * * 1064 * Stack required = 6 * 1065 * 0 + max ( GETPKTEMP (2), PACKFS (6), PACKITEM (5), * 1066 * PACKNAME (4), SETMEMTRAP(1), SFREEMEM (0) ) * 1067 * * 1068 ********************************************************************************** 1069 1070 BLOCK UREQPACK routine 1071 ENTRY UREQPACK 1072 00008D8D 1073 UREQPACK LABEL 08D8D 64840003 2 IMM 1074 CPR R2 URPACKMAX check for good request code 08D8E FE0659D8 1075 JGE UERRORILR if not good "ILLEGAL REQUEST" 08D8F 60170803 0 4 BASE 1076 LD R0 R4,CAR1 08D90 39160000 4 0 CACH 1077 LEA R4 CACH R0,0 generate good pointer to string 08D91 DC4059FA 1078 CALLNP GETPKTEMP get and initialize work area 08D92 DC005BCF 1079 CALL SETMEMTRAP set up to handle user memory errors 08D93 40005B5F 1080 PARL PASSERRUP and pass to his overprogram 08D94 5CA48D95 2 1081 LDPC URPACKJMP(R2) 1082 * --- 1083 00008D95 1084 URPACKJMP LABEL 08D95 00008D98 1085 VFD ADR URRPACKI pack a single item 08D96 00008DA3 1086 VFD ADR URRPACKP pack a file specifier part 08D97 00008DA8 1087 VFD ADR URRPACKF pack a file specifier 00000003 ABS 1088 URPACKMAX EQU DISPW URPACKJMP 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1987 (XRQUREQ3) F 125 UREQ - String packers 1090 1091 ********************************************************************************** 1092 * * 1093 * Pack a single item. The item is packed as a 12 character * 1094 * symbol or as a 64 bit decimal or hexadecimal unsigned number. * 1095 * User call is: * 1096 * LD R0 URPACKI * 1097 * LD R1 => first char of thing to pack * 1098 * UREQ 0 * 1099 * JLTZ R0 request/packing error * 1100 * ST R0 item type * 1101 * ST R0 => terminating character * 1102 * ST2 R2 packed item * 1103 * * 1104 * The type codes are: 0 - nothing (first char was a terminator) * 1105 * 1 - symbol * 1106 * 2 - number * 1107 * Stack required = 4 * 1108 * 0 + max ( PACKNAME (4), UFREEMEM (0) ) * 1109 * * 1110 ********************************************************************************** 1111 00008D98 1112 URRPACKI LABEL 08D98 DC405A4A 1113 CALLNP PACKNAME pack the thing 08D99 FE0E8DBD 1114 JMP PACKERROR jump if bad packing 08D9A 60800412 2 1115 LD R2 CPPSA 08D9B 60889F11 2 2 ZBM 1116 LD R2 R2,PSCACHNP1 get address of caller's regs 08D9C E6168804 012 BASE 1117 ST2 R0 R2,CAR2 (R2,R3):=packed item 08D9D E5168803 4 2 BASE 1118 ST R4 R2,CAR1 R1:=pointer to term char 08D9E E4D68802 3 2 BASE 1119 ST R3 R2,CAR0 R0:=item type 08D9F DC002F5D 1120 CALL UFREEMEM release the work area 08DA0 41440004 IMM 1121 PARV EQTEMPLOG indicate its length 08DA1 40534000 5 REG 1122 PARVL EQT and address 08DA2 FE0E38CF 1123 JMP XREQRETURN return to the caller 1124 * --- 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1988 (XRQUREQ3) F 125 UREQ - String packers 1126 1127 ********************************************************************************** 1128 * * 1129 * Pack a file specifier part. The item is to have the * 1130 * form of "symbol.ext(pw)" and it is returned in a 5 word block * 1131 * specified by the user. * 1132 * Call: * 1133 * LD R0 URPACKFI pack a file item * 1134 * LD R1 =>first char to pack * 1135 * LD R2 =>5 word block * 1136 * UREQ 0 * 1137 * JLTZ R0 request/packing error * 1138 * ST R0 =>terminating character * 1139 * * 1140 * Stack required = 5 * 1141 * 0 + max ( PACKITEM (5) ) * 1142 * * 1143 ********************************************************************************** 1144 00008DA3 1145 URRPACKP LABEL 08DA3 DC405A7E 1146 CALLNP PACKITEM pack the filename part 08DA4 FE0E8DBD 1147 JMP PACKERROR jump if error while packing 08DA5 6007FFFC 0 IMM 1148 LD R0 -5+1 number of words to give to user 08DA6 3857480B 1 5 BASE 1149 LEA R1 EQT,EQFILENM pointer to where to copy from 08DA7 FE0E8DAC 1150 JMP COPYSHARE share the copy to the user 1151 * --- 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1989 (XRQUREQ3) F 125 UREQ - String packers 1153 1154 ********************************************************************************** 1155 * * 1156 * Pack a filename specifier. The thing packed has the * 1157 * form of a complete file specifier and it is returned into a * 1158 * 15 word area the user has supplied. * 1159 * Call: * 1160 * LD R0 URPACKFS pack file specifier * 1161 * LD R1 => first char to pack * 1162 * LD R2 => 15 word block * 1163 * UREQ 0 * 1164 * JLTZ R0 request/packing error * 1165 * ST R1 => terminating character * 1166 * * 1167 * Stack required = 6 * 1168 * 0 + max ( PACKFS (6), UFREEMEM (0) ) * 1169 * * 1170 ********************************************************************************** 1171 00008DA8 1172 URRPACKF LABEL 08DA8 DC405ABF 1173 CALLNP PACKFS pack the file spec 08DA9 FE0E8DBD 1174 JMP PACKERROR 08DAA 6007FFF2 0 IMM 1175 LD R0 -15+1 number of words to copy 08DAB 38574801 1 5 BASE 1176 LEA R1 EQT,EQVOLUME 00008DAC 1177 COPYSHARE LABEL 08DAC B0124000 0 1 REG 1178 RSBM R0 R1 make indexing work below 08DAD 60C00412 3 1179 LD R3 CPPSA 08DAE 60C8DF11 3 3 ZBM 1180 LD R3 R3,PSCACHNP1 get pointer to user's regs 08DAF 6088DF14 2 3 ZBM 1181 LD R2 R3,CAR2/FLDADRS address in user's memory 08DB0 B0128000 0 2 REG 1182 RSBM R0 R2 08DB1 E516C803 4 3 BASE 1183 ST R4 R3,CAR1 return terminating pointer 08DB2 5C08F011 3 ZBM 1184 CMZ R3,CAMSR/MSRSRELOCB from user? 08DB3 FE0C8DB5 1185 JNE MONICLE 08DB4 59840080 IMM 1186 CLBMSR MSRSRELOC if so, relocate to him 00008DB5 1187 MONICLE LABEL 08DB5 60DC4000 3 10 BASE 1188 LD R3 R1,0(R0) move stuff to user 08DB6 E4DC8000 3 20 BASE 1189 ST R3 R2,0(R0) 08DB7 FA248DB5 0 1190 JIR R0 MONICLE 08DB8 59C40080 IMM 1191 IORMSR MSRSRELOC restore monitor fetching 08DB9 DC002F5D 1192 CALL UFREEMEM return packing area 08DBA 41440004 IMM 1193 PARV EQTEMPLOG 08DBB 40534000 5 REG 1194 PARVL EQT 08DBC FE0E59D6 1195 JMP NOERROR return with success 1196 * --- 1197 1198 * Packing error - release packing block and return error to user 00008DBD 1199 PACKERROR LABEL 08DBD 61D20000 7 0 REG 1200 LD R7 R0 copy the error code 08DBE DC002F5D 1201 CALL UFREEMEM release the packing block 08DBF 41440004 IMM 1202 PARV EQTEMPLOG 08DC0 40534000 5 REG 1203 PARVL EQT 08DC1 FE0E5995 1204 JMP UERROR7 return the error 1205 * --- 1206 1207 END UREQPACK routine 185 INPUT XRQUREQ4 user request processor (4) 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1990 (XRQUREQ4) F 126 UREQ - map in request 3 4 ********************************************************************************** 5 * * 6 * Request to map in pages from another address space * 7 * into the requesters. If the page does not exist in the * 8 * other address space, a zero page is created. * 9 * Call: * 10 * LD R0 * 11 * LD R1 * 12 * LD R2 * 13 * UREQ * 14 * JLTZ R0 * 15 * * 16 * The resulting page in the caller's memory merely * 17 * points to the requested page in the other's memory. * 18 * Whatever the other does to that page will show up in the * 19 * caller's address space. If the caller does a FREEPAGE it * 20 * does not zap the page in the other's memory but merely * 21 * undoes the association and leaves a zeropage in the * 22 * caller's memory. Other requests have similar actions (in * 23 * particular FRMAPIN). * 24 * * 25 * Eats R0:R3. * 26 * Stack required = 7 * 27 * 0 + max ( CREATEVP (2), DMOTEPAGE (7), INDEXPROC (4) ) * 28 * * 29 ********************************************************************************** 30 31 BLOCK UREQMAPINA routine 32 ENTRY UREQMAPINA entry to map in another process page 33 00008DC2 34 UREQMAPINA LABEL 08DC2 FA8C59D8 2 35 JNEZ R2 UERRORILR illegal request (unassigned sub-op) 08DC3 DC4087E9 36 CALLNP INDEXPROC find him who is requested 08DC4 FE0E59E0 37 JMP UERRORMNRP 08DC5 FE0E8DC7 38 JMP MAPINAOK reference to underprocess 08DC6 FE0E59E0 39 JMP UERRORMNRP may not point pages to our own pages 40 * --- 41 00008DC7 42 MAPINAOK LABEL 08DC7 FA7059E2 1 43 JZA R1 UERRORNSPP reference to under program 08DC8 60085371 0 1 ZBM 44 LD R0 R1,UPCSERNM UPC serial number of this underprocess 08DC9 E41F8001 0 6 STAK 45 ST R0 STAK SP,1 save it away for later use 08DCA 60C93273 3 4 ZBM 46 LD R3 R4,CAR1/BITS (32-(NPS LOG 2)):31 get requester's page number 08DCB DC403159 47 CALLNP DMOTEPAGE remove whatever is already there 08DCC DC0030C9 48 CALL CREATEVP create the indirect element 08DCD 41493273 4 ZBM 49 PARV R4,CAR1/BITS (32-(NPS LOG 2)):31 08DCE 41440000 IMM 50 PARV 0 08DCF 41440000 IMM 51 PARV 0 08DD0 41440000 IMM 52 PARV VPNOFCB 08DD1 40440000 IMM 53 PARVL 0 08DD2 60093274 0 4 ZBM 54 LD R0 R4,CAR2/BITS (32-(NPS LOG 2)):31 08DD3 E4084083 0 1 ZBM 55 ST R0 R1,VPINDPN place page we're pointing to 08DD4 EDC85011 1 ZBM 56 STW R1,VPINDRCT say I'm an indirect reference 08DD5 601F8001 0 6 STAK 57 LD R0 STAK SP,1 serial number of UPC for indirect reference 08DD6 E4085373 0 1 ZBM 58 ST R0 R1,VPUPCSERL only underprocess this VP may point to 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1991 (XRQUREQ4) F 126 UREQ - map in request 08DD7 60800414 2 59 LD R2 CPCUPC 08DD8 6016880D 0 2 BASE 60 LD R0 R2,UPCVMLIST 08DD9 E4085F10 0 1 ZBM 61 ST R0 R1,VPLINK link into the caller's VM list 08DDA E456880D 1 2 BASE 62 ST R1 R2,UPCVMLIST 08DDB FE0E59D6 63 JMP NOERROR success 64 * --- 65 66 END UREQMAPINA routine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1992 (XRQUREQ4) F 126 UREQ - Get lun numbers 69 70 ********************************************************************************** 71 * * 72 * Routines to fetch assorted lun numbers from the system. * 73 * * 74 * Stack required = 4 * 75 * 0 + max ( CNTFCBUSER (1), CREATEUCE (2), FINDUCE (2), * 76 * INDEXPROC (4), INDEXPROCX(4), LINKUCEIN (3), * 77 * LUNSEARCH (2), NEXTDOWN (2), UNLINKUCE (1) ) * 78 * * 79 ********************************************************************************** 80 81 BLOCK UREQLUNGET routine 82 ENTRY UREQLUNGET 83 ENTRY URQNXTFREE *** 84 ENTRY URQNXTUSED *** temporary until FREQs go away 85 00008DDC 86 UREQLUNGET LABEL 08DDC 64840004 2 IMM 87 CPR R2 URLGMAX is request in bounds 08DDD FE0659D8 88 JGE UERRORILR 08DDE 5CA48DDF 2 89 LDPC URLGJMP(R2) 90 * --- 91 00008DDF 92 URLGJMP LABEL 08DDF 00008DE3 93 VFD ADR UREQRUNLUN 0 - get the running lun number 08DE0 00008E07 94 VFD ADR URQNXTUSED 1 - get next lun in use 08DE1 00008E22 95 VFD ADR URQNXTFREE 2 - get next free lun 08DE2 00008E31 96 VFD ADR UREQGIVLUN 3 - pass lun to underprocess 00000004 ABS 97 URLGMAX EQU DISPW URLGJMP 98 99 100 ********************************************************************************** 101 * * 102 * Routine to fetch the run lun for the specified * 103 * process. We search both the global and local unit lists to * 104 * see if the unit is accessable to the requesting process. * 105 * If it is not, then we construct a new local unit. * 106 * User call: * 107 * * 108 * LD R0 request * 109 * UREQ procnum * 110 * JLTZ R0 request error * 111 * ST R0 run lun * 112 * * 113 ********************************************************************************** 114 00008DE3 115 UREQRUNLUN LABEL 08DE3 DC4087E6 116 CALLNP INDEXPROCX get pointer to the process 08DE4 FE0E59E0 117 JMP UERRORMNRP error return, he doesn't get access 08DE5 FA7059E2 1 118 JZA R1 UERRORNSPP underproc return, R1 = UPC pointer, if present 119 * \ / R1 = UPC pointer 120 121 * the requester may see the unit, get the FCB 122 * and see if it is already open for him 08DE6 60485F14 1 1 ZBM 123 LD R1 R1,UPCRUNFCB get the run unit 08DE7 FA728DE9 1 124 JNZA R1 HAVERUN jump if its there 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1993 (XRQUREQ4) F 126 UREQ - Get lun numbers 08DE8 001311E5 125 HALT HALTS11E5 run unit not found 00008DE9 126 HAVERUN LABEL 08DE9 DC0035BB 127 CALL FINDUCE deduce the unit number 08DEA 4052C000 3 REG 128 PARVL R3 pass the appropriate PSA 08DEB FA328E05 0 129 JNZA R0 GOTIT jump if found 130 * \ / 131 132 ********************************************************************************** 133 * The run unit exists, but is not yet open for the user. * 134 * We must find an available unit number and create a unit for * 135 * him. We try the local range first. * 136 ********************************************************************************** 137 08DEC 61524000 5 1 REG 138 LD FCB R1 copy FCB pointer 08DED 61000414 4 139 LD R4 CPCUPC get UPC in useful spot 08DEE 60491F15 1 4 ZBM 140 LD R1 R4,UPCUNITS get local unit list 08DEF 60C40064 3 IMM 141 LD R3 MAXLOCAL R3=where we start to look 08DF0 DC008E4E 142 CALL NEXTDOWN look downward for unused # 08DF1 40440001 IMM 143 PARVL LUNSIN look no lower than this # 08DF2 FE0E8DF4 144 JMP MBHIGH no luck here! 08DF3 FE0E8DFA 145 JMP GOTNEW go create a UCE 146 * --- 147 00008DF4 148 MBHIGH LABEL try the global list now 08DF4 60400412 1 149 LD R1 CPPSA R1 => our PSA 08DF5 60486316 1 1 ZBM 150 LD R1 R1,PSUNITS R1 => global list 08DF6 60C400C8 3 IMM 151 LD R3 LUNCMLOW-1 R3=where to start 08DF7 DC008E4E 152 CALL NEXTDOWN look downward, angel 08DF8 40440065 IMM 153 PARVL MAXLOCAL+1 stop here 08DF9 FE0E59EC 154 JMP UERRORNSL no available unit 155 * \ / 156 157 ********************************************************************************** 158 * We've located an unused unit number for this guy. * 159 * Create a UCE using it and the run FCB * 160 ********************************************************************************** 161 162 * \ / 00008DFA 163 GOTNEW LABEL 08DFA DC405D9F 164 CALLNP CNTFCBUSER say one more user of FCB 08DFB FE0E5988 165 JMP UERROR R0 has error code 08DFC DC003635 166 CALL CREATEUCE make a UCE for this unit 08DFD 4152C000 3 REG 167 PARV R3 pass unused number that we found 08DFE 40534000 5 REG 168 PARVL FCB and pass the FCB pointer 08DFF DC005DB2 169 CALL LINKUCEIN put in a list 08E00 41520000 0 REG 170 PARV R0 pass new UCE 08E01 41530000 4 REG 171 PARV R4 UPC address 08E02 40400412 172 PARVL CPPSA and PSA address 08E03 6012C000 0 3 REG 173 LD R0 R3 put unit number in convenient register 08E04 FE0E5999 174 JMP STOREINR0 return it to the requester 175 * --- 176 177 * Too easy! The unit already existed. Just hand back the number. 00008E05 178 GOTIT LABEL 08E05 60080080 0 0 ZBM 179 LD R0 R0,UCEUNIT pick up unit number 08E06 FE0E5999 180 JMP STOREINR0 return number in R0 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1994 (XRQUREQ4) F 126 UREQ - Get lun numbers 181 * --- 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1995 (XRQUREQ4) F 126 UREQ - Get lun numbers 183 184 ********************************************************************************** 185 * * 186 * This request returns the next higher lun number after * 187 * a given lun. * 188 * Request: * 189 * LD R0 URNEXTLUN * 190 * UREQ lun * 191 * JLTZ R0 * 192 * ST R1 * 193 * * 194 ********************************************************************************** 195 00000010 BYTE 196 LOOPBIT EQU BIT 0 bit in R7 to detect loop 000001FE ABS 197 SAMPLELUN EQU 2*MAXUNIT impossible unit number 198 00008E07 199 URQNXTUSED LABEL 08E07 604401FE 1 IMM 200 LD R1 SAMPLELUN load a sample unit number 08E08 64C40064 3 IMM 201 CPR R3 MAXLOCAL take a short cut if possible 08E09 FE048E15 202 JGT GLOBALONLY jump if looking in high range 08E0A 60000414 0 203 LD R0 CPCUPC get the current underprogram 08E0B 60081F15 0 0 ZBM 204 LD R0 R0,UPCUNITS get the local unit list 08E0C FA308E15 0 205 JZA R0 GLOBALONLY jump if there are no local units 08E0D EC0BC010 7 CBM 206 STZ R7/LOOPBIT neither list searched yet 00008E0E 207 TRYANOTHER LABEL 08E0E 64C80080 3 0 ZBM 208 CPR R3 R0,UCEUNIT is this lun greater than the base? 08E0F FE068E13 209 JGE LINK2NEXT jump if not 08E10 64480080 1 0 ZBM 210 CPR R1 R0,UCEUNIT is this lun less that the currently 211 * known maximum? 08E11 FE0A8E13 212 JLE LINK2NEXT jump if one closer is known 08E12 60480080 1 0 ZBM 213 LD R1 R0,UCEUNIT no, this is best so far - save the number 00008E13 214 LINK2NEXT LABEL 08E13 FA368E0E 0 215 LJNA R0 TRYANOTHER link until all of the list is searched 08E14 F7C08E19 7 216 JBT R7/LOOPBIT ALLSEARCHED jump if we've tried both lists 00008E15 217 GLOBALONLY LABEL 08E15 EDCBC010 7 CBM 218 STW R7/LOOPBIT say that we're finished with one list 08E16 60000412 0 219 LD R0 CPPSA get pointer to the current PSA 08E17 60082316 0 0 ZBM 220 LD R0 R0,PSUNITS point to first element in global list 08E18 FA328E0E 0 221 JNZA R0 TRYANOTHER cycle to check global units 222 * \ / 223 00008E19 224 ALLSEARCHED LABEL 08E19 644401FE 1 IMM 225 CPR R1 SAMPLELUN was anything found? 08E1A FE0259EC 226 JEQ UERRORNSL if not - error 08E1B 644400D2 1 IMM 227 CPR R1 LUNCMCNTL was found lun in CM range? 08E1C FE088E20 228 JLT OK2KNOW if not, let him look 08E1D 60000414 0 229 LD R0 CPCUPC get the current UPC pointer 08E1E 5C080610 0 ZBM 230 CMZ R0,UPCNTLMODE is this control mode? 08E1F FE0259EC 231 JEQ UERRORNSL if not, the requester may not see 00008E20 232 OK2KNOW LABEL 08E20 E4570803 1 4 BASE 233 ST R1 R4,CAR1 users R1 := next lun number 08E21 FE0E59D6 234 JMP NOERROR no error completion - return to caller 235 * --- 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1996 (XRQUREQ4) F 126 UREQ - Get lun numbers 237 238 ********************************************************************************** 239 * * 240 * Request to get a free lun. This is a lun to be used * 241 * as a scratch file by a program. * 242 * User call: * 243 * LD R0 URFREELUN * 244 * UREQ lun * 245 * JLTZ R0 request error * 246 * ST R1 unequipped lun less than or equal to passed lun * 247 * * 248 ********************************************************************************** 249 00008E22 250 URQNXTFREE LABEL 08E22 64C40064 3 IMM 251 CPR R3 MAXLOCAL looking for a local or global number? 08E23 FE0A8E2A 252 JLE LOCALSONLY search only the appropriate list 08E24 60400412 1 253 LD R1 CPPSA get the current PSA pointer 08E25 60486316 1 1 ZBM 254 LD R1 R1,PSUNITS get the root of the global list 08E26 DC008E4E 255 CALL NEXTDOWN look for lower numbers 08E27 40440065 IMM 256 PARVL MAXLOCAL+1 no lower than this 08E28 FE0E59EC 257 JMP UERRORNSL nothing available globally 08E29 FE0E8E2F 258 JMP THISFREE now we've got something 259 * --- 260 00008E2A 261 LOCALSONLY LABEL scan only the local list 08E2A 60400414 1 262 LD R1 CPCUPC locate current underprocess 08E2B 60485F15 1 1 ZBM 263 LD R1 R1,UPCUNITS R1 => local list 08E2C DC008E4E 264 CALL NEXTDOWN search a while 08E2D 40440001 IMM 265 PARVL LUNSIN floor 08E2E FE0E59EC 266 JMP UERRORNSL nothing available locally 267 * \ / 268 00008E2F 269 THISFREE LABEL R3 has unused number 08E2F E4D70803 3 4 BASE 270 ST R3 R4,CAR1 return the LUN number in the users R1 08E30 FE0E59D6 271 JMP NOERROR return 272 * --- 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1997 (XRQUREQ4) F 126 UREQ - Get lun numbers 274 275 ********************************************************************************** 276 * * 277 * URGIVELUN. * 278 * User request to pass an existing unit in the current * 279 * process to the specified underprogram. The unit is removed * 280 * from the calling process. The unit number passed in R2 * 281 * must be in the local range and must not be in use by the * 282 * underprocess. The unit number in R1 must be in the user * 283 * range. Since the unit is not being moved to another PSA * 284 * the unit may have equivalences, mapped-in pages, etc. * 285 * Call: * 286 * * 287 * LD R0 URGIVELUN * 288 * LD R1 * 289 * LD R2 * 290 * UREQ * 291 * JLTZ R0 request error * 292 * * 293 ********************************************************************************** 294 00008E31 295 UREQGIVLUN LABEL 08E31 6092C000 2 3 REG 296 LD R2 R3 save process number 08E32 60D70803 3 4 BASE 297 LD R3 R4,CAR1 get the vanishing unit number 08E33 64C400C9 3 IMM 298 CPR R3 LUNCMLOW is it vanilla?? 08E34 FE0659DA 299 JGE UERRORPOB user giving off his terminal? 08E35 DC405B39 300 CALLNP LUNSEARCH find its FCB 08E36 FB7059EC 5 301 JZA FCB UERRORNSL can't pass what you don't have 302 * \ / 303 08E37 60D28000 3 2 REG 304 LD R3 R2 get process number back 08E38 DC4087E9 305 CALLNP INDEXPROC can we see the process? 08E39 FE0E59E0 306 JMP UERRORMNRP no go! 08E3A FE0E8E3C 307 JMP ITSANUP yes sir! 08E3B FE0E59E0 308 JMP UERRORMNRP can't pass to oneself! 309 * --- 310 00008E3C 311 ITSANUP LABEL 08E3C FA7059E2 1 312 JZA R1 UERRORNSPP jump if not that many underprogs 313 * \ / 314 315 ********************************************************************************** 316 * The unit exists and may be passed, and the process * 317 * exists and may be referenced. Now check to see that the * 318 * underprocess isn't already using the unit number the * 319 * requester is trying to allocate. If that's OK, give him * 320 * the unit. * 321 ********************************************************************************** 322 323 * R3 = unit number that underprocess would see 324 * R1 => UPC for target underprocess 08E3D 60D70804 3 4 BASE 325 LD R3 R4,CAR2 get number to be 08E3E 64C40064 3 IMM 326 CPR R3 MAXLOCAL might it be in bounds? 08E3F FE0459DA 327 JGT UERRORPOB jump if it can't be 08E40 FACA59DA 3 328 JLEZ R3 UERRORPOB is he kidding? 08E41 60085F15 0 1 ZBM 329 LD R0 R1,UPCUNITS get local list of target UPC 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1998 (XRQUREQ4) F 126 UREQ - Get lun numbers 08E42 3CC80080 3 0 ZBM 330 LSRCH R3 R0,UCEUNIT try not to find the unit 08E43 FE0259C0 331 JEQ FERRORLAE unit already open 08E44 61524000 5 1 REG 332 LD R5 R1 save UPC address 08E45 DC005DD0 333 CALL UNLINKUCE remove the gift 08E46 40570803 4 BASE 334 PARVL R4,CAR1 pass unit number 08E47 60570804 1 4 BASE 335 LD R1 R4,CAR2 get the new number 08E48 E4480080 1 0 ZBM 336 ST R1 R0,UCEUNIT pop it into the UCE 08E49 DC005DB2 337 CALL LINKUCEIN hand over the unit 08E4A 41520000 0 REG 338 PARV R0 pass UCE 08E4B 41534000 5 REG 339 PARV R5 UPC address 08E4C 40440000 IMM 340 PARVL 0 PSA address 08E4D FE0E59D6 341 JMP NOERROR return safely 342 * --- 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE1999 (XRQUREQ4) F 126 UREQ - Get lun numbers 344 345 ********************************************************************************** 346 * * 347 * NEXTDOWN. * 348 * This subroutine is passed a range and a unit list and * 349 * returns the greatest number in the range for which there is * 350 * no logical unit with a corresponding number in the list. * 351 * Call: * 352 * R3 = ceiling value in range * 353 * R1 => unit list * 354 * CALL NEXTDOWN * 355 * PARVL * 356 * JMP * 357 * * 358 * * 359 * Eats R0 (R3 also if no find) * 360 * Stack required = 2 * 361 * * 362 ********************************************************************************** 363 364 BLOCK NEXTDOWN subroutine 365 ENTRY NEXTDOWN 366 367 BEGFRAME 00178801 6 BASE 368 MIN BSS 1 369 ENDFRAME 370 08E4E DD1F8002 6 STAK 371 NEXTDOWN ENTR PUSH 08E4F C0578801 6 BASE 372 STPVL SP,MIN set floor value 00008E50 373 NDLOOP LABEL 08E50 64D78801 3 6 BASE 374 CPR R3 SP,MIN are we under the floor? 08E51 FE088E56 375 JLT NDLEAVE sorry, none available 08E52 60124000 0 1 REG 376 LD R0 R1 renew list head 08E53 3CC80080 3 0 ZBM 377 LSRCH R3 R0,UCEUNIT is this number present? 08E54 FE0C8E57 378 JNE GOTONE no, so give it back 08E55 FAE68E50 3 379 JDR R3 NDLOOP try next number lower 08E56 5D1F8002 6 STAK 380 NDLEAVE LEAVE POP 381 * --- 382 00008E57 383 GOTONE LABEL 08E57 FBE08E56 7 384 IRJ R7 NDLEAVE set good return 385 * --- 386 387 END NEXTDOWN subroutine 388 END UREQLUNGET routine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2000 (XRQUREQ4) F 126 UREQ - User time interrupts and control 391 392 ********************************************************************************** 393 * * 394 * These requests allow users to control timed events. * 395 * * 396 * Stack required = 7 * 397 * 0 + max ( UREQCLRTIM (2), UREQDELAY (7), UREQDELR (7), * 398 * UREQSETTIM (2) ) * 399 * * 400 ********************************************************************************** 401 402 BLOCK UREQTIMEC routine 403 ENTRY UREQTIMEC request a timer interrupt 404 405 BLOCK UREQTIMEC decoder 406 ENTRY UREQTIMEC request a timer interrupt 407 00008E58 408 UREQTIMEC LABEL 08E58 68840004 2 IMM 409 UCPR R2 UREQTIMEM check against highest allowable sub-code 08E59 FE0659D8 410 JGE UERRORILR jump if not legal op 08E5A 5CA48E5B 2 411 LDPC UREQTIMEJ(R2) go to appropriate processor 412 * --- 413 00008E5B 414 UREQTIMEJ LABEL 08E5B 00008E5F 415 ADR UREQDELAY delay program execution 08E5C 00008EAB 416 ADR UREQSETTIM set time interrupt 08E5D 00008EB0 417 ADR UREQCLRTIM clear time interrupt 08E5E 00008E9C 418 ADR UREQDELR finish program delay 00000004 ABS 419 UREQTIMEM EQU DISPW UREQTIMEJ number of valid sub-ops 420 END UREQTIMEC decoder 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2001 (XRQUREQ4) F 126 UREQ - program delay 423 424 ********************************************************************************** 425 * * 426 * Time delay request user call: * 427 * LD R0 URDELAY * 428 * LD R1 range = 1:60*60 * 429 * LD R2 * 430 * UREQ 0 * 431 * JLTZ R0 (no delay) * 432 * JEQZ R2 * 433 * ST R2 * 434 * ST R1 * 435 * ST R3 * 436 * * 437 * This request stops the running of a process for the * 438 * specified amount of time or until a selected event occurs. * 439 * The UREQ will pause process execution and when execution * 440 * begins, either the entire time has been delayed (R1=R2=0) * 441 * or some event has occurred and the delay was ended * 442 * prematurely. In the latter case, R2 contains the bit for * 443 * the terminating event and R1 contains the amount that was * 444 * left to delay. R3 will contain the LUN that ended the * 445 * delay. * 446 * The special case of a delay time of 0 is treated by * 447 * placing the guy at the end of the runnable queue. * 448 * The event bits are the bits that are assigned for the * 449 * interrupt mask. Here, the bits that have significance are: * 450 * bit event * 451 * --- ----- * 452 * 6 terminal BREAK * 453 * 8 non-empty terminal * 454 * 9 non-empty path * 455 * * 456 * Take note that there is a priority in the giving of * 457 * event interrupts. If a process is explicitly waiting for * 458 * an event, then, rather giving any selected interrupt, that * 459 * wait is satisfied. For instance, if a program has * 460 * non-empty path interrupts enabled but is either delaying * 461 * with non-empty path event termination or is waiting on a * 462 * read from a path, then either the delay ends or the read is * 463 * completed rather than giving the interrupt. * 464 * * 465 * Stack required = 7 * 466 * 2 + max ( CHECKEVENT (5), CHKINTCODE (4), ELSRCHER (1), * 467 * FINDTERMCB (1), LOCKWAIT (0), MOVETRMGP (3), * 468 * SETREADER (3), SUSPENDFRQ (1), SUSPENDME (0) ) * 469 * * 470 ********************************************************************************** 471 472 BLOCK UREQDELAY code 473 ENTRY UREQDELAY start of delay code 474 ENTRY UREQDELR finish off delay and restart user 475 476 BEGFRAME2 00178800 6 BASE 477 TERMBLOCK BSS 1 address of TCB, if needed 00178801 6 BASE 478 DELCODE BSS 1 XREQ return code (mostly) 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2002 (XRQUREQ4) F 126 UREQ - program delay 479 ENDFRAME 480 00008E5F 481 UREQDELAY LABEL 08E5F EC1F8002 6 STAK 482 STZ PUSH make stack, zero TERMBLOCK 08E60 60170803 0 4 BASE 483 LD R0 R4,CAR1 fetch the amount of time delay 08E61 FA028E86 0 484 JEQZ R0 NODELAY jump if no time to wait 08E62 68040E10 0 IMM 485 UCPR R0 60*60 check against this maximum ( 1 hour ) 08E63 FE0459DA 486 JGT UERRORPOB jump on absurd time value 08E64 5C091014 4 ZBM 487 CMZ R4,CAR2/BIT CAIMNETERM looking at terminal emptyness? 08E65 FE028E75 488 JEQ DELCHECK jump if not 08E66 DC0035C5 489 CALL FINDTERMCB get console .TERM 08E67 40400412 490 PARVL CPPSA pass current session 08E68 FA708E75 1 491 JZA R1 DELCHECK jump if none 08E69 61D30000 7 4 REG 492 LD R7 TCB save a reg 08E6A 61124000 4 1 REG 493 LD TCB R1 put TCB in correct reg 08E6B E5178800 4 6 BASE 494 ST TCB SP,TERMBLOCK save TCB address 495 PLOCK TCB,TCLOCK lock it 08E6C 0CC00000 495 IOFF 08E6D D1D70818 4 BASE 495 SETT TCB,TCLOCK 08E6E FE0C8E70 495 JNE MA(2+DISPW MA 0) 08E6F DC40308B 495 CALLNP LOCKWAIT 08E70 DC407312 496 CALLNP SETREADER make right TCG/TCS 08E71 EDC91615 4 ZBM 497 STW TCB,TCINTTCG maybe fake claim to TCG/TCS 498 PUNLOCK TCB,TCLOCK allow other access to TCB 08E72 EC170818 4 BASE 498 STZ TCB,TCLOCK 08E73 0C800000 498 ION 08E74 6113C000 4 7 REG 499 LD TCB R7 restore a reg 500 * \ / 00008E75 501 DELCHECK LABEL 08E75 61400412 5 502 LD R5 CPPSA current PSA pointer 503 PLOCK R5,EVENTLOCK lock critical region 08E76 0CC00000 503 IOFF 08E77 D1D74808 5 BASE 503 SETT R5,EVENTLOCK 08E78 FE0C8E7A 503 JNE MA(2+DISPW MA 0) 08E79 DC40308B 503 CALLNP LOCKWAIT 08E7A DC003411 504 CALL CHECKEVENT see if event is already there 08E7B 40570804 4 BASE 505 PARVL R4,CAR2 user's event mask 08E7C FA0C8E90 0 506 JNEZ R0 NOWAITING there is no reason to wait 08E7D DC003541 507 CALL SUSPENDFRQ suspend me waiting for time 08E7E 41570804 4 BASE 508 PARV R4,CAR2 parameter is event mask 08E7F 41001DB7 509 PAR SQTIMEWAIT indicate the queue to shutdown in 08E80 40174808 5 BASE 510 PARL R5,EVENTLOCK indicate where the lock is 511 * \ / 512 PUNLOCK R5,EVENTLOCK in case didn't suspend 08E81 EC174808 5 BASE 512 STZ R5,EVENTLOCK 08E82 0C800000 512 ION 08E83 600400AD 0 IMM 513 LD R0 XREQERSUSP error code 08E84 E4178801 0 6 BASE 514 ST R0 SP,DELCODE save it 08E85 FE0E8EA0 515 JMP REDOTCG check terminator situation 516 * --- 517 518 * No time to wait. Assume the user wishes to be shut 519 * down at the end of the runnable queue. This allows 520 * other lock holders (for example) to run ahead. 00008E86 521 NODELAY LABEL 08E86 EC170804 4 BASE 522 STZ R4,CAR2 indicate to caller that interrupt is timeout 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2003 (XRQUREQ4) F 126 UREQ - program delay 08E87 60000412 0 523 LD R0 CPPSA get us 08E88 EDC81414 0 ZBM 524 STW R0,PSENDRUN tells scheduler clip our wings 08E89 39578801 5 6 BASE 525 LEA R5 SP,DELCODE R5 => something for SUSPENDME to "unlock" 08E8A 0CC00000 526 IOFF all quiet now 08E8B DC00351C 527 CALL SUSPENDME shut down at end of runnable queue 08E8C 410059D6 528 PAR NOERROR restart at the end 08E8D 41440000 IMM 529 PARV 0 shutdown parm is figured later 08E8E 41001DAA 530 PAR SQRUNNABLE 08E8F 40174400 5 @R 531 PARL @R5 pass the lock 532 * --- 533 534 * The event is already true. Don't wait. 00008E90 535 NOWAITING LABEL 08E90 E4970804 2 4 BASE 536 ST R2 R4,CAR2 event code into caller's R2 08E91 60128000 0 2 REG 537 LD R0 R2 copy the event code 08E92 DC4034F6 538 CALLNP ELSRCHER get rid of any interrupt elements 539 PUNLOCK R5,EVENTLOCK release lock 08E93 EC174808 5 BASE 539 STZ R5,EVENTLOCK 08E94 0C800000 539 ION 08E95 6052C000 1 3 REG 540 LD R1 R3 copy subcode for call 08E96 DC0034EA 541 CALL CHKINTCODE convert subcode 08E97 41400412 542 PARV CPPSA pass current session 08E98 40570804 4 BASE 543 PARVL R4,CAR2 and interrupt code 08E99 E4570805 1 4 BASE 544 ST R1 R4,CAR3 return who did it 08E9A EC178801 6 BASE 545 STZ SP,DELCODE return code is 0 08E9B FE0E8EA0 546 JMP REDOTCG clean up and go 547 * --- 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2004 (XRQUREQ4) F 126 UREQ - program delay 549 550 ********************************************************************************** 551 * * 552 * Finish time delay request. We come here at the end of * 553 * a URDELAY or when the awaited event has occurred. ONCEASEC * 554 * or GIVEUINT has taken us off the wait queue and given us a * 555 * new request code. Also, it has already set up the * 556 * requester's R1 and/or R2 as necessary. Finish delay by * 557 * getting the correct TCA/TCS into the console .TERM and * 558 * maybe scanning the input buffer. * 559 * If a user happens to ask for this request, it's * 560 * basically a NOP since the "correct TCG/TCS" is already in * 561 * the TCB. * 562 * * 563 * Call: * 564 * LD R0 URDELAYR * 565 * UREQ 0 * 566 * JLTZ R0 * 567 * * 568 ********************************************************************************** 569 00008E9C 570 UREQDELR LABEL 08E9C DC0035C5 571 CALL FINDTERMCB get our TCB 08E9D 40400412 572 PARVL CPPSA pass session 08E9E E45F8002 1 6 STAK 573 ST R1 PUSH make stack, set TERMBLOCK 08E9F EC178801 6 BASE 574 STZ SP,DELCODE return code is OK 575 * \ / 576 00008EA0 577 REDOTCG LABEL reshuffle TCG/TCA if necessary 08EA0 61178800 4 6 BASE 578 LD TCB SP,TERMBLOCK get possible .TERM 08EA1 FB308EA9 4 579 JZA TCB NOMORE jump if we did nothing 580 PLOCK TCB,TCLOCK get access to TCB 08EA2 0CC00000 580 IOFF 08EA3 D1D70818 4 BASE 580 SETT TCB,TCLOCK 08EA4 FE0C8EA6 580 JNE MA(2+DISPW MA 0) 08EA5 DC40308B 580 CALLNP LOCKWAIT 08EA6 DC403379 581 CALLNP MOVETRMGP put in correct TCG/TCA, maybe CALCTERMC 582 PUNLOCK TCB,TCLOCK unlock TCB 08EA7 EC170818 4 BASE 582 STZ TCB,TCLOCK 08EA8 0C800000 582 ION 00008EA9 583 NOMORE LABEL 08EA9 60178801 0 6 BASE 584 LD R0 SP,DELCODE get return code 08EAA FE0E5988 585 JMP UERROR return, pass error 586 * --- 587 588 END UREQDELAY and UREQDELR 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2005 (XRQUREQ4) F 126 UREQ - program delay 590 591 ********************************************************************************** 592 * * 593 * Set timer interrupt. User call: * 594 * LD R0 URSETTIMIN * 595 * LD R1 interval in seconds (max 1 day) * 596 * UREQ 0 * 597 * JLTZ R0 error * 598 * ST R1 seconds remaining in previous interval (0 if none) * 599 * * 600 * Clear timer interrupt. User call: * 601 * LD R0 URCLRTIMIN * 602 * UREQ 0 * 603 * JLTZ R0 error * 604 * ST R1 time remaining (0 if no interval outstanding) * 605 * * 606 * Each program may have only one time interrupt * 607 * outstanding at any time. * 608 * * 609 * Stack required = 2 * 610 * 0 + max ( TIMEKILL (2), TIMESET (2) ) * 611 * * 612 ********************************************************************************** 613 614 BLOCK UREQSETTIM and UREQCLRTIM 615 ENTRY UREQSETTIM setup timer interrupt 616 ENTRY UREQCLRTIM cancel timer interrupt 617 00008EAB 618 UREQSETTIM LABEL 08EAB 60170803 0 4 BASE 619 LD R0 R4,CAR1 get interval requested 08EAC 68055180 0 IMM 620 UCPR R0 24*60*60 within one day? 08EAD FE0459DA 621 JGT UERRORPOB error it not 08EAE EDCBC010 7 CBM 622 STW R7/BIT 0 flag: doing SET request 08EAF FE0E8EB1 623 JMP SHARETIME 624 * --- 625 00008EB0 626 UREQCLRTIM LABEL 08EB0 EC0BC010 7 CBM 627 STZ R7/BIT 0 flag: doing CLEAR request 628 * \ / 629 00008EB1 630 SHARETIME LABEL 08EB1 61400414 5 631 LD R5 CPCUPC R5 -> our UPC 08EB2 EC17480C 5 BASE 632 STZ R5,UPCINTTIME say interrupt no longer outstanding 08EB3 61174811 4 5 BASE 633 LD R4 R5,UPCTIMESER R4 = serial number of old time request 08EB4 DC404517 634 CALLNP TIMEKILL kill it 08EB5 60840000 2 IMM 635 LD R2 0 (error return, no longer outstanding) 08EB6 188401F4 2 IMM 636 ADD R2 MSECSS/2 add to time remaining, for rounding 08EB7 148403E8 2 IMM 637 DIV R2 MSECSS R2 = time in old interval, in seconds 08EB8 61000412 4 638 LD R4 CPPSA get current PSA pointer 08EB9 61091F11 4 4 ZBM 639 LD R4 R4,PSCACHNP1 R4 -> caller's CA 08EBA E0970803 2 4 BASE 640 EXCH R2 R4,CAR1 save time remaining, get requested time 08EBB F3C059D6 7 641 JBF R7/BIT 0 NOERROR jump if clear time request 642 08EBC 1C8403E8 2 IMM 643 MUL R2 MSECSS R2 = time request, in milliseconds 08EBD 60001EE6 0 644 LD R0 FDATE(1) low half of current time 08EBE 18128000 0 2 REG 645 ADD R0 R2 R0 = time to interrupt 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2006 (XRQUREQ4) F 126 UREQ - program delay 08EBF 10040001 0 IMM 646 SUB R0 1 make sure that 08EC0 7C040001 0 IMM 647 IOR R0 1 time is not zero 08EC1 E417480C 0 5 BASE 648 ST R0 R5,UPCINTTIME save time at which to interrupt 08EC2 60D28000 3 2 REG 649 LD R3 R2 R3 = time interval 08EC3 DC0044F8 650 CALL TIMESET request an interrupt then 08EC4 4352C000 3 REG 651 PARV2 R3 time until interrupt 08EC5 41440000 IMM 652 PARV 0 CPU number required (any) 08EC6 41003506 653 PAR USERTIMINT subroutine to call 08EC7 40400412 654 PARVL CPPSA parameter (PSA ptr) 08EC8 E5174811 4 5 BASE 655 ST R4 R5,UPCTIMESER save serial number of timer element 08EC9 FE0E59D6 656 JMP NOERROR and all done 657 * --- 658 659 END UREQSETTIM and UREQCLRTIM 660 661 END UREQTIMEC routine 186 INPUT UREQMESSAGE interprocess message requests 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2007 (UREQMESSAGE) F 127 UREQ - Inter-Session Message Facility 3 4 BLOCK Inter-Session Message Facility 5 ENTRY UREQMSG UREQs to manipulate messages 6 ENTRY PURGEMSGS Purge all messages (at logoff) 7 8 ********************************************************************************** 9 * * 10 * This block implements the inter-session message facility. * 11 * * 12 * This code assumes that a send request will usually * 13 * succeed (i.e., that we will seldom have to suspend a sender * 14 * because the receiver's queue is full). If a send request * 15 * does not succeed, it does more work than it absolutely has * 16 * to, but we did it this way in the interest of simplicity. * 17 * * 18 ********************************************************************************** 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2008 (UREQMESSAGE) F 127 UREQ - Inter-Session Message Facility 20 21 ********************************************************************************** 22 * * 23 * UREQMSG - UREQ routine to manipulate messages * 24 * * 25 * Here we sort out the various requests and call the * 26 * appropriate routine. The routines exit via XREQRETURN. * 27 * * 28 * R4 -> caller's Console Area * 29 * R2 = sub-request code * 30 * JMP UREQMSG * 31 * * 32 * Stack required = 11 * 33 * 0 + max ( CLEARMASK (7), GETMASK (1), RECEIVEMSG (11), * 34 * SENDMSG (10), SETMASK (1) ) * 35 * * 36 ********************************************************************************** 37 38 BLOCK UREQMSG routine 39 ENTRY UREQMSG 40 00008ECA 41 UREQMSG LABEL 08ECA 68840005 2 IMM 42 UCPR R2 FUNCMAX is request good? 08ECB FE0659D8 43 JGE UERRORILR jump if not 08ECC 60000414 0 44 LD R0 CPCUPC R0 -> our UPC 08ECD 5C081610 0 ZBM 45 CMZ R0,UPRSTCTG4 are we allowed to do this? 08ECE FE0C59F6 46 JNE UERRORURX jump if not allowed 08ECF 60248ED2 0 2 47 LD R0 FUNCTAB(R2) R0 -> routine 08ED0 DC560400 0 @R 48 CALLNP @R0 call it 08ED1 FE0E5988 49 JMP UERROR and all done 50 * --- 51 00008ED2 52 FUNCTAB LABEL 08ED2 00008ED7 53 ADR SENDMSG 0 - send message 08ED3 00008F6C 54 ADR RECEIVEMSG 1 - receive message 08ED4 00008FAC 55 ADR GETMASK 2 - get message class mask 08ED5 00008FB2 56 ADR SETMASK 3 - set bits in message mask 08ED6 00008FBA 57 ADR CLEARMASK 4 - clear bits in message mask 00000005 ABS 58 FUNCMAX EQU DISPW FUNCTAB 59 60 END UREQMSG routine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2009 (UREQMESSAGE) F 127 UREQ - Inter-Session Message Facility 62 63 ********************************************************************************** 64 * * 65 * SENDMSG - Send a Message * 66 * * 67 * Sends a Message to another Session * 68 * * 69 * R4 -> Caller's CA * 70 * R4,CAR1 = message length * 71 * R4,CAR2 = message address * 72 * CALLNP SENDMSG * 73 * ST R0 error code (0 = OK) * 74 * * 75 * Eats R0:R5. May suspend via SUSPENDFRQ. * 76 * Stack required = 10 * 77 * 2 + max ( CLRMEMTRAP (1), GIVEUINT (8), LOCKWAIT (0), * 78 * P12TOCHAR (6), P6TOCHAR (3), SETMEMTRAP(1), * 79 * SFREEMEM (0), SGETMEM (0), SRCHLIST (1), * 80 * SUSPENDFRQ (1), UNSRCHLIST(1) ) * 81 * * 82 ********************************************************************************** 83 84 BLOCK SENDMSG subroutine 85 ENTRY SENDMSG 86 87 BEGFRAME 00178801 6 BASE 88 CLASSMASK BSS 1 copy of PSMSGALLOW of receiving session 89 ENDFRAME 90 08ED7 DD5F8002 6 STAK 91 SENDMSG ENTRNP PUSH 08ED8 60570803 1 4 BASE 92 LD R1 R4,CAR1 get message length 08ED9 64440008 1 IMM 93 CPR R1 MQEHEADLEN must have at least a header 08EDA FE088F64 94 JLT BADLENGTH jump if too short 08EDB 644407E8 1 IMM 95 CPR R1 MQEMAXLEN check maximum length 08EDC FE048F64 96 JGT BADLENGTH jump if too big 97 08EDD 5C565017 1 REG 98 HIB R1+MQEOVHDLEN-1 08EDE 60C4001E 3 IMM 99 LD R3 WORDLNTH-(CPW LOG 2) 08EDF 10D20000 3 0 REG 100 SUB R3 R0 R3 = log size of block needed 08EE0 DC002ED0 101 CALL SGETMEM get a chunk of memory 08EE1 4052C000 3 REG 102 PARVL R3 08EE2 61520000 5 0 REG 103 LD R5 R0 R5 -> new message 08EE3 EC174800 5 BASE 104 STZ R5,0 clear first word 08EE4 E4C94040 3 5 ZBM 105 ST R3 R5,MQELOGSIZ save log size for freeing 08EE5 60570803 1 4 BASE 106 LD R1 R4,CAR1 get message length 08EE6 18440014 1 IMM 107 ADD R1 MQEACCTLEN add length of the account header 08EE7 E44948B0 1 5 ZBM 108 ST R1 R5,MQELENGTH the length of things 109 08EE8 DC005BCF 110 CALL SETMEMTRAP trap user memory errors 08EE9 40008F66 111 PARL USERMEMBAD where to go 112 08EEA 60170804 0 4 BASE 113 LD R0 R4,CAR2 where message comes from 08EEB 60570803 1 4 BASE 114 LD R1 R4,CAR1 length of message 08EEC 38974018 2 5 CACH 115 LEA R2 R5,MQETEXT(-MQEHEADLEN) where to move to 08EED 60C40040 3 IMM 116 LD R3 MSRFRELOC 08EEE 28D70801 3 4 BASE 117 BSUB R3 R4,CAMSR R3 = MSR bit to clear 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2010 (UREQMESSAGE) F 127 UREQ - Inter-Session Message Facility 08EEF 5992C000 3 REG 118 CLBMSR R3 change fetching as needed 08EF0 FE400000 119 CMOVE copy the message 08EF1 59D2C000 3 REG 120 IORMSR R3 restore the MSR 121 08EF2 DC405BD4 122 CALLNP CLRMEMTRAP quit trapping user errors 123 08EF3 38174018 0 5 CACH 124 LEA R0 R5,MQETEXT(-MQEHEADLEN) put message 08EF4 60440008 1 IMM 125 LD R1 MQEHEADLEN header into 08EF5 38974801 2 5 BASE 126 LEA R2 R5,MQEBUF correct 08EF6 FE400000 127 CMOVE place 128 08EF7 60000414 0 129 LD R0 CPCUPC R0 -> my UPC 08EF8 600800F0 0 0 ZBM 130 LD R0 R0,UPCPRIV get program restrictions 08EF9 74040800 0 IMM 131 XOR R0 1*UPCNTLMODB (Control Mode is privilege, not restriction) 08EFA A8174802 0 5 BASE 132 BRSBM R0 R5,MQEPRIVS remove privileges we don't have 08EFB 60093611 0 4 ZBM 133 LD R0 R4,CAMSR/MSRIRELOCB 08EFC F8094212 0 5 ZBM 134 ANDM R0 R5,MQEPRIVS/BIT 1 remove system privileges, if necessary 135 08EFD 3897400C 2 5 CACH 136 LEA R2 R5,MQEACCT R2 -> where to put account name 08EFE 5C094012 5 ZBM 137 CMZ R5,MQEPRIVS/BIT 0 does he want the account name? 08EFF FE028F05 138 JEQ TRYLOGONID jump if not wanted 08F00 5C094412 5 ZBM 139 CMZ R5,MQEPRIVS/MSGPRIVLID check if logged on account name requested 08F01 FE0C8F5A 140 JNE BADPRIV if so, error, can't have both names 08F02 60000414 0 141 LD R0 CPCUPC R0 -> our UPC 08F03 61081F13 4 0 ZBM 142 LD R4 R0,UPCPRIVULB R4 -> privilege account ULB 08F04 FE0E8F09 143 JMP MOVEACCT jump to put name in message 144 * --- 145 00008F05 146 TRYLOGONID LABEL 08F05 5C094412 5 ZBM 147 CMZ R5,MQEPRIVS/MSGPRIVLID check if logged on account name requested 08F06 FE028F11 148 JEQ NOACCT jump if no account name needed 08F07 60000412 0 149 LD R0 CPPSA get pointer to PSA 08F08 61081F13 4 0 ZBM 150 LD R4 R0,PSUSERLIMP pick up pointer to logged on ULB 00008F09 151 MOVEACCT LABEL 08F09 DC005926 152 CALL P12TOCHAR convert account name to ASCII 08F0A 43570802 4 BASE 153 PARV2 R4,ULACCNM account name 08F0B 4017400C 5 CACH 154 PARL R5,MQEACCT where to put it 155 * \ / R2 => null at end of result string 08F0C 6004002E 0 IMM 156 LD R0 "." 08F0D E4168000 0 2 CACH 157 ST R0 CACH R2,0 put "." after name 08F0E DC00593E 158 CALL P6TOCHAR convert project 08F0F 41570804 4 BASE 159 PARV R4,ULACCPROJ project name 08F10 40168001 2 CACH 160 PARL CACH R2,1 where to put it 161 * \ / R2 => null at end of result string 00008F11 162 NOACCT LABEL 08F11 38574020 1 5 CACH 163 LEA R1 R5,MQEACCT(MQEACCTLEN) R1 -> end of field 08F12 604A5F30 1 1 CBM 164 LD R1 R1/FLDCHARS 08F13 104A9F30 1 2 CBM 165 SUB R1 R2/FLDCHARS R1 = remaining length 08F14 FE580020 166 CFILL " " pad with blanks 167 08F15 DC0030AA 168 CALL SRCHLIST lock the session list 08F16 40001EB2 169 PARL PCNTLLOCK 08F17 61001EB1 4 170 LD R4 PCONTROL R4 -> a PCB 08F18 60094101 0 5 ZBM 171 LD R0 R5,MQEPROC R0 = session number looking for 172 00008F19 173 PCBLOOP LABEL 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2011 (UREQMESSAGE) F 127 UREQ - Inter-Session Message Facility 08F19 640900C3 0 4 ZBM 174 CPR R0 R4,PCPROCNUM is this guy ours? 08F1A FE028F21 175 JEQ GOTPROC jump if so, we got it 08F1B 61091F14 4 4 ZBM 176 LD R4 R4,PCNXTCB R4 -> next PCB 08F1C FB328F19 4 177 JNZA R4 PCBLOOP loop until found 178 08F1D DC0030B7 179 CALL UNSRCHLIST release the session list 08F1E 40001EB2 180 PARL PCNTLLOCK 08F1F 600400A3 0 IMM 181 LD R0 XREQERNSPP error: no such program/process 08F20 FE0E8F5E 182 JMP FREEMSG go give error 183 * --- 184 00008F21 185 GOTPROC LABEL 08F21 61091F13 4 4 ZBM 186 LD R4 R4,PCPSADRS R4 -> receiver's PSA 08F22 60000412 0 187 LD R0 CPPSA R0 -> my PSA 08F23 60081F12 0 0 ZBM 188 LD R0 R0,PSPROCCB R0 -> my PCB 08F24 600800C3 0 0 ZBM 189 LD R0 R0,PCPROCNUM R0 = my session number 08F25 E4094101 0 5 ZBM 190 ST R0 R5,MQEPROC save it in message 191 08F26 DC0030B7 192 CALL UNSRCHLIST release the session list 08F27 40001EB2 193 PARL PCNTLLOCK 194 195 ***** From here on we assume that the PSA does not go away. 196 ***** However, since PCNTLLOCK has been released, it is possible 197 ***** for the session to vanish. If we lock MSGLOCK first, a 198 ***** deadlock on PPIDLE, MSGLOCK, and PCNTLLOCK is possible. 199 ***** Possible fixes are as yet unknown. 200 201 PLOCK MSGLOCK lock all message lists 08F28 0CC00000 201 IOFF 08F29 D1C01ECA 201 SETT MSGLOCK 08F2A FE0C8F2C 201 JNE MA(2+DISPW MA 0) 08F2B DC40308B 201 CALLNP LOCKWAIT 08F2C 60170818 0 4 BASE 202 LD R0 R4,PSMSGALLOW get mask of messages allowed by receiver 08F2D E4178801 0 6 BASE 203 ST R0 SP,CLASSMASK save it 08F2E 60496101 1 5 ZBM 204 LD R1 R5,MQECLASS get class of this message 08F2F 60040082 0 IMM 205 LD R0 XREQERPOB possible error code 08F30 6844001F 1 IMM 206 UCPR R1 31 is class good? 08F31 FE048F5C 207 JGT ERROR jump if out of range 08F32 38898011 2 6 ZBM 208 LEA R2 SP,CLASSMASK/BIT 0 get bit pointer to class mask 08F33 600400A2 0 IMM 209 LD R0 XREQERMNRP possible error code 08F34 5C1A8C00 21 @R 210 CMZ @R2(R1) does the receiver want this message class? 08F35 FE028F5C 211 JEQ ERROR jump if class not enabled 212 08F36 3897081A 2 4 BASE 213 LEA R2 R4,PSMSGLIST R2 -> root of message list 08F37 60440000 1 IMM 214 LD R1 0 total core allocated to messages 08F38 FAB88F3C 23 215 RLJZA R2 ENDLIST R2 -> message, R3 -> previous 216 00008F39 217 MSGLOOP LABEL 08F39 60088040 0 2 ZBM 218 LD R0 R2,MQELOGSIZ R0 = log size of block 08F3A 1860255E 1 0 219 ADD R1 BITTAB(R0) accumulate actual sizes of blocks 08F3B FABA8F39 23 220 RLJNA R2 MSGLOOP link and loop 221 * \ / 222 00008F3C 223 ENDLIST LABEL 08F3C 60094040 0 5 ZBM 224 LD R0 R5,MQELOGSIZ R0 = log size of this message 08F3D 1860255E 1 0 225 ADD R1 BITTAB(R0) add in size of new message 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2012 (UREQMESSAGE) F 127 UREQ - Inter-Session Message Facility 08F3E 64440200 1 IMM 226 CPR R1 MQEMAXCORE does the new one fit? 08F3F FE048F4E 227 JGT SUSPEND jump if not 08F40 E548DF10 5 3 ZBM 228 ST R5 R3,MQELINK link new message onto end of list 229 08F41 DC003457 230 CALL GIVEUINT let the receiver know about this 08F42 41491F12 4 ZBM 231 PARV R4,PSPROCCB PCB affected 08F43 41530000 4 REG 232 PARV R4 PCQPARM value if waiting 08F44 4147FFFF IMM 233 PARV ONEBITS mask for above 08F45 4144000A IMM 234 PARV NQMSGWAIT queue number if waiting 08F46 41420020 IMM 235 PARV 1*BIT CAIMMSG interrupt mask bit 08F47 41440001 IMM 236 PARV 1 interrupt enable bit 08F48 41440026 IMM 237 PARV UINTMSG interrupt code 08F49 40496101 5 ZBM 238 PARVL R5,MQECLASS interrupt subcode 239 240 PUNLOCK MSGLOCK release our lock 08F4A EC001ECA 240 STZ MSGLOCK 08F4B 0C800000 240 ION 241 08F4C 60040000 0 IMM 242 LD R0 0 good return code 08F4D FE0E8F65 243 JMP RETURN and all done 244 * --- 245 00008F4E 246 SUSPEND LABEL 08F4E DC002F5D 247 CALL SFREEMEM free the message 08F4F 41494040 5 ZBM 248 PARV R5,MQELOGSIZ size 08F50 40534000 5 REG 249 PARVL R5 location 250 08F51 7D030000 4 IMM 251 IOR R4 1*BIT 0 R4 = receiver's PSA ptr + high bit 08F52 DC003541 252 CALL SUSPENDFRQ do conditional suspend 08F53 41530000 4 REG 253 PARV R4 shutdown parm 08F54 41001DB3 254 PAR SQMSGWAIT queue to shutdown in 08F55 40001ECA 255 PARL MSGLOCK lock to release 256 * \ / return if can't suspend 257 258 PUNLOCK MSGLOCK 08F56 EC001ECA 258 STZ MSGLOCK 08F57 0C800000 258 ION 08F58 600400AD 0 IMM 259 LD R0 XREQERSUSP error: could not suspend 08F59 FE0E8F65 260 JMP RETURN 261 * --- 262 00008F5A 263 BADPRIV LABEL both logged on and privileged account names requested 08F5A 60040082 0 IMM 264 LD R0 XREQERPOB error: parameter out of bounds 08F5B FE0E8F5E 265 JMP FREEMSG free memory and return 266 * --- 267 00008F5C 268 ERROR LABEL 269 PUNLOCK MSGLOCK release the message lock 08F5C EC001ECA 269 STZ MSGLOCK 08F5D 0C800000 269 ION 270 * \ / 271 00008F5E 272 FREEMSG LABEL 08F5E 61120000 4 0 REG 273 LD R4 R0 R4 = error code 08F5F DC002F5D 274 CALL SFREEMEM free our message 08F60 41494040 5 ZBM 275 PARV R5,MQELOGSIZ size 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2013 (UREQMESSAGE) F 127 UREQ - Inter-Session Message Facility 08F61 40534000 5 REG 276 PARVL R5 address 08F62 60130000 0 4 REG 277 LD R0 R4 R0 = error code 08F63 FE0E8F65 278 JMP RETURN 279 * --- 280 00008F64 281 BADLENGTH LABEL 08F64 60040082 0 IMM 282 LD R0 XREQERPOB error: parameter out of bounds 283 * \ / 284 00008F65 285 RETURN LABEL 08F65 5D1F8002 6 STAK 286 LEAVE POP all done, R0 = error code 287 * --- 288 00008F66 289 USERMEMBAD LABEL 08F66 62940000 2301 PAIR 290 LD2 R2 PAIR R0 R2,R3 = error codes 08F67 DC002F5D 291 CALL SFREEMEM free the message buffer 08F68 41494040 5 ZBM 292 PARV R5,MQELOGSIZ size 08F69 40534000 5 REG 293 PARVL R5 address 08F6A 62148000 0123 PAIR 294 LD2 R0 PAIR R2 R0,R1 = error codes 08F6B FE0E5B5F 295 JMP PASSERRUP and pass the error up 296 * --- 297 298 END SENDMSG subroutine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2014 (UREQMESSAGE) F 127 UREQ - Inter-Session Message Facility 300 301 ********************************************************************************** 302 * * 303 * RECEIVEMSG - Receive a Message * 304 * * 305 * Receive a Message from Another Session * 306 * * 307 * R3 = mask of message classes wanted * 308 * R4 -> Caller's CA * 309 * R4,CAR1 = buffer size * 310 * R4,CAR2 = buffer address * 311 * CALLNP RECEIVEMSG * 312 * R4,CAR1 = residual length * 313 * ST R0 error code * 314 * * 315 * Eats R0:R5. May suspend via SUSPENDFRQ. * 316 * Stack required = 11 * 317 * 5 + max ( CLRMEMTRAP (1), LOCKWAIT (0), SETMEMTRAP (1), * 318 * SFREEMEM (0), SUSPENDFRQ(1), WAKEUPSEND (6) ) * 319 * * 320 ********************************************************************************** 321 322 BLOCK RECEIVEMSG subroutine 323 ENTRY RECEIVEMSG 324 325 BEGFRAME 00178801 6 BASE 326 CALLERCA BSS 1 address of caller's CA 00178802 6 BASE 327 CLASSMASK BSS 1 mask of classes we are interested in 00178803 6 BASE 328 ERRCODES BSS 2 error codes from memory trap 329 ENDFRAME 330 08F6C DD5F8005 6 STAK 331 RECEIVEMSG ENTRNP PUSH 08F6D E5178801 4 6 BASE 332 ST R4 SP,CALLERCA save pointer to Caller's CA 08F6E E4D78802 3 6 BASE 333 ST R3 SP,CLASSMASK save mask on interesting classes 334 335 PLOCK MSGLOCK lock the list of messages 08F6F 0CC00000 335 IOFF 08F70 D1C01ECA 335 SETT MSGLOCK 08F71 FE0C8F73 335 JNE MA(2+DISPW MA 0) 08F72 DC40308B 335 CALLNP LOCKWAIT 08F73 61400412 5 336 LD R5 CPPSA R5 -> my PSA 08F74 38D7481A 3 5 BASE 337 LEA R3 R5,PSMSGLIST R3 -> root of message list 08F75 FAF88F7B 34 338 RLJZA R3 NOMESSAGE R3 -> first one, R4 -> previous, jump if none 339 * \ / 340 08F76 38498012 1 6 ZBM 341 LEA R1 SP,CLASSMASK/BIT 0 get bit pointer for class mask 00008F77 342 LOOP LABEL 08F77 6008E101 0 3 ZBM 343 LD R0 R3,MQECLASS get class of this message 08F78 5C1A4400 10 @R 344 CMZ @R1(R0) does the user want this class? 08F79 FE0C8F87 345 JNE THISMSG jump if so 08F7A FAFA8F77 34 346 RLJNA R3 LOOP else try the next one 347 * \ / 348 00008F7B 349 NOMESSAGE LABEL 08F7B 60574818 1 5 BASE 350 LD R1 R5,PSMSGALLOW R1 = classes that are receivable 08F7C 78578802 1 6 BASE 351 AND R1 SP,CLASSMASK can we ever get what we want? 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2015 (UREQMESSAGE) F 127 UREQ - Inter-Session Message Facility 08F7D 60040082 0 IMM 352 LD R0 XREQERPOB parameter out of bounds if not 08F7E FA428F84 1 353 JEQZ R1 ERROR jump if error 354 08F7F DC003541 355 CALL SUSPENDFRQ else suspend until message arrives 08F80 41534000 5 REG 356 PARV R5 shutdown parm - my PSA address 08F81 41001DB3 357 PAR SQMSGWAIT queue to put me in 08F82 40001ECA 358 PARL MSGLOCK lock to release 359 * \ / return if can't suspend 360 08F83 600400AD 0 IMM 361 LD R0 XREQERSUSP say we couldn't suspend 362 * \ / 363 00008F84 364 ERROR LABEL 365 PUNLOCK MSGLOCK release the lock 08F84 EC001ECA 365 STZ MSGLOCK 08F85 0C800000 365 ION 08F86 FE0E8F9F 366 JMP RETURN 367 * --- 368 00008F87 369 THISMSG LABEL R3 -> message, R4 -> previous 08F87 6008DF10 0 3 ZBM 370 LD R0 R3,MQELINK R0 -> next message 08F88 E4091F10 0 4 ZBM 371 ST R0 R4,MQELINK remove this message from list 372 08F89 DC408FDD 373 CALLNP WAKEUPSEND awaken any senders that are waiting 374 375 PUNLOCK MSGLOCK release the message list lock 08F8A EC001ECA 375 STZ MSGLOCK 08F8B 0C800000 375 ION 376 08F8C DC005BCF 377 CALL SETMEMTRAP trap flakey user memory 08F8D 40008FA0 378 PARL USERMEMBAD 379 08F8E 61578801 5 6 BASE 380 LD R5 SP,CALLERCA R5 -> caller's console area 08F8F 6048C8B0 1 3 ZBM 381 LD R1 R3,MQELENGTH R1 = message size 08F90 50574803 1 5 BASE 382 MIN R1 R5,CAR1 R1 = amount of message he gets 08F91 60974804 2 5 BASE 383 LD R2 R5,CAR2 where to move data to 08F92 60040080 0 IMM 384 LD R0 MSRSRELOC 08F93 28174801 0 5 BASE 385 BSUB R0 R5,CAMSR R0 = bit to clear in MSR 08F94 59920000 0 REG 386 CLBMSR R0 (see what I told you?) 08F95 3816C801 0 3 BASE 387 LEA R0 R3,MQEBUF R0 = where to move data from 08F96 FE400000 388 CMOVE copy data into user's R1 08F97 59C40080 IMM 389 IORMSR MSRSRELOC restore the MSR 390 08F98 DC405BD4 391 CALLNP CLRMEMTRAP release the memory trap 08F99 6048C8B0 1 3 ZBM 392 LD R1 R3,MQELENGTH R1 = message length 08F9A B0574803 1 5 BASE 393 RSBM R1 R5,CAR1 update into user's R1 394 08F9B DC002F5D 395 CALL SFREEMEM free the message buffer 08F9C 4148C040 3 ZBM 396 PARV R3,MQELOGSIZ size 08F9D 4052C000 3 REG 397 PARVL R3 address 398 08F9E 60040000 0 IMM 399 LD R0 0 success 400 * \ / 401 00008F9F 402 RETURN LABEL 08F9F 5D1F8005 6 STAK 403 LEAVE POP and all done 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2016 (UREQMESSAGE) F 127 UREQ - Inter-Session Message Facility 404 * --- 405 406 * User memory went bad -- put the message back onto the list. 407 00008FA0 408 USERMEMBAD LABEL 08FA0 E6178803 016 BASE 409 ST2 R0 SP,ERRCODES save the error codes 410 PLOCK MSGLOCK lock the message lists 08FA1 0CC00000 410 IOFF 08FA2 D1C01ECA 410 SETT MSGLOCK 08FA3 FE0C8FA5 410 JNE MA(2+DISPW MA 0) 08FA4 DC40308B 410 CALLNP LOCKWAIT 08FA5 60091F10 0 4 ZBM 411 LD R0 R4,MQELINK R0 -> following message 08FA6 E408DF10 0 3 ZBM 412 ST R0 R3,MQELINK 08FA7 E4C91F10 3 4 ZBM 413 ST R3 R4,MQELINK put this message back onto list 414 PUNLOCK MSGLOCK release the lists 08FA8 EC001ECA 414 STZ MSGLOCK 08FA9 0C800000 414 ION 08FAA 62178803 016 BASE 415 LD2 R0 SP,ERRCODES get back the error codes 08FAB FE0E5B5F 416 JMP PASSERRUP and give the guy his error 417 * --- 418 419 END RECEIVEMSG subroutine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2017 (UREQMESSAGE) F 127 UREQ - Inter-Session Message Facility 421 422 ********************************************************************************** 423 * * 424 * GETMASK - Get mask of Message Classes Allowed * 425 * * 426 * R4 -> Caller's CA * 427 * CALLNP GETMASK * 428 * R4,CAR1 = mask of classes allowed * 429 * ST R0 error code (0 = OK) * 430 * * 431 * Eats R0. * 432 * Stack required = 1 * 433 * * 434 ********************************************************************************** 435 436 BLOCK GETMASK subroutine 437 ENTRY GETMASK 438 439 BEGFRAME 440 ENDFRAME 441 08FAC DD5F8001 6 STAK 442 GETMASK ENTRNP PUSH 08FAD 60000412 0 443 LD R0 CPPSA R0 -> our PSA 08FAE 60160818 0 0 BASE 444 LD R0 R0,PSMSGALLOW R0 = mask of messages allowed 08FAF E4170803 0 4 BASE 445 ST R0 R4,CAR1 stuff it into caller's R1 08FB0 60040000 0 IMM 446 LD R0 0 good return code 08FB1 5D1F8001 6 STAK 447 LEAVE POP and all done 448 * --- 449 450 END GETMASK subroutine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2018 (UREQMESSAGE) F 127 UREQ - Inter-Session Message Facility 452 453 ********************************************************************************** 454 * * 455 * SETMASK - Selectively Set Bits in Message Allowed Mask * 456 * * 457 * R4 -> Caller's CA * 458 * R4,CAR1 = bits to set * 459 * CALLNP SETMASK * 460 * R4,CAR1 = bits that we changed * 461 * ST R0 error code (0 = OK) * 462 * * 463 * Eats R0:R1. * 464 * Stack required = 1 * 465 * * 466 * Since we are only setting bits, we don't need to hold * 467 * any locks. * 468 * * 469 ********************************************************************************** 470 471 BLOCK SETMASK subroutine 472 ENTRY SETMASK 473 474 BEGFRAME 475 ENDFRAME 476 08FB2 DD5F8001 6 STAK 477 SETMASK ENTRNP PUSH 08FB3 60400412 1 478 LD R1 CPPSA R1 -> our PSA 08FB4 60170803 0 4 BASE 479 LD R0 R4,CAR1 R0 = bits to set 08FB5 28164818 0 1 BASE 480 BSUB R0 R1,PSMSGALLOW remove bits that are already set 08FB6 E4170803 0 4 BASE 481 ST R0 R4,CAR1 tell user which ones we set 08FB7 FC164818 0 1 BASE 482 IORM R0 R1,PSMSGALLOW set the bits 08FB8 60040000 0 IMM 483 LD R0 0 good return code 08FB9 5D1F8001 6 STAK 484 LEAVE POP and all done 485 * --- 486 487 END SETMASK subroutine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2019 (UREQMESSAGE) F 127 UREQ - Inter-Session Message Facility 489 490 ********************************************************************************** 491 * * 492 * CLEARMASK - Selectively Clear Bits in Message Mask * 493 * * 494 * R4 -> Caller's CA * 495 * * 496 * R4,CAR1 = bits to clear * 497 * CALLNP CLEARMASK * 498 * R4,CAR1 = bits that we changed * 499 * ST R0 error code (0 = OK) * 500 * * 501 * In order to prevent somebody from being in the middle of * 502 * sending a message while we make it illegal to send that * 503 * message, we must hold MSGLOCK while clearing the bits. Also, * 504 * we awaken any senders in case one was suspended trying to * 505 * send a message to us and it is no longer legal to send that * 506 * message. * 507 * * 508 * Eats R0:R2 * 509 * Stack required = 7 * 510 * 1 + max ( LOCKWAIT (0), WAKEUPSEND (6) ) * 511 ********************************************************************************** 512 513 BLOCK CLEARMASK subroutine 514 ENTRY CLEARMASK 515 516 BEGFRAME 517 ENDFRAME 518 08FBA DD5F8001 6 STAK 519 CLEARMASK ENTRNP PUSH 520 PLOCK MSGLOCK lock the messages 08FBB 0CC00000 520 IOFF 08FBC D1C01ECA 520 SETT MSGLOCK 08FBD FE0C8FBF 520 JNE MA(2+DISPW MA 0) 08FBE DC40308B 520 CALLNP LOCKWAIT 08FBF 60400412 1 521 LD R1 CPPSA R1 -> our PSA 08FC0 60170803 0 4 BASE 522 LD R0 R4,CAR1 R0 = bits to clear 08FC1 78164818 0 1 BASE 523 AND R0 R1,PSMSGALLOW remove bits already clear 08FC2 E4170803 0 4 BASE 524 ST R0 R4,CAR1 tell user what we cleared 08FC3 A8164818 0 1 BASE 525 BRSBM R0 R1,PSMSGALLOW clear the bits 08FC4 DC408FDD 526 CALLNP WAKEUPSEND wake up senders (so he may get error) 527 PUNLOCK MSGLOCK release the lock 08FC5 EC001ECA 527 STZ MSGLOCK 08FC6 0C800000 527 ION 08FC7 60040000 0 IMM 528 LD R0 0 return code 08FC8 5D1F8001 6 STAK 529 LEAVE POP and all done 530 * --- 531 532 END CLEARMASK subroutine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2020 (UREQMESSAGE) F 127 UREQ - Inter-Session Message Facility 534 535 ********************************************************************************** 536 * * 537 * PURGEMSGS - Purge All Messages * 538 * * 539 * This subroutine will disable receipt of all message * 540 * classes and purge any pending messages. It is called at * 541 * logoff time. * 542 * Call: * 543 * CALLNP PURGEMSGS * 544 * * 545 * Eats R0:R3 * 546 * Stack required = 7 * 547 * 1 + max ( LOCKWAIT (0), SFREEMEM (0), WAKEUPSEND (6) ) * 548 * * 549 ********************************************************************************** 550 551 BLOCK PURGEMSGS subroutine 552 ENTRY PURGEMSGS 553 554 BEGFRAME 555 ENDFRAME 556 08FC9 DD5F8001 6 STAK 557 PURGEMSGS ENTRNP PUSH 558 PLOCK MSGLOCK lock the message list 08FCA 0CC00000 558 IOFF 08FCB D1C01ECA 558 SETT MSGLOCK 08FCC FE0C8FCE 558 JNE MA(2+DISPW MA 0) 08FCD DC40308B 558 CALLNP LOCKWAIT 08FCE 60000412 0 559 LD R0 CPPSA R0 -> our PSA 08FCF EC160818 0 BASE 560 STZ R0,PSMSGALLOW disallow all messages 08FD0 DC408FDD 561 CALLNP WAKEUPSEND awaken any senders (they will now get error) 562 PUNLOCK MSGLOCK release the list 08FD1 EC001ECA 562 STZ MSGLOCK 08FD2 0C800000 562 ION 563 08FD3 60C00412 3 564 LD R3 CPPSA R3 -> our PSA 00008FD4 565 LOOP LABEL 08FD4 6096C81A 2 3 BASE 566 LD R2 R3,PSMSGLIST R2 -> a message 08FD5 FAB08FDC 2 567 JZA R2 DONE jump if none 08FD6 60089F10 0 2 ZBM 568 LD R0 R2,MQELINK R0 -> next message 08FD7 E416C81A 0 3 BASE 569 ST R0 R3,PSMSGLIST remove first message from list 08FD8 DC002F5D 570 CALL SFREEMEM free the message 08FD9 41488040 2 ZBM 571 PARV R2,MQELOGSIZ size 08FDA 40528000 2 REG 572 PARVL R2 address 08FDB FE0E8FD4 573 JMP LOOP repeat until done 574 * --- 575 00008FDC 576 DONE LABEL 08FDC 5D1F8001 6 STAK 577 LEAVE POP all done 578 * --- 579 580 END PURGEMSGS subroutine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2021 (UREQMESSAGE) F 127 UREQ - Inter-Session Message Facility 582 583 ********************************************************************************** 584 * * 585 * WAKEUPSEND - Wake Up Senders * 586 * * 587 * This subroutine will awaken any process that is waiting * 588 * to send a message to the current session. It should be * 589 * called whenever there might be room for another message or * 590 * when someone might be waiting to send a message that is no * 591 * longer legal to send. * 592 * * 593 * (MSGLOCK held) * 594 * CALLNP WAKEUPSEND * 595 * * 596 * Eats R0:R2 * 597 * Stack required = 6 * 598 * 2 + max ( DQUEONE (4) ) * 599 * * 600 ********************************************************************************** 601 602 BLOCK WAKEUPSEND subroutine 603 ENTRY WAKEUPSEND 604 605 BEGFRAME 00178801 6 BASE 606 SAVER3 BSS 1 save area from R3 607 ENDFRAME 608 08FDD DD5F8002 6 STAK 609 WAKEUPSEND ENTRNP PUSH 08FDE E4D78801 3 6 BASE 610 ST R3 SP,SAVER3 save this register 08FDF 60C00412 3 611 LD R3 CPPSA R3 -> our PSA 08FE0 7CC30000 3 IMM 612 IOR R3 1*BIT 0 R3 = suspend parm for senders 613 00008FE1 614 LOOP LABEL 08FE1 DC00354F 615 CALL DQUEONE dequeue a sender 08FE2 41001DB3 616 PAR SQMSGWAIT queue he may be in 08FE3 4052C000 3 REG 617 PARVL R3 suspend parm 08FE4 FA0C8FE1 0 618 JNEZ R0 LOOP do it again if we got one 619 08FE5 60D78801 3 6 BASE 620 LD R3 SP,SAVER3 restore this register 08FE6 5D1F8002 6 STAK 621 LEAVE POP and all done 622 * --- 623 624 END WAKEUPSEND subroutine 625 626 END Inter-Session Message Facility 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2022 (UREQMESSAGE) F 127 Inter-session Unit Exchanging 629 630 BLOCK Give and Receive Unit UREQs 631 ENTRY UREQUNIT 632 ENTRY PURGEGIFTU 633 634 ********************************************************************************** 635 * * 636 * This is the control for the UREQs for giving a unit to * 637 * another session and receiving a unit from another session. * 638 * * 639 * Stack required = 12 * 640 * 0 + max ( UREQGIVU (12), UREQRCVU (4) ) * 641 * * 642 ********************************************************************************** 643 00008FE7 644 UREQUNIT LABEL 08FE7 64840002 2 IMM 645 CPR R2 GIVUMAX subop within range? 08FE8 FE0659D8 646 JGE UERRORILR illegal request 08FE9 5CA48FEA 2 647 LDPC GIVUTAB(R2) go to the proper routine 648 * --- 649 08FEA 00008FEC 650 GIVUTAB VFD ADR UREQGIVU give a unit 08FEB 0000906B 651 VFD ADR UREQRCVU receive a unit 00000002 ABS 652 GIVUMAX EQU DISPW GIVUTAB 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2023 (UREQMESSAGE) F 127 Inter-session Unit Exchanging 654 655 ********************************************************************************** 656 * * 657 * URGIVEUNIT - give a unit to another session * 658 * Call: * 659 * LD R0 URGIVEUNIT * 660 * LD R1 * 661 * LD R2 * 662 * UREQ * 663 * JLTZ R0 error * 664 * Eats R0:R5 * 665 * Stack required = 12 * 666 * 4 + max ( CHKGIVCMU (1), FCFREEMEM (0), GIVEUNIT (8), * 667 * GULOCKHW (1), GUUNLOCKHE (1), LOCKWAIT (0), * 668 * LUNSEARCHX (2), SFREEMEM (0), SGETMEM (0), * 669 * SRCHLIST (1), SUSPENDFRQ (1), UCFREEMEM (0), * 670 * UNLINKFCB (1), UNLINKUCE (1), UNSRCHLIST (1) ) * 671 * * 672 ********************************************************************************** 673 674 BLOCK UREQGIVU routine 675 ENTRY UREQGIVU 676 677 BEGFRAME2 00178800 6 BASE 678 FCBPTRS BSS 2 pointers to FCBs 00178800 6 BASE 679 NEWFCB EQU FCBPTRS(0) new FCB pointer 00178801 6 BASE 680 OLDFCB EQU FCBPTRS(1) old FCB pointer 00178802 6 BASE 681 PTRTOCA BSS 1 pointer to user's CA 00178803 6 BASE 682 SESSNUMB BSS 1 session number 683 ENDFRAME 684 00008FEC 685 UREQGIVU LABEL 08FEC EC1F8004 6 STAK 686 STZ PUSH allocate stack 08FED E4D78803 3 6 BASE 687 ST R3 SP,SESSNUMB save the session number 08FEE 60D70803 3 4 BASE 688 LD R3 R4,CAR1 pick up the unit we are giving 08FEF DC405B4F 689 CALLNP LUNSEARCHX find the unit 08FF0 FB7059BA 5 690 JZA FCB FERRORNSL unit does not exist 691 * \ / 692 08FF1 60094E45 0 5 ZBM 693 LD R0 FCB,FCPRIV get our access privilege 08FF2 64040002 0 IMM 694 CPR R0 FSPRIVMOD is it modify? 08FF3 FE028FF6 695 JEQ PRIVOK privilege is sufficient 696 * \ / 697 08FF4 64C400C9 3 IMM 698 CPR R3 LUNCMLOW is it a control mode unit? 08FF5 FE0859C8 699 JLT FERRORPNS if not, must have modify priv 700 * \ / 701 00008FF6 702 PRIVOK LABEL 08FF6 E5578801 5 6 BASE 703 ST FCB SP,OLDFCB save for later 08FF7 DC409549 704 CALLNP CHKGIVCMU see if we may give this unit 08FF8 FA0C5988 0 705 JNEZ R0 UERROR jump if not 706 * \ / 707 08FF9 E5178802 4 6 BASE 708 ST R4 SP,PTRTOCA save the pointer to the CA 08FFA DC002ED0 709 CALL SGETMEM grab some global memory 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2024 (UREQMESSAGE) F 127 Inter-session Unit Exchanging 08FFB 40440004 IMM 710 PARVL FCLOG size of an FCB 08FFC E4178800 0 6 BASE 711 ST R0 SP,NEWFCB save new FCB pointer 08FFD 60920000 2 0 REG 712 LD R2 R0 R2 -> new chunk of memory 08FFE 60440040 1 IMM 713 LD R1 (2 POWER FCLOG)*CPW 08FFF 60134000 0 5 REG 714 LD R0 FCB R0 -> FCB 09000 FE400000 715 CMOVE 716 717 * See if privilege is sufficient for open access. 09001 60970804 2 4 BASE 718 LD R2 R4,CAR2 pick up privilege to give 09002 64840004 2 IMM 719 CPR R2 PRIVTABSIZ is the privilege within range? 09003 FE069064 720 JGE BADPRIV privilege is not sufficient 09004 60249067 0 2 721 LD R0 PRIVPTRTAB(R2) R0 -> bit array of legal access for priv 09005 60D78800 3 6 BASE 722 LD R3 SP,NEWFCB R3 -> new FCB 09006 6048D835 1 3 ZBM 723 LD R1 R3,FCACCESS pick up the access unit is opened with 09007 5C1A0C00 01 @R 724 CMZ @R0(R1) is this a legal privilege for the access 09008 FE029064 725 JEQ BADPRIV 09009 E488CE45 2 3 ZBM 726 ST R2 R3,FCPRIV set the given privilege 727 * \ / 728 729 * Put in the PSN and session number. 0900A 60800412 2 730 LD R2 CPPSA 0900B 60489F12 1 2 ZBM 731 LD R1 R2,PSPROCCB R1 -> our PCB 0900C 600840C3 0 1 ZBM 732 LD R0 R1,PCPROCNUM our session number 0900D E416C80E 0 3 BASE 733 ST R0 R3,FCJCXH put in scratch field of FCB 0900E 60488116 1 2 ZBM 734 LD R1 R2,PSCURRPROC R1 -> current UPC 0900F 60085371 0 1 ZBM 735 LD R0 R1,UPCSERNM our PSN 09010 E416C80F 0 3 BASE 736 ST R0 R3,FCJCDE save it here 737 * \ / 738 09011 DC0030AA 739 CALL SRCHLIST lock the PCB list 09012 40001EB2 740 PARL PCNTLLOCK 09013 60D78803 3 6 BASE 741 LD R3 SP,SESSNUMB pick up session number 09014 FAC29022 3 742 JEQZ R3 ITSME jump if sending to self 09015 61401EB1 5 743 LD R5 PCONTROL get root of list 744 * \ / 745 00009016 746 SRCHHIM LABEL 09016 64C940C3 3 5 ZBM 747 CPR R3 R5,PCPROCNUM is this our session? 09017 FE029024 748 JEQ FOUNDPROC jump if it is 09018 61495F14 5 5 ZBM 749 LD R5 R5,PCNXTCB move to the next control block 09019 FB729016 5 750 JNZA R5 SRCHHIM loop if there is more 751 * \ / 752 0901A 61C400A3 7 IMM 753 LD R7 XREQERNSPP no such process/program 0901B DC0030B7 754 CALL UNSRCHLIST release the lock 0901C 40001EB2 755 PARL PCNTLLOCK 0000901D 756 ERRMERGE1 LABEL 0901D 60578800 1 6 BASE 757 LD R1 SP,NEWFCB 0901E DC002F5D 758 CALL SFREEMEM return block of global memory 0901F 41440004 IMM 759 PARV FCLOG how much 09020 40524000 1 REG 760 PARVL R1 where it is 09021 FE0E5995 761 JMP UERROR7 762 * --- 763 00009022 764 ITSME LABEL 09022 60C00412 3 765 LD R3 CPPSA 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2025 (UREQMESSAGE) F 127 Inter-session Unit Exchanging 09023 6148DF12 5 3 ZBM 766 LD R5 R3,PSPROCCB R5 -> our PCB 767 * \ / 768 769 ********************************************************************************** 770 * * 771 * We have found the PCB of the destined receiver. Ensure * 772 * that the receiver is not kust letting giftunits pile up. * 773 * * 774 * R5 -> PCB of receiving session. * 775 * * 776 ********************************************************************************** 777 778 * \ / 00009024 779 FOUNDPROC LABEL 09024 60C95F13 3 5 ZBM 780 LD R3 R5,PCPSADRS R3 -> PSA of receiver 781 PLOCK R3,PSLOCK lock the PSA lists 09025 0CC00000 781 IOFF 09026 D1D6C80C 3 BASE 781 SETT R3,PSLOCK 09027 FE0C9029 781 JNE MA(2+DISPW MA 0) 09028 DC40308B 781 CALLNP LOCKWAIT 09029 DC0030B7 782 CALL UNSRCHLIST no longer accessing this list 0902A 40001EB2 783 PARL PCNTLLOCK pass address 0902B 3856C809 1 3 BASE 784 LEA R1 R3,PSGIFTUNIT R1 -> list of units to give 0902C 5C085F10 1 ZBM 785 CMZ R1,FCLINK anything attached? 0902D FE029031 786 JEQ OKAMOUNT jump if not 0902E 60485F10 1 1 ZBM 787 LD R1 R1,FCLINK get the next element on the list 0902F 5C085F10 1 ZBM 788 CMZ R1,FCLINK anything attached? 09030 FE0C905B 789 JNE GOTTOOMANY we only allow two 790 * \ / 791 00009031 792 OKAMOUNT LABEL 09031 61178800 4 6 BASE 793 LD R4 SP,NEWFCB get new FCB pointer 09032 EC091F10 4 ZBM 794 STZ R4,FCLINK make sure we are not pointing anywhere 09033 E5085F10 4 1 ZBM 795 ST R4 R1,FCLINK link onto end 796 PUNLOCK R3,PSLOCK release PSA 09034 EC16C80C 3 BASE 796 STZ R3,PSLOCK 09035 0C800000 796 ION 797 * \ / 798 799 ********************************************************************************** 800 * * 801 * If the unit being given is a hardware device then it * 802 * will need the hardware device's control block PCB pointer * 803 * updated. The routines GULOCKHW and GUUNLOCKHW perform this * 804 * service for us. Also we want to disable interrupts from * 805 * interruptable devices (terminals and paths). * 806 * * 807 ********************************************************************************** 808 809 * \ / 09036 60D34000 3 5 REG 810 LD R3 R5 move the PCB pointer here 09037 61578800 5 6 BASE 811 LD FCB SP,NEWFCB point R5 to the new FCB 09038 DC409574 812 CALLNP GULOCKHW lock HW control block associated with file 813 09039 60096665 0 5 ZBM 814 LD R0 FCB,FCHTYPE pick up the hardware type 0903A 64040007 0 IMM 815 CPR R0 HTYPETERM is this a terminal? 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2026 (UREQMESSAGE) F 127 Inter-session Unit Exchanging 0903B FE0C903E 816 JNE NOTATERM jump if not 0903C EC091E18 4 ZBM 817 STZ R4,TCINTE don't let it interrupt us if so 0903D FE0E9041 818 JMP DOUNLOCK continue with our quest 819 * --- 820 0000903E 821 NOTATERM LABEL 0903E 64040004 0 IMM 822 CPR R0 HTYPEPATH is it a path 0903F FE0C9041 823 JNE DOUNLOCK if not then just unlock things 09040 EC090411 4 ZBM 824 STZ R4,PTHINTE don't let it interrupt us if so 825 * \ / 826 00009041 827 DOUNLOCK LABEL 09041 DC4095A2 828 CALLNP GUUNLOCKHW complete the transformation 09042 61578801 5 6 BASE 829 LD FCB SP,OLDFCB restore FCB pointer 09043 E4D78801 3 6 BASE 830 ST R3 SP,OLDFCB and save the PCB pointer 09044 61178802 4 6 BASE 831 LD R4 SP,PTRTOCA R4 -> console area 09045 60570803 1 4 BASE 832 LD R1 R4,CAR1 get back the unit number 09046 DC005DD0 833 CALL UNLINKUCE remove from the unit list 09047 40524000 1 REG 834 PARVL R1 the unit number 09048 60D20000 3 0 REG 835 LD R3 R0 move for call 09049 DC002F8F 836 CALL UCFREEMEM free this chunk of memory 0904A 41440001 IMM 837 PARV UCELOG 0904B 4052C000 3 REG 838 PARVL R3 where UCE is 0904C DC405DC3 839 CALLNP UNLINKFCB unlink it 0904D DC002F8F 840 CALL FCFREEMEM free the FCB memory 0904E 41440004 IMM 841 PARV FCLOG log of the length 0904F 40534000 5 REG 842 PARVL FCB pointer to it 843 09050 63178800 456 BASE 844 LD2 R4 SP,FCBPTRS R4 -> new FCB, R5 -> receiving PCB 09051 DC003457 845 CALL GIVEUINT hit the receiver on the head 09052 41534000 5 REG 846 PARV R5 PCB of receiver 09053 41495F13 5 ZBM 847 PARV R5,PCPSADRS value of PCQPARM (receiver's PSA) 09054 4145FFFF IMM 848 PARV ONEBITS/FLDADRS mask for above 09055 4144000B IMM 849 PARV NQUNITWAIT queue number of session (UNITWAIT) 09056 41420004 IMM 850 PARV 1*BIT CAIMGUNIT interrupt enable bit 09057 41440001 IMM 851 PARV 1 say we can interrupt if enabled 09058 41440028 IMM 852 PARV UINTGUNIT interrupt code 09059 4057080E 4 BASE 853 PARVL R4,FCJCXH interrupt subcode (session number) 0905A FE0E59D6 854 JMP NOERROR 855 * --- 856 857 * The receiver has too many units waiting. We try to suspend and 858 * if we can't then return an error. 0000905B 859 GOTTOOMANY LABEL 0905B 60840000 2 IMM 860 LD R2 0 secondary parameter 0905C DC003541 861 CALL SUSPENDFRQ try to suspend 0905D 4152C000 3 REG 862 PARV R3 PSA of session waiting on 0905E 41001DB4 863 PAR SQUNITWAIT suspend in this queue 0905F 4016C80C 3 BASE 864 PARL R3,PSLOCK unlock this 865 * \ / 866 867 PUNLOCK R3,PSLOCK release the lock 09060 EC16C80C 3 BASE 867 STZ R3,PSLOCK 09061 0C800000 867 ION 09062 61C400AD 7 IMM 868 LD R7 XREQERSUSP could not suspend 09063 FE0E901D 869 JMP ERRMERGE1 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2027 (UREQMESSAGE) F 127 Inter-session Unit Exchanging 870 * --- 871 872 * Giver needs modify privilege to give the unit and must give 873 * it away with as much privilege as it is opened with. 00009064 874 BADPRIV LABEL 09064 61C40094 7 IMM 875 LD R7 XREQERPNS privilege not sufficient 09065 FE0E901D 876 JMP ERRMERGE1 877 * --- 878 879 * These tables are used to determine if the privilege the unit is 880 * being given with is valid given its open access. 09065 00000001 881 ANYACCESS VFDB 1:1,1,1,1,1,1,1,1 any access is legal 09065 00000001 882 ROACCESS VFDB 1:0,1,0,1,0,0,0,1 only allow read type access 09065 00000000 883 XOACCESS VFDB 1:0,0,0,1,0,0,0,0 only XO access is legal 884 00009067 885 PRIVPTRTAB LABEL 09067 00489066 886 PTR ANYACCESS FSPRIVRW 09068 40489066 887 PTR ROACCESS FSPRIVRO 09069 00489066 888 PTR ANYACCESS FSPRIVMOD 0906A 80489066 889 PTR XOACCESS FSPRIVXO 00000004 ABS 890 PRIVTABSIZ EQU (DISPW PRIVPTRTAB) 891 892 END of UREQGIVU routine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2028 (UREQMESSAGE) F 127 Inter-session Unit Exchanging 894 895 ********************************************************************************** 896 * * 897 * XREQ to receive a unit given to us by another session. * 898 * Call: * 899 * LD R0 URRCVUNIT * 900 * UREQ * 901 * JLTZ R0 error * 902 * R1 = session number of giver * 903 * R2 = PSN of giver * 904 * Eats R0:R5. * 905 * Stack Usage = 4 * 906 * 0 + max ( CREATEUCE (2), DQUEONE (4), FCFREEMEM (0), * 907 * GETFCB (3), LINKFCBIN (1), LINKUCEIN (3), * 908 * LOCKWAIT (0), LUNSEARCHX (2), SFREEMEM (0), * 909 * SUSPENDFRQ (1) ) * 910 * * 911 ********************************************************************************** 912 913 BLOCK UREQRCVU routine 914 ENTRY UREQRCVU 915 0000906B 916 UREQRCVU LABEL 0906B DC405B39 917 CALLNP LUNSEARCH see if we already have this unit opened 0906C FB7259C0 5 918 JNZA FCB FERRORLAE unit is already equipped 919 * \ / 920 0906D DC406886 921 CALLNP GETFCB get a virgin FCB and check unit range 0906E FE0E5988 922 JMP UERROR error of some kind 923 0906F 60800412 2 924 LD R2 CPPSA ourselves 925 PLOCK R2,PSLOCK secure the area 09070 0CC00000 925 IOFF 09071 D1D6880C 2 BASE 925 SETT R2,PSLOCK 09072 FE0C9074 925 JNE MA(2+DISPW MA 0) 09073 DC40308B 925 CALLNP LOCKWAIT 09074 61168809 4 2 BASE 926 LD R4 R2,PSGIFTUNIT pick up a given unit 09075 FB3090AA 4 927 JZA R4 HANGOUT go hangout and wait for a unit 928 * \ / 929 09076 60091F10 0 4 ZBM 930 LD R0 R4,FCLINK get pointer to next in list 09077 E4168809 0 2 BASE 931 ST R0 R2,PSGIFTUNIT make it the first of the list 932 PUNLOCK R2,PSLOCK release grip on the PSA 09078 EC16880C 2 BASE 932 STZ R2,PSLOCK 09079 0C800000 932 ION 933 934 * R3 = unit number 935 * R4 -> transitional FCB of unit we are getting 936 * FCB -> our chunk of user memory for the FCB 0907A 60130000 0 4 REG 937 LD R0 R4 R0 -> gift FCB 0907B 60440040 1 IMM 938 LD R1 (2 POWER FCLOG)*CPW size of all this 0907C 60934000 2 5 REG 939 LD R2 FCB R2 -> our FCB 0907D FE400000 940 CMOVE move the temp FCB into its new home 941 0907E 64C400C9 3 IMM 942 CPR R3 LUNCMLOW see what type of unit we have 0907F FE089083 943 JLT LINKIT jump if not CM or absio 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2029 (UREQMESSAGE) F 127 Inter-session Unit Exchanging 09080 EDC97A15 5 ZBM 944 STW FCB,FCCMUNIT mark it as a control mode unit 09081 64C400CA 3 IMM 945 CPR R3 LUNAOUT is it an absolute I/O unit 09082 ED496015 5 ZBM 946 STLLE FCB,FCABSIO mark it if so 947 * \ / 948 00009083 949 LINKIT LABEL 09083 DC005DA8 950 CALL LINKFCBIN in goes the FCB 09084 40534000 5 REG 951 PARVL FCB where it is 09085 DC003635 952 CALL CREATEUCE create the UCE now 09086 4152C000 3 REG 953 PARV R3 unit number 09087 40534000 5 REG 954 PARVL FCB FCB address 09088 DC005DB2 955 CALL LINKUCEIN link up the UCE 09089 41520000 0 REG 956 PARV R0 where the UCE is 0908A 41400414 957 PARV CPCUPC UPC 0908B 40400412 958 PARVL CPPSA PSA 959 * \ / 960 961 ********************************************************************************** 962 * * 963 * Set up PATH or TERM for reading/interrupts. The GIVEUNIT * 964 *request has already determined whether we are to be reading. * 965 *If so, the FCB address in the DCB points to the transitional * 966 *FCB, and we just have to lay our new FCB address in its place. * 967 *This simple check works because the temp FCB is in system, * 968 *NOT user virtual space, so the address is unique. * 969 * * 970 ********************************************************************************** 971 972 * \ / 973 * R4 -> transitional FCB of unit we are getting 0908C 60096665 0 5 ZBM 974 LD R0 FCB,FCHTYPE pick up the hardware type 0908D 60495F16 1 5 ZBM 975 LD R1 FCB,FCDCBPTR R1 -> hardware control block 0908E 64040007 0 IMM 976 CPR R0 HTYPETERM is this a terminal? 0908F FE0C9096 977 JNE MAYBEPATH jump if not 09090 FA70909C 1 978 JZA R1 DUMPTEMP jump if fake terminal 09091 65085F15 4 1 ZBM 979 CPR R4 R1,TCFCB fated to be reader? 09092 FE0C909C 980 JNE DUMPTEMP jump if not 09093 E5485F15 5 1 ZBM 981 ST FCB R1,TCFCB point TCB to our FCB 09094 EDC85E18 1 ZBM 982 STW R1,TCINTE and allow ints from the unit 09095 FE0E909C 983 JMP DUMPTEMP move on 984 * --- 985 00009096 986 MAYBEPATH LABEL 09096 64040004 0 IMM 987 CPR R0 HTYPEPATH is it a PATH? 09097 FE0C909C 988 JNE DUMPTEMP jump if not 989 * \ / 990 09098 65086312 4 1 ZBM 991 CPR R4 R1,PTHREADFCB fated to be reader? 09099 FE0C909C 992 JNE DUMPTEMP jump if not 0909A E5492312 5 4 ZBM 993 ST FCB R4,PTHREADFCB point PATH to our FCB 0909B EDC90411 4 ZBM 994 STW R4,PTHINTE and let it interrupt us 995 * \ / 996 0000909C 997 DUMPTEMP LABEL 0909C DC002F5D 998 CALL SFREEMEM return the system memory 0909D 41440004 IMM 999 PARV FCLOG size of the chunk 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2030 (UREQMESSAGE) F 127 Inter-session Unit Exchanging 0909E 40530000 4 REG 1000 PARVL R4 where it is 1001 1002 * release sessions waiting to send more units 0000909F 1003 DQWAITERS LABEL 0909F DC00354F 1004 CALL DQUEONE unsuspend a fellow 090A0 41001DB4 1005 PAR SQUNITWAIT queue 090A1 40400412 1006 PARVL CPPSA shutdown parameter 090A2 FA0C909F 0 1007 JNEZ R0 DQWAITERS do 'em all 1008 * \ / 1009 1010 * all done, fix up the requester's registers 090A3 61000412 4 1011 LD R4 CPPSA current session 090A4 61091F11 4 4 ZBM 1012 LD R4 R4,PSCACHNP1 get caller's registers 090A5 6017480E 0 5 BASE 1013 LD R0 FCB,FCJCXH pick up the giver's session number 090A6 E4170803 0 4 BASE 1014 ST R0 R4,CAR1 session number in R1 090A7 6017480F 0 5 BASE 1015 LD R0 FCB,FCJCDE now the giver's process serial number 090A8 E4170804 0 4 BASE 1016 ST R0 R4,CAR2 PSN goes in R2 090A9 FE0E59D6 1017 JMP NOERROR really all done 1018 * --- 1019 1020 * must suspend awaiting a unit transfer 000090AA 1021 HANGOUT LABEL 090AA DC002F8F 1022 CALL FCFREEMEM return the user's memory 090AB 41440004 IMM 1023 PARV FCLOG how much 090AC 40534000 5 REG 1024 PARVL FCB where 1025 090AD 60D28000 3 2 REG 1026 LD R3 R2 switch to a safe register for unlock 090AE 60840000 2 IMM 1027 LD R2 0 no secondary parameter 090AF DC003541 1028 CALL SUSPENDFRQ try to suspend 090B0 4152C000 3 REG 1029 PARV R3 our PSA 090B1 41001DB4 1030 PAR SQUNITWAIT suspend in this queue 090B2 4016C80C 3 BASE 1031 PARL R3,PSLOCK unlock this 1032 * \ / not allowed to suspend 1033 1034 PUNLOCK R3,PSLOCK release the lock 090B3 EC16C80C 3 BASE 1034 STZ R3,PSLOCK 090B4 0C800000 1034 ION 090B5 600400AD 0 IMM 1035 LD R0 XREQERSUSP could not suspend 090B6 FE0E5988 1036 JMP UERROR all done 1037 * --- 1038 1039 END of UREQRCVU routine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2031 (UREQMESSAGE) F 127 Inter-session Unit Exchanging 1041 1042 ********************************************************************************** 1043 * * 1044 * PURGEGIFTU * 1045 * * 1046 * This subroutine checks for any gift units attached * 1047 * to a session (PSGIFTUNIT) and if so moves them into FCB * 1048 * memory, frees the system memory, then closes the unit. * 1049 * Call: * 1050 * CALLNP PURGEGIFTU * 1051 * * 1052 * Eats R0:R3 * 1053 * Stack Required = 23 * 1054 * 1 + max ( CLOSEUNITF (22), DQUEONE (4), FCGETMEM (0), * 1055 * LINKFCBIN (1), SFREEMEM (0) ) * 1056 * * 1057 ********************************************************************************** 1058 1059 BLOCK PURGEGIFTU subroutine 1060 1061 ENTRY PURGEGIFTU 1062 1063 BEGFRAME 1064 ENDFRAME 1065 090B7 DD5F8001 6 STAK 1066 PURGEGIFTU ENTRNP PUSH 090B8 60000412 0 1067 LD R0 CPPSA point to our PSA 090B9 61160809 4 0 BASE 1068 LD R4 R0,PSGIFTUNIT pick up list of gift units 090BA FB3090D0 4 1069 JZA R4 ALLDONE jump if empty 1070 * \ / 1071 090BB EC160809 0 BASE 1072 STZ R0,PSGIFTUNIT make list empty 000090BC 1073 FREETHIS LABEL 090BC DC002F0A 1074 CALL FCGETMEM get a chunk of memory 090BD 40440004 IMM 1075 PARVL FCLOG size to get (for FCB) 090BE 61520000 5 0 REG 1076 LD FCB R0 FCB -> new FCB 1077 090BF 60930000 2 4 REG 1078 LD R2 R4 R2 -> old FCB (source) 090C0 60440040 1 IMM 1079 LD R1 (2 POWER FCLOG)*CPW size of an FCB in chars 090C1 DA088800 0 21 1080 MOVE R0 R2 R1 move it into user virtual memory 1081 090C2 60D30000 3 4 REG 1082 LD R3 R4 copy for freeing 090C3 61091F10 4 4 ZBM 1083 LD R4 R4,FCLINK get link to next gift FCB 1084 090C4 DC002F5D 1085 CALL SFREEMEM return the system memory 090C5 41440004 IMM 1086 PARV FCLOG size to return 090C6 4052C000 3 REG 1087 PARVL R3 where it is 1088 090C7 DC005DA8 1089 CALL LINKFCBIN link in the FCB 090C8 40534000 5 REG 1090 PARVL FCB where it is 090C9 DC407F6B 1091 CALLNP CLOSEUNITF close the unit 090CA FEC00000 1092 NOP 0 disk structure error 090CB FB3290BC 4 1093 JNZA R4 FREETHIS do another if we can 1094 * \ / 1095 1096 * release sessions waiting to send more units 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2032 (UREQMESSAGE) F 127 Inter-session Unit Exchanging 000090CC 1097 DQSENDERS LABEL 090CC DC00354F 1098 CALL DQUEONE unsuspend a fellow 090CD 41001DB4 1099 PAR SQUNITWAIT queue 090CE 40400412 1100 PARVL CPPSA shutdown parameter 090CF FA0C90CC 0 1101 JNEZ R0 DQSENDERS do 'em all 1102 * \ / 1103 000090D0 1104 ALLDONE LABEL 090D0 5D1F8001 6 STAK 1105 LEAVE POP return 1106 * --- 1107 1108 END of PURGEGIFTU subroutine 1109 1110 END of give and receive unit UREQs 187 INPUT UREQOPMSG user messages to operator 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2033 (UREQOPMSG) F 128 UREQ - Generate and Cancel Messages to Operator 3 4 BLOCK UREQs for Operator Message Control 5 6 ENTRY UROPMSG 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2034 (UREQOPMSG) F 128 UREQ - Generate and Cancel Messages to Operator 8 9 ********************************************************************************** 10 * * 11 * These UREQ's will generate and cancel messages from a user * 12 * session to the operator. No session can have more than one * 13 * message outstanding at a time. * 14 * * 15 * Stack required = 6 * 16 * 0 + max ( UROPMSGCAN (1), UROPMSGGEN (6) ) * 17 * * 18 ********************************************************************************** 19 20 BLOCK UROPMSG routine 21 ENTRY UROPMSG 22 000090D1 23 UROPMSG LABEL 090D1 64840002 2 IMM 24 CPR R2 UROPMSGMAX is request reasonable? 090D2 FE0659D8 25 JGE UERRORILR jump if not 090D3 5CA490D4 2 26 LDPC UROPMSGJMP(R2) go do it 27 * --- 28 000090D4 29 UROPMSGJMP LABEL 090D4 000090D6 30 ADR UROPMSGGEN 0 - generate message 090D5 0000910F 31 ADR UROPMSGCAN 1 - cancel message 00000002 ABS 32 UROPMSGMAX EQU DISPW UROPMSGJMP 33 34 END UROPMSG routine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2035 (UREQOPMSG) F 128 UREQ - Generate and Cancel Messages to Operator 36 37 ********************************************************************************** 38 * * 39 * Generate a message from a user to the operator. * 40 * LD R0 URGENOPMSG * 41 * LD R1 message size * 42 * LD R2 address of message * 43 * UREQ 0 * 44 * * 45 * * 46 * Stack required = 6 * 47 * 0 + max ( CLRMEMTRAP (1), GENOPMSG (1), INTTOCHAR (6), * 48 * LOCKWAIT (0), SETMEMTRAP(1), SFREEMEM (0), * 49 * SGETMEM (0) ) * 50 * * 51 ********************************************************************************** 52 53 BLOCK UROPMSGGEN routine 54 ENTRY UROPMSGGEN 55 000090D6 56 UROPMSGGEN LABEL 090D6 61400412 5 57 LD R5 CPPSA R5 -> our PSA 58 PLOCK OPMSGLOCK lock list of messages 090D7 0CC00000 58 IOFF 090D8 D1C01EA7 58 SETT OPMSGLOCK 090D9 FE0C90DB 58 JNE MA(2+DISPW MA 0) 090DA DC40308B 58 CALLNP LOCKWAIT 090DB 60174817 0 5 BASE 59 LD R0 R5,PSOPMSGID R0 = id of last message sent 090DC 60401EA8 1 60 LD R1 OPMSGLIST R1 -> first message extant 090DD 4C084181 0 1 ZBM 61 RLSHLE R0 R1,OPMSGID find our previous message 090DE FE0C90E2 62 JNE NOPREVIOUS jump if not found 63 PUNLOCK OPMSGLOCK else unlock the list 090DF EC001EA7 63 STZ OPMSGLOCK 090E0 0C800000 63 ION 090E1 FE0E59EA 64 JMP UERRORSIU give 'system/resource in use' error 65 * --- 66 000090E2 67 NOPREVIOUS LABEL 68 PUNLOCK OPMSGLOCK release the lock 090E2 EC001EA7 68 STZ OPMSGLOCK 090E3 0C800000 68 ION 090E4 DC002ED0 69 CALL SGETMEM get memory for new message 090E5 40440005 IMM 70 PARVL OPMSGLOG size 090E6 61520000 5 0 REG 71 LD R5 R0 R5 -> message block 090E7 60000412 0 72 LD R0 CPPSA 090E8 60081F12 0 0 ZBM 73 LD R0 R0,PSPROCCB 090E9 604800C3 1 0 ZBM 74 LD R1 R0,PCPROCNUM R1 = our session number 090EA E44942E0 1 5 ZBM 75 ST R1 R5,OPMSGPROC save it 090EB 6000910E 0 76 LD R0 CONPROC constant "SESS" 090EC E4174802 0 5 BASE 77 ST R0 R5,OPMSGTEXT chars 1..4 = "SESS" 090ED DC005903 78 CALL INTTOCHAR chars 5..8 = session number 090EE 41524000 1 REG 79 PARV R1 session number 090EF 41440004 IMM 80 PARV 4 field width 090F0 4017400C 5 CACH 81 PARL R5,OPMSGTEXTC(4) where to put it 090F1 60024040 0 IMM 82 LD R0 " "*(CH0+CH1) 090F2 E4174804 0 5 BASE 83 ST R0 R5,OPMSGTEXT(2) chars 9..10 = blanks 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2036 (UREQOPMSG) F 128 UREQ - Generate and Cancel Messages to Operator 84 090F3 DC005BCF 85 CALL SETMEMTRAP trap user memory going funky 090F4 40009108 86 PARL USERMEMBAD 090F5 60570803 1 4 BASE 87 LD R1 R4,CAR1 R1 = size of user message 090F6 54440000 1 IMM 88 MAX R1 0 090F7 5044006D 1 IMM 89 MIN R1 OPMSGMAXLN-10 make sure it's reasonable 090F8 6016500A 0 1 REG 90 LD R0 R1+10 R0 = size including header 090F9 E4174007 0 5 CACH 91 ST R0 R5,OPMSGLEN save it 090FA FA429102 1 92 JEQZ R1 NOMOVE jump if message is null 090FB 38974012 2 5 CACH 93 LEA R2 R5,OPMSGTEXTC(10) where to move data to 090FC 60170804 0 4 BASE 94 LD R0 R4,CAR2 where to move data from 090FD 60D70801 3 4 BASE 95 LD R3 R4,CAMSR caller's MSR 090FE F6F29100 3 96 JBT R3/MSRFRELOCB FROMMON jump if caller is monitor 090FF 59840040 IMM 97 CLBMSR MSRFRELOC else clear our fetch bit 00009100 98 FROMMON LABEL 09100 FE400000 99 CMOVE get user's data 09101 59C40040 IMM 100 IORMSR MSRFRELOC restore our MSR bit 00009102 101 NOMOVE LABEL 09102 DC405BD4 102 CALLNP CLRMEMTRAP reset trap of funky memory 103 09103 DC0046F3 104 CALL GENOPMSG generate the message 09104 40534000 5 REG 105 PARVL R5 address of message block 09105 61400412 5 106 LD R5 CPPSA get our PSA pointer 09106 E4174817 0 5 BASE 107 ST R0 R5,PSOPMSGID save id of our message 09107 FE0E59D6 108 JMP NOERROR and that's all 109 * --- 110 00009108 111 USERMEMBAD LABEL 09108 62940000 2301 PAIR 112 LD2 R2 PAIR R0 save volatile registers 09109 DC002F5D 113 CALL SFREEMEM free the message block 0910A 41440005 IMM 114 PARV OPMSGLOG size 0910B 40534000 5 REG 115 PARVL R5 address 0910C 62148000 0123 PAIR 116 LD2 R0 PAIR R2 restore registers 0910D FE0E5B5F 117 JMP PASSERRUP pass error up to caller 118 * --- 119 0910E 53455353 120 CONPROC VFD "SESS" constant 121 122 END UROPMSGGEN routine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2037 (UREQOPMSG) F 128 UREQ - Generate and Cancel Messages to Operator 124 125 ********************************************************************************** 126 * * 127 * Cancel User Message to Operator. * 128 * LD R0 URCANOPMSG * 129 * UREQ 0 * 130 * * 131 * * 132 * Stack required = 1 * 133 * 0 + max ( CANOPMSG (1) ) * 134 * * 135 ********************************************************************************** 136 137 BLOCK UROPMSGCAN routine 138 ENTRY UROPMSGCAN 139 0000910F 140 UROPMSGCAN LABEL 0910F 61400412 5 141 LD R5 CPPSA R5 -> our PSA 09110 DC004713 142 CALL CANOPMSG cancel the message 09111 40574817 5 BASE 143 PARVL R5,PSOPMSGID id of message 09112 FE0E5988 144 JMP UERROR done, R0 = 0 or error code 145 * --- 146 147 END UROPMSGCAN routine 148 149 150 END UREQs for Operator Message Control 188 INPUT XRQUREQEND end of user request processor 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2038 (XRQUREQEND) F 129 CREF of UREQ processor 3 4 END UREQPROC User Request Processor 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2039 F 0 CREF of UREQ processor 190 191 ********************************************************************************** 192 * * 193 * Place to break the listing. * 194 * * 195 ********************************************************************************** 196 197 INPUT XRQOPREQ1 operator request processor 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2040 (XRQOPREQ1) F 130 Operator Request Processor 3 4 OPREQPROC BLOCK Operator and Control Mode Requests 5 ENTRY CHKGIVCMU check a unit to see if it can be given 6 ENTRY DOMOUNT do all stuff to mount a disk volume 7 ENTRY GULOCKHW lock hardware control block for giving a unit 8 ENTRY GUUNLOCKHW unlock hardware control block from giving a unit 9 ENTRY INITTERM move term config info into TCB 10 ENTRY MOUNTDUMMY volume control used by initial process 11 ENTRY MOUNTIDX read in user index and update AFT 12 ENTRY MOUNTNAME mount volume 13 ENTRY MOUNTPACKL mount the pack label 14 ENTRY OPREQTRAP operator request dispatcher 15 ENTRY MAKEBATCH log on a batch job w/o password 16 ENTRY STARTSPLR start the system Spooler 17 ENTRY TERMINITF name of the term config info 18 19 * Format of volume information returned 20 VOLINFORD LIST 20 ********************************************************************************** 20 * * 20 * Information returned on volumes by the volume * 20 * information request. * 20 * * 20 ********************************************************************************** 20 00009113 20 VIPROTO BASE R0 000800F0 0 ZBM 20 VIWORDZ BSSB 32-17 00081C10 0 ZBM 20 VIINHIB EQU VIWORDZ/BIT 31 on if access inhibited 00081A10 0 ZBM 20 VINOTMNT EQU VIWORDZ/BIT 30 on if not completely mounted 00081810 0 ZBM 20 VISYSVOL EQU VIWORDZ/BIT 29 on if the system volume 00081410 0 ZBM 20 VIQDW EQU VIWORDZ/BIT 27 on if writes queued 00081210 0 ZBM 20 VIQDR EQU VIWORDZ/BIT 26 on if reads queued 00081010 0 ZBM 20 VIADTBZY EQU VIWORDZ/BIT 25 on if ADT access busy 00080E10 0 ZBM 20 VIMAIM EQU VIWORDZ/BIT 24 on if maintenance mounted only 00081F10 0 ZBM 20 VIENTLEN BSSB 17 length of this entry in words 00160801 0 BASE 20 VIDNAME BSS 1 "name" of the drive (PAK6) 00160802 0 BASE 20 VIVNAME BSS 2 volume name (PAK12) 00160010 0 CACH 20 VIVNUM BSSB 8 system volume index number 00081184 0 ZBM 20 VIBUSY BSSB 32-8 volume busy counter 00160805 0 BASE 20 VIFREEBLK BSS 1 free blocks on the volume 00160806 0 BASE 20 VITOTBLK BSS 1 total blocks on volume 00160807 0 BASE 20 VIACCTNUM BSS 1 number of accounts on the volume 00160808 0 BASE 20 VIREALNAME BSS 2 real name on volume label 20 DRCT 0000000A ABS 20 VILENGTH EQU DISPW VIPROTO 00000004 ABS 20 VILOG EQU VILENGTH LOG 2 20 ORG VIPROTO reclaim space 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2041 (XRQOPREQ1) F 130 Operator Request Processor 22 23 ********************************************************************************** 24 * * 25 * OPREQTRAP. Operator and Control-Mode requests * 26 * * 27 * Stack required = 30 * 28 * 0 + max ( OPRAFTRD (15), OPRAUTHE (21), OPRAUTHL (21), * 29 * OPRCREACCT (21), OPRDESACCT (11), OPRDEVINFO (8), * 30 * OPREQCPU (1), OPREQCVOL (13), OPREQJOB (26), * 31 * OPREQLOG (19), OPREQMOUNT (22), OPREQSLEEP (1), * 32 * OPRGSYSINF (1), OPRMNTMAI (27), OPROPMSG (4), * 33 * OPRPNUM (13), OPRPROCCTL (11), OPRPSTOPGO (4), * 34 * OPRQBACKUP (19), OPRQMAINTR (12), OPRQMAINTW (9), * 35 * OPRQRECOVR (30), OPRQVANISH (24), OPRSTOPMON (12), * 36 * OPRSTRTMON (3), OPRTAKEPAG (0), OPRTERMCTL (10), * 37 * OPRTIMECTL (8), ORGETFPINFO (0), UERRORILOP (3) ) * 38 * * 39 ********************************************************************************** 40 41 BLOCK OPREQTRAP routine 42 ENTRY OPREQTRAP 43 00009113 44 OPREQTRAP LABEL 09113 60092C62 0 4 ZBM 45 LD R0 R4,CAR0/XRFLDREQ get the major request code 09114 6804001E 0 IMM 46 UCPR R0 OPREQMAX is it reasonable? 09115 FE0659D8 47 JGE UERRORILR jump if not 09116 60893842 2 4 ZBM 48 LD R2 R4,CAR0/XRFLDSUBOP get the sub-operation code 09117 61400414 5 49 LD R5 CPCUPC get the current UPC pointer 09118 614940F0 5 5 ZBM 50 LD R5 R5,UPCPRIV and fetch the program privilege field 09119 7547F7FF 5 IMM 51 XOR R5 NOT (1*UPCNTLMODB) all are restrictions except CM 0911A 6020911E 0 0 52 LD R0 OPREQJMP(R0) get the jump addr and control bits 0911B 794A00F0 5 0 CBM 53 AND R5 R0/PRIVREQD see if the caller has enough privilege 0911C FB4259D8 5 54 JEQZ R5 ILLREQ jump if he may not do it 0911D 5C920000 0 REG 55 LDPC R0 zoom to the routine 56 * --- 57 58 ********************************************************************************** 59 * * 60 * The interrupt processor sets up the registers as * 61 * follows: * 62 * SP => return address stack * 63 * R4 => CA of trapper * 64 * R3 = operand of instruction * 65 * R2 = sub-operation code * 66 * * 67 ********************************************************************************** 68 000000F0 BYTE 69 PRIVREQD EQU UPR15 field in jump table giving privilege 10000000 ABS 70 CMODEP EQU 1*UPCNTLMODB*PRIVREQD 04000000 ABS 71 MAST EQU 1*UPMANAGRB*PRIVREQD 02000000 ABS 72 BCKP EQU 1*UPBACKUPB*PRIVREQD 00400000 ABS 73 OPRP EQU 1*UPOPREQB*PRIVREQD 00800000 ABS 74 MNTR EQU 1*UPMAINTRB*PRIVREQD 01000000 ABS 75 MNTW EQU 1*UPMAINTWB*PRIVREQD 76 0000911E 77 OPREQJMP LABEL 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2042 (XRQOPREQ1) F 130 Operator Request Processor 0911E 000059D8 78 VFD ADR UERRORILR zero is an error 0911F 1000913C 79 VFD CMODEP+ADR OPREQLOG 01x - CM requests 09120 10009226 80 VFD CMODEP+ADR OPRQVANISH 02x - CM requests, cont. 09121 00409270 81 VFD OPRP+ADR OPREQSLEEP 03x - sleep the system 09122 06409DDF 82 VFD BCKP+OPRP+MAST+ADR OPREQMOUNT 04x - (dis)mount a volume 09123 06009925 83 VFD BCKP+MAST+ADR OPRCREACCT 05x - create an account 09124 06009A4E 84 VFD BCKP+MAST+ADR OPRDESACCT 06x - destroy an account 09125 004096F9 85 VFD OPRP+ADR OPRTERMCTL 07x - operator terminal control 09126 00409863 86 VFD OPRP+ADR OPRTIMECTL 08x - operator control of system time 09127 044098A8 87 VFD OPRP+MAST+ADR OPRPROCCTL 09x - process control 09128 06809D18 88 VFD BCKP+MNTR+MAST+ADR OPRAFTIDX 0Ax - AFT/IDX functions 09129 0280A2D3 89 VFD MNTR+BCKP+ADR OPRMNTMAI 0Bx - maintenance mount 0912A 0200A449 90 VFD BCKP+ADR OPRQBACKUP 0Cx - backup 0912B 0200A62B 91 VFD BCKP+ADR OPRQRECOVR 0Dx - recover 0912C 04009AAA 92 VFD MAST+ADR OPRAUTHL 0E0 - auth list 0912D 04009ACC 93 VFD MAST+ADR OPRAUTHE 0F0 - auth list entry 0912E 00C0A0FA 94 VFD OPRP+MNTR+ADR OPRGSYSINF 100 - get system info 0912F 0040A1FE 95 VFD OPRP+ADR OPRDEVINFO 110 - get device info 09130 0080AB40 96 VFD MNTR+ADR OPRSTRTMON 120 - start monitoring 09131 0080ABBB 97 VFD MNTR+ADR OPRSTOPMON 130 - stop monitoring 09132 0280A338 98 VFD BCKP+MNTR+ADR OPRQMAINTR 140 - maintenance read (NVM/disk) 09133 0100A388 99 VFD MNTW+ADR OPRQMAINTW 150 - maintenance write (NVM/disk) 09134 0040ACEA 100 VFD OPRP+ADR OPROPMSG 160 - operator message control 09135 00409689 101 VFD OPRP+ADR OPRPNUM 170 - server name control 09136 0040928F 102 VFD OPRP+ADR OPREQJOB 180 - job creation 09137 0040A15D 103 VFD OPRP+ADR OPREQCVOL 190 - change(get) volume info 09138 0040A11A 104 VFD OPRP+ADR ORGETFPINFO 1A0 - get system information 09139 0080AC73 105 VFD MNTR+ADR OPREQCPU 1B0 - CPU maintenance 0913A 0080ACD1 106 VFD MNTR+ADR OPRTAKEPAG 1C0 - memory maintenance 0913B 004098D0 107 VFD OPRP+ADR OPRPSTOPGO 1D0 - start/stop session 0000001E DISP 108 OPREQMAX EQU DISP OPREQJMP size of this table 109 110 END OPREQTRAP routine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2043 (XRQOPREQ1) F 130 OPREQ - Log on/off Processor 113 114 ********************************************************************************** 115 * * 116 * These requests, legal in control mode only, are * 117 * provided to deal with the requirements of logon, logoff, * 118 * and the related process attach. * 119 * * 120 * Stack required = 19 * 121 * 0 + max ( LOGOFFR (11), LOGONATTCH (4), LOGONPR (7), * 122 * LOGONR (19), VMRESET (0) ) * 123 * * 124 ********************************************************************************** 125 126 LOGONOFF BLOCK OPREQLOG routine 127 ENTRY OPREQLOG 128 0000913C 129 OPREQLOG LABEL 0913C 68840005 2 IMM 130 UCPR R2 LOGFUNMAX check the sub-op 0913D FE0659D8 131 JGE ILLREQ jump if not a reasonable request 0913E 5CA4913F 2 132 LDPC LOGFUNJMP(R2) goto function routine 133 * --- 134 0000913F 135 LOGFUNJMP LABEL 0913F 00009144 136 VFD ADR LOGONR log on the session 09140 0000918C 137 VFD ADR LOGOFFR log off the session 09141 000091C6 138 VFD ADR LOGONPR fetch logon program name 09142 000091E9 139 VFD ADR LOGONATTCH attach to another session 09143 0000920B 140 VFD ADR VMRESET reset user virtual memory 00000005 DISP 141 LOGFUNMAX EQU DISP LOGFUNJMP 142 143 END LOGONOFF OPREQLOG routine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2044 (XRQOPREQ1) F 130 OPREQ - Log on/off Processor 145 146 ********************************************************************************** 147 * * 148 * LOGON an account. Error if already logged on. * 149 * Otherwise, find or make the ULB, read in the UDIR1, then * 150 * copy useful info into resident tables. * 151 * User call: * 152 * LD R0 request * 153 * LD R1 ADR block (pak12 account, pak6 project, pak12 password) * 154 * OPREQ 0 * 155 * JLTZ R0 * 156 * * 157 * Eats R0:R3, R5, R7. * 158 * Stack required = 19 * 159 * 0 + max ( ACCOUNT (2), ACCTPSA (2), ACCTQUE (3), * 160 * ACCTULB (1), CLRMEMTRAP (1), FINDTERMCB (1), * 161 * FIXEXTEN (1), LOGONPROC (19), SETMEMTRAP (1), * 162 * SFREEMEM (0), SGETMEM (0), ZEROIT (1) ) * 163 * * 164 ********************************************************************************** 165 166 BLOCK LOGONR routine 167 ENTRY LOGONR 168 00009144 169 LOGONR LABEL 09144 60000412 0 170 LD R0 CPPSA get pointer to current PSA 09145 60481F13 1 0 ZBM 171 LD R1 R0,PSUSERLIMP get current logged on account (ULB ptr) 09146 64401EAE 1 172 CPR R1 SYSTEMULB check to see if system fake 09147 FE0C59D8 173 JNE LOGONALRDY jump if already logged on, control mode bug 09148 5C001D0D 174 CMZ ALLINHIBIT check for an inhibited system 09149 FE0C59F0 175 JNE UERRORINHI jump to give inhibited error 0914A DC0035C5 176 CALL FINDTERMCB get the associated port 0914B 40400412 177 PARVL CPPSA pass the PSA 0914C FA70914F 1 178 JZA R1 NOTERM jump if fake terminal 0914D 5C085C10 1 ZBM 179 CMZ R1,TCINHIB check for inhibited terminal 0914E FE0C59F0 180 JNE UERRORINHI jump to give inhibited error 0000914F 181 NOTERM LABEL 0914F DC002ED0 182 CALL UGETMEM get a temp block for the logon work 09150 40440004 IMM 183 PARVL EQTEMPLOG 09151 61520000 5 0 REG 184 LD EQT R0 put its pointer into EQT 09152 DC003090 185 CALL ZEROIT clear out the block 09153 41174400 5 @R 186 PAR @EQT 09154 40440010 IMM 187 PARVL 2 POWER EQTEMPLOG 09155 DC005BCF 188 CALL SETMEMTRAP trap bad user memory 09156 40009186 189 PARL BADUSERMEM 09157 60170803 0 4 BASE 190 LD R0 R4,CAR1 R0 -> user block 09158 60440014 1 IMM 191 LD R1 EQELSIZE*CPW R1 = size of block 09159 38974806 2 5 BASE 192 LEA R2 EQT,EQACCT R2 -> destination 0915A 5C093211 4 ZBM 193 CMZ R4,CAMSR/MSRFRELOCB 0915B FE0C915D 194 JNE FROMMON jump if fetching from monitor 0915C 59840040 IMM 195 CLBMSR MSRFRELOC clear bit -- fetch from user 0000915D 196 FROMMON LABEL 0915D FE400000 197 CMOVE copy the user block 0915E 59C40040 IMM 198 IORMSR MSRFRELOC set bit -- fetch from monitor 0915F DC405BD4 199 CALLNP CLRMEMTRAP reset the memory trap 09160 DC405A13 200 CALLNP FIXEXTEN default extensions to null 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2045 (XRQOPREQ1) F 130 OPREQ - Log on/off Processor 09161 DC009612 201 CALL LOGONPROC 09162 43440000 IMM 202 PARV2 0 no special PW mangle for logon 09163 40400412 203 PARVL CPPSA 09164 FA0C9176 0 204 JNEZ R0 LOGONERR 09165 D017080F 4 BASE 205 INC ULB,ULSCRDSK account for CM page 0 09166 60001EAE 0 206 LD R0 SYSTEMULB get system ULB pointer 09167 D056080F 0 BASE 207 DEC R0,ULSCRDSK page 0 originally charged to us 09168 FE06916A 208 JGE NOTNEGNOW jump if total did NOT go negative 09169 D016080F 0 BASE 209 INC R0,ULSCRDSK push count back to zero 0000916A 210 NOTNEGNOW LABEL 0916A DC002F5D 211 CALL UFREEMEM return a block of free storage 0916B 41440004 IMM 212 PARV EQTEMPLOG this long 0916C 40534000 5 REG 213 PARVL EQT at this location 214 * \ / 215 216 * Write to the accounting file that I'm logged on. 0916D DC00505F 217 CALL ACCOUNT output to the accounting file 0916E 41440002 IMM 218 PARV APTON the code is "logging on" 0916F 41440028 IMM 219 PARV AFRSIZE size of the record 09170 40491A57 4 ZBM 220 PARVL ULB,ULLOGSPOT who to give the logging info to 09171 60800412 2 221 LD R2 CPPSA use current PSA 09172 DC405C0D 222 CALLNP ACCTPSA fill in this stuff 09173 DC405C1E 223 CALLNP ACCTULB get the info from the ULB 09174 DC405025 224 CALLNP ACCTQUE and send it to the queue 09175 FE0E59D6 225 JMP NOERROR return with process logged on 226 * --- 227 228 * already logged on - a control mode bug, but be nice to him 000059D8 229 LOGONALRDY EQU ILLREQ "ILLEGAL REQUEST" 230 * --- 231 00009176 232 LOGONERR LABEL 09176 61D20000 7 0 REG 233 LD R7 R0 R7 = error code 09177 DC00505F 234 CALL ACCOUNT log the unsuccessful logon 09178 41440003 IMM 235 PARV APTPWW password wrong 09179 4144001C IMM 236 PARV AFRSHORT size of the record 0917A 4047FFFF IMM 237 PARVL -1 write event everywhere possible 0917B 62174806 015 BASE 238 LD2 R0 EQT,EQACCT the account we tried 0917C E616C803 013 BASE 239 ST2 R0 R3,APRECORD/AFRACCT put into the accounting record 0917D 60174808 0 5 BASE 240 LD R0 EQT,EQACCTPROJ pick up the project we tried 0917E E416C805 0 3 BASE 241 ST R0 R3,APRECORD/AFRPROJ and place into record 0917F 60800412 2 242 LD R2 CPPSA R2 -> current PSA 09180 DC405C0D 243 CALLNP ACCTPSA put in this information 09181 DC405025 244 CALLNP ACCTQUE and send it to the queue 09182 DC002F5D 245 CALL UFREEMEM return a block of free storage 09183 41440004 IMM 246 PARV EQTEMPLOG this long 09184 40534000 5 REG 247 PARVL EQT at this location 09185 FE0E5995 248 JMP UERROR7 go issue error to user 249 * --- 250 251 * Bad user memory while fetching parms. Pass error up. 00009186 252 BADUSERMEM LABEL 09186 E6148000 0123 PAIR 253 ST2 R0 PAIR R2 save error codes 09187 DC002F5D 254 CALL UFREEMEM free the temp block 09188 41440004 IMM 255 PARV EQTEMPLOG block size 09189 40534000 5 REG 256 PARVL EQT block pointer 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2046 (XRQOPREQ1) F 130 OPREQ - Log on/off Processor 0918A 62148000 0123 PAIR 257 LD2 R0 PAIR R2 restore error codes 0918B FE0E5B5F 258 JMP PASSERRUP and pass error up 259 * --- 260 261 END LOGONR routine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2047 (XRQOPREQ1) F 130 OPREQ - Log on/off Processor 263 264 ********************************************************************************** 265 * * 266 * LOGOFF an account. Check if already off. If not, * 267 * eliminate the limit block and return accounting info to * 268 * control mode. * 269 * User call: * 270 * LD R0 request * 271 * OPREQ 0 * 272 * JLTZ R0 error * 273 * ST R1 wall clock time used * 274 * * 275 * Eats R0:R4, Sets R0 = 0 (if successful) or error code. * 276 * Stack required = 11 * 277 * 0 + max ( ACCOUNT (2), ACCTALIAS (4), ACCTPSA (2), * 278 * ACCTQUE (3), ACCTULB (1), CANOPMSG (1), * 279 * FLUSHCONCP (5), FLUSHPNUM (2), FREEULB (11), * 280 * FREEULBC (11), GETDATE (1), PURGEMSGS (7), * 281 * WSXCLNALL (10) ) * 282 * * 283 ********************************************************************************** 284 285 BLOCK LOGOFFR routine 286 ENTRY LOGOFFR 287 0000918C 288 LOGOFFR LABEL 0918C 60C00412 3 289 LD R3 CPPSA get pointer to the current PSA 0918D 6108DF13 4 3 ZBM 290 LD ULB R3,PSUSERLIMP load pointer to the limit block 0918E 65001EAE 4 291 CPR ULB SYSTEMULB check to ensure not system fake 0918F FE0291C4 292 JEQ ALREADYGON bug if not logged in 09190 6008DF15 0 3 ZBM 293 LD R0 R3,PSPROCLIST get pointer to process list 09191 5C081F10 0 ZBM 294 CMZ R0,UPCSONPTR check for any more in process tree 09192 FE0C91C5 295 JNE UNDERPLEFT jump if CM left junk around 09193 6016C810 0 3 BASE 296 LD R0 R3,PSTIMEUSED get the total time used 09194 140403E8 0 IMM 297 DIV R0 MSECSS convert to seconds 09195 98170809 0 4 BASE 298 ADDM R0 ULB,ULTIMUSD compile CPU seconds 09196 DC404549 299 CALLNP GETDATE get the current TOD 09197 1216C815 013 BASE 300 SUB2 R0 R3,PSHELDATE calculate ms logged on 09198 1604EA60 01 IMM 301 DIV2 R0 MSECSM make into minutes 09199 9857080B 1 4 BASE 302 ADDM R1 ULB,ULWLCKUSD compile wall clock minutes 303 * move useful accounting information into registers 0919A 6088DF11 2 3 ZBM 304 LD R2 R3,PSCACHNP1 get ptr to users registers 0919B E4568803 1 2 BASE 305 ST R1 R2,CAR1 also pass to control mode 306 * release usage of all of the ULB's 0919C 61001EAE 4 307 LD ULB SYSTEMULB 0919D 60C00414 3 308 LD R3 CPCUPC get pointer to UPC 0919E E108DF13 4 3 ZBM 309 EXCH ULB R3,UPCPRIVULB get and undo pointer to priv acct 0919F DC405526 310 CALLNP FREEULB free the usage thereof 091A0 61001EAE 4 311 LD ULB SYSTEMULB this PSA now gets the system ULB 091A1 60C00412 3 312 LD R3 CPPSA get the current PSA pointer 091A2 E108DF14 4 3 ZBM 313 EXCH ULB R3,PSDFLTDIR and unlink the alias ULB 091A3 6508DF13 4 3 ZBM 314 CPR ULB R3,PSUSERLIMP both the same? 091A4 FE0C91A7 315 JNE LOGOFFROA jump if not 091A5 DC405526 316 CALLNP FREEULB save a force write to disk 091A6 FE0E91AA 317 JMP LOGOFFRUA 318 * --- 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2048 (XRQOPREQ1) F 130 OPREQ - Log on/off Processor 319 320 * The account being freed is different than the next one so 321 * force out the results. 000091A7 322 LOGOFFROA LABEL 091A7 DC005C2A 323 CALL ACCTALIAS do accounting for 'aliased' account 091A8 40440007 IMM 324 PARVL APTALOFF indicate alias off 091A9 DC405566 325 CALLNP FREEULBC free ULB and copy info to mass storage 326 * \ / 327 000091AA 328 LOGOFFRUA LABEL 091AA D0401F02 329 DEC TERMCOUNT indicate one less logged on terminal 091AB 60C00412 3 330 LD R3 CPPSA get the current PSA pointer 091AC 61001EAE 4 331 LD ULB SYSTEMULB reset to the system account 091AD D017080F 4 BASE 332 INC ULB,ULSCRDSK CM page will become ours 091AE E108DF13 4 3 ZBM 333 EXCH ULB R3,PSUSERLIMP and get logged on ULB 091AF D057080F 4 BASE 334 DEC ULB,ULSCRDSK CM page no longer ours 091B0 FE0691B2 335 JGE NOTNEGNW2 jump if total did NOT go negative 091B1 EC17080F 4 BASE 336 STZ ULB,ULSCRDSK scratch disk space used went negative 000091B2 337 NOTNEGNW2 LABEL 091B2 DC00505F 338 CALL ACCOUNT do accounting for the 'logged on' account 091B3 41440006 IMM 339 PARV APTOFF the flag sez "logoff" 091B4 41440028 IMM 340 PARV AFRSIZE size of the record 091B5 40491A57 4 ZBM 341 PARVL ULB,ULLOGSPOT place to put the information 091B6 60800412 2 342 LD R2 CPPSA R2 -> current PSA 091B7 DC405C0D 343 CALLNP ACCTPSA fill in PSA info 091B8 DC405C1E 344 CALLNP ACCTULB put in info from ULB 091B9 DC405025 345 CALLNP ACCTQUE send the record to the queue 091BA DC405566 346 CALLNP FREEULBC free the directory referenced 091BB 60C40000 3 IMM 347 LD R3 0 indicate all pages 091BC DC4032EA 348 CALLNP WSXCLNALL call to clean out working set extension lists 091BD DC004713 349 CALL CANOPMSG cancel user's message to operator, if any 091BE 60000412 0 350 LD R0 CPPSA 091BF 40560817 0 BASE 351 PARVL R0,PSOPMSGID id of message to can, ignore errror 091C0 DC408FC9 352 CALLNP PURGEMSGS purge inter-process messages 091C1 DC4096C2 353 CALLNP FLUSHPNUM purge process-name elements 091C2 DC409534 354 CALLNP FLUSHCONCP purge all concurrent processes 091C3 FE0E59D6 355 JMP NOERROR 356 * --- 357 358 * Already logged off - control mode is up a tree - 359 * something wrong with software. 000091C4 360 ALREADYGON LABEL 091C4 00031210 361 HALT HALTC1210 attempt to log off nobody (or disk error) 362 * --- 363 364 * CM left underprocesses hanging around 000091C5 365 UNDERPLEFT LABEL 091C5 00031216 366 HALT HALTC1216 underprocesses left at logoff 367 * --- 368 369 END LOGOFFR routine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2049 (XRQOPREQ1) F 130 OPREQ - Log on/off Processor 371 372 ********************************************************************************** 373 * * 374 * Fetch the name of the initial program. This request * 375 * is used by control mode at logon time to fetch the name of * 376 * the program to run. * 377 * User call: * 378 * LD R0 * 379 * LD R1 => 16 word equip block * 380 * OPREQ 0 * 381 * JLTZ R0 * 382 * * 383 * Stack required = 7 * 384 * 0 + max ( DMOTEWNDO1 (7), FETCHDIR (4), FREEDIR (5), * 385 * GRUBWNDO1 (7), SETMEMTRAP (1), SETWNDO1 (4) ) * 386 * * 387 ********************************************************************************** 388 389 BLOCK LOGONPR routine 390 ENTRY LOGONPR 391 000091C6 392 LOGONPR LABEL 091C6 61570803 5 4 BASE 393 LD R5 R4,CAR1 R5 => users buffer 091C7 61D70801 7 4 BASE 394 LD R7 R4,CAMSR MSR of requester 091C8 61000412 4 395 LD ULB CPPSA get the current PSA pointer 091C9 61091F13 4 4 ZBM 396 LD ULB ULB,PSUSERLIMP ULB => account limit block 091CA DC405667 397 CALLNP FETCHDIR get access to the directory 091CB DC003205 398 CALL SETWNDO1 get the directory in 091CC 41440001 IMM 399 PARV VPCNTLRO for read only access 091CD 41440000 IMM 400 PARV VPNOFCB no associated lun 091CE 410091E2 401 PAR ITSBAD where to go if bad 091CF 41570801 4 BASE 402 PARV ULB,ULBLOCK pass directorys MS address 091D0 40440009 IMM 403 PARVL FBITUDIR1 indicate FBI type 091D1 5C000800 404 CMZ WNDO1 get any disk error 091D2 DC005BCF 405 CALL SETMEMTRAP where to go on user memory failure 091D3 400091E6 406 PARL CMMEMBAD 091D4 F7F091D6 7 407 JBT R7/MSRSRELOCB MONTIGUE relocate to user? 091D5 59840080 IMM 408 CLBMSR MSRSRELOC clear store bit if so 000091D6 409 MONTIGUE LABEL 091D6 60440040 1 IMM 410 LD R1 16*CPW get size of users block 091D7 60934000 2 5 REG 411 LD R2 R5 copy the destination pointer 091D8 FE580000 412 CFILL 000 fill the users buffer with zeros 091D9 3800080B 0 413 LEA R0 WNDO1(UDHPRAC) get ptr to the account name 091DA 60440028 1 IMM 414 LD R1 10*CPW get size of account.project:name.ext 091DB 38974805 2 5 BASE 415 LEA R2 R5,5 get ptr to account part of users block 091DC D1574802 5 BASE 416 STMW R5,2 system name is unspecified 091DD FE400000 417 CMOVE move the initial program name accross 091DE 59C40080 IMM 418 IORMSR MSRSRELOC fix the relocation 091DF DC40315C 419 CALLNP DMOTEWNDO1 unmap UDIR1 from window 091E0 DC405685 420 CALLNP FREEDIR release access to the directory 091E1 FE0E59D6 421 JMP NOERROR success 422 * --- 423 424 * The directory is bad. Error code in R0 (page number in R1). 000091E2 425 ITSBAD LABEL 091E2 61D20000 7 0 REG 426 LD R7 R0 save the error code 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2050 (XRQOPREQ1) F 130 OPREQ - Log on/off Processor 091E3 DC403150 427 CALLNP GRUBWNDO1 unmap the page 091E4 DC405685 428 CALLNP FREEDIR release the dead directory 091E5 FE0E5995 429 JMP UERROR7 give error to CM 430 * --- 431 432 * The users memory won't accept our data. CM is our only user 433 * so we stop here so the bug therin will be easier to find. 000091E6 434 CMMEMBAD LABEL 091E6 00031215 435 HALT HALTC1215 erroneous parameter from CM 091E7 60040072 0 IMM 436 LD R0 UINTVMFIDS load reason 091E8 FE0E91E2 437 JMP ITSBAD and follow MS error path 438 * --- 439 440 END LOGONPR routine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2051 (XRQOPREQ1) F 130 OPREQ - Log on/off Processor 442 443 ********************************************************************************** 444 * * 445 * Attach to another session. This request allows one * 446 * logged on session to attach itself to another logged on * 447 * session, thus becoming the attached session and the * 448 * original session is flushed. Actually the bulk of the work * 449 * is done by control mode. We just check for proper access * 450 * (logged on accounts of both sessions must match) and alert * 451 * control mode of the situation. Attach to a concurrent * 452 * session spawned by the requester is not allowed because * 453 * the resulting session would be forced to log off right * 454 * away anyway, when the requester's original session (the * 455 * parent!) logs off. * 456 * Call: * 457 * LD R0 ORATTACH * 458 * OPREQ * 459 * JLTZ R0 * 460 * * 461 * Eats R0:R5. * 462 * Stack required = 4 * 463 * 0 + max ( ROUST (4), SRCHLIST (1), UERRSETY (1), * 464 * UNSRCHLIST (1) ) * 465 * * 466 ********************************************************************************** 467 468 BLOCK LOGONATTCH routine 469 ENTRY LOGONATTCH 470 000091E9 471 LOGONATTCH LABEL 091E9 FACA59E0 3 472 JLEZ R3 UERRORMNRP don't even attempt to find self 091EA DC0030AA 473 CALL SRCHLIST get access to the process list 091EB 40001EB2 474 PARL PCNTLLOCK 091EC 61401EB1 5 475 LD R5 PCONTROL get root of list 476 * \ / 477 000091ED 478 SRCHHIM LABEL 091ED 64C940C3 3 5 ZBM 479 CPR R3 R5,PCPROCNUM is this our session? 091EE FE0291F4 480 JEQ FOUNDPROC jump if it is 091EF 61495F14 5 5 ZBM 481 LD R5 R5,PCNXTCB move to the next control block 091F0 FB7291ED 5 482 JNZA R5 SRCHHIM loop if there is more 483 * \ / 484 091F1 DC0030B7 485 CALL UNSRCHLIST release the lock 091F2 40001EB2 486 PARL PCNTLLOCK lock word 091F3 FE0E59E2 487 JMP UERRORNSPP error return 488 * --- 489 490 * R5 -> PCB of victim 000091F4 491 FOUNDPROC LABEL 091F4 61495F13 5 5 ZBM 492 LD R5 R5,PCPSADRS R5 -> victim PSA 091F5 65400412 5 493 CPR R5 CPPSA are we attaching to ourselves? 091F6 FE029208 494 JEQ NOCANDO do not allow this 091F7 60495F13 1 5 ZBM 495 LD R1 R5,PSUSERLIMP R1 -> our logged on account ULB 091F8 60000412 0 496 LD R0 CPPSA R0 -> our PSA 091F9 64481F13 1 0 ZBM 497 CPR R1 R0,PSUSERLIMP are the logged on accounts the same? 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2052 (XRQOPREQ1) F 130 OPREQ - Log on/off Processor 091FA FE0C9208 498 JNE NOCANDO error if not 091FB 60081F12 0 0 ZBM 499 LD R0 R0,PSPROCCB R0 -> our PCB 091FC 60C800C3 3 0 ZBM 500 LD R3 R0,PCPROCNUM our session number 091FD 64C940C4 3 5 ZBM 501 CPR R3 R5,PCPARENT is victim conc session we spawned? 091FE FE029208 502 JEQ NOCANDO it would never work 503 * \ / 504 505 * R3 = our session number (for UERRSETY), R4 -> CA, R5 -> victim PSA 091FF 60570803 1 4 BASE 506 LD R1 R4,CAR1 specified "options" 09200 E44AC100 1 3 CBM 507 ST R1 R3/BITS 0:15 save in subcode 09201 60841075 2 IMM 508 LD R2 UINTATTACH+CMERR send interrupt to control mode 09202 DC4035B5 509 CALLNP UERRSETY set the error on it 09203 60C95F12 3 5 ZBM 510 LD R3 R5,PSPROCCB R3 -> PCB of session 09204 DC403569 511 CALLNP ROUST shake 'em till it wakes 09205 DC0030B7 512 CALL UNSRCHLIST release the lock 09206 40001EB2 513 PARL PCNTLLOCK lock word 09207 FE0E59D6 514 JMP NOERROR done 515 * --- 516 00009208 517 NOCANDO LABEL 09208 DC0030B7 518 CALL UNSRCHLIST release the list 09209 40001EB2 519 PARL PCNTLLOCK lock word 0920A FE0E59E0 520 JMP UERRORMNRP error return 521 * --- 522 523 END LOGONATTCH routine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2053 (XRQOPREQ1) F 130 OPREQ - Log on/off Processor 525 526 ********************************************************************************** 527 * * 528 * VMRESET. Check state of session's user virtual memory. * 529 * Reset if it was awry and is now OK. Return an error if user * 530 * is short of memory, and there is not enough to do anything * 531 * about it now. * 532 * User call: * 533 * LD R0 ORRESETVM * 534 * OPREQ 0 * 535 * JLTZ R0 * 536 * * 537 * Eats R0:R2 * 538 * Stack required = 0 * 539 * 0 + max ( LOCKWAIT (0), USERGETMEM (0) ) * 540 * * 541 ********************************************************************************** 542 543 BLOCK VMRESET routine 544 ENTRY VMRESET 545 0000920B 546 VMRESET LABEL 0920B FACC59E0 3 547 JNEZ R3 UERRORMNRP jump if not self specification 548 PLOCK UMEMLOCK get access to memory lists 0920C 0CC00000 548 IOFF 0920D D1C1F00F 548 SETT UMEMLOCK 0920E FE0C9210 548 JNE MA(2+DISPW MA 0) 0920F DC40308B 548 CALLNP LOCKWAIT 09210 5C01F00D 549 CMZ UMEMXTRA see whether we've used emergency rations 09211 FE0C9222 550 JNE VMOK if not, return OK code 551 * \ / 552 553 * look for enough memory 09212 60040003 0 IMM 554 LD R0 MEMLISTMAX-XALOG initialize counter 00009213 555 VMSCAN LABEL 09213 6061F007 1 0 556 LD R1 USERMEM(XALOG)(R0) get a list head 09214 FA729218 1 557 JNZA R1 VMRGOT jump if something here 09215 FA269213 0 558 JDR R0 VMSCAN else, try again 559 * \ / 560 561 * scan sez there is still no room 09216 60040093 0 IMM 562 LD R0 XREQERISYR return unfortunate code 09217 FE0E9223 563 JMP VMRETURN exit 564 * --- 565 566 * preliminary scan says enough memory is available, try it 00009218 567 VMRGOT LABEL 568 PUNLOCK UMEMLOCK release lists 09218 EC01F00F 568 STZ UMEMLOCK 09219 0C800000 568 ION 0921A DC002F0A 569 CALL USERGETMEM get a nice chunk 0921B 40440007 IMM 570 PARVL XALOG cross our fingers now 0921C 60520000 1 0 REG 571 LD R1 R0 put in safe register 572 PLOCK UMEMLOCK relock lists 0921D 0CC00000 572 IOFF 0921E D1C1F00F 572 SETT UMEMLOCK 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2054 (XRQOPREQ1) F 130 OPREQ - Log on/off Processor 0921F FE0C9221 572 JNE MA(2+DISPW MA 0) 09220 DC40308B 572 CALLNP LOCKWAIT 09221 E441F00D 1 573 ST R1 UMEMXTRA restore nice area 574 * \ / 575 00009222 576 VMOK LABEL 09222 60040000 0 IMM 577 LD R0 0 give nice return code 00009223 578 VMRETURN LABEL 579 PUNLOCK UMEMLOCK release lists 09223 EC01F00F 579 STZ UMEMLOCK 09224 0C800000 579 ION 09225 FE0E5988 580 JMP UERROR return with code in R0 581 * --- 582 583 END VMRESET routine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2055 (XRQOPREQ1) F 130 OPREQ - Vanish process request 586 587 ********************************************************************************** 588 * * 589 * ORVANISH * 590 * This request comes from control mode when it wishes * 591 * its process to go away. This routine must disassociate any * 592 * terminal then destroy the PSA and assorted lists. A check * 593 * is made to see if we are vanishing the process that slept * 594 * the system. If that is true, we may assume that all user * 595 * processes are gone ( inhibiting should be in effect ) so we * 596 * set about undoing mounted volumes then zapping the system * 597 * processes. Eventually all will be gone and the dispatcher * 598 * will stop the processors. * 599 * * 600 * Stack required = 24 * 601 * 0 + max ( ACCOUNT (2), ACCTPSA (2), ACCTQUE (3), * 602 * CANOPMSG (1), CLEANUNITS (24), DISMTDUMMY (4), * 603 * DISMTNAME (16), ERRORLOG (3), GRUBPAGE (7), * 604 * LOGDISKS (2), PURGEGIFTU (23), SUSPENDME (0), * 605 * TIMEKILL (2), WSXCLNALL (10) ) * 606 * * 607 ********************************************************************************** 608 609 BLOCK OPRQVANISH routine 610 ENTRY OPRQVANISH 611 00009226 612 OPRQVANISH LABEL 09226 FA8C59D8 2 613 JNEZ R2 UERRORILR check for odd-ball sub-ops - illegal request 09227 60800414 2 614 LD R2 CPCUPC get current UPC 09228 60C89F15 3 2 ZBM 615 LD R3 R2,UPCUNITS get pointer to local units 09229 EC089F15 2 ZBM 616 STZ R2,UPCUNITS leave clean pointer 0922A DC407FF2 617 CALLNP CLEANUNITS dump the local units 0922B 60800412 2 618 LD R2 CPPSA get the current PSA 0922C 60C8A316 3 2 ZBM 619 LD R3 R2,PSUNITS get pointer to global units 0922D EC08A316 2 ZBM 620 STZ R2,PSUNITS leave clean pointer 0922E DC407FF2 621 CALLNP CLEANUNITS dump the global units 0922F 60C00412 3 622 LD R3 CPPSA get the current PSA 09230 5C08DF17 3 ZBM 623 CMZ R3,PSFCBLIST are there any FCBs out there? 09231 FE029233 624 JEQ THATSGOOD there shouldn't be 09232 00131211 625 HALT HALTS1211 FCBs left in list after cleaning UCE lists 626 * --- 627 00009233 628 THATSGOOD LABEL 09233 6108C116 4 3 ZBM 629 LD R4 R3,PSCURRPROC point to UPC block 09234 61170811 4 4 BASE 630 LD TMR R4,UPCTIMESER serial number of time interrupt 09235 DC404517 631 CALLNP TIMEKILL get rid of any time interrupts the guy has 09236 FEC00000 632 NOP 0 ignore skip return 09237 DC004713 633 CALL CANOPMSG cancel user's message to operator, if any 09238 60000412 0 634 LD R0 CPPSA 09239 40560817 0 BASE 635 PARVL R0,PSOPMSGID 0923A DC4090B7 636 CALLNP PURGEGIFTU remove any gift units not picked up 0923B 60000412 0 637 LD R0 CPPSA get the current PSA pointer 0923C 64001D0C 0 638 CPR R0 SLEEPFLAG is this the sleeping process? 0923D FE02923F 639 JEQ PREPAREBED if so, use this process to sleep the system 0923E FE0E2DAC 640 JMP LIQUIDATE zap the process 641 * --- 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2056 (XRQOPREQ1) F 130 OPREQ - Vanish process request 642 643 ********************************************************************************** 644 * * 645 * We are trying to destroy the process that initiated a * 646 * system sleep. He can only do that if he is the only * 647 * non-system process on the system. So we now assume that * 648 * all users are gone and we clean up system stuff then stop * 649 * the system. We also know that all I/O devices ( save disk * 650 * and SSU ) are stopped and that the only disk activity is * 651 * related to the freeing of the sleep request process. * 652 * So we do the following: * 653 * - unequip the control mode code file * 654 * - unequip the system code file * 655 * - request destruction of the accounting process * 656 * - request destruction of the error logging process * 657 * (at this point, no files are equipped by anybody) * 658 * - clean up the ADT on all volumes * 659 * - request destruction of the free file process * 660 * - liquidate myself * 661 * * 662 * After the last step, control will return to the * 663 * dispatcher who will wait until all processes are gone and * 664 * all disk activity has ended before halting. * 665 * * 666 ********************************************************************************** 667 0000923F 668 PREPAREBED LABEL 0923F 60C40000 3 IMM 669 LD R3 0 indicate all pages 09240 DC4032EA 670 CALLNP WSXCLNALL call to clean out working set extension lists 671 09241 61440085 5 IMM 672 LD R5 HIUSERPAGE get the highest page number in VM list 00009242 673 CLEANOUT LABEL 09242 60134000 0 5 REG 674 LD R0 R5 copy the current page number 09243 DC4030E4 675 CALLNP GRUBPAGE dump this page (VM list and PAL, if present) 09244 FB669242 5 676 JDR R5 CLEANOUT repeat for all 677 * \ / 678 * unequip control mode file - not written 679 * unequip system code file - not written 680 * \ / 681 682 ********************************************************************************** 683 * * 684 * Destroy the accounting process. * 685 * * 686 ********************************************************************************** 687 688 * \ / 09245 DC00505F 689 CALL ACCOUNT inform the account process to flush 09246 41440000 IMM 690 PARV APTSLEEP the code sez sleep 09247 4144001C IMM 691 PARV AFRSHORT size of the record 09248 40440003 IMM 692 PARVL 3 log sleep in master accounts 09249 60800412 2 693 LD R2 CPPSA R2 -> current PSA 0924A DC405C0D 694 CALLNP ACCTPSA fill in PSA info 0924B DC405025 695 CALLNP ACCTQUE send the record to the queue 696 * \ / 697 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2057 (XRQOPREQ1) F 130 OPREQ - Vanish process request 698 ********************************************************************************** 699 * * 700 * Destroy error logging process. This is possibly early * 701 * and might cause some errors to not get logged, but we need * 702 * that LUN unequipped. Maybe fix so this unequips the LUN * 703 * and the process destruction is done later. * 704 * * 705 ********************************************************************************** 706 707 * \ / 0924C DC4054F2 708 CALLNP LOGDISKS make the final log entry of disk activity 0924D DC005048 709 CALL ERRORLOG tell him to go away 0924E 41440401 IMM 710 PARV ERLCEND passing end request 0924F 40440000 IMM 711 PARVL 0 no further parameters 712 * \ / 713 714 ********************************************************************************** 715 * * 716 * Clean up ADTs on all volumes. The only traffic that * 717 * should be on volumes is freeing and the writing of * 718 * directories from the above unequips, so we might have to * 719 * wait for some volumes. We leave the dummy element for the * 720 * system volume in so that we can get any parts of the * 721 * virtual monitor that we may need. * 722 * The list is not locked since we are the last process * 723 * on the system. If the volume is maintanence mounted we * 724 * just ignore it because it should already be going through * 725 * the dismount process when the .VOL was closed * 726 * * 727 ********************************************************************************** 728 729 * \ / 09250 61C4003F 7 IMM 730 LD R7 MAXVOLNUM-1 index into VOLNTABLE 00009251 731 DOVOLUME LABEL 09251 612E1F22 4 7 732 LD VLN VOLNTABLE(R7) get a VOLN pointer 09252 FB309265 4 733 JZA VLN NEXTVOL jump if nobody here 09253 6145D4C0 5 IMM 734 LD R5 2*MSECSM times to wait ( ~ 2 minutes ) 735 * \ / 00009254 736 TRYAGAIN LABEL 09254 5C090010 4 ZBM 737 CMZ VLN,VOLNSYS is this the system volume? 09255 FE02925D 738 JEQ DMOUNTIT attempt dismount if not 09256 5C001D9A 739 CMZ APLIST are all accounting entries done? 09257 FE0C9267 740 JNE WAITONVOL if not then don't dismount volume yet 09258 5C001D92 741 CMZ ERRLOGLIST is the error log list empty? 09259 FE0C9267 742 JNE WAITONVOL if not then don't dismount volume yet 0925A 60001EB0 0 743 LD R0 PCCOUNT see how many processes are left 0925B 64040001 0 IMM 744 CPR R0 1 we should be the only one 0925C FE049267 745 JGT WAITONVOL if not then wait 746 * \ / 0000925D 747 DMOUNTIT LABEL 0925D 5C090E10 4 ZBM 748 CMZ VLN,VOLNMAIM volume maintanence mounted? 0925E FE0C9265 749 JNE NEXTVOL should dismount during close of .VOL 0925F EDC90A10 4 ZBM 750 STW VLN,VOLNMOUNT indicate volume no longer usable 09260 DC409FF4 751 CALLNP DISMTNAME try to finish off volume 09261 FA0C9267 0 752 JNEZ R0 WAITONVOL jump if it's busy 09262 5C090010 4 ZBM 753 CMZ VLN,VOLNSYS leave VLN entry if system volume 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2058 (XRQOPREQ1) F 130 OPREQ - Vanish process request 09263 FE0C9265 754 JNE NEXTVOL jump if this system volume 09264 DC40A039 755 CALLNP DISMTDUMMY remove element from list 756 * \ / 00009265 757 NEXTVOL LABEL 09265 FBE29251 7 758 DRJ R7 DOVOLUME do all possible volumes 09266 FE0E2DAC 759 JMP LIQUIDATE then bare the ol' bodkin 760 * --- 761 762 * Volume is still busy freeing - wait for him 00009267 763 WAITONVOL LABEL 09267 FB629269 5 764 DRJ R5 KEEPWAITNG count time around 09268 001A1212 765 HALT HALTZ1212 stop 'cuz volume won't go away 766 * --- 767 00009269 768 KEEPWAITNG LABEL 09269 D0170815 4 BASE 769 INC VLN,VOLNBUSY give suspender something to count down 0926A 0CC00000 770 IOFF undo the work of SUSPENDME 0926B DC00351C 771 CALL SUSPENDME go around queue once 0926C 41009254 772 PAR TRYAGAIN try to remove next time 0926D 41440001 IMM 773 PARV 1 usually 0, but a 1 marks us (for debugging) 0926E 41001DAA 774 PAR SQRUNNABLE still runnable 0926F 40170815 4 BASE 775 PARL VLN,VOLNBUSY just something to decrement 776 * --- 777 778 END OPRQVANISH routine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2059 (XRQOPREQ1) F 130 OPREQ - system sleep request 781 782 ********************************************************************************** 783 * * 784 * SLEEP * 785 * This request is used by the operator's program to end * 786 * system operation. This request examines the system and * 787 * decides whether the system would sleep if it tried. This * 788 * sees that the requester is the only user on the system and * 789 * that there is no freeing in progress. I/O device state is * 790 * examined to see that all devices are idle. If these are * 791 * true, then the requester is logged off and the system is * 792 * slept. * 793 * User call: * 794 * LD R0 ORSLEEP get the sleep request * 795 * OPREQ 0 * 796 * JLTZ R0 * 797 * * 798 * Stack required = 1 * 799 * 0 + max ( SRCHLIST (1), UERRSET (1), UNSRCHLIST (1) ) * 800 * * 801 ********************************************************************************** 802 803 BLOCK OPREQSLEEP routine 804 ENTRY OPREQSLEEP 805 00009270 806 OPREQSLEEP LABEL 09270 5C001D0C 807 CMZ SLEEPFLAG see if already sleeping 09271 FE029273 808 JEQ TRYSOMINEX jump if not, bad deal if so 09272 001A1213 809 HALT HALTZ1213 system was sleeping and another sleep request came in 810 * --- 811 00009273 812 TRYSOMINEX LABEL 09273 D0001D0D 813 INC ALLINHIBIT allow no more terminal logging 09274 60001F02 0 814 LD R0 TERMCOUNT get the count of active terminals 09275 FA22928D 0 815 DRJ R0 OTHERSHERE jump if some one besides me is on 816 * \ / 817 818 * Check for other non-system processes 09276 DC0030AA 819 CALL SRCHLIST get access to process list 09277 40001EB2 820 PARL PCNTLLOCK 09278 60001EB1 0 821 LD R0 PCONTROL 09279 60C40000 3 IMM 822 LD R3 0 count of non-system processes 0000927A 823 CHECKPROC LABEL 0927A 5C081813 0 ZBM 824 CMZ R0,PCSYSPROC is this a system process 0927B FE0C927D 825 JNE ITSSYSTEM jump if so 0927C 18C40001 3 IMM 826 ADD R3 1 count the non-system 0000927D 827 ITSSYSTEM LABEL 0927D 60081F14 0 0 ZBM 828 LD R0 R0,PCNXTCB get ptr to the next PCB in PCB list 0927E FA32927A 0 829 JNZA R0 CHECKPROC scan entire list of PCBs 0927F DC0030B7 830 CALL UNSRCHLIST undo access to list 09280 40001EB2 831 PARL PCNTLLOCK 09281 FAE2928D 3 832 DRJ R3 OTHERSHERE jump if others than myself 833 * \ / 834 835 * Check if freeing in progress on some volume 09282 5C001D7B 836 CMZ FFLIST is freeing in progress 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2060 (XRQOPREQ1) F 130 OPREQ - system sleep request 09283 FE0C928A 837 JNE FREEING jump if freefile process busy 09284 60000412 0 838 LD R0 CPPSA get session descriptor 09285 E4001D0C 0 839 ST R0 SLEEPFLAG the system is going down 09286 6084107D 2 IMM 840 LD R2 UINTOPRQ+CMERR send error to CM 09287 60C40001 3 IMM 841 LD R3 UINTOPRQL subcode sez "logoff" 09288 DC403589 842 CALLNP UERRSET log the requester off 09289 FE0E59D6 843 JMP NOERROR the system will end when they're gone 844 * --- 845 846 * Freeing in progress 0000928A 847 FREEING LABEL 0928A D0401D0D 848 DEC ALLINHIBIT remove this inhibition 0928B 600400A8 0 IMM 849 LD R0 XREQERFIP error 'freeing in progress' 0928C FE0E5988 850 JMP UERROR 851 * --- 852 853 * Other ports logged in 0000928D 854 OTHERSHERE LABEL 0928D D0401D0D 855 DEC ALLINHIBIT remove this inhibition 0928E FE0E59EA 856 JMP UERRORSIU give 'system/resource in use' error 857 * --- 858 859 END OPREQSLEEP routine 198 INPUT OPRSESSSTRT user session creation 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2061 (OPRSESSSTRT) F 131 OPREQ - Create a user session 3 4 ********************************************************************************** 5 * * 6 * This file contains the routines to create user sessions in various * 7 * fashions. They are: * 8 * * 9 * FREQCONCP - Create concurrent session * 10 * OPRSTRTBAT - Start spooled batch job * 11 * OPRSTRTERM - Start Terminal (Remote Port Startup) * 12 * OPRSTRTJOB - Start spoolerless batch job * 13 * OPRSTRTSPR - Start the Spooler itself * 14 * * 15 ********************************************************************************** 16 17 BLOCK Create user session 18 ENTRY CHKGIVCMU check a unit to see if it can be given 19 ENTRY GULOCKHW lock hardware control block for giving a unit 20 ENTRY GUUNLOCKHW unlock hardware control block from giving a unit 21 ENTRY OPREQJOB OPREQ entry 22 ENTRY FREQCONCP Create concurrent session 23 ENTRY LOGONPROC Log on a session 24 ENTRY FLUSHCONCP kill all concurrent sessions releted to caller 25 ENTRY MAKEBATCH start batch jobs w/o password 26 ENTRY STARTSPLR subroutine to invoke Spooler 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2062 (OPRSESSSTRT) F 131 OPREQ - Create a user session 28 29 ********************************************************************************** 30 * * 31 * OPREQJOB - OPREQ entry point * 32 * * 33 * Sort out the various entries. * 34 * * 35 * R3 = OPREQ operand * 36 * R4 => Caller's console area * 37 * R2 = job operation code * 38 * JMP OPREQJOB * 39 * * 40 * Exits to appropriate processor with R3 & R4 unchanged. * 41 * * 42 * Stack required = 26 * 43 * 0 + max ( OPRSTRTBAT (26), OPRSTRTERM (26), OPRSTRTJOB (13), * 44 * OPRSTRTSPR (19) ) * 45 * * 46 ********************************************************************************** 47 48 BLOCK OPREQJOB routine 49 ENTRY OPREQJOB 50 0000928F 51 OPREQJOB LABEL 0928F 68840004 2 IMM 52 UCPR R2 JUMPTABMAX is sub-op reasonable? 09290 FE0659D8 53 JGE UERRORILR error if not 09291 5CA49292 2 54 LDPC JUMPTAB(R2) go to appropriate routine 55 * --- 56 00009292 57 JUMPTAB LABEL 09292 00009296 58 ADR OPRSTRTBAT start spooled batch job 09293 00009385 59 ADR OPRSTRTERM start terminal (remote port startup) 09294 0000941E 60 ADR OPRSTRTJOB start unspooled batch job 09295 000094C3 61 ADR OPRSTRTSPR start the system Spooler 00000004 ABS 62 JUMPTABMAX EQU DISPW JUMPTAB 63 64 END OPREQJOB routine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2063 (OPRSESSSTRT) F 131 OPREQ - Create a user session 66 67 ********************************************************************************** 68 * * 69 * OPERSTRTBAT - Start a Spooled batch job * 70 * * 71 * R3 = unit number of input file * 72 * R4,CAR1 = length of output file name * 73 * R4,CAR2 = address of output file name * 74 * R4,CAR3 = address of logon info * 75 * JMP OPRSTRTBAT * 76 * * 77 * Exits via XREQRETURN with * 78 * caller's R0 = new session number or error code. * 79 * caller's R1 = PSN of new session's Control Mode * 80 * * 81 * The logon information has a password field. We expect * 82 * to find a strangely mangled password there. At the point * 83 * that a spooled batch job is created, the system calculates * 84 * * 85 * PwMangle (PwMangle (FileSerialNumber, LastWriteDate), UDPASSWORD) * 86 * * 87 * and sends this to the spooler. * 88 * * 89 * [ UDPASSWORD is PwMangle (AccountName, ActualPassword) ] * 90 * * 91 * Since 'PwMangle' is a non-reversible function, giving this * 92 * to the spooler does not give away the user's password. * 93 * When the spooler tries to start the batch job, we again * 94 * calculate the above function and compare it to what the * 95 * spooler gave us. If it agrees, then we know that the * 96 * spooler has given us back the same file that was submitted * 97 * as the batch job, and that the file has not been modified * 98 * since it was submitted. (Alternatively, if you know the * 99 * user's password, you could do all of the mangling yourself * 100 * and supply the right value, thus forging a batch job. * 101 * However, if you know the password, you don't need to forge * 102 * the batch job -- you can just log onto the account.) * 103 * * 104 * Stack required = 26 * 105 * 8 + max ( ACCOUNT (2), ACCTPSA (2), ACCTQUE (3), * 106 * BLDPROCESS (2), CHARTOP12 (3), CHKGIVUNIT (1), * 107 * CLRMEMTRAP (1), DMOTEWNDOx (7), FREEDIR (5), * 108 * FREEULB (11), GIVEUNIT (13), GRUBWNDOx (7), * 109 * LOGONPROC (19), LUNSEARCH (2), MAPINMEM (3), * 110 * MAPOUTMEM (1), PWMANGLE (3), SETINITRUN (1), * 111 * SETMEMTRAP (1), SETRUNNING (2), SFREEMEM (0), * 112 * SGETMEM (0), SRCHDIRSN (11), USEULB (4), * 113 * ZEROIT (1) ) * 114 * * 115 ********************************************************************************** 116 117 BLOCK OPRSTRTBAT routine 118 ENTRY OPRSTRTBAT 119 120 00009296 121 TEMP BASE R0 temp storage area 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2064 (OPRSESSSTRT) F 131 OPREQ - Create a user session 122 123 * following is the logon buffer info 124 00160800 0 BASE 125 LOGONBUF LABEL 00160000 0 CACH 126 LOGONACCT BSSC 20 logon account name 00160805 0 BASE 127 MANGLEDPW BSS 2 mangled password 0016001C 0 CACH 128 ALIASACCT BSSC 36 alias account name 00160040 0 CACH 129 SITENAME BSSC 12 site name 0000004C ABS 130 LOGONBUFLEN EQU DISPC LOGONBUF end of logon buffer 131 132 * following is a message buffer, to send a message containing the output 133 * file name to the new session. 134 00160813 0 BASE 135 MSGBUF BSS (MSGSTEXT DISPW MSGPROC) message header 00160815 0 BASE 136 MSGTEXT BSS 64 text of message 00000100 ABS 137 MSGMAXTEXT EQU (DISPC MSGTEXT) 138 00160855 0 BASE 139 MYEQT BSS (2 POWER EQTEMPLOG) my own EQT 140 141 DRCT 00000007 ABS 142 TEMPLOG EQU (DISPW TEMP) LOG 2 log size of this block 143 ORG TEMP 144 145 BEGFRAME2 00178800 6 BASE 146 FCBPTR BSS 1 pointer to input file FCB 00178801 6 BASE 147 NAMELEN BSS 1 length of output file name 00178802 6 BASE 148 TEMPPTR BSS 1 address of temp block 00178803 6 BASE 149 WRITEDATE BSS 1 last write date of input file 00178804 6 BASE 150 PSAPTR BSS 1 pointer to PSA of new session 00178805 6 BASE 151 PROCNUM BSS 2 session number of new session 00178806 6 BASE 152 PROCPSN EQU PROCNUM(1) PSN of new session's CM 153 ENDFRAME 154 00009296 155 OPRSTRTBAT LABEL 09296 EC1F8007 6 STAK 156 STZ PUSH allocate stack frame 157 158 * verify that the file is useable 09297 DC405B39 159 CALLNP LUNSEARCH find FCB 09298 FB7059B8 5 160 JZA FCB FERRORLNE3 jump if not opened 09299 DC40954B 161 CALLNP CHKGIVUNIT can this FCB be given away? 0929A FA0C5983 0 162 JNEZ R0 FERROR jump if not 0929B E5578800 5 6 BASE 163 ST FCB SP,FCBPTR save FCB pointer 164 165 * copy params to our area 0929C 60570803 1 4 BASE 166 LD R1 R4,CAR1 0929D 68440100 1 IMM 167 UCPR R1 MSGMAXTEXT 0929E FE0459DA 168 JGT UERRORPOB 0929F E4578801 1 6 BASE 169 ST R1 SP,NAMELEN 092A0 DC002ED0 170 CALL UGETMEM get a temp block 092A1 40440007 IMM 171 PARVL TEMPLOG log size of block 092A2 61520000 5 0 REG 172 LD R5 R0 R5 -> temp block 092A3 DC003090 173 CALL ZEROIT clean it out 092A4 41174800 5 BASE 174 PAR R5,0 092A5 40440080 IMM 175 PARVL 2 POWER TEMPLOG 092A6 E5578802 5 6 BASE 176 ST R5 SP,TEMPPTR 177 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2065 (OPRSESSSTRT) F 131 OPREQ - Create a user session 092A7 DC005BCF 178 CALL SETMEMTRAP trap bad memory 092A8 4000937B 179 PARL USERMEMBAD 180 092A9 60170805 0 4 BASE 181 LD R0 R4,CAR3 R0 -> user's logon buffer 092AA 6044004C 1 IMM 182 LD R1 LOGONBUFLEN R1 = length 092AB 38974000 2 5 CACH 183 LEA R2 R5,LOGONACCT R2 => where to put it 092AC 60C40040 3 IMM 184 LD R3 MSRFRELOC 092AD 28D70801 3 4 BASE 185 BSUB R3 R4,CAMSR R3 = bit to clear in MSR 092AE 5992C000 3 REG 186 CLBMSR R3 adjust relocation 092AF FE400000 187 CMOVE copy logon buffer 092B0 59C40040 IMM 188 IORMSR MSRFRELOC fix up relocation 092B1 60170804 0 4 BASE 189 LD R0 R4,CAR2 R0 -> output file name 092B2 60578801 1 6 BASE 190 LD R1 SP,NAMELEN R1 = length 092B3 38974815 2 5 BASE 191 LEA R2 R5,MSGTEXT R2 -> where to put it 092B4 5992C000 3 REG 192 CLBMSR R3 adjust relocation 092B5 FE400000 193 CMOVE copy the name 092B6 59C40040 IMM 194 IORMSR MSRFRELOC fix relocation 195 092B7 DC405BD4 196 CALLNP CLRMEMTRAP clear the memory trap 197 198 * pack up the logon info 092B8 60040101 0 IMM 199 LD R0 URPACKFI pack a file spec item 092B9 38574000 1 5 CACH 200 LEA R1 R5,LOGONACCT R1 -> char string 092BA 3897485B 2 5 BASE 201 LEA R2 R5,MYEQT/EQACCT R1 -> where to put it 092BB 09040000 IMM 202 UREQ 0 PACK IT UP 092BC E413C000 0 7 REG 203 ST R0 R7 save error code 092BD FA089372 0 204 JLTZ R0 FREETEMP jump if error 092BE 62174805 015 BASE 205 LD2 R0 R5,MANGLEDPW get mangled password 092BF E617485E 015 BASE 206 ST2 R0 R5,MYEQT/EQACCTPW save it 207 208 * get last write date of file for password mangling 092C0 61578800 5 6 BASE 209 LD R5 SP,FCBPTR R5 -> the FCB 092C1 61C4008C 7 IMM 210 LD R7 XREQERLNS error: unit not saved 092C2 DC0082BB 211 CALL SRCHDIRSN find the directory entry 092C3 40009372 212 PARL FREETEMP where to go if error 092C4 FE0C9377 213 JNE RELSEDIR jump if not found 092C5 6016C807 0 3 BASE 214 LD R0 R3,FDLCD get last change date 092C6 E4178803 0 6 BASE 215 ST R0 SP,WRITEDATE save it 092C7 DC405685 216 CALLNP FREEDIR free the directory 092C8 DC40315C 217 CALLNP DMOTEWNDO1 release the page 092C9 DC40315F 218 CALLNP DMOTEWNDO2 both of them 219 220 * create the session 092CA 0CC00000 221 IOFF disallow any interrupts 092CB DC0035D2 222 CALL BLDPROCESS create the new session 092CC 4144F000 IMM 223 PARV USERMSR user state 092CD 43440000 IMM 224 PARV2 0 no prog name 092CE 41440000 IMM 225 PARV 0 initial PC 092CF 40440000 IMM 226 PARVL 0 user session 092D0 E4D78804 3 6 BASE 227 ST R3 SP,PSAPTR save pointer to PSA 092D1 6008DF15 0 3 ZBM 228 LD R0 R3,PSPROCLIST get CM UPC 092D2 60081371 0 0 ZBM 229 LD R0 R0,UPCSERNM get CM's PSN 092D3 E4178806 0 6 BASE 230 ST R0 SP,PROCPSN save for later 231 092D4 DC0025EB 232 CALL MAPINMEM remap the original caller 092D5 40400412 233 PARVL CPPSA should be a valid pointer to his PSA 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2066 (OPRSESSSTRT) F 131 OPREQ - Create a user session 092D6 0C800000 234 ION restore interrupts 092D7 60000412 0 235 LD R0 CPPSA current session 092D8 60081F11 0 0 ZBM 236 LD R0 R0,PSCACHNP1 caller's CA 092D9 5C083611 0 ZBM 237 CMZ R0,CAMSR/MSRIRELOCB was caller the system? 092DA ED891A13 4 ZBM 238 STLNE R4,PCSPECPROC save answer as "special session" bit 092DB 600900C3 0 4 ZBM 239 LD R0 R4,PCPROCNUM get session number of new session 092DC E4178805 0 6 BASE 240 ST R0 SP,PROCNUM save it on the stack 241 242 * set the site name 092DD 61578802 5 6 BASE 243 LD R5 SP,TEMPPTR R5 -> my temp block 092DE DC00588C 244 CALL CHARTOP12 pack the site name 092DF 40174040 5 CACH 245 PARL R5,SITENAME 092E0 E6570805 124 BASE 246 ST2 R1 R4,PCBSITE save name in the PCB 247 248 * logon the session 092E1 61578800 5 6 BASE 249 LD FCB SP,FCBPTR R5 -> the FCB to give 092E2 60978803 2 6 BASE 250 LD R2 SP,WRITEDATE R2 = last write date 092E3 60C40000 3 IMM 251 LD R3 0 R3 = low bits 092E4 DC005872 252 CALL PWMANGLE mangle FSN & LCD 092E5 43574809 5 BASE 253 PARV2 FCB,FCSERIAL param = serial number 092E6 42548000 23 PAIR 254 PARV2L PAIR R2 password = (LCD,0) 092E7 61578802 5 6 BASE 255 LD R5 SP,TEMPPTR R5 -> my temp block 092E8 39574855 5 5 BASE 256 LEA EQT R5,MYEQT EQT => my EQT 092E9 60D78804 3 6 BASE 257 LD R3 SP,PSAPTR 092EA DC009612 258 CALL LOGONPROC log this guy on 092EB 43540000 01 PAIR 259 PARV2 PAIR R0 password mangling param 092EC 4052C000 3 REG 260 PARVL R3 PSA pointer 092ED FA0292FB 0 261 JEQZ R0 LOGONOK jump if logon is OK 092EE E413C000 0 7 REG 262 ST R0 R7 save error code 263 092EF DC00505F 264 CALL ACCOUNT log failed logon 092F0 41440003 IMM 265 PARV APTPWW failed logon 092F1 4144001C IMM 266 PARV AFRSHORT size of record 092F2 4047FFFF IMM 267 PARVL -1 log everywhere 092F3 60800412 2 268 LD R2 CPPSA R2 -> current PSA 092F4 DC405C0D 269 CALLNP ACCTPSA fill in PSA info 092F5 62174806 015 BASE 270 LD2 R0 EQT,EQACCT account 092F6 E616C803 013 BASE 271 ST2 R0 R3,APRECORD/AFRACCT put in accounting record 092F7 60174808 0 5 BASE 272 LD R0 EQT,EQACCTPROJ project 092F8 E416C805 0 3 BASE 273 ST R0 R3,APRECORD/AFRPROJ put in accounting record 092F9 DC405025 274 CALLNP ACCTQUE send the record to the queue 092FA FE0E936A 275 JMP KILLPROC 276 * --- 277 278 * create name for alias directory, overwriting logon info 000092FB 279 LOGONOK LABEL 092FB 61578802 5 6 BASE 280 LD R5 SP,TEMPPTR R5 -> my temp area 092FC 60840020 2 IMM 281 LD R2 " " for CSRCH 092FD 60440024 1 IMM 282 LD R1 36 length of alias name 092FE 3817401C 0 5 CACH 283 LEA R0 R5,ALIASACCT R0 -> alias name 092FF FE560000 284 CSRCH find blank at end of name 09300 30440024 1 IMM 285 RSB R1 36 R1 = length of name 09301 38974800 2 5 BASE 286 LEA R2 R5,0 where to move name to 09302 3817401C 0 5 CACH 287 LEA R0 R5,ALIASACCT where to move name from 09303 FE400000 288 CMOVE copy name 09304 60049382 0 IMM 289 LD R0 ADR DIRSUFFIX R0 -> suffix 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2067 (OPRSESSSTRT) F 131 OPREQ - Create a user session 09305 60440006 1 IMM 290 LD R1 DIRSUFFIXL R1 = length 09306 FE400000 291 CMOVE append the suffix 09307 608A9F30 2 2 CBM 292 LD R2 R2/FLDCHARS 09308 108B5F30 2 5 CBM 293 SUB R2 R5/FLDCHARS R2 = length of name 294 295 * Open alias directory 09309 60040122 0 IMM 296 LD R0 URFREELUN get a free unit 0930A 090400C8 IMM 297 UREQ LUNCMLOW-1 start at top of globals 0930B E413C000 0 7 REG 298 ST R0 R7 save the error code 0930C FA089359 0 299 JLTZ R0 UNDOLOGON jump if error 0930D 60D24000 3 1 REG 300 LD R3 R1 R3 = unit number 0930E 60528000 1 2 REG 301 LD R1 R2 R1 = name length 0930F 38974800 2 5 BASE 302 LEA R2 R5,0 R2 -> name 09310 61178804 4 6 BASE 303 LD R4 SP,PSAPTR R4 -> new PSA 09311 61091F13 4 4 ZBM 304 LD ULB R4,PSUSERLIMP ULB -> his account 09312 61400414 5 305 LD R5 CPCUPC R5 -> my UPC 09313 E1095F13 4 5 ZBM 306 EXCH ULB R5,UPCPRIVULB use his privileges 09314 60040261 0 IMM 307 LD R0 FRNOPENR open for read 09315 0892C000 3 REG 308 FREQ R3 open the DIR 09316 E1095F13 4 5 ZBM 309 EXCH ULB R5,UPCPRIVULB restore my privileges 09317 E413C000 0 7 REG 310 ST R0 R7 save the error 09318 FA089359 0 311 JLTZ R0 UNDOLOGON jump if error 312 313 * Set the new session's alias 09319 DC405B39 314 CALLNP LUNSEARCH find FCB for this file 0931A 60094E45 0 5 ZBM 315 LD R0 FCB,FCPRIV set privileges over file 0931B 6404000F 0 IMM 316 CPR R0 FSPRIVNOT is it any access? 0931C FE0C932F 317 JNE ALIASOK jump if alias is allowed 318 * \ / 0931D DC00505F 319 CALL ACCOUNT log the failed alias 0931E 41440005 IMM 320 PARV APTALIER failed alias 0931F 4144001C IMM 321 PARV AFRSHORT size of record 09320 4047FFFF IMM 322 PARVL -1 log everywhere 323 * \ / 09321 60800412 2 324 LD R2 CPPSA R2 -> current PSA 09322 DC405C0D 325 CALLNP ACCTPSA fill in PSA info 09323 60895114 2 5 ZBM 326 LD R2 FCB,FCLIMITPTR get pointer to file owner 09324 FAB09328 2 327 JZA R2 BJNOULB jump if fake DIR 09325 62168802 012 BASE 328 LD2 R0 R2,ULACCNM account name 09326 60968804 2 2 BASE 329 LD R2 R2,ULACCPROJ project name 09327 FE0E932A 330 JMP BJSHARE put into accounting record 331 * --- 332 00009328 333 BJNOULB LABEL 09328 62174807 015 BASE 334 LD2 R0 FCB,FCANAME get account name 09329 6097480D 2 5 BASE 335 LD R2 FCB,FCAPROJ get project name 336 * \ / 337 0000932A 338 BJSHARE LABEL 0932A E616C803 013 BASE 339 ST2 R0 R3,APRECORD/AFRACCT account 0932B E496C805 2 3 BASE 340 ST R2 R3,APRECORD/AFRPROJ project 0932C DC405025 341 CALLNP ACCTQUE send the record to the queue 0932D 61C40094 7 IMM 342 LD R7 XREQERPNS error: privilege is not sufficient 0932E FE0E9357 343 JMP UNDOOPEN and go take error 344 * --- 345 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2068 (OPRSESSSTRT) F 131 OPREQ - Create a user session 0000932F 346 ALIASOK LABEL 0932F 61095114 4 5 ZBM 347 LD ULB FCB,FCLIMITPTR ULB => alias account 09330 DC405569 348 CALLNP USEULB one more pointer to it 09331 60978804 2 6 BASE 349 LD R2 SP,PSAPTR R5 => new session PSA 09332 E1089F14 4 2 ZBM 350 EXCH ULB R2,PSDFLTDIR set alias account 09333 60094E45 0 5 ZBM 351 LD R0 FCB,FCPRIV 09334 E4088044 0 2 ZBM 352 ST R0 R2,PSDDIRPRIV 09335 DC405526 353 CALLNP FREEULB one fewer pointer to old one 354 355 * close the alias directory 09336 60040060 0 IMM 356 LD R0 FRUNEQUIP 09337 0892C000 3 REG 357 FREQ R3 358 * \ / 359 360 * give the session his input unit 09338 61578800 5 6 BASE 361 LD FCB SP,FCBPTR FCB => his input file 09339 60578804 1 6 BASE 362 LD R1 SP,PSAPTR R1 => his PSA 0933A DC009562 363 CALL GIVEUNIT move the FCB to him 0933B 414400C9 IMM 364 PARV LUNAIN new unit number 0933C 40524000 1 REG 365 PARVL R1 PSA pointer 366 * \ / 367 368 * Enable new session to receive messages 0933D 60D78804 3 6 BASE 369 LD R3 SP,PSAPTR restore R3 with the PSA pointer 0933E 60030000 0 IMM 370 LD R0 1*BIT 0 message class mask (class 0 only) 0933F E416C818 0 3 BASE 371 ST R0 R3,PSMSGALLOW save it in his PSA 372 * \ / 373 374 * Set the session running 09340 DC003640 375 CALL SETINITRUN set up initial entry 09341 40409384 376 PARVL CMENTCODE control-mode entry code 09342 6108DF12 4 3 ZBM 377 LD R4 R3,PSPROCCB R4 -> his PCB 09343 DC402B99 378 CALLNP SETRUNNING set him going 379 * \ / 380 381 * Send a message containing the output file name 09344 61578802 5 6 BASE 382 LD R5 SP,TEMPPTR R5 -> my temp block 09345 38974813 2 5 BASE 383 LEA R2 R5,MSGBUF R2 -> message buffer 09346 60178805 0 6 BASE 384 LD R0 SP,PROCNUM R0 = his session number 09347 E4088100 0 2 ZBM 385 ST R0 R2,MSGPROC save in message block 09348 60028000 0 IMM 386 LD R0 1*MSGPRIVOS 09349 E4168801 0 2 BASE 387 ST R0 R2,MSGPRIVS set privilege field 0934A 60578801 1 6 BASE 388 LD R1 SP,NAMELEN get length of name 0934B 18440008 1 IMM 389 ADD R1 (MSGTEXT DISPC MSGBUF) add in header length 0934C 60040160 0 IMM 390 LD R0 URSENDMSG 0934D 09040000 IMM 391 UREQ 0 send the message 392 * \ / 393 394 * Free the temp block and return successfully 0934E 61578802 5 6 BASE 395 LD R5 SP,TEMPPTR R5 -> temp block 0934F DC002F5D 396 CALL UFREEMEM free it up 09350 41440007 IMM 397 PARV TEMPLOG 09351 40534000 5 REG 398 PARVL R5 09352 62178805 016 BASE 399 LD2 R0 SP,PROCNUM get the session number and PSN 09353 60800412 2 400 LD R2 CPPSA caller's PSA 09354 60889F11 2 2 ZBM 401 LD R2 R2,PSCACHNP1 caller's console area 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2069 (OPRSESSSTRT) F 131 OPREQ - Create a user session 09355 E6168802 012 BASE 402 ST2 R0 R2,CAR0 give him the return values 09356 FE0E38CF 403 JMP XREQRETURN and all done 404 * --- 405 406 * Error exits - R7 <= error code 407 00009357 408 UNDOOPEN LABEL R3 = unit number 09357 60040060 0 IMM 409 LD R0 FRUNEQUIP close the file we opened 09358 0892C000 3 REG 410 FREQ R3 411 * \ / 412 00009359 413 UNDOLOGON LABEL 09359 61578804 5 6 BASE 414 LD R5 SP,PSAPTR R5 -> new PSA 0935A 61001EAE 4 415 LD ULB SYSTEMULB 0935B E1095F13 4 5 ZBM 416 EXCH ULB R5,PSUSERLIMP 0935C DC405526 417 CALLNP FREEULB undo the logon account 0935D 61001EAE 4 418 LD ULB SYSTEMULB 0935E E1095F14 4 5 ZBM 419 EXCH ULB R5,PSDFLTDIR 0935F DC405526 420 CALLNP FREEULB undo the alias account 09360 61001EAE 4 421 LD ULB SYSTEMULB 09361 DC4025FC 422 CALLNP MAPOUTMEM reset page file contents 09362 DC0025EB 423 CALL MAPINMEM map in this guys memory 09363 40534000 5 REG 424 PARVL R5 his PSA pointer 09364 61494116 5 5 ZBM 425 LD R5 R5,PSCURRPROC get current UPC pointer 09365 E1095F13 4 5 ZBM 426 EXCH ULB R5,UPCPRIVULB 09366 DC0025EB 427 CALL MAPINMEM restore original callers memory 09367 40400412 428 PARVL CPPSA pointer to original callers PSA 09368 DC405526 429 CALLNP FREEULB undo the privilege account 09369 D0401F02 430 DEC TERMCOUNT and decrease count of logged on users 431 * \ / 432 0000936A 433 KILLPROC LABEL 0936A 61578804 5 6 BASE 434 LD R5 SP,PSAPTR R5 -> new PSA 0936B 61095F10 4 5 ZBM 435 LD R4 R5,PSCACHN R4 -> his console area 0936C 60042DAC 0 IMM 436 LD R0 ADR LIQUIDATE routine to kill session 0936D E4091F10 0 4 ZBM 437 ST R0 R4,CAPC aim him at liquidate 0936E 6004F1F0 0 IMM 438 LD R0 MONMSR all MSR relocation and int bits on 0936F E4170801 0 4 BASE 439 ST R0 R4,CAMSR set him to monitor state 09370 61095F12 4 5 ZBM 440 LD R4 R5,PSPROCCB R4 -> his PCB 09371 DC402B99 441 CALLNP SETRUNNING make him go away 442 * \ / 443 00009372 444 FREETEMP LABEL 09372 61578802 5 6 BASE 445 LD R5 SP,TEMPPTR R5 -> temp block 09373 DC002F5D 446 CALL UFREEMEM free the temp block 09374 41440007 IMM 447 PARV TEMPLOG 09375 40534000 5 REG 448 PARVL R5 09376 FE0E5995 449 JMP UERROR7 and return giving error 450 * --- 451 00009377 452 RELSEDIR LABEL 09377 DC403150 453 CALLNP GRUBWNDO1 grub window 1 09378 DC403153 454 CALLNP GRUBWNDO2 grub window 2 09379 DC405685 455 CALLNP FREEDIR release dir 0937A FE0E9372 456 JMP FREETEMP release temporary storage 457 * --- 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2070 (OPRSESSSTRT) F 131 OPREQ - Create a user session 458 0000937B 459 USERMEMBAD LABEL memory flaked out 0937B 62940000 2301 PAIR 460 LD2 R2 PAIR R0 save error code 0937C 61578802 5 6 BASE 461 LD R5 SP,TEMPPTR R5 -> temp block 0937D DC002F5D 462 CALL UFREEMEM free it up 0937E 41440007 IMM 463 PARV TEMPLOG 0937F 40534000 5 REG 464 PARVL R5 09380 62148000 0123 PAIR 465 LD2 R0 PAIR R2 restore error codes 09381 FE0E5B5F 466 JMP PASSERRUP pass error up 467 * --- 468 09382 3A3C4449 469 DIRSUFFIX TEXT ":" suffix for alias name 00000006 ABS 470 DIRSUFFIXL EQU 6 length of above 471 09384 40000003 472 CMENTCODE VFD 0*CMSKAPPL+1*CMBATCHJOB+0*CMERRIDS+CMLOGI*CMENTRYCD 473 474 END OPRSTRTBAT routine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2071 (OPRSESSSTRT) F 131 OPREQ - Create a user session 476 477 ********************************************************************************** 478 * * 479 * OPRSTRTERM - Remote Port Startup * 480 * * 481 * R3 = terminal input unit number * 482 * R4 => caller's CA * 483 * R4,CAR3 = terminal output unit number * 484 * R4,CAR2 = address of logon string - "account (password)" * 485 * R4,CAR1 = length of logon string * 486 * JMP OPRSTRTERM * 487 * * 488 * Exits via XREQRETURN with R0 = new session number or error code. * 489 * * 490 * Stack required = 26 * 491 * 7 + max ( ACCOUNT (2), ACCTPSA (2), ACCTQUE (3), * 492 * BLDPROCESS (2), CHKGIVUNIT (1), CLRMEMTRAP (1), * 493 * CREATEUCE (2), GIVEUNIT (13), LINKUCEIN (3), * 494 * LOGONPROC (19), LUNSEARCH (2), MAPINMEM (3), * 495 * MAPOUTMEM (1), SETINITRUN (1), SETMEMTRAP (1), * 496 * SETRUNNING (2), SFREEMEM (0), SGETMEM (0), * 497 * ZEROIT (1) ) * 498 * * 499 ********************************************************************************** 500 501 BLOCK OPRSTRTERM routine 502 ENTRY OPRSTRTERM 503 504 BEGFRAME2 00178800 6 BASE 505 INFCB BSS 1 ptr to input FCB 00178801 6 BASE 506 OUTFCB BSS 1 ptr to output FCB 00178802 6 BASE 507 EQTPTR BSS 1 ptr to my temp EQT 00178803 6 BASE 508 INUNIT BSS 1 temp for unit number 00178804 6 BASE 509 NEWFCB BSS 1 new FCB created for absolute input 00178805 6 BASE 510 ERRCODES BSS 2 error codes 00178805 6 BASE 511 ENTRYCODE EQU ERRCODES(0) entry code actually given to CM 00178806 6 BASE 512 PSAPTR EQU ERRCODES(1) ptr to PSA of new session 513 ENDFRAME 514 0013C000 7 REG 515 VAR EQU R7 00009385 516 ACCTPROTO BASE VAR 00000010 ABS 517 ACCTNMLEN EQU 16 max length of name 0017C800 7 BASE 518 ACCTNAME BSS ACCTNMLEN room for account name 519 DRCT 520 ORG ACCTPROTO 521 00009385 522 OPRSTRTERM LABEL 09385 EC1F8007 6 STAK 523 STZ PUSH allocate stack 09386 E4D78803 3 6 BASE 524 ST R3 SP,INUNIT save input unit number 09387 DC405B39 525 CALLNP LUNSEARCH find input FCB 09388 FB7059B8 5 526 JZA FCB FERRORLNE3 jump if not opened 09389 E5578800 5 6 BASE 527 ST FCB SP,INFCB save pointer to it 0938A 60D70805 3 4 BASE 528 LD R3 R4,CAR3 R3 = output unit number 0938B DC405B39 529 CALLNP LUNSEARCH find its FCB 0938C FB7059B8 5 530 JZA FCB FERRORLNE3 jump if not opened 0938D E5578801 5 6 BASE 531 ST FCB SP,OUTFCB save it 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2072 (OPRSESSSTRT) F 131 OPREQ - Create a user session 0938E DC40954B 532 CALLNP CHKGIVUNIT can output FCB be given away? 0938F FA0C5983 0 533 JNEZ R0 FERROR jump if not 09390 61578800 5 6 BASE 534 LD FCB SP,INFCB 09391 60D78803 3 6 BASE 535 LD R3 SP,INUNIT get input unit number 09392 DC40954B 536 CALLNP CHKGIVUNIT can input FCB be given away? 09393 FA0C5983 0 537 JNEZ R0 FERROR jump if not 538 * \ / 539 09394 DC002ED0 540 CALL UGETMEM get buffer for logon string 09395 40440004 IMM 541 PARVL ACCTNMLEN LOG 2 log of the buffer size 09396 E413C000 0 7 REG 542 ST R0 VAR put pointer in appropriate register 09397 DC005BCF 543 CALL SETMEMTRAP trap memory errors 09398 40009416 544 PARL BADUSERMEM and pass them up 09399 60170804 0 4 BASE 545 LD R0 R4,CAR2 R0 = where to move from 0939A 60570803 1 4 BASE 546 LD R1 R4,CAR1 R1 = how much to move 0939B 5044003C 1 IMM 547 MIN R1 (ACCTNMLEN-1)*CPW don't overflow buffer 0939C 3897C800 2 7 BASE 548 LEA R2 VAR,ACCTNAME R2 = where to move to 0939D 60C40040 3 IMM 549 LD R3 MSRFRELOC 0939E 28D70801 3 4 BASE 550 BSUB R3 R4,CAMSR R3 = bit to clear in MSR 0939F 5992C000 3 REG 551 CLBMSR R3 adjust the MSR 093A0 FE400000 552 CMOVE copy the data 093A1 59C40040 IMM 553 IORMSR MSRFRELOC fix the MSR 093A2 DC405BD4 554 CALLNP CLRMEMTRAP and undo the memory trap 093A3 EC168000 2 CACH 555 STZ CACH R2,0 put NUL at end of string 556 * \ / 557 093A4 DC002ED0 558 CALL UGETMEM get an EQT 093A5 40440004 IMM 559 PARVL EQTEMPLOG 093A6 61520000 5 0 REG 560 LD EQT R0 EQT => my new EQT 093A7 E5578802 5 6 BASE 561 ST EQT SP,EQTPTR save pointer to it 093A8 DC003090 562 CALL ZEROIT clear it out 093A9 41174800 5 BASE 563 PAR EQT,0 093AA 40440004 IMM 564 PARVL EQTEMPLOG 093AB 60040101 0 IMM 565 LD R0 URPACKFI pack a file item 093AC 3857C800 1 7 BASE 566 LEA R1 VAR,ACCTNAME where from 093AD 38974806 2 5 BASE 567 LEA R2 EQT,EQACCT where to 093AE 09040000 IMM 568 UREQ 0 do it 093AF E4178805 0 6 BASE 569 ST R0 SP,ERRCODES(0) save error code 093B0 FA08940C 0 570 JLTZ R0 FREEEQT jump if error 571 * \ / 572 093B1 0CC00000 573 IOFF disallow any interrupts 093B2 DC0035D2 574 CALL BLDPROCESS create a new session 093B3 4144F000 IMM 575 PARV USERMSR MSR value 093B4 43440000 IMM 576 PARV2 0 name 093B5 41440000 IMM 577 PARV 0 initial PC 093B6 40440000 IMM 578 PARVL 0 user session 093B7 E4D78806 3 6 BASE 579 ST R3 SP,PSAPTR save PTR to PSA 093B8 DC4025FC 580 CALLNP MAPOUTMEM reset page file contents 093B9 DC0025EB 581 CALL MAPINMEM map in the callers memory 093BA 40400412 582 PARVL CPPSA pointer to his PSA 093BB 0C800000 583 ION restore interrupts to this CPU 584 * \ / 585 093BC 60D78806 3 6 BASE 586 LD R3 SP,PSAPTR ptr to new PSA 093BD DC009612 587 CALL LOGONPROC log on the session 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2073 (OPRSESSSTRT) F 131 OPREQ - Create a user session 093BE 43440000 IMM 588 PARV2 0 password-mangling param 093BF 4052C000 3 REG 589 PARVL R3 PSA pointer 093C0 FA0293CE 0 590 JEQZ R0 LOGONOK jump if worked 093C1 E4178805 0 6 BASE 591 ST R0 SP,ERRCODES(0) save error code 093C2 DC00505F 592 CALL ACCOUNT log the failed logon 093C3 41440003 IMM 593 PARV APTPWW failed logon 093C4 4144001C IMM 594 PARV AFRSHORT size of record 093C5 4047FFFF IMM 595 PARVL -1 log everywhere 093C6 60800412 2 596 LD R2 CPPSA R2 -> current PSA 093C7 DC405C0D 597 CALLNP ACCTPSA fill in PSA info 093C8 62174806 015 BASE 598 LD2 R0 EQT,EQACCT account name 093C9 E616C803 013 BASE 599 ST2 R0 R3,APRECORD/AFRACCT put in accounting record 093CA 60174808 0 5 BASE 600 LD R0 EQT,EQACCTPROJ project 093CB E416C805 0 3 BASE 601 ST R0 R3,APRECORD/AFRPROJ put in accounting record 093CC DC405025 602 CALLNP ACCTQUE send the record to the queue 093CD FE0E9404 603 JMP KILLPROC go destroy session 604 * --- 605 000093CE 606 LOGONOK LABEL 093CE 61578800 5 6 BASE 607 LD FCB SP,INFCB FCB => input FCB 093CF 61178806 4 6 BASE 608 LD R4 SP,PSAPTR R4 => new PSA 093D0 6040941D 1 609 LD R1 CMENTCODE EC for remote port startup 093D1 60096665 0 5 ZBM 610 LD R0 FCB,FCHTYPE get device type 093D2 64040007 0 IMM 611 CPR R0 HTYPETERM is it a terminal? 093D3 ED8A4210 1 CBM 612 STLNE R1/CMBATCHJOB determine batch status 093D4 E4578805 1 6 BASE 613 ST R1 SP,ENTRYCODE save actual EC 093D5 FE0C93DB 614 JNE NOTTERM jump if not terminal 093D6 60095F16 0 5 ZBM 615 LD R0 FCB,FCDCBPTR get pointer to the TCB 093D7 FA3093DB 0 616 JZA R0 NOTTERM jump if fake terminal 093D8 6216081B 010 BASE 617 LD2 R0 R0,TCSITE get site of this terminal 093D9 60891F12 2 4 ZBM 618 LD R2 R4,PSPROCCB R2 -> new session's PCB 093DA E6168805 012 BASE 619 ST2 R0 R2,PCBSITE save it into new PCB 620 * \ / 621 000093DB 622 NOTTERM LABEL 093DB DC009562 623 CALL GIVEUNIT give this unit away to new session 093DC 414400C9 IMM 624 PARV LUNAIN new unit number 093DD 40530000 4 REG 625 PARVL R4 PSA pointer 093DE E5578804 5 6 BASE 626 ST FCB SP,NEWFCB save away FCB just created 093DF 61178806 4 6 BASE 627 LD R4 SP,PSAPTR restore PSA pointer 093E0 61578801 5 6 BASE 628 LD FCB SP,OUTFCB FCB => output unit FCB 093E1 65578800 5 6 BASE 629 CPR FCB SP,INFCB same as input? 093E2 FE0293E7 630 JEQ SAME jump if so 093E3 DC009562 631 CALL GIVEUNIT hand off this unit too 093E4 414400CA IMM 632 PARV LUNAOUT new unit number 093E5 40530000 4 REG 633 PARVL R4 PSA pointer 093E6 FE0E93F4 634 JMP GIVEN 635 * --- 636 637 ********************************************************************************** 638 * * 639 * Input and output units are the same. The FCB is already on * 640 * the new PSA (put there when the input unit was given), so we * 641 * create a new UCE with the output unit number and the same FCB. * 642 * We don't need to check FCBUSYCNT for overflow because CHKGIVUNIT * 643 * already ensured that there were no equivalences to the unit. * 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2074 (OPRSESSSTRT) F 131 OPREQ - Create a user session 644 * Note that we had to save the original FCB address since virtual * 645 * FCB's may not be passed among different sessions. * 646 * * 647 ********************************************************************************** 648 000093E7 649 SAME LABEL 093E7 DC0025EB 650 CALL MAPINMEM map in the just created session 093E8 40530000 4 REG 651 PARVL R4 pointer to his PSA 093E9 61578804 5 6 BASE 652 LD FCB SP,NEWFCB FCB address created for this session 093EA DC003635 653 CALL CREATEUCE make a new element 093EB 414400CA IMM 654 PARV LUNAOUT absolute output 093EC 40534000 5 REG 655 PARVL FCB and old FCB 093ED D0094080 5 ZBM 656 INC FCB,FCBUSYCNT say one more user of FCB 093EE DC005DB2 657 CALL LINKUCEIN now link in UCE 093EF 41520000 0 REG 658 PARV R0 pass UCE pointer 093F0 41440000 IMM 659 PARV 0 no UPC required 093F1 40530000 4 REG 660 PARVL R4 pass new PSA 093F2 DC0025EB 661 CALL MAPINMEM map back the original caller 093F3 40400412 662 PARVL CPPSA pointer to his PSA 663 * \ / 664 000093F4 665 GIVEN LABEL everything is in place 093F4 60D78806 3 6 BASE 666 LD R3 SP,PSAPTR R3 -> new PSA 093F5 60138000 0 6 REG 667 LD R0 SP copy stack pointer 093F6 DC003640 668 CALL SETINITRUN initialize it to run 093F7 40560805 0 BASE 669 PARVL R0,ENTRYCODE Control Mode entry code 093F8 6108DF12 4 3 ZBM 670 LD R4 R3,PSPROCCB R4 -> new PCB 093F9 DC402B99 671 CALLNP SETRUNNING make him run 093FA 61578802 5 6 BASE 672 LD R5 SP,EQTPTR fetch the address of temp storage 093FB DC002F5D 673 CALL UFREEMEM return space for EQU block 093FC 41440004 IMM 674 PARV EQTEMPLOG 093FD 40534000 5 REG 675 PARVL R5 093FE 6153C000 5 7 REG 676 LD R5 R7 put here for the call 093FF DC002F5D 677 CALL UFREEMEM return space for VAR block 09400 41440004 IMM 678 PARV ACCTNMLEN LOG 2 09401 40534000 5 REG 679 PARVL R5 09402 600900C3 0 4 ZBM 680 LD R0 R4,PCPROCNUM get session number 09403 FE0E5999 681 JMP STOREINR0 and return it to user 682 * --- 683 684 * Error Returns - ( SP,ERRCODES(0) ) is error code 685 00009404 686 KILLPROC LABEL 09404 60D78806 3 6 BASE 687 LD R3 SP,PSAPTR R3 -> new PSA 09405 6108DF10 4 3 ZBM 688 LD R4 R3,PSCACHN R4 -> his console area 09406 60042DAC 0 IMM 689 LD R0 ADR LIQUIDATE routine to kill session 09407 E4091F10 0 4 ZBM 690 ST R0 R4,CAPC point him at LIQUIDATE 09408 6004F1F0 0 IMM 691 LD R0 MONMSR all MSR relocation and int bits on 09409 E4170801 0 4 BASE 692 ST R0 R4,CAMSR make him monitor state 0940A 6108DF12 4 3 ZBM 693 LD R4 R3,PSPROCCB R4 -> his PCB 0940B DC402B99 694 CALLNP SETRUNNING let him kill himself 695 * \ / 696 0000940C 697 FREEEQT LABEL 0940C 61578802 5 6 BASE 698 LD R5 SP,EQTPTR R5 -> my EQT block 0940D DC002F5D 699 CALL UFREEMEM free it 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2075 (OPRSESSSTRT) F 131 OPREQ - Create a user session 0940E 41440004 IMM 700 PARV EQTEMPLOG 0940F 40534000 5 REG 701 PARVL R5 09410 6153C000 5 7 REG 702 LD R5 R7 R5 -> my VAR block 09411 DC002F5D 703 CALL UFREEMEM free it 09412 41440004 IMM 704 PARV ACCTNMLEN LOG 2 09413 40534000 5 REG 705 PARVL R5 09414 60178805 0 6 BASE 706 LD R0 SP,ERRCODES(0) get error code 09415 FE0E5988 707 JMP UERROR and give it to caller 708 * --- 709 00009416 710 BADUSERMEM LABEL 09416 E6178805 016 BASE 711 ST2 R0 SP,ERRCODES save the error codes 09417 6153C000 5 7 REG 712 LD R5 R7 R5 -> my VAR block 09418 DC002F5D 713 CALL UFREEMEM free it 09419 41440004 IMM 714 PARV ACCTNMLEN LOG 2 0941A 40534000 5 REG 715 PARVL R5 0941B 62178805 016 BASE 716 LD2 R0 SP,ERRCODES restore error codes 0941C FE0E5B5F 717 JMP PASSERRUP pass error to over process 718 * --- 719 720 * Entry code to hand CM. CMBATCHJOB field may be altered. 0941D 00000002 721 CMENTCODE VFD 0*CMSKAPPL+0*CMBATCHJOB+0*CMERRIDS+CMLOGIO*CMENTRYCD 722 723 END OPRSTRTERM routine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2076 (OPRSESSSTRT) F 131 OPREQ - Create a user session 725 726 ********************************************************************************** 727 * * 728 * OPRSTRTJOB - Start unspooled batch job * 729 * * 730 * This routine creates a not-logged-on batch job. * 731 * * 732 * R3 = unit number of input file * 733 * JMP OPRSTRTJOB * 734 * * 735 * Exit via XREQRETURN, with R0 = session number or error code. * 736 * * 737 * Stack required = 13 * 738 * 0 + max ( BLDPROCESS (2), BLKLIMCHK (1), CHKGIVUNIT (1), * 739 * GIVEUNIT (13), LOCKLIST (1), LUNSEARCH (2), * 740 * MAPINMEM (3), SETINITRUN (1), SETRUNNING (2), * 741 * UNLOCKLIST (1) ) * 742 * * 743 ********************************************************************************** 744 745 BLOCK OPRSTRTJOB routine 746 ENTRY OPRSTRTJOB 747 0000941E 748 OPRSTRTJOB LABEL 0941E DC405B39 749 CALLNP LUNSEARCH find the FCB 0941F FB7059B8 5 750 JZA FCB FERRORLNE3 jump if not opened 09420 DC40954B 751 CALLNP CHKGIVUNIT can the unit be given away? 09421 FA0C5983 0 752 JNEZ R0 FERROR jump if not 753 * \ / 754 09422 0CC00000 755 IOFF disable interrupts 09423 DC0035D2 756 CALL BLDPROCESS create a new session 09424 4144F000 IMM 757 PARV USERMSR MSR value 09425 43440000 IMM 758 PARV2 0 name 09426 41440000 IMM 759 PARV 0 initial PC 09427 40440000 IMM 760 PARVL 0 user session 09428 DC003096 761 CALL LOCKLIST dissuade changer for the moment 09429 40001EB2 762 PARL PCNTLLOCK 0942A EDC91A13 4 ZBM 763 STW R4,PCSPECPROC mark this as a special session 0942B DC0030A4 764 CALL UNLOCKLIST 0942C 40001EB2 765 PARL PCNTLLOCK 0942D 61D2C000 7 3 REG 766 LD R7 R3 R7 -> new PSA 0942E DC0025EB 767 CALL MAPINMEM map back the original caller 0942F 40400412 768 PARVL CPPSA his PSA pointer 09430 0C800000 769 ION restore interrupts 770 * \ / 771 09431 60D3C000 3 7 REG 772 LD R3 R7 R3 -> new PSA 09432 6108DF13 4 3 ZBM 773 LD ULB R3,PSUSERLIMP ULB for current logon account 09433 DC40364A 774 CALLNP BLKLIMCHK enough space to attempt a logon 09434 FA0C943F 0 775 JNEZ R0 ERRORIDS jump to kill this process if not 09435 DC009562 776 CALL GIVEUNIT give him the file 09436 414400C9 IMM 777 PARV LUNAIN unit number 09437 4052C000 3 REG 778 PARVL R3 PSA pointer 09438 60D3C000 3 7 REG 779 LD R3 R7 R3 -> new PSA 780 * \ / 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2077 (OPRSESSSTRT) F 131 OPREQ - Create a user session 781 09439 DC003640 782 CALL SETINITRUN set initialize entry 0943A 40409448 783 PARVL CMENTCODE entry code for Control Mode 0943B 6108DF12 4 3 ZBM 784 LD R4 R3,PSPROCCB R4 -> new PCB 0943C DC402B99 785 CALLNP SETRUNNING start him going 0943D 600900C3 0 4 ZBM 786 LD R0 R4,PCPROCNUM get session number 0943E FE0E5999 787 JMP STOREINR0 and end successfully 788 * --- 789 790 * R0 = error code, R3 -> PSA of new session 0000943F 791 ERRORIDS LABEL 0943F E413C000 0 7 REG 792 ST R0 R7 save the error code 09440 6088DF10 2 3 ZBM 793 LD R2 R3,PSCACHN pointer to console area 09441 60042DAC 0 IMM 794 LD R0 ADR LIQUIDATE address to commit self destruction 09442 E4089F10 0 2 ZBM 795 ST R0 R2,CAPC set it in the PC 09443 6004F1F0 0 IMM 796 LD R0 MONMSR all MSR relocation and int bits on 09444 E4168801 0 2 BASE 797 ST R0 R2,CAMSR make run in monitor state 09445 6108DF12 4 3 ZBM 798 LD R4 R3,PSPROCCB get pointer to PCB 09446 DC402B99 799 CALLNP SETRUNNING place new session on runnable queue 09447 FE0E5995 800 JMP UERROR7 tell user of the bad news 801 * --- 802 09448 40000001 803 CMENTCODE VFD 0*CMSKAPPL+1*CMBATCHJOB+0*CMERRIDS+CMNLOGI*CMENTRYCD 804 805 END OPRSTRTJOB routine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2078 (OPRSESSSTRT) F 131 OPREQ - Create a user session 807 808 ********************************************************************************** 809 * * 810 * This routine looks up the given file and owner UDIR * 811 * and generates the scrambled password as expected by the * 812 * ORSTRTBAT request. This way the operating system can * 813 * start some batch jobs with no LOGON record to give away * 814 * the account password. * 815 * Call: * 816 * CALL MAKEBATCH * 817 * PARV * 818 * PAR2
* 819 * PARL
* 820 * * 821 * Eats R0:R3 * 822 * Stack required = 18 * 823 * 7 + max ( FREEDIR (5), GRUBWNDOx (7), PWMANGLE (3), * 824 * SFREEMEM (0), SGETMEM (0), SRCHDIRSN (11) ) * 825 * * 826 ********************************************************************************** 827 828 BLOCK routine to submit 'spooled' batch job 829 830 ENTRY MAKEBATCH to build a Boot.Batch job 831 832 BEGFRAME 00178801 6 BASE 833 CBPTR BSS 1 pointer to the control block 00178802 6 BASE 834 TEMP BSS 2 used to hold account password 00178804 6 BASE 835 ADROUT BSS 2 address of output file info (len and string ptr) 00178806 6 BASE 836 INLUN BSS 1 unit number of input file 837 ENDFRAME 838 00009449 839 CBPROTO BASE R5 840 BSSC 20 logon account name 00174805 5 BASE 841 MFILEPW BSS 2 password to convince the spooler 842 BSSC 36 alias account name 843 BSSC 12 site name 844 DRCT 0000004C ABS 845 CBLEN EQU DISPC CBPROTO length of passed block 00000005 ABS 846 CBLOG EQU (DISPW CBPROTO) LOG 2 847 0945C DD1F8007 6 STAK 848 MAKEBATCH ENTR PUSH 0945D C1578806 6 BASE 849 STPV SP,INLUN save unit number 0945E C3178804 6 BASE 850 STP2 SP,ADROUT save info about output file 0945F C0128000 2 REG 851 STPL R2 pick up control block parameter 09460 DC002ED0 852 CALL SGETMEM get a chunck of free storage 09461 40440005 IMM 853 PARVL CBLOG log of the block size 09462 E4178801 0 6 BASE 854 ST R0 SP,CBPTR control block address register 09463 6044004C 1 IMM 855 LD R1 CBLEN get its length 09464 E0128000 0 2 REG 856 EXCH R0 R2 swizzle this two registers 09465 FE400000 857 CMOVE move in the raw data 09466 DC0082BB 858 CALL SRCHDIRSN find the FDE and get the DIR in 09467 40009485 859 PARL DOCLOSE bad news, directory disk error 09468 FE0C948C 860 JNE MBERROR entry not found, fatal 09469 6016C807 0 3 BASE 861 LD R0 R3,FDLCD pick up the files last change date 0946A 60978801 2 6 BASE 862 LD R2 SP,CBPTR get pointer to the control block 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2079 (OPRSESSSTRT) F 131 OPREQ - Create a user session 0946B E4168805 0 2 BASE 863 ST R0 R2,MFILEPW save part of password 0946C EC168806 2 BASE 864 STZ R2,MFILEPW(1) clear right half of password 0946D DC005872 865 CALL PWMANGLE make up the password 0946E 43174809 5 BASE 866 PAR2 FCB,FCSERIAL 0946F 42168805 2 BASE 867 PAR2L R2,MFILEPW 09470 60978801 2 6 BASE 868 LD R2 SP,CBPTR get pointer to the control block 09471 E6168805 012 BASE 869 ST2 R0 R2,MFILEPW 09472 62000803 01 870 LD2 R0 WNDO1/UDPASS get account password (iff small UDIR) 09473 5C090410 4 ZBM 871 CMZ ULB,ULRAFDIR is it a RAF type directory? 09474 FE029476 872 JEQ NOTRAF jump if not 09475 62000C03 01 873 LD2 R0 WNDO2/UDPASS find account password 874 * \ / 875 00009476 876 NOTRAF LABEL 09476 E6178802 016 BASE 877 ST2 R0 SP,TEMP save account password 09477 60D38000 3 6 REG 878 LD R3 SP 09478 DC005872 879 CALL PWMANGLE 09479 43568805 2 BASE 880 PARV2 R2,MFILEPW 0947A 4256C802 3 BASE 881 PARV2L R3,TEMP pass the parameter 0947B 60978801 2 6 BASE 882 LD R2 SP,CBPTR get pointer to the control block 0947C E6168805 012 BASE 883 ST2 R0 R2,MFILEPW 0947D DC405685 884 CALLNP FREEDIR release hold on directory 0947E DC403150 885 CALLNP GRUBWNDO1 release the directory pages 0947F DC403153 886 CALLNP GRUBWNDO2 release the directory pages 887 * \ / 09480 60040180 0 IMM 888 LD R0 ORSTRTBAT get code for request 09481 62578C04 126 FPVR 889 LD2 R1 @(SP,ADROUT) get info about output file 09482 60D78801 3 6 BASE 890 LD R3 SP,CBPTR pick up pointer to funny block 09483 09578806 6 BASE 891 OPREQ SP,INLUN do request, indicating batch input unit 09484 FA069487 0 892 JGEZ R0 NOERRORS jump if okay 893 * \ / 894 00009485 895 DOCLOSE LABEL 09485 60040060 0 IMM 896 LD R0 FRCLOSE get close code 09486 08978806 6 BASE 897 FREQ SP,INLUN and eliminate unit 898 * \ / 899 00009487 900 NOERRORS LABEL 09487 60978801 2 6 BASE 901 LD R2 SP,CBPTR get address to control block 09488 DC002F5D 902 CALL SFREEMEM return block to system 09489 41440005 IMM 903 PARV CBLOG log of the block size 0948A 40528000 2 REG 904 PARVL R2 and its address 0948B 5D1F8007 6 STAK 905 LEAVE POP return to caller 906 * --- 907 0000948C 908 MBERROR LABEL 0948C 0013700E 909 HALT HALTS700E SRCHDIRSN could not find file 910 911 END of Batch job maker 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2080 (OPRSESSSTRT) F 131 OPREQ - Create a user session 913 914 ********************************************************************************** 915 * * 916 * This subroutine starts the system Spooler. * 917 * Call: * 918 * CALLNP STARTSPLR * 919 * R0 = error code | 0 * 920 * * 921 * Eats R0:R3 * 922 * Stack required = 19 * 923 * 1 + max ( LUNSEARCH (2), MAKEBATCH (18) ) * 924 * * 925 ********************************************************************************** 926 927 BLOCK STARTSPLR subroutine 928 929 ENTRY STARTSPLR to start the system Spooler 930 931 BEGFRAME 932 ENDFRAME 933 0948D 00000019 934 SPLRBATCH VFD 25 Name of input file 0948E 0000948F 935 PTR SPLRBTCH1 0948F 53706F6F 936 SPLRBTCH1 TEXT "Spooler.!!!:Spooler.Batch" 937 09496 00000018 938 SBNGOUT VFD 24 Name of log file 09497 00009498 939 PTR SBNGOUTN 09498 53706F6F 940 SBNGOUTN TEXT "Spooler.!!!:Spooler.List" 941 0000949E 942 SBNGBLK LABEL Logon block for MAKEBATCH 0949E 53706F6F 943 ASCII 5,Spooler.!!! 094A4 00000000 944 VFD 0,0 094A5 53706F6F 945 ASCII 9,Spooler.!!!() 094AE 20202020 946 ASCII 3, 947 094B1 DD5F8001 6 STAK 948 STARTSPLR ENTRNP PUSH 094B2 60040122 0 IMM 949 LD R0 URFREELUN get a unit number 094B3 090400C8 IMM 950 UREQ LUNCMLOW-1 in user range 094B4 FA0894C0 0 951 JLTZ R0 DONENOW jump if none available 094B5 60D24000 3 1 REG 952 LD R3 R1 copy to safe/useful register 953 094B6 60040261 0 IMM 954 LD R0 FRNOPENR open input file RO 094B7 6240948D 12 955 LD2 R1 SPLRBATCH pass file spec 094B8 0892C000 3 REG 956 FREQ R3 open SPOOLER.!!!:SPOOLER.BATCH 094B9 FA0894C0 0 957 JLTZ R0 DONENOW jump if batch file unavailable 094BA DC405B39 958 CALLNP LUNSEARCH find the FCB for it 959 960 * R3 = unit number, FCB = control block 094BB DC00945C 961 CALL MAKEBATCH produce 'spooled' batch job 094BC 4152C000 3 REG 962 PARV R3 pass input unit 094BD 43009496 963 PAR2 SBNGOUT indicate output file name 094BE 4000949E 964 PARL SBNGBLK and supply logon block prototype 094BF 60040000 0 IMM 965 LD R0 0 say all OK 000094C0 966 DONENOW LABEL 094C0 5D1F8001 6 STAK 967 LEAVE POP return to caller 968 * --- 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2081 (OPRSESSSTRT) F 131 OPREQ - Create a user session 969 970 END of STARTSPLR subroutine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2082 (OPRSESSSTRT) F 131 OPREQ - Create a user session 972 973 ********************************************************************************** 974 * * 975 * OPRSTRTSPR - Start the system Spooler * 976 * * 977 * This routine logs on the Spooler * 978 * * 979 * JMP OPRSTRTSPR * 980 * * 981 * Exit via XREQRETURN, with R0 = session number or error code. * 982 * * 983 * Stack required = 19 * 984 * 0 + max ( STARTSPLR (19) ) * 985 * * 986 ********************************************************************************** 987 988 BLOCK OPRSTRTSPR routine 989 ENTRY OPRSTRTSPR 990 094C1 2153504F 991 SPLNAME TEXT "!SPOOLER" 00000008 ABS 992 SPLNAMELEN EQU 8 993 000094C3 994 OPRSTRTSPR LABEL 094C3 60040170 0 IMM 995 LD R0 URGETPNUM find session number request 094C4 60440008 1 IMM 996 LD R1 SPLNAMELEN length of the spooler name 094C5 388094C1 2 997 LEA R2 SPLNAME address of the spooler name 094C6 09040000 IMM 998 UREQ 0 get spooler session number 094C7 FA0659DC 0 999 JGEZ R0 UERRORNAE if no error, assume already exists 1000 094C8 DC4094B1 1001 CALLNP STARTSPLR use a handy subroutine 094C9 FE0E5988 1002 JMP UERROR and end it now 1003 * --- 1004 1005 END OPRSTRTSPR routine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2083 (OPRSESSSTRT) F 131 OPREQ - Create a user session 1007 1008 ********************************************************************************** 1009 * * 1010 * FREQCONCP - Create Concurrent Session * 1011 * * 1012 * R3 = program unit number * 1013 * R4 -> caller's console area * 1014 * R4,CAR1 = input unit number * 1015 * R4,CAR2 = output unit number * 1016 * JMP FREQCONCP * 1017 * * 1018 * Exit via XREQRETURN with * 1019 * R0 = error code or session number. * 1020 * R1 = PSN of new session's Control Mode * 1021 * * 1022 * Stack required = 18 * 1023 * 5 + max ( BLDPROCESS (2), CHKGIVUNIT (1), FREEULB (11), * 1024 * GIVEUNIT (13), LOCKLIST (1), LOGONPROC2 (5), * 1025 * LUNSEARCH (2), MAPINMEM (3), SETINITRUN (1), * 1026 * SETRUNNING (2), UNLOCKLIST (1), USEULB (4) ) * 1027 * * 1028 ********************************************************************************** 1029 1030 BLOCK FREQCONCP routine 1031 ENTRY FREQCONCP 1032 1033 BEGFRAME2 00178800 6 BASE 1034 PROGFCB BSS 1 ptr to program FCB 00178801 6 BASE 1035 INFCB BSS 1 ptr to input FCB 00178802 6 BASE 1036 OUTFCB BSS 1 ptr to output FCB 00178803 6 BASE 1037 PSAPTR BSS 1 ptr to low PSA 00178804 6 BASE 1038 CMPSN BSS 1 PSN of new session's CM 1039 ENDFRAME 1040 000094CA 1041 FREQCONCP LABEL 094CA EC1F8005 6 STAK 1042 STZ PUSH allocate stack 094CB DC405B39 1043 CALLNP LUNSEARCH find program FCB 094CC FB7059B8 5 1044 JZA FCB FERRORLNE3 jump if not opened 094CD E5578800 5 6 BASE 1045 ST FCB SP,PROGFCB save FCB pointer 094CE DC40954B 1046 CALLNP CHKGIVUNIT can it be given away? 094CF FA0C5983 0 1047 JNEZ R0 FERROR jump if not 1048 094D0 60D70803 3 4 BASE 1049 LD R3 R4,CAR1 R3 = input unit number 094D1 DC405B39 1050 CALLNP LUNSEARCH find input FCB 094D2 FB7059B8 5 1051 JZA FCB FERRORLNE3 jump if not opened 094D3 65578800 5 6 BASE 1052 CPR FCB SP,PROGFCB same as program FCB? 094D4 FE0259B0 1053 JEQ FERRORPOB error if so 094D5 E5578801 5 6 BASE 1054 ST FCB SP,INFCB save FCB pointer 094D6 DC40954B 1055 CALLNP CHKGIVUNIT can it be given away? 094D7 FA0C5985 0 1056 JNEZ R0 FERROR3FCB error if not 1057 094D8 60D70804 3 4 BASE 1058 LD R3 R4,CAR2 R3 = output unit number 094D9 DC405B39 1059 CALLNP LUNSEARCH find output FCB 094DA FB7059B8 5 1060 JZA FCB FERRORLNE3 jump if not opened 094DB 65578800 5 6 BASE 1061 CPR FCB SP,PROGFCB same as program FCB? 094DC FE0259B0 1062 JEQ FERRORPOB error if so 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2084 (OPRSESSSTRT) F 131 OPREQ - Create a user session 094DD 65578801 5 6 BASE 1063 CPR FCB SP,INFCB same as input FCB 094DE FE0259B0 1064 JEQ FERRORPOB error if so 094DF E5578802 5 6 BASE 1065 ST FCB SP,OUTFCB save FCB pointer 094E0 DC40954B 1066 CALLNP CHKGIVUNIT can it be given away? 094E1 FA0C5985 0 1067 JNEZ R0 FERROR3FCB error if not 1068 094E2 0CC00000 1069 IOFF turn interrupts off temporarily 094E3 DC0035D2 1070 CALL BLDPROCESS build a new session 094E4 4144F000 IMM 1071 PARV USERMSR MSR value 094E5 43440000 IMM 1072 PARV2 0 program name 094E6 41440000 IMM 1073 PARV 0 initial PC 094E7 40440000 IMM 1074 PARVL 0 user session 094E8 E4D78803 3 6 BASE 1075 ST R3 SP,PSAPTR save pointer to PSA 094E9 6008DF15 0 3 ZBM 1076 LD R0 R3,PSPROCLIST get CM UPC 094EA 60081371 0 0 ZBM 1077 LD R0 R0,UPCSERNM get CM's PSN 094EB E4178804 0 6 BASE 1078 ST R0 SP,CMPSN save for later 1079 094EC DC0025EB 1080 CALL MAPINMEM map in the original caller 094ED 40400412 1081 PARVL CPPSA PSA pointer resides here 094EE 0C800000 1082 ION restore interrupts thank you! 094EF DC003096 1083 CALL LOCKLIST get the PCNTLLIST 094F0 40001EB2 1084 PARL PCNTLLOCK 1085 094F1 60800412 2 1086 LD R2 CPPSA R2 -> my PSA 094F2 60889F12 2 2 ZBM 1087 LD R2 R2,PSPROCCB R2 -> my PCB 094F3 600880C3 0 2 ZBM 1088 LD R0 R2,PCPROCNUM R0 = my session number 094F4 E40900C4 0 4 ZBM 1089 ST R0 R4,PCPARENT set parent session number 094F5 60089A13 0 2 ZBM 1090 LD R0 R2,PCSPECPROC 094F6 E4091A13 0 4 ZBM 1091 ST R0 R4,PCSPECPROC we are special if our parent is 094F7 DC0030A4 1092 CALL UNLOCKLIST release the list 094F8 40001EB2 1093 PARL PCNTLLOCK 1094 094F9 62168805 012 BASE 1095 LD2 R0 R2,PCBSITE get my site name 094FA E6170805 014 BASE 1096 ST2 R0 R4,PCBSITE and copy it to new session 1097 094FB 61400412 5 1098 LD R5 CPPSA R0 -> my PSA 094FC 61095F13 4 5 ZBM 1099 LD ULB R5,PSUSERLIMP ULB -> logged on account 094FD DC009650 1100 CALL LOGONPROC2 do logon processing 094FE 4052C000 3 REG 1101 PARVL R3 PSA pointer 094FF FA0C9529 0 1102 JNEZ R0 HANGSELF jump if problems arose 1103 09500 60D78803 3 6 BASE 1104 LD R3 SP,PSAPTR R3 -> new PSA 09501 61095F14 4 5 ZBM 1105 LD ULB R5,PSDFLTDIR ULB -> alias account 09502 DC405569 1106 CALLNP USEULB use it once more 09503 E108DF14 4 3 ZBM 1107 EXCH ULB R3,PSDFLTDIR set it in new session 09504 60094044 0 5 ZBM 1108 LD R0 R5,PSDDIRPRIV 09505 E408C044 0 3 ZBM 1109 ST R0 R3,PSDDIRPRIV more privilege for alias 09506 DC405526 1110 CALLNP FREEULB and use this one once less 1111 09507 60D78803 3 6 BASE 1112 LD R3 SP,PSAPTR R3 -> new PSA 09508 60094854 0 5 ZBM 1113 LD R0 R5,PSPRIVMASK 09509 E408C854 0 3 ZBM 1114 ST R0 R3,PSPRIVMASK copy restriction mask 0950A 60174811 0 5 BASE 1115 LD R0 R5,PSTIMLIM 0950B E416C811 0 3 BASE 1116 ST R0 R3,PSTIMLIM copy time limit 0950C 60174813 0 5 BASE 1117 LD R0 R5,PSSESLIM 0950D E416C813 0 3 BASE 1118 ST R0 R3,PSSESLIM copy block limit 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2085 (OPRSESSSTRT) F 131 OPREQ - Create a user session 0950E 60095830 0 5 ZBM 1119 LD R0 R5,PSPRIORITY 0950F E408D830 0 3 ZBM 1120 ST R0 R3,PSPRIORITY copy the priority level 1121 1122 * give the new guy some IO units and a run unit 09510 61578802 5 6 BASE 1123 LD FCB SP,OUTFCB get address of FCB to move 09511 DC009562 1124 CALL GIVEUNIT give output FCB to new session 09512 414400CA IMM 1125 PARV LUNAOUT new unit number 09513 4052C000 3 REG 1126 PARVL R3 new PSA pointer 1127 * \ / 1128 09514 61578801 5 6 BASE 1129 LD FCB SP,INFCB give input FCB to new session 09515 60D78803 3 6 BASE 1130 LD R3 SP,PSAPTR pick up others PSA 09516 DC009562 1131 CALL GIVEUNIT move the unit to the other guy 09517 414400C9 IMM 1132 PARV LUNAIN new unit number 09518 4052C000 3 REG 1133 PARVL R3 new PSA pointer 1134 * \ / 1135 09519 60D78803 3 6 BASE 1136 LD R3 SP,PSAPTR get the new PSA back 0951A 61578800 5 6 BASE 1137 LD FCB SP,PROGFCB get the FCB for the code file 0951B DC009562 1138 CALL GIVEUNIT give program FCB to new session 0951C 414400C8 IMM 1139 PARV PROGLUN new unit number 0951D 4052C000 3 REG 1140 PARVL R3 new PSA pointer 1141 0951E 60D78803 3 6 BASE 1142 LD R3 SP,PSAPTR reload pointer to the PSA 0951F DC003640 1143 CALL SETINITRUN set initial entry 09520 40409533 1144 PARVL CMENTCODE control mode entry code 09521 6108DF12 4 3 ZBM 1145 LD R4 R3,PSPROCCB R4 -> new PCB 09522 DC402B99 1146 CALLNP SETRUNNING make him go 09523 600900C3 0 4 ZBM 1147 LD R0 R4,PCPROCNUM get his session number 09524 60578804 1 6 BASE 1148 LD R1 SP,CMPSN get CM's PSN 09525 60800412 2 1149 LD R2 CPPSA caller's PSA 09526 60889F11 2 2 ZBM 1150 LD R2 R2,PSCACHNP1 caller's console area 09527 E6168802 012 BASE 1151 ST2 R0 R2,CAR0 give him the return values 09528 FE0E38CF 1152 JMP XREQRETURN and all done 1153 * --- 1154 1155 * R0 = error code 00009529 1156 HANGSELF LABEL 09529 E413C000 0 7 REG 1157 ST R0 R7 save away error code 0952A 60D78803 3 6 BASE 1158 LD R3 SP,PSAPTR get pointer to new PSA 0952B 6108DF10 4 3 ZBM 1159 LD R4 R3,PSCACHN pointer to console area 0952C 60042DAC 0 IMM 1160 LD R0 ADR LIQUIDATE routine to kill session 0952D E4091F10 0 4 ZBM 1161 ST R0 R4,CAPC point this session at liquidate 0952E 6004F1F0 0 IMM 1162 LD R0 MONMSR all MSR relocation and int bits on 0952F E4170801 0 4 BASE 1163 ST R0 R4,CAMSR we must run in monitor state 09530 6108DF12 4 3 ZBM 1164 LD R4 R3,PSPROCCB pointer to the new PCB 09531 DC402B99 1165 CALLNP SETRUNNING make this session runnable 09532 FE0E5995 1166 JMP UERROR7 return error to caller 1167 * --- 1168 1169 * The following value of PROGLUN must agree with Control Mode's idea 1170 * of it, because CM does an FRINSRTP FREQ to set up the code file. 000000C8 ABS 1171 PROGLUN EQU LUNCMLOW-1 1172 09533 C0000004 1173 CMENTCODE VFD 1*CMSKAPPL+1*CMBATCHJOB+0*CMERRIDS+CMCONCP*CMENTRYCD 1174 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2086 (OPRSESSSTRT) F 131 OPREQ - Create a user session 1175 END FREQCONCP routine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2087 (OPRSESSSTRT) F 131 OPREQ - Create a user session 1177 1178 ********************************************************************************** 1179 * * 1180 * FLUSHCONCP - kill concurrent sessions spawned by the caller * 1181 * * 1182 * This routine will kill all of the concurrent sessions of the * 1183 * current session. * 1184 * * 1185 * CALLNP FLUSHCONCP * 1186 * * 1187 * Eats R0:R5. * 1188 * Stack required = 5 * 1189 * 1 + max ( ROUST (4), SRCHLIST (1), UERRSETY (1), * 1190 * UNSRCHLIST (1) ) * 1191 * * 1192 ********************************************************************************** 1193 1194 BLOCK 1195 ENTRY FLUSHCONCP 1196 1197 BEGFRAME 1198 ENDFRAME 1199 09534 DD5F8001 6 STAK 1200 FLUSHCONCP ENTRNP PUSH 09535 61000412 4 1201 LD R4 CPPSA R4 => current PSA 09536 61091F12 4 4 ZBM 1202 LD R4 R4,PSPROCCB R4 => our PCB 09537 610900C3 4 4 ZBM 1203 LD R4 R4,PCPROCNUM R4 = our session number 09538 DC0030AA 1204 CALL SRCHLIST say we're searching the session 09539 40001EB2 1205 PARL PCNTLLOCK 0953A 60C01EB1 3 1206 LD R3 PCONTROL R3 => root of session list 0000953B 1207 LOOP LABEL 0953B 6508C0C4 4 3 ZBM 1208 CPR R4 R3,PCPARENT is this session our offspring? 0953C FE0C9544 1209 JNE NEXT jump if not 0953D 6148DF13 5 3 ZBM 1210 LD R5 R3,PCPSADRS R5 => his PSA 0953E 6084107D 2 IMM 1211 LD R2 UINTOPRQ+CMERR tell his CM to go away 0953F 60C40005 3 IMM 1212 LD R3 UINTOPRQP subcode=abort parallel session 09540 DC4035B5 1213 CALLNP UERRSETY give him the error 09541 60C95F12 3 5 ZBM 1214 LD R3 R5,PSPROCCB restore his PCB pointer 09542 DC403569 1215 CALLNP ROUST wake him up 09543 60C95F12 3 5 ZBM 1216 LD R3 R5,PSPROCCB restore his PCB pointer 1217 * \ / 1218 00009544 1219 NEXT LABEL 09544 60C8DF14 3 3 ZBM 1220 LD R3 R3,PCNXTCB R3 => next PCB 09545 FAF2953B 3 1221 JNZA R3 LOOP jump if another to examine 09546 DC0030B7 1222 CALL UNSRCHLIST done with the session list 09547 40001EB2 1223 PARL PCNTLLOCK 1224 * \ / 1225 09548 5D1F8001 6 STAK 1226 LEAVE POP 1227 * --- 1228 1229 END of FLUSHCONCP subroutine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2088 (OPRSESSSTRT) F 131 OPREQ - Create a user session 1231 1232 ********************************************************************************** 1233 * * 1234 * CHKGIVUNIT - Determine whether a unit can be given to another PROCESS. * 1235 * * 1236 * This routine takes an FCB, and determines whether we * 1237 * are capable of removing that unit from the current * 1238 * session and giving it to a different one. To be able to * 1239 * do this, the unit number must be less than LUNCMLOW, there * 1240 * must be no units equivalenced to it, and there must be no * 1241 * currently mapped pages from the unit. * 1242 * * 1243 * CHKGIVCMU - Determine whether a unit can be given to another PROCESS. * 1244 * * 1245 * This routine is identical to CHKGIVUNIT except that it does * 1246 * not check for CM units. * 1247 * * 1248 * Call: * 1249 * R3 = unit number * 1250 * FCB => file control block * 1251 * CALLNP CHKGIVUNIT (or CHKGIVCMU) * 1252 * R0 = error code (0 if lun can be given) * 1253 * * 1254 * Eats R0:R3. * 1255 * Stack required = 1 * 1256 * * 1257 ********************************************************************************** 1258 1259 BLOCK CHKGIVUNIT subroutine 1260 ENTRY CHKGIVUNIT 1261 ENTRY CHKGIVCMU 1262 1263 BEGFRAME 1264 ENDFRAME 1265 09549 DD5F8001 6 STAK 1266 CHKGIVCMU ENTRNP PUSH 0954A FE0E954E 1267 JMP CHECKJOIN 1268 * --- 1269 0954B DD5F8001 6 STAK 1270 CHKGIVUNIT ENTRNP PUSH 0954C 64C400C9 3 IMM 1271 CPR R3 LUNCMLOW is it vanilla? 0954D FE06955E 1272 JGE BADNUMBER jump if not 1273 * \ / 1274 0000954E 1275 CHECKJOIN LABEL 0954E 60494080 1 5 ZBM 1276 LD R1 FCB,FCBUSYCNT any equivalences here? 0954F FA629560 1 1277 DRJ R1 BUSY so sorry! 1278 * \ / 1279 1280 ********************************************************************************** 1281 * * 1282 * Search for mapped-in pages from this FCB * 1283 * * 1284 ********************************************************************************** 1285 1286 * \ / 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2089 (OPRSESSSTRT) F 131 OPREQ - Create a user session 09550 60400412 1 1287 LD R1 CPPSA prep to look for mapped pages 09551 60485F15 1 1 ZBM 1288 LD R1 R1,PSPROCLIST get root of under programs 00009552 1289 SCHFCBUPC LABEL 09552 60924000 2 1 REG 1290 LD R2 R1 place UPC pointer in safe register 09553 6016880D 0 2 BASE 1291 LD R0 R2,UPCVMLIST get VM list of present underprogram 09554 3D481F11 5 0 ZBM 1292 LSRCH FCB R0,VPFCB check this VM list for mapin 09555 FE029560 1293 JEQ BUSY if mapped then file busy 09556 60489F10 1 2 ZBM 1294 LD R1 R2,UPCSONPTR any sons processes to check 09557 FA729552 1 1295 JNZA R1 SCHFCBUPC keep the search on going 1296 * \ / 1297 00009558 1298 SCHFCBBRO LABEL 09558 60489F16 1 2 ZBM 1299 LD R1 R2,UPCBROPTR any brother processes to check 09559 FA729552 1 1300 JNZA R1 SCHFCBUPC see if he mapped in a page 0955A 60889F17 2 2 ZBM 1301 LD R2 R2,UPCDADPTR move up to the immediate overprocess 0955B FAB29558 2 1302 JNZA R2 SCHFCBBRO jump if more processes or finished 0955C EC120000 0 REG 1303 STZ R0 indicate ok to give unit away 1304 * \ / 1305 0000955D 1306 RETURN LABEL 0955D 5D1F8001 6 STAK 1307 LEAVE POP 1308 * --- 1309 0000955E 1310 BADNUMBER LABEL 0955E 60040082 0 IMM 1311 LD R0 XREQERPOB "parameter out of bounds" 0955F FE0E955D 1312 JMP RETURN 1313 * --- 1314 00009560 1315 BUSY LABEL 09560 6004008A 0 IMM 1316 LD R0 XREQERFBZ "file is busy" 09561 FE0E955D 1317 JMP RETURN 1318 * --- 1319 1320 END CHKGIVUNIT subroutine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2090 (OPRSESSSTRT) F 131 OPREQ - Create a user session 1322 1323 ********************************************************************************** 1324 * * 1325 * GIVEUNIT - Give an FCB and UCE to another session * 1326 * * 1327 * This routine will unlink an FCB and UCE from the current * 1328 * session and give it to another session. The caller should * 1329 * previously have verified that this is legal using * 1330 * CHKGIVUNIT. For files corresponding to non-disk devices, * 1331 * we will update the hardware control block as necessary. * 1332 * * 1333 * FCB => file control block * 1334 * CALL GIVEUNIT * 1335 * PARV new unit number for FCB * 1336 * PARVL address of receiver's PSA * 1337 * FCB -> file control block for other session * 1338 * * 1339 * Eats R0:R4. * 1340 * Stack required = 13 * 1341 * 3 + max ( GIVEUNIT2 (7), GULOCKHW (1), GUUNLOCKHW (1), * 1342 * MAPINMEM (3), WSXCLNALL (10) ) * 1343 * * 1344 ********************************************************************************** 1345 1346 BLOCK GIVEUNIT subroutine 1347 ENTRY GIVEUNIT 1348 1349 BEGFRAME 00178801 6 BASE 1350 UNITNUM BSS 1 unit number 00178802 6 BASE 1351 PSAPTR BSS 1 receiver's PSA pointer 1352 ENDFRAME 1353 09562 DD1F8003 6 STAK 1354 GIVEUNIT ENTR PUSH 09563 C1578801 6 BASE 1355 STPV SP,UNITNUM save new unit number 09564 C0578802 6 BASE 1356 STPVL SP,PSAPTR to whom to give it 1357 * \ / 09565 60D34000 3 5 REG 1358 LD R3 FCB indicate what unit to clean 09566 DC4032EA 1359 CALLNP WSXCLNALL cleanup our WSX list 1360 * \ / 09567 DC409574 1361 CALLNP GULOCKHW lock hardware before call to GIVEUNIT2 09568 60978801 2 6 BASE 1362 LD R2 SP,UNITNUM R2 = new unit number 09569 60D78802 3 6 BASE 1363 LD R3 SP,PSAPTR receiver's PSA 0956A 60C8DF12 3 3 ZBM 1364 LD R3 R3,PSPROCCB R3 -> receiver's PCB 0956B DC4095D7 1365 CALLNP GIVEUNIT2 move the FCB and UCE 0956C 60D78802 3 6 BASE 1366 LD R3 SP,PSAPTR receiver's PSA 0956D 60C8DF12 3 3 ZBM 1367 LD R3 R3,PSPROCCB R3 -> receiver's PCB 0956E 0CC00000 1368 IOFF ensure ints stay off... 0956F DC4095A2 1369 CALLNP GUUNLOCKHW now unlock the hardware devices 09570 DC0025EB 1370 CALL MAPINMEM remap callers virtual free storage 09571 40400412 1371 PARVL CPPSA pass PSA address 09572 0C800000 1372 ION ...until MAPINMEM has run 09573 5D1F8003 6 STAK 1373 LEAVE POP return 1374 * --- 1375 1376 END GIVEUNIT subroutine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2091 (OPRSESSSTRT) F 131 OPREQ - Create a user session 1378 1379 ********************************************************************************** 1380 * * 1381 * GULOCKHW locks the hardware control element associated * 1382 * with an FCB. Any messing with PCB and/or FCB pointers in * 1383 * the control block waits until we know more (like the address * 1384 * of the transitional FCB), in GUUNLOCKHW. * 1385 * Regardless of whether the FCB actually has a DCB that * 1386 * needs locking, one IOFF is done to provide security. * 1387 * * 1388 * Call: * 1389 * FCB -> FCB * 1390 * CALLNP GULOCKHW * 1391 * * 1392 * R4 -> hardware control element * 1393 * Eats R0, Sets R4 * 1394 * Stack required = 1 * 1395 * 1 + max ( LOCKWAIT (0) ) * 1396 * * 1397 ********************************************************************************** 1398 1399 BLOCK GULOCKHW subroutine 1400 ENTRY GULOCKHW 1401 1402 BEGFRAME 1403 ENDFRAME 1404 09574 DD5F8001 6 STAK 1405 GULOCKHW ENTRNP PUSH 09575 61095F16 4 5 ZBM 1406 LD R4 FCB,FCDCBPTR R4 -> device control block 09576 60096665 0 5 ZBM 1407 LD R0 FCB,FCHTYPE R0 = hardware type 09577 50040010 0 IMM 1408 MIN R0 JUMPMAX make sure it's in range 09578 5CA09579 0 1409 LDPC JUMPTAB(R0) case statement 1410 * --- 1411 00009579 1412 JUMPTAB LABEL 09579 0000958A 1413 ADR ERROR 00 - impossible 0957A 000095A0 1414 ADR NORMAL 01 - SAF 0957B 000095A0 1415 ADR NORMAL 02 - RAF 0957C 000095A0 1416 ADR NORMAL 03 - CODE 0957D 0000958B 1417 ADR PATH 04 - PATH 0957E 000095A0 1418 ADR NORMAL 05 - DIR 0957F 000095A0 1419 ADR NORMAL 06 - NULL 09580 00009590 1420 ADR TERM 07 - TERM 09581 000095A0 1421 ADR NORMAL 08 - LOCK 09582 0000958A 1422 ADR ERROR 09 - BATCH 09583 0000958A 1423 ADR ERROR 0A - CDR 09584 00009596 1424 ADR LP 0B - LP 09585 0000959B 1425 ADR TAPE 0C - MT 09586 0000959B 1426 ADR TAPE 0D - CT 09587 000095A0 1427 ADR NORMAL 0E - VOL 09588 0000959B 1428 ADR TAPE 0F - VT 00000010 ABS 1429 JUMPMAX EQU DISPW JUMPTAB 09589 0000958A 1430 ADR ERROR 010+ - impossible 1431 0000958A 1432 ERROR LABEL 0958A 00131230 1433 HALT HALTS1230 illegal device type in FCB 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2092 (OPRSESSSTRT) F 131 OPREQ - Create a user session 1434 * --- 1435 0000958B 1436 PATH LABEL 1437 PLOCK (R4,PTHLOCK) lock the path element 0958B 0CC00000 1437 IOFF 0958C D1D70807 4 BASE 1437 SETT (R4,PTHLOCK) 0958D FE0C958F 1437 JNE MA(2+DISPW MA 0) 0958E DC40308B 1437 CALLNP LOCKWAIT 0958F FE0E95A1 1438 JMP DONE all over 1439 * --- 1440 00009590 1441 TERM LABEL 09590 FB3095A0 4 1442 JZA R4 ONLYAFAKE jump if no real term associated 1443 PLOCK (R4,TCLOCK) lock the TCB element 09591 0CC00000 1443 IOFF 09592 D1D70818 4 BASE 1443 SETT (R4,TCLOCK) 09593 FE0C9595 1443 JNE MA(2+DISPW MA 0) 09594 DC40308B 1443 CALLNP LOCKWAIT 09595 FE0E95A1 1444 JMP DONE all over 1445 * --- 1446 00009596 1447 LP LABEL 1448 PLOCK (R4,LPCELOCK) lock the LP 09596 0CC00000 1448 IOFF 09597 D1D70805 4 BASE 1448 SETT (R4,LPCELOCK) 09598 FE0C959A 1448 JNE MA(2+DISPW MA 0) 09599 DC40308B 1448 CALLNP LOCKWAIT 0959A FE0E95A1 1449 JMP DONE all over 1450 * --- 1451 0000959B 1452 TAPE LABEL 1453 PLOCK MTREQLOCK lock MT requests 0959B 0CC00000 1453 IOFF 0959C D1C01F20 1453 SETT MTREQLOCK 0959D FE0C959F 1453 JNE MA(2+DISPW MA 0) 0959E DC40308B 1453 CALLNP LOCKWAIT 0959F FE0E95A1 1454 JMP DONE all over 1455 * --- 1456 000095A0 1457 ONLYAFAKE LABEL 000095A0 1458 NORMAL LABEL 095A0 0CC00000 1459 IOFF disallow interrupts for awhile 1460 * \ / 1461 000095A1 1462 DONE LABEL 095A1 5D1F8001 6 STAK 1463 LEAVE POP return 1464 * --- 1465 1466 END of GULOCKHW subroutine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2093 (OPRSESSSTRT) F 131 OPREQ - Create a user session 1468 1469 ********************************************************************************** 1470 * * 1471 * GUUNLOCKHW * 1472 * * 1473 * This subroutine unlocks the hardware control element * 1474 * locked by GULOCKHW, and finishes up setting any fields that * 1475 * need to be set (TCFCB). * 1476 * Call: * 1477 * IOFF * 1478 * Must have receivers memory mapped. * 1479 * R0 = hardware type * 1480 * R3 -> PCB of receiver * 1481 * R4 -> hardware control element * 1482 * FCB -> new FCB address * 1483 * CALLNP GUUNLOCKHW * 1484 * interrupts are on * 1485 * * 1486 * Registers Used: R0 * 1487 * Stack Required: 1 * 1488 * * 1489 ********************************************************************************** 1490 1491 BLOCK GUUNLOCKHW subroutine 1492 1493 ENTRY GUUNLOCKHW 1494 1495 BEGFRAME 1496 ENDFRAME 1497 095A2 DD5F8001 6 STAK 1498 GUUNLOCKHW ENTRNP PUSH 095A3 60096665 0 5 ZBM 1499 LD R0 FCB,FCHTYPE pick up the hardware type 095A4 50040010 0 IMM 1500 MIN R0 JTABMAX keep within range 095A5 5CA095A6 0 1501 LDPC JTAB(R0) do the right thing 1502 * --- 1503 000095A6 1504 JTAB LABEL 095A6 000095B7 1505 ADR ERROR 00 - impossible 095A7 000095D5 1506 ADR NORMAL 01 - SAF 095A8 000095D5 1507 ADR NORMAL 02 - RAF 095A9 000095D5 1508 ADR NORMAL 03 - CODE 095AA 000095B8 1509 ADR PATH 04 - PATH 095AB 000095D5 1510 ADR NORMAL 05 - DIR 095AC 000095D5 1511 ADR NORMAL 06 - NULL 095AD 000095C8 1512 ADR TERM 07 - TERM 095AE 000095D5 1513 ADR NORMAL 08 - LOCK 095AF 000095B7 1514 ADR ERROR 09 - BATCH 095B0 000095B7 1515 ADR ERROR 0A - CDR 095B1 000095C4 1516 ADR LP 0B - LP 095B2 000095C0 1517 ADR TAPE 0C - MT 095B3 000095C0 1518 ADR TAPE 0D - CT 095B4 000095D5 1519 ADR NORMAL 0E - VOL 095B5 000095C0 1520 ADR TAPE 0F - VT 00000010 ABS 1521 JTABMAX EQU DISPW JTAB 095B6 000095B7 1522 ADR ERROR 010+ - impossible 1523 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2094 (OPRSESSSTRT) F 131 OPREQ - Create a user session 000095B7 1524 ERROR LABEL 095B7 00131231 1525 HALT HALTS1231 illegal device type in FCB 1526 * --- 1527 000095B8 1528 PATH LABEL 095B8 60095835 0 5 ZBM 1529 LD R0 FCB,FCACCESS get current access 095B9 64040001 0 IMM 1530 CPR R0 FSACSRO am I the reader? 095BA FE0C95BD 1531 JNE UNLCKPATH if not, then just unlock the path 095BB E4C90112 3 4 ZBM 1532 ST R3 R4,PTHREADER else update PCB addr of reader 095BC E5492312 5 4 ZBM 1533 ST FCB R4,PTHREADFCB set the new FCB address 000095BD 1534 UNLCKPATH LABEL 1535 PUNLOCK (R4,PTHLOCK) unlock the path element 095BD EC170807 4 BASE 1535 STZ (R4,PTHLOCK) 095BE 0C800000 1535 ION 095BF FE0E95D6 1536 JMP DONEHERE all done 1537 * --- 1538 000095C0 1539 TAPE LABEL 095C0 E4D70803 3 4 BASE 1540 ST R3 R4,MTUPCADRS set new PCB pointer 1541 PUNLOCK MTREQLOCK unlock MT requests 095C1 EC001F20 1541 STZ MTREQLOCK 095C2 0C800000 1541 ION 095C3 FE0E95D6 1542 JMP DONEHERE all over 1543 * --- 1544 000095C4 1545 LP LABEL 095C4 E4D70808 3 4 BASE 1546 ST R3 R4,LPCPCADRS set new PCB pointer 1547 PUNLOCK (R4,LPCELOCK) unlock the LP 095C5 EC170805 4 BASE 1547 STZ (R4,LPCELOCK) 095C6 0C800000 1547 ION 095C7 FE0E95D6 1548 JMP DONEHERE all over 1549 * --- 1550 1551 * Terminal. Reader: Adjust both FCB and PCB. Writer: Adjust 1552 * them only if no reader exists. Else: Do nothing. 000095C8 1553 TERM LABEL 095C8 FB3095D5 4 1554 JZA R4 NORMAL jump if fake terminal 095C9 60095835 0 5 ZBM 1555 LD R0 FCB,FCACCESS get open access 095CA 64040001 0 IMM 1556 CPR R0 FSACSRO is it RO? 095CB FE0295D0 1557 JEQ DOBOTH if so, do both PCB and FCB 095CC 64040000 0 IMM 1558 CPR R0 FSACSRW is it RW? 095CD FE0C95D2 1559 JNE UNLCKTERM if not, we're done 095CE 5C091215 4 ZBM 1560 CMZ R4,TCACSRO is it also a read unit? 095CF FE0C95D2 1561 JNE UNLCKTERM if so, don't change anything 1562 * \ / 1563 000095D0 1564 DOBOTH LABEL 095D0 E5491F15 5 4 ZBM 1565 ST FCB R4,TCFCB make new reader FCB 095D1 E4C91F17 3 4 ZBM 1566 ST R3 R4,TCPCADRS update PCB pointer 1567 * \ / 1568 000095D2 1569 UNLCKTERM LABEL 1570 PUNLOCK (R4,TCLOCK) and all done 095D2 EC170818 4 BASE 1570 STZ (R4,TCLOCK) 095D3 0C800000 1570 ION 095D4 FE0E95D6 1571 JMP DONEHERE 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2095 (OPRSESSSTRT) F 131 OPREQ - Create a user session 1572 * --- 1573 000095D5 1574 NORMAL LABEL 095D5 0C800000 1575 ION restore interrupts 1576 * \ / 1577 000095D6 1578 DONEHERE LABEL 095D6 5D1F8001 6 STAK 1579 LEAVE POP 1580 * --- 1581 1582 END of GUUNLOCKHW subroutine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2096 (OPRSESSSTRT) F 131 OPREQ - Create a user session 1584 1585 ********************************************************************************** 1586 * * 1587 * GIVEUNIT2 - Move an FCB to another session * 1588 * This routine will move an FCB from one session to * 1589 * another. It does not update any hardware control block * 1590 * pointers. Care is taken to make sure that there is always * 1591 * a linked FCB while there is a linked UCE corresponding. * 1592 * If the unit is local it is placed on the first underprocess * 1593 * of the receiving session. Note that the currently running * 1594 * process (passie) must have his virtual tables mapped in. * 1595 * Also we must NOT get interrupt because who knows who's * 1596 * virtual tables will be mapped in on the interrupt return. * 1597 * * 1598 * Call: * 1599 * FCB => file control block * 1600 * R2 = new unit number * 1601 * R3 = addr of PCB of receiving session * 1602 * * 1603 * CALLNP GIVEUNIT2 * 1604 * FCB -> file control block for other session * 1605 * note that the receiving process memory is mapped on return. * 1606 * * 1607 * Eats R0:R3. * 1608 * Stack required = 7 * 1609 * 4 + max ( FCFREEMEM (0), FCGETMEM (0), FINDUCE (2), * 1610 * LINKUCEIN (3), MAPINMEM (3), SFREEMEM (0), * 1611 * SGETMEM (0), UNLINKFCB (1), UNLINKUCE (1) ) * 1612 * * 1613 ********************************************************************************** 1614 1615 BLOCK GIVEUNIT2 subroutine 1616 ENTRY GIVEUNIT2 1617 1618 BEGFRAME 00178801 6 BASE 1619 PARMAREA BSS 2 parameter storage area! 00178803 6 BASE 1620 TFCBPTR BSS 1 temporary FCB pointer 1621 ENDFRAME 1622 095D7 DD5F8004 6 STAK 1623 GIVEUNIT2 ENTRNP PUSH 095D8 E6978801 236 BASE 1624 ST2 R2 SP,PARMAREA save new unit number 1625 1626 ********************************************************************************** 1627 * First, determine the unit we are after. We use the first UCE that * 1628 * points to the FCB being given. This is OK because CHKGIVUNIT has * 1629 * found no equivalences to it (i.e. exactly one UCE should be pointing). * 1630 ********************************************************************************** 1631 095D9 60534000 1 5 REG 1632 LD R1 FCB put FCB in convenient register 095DA DC0035BB 1633 CALL FINDUCE get the UCE for it 095DB 40400412 1634 PARVL CPPSA search in current session 095DC FA3295DE 0 1635 JNZA R0 UCEOK jump if found 095DD 00131218 1636 HALT HALTS1218 why me? 1637 * --- 1638 1639 ********************************************************************************** 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2097 (OPRSESSSTRT) F 131 OPREQ - Create a user session 1640 * We have found the UCE. Remove it and the FCB from the current session. * 1641 ********************************************************************************** 1642 000095DE 1643 UCEOK LABEL 095DE DC005DD0 1644 CALL UNLINKUCE remove UCE from session 095DF 40480080 0 ZBM 1645 PARVL R0,UCEUNIT indicate old unit number 095E0 60D20000 3 0 REG 1646 LD R3 R0 have to move UCE pointer 095E1 DC002F8F 1647 CALL UCFREEMEM free the UCE element 095E2 41440001 IMM 1648 PARV UCELOG this is the length to free 095E3 4052C000 3 REG 1649 PARVL R3 starting address 095E4 DC002ED0 1650 CALL SGETMEM fetch temporary storage... 095E5 40440004 IMM 1651 PARVL FCLOG ...to store away the FCB 095E6 E4178803 0 6 BASE 1652 ST R0 SP,TFCBPTR save the address 095E7 DC405DC3 1653 CALLNP UNLINKFCB take the gift FCB 095E8 60134000 0 5 REG 1654 LD R0 FCB setting up the source address 095E9 60978803 2 6 BASE 1655 LD R2 SP,TFCBPTR destination block 095EA 60440040 1 IMM 1656 LD R1 (2 POWER FCLOG)*CPW number of characters to move 095EB FE400000 1657 CMOVE 095EC DC002F8F 1658 CALL FCFREEMEM free up the old FCB 095ED 41440004 IMM 1659 PARV FCLOG this is the length of the thing 095EE 40534000 5 REG 1660 PARVL FCB starting at this address 095EF 60978802 2 6 BASE 1661 LD R2 SP,PARMAREA(1) get PCB address back 095F0 DC0025EB 1662 CALL MAPINMEM map in the new process' memory 095F1 40489F13 2 ZBM 1663 PARVL R2,PCPSADRS PSA address 1664 * \ / 1665 1666 ********************************************************************************** 1667 * * 1668 * The UCE and FCB have been exorcised. It is time now to implant them * 1669 * into the other body. Note that the UCE is completely gone, but the * 1670 * FCB has been carefully saved away. To regenerate the FCB we just copy * 1671 * but the UCE must be regenerated. * 1672 * * 1673 ********************************************************************************** 1674 1675 * \ / 095F2 DC002F0A 1676 CALL UCGETMEM get a chunk of memory... 095F3 40440001 IMM 1677 PARVL UCELOG ...of this length 095F4 60D20000 3 0 REG 1678 LD R3 R0 save pointer to the UCE 095F5 DC002F0A 1679 CALL FCGETMEM request another piece of virtual storage 095F6 40440004 IMM 1680 PARVL FCLOG this is the length we need 095F7 61520000 5 0 REG 1681 LD FCB R0 save away the pointer here 095F8 60934000 2 5 REG 1682 LD R2 FCB this is the destination address 095F9 60178803 0 6 BASE 1683 LD R0 SP,TFCBPTR source address where the FCB hides 095FA 60440040 1 IMM 1684 LD R1 (2 POWER FCLOG)*CPW and set up the character length 095FB FE400000 1685 CMOVE 095FC 60978801 2 6 BASE 1686 LD R2 SP,PARMAREA get the unit number back 095FD E488C080 2 3 ZBM 1687 ST R2 R3,UCEUNIT set the unit number 095FE 648400C9 2 IMM 1688 CPR R2 LUNAIN non-user unit number 095FF ECC97A15 5 ZBM 1689 STLGE FCB,FCCMUNIT indicate a control mode unit 09600 FE089603 1690 JLT NOTABSIO jump if can't be absolute i/o 09601 648400CA 2 IMM 1691 CPR R2 LUNAOUT is it within absolute i/o range 09602 ED496015 5 ZBM 1692 STLLE FCB,FCABSIO set the flag accordingly 1693 * \ / 1694 00009603 1695 NOTABSIO LABEL 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2098 (OPRSESSSTRT) F 131 OPREQ - Create a user session 09603 E548DF11 5 3 ZBM 1696 ST FCB R3,UCEFCB set the FCB pointer correctly 09604 60978802 2 6 BASE 1697 LD R2 SP,PARMAREA(1) get pointer to the PCB 09605 60889F13 2 2 ZBM 1698 LD R2 R2,PCPSADRS R3 -> receiver's PSA 09606 60489F17 1 2 ZBM 1699 LD R1 R2,PSFCBLIST R1 -> his first FCB 09607 E4495F10 1 5 ZBM 1700 ST R1 FCB,FCLINK put his list behind us 09608 E5489F17 5 2 ZBM 1701 ST FCB R2,PSFCBLIST put us on head of list 09609 DC005DB2 1702 CALL LINKUCEIN link UCE into unit list 0960A 4152C000 3 REG 1703 PARV R3 pass UCE pointer 0960B 41489F15 2 ZBM 1704 PARV R2,PSPROCLIST indicate UPC element 0960C 40528000 2 REG 1705 PARVL R2 and PSA 0960D 60578803 1 6 BASE 1706 LD R1 SP,TFCBPTR pointer to the temporary FCB 0960E DC002F5D 1707 CALL SFREEMEM free up the temp block 0960F 41440004 IMM 1708 PARV FCLOG pass the FCB length log 2 09610 40524000 1 REG 1709 PARVL R1 last but not least the address 09611 5D1F8004 6 STAK 1710 LEAVE POP whew, all done!!! 1711 * --- 1712 1713 END GIVEUNIT2 subroutine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2099 (OPRSESSSTRT) F 131 OPREQ - Create a user session 1715 1716 ********************************************************************************** 1717 * * 1718 * LOGONPROC - Logon a Session * 1719 * * 1720 * This routine will log on a session. It assumes that this session is * 1721 * NOT already logged on. It sets the PSUSERLIMP, PSPRIVULB and PSDFLTDIR * 1722 * to all reference the logged on account. It does not do accounting-file * 1723 * logging. * 1724 * * 1725 * This routine accepts a password-mangling parameter. For normal logons, * 1726 * this parameter is zero. In this case we verify that * 1727 * PwMangle (ULACCNM, EQACCTPW) = UDPASS. * 1728 * * 1729 * For batch jobs started by the spooler, we verify that * 1730 * PwMangle (GivenParm, UDPASS) = EQACCTPW. * 1731 * * 1732 * * 1733 * EQT => block containing EQACCT,EQACCTPROJ,EQACCTPW * 1734 * CALL LOGONPROC * 1735 * PARV2 password mangling param * 1736 * PARVL PSA pointer * 1737 * return, R0 - error code (0 if OK) * 1738 * ULB => ULB of logged-on account * 1739 * * 1740 * Eats R0:R4 * 1741 * Sets R0 * 1742 * Stack required = 19 * 1743 * 5 + max ( DMOTEWNDO1 (7), FETCHDIR (4), FINDULB (14), * 1744 * FREEDIR (5), FREEULB (11), LOGONPROC2 (5), * 1745 * MAPOUTFBI (2), PWMANGLE (3), SETWNDO1 (4) ) * 1746 * * 1747 * * 1748 ********************************************************************************** 1749 1750 BLOCK LOGONPROC subroutine 1751 ENTRY LOGONPROC 1752 1753 BEGFRAME 00178801 6 BASE 1754 PWPARAM BSS 2 password-mangling param 00178803 6 BASE 1755 PSAPTR BSS 1 pointer to PSA of session to log on 00178804 6 BASE 1756 ERRCODE BSS 1 error code 1757 ENDFRAME 1758 09612 DD1F8005 6 STAK 1759 LOGONPROC ENTR PUSH 09613 C3578801 6 BASE 1760 STPV2 SP,PWPARAM save mangling param 09614 C0578803 6 BASE 1761 STPVL SP,PSAPTR save PSA pointer 1762 09615 60040096 0 IMM 1763 LD R0 XREQERPWW assume password is wrong 09616 E4178804 0 6 BASE 1764 ST R0 SP,ERRCODE 1765 09617 60174808 0 5 BASE 1766 LD R0 EQT,EQACCTPROJ get project name 09618 10002551 0 1767 SUB R0 DOTBTI see if in BTI division 09619 6804FA00 0 IMM 1768 UCPR R0 DVSNDISP is it .!!!xxx? 0961A FE06961D 1769 JGE NOTBTIP jump if not 0961B 60001EDF 0 1770 LD R0 FPSWITCH get front panel switches 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2100 (OPRSESSSTRT) F 131 OPREQ - Create a user session 0961C F234964E 0 1771 JBF R0/SSUSWMAINT RETURN jump if Remote Maintenance not allowed 1772 * \ / 1773 0000961D 1774 NOTBTIP LABEL 0961D DC405574 1775 CALLNP FINDULB find ULB for account 0961E FB30964E 4 1776 JZA ULB RETURN jump if none 0961F 5C090010 4 ZBM 1777 CMZ ULB,ULSHADOW shadows cannot log on 09620 FE0C964D 1778 JNE DOFREEULB so give error 1779 09621 DC405667 1780 CALLNP FETCHDIR lock the directory 09622 DC003205 1781 CALL SETWNDO1 map in the directory 09623 41440003 IMM 1782 PARV VPCNTLRO+VPCNTLLK read only and locked 09624 41440000 IMM 1783 PARV VPNOFCB no unit number 09625 41009631 1784 PAR DIRDE directory bad 09626 41570801 4 BASE 1785 PARV ULB,ULBLOCK block number 09627 40440009 IMM 1786 PARVL FBITUDIR1 primary directory block 09628 DC40261B 1787 CALLNP MAPOUTFBI unmap FBI, ION 1788 09629 62178801 016 BASE 1789 LD2 R0 SP,PWPARAM get mangling param 0962A FA1C9633 01 1790 JNEZ2 R0 STRANGE jump if strange mangling needed 1791 0962B DC005872 1792 CALL PWMANGLE mangle password 0962C 43570802 4 BASE 1793 PARV2 ULB,ULACCNM mangling base 0962D 42574809 5 BASE 1794 PARV2L EQT,EQACCTPW thing to mangle 0962E 66000803 01 1795 CPR2 R0 WNDO1/UDPASS does it match 0962F FE0C964B 1796 JNE LGPRELWNDO error if not 09630 FE0E9638 1797 JMP AFTERPASS 1798 * --- 1799 00009631 1800 DIRDE LABEL 09631 DC40261B 1801 CALLNP MAPOUTFBI unmap FBI, ION 09632 FE0E964B 1802 JMP LGPRELWNDO 1803 * --- 1804 00009633 1805 STRANGE LABEL 09633 DC005872 1806 CALL PWMANGLE mangle password 09634 43540000 01 PAIR 1807 PARV2 PAIR R0 mangling base 09635 42400803 1808 PARV2L WNDO1/UDPASS thing to mangle 09636 66174809 015 BASE 1809 CPR2 R0 EQT,EQACCTPW does it match? 09637 FE0C964B 1810 JNE LGPRELWNDO error if not 1811 * \ / 1812 00009638 1813 AFTERPASS LABEL 09638 60040021 0 IMM 1814 LD R0 UINTTIMCUT assume time limit exceeded 09639 E4178804 0 6 BASE 1815 ST R0 SP,ERRCODE 0963A 60170808 0 4 BASE 1816 LD R0 ULB,ULTIMLIM set CPU time limit 0963B FA2C963E 0 1817 JEQMW R0 TIMOK jump if infinite 0963C 68170809 0 4 BASE 1818 UCPR R0 ULB,ULTIMUSD have we used it up? 0963D FE0A964B 1819 JLE LGPRELWNDO error if so 1820 * \ / 1821 0000963E 1822 TIMOK LABEL 0963E 6017080A 0 4 BASE 1823 LD R0 ULB,ULWLCKLIM set wall clock limit 0963F FA2C9642 0 1824 JEQMW R0 WTIMOK jump if infinite 09640 6817080B 0 4 BASE 1825 UCPR R0 ULB,ULWLCKUSD have we used it up? 09641 FE0A964B 1826 JLE LGPRELWNDO error if so 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2101 (OPRSESSSTRT) F 131 OPREQ - Create a user session 1827 * \ / 1828 00009642 1829 WTIMOK LABEL 09642 60D78803 3 6 BASE 1830 LD R3 SP,PSAPTR R3 -> PSA to log on 09643 6000082B 0 1831 LD R0 WNDO1/UDLIMITS/RESTRWORD 09644 600A0050 0 0 CBM 1832 LD R0 R0/XREQRSTR get automatic restrictions 09645 E408C854 0 3 ZBM 1833 ST R0 R3,PSPRIVMASK save them 09646 60000829 0 1834 LD R0 WNDO1/UDPRIORITY get priority level of this directory 09647 E408D830 0 3 ZBM 1835 ST R0 R3,PSPRIORITY give it away to the session 09648 DC009650 1836 CALL LOGONPROC2 complete logon 09649 4052C000 3 REG 1837 PARVL R3 PSA pointers 0964A E4178804 0 6 BASE 1838 ST R0 SP,ERRCODE hopefully all is well 1839 * \ / 1840 0000964B 1841 LGPRELWNDO LABEL 0964B DC40315C 1842 CALLNP DMOTEWNDO1 unmap the directory block 0964C DC405685 1843 CALLNP FREEDIR release lock on directory 1844 * \ / 1845 0000964D 1846 DOFREEULB LABEL 0964D DC405526 1847 CALLNP FREEULB release use of ULB 1848 * \ / 1849 0000964E 1850 RETURN LABEL 0964E 60178804 0 6 BASE 1851 LD R0 SP,ERRCODE load the error code 0964F 5D1F8005 6 STAK 1852 LEAVE POP and return 1853 * --- 1854 1855 END LOGONPROC subroutine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2102 (OPRSESSSTRT) F 131 OPREQ - Create a user session 1857 1858 ********************************************************************************** 1859 * * 1860 * LOGONPROC2 - Logon a Session * 1861 * * 1862 * This routine will log on a session. It assumes that any necessary * 1863 * validation has already been done. We increment the ULB use count 3 * 1864 * times to account for the 3 ULB pointers that we store. We do not * 1865 * write any accounting info. * 1866 * * 1867 * ULB => ULB for account to log onto * 1868 * CALL LOGONPROC2 * 1869 * PARVL pointer to PSA * 1870 * return, R0 - error code (0 if OK) * 1871 * * 1872 * Eats R0:R3. * 1873 * Sets R0 * 1874 * Stack required = 5 * 1875 * 1 + max ( BLKLIMCHK (1), GETDATE (1), MAPINMEM (3), * 1876 * USEULB (4) ) * 1877 * * 1878 ********************************************************************************** 1879 1880 BLOCK LOGONPROC2 subroutine 1881 ENTRY LOGONPROC2 1882 1883 BEGFRAME 1884 ENDFRAME 1885 09650 DD1F8001 6 STAK 1886 LOGONPROC2 ENTR PUSH 09651 C052C000 3 REG 1887 STPVL R3 R3 -> PSA to log on 09652 DC40364A 1888 CALLNP BLKLIMCHK check free block limits 09653 FA0C9672 0 1889 JNEZ R0 TAKEOFF jump if there is not enough 09654 DC405569 1890 CALLNP USEULB 09655 E508DF13 4 3 ZBM 1891 ST ULB R3,PSUSERLIMP set logged-on account 1892 09656 DC405569 1893 CALLNP USEULB 09657 0CC00000 1894 IOFF disable interupts here 09658 DC0025EB 1895 CALL MAPINMEM mapin to get at the UPC 09659 4052C000 3 REG 1896 PARVL R3 pointer to the PSA 0965A 6008C116 0 3 ZBM 1897 LD R0 R3,PSCURRPROC get pointer to UPC 0965B E5081F13 4 0 ZBM 1898 ST ULB R0,UPCPRIVULB set privilege account 0965C DC0025EB 1899 CALL MAPINMEM re-map the original requester 0965D 40400412 1900 PARVL CPPSA pointer to the current PSA 0965E 0C800000 1901 ION restore interrupt state 1902 0965F DC405569 1903 CALLNP USEULB 09660 E508DF14 4 3 ZBM 1904 ST ULB R3,PSDFLTDIR set default directory 09661 60040002 0 IMM 1905 LD R0 FSPRIVMOD 09662 E408C044 0 3 ZBM 1906 ST R0 R3,PSDDIRPRIV assume modify access to logon dir 1907 09663 DC404549 1908 CALLNP GETDATE get current date 09664 E616C815 013 BASE 1909 ST2 R0 R3,PSHELDATE set hello time 1910 09665 EC16C004 3 CACH 1911 STZ R3,PSGRACE no grace yet 09666 EC16C810 3 BASE 1912 STZ R3,PSTIMEUSED can't have used time yet 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2103 (OPRSESSSTRT) F 131 OPREQ - Create a user session 09667 60041388 0 IMM 1913 LD R0 5*MSECSS allow 5 seconds 09668 E416C811 0 3 BASE 1914 ST R0 R3,PSTIMLIM give him a small amount of time 09669 EC16C812 3 BASE 1915 STZ R3,PSSESUSD no disk blocks used 0966A 6009218D 0 4 ZBM 1916 LD R0 ULB,ULDSKLIM get blocks used by account 0966B 1009118E 0 4 ZBM 1917 SUB R0 ULB,ULDSKUSD R0 = number of blocks we can still use 0966C 50040005 0 IMM 1918 MIN R0 5 but not more than five 0966D 54040000 0 IMM 1919 MAX R0 0 nor less than zero 0966E E416C813 0 3 BASE 1920 ST R0 R3,PSSESLIM save as initial session block limit 0966F EC16C814 3 BASE 1921 STZ R3,PSSESMAX 09670 D0001F02 1922 INC TERMCOUNT one more user exists 09671 EC120000 0 REG 1923 STZ R0 indicates no errors 1924 * \ / 1925 00009672 1926 TAKEOFF LABEL 09672 5D1F8001 6 STAK 1927 LEAVE POP and all done 1928 * --- 1929 1930 END LOGONPROC2 subroutine 1931 1932 END Create User Session 199 INPUT OPRPROCNUM process name table managers 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2104 (OPRPROCNUM) F 132 UREQ/OPREQ - Process Name Table Managers 3 4 BLOCK Process Name Managers 5 6 ENTRY UREQPNUM UREQ entry 7 ENTRY OPRPNUM OPREQ entry 8 ENTRY FLUSHPNUM clean up at logoff time 9 10 ********************************************************************************** 11 * * 12 * These routines implement the process name/number * 13 * facility with which a process can register a name so that * 14 * other processes can find out his process number. * 15 * * 16 ********************************************************************************** 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2105 (OPRPROCNUM) F 132 UREQ/OPREQ - Process Name Table Managers 18 19 ********************************************************************************** 20 * * 21 * UREQPNUM - Look up a name in the process name table. * 22 * * 23 * R2 = sub op code * 24 * R4 -> caller's CA * 25 * R4,CAR1 = name length * 26 * R4,CAR2 = name address * 27 * JMP UREQPNUM * 28 * R4,CAR1 = process number * 29 * * 30 * * 31 * Stack required = 14 * 32 * 12 + max ( FINDNAME (2), GETNAME (2), SRCHLIST (1), * 33 * UNSRCHLIST (1) ) * 34 * * 35 ********************************************************************************** 36 37 BLOCK UREQPNUM routine 38 ENTRY UREQPNUM 39 40 BEGFRAME2 00178800 6 BASE 41 NAMELEN BSS 1 length of name 42 BSSC PNAMEMAXLN the name 0017880B 6 BASE 43 CAPTR BSS 1 addr of caller's CA 44 ENDFRAME 45 00009673 46 UREQPNUM LABEL 09673 EC1F800C 6 STAK 47 STZ PUSH allocate stack frame 09674 FA8C59D8 2 48 JNEZ R2 UERRORILR jump if bad request code 09675 E517880B 4 6 BASE 49 ST R4 SP,CAPTR 09676 38178800 0 6 BASE 50 LEA R0 SP,NAMELEN get address for the name 09677 DC0096D6 51 CALL GETNAME copy the name to our area 09678 40160400 0 @R 52 PARL @R0 where to put it 09679 FA0C5988 0 53 JNEZ R0 UERROR jump if error 0967A DC0030AA 54 CALL SRCHLIST lock the list for searching 0967B 40001EA5 55 PARL PNAMELOCK 56 0967C 38178800 0 6 BASE 57 LEA R0 SP,NAMELEN point to length/string 0967D DC0096EB 58 CALL FINDNAME find the name in the list 0967E 40160400 0 @R 59 PARL @R0 name to look for 0967F FAF09686 3 60 JZA R3 NOTFOUND jump if not found 09680 6016C801 0 3 BASE 61 LD R0 R3,PNAMEPROC R0 = process number 09681 6117880B 4 6 BASE 62 LD R4 SP,CAPTR R4 = caller's CA 09682 E4170803 0 4 BASE 63 ST R0 R4,CAR1 give him the number 09683 DC0030B7 64 CALL UNSRCHLIST unlock the list 09684 40001EA5 65 PARL PNAMELOCK 09685 FE0E59D6 66 JMP NOERROR and all done 67 * --- 68 00009686 69 NOTFOUND LABEL 09686 DC0030B7 70 CALL UNSRCHLIST release the list 09687 40001EA5 71 PARL PNAMELOCK 09688 FE0E59E4 72 JMP UERRORNSE claim no such entry 73 * --- 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2106 (OPRPROCNUM) F 132 UREQ/OPREQ - Process Name Table Managers 74 75 END UREQPNUM routine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2107 (OPRPROCNUM) F 132 UREQ/OPREQ - Process Name Table Managers 77 78 ********************************************************************************** 79 * * 80 * OPRPNUM - Set/clear entries in processes name/number table. * 81 * * 82 * R2 = sub op code * 83 * R4 -> caller's CA * 84 * R4,CAR1 = name length * 85 * R4,CAR2 = name address * 86 * JMP OPRPNUM * 87 * * 88 * Stack required = 13 * 89 * 11 + max ( FINDNAME (2), GETNAME (2), LOCKLIST (1), * 90 * SFREEMEM (0), SGETMEM (0), UNLOCKLIST (1) ) * 91 * * 92 ********************************************************************************** 93 94 BLOCK OPRPNUM routine 95 ENTRY OPRPNUM 96 97 BEGFRAME2 00178800 6 BASE 98 NAMELEN BSS 1 length of the name 00178004 6 CACH 99 NAME BSSC PNAMEMAXLN the name 100 ENDFRAME 101 00009689 102 OPRPNUM LABEL 09689 68840002 2 IMM 103 UCPR R2 FUNCMAX is sub-op good? 0968A FE0659D8 104 JGE UERRORILR jumb if bad 0968B 61528000 5 2 REG 105 LD R5 R2 copy sub-op to safe register 0968C EC1F800B 6 STAK 106 STZ PUSH allocate the stack 107 0968D 38178800 0 6 BASE 108 LEA R0 SP,NAMELEN get address for name 0968E DC0096D6 109 CALL GETNAME copy name from user's buffer 0968F 40160400 0 @R 110 PARL @R0 09690 FA0C5988 0 111 JNEZ R0 UERROR jump if error 09691 DC003096 112 CALL LOCKLIST lock the list 09692 40001EA5 113 PARL PNAMELOCK 114 09693 38178800 0 6 BASE 115 LEA R0 SP,NAMELEN get pointer to length/string 09694 DC0096EB 116 CALL FINDNAME find entry with same name 09695 40160400 0 @R 117 PARL @R0 09696 5CAA9697 5 118 LDPC FUNCTAB(R5) go to the routine 119 * --- 120 00009697 121 FUNCTAB LABEL 09697 00009699 122 ADR SETNAME 0 - put name into table 09698 000096AE 123 ADR CLEARNAME 1 - remove max from table 00000002 ABS 124 FUNCMAX EQU DISPW FUNCTAB 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2108 (OPRPROCNUM) F 132 UREQ/OPREQ - Process Name Table Managers 126 127 ********************************************************************************** 128 * * 129 * SETNAME - Insert name into process name table * 130 * * 131 * R3 -> PNAME block * 132 * R4 -> predecessor * 133 * * 134 ********************************************************************************** 135 00009699 136 SETNAME LABEL 09699 FAF296AB 3 137 JNZA R3 DUPLICATE jump if already there 138 0969A DC002ED0 139 CALL SGETMEM get block for new name 0969B 40440004 IMM 140 PARVL PNAMELOG 0969C 60D20000 3 0 REG 141 LD R3 R0 R3 -> new block 0969D EC16C800 3 BASE 142 STZ R3,PNAMELINK clear link field 0969E 60000412 0 143 LD R0 CPPSA 0969F 60081F12 0 0 ZBM 144 LD R0 R0,PSPROCCB 096A0 600800C3 0 0 ZBM 145 LD R0 R0,PCPROCNUM 096A1 E416C801 0 3 BASE 146 ST R0 R3,PNAMEPROC save our process number 096A2 60578800 1 6 BASE 147 LD R1 SP,NAMELEN 096A3 E456C802 1 3 BASE 148 ST R1 R3,PNAMELEN save name length 096A4 38178004 0 6 CACH 149 LEA R0 SP,NAME 096A5 3896C00C 2 3 CACH 150 LEA R2 R3,PNAMENAME 096A6 FE400000 151 CMOVE copy name to block 096A7 E4D70800 3 4 BASE 152 ST R3 R4,PNAMELINK put us onto end of list 153 096A8 DC0030A4 154 CALL UNLOCKLIST release the lists 096A9 40001EA5 155 PARL PNAMELOCK 156 096AA FE0E59D6 157 JMP NOERROR return done 158 * --- 159 000096AB 160 DUPLICATE LABEL 096AB DC0030A4 161 CALL UNLOCKLIST release the list 096AC 40001EA5 162 PARL PNAMELOCK 096AD FE0E59DC 163 JMP UERRORNAE all done 164 * --- 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2109 (OPRPROCNUM) F 132 UREQ/OPREQ - Process Name Table Managers 166 167 ********************************************************************************** 168 * * 169 * CLEARNAME - Remove name from process name/number table. * 170 * Only removes name if it refers to the current process. * 171 * * 172 * R3 -> PNAME block * 173 * R4 -> predecessor * 174 * * 175 ********************************************************************************** 176 000096AE 177 CLEARNAME LABEL 096AE FAF096BC 3 178 JZA R3 NONE jump if not found 179 096AF 60000412 0 180 LD R0 CPPSA 096B0 60081F12 0 0 ZBM 181 LD R0 R0,PSPROCCB 096B1 600800C3 0 0 ZBM 182 LD R0 R0,PCPROCNUM R0 = our process number 096B2 6416C801 0 3 BASE 183 CPR R0 R3,PNAMEPROC does it match this table entry? 096B3 FE0C96BF 184 JNE NOTUS jump if not, error 185 096B4 6016C800 0 3 BASE 186 LD R0 R3,PNAMELINK pick up link to list remainder 096B5 E4170800 0 4 BASE 187 ST R0 R4,PNAMELINK remove us from the list 096B6 DC0030A4 188 CALL UNLOCKLIST release the list 096B7 40001EA5 189 PARL PNAMELOCK 096B8 DC002F5D 190 CALL SFREEMEM free the block 096B9 41440004 IMM 191 PARV PNAMELOG size 096BA 4052C000 3 REG 192 PARVL R3 address 096BB FE0E59D6 193 JMP NOERROR return, no error 194 * --- 195 000096BC 196 NONE LABEL name not found 096BC DC0030A4 197 CALL UNLOCKLIST free the list 096BD 40001EA5 198 PARL PNAMELOCK 096BE FE0E59E4 199 JMP UERRORNSE return 'no such entry' 200 * --- 201 000096BF 202 NOTUS LABEL name is not ours 096BF DC0030A4 203 CALL UNLOCKLIST release the list 096C0 40001EA5 204 PARL PNAMELOCK 096C1 FE0E59E0 205 JMP UERRORMNRP may not reference other process 206 * --- 207 208 END OPRPNUM routine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2110 (OPRPROCNUM) F 132 UREQ/OPREQ - Process Name Table Managers 210 211 ********************************************************************************** 212 * * 213 * FLUSHPNUM - Clear process name/number entries. * 214 * * 215 * This routine will clear any entries placed into the * 216 * Process Name Table by the current process. It is called at * 217 * logoff time. * 218 * * 219 * CALLNP FLUSHPNUM * 220 * * 221 * Eats R0:R4 * 222 * Stack required = 2 * 223 * 1 + max ( LOCKLIST (1), SFREEMEM (0), UNLOCKLIST (1) ) * 224 * * 225 ********************************************************************************** 226 227 BLOCK FLUSHPNUM subroutine 228 ENTRY FLUSHPNUM 229 230 BEGFRAME 231 ENDFRAME 232 096C2 DD5F8001 6 STAK 233 FLUSHPNUM ENTRNP PUSH 096C3 60800412 2 234 LD R2 CPPSA 096C4 60889F12 2 2 ZBM 235 LD R2 R2,PSPROCCB 096C5 608880C3 2 2 ZBM 236 LD R2 R2,PCPROCNUM R2 = my process number 096C6 DC003096 237 CALL LOCKLIST lock the list 096C7 40001EA5 238 PARL PNAMELOCK 239 096C8 60C01EA6 3 240 LD R3 PNAMELIST R3 -> first entry 096C9 61041EA6 4 IMM 241 LD R4 ADR PNAMELIST R4 -> previous 242 000096CA 243 LOOP LABEL 096CA 4896C801 2 3 BASE 244 RLSRCH R2 R3,PNAMEPROC find an entry 096CB FE0C96D3 245 JNE DONE jump if none 096CC 6016C800 0 3 BASE 246 LD R0 R3,PNAMELINK 096CD E4170800 0 4 BASE 247 ST R0 R4,PNAMELINK remove it from the list 248 096CE DC002F5D 249 CALL SFREEMEM free the block 096CF 41440004 IMM 250 PARV PNAMELOG 096D0 4052C000 3 REG 251 PARVL R3 096D1 60D70800 3 4 BASE 252 LD R3 R4,PNAMELINK R3 -> next one 096D2 FE0E96CA 253 JMP LOOP 254 * --- 255 000096D3 256 DONE LABEL 096D3 DC0030A4 257 CALL UNLOCKLIST free the list 096D4 40001EA5 258 PARL PNAMELOCK 096D5 5D1F8001 6 STAK 259 LEAVE POP and all done 260 * --- 261 262 END FLUSHPNUM subroutine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2111 (OPRPROCNUM) F 132 UREQ/OPREQ - Process Name Table Managers 264 265 ********************************************************************************** 266 * * 267 * GETNAME - Copy server name from user's buffer * 268 * * 269 * R4 -> Caller's console area * 270 * R4,CAR1 = name length * 271 * R4,CAR2 = name address * 272 * R4,CAMSR = caller's MSR * 273 * CALL GETNAME * 274 * PARL Where to put it (1 word length, then name) * 275 * R0 = 0 if OK, else error code * 276 * * 277 * May exit directly to PASSERRUP. * 278 * * 279 * Eats R0:R3 * 280 * Stack required = 2 * 281 * 1 + max ( CLRMEMTRAP (1), SETMEMTRAP (1) ) * 282 * * 283 ********************************************************************************** 284 285 BLOCK GETNAME subroutine 286 ENTRY GETNAME 287 288 BEGFRAME 289 ENDFRAME 290 096D6 DD1F8001 6 STAK 291 GETNAME ENTR PUSH 096D7 C0128000 2 REG 292 STPL R2 R2 -> where to put name 096D8 60570803 1 4 BASE 293 LD R1 R4,CAR1 R1 = length 096D9 68440028 1 IMM 294 UCPR R1 PNAMEMAXLN is it good? 096DA FE0496E9 295 JGT BADNAME jump if bad 096DB E4568400 1 2 @R 296 ST R1 @R2 save it 096DC DC005BCF 297 CALL SETMEMTRAP 096DD 40005B5F 298 PARL PASSERRUP 096DE 60568400 1 2 @R 299 LD R1 @R2 get length back in R1 096DF D0928000 2 REG 300 INCP R2 move to message place 096E0 60170804 0 4 BASE 301 LD R0 R4,CAR2 where to move from 096E1 60C40040 3 IMM 302 LD R3 MSRFRELOC fetch relocation bit 096E2 28D70801 3 4 BASE 303 BSUB R3 R4,CAMSR R3 = bit to clear, if any 096E3 5992C000 3 REG 304 CLBMSR R3 fetch from correct space 096E4 FE400000 305 CMOVE get the data 096E5 59C40040 IMM 306 IORMSR MSRFRELOC fix the MSR 096E6 DC405BD4 307 CALLNP CLRMEMTRAP turn off the memory trap 096E7 60040000 0 IMM 308 LD R0 0 good return code 000096E8 309 RETURN LABEL 096E8 5D1F8001 6 STAK 310 LEAVE POP 311 * --- 312 000096E9 313 BADNAME LABEL 096E9 60040082 0 IMM 314 LD R0 XREQERPOB parameter out of bounds 096EA FE0E96E8 315 JMP RETURN 316 * --- 317 318 END GETNAME subroutine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2112 (OPRPROCNUM) F 132 UREQ/OPREQ - Process Name Table Managers 320 321 ********************************************************************************** 322 * * 323 * FINDNAME - Find a PNAME block * 324 * * 325 * Searches the PNAMELIST for a particular block, by name. * 326 * PNAMELOCK must be held. * 327 * * 328 * CALL FINDNAME * 329 * PARL name location (1 word length, then name) * 330 * R3 -> PNAME block (0 if not found) * 331 * R4 -> predecessor (last one if not found) * 332 * * 333 * Eats R0:R4. * 334 * Stack required = 2 * 335 * * 336 ********************************************************************************** 337 338 BLOCK FINDNAME subroutine 339 ENTRY FINDNAME 340 341 BEGFRAME 00178801 6 BASE 342 NAMEPTR BSS 1 343 ENDFRAME 344 096EB DD1F8002 6 STAK 345 FINDNAME ENTR PUSH 096EC C0178801 6 BASE 346 STPL SP,NAMEPTR 347 096ED 60C01EA6 3 348 LD R3 PNAMELIST 096EE 61041EA6 4 IMM 349 LD R4 ADR PNAMELIST 350 000096EF 351 LOOP LABEL 096EF 60978801 2 6 BASE 352 LD R2 SP,NAMEPTR R2 -> name 096F0 60568400 1 2 @R 353 LD R1 @R2 R1 -> length of name 096F1 4856C802 1 3 BASE 354 RLSRCH R1 R3,PNAMELEN find entry with same name length 096F2 FE0C96F8 355 JNE RETURN jump if not found 096F3 D0928000 2 REG 356 INCP R2 R2 -> name text looking for 096F4 3816C00C 0 3 CACH 357 LEA R0 R3,PNAMENAME R0 -> name text in PNAME block 096F5 FE540000 358 CMS compare the strings 096F6 FE0296F8 359 JEQ RETURN jump if this one is ours 096F7 FAFA96EF 34 360 RLJNA R3 LOOP else try the next one 361 * \ / 362 000096F8 363 RETURN LABEL 096F8 5D1F8002 6 STAK 364 LEAVE POP all done 365 * --- 366 367 END FINDNAME subroutine 368 369 END Process Name Managers 200 INPUT XRQOPREQ2 more operator requests 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2113 (XRQOPREQ2) F 133 OPREQ - Terminal Control 3 4 ********************************************************************************** 5 * * 6 * These are the operator's terminal control requests. * 7 * * 8 * Stack required = 10 * 9 * 0 + max ( TERMALOW (0), TERMINFO (7), TERMINHIB (0), * 10 * TERMRESET (10), TERMWARN (4) ) * 11 * * 12 ********************************************************************************** 13 14 BLOCK OPRTERMCTL routine 15 ENTRY OPRTERMCTL 16 000096F9 17 OPRTERMCTL LABEL 096F9 68840005 2 IMM 18 UCPR R2 TERMCTLM request in range? 096FA FE0659D8 19 JGE ILLREQ jump if not 096FB 5CA496FC 2 20 LDPC TERMCTLJ(R2) goto routine 21 * --- 22 000096FC 23 TERMCTLJ LABEL 096FC 00009701 24 VFD ADR TERMINHIB inhibit terminal access 096FD 00009706 25 VFD ADR TERMALOW allow terminal access 096FE 00009722 26 VFD ADR TERMINFO get terminal information 096FF 0000970B 27 VFD ADR TERMWARN warn terminal user of system ending 09700 0000971D 28 VFD ADR TERMRESET reset terminal configuration 00000005 ABS 29 TERMCTLM EQU DISPW TERMCTLJ 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2114 (XRQOPREQ2) F 133 OPREQ - Terminal Control 31 32 ********************************************************************************** 33 * * 34 * Inhibit access to a terminal port. User call: * 35 * * 36 * LD R0 ORPINHIB * 37 * OPREQ port number * 38 * JLTZ R0 request.error * 39 * * 40 * Stack required = 0 * 41 * * 42 ********************************************************************************** 43 44 BLOCK TERMINHIB routine 45 ENTRY TERMINHIB 46 00009701 47 TERMINHIB LABEL 09701 61001F04 4 48 LD TCB TERMBASE TCB=> root of terminal list 09702 3CC90890 3 4 ZBM 49 LSRCH R3 TCB,TCTNUM find the specified terminal 09703 FE0C59E4 50 JNE UERRORNSE "No such entry" 09704 EDC91C10 4 ZBM 51 STW TCB,TCINHIB inhibit the terminal 09705 FE0E59D6 52 JMP NOERROR success 53 * --- 54 55 END TERMINHIB routine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2115 (XRQOPREQ2) F 133 OPREQ - Terminal Control 57 58 ********************************************************************************** 59 * * 60 * Allow access to a terminal (undo the effects of inhibit). * 61 * User call: * 62 * * 63 * LD R0 ORPALLOW * 64 * OPREQ port number * 65 * JLTZ R0 request error * 66 * * 67 * Stack required = 0 * 68 * * 69 ********************************************************************************** 70 71 BLOCK TERMALOW routine 72 ENTRY TERMALOW 73 00009706 74 TERMALOW LABEL 09706 61001F04 4 75 LD TCB TERMBASE no lock because never changes 09707 3CC90890 3 4 ZBM 76 LSRCH R3 TCB,TCTNUM find the requested port 09708 FE0C59E4 77 JNE UERRORNSE jump if "No such entry" 09709 EC091C10 4 ZBM 78 STZ TCB,TCINHIB remove any inhibiting 0970A FE0E59D6 79 JMP NOERROR success 80 * --- 81 82 END TERMALOW routine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2116 (XRQOPREQ2) F 133 OPREQ - Terminal Control 84 85 ********************************************************************************** 86 * * 87 * "Warn" a port then inhibit it. This is used to notify a * 88 * terminal user of impending system demise. For the moment, we * 89 * cannot send the message so Control Mode supplies a standard * 90 * message. Eventual user call: * 91 * * 92 * LD R0 ORPWARN * 93 * LD R1 length of message in chars * 94 * LD R2 char pointer to message * 95 * OPREQ port number * 96 * JLTZ R0 request error * 97 * * 98 * Stack required = 4 * 99 * 0 + max ( ROUST (4), SRCHLIST (1), UERRSETY (1), * 100 * UNSRCHLIST (1) ) * 101 * * 102 ********************************************************************************** 103 104 BLOCK TERMWARN routine 105 ENTRY TERMWARN 106 0000970B 107 TERMWARN LABEL 0970B 61001F04 4 108 LD TCB TERMBASE no lock because never changes 0970C 3CC90890 3 4 ZBM 109 LSRCH R3 TCB,TCTNUM find the requested port 0970D FE0C59E4 110 JNE UERRORNSE jump if no such port 0970E EDC91C10 4 ZBM 111 STW TCB,TCINHIB inhibit the port 0970F 61491F17 5 4 ZBM 112 LD R5 TCB,TCPCADRS get pointer to PCB 09710 FB7059D6 5 113 JZA R5 NOERROR if no session, no more work 09711 DC0030AA 114 CALL SRCHLIST see that PSA doesn't go away 09712 40001EB2 115 PARL PCNTLLOCK 09713 61495F13 5 5 ZBM 116 LD R5 R5,PCPSADRS get pointer to PSA 09714 FB70971A 5 117 JZA R5 NOWARN if no session, then no warn 09715 6084107D 2 IMM 118 LD R2 UINTOPRQ+CMERR operator request to CM 09716 60C40003 3 IMM 119 LD R3 UINTOPRQW subcode sez "warning" 09717 DC4035B5 120 CALLNP UERRSETY place the thing in the list 09718 60C91F17 3 4 ZBM 121 LD R3 TCB,TCPCADRS get the PCB pointer 09719 DC403569 122 CALLNP ROUST set him going 0000971A 123 NOWARN LABEL 0971A DC0030B7 124 CALL UNSRCHLIST release the session list 0971B 40001EB2 125 PARL PCNTLLOCK 0971C FE0E59D6 126 JMP NOERROR its done 127 * --- 128 129 END TERMWARN routine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2117 (XRQOPREQ2) F 133 OPREQ - Terminal Control 131 132 ********************************************************************************** 133 * * 134 * Reset a port's configuration. No matter what (even if the port * 135 * is busy) the configuration of the port is reset. User call: * 136 * * 137 * LD R0 ORPRESET * 138 * OPREQ oprtnum * 139 * JLTZ R0 request error * 140 * * 141 * Stack required = 10 * 142 * 0 + max ( RESETTERMX (10) ) * 143 * * 144 ********************************************************************************** 145 146 BLOCK TERMRESET routine 147 ENTRY TERMRESET 148 0000971D 149 TERMRESET LABEL 0971D 61001F04 4 150 LD TCB TERMBASE 0971E 3CC90890 3 4 ZBM 151 LSRCH R3 TCB,TCTNUM find the TCB 0971F FE0C59E4 152 JNE UERRORNSE 09720 DC409860 153 CALLNP RESETTERMX reset the configuration 09721 FE0E59D6 154 JMP NOERROR 155 * --- 156 157 END TERMRESET routine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2118 (XRQOPREQ2) F 133 OPREQ - Terminal Control 159 160 ********************************************************************************** 161 * * 162 * Get gobbs of information about the ports. Operator call: * 163 * * 164 * LD R0 ORPINFO * 165 * LD R1 length of buffer (in characters) * 166 * LD R2 buffer address * 167 * OPREQ portnum (0=self and -1 means all) * 168 * JLTZ R0 request error * 169 * * 170 * Stack required = 7 * 171 * 0 + max ( FINDTERMCB (1), GETPINFO (7) ) * 172 * * 173 ********************************************************************************** 174 175 BLOCK TERMINFO routine 176 ENTRY TERMINFO 177 00009722 178 TERMINFO LABEL 09722 FACC9727 3 179 JNEZ R3 OTHERSPEC jump if not self specification 09723 DC0035C5 180 CALL FINDTERMCB get the associated port 09724 40400412 181 PARVL CPPSA pass the current session 09725 FA7059E4 1 182 JZA R1 UERRORNSE jump if batch or so 09726 60C84890 3 1 ZBM 183 LD R3 R1,TCTNUM use the number of our port 00009727 184 OTHERSPEC LABEL 09727 FAC4972B 3 185 JGTZ R3 INDIVSPEC jump if specifying individual port 09728 FAEE59DA 3 186 JNEMW R3 UERRORPOB other flags are not acceptable 09729 61040000 4 IMM 187 LD TCB 0 indicate all ports desired 0972A FE0E9730 188 JMP FINDINFO jump to get information 189 * --- 190 0000972B 191 INDIVSPEC LABEL 0972B 68C40200 3 IMM 192 UCPR R3 MAXTERMNUM within range? 0972C FE0659DA 193 JGE UERRORPOB error if not 0972D 61001F04 4 194 LD TCB TERMBASE 0972E 3CC90890 3 4 ZBM 195 LSRCH R3 TCB,TCTNUM find TCB for port 0972F FE0C59E4 196 JNE UERRORNSE tell him it isn't here 197 * \ / 198 00009730 199 FINDINFO LABEL 09730 DC409733 200 CALLNP GETPINFO get info abort port specified in TCB 09731 FE0E5B5F 201 JMP PASSERRUP go pass the error up to the user 09732 FE0E59D6 202 JMP NOERROR return 203 * --- 204 205 END TERMINFO routine 206 207 END OPRTERMCTL routine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2119 (XRQOPREQ2) F 133 OPREQ - Terminal Control 209 210 ********************************************************************************** 211 * * 212 * GETPINFO. Routine to fetch information on one or all ports. * 213 * We assume that the users privilege to obtain this information * 214 * has been checked before this routine is called. * 215 * Call: * 216 * LD TCB * 217 * CALLNP GETPINFO * 218 * * 220 * * 221 * * 222 * Eats R0:R3 * 223 * Stack required = 7 * 224 * 6 + max ( SETMEMTRAP (1), SGETMEM (0), SFREEMEM (0) ). * 225 * * 226 ********************************************************************************** 227 228 BLOCK GETPINFO subroutine 229 ENTRY GETPINFO get info about a port or ports 230 231 BEGFRAME 00178801 6 BASE 232 POSLPORT BSS 1 last port processed (- if only port) 00178802 6 BASE 233 POSCOREA BSS 1 core addr in user's buffeer 00178803 6 BASE 234 POSBUFFR BSS 1 requester's buffer remaining 00178804 6 BASE 235 POSRELOC BSS 1 relocation of requester 00178805 6 BASE 236 SAVER5 BSS 1 temp for saving R5 237 ENDFRAME 238 239 * Format of port information returned 240 PORTINFORD LIST 240 ********************************************************************************** 240 * * 240 * Information returned by the port information request. * 240 * * 240 ********************************************************************************** 240 00009733 240 POPROTO BASE R0 000800F0 0 ZBM 240 POPORTNUM BSSB 32-17 the port being considered 00081F10 0 ZBM 240 POENTLEN BSSB 17 length of this entry in words 00080101 0 ZBM 240 POWORDZ BSSB 32/2 240 * EQU POWORDZ/BIT 31 unused 00081C11 0 ZBM 240 POINTER EQU POWORDZ/BIT 30 "interactive terminal" 00081A11 0 ZBM 240 PODIALUP EQU POWORDZ/BIT 29 dialup port 00081811 0 ZBM 240 POINHIB EQU POWORDZ/BIT 28 port is inhibited 00081611 0 ZBM 240 PORFP EQU POWORDZ/BIT 27 remote front panel port 00082101 0 ZBM 240 POPROCNUM BSSB 32/2 session number (zero if none) 00160802 0 BASE 240 POIBAUD BSS 1 input baud rate 00160803 0 BASE 240 POOBAUD BSS 1 output baud rate 00160804 0 BASE 240 POTTYPE BSS 1 *old* terminal "type" (use POTERMTYPE) 00160805 0 BASE 240 POICNT BSS 1 input character count 00160806 0 BASE 240 POOCNT BSS 1 output character count 0016001C 0 CACH 240 POINTSTATE BSSC 1 interface state 0016001D 0 CACH 240 POLASTST BSSC 1 last status from PORT 0016001E 0 CACH 240 POLASTCOM BSSC 1 last command sent to PORT 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2120 (XRQOPREQ2) F 133 OPREQ - Terminal Control 0016001F 0 CACH 240 POCIAPORT BSSC 1 actual port number on CIA 00160808 0 BASE 240 POTIMECNT BSS 1 timing count 00160809 0 BASE 240 POSITE BSS 2 site name for terminal (pak12) 0016080B 0 BASE 240 POTERMTYPE BSS 2 terminal type (pak12) 240 DRCT 0000000D ABS 240 POLENGTH EQU DISPW POPROTO 00000004 ABS 240 POLOG EQU POLENGTH LOG 2 240 ORG POPROTO reclaim the space 241 242 ********************************************************************************** 243 * * 244 * Since we can get page faults while storing into the user's * 245 * memory, we copy the information into a temp block and then * 246 * move the contents of the temp block into the user's memory * 247 * when all of the lists are unlocked. * 248 * * 249 ********************************************************************************** 250 09733 DD5F8006 6 STAK 251 GETPINFO ENTRNP PUSH 09734 E5578805 5 6 BASE 252 ST R5 SP,SAVER5 save R5 09735 60C00412 3 253 LD R3 CPPSA get PSA pointer 09736 60C8DF11 3 3 ZBM 254 LD R3 R3,PSCACHNP1 get console area pointer 09737 6008C3F3 0 3 ZBM 255 LD R0 R3,CAR1/BITS 1:31 get buffer size 09738 E4178803 0 6 BASE 256 ST R0 SP,POSBUFFR 09739 6016C804 0 3 BASE 257 LD R0 R3,CAR2 get buffer address 0973A E4178802 0 6 BASE 258 ST R0 SP,POSCOREA 0973B 6016C801 0 3 BASE 259 LD R0 R3,CAMSR get relocation bits 0973C 78040080 0 IMM 260 AND R0 MSRSRELOC 0973D 74040080 0 IMM 261 XOR R0 MSRSRELOC make the bit if to change 0973E E4178804 0 6 BASE 262 ST R0 SP,POSRELOC remember the bit to clear 263 * \ / 264 265 * Get the information temp block 0973F DC002ED0 266 CALL UGETMEM get the temp block 09740 40440004 IMM 267 PARVL POLOG 09741 61520000 5 0 REG 268 LD R5 R0 R5 points to the block 09742 DC005BCF 269 CALL SETMEMTRAP catch memory errors 09743 40009790 270 PARL USERMEMBAD 271 * \ / 272 273 * Process a port 09744 D1578801 6 BASE 274 STMW SP,POSLPORT indicate single port info 09745 FB049753 4 275 JGTZ TCB TRYTHIS1 jump if TCB supplied 09746 60C40000 3 IMM 276 LD R3 0 indicate all ports are to be processed 00009747 277 NEXTPORT LABEL 09747 61040000 4 IMM 278 LD TCB 0 indicate nothing found yet 09748 60840200 2 IMM 279 LD R2 MAXTERMNUM largest port number 09749 60401F04 1 280 LD R1 TERMBASE no lock because it never changes 0000974A 281 LOOPINTCB LABEL 0974A 64C84890 3 1 ZBM 282 CPR R3 R1,TCTNUM greater then last? 0974B FE069750 283 JGE NOTTHIS1 if not then already done 0974C 64884890 2 1 ZBM 284 CPR R2 R1,TCTNUM less than the last known max? 0974D FE0A9750 285 JLE NOTTHIS1 we wish the smallest greater then last 0974E 60884890 2 1 ZBM 286 LD R2 R1,TCTNUM this is a new candidate 0974F 61124000 4 1 REG 287 LD TCB R1 remember this one 00009750 288 NOTTHIS1 LABEL 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2121 (XRQOPREQ2) F 133 OPREQ - Terminal Control 09750 FA76974A 1 289 LJNA R1 LOOPINTCB get pointer to the next one 290 * \ / 291 09751 FB309786 4 292 JZA TCB PODONE any greater then last? 09752 E4978801 2 6 BASE 293 ST R2 SP,POSLPORT if so remember him 00009753 294 TRYTHIS1 LABEL 09753 60890890 2 4 ZBM 295 LD R2 TCB,TCTNUM pick up port number 09754 E48940F0 2 5 ZBM 296 ST R2 R5,POPORTNUM 09755 60091F17 0 4 ZBM 297 LD R0 TCB,TCPCADRS get the PCB pointer 09756 FA309758 0 298 JZA R0 NOPROCHERE jump if no session 09757 600800C3 0 0 ZBM 299 LD R0 R0,PCPROCNUM fetch the session number 00009758 300 NOPROCHERE LABEL 09758 E4096101 0 5 ZBM 301 ST R0 R5,POPROCNUM save the session number 09759 EC094101 5 ZBM 302 STZ R5,POWORDZ zero the flags 0975A EDC95C11 5 ZBM 303 STW R5,POINTER all terms interactive for now 0975B 5C090019 4 ZBM 304 CMZ TCB,TCMODEM 0975C ED895A11 5 ZBM 305 STLNE R5,PODIALUP is this a dialup port? 0975D 5C091C10 4 ZBM 306 CMZ TCB,TCINHIB is this an inhibited port? 0975E ED895811 5 ZBM 307 STLNE R5,POINHIB 0975F 5C091A10 4 ZBM 308 CMZ TCB,TCRFP is this the SSU terminal? 09760 ED895611 5 ZBM 309 STLNE R5,PORFP 09761 600900F1 0 4 ZBM 310 LD R0 TCB,TCIRATE 09762 E4174802 0 5 BASE 311 ST R0 R5,POIBAUD return input baud rate 09763 60091EF1 0 4 ZBM 312 LD R0 TCB,TCORATE 09764 E4174803 0 5 BASE 313 ST R0 R5,POOBAUD return output baud rate 09765 62170819 014 BASE 314 LD2 R0 TCB,TCTERMTYPE(0) 09766 E617480B 015 BASE 315 ST2 R0 R5,POTERMTYPE return terminal type 316 * this is temporary until no longer needed 09767 E4174804 0 5 BASE 317 ST R0 R5,POTTYPE return terminal "type" 09768 600922FB 0 4 ZBM 318 LD R0 TCB,TCTTICNT 09769 E4174805 0 5 BASE 319 ST R0 R5,POICNT return input char count 0976A 600900FA 0 4 ZBM 320 LD R0 TCB,TCTTOCNT 0976B E4174806 0 5 BASE 321 ST R0 R5,POOCNT return output char count 0976C 60090249 0 4 ZBM 322 LD R0 TCB,TCINTSTATE 0976D E417401C 0 5 CACH 323 ST R0 R5,POINTSTATE return current state 0976E 60092289 0 4 ZBM 324 LD R0 TCB,TCLASTST 0976F E417401D 0 5 CACH 325 ST R0 R5,POLASTST return last status 09770 60170012 0 4 CACH 326 LD R0 TCB,TCLASTCOM 09771 E417401E 0 5 CACH 327 ST R0 R5,POLASTCOM return last command 09772 6017000F 0 4 CACH 328 LD R0 TCB,TCCIAPORT 09773 E417401F 0 5 CACH 329 ST R0 R5,POCIAPORT return actual port number 09774 70170817 0 4 BASE 330 LDN R0 TCB,TCTIMECNT 09775 E4174808 0 5 BASE 331 ST R0 R5,POTIMECNT return current timing count 09776 6217081B 014 BASE 332 LD2 R0 TCB,TCSITE 09777 E6174809 015 BASE 333 ST2 R0 R5,POSITE return terminal site name 334 * \ / 335 09778 60440034 1 IMM 336 LD R1 POLENGTH*CPW long length in chars 09779 64578803 1 6 BASE 337 CPR R1 SP,POSBUFFR will this fit in buffer? 0977A FE049786 338 JGT PODONE jump if it will not 0977B B0578803 1 6 BASE 339 RSBM R1 SP,POSBUFFR remove amount used 0977C 60978802 2 6 BASE 340 LD R2 SP,POSCOREA r2=destination 0977D 600A41E0 0 1 CBM 341 LD R0 R1/BITS 0:29 get length of entry in words 0977E E4095F10 0 5 ZBM 342 ST R0 R5,POENTLEN return it in the block 0977F 60134000 0 5 REG 343 LD R0 R5 R0=source 09780 59978804 6 BASE 344 CLBMSR SP,POSRELOC map memory to the requester 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2122 (XRQOPREQ2) F 133 OPREQ - Terminal Control 09781 FE400000 345 CMOVE return the information 09782 59C40080 IMM 346 IORMSR MSRSRELOC back to the monitor 09783 E4978802 2 6 BASE 347 ST R2 SP,POSCOREA remember next memory location 348 * \ / 349 350 * Check for more to do. 09784 60D78801 3 6 BASE 351 LD R3 SP,POSLPORT get the last port 09785 FAC49747 3 352 JGTZ R3 NEXTPORT jump if doing many 353 * \ / 354 355 * Do end processing 00009786 356 PODONE LABEL 09786 DC002F5D 357 CALL UFREEMEM return the temp block 09787 41440004 IMM 358 PARV POLOG 09788 40534000 5 REG 359 PARVL R5 09789 61000412 4 360 LD R4 CPPSA 0978A 61091F11 4 4 ZBM 361 LD R4 R4,PSCACHNP1 R4 => caller's registers 0978B 60178803 0 6 BASE 362 LD R0 SP,POSBUFFR 0978C E4170803 0 4 BASE 363 ST R0 R4,CAR1 return buffer remaining 0978D 19C40001 7 IMM 364 ADD R7 1 move to second return - successful 0000978E 365 POEXIT LABEL 0978E 61578805 5 6 BASE 366 LD R5 SP,SAVER5 restore R5 0978F 5D1F8006 6 STAK 367 LEAVE POP return 368 * --- 369 370 ********************************************************************************** 371 * * 372 * Come here if memory error (probably memory protect violation). * 373 * Release the temp block and pass the error to the caller's * 374 * controller. * 375 * * 376 ********************************************************************************** 377 00009790 378 USERMEMBAD LABEL 09790 E61F8002 016 STAK 379 ST2 R0 STAK SP,2 save the error parameters 09791 DC002F5D 380 CALL UFREEMEM free the temp block 09792 41440004 IMM 381 PARV POLOG 09793 40534000 5 REG 382 PARVL R5 09794 621F8002 016 STAK 383 LD2 R0 STAK SP,2 get the error params back 09795 FE0E978E 384 JMP POEXIT return to caller 385 * --- 386 387 END GETPINFO subroutine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2123 (XRQOPREQ2) F 133 OPREQ - Terminal Control 389 390 ********************************************************************************** 391 * * 392 * INITTERM. Routine that initalizes a TCB from the * 393 * terminal configuration file. The routine is passed a lun * 394 * equipped to the config file and a pointer to a TCB to be * 395 * initialized. A problem might be encountered because the TCB * 396 * goes through an intermediate state that may cause funny * 397 * output and input if the port is in use but it shouldn't be * 398 * busy when this is done. If the config file doesn't exist * 399 * (the lun passed <=0) or if an attribute is not specified in * 400 * the file, the default value is used. * 401 * Call: * 402 * * 403 * LD R4 =>TCB * 404 * LD SP => stack top * 405 * CALL INITTERM initialize the terminal * 406 * PARVL lun (<=0 if no config file) * 407 * * 408 * Eats R0:R3. * 409 * Stack required = 6 * 410 * 4 + max ( CALCSUSP (1), CALCTERMC (2), LOCKWAIT (0), * 411 * SFREEMEM (0), SGETMEM (0) ) * 412 * * 413 ********************************************************************************** 414 415 BLOCK INITTERM subroutine 416 ENTRY INITTERM 417 418 BEGFRAME 00178801 6 BASE 419 INITTLUN BSS 1 lun passed 00178802 6 BASE 420 SAVER5 BSS 1 saves R5 00178803 6 BASE 421 TMPAREA BSS 1 422 ENDFRAME 423 09796 DD1F8004 6 STAK 424 INITTERM ENTR PUSH 09797 C0578801 6 BASE 425 STPVL SP,INITTLUN 09798 E5578802 5 6 BASE 426 ST R5 SP,SAVER5 save this register 09799 DC002ED0 427 CALL UGETMEM get a temp area 0979A 40440006 IMM 428 PARVL PCLENGTH LOG 2 0979B 61520000 5 0 REG 429 LD R5 R0 R5 => temp block 0979C 5C178801 6 BASE 430 CMZ SP,INITTLUN does the config file exist? 0979D FE0A97ED 431 JLE DEFAULTALL if not, all default 432 * \ / 0979E 60040090 0 IMM 433 LD R0 FRPOSITION 0979F 60440004 1 IMM 434 LD R1 PCPLENGTH 097A0 08978801 6 BASE 435 FREQ SP,INITTLUN move to the blocking info 097A1 FA0897ED 0 436 JLTZ R0 INITERR jump if the file won't take it 097A2 60040031 0 IMM 437 LD R0 FRREADB 097A3 60440008 1 IMM 438 LD R1 2*CPW 097A4 38974800 2 5 BASE 439 LEA R2 R5,0 097A5 08978801 6 BASE 440 FREQ SP,INITTLUN read in the blocking info 097A6 FA0897ED 0 441 JLTZ R0 INITERR 442 * \ / 097A7 60490890 1 4 ZBM 443 LD R1 TCB,TCTNUM get the port number for this TCB 097A8 1C574800 1 5 BASE 444 MUL R1 R5,0 make offset to this ports information 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2124 (XRQOPREQ2) F 133 OPREQ - Terminal Control 097A9 18574801 1 5 BASE 445 ADD R1 R5,1 R1=base of this term's info 446 * This is only a temporary instruction for terminal names 097AA E4578803 1 6 BASE 447 ST R1 SP,TMPAREA 097AB 60040090 0 IMM 448 LD R0 FRPOSITION 097AC 08978801 6 BASE 449 FREQ SP,INITTLUN position to this terms info 097AD FA0897ED 0 450 JLTZ R0 INITERR 097AE 60040031 0 IMM 451 LD R0 FRREADB 097AF 604400F0 1 IMM 452 LD R1 PCLENGTH*CPW 097B0 60934000 2 5 REG 453 LD R2 R5 097B1 08978801 6 BASE 454 FREQ SP,INITTLUN read in the term's info 097B2 FA0897ED 0 455 JLTZ R0 INITERR 000097B3 456 DEFAULTIT LABEL 097B3 60C40012 3 IMM 457 LD R3 GPPARMLEN-1 458 * \ / 459 460 ********************************************************************************** 461 * Main loop to initialize all fields * 462 ********************************************************************************** 463 464 * \ / 000097B4 465 INITTLOOP LABEL 097B4 5D6697F1 3 466 XCT GETPARM(R3) LD R0 R5,PCxxxx 467 468 * Test for attributes that have no defaults 097B5 64C40010 3 IMM 469 CPR R3 GETPARMTT is this a request for terminal type? 470 * JEQ NOTINITX jump if so, always specified 097B6 FE0297D3 471 JEQ TMPINTYP 097B7 64C40012 3 IMM 472 CPR R3 GETPARMSITE doing the site stuff? 097B8 FE0297C0 473 JEQ NOTINITX always specified if so 474 475 * Bit 0 set is flag to say whether to use default value 097B9 FA0697E3 0 476 JGEZ R0 NOTINIT jump if the attribute is not specified 097BA 28030000 0 IMM 477 BSUB R0 080000000 remove the "present" flag 478 479 * Do not allow us to set a baud rate of 0!!! 480 * This check works as long as there are no other 481 * fields below us in the GETPARM record 097BB 64C40001 3 IMM 482 CPR R3 GETPARMBR setting in- or out- baudrate? 097BC FE0497BE 483 JGT BAUDRATEOK jump if not 097BD FA0297E3 0 484 JEQZ R0 NOTINIT if 0, use default value 000097BE 485 BAUDRATEOK LABEL 486 * \ / 487 488 * Check for value too great or negative 097BE 68269804 0 3 489 UCPR R0 MAXPARM(R3) check for allowable value 097BF FE0497E3 490 JGT NOTINIT go use default if value bad in file 491 * \ / 492 493 * Put the value in the control block 000097C0 494 NOTINITX LABEL 097C0 5D66982D 3 495 XCT PUTPARM(R3) ST R0 TCB,TCxxxx 097C1 FAE697B4 3 496 JDR R3 INITTLOOP do all of the attributes 497 * \ / 498 499 ********************************************************************************** 500 * Done with all other fields, copy in terminating character set * 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2125 (XRQOPREQ2) F 133 OPREQ - Terminal Control 501 ********************************************************************************** 502 503 * \ / 097C2 3817480D 0 5 BASE 504 LEA R0 R5,PCTERMA array in our buffer 097C3 60440020 1 IMM 505 LD R1 (256/WORDLNTH)*CPW size of array 097C4 3897080F 2 4 BASE 506 LEA R2 TCB,TCTERMA spot in TCB for array 097C5 FE400000 507 CMOVE move over the term char array 508 PLOCK TCB,TCLOCK get access to TCB 097C6 0CC00000 508 IOFF 097C7 D1D70818 4 BASE 508 SETT TCB,TCLOCK 097C8 FE0C97CA 508 JNE MA(2+DISPW MA 0) 097C9 DC40308B 508 CALLNP LOCKWAIT 097CA DC404CA6 509 CALLNP CALCTERMC find any terminators 510 PUNLOCK TCB,TCLOCK release TCB 097CB EC170818 4 BASE 510 STZ TCB,TCLOCK 097CC 0C800000 510 ION 511 * Giveuint? 097CD DC407A7F 512 CALLNP CALCSUSP calculate terminal suspend bounds 513 * \ / 514 515 * Clean up and leave 097CE DC002F5D 516 CALL UFREEMEM release the piece of free storage 097CF 41440006 IMM 517 PARV PCLENGTH LOG 2 097D0 40534000 5 REG 518 PARVL R5 097D1 61578802 5 6 BASE 519 LD R5 SAVER5 restore this register 097D2 5D1F8004 6 STAK 520 LEAVE POP 521 * --- 522 523 * The following code is temporary. Since the terminal name has 524 * been expanded to 12 characters: Here we check if the terminal 525 * name is null, if so we pick up the old name and put it into the 526 * first word of the new name. Presto automatic pak12 representation. 527 000097D3 528 TMPINTYP LABEL 097D3 5C001C6B 529 CMZ BOOTFLAG if not booting, skip this crap 097D4 FE0297C0 530 JEQ NOTINITX go about our business 097D5 FA1C97C0 01 531 JNEZ2 R0 NOTINITX jump if already specified 097D6 6017480B 0 5 BASE 532 LD R0 R5,PCTERMT here we get the old value 097D7 E417482E 0 5 BASE 533 ST R0 R5,PCTERMTYPE and now becomes the new value 097D8 60040090 0 IMM 534 LD R0 FRPOSITION need to reposition ourselves 097D9 60578803 1 6 BASE 535 LD R1 SP,TMPAREA 097DA 08978801 6 BASE 536 FREQ SP,INITTLUN move back to where we started 097DB FA0897C0 0 537 JLTZ R0 NOTINITX ignore if any problems 097DC 60040042 0 IMM 538 LD R0 FRWRITEB write back any changes 097DD 604400F0 1 IMM 539 LD R1 PCLENGTH*CPW 097DE 60934000 2 5 REG 540 LD R2 R5 097DF 08978801 6 BASE 541 FREQ SP,INITTLUN 097E0 FA0897EC 0 542 JLTZ R0 INITSTOP 097E1 6217482E 015 BASE 543 LD2 R0 R5,PCTERMTYPE we must restore this value 097E2 FE0E97C0 544 JMP NOTINITX jump to set the TCB 545 * --- 546 547 * The attribute is not specified in the file -- use the default. 000097E3 548 NOTINIT LABEL 097E3 64C40005 3 IMM 549 CPR R3 GETPARMIP interface proto? 097E4 FE0297E7 550 JEQ DEFAULTIP 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2126 (XRQOPREQ2) F 133 OPREQ - Terminal Control 551 * \ / 097E5 5D66981A 3 552 XCT DFLTPARM(R3) LD R0 xxxx 097E6 FE0E97C0 553 JMP NOTINITX 554 * --- 555 556 * If not specified, IPROTO defaults to PCPNONE if not master, 557 * otherwise PCP103H 558 000097E7 559 DEFAULTIP LABEL 097E7 60040000 0 IMM 560 LD R0 PCPNONE assume I didn't do anything 097E8 5C090019 4 ZBM 561 CMZ TCB,TCMODEM a modem here? 097E9 FE0297C0 562 JEQ NOTINITX jump if not 097EA 60040002 0 IMM 563 LD R0 PCP103H assume 103 handshake 097EB FE0E97C0 564 JMP NOTINITX 565 * --- 566 000097EC 567 INITSTOP LABEL 097EC 00827008 568 STOP STOPB7008 couldn't write to terminal.config file 569 * No file, use all defaults 000097ED 570 DEFAULTALL LABEL 097ED 60934000 2 5 REG 571 LD R2 R5 097EE 604400F0 1 IMM 572 LD R1 PCLENGTH*CPW 097EF FE580000 573 CFILL 0 make the whole block "unspecified" 097F0 FE0E97B3 574 JMP DEFAULTIT 575 * --- 576 577 * One of the FREQs failed. Set all defaults. 000097ED 578 INITERR EQU DEFAULTALL 579 580 * XCT table to get values from file in-buffer 000097F1 581 GETPARM BASE 097F1 60174800 0 5 BASE 582 LD R0 R5,PCIBAUD MUST preceed GETPARMBR, and be offset 0 .... 097F2 60174801 0 5 BASE 583 GETPARMBR LD R0 R5,PCOBAUD ... see comments top of INITTLOOP 097F3 60174827 0 5 BASE 584 LD R0 R5,PCIXOFF 097F4 60174802 0 5 BASE 585 LD R0 R5,PCFUNCT 097F5 60174829 0 5 BASE 586 LD R0 R5,PCTSMTR 097F6 60174828 0 5 BASE 587 GETPARMIP LD R0 R5,PCFPROTO 097F7 60174803 0 5 BASE 588 LD R0 R5,PCCARW 097F8 60174804 0 5 BASE 589 LD R0 R5,PCHEIGHT 097F9 60174805 0 5 BASE 590 LD R0 R5,PCCRD 097FA 60174806 0 5 BASE 591 LD R0 R5,PCLFD 097FB 60174807 0 5 BASE 592 LD R0 R5,PCFFD 097FC 6017482A 0 5 BASE 593 LD R0 R5,PCHTD 097FD 60174808 0 5 BASE 594 LD R0 R5,PCBKSPC 097FE 60174809 0 5 BASE 595 LD R0 R5,PCLKILLC 097FF 6017482B 0 5 BASE 596 LD R0 R5,PCBRCH 09800 6017480A 0 5 BASE 597 LD R0 R5,PCECHOM 09801 6217482E 015 BASE 598 GETPARMTT LD2 R0 R5,PCTERMTYPE 09802 6017480C 0 5 BASE 599 LD R0 R5,PCTERMG 09803 6217482C 015 BASE 600 GETPARMSITE LD2 R0 R5,PCSITE 601 DRCT 00000013 ABS 602 GPPARMLEN EQU DISPW GETPARM 603 604 * Table of maximum values for fields 00009804 605 MAXPARM LABEL 09804 00004B00 606 VFD 19200 max input baud 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2127 (XRQOPREQ2) F 133 OPREQ - Terminal Control 09805 00004B00 607 VFD 19200 max output baud 09806 00000001 608 VFD 1 bit indicates XOFF port on full input buffer 09807 000000FF 609 VFD 0FF secondary port command 09808 000000FF 610 VFD 0FF primary port command 09809 00000002 611 VFD 2 interface protocol 0980A 000000FF 612 VFD 0FF screen width 0980B 000000FF 613 VFD 0FF screen height 0980C 00000FFF 614 VFD 0FFF CR delay 0980D 00000FFF 615 VFD 0FFF LF delay 0980E 00000FFF 616 VFD 0FFF FF delay 0980F 00000FFF 617 VFD 0FFF HT delay 09810 000000FF 618 VFD 0FF bksp character 09811 000000FF 619 VFD 0FF line cancel character 09812 000000FF 620 VFD 0FF 'break' character 09813 00000003 621 VFD 3 echo mode 09814 FFFFFFFF 622 VFD 0FFFFFFFF terminal type 09815 00000003 623 VFD 3 terminating character group 09817 FFFFFFFF 624 VFD 0FFFFFFFF,0FFFFFFFF site name 09819 FFFFFFFF 625 VFD 0FFFFFFFF,0FFFFFFFF terminal type 626 627 * XCT table to get default parameter values. 0000981A 628 DFLTPARM LABEL 0981A 6004012C 0 IMM 629 LD R0 300 input baud rate 0981B 6004012C 0 IMM 630 LD R0 300 output baud rate 0981C 60040000 0 IMM 631 LD R0 0 don't XOFF port 0981D 60040030 0 IMM 632 LD R0 1*PCFBRKOUT+1*PCFRDE 0981E 60040068 0 IMM 633 LD R0 1*PCTRTS+1*PCTDTR+1*PCTCARD 0981F 60040000 0 IMM 634 LD R0 PCPNONE interface protocol 09820 60040000 0 IMM 635 LD R0 0 screen width 09821 60040000 0 IMM 636 LD R0 0 screen height 09822 60040000 0 IMM 637 LD R0 0 CR delay 09823 60040000 0 IMM 638 LD R0 0 LF delay 09824 60040000 0 IMM 639 LD R0 0 FF delay 09825 60040000 0 IMM 640 LD R0 0 HT delay 09826 60040008 0 IMM 641 LD R0 BS backspace character 09827 60040018 0 IMM 642 LD R0 CAN line cancel character 09828 60040000 0 IMM 643 LD R0 0 "break" character 09829 60040001 0 IMM 644 LD R0 1 echo mode 0982A 62040000 01 IMM 645 LD2 R0 0 terminal type 0982B 60040000 0 IMM 646 LD R0 0 terminating character group 0982C 62040000 01 IMM 647 LD2 R0 0 site name 648 649 * XCT table to put values into TCB. 0000982D 650 PUTPARM LABEL 0982D E40900F1 0 4 ZBM 651 ST R0 TCB,TCIRATE 0982E E4091EF1 0 4 ZBM 652 ST R0 TCB,TCORATE 0982F E4091015 0 4 ZBM 653 ST R0 TCB,TCXOFFIQ 09830 E4170013 0 4 CACH 654 ST R0 TCB,TCLASTCOM2 09831 E4170012 0 4 CACH 655 ST R0 TCB,TCLASTCOM 09832 E4093C28 0 4 ZBM 656 ST R0 TCB,TCINTPROTO 09833 E4170010 0 4 CACH 657 ST R0 TCB,TCCRWIDTH 09834 E4170011 0 4 CACH 658 ST R0 TCB,TCSCRNHTH 09835 E40928C2 0 4 ZBM 659 ST R0 TCB,TCCRDELAY 09836 E40900C3 0 4 ZBM 660 ST R0 TCB,TCLFDELAY 09837 E40918C3 0 4 ZBM 661 ST R0 TCB,TCFFDELAY 09838 E40900C8 0 4 ZBM 662 ST R0 TCB,TCHTDELAY 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2128 (XRQOPREQ2) F 133 OPREQ - Terminal Control 09839 E4091077 0 4 ZBM 663 ST R0 TCB,TCBKSPC 0983A E4091076 0 4 ZBM 664 ST R0 TCB,TCLKILLC 0983B E4170018 0 4 CACH 665 ST R0 TCB,TCBRCH 0983C E4093C21 0 4 ZBM 666 ST R0 TCB,TCECHO 0983D E6170819 014 BASE 667 ST2 R0 TCB,TCTERMTYPE 0983E E409083D 0 4 ZBM 668 ST R0 TCB,TCTERMGRP 0983F E617081B 014 BASE 669 ST2 R0 TCB,TCSITE 670 671 END INITTERM subroutine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2129 (XRQOPREQ2) F 133 OPREQ - Terminal Control 673 674 ********************************************************************************** 675 * * 676 * RESETTERM. Routine that given a TCB will read the * 677 * configuration file and reset the terminal config. The * 678 * configuration file is equipped and the information is * 679 * copied into the TCB and then the information is sent * 680 * to the CIA. * 681 * Call: * 682 * * 683 * LD R4 =>TCB * 684 * CALLNP RESETTERM * 685 * * 686 * Eats R0:R3. * 687 * Stack required = 10 * 688 * 2 + max ( FLUSHIQ (2), INITTERM (6), OUTTSET (8), * 689 * OUTTSETX (8) ) * 690 * * 691 ********************************************************************************** 692 693 BLOCK RESETTERM subroutine 694 ENTRY RESETTERM reset term to initial condition 695 ENTRY RESETTERMX reset term to initial now 696 ENTRY TERMINITF 697 00000010 BYTE 698 RSTTRMZAP EQU BIT 0 bit in R7, one sez force reset now 699 BEGFRAME 00178801 6 BASE 700 RSTTRMLUN BSS 1 the lun the file is equiped to 701 ENDFRAME 702 09840 DD5F8002 6 STAK 703 RESETTERM ENTRNP PUSH 09841 EC0BC010 7 CBM 704 STZ R7/RSTTRMZAP zero sez to just queue reset info 00009842 705 RSTTRMSHR LABEL 09842 60040122 0 IMM 706 LD R0 URFREELUN 09843 090400C8 IMM 707 UREQ LUNCMLOW-1 find a free lun 09844 FA089853 0 708 JLTZ R0 FILEJUNK 09845 E4578801 1 6 BASE 709 ST R1 SP,RSTTRMLUN save the lun number 09846 60040261 0 IMM 710 LD R0 FRNOPENR get request for open 09847 62409857 12 711 LD2 R1 TERMINITF get pointer and length for file name 09848 08978801 6 BASE 712 FREQ SP,RSTTRMLUN try to equip to the config file 09849 FA089853 0 713 JLTZ R0 FILEJUNK 714 * \ / 0000984A 715 RSTTRMDFLT LABEL 0984A 60D78801 3 6 BASE 716 LD R3 SP,RSTTRMLUN get the lun into the reg to pass 0984B DC009796 717 CALL INITTERM copy the info into the TCB 0984C 4052C000 3 REG 718 PARVL R3 0984D 60040060 0 IMM 719 LD R0 FRUNEQUIP 0984E 08978801 6 BASE 720 FREQ SP,RSTTRMLUN unequip the config file 0984F F7C09855 7 721 JBT R7/RSTTRMZAP DORSTZAP jump to force immediate reset 09850 DC404A85 722 CALLNP OUTTSET send info to CIA 723 * \ / 09851 DC404AF8 724 CALLNP FLUSHIQ remove any garbage still in input queue 09852 5D1F8002 6 STAK 725 LEAVE POP 726 * --- 727 728 * The initialization file doesn't like us. Set all defaults. 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2130 (XRQOPREQ2) F 133 OPREQ - Terminal Control 00009853 729 FILEJUNK LABEL 09853 D1578801 6 BASE 730 STMW SP,RSTTRMLUN impossible lun number 09854 FE0E984A 731 JMP RSTTRMDFLT 732 * --- 733 734 * The reset information goes at the head of the output queue 00009855 735 DORSTZAP LABEL 09855 DC404AE0 736 CALLNP OUTTSETX reset and place at queue head 09856 5D1F8002 6 STAK 737 LEAVE POP return 738 * --- 739 740 * The name of the terminal initialization file. 00009857 741 TERMINITF LABEL 09857 0000001C 742 VFD 28 first, a nice symbolic length 09858 00009859 743 PTR TERMINITT then a pointer 09859 68617264 744 TERMINITT TEXT "hardware.sys:terminal.config" 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2131 (XRQOPREQ2) F 133 OPREQ - Terminal Control 746 747 ********************************************************************************** 748 * * 749 * RESETTERMX. Identical to RESETTERM except the reset information * 750 * is placed at the head of the output queue and the reset command used * 751 * is the one that does a reset when it is received by the ACC * 752 * rather then when it gets to the ACC port queue head. Call: * 753 * * 754 * LD R4 => TCB * 755 * CALLNP RESETTERMX * 756 * * 757 * Gets R0 thru R3. Stack required = 10 (see RESETTERM). * 758 * * 759 * CAUTION: A problem exists if this routine is called when * 760 * the terminal is busy. This will occur with ORPRESET * 761 * requests. This routine calls INITTERM, which in turn resets * 762 * values in the TCB. If this happens while a read is in * 763 * progress on that port, the flagging of terminators in the * 764 * input queue element or the terminator count in in the TCB * 765 * may become incorrect. This will result in a system halt. * 766 * * 767 ********************************************************************************** 768 09860 DD5F8002 6 STAK 769 RESETTERMX ENTRNP PUSH 09861 EDCBC010 7 CBM 770 STW R7/RSTTRMZAP non-zero means to zap out the reset 09862 FE0E9842 771 JMP RSTTRMSHR share all of the code 772 * --- 773 774 END RESETTERM subroutine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2132 (XRQOPREQ2) F 133 OPREQ - Time Control 777 778 ********************************************************************************** 779 * * 780 * Requests that allow the operator to specify the time zone and * 781 * adjust the system clock. * 782 * * 783 * Stack required = 8 * 784 * 0 + max ( GETADJUST (0), SETADJUST (8), SETTZONE (8) ) * 785 * * 786 ********************************************************************************** 787 788 BLOCK OPRTIMECTL routine 789 ENTRY OPRTIMECTL 790 00009863 791 OPRTIMECTL LABEL 09863 68840003 2 IMM 792 UCPR R2 TIMECTLM request within range? 09864 FE0659D8 793 JGE ILLREQ error if not 09865 5CA49866 2 794 LDPC TIMECTLJ(R2) zap to the routine 795 * --- 796 09866 00009869 797 TIMECTLJ VFD ADR SETTZONE specify the time zone 09867 00009872 798 VFD ADR SETTADJUST adjust the system clock 09868 000098A2 799 VFD ADR GETADJUST get system clock adjustment parameters 00000003 ABS 800 TIMECTLM EQU DISPW TIMECTLJ 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2133 (XRQOPREQ2) F 133 OPREQ - Time Control 802 803 ********************************************************************************** 804 * * 805 * SETTZONE. * 806 * Set the time zone and displacement to GMT. The time zone is * 807 * saved as a 3 ASCII character code and an integer giving the * 808 * hour distance from GMT. Some displacements and codes are: * 809 * * 810 * PST -8 * 811 * MST PDT -7 * 812 * CST MDT -6 * 813 * EST CDT -5 * 814 * EDT -4 * 815 * * 816 * User call is of the form: * 817 * * 818 * LD R0 ORTZONE * 819 * LD R1 4 ASCII chars, 4th ignored * 820 * OPREQ GMT hour difference * 821 * JLTZ R0 request error * 822 * * 823 * Stack required = 8 * 824 * 0 + TIME2DISK (8) * 825 * * 826 ********************************************************************************** 827 828 BLOCK SETTZONE routine 829 ENTRY SETTZONE 830 00009869 831 SETTZONE LABEL 09869 64C4000C 3 IMM 832 CPR R3 12 0986A FE0459DA 833 JGT UERRORPOB make sure the zones are in range 0986B 64C7FFF4 3 IMM 834 CPR R3 -12 0986C FE0859DA 835 JLT UERRORPOB 0986D 60170803 0 4 BASE 836 LD R0 R4,CAR1 get the specified chars 0986E E4CA3080 3 0 CBM 837 ST R3 R0/CH3 place the displacement in 4th char 0986F E4001EEF 0 838 ST R0 TIMEZONE set as system variable 09870 DC4054D2 839 CALLNP TIME2DISK force new info to the disk 09871 FE0E59D6 840 JMP NOERROR 841 * --- 842 843 END SETTZONE routine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2134 (XRQOPREQ2) F 133 OPREQ - Time Control 845 846 ********************************************************************************** 847 * * 848 * SETTADJUST. * 849 * Request to accept a clock correction from the operator. * 850 * We have the operator specify the number of seconds difference * 851 * between the clock and the actual time. Positive if the clock * 852 * is slow, negative if the clock is fast. We set FDATERROR * 853 * with the number of milliseconds and start TIMEADJUST going * 854 * to slowly modify the clock. * 855 * In addition, we attempt to calculate the rate error of * 856 * the clock. The error is stored as parts per billion in * 857 * FDATEDRFT, + if the clock is slow, - if it is fast. * 858 * Refer to the comments before the TIMEADJUST routine for * 859 * clock correction details. * 860 * Operator call is of the form: * 861 * * 862 * LD R0 ORTADJUST * 863 * LD R1 seconds the clock is off * 864 * OPREQ 0 * 865 * JLTZ R0 request error * 866 * * 867 * Stack required = 8 * 868 * 0 + max ( FLWRITENVM (7), GETDATE (1), TIME2DISK (8), * 869 * TIMEADJUST (2), TIMEDRFT (2) ) * 870 * * 871 ********************************************************************************** 872 873 BLOCK SETTADJUST routine 874 ENTRY SETTADJUST 875 00009872 876 SETTADJUST LABEL 09872 60D70803 3 4 BASE 877 LD R3 R4,CAR1 get the specified parameter 09873 64C40258 3 IMM 878 CPR R3 10*60 10 minutes is enough correction 09874 FE0459DA 879 JGT UERRORPOB 09875 64C7FDA8 3 IMM 880 CPR R3 -10*60 09876 FE0859DA 881 JLT UERRORPOB 09877 1CC403E8 3 IMM 882 MUL R3 MSECSS convert to milliseconds 09878 E0C01EED 3 883 EXCH R3 FDATERROR put as the time offset error 09879 FAC2987C 3 884 JEQZ R3 FIRSTERR jump if no other adjustment pending 885 * \ / operator has given two corrections close together 886 * use the actual amount of correction to set drift 0987A 30C01EED 3 887 RSB R3 FDATERROR get the difference that the opr saw 0987B FE0E9880 888 JMP CALCORR go to calculate the correction 889 * --- 890 0000987C 891 FIRSTERR LABEL 0987C 0CC00000 892 IOFF 0987D DC404573 893 CALLNP TIMEADJUST do the first adjustment 0987E 0C800000 894 ION 895 * \ / 0987F 60C01EED 3 896 LD R3 FDATERROR get amount of change since last correction 00009880 897 CALCORR LABEL 09880 FAC89884 3 898 JLTZ R3 ERRNEG jump if setting back 09881 10C402EE 3 IMM 899 SUB R3 750 only use 1/4 of first second 09882 54C40000 3 IMM 900 MAX R3 0 ensure modification didn't change sign 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2135 (XRQOPREQ2) F 133 OPREQ - Time Control 09883 FE0E9886 901 JMP ERVPROC continue 902 * --- 903 00009884 904 ERRNEG LABEL 09884 18C402EE 3 IMM 905 ADD R3 750 only use 1/4 of first second 09885 50C40000 3 IMM 906 MIN R3 0 ensure modification didn't change sign 00009886 907 ERVPROC LABEL 09886 1CC40064 3 IMM 908 MUL R3 100 10^2 out of the parts per billion 09887 DC404549 909 CALLNP GETDATE get the current date-time 09888 E2001EEB 01 910 EXCH2 R0 LASTCORR make now the last corrected time 09889 32001EEB 01 911 RSB2 R0 LASTCORR find time since last correction 0988A 1A0098A0 01 912 ADD2 R0 TENMILLION increase the interval size to minimize the 913 * effect of 'noise' in frequent corrections. 914 * Also prevents divide by zero. 0988B 160098A0 01 915 DIV2 R0 TENMILLION how many ten millions of msecs 916 * (other 10^2 accounted for earlier) 0988C 54440064 1 IMM 917 MAX R1 100 give less weight to short intervals 918 * (intervals under 100*ten million msecs are 919 * treated as if they were that large. 920 * Translation... 11 days) 0988D 708AC010 2 3 CBM 921 LDN R2 R3/BIT 0 sign extend the current offset error 0988E 16940000 2301 PAIR 922 DIV2 R2 PAIR R0 calculate parts per billion drift 0988F 18C01EEE 3 923 ADD R3 FDATEDRFT add to current error 09890 64C48BB7 3 IMM 924 CPR R3 35767 35 PPM is upper limit 09891 FE049899 925 JGT NEW2DISK ignore big errors (FS is required) 09892 64C77449 3 IMM 926 CPR R3 -35767 09893 FE089899 927 JLT NEW2DISK 09894 E0C01EEE 3 928 EXCH R3 FDATEDRFT store the new error 09895 FACC9899 3 929 JNEZ R3 NEW2DISK jump if drift corrector going already 09896 0CC00000 930 IOFF 09897 DC404586 931 CALLNP TIMEDRFT call to start up the drift 09898 0C800000 932 ION 00009899 933 NEW2DISK LABEL 09899 DC4054D2 934 CALLNP TIME2DISK new values are to be saved on the disk 0989A 60801EEE 2 935 LD R2 FDATEDRFT 0989B E48A8100 2 2 CBM 936 ST R2 R2/BITS 0:15 left justify value 0989C DC004617 937 CALL FLWRITENVM write drift into NVM 0989D 41440002 IMM 938 PARV 2 length 0989E 40440033 IMM 939 PARVL NVMDATDRFT location 0989F FE0E59D6 940 JMP NOERROR success 941 * --- 942 098A1 00989680 943 TENMILLION VFD 0,10000000 944 945 END SETTADJUST routine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2136 (XRQOPREQ2) F 133 OPREQ - Time Control 947 948 ********************************************************************************** 949 * * 950 * Request to fetch the current correction, drift, * 951 * and time of the last correction. * 952 * LD R0 ORTIMPAR * 953 * OPREQ 0 * 954 * R0,R1 = time of last correction * 955 * R2 = correction in MS * 956 * R3 = drift value in PPB * 957 * * 958 * Stack required = 0 * 959 * * 960 ********************************************************************************** 961 962 BLOCK GETADJUST routine 963 ENTRY GETADJUST 964 000098A2 965 GETADJUST LABEL 098A2 62001EEB 01 966 LD2 R0 LASTCORR get the time of the last correction 098A3 E6170802 014 BASE 967 ST2 R0 R4,CAR0 set into users register 098A4 60001EED 0 968 LD R0 FDATERROR get the current error 098A5 60401EEE 1 969 LD R1 FDATEDRFT and drift 098A6 E6170804 014 BASE 970 ST2 R0 R4,CAR2 set those into the users registers 098A7 FE0E38CF 971 JMP XREQRETURN return done 972 * --- 973 974 END GETADJUST routine 975 976 977 END OPRTIMECTL routine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2137 (XRQOPREQ2) F 133 OPREQ - Operator Process Control 980 981 ********************************************************************************** 982 * * 983 * Requests that allow the operator to control the operation of * 984 * other sessions in the system. These are also legal for MANAGERs * 985 * so they can keep their tribes under control. * 986 * * 987 * Stack required = 11 * 988 * 0 + max ( PROCABORT (4), PROCEVICT (0), PROCTERMIN (4), * 989 * URSTATPI (11) ) * 990 * * 991 ********************************************************************************** 992 993 BLOCK OPRPROCCTL routine 994 ENTRY OPRPROCCTL 995 00000090 BYTE 996 LOGBITS EQU BITS 0:8 bits in R7 used for log entry type 997 000098A8 998 OPRPROCCTL LABEL 098A8 64840004 2 IMM 999 CPR R2 PROCTABM is this request legal? 098A9 FE0459D8 1000 JGT ILLREQ error if out of range 098AA 5CA498AB 2 1001 LDPC PROCTABJ(R2) off to the routine 1002 * --- 1003 000098AB 1004 PROCTABJ LABEL 098AB 000098AF 1005 VFD ADR PROCTERMIN terminate session execution 098AC 000098C1 1006 VFD ADR PROCEVICT evict session operation 098AD 00008876 1007 VFD ADR URSTATPI fetch session information 098AE 000098C5 1008 VFD ADR PROCABORT abort session execution 00000004 ABS 1009 PROCTABM EQU DISPW PROCTABJ 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2138 (XRQOPREQ2) F 133 OPREQ - Operator Process Control 1011 1012 ********************************************************************************** 1013 * * 1014 * Abort a process in another session. For the moment, we do not * 1015 * send the supplied message because we don't yet have a way of * 1016 * doing it. Operator or manager call of the form: * 1017 * * 1018 * LD R0 OPRTERMIN * 1019 * LD R1 length of the message in characters * 1020 * LD R2 pointer to the message * 1021 * OPREQ session number * 1022 * JLTZ R0 request error * 1023 * * 1024 * Stack required = 4 * 1025 * 0 + max ( ACCTPROC (4), PROCPOWER (4), ROUST (4), * 1026 * UERRSETY (1), UNSRCHLIST (1) ) * 1027 * * 1028 ********************************************************************************** 1029 1030 BLOCK PROCTERMIN routine 1031 ENTRY PROCTERMIN 1032 ENTRY PROCZAPSH 1033 ENTRY SETOPRREQ 1034 000098AF 1035 PROCTERMIN LABEL 098AF 61C40002 7 IMM 1036 LD R7 UINTOPRQT code for a termination 098B0 6004000C 0 IMM 1037 LD R0 APTTERMIN accounting record type 098B1 E40BC090 0 7 CBM 1038 ST R0 R7/LOGBITS 1039 * \ / 1040 000098B2 1041 PROCZAPSH LABEL 098B2 60000414 0 1042 LD R0 CPCUPC get current UPC pointer 098B3 61081F13 4 0 ZBM 1043 LD ULB R0,UPCPRIVULB account we have privileges from 098B4 DC408821 1044 CALLNP PROCPOWER may we reference the kid? 098B5 FE0E59E0 1045 JMP UERRORMNRP "May not reference process" 098B6 6152C000 5 3 REG 1046 LD R5 R3 R5=>PSA 098B7 6084107D 2 IMM 1047 LD R2 UINTOPRQ+CMERR operator request code to CM 098B8 60CBD370 3 7 CBM 1048 LD R3 R7/BITS 9:31 R3=code for the interrupt 098B9 610BC090 4 7 CBM 1049 LD R4 R7/LOGBITS R0=accounting record code 1050 * \ / 1051 000098BA 1052 SETOPRREQ LABEL 098BA DC4035B5 1053 CALLNP UERRSETY set the operation on the session 098BB DC4098FF 1054 CALLNP ACCTPROC make the accounting entry 098BC DC0030B7 1055 CALL UNSRCHLIST release grip on the session list 098BD 40001EB2 1056 PARL PCNTLLOCK 098BE 60C95F12 3 5 ZBM 1057 LD R3 R5,PSPROCCB R3=>session control block 098BF DC403569 1058 CALLNP ROUST make him jump if stopped 098C0 FE0E59D6 1059 JMP NOERROR done with success 1060 * --- 1061 1062 END PROCTERMIN routine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2139 (XRQOPREQ2) F 133 OPREQ - Operator Process Control 1064 1065 ********************************************************************************** 1066 * * 1067 * Evict the specified session. For the moment we don't send * 1068 * the supplied message because we don't yet have a way of doing it. * 1069 * Operator or manager call of the form: * 1070 * * 1071 * LD R0 OPREVICT * 1072 * LD R1 length of the message in character * 1073 * LD R2 pointer to the message * 1074 * OPREQ session number * 1075 * JLTZ R0 request error * 1076 * * 1077 * Stack required = 4, see stack requirements for PROCTERMIN. * 1078 * * 1079 ********************************************************************************** 1080 1081 BLOCK PROCEVICT routine 1082 ENTRY PROCEVICT 1083 000098C1 1084 PROCEVICT LABEL 098C1 61C40001 7 IMM 1085 LD R7 UINTOPRQL the log-him-off code 098C2 6004000D 0 IMM 1086 LD R0 APTEVICT accounting record type 098C3 E40BC090 0 7 CBM 1087 ST R0 R7/LOGBITS 098C4 FE0E98B2 1088 JMP PROCZAPSH share code 1089 * --- 1090 1091 END PROCEVICT routine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2140 (XRQOPREQ2) F 133 OPREQ - Operator Process Control 1093 1094 ********************************************************************************** 1095 * * 1096 * Send "soft" abort error to the specified session. * 1097 * This request is similar to the TERMINATE, however using * 1098 * this request the operator may take advantage of the * 1099 * error recovery within the running program. Note that * 1100 * the user program must have the IMR and IAR set correctly * 1101 * to trap this type of error. Currently we have no means * 1102 * by which we can send a message. operator or manager call * 1103 * of the form: * 1104 * * 1105 * LD R0 ORPABORT * 1106 * LD R1 length of the message in character * 1107 * LD R2 pointer to the message * 1108 * OPREQ session serial number * 1109 * JLTZ R0 request error * 1110 * * 1111 * Stack required = 4, see stack requirements for PROCTERMIN. * 1112 * * 1113 ********************************************************************************** 1114 1115 BLOCK PROCABORT routine 1116 ENTRY PROCABORT 1117 000098C5 1118 PROCABORT LABEL 098C5 60000414 0 1119 LD R0 CPCUPC get current UPC pointer 098C6 61081F13 4 0 ZBM 1120 LD ULB R0,UPCPRIVULB account we have privileges from 098C7 DC408821 1121 CALLNP PROCPOWER may we reference the kid? 098C8 FE0E59E0 1122 JMP UERRORMNRP "May not reference process" 098C9 6152C000 5 3 REG 1123 LD R5 R3 R5=>PSA 098CA 60840027 2 IMM 1124 LD R2 UINTOPRQA operator request code 098CB 60C00412 3 1125 LD R3 CPPSA get our session ... 098CC 60C8DF12 3 3 ZBM 1126 LD R3 R3,PSPROCCB ... control block 098CD 60C8C0C3 3 3 ZBM 1127 LD R3 R3,PCPROCNUM int subcode is our sess# 098CE 6104000B 4 IMM 1128 LD R4 APTABORT accounting record type code 098CF FE0E98BA 1129 JMP SETOPRREQ jump to give user operator request 1130 * --- 1131 1132 END PROCABORT routine 1133 1134 END OPRPROCCTL routine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2141 (XRQOPREQ2) F 133 OPREQ - Move process in and out of STOPWAIT 1137 1138 ********************************************************************************** 1139 * * 1140 * The requests to move a process in and out of the STOPWAIT * 1141 * queue are handled here. * 1142 * * 1143 ********************************************************************************** 1144 1145 BLOCK OPRPSTOPGO requests 1146 ENTRY OPRPSTOPGO 1147 000098D0 1148 OPRPSTOPGO LABEL 098D0 64840002 2 IMM 1149 CPR R2 STOPGOMAX legal request? 098D1 FE0659D8 1150 JGE UERRORILR oops 1151 * \ / 1152 098D2 61528000 5 2 REG 1153 LD R5 R2 save sub-op 1154 * See if the requester has power to do this. 098D3 60000414 0 1155 LD R0 CPCUPC get current UPC pointer 098D4 61081F13 4 0 ZBM 1156 LD ULB R0,UPCPRIVULB account we have privileges from 098D5 DC408821 1157 CALLNP PROCPOWER may we reference the kid? 098D6 FE0E59E0 1158 JMP UERRORMNRP "May not reference process" 1159 * \ / 1160 1161 * R3 -> victim process's PSA. 098D7 5CAA98D8 5 1162 LDPC STOPGOTAB(R5) off to the appointed routine 1163 * --- 1164 000098D8 1165 STOPGOTAB LABEL 098D8 000098DA 1166 VFD ADR PROCSTOP stop a session's execution 098D9 000098E9 1167 VFD ADR PROCGO restart a sessions's execution 00000002 ABS 1168 STOPGOMAX EQU DISPW STOPGOTAB 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2142 (XRQOPREQ2) F 133 OPREQ - Move process in and out of STOPWAIT 1170 1171 ********************************************************************************** 1172 * * 1173 * Stop the specified session. The session ends up in the * 1174 * STOPWAIT queue and stays there until a OPRGO is issued to * 1175 * it. This request requires operator or manager privileges. * 1176 * * 1177 * LD R0 OPRSTOP * 1178 * OPREQ session number * 1179 * JLTZ R0 request error * 1180 * * 1181 * Stack required = 4 * 1182 * 0 + max ( ACCTPROC (4), LOCKWAIT (0), ROUST (4), * 1183 * UNSRCHLIST (1) ) * 1184 * * 1185 ********************************************************************************** 1186 1187 BLOCK PROCSTOP routine 1188 ENTRY PROCSTOP 1189 1190 * R3 -> PSA of victim process 000098DA 1191 PROCSTOP LABEL 098DA 6152C000 5 3 REG 1192 LD R5 R3 R5=>PSA 1193 PLOCK R5,PSLOCK lock the error word 098DB 0CC00000 1193 IOFF 098DC D1D7480C 5 BASE 1193 SETT R5,PSLOCK 098DD FE0C98DF 1193 JNE MA(2+DISPW MA 0) 098DE DC40308B 1193 CALLNP LOCKWAIT 098DF EDC9581D 5 ZBM 1194 STW R5,PSUERROR/RTSTOPB set the bit in the PSA 1195 PUNLOCK R5,PSLOCK release the PSA 098E0 EC17480C 5 BASE 1195 STZ R5,PSLOCK 098E1 0C800000 1195 ION 098E2 61040013 4 IMM 1196 LD R4 APTSTOP accounting record type 098E3 DC4098FF 1197 CALLNP ACCTPROC let all know who did this dastardly deed 098E4 DC0030B7 1198 CALL UNSRCHLIST release grip on the session list 098E5 40001EB2 1199 PARL PCNTLLOCK 098E6 60C95F12 3 5 ZBM 1200 LD R3 R5,PSPROCCB R3=>session control block 098E7 DC403569 1201 CALLNP ROUST make him jump if stopped 098E8 FE0E59D6 1202 JMP NOERROR done here 1203 * --- 1204 1205 END PROCSTOP routine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2143 (XRQOPREQ2) F 133 OPREQ - Move process in and out of STOPWAIT 1207 1208 ********************************************************************************** 1209 * * 1210 * Start the specified session. This request restarts * 1211 * a session that has been sent to the STOPWAIT queue with * 1212 * an OPRSTOP request. * 1213 * Operator or manager call of the form: * 1214 * * 1215 * LD R0 OPRGO * 1216 * OPREQ session number * 1217 * JLTZ R0 request error * 1218 * * 1219 * Stack required = 4 * 1220 * 0 + max ( ACCTPROC (4), LOCKWAIT (0), SETRUNNING (2), * 1221 * UNSRCHLIST (1) ) * 1222 * * 1223 ********************************************************************************** 1224 1225 BLOCK PROCGO routine 1226 ENTRY PROCGO 1227 1228 * R3 -> PSA of victim process. 000098E9 1229 PROCGO LABEL 098E9 6108DF12 4 3 ZBM 1230 LD R4 R3,PSPROCCB point to the PCB of victim process 098EA DC0030B7 1231 CALL UNSRCHLIST release grip on the list 098EB 40001EB2 1232 PARL PCNTLLOCK process control block list 098EC 60441DB8 1 IMM 1233 LD R1 ADR SQSTOPWAIT R1 -> queue process should be in 1234 PLOCK SQLOCKS(NQSTOPWAIT) 098ED 0CC00000 1234 IOFF 098EE D1C01DC9 1234 SETT SQLOCKS(NQSTOPWAIT) 098EF FE0C98F1 1234 JNE MA(2+DISPW MA 0) 098F0 DC40308B 1234 CALLNP LOCKWAIT 098F1 3D085F10 4 1 ZBM 1235 LSRCH R4 R1,PCQLINK find who points to the process 098F2 FE0C98FC 1236 JNE PROCGONE if no one points to him, he is gone 098F3 60891F10 2 4 ZBM 1237 LD R2 R4,PCQLINK R2 -> next process in queue 098F4 E4885F10 2 1 ZBM 1238 ST R2 R1,PCQLINK remove us from this list 1239 PUNLOCK SQLOCKS(NQSTOPWAIT) 098F5 EC001DC9 1239 STZ SQLOCKS(NQSTOPWAIT) 098F6 0C800000 1239 ION 098F7 DC402B99 1240 CALLNP SETRUNNING set the guy running 098F8 61040014 4 IMM 1241 LD R4 APTGO accounting event code 098F9 6152C000 5 3 REG 1242 LD R5 R3 R5 -> victim's PSA 098FA DC4098FF 1243 CALLNP ACCTPROC take credit for starting the process 098FB FE0E59D6 1244 JMP NOERROR 1245 * --- 1246 000098FC 1247 PROCGONE LABEL 1248 PUNLOCK SQLOCKS(NQSTOPWAIT) 098FC EC001DC9 1248 STZ SQLOCKS(NQSTOPWAIT) 098FD 0C800000 1248 ION 098FE FE0E59E4 1249 JMP UERRORNSE no such entry 1250 * --- 1251 1252 END PROCGO routine 1253 1254 END of OPRPSTOPGO requests 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2144 (XRQOPREQ2) F 133 OPREQ - Move process in and out of STOPWAIT 1256 1257 ********************************************************************************** 1258 * * 1259 * ACCTPROC * 1260 * * 1261 * Makes an accounting entry for one of the various * 1262 * opr process control actions. The victim's account * 1263 * is used as the main account in the accounting record * 1264 * and the victor is the secondary account name. The * 1265 * event is then logged in the victim's set of accounting * 1266 * files. * 1267 * Call: * 1268 * R4 = accounting event code * 1269 * R5 -> victim's PSA * 1270 * CPPSA -> victor's PSA * 1271 * CALLNP ACCTPROC * 1272 * * 1273 * Eats R0:R4. * 1274 * Stack usage = 4 * 1275 * 1 + max ( ACCOUNT (2), ACCTPSA (2), ACCTQUE (3), * 1276 * ACCTULB (1), FINDTERMCB (1), MAPINMEM (3), * 1277 * MAPOUTMEM (1) ) * 1278 * * 1279 ********************************************************************************** 1280 1281 BLOCK ACCTPROC subroutine 1282 1283 ENTRY ACCTPROC 1284 1285 BEGFRAME 1286 ENDFRAME 1287 098FF DD5F8001 6 STAK 1288 ACCTPROC ENTRNP PUSH 09900 DC4025FC 1289 CALLNP MAPOUTMEM wipe away requester's memory 09901 DC0025EB 1290 CALL MAPINMEM map in victims memory 09902 40534000 5 REG 1291 PARVL R5 pointer to PSA 09903 DC00505F 1292 CALL ACCOUNT get the accounting element 09904 41530000 4 REG 1293 PARV R4 record type 09905 4144002C IMM 1294 PARV AFRLONG a long record size 09906 61095F13 4 5 ZBM 1295 LD ULB R5,PSUSERLIMP get victims ULB 09907 40491A57 4 ZBM 1296 PARVL ULB,ULLOGSPOT where to log this at 09908 60934000 2 5 REG 1297 LD R2 R5 R2 -> victims PSA 09909 DC405C0D 1298 CALLNP ACCTPSA get needed info from this 0990A DC405C1E 1299 CALLNP ACCTULB finish telling about the victim 1300 1301 * Now fill in information about requester 0990B 6092C000 2 3 REG 1302 LD R2 R3 save pointer to accounting record 0990C DC4025FC 1303 CALLNP MAPOUTMEM get rid of victim's memory 0990D DC0025EB 1304 CALL MAPINMEM get back the requester's memory 0990E 40400412 1305 PARVL CPPSA pointer to PSA 0990F 60D28000 3 2 REG 1306 LD R3 R2 restore pointer to accounting record 09910 D148C0AB 3 ZBM 1307 STMW R3,APRECORD/AFRPORT2 assume no port associated with session 09911 DC0035C5 1308 CALL FINDTERMCB get TCB of session 09912 40400412 1309 PARVL CPPSA address of PSA 09913 FA709916 1 1310 JZA R1 NOPORT jump if no port 09914 60084890 0 1 ZBM 1311 LD R0 R1,TCTNUM get the port number 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2145 (XRQOPREQ2) F 133 OPREQ - Move process in and out of STOPWAIT 09915 E408C0AB 0 3 ZBM 1312 ST R0 R3,APRECORD/AFRPORT2 save in the record 1313 00009916 1314 NOPORT LABEL 09916 60800412 2 1315 LD R2 CPPSA R2 -> PSA 09917 60489F12 1 2 ZBM 1316 LD R1 R2,PSPROCCB 09918 604840C3 1 1 ZBM 1317 LD R1 R1,PCPROCNUM R0=session number 09919 E448D4CB 1 3 ZBM 1318 ST R1 R3,APRECORD/AFRPROC2 put in the second session num place 0991A 60089F13 0 2 ZBM 1319 LD R0 R2,PSUSERLIMP R0 -> requester ULB 0991B 62560802 120 BASE 1320 LD2 R1 R0,ULACCNM 0991C E656C808 123 BASE 1321 ST2 R1 R3,APRECORD/AFRACCT2 secondary account name 0991D 60560804 1 0 BASE 1322 LD R1 R0,ULACCPROJ get the project, too 0991E E456C80A 1 3 BASE 1323 ST R1 R3,APRECORD/AFRPROJ2 secondary project name 0991F DC405025 1324 CALLNP ACCTQUE send this record to the queue 09920 5D1F8001 6 STAK 1325 LEAVE POP 1326 * --- 1327 1328 END of ACCTPROC subroutine 1329 201 INPUT OPRCREACCT create/destroy account 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2146 (OPRCREACCT) F 134 Create and Destroy account 3 4 ********************************************************************************** 5 * * 6 * CREATE ACCOUNT * 7 * A directory is created for the indicated account. * 8 * Here you have two different types of requests. One is * 9 * the standard request. It does privilege and authorization * 10 * checking before the account can be created, backup privilege * 11 * has no effect on this request. The other type is strictly * 12 * for use by backup. NO privilege or authorization checking * 13 * is done. This request can be used on non-maintenance * 14 * mounted volumes to allow more flexability, so beware who * 15 * uses this request. Request is of the form: * 16 * * 17 * LD R0 * 18 * LD R1 ADR CREDATA pointer to information block * 19 * OPREQ 0 * 20 * * 21 * The information block looks like: * 22 * * 23 * CREDATA LABEL * 24 * PAK12 VOLUME-NAME * 25 * PAK6 SYSTEM-NAME * 26 * PAK12 PASSWORD * 27 * * 28 * PAK12 ACCOUNT-NAME * 29 * PAK6 ACCOUNT-PROJECT * 30 * PAK12 PASSWORD * 31 * * 32 * Stack required = 21 * 33 * 1 + max ( ADDIDXAFT (10), DELAFTIDX (11), EXPANDIDX (13), * 34 * FORCEIDX (9), FREEAFTACS (5), FREEDIR (5), * 35 * FREEFILE (3), FREEIDXACS (5), FREEULB (11), * 36 * GETAFTACS (1), GETAUTHN (12), GETFSEQN (1), * 37 * GETIDXACS (3), GRUBWNDOx (7), INITEQTBLK (6), * 38 * LEVELBIT (3), MAPOUTFBI (2), PRESETAUTH (21), * 39 * PWMANGLE (3), SETWNDOx (4), SFREEMEM (0), * 40 * SGETMEM (0) ) * 41 * * 42 ********************************************************************************** 43 44 BLOCK OPRCREACCT routine 45 ENTRY OPRCREACCT 46 47 * Temps allocated in the EQT block 0017480D 5 BASE 48 EQTEMPC EQU EQFILEEXT 0017480B 5 BASE 49 EQTEMP EQU EQFILENM(0) 0017480C 5 BASE 50 EQMGRULB EQU EQFILENM(1) 0017480E 5 BASE 51 EQTMPULB EQU EQFILEPW(0) 0017480F 5 BASE 52 EQPRVULB EQU EQFILEPW(1) 53 09921 E7EF0000 54 PROPPROJ PAK6 & proprietary account project (this and higher) 09922 77B44C83 55 INITPFN PAK12 INITIAL 09924 8A28CA00 56 INITPEXT PAK6 LOGON 57 00009925 58 OPRCREACCT LABEL 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2147 (OPRCREACCT) F 134 Create and Destroy account 09925 64840002 2 IMM 59 CPR R2 CREACCTMAX is the sub-op out of bounds 09926 FE0659D8 60 JGE ILLREQ illegal request if so 09927 5CA49928 2 61 LDPC CREACCTJTAB(R2) go to appropriate request 62 * --- 63 00009928 64 CREACCTJTAB LABEL 09928 0000992A 65 VFD ADR MGRCREACCT standard create account 09929 00009966 66 VFD ADR BKUPCREACCT backup create account 00000002 ABS 67 CREACCTMAX EQU DISPW CREACCTJTAB 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2148 (OPRCREACCT) F 134 Create and Destroy account 69 70 ********************************************************************************** 71 * * 72 * MANAGER CREATE ACCOUNT * 73 * This is the create account request that may be issued * 74 * by any privileged manager account. This is the request * 75 * that does privilege and authorization checking. The * 76 * format of the call is: * 77 * * 78 ********************************************************************************** 79 0000992A 80 MGRCREACCT LABEL 0992A DC409A01 81 CALLNP INITEQTBLK initialize the EQT block 0992B FA0C5988 0 82 JNEZ R0 UERROR jump if problems arose 83 * VLN <= VOLN element, EQT <= initialized EQT block, 84 * EQPRVULB <= privileged ULB, EQTEMP <= volume number 85 * \ / 0992C DC002ED0 86 CALL SGETMEM get a temporary block 0992D 40440004 IMM 87 PARVL ULLOG for a ULB 0992E 61120000 4 0 REG 88 LD ULB R0 copy the pointer 0992F E517480E 4 5 BASE 89 ST ULB EQT,EQTMPULB save for later use 09930 62174806 015 BASE 90 LD2 R0 EQT,EQACCT get the requested account 09931 E6170802 014 BASE 91 ST2 R0 ULB,ULACCNM save account name in ULB 09932 60174808 0 5 BASE 92 LD R0 EQT,EQACCTPROJ check for default desired 09933 E4170804 0 4 BASE 93 ST R0 ULB,ULACCPROJ save project name in ULB 09934 6009408B 0 5 ZBM 94 LD R0 EQT,EQTEMP/VOLFIELD get volume number 09935 E4090081 0 4 ZBM 95 ST R0 ULB,ULDRIVE save volume number in ULB 09936 60201F22 0 0 96 LD R0 VOLNTABLE(R0) R0 <= VOLN element 09937 6008010E 0 0 ZBM 97 LD R0 R0,VOLNCUST customer number of volumes owner 09938 60401EFA 1 98 LD R1 SYSTEMSN get system serial number 09939 640A4100 0 1 CBM 99 CPR R0 R1/CUSTNUM do customer numbers match? 0993A ED890210 4 ZBM 100 STLNE ULB,ULFOREIGN indicate whether new account is foreign 0993B DC005B84 101 CALL LEVELBIT see if this manager is allowed 0993C 4157480F 5 BASE 102 PARV EQT,EQPRVULB indicate requesters dir 0993D 40530000 4 REG 103 PARVL ULB pass ULB of new guy 0993E FA0299BE 0 104 JEQZ R0 NOTPRIV jump if not sub-account 105 * \ / 106 0993F 60D7480F 3 5 BASE 107 LD R3 EQT,EQPRVULB privileged ULB 09940 6056C804 1 3 BASE 108 LD R1 R3,ULACCPROJ project name of requester 09941 E41F8001 0 6 STAK 109 ST R0 STAK SP,1 store the manager power bit on the stack 09942 E417D001 0 7 REG 110 ST R0 R7+1 09943 29D20000 7 0 REG 111 BSUB R7 R0 R7 <= bits above manager 09944 75C7FFFF 7 IMM 112 XOR R7 ONEBITS R7 <= bits at manager & below 09945 F236994D 0 113 JBF R0/CCBUSRFRC NOTSELF jump if not trying to create own shadow 114 * \ / 115 116 ********************************************************************************** 117 * * 118 * The requester is trying to create a copy of his own * 119 * account. Generally disallowed but we allow manager.!!! * 120 * on BTI systems to do it for ease of software distribution. * 121 * * 122 ********************************************************************************** 123 124 * \ / 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2149 (OPRCREACCT) F 134 Create and Destroy account 09946 68402555 1 125 UCPR R1 DOTSYS is it the system owner? 09947 FE02994D 126 JEQ NOTSELF allow sys owner to made duplicate mgr.sys accounts 09948 64402551 1 127 CPR R1 DOTBTI is it BTI? 09949 FE0C99BE 128 JNE NOTPRIV if not, forget it 0994A 60001EFA 0 129 LD R0 SYSTEMSN get the system serial number 0994B 5C0A0100 0 CBM 130 CMZ R0/CUSTNUM check for customer number 0 0994C FE0C99BE 131 JNE NOTPRIV jump if not customer zero 132 * \ / 133 0000994D 134 NOTSELF LABEL 0994D 60170804 0 4 BASE 135 LD R0 ULB,ULACCPROJ project name of victim account 0994E 68009921 0 136 UCPR R0 PROPPROJ is it proprietary? 0994F FE089952 137 JLT NOTPROP jump if not 09950 68402551 1 138 UCPR R1 DOTBTI is requester BTI 09951 FE0C99BE 139 JNE NOTPRIV proprietary managers not good either 140 * \ / 141 142 ********************************************************************************** 143 * * 144 * Now we have the enviable task of trying to find * 145 * the manager from where the authorization is to come * 146 * from. We start by looking for the manager, * 147 * then the
manager and if neither are found we use * 148 * the privileges of the caller. Note that only one of * 149 * the following accounts may reach this point: * 150 * * 151 * 1). Manager.!!! * 152 * 2). Manager.Sys * 153 * 3). Manager.
* 154 * 4). Manager. * 155 * * 156 ********************************************************************************** 157 158 * \ / 00009952 159 NOTPROP LABEL 160 * make call assuming EQTVOLUME was ensured non-zero by INITEQTBLK 09952 601F8001 0 6 STAK 161 LD R0 STAK SP,1 restore manager power bits 09953 DC005D0A 162 CALL PRESETAUTH find the authorization list 09954 41520000 0 REG 163 PARV R0 pass who we are 09955 42574801 5 BASE 164 PARV2L EQT,EQVOLUME volume to create account on 09956 FE0E99BA 165 JMP CRDIRERR disk error on directory or authlist 09957 FE0E99BC 166 JMP NOTAUTHED insufficient authorization 09958 FE0E9961 167 JMP RTNTMPULB no authorization needed 168 * \ / 09959 E517480C 4 5 BASE 169 ST ULB EQT,EQMGRULB save manager ULB pointer 0995A 6016C805 0 3 BASE 170 LD R0 R3,AUTHDSKA get current amount allocated 0995B FA2C995D 0 171 JEQMW R0 ALLOCHUGE jump if allocated amount is huge 0995C 18040001 0 IMM 172 ADD R0 1 increase by 1 for dir 173 * \ / 174 0000995D 175 ALLOCHUGE LABEL 0995D 6816C804 0 3 BASE 176 UCPR R0 R3,AUTHDSK compare to authorized 0995E FE0499C0 177 JGT NOSPACE jump if over the limit 0995F E416C805 0 3 BASE 178 ST R0 R3,AUTHDSKA do the update 179 * A GRUBWNDO1 is skipped in order to prevent an unnecessary 180 * write if limits are exceeded on the SETWNDO2 below. 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2150 (OPRCREACCT) F 134 Create and Destroy account 09960 DC405685 181 CALLNP FREEDIR release the directory 182 * \ / 183 00009961 184 RTNTMPULB LABEL 09961 DC002F5D 185 CALL SFREEMEM return system storage 09962 41440004 IMM 186 PARV ULLOG indicate its length 09963 4057480E 5 BASE 187 PARVL EQT,EQTMPULB and its word address 09964 EC17480E 5 BASE 188 STZ EQT,EQTMPULB indicate nothing there anymore 09965 FE0E996C 189 JMP BIGACCT go create directory 190 * --- 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2151 (OPRCREACCT) F 134 Create and Destroy account 192 193 ********************************************************************************** 194 * * 195 * BACKUP CREATE ACCOUNT * 196 * This create account is strictly for those granted backup * 197 * privilege. No privilege or authorization check is done. We * 198 * allow this request on non-maintenance mounted volumes so that * 199 * INITPROC can create HARDWARE.SYS without any problems. * 200 * * 201 ********************************************************************************** 202 00009966 203 BKUPCREACCT LABEL 09966 60000414 0 204 LD R0 CPCUPC pointer to current underprocess 09967 5C080C10 0 ZBM 205 CMZ R0,UPBACKUP granted backup privilege 09968 FE0C59D8 206 JNE ILLREQ jump if not the case 09969 DC409A01 207 CALLNP INITEQTBLK get user parameters 0996A FA0C5988 0 208 JNEZ R0 UERROR jump if problems arose 0996B D153C000 7 REG 209 STMW R7 assume lots of privilege 210 * \ / 211 212 * merging point for MGR and BKUP, EQT -> EQT, R7 = LEVELBITS word 0000996C 213 BIGACCT LABEL 0996C 6117480B 4 5 BASE 214 LD R4 EQT,EQTEMP get volume number back 0996D DC0031FF 215 CALL SETWNDO2 set up a new block for the directory 0996E 4144000A IMM 216 PARV VPZEROPG+VPCNTLLK indicate a locked zero page 0996F 41440000 IMM 217 PARV VPNOFCB no unit associated with the page 09970 410099CD 218 PAR CRNEWER error address 09971 41530000 4 REG 219 PARV R4 pass the volume number (and other garbage) 09972 40443F89 IMM 220 PARVL FBITFREE*VPFBIOLDB+FBITUDIR1*VPFBINEWB type of block 09973 60089181 0 2 ZBM 221 LD R0 R2,FBIDA get the MS address assigned 09974 E40B1180 0 4 CBM 222 ST R0 R4/MSBLKFIELD combine with volume number 09975 E517480D 4 5 BASE 223 ST R4 EQT,EQTEMPC save the directory address 224 * \ / 225 226 * Window 2 locked, so we shouldn't fault with PPLWINDOW mapped 09976 DC404555 227 CALLNP GETFSEQN get file serial number 09977 E6000C20 01 228 ST2 R0 WNDO2(UDSERNO) save number as account serial number 09978 E6168808 012 BASE 229 ST2 R0 R2,FBISERNO and stuff into FBI too 09979 62174806 015 BASE 230 LD2 R0 EQT,EQACCT get the account number 0997A E6000C00 01 231 ST2 R0 WNDO2(UDACCT) store into directory 0997B E6168805 012 BASE 232 ST2 R0 R2,FBIACCT make the FBI indicate owner 0997C E6000C0B 01 233 ST2 R0 WNDO2(UDHPRAC) set hello program account name 0997D 60174808 0 5 BASE 234 LD R0 EQT,EQACCTPROJ and division-project 0997E E4000C02 0 235 ST R0 WNDO2(UDPROJ) set into directory 0997F E4168807 0 2 BASE 236 ST R0 R2,FBIPROJ fixup the FBI 09980 E4000C0D 0 237 ST R0 WNDO2(UDHPRACP) set hello program project name 09981 DC40261B 238 CALLNP MAPOUTFBI unmap FBI, ION 09982 DC005872 239 CALL PWMANGLE apply one-way transformation to password 09983 43174806 5 BASE 240 PAR2 EQT,EQACCT account name is parameter 09984 42174809 5 BASE 241 PAR2L EQT,EQACCTPW pass the plaintext password 09985 E6000C03 01 242 ST2 R0 WNDO2(UDPASS) set encrypted password 09986 D3174809 5 BASE 243 STU2 EQT,EQACCTPW destroy plaintext password 09987 62009922 01 244 LD2 R0 INITPFN get the assumed name 09988 E6000C10 01 245 ST2 R0 WNDO2(UDHPR) and set hello program name 09989 60009924 0 246 LD R0 INITPEXT and assumed extension 0998A E4000C12 0 247 ST R0 WNDO2(UDHPREXT) and set the hello program extension 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2152 (OPRCREACCT) F 134 Create and Destroy account 0998B 60440C2B 1 IMM 248 LD R1 ADR WNDO2(UDLIMITS) load address of limit area 0998C EDC85188 1 ZBM 249 STW R1,DSKUSD indicate one block used for directory 0998D 60800414 2 250 LD R2 CPCUPC get pointer to current UPC 0998E 60889F13 2 2 ZBM 251 LD R2 R2,UPCPRIVULB get the privilege ULB 0998F 60168807 0 2 BASE 252 LD R0 R2,ULPWORD get the privileges of the manager 09990 FDCA0040 7 0 CBM 253 IORM R7 R0/LIMFACCESS put in the sub-tree FAC bits 09991 FDCA0840 7 0 CBM 254 IORM R7 R0/LIMPACCESS put in the sub-tree PAC bits 09992 E4164801 0 1 BASE 255 ST R0 R1,PRIVWORD and set into the new directory 256 * \ / 257 258 ********************************************************************************** 259 * * 260 * Everything else in the directory is left zero. * 261 * This means no privileges, no space, no time, etc. * 262 * Note that the directory is written back out to the * 263 * disk before the IDX and AFT tables are updated. This * 264 * makes error recovery more tedious, however disk * 265 * integerity is preserved. * 266 * * 267 ********************************************************************************** 268 269 * \ / 09993 DC403153 270 CALLNP GRUBWNDO2 force out the new dir and release the window 09994 DC00580B 271 CALL GETIDXACS get access to the IDX list 09995 41440001 IMM 272 PARV AFTACSMO indicate that we want modify access 09996 4049408D 5 ZBM 273 PARVL EQT,EQTEMPC/VOLFIELD indicate what volume 274 * \ / 275 09997 6108DF19 4 3 ZBM 276 LD R4 R3,VOLNIDXPTR R4 <= control table 09998 DC005718 277 CALL ADDIDXAFT add entry to the IDX 09999 41174806 5 BASE 278 PAR EQT,EQACCT pass account name triple 0999A 4017480D 5 BASE 279 PARL EQT,EQTEMPC indicate the UDIR MS address 0999B FE0E99C3 280 JMP IDXMSERR bail out on disk error 0999C FE0E99C5 281 JMP IDXTABFUL bail out if system resources exceeded 0999D FE0E99CB 282 JMP DUPACCT such a user already exists 0999E DC40578B 283 CALLNP EXPANDIDX call to expand the IDX 284 * \ / 285 0999F DC403150 286 CALLNP GRUBWNDO1 force out the IDX block and release the window 099A0 DC4057DF 287 CALLNP FORCEIDX write out new tables 288 * \ / 289 099A1 DC005829 290 CALL FREEIDXACS release the IDX 099A2 4049408D 5 ZBM 291 PARVL EQT,EQTEMPC/VOLFIELD indicate volume where we were 292 * \ / 293 294 ********************************************************************************** 295 * * 296 * The account has just been added to the volume IDX table, * 297 * now go make an entry in the system AFT table. * 298 * * 299 ********************************************************************************** 300 301 * \ / 099A3 DC0056E6 302 CALL GETAFTACS get access to the AFT 099A4 40440001 IMM 303 PARVL AFTACSMO indicate that we need modify access 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2153 (OPRCREACCT) F 134 Create and Destroy account 304 * \ / 305 099A5 61001F64 4 306 LD R4 AFTINDEX R4 <= control table for AFT 099A6 DC005718 307 CALL ADDIDXAFT add entry to the AFT 099A7 41174806 5 BASE 308 PAR EQT,EQACCT pass the account name triple 099A8 4017480D 5 BASE 309 PARL EQT,EQTEMPC indicate the UDIR MS address 099A9 FE0E99D2 310 JMP AFTMSERR bail out on disk error 099AA FE0E99D4 311 JMP AFTTABFUL bail out if system resources exceeded 099AB FE0E99B8 312 JMP NOWRITEAFT a duplicate, just created a shadow acct 099AC DC40578B 313 CALLNP EXPANDIDX call to expand the AFT 314 * \ / 315 099AD DC403150 316 CALLNP GRUBWNDO1 write out new block 099AE DC4057DF 317 CALLNP FORCEIDX write out new tables 318 * \ / 319 000099AF 320 RELAFTWW LABEL 099AF DC005701 321 CALL FREEAFTACS release access to the AFT 099B0 40440001 IMM 322 PARVL AFTACSMO indicate that we had modify access 099B1 6117480C 4 5 BASE 323 LD ULB EQT,EQMGRULB get pointer to manager ULB 099B2 DC002F5D 324 CALL SFREEMEM give back the temp block 099B3 41440004 IMM 325 PARV EQTEMPLOG indicate its length 099B4 40534000 5 REG 326 PARVL EQT and address 099B5 FB3059D6 4 327 JZA ULB NOERROR our job is done 099B6 DC405526 328 CALLNP FREEULB indicate manager ULB no longer needed 099B7 FE0E59D6 329 JMP NOERROR exit 330 * --- 331 332 ********************************************************************************** 333 * * 334 * Arriving here if creating a shadow, this is not * 335 * a problem just a special case. * 336 * * 337 ********************************************************************************** 338 000099B8 339 NOWRITEAFT LABEL 099B8 DC403150 340 CALLNP GRUBWNDO1 release the window 099B9 FE0E99AF 341 JMP RELAFTWW back into main line 342 * --- 343 344 ********************************************************************************** 345 * * 346 * A mass storage error has occurred on the managers * 347 * directory or AUTH list block. Express our regrets. * 348 * * 349 ********************************************************************************** 350 000099BA 351 CRDIRERR LABEL 099BA 61C4009F 7 IMM 352 LD R7 XREQERDSE indicate 'disk structure error' 099BB FE0E99F5 353 JMP AUTHRA go share cleanup 354 * --- 355 356 ********************************************************************************** 357 * * 358 * We find that the manager isn't authorized space on * 359 * the volume that he indicated or that his authorization * 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2154 (OPRCREACCT) F 134 Create and Destroy account 360 * is insufficient. Give him a bad time. * 361 * * 362 ********************************************************************************** 363 000099BC 364 NOTAUTHED LABEL 099BC 61C400A7 7 IMM 365 LD R7 XREQERIAUT insufficient authorization 099BD FE0E99F5 366 JMP AUTHRA go bail out 367 * --- 368 369 ********************************************************************************** 370 * * 371 * This manager doesn't have the privilege to create * 372 * this account. Free the temporary ULB. * 373 * * 374 ********************************************************************************** 375 000099BE 376 NOTPRIV LABEL 099BE 61C40094 7 IMM 377 LD R7 XREQERPNS privilege not sufficient 099BF FE0E99F5 378 JMP AUTHRA go share cleanup 379 * --- 380 381 ********************************************************************************** 382 * * 383 * The manager has used up the space allotted to him. * 384 * * 385 ********************************************************************************** 386 000099C0 387 NOSPACE LABEL 099C0 DC405685 388 CALLNP FREEDIR release the directory 099C1 61C400A7 7 IMM 389 LD R7 XREQERIAUT error code for exceeding limits 099C2 FE0E99F4 390 JMP SHARER share the clean up 391 * --- 392 393 ********************************************************************************** 394 * * 395 * A mass storage error has occurred while trying to make * 396 * the new entry in the IDX. Give back the directory that we * 397 * can't point to. * 398 * * 399 ********************************************************************************** 400 000099C3 401 IDXMSERR LABEL error reading IDX 099C3 61D20000 7 0 REG 402 LD R7 R0 pass through the error code 099C4 FE0E99E2 403 JMP SHAREL1 go share clean up 404 * --- 405 406 ********************************************************************************** 407 * * 408 * The IDX has filled up ( I mean REALLY full ). Give * 409 * back the UDIR since nothing points to it. * 410 * * 411 ********************************************************************************** 412 000099C5 413 IDXTABFUL LABEL IDX full 099C5 61C40093 7 IMM 414 LD R7 XREQERISYR system resources exceeded 099C6 FE0E99E2 415 JMP SHAREL1 go share clean up 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2155 (OPRCREACCT) F 134 Create and Destroy account 416 * --- 417 418 ********************************************************************************** 419 * * 420 * Bad show. We got a mass storage error in the IDX * 421 * while trying to back out from some other error! This * 422 * probably means that the disk is really sick. Ignore * 423 * what we can't cure. For goodness sake, don't free the * 424 * new user directory, since the IDX still points to it * 425 * (if it could be read). * 426 * * 427 ********************************************************************************** 428 000099C7 429 COMSERR LABEL 099C7 DC005829 430 CALL FREEIDXACS release the IDX 099C8 4049408D 5 ZBM 431 PARVL EQT,EQTEMPC/VOLFIELD indicate which unit 099C9 EC17480D 5 BASE 432 STZ EQT,EQTEMPC zap pointer to directory 099CA FE0E99E4 433 JMP AUTHREM share error recovery code 434 * --- 435 436 ********************************************************************************** 437 * * 438 * The requested account already exists. Release * 439 * the IDX and free the block allocated as the new dir. * 440 * * 441 ********************************************************************************** 442 000099CB 443 DUPACCT LABEL account already exists 099CB 61C4008E 7 IMM 444 LD R7 XREQERNAE 'name already exists' 099CC FE0E99E2 445 JMP SHAREL1 go share code 446 * --- 447 448 ********************************************************************************** 449 * * 450 * An error occurred while referencing the brand new * 451 * UDIR. What a shame, sweet life, cut short by the * 452 * indifferent scyth of mass storage errors. Lose the * 453 * body (block) and clean up. * 454 * * 455 ********************************************************************************** 456 000099CD 457 CRNEWER LABEL 099CD DC40261B 458 CALLNP MAPOUTFBI unmap FBI, ION 099CE DC403153 459 CALLNP GRUBWNDO2 zap the VP element 099CF EC17480D 5 BASE 460 STZ EQT,EQTEMPC defective block, just forget it 099D0 61C4009F 7 IMM 461 LD R7 XREQERDSE disk structure error 099D1 FE0E99E4 462 JMP AUTHREM go share clean up 463 * --- 464 465 ********************************************************************************** 466 * * 467 * A mass storage error has occurred while * 468 * attempting to update the AFT. We try to back out from * 469 * this error so that the manager is not left with a * 470 * sub-account that he can't fix up. However, we could * 471 * just leave the account without too many funny * 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2156 (OPRCREACCT) F 134 Create and Destroy account 472 * effects. * 473 * * 474 ********************************************************************************** 475 000099D2 476 AFTMSERR LABEL 099D2 61D20000 7 0 REG 477 LD R7 R0 pass through the error code 099D3 FE0E99D5 478 JMP SHAREQ share clean up 479 * --- 480 481 ********************************************************************************** 482 * * 483 * The AFT has filled up ( I mean REALLY full ). Undo * 484 * the partly done work for the same reason as MS error. * 485 * * 486 ********************************************************************************** 487 000099D4 488 AFTTABFUL LABEL AFT full 099D4 61C40093 7 IMM 489 LD R7 XREQERISYR system resource exceeded 490 * \ / 491 492 ********************************************************************************** 493 * * 494 * This is the code that backs out from errors. It is * 495 * rather like a mirror image of the normal path. It is * 496 * entered with the error code in R7. * 497 * * 498 ********************************************************************************** 499 500 * \ / 000099D5 501 SHAREQ LABEL 099D5 DC005701 502 CALL FREEAFTACS release the AFT 099D6 40440001 IMM 503 PARVL AFTACSMO indicate that we had modify access 504 * \ / 505 099D7 DC00580B 506 CALL GETIDXACS get access to IDX 099D8 41440001 IMM 507 PARV AFTACSMO indicate that we need modify access 099D9 4049408D 5 ZBM 508 PARVL EQT,EQTEMPC/VOLFIELD indicate which volume 509 * \ / 510 099DA 6108DF19 4 3 ZBM 511 LD R4 R3,VOLNIDXPTR get pointer to IDX 099DB DC0056A0 512 CALL DELAFTIDX call to remove the entry 099DC 4157480D 5 BASE 513 PARV EQT,EQTEMPC pass the dir address 099DD 40174806 5 BASE 514 PARL EQT,EQACCT pass the account name triple 099DE FE0E99C7 515 JMP COMSERR jump if MS error (oh what a tangled web we weave) 099DF FEC00000 516 NOP 0 entry removed by someone else??? 099E0 DC403150 517 CALLNP GRUBWNDO1 force out the current IDX block 099E1 DC4057DF 518 CALLNP FORCEIDX and force out the pointers 519 * \ / 520 000099E2 521 SHAREL1 LABEL 099E2 DC005829 522 CALL FREEIDXACS release the IDX 099E3 4049408D 5 ZBM 523 PARVL EQT,EQTEMPC/VOLFIELD indicate which unit 524 * \ / 525 000099E4 526 AUTHREM LABEL 099E4 6117480C 4 5 BASE 527 LD ULB EQT,EQMGRULB pointer to managers ULB 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2157 (OPRCREACCT) F 134 Create and Destroy account 099E5 FB0299EF 4 528 JEQZ ULB SHAREL2 manager ULB never found 529 * \ / 530 531 * make call assuming EQTVOLUME was ensured non-zero by INITEQTBLK 099E6 DC009CE0 532 CALL GETAUTHN get the authlist element 099E7 43174801 5 BASE 533 PAR2 EQT,EQVOLUME pass the desired volume 099E8 400099F4 534 PARL SHARER MS error address 099E9 FE0E99EF 535 JMP SHAREL2 powerful acct 099EA FE0E99EF 536 JMP SHAREL2 authorization must have just been removed 099EB 6016C805 0 3 BASE 537 LD R0 R3,AUTHDSKA get the current authorized amount 099EC FA2C99EE 0 538 JEQMW R0 NONEED jump if huge amount 099ED D056C805 3 BASE 539 DEC R3,AUTHDSKA remove the one previously assigned 540 * \ / 541 000099EE 542 NONEED LABEL 099EE DC405685 543 CALLNP FREEDIR release the directory 544 * \ / 545 000099EF 546 SHAREL2 LABEL 099EF 6017480D 0 5 BASE 547 LD R0 EQT,EQTEMPC get the UDIR address 099F0 FA0299F4 0 548 JEQZ R0 SHARER skip freeing it if not assigned 099F1 DC004FEA 549 CALL FREEFILE release the new directory 099F2 4157480D 5 BASE 550 PARV EQT,EQTEMPC indicate MS address 099F3 40440009 IMM 551 PARVL FBITUDIR1 and type 552 * \ / 553 000099F4 554 SHARER LABEL 099F4 DC403150 555 CALLNP GRUBWNDO1 release the window 556 * \ / 557 000099F5 558 AUTHRA LABEL 099F5 5C17480E 5 BASE 559 CMZ EQT,EQTMPULB temporary ULB still floating around 099F6 FE0299FA 560 JEQ NOTMPULB jump if not 099F7 DC002F5D 561 CALL SFREEMEM free a piece of system memory 099F8 41440004 IMM 562 PARV ULLOG indicate its length 099F9 4057480E 5 BASE 563 PARVL EQT,EQTMPULB and the word address 564 * \ / 565 000099FA 566 NOTMPULB LABEL 099FA 6117480C 4 5 BASE 567 LD ULB EQT,EQMGRULB retrieve manager ULB 099FB DC002F5D 568 CALL UFREEMEM give back the temp block 099FC 41440004 IMM 569 PARV EQTEMPLOG indicate its length 099FD 40534000 5 REG 570 PARVL EQT and address 099FE FB305995 4 571 JZA ULB UERROR7 if no ULB, just report error 099FF DC405526 572 CALLNP FREEULB indicate manager ULB no longer needed 09A00 FE0E5995 573 JMP UERROR7 go give requester error 574 * --- 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2158 (OPRCREACCT) F 134 Create and Destroy account 576 577 ********************************************************************************** 578 * * 579 * This is the INITEQTBLK routine. As the name implies we * 580 * simply get an EQT block, fill in the space, make sure the * 581 * account name is in good format, and return back to the * 582 * caller. The privilege ULB is the logon ULB if we are backup, * 583 * and the UPC privileged ULB if not. The privileged ULB is * 584 * placed in EQPRVULB. Note that we actually search for the * 585 * volume by name and return the volume number in EQTEMP. Call * 586 * is of the form: * 587 * * 588 * CALL INITEQTBLK * 589 * JNEZ R0 * 590 * R3 <= requesters privileged ULB * 591 * VLN <= VOLN element of destination drive * 592 * EQT <= temporary EQT block initialized * 593 * EQTEMP <= volume number * 594 * EQPRVULB <= privileged ULB * 595 * * 596 * Eats R0:R2, Sets R3:R5. * 597 * Stack required = 6 * 598 * 1 + max ( CHECKSYM (5), CLRMEMTRAP (1), EMBED (2), * 599 * FINDVNAME (2), GETPKTEMP (2), SETMEMTRAP (1), * 600 * SFREEMEM (0), UNSRCHLIST (1) ) * 601 * * 602 ********************************************************************************** 603 604 BLOCK INITEQTBLK subroutine 605 ENTRY INITEQTBLK 606 607 BEGFRAME 608 ENDFRAME 609 09A01 DD5F8001 6 STAK 610 INITEQTBLK ENTRNP PUSH 09A02 DC4059FA 611 CALLNP GETPKTEMP get temporary EQT block 09A03 DC005BCF 612 CALL SETMEMTRAP catch memory protect errors 09A04 40009A48 613 PARL IEBUMEMBAD recovery address 614 * \ / 09A05 60091F13 0 4 ZBM 615 LD R0 R4,CAR1/FLDADRS get data block address 09A06 60440028 1 IMM 616 LD R1 EQELSIZE*2*CPW two complete elements 09A07 38974801 2 5 BASE 617 LEA R2 EQT,EQVOLUME destination address 09A08 5C093211 4 ZBM 618 CMZ R4,CAMSR/MSRFRELOCB requester fetch relocation bit 09A09 FE0C9A0B 619 JNE MONRELOC jump if request came from the monitor 09A0A 59840040 IMM 620 CLBMSR MSRFRELOC get block from user address space 621 * \ / 622 00009A0B 623 MONRELOC LABEL 09A0B FE400000 624 CMOVE set most of the EQT block values 09A0C 59C40040 IMM 625 IORMSR MSRFRELOC restore fetch relocation 09A0D DC405BD4 626 CALLNP CLRMEMTRAP clean up loose ends 627 * \ / 09A0E EC17480D 5 BASE 628 STZ EQT,EQTEMPC clear new DIR address 09A0F EC17480C 5 BASE 629 STZ EQT,EQMGRULB no manager ULB yet, either 09A10 60C00414 3 630 LD R3 CPCUPC current underprocess control block 09A11 5C08CC10 3 ZBM 631 CMZ R3,UPBACKUP are we backup 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2159 (OPRCREACCT) F 134 Create and Destroy account 09A12 FE0C9A16 632 JNE NOTBACKUP jump if not 09A13 60C00412 3 633 LD R3 CPPSA current process status area 09A14 6108DF13 4 3 ZBM 634 LD ULB R3,PSUSERLIMP ULB of logon account 09A15 FE0E9A17 635 JMP SHRPRVCHK share code 636 * --- 637 00009A16 638 NOTBACKUP LABEL 09A16 6108DF13 4 3 ZBM 639 LD ULB R3,UPCPRIVULB get privileged ULB 640 * \ / 641 00009A17 642 SHRPRVCHK LABEL 09A17 E517480F 4 5 BASE 643 ST ULB EQT,EQPRVULB save for later use 09A18 5E174801 5 BASE 644 CMZ2 EQT,EQVOLUME was a volume name specified 09A19 FE0C9A20 645 JNE VOLSPECED jump if it was 09A1A 60490081 1 4 ZBM 646 LD R1 ULB,ULDRIVE drive manager account resides 09A1B 60621F22 1 1 647 LD R1 VOLNTABLE(R1) pointer to VOLN element 09A1C 62164811 011 BASE 648 LD2 R0 R1,VOLNNAME get the volume name 09A1D E6174801 015 BASE 649 ST2 R0 EQT,EQVOLUME and set into the EQT block 09A1E 60001EFB 0 650 LD R0 SYSTEMNM get this systems name 09A1F E4174803 0 5 BASE 651 ST R0 EQT,EQSYSTEM also set system name 652 * \ / 653 00009A20 654 VOLSPECED LABEL 09A20 60974808 2 5 BASE 655 LD R2 EQT,EQACCTPROJ check if default desired 09A21 FAAE9A24 2 656 JNEMW R2 CRAPS jump if something there 09A22 60970804 2 4 BASE 657 LD R2 ULB,ULACCPROJ get project from ULB 09A23 E4974808 2 5 BASE 658 ST R2 EQT,EQACCTPROJ and store into EQT block 659 * \ / 660 00009A24 661 CRAPS LABEL 09A24 62174806 015 BASE 662 LD2 R0 EQT,EQACCT get the given account name 09A25 FA1C9A27 01 663 JNEZ2 R0 ACCTNONZERO pass check if any part non-zero 09A26 FA829A40 2 664 JEQZ R2 ACCTBFN . account name. no way 665 * \ / 666 00009A27 667 ACCTNONZERO LABEL 09A27 DC005CD3 668 CALL CHECKSYM check symbol for validity 09A28 42174806 5 BASE 669 PAR2L EQT,EQACCT pass the account name 09A29 FE0E9A40 670 JMP ACCTBFN bad account name given 09A2A FEC00000 671 NOP 0 all blank return, impossible! 672 * \ / 09A2B 60974808 2 5 BASE 673 LD R2 EQT,EQACCTPROJ get the project name 09A2C DC405CC0 674 CALLNP EMBED check for legality 09A2D FE0E9A40 675 JMP ACCTBFN not legal 09A2E FEC00000 676 NOP 0 all blank, no big deal 677 * \ / 678 679 ********************************************************************************** 680 * * 681 * Find the volume that we are suppose to create the * 682 * account. If the volume is found and maintenance mounted * 683 * we only allow those granted backup privileges to continue. * 684 * If the volume is found but goes away later, the call to * 685 * get a block for the directory should fail. Note we save * 686 * the volume number in the EQT block. * 687 * * 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2160 (OPRCREACCT) F 134 Create and Destroy account 688 ********************************************************************************** 689 690 * \ / 09A2F DC009E55 691 CALL FINDVNAME try to find the mounted volume 09A30 42574801 5 BASE 692 PARV2L EQT,EQVOLUME volume name to find 09A31 FE0E9A42 693 JMP IEBNSV jump if no such volume 694 * \ / 09A32 60170806 0 4 BASE 695 LD R0 VLN,VOLNBLOCK volume number with unneeded address 09A33 E417480B 0 5 BASE 696 ST R0 EQT,EQTEMP save in EQT block 09A34 5C090E10 4 ZBM 697 CMZ VLN,VOLNMAIM check maintenance mount flag 09A35 FE029A3C 698 JEQ VOLNOTMAI jump if not maintenance mounted 09A36 60000414 0 699 LD R0 CPCUPC current underprocess control block 09A37 5C080C10 0 ZBM 700 CMZ R0,UPBACKUP granted backup privileges 09A38 FE029A3C 701 JEQ VOLNOTMAI allow requester to continue 09A39 DC0030B7 702 CALL UNSRCHLIST release volume list 09A3A 40001F22 703 PARL VOLNLOCK lock for volume list 09A3B FE0E9A42 704 JMP IEBNSV return no such entry error 705 * --- 706 00009A3C 707 VOLNOTMAI LABEL 09A3C DC0030B7 708 CALL UNSRCHLIST release volume list 09A3D 40001F22 709 PARL VOLNLOCK lock for volume list 09A3E EC120000 0 REG 710 STZ R0 indicate all went smoothly 711 * \ / 712 00009A3F 713 IEBEXIT LABEL 09A3F 5D1F8001 6 STAK 714 LEAVE POP 715 * --- 716 00009A40 717 ACCTBFN LABEL 09A40 60C4008F 3 IMM 718 LD R3 XREQERBFN bad file name 09A41 FE0E9A43 719 JMP IEBERRXIT do some cleanup 720 * --- 721 00009A42 722 IEBNSV LABEL 09A42 60C400A6 3 IMM 723 LD R3 XREQERNSV no such volume 724 * \ / 725 00009A43 726 IEBERRXIT LABEL 09A43 DC002F5D 727 CALL SFREEMEM free temporary EQT 09A44 41440004 IMM 728 PARV EQTEMPLOG log 2 of the block size 09A45 40534000 5 REG 729 PARVL EQT starting address 09A46 6012C000 0 3 REG 730 LD R0 R3 copy error code 09A47 FE0E9A3F 731 JMP IEBEXIT return bad news to caller 732 * --- 733 00009A48 734 IEBUMEMBAD LABEL 09A48 E6148000 0123 PAIR 735 ST2 R0 PAIR R2 save away error codes 09A49 DC002F5D 736 CALL SFREEMEM free temporary EQT 09A4A 41440004 IMM 737 PARV EQTEMPLOG log 2 of the block size 09A4B 40534000 5 REG 738 PARVL EQT starting address 09A4C 62148000 0123 PAIR 739 LD2 R0 PAIR R2 restore error codes 09A4D FE0E5B5F 740 JMP PASSERRUP non-standard return, oh well! 741 * --- 742 743 END INITEQTBLK subroutine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2161 (OPRCREACCT) F 134 Create and Destroy account 744 745 746 END OPRCREACCT routine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2162 (OPRCREACCT) F 134 Create and Destroy account 748 749 ********************************************************************************** 750 * * 751 * DESTROY ACCOUNT * 752 * We verify that the MANAGER account has the appropriate * 753 * privilege over the user and verify that no one is logged on * 754 * to the doomed account. * 755 * We fixup the FCB to indicate no directory present, get rid * 756 * of the ULB (FREEULB) and remove the dir from the AFT and IDX. * 757 * We give back to the manager his space allocation. * 758 * To complete the job, we call FREEFILE for the directory. * 759 * User call format: * 760 * * 761 * LD R0 ORDESACCT load code for this request * 762 * OPREQ specify an equipped directory * 763 * * 764 * Stack required = 11 * 765 * 0 + max ( DELAFTIDX (11), FORCEIDX (9), FREEAFTACS (5), * 766 * FREEFILE (3), FREEIDXACS (5), FREEULB (11), * 767 * GETAFTACS (1), GETIDXACS (3), GRUBWNDO1 (7), * 768 * LEVELBIT (3), LOCKLIST (1), LUNSEARCH (2), * 769 * UNLOCKLIST (1) ) * 770 * * 771 ********************************************************************************** 772 773 BLOCK OPRDESACCT routine 774 ENTRY OPRDESACCT 775 00009A4E 776 OPRDESACCT LABEL 09A4E FA8C59D8 2 777 JNEZ R2 UERRORILR jump for illegal request (unassigned sub-op) 09A4F DC405B39 778 CALLNP LUNSEARCH look for the FCB 09A50 FB7059B8 5 779 JZA FCB FERRORLNE3 jump if lun not equipped 09A51 60096665 0 5 ZBM 780 LD R0 FCB,FCHTYPE get the type of device 09A52 64040005 0 IMM 781 CPR R0 HTYPEDIR does this FCB represent a directory? 09A53 FE0C59D8 782 JNE UERRORILR illegal request if not 09A54 60C95114 3 5 ZBM 783 LD R3 FCB,FCLIMITPTR R3 <= victims ULB 09A55 FAF059EE 3 784 JZA R3 UERRORIAUT jump if no account associated 09A56 DC005B84 785 CALL LEVELBIT see if requester may zap 09A57 60000414 0 786 LD R0 CPCUPC 09A58 41481F13 0 ZBM 787 PARV R0,UPCPRIVULB ULB of the requester 09A59 4052C000 3 REG 788 PARVL R3 ULB of the victim account 09A5A FA4259EE 1 789 JEQZ R1 UERRORIAUT jump if not the manager 09A5B F2769A5F 1 790 JBF R1/CCBUSRFRC NOTOWNSELF jump if not try to cancel shadow 09A5C F67C9A65 1 791 JBT R1/CCBOWNFRC ALLOWCAN allow manager.sys to cancel own shadow 09A5D F27E59EE 1 792 JBF R1/CCBALWFRC UERRORIAUT if not manager.!!!, then complain 09A5E FE0E9A65 793 JMP ALLOWCAN allow manager.!!! to cancel shadow 794 * --- 795 00009A5F 796 NOTOWNSELF LABEL 09A5F F2709A65 1 797 JBF R1/BIT 24 ALLOWCAN manager.sys not trying to cancel proprietary 09A60 6016C804 0 3 BASE 798 LD R0 R3,ULACCPROJ get victim project 09A61 64002551 0 799 CPR R0 DOTBTI check if normal system account 09A62 FE089A65 800 JLT ALLOWCAN if so allow cancel to take place 09A63 64002552 0 801 CPR R0 DOTAMPER is this a proprietary account 09A64 FE0859EE 802 JLT UERRORIAUT jump if diddling BTI account 803 * \ / 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2163 (OPRCREACCT) F 134 Create and Destroy account 804 00009A65 805 ALLOWCAN LABEL 09A65 E413C000 0 7 REG 806 ST R0 R7 save power bits for later use 09A66 DC003096 807 CALL LOCKLIST get exclusive access to list 09A67 40001EAC 808 PARL ULLOCK address of lock to use 09A68 60022000 0 IMM 809 LD R0 ULNOTHING get bit indicating not here 09A69 FC16C800 0 3 BASE 810 IORM R0 R3,ULWORDA try to grasp the ULB 09A6A FE029A6F 811 JEQ BUSYERR jump if already being destroyed 09A6B 6048DF15 1 3 ZBM 812 LD R1 R3,ULBUSYCTR get the count of uses 09A6C 64440001 1 IMM 813 CPR R1 1 must be exactly one 09A6D FE029A73 814 JEQ RIGHTCOUNT jump over error code iff okay 09A6E A816C800 0 3 BASE 815 BRSBM R0 R3,ULWORDA clear this busy bit 816 * \ / 817 00009A6F 818 BUSYERR LABEL 09A6F DC0030A4 819 CALL UNLOCKLIST release hold of list 09A70 40001EAC 820 PARL ULLOCK lock to release 09A71 6004008A 0 IMM 821 LD R0 XREQERFBZ indicate account still busy 09A72 FE0E5988 822 JMP UERROR return error 823 * --- 824 00009A73 825 RIGHTCOUNT LABEL 09A73 DC0030A4 826 CALL UNLOCKLIST release hold of list 09A74 40001EAC 827 PARL ULLOCK lock to release 09A75 5C08C010 3 ZBM 828 CMZ R3,ULSHADOW don't attempt to remove shadow from AFT 09A76 FE0C9A83 829 JNE SKIPAFT jump if shadow 830 * \ / 831 09A77 DC0056E6 832 CALL GETAFTACS get access to the AFT 09A78 40440001 IMM 833 PARVL AFTACSMO indicate that we need write access 834 * \ / 835 09A79 61001F64 4 836 LD R4 AFTINDEX get pointer to the table 09A7A DC0056A0 837 CALL DELAFTIDX call to remove the entry 09A7B 4156C801 3 BASE 838 PARV R3,ULBLOCK pass the directory address 09A7C 4016C802 3 BASE 839 PARL R3,ULACCNM pass the account name triple 09A7D FE0E9A81 840 JMP DMSER jump for mass storage error 09A7E FEC00000 841 NOP 0 entry missing? 09A7F DC403150 842 CALLNP GRUBWNDO1 force out the current AFT block 09A80 DC4057DF 843 CALLNP FORCEIDX and force out the pointers 844 * \ / 845 00009A81 846 DMSER LABEL 09A81 DC005701 847 CALL FREEAFTACS release the AFT 09A82 40440001 IMM 848 PARVL AFTACSMO indicate that we had write access 849 * \ / 850 00009A83 851 SKIPAFT LABEL 09A83 60C95114 3 5 ZBM 852 LD R3 FCB,FCLIMITPTR get the ULB pointer 09A84 DC00580B 853 CALL GETIDXACS get access to the IDX 09A85 41440001 IMM 854 PARV AFTACSMO indicate write access 09A86 4048C081 3 ZBM 855 PARVL R3,ULDRIVE volume number 856 * \ / 857 09A87 6108DF19 4 3 ZBM 858 LD R4 R3,VOLNIDXPTR R4 <= IDX table pointer 09A88 60C95114 3 5 ZBM 859 LD R3 FCB,FCLIMITPTR R3 <= ULB of victim account 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2164 (OPRCREACCT) F 134 Create and Destroy account 09A89 DC0056A0 860 CALL DELAFTIDX call to remove the entry 09A8A 4156C801 3 BASE 861 PARV R3,ULBLOCK pass the directory address 09A8B 4016C802 3 BASE 862 PARL R3,ULACCNM pass the account name triple 09A8C FE0E9A90 863 JMP IDXMER jump for mass storage error 09A8D FEC00000 864 NOP 0 entry missing?? 09A8E DC403150 865 CALLNP GRUBWNDO1 force out the current IDX block 09A8F DC4057DF 866 CALLNP FORCEIDX and force out the pointers 867 * \ / 868 00009A90 869 IDXMER LABEL 09A90 61095114 4 5 ZBM 870 LD ULB FCB,FCLIMITPTR ULB of victim account 09A91 DC005829 871 CALL FREEIDXACS release the IDX 09A92 40490081 4 ZBM 872 PARVL ULB,ULDRIVE volume number 873 * \ / 874 875 ********************************************************************************** 876 * * 877 * At this point the system knows nothing of the account, * 878 * and the ULB is marked as going away. We try to return * 879 * the resources allocated to the account back to the manager. * 880 * Since the requester had privileges to cancel the account * 881 * any errors on the following xreqs are assumed to be for * 882 * trivial reasons, most likely a non-existant authorization * 883 * list, hence any errors are ignored. * 884 * * 885 ********************************************************************************** 886 887 * \ / 09A93 8152C000 3 REG 888 STCAR R3 pointer to console area 09A94 600401E0 0 IMM 889 LD R0 FRASCPUL request to set the CPU time limit 09A95 60440000 1 IMM 890 LD R1 0 setting to zero, deallocates the resource 09A96 0896C80E 3 BASE 891 FREQ R3,CAXOPERAND unit of DIR for victim account 892 * \ / 09A97 D009218D 4 ZBM 893 INC ULB,ULDSKLIM adjust to account for dir itself 09A98 600401E4 0 IMM 894 LD R0 FRASDSKL request to set the disk limit 09A99 60440000 1 IMM 895 LD R1 0 setting to zero, deallocates the resource 09A9A 0896C80E 3 BASE 896 FREQ R3,CAXOPERAND unit of DIR for victim account 897 * \ / 09A9B 600401E7 0 IMM 898 LD R0 FRASSAVL request to set the saved disk limit 09A9C 60440000 1 IMM 899 LD R1 0 setting to zero, deallocates the resource 09A9D 0896C80E 3 BASE 900 FREQ R3,CAXOPERAND unit of DIR for victim account 901 * \ / 09A9E 62170802 014 BASE 902 LD2 R0 ULB,ULACCNM get this account name 09A9F 66002556 01 903 CPR2 R0 RADMANAGER is this account a manager? 09AA0 FE0C9AA3 904 JNE NOTMANAGER jump if not manager 09AA1 600400E8 0 IMM 905 LD R0 ORDESAUTHL may have auth list, destroy it 09AA2 0956C80E 3 BASE 906 OPREQ R3,CAXOPERAND pass the lun number 907 * \ / 908 00009AA3 909 NOTMANAGER LABEL 09AA3 EC095114 5 ZBM 910 STZ FCB,FCLIMITPTR the FCB now refers to a missing account 09AA4 61570801 5 4 BASE 911 LD R5 ULB,ULBLOCK get the MS address of the directory 09AA5 DC405526 912 CALLNP FREEULB dump the losers ULB for good 09AA6 DC004FEA 913 CALL FREEFILE call to dump directory 09AA7 41534000 5 REG 914 PARV R5 pass the dir address 09AA8 40440009 IMM 915 PARVL FBITUDIR1 indicating dumping a directory 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2165 (OPRCREACCT) F 134 Create and Destroy account 09AA9 FE0E59D6 916 JMP NOERROR return error free 917 * --- 918 919 END OPRDESACCT routine 202 INPUT OPRAUTH authorization requests 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2166 (OPRAUTH) F 135 auth list manager 3 4 BLOCK Auth List Manager 5 6 ENTRY GETAUTHN get auth list element pointer 7 ENTRY OPRAUTHE requests to diddle auth list entries 8 ENTRY OPRAUTHL requests to diddle the auth list 9 10 ********************************************************************************** 11 * * 12 * Each manager on the system has an authorization list * 13 * to inform the system of what system resources he may * 14 * delegate to subsidiaries. Exceptions are: .!!!, since it * 15 * is the maintenance manager, it needs no auth list, and * 16 * .SYS, since it represents the system owner and he has paid * 17 * for the resources. * 18 * Otherwise, if there is no auth list, the manager may * 19 * not create new accounts. Managers may not delegate to * 20 * their sub-managers more authority than they have. * 21 * The basic auth list contains the amount of CPU time * 22 * that the manager may delegate. The auth list entries ( A * 23 * separate entry for each volume authorized ) contain the * 24 * amount of mass storage space that the manager may delegate. * 25 * When resources are charged to an account an attempt is * 26 * made to take it from the lowest level manager. If he has * 27 * no auth list we move up to the next level manager, however * 28 * never exceeding our own level. If a manager is found that * 29 * has an auth list but not enough resources to give away we * 30 * issue an insufficient resource error. * 31 * See the individual requests for their calling * 32 * sequences. * 33 * * 34 ********************************************************************************** 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2167 (OPRAUTH) F 135 auth list manager 36 37 ********************************************************************************** 38 * * 39 * OPREQs to diddle Authorization Lists. * 40 * * 41 * Stack required = 21 * 42 * 0 + max ( CRAUTHNTRY (21), DSAUTHNTRY (21), LEVELBIT (3), * 43 * LUNSEARCH (2), OPRCHAUTHL (21), OPRCRAUTHL (21), * 44 * OPRDSAUTHL (21), OPRGAUTENS (12), OPRGTAUTHL (12) ) * 45 * * 46 ********************************************************************************** 47 48 BLOCK Auth List OPREQ Routines 49 ENTRY OPRAUTHL 50 ENTRY OPRAUTHE 51 00000000 ABS 52 STAKTEMP EQU 0 temporary on the stack 00000001 ABS 53 STAKTEMP1 EQU 1 another 00000002 ABS 54 MGRULB EQU 2 managers ULB 00000003 ABS 55 STAKRQAUTH EQU 3 holds requested auth (and other things) 00000004 ABS 56 STAKSIZE EQU 4 size of stack area 57 58 * requests to diddle the auth list (time allocatable) 59 00009AAA 60 OPRAUTHL LABEL 09AAA 60A49AAC 2 2 61 LD R2 OPAUTJTAB(R2) get the jump table entry 09AAB FE0E9ACD 62 JMP AUTHSHARE and share setup code 63 * --- 64 09AAC 00009AE3 65 OPAUTJTAB ADR OPRCRAUTHL to create auth list 09AAD 00009B31 66 ADR OPRCHAUTHL to change auth list 09AAE 00000000 67 VFD 0 09AAF 00000000 68 VFD 0 09AB0 00000000 69 VFD 0 09AB1 00000000 70 VFD 0 09AB2 00000000 71 VFD 0 09AB3 00000000 72 VFD 0 09AB4 00009B75 73 ADR OPRDSAUTHL to destroy auth list 09AB5 00009BC7 74 ADR OPRGTAUTHL to get auth list info 09AB6 00000000 75 VFD 0 09AB7 00000000 76 VFD 0 09AB8 00000000 77 VFD 0 09AB9 00000000 78 VFD 0 09ABA 00000000 79 VFD 0 09ABB 00000000 80 VFD 0 81 00009ABC 82 OPAEJTAB LABEL 09ABC 00009BD4 83 ADR CRAUTHNTRY to make auth list entry 09ABD 00000000 84 VFD 0 09ABE 00089C4B 85 VFD WORDLNTH-ADDRESS:AUTHDSK DISPW AUTHVNAME,ADDRESS:ADR OPRCAUT 09ABF 000C9C4B 86 VFD WORDLNTH-ADDRESS:AUTHSDSK DISPW AUTHVNAME,ADDRESS:ADR OPRCAUT 09AC0 00000000 87 VFD 0 09AC1 00000000 88 VFD 0 09AC2 00000000 89 VFD 0 09AC3 00000000 90 VFD 0 09AC4 00009BFF 91 ADR DSAUTHNTRY to destroy auth list entry 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2168 (OPRAUTH) F 135 auth list manager 09AC5 00000000 92 VFD 0 09AC6 00089CAA 93 VFD WORDLNTH-ADDRESS:AUTHDSK DISPW AUTHVNAME,ADDRESS:ADR OPRGAUT 09AC7 000C9CAA 94 VFD WORDLNTH-ADDRESS:AUTHSDSK DISPW AUTHVNAME,ADDRESS:ADR OPRGAUT 09AC8 00000000 95 VFD 0 09AC9 00000000 96 VFD 0 09ACA 00000000 97 VFD 0 09ACB 00009CBC 98 ADR OPRGAUTENS to return entire list of entries 99 100 * requests to diddle auth list entries (MS allocatable) 101 00009ACC 102 OPRAUTHE LABEL 09ACC 60A49ABC 2 2 103 LD R2 OPAEJTAB(R2) get the routine code 104 * \ / 105 00009ACD 106 AUTHSHARE LABEL 09ACD FA8259D8 2 107 JEQZ R2 UERRORILR jump off if unimplemented code 09ACE E49F8004 2 6 STAK 108 ST R2 STAK SP,STAKSIZE save the call address on stack 09ACF DC405B39 109 CALLNP LUNSEARCH look for the requested lun 09AD0 FB7059B8 5 110 JZA FCB FERRORLNE3 jump if no such lun 09AD1 60096665 0 5 ZBM 111 LD R0 FCB,FCHTYPE get the type of the unit 09AD2 64040005 0 IMM 112 CPR R0 HTYPEDIR is this lun a .DIR? 09AD3 FE0C59A5 113 JNE FERRORILOP jump if not, operation not legal on device 09AD4 60170803 0 4 BASE 114 LD R0 R4,CAR1 get the callers R1 09AD5 E4178803 0 6 BASE 115 ST R0 SP,STAKRQAUTH save the value requested 09AD6 61095114 4 5 ZBM 116 LD ULB FCB,FCLIMITPTR get ptr to victims ULB 09AD7 FB3059C8 4 117 JZA ULB FERRORPNS indicate privilege not sufficient 09AD8 62170802 014 BASE 118 LD2 R0 ULB,ULACCNM get the victims account name 09AD9 66002556 01 119 CPR2 R0 RADMANAGER is he a manager? 09ADA FE0C59C8 120 JNE FERRORPNS if not, he cannot have an auth list 09ADB DC005B84 121 CALL LEVELBIT see if requester has needed privilege 09ADC 60000414 0 122 LD R0 CPCUPC get the current UPC pointer 09ADD 41481F13 0 ZBM 123 PARV R0,UPCPRIVULB pass requesters ULB 09ADE 40530000 4 REG 124 PARVL ULB pass victims ULB 09ADF FA0259C8 0 125 JEQZ R0 FERRORPNS indicate privilege not sufficient 09AE0 E413C000 0 7 REG 126 ST R0 R7 save manager power bits here 09AE1 EC178802 6 BASE 127 STZ SP,MGRULB clear this field on the stack 09AE2 5C978800 6 BASE 128 LDPC SP,STAKTEMP setup done, go to the indicated routine 129 * --- 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2169 (OPRAUTH) F 135 auth list manager 131 132 ********************************************************************************** 133 * * 134 * OPRCRAUTHL. This request produces a brand new auth * 135 * list for the designated manager. The caller may specify * 136 * the time that the sub manager may delegate. * 137 * User call: * 138 * LD R0 ORCREAUTHL * 139 * LD R1 * 140 * OPREQ a .DIR * 141 * JLTZ R0 * 142 * * 143 * Stack required = 21 * 144 * 0 + max ( FETCHDIR (4), FORCEWRWx (5), FREEDIR (5), * 145 * FREEULB (11), GETAUTHN (12), GETFREEW2 (6), * 146 * GRUBWNDOx (7), LIMITCHECK (1), PRESETAUTH (21), * 147 * SETWNDOx (4) ) * 148 * * 149 ********************************************************************************** 150 151 BLOCK OPRCRAUTHL routine 152 ENTRY OPRCRAUTHL 153 ENTRY ERRINR7 154 ENTRY EASYDSKERR 155 ENTRY EASYDSKERR1 156 ENTRY HSUPER 157 00009AE3 158 OPRCRAUTHL LABEL 09AE3 F63659C8 0 159 JBT R0/CCBUSRFRC FERRORPNS not allowed to diddle self 160 * R0 <= manager power bits, ULB <= ULB of victim account 09AE4 DC005D0A 161 CALL PRESETAUTH find managers authlist 09AE5 41520000 0 REG 162 PARV R0 pass manager power bits 09AE6 42440000 IMM 163 PARV2L 0 indicate no particular entry wanted 09AE7 FE0E59CA 164 JMP FERRORDSE jump if disk error reading block 09AE8 FE0E59C6 165 JMP FERRORNSE authorization list not found 09AE9 FE0E9AF8 166 JMP SUPERACCT requester is super account 167 * \ / 168 169 * ULB <= ULB of manager account 09AEA 60178803 0 6 BASE 170 LD R0 SP,STAKRQAUTH get the new amount requested 09AEB FA2E9AF2 0 171 JNEMW R0 NOTHUGE jump if a normal request 09AEC 68000800 0 172 UCPR R0 WNDO1(AUTHTIME) trying to give away *huge* 09AED FE029AF6 173 JEQ RELDIR jump if he's authorized, continue 174 * \ / if requester not also *huge*, give error 175 00009AEE 176 ERRTOOMUCH LABEL 09AEE DC405685 177 CALLNP FREEDIR release the managers directory 09AEF DC403150 178 CALLNP GRUBWNDO1 release any page mapped in 09AF0 DC405526 179 CALLNP FREEULB free managers ULB 09AF1 FE0E59D0 180 JMP FERRORIAUT indicate insufficient authorization powers 181 * --- 182 00009AF2 183 NOTHUGE LABEL 09AF2 18000801 0 184 ADD R0 WNDO1(AUTHTIMEA) produce the new time allocated 09AF3 68000800 0 185 UCPR R0 WNDO1(AUTHTIME) check against authorized limit 09AF4 FE049AEE 186 JGT ERRTOOMUCH jump if caller over-extending self 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2170 (OPRAUTH) F 135 auth list manager 09AF5 E4000801 0 187 ST R0 WNDO1(AUTHTIMEA) looks okay, update allocated time 188 * \ / 189 00009AF6 190 RELDIR LABEL 09AF6 DC405685 191 CALLNP FREEDIR release the managers directory 09AF7 E5178802 4 6 BASE 192 ST ULB SP,MGRULB save managers ULB 193 * \ / 194 00009AF8 195 SUPERACCT LABEL 09AF8 61095114 4 5 ZBM 196 LD ULB FCB,FCLIMITPTR get ptr to victim ULB 09AF9 DC405667 197 CALLNP FETCHDIR acquire the victims directory 09AFA DC003205 198 CALL SETWNDO1 map in the directory 09AFB 41440000 IMM 199 PARV VPCNTLW with write access 09AFC 41534000 5 REG 200 PARV FCB indicate lun associated 09AFD 41009B23 201 PAR OCRAUTHDE where to visit on MS error 09AFE 41570801 4 BASE 202 PARV ULB,ULBLOCK indicate UDIR1 address 09AFF 40440009 IMM 203 PARVL FBITUDIR1 and FBI type 09B00 60000840 0 204 LD R0 WNDO1(UDAUTHLIST) get MS address of auth list 09B01 FA0C9B16 0 205 JNEZ R0 ALREADYH jump if auth list already exists 206 * \ / OK, go ahead and create auth list 207 09B02 60440001 1 IMM 208 LD R1 1 count of blocks being added 09B03 DC405C7B 209 CALLNP LIMITCHECK adjust space used totals 09B04 FE0E9B23 210 JMP NOROOM jump if user limit exceeded 211 * \ / 212 09B05 DC005C60 213 CALL GETFREEW2 get a free block 09B06 41440015 IMM 214 PARV FBITAUTLB indicate FBI type of new block 09B07 40440000 IMM 215 PARVL 0 relative block number 09B08 FE0E9B25 216 JMP NODISKROOM jump if no space left on volume 217 * \ / 218 09B09 60178803 0 6 BASE 219 LD R0 SP,STAKRQAUTH get the amount of CPU time being delegated 09B0A E4000C00 0 220 ST R0 WNDO2(AUTHTIME) set up initial entry 09B0B DC4031A0 221 CALLNP FORCEWRW2 force out the new auth list 09B0C DC403153 222 CALLNP GRUBWNDO2 and release the window 09B0D 60095181 0 5 ZBM 223 LD R0 FCB,FCMSBLK get MS address for auth list 09B0E E4000840 0 224 ST R0 WNDO1(UDAUTHLIST) save in UDIR1 block 09B0F DC40319D 225 CALLNP FORCEWRW1 force the directory to disk 09B10 DC405685 226 CALLNP FREEDIR release the dir 09B11 DC403150 227 CALLNP GRUBWNDO1 and unmap this window 09B12 61178802 4 6 BASE 228 LD ULB SP,MGRULB get managers ULB back 09B13 FB305982 4 229 JZA ULB FNOERROR jump if no more to accomplish 09B14 DC405526 230 CALLNP FREEULB release access to managers ULB 09B15 FE0E5982 231 JMP FNOERROR finish off OPREQ 232 * --- 233 00009B16 234 ALREADYH LABEL 09B16 61C4008E 7 IMM 235 LD R7 XREQERNAE name already exists 236 * \ / 237 00009B17 238 ALREADYJ LABEL 09B17 DC405685 239 CALLNP FREEDIR release the currently held directory 09B18 DC403150 240 CALLNP GRUBWNDO1 release any mapped in stuff 09B19 61178802 4 6 BASE 241 LD ULB SP,MGRULB get managers ULB back 09B1A FB305997 4 242 JZA ULB FERROR7 jump if no manager account 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2171 (OPRAUTH) F 135 auth list manager 09B1B DC009CE0 243 CALL GETAUTHN get back managers auth list 09B1C 43440000 IMM 244 PARV2 0 indicate no specific entry required 09B1D 40009B2B 245 PARL EASYDSKERR no other possible recovery 09B1E FE0E9B2E 246 JMP HSUPER super account 09B1F FE0E9B2E 247 JMP HSUPER auth recently removed 248 * \ / 09B20 60178803 0 6 BASE 249 LD R0 SP,STAKRQAUTH get the auth being worked with 09B21 B0000801 0 250 RSBM R0 WNDO1(AUTHTIMEA) indicate not really delegated 09B22 FE0E9B2C 251 JMP ERRINR7 go give error 252 * --- 253 00009B23 254 NOROOM LABEL 00009B23 255 OCRAUTHDE LABEL 09B23 61D20000 7 0 REG 256 LD R7 R0 copy the error code out of the way 09B24 FE0E9B17 257 JMP ALREADYJ and go back out 258 * --- 259 00009B25 260 NODISKROOM LABEL 09B25 61D20000 7 0 REG 261 LD R7 R0 copy original error out of the way 09B26 6047FFFF 1 IMM 262 LD R1 -1 get amount of space under consideration 09B27 DC405C7B 263 CALLNP LIMITCHECK indicate space not used after all 09B28 00131224 264 HALT HALTS1224 bogus return from LIMITCHECK 09B29 FE0E9B17 265 JMP ALREADYJ go back out 266 * --- 267 00009B2A 268 EASYDSKERR1 LABEL 09B2A 61178802 4 6 BASE 269 LD ULB SP,MGRULB get manager ULB pointer, if any 270 * \ / 271 00009B2B 272 EASYDSKERR LABEL 09B2B 61C4009F 7 IMM 273 LD R7 XREQERDSE indicate disk structure error 274 * \ / 275 00009B2C 276 ERRINR7 LABEL 09B2C DC405685 277 CALLNP FREEDIR release the currently held directory 09B2D DC403150 278 CALLNP GRUBWNDO1 release any page mapped in 279 * \ / 280 00009B2E 281 HSUPER LABEL 09B2E FB305997 4 282 JZA ULB FERROR7 no manager ULB to free 09B2F DC405526 283 CALLNP FREEULB release access to the manager ULB 09B30 FE0E5997 284 JMP FERROR7 and return error 285 * --- 286 287 END OPRCRAUTHL routine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2172 (OPRAUTH) F 135 auth list manager 289 290 ********************************************************************************** 291 * * 292 * OPRCHAUTHL. Change the CPU time that this manager * 293 * is allowed to allocate. * 294 * User call: * 295 * LD R0 ORCHGAUTHL load request code * 296 * LD R1 * 297 * OPREQ a .DIR * 298 * JLTZ R0 * 299 * ST R1 * 300 * ST R2 * 301 * * 302 * Stack required = 21 * 303 * 0 + max ( FREEDIR (5), FREEULB (11), GETAUTHL (12), * 304 * GRUBWNDO1 (7), PRESETAUTH (21) ) * 305 * * 306 ********************************************************************************** 307 308 BLOCK OPRCHAUTHL routine 309 ENTRY OPRCHAUTHL 310 00009B31 311 OPRCHAUTHL LABEL 09B31 F63659C8 0 312 JBT R0/CCBUSRFRC FERRORPNS not allowed to diddle self 313 * ULB <= ULB of victim account, R7 <= manager power bits 09B32 DC009CE0 314 CALL GETAUTHN get the auth list in 09B33 43440000 IMM 315 PARV2 0 indicate no particular entry wanted 09B34 40009B2A 316 PARL EASYDSKERR1 indicate MS error address 09B35 FE0E59C8 317 JMP FERRORPNS big account shouldn't get here 09B36 FE0E59C6 318 JMP FERRORNSE authorization list not found 09B37 60000800 0 319 LD R0 WNDO1(AUTHTIME) get the current allocation 09B38 E4178800 0 6 BASE 320 ST R0 SP,STAKTEMP save previous allocation 09B39 DC405685 321 CALLNP FREEDIR release the victims directory 322 * \ / 323 09B3A 6013C000 0 7 REG 324 LD R0 R7 retrieve manager power bits 09B3B DC005D0A 325 CALL PRESETAUTH get the proper authorization list 09B3C 41520000 0 REG 326 PARV R0 indicate who the requester is 09B3D 42440000 IMM 327 PARV2L 0 no volume name 09B3E FE0E59CA 328 JMP FERRORDSE some kind of disk error showed up 09B3F FE0E59C6 329 JMP FERRORNSE no authorization list found 09B40 FE0E9B51 330 JMP DOAUTH super account, just do the update 09B41 60178803 0 6 BASE 331 LD R0 SP,STAKRQAUTH get the new amount 09B42 FA2E9B49 0 332 JNEMW R0 NOTINF jump if not *huge* request 09B43 64000800 0 333 CPR R0 WNDO1(AUTHTIME) is the manager also *huge*? 09B44 FE029B4F 334 JEQ GIVEINF jump if okay 335 * \ / 336 00009B45 337 GIVEIAUT LABEL 09B45 DC405685 338 CALLNP FREEDIR release the directory currently held 09B46 DC403150 339 CALLNP GRUBWNDO1 release any page mapped in 09B47 DC405526 340 CALLNP FREEULB free up manager ULB 09B48 FE0E59D0 341 JMP FERRORIAUT insufficient authorization 342 * --- 343 00009B49 344 NOTINF LABEL 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2173 (OPRAUTH) F 135 auth list manager 09B49 10178800 0 6 BASE 345 SUB R0 SP,STAKTEMP allow for what he already has 09B4A 60520000 1 0 REG 346 LD R1 R0 make a copy 09B4B 18000801 0 347 ADD R0 WNDO1(AUTHTIMEA) add to the time already allocated 348 * R0 <= new amount authorized, allocatable remains the same 09B4C 54040000 0 IMM 349 MAX R0 0 do not allow negative values 09B4D 68000800 0 350 UCPR R0 WNDO1(AUTHTIME) compare against maximum he may allocate 09B4E FE049B45 351 JGT GIVEIAUT error if exceeded 352 * \ / 353 00009B4F 354 GIVEINF LABEL 09B4F E4000801 0 355 ST R0 WNDO1(AUTHTIMEA) save new amount allocated 09B50 DC405685 356 CALLNP FREEDIR release managers directory 357 * \ / 358 00009B51 359 DOAUTH LABEL 09B51 E5178802 4 6 BASE 360 ST ULB SP,MGRULB save away manager ULB pointer 09B52 61095114 4 5 ZBM 361 LD ULB FCB,FCLIMITPTR get pointer to victims ULB 09B53 DC009CE0 362 CALL GETAUTHN get in his auth list 09B54 43440000 IMM 363 PARV2 0 no volume name 09B55 40009B64 364 PARL OCHBKUPR indicate where to back out 09B56 00131225 365 HALT HALTS1225 big account was detected earlier 09B57 FE0E9B67 366 JMP OCHBKUP go to back out if no longer an auth list 367 * \ / 368 09B58 60978803 2 6 BASE 369 LD R2 SP,STAKRQAUTH get the new requested value 09B59 E0800800 2 370 EXCH R2 WNDO1(AUTHTIME) get the currently authorized time 09B5A 60C00801 3 371 LD R3 WNDO1(AUTHTIMEA) and the amount further delegated 09B5B 60400412 1 372 LD R1 CPPSA get the current PSA pointer 09B5C 60485F11 1 1 ZBM 373 LD R1 R1,PSCACHNP1 get pointer to callers registers 09B5D E6964803 231 BASE 374 ST2 R2 R1,CAR1 return the prior values 09B5E DC405685 375 CALLNP FREEDIR release the victims directory 09B5F DC403150 376 CALLNP GRUBWNDO1 and unmap any window 09B60 61178802 4 6 BASE 377 LD ULB SP,MGRULB get manager ULB 09B61 FB305982 4 378 JZA ULB FNOERROR jump if ULB is null 09B62 DC405526 379 CALLNP FREEULB free up manager ULB 09B63 FE0E5982 380 JMP FNOERROR 381 * --- 382 00009B64 383 OCHBKUPR LABEL 09B64 61C4009F 7 IMM 384 LD R7 XREQERDSE disk structure error 09B65 DC405685 385 CALLNP FREEDIR release the victims directory 09B66 FE0E9B68 386 JMP OCHBKUPA go share code 387 * --- 388 00009B67 389 OCHBKUP LABEL 09B67 61C400AB 7 IMM 390 LD R7 XREQERNSE authorization list disappeared 391 * \ / 392 00009B68 393 OCHBKUPA LABEL 09B68 60578803 1 6 BASE 394 LD R1 SP,STAKRQAUTH get the new auth requested 09B69 FA6C9B2A 1 395 JEQMW R1 EASYDSKERR1 jump if *huge* request, manager auth not altered 09B6A 61178802 4 6 BASE 396 LD ULB SP,MGRULB restore manager ULB pointer 09B6B FB305997 4 397 JZA ULB FERROR7 jump if no manager to update 09B6C DC009CE0 398 CALL GETAUTHN recover the managers auth list 09B6D 43440000 IMM 399 PARV2 0 no volume name 09B6E 40009B2B 400 PARL EASYDSKERR no other recovery left 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2174 (OPRAUTH) F 135 auth list manager 09B6F FE0E9B2E 401 JMP HSUPER big account, no auth list to update 09B70 FE0E9B2E 402 JMP HSUPER authorization removed 403 * \ / 404 09B71 60178803 0 6 BASE 405 LD R0 SP,STAKRQAUTH get amount we tried to give away 09B72 10178800 0 6 BASE 406 SUB R0 SP,STAKTEMP allow for already allocated 09B73 B0000801 0 407 RSBM R0 WNDO1(AUTHTIMEA) restore amount already allocated 09B74 FE0E9B2C 408 JMP ERRINR7 go return error 409 * --- 410 411 END OPRCHAUTHL routine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2175 (OPRAUTH) F 135 auth list manager 413 414 ********************************************************************************** 415 * * 416 * OPRDSAUTHL. Request to destroy an auth list. * 417 * We destroy each volume authorization element individually * 418 * then flush the entire list. * 419 * User call: * 420 * LD R0 ORDESAUTHL load request code * 421 * OPREQ a .DIR * 422 * JLTZ R0 * 423 * ST R1 * 424 * ST R2 * 425 * * 426 * Stack required = 21 * 427 * 0 + max ( FETCHDIR (4), FORCEWRW1 (5), FREEDIR (5), * 428 * FREEFILE (3), FREEULB (11), GETAUTHN (12), * 429 * GRUBWNDO1 (7), LIMITCHECK (1), MAPOUTFBI (2), * 430 * PRESETAUTH (21), SETWNDO1 (4) ) * 431 * * 432 ********************************************************************************** 433 434 BLOCK OPRDSAUTHL routine 435 ENTRY OPRDSAUTHL 436 00009B75 437 OPRDSAUTHL LABEL 09B75 F63659C8 0 438 JBT R0/CCBUSRFRC FERRORPNS not allowed to diddle self 439 * \ / 440 00009B76 441 NEXTEL LABEL 442 * ULB <= ULB of victim account 09B76 DC009CE0 443 CALL GETAUTHN get in the auth list 09B77 43440000 IMM 444 PARV2 0 no volume name 09B78 40009B2A 445 PARL EASYDSKERR1 where to go on MS error 09B79 FE0E59C8 446 JMP FERRORPNS big account, shouldn't be here 09B7A FE0E59C6 447 JMP FERRORNSE authlist not found 448 * \ / 449 09B7B 62800804 23 450 LD2 R2 WNDO1(AUTHENTBG)/AUTHVNAME get first name in list 09B7C E6978800 236 BASE 451 ST2 R2 SP,STAKTEMP save the volume name 09B7D DC405685 452 CALLNP FREEDIR release the directory 09B7E DC403150 453 CALLNP GRUBWNDO1 unmap window 09B7F 62978800 236 BASE 454 LD2 R2 SP,STAKTEMP retrieve the volume name 09B80 FA929B86 23 455 JEQZ2 R2 NOLIST jump if volume auth list gone 09B81 81524000 1 REG 456 STCAR R1 get our address of our console area 09B82 600400F8 0 IMM 457 LD R0 ORDESAUTHE get OPREQ code to destroy auth list element 09B83 0956480E 1 BASE 458 OPREQ R1,CAXOPERAND and do it to this unit 09B84 FA069B76 0 459 JGEZ R0 NEXTEL go back as long as request honored 09B85 FE0E5983 460 JMP FERROR error if not honored 461 * --- 462 00009B86 463 NOLIST LABEL 09B86 DC405667 464 CALLNP FETCHDIR acquire control of the directory 09B87 DC403205 465 CALLNP SETWNDO1 map in the UDIR1 09B88 41440002 IMM 466 PARV VPCNTLW+VPCNTLLK indicate locked and writable 09B89 41534000 5 REG 467 PARV FCB indicate what file associated 09B8A 41009BC0 468 PAR DIRBURN no other recovery action possible 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2176 (OPRAUTH) F 135 auth list manager 09B8B 41570801 4 BASE 469 PARV ULB,ULBLOCK pass UDIR1 MS address 09B8C 40440009 IMM 470 PARVL FBITUDIR1 indicate FBI type expected 09B8D DC40261B 471 CALLNP MAPOUTFBI unmap FBI, ION 472 * \ / 473 09B8E 60000840 0 474 LD R0 WNDO1(UDAUTHLIST) get the auth list MS pointer 09B8F FA029BC3 0 475 JEQZ R0 NOAUTHL jump if no auth list here 09B90 E4095181 0 5 ZBM 476 ST R0 FCB,FCMSBLK build complete MS address 09B91 EC000840 477 STZ WNDO1(UDAUTHLIST) remove auth list ptr from UDIR1 09B92 DC40319D 478 CALLNP FORCEWRW1 force the UDIR1 back to mass storage 09B93 DC405685 479 CALLNP FREEDIR release the directory 09B94 6047FFFF 1 IMM 480 LD R1 -1 get the amount of space being returned 09B95 DC405C7B 481 CALLNP LIMITCHECK and call to update this guy 09B96 00131227 482 HALT HALTS1227 LIMITCHECK gave bogus return 09B97 DC003205 483 CALL SETWNDO1 get the unattached auth list in 09B98 41440000 IMM 484 PARV VPCNTLW indicate read/write 09B99 41534000 5 REG 485 PARV FCB indicate UNIT associated 09B9A 41009BBE 486 PAR OAUTHDE mass storage error address 09B9B 41574801 5 BASE 487 PARV FCB,FCBLOCK indicate address 09B9C 40440015 IMM 488 PARVL FBITAUTLB pass FBI type expected 489 * \ / 490 09B9D 60400800 1 491 LD R1 WNDO1(AUTHTIME) get the allocated time 09B9E 60800801 2 492 LD R2 WNDO1(AUTHTIMEA) get the amount further delegated 09B9F E6978800 236 BASE 493 ST2 R2 SP,STAKTEMP save values to be given to caller 09BA0 FAAC9BA3 2 494 JEQMW R2 RTNAUTH jump if given away huge 09BA1 FA6C9BA3 1 495 JEQMW R1 RTNAUTH jump if allocatable is huge and given is not 09BA2 30924000 2 1 REG 496 RSB R2 R1 calculate amount to give back 497 * \ / 498 00009BA3 499 RTNAUTH LABEL 09BA3 E4978803 2 6 BASE 500 ST R2 SP,STAKRQAUTH save on stack 09BA4 DC403150 501 CALLNP GRUBWNDO1 release the window 09BA5 DC004FEA 502 CALL FREEFILE give away this block 09BA6 41574801 5 BASE 503 PARV FCB,FCBLOCK indicate where 09BA7 40440015 IMM 504 PARVL FBITAUTLB and what type 09BA8 6013C000 0 7 REG 505 LD R0 R7 retrieve manager power bits 506 * R0 <= managers power bits, ULB <= ULB of victim account 09BA9 DC005D0A 507 CALL PRESETAUTH fetch manager authlist 09BAA 41520000 0 REG 508 PARV R0 pass who we are 09BAB 42440000 IMM 509 PARV2L 0 specific entry not required 09BAC FE0E59CA 510 JMP FERRORDSE some type of disk problems 09BAD FE0E5982 511 JMP FNOERROR super account, don't worry about it 09BAE FE0E5982 512 JMP FNOERROR authlist is gone, so are we 513 * \ / 514 09BAF 6016C801 0 3 BASE 515 LD R0 R3,AUTHTIMEA get the allocated amount so far 09BB0 FA2C9BB6 0 516 JEQMW R0 RETURNOK if *huge*, then leave as is 09BB1 60178803 0 6 BASE 517 LD R0 SP,STAKRQAUTH get the adjusting auth value 09BB2 FA2C9BB5 0 518 JEQMW R0 UPDATEAUTH if *huge*, then set allocated at *huge* 09BB3 3016C801 0 3 BASE 519 RSB R0 R3,AUTHTIMEA adjust authorized amount accordingly 09BB4 54040000 0 IMM 520 MAX R0 0 disallow negative numbers 521 * \ / 522 00009BB5 523 UPDATEAUTH LABEL 09BB5 E416C801 0 3 BASE 524 ST R0 R3,AUTHTIMEA and cast in stone for all to see 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2177 (OPRAUTH) F 135 auth list manager 525 * \ / 526 00009BB6 527 RETURNOK LABEL 09BB6 DC405685 528 CALLNP FREEDIR release the directory 09BB7 DC403150 529 CALLNP GRUBWNDO1 unmap the page in use 09BB8 DC405526 530 CALLNP FREEULB free managers ULB 531 * Update users registers 09BB9 60000412 0 532 LD R0 CPPSA current process status area 09BBA 60081F11 0 0 ZBM 533 LD R0 R0,PSCACHNP1 pointer to users console area 09BBB 62578800 126 BASE 534 LD2 R1 SP,STAKTEMP fetch previous authlist values 09BBC E6560803 120 BASE 535 ST2 R1 R0,CAR1 return values in callers registers 09BBD FE0E5982 536 JMP FNOERROR return success 537 * --- 538 00009BBE 539 OAUTHDE LABEL disk error reading in authlist 09BBE 61D20000 7 0 REG 540 LD R7 R0 copy the error code 09BBF FE0E9BC5 541 JMP RELWNDO and share code 542 * --- 543 00009BC0 544 DIRBURN LABEL disk error reading in victims directory 09BC0 61D20000 7 0 REG 545 LD R7 R0 save error code 09BC1 DC40261B 546 CALLNP MAPOUTFBI unmap FBI, ION 09BC2 FE0E9BC4 547 JMP RELDIR free dir and return error 548 * --- 549 00009BC3 550 NOAUTHL LABEL authlist disappeared out from under us 09BC3 61C400AB 7 IMM 551 LD R7 XREQERNSE no such entry 552 * \ / 553 00009BC4 554 RELDIR LABEL 09BC4 DC405685 555 CALLNP FREEDIR release the held directory 556 * \ / 557 00009BC5 558 RELWNDO LABEL 09BC5 DC403150 559 CALLNP GRUBWNDO1 unmap any mapped pages 09BC6 FE0E5997 560 JMP FERROR7 couldn't find any authlist 561 * --- 562 563 END OPRDSAUTHL routine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2178 (OPRAUTH) F 135 auth list manager 565 566 ********************************************************************************** 567 * * 568 * OPRGTAUTHL. Get the values currently stored in the * 569 * auth list. * 570 * User call: * 571 * LD R0 ORGETAUTHL load request code * 572 * OPREQ a .DIR * 573 * JLTZ R0 * 574 * ST R1 * 575 * ST R2 * 576 * * 577 * Stack required = 12 * 578 * 0 + max ( FREEDIR (5), GETAUTHL (12), GRUBWNDO1 (7) ) * 579 * * 580 ********************************************************************************** 581 582 BLOCK OPRGTAUTHL routine 583 ENTRY OPRGTAUTHL 584 00009BC7 585 OPRGTAUTHL LABEL 586 * R0 <= managers power bits, ULB <= ULB of victim account 09BC7 DC009CE0 587 CALL GETAUTHN get in the auth list 09BC8 43440000 IMM 588 PARV2 0 no volume requested 09BC9 40009B2A 589 PARL EASYDSKERR1 where to go on MS error 09BCA FE0E59D0 590 JMP FERRORIAUT big account, shouldn't be here 09BCB FE0E59C6 591 JMP FERRORNSE authorization list not found 592 * \ / 593 09BCC 60400800 1 594 LD R1 WNDO1(AUTHTIME) get the time that he can delegate 09BCD 60800801 2 595 LD R2 WNDO1(AUTHTIMEA) and the actual time delegated 09BCE 60000412 0 596 LD R0 CPPSA get the current PSA pointer 09BCF 60081F11 0 0 ZBM 597 LD R0 R0,PSCACHNP1 get pointer to callers registers 09BD0 E6560803 120 BASE 598 ST2 R1 R0,CAR1 return values in callers registers 09BD1 DC405685 599 CALLNP FREEDIR release the victims directory 09BD2 DC403150 600 CALLNP GRUBWNDO1 and unmap any pages 09BD3 FE0E5982 601 JMP FNOERROR return 602 * --- 603 604 END OPRGTAUTHL routine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2179 (OPRAUTH) F 135 auth list manager 606 607 ********************************************************************************** 608 * * 609 * CRAUTHNTRY. Routine to create a new auth list entry. * 610 * These entries contain volume names and the amount of space * 611 * of each type (scratch, disk limit, and saved limit) that * 612 * may be delegated. * 613 * Note that the victim may not use his auth list powers * 614 * to delegate space to himself. His own limits must be set * 615 * by a manager just like his auth list. * 616 * User call: * 617 * LD R0 ORCREAUTHE load request code * 618 * LD2 R2 * 619 * OPREQ a .DIR * 620 * JLTZ R0 * 621 * * 622 * Stack required = 21 * 623 * 0 + max ( FREEDIR (5), FREEULB (11), GETAUTHN (12), * 624 * GRUBWNDO1 (7), PRESETAUTH (21) ) * 625 * * 626 ********************************************************************************** 627 628 BLOCK CRAUTHNTRY routine 629 ENTRY CRAUTHNTRY 630 00009BD4 631 CRAUTHNTRY LABEL 09BD4 F63659C8 0 632 JBT R0/CCBUSRFRC FERRORPNS not allowed to diddle self 09BD5 60800412 2 633 LD R2 CPPSA get callers PSA pointer 09BD6 60889F11 2 2 ZBM 634 LD R2 R2,PSCACHNP1 pointer to callers registers 09BD7 5E168804 2 BASE 635 CMZ2 R2,CAR2 ensure name was actually given 09BD8 FE0259DA 636 JEQ UERRORPOB error if it wasn't 637 * \ / 638 639 * R0 <= managers power bits, ULB <= ULB of victim account 09BD9 DC005D0A 640 CALL PRESETAUTH fin managers authlist 09BDA 41520000 0 REG 641 PARV R0 pass manager power bits 09BDB 42568804 2 BASE 642 PARV2L R2,CAR2 pass volume name to find 09BDC FE0E59CA 643 JMP FERRORDSE problems, disk structure error 09BDD FE0E59D0 644 JMP FERRORIAUT no entry or not for specified volume 09BDE FE0E9BE2 645 JMP BIGSHOT super account, no authorization needed 646 * \ / 647 09BDF DC405685 648 CALLNP FREEDIR release hold on managers directory 09BE0 DC403150 649 CALLNP GRUBWNDO1 authlist no longer needed 09BE1 DC405526 650 CALLNP FREEULB indicate managers ULB not in use 651 * \ / 652 00009BE2 653 BIGSHOT LABEL 09BE2 61095114 4 5 ZBM 654 LD ULB FCB,FCLIMITPTR restore pointer to victims ULB 09BE3 DC009CE0 655 CALL GETAUTHN get in his authlist 09BE4 43440000 IMM 656 PARV2 0 no specific entry needed 09BE5 40009B2A 657 PARL EASYDSKERR1 where to go on disk error 09BE6 FE0E59C8 658 JMP FERRORPNS super account, shouldn't be authorizing here 09BE7 FE0E59C6 659 JMP FERRORNSE authorization list not found 09BE8 60800412 2 660 LD R2 CPPSA get the current PSA pointer 09BE9 60889F11 2 2 ZBM 661 LD R2 R2,PSCACHNP1 get pointer to callers registers 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2180 (OPRAUTH) F 135 auth list manager 09BEA 38C00804 3 662 LEA R3 WNDO1(AUTHENTBG) get pointer to beginning of auth list entries 663 * \ / 664 00009BEB 665 CRSLP LABEL 09BEB 6216C800 013 BASE 666 LD2 R0 R3,AUTHVNAME get the current entries volume name 09BEC FA129BF5 01 667 JEQZ2 R0 EMPTYSPOT jump if an empty place has been found 09BED 66168804 012 BASE 668 CPR2 R0 R2,CAR2 see if it's a duplicate 09BEE FE029BFC 669 JEQ DUPENTRY jump if duplicate, give error 09BEF 18C4000C 3 IMM 670 ADD R3 AUTHLELEN advance to next entry 09BF0 64C40BF4 3 IMM 671 CPR R3 ADR WNDO1(WPP-AUTHLELEN) are we at the end of the block? 09BF1 FE0A9BEB 672 JLE CRSLP continue if another entry possible 673 * \ / 674 09BF2 DC405685 675 CALLNP FREEDIR release the directory 09BF3 DC403150 676 CALLNP GRUBWNDO1 unmap the page 09BF4 FE0E59D2 677 JMP FERRORISYR report error 678 * --- 679 00009BF5 680 EMPTYSPOT LABEL 09BF5 62168804 012 BASE 681 LD2 R0 R2,CAR2 get the new entries name 09BF6 E616C800 013 BASE 682 ST2 R0 R3,AUTHVNAME save new name in new list spot 09BF7 EE16C804 3 BASE 683 STZ2 R3,AUTHDSK clear disk limit amounts 09BF8 EE16C806 3 BASE 684 STZ2 R3,AUTHSDSK clear saved amounts 09BF9 DC405685 685 CALLNP FREEDIR release the directory 09BFA DC403150 686 CALLNP GRUBWNDO1 release the modified auth list 09BFB FE0E5982 687 JMP FNOERROR return, no error 688 * --- 689 00009BFC 690 DUPENTRY LABEL 09BFC DC405685 691 CALLNP FREEDIR release the directory 09BFD DC403150 692 CALLNP GRUBWNDO1 release the page 09BFE FE0E59C4 693 JMP FERRORNAE give name already exists error 694 * --- 695 696 END CRAUTHNTRY routine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2181 (OPRAUTH) F 135 auth list manager 698 699 ********************************************************************************** 700 * * 701 * DSAUTHNTRY. Routine to destroy an auth list entry. * 702 * Note that before any work is begun an attempt is made to * 703 * find that manager and check to see if he has an * 704 * authorization entry. If he has none an error is returned. * 705 * This is done in an attempt to keep the authorization list * 706 * as close to the real world as possible. If the list should * 707 * disappear in the middle, there is not a whole lot we can do * 708 * except exit gracefully. * 709 * User call: * 710 * LD R0 ORDESAUTHE load request code * 711 * LD2 R2 * 712 * OPREQ a .DIR * 713 * JLTZ R0 * 714 * * 715 * Stack required = 21 * 716 * 0 + max ( FREEDIR (5), FREEULB (11), GETAUTHN (12), * 717 * GRUBWNDO1 (7), PRESETAUTH (21) ) * 718 * * 719 ********************************************************************************** 720 721 BLOCK DSAUTHNTRY routine 722 ENTRY DSAUTHNTRY 723 00009BFF 724 DSAUTHNTRY LABEL 09BFF F63659C8 0 725 JBT R0/CCBUSRFRC FERRORPNS not allowed to diddle self 09C00 60400412 1 726 LD R1 CPPSA current process status area 09C01 60485F11 1 1 ZBM 727 LD R1 R1,PSCACHNP1 pointer to callers registers 09C02 5E164804 1 BASE 728 CMZ2 R1,CAR2 ensure name was actually given 09C03 FE0259DA 729 JEQ UERRORPOB error if it wasn't 730 * \ / 731 732 * R0 <= manager power bits, ULB <= ULB of victim account 09C04 DC005D0A 733 CALL PRESETAUTH find manager authorization entry 09C05 41520000 0 REG 734 PARV R0 pass manager power bits 09C06 42564804 1 BASE 735 PARV2L R1,CAR2 volume name of correct entry 09C07 FE0E59CA 736 JMP FERRORDSE return disk structure error 09C08 FE0E59C6 737 JMP FERRORNSE no authorization list found 09C09 FE0E9C0C 738 JMP SUPERACCT super account needs no authorization 739 * \ / 740 09C0A E5178802 4 6 BASE 741 ST ULB SP,MGRULB save for later use 09C0B DC405685 742 CALLNP FREEDIR release access to the directory 743 * \ / 744 00009C0C 745 SUPERACCT LABEL 09C0C 60400412 1 746 LD R1 CPPSA get the current PSA pointer 09C0D 60485F11 1 1 ZBM 747 LD R1 R1,PSCACHNP1 make pointer to callers registers 09C0E 61095114 4 5 ZBM 748 LD ULB FCB,FCLIMITPTR ULB of victim account 09C0F DC009CE0 749 CALL GETAUTHN get the auth list entry 09C10 43564804 1 BASE 750 PARV2 R1,CAR2 pass the volume name 09C11 40009B2A 751 PARL EASYDSKERR1 MS error address 09C12 FE0E9C47 752 JMP ENTRYBIG big account, shouldn't be here 09C13 FE0E9C43 753 JMP ENTRYGONE no matching auth list entry 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2182 (OPRAUTH) F 135 auth list manager 754 * \ / 755 09C14 6256C804 123 BASE 756 LD2 R1 R3,AUTHDSK get disk space allocatable and allocated 09C15 FAAC9C18 2 757 JEQMW R2 RTNDSK if given away *huge* leave as is 09C16 FA6C9C18 1 758 JEQMW R1 RTNDSK jump if allocatable is *huge* and allocated is not 09C17 30924000 2 1 REG 759 RSB R2 R1 calculate space adjustment to manager authlist 760 * \ / 761 00009C18 762 RTNDSK LABEL 09C18 E4978800 2 6 BASE 763 ST R2 SP,STAKTEMP save for when manager authlist around 09C19 6256C806 123 BASE 764 LD2 R1 R3,AUTHSDSK get save disk space numbers 09C1A FAAC9C1D 2 765 JEQMW R2 RTNSDSK if given away *huge*, leave as is 09C1B FA6C9C1D 1 766 JEQMW R1 RTNSDSK jump if allocatable is *huge* and allocated is not 09C1C 30924000 2 1 REG 767 RSB R2 R1 calculate space adjustment to manager authlist 768 * \ / 769 00009C1D 770 RTNSDSK LABEL 09C1D E4978801 2 6 BASE 771 ST R2 SP,STAKTEMP1 save for later use 09C1E 6016D00C 0 3 REG 772 LD R0 R3+AUTHLELEN this is the source for our move 09C1F 60440C00 1 IMM 773 LD R1 ADR (WNDO1(WPP)) address of the block end 09C20 10520000 1 0 REG 774 SUB R1 R0 number of words to move 09C21 1C440004 1 IMM 775 MUL R1 CPW convert to character count 09C22 6092C000 2 3 REG 776 LD R2 R3 last, the source address 09C23 FE400000 777 CMOVE wipe out the old entry 09C24 60440030 1 IMM 778 LD R1 AUTHLELEN*CPW character length of one entry 09C25 FE580000 779 CFILL 000 clean up the end 09C26 DC405685 780 CALLNP FREEDIR release victims directory 09C27 DC403150 781 CALLNP GRUBWNDO1 write block to disk 782 * \ / 783 09C28 61178802 4 6 BASE 784 LD ULB SP,MGRULB get manager ULB pointer back 09C29 FB305982 4 785 JZA ULB FNOERROR big account, updates not necessary 09C2A 60400412 1 786 LD R1 CPPSA get the current PSA pointer 09C2B 60485F11 1 1 ZBM 787 LD R1 R1,PSCACHNP1 make pointer to callers registers 09C2C DC009CE0 788 CALL GETAUTHN get manager authlist back 09C2D 43564804 1 BASE 789 PARV2 R1,CAR2 pass volume name 09C2E 40009B2B 790 PARL EASYDSKERR where to go on disk error 09C2F 00131228 791 HALT HALTS1228 should never get here 09C30 FE0E9C45 792 JMP ENTRYGONE2 entry zapped out from underneath us 793 * \ / 794 09C31 6016C805 0 3 BASE 795 LD R0 R3,AUTHDSKA disk space allocated amount 09C32 FA2C9C38 0 796 JEQMW R0 DOSDSK if *huge*, leave as is 09C33 60178800 0 6 BASE 797 LD R0 SP,STAKTEMP get disk space adjustment 09C34 FA2C9C37 0 798 JEQMW R0 UPDATEDSK if *huge*, make authlist say *huge* 09C35 3016C805 0 3 BASE 799 RSB R0 R3,AUTHDSKA calculate new authorized amount 09C36 54040000 0 IMM 800 MAX R0 0 make sure never negative 801 * \ / 802 00009C37 803 UPDATEDSK LABEL 09C37 E416C805 0 3 BASE 804 ST R0 R3,AUTHDSKA make change in authlist 805 * \ / 806 00009C38 807 DOSDSK LABEL 09C38 6016C807 0 3 BASE 808 LD R0 R3,AUTHSDSKA saved disk space allocated amount 09C39 FA2C9C3F 0 809 JEQMW R0 GRUBAUTH if *huge*, then finished with authlist 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2183 (OPRAUTH) F 135 auth list manager 09C3A 60178801 0 6 BASE 810 LD R0 SP,STAKTEMP1 get saved disk space adjustment 09C3B FA2C9C3E 0 811 JEQMW R0 UPDATESDSK if *huge*, copy to manager 09C3C 3016C807 0 3 BASE 812 RSB R0 R3,AUTHSDSKA calculate new amount 09C3D 54040000 0 IMM 813 MAX R0 0 prevent negative amounts 814 * \ / 815 00009C3E 816 UPDATESDSK LABEL 09C3E E416C807 0 3 BASE 817 ST R0 R3,AUTHSDSKA reflect change in the authlist 818 * \ / 819 00009C3F 820 GRUBAUTH LABEL 09C3F DC405685 821 CALLNP FREEDIR release access to directory 09C40 DC403150 822 CALLNP GRUBWNDO1 writh authlist if modified 09C41 DC405526 823 CALLNP FREEULB free managers ULB 09C42 FE0E5982 824 JMP FNOERROR 825 * --- 826 827 * no such entry 00009C43 828 ENTRYGONE LABEL 09C43 61178802 4 6 BASE 829 LD ULB SP,MGRULB get locked ULB, if any 09C44 FB3059C6 4 830 JZA ULB FERRORNSE vamoose if there isn't 00009C45 831 ENTRYGONE2 LABEL 09C45 DC405526 832 CALLNP FREEULB free manager ULB 09C46 FE0E59C6 833 JMP FERRORNSE no such entry 834 * --- 835 836 * can't do this to the big manager 00009C47 837 ENTRYBIG LABEL 09C47 61178802 4 6 BASE 838 LD ULB SP,MGRULB get locked ULB, if any 09C48 FB3059C6 4 839 JZA ULB FERRORNSE vamoose if there isn't 09C49 DC405526 840 CALLNP FREEULB free manager ULB 09C4A FE0E59C8 841 JMP FERRORPNS privilege not sufficient 842 * --- 843 844 END DSAUTHNTRY routine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2184 (OPRAUTH) F 135 auth list manager 846 847 ********************************************************************************** 848 * * 849 * OPRCAUT. Routine to change the MS limits specified * 850 * in an auth list entry. * 851 * User call: * 852 * LD R0 ORCAUTHxx load request code - * 853 ** DL for disk limit, SL for saved * 854 * LD R1 * 855 * LD2 R2 * 856 * OPREQ a .DIR * 857 * JLTZ R0 * 858 * ST R1 * 859 * ST R2 * 860 * * 861 * Stack required = 21 * 862 * 0 + max ( FREEDIR (5), FREEULB (11), GETAUTHN (12), * 863 * GRUBWNDO1 (7), PRESETAUTH (21) ) * 864 * * 865 ********************************************************************************** 866 867 BLOCK OPRCAUT routine 868 ENTRY OPRCAUT 869 00009C4B 870 OPRCAUT LABEL 09C4B F63659F4 0 871 JBT R0/CCBUSRFRC UERRORPNS not allowed to diddle self 09C4C 60400412 1 872 LD R1 CPPSA get the callers PSA pointer 09C4D 60485F11 1 1 ZBM 873 LD R1 R1,PSCACHNP1 get pointer to callers registers 09C4E 5E164804 1 BASE 874 CMZ2 R1,CAR2 ensure name was actually given 09C4F FE0259DA 875 JEQ UERRORPOB error if it wasn't 876 * \ / 877 878 * R1 <= callers console area, ULB <= ULB of victim account 09C50 DC009CE0 879 CALL GETAUTHN get the auth list entry for the victim 09C51 43564804 1 BASE 880 PARV2 R1,CAR2 pass the volume name 09C52 40009B2A 881 PARL EASYDSKERR1 MS error address 09C53 FE0E59C8 882 JMP FERRORPNS super account, shouldn't be here 09C54 FE0E59C6 883 JMP FERRORNSE no authorization list found 884 * \ / 885 09C55 608980F0 2 6 ZBM 886 LD R2 SP,STAKTEMP/UPR15 get the index to desired info 09C56 601CD000 0 32 BASE 887 LD R0 R3,0(R2) get current allocatable amount 09C57 E4178801 0 6 BASE 888 ST R0 SP,STAKTEMP1 save current amount 09C58 DC405685 889 CALLNP FREEDIR release the directory 890 * \ / 891 09C59 6013C000 0 7 REG 892 LD R0 R7 get manager power bits 09C5A 60400412 1 893 LD R1 CPPSA get the current PSA pointer 09C5B 60485F11 1 1 ZBM 894 LD R1 R1,PSCACHNP1 get ptr to callers registers 895 * R0 <= manager power bits, R1 <= callers console area, ULB <= ULB of victim account 09C5C DC005D0A 896 CALL PRESETAUTH find manager authlist 09C5D 41520000 0 REG 897 PARV R0 pass who we are 09C5E 42564804 1 BASE 898 PARV2L R1,CAR2 and volume name 09C5F FE0E59CA 899 JMP FERRORDSE where to go on a disk error 09C60 FE0E59C6 900 JMP FERRORNSE no authorization list found 09C61 FE0E9C73 901 JMP NOAUTHREQ super account, no authlist required 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2185 (OPRAUTH) F 135 auth list manager 09C62 E5178802 4 6 BASE 902 ST ULB SP,MGRULB save manager ULB for later use 903 * \ / 904 09C63 608980F0 2 6 ZBM 905 LD R2 SP,STAKTEMP/UPR15 get the index 09C64 601CD000 0 32 BASE 906 LD R0 R3,0(R2) get the amount allocatable 09C65 FA2C9C88 0 907 JEQMW R0 MGRHASINF jump if manager has *huge* authorization 09C66 60178803 0 6 BASE 908 LD R0 SP,STAKRQAUTH get the new value requested 09C67 FA2C9C90 0 909 JEQMW R0 NOTENOUGH can't give away *huge* if he doesn't have it 09C68 605CD001 1 32 BASE 910 LD R1 R3,1(R2) get amount allocated 09C69 FA6C9C90 1 911 JEQMW R1 NOTENOUGH obviously over his limit 09C6A 10178801 0 6 BASE 912 SUB R0 SP,STAKTEMP1 produce the change in auth 09C6B 60520000 1 0 REG 913 LD R1 R0 and copy that 09C6C 181CD001 0 32 BASE 914 ADD R0 R3,1(R2) get the already delegated amount 09C6D FA489C71 1 915 JLTZ R1 DOWNOK don't ask questions if removing authorization 09C6E 681CD000 0 32 BASE 916 UCPR R0 R3,0(R2) check against amount allocatable 09C6F FE049C90 917 JGT NOTENOUGH too bad, give error on insufficient authorization 09C70 54040000 0 IMM 918 MAX R0 0 never allow negative number 919 * \ / 920 00009C71 921 DOWNOK LABEL 09C71 E41CD001 0 32 BASE 922 ST R0 R3,1(R2) store new amount allocated 923 * \ / 924 00009C72 925 DOCRELD LABEL 09C72 DC405685 926 CALLNP FREEDIR release the directory 927 * \ / 928 00009C73 929 NOAUTHREQ LABEL 09C73 61095114 4 5 ZBM 930 LD ULB FCB,FCLIMITPTR get victims ULB pointer 09C74 60400412 1 931 LD R1 CPPSA get the current PSA pointer 09C75 60485F11 1 1 ZBM 932 LD R1 R1,PSCACHNP1 get pointer to callers registers 09C76 DC009CE0 933 CALL GETAUTHN get his auth list 09C77 43564804 1 BASE 934 PARV2 R1,CAR2 pass the volume name 09C78 40009C96 935 PARL CAUTHDSE where to go on disk error 09C79 00131226 936 HALT HALTS1226 modifying auth on super acct, trapped earlier 09C7A FE0E9C94 937 JMP CAUTHNSE jump if no such entry (someone else removed it) 938 * \ / 939 09C7B 608980F0 2 6 ZBM 940 LD R2 SP,STAKTEMP/UPR15 get index for desired value 09C7C 60178803 0 6 BASE 941 LD R0 SP,STAKRQAUTH get the requested new value 09C7D E01CD000 0 32 BASE 942 EXCH R0 R3,0(R2) exchange with the old value 09C7E 605CD001 1 32 BASE 943 LD R1 R3,1(R2) get current allocated amount 09C7F 60800412 2 944 LD R2 CPPSA get the current PSA pointer 09C80 60889F11 2 2 ZBM 945 LD R2 R2,PSCACHNP1 pointer to callers registers 09C81 E6168803 012 BASE 946 ST2 R0 R2,CAR1 save old values for caller 09C82 DC405685 947 CALLNP FREEDIR release the victims dir 09C83 DC403150 948 CALLNP GRUBWNDO1 unmap authlist 09C84 61178802 4 6 BASE 949 LD ULB SP,MGRULB get managers ULB, if any 09C85 FB305982 4 950 JZA ULB FNOERROR jump if our work is done 09C86 DC405526 951 CALLNP FREEULB free managers ULB 09C87 FE0E5982 952 JMP FNOERROR indicate success 953 * --- 954 00009C88 955 MGRHASINF LABEL 09C88 60178803 0 6 BASE 956 LD R0 SP,STAKRQAUTH get the new value 09C89 FA2C9C71 0 957 JEQMW R0 DOWNOK jump if giving away *huge* 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2186 (OPRAUTH) F 135 auth list manager 09C8A 605CD001 1 32 BASE 958 LD R1 R3,1(R2) get current authorized amount 09C8B FA6C9C72 1 959 JEQMW R1 DOCRELD if *huge* no update necessary 09C8C 10178801 0 6 BASE 960 SUB R0 SP,STAKTEMP1 produce the amount of change 09C8D 181CD001 0 32 BASE 961 ADD R0 R3,1(R2) and indicate that we've allocated this much more 09C8E 54040000 0 IMM 962 MAX R0 0 disallow negative values 09C8F FE0E9C71 963 JMP DOWNOK update authlist and release DIR 964 * --- 965 00009C90 966 NOTENOUGH LABEL 09C90 DC405685 967 CALLNP FREEDIR release access to directory 09C91 DC403150 968 CALLNP GRUBWNDO1 unmap authlist 09C92 DC405526 969 CALLNP FREEULB free managers ULB 09C93 FE0E59D0 970 JMP FERRORIAUT insufficient authorization. sorry bud 971 * --- 972 00009C94 973 CAUTHNSE LABEL 09C94 61C400AB 7 IMM 974 LD R7 XREQERNSE no authorization list found 09C95 FE0E9C97 975 JMP CAUTHSHR go share cleanup code 976 * --- 977 00009C96 978 CAUTHDSE LABEL 09C96 61C4009F 7 IMM 979 LD R7 XREQERDSE disk structure error 980 * \ / 981 00009C97 982 CAUTHSHR LABEL 09C97 61178802 4 6 BASE 983 LD ULB SP,MGRULB was a manager found 09C98 FB305997 4 984 JZA ULB FERROR7 jump if not 09C99 60400412 1 985 LD R1 CPPSA get the current PSA pointer 09C9A 60485F11 1 1 ZBM 986 LD R1 R1,PSCACHNP1 get pointer to callers registers 09C9B DC009CE0 987 CALL GETAUTHN get the auth list entry back 09C9C 43564804 1 BASE 988 PARV2 R1,CAR2 pass the volume name 09C9D 40009B2B 989 PARL EASYDSKERR nothing further can be done on MS error 09C9E 00131229 990 HALT HALTS1229 this should have been detected earlier 09C9F FE0E9B2E 991 JMP HSUPER no authorization list found 992 * \ / 993 09CA0 608980F0 2 6 ZBM 994 LD R2 SP,STAKTEMP/UPR15 get the index to the change 09CA1 60178803 0 6 BASE 995 LD R0 SP,STAKRQAUTH get the desired new auth 09CA2 10178801 0 6 BASE 996 SUB R0 SP,STAKTEMP1 calculate the change in auth 09CA3 301CD001 0 32 BASE 997 RSB R0 R3,1(R2) remove from already allocated total 09CA4 54040000 0 IMM 998 MAX R0 0 disallow negative values 09CA5 E41CD001 0 32 BASE 999 ST R0 R3,1(R2) return to allocated amount 09CA6 DC405685 1000 CALLNP FREEDIR release the callers directory 09CA7 DC403150 1001 CALLNP GRUBWNDO1 unmap any page from the window 09CA8 DC405526 1002 CALLNP FREEULB free mangers ULB 09CA9 FE0E5997 1003 JMP FERROR7 1004 * --- 1005 1006 END OPRCAUT routine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2187 (OPRAUTH) F 135 auth list manager 1008 1009 ********************************************************************************** 1010 * * 1011 * OPRGAUT. Routine to acquire the current authorization * 1012 * values for a specified volume from the auth list entry. * 1013 * User call: * 1014 * LD R0 ORGAUTHxx load request code - * 1015 ** DL for disk limit, SL for saved * 1016 * LD2 R2 * 1017 * OPREQ a .DIR * 1018 * JLTZ R0 * 1019 * ST R1 * 1020 * ST R2 * 1021 * * 1022 * Stack required = 12 * 1023 * 0 + max ( FREEDIR (5), GETAUTHN (12), GRUBWNDO1 (7) ) * 1024 * * 1025 ********************************************************************************** 1026 1027 BLOCK OPRGAUT routine 1028 ENTRY OPRGAUT 1029 00009CAA 1030 OPRGAUT LABEL 09CAA 60400412 1 1031 LD R1 CPPSA get the current PSA pointer 09CAB 60485F11 1 1 ZBM 1032 LD R1 R1,PSCACHNP1 get the callers register pointer 09CAC 5E164804 1 BASE 1033 CMZ2 R1,CAR2 ensure name was actually given 09CAD FE0259DA 1034 JEQ UERRORPOB error if it wasn't 1035 * \ / 1036 1037 * R1 <= pointer to callers console area, ULB <= ULB of victim account 09CAE DC009CE0 1038 CALL GETAUTHN get the auth list entry 09CAF 43564804 1 BASE 1039 PARV2 R1,CAR2 pass the volume name 09CB0 40009B2A 1040 PARL EASYDSKERR1 MS error address 09CB1 FE0E59C8 1041 JMP FERRORPNS insufficient privilege 09CB2 FE0E59C6 1042 JMP FERRORNSE no authorization list found 1043 * \ / 1044 09CB3 608980F0 2 6 ZBM 1045 LD R2 SP,STAKTEMP/UPR15 get index of desired info 09CB4 601CD000 0 32 BASE 1046 LD R0 R3,0(R2) get the allocatable value 09CB5 605CD001 1 32 BASE 1047 LD R1 R3,1(R2) and the allocated value 1048 * note that a LD2 must not be used 1049 * here as it doubles the index. 09CB6 60800412 2 1050 LD R2 CPPSA get the current PSA pointer 09CB7 60889F11 2 2 ZBM 1051 LD R2 R2,PSCACHNP1 get the register pointer 09CB8 E6168803 012 BASE 1052 ST2 R0 R2,CAR1 place the values into the callers R1,2 09CB9 DC405685 1053 CALLNP FREEDIR release the victims directory 09CBA DC403150 1054 CALLNP GRUBWNDO1 unmap the auth list page 09CBB FE0E5982 1055 JMP FNOERROR return, no error 1056 * --- 1057 1058 END OPRGAUT routine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2188 (OPRAUTH) F 135 auth list manager 1060 1061 ********************************************************************************** 1062 * * 1063 * OPRGAUTENS. Routine to acquire the entire list * 1064 * of volumes authorized and the limits set thereupon. * 1065 * User call: * 1066 * LD R0 ORGAUTENS load request code * 1067 * LD R1 * 1068 * LD R2 * 1069 * OPREQ a .DIR * 1070 * JLTZ R0 * 1071 * ST R1 * 1072 * * 1073 * Stack required = 12 * 1074 * 0 + max ( FREEDIR (5), GETAUTHN (12), GRUBWNDO1 (7), * 1075 * SETMEMTRAP (1) ) * 1076 * * 1077 ********************************************************************************** 1078 1079 BLOCK OPRGAUTENS routine 1080 ENTRY OPRGAUTENS 1081 00009CBC 1082 OPRGAUTENS LABEL 09CBC DC009CE0 1083 CALL GETAUTHN call for the auth list 09CBD 43440000 IMM 1084 PARV2 0 no specific entry wanted 09CBE 40009B2A 1085 PARL EASYDSKERR1 MS error address 09CBF FE0E59C8 1086 JMP FERRORPNS no one has sufficient authorization 09CC0 FE0E59C6 1087 JMP FERRORNSE no authorization list found 1088 * \ / 1089 09CC1 DC005BCF 1090 CALL SETMEMTRAP set up to trap user memory errors 09CC2 40009CDB 1091 PARL USRMEMBAD (such as memory protect violation) 09CC3 60440000 1 IMM 1092 LD R1 0 start with an assumed size of zero 1093 * \ / 1094 00009CC4 1095 SCAN4SIZE LABEL 09CC4 5C220804 1 1096 CMZ WNDO1(AUTHENTBG)(R1) see if entry in corresponding spot 09CC5 FE029CC9 1097 JEQ DOMOVE done scanning if no entry here 09CC6 1844000C 1 IMM 1098 ADD R1 AUTHLELEN advance by one entry 09CC7 644403F0 1 IMM 1099 CPR R1 WPP-AUTHENTBG-AUTHLELEN are we at the last possible spot? 09CC8 FE0A9CC4 1100 JLE SCAN4SIZE jump back if another possible entry 1101 * \ / 1102 00009CC9 1103 DOMOVE LABEL 09CC9 60040804 0 IMM 1104 LD R0 ADR WNDO1(AUTHENTBG) get the starting address 09CCA 1C440004 1 IMM 1105 MUL R1 CPW convert word count to char count 09CCB E4578800 1 6 BASE 1106 ST R1 SP,STAKTEMP save transfer length for after CMOVE 09CCC 60C00412 3 1107 LD R3 CPPSA get the current PSA pointer 09CCD 60C8DF11 3 3 ZBM 1108 LD R3 R3,PSCACHNP1 get current user CA pointer 09CCE 5056C803 1 3 BASE 1109 MIN R1 R3,CAR1 ensure we don't overrun his buffer 09CCF 6096C804 2 3 BASE 1110 LD R2 R3,CAR2 get the buffer address 09CD0 38968000 2 2 CACH 1111 LEA R2 CACH R2,0 expand in all its glory 09CD1 5C08F011 3 ZBM 1112 CMZ R3,CAMSR/MSRSRELOCB is the user relocated to user state? 09CD2 FE0C9CD4 1113 JNE USEMONMEM jump if not 09CD3 59840080 IMM 1114 CLBMSR MSRSRELOC relocate to user space 1115 * \ / 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2189 (OPRAUTH) F 135 auth list manager 1116 00009CD4 1117 USEMONMEM LABEL 09CD4 FE400000 1118 CMOVE move data out 09CD5 59C40080 IMM 1119 IORMSR MSRSRELOC restore storing to monitor 09CD6 60578800 1 6 BASE 1120 LD R1 SP,STAKTEMP retrieve the transfer length 09CD7 B056C803 1 3 BASE 1121 RSBM R1 R3,CAR1 and remove space from his buffer length 09CD8 DC405685 1122 CALLNP FREEDIR release the directory 09CD9 DC403150 1123 CALLNP GRUBWNDO1 and unmap the window 09CDA FE0E5982 1124 JMP FNOERROR return no error 1125 * --- 1126 00009CDB 1127 USRMEMBAD LABEL user memory flaked out 09CDB E6178800 016 BASE 1128 ST2 R0 SP,STAKTEMP save the error parameters 09CDC DC405685 1129 CALLNP FREEDIR release the directory 09CDD DC403150 1130 CALLNP GRUBWNDO1 and unmap the window 09CDE 62178800 016 BASE 1131 LD2 R0 SP,STAKTEMP retrieve the error parameters 09CDF FE0E5B5F 1132 JMP PASSERRUP and pass the error up 1133 * --- 1134 1135 END OPRGAUTENS routine 1136 1137 1138 END Auth List OPREQ Routines 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2190 (OPRAUTH) F 135 auth list manager 1140 1141 ********************************************************************************** 1142 * * 1143 * Routine to fetch the managers auth list element for * 1144 * the volume specified. If the volume name is zero then the * 1145 * address of the authlist is returned. Note that on an MS * 1146 * error the directory is still locked. We assume that the * 1147 * manager has been verified as a MANAGER before this routine * 1148 * is called. * 1149 * User call: * 1150 * LD ULB * 1151 * CALL GETAUTHN * 1152 * PARV2 * 1153 * PARL * 1154 * * 1155 * * 1156 * element, dir locked, window 1 = auth list block> * 1157 * * 1158 * Eats R0:R2, Sets R3 as above * 1159 * Stack required = 12. * 1160 * 5 + max ( FETCHDIR (1), FREEDIR (5), GRUBWNDO1 (7), * 1161 * SETERRW1 (1), SETWNDO1 (4) ) * 1162 * * 1163 ********************************************************************************** 1164 1165 BLOCK GETAUTHN routine 1166 ENTRY GETAUTHN find auth list element 1167 1168 BEGFRAME 00178801 6 BASE 1169 GETAUTHEAD BSS 1 error address 00178802 6 BASE 1170 GETAUTHVN BSS 2 desired volume name 00178804 6 BASE 1171 GETAUTHULB BSS 1 place to save ULB pointer 1172 ENDFRAME 1173 09CE0 DD1F8005 6 STAK 1174 GETAUTHN ENTR PUSH 09CE1 C3578802 6 BASE 1175 STPV2 SP,GETAUTHVN save the desired volume number 09CE2 C0178801 6 BASE 1176 STPL SP,GETAUTHEAD save the error address 1177 * \ / 1178 09CE3 60170804 0 4 BASE 1179 LD R0 ULB,ULACCPROJ see if no auth needed 09CE4 68002551 0 1180 UCPR R0 DOTBTI check for maintenance 09CE5 FE029D09 1181 JEQ SUPERMAN jump if this is the case 09CE6 68002555 0 1182 UCPR R0 DOTSYS check for system manager 09CE7 FE029D09 1183 JEQ SUPERMAN jump if this is the case 09CE8 E5178804 4 6 BASE 1184 ST ULB SP,GETAUTHULB save away ULB pointer 09CE9 DC405667 1185 CALLNP FETCHDIR lock up the directory 09CEA DC003205 1186 CALL SETWNDO1 call for map in 09CEB 41440001 IMM 1187 PARV VPCNTLRO indicate only reading 09CEC 41440000 IMM 1188 PARV VPNOFCB not associated with a file 09CED 41009D15 1189 PAR GETAUTHDE pass error address 09CEE 41570801 4 BASE 1190 PARV ULB,ULBLOCK indicate MS address of managers UDIR1 09CEF 40440009 IMM 1191 PARVL FBITUDIR1 specify type of block expected 1192 * \ / 1193 09CF0 60000840 0 1194 LD R0 WNDO1(UDAUTHLIST) get pointer to auth list 09CF1 FA029D11 0 1195 JEQZ R0 NOAUTHX jump if no auth list 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2191 (OPRAUTH) F 135 auth list manager 09CF2 61170801 4 4 BASE 1196 LD R4 ULB,ULBLOCK get the ms address of the managers directory 09CF3 E40B1180 0 4 CBM 1197 ST R0 R4/MSBLKFIELD set up new address (for auth list block) 09CF4 DC003205 1198 CALL SETWNDO1 set up new address 09CF5 41440000 IMM 1199 PARV VPCNTLW this will be read-write 09CF6 41440000 IMM 1200 PARV VPNOFCB not associated with a file 09CF7 41009D15 1201 PAR GETAUTHDE pass error address 09CF8 41530000 4 REG 1202 PARV R4 pass the ms address of auth list block 09CF9 40440015 IMM 1203 PARVL FBITAUTLB expecting account auth list block 1204 * \ / 1205 09CFA 61178804 4 6 BASE 1206 LD ULB SP,GETAUTHULB restore pointer to ULB 09CFB 60C40800 3 IMM 1207 LD R3 ADR (WNDO1) generate pointer to authlist 09CFC 5E178802 6 BASE 1208 CMZ2 SP,GETAUTHVN was a volume name specified? 09CFD FE029D0C 1209 JEQ AUTHOK if not our work is done 09CFE 60C40804 3 IMM 1210 LD R3 ADR WNDO1(AUTHENTBG) make address of vol auth list part 09CFF 60840000 2 IMM 1211 LD R2 0 no "all" yet 1212 * \ / 1213 00009D00 1214 CRAURPT LABEL 09D00 6216C800 013 BASE 1215 LD2 R0 R3,AUTHVNAME get authorized volume name 09D01 FA029D10 0 1216 JEQZ R0 NOAUTHY jump if end of list, ours not found 09D02 66178802 016 BASE 1217 CPR2 R0 SP,GETAUTHVN compare against spec 09D03 FE029D0C 1218 JEQ AUTHOK jump if this block it 09D04 64002558 0 1219 CPR R0 ALLVOLUMES is this one that matches all volumes? 09D05 FE0C9D07 1220 JNE NOTANALL jump if not 09D06 6092C000 2 3 REG 1221 LD R2 R3 if it is, remember the pointer 1222 * \ / 1223 00009D07 1224 NOTANALL LABEL 09D07 18C4000C 3 IMM 1225 ADD R3 AUTHLELEN advance to next auth list entry 09D08 FE0E9D00 1226 JMP CRAURPT continue loop 1227 * --- 1228 00009D09 1229 SUPERMAN LABEL Account not requiring any authorization 09D09 60C40000 3 IMM 1230 LD R3 0 no pointer into the auth list 09D0A 5D1F8005 6 STAK 1231 LEAVE POP 1232 * --- 1233 00009D0B 1234 AUTHOKX LABEL Correct authorization entry has been found 09D0B 60D28000 3 2 REG 1235 LD R3 R2 use the "all" entry found 1236 * \ / 1237 00009D0C 1238 AUTHOK LABEL 09D0C 60178801 0 6 BASE 1239 LD R0 SP,GETAUTHEAD get specified MS error address 09D0D DC403190 1240 CALLNP SETERRW1 send disk errors to the caller 09D0E 19C40002 7 IMM 1241 ADD R7 2 advance to found return 09D0F 5D1F8005 6 STAK 1242 LEAVE POP return to caller 1243 * --- 1244 00009D10 1245 NOAUTHY LABEL 09D10 FA8C9D0B 2 1246 JNEZ R2 AUTHOKX use an "all" entry if one found 1247 * \ / 1248 00009D11 1249 NOAUTHX LABEL No auth entry found, give bad news 09D11 DC403150 1250 CALLNP GRUBWNDO1 release window with auth list block 09D12 DC405685 1251 CALLNP FREEDIR free access to the directory 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2192 (OPRAUTH) F 135 auth list manager 09D13 19C40001 7 IMM 1252 ADD R7 1 advance to not found return 09D14 5D1F8005 6 STAK 1253 LEAVE POP 1254 * --- 1255 00009D15 1256 GETAUTHDE LABEL Disk structure error 09D15 61178804 4 6 BASE 1257 LD ULB SP,GETAUTHULB restore pointer to ULB 09D16 61D78801 7 6 BASE 1258 LD R7 SP,GETAUTHEAD return to the error address 09D17 5D1F8005 6 STAK 1259 LEAVE POP return to error return 1260 * --- 1261 1262 END GETAUTH routine 1263 1264 1265 END Auth List Manager 203 INPUT XRQOPRAFTIDX AFT/IDX functions 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2193 (XRQOPRAFTIDX) F 136 OPREQ - AFT/IDX functions 3 4 ********************************************************************************** 5 * * 6 * These are the AFT/IDX requests. The AFT (account finder * 7 * table) is a global table that the system uses to find a UDIR * 8 * address. IDX's are associated with a particular volume. * 9 * They have basically the same format as the AFT, and there is * 10 * one for each loaded volume. * 11 * * 12 * Stack required = 15 * 13 * 0 + max ( OPRAFTRD (15), OPREQAAFT (13), OPREQDAFT (13), * 14 * OPRIDXRD (15) ) * 15 * * 16 ********************************************************************************** 17 18 BLOCK AFT/IDX functions 19 ENTRY OPRAFTIDX 20 00009D18 21 OPRAFTIDX LABEL 09D18 68840004 2 IMM 22 UCPR R2 JUMPTABLEN correct sub-code 09D19 FE0659D8 23 JGE UERRORILR if not give error 24 * \ / 09D1A 5CA49D1B 2 25 LDPC JUMPTAB(R2) go to the appropriate routine 26 * --- 27 00009D1B 28 JUMPTAB LABEL 09D1B 00009D1F 29 ADR OPRAFTRD read AFT 09D1C 00009D26 30 ADR OPRIDXRD read IDX 09D1D 00009DAB 31 ADR OPREQAAFT add entry to the AFT 09D1E 00009DAD 32 ADR OPREQDAFT delete an entry from the AFT 00000004 ABS 33 JUMPTABLEN EQU DISPW JUMPTAB 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2194 (XRQOPRAFTIDX) F 136 OPREQ - AFT/IDX functions 35 36 ********************************************************************************** 37 * * 38 * This request allows a manager to read the contents of * 39 * the AFT, or the IDX, seeing only those entries that are under * 40 * him. Requires Manager privilege. * 41 * User call: * 42 * LD R0 request * 43 * LD R1 buffer size in chars * 44 * LD R2 buffer address * 45 * OPREQ 0 (a .VOL if IDX read) * 46 * JLTZ R0 request error * 47 * ST R1 buffer size - chars remaining * 48 * * 49 * Stack required = 15 * 50 * 8 + max ( FREEAFTACS (5), FREEIDXACS (5), GETAFTACS (1), * 51 * GETIDXACS (3), GRUBWNDO1 (7), LUNSEARCH (2), * 52 * SETMEMTRAP (1), SETWNDO1 (4), WHOLOOK (1) ) * 53 * * 54 ********************************************************************************** 55 56 BLOCK read AFT/IDX routines 57 ENTRY OPRAFTRD AFT read 58 ENTRY OPRIDXRD IDX read 59 60 BEGFRAME2 00178800 6 BASE 61 AISCOREA BSS 1 user core address 00178801 6 BASE 62 AISBUFFR BSS 1 buffer characters remaining 00178802 6 BASE 63 AISRELOC BSS 1 relocation of requester 00178803 6 BASE 64 AISCHECK BSS 1 => routine to check lookability 00178804 6 BASE 65 AISBUCKT BSS 1 current AFT/IDX bucket 00178805 6 BASE 66 AISPTR BSS 1 pointer to array of AFT/IDX addresses 00178806 6 BASE 67 AISERRCODE BSS 2 error code 68 ENDFRAME 69 70 AFTINFORD LIST 70 ********************************************************************************** 70 * * 70 * Format of each entry returned by the read AFT request. * 70 * * 70 ********************************************************************************** 00009D1F 70 AIPROTO BASE R0 00160800 0 BASE 70 AIVOL BSS 2 volume name (PAK12) 00160802 0 BASE 70 AIACCT BSS 2 account name (PAK12) 00160804 0 BASE 70 AIPROJ BSS 1 account project (PAK6) 70 DRCT 00000005 ABS 70 AILEN EQU DISPW AIPROTO length of the entry in words 70 ORG AIPROTO 71 000BC010 7 CBM 72 READTYPE EQU R7/BIT 0 1 sez AFT 0 sez IDX 73 74 ********************************************************************************** 75 * * 76 * If a read of the AFT was requested we come here. * 77 * * 78 ********************************************************************************** 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2195 (XRQOPRAFTIDX) F 136 OPREQ - AFT/IDX functions 79 00009D1F 80 OPRAFTRD LABEL 09D1F EC1F8008 6 STAK 81 STZ PUSH allocate stack 09D20 EDCBC010 7 CBM 82 STW READTYPE indicate AFT read 09D21 DC0056E6 83 CALL GETAFTACS get access to the AFT 09D22 40440000 IMM 84 PARVL AFTACSRO only reading 09D23 60001F64 0 85 LD R0 AFTINDEX pointer to AFT blocks 09D24 E4178805 0 6 BASE 86 ST R0 SP,AISPTR and put on stack 09D25 FE0E9D33 87 JMP DOIT go to the common part 88 * --- 89 90 ********************************************************************************** 91 * * 92 * If a read of the IDX was requested we come here. * 93 * * 94 ********************************************************************************** 95 00009D26 96 OPRIDXRD LABEL 09D26 EC1F8008 6 STAK 97 STZ PUSH allocate stack 09D27 EC0BC010 7 CBM 98 STZ READTYPE indicate IDX read 09D28 DC405B39 99 CALLNP LUNSEARCH look for the lun 09D29 FB7059BA 5 100 JZA FCB FERRORNSL no such LUN 101 * \ / 09D2A 60C96665 3 5 ZBM 102 LD R3 FCB,FCHTYPE get type of lun 09D2B 64C4000E 3 IMM 103 CPR R3 HTYPEVOL is it a .VOL? 09D2C FE0C59A5 104 JNE FERRORILOP if not give illegal request 105 * \ / 09D2D 60095F16 0 5 ZBM 106 LD R0 FCB,FCDCBPTR get pointer to VOLN element 09D2E 60481F19 1 0 ZBM 107 LD R1 R0,VOLNIDXPTR pointer to IDXT element 09D2F E4578805 1 6 BASE 108 ST R1 SP,AISPTR and remember for later 09D30 DC00580B 109 CALL GETIDXACS get access to the IDX 09D31 41440000 IMM 110 PARV AFTACSRO only reading 09D32 40494081 5 ZBM 111 PARVL FCB,FCDRIVE volume # we want 112 * \ / 113 00009D33 114 DOIT LABEL 09D33 60091F14 0 4 ZBM 115 LD R0 R4,CAR2/FLDADRS force buffer to word boundary 09D34 E4178800 0 6 BASE 116 ST R0 SP,AISCOREA save masked buffer address 09D35 600903F3 0 4 ZBM 117 LD R0 R4,CAR1/BITS 1:31 pick up size of buffer 09D36 E4178801 0 6 BASE 118 ST R0 SP,AISBUFFR and remember size of buffer 09D37 60170801 0 4 BASE 119 LD R0 R4,CAMSR 09D38 78040080 0 IMM 120 AND R0 MSRSRELOC 09D39 74040080 0 IMM 121 XOR R0 MSRSRELOC find relocation bit to change 09D3A E4178802 0 6 BASE 122 ST R0 SP,AISRELOC remember requester relocation 09D3B DC005BCF 123 CALL SETMEMTRAP set up for user errors 09D3C 40009DA2 124 PARL USRMEMBAD where to go when encountered 125 * \ / 126 127 ********************************************************************************** 128 * * 129 * Figure out how many accounts I may look at. * 130 * * 131 ********************************************************************************** 132 133 * \ / 09D3D 61000414 4 134 LD R4 CPCUPC 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2196 (XRQOPRAFTIDX) F 136 OPREQ - AFT/IDX functions 09D3E 60090C10 0 4 ZBM 135 LD R0 R4,UPBACKUP get the backup privilege bit 09D3F FA029D42 0 136 JEQZ R0 SHARLOOK jump if privileged (0 => backup) 137 * \ / fall through if UPBACKUP=1 ( 1 => not backup) 09D40 61091F13 4 4 ZBM 138 LD ULB R4,UPCPRIVULB get pointer to privileged account 09D41 DC408847 139 CALLNP WHOLOOK see who I may see 140 * \ / 141 00009D42 142 SHARLOOK LABEL 09D42 60209D5F 0 0 143 LD R0 SORTTAB(R0) get the pointer to the routine 09D43 E4178803 0 6 BASE 144 ST R0 SP,AISCHECK remember what to check 145 * \ / 146 147 ********************************************************************************** 148 * * 149 * Pass through the AFT/IDX buckets returning the entries * 150 * as they are found. * 151 * * 152 ********************************************************************************** 153 154 * \ / 09D44 EC178804 6 BASE 155 STZ SP,AISBUCKT begin with bucket 0 09D45 60178804 0 6 BASE 156 LD R0 SP,AISBUCKT and load bucket index 09D46 61178805 4 6 BASE 157 LD R4 SP,AISPTR R4 => AFT/IDX pointers 158 * \ / 159 00009D47 160 DOBUCKT LABEL 09D47 605D0004 1 40 BASE 161 LD R1 R4,IDXTBUCKET(R0) get disk address of bucket 09D48 FA429D8B 1 162 JEQZ R1 NEXTBUCKT jump if no bucket here 09D49 E4491180 1 4 ZBM 163 ST R1 R4,IDXTMSBLK construct full MS address 164 165 * Map in either an AFT or an IDX bucket 09D4A DC003205 166 CALL SETWNDO1 map in the block 09D4B 41440001 IMM 167 PARV VPCNTLRO only reading 09D4C 41440000 IMM 168 PARV VPNOFCB no lun associated 09D4D 41009D9F 169 PAR BADAFTBLK where to go on error 09D4E 41570800 4 BASE 170 PARV R4,IDXTBLOCK disk address 09D4F 40570004 4 CACH 171 PARVL R4,IDXTFBIT pass FBI type 172 09D50 60C40800 3 IMM 173 LD R3 ADR WNDO1 R3=>current entry 09D51 5C16C800 3 BASE 174 CMZ R3,0 touch page so we get errors here 175 * \ / 00009D52 176 CHECKENT LABEL 09D52 6016C802 0 3 BASE 177 LD R0 R3,IDXACNOP get the looked at project 09D53 FA2C9D5A 0 178 JEQMW R0 MAYBESKIP maybe deleted entry 09D54 FA0C9D57 0 179 JNEZ R0 CHECKENTX jump if an entry here 09D55 5E16C800 3 BASE 180 CMZ2 R3,IDXACNO is there an account here? 09D56 FE029D8A 181 JEQ DONEBUCKT if no acct, then end of bucket 182 * \ / 183 00009D57 184 CHECKENTX LABEL 09D57 61000414 4 185 LD R4 CPCUPC current underprocess making request 09D58 61091F13 4 4 ZBM 186 LD ULB R4,UPCPRIVULB get ULB giving privilege 09D59 5C978803 6 BASE 187 LDPC SP,AISCHECK check to see if to give it 188 * --- 189 190 * Project=-1. This might be a deleted entry. 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2197 (XRQOPRAFTIDX) F 136 OPREQ - AFT/IDX functions 00009D5A 191 MAYBESKIP LABEL 09D5A 6216C800 013 BASE 192 LD2 R0 R3,IDXACNO get the entry account name 09D5B FA2E9D5D 0 193 JNEMW R0 NOTSKIP if non minus one good entry 09D5C FA6C9D87 1 194 JEQMW R1 NOLOOKY jump if entry is definitely deleted 195 * \ / 196 00009D5D 197 NOTSKIP LABEL 09D5D 6016C802 0 3 BASE 198 LD R0 R3,IDXACNOP get the entry division/project name 09D5E FE0E9D57 199 JMP CHECKENTX share code 200 * --- 201 00009D5F 202 SORTTAB LABEL 09D5F 00009D72 203 VFD ADR GIVEENT 0 - see all 09D60 00009D63 204 VFD ADR CHECKSELF 1 - see only self 09D61 00009D69 205 VFD ADR CHECKPROJ 2 - see within same project 09D62 00009D6C 206 VFD ADR CHECKDIV 3 - see within own division 207 208 ********************************************************************************** 209 * * 210 * May see only self -- check to see if self. * 211 * * 212 ********************************************************************************** 213 00009D63 214 CHECKSELF LABEL 09D63 68170804 0 4 BASE 215 UCPR R0 ULB,ULACCPROJ same project? 09D64 FE0C9D87 216 JNE NOLOOKY if not, no see 09D65 6216C800 013 BASE 217 LD2 R0 R3,IDXACNO get entry account name 09D66 6A170802 014 BASE 218 UCPR2 R0 ULB,ULACCNM same account? 09D67 FE0C9D87 219 JNE NOLOOKY if not, he may not see 09D68 FE0E9D72 220 JMP GIVEENT let him look, maybe 221 * --- 222 223 ********************************************************************************** 224 * * 225 * May see same project. Check project part of account * 226 * name. * 227 * * 228 ********************************************************************************** 229 00009D69 230 CHECKPROJ LABEL 09D69 68170804 0 4 BASE 231 UCPR R0 ULB,ULACCPROJ same project? 09D6A FE0C9D87 232 JNE NOLOOKY jump if not 09D6B FE0E9D72 233 JMP GIVEENT if same, let him see 234 * --- 235 236 ********************************************************************************** 237 * * 238 * May see same division. Extract division from projects * 239 * and see if the same. * 240 * * 241 ********************************************************************************** 242 00009D6C 243 CHECKDIV LABEL 09D6C 600A0170 0 0 CBM 244 LD R0 R0/DVSNPART1 09D6D 1404007D 0 IMM 245 DIV R0 DVSNPART2 R0 <= division of the AFT entry 09D6E 60490174 1 4 ZBM 246 LD R1 ULB,ULACCPROJ/DVSNPART1 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2198 (XRQOPRAFTIDX) F 136 OPREQ - AFT/IDX functions 09D6F 1444007D 1 IMM 247 DIV R1 DVSNPART2 R1 <= division of the looker 09D70 64124000 0 1 REG 248 CPR R0 R1 the same division? 09D71 FE0C9D87 249 JNE NOLOOKY if not, he may not see 250 * \ / 251 252 ********************************************************************************** 253 * * 254 * The looker gets to see this entry, copy it to his * 255 * memory. * 256 * * 257 ********************************************************************************** 258 259 * \ / 00009D72 260 GIVEENT LABEL 09D72 F7C09D76 7 261 JBT READTYPE ITSAFTTODAY jump if AFT read, vol in table 09D73 60578805 1 6 BASE 262 LD R1 SP,AISPTR restore pointer to current IDX table 09D74 60084080 0 1 ZBM 263 LD R0 R1,IDXTVOL and fetch its volume 09D75 FE0E9D77 264 JMP GOTRIGHTVOL R0 <= volume number 265 * --- 266 00009D76 267 ITSAFTTODAY LABEL 09D76 6008C083 0 3 ZBM 268 LD R0 R3,IDXDIRDA/VOLFIELD extract the volume number 269 * \ / 270 00009D77 271 GOTRIGHTVOL LABEL 09D77 60440014 1 IMM 272 LD R1 AILEN*CPW length of a single entry 09D78 64578801 1 6 BASE 273 CPR R1 SP,AISBUFFR is there buffer remaining? 09D79 FE049D8F 274 JGT NOMOREBUF jump if no room 09D7A B0578801 1 6 BASE 275 RSBM R1 SP,AISBUFFR removed used buffer 09D7B 60978800 2 6 BASE 276 LD R2 SP,AISCOREA R2 <= address of requesters buffer 09D7C 60201F22 0 0 277 LD R0 VOLNTABLE(R0) R0 <= VOLN element 09D7D 59978802 6 BASE 278 CLBMSR SP,AISRELOC store relocation to the requester 09D7E 62160811 010 BASE 279 LD2 R0 R0,VOLNNAME 09D7F E6168800 012 BASE 280 ST2 R0 R2,AIVOL give volume name to user 09D80 6216C800 013 BASE 281 LD2 R0 R3,IDXACNO 09D81 E6168802 012 BASE 282 ST2 R0 R2,AIACCT give account name to user 09D82 6016C802 0 3 BASE 283 LD R0 R3,IDXACNOP 09D83 E4168804 0 2 BASE 284 ST R0 R2,AIPROJ give division/project name to user 09D84 59C40080 IMM 285 IORMSR MSRSRELOC restore to monitor relocation 09D85 60040014 0 IMM 286 LD R0 AILEN*CPW get the element length (characters) 09D86 98099F30 0 6 ZBM 287 ADDM R0 SP,AISCOREA/FLDCHARS advance the buffer pointer 288 * \ / 289 290 ********************************************************************************** 291 * * 292 * Move to the next entry in the current bucket. * 293 * * 294 ********************************************************************************** 295 296 * \ / 00009D87 297 NOLOOKY LABEL 09D87 18C40005 3 IMM 298 ADD R3 IDXLNTH move the pointer 09D88 64C40BFC 3 IMM 299 CPR R3 ADR WNDO1(IDXLNTH*IDXECNT) 09D89 FE089D52 300 JLT CHECKENT jump if more entries in bucket 301 * \ / 302 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2199 (XRQOPRAFTIDX) F 136 OPREQ - AFT/IDX functions 303 ********************************************************************************** 304 * * 305 * Move to the next bucket in the AFT or IDX. * 306 * * 307 ********************************************************************************** 308 309 * \ / 00009D8A 310 DONEBUCKT LABEL 09D8A DC403150 311 CALLNP GRUBWNDO1 release this window, prevent using WSX 00009D8B 312 NEXTBUCKT LABEL 09D8B BC178804 0 6 BASE 313 INCL R0 SP,AISBUCKT get and increment the bucket number 09D8C 61178805 4 6 BASE 314 LD R4 SP,AISPTR point to buckets 09D8D 64170005 0 4 CACH 315 CPR R0 R4,IDXTBNUM more buckets? 09D8E FE089D47 316 JLT DOBUCKT jump if more to do 317 * \ / 318 319 ********************************************************************************** 320 * * 321 * This is the good exit, we made it through without * 322 * encountering any problems. Release access to the proper * 323 * tables and we are on our way. * 324 * * 325 ********************************************************************************** 326 327 * \ / 00009D8F 328 NOMOREBUF LABEL 09D8F EC178806 6 BASE 329 STZ SP,AISERRCODE success error code 00009D90 330 DONEEXIT LABEL 09D90 DC403150 331 CALLNP GRUBWNDO1 release the mapped in AFT block 09D91 F3C09D95 7 332 JBF READTYPE RELIDX jump if IDX read 09D92 DC005701 333 CALL FREEAFTACS say we're finished with table 09D93 40440000 IMM 334 PARVL AFTACSRO 09D94 FE0E9D97 335 JMP TABLRELD now go share common exit 336 * --- 337 00009D95 338 RELIDX LABEL 09D95 DC005829 339 CALL FREEIDXACS let go of the table 09D96 40494081 5 ZBM 340 PARVL FCB,FCDRIVE volume # we had 341 * \ / 342 00009D97 343 TABLRELD LABEL 09D97 61000412 4 344 LD R4 CPPSA current process status area 09D98 61091F11 4 4 ZBM 345 LD R4 R4,PSCACHNP1 R4 => requester's registers 09D99 60178801 0 6 BASE 346 LD R0 SP,AISBUFFR 09D9A E4170803 0 4 BASE 347 ST R0 R4,CAR1 return buffer remaining 09D9B 60178800 0 6 BASE 348 LD R0 SP,AISCOREA 09D9C E4170804 0 4 BASE 349 ST R0 R4,CAR2 return next buffer address 09D9D 60178806 0 6 BASE 350 LD R0 SP,AISERRCODE get result code 09D9E FE0E5988 351 JMP UERROR give success or failure 352 * --- 353 354 ********************************************************************************** 355 * * 356 * The AFT/IDX went bad. I don't know how much longer this * 357 * system will last but we pass the error to the caller anyway. * 358 * * 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2200 (XRQOPRAFTIDX) F 136 OPREQ - AFT/IDX functions 359 ********************************************************************************** 360 00009D9F 361 BADAFTBLK LABEL 09D9F 6004009F 0 IMM 362 LD R0 XREQERDSE "Disk structure error" 09DA0 E4178806 0 6 BASE 363 ST R0 SP,AISERRCODE remember error that we got 09DA1 FE0E9D90 364 JMP DONEEXIT 365 * --- 366 367 ********************************************************************************** 368 * * 369 * The user memory has flaked out on us. It may be a * 370 * parity error, excluded memory, whatever. Pass the error * 371 * back to the user. * 372 * * 373 ********************************************************************************** 374 00009DA2 375 USRMEMBAD LABEL 09DA2 E6178806 016 BASE 376 ST2 R0 SP,AISERRCODE save the error information 09DA3 F3C09DA7 7 377 JBF READTYPE DROPIDXLK jump if IDX read 09DA4 DC005701 378 CALL FREEAFTACS say we're finished with table 09DA5 40440000 IMM 379 PARVL AFTACSRO 09DA6 FE0E9DA9 380 JMP TABLEGONE now go share common exit 381 * --- 382 00009DA7 383 DROPIDXLK LABEL 09DA7 DC005829 384 CALL FREEIDXACS let go of the table 09DA8 40494081 5 ZBM 385 PARVL FCB,FCDRIVE volume # we had 386 * \ / 387 00009DA9 388 TABLEGONE LABEL 09DA9 62178806 016 BASE 389 LD2 R0 SP,AISERRCODE retrieve the error information 09DAA FE0E5B5F 390 JMP PASSERRUP and pass to overprogram 391 * --- 392 393 END read AFT/IDX routines 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2201 (XRQOPRAFTIDX) F 136 OPREQ - AFT/IDX functions 395 396 ********************************************************************************** 397 * * 398 * The following routines either add an entry to or delete * 399 * an entry from the AFT. This allows primary accounts to become * 400 * shadow accounts and vice versa. This work is generally done * 401 * when volumes are loaded/unloaded. Since this can be a pain * 402 * or even impossible (system volume) life is made a little * 403 * easier here. * 404 * * 405 * Stack required = 13 * 406 * 0 + max ( ADDIDXAFT (10), DELAFTIDX (11), EXPANDIDX (13), * 407 * FORCEIDX (9), FREEAFTACS (5), GETAFTACS (1), * 408 * GRUBWNDO1 (7), LOCKWAIT (0), LUNSEARCH (2) ) * 409 * * 410 ********************************************************************************** 411 412 BLOCK modify AFT contents 413 ENTRY OPREQAAFT 414 ENTRY OPREQDAFT 415 000BC010 7 CBM 416 DELETEFLG EQU R7/BIT 0 add/delete flag 417 00009DAB 418 OPREQAAFT LABEL 09DAB EC0BC010 7 CBM 419 STZ DELETEFLG indicate adding to the AFT 09DAC FE0E9DAE 420 JMP TWIDDLEAFT jump to fart with the AFT 421 * --- 422 00009DAD 423 OPREQDAFT LABEL 09DAD EDCBC010 7 CBM 424 STW DELETEFLG indicate deletion to the AFT 425 * \ / 426 00009DAE 427 TWIDDLEAFT LABEL 09DAE DC405B39 428 CALLNP LUNSEARCH look for the users unit 09DAF FB7059BA 5 429 JZA FCB FERRORNSL jump if unit not opened 09DB0 60096665 0 5 ZBM 430 LD R0 FCB,FCHTYPE the the file type 09DB1 64040005 0 IMM 431 CPR R0 HTYPEDIR requests only allowed on DIR's 09DB2 FE0C59A5 432 JNE FERRORILOP illegal operation if not 09DB3 60C95114 3 5 ZBM 433 LD R3 FCB,FCLIMITPTR pointer to accounts ULB 09DB4 FAF059C8 3 434 JZA R3 FERRORPNS jump if not real account 435 * \ / 09DB5 DC0056E6 436 CALL GETAFTACS request access to AFT tables 09DB6 40440001 IMM 437 PARVL AFTACSMO say we want modify access 09DB7 61001F64 4 438 LD R4 AFTINDEX pointer to AFT blocks 439 * \ / 09DB8 F7C09DC1 7 440 JBT DELETEFLG DELETENT jump for deletion 09DB9 DC005718 441 CALL ADDIDXAFT add entry to AFT 09DBA 4116C802 3 BASE 442 PAR R3,ULACCNM account name triple 09DBB 4016C801 3 BASE 443 PARL R3,ULBLOCK and UDIR MS address 09DBC FE0E9DD4 444 JMP AFTDSKERR jump here if disk error occurred 09DBD FE0E9DD6 445 JMP AFTISFULL jump here if AFT structure full 09DBE FE0E9DD8 446 JMP AFTISDUP jump here if duplicate entry exists 09DBF DC40578B 447 CALLNP EXPANDIDX call to expand the AFT 09DC0 FE0E9DC6 448 JMP WRITEAFT update the AFT tables 449 * --- 450 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2202 (XRQOPRAFTIDX) F 136 OPREQ - AFT/IDX functions 00009DC1 451 DELETENT LABEL 09DC1 DC0056A0 452 CALL DELAFTIDX delete an entry from the AFT 09DC2 4156C801 3 BASE 453 PARV R3,ULBLOCK pass the directory address 09DC3 4016C802 3 BASE 454 PARL R3,ULACCNM the account name triple 09DC4 FE0E9DD4 455 JMP AFTDSKERR jump here if disk error occurred 09DC5 FE0E9DDA 456 JMP NAMISGONE jump here if entry already gone 457 * \ / 458 00009DC6 459 WRITEAFT LABEL 09DC6 DC403150 460 CALLNP GRUBWNDO1 grub window 1 09DC7 DC4057DF 461 CALLNP FORCEIDX and force out the pointers 09DC8 DC005701 462 CALL FREEAFTACS release access to AFT 09DC9 40440001 IMM 463 PARVL AFTACSMO pass access given 464 * Need to indicate whether the account is a shadow or not 09DCA 60C95114 3 5 ZBM 465 LD R3 FCB,FCLIMITPTR restore pointer to ULB 466 PLOCK ULLOCK lock used for updating 09DCB 0CC00000 466 IOFF 09DCC D1C01EAC 466 SETT ULLOCK 09DCD FE0C9DCF 466 JNE MA(2+DISPW MA 0) 09DCE DC40308B 466 CALLNP LOCKWAIT 09DCF 600BC010 0 7 CBM 467 LD R0 DELETEFLG adding or deleting 09DD0 E408C010 0 3 ZBM 468 ST R0 R3,ULSHADOW set flag accordingly 469 PUNLOCK ULLOCK release lock 09DD1 EC001EAC 469 STZ ULLOCK 09DD2 0C800000 469 ION 09DD3 FE0E5982 470 JMP FNOERROR return error free 471 * --- 472 00009DD4 473 AFTDSKERR LABEL 09DD4 61D20000 7 0 REG 474 LD R7 R0 pick up returned error code 09DD5 FE0E9DDC 475 JMP AFTSHRERR1 share error code 476 * --- 477 00009DD6 478 AFTISFULL LABEL 09DD6 61C40093 7 IMM 479 LD R7 XREQERISYR insufficient system resources 09DD7 FE0E9DDB 480 JMP AFTSHRERR share error code 481 * --- 482 00009DD8 483 AFTISDUP LABEL 09DD8 61C4008E 7 IMM 484 LD R7 XREQERNAE name already exists 09DD9 FE0E9DDB 485 JMP AFTSHRERR share error code 486 * --- 487 00009DDA 488 NAMISGONE LABEL 09DDA 61C400AB 7 IMM 489 LD R7 XREQERNSE no such entry 490 * \ / 491 00009DDB 492 AFTSHRERR LABEL 09DDB DC403150 493 CALLNP GRUBWNDO1 grub window 1 00009DDC 494 AFTSHRERR1 LABEL 09DDC DC005701 495 CALL FREEAFTACS release access to AFT 09DDD 40440001 IMM 496 PARVL AFTACSMO pass access granted 09DDE FE0E5997 497 JMP FERROR7 report error to caller 498 * --- 499 500 END modify AFT contents 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2203 (XRQOPRAFTIDX) F 136 OPREQ - AFT/IDX functions 501 502 503 END AFT/IDX functions 204 INPUT OPRQMOUNT disk volume mounters and dismounters 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2204 (OPRQMOUNT) F 137 OPREQ - Mount and Dismount a volume 3 4 ********************************************************************************** 5 * * 6 * Requests to mount and dismount volumes and perform other * 7 * volume operations. * 8 * * 9 * Stack required = 22 * 10 * 0 + max ( ACCTVOLBSY (8), DMOUNTDRV (18), DMOUNTIT (18), * 11 * GETVINFO (7), GETVOLINFO (7), INHIBITVIT (2), * 12 * MOUNTDRV (22), MOUNTVOL (22) ) * 13 * * 14 ********************************************************************************** 15 16 BLOCK OPREQMOUNT routine 17 ENTRY OPREQMOUNT 18 00009DDF 19 OPREQMOUNT LABEL 09DDF 68840008 2 IMM 20 UCPR R2 MNTFUNMAX request within range? 09DE0 FE0659D8 21 JGE ILLREQ jump if bad request 09DE1 5CA49DE2 2 22 LDPC MNTFUNJMP(R2) 23 * --- 24 00009DE2 25 MNTFUNJMP LABEL 09DE2 00009DEA 26 VFD ADR MOUNTDRV mount volume given drive name 09DE3 00009E8F 27 VFD ADR DMOUNTIT dismount volume given volume name 09DE4 00009ECE 28 VFD ADR INHIBITVIT inhibit/allow volume usage 09DE5 0000A09B 29 VFD ADR GETVINFO get information on volumes 09DE6 0000A091 30 VFD ADR GETVOLINFO get info on .VOL 09DE7 00009EB8 31 VFD ADR DMOUNTDRV dismount volume given drive name 09DE8 00009DFE 32 VFD ADR MOUNTVOL mount volume given volume name 09DE9 0000A128 33 VFD ADR ACCTVOLBSY return accounts with volume busy 00000008 ABS 34 MNTFUNMAX EQU DISPW MNTFUNJMP 35 36 END OPREQMOUNT routine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2205 (OPRQMOUNT) F 137 OPREQ - Mount and Dismount a volume 38 39 ********************************************************************************** 40 * * 41 * MOUNTDRV - Mount a volume, given drive name. * 42 * * 43 * LD R0 ORMOUNT * 44 * LD2 R2 password * 45 * OPREQ drive name * 46 * JLTZ R0 error * 47 * ST R0 number of accounts on volume * 48 * ST R1 number of shadow accounts * 49 * ST2 R2 volume name * 50 * * 51 * We get here with R3 = drive name, R4 -> old console area. * 52 * * 53 * Stack required = 22 * 54 * 0 + max ( DOMOUNT (22), SETMNTVALS (1), SRCHLIST (1), * 55 * UNSRCHLIST (1) ) * 56 * * 57 ********************************************************************************** 58 59 BLOCK MOUNTDRV routine 60 ENTRY MOUNTDRV 61 00009DEA 62 MOUNTDRV LABEL 09DEA DC0030AA 63 CALL SRCHLIST lock the MDV list for searching 09DEB 40001F14 64 PARL MDVLOCK 09DEC 61401F15 5 65 LD R5 MDVLIST R5 -> first MDV 09DED 3CD74805 3 5 BASE 66 LSRCH R3 R5,MDVNAME search for entry by name 09DEE FE0C9DFA 67 JNE NOENTRY jump if no matching volume name 09DEF 5C094080 5 ZBM 68 CMZ R5,MDVVOLUME is anything mounted here? 09DF0 FE0C9DF8 69 JNE ALREADYMT jump if so - can't mount again 09DF1 DC0030B7 70 CALL UNSRCHLIST unlock the MDV list 09DF2 40001F14 71 PARL MDVLOCK 72 09DF3 DC009E1F 73 CALL DOMOUNT mount the disk 09DF4 42570804 4 BASE 74 PARV2L R4,CAR2 password 09DF5 FA0C5988 0 75 JNEZ R0 UERROR jump if didn't work 09DF6 DC409E15 76 CALLNP SETMNTVALS tell user what he got 09DF7 FE0E38CF 77 JMP XREQRETURN all done, return info in R0 78 * --- 79 00009DF8 80 ALREADYMT LABEL 09DF8 61C4008E 7 IMM 81 LD R7 XREQERNAE "Name Already Exists" error 09DF9 FE0E9DFB 82 JMP FREELIST 83 * --- 84 00009DFA 85 NOENTRY LABEL 09DFA 61C400AB 7 IMM 86 LD R7 XREQERNSE "No such entry" error 87 * \ / 88 00009DFB 89 FREELIST LABEL 09DFB DC0030B7 90 CALL UNSRCHLIST release the MDV list 09DFC 40001F14 91 PARL MDVLOCK 09DFD FE0E5995 92 JMP UERROR7 give the error 93 * --- 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2206 (OPRQMOUNT) F 137 OPREQ - Mount and Dismount a volume 94 95 END MOUNTDRV routine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2207 (OPRQMOUNT) F 137 OPREQ - Mount and Dismount a volume 97 98 ********************************************************************************** 99 * * 100 * MOUNTVOL - Mount a volume, given volume name. * 101 * * 102 * LD R0 ORMOUNTVOL * 103 * LD2 R2 volume name * 104 * OPREQ anything * 105 * JLTZ R0 error * 106 * ST R0 number of accounts on volume * 107 * ST R1 number of shadow accounts * 108 * ST2 R2 volume name (may be different than what was specified) * 109 * * 110 * We get here with R4 -> old console area. * 111 * * 112 * NOTE: You cannot supply a volume password with this request. * 113 * The volume name that you get back will be different * 114 * from what you give us if there is another volume * 115 * already mounted with the same name. * 116 * * 117 * Stack required = 22 * 118 * 0 + max ( DOMOUNT (22), SETMNTVALS (1), SRCHLIST (1), * 119 * UNSRCHLIST (1) ) * 120 * * 121 ********************************************************************************** 122 123 BLOCK MOUNTVOL subroutine 124 ENTRY MOUNTVOL 125 00009DFE 126 MOUNTVOL LABEL 09DFE 62970804 234 BASE 127 LD2 R2 R4,CAR2 R2,R3 = volume name 09DFF DC0030AA 128 CALL SRCHLIST lock the MDV list 09E00 40001F14 129 PARL MDVLOCK 09E01 61401F15 5 130 LD R5 MDVLIST R5 -> list of drives 09E02 EC0BC010 7 CBM 131 STZ R7/BIT 0 indicate that we haven't found a match 132 00009E03 133 LOOP LABEL 09E03 3E97480E 235 BASE 134 LSRCH2 R2 R5,MDVVOLNAME find a drive with this volume 09E04 FE0C9E11 135 JNE NOTFOUND jump if none there 09E05 5C094080 5 ZBM 136 CMZ R5,MDVVOLUME is this one mounted? 09E06 FE029E0A 137 JEQ GOTDRIVE jump if not - this one is ours 09E07 EDCBC010 7 CBM 138 STW R7/BIT 0 say we found at least one match 09E08 FB769E03 5 139 LJNA R5 LOOP then look for more 09E09 FE0E9E11 140 JMP NOTFOUND jump if no more 141 * --- 142 00009E0A 143 GOTDRIVE LABEL 09E0A DC0030B7 144 CALL UNSRCHLIST release the MDV list 09E0B 40001F14 145 PARL MDVLOCK 146 09E0C DC009E1F 147 CALL DOMOUNT mount the volume 09E0D 42440000 IMM 148 PARV2L 0 password 09E0E FA0C5988 0 149 JNEZ R0 UERROR jump if didn't work 09E0F DC409E15 150 CALLNP SETMNTVALS set user return values 09E10 FE0E38CF 151 JMP XREQRETURN and all done 152 * --- 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2208 (OPRQMOUNT) F 137 OPREQ - Mount and Dismount a volume 153 00009E11 154 NOTFOUND LABEL 09E11 DC0030B7 155 CALL UNSRCHLIST release the MDV list 09E12 40001F14 156 PARL MDVLOCK 09E13 F3C059E4 7 157 JBF R7/BIT 0 UERRORNSE jump if no match found 09E14 FE0E59DC 158 JMP UERRORNAE else already mounted 159 * --- 160 161 END MOUNTVOL subroutine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2209 (OPRQMOUNT) F 137 OPREQ - Mount and Dismount a volume 163 164 ********************************************************************************** 165 * * 166 * SETMNTVALS - Return results of mount to user. * 167 * * 168 * This routine will store values into the user's console * 169 * area describing the results of a mount request. * 170 * Call: * 171 * LD R3 * 172 * LD VLN => VOLN element * 173 * CALLNP SETMNTVALS * 174 * * 175 * The user registers are set as follows: * 176 * R0 = number of accounts on volume * 177 * R1 = number of shadow accounts * 178 * R2,R3 = volume name (pak12) * 179 * * 180 * Eats R0:R2 * 181 * Stack required = 1 * 182 * * 183 ********************************************************************************** 184 185 BLOCK SETMNTVALS subroutine 186 ENTRY SETMNTVALS 187 188 BEGFRAME 189 ENDFRAME 190 09E15 DD5F8001 6 STAK 191 SETMNTVALS ENTRNP PUSH 09E16 60800412 2 192 LD R2 CPPSA 09E17 60889F11 2 2 ZBM 193 LD R2 R2,PSCACHNP1 R2 -> user's console area 09E18 E4D68803 3 2 BASE 194 ST R3 R2,CAR1 set number of shadow accounts 09E19 62170811 014 BASE 195 LD2 R0 VLN,VOLNNAME 09E1A E6168804 012 BASE 196 ST2 R0 R2,CAR2 set volume name 09E1B 60091F19 0 4 ZBM 197 LD R0 VLN,VOLNIDXPTR 09E1C 60082101 0 0 ZBM 198 LD R0 R0,IDXTENTS 09E1D E4168802 0 2 BASE 199 ST R0 R2,CAR0 set number of accounts 09E1E 5D1F8001 6 STAK 200 LEAVE POP 201 * --- 202 203 END SETMNTVALS subroutine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2210 (OPRQMOUNT) F 137 OPREQ - Mount and Dismount a volume 205 206 ********************************************************************************** 207 * * 208 * DOMOUNT - Mount a Volume. * 209 * * 210 * This routine will do all of the things necessary to * 211 * mount a volume. * 212 * * 213 * N.B. We must set a new SECMNTDAT because a mount opens the * 214 * ADTs to all sorts of alteration. We must take special steps * 215 * to ensure the volume is always remountable (see comments * 216 * at SECMNTDAT definition and REMOUNT). * 217 * * 218 * LD R5 => MDV element for drive to mount. * 219 * CALL DOMOUNT * 220 * PARV2L volume password * 221 * ST R0 error code (0 = OK) * 222 * ST R3 number of shadow accounts * 223 * ST VLN => VOLN element * 224 * * 225 * Eats R0:R4. * 226 * Stack required = 22 * 227 * 4 + max ( ACCOUNT (2), ACCTPSA (2), ACCTQUE (3), * 228 * ACCTULB (1), BOOTUPDATE (9), DISMTDUMMY (4), * 229 * DISMTNAME (16), ERRORLOG (3), GETFSEQN (1), * 230 * GPWRITSEC (6), GRUBWNDOx (7), MOUNTDUMMY (2), * 231 * MOUNTIDX (18), MOUNTNAME (14), MOUNTPACKL (1) ) * 232 * * 233 ********************************************************************************** 234 235 BLOCK DOMOUNT subroutine 236 ENTRY DOMOUNT 237 238 BEGFRAME 00178801 6 BASE 239 PASSWORD BSS 2 volume password 00178803 6 BASE 240 ERRCODE BSS 1 error code 00178801 6 BASE 241 SHADOWS EQU PASSWORD(0) number of shadow accounts 00178802 6 BASE 242 VLNSAVE EQU PASSWORD(1) save VLN pointer 243 ENDFRAME 244 09E1F DD1F8004 6 STAK 245 DOMOUNT ENTR PUSH 09E20 C2578801 6 BASE 246 STPV2L SP,PASSWORD 247 09E21 DC00A054 248 CALL MOUNTDUMMY create a VOLN element 09E22 40534000 5 REG 249 PARVL R5 09E23 E4178803 0 6 BASE 250 ST R0 SP,ERRCODE save error code 09E24 FA0C9E52 0 251 JNEZ R0 RETURN jump if error 252 09E25 DC40A085 253 CALLNP MOUNTPACKL mount the pack label 09E26 E4178803 0 6 BASE 254 ST R0 SP,ERRCODE save error code 09E27 FA0C9E50 0 255 JNEZ R0 UNDODUMMY jump if didn't work 256 09E28 62178801 016 BASE 257 LD2 R0 SP,PASSWORD 09E29 DC009EDE 258 CALL MOUNTNAME mount volume label stuff 09E2A 42540000 01 PAIR 259 PARV2L PAIR R0 09E2B E4178803 0 6 BASE 260 ST R0 SP,ERRCODE save error code 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2211 (OPRQMOUNT) F 137 OPREQ - Mount and Dismount a volume 09E2C FA0C9E50 0 261 JNEZ R0 UNDOPACKL jump if didn't work 09E2D DC404555 262 CALLNP GETFSEQN get current time stamp 09E2E E6001002 01 263 ST2 R0 WNDO3(SECMNTDAT) claim the volume for this mount 09E2F EC17080C 4 BASE 264 STZ VLN,VOLNFBZY say free lists not busy 265 09E30 DC40381E 266 CALLNP GPWRITSEC write out the security block 09E31 62001002 01 267 LD2 R0 WNDO3(SECMNTDAT) retrieve new mount date 09E32 E6170813 014 BASE 268 ST2 R0 VLN,VOLNMNTDAT place in the VOLN 09E33 DC403156 269 CALLNP GRUBWNDO3 unmap the security block 270 09E34 DC409E63 271 CALLNP BOOTUPDATE update the bootstrap block if needed 272 09E35 DC409F6D 273 CALLNP MOUNTIDX merge IDX into AFT 09E36 E4178803 0 6 BASE 274 ST R0 SP,ERRCODE 09E37 FA0C9E4F 0 275 JNEZ R0 UNDONAME jump if didn't work 09E38 E4578801 1 6 BASE 276 ST R1 SP,SHADOWS save number of shadow accounts 09E39 EC090A10 4 ZBM 277 STZ VLN,VOLNMOUNT say volume is mounted 278 09E3A DC005048 279 CALL ERRORLOG log the mount 09E3B 41441017 IMM 280 PARV ERLCMOUNT mount 09E3C 41490086 4 ZBM 281 PARV VLN,VOLNNUM volume number 09E3D 41574805 5 BASE 282 PARV R5,MDVNAME drive name 09E3E 41570811 4 BASE 283 PARV VLN,VOLNNAME(0) volume name 09E3F 40570812 4 BASE 284 PARVL VLN,VOLNNAME(1) volume name 285 09E40 E5178802 4 6 BASE 286 ST VLN SP,VLNSAVE save VOLN ptr lest we lose it 09E41 DC00505F 287 CALL ACCOUNT make an accounting entry 09E42 41440011 IMM 288 PARV APTLOAD type code indicates volume mount 09E43 41440028 IMM 289 PARV AFRSIZE size of record 09E44 40440002 IMM 290 PARVL 2 only to system level accounting file 09E45 60800412 2 291 LD R2 CPPSA current process status area 09E46 DC405C0D 292 CALLNP ACCTPSA get the port and session 09E47 61089F13 4 2 ZBM 293 LD ULB R2,PSUSERLIMP get the logon ULB 09E48 DC405C1E 294 CALLNP ACCTULB this tells us who did it 09E49 61178802 4 6 BASE 295 LD VLN SP,VLNSAVE restore pointer to VLN element 09E4A 62170811 014 BASE 296 LD2 R0 VLN,VOLNNAME get volume name 09E4B E616C808 013 BASE 297 ST2 R0 R3,APRECORD/AFRACCT2 place into accounting record 09E4C EC16C80A 3 BASE 298 STZ R3,APRECORD/AFRPROJ2 zap this field just in case 09E4D DC405025 299 CALLNP ACCTQUE queue the element for writing 09E4E FE0E9E52 300 JMP RETURN 301 * --- 302 00009E4F 303 UNDONAME LABEL undo MOUNTNAME 09E4F DC409FF4 304 CALLNP DISMTNAME 00009E50 305 UNDOPACKL LABEL undo MOUNTPACKL 00009E50 306 UNDODUMMY LABEL undo MOUNTDUMMY 09E50 DC403156 307 CALLNP GRUBWNDO3 don't leave the security block mapped 09E51 DC40A039 308 CALLNP DISMTDUMMY 309 * \ / 310 00009E52 311 RETURN LABEL 09E52 60178803 0 6 BASE 312 LD R0 SP,ERRCODE get error code 09E53 60D78801 3 6 BASE 313 LD R3 SP,SHADOWS get number of shadow accounts 09E54 5D1F8004 6 STAK 314 LEAVE POP all done 315 * --- 316 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2212 (OPRQMOUNT) F 137 OPREQ - Mount and Dismount a volume 317 END DOMOUNT subroutine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2213 (OPRQMOUNT) F 137 OPREQ - Mount and Dismount a volume 319 320 ********************************************************************************** 321 * * 322 * FINDVNAME. Routine to search the volume name list for the * 323 * specified volume name. * 324 * Call: * 325 * CALL FINDVNAME * 326 * PARV2L volume name * 327 * * 328 * entry > * 329 * * 330 * Eats R0:R3, and VLN * 331 * Stack required = 2 * 332 * 1 + max ( SRCHLIST (1), UNSRCHLIST (1) ) * 333 * * 334 ********************************************************************************** 335 336 BLOCK FINDVNAME subroutine 337 ENTRY FINDVNAME 338 339 BEGFRAME 340 ENDFRAME 341 09E55 DD1F8001 6 STAK 342 FINDVNAME ENTR PUSH 09E56 C2548000 23 PAIR 343 STPV2L PAIR R2 retrieve volume name 09E57 DC0030AA 344 CALL SRCHLIST get access to the list 09E58 40001F22 345 PARL VOLNLOCK 09E59 6047FFC1 1 IMM 346 LD R1 -MAXVOLNUM+1 index into VOLN table 00009E5A 347 FVNMLOOP LABEL 09E5A 61221F62 4 1 348 LD VLN VOLNTABLE(R1+MAXVOLNUM) get the VOLN pointer 09E5B FB309E5E 4 349 JZA VLN FVNMNEXT jump if none here 09E5C 66970811 234 BASE 350 CPR2 R2 VLN,VOLNNAME is this one us? 09E5D FE029E62 351 JEQ FVNMFND jump if found 00009E5E 352 FVNMNEXT LABEL 09E5E FA609E5A 1 353 IRJ R1 FVNMLOOP search all entries 354 * \ / 355 356 * Volume does not exist 09E5F DC0030B7 357 CALL UNSRCHLIST release grip on list 09E60 40001F22 358 PARL VOLNLOCK 00009E61 359 FVNMEXIT LABEL 09E61 5D1F8001 6 STAK 360 LEAVE POP and return to error return 361 * --- 362 363 * Entry found 00009E62 364 FVNMFND LABEL 09E62 FBE09E61 7 365 IRJ R7 FVNMEXIT go to skip return 366 * --- 367 368 END FINDVNAME subroutine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2214 (OPRQMOUNT) F 137 OPREQ - Mount and Dismount a volume 370 371 ********************************************************************************** 372 * * 373 * BOOTUPDATE. Update the bootstrap block on the volume * 374 * being mounted if it is older than the bootstrap block on the * 375 * system volume. Grubs both WNDO1 and WNDO2. * 376 * Call: * 377 * VLN => VOLN element * 378 * CALLNP BOOTUPDATE * 379 * * 380 * Eats R0:R3 * 381 * Stack required = 9 * 382 * 2 + max ( GRUBWNDOx (7), MAPOUTFBI (2), SETWNDOx (4), * 383 * SFREEMEM (0), SGETMEM (0) ) * 384 * * 385 ********************************************************************************** 386 387 BLOCK BOOTUPDATE subroutine 388 ENTRY BOOTUPDATE 389 390 BEGFRAME 00178801 6 BASE 391 BUDFBIAD BSS 1 address of FBI for bootstrap on sys disk 392 ENDFRAME 393 09E63 DD5F8002 6 STAK 394 BOOTUPDATE ENTRNP PUSH 395 09E64 EC178801 6 BASE 396 STZ SP,BUDFBIAD indicate no temp block 397 * First, bring in the bootstrap on the system disk. 09E65 DC003205 398 CALL SETWNDO1 09E66 41440003 IMM 399 PARV VPCNTLRO+VPCNTLLK indicate read/only and locked 09E67 41440000 IMM 400 PARV VPNOFCB indicate no unit number 09E68 41009E86 401 PAR BADMAP where to go if error 09E69 60040002 0 IMM 402 LD R0 BOOTDA get bootstrap address 09E6A EDCA0080 0 CBM 403 STW R0/VOLFIELD indicate system volume 09E6B 41520000 0 REG 404 PARV R0 MS block number of system bootstrap 09E6C 40440003 IMM 405 PARVL FBITBOOT expected FBI type 406 09E6D DC002ED0 407 CALL SGETMEM get a temp for FBI move 09E6E 40440004 IMM 408 PARVL FBILOG pass log length of FBI 09E6F E4178801 0 6 BASE 409 ST R0 SP,BUDFBIAD save address of temp 09E70 E0128000 0 2 REG 410 EXCH R0 R2 R0 => FBI, R2 => temp 09E71 6044002C 1 IMM 411 LD R1 FBILNTH*CPW length 09E72 FE400000 412 CMOVE copy FBI to temp 09E73 DC40261B 413 CALLNP MAPOUTFBI unmap this FBI 414 415 * Now, bring in the bootstrap on the newly mounted disk. 09E74 60040002 0 IMM 416 LD R0 BOOTDA 09E75 E4091186 0 4 ZBM 417 ST R0 VLN,VOLNMSBLK save address 09E76 DC0031FF 418 CALL SETWNDO2 09E77 41440002 IMM 419 PARV VPCNTLW+VPCNTLLK indicate write and locked 09E78 41440000 IMM 420 PARV VPNOFCB indicate no unit associated 09E79 41009E7F 421 PAR COPYBLOCK where to go if error 09E7A 41570806 4 BASE 422 PARV VLN,VOLNBLOCK indicate address 09E7B 40440003 IMM 423 PARVL FBITBOOT expected FBI address 424 * R2 => FBI 09E7C 60000801 0 425 LD R0 WNDO1/BOOTREV get system boot version 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2215 (OPRQMOUNT) F 137 OPREQ - Mount and Dismount a volume 09E7D 68000C01 0 426 UCPR R0 WNDO2/BOOTREV compare against one we just got 09E7E FE0A9E86 427 JLE BADMAP jump if system is not newer 428 * \ / 429 00009E7F 430 COPYBLOCK LABEL 09E7F 60178801 0 6 BASE 431 LD R0 SP,BUDFBIAD R0 -> FBI from system disk 09E80 6044002C 1 IMM 432 LD R1 FBILNTH*CPW size of FBI 433 * R2=>FBI of block being replaced 09E81 FE400000 434 CMOVE copy the FBI 435 09E82 60040800 0 IMM 436 LD R0 ADR WNDO1 R0 -> system disk boot block 09E83 60441000 1 IMM 437 LD R1 CPP get block size 09E84 60840C00 2 IMM 438 LD R2 ADR WNDO2 R2 -> new disk boot block 09E85 FE400000 439 CMOVE copy the bootstrap block 440 * \ / 441 00009E86 442 BADMAP LABEL 09E86 DC40261B 443 CALLNP MAPOUTFBI unmap FBI 09E87 60578801 1 6 BASE 444 LD R1 SP,BUDFBIAD address of temp 09E88 FA709E8C 1 445 JZA R1 NOFREE jump if no temp block assigned 09E89 DC002F5D 446 CALL SFREEMEM free the temp 09E8A 41440004 IMM 447 PARV FBILOG pass log size 09E8B 40524000 1 REG 448 PARVL R1 pass location 00009E8C 449 NOFREE LABEL 09E8C DC403150 450 CALLNP GRUBWNDO1 clean up our windows 09E8D DC403153 451 CALLNP GRUBWNDO2 09E8E 5D1F8002 6 STAK 452 LEAVE POP 453 * --- 454 455 END BOOTUPDATE subroutine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2216 (OPRQMOUNT) F 137 OPREQ - Mount and Dismount a volume 457 458 ********************************************************************************** 459 * * 460 * DISMOUNT. This operator request removes a volume's * 461 * accounts from the system and makes same unreferencable so * 462 * that the physical pack may be removed from the drive. * 463 * User call: * 464 * LD R0 OPDMOUNT * 465 * LD2 R2 name of volume * 466 * OPREQ 0 * 467 * JLTZ R0 request error * 468 * * 469 * Stack required = 18 * 470 * 0 + max ( ACCOUNT (2), ACCTPSA (2), ACCTQUE (3), * 471 * ACCTULB (1), DISMTDUMMY (4), DISMTIDX (18), * 472 * DISMTNAME (16), ERRORLOG (3), FINDVNAME (2), * 473 * SRCHLIST (1), UNSRCHLIST (1), VOLQUIESCE (1) ) * 474 * * 475 ********************************************************************************** 476 477 BLOCK DMOUNTIT and DMOUNTDRV subroutines 478 ENTRY DMOUNTIT 479 ENTRY DMOUNTDRV 480 00009E8F 481 DMOUNTIT LABEL 09E8F DC009E55 482 CALL FINDVNAME look up the volume name 09E90 42570804 4 BASE 483 PARV2L R4,CAR2 09E91 FE0E59E8 484 JMP UERRORNSV rtn1 - no such volume 485 * \ / 486 00009E92 487 DMOUNTSHR LABEL 09E92 5C090A10 4 ZBM 488 CMZ VLN,VOLNMOUNT if someone already fooling... 09E93 FE0C9EB4 489 JNE BUSYVOL ...we cannot touch 09E94 5C090E10 4 ZBM 490 CMZ VLN,VOLNMAIM if maintenance mounted, 09E95 FE0C9EB4 491 JNE BUSYVOL fake ignorance 09E96 5C090010 4 ZBM 492 CMZ VLN,VOLNSYS cannot dismount system volume 09E97 FE0C9EB4 493 JNE BUSYVOL 09E98 5C170815 4 BASE 494 CMZ VLN,VOLNBUSY cannot dismount a busy volume 09E99 FE0C9EB4 495 JNE BUSYVOL 09E9A EDC90A10 4 ZBM 496 STW VLN,VOLNMOUNT volume going bye-bye 09E9B DC0030B7 497 CALL UNSRCHLIST release grip on list 09E9C 40001F22 498 PARL VOLNLOCK 09E9D DC40A02A 499 CALLNP VOLQUIESCE check read, write, subs, count 500 501 * Log the release of the volume 09E9E DC005048 502 CALL ERRORLOG 09E9F 41440418 IMM 503 PARV ERLCDMOUNT 09EA0 40490086 4 ZBM 504 PARVL VLN,VOLNNUM 505 506 * Make accounting record user can see 09EA1 DC00505F 507 CALL ACCOUNT call to make an accounting entry 09EA2 41440012 IMM 508 PARV APTUNLOAD code indicates a volume dismount 09EA3 41440028 IMM 509 PARV AFRSIZE size of this record 09EA4 40440002 IMM 510 PARVL 2 only to system accounting file 09EA5 60800412 2 511 LD R2 CPPSA process status area of caller 09EA6 DC405C0D 512 CALLNP ACCTPSA get session and port 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2217 (OPRQMOUNT) F 137 OPREQ - Mount and Dismount a volume 09EA7 E5134000 4 5 REG 513 ST VLN R5 save the VOLN pointer 09EA8 61089F13 4 2 ZBM 514 LD ULB R2,PSUSERLIMP ULB of logon account 09EA9 DC405C1E 515 CALLNP ACCTULB place account name in record 09EAA 61134000 4 5 REG 516 LD VLN R5 restore VOLN pointer 09EAB 62170811 014 BASE 517 LD2 R0 VLN,VOLNNAME get volume name 09EAC E616C808 013 BASE 518 ST2 R0 R3,APRECORD/AFRACCT2 place into the accounting record 09EAD EC16C80A 3 BASE 519 STZ R3,APRECORD/AFRPROJ2 clear out this field 09EAE DC405025 520 CALLNP ACCTQUE place record in list for writing 521 522 * Actually do the dismount dirty work 09EAF DC409FC1 523 CALLNP DISMTIDX remove entries from AFT 524 * JNEZ R0 somewhere disk errors are not fatal, just confusing 09EB0 DC409FF4 525 CALLNP DISMTNAME put other stuff on the disk 09EB1 FA0C9EB7 0 526 JNEZ R0 BUSYAGAIN how could it be busy again 09EB2 DC40A039 527 CALLNP DISMTDUMMY remove the entry from the list 09EB3 FE0E59D6 528 JMP NOERROR success 529 * --- 530 531 ********************************************************************************** 532 * * 533 * The volume is busy for some reason or another. * 534 * * 535 ********************************************************************************** 536 00009EB4 537 BUSYVOL LABEL 09EB4 DC0030B7 538 CALL UNSRCHLIST release the VOLN list 09EB5 40001F22 539 PARL VOLNLOCK 09EB6 FE0E59E6 540 JMP UERRORVIU give "volume in use" error 541 * --- 542 543 ********************************************************************************** 544 * * 545 * For some unknown reason our volume is suddenly busy * 546 * again. This means that there is some way of busyfying a * 547 * volume without checking the "in progress of mounting" flag. * 548 * * 549 ********************************************************************************** 550 00009EB7 551 BUSYAGAIN LABEL 09EB7 00131214 552 HALT HALTS1214 volume went busy when not possible 553 * --- 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2218 (OPRQMOUNT) F 137 OPREQ - Mount and Dismount a volume 555 556 ********************************************************************************** 557 * * 558 * Dismount a volume given the drive name. We search for * 559 * the volume corresponding to the drive and then jump into * 560 * the regular dismount code. * 561 * User call: * 562 * LD R0 * 563 * OPREQ * 564 * JLTZ R0 * 565 * * 566 * Stack required = 18, See DMOUNTIT. * 567 * * 568 ********************************************************************************** 569 00009EB8 570 DMOUNTDRV LABEL 09EB8 DC0030AA 571 CALL SRCHLIST lock MDV so the info won't move 09EB9 40001F14 572 PARL MDVLOCK 09EBA 61401F15 5 573 LD R5 MDVLIST get pointer to MDV list 09EBB 3CD74805 3 5 BASE 574 LSRCH R3 R5,MDVNAME find the needed drive 09EBC FE0C9ECB 575 JNE NODRVNM no such thing 09EBD DC0030AA 576 CALL SRCHLIST lock the VOLN table 09EBE 40001F22 577 PARL VOLNLOCK 09EBF 60094080 0 5 ZBM 578 LD R0 R5,MDVVOLUME get the associated volume number 09EC0 FA029EC6 0 579 JEQZ R0 CANTFNDVOL jump if not mounted 09EC1 61201F22 4 0 580 LD VLN VOLNTABLE(R0) get pointer to VOLN element 09EC2 FB309EC6 4 581 JZA VLN CANTFNDVOL jump if volume not here 09EC3 DC0030B7 582 CALL UNSRCHLIST release MDV list 09EC4 40001F14 583 PARL MDVLOCK 09EC5 FE0E9E92 584 JMP DMOUNTSHR go demount the volume 585 * --- 586 587 * The volume doesn't seem to be mounted 00009EC6 588 CANTFNDVOL LABEL 09EC6 DC0030B7 589 CALL UNSRCHLIST release volume list 09EC7 40001F22 590 PARL VOLNLOCK 09EC8 DC0030B7 591 CALL UNSRCHLIST release the MDV list 09EC9 40001F14 592 PARL MDVLOCK 09ECA FE0E59E8 593 JMP UERRORNSV give 'No such volume' error 594 * --- 595 596 * The named drive doesn't exist 00009ECB 597 NODRVNM LABEL 09ECB DC0030B7 598 CALL UNSRCHLIST release volume list 09ECC 40001F14 599 PARL MDVLOCK 09ECD FE0E59E4 600 JMP UERRORNSE "no such entry" 601 * --- 602 603 END DMOUNTIT and DMOUNTDRV subroutines 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2219 (OPRQMOUNT) F 137 OPREQ - Inhibit/allow new volume access 606 607 ********************************************************************************** 608 * * 609 * INHIBVOL. * 610 * This request sets a flag on the volume name entry that * 611 * inhibits the creation of new ULBs on that volume. This * 612 * effectively stops logging on and new file accesses. * 613 * User call: * 614 * LD R0 ORINHIBVOL * 615 * LD R1 non-zero if to inhibit, zero to un-inhibit * 616 * LD2 R2 volume name * 617 * OPREQ 0 * 618 * JLTZ R0 request error * 619 * * 620 * If the system volume is inhibited then only the projects .!!! * 621 * and .SYS may log on. * 622 * * 623 * Stack required = 2 * 624 * 0 + max ( FINDVNAME (2), UNSRCHLIST (1) ) * 625 * * 626 ********************************************************************************** 627 628 BLOCK INHIBITVIT routine 629 ENTRY INHIBITVIT 630 00009ECE 631 INHIBITVIT LABEL 09ECE 61570803 5 4 BASE 632 LD R5 R4,CAR1 get the passed inhibit flag 09ECF DC009E55 633 CALL FINDVNAME look up the specified name 09ED0 42570804 4 BASE 634 PARV2L R4,CAR2 pass users R2,R3 (volume name) 09ED1 FE0E59E8 635 JMP UERRORNSV no such volume 09ED2 5C090A10 4 ZBM 636 CMZ VLN,VOLNMOUNT is it in transition? 09ED3 FE0C9EDB 637 JNE NOVOLAA if so, no foolly 09ED4 5C090E10 4 ZBM 638 CMZ VLN,VOLNMAIM check for maintenance mount 09ED5 FE0C9EDB 639 JNE NOVOLAA and give error if so 09ED6 5C134000 5 REG 640 CMZ R5 see what the user indicated 09ED7 ED890C10 4 ZBM 641 STLNE VLN,VOLNINHIB set inhibit flag as specified 09ED8 DC0030B7 642 CALL UNSRCHLIST release the volume list 09ED9 40001F22 643 PARL VOLNLOCK 09EDA FE0E59D6 644 JMP NOERROR 645 * --- 646 647 * The specified name was not found 00009EDB 648 NOVOLAA LABEL 09EDB DC0030B7 649 CALL UNSRCHLIST call to release the list 09EDC 40001F22 650 PARL VOLNLOCK 09EDD FE0E59E8 651 JMP UERRORNSV give 'No such volume' error 652 * --- 653 654 END INHIBITVIT routine 205 INPUT MOUNTUTIL resident mount utilities 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2220 (MOUNTUTIL) F 138 Volume Mount and Dismount Utilities 3 4 BLOCK Volume Mount and Dismount Utilities 5 6 ENTRY DISMTDUMMY remove dummy volume entry 7 ENTRY DISMTIDX take IDX out of AFT 8 ENTRY DISMTNAME replace ADT blocks on MS 9 ENTRY DISMTSUBS eliminate given volume entries from subs list 10 ENTRY MOUNTIDX merge IDX of volume into AFT 11 ENTRY MOUNTNAME mount volume 12 ENTRY UNIQVOLNM 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2221 (MOUNTUTIL) F 138 Volume Mount and Dismount Utilities 14 15 ********************************************************************************** 16 * * 17 * MOUNTNAME * 18 * This routine loads information from a volume into * 19 * a previously generated volume name entry (generated by * 20 * MOUNTDUMMY). It checks mountability, certifies password, * 21 * and rebuilds the ADT if it was not in proper format (as * 22 * in after a crash). * 23 * Call: * 24 * SP => return address stack * 25 * LD VLN ADR volume name entry * 26 * CALL MOUNTNAME * 27 * PAR2L * 28 * R0 error code: 0 - no error * 29 * VLB - volume label bad * 30 * VNMR - volume not mountable by this revision* 31 * PWW - password mismatch * 32 * NFSV - no free storage on volume * 33 * NAE - duplicate name * 34 * BSBL - bad substitution list * 35 * The security block is left locked in Window 3 iff no error. * 36 * VOLNMOUNT and VOLNFBZY are left set in the VOLN entry. * 37 * * 38 * Eats R0:R3. R0 set to error code. * 39 * Stack required = 14 * 40 * 1 + max ( GPREADSEC (5), GRUBWNDO1 (7), LOADAFTIDX (9), * 41 * LOCKLIST (1), MOUNTSUBS (8), PWMANGLE (3), * 42 * REBUILDADT (11), SETWNDOx (4), UNIQVOLNM (13), * 43 * UNLOCKLIST (1) ) * 44 * * 45 ********************************************************************************** 46 47 BLOCK MOUNTNAME subroutine 48 ENTRY MOUNTNAME 49 50 BEGFRAME 51 ENDFRAME 52 09EDE DD1F8001 6 STAK 53 MOUNTNAME ENTR PUSH 09EDF C257081F 4 BASE 54 STPV2L VLN,VOLNFREE save password 55 09EE0 60040001 0 IMM 56 LD R0 VOLLABELDA addr of volume label 09EE1 E4091186 0 4 ZBM 57 ST R0 VLN,VOLNMSBLK 09EE2 DC003205 58 CALL SETWNDO1 get volume label 09EE3 41440000 IMM 59 PARV VPCNTLW specify read-write access 09EE4 41440000 IMM 60 PARV VPNOFCB indicate no file associated 09EE5 41009F3E 61 PAR LABELBAD error address 09EE6 41570806 4 BASE 62 PARV VLN,VOLNBLOCK pass block number 09EE7 40440004 IMM 63 PARVL FBITVL indicate type 64 * \ / 65 66 ********************************************************************************** 67 * * 68 * We check to see if this revision of the system is able to * 69 * use this format of the disk. * 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2222 (MOUNTUTIL) F 138 Volume Mount and Dismount Utilities 70 * * 71 ********************************************************************************** 72 73 * \ / 09EE8 60009EF1 0 74 LD R0 REVVOL get the bit array we know about 09EE9 7800080D 0 75 AND R0 WNDO1(VLVREV) match with the format of the disk 09EEA FA0C9EF2 0 76 JNEZ R0 USEVOLREV jump if I may use it 09EEB 60009EF1 0 77 LD R0 REVVOL 09EEC 7800080C 0 78 AND R0 WNDO1(VLAVREV) is this format compatible with me? 09EED FA0C9EF2 0 79 JNEZ R0 USEVOLREV jump if it is -- use it 00009EEE 80 VNMRERROR LABEL 09EEE DC403150 81 CALLNP GRUBWNDO1 release window with volume label 09EEF 6004009C 0 IMM 82 LD R0 XREQERVNMR "Volume Not Mountable by this Revision" 09EF0 5D1F8001 6 STAK 83 LEAVE POP return with the error 84 * --- 85 09EF1 18000000 86 REVVOL VFD REVMNTVOL this system's mountable volume revision bits 87 00009EF2 88 USEVOLREV LABEL 09EF2 6000080D 0 89 LD R0 WNDO1(VLVREV) get the revision word 09EF3 64021000 0 IMM 90 CPR R0 REVVOLUME is it current? 09EF4 EC4BC010 7 CBM 91 STLEQ R7/BIT 0 set flag so we will change it 09EF5 6000080B 0 92 LD R0 WNDO1(VLFLAGS) get the flags word 09EF6 F6029EEE 0 93 JBT R0/VLFLAGINV VNMRERROR is this a real volume? 94 * \ / 95 96 ********************************************************************************** 97 * * 98 * Here we check the VLSSN to see if this volume is 'owned' * 99 * by this system, either by specific system serial number or by * 100 * a match on customer number only. If it isn't, we demand a * 101 * match in the password. * 102 * If the VLSSN does not exactly match the specific system * 103 * serial number and the 'newowner' bit is set in the flags * 104 * word, we change VLSSN to be that of this system and clear the * 105 * 'newowner' bit to make a basically clean state belonging to * 106 * the new system. * 107 * * 108 ********************************************************************************** 109 110 * \ / 09EF7 EC090215 4 ZBM 111 STZ VLN,VOLNFOREN assume volume belongs 09EF8 60001EFA 0 112 LD R0 SYSTEMSN get this systems cust/sys number 09EF9 64000800 0 113 CPR R0 WNDO1(VLSSN) look for a full match 09EFA FE029F0B 114 JEQ SSNMATCH jump if full cust num/sysnum match 115 * \ / 116 117 * SSN match was not a complete success. Check again, using 118 * only the upper half (cust num) to see if customer 119 * number matches. 09EFB 600A0100 0 0 CBM 120 LD R0 R0/CUSTNUM fish out the customer number 09EFC 60400800 1 121 LD R1 WNDO1(VLSSN) SSN for this volume 09EFD 640A4100 0 1 CBM 122 CPR R0 R1/CUSTNUM look for a match 09EFE FE029F05 123 JEQ CUSTMATCH jump if legitimate customer group 124 * \ / sorry, foreign volume. Must check PW 09EFF EDC90215 4 ZBM 125 STW VLN,VOLNFOREN set marker indicating foreign volume 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2223 (MOUNTUTIL) F 138 Volume Mount and Dismount Utilities 09F00 DC005872 126 CALL PWMANGLE do a job on the specified password 09F01 43400808 127 PARV2 WNDO1(VLCDATE) use volume create date for scramble 09F02 4257081F 4 BASE 128 PARV2L VLN,VOLNFREE pick up the operator specified PW 09F03 66000806 01 129 CPR2 R0 WNDO1(VLVPASSW) now, does the scrambled version match? 09F04 FE0C9F41 130 JNE WRONGPW whoops, jump on failure 131 * \ / 132 00009F05 133 CUSTMATCH LABEL 09F05 6000080B 0 134 LD R0 WNDO1(VLFLAGS) check for the new owner bit in flags 09F06 F2049F0B 0 135 JBF R0/VLFLAGNEWO SSNMATCH if not set, just continue 136 * Do change of volume owner 09F07 60001EFA 0 137 LD R0 SYSTEMSN get this systems serial number 09F08 E4000800 0 138 ST R0 WNDO1(VLSSN) plunk! 09F09 60040800 0 IMM 139 LD R0 ADR WNDO1 make useable base address 09F0A EC08041B 0 ZBM 140 STZ R0,VLFLAGS/VLFLAGNEWO and clear this bit 141 * \ / 00009F0B 142 SSNMATCH LABEL 143 * \ / 144 145 ********************************************************************************** 146 * * 147 * Copy name, size, IDX, etc. into resident tables. * 148 * * 149 ********************************************************************************** 150 151 * \ / 09F0B DC003096 152 CALL LOCKLIST control access to the VLN list 09F0C 40001F22 153 PARL VOLNLOCK 09F0D DC009F48 154 CALL UNIQVOLNM generate a unique volume name 09F0E 42400804 155 PARV2L WNDO1(VLVNAME) specify actual name 09F0F E6170811 014 BASE 156 ST2 R0 VLN,VOLNNAME store our name 09F10 DC0030A4 157 CALL UNLOCKLIST release list access 09F11 40001F22 158 PARL VOLNLOCK 09F12 60000810 0 159 LD R0 WNDO1(VLSUBSDA) 09F13 E4093181 0 4 ZBM 160 ST R0 VLN,VOLNSUBBLK set addr of substitution list 09F14 60000812 0 161 LD R0 WNDO1(VLSECBDA) 09F15 E4092182 0 4 ZBM 162 ST R0 VLN,VOLNSECBK1 set addr of primary security block 09F16 60000813 0 163 LD R0 WNDO1(VLSECB2DA) 09F17 E4091183 0 4 ZBM 164 ST R0 VLN,VOLNSECBK2 set secondary security block 09F18 60000800 0 165 LD R0 WNDO1(VLSSN) 09F19 E417080E 0 4 BASE 166 ST R0 VLN,VOLNSSN set owning system serial number 09F1A DC403150 167 CALLNP GRUBWNDO1 done with the volume label 168 * \ / 169 170 ********************************************************************************** 171 * * 172 * Read in the substitution block. * 173 * * 174 ********************************************************************************** 175 176 * \ / 09F1B DC409FC4 177 CALLNP MOUNTSUBS 09F1C FE0E9F46 178 JMP SUBSISBAD jump if substitution block is bad 179 09F1D DC005840 180 CALL LOADAFTIDX read in IDX 09F1E 40440008 IMM 181 PARVL FBITIDX and type 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2224 (MOUNTUTIL) F 138 Volume Mount and Dismount Utilities 09F1F FE0E9F44 182 JMP IDXISBAD error 09F20 E4C91F19 3 4 ZBM 183 ST R3 VLN,VOLNIDXPTR place pointer in block 184 * \ / 185 186 ********************************************************************************** 187 * * 188 * Read in security block and get data from it. * 189 * * 190 ********************************************************************************** 191 192 * \ / 09F21 DC40380E 193 CALLNP GPREADSEC read the security block into window 3 194 * \ / 195 196 ********************************************************************************** 197 * * 198 * See if this is the system disk. If it is, fetch the * 199 * start up number from it. If not place the start up number * 200 * onto it. * 201 * * 202 ********************************************************************************** 203 204 * \ / 09F22 60090086 0 4 ZBM 205 LD R0 VLN,VOLNNUM get volume number assigned 09F23 64040001 0 IMM 206 CPR R0 1 check against system volume (always first loaded) 09F24 FE029F27 207 JEQ GETSYSRN jump if boot, fetch the run number 09F25 60001EFC 0 208 LD R0 SYSTEMSUN get the current start up number 09F26 FE0E9F2D 209 JMP SETSYSRN 210 * --- 211 00009F27 212 GETSYSRN LABEL 09F27 60001000 0 213 LD R0 WNDO3(SECSUN) pick up disk resident 'start up number' 09F28 18040001 0 IMM 214 ADD R0 1 this is a new run of the system 09F29 5C0A3080 0 CBM 215 CMZ R0/BITS 24:31 check that bottom 8 bits are zero 09F2A EC524000 1 REG 216 STLEQ R1 place one or zero 09F2B 18124000 0 1 REG 217 ADD R0 R1 make bottom 8 non-zero 09F2C E4001EFC 0 218 ST R0 SYSTEMSUN the new start up number 00009F2D 219 SETSYSRN LABEL 09F2D E4001000 0 220 ST R0 WNDO3(SECSUN) set it on the disk 221 * \ / 222 223 ********************************************************************************** 224 * * 225 * Check the ADT and if not in proper format we must * 226 * search for the end. The end of the ADT list pointer * 227 * is removed from the security block when the system is * 228 * brought up and is restored when the system is brought * 229 * down. The ADT lists are used from the end to the beginning * 230 * so if the system crashed the current end of the ADT list * 231 * must be searched for. * 232 * * 233 ********************************************************************************** 234 235 * \ / 09F2E DC403830 236 CALLNP REBUILDADT initializes or rebuilds ADT structure 09F2F F7C09F3C 7 237 JBT R7/BIT 0 VOLREVGOOD jump if rev is good 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2225 (MOUNTUTIL) F 138 Volume Mount and Dismount Utilities 09F30 60040001 0 IMM 238 LD R0 VOLLABELDA pick up the volume label disk address 09F31 E4091186 0 4 ZBM 239 ST R0 VLN,VOLNMSBLK 09F32 DC003205 240 CALL SETWNDO1 get back the volume label 09F33 41440000 IMM 241 PARV VPCNTLW want to write to it 09F34 41440000 IMM 242 PARV VPNOFCB no FCB associated with this 09F35 41009F3B 243 PAR VOLREVDSE ignore any error 09F36 41570806 4 BASE 244 PARV VLN,VOLNBLOCK the block we want 09F37 40440004 IMM 245 PARVL FBITVL FBI type expected 09F38 60021000 0 IMM 246 LD R0 REVVOLUME pick up the volume revision 09F39 E400080C 0 247 ST R0 WNDO1(VLAVREV) set this in the bit array 09F3A E400080D 0 248 ST R0 WNDO1(VLVREV) and the current revision of this volume 00009F3B 249 VOLREVDSE LABEL 09F3B DC403150 250 CALLNP GRUBWNDO1 done with the volume label 00009F3C 251 VOLREVGOOD LABEL 09F3C 60040000 0 IMM 252 LD R0 0 say no errors 09F3D 5D1F8001 6 STAK 253 LEAVE POP 254 * --- 255 256 ********************************************************************************** 257 * * 258 * Volume label is bad - probably not really a volume. * 259 * * 260 ********************************************************************************** 261 00009F3E 262 LABELBAD LABEL 09F3E DC403150 263 CALLNP GRUBWNDO1 release window with volume label 09F3F 6004009B 0 IMM 264 LD R0 XREQERVLB 'volume label bad' 09F40 5D1F8001 6 STAK 265 LEAVE POP 266 * --- 267 268 ********************************************************************************** 269 * * 270 * Wrong volume password specified. Must not allow this * 271 * volume to be used. * 272 * * 273 ********************************************************************************** 274 00009F41 275 WRONGPW LABEL 09F41 DC403150 276 CALLNP GRUBWNDO1 release window with volume label 09F42 60040096 0 IMM 277 LD R0 XREQERPWW 'password wrong' 09F43 5D1F8001 6 STAK 278 LEAVE POP 279 * --- 280 281 ********************************************************************************** 282 * * 283 * IDX went bad. We just return the error to the caller. * 284 * Some free storage on the volume and in core may be lost, but * 285 * it's a small price to pay. * 286 * * 287 ********************************************************************************** 288 00009F44 289 IDXISBAD LABEL 09F44 6004009F 0 IMM 290 LD R0 XREQERDSE 'disk structure error' 09F45 5D1F8001 6 STAK 291 LEAVE POP 292 * --- 293 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2226 (MOUNTUTIL) F 138 Volume Mount and Dismount Utilities 294 ********************************************************************************** 295 * * 296 * Substitution block is bad. Punt!!! * 297 * * 298 ********************************************************************************** 299 00009F46 300 SUBSISBAD LABEL 09F46 6004009E 0 IMM 301 LD R0 XREQERBSBL error code 09F47 5D1F8001 6 STAK 302 LEAVE POP 303 * --- 304 305 END MOUNTNAME subroutine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2227 (MOUNTUTIL) F 138 Volume Mount and Dismount Utilities 307 308 ********************************************************************************** 309 * * 310 * UNIQVOLNM - Generate a Unique Volume Name * 311 * * 312 * This routine takes a volume name and ensures that it * 313 * is unique. It returns the given name if it is already * 314 * unique, or the given name followed by a bang ("!") and * 315 * an integer in the range 1..99 (with no leading zeros). * 316 * If necessary, one or more characters will be removed from * 317 * the end of the given name. * 318 * * 319 * CALL UNIQVOLNM * 320 * PARV2L name * 321 * ST2 R0 unique name * 322 * * 323 * Caller MUST lock the VOLNLOCK. * 324 * * 325 * Eats R0:R3. * 326 * Stack required = 13 * 327 * 7 + max ( CHARTOP12 (3), FINDVOLUME (1), INTTOCHAR (6), * 328 * P12TOCHAR (6) ) * 329 * * 330 ********************************************************************************** 331 332 BLOCK UNIQVOLNM subroutine 333 ENTRY UNIQVOLNM 334 335 BEGFRAME 00178801 6 BASE 336 COUNT BSS 1 integer to append to name 00178802 6 BASE 337 INSERTPT BSS 1 pointer to char after "!" 0017800C 6 CACH 338 CHARBUF BSSC 16 buffer for pack/unpack 339 ENDFRAME 340 09F48 DD1F8007 6 STAK 341 UNIQVOLNM ENTR PUSH 09F49 C2548000 23 PAIR 342 STPV2L PAIR R2 R2,R3 = volume name 09F4A E697080F 234 BASE 343 ST2 R2 VLN,VOLNRNAME remember real name of volume 09F4B DC00564D 344 CALL FINDVOLUME see if it exists 09F4C 42548000 23 PAIR 345 PARV2L PAIR R2 09F4D FA309F6B 0 346 JZA R0 RETURN jump if already unique 347 09F4E 62148000 0123 PAIR 348 LD2 R0 PAIR R2 09F4F 3897800C 2 6 CACH 349 LEA R2 SP,CHARBUF 09F50 DC005926 350 CALL P12TOCHAR unpack the name 09F51 43540000 01 PAIR 351 PARV2 PAIR R0 name 09F52 40168000 2 CACH 352 PARL CACH R2,0 where to put it 09F53 EDD78801 6 BASE 353 STW SP,COUNT set count to 1 354 * \ / R2 => null at end of result string 00009F54 355 PUTBANG LABEL 09F54 60040021 0 IMM 356 LD R0 "!" 09F55 E4168000 0 2 CACH 357 ST R0 CACH R2,0 put "!" onto end of name 09F56 38568001 1 2 CACH 358 LEA R1 CACH R2,1 advance pointer to next char 09F57 E4578802 1 6 BASE 359 ST R1 SP,INSERTPT save ptr to char after "!" 360 00009F58 361 TRYNUM LABEL 09F58 60178801 0 6 BASE 362 LD R0 SP,COUNT get current counter 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2228 (MOUNTUTIL) F 138 Volume Mount and Dismount Utilities 09F59 60978802 2 6 BASE 363 LD R2 SP,INSERTPT where to unpack it to 09F5A DC005903 364 CALL INTTOCHAR unpack the number 09F5B 41520000 0 REG 365 PARV R0 number 09F5C 40168000 2 CACH 366 PARL CACH R2,0 where to put it 09F5D 3817800C 0 6 CACH 367 LEA R0 SP,CHARBUF 09F5E DC00588C 368 CALL CHARTOP12 pack up the new name 09F5F 40160000 0 CACH 369 PARL CACH R0,0 where from 09F60 FA029F65 0 370 JEQZ R0 GOODPACK jump if packer worked 09F61 60978802 2 6 BASE 371 LD R2 SP,INSERTPT else get insertion pointer 09F62 6007FFFE 0 IMM 372 LD R0 -2 09F63 389A8000 2 20 CACH 373 LEA R2 CACH R2,0(R0) back it up two characters 09F64 FE0E9F54 374 JMP PUTBANG and retry putting the BANG again 375 * --- 376 00009F65 377 GOODPACK LABEL 09F65 62944000 2312 PAIR 378 LD2 R2 PAIR R1 R2,R3 = new try for name 09F66 DC00564D 379 CALL FINDVOLUME look up this name 09F67 42548000 23 PAIR 380 PARV2L PAIR R2 09F68 FA309F6B 0 381 JZA R0 RETURN jump if this is unique 09F69 D0178801 6 BASE 382 INC SP,COUNT else bump the counter 09F6A FE0E9F58 383 JMP TRYNUM and try again 384 * --- 385 00009F6B 386 RETURN LABEL 09F6B 62148000 0123 PAIR 387 LD2 R0 PAIR R2 R0,R1 = new volume name 09F6C 5D1F8007 6 STAK 388 LEAVE POP 389 * --- 390 391 END UNIQVOLNM subroutine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2229 (MOUNTUTIL) F 138 Volume Mount and Dismount Utilities 393 394 ********************************************************************************** 395 * * 396 * MOUNTIDX. Routine that takes a volume name entry * 397 * already processed by MOUNTNAME, reads in the * 398 * IDX and places the entries into the AFT. * 399 * Call: * 400 * LD SP => return address stack * 401 * LD VLN => volume name entry to mount IDX of * 402 * CALLNP MOUNTIDX * 403 * * 404 * R1 = number of shadow accounts not entered into AFT * 405 * R0 = error code * 406 * 0 = no error * 407 * NFSV = AFT overflow * 408 * DSE = IDX bad on read * 409 * DSE = AFT bad on read * 410 * * 411 * Eats R0:R3, maps WNDO1 and WNDO2 * 412 * Stack required = 18 * 413 * 5 + max ( ADDIDXAFT (10), DELAFTIDX (11), EXPANDIDX (13), * 414 * FORCEIDX (9), FREEAFTACS (5), GETAFTACS (1), * 415 * GRUBWNDO2 (7), SETWNDO2 (4), WSXCLNALL (10) ) * 416 * * 417 ********************************************************************************** 418 419 BLOCK MOUNTIDX and DISMTIDX subroutines 420 ENTRY MOUNTIDX 421 ENTRY DISMTIDX 422 423 BEGFRAME 00178801 6 BASE 424 MNTIDXVOLP BSS 1 pointer to VOLN of unit being mounted 00178008 6 CACH 425 MNTIDXBUC BSSB 8 index to current bucket 00099142 6 ZBM 426 MNTIDXSHAD BSSB 20 count of shadow acct, incremented 00178803 6 BASE 427 MNTIDXR5 BSS 1 place to hide R5 00178804 6 BASE 428 MNTIDXDA BSS 1 saves disk address of IDX bucket 429 ENDFRAME 430 09F6D DD5F8005 6 STAK 431 MOUNTIDX ENTRNP PUSH 09F6E EC0BC010 7 CBM 432 STZ R7/BIT 0 remember that this is mount 00009F6F 433 MNTIDXSHR LABEL shared code 09F6F DC0056E6 434 CALL GETAFTACS get modify access to the AFT 09F70 40440001 IMM 435 PARVL AFTACSMO request modify access 436 * We assume that we don't have to worry about the IDX locking 437 * because the volume is marked as not completely mounted so 438 * no one should be looking. 09F71 E5178801 4 6 BASE 439 ST VLN SP,MNTIDXVOLP save pointer to volume control block 09F72 E5578803 5 6 BASE 440 ST R5 SP,MNTIDXR5 save R5 09F73 EC178008 6 CACH 441 STZ SP,MNTIDXBUC begin with first bucket 09F74 EC099142 6 ZBM 442 STZ SP,MNTIDXSHAD begin with no shadows 00009F75 443 NEXTBUCT LABEL 09F75 60D78008 3 6 CACH 444 LD R3 SP,MNTIDXBUC load the bucket pointer 09F76 60978801 2 6 BASE 445 LD R2 SP,MNTIDXVOLP and load the volume control block pointer 09F77 60889F19 2 2 ZBM 446 LD R2 R2,VOLNIDXPTR get pointer to IDX being fooled with 09F78 64D68005 3 2 CACH 447 CPR R3 R2,IDXTBNUM any more buckets? 09F79 FE069FB4 448 JGE IDXDONE jump if done 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2230 (MOUNTUTIL) F 138 Volume Mount and Dismount Utilities 449 * R3 is the index to a bucket to move into the AFT 09F7A 611C9804 4 23 BASE 450 LD R4 R2,IDXTBUCKET(R3) get the MS address 09F7B FB029FAC 4 451 JEQZ R4 NOBUCKET jump if none assigned 09F7C 60088080 0 2 ZBM 452 LD R0 R2,IDXTVOL get the volume number 09F7D E40B0080 0 4 CBM 453 ST R0 R4/VOLFIELD include with MS address 09F7E E5178804 4 6 BASE 454 ST R4 SP,MNTIDXDA save the bucket address 09F7F DC0031FF 455 CALL SETWNDO2 get the IDX bucket in 09F80 41440001 IMM 456 PARV VPCNTLRO read only 09F81 41440000 IMM 457 PARV VPNOFCB no associated lun 09F82 41009FB0 458 PAR BADIDXERR error address 09F83 41530000 4 REG 459 PARV R4 indicate the MS address 09F84 40440008 IMM 460 PARVL FBITIDX indicate type of block expected 09F85 61440C00 5 IMM 461 LD R5 ADR WNDO2 load starting address 00009F86 462 NEXTENTRY LABEL 09F86 62174800 015 BASE 463 LD2 R0 R5,IDXACNO get the account number 09F87 FA2C9FA8 0 464 JEQMW R0 MOVE2NEXT jump if a deleted entry 09F88 FA1C9F8B 01 465 JNEZ2 R0 DOENTRY jump if it's a good one 09F89 5C174802 5 BASE 466 CMZ R5,IDXACNOP check this part too 09F8A FE029FAB 467 JEQ LASTENTRY jump if last 00009F8B 468 DOENTRY LABEL 09F8B 60D78804 3 6 BASE 469 LD R3 SP,MNTIDXDA fetch MS address of bucket 09F8C 61001F64 4 470 LD R4 AFTINDEX get the AFT pointer 09F8D F7C09FA1 7 471 JBT R7/BIT 0 DMNTIDXIT jump if dismount 09F8E DC005718 472 CALL ADDIDXAFT 09F8F 41174800 5 BASE 473 PAR R5,IDXACNO pass the account name triple 09F90 60174803 0 5 BASE 474 LD R0 R5,IDXDIRDA get the directory address 09F91 E40AD180 0 3 CBM 475 ST R0 R3/MSBLKFIELD combine with volume number 09F92 4052C000 3 REG 476 PARVL R3 pass MS address of DIR 09F93 FE0E9FB0 477 JMP BADAFTERR mass storage error 09F94 FE0E9FB2 478 JMP AFTFILLED AFT full 09F95 FE0E9FAE 479 JMP SHADOWACT duplicate entry, shadow 09F96 FE0E9F98 480 JMP MUSTEXPAND must expand the IDX 09F97 FE0E9FA8 481 JMP MOVE2NEXT continue with next entry 482 * --- 483 484 ********************************************************************************** 485 * * 486 * We got the return from ADDIDXAFT that indicates that the * 487 * table is full. We therefore call to expand the table, then * 488 * remap the window that is used by the expand routine. * 489 * * 490 ********************************************************************************** 491 00009F98 492 MUSTEXPAND LABEL 09F98 DC40578B 493 CALLNP EXPANDIDX call for AFT expansion 494 * eats window 2 so we must remap it 09F99 61178804 4 6 BASE 495 LD R4 SP,MNTIDXDA get DA to register 09F9A DC0031FF 496 CALL SETWNDO2 09F9B 41440001 IMM 497 PARV VPCNTLRO specify read only access 09F9C 41440000 IMM 498 PARV VPNOFCB indicate no lun associated 09F9D 41009FB0 499 PAR BADIDXERR pass error address 09F9E 41530000 4 REG 500 PARV R4 pass the MS address 09F9F 40440008 IMM 501 PARVL FBITIDX pass expected FBI type 09FA0 FE0E9FA8 502 JMP MOVE2NEXT continue with operation 503 * --- 504 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2231 (MOUNTUTIL) F 138 Volume Mount and Dismount Utilities 505 ********************************************************************************** 506 * We are dismounting the IDX so delete the entry. * 507 ********************************************************************************** 508 00009FA1 509 DMNTIDXIT LABEL 09FA1 DC0056A0 510 CALL DELAFTIDX call to remove an entry 09FA2 60174803 0 5 BASE 511 LD R0 R5,IDXDIRDA get the directory address 09FA3 E40AD180 0 3 CBM 512 ST R0 R3/MSBLKFIELD combine with volume number 09FA4 4152C000 3 REG 513 PARV R3 pass value for him 09FA5 40174800 5 BASE 514 PARL R5,IDXACNO pass the account name triple 09FA6 FE0E9FB0 515 JMP BADAFTERR mass storage error 09FA7 FE0E9FA8 516 JMP MOVE2NEXT no such entry - must have been shadow 517 * \ / normal return 00009FA8 518 MOVE2NEXT LABEL 09FA8 19440005 5 IMM 519 ADD R5 IDXLNTH advance to next entry 09FA9 65440FFC 5 IMM 520 CPR R5 ADR WNDO2(IDXLNTH*IDXECNT) check for off end 09FAA FE089F86 521 JLT NEXTENTRY jump if more entries possible 00009FAB 522 LASTENTRY LABEL 09FAB DC403153 523 CALLNP GRUBWNDO2 release window, prevent WSX use 00009FAC 524 NOBUCKET LABEL end of IDX bucket 09FAC D0178008 6 CACH 525 INC SP,MNTIDXBUC advance to next bucket 09FAD FE0E9F75 526 JMP NEXTBUCT go to process next one 527 * --- 528 529 ********************************************************************************** 530 * A duplicate entry was discovered. This means a * 531 * shadow account so we count our shadow account counter * 532 * and just ignore the entry. * 533 ********************************************************************************** 534 00009FAE 535 SHADOWACT LABEL 09FAE D0099142 6 ZBM 536 INC SP,MNTIDXSHAD count a shadow 09FAF FE0E9FA8 537 JMP MOVE2NEXT continue processing 538 * --- 539 540 ********************************************************************************** 541 * The IDX went bad. Due to the construction of the tables, * 542 * we cannot completely recover from this FUBAR, so we leave * 543 * any placed entries in the AFT ( they will later cause * 544 * FBI type mismatches and other errors ). The error code * 545 * is just returned to the user. * 546 ********************************************************************************** 547 00009FB0 548 BADIDXERR LABEL 09FB0 61520000 5 0 REG 549 LD R5 R0 load the error code 09FB1 FE0E9FB5 550 JMP MNTIDXXIT and return 551 * --- 552 553 ********************************************************************************** 554 * The AFT went bad. There is nothing to be done to fix * 555 * this, but rather than me halting, I will inform the caller. * 556 ********************************************************************************** 557 00009FB0 558 BADAFTERR EQU BADIDXERR 559 560 ********************************************************************************** 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2232 (MOUNTUTIL) F 138 Volume Mount and Dismount Utilities 561 * The AFT filled up (unbelievable). Error to the caller. * 562 ********************************************************************************** 563 00009FB2 564 AFTFILLED LABEL 09FB2 6144009D 5 IMM 565 LD R5 XREQERNFSV load the error code 09FB3 FE0E9FB5 566 JMP MNTIDXXIT and return 567 * --- 00009FB4 568 IDXDONE LABEL 09FB4 61440000 5 IMM 569 LD R5 0 error code - success 00009FB5 570 MNTIDXXIT LABEL 09FB5 61001F64 4 571 LD R4 AFTINDEX get pointer to AFT control block 09FB6 DC4057DF 572 CALLNP FORCEIDX place pointers and count on disk 09FB7 DC005701 573 CALL FREEAFTACS let go of the account finder table 09FB8 40440001 IMM 574 PARVL AFTACSMO indicate we had modify access 09FB9 DC403153 575 CALLNP GRUBWNDO2 done with any IDX pages 09FBA 60C40000 3 IMM 576 LD R3 0 indicate lun of 0, causes all pages to be cleaned 09FBB DC4032EA 577 CALLNP WSXCLNALL clean out the working set extension 09FBC 60134000 0 5 REG 578 LD R0 R5 copy error code to R0 09FBD 60499142 1 6 ZBM 579 LD R1 SP,MNTIDXSHAD get number of shadow accounts 09FBE 61578803 5 6 BASE 580 LD R5 SP,MNTIDXR5 restore registers 09FBF 61178801 4 6 BASE 581 LD VLN SP,MNTIDXVOLP 09FC0 5D1F8005 6 STAK 582 LEAVE POP return to caller 583 * --- 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2233 (MOUNTUTIL) F 138 Volume Mount and Dismount Utilities 585 586 ********************************************************************************** 587 * * 588 * DISMNTIDX. Routine that removes the contents of a * 589 * volumes IDX from the system AFT. * 590 * Call: * 591 * LD SP => return address stack * 592 * LD VLN => volume name entry to remove IDX of * 593 * CALLNP DISMTIDX * 594 * * 595 * 0 = no error * 596 * DSE = IDX went bad * 597 * DSE = AFT went bad * 598 * R0-R3 mangled * 599 * R0 = error code * 600 * stack required = 18. See MOUNTIDX. * 601 * * 602 ********************************************************************************** 603 09FC1 DD5F8005 6 STAK 604 DISMTIDX ENTRNP PUSH 09FC2 EDCBC010 7 CBM 605 STW R7/BIT 0 set flag to say dismounting 09FC3 FE0E9F6F 606 JMP MNTIDXSHR go share code 607 * --- 608 609 END MOUNTIDX and DISMTIDX subroutines 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2234 (MOUNTUTIL) F 138 Volume Mount and Dismount Utilities 611 612 ********************************************************************************** 613 * * 614 * Routine to create the resident substitution list. * 615 * Call: * 616 * LD VLN VOLN element * 617 * LD SP stack pointer * 618 * CALLNP MOUNTSUBS * 619 * JMP error reading substitution block * 620 * * 621 * WNDO2 grubbed * 622 * * 623 * Eats R0:R3 * 624 * Stack required: 8 * 625 * 1 + max ( GRUBWNDO2 (7), LOCKWAIT (0), MAPOUTFBI (2), * 626 * SETWNDO2 (4), SGETMEM (0) ) * 627 * * 628 ********************************************************************************** 629 630 BLOCK MOUNTSUBS subroutine 631 ENTRY MOUNTSUBS 632 633 BEGFRAME 634 ENDFRAME 635 09FC4 DD5F8001 6 STAK 636 MOUNTSUBS ENTRNP PUSH 09FC5 5C093181 4 ZBM 637 CMZ VLN,VOLNSUBBLK 09FC6 FE029FEF 638 JEQ GOODRET jump if no substitution block 09FC7 DC0031FF 639 CALL SETWNDO2 read the substitution block 09FC8 41440003 IMM 640 PARV VPCNTLRO+VPCNTLLK read/only, locked 09FC9 41440000 IMM 641 PARV VPNOFCB not from a file 09FCA 41009FF1 642 PAR READERR error address 09FCB 60170806 0 4 BASE 643 LD R0 VLN,VOLNBLOCK 09FCC EC0A1180 0 CBM 644 STZ R0/MSBLKFIELD 09FCD 18093181 0 4 ZBM 645 ADD R0 VLN,VOLNSUBBLK 09FCE 41520000 0 REG 646 PARV R0 block number to read 09FCF 40440005 IMM 647 PARVL FBITSUBS fbi type 09FD0 DC40261B 648 CALLNP MAPOUTFBI unmap FBI, ION 649 650 PLOCK SUBSLOCK lock the substitution list 09FD1 0CC00000 650 IOFF 09FD2 D1C01F62 650 SETT SUBSLOCK 09FD3 FE0C9FD5 650 JNE MA(2+DISPW MA 0) 09FD4 DC40308B 650 CALLNP LOCKWAIT 09FD5 38801F63 2 651 LEA R2 SUBSLIST R2 -> head of substitution list 09FD6 60040000 0 IMM 652 LD R0 0 09FD7 3C168800 0 2 BASE 653 LSRCH R0 R2,SUBLLINK R2 -> last entry in list 09FD8 38C00C00 3 654 LEA R3 WNDO2 pointer to next entry in block 00009FD9 655 MAKESUBS LABEL 09FD9 5C16C800 3 BASE 656 CMZ R3,SUBSBADDY after last entry? 09FDA FE029FEC 657 JEQ ENDSUBS jump if yes 09FDB DC002ED0 658 CALL SGETMEM get a substitution list element 09FDC 40440002 IMM 659 PARVL SUBLLOG 09FDD E4960800 2 0 BASE 660 ST R2 R0,SUBLLINK save address of last element 09FDE 60920000 2 0 REG 661 LD R2 R0 R2 => new element 09FDF 60490086 1 4 ZBM 662 LD R1 VLN,VOLNNUM R1 = volume number 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2235 (MOUNTUTIL) F 138 Volume Mount and Dismount Utilities 09FE0 6016C800 0 3 BASE 663 LD R0 R3,SUBSBADDY 09FE1 E44A0080 1 0 CBM 664 ST R1 R0/VOLFIELD 09FE2 E4168801 0 2 BASE 665 ST R0 R2,SUBLBAD save bad block number 09FE3 6016C801 0 3 BASE 666 LD R0 R3,SUBSSUB 09FE4 E44A0080 1 0 CBM 667 ST R1 R0/VOLFIELD 09FE5 E4168802 0 2 BASE 668 ST R0 R2,SUBLGOOD save substitute block number 09FE6 60168800 0 2 BASE 669 LD R0 R2,SUBLLINK retrieve address of last element 09FE7 EC168800 2 BASE 670 STZ R2,SUBLLINK set end of list 09FE8 E4960800 2 0 BASE 671 ST R2 R0,SUBLLINK link new element onto end of list 09FE9 18C40002 3 IMM 672 ADD R3 SUBSLNTH point to next entry 09FEA 64C41000 3 IMM 673 CPR R3 ADR WNDO2(WPP) off end of block? 09FEB FE089FD9 674 JLT MAKESUBS jump if not 675 * \ / 00009FEC 676 ENDSUBS LABEL 677 PUNLOCK SUBSLOCK unlock the substitution list 09FEC EC001F62 677 STZ SUBSLOCK 09FED 0C800000 677 ION 09FEE DC403153 678 CALLNP GRUBWNDO2 unmap the substitution block 00009FEF 679 GOODRET LABEL 09FEF D013C000 7 REG 680 INC R7 good return 09FF0 5D1F8001 6 STAK 681 LEAVE POP return 682 * --- 683 00009FF1 684 READERR LABEL 09FF1 DC40261B 685 CALLNP MAPOUTFBI unmap FBI, ION 09FF2 DC403153 686 CALLNP GRUBWNDO2 remove the corpse 09FF3 5D1F8001 6 STAK 687 LEAVE POP and return to error address 688 * --- 689 690 END MOUNTSUBS subroutine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2236 (MOUNTUTIL) F 138 Volume Mount and Dismount Utilities 692 693 ********************************************************************************** 694 * * 695 * DISMTNAME * 696 * This routine uses the special call to PUTFREEBLK to * 697 * force the ADT chain to mass storage and to update the * 698 * security block. Returns the resident IDX table to free * 699 * storage. The volume should not be in use when this routine * 700 * is called. * 701 * Call: * 702 * LD VLN * 703 * CALLNP DISMTNAME * 704 * * 705 * R0 = error code * 706 * 0 = no error * 707 * VIU = volume in use * 708 * FIP = freeing in progress * 709 * * 710 * Eats R0:R3 * 711 * Stack required = 16 * 712 * 1 + max ( LOCKLIST (1), PUTFREEBLK (15), SFREEMEM (0), * 713 * SRCHLIST (1), UNLOCKLIST (1), UNSRCHLIST (1) ) * 714 * * 715 ********************************************************************************** 716 717 BLOCK DISMTNAME subroutine 718 ENTRY DISMTNAME 719 720 BEGFRAME 721 ENDFRAME 722 09FF4 DD5F8001 6 STAK 723 DISMTNAME ENTRNP PUSH 09FF5 DC003096 724 CALL LOCKLIST call to get the list to ourselves 09FF6 40001F22 725 PARL VOLNLOCK ptr to lock word 09FF7 5C170815 4 BASE 726 CMZ VLN,VOLNBUSY check the busy counter 09FF8 FE0CA008 727 JNE DISMTVIU volume in use 09FF9 DC0030A4 728 CALL UNLOCKLIST release the list to anyone who wants it 09FFA 40001F22 729 PARL VOLNLOCK ptr to the lock word 730 09FFB DC0036B9 731 CALL PUTFREEBLK call for ADT cleanup 09FFC 4147FFFF IMM 732 PARV ONEBITS flag to indicate ADT cleanup 09FFD 40490086 4 ZBM 733 PARVL VLN,VOLNNUM and the volume that it's on 09FFE 60C91F19 3 4 ZBM 734 LD R3 VLN,VOLNIDXPTR get the resident IDX control block address 09FFF EC091F19 4 ZBM 735 STZ VLN,VOLNIDXPTR strictly for cleanliness 0A000 6096C005 2 3 CACH 736 LD R2 R3,IDXTBNUM see how many elements are in it 0A001 5C569003 2 REG 737 HIB R2+IDXTPWR2-1 take a logarithm 0A002 70920000 2 0 REG 738 LDN R2 R0 (the hard way) 0A003 DC002F5D 739 CALL SFREEMEM free the index table 0A004 41569020 2 REG 740 PARV R2+32 indicate its size 0A005 4052C000 3 REG 741 PARVL R3 and address 0A006 60040000 0 IMM 742 LD R0 0 indicate no error 0A007 5D1F8001 6 STAK 743 LEAVE POP return 744 * --- 745 0000A008 746 DISMTVIU LABEL volume busy 0A008 DC0030A4 747 CALL UNLOCKLIST free up the volume for other users 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2237 (MOUNTUTIL) F 138 Volume Mount and Dismount Utilities 0A009 40001F22 748 PARL VOLNLOCK ptr to the lock word 0A00A 60C90086 3 4 ZBM 749 LD R3 VLN,VOLNNUM get the volume number 0A00B DC0030AA 750 CALL SRCHLIST get access for searching 0A00C 40001EAC 751 PARL ULLOCK 0A00D 60001EAB 0 752 LD R0 ULLIST get the ULB list head element ptr 0A00E 3CC80081 3 0 ZBM 753 LSRCH R3 R0,ULDRIVE look for anyone on this drive 0A00F DC0030B7 754 CALL UNSRCHLIST release the list 0A010 40001EAC 755 PARL ULLOCK 0A011 FE0CA014 756 JNE WASFREEING jump if nobody found here, 757 * must have been busy freeing! 0A012 600400A1 0 IMM 758 LD R0 XREQERVIU otherwise, get the error code 759 * for 'volume in use' 0A013 5D1F8001 6 STAK 760 LEAVE POP return with an error 761 * --- 762 763 * Volume is freeing 0000A014 764 WASFREEING LABEL 0A014 600400A8 0 IMM 765 LD R0 XREQERFIP error 'freeing in progress' 0A015 5D1F8001 6 STAK 766 LEAVE POP return 767 * --- 768 769 END DISMTNAME subroutine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2238 (MOUNTUTIL) F 138 Volume Mount and Dismount Utilities 771 772 ********************************************************************************** 773 * * 774 * Routine to free the substitution list. * 775 * Call: * 776 * LD VLN VOLN element * 777 * LD SP stack pointer * 778 * CALLNP DISMTSUBS * 779 * * 780 * * 781 * Eats R0:R3 * 782 * Stack required = 1 * 783 * 0 + max ( LOCKWAIT (0), SFREEMEM (0) ) * 784 * * 785 ********************************************************************************** 786 787 BLOCK DISMTSUBS subroutine 788 ENTRY DISMTSUBS eliminate given volume entries from subs list 789 790 BEGFRAME 791 ENDFRAME 792 0A016 DD5F8001 6 STAK 793 DISMTSUBS ENTRNP PUSH 0A017 60C90086 3 4 ZBM 794 LD R3 VLN,VOLNNUM R3 = volume number 795 PLOCK SUBSLOCK lock the substitution list 0A018 0CC00000 795 IOFF 0A019 D1C01F62 795 SETT SUBSLOCK 0A01A FE0CA01C 795 JNE MA(2+DISPW MA 0) 0A01B DC40308B 795 CALLNP LOCKWAIT 796 0000A01C 797 DSUBLOOP LABEL 0A01C 60801F63 2 798 LD R2 SUBSLIST R2 -> first element on list 0A01D 3CC88081 3 2 ZBM 799 LSRCH R3 R2,SUBLBAD/VOLFIELD find one of our entries 0A01E FE0CA027 800 JNE DSUBDONE jump if none 0A01F 38001F63 0 801 LEA R0 SUBSLIST 0A020 3C960800 2 0 BASE 802 LSRCH R2 R0,SUBLLINK R0 -> previous element 0A021 60568800 1 2 BASE 803 LD R1 R2,SUBLLINK 0A022 E4560800 1 0 BASE 804 ST R1 R0,SUBLLINK remove element from chain 0A023 DC002F5D 805 CALL SFREEMEM free the block 0A024 41440002 IMM 806 PARV SUBLLOG size 0A025 40528000 2 REG 807 PARVL R2 address 0A026 FE0EA01C 808 JMP DSUBLOOP do it again 809 * --- 0000A027 810 DSUBDONE LABEL 811 PUNLOCK SUBSLOCK unlock the substitution list 0A027 EC001F62 811 STZ SUBSLOCK 0A028 0C800000 811 ION 0A029 5D1F8001 6 STAK 812 LEAVE POP return 813 * --- 814 815 END DISMTSUBS subroutine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2239 (MOUNTUTIL) F 138 Volume Mount and Dismount Utilities 817 818 ********************************************************************************** 819 * * 820 * VOLQUIESCE * 821 * Waits until there is no more I/O activity on a volume. * 822 * Specifically, the caller is delayed until the volumes read * 823 * queue and write queue are empty, the drive is not busy, * 824 * and no substitution process exists for the drive. * 825 * Call: * 826 * LD SP stack pointer * 827 * LD VLN VOLN pointer * 828 * CALLNP VOLQUIESCE * 829 * * 830 * Eats R0:R3 * 831 * Stack required = 1 * 832 * 1 + max ( SUSPENDME (0) ) * 833 * * 834 ********************************************************************************** 835 836 BLOCK VOLQUIESCE subroutine 837 ENTRY VOLQUIESCE wait for volume to go not busy 838 839 BEGFRAME 840 ENDFRAME 841 0A02A DD5F8001 6 STAK 842 VOLQUIESCE ENTRNP PUSH 0000A02B 843 AGAIN LABEL 0A02B 5C170816 4 BASE 844 CMZ VLN,VOLNREADQ 0A02C FE0CA032 845 JNE WAIT jump if read queue not empty 0A02D 5C170817 4 BASE 846 CMZ VLN,VOLNWRITEQ 0A02E FE0CA032 847 JNE WAIT jump if write queue not empty 0A02F 5C090610 4 ZBM 848 CMZ VLN,VOLNSBFLAG check for substitution process 0A030 FE0CA032 849 JNE WAIT jump if substitution process exists 0A031 5D1F8001 6 STAK 850 LEAVE POP return, volume not busy 851 * --- 852 0000A032 853 WAIT LABEL 0A032 D0170815 4 BASE 854 INC VLN,VOLNBUSY give suspender something to decrement 0A033 0CC00000 855 IOFF matches ION in SUSPENDME 0A034 DC00351C 856 CALL SUSPENDME go around the runnable queue once 0A035 4100A02B 857 PAR AGAIN indicate where to restart 0A036 41440001 IMM 858 PARV 1 say that we're just wasteing time 0A037 41001DAA 859 PAR SQRUNNABLE into low priority run queue 0A038 40170815 4 BASE 860 PARL VLN,VOLNBUSY something to decrement 861 * --- does not return 862 863 END VOLQUIESCE subroutine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2240 (MOUNTUTIL) F 138 Volume Mount and Dismount Utilities 865 866 ********************************************************************************** 867 * * 868 * DISMTDUMMY * 869 * Removes what is left of the volume name entry from the * 870 * list. Most of the hard work must have been done before we * 871 * get here. We wait for all visible activity to cease, then * 872 * remove the substitution list elements for this volume, and * 873 * free the VOLN element. * 874 * * 875 * Call: * 876 * VLN => VOLN element * 877 * CALLNP DISMTDUMMY * 878 * * 879 * Eats R0:R3, VLN * 880 * Stack required = 4 * 881 * 1 + max ( CANOPMSG (1), DISMTSUBS (1), LOCKLIST (1), * 882 * SFREEMEM (0), UNLOCKLIST(1), VOLFORGET (3), * 883 * VOLQUIESCE (1) ) * 884 * * 885 ********************************************************************************** 886 887 BLOCK DISMTDUMMY subroutine 888 ENTRY DISMTDUMMY 889 890 BEGFRAME 891 ENDFRAME 892 0A039 DD5F8001 6 STAK 893 DISMTDUMMY ENTRNP PUSH 0A03A DC40A02A 894 CALLNP VOLQUIESCE wait for activity to die down 0A03B DC40A016 895 CALLNP DISMTSUBS remove substitution list 0A03C DC0032B6 896 CALL VOLFORGET remove any associated pages 0A03D 40490086 4 ZBM 897 PARVL VLN,VOLNNUM from the idle list 898 0A03E DC003096 899 CALL LOCKLIST lock this critical region 0A03F 40001F22 900 PARL VOLNLOCK lock address 901 902 * disconnect VOLN from drive element 0A040 60491F15 1 4 ZBM 903 LD R1 VLN,VOLNHCB get MDV pointer 0A041 FA70A044 1 904 JZA R1 DSKVANISH disk may have gone offline 0A042 6003FE00 0 IMM 905 LD R0 ONEBITS/MDVVOLFLD*MDVVOLFLD get mask for unit number 0A043 A8164800 0 1 BASE 906 BRSBM R0 R1,MDVWORDA clear the volume number in MDV 0000A044 907 DSKVANISH LABEL 908 * \ / 909 910 * remove VOLN itself from table 0A044 60090086 0 4 ZBM 911 LD R0 VLN,VOLNNUM get volume number 0A045 EC201F22 0 912 STZ VOLNTABLE(R0) remove us from the VOLN table 913 914 * cancel disk space warning, if any 0A046 5C17081E 4 BASE 915 CMZ VLN,VOLNLOMSN is there a message to dump? 0A047 FE02A04A 916 JEQ NOLOMESS don't if not 0A048 DC004713 917 CALL CANOPMSG cancel disk low message 0A049 4057081E 4 BASE 918 PARVL VLN,VOLNLOMSN the message to cancel 919 * \ / 920 * Cancel any other operator message 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2241 (MOUNTUTIL) F 138 Volume Mount and Dismount Utilities 0000A04A 921 NOLOMESS LABEL 0A04A 5C091180 4 ZBM 922 CMZ VLN,VOLNMSGID is there a message to dump? 0A04B FE02A04E 923 JEQ NOOPMSG don't if not 0A04C DC004713 924 CALL CANOPMSG cancel complaint about volume 0A04D 40491180 4 ZBM 925 PARVL VLN,VOLNMSGID 926 * \ / 927 * Unlock list, free the element, and go 0000A04E 928 NOOPMSG LABEL 0A04E DC0030A4 929 CALL UNLOCKLIST release this critical region 0A04F 40001F22 930 PARL VOLNLOCK 0A050 DC002F5D 931 CALL SFREEMEM free the element 0A051 41440007 IMM 932 PARV VOLNLOG log size 0A052 40530000 4 REG 933 PARVL VLN address 0A053 5D1F8001 6 STAK 934 LEAVE POP return 935 * --- 936 937 END DISMTDUMMY subroutine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2242 (MOUNTUTIL) F 138 Volume Mount and Dismount Utilities 939 940 ********************************************************************************** 941 * * 942 * MOUNTDUMMY * 943 * Routine to generate a rudimentary volume name entry * 944 * so that mass storage transfers can be made on this volume * 945 * in order to completely mount it. * 946 * * 947 * VOLNMOUNT, and VOLNFBZY are set and VOLNNAME is set * 948 * to an impossible value to disallow anybody else from * 949 * fooling with the VOLN entry. We copy the MDVFMTDAT * 950 * into the VOLNMNTDAT to ensure the volume can remount * 951 * even if it drops ready before the security blocks are * 952 * written. * 953 * * 954 * LD MDV pointer to MDV * 955 * LD SP * 956 * CALL MOUNTDUMMY * 957 ** note that R0 and VLN are eaten before the * 958 ** parameters are passed. * 959 * PARVL
* 960 * returns: VLN => created volume name entry * 961 * R0 = error code: 0 - no error * 962 * NAE - hardware already in use * 963 * ISYR- all volume numbers in use * 964 * DNR - disk not ready * 965 * ST R3 volume number * 966 * ST R4 pointer to VOLN element * 967 * * 968 * Eats R0:R2. Sets R0, R3, R4. * 969 * Stack required = 2 * 970 * 1 + max ( LOCKLIST (1), SFREEMEM (0), SGETMEM (0), * 971 * UNLOCKLIST(1), ZEROIT (1) ) * 972 * * 973 ********************************************************************************** 974 975 BLOCK MOUNTDUMMY subroutine 976 ENTRY MOUNTDUMMY 977 978 BEGFRAME 979 ENDFRAME 980 0A054 DD9F8001 6 STAK 981 MOUNTDUMMY ENTRS PUSH 0A055 DC002ED0 982 CALL SGETMEM get memory for the name entry 0A056 40440007 IMM 983 PARVL VOLNLOG 0A057 E4130000 0 4 REG 984 ST R0 VLN move to appropriate register 0A058 DC003090 985 CALL ZEROIT make it clean 0A059 41170800 4 BASE 986 PAR VLN,0 0A05A 40440080 IMM 987 PARVL 2 POWER VOLNLOG 0A05B EDC90A10 4 ZBM 988 STW VLN,VOLNMOUNT say in the process of mounting 0A05C EDD7080C 4 BASE 989 STW VLN,VOLNFBZY lock lists 0A05D EDD70811 4 BASE 990 STW VLN,VOLNNAME impossible volume name 0A05E DCD3C000 7 REG 991 EXPCS R7 pick up parameters 0A05F C0491F15 4 ZBM 992 STPVL VLN,VOLNHCB save hardware control block address 993 * \ / 994 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2243 (MOUNTUTIL) F 138 Volume Mount and Dismount Utilities 995 ********************************************************************************** 996 * * 997 * Lock the volume name list and search for a duplicate * 998 * entry. If not found, place our entry into the table. * 999 * * 1000 ********************************************************************************** 1001 0A060 DC003096 1002 CALL LOCKLIST lock this critical region 0A061 40001F22 1003 PARL VOLNLOCK 0A062 60C40001 3 IMM 1004 LD R3 1 lowest possible volume number 0000A063 1005 FINDHOLE LABEL 0A063 5C261F22 3 1006 CMZ VOLNTABLE(R3) is this volume number in use? 0A064 FE02A06A 1007 JEQ GOTVOLNUM jump if not 0A065 18C40001 3 IMM 1008 ADD R3 1 try next one 0A066 64C40040 3 IMM 1009 CPR R3 MAXVOLNUM is it too big? 0A067 FE08A063 1010 JLT FINDHOLE jump if not 1011 * \ / 1012 * All volume numbers are in use - return error. 1013 * \ / 0A068 60040093 0 IMM 1014 LD R0 XREQERISYR insufficient resources 0A069 FE0EA07D 1015 JMP ERRCLNUP 1016 * --- 1017 1018 * R3 = available VOLNTABLE index 0000A06A 1019 GOTVOLNUM LABEL 0A06A E4C90086 3 4 ZBM 1020 ST R3 VLN,VOLNNUM set discovered number into the VOLN element 0A06B E4C90087 3 4 ZBM 1021 ST R3 VLN,VOLNSNUM and second MS address prototype 1022 1023 * make sure disk is online 0A06C 60891F15 2 4 ZBM 1024 LD R2 VLN,VOLNHCB load the hardware control block pointer 0A06D 5C088080 2 ZBM 1025 CMZ R2,MDVVOLUME check to see if a volume already on it 0A06E FE0CA07C 1026 JNE DUPDUMMY jump if hardware already in use 0A06F 5C089010 2 ZBM 1027 CMZ R2,MDVREADY is the drive ready? 0A070 FE02A07A 1028 JEQ NOTREADY if not, cannot mount it 1029 0A071 62168810 012 BASE 1030 LD2 R0 R2,MDVFMTDAT known value 0A072 E6170813 014 BASE 1031 ST2 R0 VLN,VOLNMNTDAT place in volume element 0A073 E5261F22 4 3 1032 ST VLN VOLNTABLE(R3) save pointer to new element 0A074 600AF000 0 3 CBM 1033 LD R0 R3*MDVVOLFLD put volume number into right field 0A075 FC168800 0 2 BASE 1034 IORM R0 R2,MDVWORDA set volume number into MDV (using RMW) 0A076 DC0030A4 1035 CALL UNLOCKLIST release this critical region 0A077 40001F22 1036 PARL VOLNLOCK 0A078 60040000 0 IMM 1037 LD R0 0 say no error 0A079 5D1F8001 6 STAK 1038 LEAVE POP 1039 * --- 1040 1041 ********************************************************************************** 1042 * * 1043 * Requested disk is not ready. * 1044 * * 1045 ********************************************************************************** 1046 0000A07A 1047 NOTREADY LABEL 0A07A 600400AE 0 IMM 1048 LD R0 XREQERDNR disk not ready 0A07B FE0EA07D 1049 JMP ERRCLNUP 1050 * --- 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2244 (MOUNTUTIL) F 138 Volume Mount and Dismount Utilities 1051 1052 ********************************************************************************** 1053 * * 1054 * Duplicate number found -- probably a system bug. * 1055 * * 1056 ********************************************************************************** 1057 0000A07C 1058 DUPDUMMY LABEL 0A07C 6004008E 0 IMM 1059 LD R0 XREQERNAE give 'name already exists' error 1060 * \ / 1061 0000A07D 1062 ERRCLNUP LABEL 0A07D E41F8001 0 6 STAK 1063 ST R0 STAK SP,1 save the error code 0A07E DC0030A4 1064 CALL UNLOCKLIST release this critical region 0A07F 40001F22 1065 PARL VOLNLOCK 0A080 DC002F5D 1066 CALL SFREEMEM release the would be VOLN list entry 0A081 41440007 IMM 1067 PARV VOLNLOG 0A082 40530000 4 REG 1068 PARVL VLN 0A083 601F8001 0 6 STAK 1069 LD R0 STAK SP,1 recover the proper error code 0A084 5D1F8001 6 STAK 1070 LEAVE POP 1071 * --- 1072 1073 END MOUNTDUMMY subroutine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2245 (MOUNTUTIL) F 138 Volume Mount and Dismount Utilities 1075 1076 ********************************************************************************** 1077 * * 1078 * MOUNTPACKL * 1079 * Routine to get information from the pack label. Since * 1080 * the volume recognizer in the disk driver has already * 1081 * extracted the info from the pack label, we just get it from * 1082 * the MDV element. Call: * 1083 * * 1084 * VLN => VOLN entry * 1085 * CALLNP MOUNTPACKL * 1086 * * 1088 * Registers Used = R0:R1 * 1089 * Stack Required = 1 * 1090 * * 1091 ********************************************************************************** 1092 1093 BLOCK MOUNTPACKL subroutine 1094 ENTRY MOUNTPACKL 1095 1096 BEGFRAME 1097 ENDFRAME 1098 0A085 DD5F8001 6 STAK 1099 MOUNTPACKL ENTRNP PUSH 0A086 60491F15 1 4 ZBM 1100 LD R1 VLN,VOLNHCB R1 -> MDV element 0A087 60164816 0 1 BASE 1101 LD R0 R1,MDVBTRXDA bad trax disk address 0A088 FA2CA08F 0 1102 JEQMW R0 NOPACKL jump if -1 -- pack label not readable 1103 * \ / 0A089 6016481A 0 1 BASE 1104 LD R0 R1,MDVSIZE get size of drive 0A08A E417081D 0 4 BASE 1105 ST R0 VLN,VOLNSIZE and save size 0A08B 60164816 0 1 BASE 1106 LD R0 R1,MDVBTRXDA get address of bad trax list 0A08C E4090181 0 4 ZBM 1107 ST R0 VLN,VOLNBTRXBK store bad trax address in VOLN element 0A08D 60040000 0 IMM 1108 LD R0 0 say no error 0A08E FE0EA090 1109 JMP RETURN 1110 * --- 1111 0000A08F 1112 NOPACKL LABEL 0A08F 6004009F 0 IMM 1113 LD R0 XREQERDSE error: disk structure error 1114 * \ / 0000A090 1115 RETURN LABEL 0A090 5D1F8001 6 STAK 1116 LEAVE POP return 1117 * --- 1118 1119 END MOUNTPACKL subroutine 1120 1121 END Mount and Dismount Utilities 206 INPUT OPREQCVOL routines to change/get volume info 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2246 (OPREQCVOL) F 139 OPREQ - Volume information fetch 3 4 ********************************************************************************** 5 * * 6 * Gets gobbs of information about the volumes on * 7 * the system. * 8 * User call: * 9 * LD R0 ORVINFO * 10 * LD R1 size of buffer in characters * 11 * LD R2 address of buffer * 12 * OPREQ 0 * 13 * JLTZ R0 request error * 14 * ST R1 buffer remaining in characters * 15 * * 16 * LD R0 ORVOLINFO * 17 * LD R1 size of buffer in characters * 18 * LD R2 address of buffer * 19 * OPREQ lun ( a .VOL ) * 20 * JLTZ R0 request error * 21 * ST R1 buffer remaining in characters * 22 * * 23 * Stack required = 7 * 24 * 5 + max ( LUNSEARCH (2), SETMEMTRAP (1), SFREEMEM (0), * 25 * SGETMEM (0), SRCHLIST (1), UNSRCHLIST (1), * 26 * ZEROIT (1) ) * 27 * * 28 ********************************************************************************** 29 30 BLOCK GETVOLINFO and GETVINFO routines 31 ENTRY GETVOLINFO 32 ENTRY GETVINFO 33 34 BEGFRAME2 00178800 6 BASE 35 VISLVNUM BSS 1 => last volume number processed 00178801 6 BASE 36 VISCOREA BSS 1 user's memory address 00178802 6 BASE 37 VISBUFFR BSS 1 user buffer remaining 00178803 6 BASE 38 VISRELOC BSS 1 relocation of requester 00178804 6 BASE 39 VISVNUMMAX BSS 1 maximum volume number to consider 40 ENDFRAME 41 42 ********************************************************************************** 43 * * 44 * Since we can get page faults while storing information into * 45 * the user's memory, we copy the information into a temp block * 46 * as we fetch it and then move that temp block into the user's * 47 * core once all of the lists are unlocked. * 48 * * 49 ********************************************************************************** 50 0000A091 51 GETVOLINFO LABEL 0A091 EC1F8005 6 STAK 52 STZ PUSH allocate stack frame 0A092 DC405B39 53 CALLNP LUNSEARCH look for the specified lun 0A093 FB7059B8 5 54 JZA FCB FERRORLNE3 give lun not equipped error if not found 0A094 60096665 0 5 ZBM 55 LD R0 FCB,FCHTYPE get the type of unit 0A095 6404000E 0 IMM 56 CPR R0 HTYPEVOL it must be a .VOL 0A096 FE0C59A5 57 JNE FERRORILOP indicate illegal operation 0A097 60095F16 0 5 ZBM 58 LD R0 FCB,FCDCBPTR get address of VOLN element 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2247 (OPREQCVOL) F 139 OPREQ - Volume information fetch 0A098 60080086 0 0 ZBM 59 LD R0 R0,VOLNNUM get volume number 0A099 60520000 1 0 REG 60 LD R1 R0 this is largest one, too 0A09A FE0EA09E 61 JMP GETVENTER go share code 62 * --- 63 0000A09B 64 GETVINFO LABEL 0A09B EC1F8005 6 STAK 65 STZ PUSH allocate stack frame 0A09C 60040001 0 IMM 66 LD R0 1 first volume number 0A09D 6044003F 1 IMM 67 LD R1 MAXVOLNUM-1 last volume number 0000A09E 68 GETVENTER LABEL 0A09E E4178800 0 6 BASE 69 ST R0 SP,VISLVNUM start at beginning 0A09F E4578804 1 6 BASE 70 ST R1 SP,VISVNUMMAX save last interesting number 0A0A0 600903F3 0 4 ZBM 71 LD R0 R4,CAR1/BITS 1:31 get the buffer size 0A0A1 E4178802 0 6 BASE 72 ST R0 SP,VISBUFFR 0A0A2 60170804 0 4 BASE 73 LD R0 R4,CAR2 0A0A3 E4178801 0 6 BASE 74 ST R0 SP,VISCOREA get the user's buffer address 0A0A4 60170801 0 4 BASE 75 LD R0 R4,CAMSR 0A0A5 78040080 0 IMM 76 AND R0 MSRSRELOC get the relocation bit to change 0A0A6 74040080 0 IMM 77 XOR R0 MSRSRELOC 0A0A7 E4178803 0 6 BASE 78 ST R0 SP,VISRELOC remember the relocation bit to change 79 * \ / 80 * Get temp block 0A0A8 DC002ED0 81 CALL UGETMEM get the temp block 0A0A9 40440004 IMM 82 PARVL VILOG 0A0AA 61520000 5 0 REG 83 LD R5 R0 R5 points to the block 0A0AB DC003090 84 CALL ZEROIT clear out any sensitive residue 0A0AC 41174800 5 BASE 85 PAR R5,0 indicate block address 0A0AD 40440010 IMM 86 PARVL 2 POWER VILOG and length 0A0AE DC005BCF 87 CALL SETMEMTRAP catch user memory errors 0A0AF 4000A0F4 88 PARL USERMEMBAD 89 * \ / 90 91 * Process the information 0A0B0 DC0030AA 92 CALL SRCHLIST lock the VOLN table 0A0B1 40001F22 93 PARL VOLNLOCK 94 * \ / 0000A0B2 95 NEXTVOL LABEL 0A0B2 60178800 0 6 BASE 96 LD R0 SP,VISLVNUM get volume number 0A0B3 61201F22 4 0 97 LD VLN VOLNTABLE(R0) get VOLN pointer 0A0B4 FB30A0E7 4 98 JZA VLN NOVOLUME jump if none here 0A0B5 E4174010 0 5 CACH 99 ST R0 R5,VIVNUM save volume number 0A0B6 6217080F 014 BASE 100 LD2 R0 VLN,VOLNRNAME get real name of volume 0A0B7 E6174808 015 BASE 101 ST2 R0 R5,VIREALNAME and give it to him 0A0B8 62170811 014 BASE 102 LD2 R0 VLN,VOLNNAME 0A0B9 E6174802 015 BASE 103 ST2 R0 R5,VIVNAME return the volume name 0A0BA 5C090010 4 ZBM 104 CMZ VLN,VOLNSYS is this the system volume? 0A0BB ED895810 5 ZBM 105 STLNE R5,VISYSVOL return answer 0A0BC 5C090A10 4 ZBM 106 CMZ VLN,VOLNMOUNT is this completely mounted? 0A0BD ED895A10 5 ZBM 107 STLNE R5,VINOTMNT 0A0BE 5C090C10 4 ZBM 108 CMZ VLN,VOLNINHIB is this volume inhibited? 0A0BF ED895C10 5 ZBM 109 STLNE R5,VIINHIB 0A0C0 5C090E10 4 ZBM 110 CMZ VLN,VOLNMAIM is this volume maintenance only? 0A0C1 ED894E10 5 ZBM 111 STLNE R5,VIMAIM store findings 0A0C2 5C17080D 4 BASE 112 CMZ VLN,VOLNADTF are the ADTs busy? 0A0C3 ED895010 5 ZBM 113 STLNE R5,VIADTBZY 0A0C4 60170815 0 4 BASE 114 LD R0 VLN,VOLNBUSY 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2248 (OPREQCVOL) F 139 OPREQ - Volume information fetch 0A0C5 E4095184 0 5 ZBM 115 ST R0 R5,VIBUSY return volume busy counter 0A0C6 6017081C 0 4 BASE 116 LD R0 VLN,VOLNFREBLK get number of blocks in MS lists 0A0C7 1817081A 0 4 BASE 117 ADD R0 VLN,VOLNFRECNT add in the number of blocks in the resident list 0A0C8 E4174805 0 5 BASE 118 ST R0 R5,VIFREEBLK return the number of free blocks 0A0C9 6017081D 0 4 BASE 119 LD R0 VLN,VOLNSIZE get total size of volume 0A0CA E4174806 0 5 BASE 120 ST R0 R5,VITOTBLK return the volume size 0A0CB 60091F19 0 4 ZBM 121 LD R0 VLN,VOLNIDXPTR get pointer to the IDX control block 0A0CC FA30A0CE 0 122 JZA R0 NOVOLIDX jump if the IDX isn't here yet 0A0CD 60082101 0 0 ZBM 123 LD R0 R0,IDXTENTS get number of entries 0000A0CE 124 NOVOLIDX LABEL 0A0CE E4174807 0 5 BASE 125 ST R0 R5,VIACCTNUM return the number of accounts 0A0CF 5C170816 4 BASE 126 CMZ VLN,VOLNREADQ 0A0D0 ED895210 5 ZBM 127 STLNE R5,VIQDR say whether reads are pending 0A0D1 5C170817 4 BASE 128 CMZ VLN,VOLNWRITEQ 0A0D2 ED895410 5 ZBM 129 STLNE R5,VIQDW say whether writes are pending 0A0D3 60091F15 0 4 ZBM 130 LD R0 VLN,VOLNHCB get pointer to MDV element 0A0D4 FA30A0D6 0 131 JZA R0 NODRIVE jump if volume is disassociated 0A0D5 60160805 0 0 BASE 132 LD R0 R0,MDVNAME get drive name 0000A0D6 133 NODRIVE LABEL 0A0D6 E4174801 0 5 BASE 134 ST R0 R5,VIDNAME save drive name 0A0D7 6004000A 0 IMM 135 LD R0 VILENGTH 0A0D8 E4095F10 0 5 ZBM 136 ST R0 R5,VIENTLEN save the entry length 0A0D9 DC0030B7 137 CALL UNSRCHLIST release the VOLN list 0A0DA 40001F22 138 PARL VOLNLOCK 139 * \ / 140 141 * Copy the information into the user's area 0A0DB 60440028 1 IMM 142 LD R1 VILENGTH*CPW number of characters to move 0A0DC 64578802 1 6 BASE 143 CPR R1 SP,VISBUFFR will it fit in the buffer? 0A0DD FE04A0EC 144 JGT VIDONE if not, we're done 0A0DE B0578802 1 6 BASE 145 RSBM R1 SP,VISBUFFR removed the used 0A0DF 60978801 2 6 BASE 146 LD R2 SP,VISCOREA R2 => destination 0A0E0 60134000 0 5 REG 147 LD R0 R5 R0 is the source address 0A0E1 59978803 6 BASE 148 CLBMSR SP,VISRELOC relocate to the requester 0A0E2 FE400000 149 CMOVE move the information to him 0A0E3 59C40080 IMM 150 IORMSR MSRSRELOC restore addressing to monitor 0A0E4 E4978801 2 6 BASE 151 ST R2 SP,VISCOREA remember next place to put it 152 * \ / 153 154 * Do next volume, if necessary 0A0E5 DC0030AA 155 CALL SRCHLIST lock the VOLN table 0A0E6 40001F22 156 PARL VOLNLOCK 0000A0E7 157 NOVOLUME LABEL 0A0E7 BC178800 0 6 BASE 158 INCL R0 SP,VISLVNUM get next volume number 0A0E8 64178804 0 6 BASE 159 CPR R0 SP,VISVNUMMAX see if at limit 0A0E9 FE0AA0B2 160 JLE NEXTVOL jump if more to do 161 * \ / 0A0EA DC0030B7 162 CALL UNSRCHLIST release the VOLN table 0A0EB 40001F22 163 PARL VOLNLOCK 164 * \ / 165 166 ********************************************************************************** 167 * * 168 * Do end processing. * 169 * * 170 ********************************************************************************** 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2249 (OPREQCVOL) F 139 OPREQ - Volume information fetch 171 172 * \ / 0000A0EC 173 VIDONE LABEL 0A0EC DC002F5D 174 CALL UFREEMEM release the temp block 0A0ED 41440004 IMM 175 PARV VILOG 0A0EE 40534000 5 REG 176 PARVL R5 0A0EF 61000412 4 177 LD R4 CPPSA 0A0F0 61091F11 4 4 ZBM 178 LD R4 R4,PSCACHNP1 R4 => requester's registers 0A0F1 60178802 0 6 BASE 179 LD R0 SP,VISBUFFR return the buffer remaining 0A0F2 E4170803 0 4 BASE 180 ST R0 R4,CAR1 in the users R1 0A0F3 FE0E59D6 181 JMP NOERROR done with success 182 * --- 183 184 ********************************************************************************** 185 * * 186 * We come here if we get a memory error (probably memory * 187 * protect violation). We release the temp block and then pass * 188 * the error to the requester. * 189 * * 190 ********************************************************************************** 191 0000A0F4 192 USERMEMBAD LABEL 0A0F4 E61F8002 016 STAK 193 ST2 R0 STAK SP,2 save the error parameters 0A0F5 DC002F5D 194 CALL UFREEMEM release the temp block 0A0F6 41440004 IMM 195 PARV VILOG 0A0F7 40534000 5 REG 196 PARVL R5 0A0F8 621F8002 016 STAK 197 LD2 R0 STAK SP,2 get the error parameters back 0A0F9 FE0E5B5F 198 JMP PASSERRUP pass the error through channels 199 * --- 200 201 END GETVOLINFO and GETVINFO routines 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2250 (OPREQCVOL) F 139 OREQ - Return System Maintenance Information 204 205 ********************************************************************************** 206 * * 207 * These requests return various pieces of maintenance-level * 208 * system information. They require maintenance read * 209 * privilege. * 210 * * 211 * Stack required = 3 * 212 * 0 + max ( CLRMEMTRAP (1), GETDATE (1), SETMEMTRAP (1), * 213 * UERRORILR (3) ) * 214 * * 215 ********************************************************************************** 216 217 BLOCK Block type read/write counts 218 ENTRY OPRGSYSINF 219 0000A0FA 220 OPRGSYSINF LABEL 0A0FA 64840003 2 IMM 221 CPR R2 MAXSYSINFO allowable subop? 0A0FB FE0459D8 222 JGT UERRORILR jump if too big 0A0FC 5CA4A0FD 2 223 LDPC SYSINFO(R2) jump to correct request 224 * --- 225 0000A0FD 226 SYSINFO LABEL jump table for system info XREQs 0A0FD 000059D8 227 ADR UERRORILR 0 - no request 0A0FE 0000A107 228 ADR OPRRDCNTS 1 - total read counts by FBI type 0A0FF 0000A109 229 ADR OPRWRCNTS 2 - total write counts by FBI type 0A100 0000A101 230 ADR OPRBLCNTS 3 - both tables 231 * --- 00000003 ABS 232 MAXSYSINFO EQU (DISPW SYSINFO)-1 greatest index in table 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2251 (OPREQCVOL) F 139 OREQ - Return System Maintenance Information 234 235 ********************************************************************************** 236 * * 237 * ORREADCNT. ORWRITECNT. * 238 * These requests fill the users buffer with the total number * 239 * of reads (writes) for each type of block (since the last system * 240 * boot). The tables are indexed by the FBI block type constants * 241 * and are MAXFBITYPE+1 words in length. ORRWCOUNTS returns a * 242 * double-length buffer containing the read table followed by the * 243 * write buffer. All of these return the number of entries (table * 244 * length) in the 0th entry. * 245 * * 246 * Call: LD R0 * 247 * LD R1 * 248 * OPREQ 0 * 249 * R0 = error code * 250 * R2,3 = time stamp taken immediately before move * 251 * * 252 ********************************************************************************** 253 254 * Send both tables 0000A101 255 OPRBLCNTS LABEL 0A101 EDCBC010 7 CBM 256 STW R7/BIT 0 say we'll want both tables 0A102 60841D4C 2 IMM 257 LD R2 ADR READCOUNTS R2 => read count table 0A103 FE0EA10B 258 JMP MOVEINFO move table to user 259 * --- 260 261 * send second table after first, R2 => first dest char 0000A104 262 DUO LABEL 0A104 EC0BC010 7 CBM 263 STZ R7/BIT 0 clear flag 0A105 60041D63 0 IMM 264 LD R0 ADR WRITCOUNTS R0 => write count table 0A106 FE0EA112 265 JMP MAKEMOVE 266 * --- 267 268 * Send table of read counts 0000A107 269 OPRRDCNTS LABEL 0A107 60841D4C 2 IMM 270 LD R2 ADR READCOUNTS R2 => read count table 0A108 FE0EA10A 271 JMP SOLO move table to user 272 * --- 273 0000A109 274 OPRWRCNTS LABEL 0A109 60841D63 2 IMM 275 LD R2 ADR WRITCOUNTS R2 => write count table 0000A10A 276 SOLO LABEL 0A10A EC0BC010 7 CBM 277 STZ R7/BIT 0 say we'll want single table 0000A10B 278 MOVEINFO LABEL 0A10B 5C093611 4 ZBM 279 CMZ R4,CAMSR/MSRIRELOCB check relocation 0A10C FE0CA110 280 JNE RELOCOK jump if monitor requested 0A10D DC005BCF 281 CALL SETMEMTRAP put out glove for mem errors 0A10E 40005B5F 282 PARL PASSERRUP pass error address, no clean up 0A10F 59840080 IMM 283 CLBMSR MSRSRELOC set user space 0000A110 284 RELOCOK LABEL 0A110 60128000 0 2 REG 285 LD R0 R2 get source address 0A111 60970803 2 4 BASE 286 LD R2 R4,CAR1 R2 => users buffer 0000A112 287 MAKEMOVE LABEL 0A112 6044005C 1 IMM 288 LD R1 (MAXFBITYPE+1)*CPW number of chars to move 0A113 FE400000 289 CMOVE move table 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2252 (OPREQCVOL) F 139 OREQ - Return System Maintenance Information 0A114 F7C0A104 7 290 JBT R7/BIT 0 DUO jump to do second table 0A115 59C40080 IMM 291 IORMSR MSRSRELOC restore monitor stores 0A116 DC405BD4 292 CALLNP CLRMEMTRAP take no more responsibility 0A117 DC404549 293 CALLNP GETDATE get current time 0A118 E6170804 014 BASE 294 ST2 R0 R4,CAR2 give user the time of day 0A119 FE0E59D6 295 JMP NOERROR done! 296 * --- 297 298 END OPRGSYSINF requests 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2253 (OPREQCVOL) F 139 OPREQ - Return System Information 301 302 ********************************************************************************** 303 * * 304 * This request returns specific information about the system. * 305 * The information we need is provided in a table in the SSU * 306 * driver (FLASHVAL). Since it is somewhat privileged, we * 307 * have already ensured that the requester has been granted * 308 * operator privileges. * 309 * Call: * 310 * LD R0 ORGSYSINFO * 311 * LD R1 * 312 * OPREQ 0 * 313 * JLTZ R0 * 314 * ST R2 * 315 * * 316 * Eats R0:R2. * 317 * Stack required = 0 * 318 * * 319 ********************************************************************************** 320 321 BLOCK ORGETFPINFO routine 322 323 ENTRY ORGETFPINFO return specific system information 324 0000A11A 325 ORGETFPINFO LABEL 0A11A 60170803 0 4 BASE 326 LD R0 R4,CAR1 see what the user requested 0A11B 6804000F 0 IMM 327 UCPR R0 0F check if we can honor his request 0A11C FE0459DA 328 JGT UERRORPOB return parameter out of bounds 0A11D 1C040003 0 IMM 329 MUL R0 3 convert to a table index 0A11E 60604681 1 0 330 LD R1 FLASHVAL(R0) get the pointer to the value we want 0A11F FA42A123 1 331 JEQZ R1 SYSINFODATE if zero pointer, return time 0A120 FA6CA125 1 332 JEQMW R1 NOSYSINFO if negative return nothing 0A121 60964400 2 1 @R 333 LD R2 @R1 got the value he requested 0A122 FE0EA126 334 JMP SYSINFORTN return it to the user 335 * --- 336 0000A123 337 SYSINFODATE LABEL 0A123 60901EE7 2 @ 338 LD R2 @FDATEPTR get the current date, note that we 339 * only return the upper 32 bits. 0A124 FE0EA126 340 JMP SYSINFORTN return it to the user 341 * --- 342 0000A125 343 NOSYSINFO LABEL 0A125 EC128000 2 REG 344 STZ R2 ask for nothing, give him nothing 345 * \ / 346 0000A126 347 SYSINFORTN LABEL 0A126 E4970804 2 4 BASE 348 ST R2 R4,CAR2 place into the users registers 0A127 FE0E59D6 349 JMP NOERROR return error free 350 * --- 351 352 END ORGETFPINFO routine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2254 (OPREQCVOL) F 139 OPREQ - Return Account Busy Info 355 356 ********************************************************************************** 357 * * 358 * This request returns the account names, either logged * 359 * on or aliased, of those accounts busy on a particular * 360 * volume. We search the ULB list looking for volume numbers * 361 * that match the given .VOL. Note that the ULB list may * 362 * change as we are gathering our information. If the last * 363 * ULB we got information from has disappeared, we can not * 364 * continue and just leave the routine. * 365 * Call: * 366 * LD R0 ORBUSYVOL * 367 * LD R1 * 368 * LD R2 * 369 * OPREQ unit (.VOL) * 370 * ST R0 dynstat or errorcode * 371 * ST R1 buffer remaining * 372 * * 373 * Stack required = 8 * 374 * 5 + max ( LOCKWAIT (0), SETMEMTRAP (1), SETUPVOL (3) ) * 375 * * 376 ********************************************************************************** 377 378 BLOCK ACCTVOLBSY routine 379 ENTRY ACCTVOLBSY 380 381 VBSYINFORD LIST 381 ********************************************************************************** 381 * * 381 * Format of information returned by the volume busy * 381 * request. * 381 * * 381 ********************************************************************************** 381 0000A128 381 VBPROTO BASE R0 381 BSSB 15 filler 00081F10 0 ZBM 381 VBLENFLD BSSB 17 length of this entry, in words 00160801 0 BASE 381 VBACCTNM BSS 2 account name 00160803 0 BASE 381 VBDIVPRJ BSS 1 division/project name 381 DRCT 00000004 ABS 381 VBLNTH EQU DISPW VBPROTO 381 ORG VBPROTO reclaim space 382 383 BEGFRAME2 00178800 6 BASE 384 VBDATA BSS VBLNTH space for prototype entry 00178804 6 BASE 385 LASTULB BSS 1 directory address of last ULB found 386 ENDFRAME 387 0000A128 388 ACCTVOLBSY LABEL 0A128 EC1F8005 6 STAK 389 STZ PUSH allocate stack area (clear first word, too) 0A129 DC40A29F 390 CALLNP SETUPVOL check for a .VOL 0A12A 60000412 0 391 LD R0 CPPSA current session status area 0A12B 60C81F11 3 0 ZBM 392 LD R3 R0,PSCACHNP1 this is most recent CA 393 * R3 <= CA, R4 <= VOLN element, R5 <= FCB 0A12C DC005BCF 394 CALL SETMEMTRAP setup to catch users memory problems 0A12D 4000A15A 395 PARL USRMEMCRUD error address to do cleanup 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2255 (OPREQCVOL) F 139 OPREQ - Return Account Busy Info 396 PLOCK ULLOCK gain access to the ULB list 0A12E 0CC00000 396 IOFF 0A12F D1C01EAC 396 SETT ULLOCK 0A130 FE0CA132 396 JNE MA(2+DISPW MA 0) 0A131 DC40308B 396 CALLNP LOCKWAIT 0A132 60801EAB 2 397 LD R2 ULLIST get first ULB 398 * \ / 399 0000A133 400 NEXTULB LABEL 0A133 60090086 0 4 ZBM 401 LD R0 VLN,VOLNNUM volume number from the .VOL 0A134 3C088081 0 2 ZBM 402 LSRCH R0 R2,ULDRIVE search for a matching candidate 0A135 FE0CA157 403 JNE VBSYULK looks as if none are left 0A136 64801EAE 2 404 CPR R2 SYSTEMULB check if system ULB 0A137 FE02A156 405 JEQ SKPSYSULB don't give info from system ULB 0A138 60168801 0 2 BASE 406 LD R0 R2,ULBLOCK get directory address 0A139 E4178804 0 6 BASE 407 ST R0 SP,LASTULB save for later search 0A13A 38168802 0 2 BASE 408 LEA R0 R2,ULACCNM generate pointer to the account name 0A13B 38978800 2 6 BASE 409 LEA R2 SP,VBDATA address of our temporary area 0A13C 60440004 1 IMM 410 LD R1 VBLNTH get the entry length 0A13D E4489F10 1 2 ZBM 411 ST R1 R2,VBLENFLD put into temp block 0A13E 38968801 2 2 BASE 412 LEA R2 R2,VBACCTNM make correct address within block 0A13F 6044000C 1 IMM 413 LD R1 3*CPW account name length in characters 0A140 FE400000 414 CMOVE 415 PUNLOCK ULLOCK release exclusive access to the list 0A141 EC001EAC 415 STZ ULLOCK 0A142 0C800000 415 ION 416 * \ / 417 0A143 38178800 0 6 BASE 418 LEA R0 SP,VBDATA this is now the source address 0A144 60440010 1 IMM 419 LD R1 VBLNTH*CPW number of characters 0A145 B056C803 1 3 BASE 420 RSBM R1 R3,CAR1 enough room in users buffer 0A146 FE085982 421 JLT FNOERROR apparently not, done 0A147 6096C804 2 3 BASE 422 LD R2 R3,CAR2 address of the users buffer 0A148 5C08F611 3 ZBM 423 CMZ R3,CAMSR/MSRIRELOCB check relocation of caller 0A149 FE0CA14B 424 JNE MONSTATE jump if request came from the monitor 0A14A 59840080 IMM 425 CLBMSR MSRSRELOC store relocation to user address space 426 * \ / 427 0000A14B 428 MONSTATE LABEL 0A14B FE400000 429 CMOVE move one entry to the user 0A14C 59C40080 IMM 430 IORMSR MSRSRELOC restore monitor relocation 0A14D E496C804 2 3 BASE 431 ST R2 R3,CAR2 update users buffer pointer 432 * \ / 433 0A14E 60178804 0 6 BASE 434 LD R0 SP,LASTULB get directory block of last ULB 435 PLOCK ULLOCK gain access to the ULB list 0A14F 0CC00000 435 IOFF 0A150 D1C01EAC 435 SETT ULLOCK 0A151 FE0CA153 435 JNE MA(2+DISPW MA 0) 0A152 DC40308B 435 CALLNP LOCKWAIT 0A153 60801EAB 2 436 LD R2 ULLIST pointer to the first element 0A154 3C168801 0 2 BASE 437 LSRCH R0 R2,ULBLOCK search for the same ULB again 0A155 FE0CA157 438 JNE VBSYULK jump if the ULB went away for some reason 439 * \ / 440 0000A156 441 SKPSYSULB LABEL 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2256 (OPREQCVOL) F 139 OPREQ - Return Account Busy Info 0A156 FAB6A133 2 442 LJNA R2 NEXTULB look for more possible candidates 443 * \ / 444 0000A157 445 VBSYULK LABEL 446 PUNLOCK ULLOCK release the ULB lock 0A157 EC001EAC 446 STZ ULLOCK 0A158 0C800000 446 ION 0A159 FE0E5982 447 JMP FNOERROR successful return 448 * --- 449 0000A15A 450 USRMEMCRUD LABEL 0A15A 60840010 2 IMM 451 LD R2 VBLNTH*CPW length of the proposed cmove 0A15B 9896C803 2 3 BASE 452 ADDM R2 R3,CAR1 indicate nothing got moved 0A15C FE0E5B5F 453 JMP PASSERRUP pass error to higher authority 454 * --- 455 456 END ACCTVOLBSY routine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2257 (OPREQCVOL) F 139 Volume information change/get 459 460 BLOCK requests to do volume info changing or getting 461 ENTRY OPREQCVOL 462 463 ********************************************************************************** 464 * * 465 * This code does all of the change volume requests. See the * 466 * discussion in DISKDEFS under volume label for the various rules * 467 * about who can do what and what they mean. * 468 * * 469 * Stack required = 13 * 470 * 1 + max ( CHECKSYM (5), GRUBWNDO1 (7), MAPVLBL (8), * 471 * PWMANGLE (3), SETMEMTRAP(1), SRCHLIST (1), * 472 * SSNMATCH (8), UERRORILR (3), UNIQVOLNM(13), * 473 * UNSRCHLIST (1) ) * 474 * * 475 ********************************************************************************** 476 0000A15D 477 OPREQCVOL LABEL 0A15D 6484000D 2 IMM 478 CPR R2 ORCVOLMAX check sub-op for legal 0A15E FE0659D8 479 JGE ILLREQ jump if not a legal request code 0A15F 5CA4A160 2 480 LDPC ORCVOLJTAB(R2) go to appropriate processing routine 481 * --- 482 0000A160 483 ORCVOLJTAB LABEL 0A160 0000A16D 484 ADR OPRCVNAME 0190 - change volume name 0A161 0000A187 485 ADR OPRCVPWD 0191 - change volume password 0A162 0000A18F 486 ADR OPRCVSSN 0192 - change system serial number 0A163 0000A199 487 ADR OPRCVNEWO 0193 - change new owner flag 0A164 0000A1A0 488 ADR OPRCVTITL 0194 - change volume title 0A165 000059D8 489 ADR ILLREQ 0195 0A166 000059D8 490 ADR ILLREQ 0196 0A167 000059D8 491 ADR ILLREQ 0197 0A168 0000A1B5 492 ADR OPRGVNAME 0198 - get volume name 0A169 000059D8 493 ADR ILLREQ 0199 0A16A 0000A1BA 494 ADR OPRGVSSN 019A - get volumes SSN (owning system) 0A16B 0000A1BF 495 ADR OPRGVNEWO 019B - get new owner flag 0A16C 0000A1C5 496 ADR OPRGVTITL 019C - get volume title 0000000D ABS 497 ORCVOLMAX EQU DISPW ORCVOLJTAB this code and larger not allowed 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2258 (OPREQCVOL) F 139 Volume information change/get 499 500 ********************************************************************************** 501 * Change volume name. * 502 ********************************************************************************** 503 0000A16D 504 OPRCVNAME LABEL 0A16D DC005CD3 505 CALL CHECKSYM check for OK RAD40 0A16E 42170804 4 BASE 506 PAR2L R4,CAR2 pass name 0A16F FE0E59DA 507 JMP UERRORPOB can't have that! 0A170 FE0E59DA 508 JMP UERRORPOB can't be blank, either 509 0A171 8152C000 3 REG 510 STCAR R3 get our CA 0A172 60D6C80E 3 3 BASE 511 LD R3 R3,CAXOPERAND get unit number 0A173 DC40A1EE 512 CALLNP MAPVLBL get in the volume label 0A174 6256C804 123 BASE 513 LD2 R1 R3,CAR2 pick up the new name 0A175 E6400804 12 514 ST2 R1 WNDO1(VLVNAME) set the volume name 0A176 DC0030AA 515 CALL SRCHLIST get access to the list 0A177 40001F22 516 PARL VOLNLOCK 0A178 DC009F48 517 CALL UNIQVOLNM generate a unique volume name 0A179 42544000 12 PAIR 518 PARV2L PAIR R1 pass the requested name 0A17A E6170811 014 BASE 519 ST2 R0 VLN,VOLNNAME and save the newly generated one 0A17B DC0030B7 520 CALL UNSRCHLIST release the list 0A17C 40001F22 521 PARL VOLNLOCK 0A17D DC0030AA 522 CALL SRCHLIST get acess to the list of devices 0A17E 40001F14 523 PARL MDVLOCK 0A17F 60891F15 2 4 ZBM 524 LD R2 VLN,VOLNHCB pointer to the MDV element 0A180 FAB0A183 2 525 JZA R2 NOTONNOW if zero, means pack not ready 0A181 62000804 01 526 LD2 R0 WNDO1(VLVNAME) retrieve the new volume name 0A182 E616880E 012 BASE 527 ST2 R0 R2,MDVVOLNAME put the new name there 0000A183 528 NOTONNOW LABEL 0A183 DC0030B7 529 CALL UNSRCHLIST release access to the list 0A184 40001F14 530 PARL MDVLOCK 0A185 DC403150 531 CALLNP GRUBWNDO1 release the window 0A186 FE0E59D6 532 JMP NOERROR return to customer 533 * --- 534 535 ********************************************************************************** 536 * Change volume password. * 537 ********************************************************************************** 538 0000A187 539 OPRCVPWD LABEL 0A187 DC40A1EE 540 CALLNP MAPVLBL get in the volume label 0A188 DC40A1E0 541 CALLNP SSNMATCH verify that this user can do this 0A189 DC005872 542 CALL PWMANGLE call to process the PW 0A18A 43400808 543 PARV2 WNDO1(VLCDATE) use create date as scramble parameter 0A18B 4256C804 3 BASE 544 PARV2L R3,CAR2 and get the new PW from user registers 0A18C E6000806 01 545 ST2 R0 WNDO1(VLVPASSW) set the volume password 0A18D DC403150 546 CALLNP GRUBWNDO1 release the window 0A18E FE0E59D6 547 JMP NOERROR return to customer 548 * --- 549 550 ********************************************************************************** 551 * Change volume system serial number. * 552 ********************************************************************************** 553 0000A18F 554 OPRCVSSN LABEL 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2259 (OPREQCVOL) F 139 Volume information change/get 0A18F DC40A1EE 555 CALLNP MAPVLBL get in the volume label 0A190 DC40A1E0 556 CALLNP SSNMATCH verify that this user can do this 0A191 6016C803 0 3 BASE 557 LD R0 R3,CAR1 pick up the specified new ssn 0A192 E4000800 0 558 ST R0 WNDO1(VLSSN) and place into volume label 559 * \ / 0A193 600A0100 0 0 CBM 560 LD R0 R0/CUSTNUM extract the customer number 0A194 60401EFA 1 561 LD R1 SYSTEMSN pick up the ID of this system 0A195 640A4100 0 1 CBM 562 CPR R0 R1/CUSTNUM and see if this volume matches 0A196 ED890215 4 ZBM 563 STLNE VLN,VOLNFOREN remember for later 564 * \ / 0A197 DC403150 565 CALLNP GRUBWNDO1 release the window 0A198 FE0E59D6 566 JMP NOERROR return to customer 567 * --- 568 569 ********************************************************************************** 570 * Change volume new owner flag. * 571 ********************************************************************************** 572 0000A199 573 OPRCVNEWO LABEL 0A199 DC40A1EE 574 CALLNP MAPVLBL get in the volume label 0A19A DC40A1E0 575 CALLNP SSNMATCH verify that this user can do this 0A19B 6016C803 0 3 BASE 576 LD R0 R3,CAR1 pick up the specified new new owner flag 0A19C 60440800 1 IMM 577 LD R1 ADR WNDO1 load pointer to label 0A19D E408441B 0 1 ZBM 578 ST R0 R1,VLFLAGS/VLFLAGNEWO now emplace the new 'new owner' flag 0A19E DC403150 579 CALLNP GRUBWNDO1 release the window 0A19F FE0E59D6 580 JMP NOERROR return to customer 581 * --- 582 583 ********************************************************************************** 584 * Change volume title. * 585 ********************************************************************************** 586 0000A1A0 587 OPRCVTITL LABEL 0A1A0 DC40A1EE 588 CALLNP MAPVLBL get in the volume label 0A1A1 DC005BCF 589 CALL SETMEMTRAP set up to catch user errors 0A1A2 4000A1DD 590 PARL USRMEMBAD where to go on error 0A1A3 6056C803 1 3 BASE 591 LD R1 R3,CAR1 pick up the specified buffer length 0A1A4 68440080 1 IMM 592 UCPR R1 VLTITLELEN is it too big? 0A1A5 FE0AA1A7 593 JLE USEGIVEN jump if okay 0A1A6 60440080 1 IMM 594 LD R1 VLTITLELEN use maximum if users too big 0000A1A7 595 USEGIVEN LABEL 0A1A7 61124000 4 1 REG 596 LD R4 R1 save amount to be moved 0A1A8 6016C804 0 3 BASE 597 LD R0 R3,CAR2 pick up pointer to users buffer (source) 0A1A9 5C08F211 3 ZBM 598 CMZ R3,CAMSR/MSRFRELOCB is this reference in the monitor? 0A1AA FE0CA1AC 599 JNE MONDATA jump if this was a monitor request 0A1AB 59840040 IMM 600 CLBMSR MSRFRELOC relocate to users buffer for fetch 0000A1AC 601 MONDATA LABEL 0A1AC 38800820 2 602 LEA R2 WNDO1/VLTITLE pick up destination address 0A1AD FE400000 603 CMOVE move the new volume title 0A1AE 59C40040 IMM 604 IORMSR MSRFRELOC fix the MSR 0A1AF 60530000 1 4 REG 605 LD R1 R4 pick up amount actually moved 0A1B0 30440080 1 IMM 606 RSB R1 VLTITLELEN and make space remaining 0A1B1 FA4AA1B3 1 607 JLEZ R1 EXITOKAY okay if exactly filled buffer 0A1B2 FE580000 608 CFILL 000 clear out any old title 0000A1B3 609 EXITOKAY LABEL 0A1B3 DC403150 610 CALLNP GRUBWNDO1 release the window 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2260 (OPREQCVOL) F 139 Volume information change/get 0A1B4 FE0E59D6 611 JMP NOERROR return to customer 612 * --- 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2261 (OPREQCVOL) F 139 Volume information change/get 614 615 ********************************************************************************** 616 * Get volume name. * 617 ********************************************************************************** 618 0000A1B5 619 OPRGVNAME LABEL 0A1B5 DC40A1EE 620 CALLNP MAPVLBL get in the volume label 0A1B6 62000804 01 621 LD2 R0 WNDO1(VLVNAME) get the volume name 0A1B7 E616C804 013 BASE 622 ST2 R0 R3,CAR2 hand over the name 0A1B8 DC403150 623 CALLNP GRUBWNDO1 release the window 0A1B9 FE0E59D6 624 JMP NOERROR return to customer 625 * --- 626 627 ********************************************************************************** 628 * Get volume system serial number. * 629 ********************************************************************************** 630 0000A1BA 631 OPRGVSSN LABEL 0A1BA DC40A1EE 632 CALLNP MAPVLBL get in the volume label 0A1BB 60000800 0 633 LD R0 WNDO1(VLSSN) pick up SSN from volume label 0A1BC E416C803 0 3 BASE 634 ST R0 R3,CAR1 hand over the specified new ssn 0A1BD DC403150 635 CALLNP GRUBWNDO1 release the window 0A1BE FE0E59D6 636 JMP NOERROR return to customer 637 * --- 638 639 ********************************************************************************** 640 * Get volume new owner flag. * 641 ********************************************************************************** 642 0000A1BF 643 OPRGVNEWO LABEL 0A1BF DC40A1EE 644 CALLNP MAPVLBL get in the volume label 0A1C0 60440800 1 IMM 645 LD R1 ADR WNDO1 load pointer to label 0A1C1 6008441B 0 1 ZBM 646 LD R0 R1,VLFLAGS/VLFLAGNEWO now pick up the new 'new owner' flag 0A1C2 E416C803 0 3 BASE 647 ST R0 R3,CAR1 hand over the specified new 'new owner' flag 0A1C3 DC403150 648 CALLNP GRUBWNDO1 release the window 0A1C4 FE0E59D6 649 JMP NOERROR return to customer 650 * --- 651 652 ********************************************************************************** 653 * Get volume title. * 654 ********************************************************************************** 655 0000A1C5 656 OPRGVTITL LABEL 0A1C5 DC40A1EE 657 CALLNP MAPVLBL get in the volume label 0A1C6 DC005BCF 658 CALL SETMEMTRAP set up to catch user errors 0A1C7 4000A1DD 659 PARL USRMEMBAD where to go on error 0A1C8 38000820 0 660 LEA R0 WNDO1/VLTITLE get pointer to title string 0A1C9 60440080 1 IMM 661 LD R1 VLTITLELEN its length 0A1CA 60840000 2 IMM 662 LD R2 0 and the terminating character 0A1CB FE560000 663 CSRCH find the end 0A1CC FE02A1CE 664 JEQ CHARFND jump if actually found a null 0A1CD 60440000 1 IMM 665 LD R1 0 otherwise, use the whole string 0000A1CE 666 CHARFND LABEL 0A1CE 30440080 1 IMM 667 RSB R1 VLTITLELEN set R1 = 0A1CF FA4AA1DB 1 668 JLEZ R1 NOTITLE jump if starts with null 0A1D0 6856C803 1 3 BASE 669 UCPR R1 R3,CAR1 will title fit in user buffer? 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2262 (OPREQCVOL) F 139 Volume information change/get 0A1D1 FE08A1D3 670 JLT ENOUGHBUF jump if it will 0A1D2 6056C803 1 3 BASE 671 LD R1 R3,CAR1 otherwise, use only what the user allowed 0000A1D3 672 ENOUGHBUF LABEL 0A1D3 B056C803 1 3 BASE 673 RSBM R1 R3,CAR1 leave user the residue 0A1D4 6096C804 2 3 BASE 674 LD R2 R3,CAR2 pick up pointer to users buffer (dest) 0A1D5 5C08F211 3 ZBM 675 CMZ R3,CAMSR/MSRFRELOCB is this reference in the monitor? 0A1D6 FE0CA1D8 676 JNE DOMONMEM jump if this was a monitor request 0A1D7 59840080 IMM 677 CLBMSR MSRSRELOC relocate to users buffer for store 0000A1D8 678 DOMONMEM LABEL 0A1D8 38000820 0 679 LEA R0 WNDO1/VLTITLE pick up source address 0A1D9 FE400000 680 CMOVE move the volume title 0A1DA 59C40080 IMM 681 IORMSR MSRSRELOC fix the MSR 0000A1DB 682 NOTITLE LABEL 0A1DB DC403150 683 CALLNP GRUBWNDO1 release the window 0A1DC FE0E59D6 684 JMP NOERROR return to customer 685 * --- 686 0000A1DD 687 USRMEMBAD LABEL 0A1DD 61D20000 7 0 REG 688 LD R7 R0 copy the error code 0A1DE DC403150 689 CALLNP GRUBWNDO1 free up the window 0A1DF FE0E5995 690 JMP UERROR7 and go present user with error 691 * --- 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2263 (OPREQCVOL) F 139 Volume information change/get 693 694 ********************************************************************************** 695 * * 696 * SSNMATCH. * 697 * We check to ensure that this volume really belongs to this * 698 * system. If not, we go to give a 'privilege not sufficient' * 699 * error. * 700 * Call: * 701 * VLN => VOLN element * 702 * CALLNP SSNMATCH * 703 * <return> * 704 * Eats R0:R3 * 705 * Stack required = 8 * 706 * 1 + GRUBWNDO1 (7) * 707 * * 708 ********************************************************************************** 709 710 BLOCK SSNMATCH routine 711 ENTRY SSNMATCH 712 713 BEGFRAME 714 ENDFRAME 715 0A1E0 DD5F8001 6 STAK 716 SSNMATCH ENTRNP PUSH 0A1E1 60000412 0 717 LD R0 CPPSA get pointer to current PSA 0A1E2 60081F13 0 0 ZBM 718 LD R0 R0,PSUSERLIMP check actual logged on account 0A1E3 60160804 0 0 BASE 719 LD R0 R0,ULACCPROJ get project of requester 0A1E4 68002551 0 720 UCPR R0 DOTBTI check for BTI account 0A1E5 FE08A1E8 721 JLT CHECKSSN jump if not, he may get an error 0A1E6 6800A1ED 0 722 UCPR R0 DOTBTILAST check for end of BTI range 0A1E7 FE0AA1EC 723 JLE DORETURN jump if BTI account, allow arbitrary changing 0000A1E8 724 CHECKSSN LABEL 0A1E8 5C090215 4 ZBM 725 CMZ VLN,VOLNFOREN check for foreign volume 0A1E9 FE02A1EC 726 JEQ DORETURN jump if not, operation okay 0A1EA DC403150 727 CALLNP GRUBWNDO1 release the window 0A1EB FE0E59F4 728 JMP UERRORPNS give privilege not sufficient error 729 * --- 730 0000A1EC 731 DORETURN LABEL 0A1EC 5D1F8001 6 STAK 732 LEAVE POP 733 * --- 734 0A1ED E79EDF2D 735 DOTBTILAST PAK6 !!!!!! last account in BTI range 736 737 END OF SSNMATCH 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2264 (OPREQCVOL) F 139 Volume information change/get 739 740 ********************************************************************************** 741 * * 742 * MAPVLBL * 743 * This routine maps the volume label of the requested volume * 744 * into window 1 with read/write access. * 745 * Call: * 746 * * 747 * LD R3 unit # of .VOL * 748 * CALLNP MAPVLBL * 749 * wndo1 = volume label * 750 * R3 => requesters CA * 751 * R4 => voln element * 752 * error exits directly * 753 * * 754 * Sets R3,R4 * 755 * Eats R0:R2 * 756 * Stack required = 8 * 757 * 1 + max ( GRUBWNDO1 (7), SETUPVOL (3), SETWNOD1 (4) ) * 758 * * 759 ********************************************************************************** 760 761 BLOCK MAPVLBL routine 762 ENTRY MAPVLBL 763 764 BEGFRAME 765 ENDFRAME 766 0A1EE DD5F8001 6 STAK 767 MAPVLBL ENTRNP PUSH 0A1EF DC40A29F 768 CALLNP SETUPVOL ensure that we have a .vol 769 * VOLN pointer returned in register VLN 0A1F0 60040001 0 IMM 770 LD R0 VOLLABELDA get MS address of volume label 0A1F1 E4095181 0 5 ZBM 771 ST R0 FCB,FCMSBLK and make usable 0A1F2 DC003205 772 CALL SETWNDO1 map in the volume label 0A1F3 41440000 IMM 773 PARV VPCNTLW with write access 0A1F4 41534000 5 REG 774 PARV FCB unit associated 0A1F5 4100A1FB 775 PAR DISKERROR error address 0A1F6 41574801 5 BASE 776 PARV FCB,FCBLOCK pass disk address 0A1F7 40440004 IMM 777 PARVL FBITVL and expecting volume label 0A1F8 60C00412 3 778 LD R3 CPPSA get current PSA pointer 0A1F9 60C8DF11 3 3 ZBM 779 LD R3 R3,PSCACHNP1 get requesters CA pointer 0A1FA 5D1F8001 6 STAK 780 LEAVE POP return 781 * --- 782 0000A1FB 783 DISKERROR LABEL 0A1FB 61D20000 7 0 REG 784 LD R7 R0 save error code 0A1FC DC403150 785 CALLNP GRUBWNDO1 release the window 0A1FD FE0E5995 786 JMP UERROR7 give error return 787 * --- 788 789 END of MAPVLBL 790 791 END of volume change/get code 207 INPUT OPRDEVINFO device information request 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2265 (OPRDEVINFO) F 140 OPREQ - Get Device Information 3 4 BLOCK OPRDEVINFO routine 5 ENTRY OPRDEVINFO 6 7 DEVINFORD LIST 7 ********************************************************************************** 7 * * 7 * Information returned by the device information * 7 * request. * 7 * * 7 ********************************************************************************** 7 0000A1FE 7 DIPROTO BASE R0 00160800 0 BASE 7 DISTART BSS 0 beginning of entry 000800F0 0 ZBM 7 DITYPE BSSB 15 device type: 00000001 ABS 7 DIDISK EQU 1 disk 00000002 ABS 7 DIMT EQU 2 magnetic tape (standard 9 track) 00000003 ABS 7 DICT EQU 3 cartridge tape (DEI) 00000004 ABS 7 DILP EQU 4 line printer 00000005 ABS 7 DIVT EQU 5 video tape (exabyte) 7 * others to be defined 00081F10 0 ZBM 7 DIENTLEN BSSB 17 length of this entry in words 00160801 0 BASE 7 DIDNAME BSS 1 device name (pak6) 00080102 0 ZBM 7 DIHARDADR BSSB 16:1 hardware address 00003840 BYTE 7 DIUNIT EQU BITS 28:31 unit number in hardware address 00003040 BYTE 7 DICHAN EQU BITS 24:27 channel number in hardware address 00002840 BYTE 7 DISLOT EQU BITS 20:23 slot number in hardware address 00160803 0 BASE 7 DIDEVINFO BSS 0 start of device-specific info 7 7 * For disks only: 0016000C 0 CACH 7 DIDRVNUM BSSB 8 drive number (cable position) 0016000D 0 CACH 7 DISPT BSSB 8 sectors per track 00082103 0 ZBM 7 DITPC BSSB 16 tracks per cylinder 00000004 ABS 7 DIDISKLEN EQU DISPW DISTART length of disk entry 7 7 * For mag tapes only: 7 ORG DIPROTO/DIDEVINFO 00160803 0 BASE 7 DIMTPROC BSS 1 session number of owner (or zero if none) 00000004 ABS 7 DIMTLEN EQU DISPW DISTART length of mag tape entry 7 7 * For cart tapes only: 7 ORG DIPROTO/DIDEVINFO 00160803 0 BASE 7 DICTPROC BSS 1 session number of owner (or zero if none) 00000004 ABS 7 DICTLEN EQU DISPW DISTART length of cart tape entry 7 7 * For video tapes only: 7 ORG DIPROTO/DIDEVINFO 00160803 0 BASE 7 DIVTPROC BSS 1 session number of owner (or zero if none) 00000004 ABS 7 DIVTLEN EQU DISPW DISTART length of video tape entry 7 7 * For line printers only: 7 ORG DIPROTO/DIDEVINFO 00160803 0 BASE 7 DILPPROC BSS 1 session number of owner (or zero if none) 00000004 ABS 7 DILPLEN EQU DISPW DISTART length of line printer entry 7 7 DRCT 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2266 (OPRDEVINFO) F 140 OPREQ - Get Device Information 7 ORG DIPROTO recover space 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2267 (OPRDEVINFO) F 140 OPREQ - Get Device Information 9 10 ********************************************************************************** 11 * * 12 * GETDEVINFO. This operator request returns information about * 13 * all devices in the system. * 14 * Call: * 15 * LD R0 ORDEVINFO * 16 * LD R1 buffer size, in characters * 17 * LD R2 ADR buffer * 18 * OPREQ 0 * 19 * JLTZ R0 error * 20 * ST R1 buffer remaining * 21 * * 22 * Stack required = 8. * 23 * 7 + max ( MAKEHARDADR (1), MOVEINFO (0), SETMEMTRAP (1), * 24 * SRCHLIST (1), UNSRCHLIST (1) ) * 25 * * 26 ********************************************************************************** 27 28 BLOCK GETDEVINFO routine 29 ENTRY OPRDEVINFO 30 0000A1FE 31 OPRDEVINFO LABEL 0A1FE 68840001 2 IMM 32 UCPR R2 DEVFUNMAX request within range? 0A1FF FE0659D8 33 JGE ILLREQ jump if bad 0A200 5CA4A201 2 34 LDPC DEVFUNJMP(R2) go do it 35 * --- 36 0000A201 37 DEVFUNJMP LABEL 0A201 0000A202 38 VFD ADR GETDEVINFO get device information 00000001 ABS 39 DEVFUNMAX EQU DISPW DEVFUNJMP 40 41 END OPRDEVINFO routines 42 43 BLOCK GETDEVINFO routine 44 ENTRY GETDEVINFO 45 46 BEGFRAME2 00178800 6 BASE 47 DISCORE BSS 1 user buffer address 00178801 6 BASE 48 DISLEN BSS 1 length remaining 00178802 6 BASE 49 DISRELOC BSS 1 relocation bit of requester 00178803 6 BASE 50 DISINFO BSS DIDISKLEN temp area for one entry 51 ENDFRAME 52 0000A202 53 GETDEVINFO LABEL 0A202 EC1F8007 6 STAK 54 STZ PUSH allocate space on stack 0A203 600903F3 0 4 ZBM 55 LD R0 R4,CAR1/BITS 1:31 get buffer size 0A204 E4178801 0 6 BASE 56 ST R0 SP,DISLEN save it 0A205 60170804 0 4 BASE 57 LD R0 R4,CAR2 get buffer address 0A206 E4178800 0 6 BASE 58 ST R0 SP,DISCORE save it 0A207 60170801 0 4 BASE 59 LD R0 R4,CAMSR 0A208 78040080 0 IMM 60 AND R0 MSRSRELOC 0A209 74040080 0 IMM 61 XOR R0 MSRSRELOC 0A20A E4178802 0 6 BASE 62 ST R0 SP,DISRELOC remember relocation bit 0A20B DC005BCF 63 CALL SETMEMTRAP trap user errors 0A20C 40005B5F 64 PARL PASSERRUP 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2268 (OPRDEVINFO) F 140 OPREQ - Get Device Information 65 0A20D DC0030AA 66 CALL SRCHLIST lock the MDV list 0A20E 40001F14 67 PARL MDVLOCK 0A20F 61401F15 5 68 LD MDV MDVLIST get first disk 0A210 FB70A22D 5 69 JZA MDV NODISKS jump if none (not very likely!) 70 * \ / 0000A211 71 DISKLOOP LABEL 0A211 39178803 4 6 BASE 72 LEA R4 SP,DISINFO R4 -> my temp area 0A212 60040001 0 IMM 73 LD R0 DIDISK 0A213 E40900F0 0 4 ZBM 74 ST R0 R4,DITYPE set entry type 0A214 60040004 0 IMM 75 LD R0 DIDISKLEN 0A215 E4091F10 0 4 ZBM 76 ST R0 R4,DIENTLEN set entry length 0A216 60174805 0 5 BASE 77 LD R0 MDV,MDVNAME 0A217 E4170801 0 4 BASE 78 ST R0 R4,DIDNAME set device name 0A218 60095830 0 5 ZBM 79 LD R0 MDV,MDVUNIT fetch the unit number 0A219 60495F11 1 5 ZBM 80 LD R1 MDV,MDVCNTL make pointer to MCT element 0A21A 60564801 1 1 BASE 81 LD R1 R1,MCTPMVALUE and fetch page map value from it 0A21B DC40A299 82 CALLNP MAKEHARDADR and make hardware address 0A21C E4090102 0 4 ZBM 83 ST R0 R4,DIHARDADR save hardware address 0A21D 60095231 0 5 ZBM 84 LD R0 MDV,MDVCABLE 0A21E E417000C 0 4 CACH 85 ST R0 R4,DIDRVNUM set cable position 0A21F 6017400B 0 5 CACH 86 LD R0 MDV,MDVSECPTRK 0A220 E417000D 0 4 CACH 87 ST R0 R4,DISPT set sectors per track 0A221 6017400A 0 5 CACH 88 LD R0 MDV,MDVTRKPCYL 0A222 E4092103 0 4 ZBM 89 ST R0 R4,DITPC set tracks per cylinder 0A223 DC0030B7 90 CALL UNSRCHLIST release the list 0A224 40001F14 91 PARL MDVLOCK 0A225 DC00A289 92 CALL MOVEINFO copy info to user area 0A226 40170800 4 BASE 93 PARL R4,0 what to move 0A227 DC0030AA 94 CALL SRCHLIST re-lock the list 0A228 40001F14 95 PARL MDVLOCK 0A229 60041F15 0 IMM 96 LD R0 ADR MDVLIST 0A22A 3D481F10 5 0 ZBM 97 LSRCH MDV R0,MDVLINK is our entry still on the list? 0A22B FE0CA22D 98 JNE NODISKS if not, give no more disks 0A22C FB76A211 5 99 LJNA MDV DISKLOOP else do next disk 100 * \ / 0000A22D 101 NODISKS LABEL 0A22D DC0030B7 102 CALL UNSRCHLIST release the list 0A22E 40001F14 103 PARL MDVLOCK 104 * \ / 105 * return info on cartridge tapes 106 * \ / 0A22F 61401F1E 5 107 LD R5 CTULIST R5 => first CT unit element 0A230 FB70A244 5 108 JZA R5 NOCTS jump if no CTs 109 * \ / 0000A231 110 CTLOOP LABEL 0A231 39178803 4 6 BASE 111 LEA R4 SP,DISINFO get address 0A232 60040003 0 IMM 112 LD R0 DICT get the type code 0A233 E40900F0 0 4 ZBM 113 ST R0 R4,DITYPE set type field 0A234 60040004 0 IMM 114 LD R0 DICTLEN set length of CT info 0A235 E4091F10 0 4 ZBM 115 ST R0 R4,DIENTLEN set into user entry 0A236 60174804 0 5 BASE 116 LD R0 R5,MTUNAME get name of unit 0A237 E4170801 0 4 BASE 117 ST R0 R4,DIDNAME and move to stack 0A238 60095040 0 5 ZBM 118 LD R0 R5,MTUUNIT get the unit number 0A239 60495F11 1 5 ZBM 119 LD R1 R5,MTUCNTL get pointer to CTC element 0A23A 60564801 1 1 BASE 120 LD R1 R1,MTCPMVALUE get the PF value 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2269 (OPRDEVINFO) F 140 OPREQ - Get Device Information 0A23B DC40A299 121 CALLNP MAKEHARDADR make hardware address 0A23C E4090102 0 4 ZBM 122 ST R0 R4,DIHARDADR save in stack area 0A23D 60174803 0 5 BASE 123 LD R0 R5,MTUPCADRS is it busy 0A23E FA02A240 0 124 JEQZ R0 NOCTPROC jump if no one busy with CT 0A23F 600800C3 0 0 ZBM 125 LD R0 R0,PCPROCNUM if busy, get process number 0000A240 126 NOCTPROC LABEL 0A240 E4170803 0 4 BASE 127 ST R0 R4,DICTPROC indicate which process has CT 0A241 DC00A289 128 CALL MOVEINFO move info to user 0A242 40170800 4 BASE 129 PARL R4,0 indicate where it is 0A243 FB76A231 5 130 LJNA R5 CTLOOP advance to next element 131 * \ / 0000A244 132 NOCTS LABEL 133 * \ / 134 * return info on magnetic tapes 135 * \ / 0A244 61401F1D 5 136 LD R5 MTULIST R5 => first MT unit element 0A245 FB70A259 5 137 JZA R5 NOMTS jump if no MTs 138 * \ / 0000A246 139 MTLOOP LABEL 0A246 39178803 4 6 BASE 140 LEA R4 SP,DISINFO get address 0A247 60040002 0 IMM 141 LD R0 DIMT get the type code 0A248 E40900F0 0 4 ZBM 142 ST R0 R4,DITYPE set type field 0A249 60040004 0 IMM 143 LD R0 DIMTLEN set length of MT info 0A24A E4091F10 0 4 ZBM 144 ST R0 R4,DIENTLEN set into user entry 0A24B 60174804 0 5 BASE 145 LD R0 R5,MTUNAME get name of unit 0A24C E4170801 0 4 BASE 146 ST R0 R4,DIDNAME and move to stack 0A24D 60095040 0 5 ZBM 147 LD R0 R5,MTUUNIT get the unit number 0A24E 60495F11 1 5 ZBM 148 LD R1 R5,MTUCNTL get pointer to MTC element 0A24F 60564801 1 1 BASE 149 LD R1 R1,MTCPMVALUE get the PF value 0A250 DC40A299 150 CALLNP MAKEHARDADR make hardware address 0A251 E4090102 0 4 ZBM 151 ST R0 R4,DIHARDADR save in stack area 0A252 60174803 0 5 BASE 152 LD R0 R5,MTUPCADRS is it busy 0A253 FA02A255 0 153 JEQZ R0 NOMTPROC jump if no one busy with MT 0A254 600800C3 0 0 ZBM 154 LD R0 R0,PCPROCNUM if busy, get process number 0000A255 155 NOMTPROC LABEL 0A255 E4170803 0 4 BASE 156 ST R0 R4,DIMTPROC indicate which process has MT 0A256 DC00A289 157 CALL MOVEINFO move info to user 0A257 40170800 4 BASE 158 PARL R4,0 indicate where it is 0A258 FB76A246 5 159 LJNA R5 MTLOOP advance to next element 160 * \ / 0000A259 161 NOMTS LABEL 162 * \ / 163 * return info on video tapes 164 * \ / 0A259 61401F1F 5 165 LD R5 VTULIST R5 => first VT unit element 0A25A FB70A26E 5 166 JZA R5 NOVTS jump if no VTs 167 * \ / 0000A25B 168 VTLOOP LABEL 0A25B 39178803 4 6 BASE 169 LEA R4 SP,DISINFO get address 0A25C 60040005 0 IMM 170 LD R0 DIVT get the type code 0A25D E40900F0 0 4 ZBM 171 ST R0 R4,DITYPE set type field 0A25E 60040004 0 IMM 172 LD R0 DIVTLEN set length of VT info 0A25F E4091F10 0 4 ZBM 173 ST R0 R4,DIENTLEN set into user entry 0A260 60174804 0 5 BASE 174 LD R0 R5,MTUNAME get name of unit 0A261 E4170801 0 4 BASE 175 ST R0 R4,DIDNAME and move to stack 0A262 60095040 0 5 ZBM 176 LD R0 R5,MTUUNIT get the unit number 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2270 (OPRDEVINFO) F 140 OPREQ - Get Device Information 0A263 60495F11 1 5 ZBM 177 LD R1 R5,MTUCNTL get pointer to VTC element 0A264 60564801 1 1 BASE 178 LD R1 R1,MTCPMVALUE get the PF value 0A265 DC40A299 179 CALLNP MAKEHARDADR make hardware address 0A266 E4090102 0 4 ZBM 180 ST R0 R4,DIHARDADR save in stack area 0A267 60174803 0 5 BASE 181 LD R0 R5,MTUPCADRS is it busy 0A268 FA02A26A 0 182 JEQZ R0 NOVTPROC jump if no one busy with VT 0A269 600800C3 0 0 ZBM 183 LD R0 R0,PCPROCNUM if busy, get process number 0000A26A 184 NOVTPROC LABEL 0A26A E4170803 0 4 BASE 185 ST R0 R4,DIVTPROC indicate which process has VT 0A26B DC00A289 186 CALL MOVEINFO move info to user 0A26C 40170800 4 BASE 187 PARL R4,0 indicate where it is 0A26D FB76A25B 5 188 LJNA R5 VTLOOP advance to next element 189 * \ / 0000A26E 190 NOVTS LABEL 191 * \ / 192 * return info on line printers 193 * \ / 0A26E 61401F21 5 194 LD R5 LPCLIST R5 => first LP element 0A26F FB70A284 5 195 JZA R5 NOLPS jump if none 196 * \ / 0000A270 197 LPLOOP LABEL 0A270 39178803 4 6 BASE 198 LEA R4 SP,DISINFO get address for buildup 0A271 60040004 0 IMM 199 LD R0 DILP get type code for LP 0A272 E40900F0 0 4 ZBM 200 ST R0 R4,DITYPE and set into user data 0A273 60040004 0 IMM 201 LD R0 DILPLEN get length of LP entry 0A274 E4091F10 0 4 ZBM 202 ST R0 R4,DIENTLEN and set into block 0A275 60174804 0 5 BASE 203 LD R0 R5,LPCNAME get the name of the unit 0A276 E4170801 0 4 BASE 204 ST R0 R4,DIDNAME set into block 0A277 60040000 0 IMM 205 LD R0 0 0A278 60574801 1 5 BASE 206 LD R1 R5,LPCPMVALUE get PF value 0A279 DC40A299 207 CALLNP MAKEHARDADR and create hardware address 0A27A E4090102 0 4 ZBM 208 ST R0 R4,DIHARDADR 0A27B EC170803 4 BASE 209 STZ R4,DILPPROC 0A27C 5C094417 5 ZBM 210 CMZ R5,LPCOPEN is it equipped? 0A27D FE02A281 211 JEQ NOLPPROC jump if no process 0A27E 60174808 0 5 BASE 212 LD R0 R5,LPCPCADRS get PCB 0A27F 600800C3 0 0 ZBM 213 LD R0 R0,PCPROCNUM get the process number 0A280 E4170803 0 4 BASE 214 ST R0 R4,DILPPROC indicate process number of holder 0000A281 215 NOLPPROC LABEL 0A281 DC00A289 216 CALL MOVEINFO move stuff to user 0A282 40170800 4 BASE 217 PARL R4,0 indicate where it is 0A283 FB76A270 5 218 LJNA R5 LPLOOP link to next LP 219 * \ / 0000A284 220 NOLPS LABEL 221 * \ / 222 * Put code here to give information on other devices. 223 * \ / 0A284 61000412 4 224 LD R4 CPPSA 0A285 61091F11 4 4 ZBM 225 LD R4 R4,PSCACHNP1 R4 -> caller's console area 0A286 60178801 0 6 BASE 226 LD R0 SP,DISLEN 0A287 E4170803 0 4 BASE 227 ST R0 R4,CAR1 return buffer remaining to user 0A288 FE0E59D6 228 JMP NOERROR all done 229 * --- 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2271 (OPRDEVINFO) F 140 OPREQ - Get Device Information 231 232 ********************************************************************************** 233 * * 234 * Copy data to user buffer. * 235 * Call: * 236 * CALL MOVEINFO * 237 * PARL our buffer * 238 * * 239 * Eats R0:R3. * 240 * Stack required = 0. * 241 * * 242 ********************************************************************************** 243 244 BLOCK MOVEINFO subroutine 245 ENTRY MOVEINFO 246 0A289 DD12C000 3 REG 247 MOVEINFO ENTR R3 0A28A C0120000 0 REG 248 STPL R0 R0 = where from 0A28B 60481F10 1 0 ZBM 249 LD R1 R0,DIENTLEN R1 = number of words 0A28C 604A5F30 1 1 CBM 250 LD R1 R1/FLDCHARS R1 = number of characters 0A28D B0578801 1 6 BASE 251 RSBM R1 SP,DISLEN update count of chars remaining 0A28E 60978801 2 6 BASE 252 LD R2 SP,DISLEN get count remaining 0A28F 50840000 2 IMM 253 MIN R2 0 R2 = 0 or size of overflow 0A290 18528000 1 2 REG 254 ADD R1 R2 adjust count for overflow 0A291 54440000 1 IMM 255 MAX R1 0 R1 = number of chars to really move 0A292 FA4AA298 1 256 JLEZ R1 MOVERET 0A293 60978800 2 6 BASE 257 LD R2 SP,DISCORE get buffer address 0A294 59978802 6 BASE 258 CLBMSR SP,DISRELOC turn off relocation bit if needed 0A295 FE400000 259 CMOVE move the data 0A296 59D78802 6 BASE 260 IORMSR SP,DISRELOC turn the relocation bit back on 0A297 E4978800 2 6 BASE 261 ST R2 SP,DISCORE remember where next 0000A298 262 MOVERET LABEL 0A298 5D12C000 3 REG 263 LEAVE R3 return 264 * --- 265 266 END MOVEINFO subroutine 267 268 269 END GETDEVINFO routines 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2272 (OPRDEVINFO) F 140 OPREQ - Get Device Information 271 272 ********************************************************************************** 273 * * 274 * Construct hardware address. Call: * 275 * LD R0 <unit number> * 276 * LD R1 <PF for controller> * 277 * CALLNP MAKEHARDADR * 278 * ST R0 <hardware address> * 279 * * 280 * Eats R0:R2 * 281 * Stack required = 1. * 282 * * 283 ********************************************************************************** 284 285 BLOCK MAKEHARDADR subroutine 286 ENTRY MAKEHARDADR 287 288 BEGFRAME 289 ENDFRAME 290 0A299 DD5F8001 6 STAK 291 MAKEHARDADR ENTRNP PUSH 0A29A 608A7020 2 1 CBM 292 LD R2 R1/PPUCHAN extract the channel number 0A29B E48A3040 2 0 CBM 293 ST R2 R0/DICHAN place into selected place 0A29C 608A4840 2 1 CBM 294 LD R2 R1/PFSLOT extract the PPU slot number 0A29D E48A2840 2 0 CBM 295 ST R2 R0/DISLOT and place into selected place 0A29E 5D1F8001 6 STAK 296 LEAVE POP return 297 * --- 298 299 END MAKEHARDADR subroutine 300 301 302 END OPRDEVINFO routine 208 INPUT XRQOPRMAI operator requests for maintenance 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2273 (XRQOPRMAI) F 141 OPREQs to do Maintenance functions 3 4 BLOCK Maintenance and Backup requests 5 ENTRY OPRMNTMAI maintenance mount 6 ENTRY OPRQMAINTR maintenance read 7 ENTRY OPRQMAINTW maintenance write 8 ENTRY OPRQBACKUP backup requests 9 ENTRY OPRQRECOVR recover requests 10 ENTRY SETUPVOL to verify unit is present and a .vol 11 12 13 ********************************************************************************** 14 * * 15 * SETUPVOL * 16 * This routine is called by those OPREQs that require a * 17 * .VOL as the operand of the OPREQ. Call: * 18 * SP * 19 * R3 = operand of instruction (lun number) * 20 * CALLNP SETUPVOL * 21 * FCB => FCB * 22 * VLN => VOLN element * 23 * exits directly to error if no such lun, etc * 24 * * 25 * Eats R3, sets FCB and VLN * 26 * Stack required = 3 * 27 * 1 + max ( LUNSEARCH (2) ) * 28 * * 29 ********************************************************************************** 30 31 BLOCK SETUPVOL subroutine 32 ENTRY SETUPVOL 33 34 BEGFRAME 35 ENDFRAME 36 0A29F DD5F8001 6 STAK 37 SETUPVOL ENTRNP PUSH 0A2A0 DC405B39 38 CALLNP LUNSEARCH look for the lun 0A2A1 FB7059B8 5 39 JZA FCB FERRORLNE3 jump if no such lun 0A2A2 60C96665 3 5 ZBM 40 LD R3 FCB,FCHTYPE check its type 0A2A3 64C4000E 3 IMM 41 CPR R3 HTYPEVOL must be .VOL 0A2A4 FE0C59A5 42 JNE FERRORILOP jump to error if not 0A2A5 61095F16 4 5 ZBM 43 LD VLN FCB,FCDCBPTR get pointer to VOLN element 0A2A6 5D1F8001 6 STAK 44 LEAVE POP return 45 * --- 46 47 END SETUPVOL subroutine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2274 (XRQOPRMAI) F 141 OPREQs to do Maintenance functions 49 50 ********************************************************************************** 51 * * 52 * SETUPDRV * 53 * This routine is called by those OPREQs that require a * 54 * access to the MDV as well as the VOLN element. * 55 * Call: * 56 * SP * 57 * R3 = operand of instruction (lun number) * 58 * CALLNP SETUPDRV * 59 * R3 => MDV * 60 * VLN => VOLN element * 61 * FCB => FCB * 62 * exits directly to error if no such lun, etc * 63 * * 64 * Eats R0,R1, R3:R5. Sets R3, VLN, and FCB. * 65 * Stack required = 4 * 66 * 1 + max ( SETUPVOL (3), SRCHLIST (1), UNSRCHLIST (1) ) * 67 * * 68 ********************************************************************************** 69 70 BLOCK SETUPDRV subroutine 71 ENTRY SETUPDRV 72 73 BEGFRAME 74 ENDFRAME 75 0A2A7 DD5F8001 6 STAK 76 SETUPDRV ENTRNP PUSH 0A2A8 DC40A29F 77 CALLNP SETUPVOL make sure we have a .VOL 0A2A9 5C090E10 4 ZBM 78 CMZ VLN,VOLNMAIM is the volume maintenance mounted? 0A2AA FE0259A5 79 JEQ FERRORILOP illegal operation if not 0A2AB DC0030AA 80 CALL SRCHLIST gain access to MDV list 0A2AC 40001F14 81 PARL MDVLOCK lock to use 0A2AD 60C91F15 3 4 ZBM 82 LD R3 VLN,VOLNHCB get pointer to MDV element 0A2AE FAF0A2B2 3 83 JZA R3 DSKNOTRDY jump if disk is offline 0A2AF 5C08D010 3 ZBM 84 CMZ R3,MDVREADY in the process of coming back 0A2B0 FE02A2B2 85 JEQ DSKNOTRDY jump if not quite there yet 0A2B1 5D1F8001 6 STAK 86 LEAVE POP return 87 * --- 88 89 * drive not ready 0000A2B2 90 DSKNOTRDY LABEL 0A2B2 DC0030B7 91 CALL UNSRCHLIST release access to list 0A2B3 40001F14 92 PARL MDVLOCK lock to clear 0A2B4 600400AE 0 IMM 93 LD R0 XREQERDNR code for situation 0A2B5 FE0E5983 94 JMP FERROR jump directly to error 95 * --- 96 97 END SETUPDRV subroutine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2275 (XRQOPRMAI) F 141 OPREQs to do Maintenance functions 99 100 ********************************************************************************** 101 * * 102 * MSDRIVEREQ * 103 * This routine is called by those OPREQs that require a * 104 * special "read" operation on the drive. This means a FORMAT * 105 * or RESET. It bypasses some of the usual stuff from MSREADREQ. * 106 * Call: * 107 * * 108 * FCB, VLN * 109 * CALL MSDRIVEREQ * 110 * PARV <disk address> * 111 * PARVL <type field> * 112 *return - MSQINLOCK held * 113 * * 114 * Eats R0:R2 * 115 * Stack required = 3 * 116 * 2 + max ( SGETMEM (0), LOCKWAIT (0), ZEROIT (1) ) * 117 * * 118 ********************************************************************************** 119 120 BLOCK MSDRIVEREQ subroutine 121 ENTRY MSDRIVEREQ 122 123 BEGFRAME 00178801 6 BASE 124 MDRDA BSS 1 disk address 125 ENDFRAME 126 0A2B6 DD1F8002 6 STAK 127 MSDRIVEREQ ENTR PUSH 0A2B7 C1578801 6 BASE 128 STPV SP,MDRDA save disk address 0A2B8 C0528000 2 REG 129 STPVL R2 save type 130 131 * get a zeroed MSQ element 0A2B9 DC002ED0 132 CALL SGETMEM get memory for MSQ element 0A2BA 40440002 IMM 133 PARVL MSQLOG size we want 0A2BB 60D20000 3 0 REG 134 LD MSQ R0 copy to appropriate register 0A2BC DC003090 135 CALL ZEROIT fill block with zeros 0A2BD 41160800 0 BASE 136 PAR R0,0 starting address 0A2BE 40440004 IMM 137 PARVL 2 POWER MSQLOG size in words 138 139 * set the block number and type fields 0A2BF E488C0F0 2 3 ZBM 140 ST R2 MSQ,MSQTYPE set type field 0A2C0 60094081 0 5 ZBM 141 LD R0 FCB,FCDRIVE drive number 0A2C1 60578801 1 6 BASE 142 LD R1 SP,MDRDA disk address 0A2C2 E40A4080 0 1 CBM 143 ST R0 R1/VOLFIELD combine them 0A2C3 E456C801 1 3 BASE 144 ST R1 MSQ,MSQBLOCK put in queue element 145 146 * lock input list and insert the request 147 PLOCK MSQINLOCK lock for read queue lists 0A2C4 0CC00000 147 IOFF 0A2C5 D1C01F16 147 SETT MSQINLOCK 0A2C6 FE0CA2C8 147 JNE MA(2+DISPW MA 0) 0A2C7 DC40308B 147 CALLNP LOCKWAIT 0A2C8 60570816 1 4 BASE 148 LD R1 VLN,VOLNREADQ list of read queue elements 0A2C9 FA72A2CE 1 149 JNZA R1 MAKESECND if one there put new one second 0A2CA E4D70816 3 4 BASE 150 ST MSQ VLN,VOLNREADQ at the head of the list 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2276 (XRQOPRMAI) F 141 OPREQs to do Maintenance functions 0A2CB 60040001 0 IMM 151 LD R0 1*BIT FLMSPROC flag to start disk driver 0A2CC FC001CF6 0 152 IORM R0 FLAGS set so dispatcher will see 0A2CD FE0EA2D1 153 JMP MDREXIT leave 154 * --- 155 0000A2CE 156 MAKESECND LABEL 0A2CE 60085F10 0 1 ZBM 157 LD R0 R1,MSQLINK get current second element 0A2CF E408DF10 0 3 ZBM 158 ST R0 MSQ,MSQLINK put new one into list 0A2D0 E4C85F10 3 1 ZBM 159 ST MSQ R1,MSQLINK and point list new guy 160 * \ / 161 0000A2D1 162 MDREXIT LABEL 0A2D1 D0001F18 163 INC DISKRBUSY account for disk read 0A2D2 5D1F8002 6 STAK 164 LEAVE POP return 165 * --- 166 167 END MSDRIVEREQ subroutine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2277 (XRQOPRMAI) F 141 Maintenance mount and dismount 170 171 ********************************************************************************** 172 * * 173 * The calls for the special mounts and dis-mounts all * 174 * come here and are sorted out. * 175 * * 176 * Stack required 27 * 177 * 5 + max ( CREATEUCE (2), DOMOUNT (22), ERRORLOG (3), * 178 * FCFREEMEM (0), GETVGNFCB (2), LINKFCBIN (1), * 179 * LINKUCEIN (3), LUNSEARCH (2), MOUNTDUMMY (2), * 180 * MOUNTPACKL (1), SETMNTVALS (1), SRCHLIST (1), * 181 * UNSRCHLIST (1) ) * 182 * * 183 ********************************************************************************** 184 185 BLOCK maintenance mount and dis-mount routines 186 ENTRY OPRMNTMAI 187 188 BEGFRAME 00178801 6 BASE 189 MNTMAIR0 BSS 1 R0 to return to user 00178802 6 BASE 190 UNITNUM BSS 1 place to remember unit # 00178803 6 BASE 191 MNTTYPE BSS 1 type of call 0=no IDX, ADT 00178804 6 BASE 192 MNTFCB BSS 1 place to remember FCB 193 ENDFRAME 194 0000A2D3 195 OPRMNTMAI LABEL 0A2D3 EC1F8005 6 STAK 196 STZ PUSH allocate stack 0A2D4 68840002 2 IMM 197 UCPR R2 JUMPTBLLEN is it reasonable 0A2D5 FE0459D8 198 JGT ILLREQ jump if bad request 199 * \ / 0A2D6 5CA4A2D7 2 200 LDPC JTABLE(R2) go to requested routine 201 * --- 202 0000A2D7 203 JTABLE LABEL 0A2D7 0000A2D9 204 ADR MAMNTA simple mount... no IDX, ADT 0A2D8 0000A2DB 205 ADR MAMNTB mount with IDX, ADT 00000002 ABS 206 JUMPTBLLEN EQU DISPW JTABLE 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2278 (XRQOPRMAI) F 141 Maintenance mount and dismount 208 209 ********************************************************************************** 210 * * 211 * MOUNTMAI and VOLHANDLE * 212 * This has two flavors... the first is for recovering * 213 * onto volumes, and maintenance programs. The first will not * 214 * get the IDX, ADT tables if We're the first mounter. We * 215 * will also set a bit so nobody else can mount the volume. * 216 * The second flavor will give us all the tables. User call: * 217 * * 218 * LD R0 ORMOUNTMAI or ORVOLHANDLE * 219 * LD R1 pak6 drive name * 220 * OPREQ lun * 221 * JLTZ R0 error * 222 * ST2 R2 name of volume * 223 * R0/BIT 31 => volume already mounted * 224 * R0/BIT 30 => pack label read successfully * 225 * R0/BIT 29 => volume label read successfully * 226 * * 227 ********************************************************************************** 228 0000A2D9 229 MAMNTA LABEL entry for ORMOUNTMAI 0A2D9 EC178803 6 BASE 230 STZ SP,MNTTYPE 0A2DA FE0EA2DC 231 JMP SHARELOTS 232 * --- 233 0000A2DB 234 MAMNTB LABEL entry for ORVOLHANDLE 0A2DB EDD78803 6 BASE 235 STW SP,MNTTYPE 236 * \ / 237 0000A2DC 238 SHARELOTS LABEL 0A2DC EC178801 6 BASE 239 STZ SP,MNTMAIR0 remember R0 0A2DD E4D78802 3 6 BASE 240 ST R3 SP,UNITNUM unit number 0A2DE DC405B39 241 CALLNP LUNSEARCH look for an FCB 0A2DF FB7259C0 5 242 JNZA FCB FERRORLAE jump if 'lun already equipped' 0A2E0 DC405D88 243 CALLNP GETVGNFCB get pre-initialized FCB 0A2E1 FE0E5988 244 JMP UERROR insufficient system resources 0A2E2 E5578804 5 6 BASE 245 ST FCB SP,MNTFCB save away for later use 0A2E3 DC0030AA 246 CALL SRCHLIST get access to the volume name list 0A2E4 40001F14 247 PARL MDVLOCK 0A2E5 61401F15 5 248 LD R5 MDVLIST get pointer to first list element 0A2E6 60170803 0 4 BASE 249 LD R0 R4,CAR1 get the drive name 0A2E7 3C174805 0 5 BASE 250 LSRCH R0 R5,MDVNAME find the specified drive 0A2E8 FE0CA32B 251 JNE NOSUCHDV jump if drive doesn't exist 0A2E9 60094080 0 5 ZBM 252 LD R0 R5,MDVVOLUME does the drive already have a volume mounted? 0A2EA FA0CA306 0 253 JNEZ R0 VOLALRDY jump if so 0A2EB DC0030B7 254 CALL UNSRCHLIST release the VOLN list 0A2EC 40001F14 255 PARL MDVLOCK 256 * \ / 257 258 ********************************************************************************** 259 * * 260 * The indicated unit does not have a volume mounted on * 261 * it. See what type of mount the guy wanted and do it. * 262 * * 263 ********************************************************************************** 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2279 (XRQOPRMAI) F 141 Maintenance mount and dismount 264 265 * \ / 0A2ED 5C178803 6 BASE 266 CMZ SP,MNTTYPE type of mount 0A2EE FE0CA2F9 267 JNE SOPHMNT jump if he wants all tables 268 * \ / 269 270 * ORMOUNTMAI 0A2EF DC00A054 271 CALL MOUNTDUMMY hook up the tables 0A2F0 40534000 5 REG 272 PARVL R5 give the MDV element 0A2F1 FA0CA332 0 273 JNEZ R0 MNTERROR jump on any kind of error 0A2F2 DC40A085 274 CALLNP MOUNTPACKL call to read up pack label 0A2F3 FA02A2F6 0 275 JEQZ R0 PACKLOK jump if pack label okay 0A2F4 60040001 0 IMM 276 LD R0 1 indicate couldn't get pack label 0A2F5 FC178801 0 6 BASE 277 IORM R0 SP,MNTMAIR0 set users R0 278 * \ / 279 0000A2F6 280 PACKLOK LABEL 0A2F6 EC17080C 4 BASE 281 STZ VLN,VOLNFBZY say tables can be used 0A2F7 EC090A10 4 ZBM 282 STZ VLN,VOLNMOUNT indicate that it's "mounted" 0A2F8 FE0EA2FD 283 JMP LOGMOUNT log mounting of the volume 284 * --- 285 286 * ORVOLHANDLE 0000A2F9 287 SOPHMNT LABEL 0A2F9 DC009E1F 288 CALL DOMOUNT mount the disk 0A2FA 42440000 IMM 289 PARV2L 0 no password 0A2FB FA0CA332 0 290 JNEZ R0 MNTERROR jump on error 0A2FC DC409E15 291 CALLNP SETMNTVALS 292 * \ / 293 294 ********************************************************************************** 295 * * 296 * The volume was mounted properly, now we log the event * 297 * and proceed to build an FCB for the user. Note that * 298 * currently we do not distinguish between maintenance mounts * 299 * and normal mounts, if we ever do this is the place to make * 300 * changes. * 301 * * 302 ********************************************************************************** 303 304 * \ / 0000A2FD 305 LOGMOUNT LABEL 0A2FD EDC90E10 4 ZBM 306 STW VLN,VOLNMAIM indicate strictly maintenance mounted 0A2FE D0170815 4 BASE 307 INC VLN,VOLNBUSY say volume in use 0A2FF DC005048 308 CALL ERRORLOG log mounting of the volume 0A300 41441017 IMM 309 PARV ERLCMOUNT mount 0A301 41490086 4 ZBM 310 PARV VLN,VOLNNUM volume number 0A302 41574805 5 BASE 311 PARV R5,MDVNAME drive name 0A303 41570811 4 BASE 312 PARV VLN,VOLNNAME(0) volume name 0A304 40570812 4 BASE 313 PARVL VLN,VOLNNAME(1) 0A305 FE0EA30C 314 JMP BUILDFCB create the unit 315 * --- 316 317 ********************************************************************************** 318 * * 319 * The indicated unit already has a volume mounted on it. * 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2280 (XRQOPRMAI) F 141 Maintenance mount and dismount 320 * We increase its busy counter and continue. * 321 * * 322 ********************************************************************************** 323 0000A306 324 VOLALRDY LABEL 0A306 61201F22 4 0 325 LD VLN VOLNTABLE(R0) get pointer to VOLN element 0A307 5C090E10 4 ZBM 326 CMZ VLN,VOLNMAIM is it already maintenance mounted? 0A308 FE0CA32F 327 JNE CANTDOIT jump if so 0A309 D0170815 4 BASE 328 INC VLN,VOLNBUSY increase the busy counter 0A30A DC0030B7 329 CALL UNSRCHLIST release the list 0A30B 40001F14 330 PARL MDVLOCK 331 * \ / 332 0000A30C 333 BUILDFCB LABEL 0A30C 61578804 5 6 BASE 334 LD FCB SP,MNTFCB restore FCB pointer 0A30D 6004000E 0 IMM 335 LD R0 HTYPEVOL get .VOL indicator 0A30E E4096665 0 5 ZBM 336 ST R0 FCB,FCHTYPE store it in FCB 0A30F 60040000 0 IMM 337 LD R0 FSPRIVRW 0A310 E4094E45 0 5 ZBM 338 ST R0 FCB,FCPRIV set /RW priv in FCB 0A311 E5095F16 4 5 ZBM 339 ST VLN FCB,FCDCBPTR save the associated VOLN pointer 0A312 60040000 0 IMM 340 LD R0 FSACSRW code for read-write access 0A313 E4095835 0 5 ZBM 341 ST R0 FCB,FCACCESS give the guy this access 0A314 EDC94080 5 ZBM 342 STW FCB,FCBUSYCNT say one user of FCB 0A315 60090086 0 4 ZBM 343 LD R0 VLN,VOLNNUM get the volume number 0A316 E4094081 0 5 ZBM 344 ST R0 FCB,FCDRIVE and set MS address prototype 0A317 EDC94C15 5 ZBM 345 STW FCB,FCLOADPT indicate file at load point 0A318 DC005DA8 346 CALL LINKFCBIN add the FCB to the PSA 0A319 40534000 5 REG 347 PARVL FCB pass the FCB address 0A31A 60178802 0 6 BASE 348 LD R0 SP,UNITNUM pick up unit number 0A31B DC003635 349 CALL CREATEUCE make UCE element 0A31C 41520000 0 REG 350 PARV R0 pass unit number 0A31D 40534000 5 REG 351 PARVL FCB and FCB pointer 0A31E 60C00412 3 352 LD R3 CPPSA load the current session 0A31F DC005DB2 353 CALL LINKUCEIN link into list 0A320 41520000 0 REG 354 PARV R0 R0 => newly made UCE 0A321 41400414 355 PARV CPCUPC pass current UPC pointer 0A322 4052C000 3 REG 356 PARVL R3 and current PSA pointer 0A323 60C8DF11 3 3 ZBM 357 LD R3 R3,PSCACHNP1 get the users console area 0A324 62170811 014 BASE 358 LD2 R0 VLN,VOLNNAME get the volume name 0A325 E616C804 013 BASE 359 ST2 R0 R3,CAR2 return it to the user 0A326 60090E10 0 4 ZBM 360 LD R0 VLN,VOLNMAIM get the maintenance only bit 0A327 7C178801 0 6 BASE 361 IOR R0 SP,MNTMAIR0 OR in previously determined bits 0A328 74040007 0 IMM 362 XOR R0 7 change sense 0A329 E416C802 0 3 BASE 363 ST R0 R3,CAR0 return to user 0A32A FE0E38CF 364 JMP XREQRETURN return 365 * --- 366 0000A32B 367 NOSUCHDV LABEL 0A32B DC0030B7 368 CALL UNSRCHLIST release the list 0A32C 40001F14 369 PARL MDVLOCK 0A32D 600400AB 0 IMM 370 LD R0 XREQERNSE 'No such entry' 0A32E FE0EA332 371 JMP MNTERROR give error 372 * --- 373 0000A32F 374 CANTDOIT LABEL 0A32F DC0030B7 375 CALL UNSRCHLIST unlock a list 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2281 (XRQOPRMAI) F 141 Maintenance mount and dismount 0A330 40001F14 376 PARL MDVLOCK list to unlock 0A331 600400A1 0 IMM 377 LD R0 XREQERVIU volume in use error 378 * \ / 379 0000A332 380 MNTERROR LABEL 0A332 E413C000 0 7 REG 381 ST R0 R7 save error code away 0A333 61578804 5 6 BASE 382 LD FCB SP,MNTFCB get fcb address 0A334 DC002F8F 383 CALL FCFREEMEM return free storage 0A335 41440004 IMM 384 PARV FCLOG specify its length 0A336 40534000 5 REG 385 PARVL FCB and address 0A337 FE0E5995 386 JMP UERROR7 give error to user 387 * --- 388 389 END OPRMNTMAI routine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2282 (XRQOPRMAI) F 141 Maintenance read requests 392 393 ********************************************************************************** 394 * * 395 * Maintenance Read Functions * 396 * * 397 * Stack required = 12 * 398 * 0 + max ( MDISKREAD (12), MNVMREAD (6), MSUBST (12), * 399 * UERRORILR (3) ) * 400 * * 401 ********************************************************************************** 402 403 BLOCK Maintr calls 404 ENTRY OPRQMAINTR maintenance read 405 0000A338 406 OPRQMAINTR LABEL 0A338 68840004 2 IMM 407 UCPR R2 MARLSZ check sub-op for legal 0A339 FE0659D8 408 JGE ILLREQ jump out if not 0A33A 5CA4A33B 2 409 LDPC MARLOP(R2) otherwise, go to routine 410 * --- 411 0000A33B 412 MARLOP LABEL 0A33B 0000A33F 413 ADR MDISKREAD disk maintenance read 0A33C 0000A382 414 ADR MNVMREAD NVM read 0A33D 000059D8 415 ADR ILLREQ used to be ORFORMAT 0A33E 0000A342 416 ADR MSUBST disk maintenance read and substitute 00000004 ABS 417 MARLSZ EQU DISPW MARLOP length of table 418 419 END Maintr calls 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2283 (XRQOPRMAI) F 141 OPREQ - Maintenance read 422 423 ********************************************************************************** 424 * * 425 * This request is provided so that maintenance routines * 426 * may see what is actually on mass storage. User call: * 427 * * 428 * LD R0 ORMAINTR * 429 * LD R1 <pointer to buffer> * 430 * LD R2 <pointer to FBI> * 431 * LD R3 <actual MS address> * 432 * OPREQ lun (a .VOL) * 433 * JLTZ R0 <error> * 434 * * 435 * Stack required = 12 * 436 * 5 + max ( GRUBWNDO1 (7), MAPOUTFBI (2), SETMEMTRAP (1), * 437 * SETUPVOL (3), SETWNDO1 (4), SFREEMEM (0), * 438 * SGETMEM (0), SUBSTITUTE (7) ) * 439 * * 440 ********************************************************************************** 441 442 BLOCK MDISKREAD routine 443 ENTRY MDISKREAD routine to read disk 444 ENTRY MSUBST routine to read disk and substitute 445 446 BEGFRAME 00178801 6 BASE 447 BUFFPTR BSS 2 ptr to users block buffer 00178802 6 BASE 448 FBIPTR EQU BUFFPTR(1) ptr to users FBI buffer 00178803 6 BASE 449 SAVEPPL BSS 1 PPL of block in WNDO1 00178804 6 BASE 450 DOSUBST BSS 1 Request was maintenance read and substitute 451 ENDFRAME 452 0000A33F 453 MDISKREAD LABEL 0A33F EC1F8005 6 STAK 454 STZ PUSH allocate stack frame 0A340 EC178804 6 BASE 455 STZ SP,DOSUBST normal maintenance read 0A341 FE0EA344 456 JMP STARTMREAD 457 * --- 0000A342 458 MSUBST LABEL 0A342 EC1F8005 6 STAK 459 STZ PUSH allocate stack frame 0A343 EDD78804 6 BASE 460 STW SP,DOSUBST do a substitution 0000A344 461 STARTMREAD LABEL 0A344 62170803 014 BASE 462 LD2 R0 R4,CAR1 get pointers to buffer and FBI 0A345 E6178801 016 BASE 463 ST2 R0 SP,BUFFPTR store these on our stack 0A346 60491185 1 4 ZBM 464 LD R1 R4,CAR3/MSBLKFIELD get the desired MS address 0A347 60892632 2 4 ZBM 465 LD R2 R4,CAR0/XRMAIFLD get special maintenance bits 0A348 DC40A29F 466 CALLNP SETUPVOL ensure that we have a .VOL 0A349 E4495181 1 5 ZBM 467 ST R1 FCB,FCMSBLK save the desired address 468 0A34A 61040003 4 IMM 469 LD R4 VPCNTLRO+VPCNTLLK read only and locked 0A34B E48B3030 2 4 CBM 470 ST R2 R4/VPMAIFLD add in special maintenance bits 0A34C DC003205 471 CALL SETWNDO1 map desired block into window 1 0A34D 41530000 4 REG 472 PARV R4 control field 0A34E 41534000 5 REG 473 PARV FCB indicate which lun associated 0A34F 4100A354 474 PAR MAINTRERR indicate what to do on error 0A350 41574801 5 BASE 475 PARV FCB,FCBLOCK pass the MS address 0A351 40440000 IMM 476 PARVL 0 indicate no FBI type checking 0A352 60040000 0 IMM 477 LD R0 0 indicate no error 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2284 (XRQOPRMAI) F 141 OPREQ - Maintenance read 0A353 E4D78803 3 6 BASE 478 ST R3 SP,SAVEPPL 479 * \ / 480 0000A354 481 MAINTRERR LABEL 0A354 61D20000 7 0 REG 482 LD R7 R0 put error code in R7 483 484 ********************************************************************************** 485 * The system will not tolerate free blocks being left * 486 * resident. This code checks to see if we have just read * 487 * in such a block. If so, we mark the PPL so that DONEPPL * 488 * will clear PPBLOCK and put the PPL into the clean idle * 489 * list when the block is grubbed. * 490 ********************************************************************************** 491 0A355 60088080 0 2 ZBM 492 LD R0 R2,FBITYPE pick up type of this block 0A356 6404007F 0 IMM 493 CPR R0 FBITFREE is it a free block? 0A357 FE02A35A 494 JEQ MDRHALO jump if so... shouldn't leave resident 0A358 6404000B 0 IMM 495 CPR R0 FBITSYS is it a swapping block? 0A359 FE0CA35D 496 JNE MDRDUD jump if other type, no action here 0000A35A 497 MDRHALO LABEL 0A35A 6008DF12 0 3 ZBM 498 LD R0 R3,PPBUSYWORD/FLDADRS get current busy count 0A35B FA22A35D 0 499 DRJ R0 MDRDUD jumps if count not = 1 0A35C EDC8C212 3 ZBM 500 STW R3,PPDISKERR tell DONEPPL to nuke PPBLOCK 0000A35D 501 MDRDUD LABEL 502 0A35D DC002ED0 503 CALL SGETMEM get a temp FBI 0A35E 40440004 IMM 504 PARVL FBILOG pass log size 0A35F 60D20000 3 0 REG 505 LD R3 R0 save temp address until needed 0A360 E0128000 0 2 REG 506 EXCH R0 R2 R0 => blocks FBI, R2 => temp 0A361 6044002C 1 IMM 507 LD R1 FBILNTH*CPW size 0A362 FE400000 508 CMOVE copy FBI to temp 0A363 DC40261B 509 CALLNP MAPOUTFBI unmap FBI, ION 510 * \ / 0A364 DC005BCF 511 CALL SETMEMTRAP set up for user memory errors 0A365 4000A37B 512 PARL USERMEMBAD indicate where to go 0A366 60040800 0 IMM 513 LD R0 ADR WNDO1 indicate source address 0A367 60441000 1 IMM 514 LD R1 CPP indicate size of page 0A368 60978801 2 6 BASE 515 LD R2 SP,BUFFPTR get pointer to disk page 0A369 59840080 IMM 516 CLBMSR MSRSRELOC store in users memory 0A36A FE400000 517 CMOVE 0A36B 59C40080 IMM 518 IORMSR MSRSRELOC relocate back to us 519 * \ / 0A36C 6012C000 0 3 REG 520 LD R0 R3 get temp FBI address 0A36D 6044002C 1 IMM 521 LD R1 FBILNTH*CPW and length 0A36E 60978802 2 6 BASE 522 LD R2 SP,FBIPTR place to put FBI in users memory 0A36F 59840080 IMM 523 CLBMSR MSRSRELOC store in users memory 0A370 FE400000 524 CMOVE 0A371 59C40080 IMM 525 IORMSR MSRSRELOC relocate back to us 526 * \ / 0A372 DC002F5D 527 CALL SFREEMEM free temp 0A373 41440004 IMM 528 PARV FBILOG pass size 0A374 4052C000 3 REG 529 PARVL R3 pass address 0A375 5C178804 6 BASE 530 CMZ SP,DOSUBST Do we want to substitute the block? 0A376 FE02A379 531 JEQ DONE No 0A377 61178803 4 6 BASE 532 LD R4 SP,SAVEPPL Yes, do it 0A378 DC40506E 533 CALLNP SUBSTITUTE 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2285 (XRQOPRMAI) F 141 OPREQ - Maintenance read 0000A379 534 DONE LABEL 0A379 DC403150 535 CALLNP GRUBWNDO1 unmap window removing clutter 0A37A FE0E5997 536 JMP FERROR7 and return to user 537 * --- 538 0000A37B 539 USERMEMBAD LABEL 0A37B DC002F5D 540 CALL SFREEMEM free temp 0A37C 41440004 IMM 541 PARV FBILOG pass size 0A37D 4052C000 3 REG 542 PARVL R3 pass address 0A37E E61F8002 016 STAK 543 ST2 R0 STAK SP,2 save the parameters 0A37F DC403150 544 CALLNP GRUBWNDO1 unmap the window 0A380 621F8002 016 STAK 545 LD2 R0 STAK SP,2 retrieve parameters 0A381 FE0E5B5F 546 JMP PASSERRUP and pass error up 547 * --- 548 549 END of MDISKREAD routine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2286 (XRQOPRMAI) F 141 OPREQ - Maintenance read 551 552 ********************************************************************************** 553 * * 554 * This request is provided to allow maintenance programs * 555 * to read the NVM. User call: * 556 * * 557 * LD R0 ORREADNVM * 558 * LD R1 <NVM location> * 559 * OPREQ 0 * 560 * JLTZ R0 <error> * 561 * ST R2 <data returned> * 562 * * 563 * Only the rightmost 8 bits of the NVM data is significant. * 564 * * 565 * Stack required = 6 * 566 * 0 + max ( READNVM (6) ) * 567 * * 568 ********************************************************************************** 569 570 BLOCK MNVMREAD routine 571 ENTRY MNVMREAD routine to read NVM 572 0000A382 573 MNVMREAD LABEL 0A382 DC0045EA 574 CALL READNVM go read up the byte 0A383 41440001 IMM 575 PARV 1 indicate a single byte 0A384 40493273 4 ZBM 576 PARVL R4,CAR1/BITS 25:31 pass address 0A385 600A0080 0 0 CBM 577 LD R0 R0/CH0 single bytes are returned left justified 0A386 E4170804 0 4 BASE 578 ST R0 R4,CAR2 return data to user 0A387 FE0E59D6 579 JMP NOERROR indicate no error 580 * --- 581 582 END of MNVMREAD routine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2287 (XRQOPRMAI) F 141 Maintenance write functions 585 586 ********************************************************************************** 587 * * 588 * Maintenance Write Functions * 589 * * 590 * Stack required = 9 * 591 * 0 + max ( MDISKWRITE (9), MFORMAT (3), MHDCHECKER (3), * 592 * MINITFMT (4), MNVMWRITE (6), MRESETDRV (3), * 593 * MSECTRK (3) ) * 594 * * 595 ********************************************************************************** 596 597 BLOCK Maintw calls 598 ENTRY OPRQMAINTW maintenance write 599 0000A388 600 OPRQMAINTW LABEL 0A388 68840007 2 IMM 601 UCPR R2 MAWLSZ check sub-op for legal 0A389 FE0659D8 602 JGE ILLREQ jump out if not 0A38A 5CA4A38B 2 603 LDPC MAWLOP(R2) otherwise, go to routine 604 * --- 605 0000A38B 606 MAWLOP LABEL 0A38B 0000A392 607 ADR MDISKWRITE disk maintenance write 0A38C 0000A3D5 608 ADR MNVMWRITE NVM write 0A38D 0000A3DA 609 ADR MFORMAT format a track 0A38E 0000A3E7 610 ADR MSECTRK set sectors-per-track 0A38F 0000A3F6 611 ADR MHDCHECKER enable/disable head checker 0A390 0000A3FF 612 ADR MINITFMT prepare volume for formatting 0A391 0000A409 613 ADR MRESETDRV reinitialize drive information 00000007 ABS 614 MAWLSZ EQU DISPW MAWLOP length of table 615 616 END Maintw calls 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2288 (XRQOPRMAI) F 141 Maintenance write functions 618 619 ********************************************************************************** 620 * * 621 * This request is provided so that maintenance routines * 622 * may alter blocks on mass storage. * 623 * Please note that there is absolutely no interlocking * 624 * done with what a user might be doing to a page while the * 625 * maintenance routine is busy writing to it. * 626 * * 627 * LD R0 ORMAINTW * 628 * LD R1 <pointer to buffer> * 629 * LD R2 <pointer to FBI buffer> * 630 * LD R3 <actual MS address> * 631 * OPREQ lun (a .VOL) * 632 * JLTZ R0 <error> * 633 * ST R1 <buffer remaining> * 634 * * 635 * The first 4096 characters of the users buffer are * 636 * copied into the data area of the specified block, the next * 637 * 40 characters are copied into the FBI, and the FBI checksum * 638 * is recalculated by the MS driver. * 639 * * 640 * Stack required = 9 * 641 * 2 + max ( FORCEWRW1 (5), GRUBWNDO1 (7), LOCKWAIT (0), * 642 * MAPINFBI (2), MAPOUTFBI (2), SETMEMTRAP (1), * 643 * SETUPVOL (3), SETWNDO1 (4), SFREEMEM (0), * 644 * SGETMEM (0), SUSPENDME (0) ) * 645 * * 646 ********************************************************************************** 647 648 BLOCK MDISKWRITE routine 649 ENTRY MDISKWRITE maintenance write to disk 650 651 BEGFRAME2 00178800 6 BASE 652 BUFFPTR BSS 2 ptr to users page buffer 00178801 6 BASE 653 FBIPTR EQU BUFFPTR(1) ptr to users new FBI 654 ENDFRAME 655 0000A392 656 MDISKWRITE LABEL 0A392 EC1F8002 6 STAK 657 STZ PUSH allocate stack frame 0A393 61D30000 7 4 REG 658 LD R7 R4 save CA pointer 0A394 DC40A29F 659 CALLNP SETUPVOL ensure that we have a .VOL 0A395 DC005BCF 660 CALL SETMEMTRAP set up for user memory errors 0A396 4000A3D1 661 PARL USERMEMBAD indicate where to go 0A397 6257C803 127 BASE 662 LD2 R1 R7,CAR1 get pointers 0A398 E6578800 126 BASE 663 ST2 R1 SP,BUFFPTR store pointers on stack 664 665 * user FBI address in R2 0A399 6104001A 4 IMM 666 LD R4 VPCNTLW+VPCNTLLK+VPCNTLNR VP code for read-write, locked, no read 0A39A 6049D185 1 7 ZBM 667 LD R1 R7,CAR3/MSBLKFIELD get the desired MS address 0A39B E4495181 1 5 ZBM 668 ST R1 FCB,FCMSBLK save the desired address 0A39C 59840040 IMM 669 CLBMSR MSRFRELOC set fetch reloc to user memory 0A39D 64489181 1 2 ZBM 670 CPR R1 R2,FBIDA same as FBI MS address? 0A39E ED8B3010 4 CBM 671 STLNE R4/VPNOSUBB ensure no sub if discrepancy 0A39F 59C40040 IMM 672 IORMSR MSRFRELOC restore fetch to us 0A3A0 6089E632 2 7 ZBM 673 LD R2 R7,CAR0/XRMAIFLD get users special maintenance bits 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2289 (XRQOPRMAI) F 141 Maintenance write functions 0A3A1 FC8B3030 2 4 CBM 674 IORM R2 R4/VPMAIFLD include in VP control bits 0A3A2 DC003205 675 CALL SETWNDO1 map desired block into window 1 0A3A3 41530000 4 REG 676 PARV R4 control field 0A3A4 41534000 5 REG 677 PARV FCB indicate which lun associated 0A3A5 4100A3A8 678 PAR MAINTWERR indicate what to do on error 0A3A6 41574801 5 BASE 679 PARV FCB,FCBLOCK pass the MS address 0A3A7 40440000 IMM 680 PARVL 0 indicate no FBI type checking 681 * \ / 0000A3A8 682 MAINTWERR LABEL 0A3A8 DC40261B 683 CALLNP MAPOUTFBI map out so we can page fault, ION 0A3A9 60178800 0 6 BASE 684 LD R0 SP,BUFFPTR get pointer to user memory 0A3AA 60441000 1 IMM 685 LD R1 CPP indicate size of page 0A3AB 60840800 2 IMM 686 LD R2 ADR WNDO1 indicate data address 0A3AC 59840040 IMM 687 CLBMSR MSRFRELOC set fetch reloc to user memory 0A3AD FE400000 688 CMOVE 0A3AE 59C40040 IMM 689 IORMSR MSRFRELOC restore fetch to us 690 691 * copy FBI portion, R3 => PPL for page 0A3AF DC002ED0 692 CALL SGETMEM get a temp FBI 0A3B0 40440004 IMM 693 PARVL FBILOG pass log size 0A3B1 61120000 4 0 REG 694 LD R4 R0 R0 => temp, save for later 0A3B2 60978801 2 6 BASE 695 LD R2 SP,FBIPTR R2 => users FBI buffer 0A3B3 6044002C 1 IMM 696 LD R1 FBILNTH*CPW size 0A3B4 59840040 IMM 697 CLBMSR MSRFRELOC set fetch reloc to user memory 0A3B5 DA088800 0 21 698 MOVE R0 R2 R1 copy user buffer to temp (dest, source, count) 0A3B6 59C40040 IMM 699 IORMSR MSRFRELOC restore to us 700 * \ / 0A3B7 DC002606 701 CALL MAPINFBI map in the FBI, IOFF 0A3B8 4052C000 3 REG 702 PARVL R3 pass PPL address 703 0A3B9 60130000 0 4 REG 704 LD R0 R4 R0 => temp block 705 * R1 => FBI 0A3BA 6084002C 2 IMM 706 LD R2 FBILNTH*CPW and address 0A3BB DA481000 1 02 707 MOVE R1 R0 R2 copy temp to blocks FBI (dest, source, count) 0A3BC DC40261B 708 CALLNP MAPOUTFBI unmap FBI, ION 0A3BD DC002F5D 709 CALL SFREEMEM free temp 0A3BE 41440004 IMM 710 PARV FBILOG pass size 0A3BF 40530000 4 REG 711 PARVL R4 pass address 712 * \ / 713 714 ********************************************************************************** 715 * * 716 * The input queue is locked so that we may shutdown * 717 * awaiting the forcewrite and be assured that when are * 718 * restarted the write has actually taken place. Note this * 719 * only happens if the so called maintenance bits are set. * 720 * * 721 ********************************************************************************** 722 723 * \ / 724 PLOCK MSQINLOCK lock the input queue 0A3C0 0CC00000 724 IOFF 0A3C1 D1C01F16 724 SETT MSQINLOCK 0A3C2 FE0CA3C4 724 JNE MA(2+DISPW MA 0) 0A3C3 DC40308B 724 CALLNP LOCKWAIT 0A3C4 DC40319D 725 CALLNP FORCEWRW1 force the window to be written 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2290 (XRQOPRMAI) F 141 Maintenance write functions 0A3C5 5C09E632 7 ZBM 726 CMZ R7,CAR0/XRMAIFLD were any maintenance bits set? 0A3C6 FE02A3CD 727 JEQ JUSTUNLOCK jump if not 0A3C7 60840082 2 IMM 728 LD R2 PNWNDO1 secondary shutdown parameter 0A3C8 DC00351C 729 CALL SUSPENDME shutdown awaiting forcewrite 0A3C9 4100A3CF 730 PAR MAINTWRS restart address 0A3CA 4152C000 3 REG 731 PARV R3 wakeup parameter (disk address) 0A3CB 41001DAB 732 PAR SQMSWAIT queue to shutdown in 0A3CC 40001F16 733 PARL MSQINLOCK lock to release 734 * --- 735 0000A3CD 736 JUSTUNLOCK LABEL 737 PUNLOCK MSQINLOCK release lock 0A3CD EC001F16 737 STZ MSQINLOCK 0A3CE 0C800000 737 ION 738 * \ / 739 0000A3CF 740 MAINTWRS LABEL 0A3CF DC403150 741 CALLNP GRUBWNDO1 and release the window 0A3D0 FE0E5982 742 JMP FNOERROR sorry no errors here 743 * --- 744 0000A3D1 745 USERMEMBAD LABEL 0A3D1 E61F8002 016 STAK 746 ST2 R0 STAK SP,2 save the parameters 0A3D2 DC403150 747 CALLNP GRUBWNDO1 unmap the window 0A3D3 621F8002 016 STAK 748 LD2 R0 STAK SP,2 retrieve parameters 0A3D4 FE0E5B5F 749 JMP PASSERRUP and pass error up 750 * --- 751 752 END of MDISKWRITE 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2291 (XRQOPRMAI) F 141 Maintenance write functions 754 755 ********************************************************************************** 756 * * 757 * This request is provided to allow maintenance programs * 758 * to write the NVM. User call: * 759 * * 760 * LD R0 ORWRITENVM * 761 * LD R1 <NVM location> * 762 * LD R2 <data to be written> * 763 * OPREQ 0 * 764 * JLTZ R0 <error> * 765 * * 766 * Only the rightmost 8 bits of the NVM data is significant. * 767 * * 768 * Stack required = 6 * 769 * 0 + max ( WRITENVM (6) ) * 770 * * 771 ********************************************************************************** 772 773 BLOCK MNVMWRITE routine 774 ENTRY MNVMWRITE routine to maintenance write to NVM 775 0000A3D5 776 MNVMWRITE LABEL 0A3D5 60893004 2 4 ZBM 777 LD R2 R4,CAR2/BITS 24:23 left justify only char we want 0A3D6 DC0045F9 778 CALL WRITENVM write into NVM 0A3D7 41440001 IMM 779 PARV 1 indicate single character 0A3D8 40493273 4 ZBM 780 PARVL R4,CAR1/BITS 25:31 and pass indicated address 0A3D9 FE0E59D6 781 JMP NOERROR and return, no error 782 * --- 783 784 END of MNVMWRITE routine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2292 (XRQOPRMAI) F 141 Maintenance Disk Format 787 788 ********************************************************************************** 789 * * 790 * This request is used to format a track. The disk must * 791 * be maintenance mounted meaning that no other process can * 792 * access the disk (if one did this could be disastrous). * 793 * N.B. Format is conceptually a "write" type operation because * 794 * it alters the data portion of disk blocks. BUT, you'll notice, * 795 * it is implemented as a special "read" operation. This is done * 796 * to prevent a violation of the critical region locking protocol * 797 * (see comments in PFPROC, FINDRESPAGE). Specifically, SUSPENDME * 798 * must lock SQRUNNING, so we can not be holding MSQOUTLOCK (as we * 799 * would when suspending a write requester). * 800 * User call: * 801 * * 802 * LD R0 ORFORMAT * 803 * LD R1 <MS address> * 804 * OPREQ unit (.vol) * 805 * JLTZ R0 <error> * 806 * * 807 * Stack required = 3 * 808 * 0 + max ( MSDRIVEREQ (3), SETUPVOL (3), SUSPENDME (0) ) * 809 * * 810 ********************************************************************************** 811 812 BLOCK MFORMAT routine 813 ENTRY MFORMAT 814 0000A3DA 815 MFORMAT LABEL 0A3DA 60970803 2 4 BASE 816 LD R2 R4,CAR1 get the MS address 0A3DB DC40A29F 817 CALLNP SETUPVOL find unit, set VLN 0A3DC 5C090E10 4 ZBM 818 CMZ VLN,VOLNMAIM check if volume maintenance mounted 0A3DD FE0259A5 819 JEQ FERRORILOP illegal operation if not 820 * \ / 821 822 * give request to disk driver 0A3DE DC00A2B6 823 CALL MSDRIVEREQ make request 0A3DF 41528000 2 REG 824 PARV R2 MS address 0A3E0 40440040 IMM 825 PARVL 1*MSQFORMAT special op in type field 826 827 * suspend user until operation complete 0A3E1 60840082 2 IMM 828 LD R2 PNWNDO1 use window 1 for secondary parameter 0A3E2 DC00351C 829 CALL SUSPENDME shut us down 0A3E3 41005982 830 PAR FNOERROR address to resume 0A3E4 4156C801 3 BASE 831 PARV MSQ,MSQBLOCK shutdown parameter 0A3E5 41001DAB 832 PAR SQMSWAIT queue to suspend in 0A3E6 40001F16 833 PARL MSQINLOCK lock to release 834 * --- 835 836 END MFORMAT routine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2293 (XRQOPRMAI) F 141 Maintenance disk functions 839 840 ********************************************************************************** 841 * * 842 * This request sets the values for the number of sectors * 843 * per track and the number of tracks per cylinder. It only * 844 * changes the values in the MDV element and the pack label is * 845 * unaffected. If the drive ever goes offline the MDV is * 846 * destroyed and the sectors per track and tracks per cylinder * 847 * may need to be reset. This request is used by the online * 848 * formatting program to get the disk together enough until a * 849 * real pack label can be written. * 850 * * 851 * Call: LD R0 ORSECTRK * 852 * LD R1 <# sectors/track> * 853 * LD R2 <# track/cylinder> * 854 * OPREQ <unit, .VOL> * 855 * JLTZ R0 error * 856 * * 857 * Stack required = 3 * 858 * 0 + max ( SETUPVOL (3), UNSRCHLIST (1) ) * 859 * * 860 ********************************************************************************** 861 862 BLOCK MSECTRK routine 863 ENTRY MSECTRK 864 0000A3E7 865 MSECTRK LABEL 0A3E7 DC40A2A7 866 CALLNP SETUPDRV get access to drive 867 868 * MDV => drive element (MDVLOCK srchlocked) 0A3E8 61C40082 7 IMM 869 LD R7 XREQERPOB possible error code 0A3E9 60800412 2 870 LD R2 CPPSA current process status area 0A3EA 60889F11 2 2 ZBM 871 LD R2 R2,PSCACHNP1 pointer to console area 0A3EB 62168803 012 BASE 872 LD2 R0 R2,CAR1 get new sec/trk and trk/cyc 0A3EC 680400FF 0 IMM 873 UCPR R0 MAXSECTRK check if out of range 0A3ED FE04A3F3 874 JGT MSTDONE jump if value is too large 0A3EE 684400FF 1 IMM 875 UCPR R1 MAXSECTRK check if out of range 0A3EF FE04A3F3 876 JGT MSTDONE jump if value is too large 0A3F0 E416C00B 0 3 CACH 877 ST R0 R3,MDVSECPTRK set into MDV element 0A3F1 E456C00A 1 3 CACH 878 ST R1 R3,MDVTRKPCYL set into MDV element 0A3F2 61C40000 7 IMM 879 LD R7 0 good return code 0000A3F3 880 MSTDONE LABEL 0A3F3 DC0030B7 881 CALL UNSRCHLIST release access to list 0A3F4 40001F14 882 PARL MDVLOCK lock to clear 0A3F5 FE0E5997 883 JMP FERROR7 return with code 884 * --- 885 000000FF ABS 886 MAXSECTRK EQU 0FF maximum sectors/track and tracks/cylinder 887 888 END MSECTRK routine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2294 (XRQOPRMAI) F 141 Maintenance disk functions 890 891 ********************************************************************************** 892 * * 893 * These routines start or stop the action of the disk * 894 * head checker routine. Note that the head checker still * 895 * runs, its just a bit is set to inhibit the processing it * 896 * performs. * 897 * * 898 * Stack required = 3 * 899 * 0 + max ( SETUPVOL (3) ) * 900 * * 901 ********************************************************************************** 902 903 BLOCK MHDCHECKER routine 904 ENTRY MHDCHECKER 905 0000A3F6 906 MHDCHECKER LABEL 0A3F6 DC40A29F 907 CALLNP SETUPVOL make sure we have a .VOL 0A3F7 5C090E10 4 ZBM 908 CMZ VLN,VOLNMAIM is the volume maintenance mounted? 0A3F8 FE0259A5 909 JEQ FERRORILOP illegal operation if not 0A3F9 60400412 1 910 LD R1 CPPSA current process status 0A3FA 60485F11 1 1 ZBM 911 LD R1 R1,PSCACHNP1 console area for xreq 0A3FB 60087E13 0 1 ZBM 912 LD R0 R1,CAR1/BIT 31 get least significant bit 0A3FC E0090015 0 4 ZBM 913 EXCH R0 VLN,VOLNHDCK tell head checker to start or stop 0A3FD E4087E13 0 1 ZBM 914 ST R0 R1,CAR1/BIT 31 return old value 0A3FE FE0E5982 915 JMP FNOERROR back to the caller 916 * --- 917 918 END MHDCHECKER routine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2295 (XRQOPRMAI) F 141 Maintenance disk functions 920 921 ********************************************************************************** 922 * * 923 * ORINITFMT "prepares a volume for formatting". At * 924 * present, this just means we reset the information the MS * 925 * driver uses to identify the pack during a remount situation. * 926 * The remount code normally relies on the pack label and/or * 927 * security blocks to identify the pack and it's last mount * 928 * date, but these things are in such a state of flux during a * 929 * format that we must fall back on the drive's hardware address. * 930 * See the comments at the SECMNTDAT definition and REMOUNT. * 931 * * 932 * Stack required = 4 * 933 * 0 + max ( CALCDRVADR (1), SETUPDRV (4), UNSRCHLIST (1) ) * 934 * * 935 ********************************************************************************** 936 937 BLOCK MINITFMT routine 938 ENTRY MINITFMT 939 0000A3FF 940 MINITFMT LABEL 0A3FF DC40A2A7 941 CALLNP SETUPDRV get access to drive 0A400 E0D34000 3 5 REG 942 EXCH R3 MDV swap registers 0A401 DC403B5D 943 CALLNP CALCDRVADR make hardware address 0A402 62120000 010 REG 944 LD2 R0 R0 move into double word 0A403 E6174810 015 BASE 945 ST2 R0 MDV,MDVFMTDAT place in drive element 0A404 E6570813 124 BASE 946 ST2 R1 VLN,VOLNMNTDAT place in volume element 0A405 DC0030B7 947 CALL UNSRCHLIST release list 0A406 40001F14 948 PARL MDVLOCK lock to clear 0A407 E0D34000 3 5 REG 949 EXCH R3 MDV reswap registers 0A408 FE0E5982 950 JMP FNOERROR all done 951 * --- 952 953 END MINITFMT routine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2296 (XRQOPRMAI) F 141 Maintenance disk functions 955 956 ********************************************************************************** 957 * * 958 * This request is used to reset the information the * 959 * system uses to control the drive. It should be called * 960 * by a disk initialization program when it completes and * 961 * has made the drive readable. The reason is that the * 962 * current drive info (MDV element) was built when the pack * 963 * label and other critical blocks were not initialized, and * 964 * is therefore quite sketchy. To allow the user immediate * 965 * access (without his physically power cycling the drive), * 966 * this request rebuilds the MDV from the now readable blocks. * 967 * * 968 * Actually, it submits such a request to the MS driver. The * 969 * user is not suspended because there is no need (and no * 970 * MS block). The real operation happens momentarily after * 971 * we ask. * 972 * * 973 * N.B. The disk MUST be maintenance mounted. * 974 * User call: * 975 * * 976 * LD R0 ORRESETDRV * 977 * OPREQ unit (.vol) * 978 * JLTZ R0 <error> * 979 * * 980 * Stack required = 3 * 981 * 0 + max ( MSDRIVEREQ (3), SETUPVOL (3) ) * 982 * * 983 ********************************************************************************** 984 985 BLOCK MRESETDRV routine 986 ENTRY MRESETDRV 987 0000A409 988 MRESETDRV LABEL 0A409 DC40A29F 989 CALLNP SETUPVOL find unit, set VLN 0A40A 5C090E10 4 ZBM 990 CMZ VLN,VOLNMAIM check if volume maintenance mounted 0A40B FE0259A5 991 JEQ FERRORILOP illegal operation if not 992 * \ / 993 994 * give request to disk driver 0A40C DC00A2B6 995 CALL MSDRIVEREQ make request 0A40D 41440000 IMM 996 PARV 0 MS address (pack label, but N/A) 0A40E 40440080 IMM 997 PARVL 1*MSQREINIT special op in type field 998 PUNLOCK MSQINLOCK release queue 0A40F EC001F16 998 STZ MSQINLOCK 0A410 0C800000 998 ION 0A411 FE0E5982 999 JMP FNOERROR back to the caller 1000 * --- 1001 1002 END MRESETDRV routine 209 INPUT XRQOPRBKUP opreqs for backup 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2297 (XRQOPRBKUP) F 142 OPREQs for backup 3 4 ********************************************************************************** 5 * * 6 * The following are the stack definitions, and utility * 7 * routines for backup. * 8 * Some of these routines have non-standard calling sequences. * 9 * This is so that an error that rips you out of them still leaves * 10 * you with a good stack pointer. * 11 * * 12 ********************************************************************************** 13 14 BLOCK OPRQBACKUP requests 15 ENTRY OPRQBACKUP 16 17 BEGFRAME2 00178800 6 BASE 18 BKRETAD BSS 1 return address for subroutines 00178801 6 BASE 19 UBUFSIZE BSS 1 length of user buffer 00178802 6 BASE 20 UBUFAD BSS 1 address of user buffer 00178803 6 BASE 21 HDRADR BSS 1 address of header 00178804 6 BASE 22 UPAGENUM BSS 1 user page number (for ORMAPFP request) 00178805 6 BASE 23 UPREFETCH BSS 1 block number of pre-fetchable block 24 * Do NOT rearrange the following items 00178806 6 BASE 25 VARLENS BSS 1 place to keep the 2 variable lengths 00178807 6 BASE 26 OTEM1 BSS 1 general temp (note the redefinition below) 00178806 6 BASE 27 ERRCODES EQU VARLENS error codes on memory protect violation 00178807 6 BASE 28 FBITEMP EQU OTEM1 pointer to temporary FBI 29 ENDFRAME 30 31 ********************************************************************************** 32 * * 33 * This routine will pass the header for the backup info. * 34 * that we just created. * 35 * Call: * 36 * * 37 * SP,HDRADR (=> beginning of header) * 38 * SP,OTEM1 (2 variable record lengths) * 39 * LD R2 type of information * 40 * JSR R3 MAKEHDR * 41 * * 42 * Eats R0:R3 * 43 * * 44 ********************************************************************************** 45 0000A412 46 MAKEHDR LABEL 0A412 DC005BCF 47 CALL SETMEMTRAP set up for user memory errors 0A413 40005B5F 48 PARL PASSERRUP 0A414 E48A00F0 2 0 CBM 49 ST R2 R0/FILEINFOT remember type of info. 0A415 60440000 1 IMM 50 LD R1 REVBACKUP get revision of this backup 0A416 E44A1F10 1 0 CBM 51 ST R1 R0/BKUPREV revision number 0A417 60578806 1 6 BASE 52 LD R1 SP,VARLENS lengths of variable records 0A418 59840080 IMM 53 CLBMSR MSRSRELOC stores to user 0A419 E6178C03 016 FPVR 54 ST2 R0 @(SP,HDRADR) move the header 0A41A 59C40080 IMM 55 IORMSR MSRSRELOC restore stores 0A41B DC405BD4 56 CALLNP CLRMEMTRAP release control over mem errors 0A41C 5C92C000 3 REG 57 LDPC R3 return 58 * --- 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2298 (XRQOPRBKUP) F 142 OPREQs for backup 60 61 ********************************************************************************** 62 * * 63 * MOVETOUSER * 64 * Moves a block of data to the requesters address space. * 65 * Call: * 66 * R0 = buffer address in monitor space * 67 * R1 = size in characters * 68 * JSR R3 MOVETOUSER * 69 * <error return, buffer exhausted, R0=error code> * 70 * * 71 * Eats R0:R3 * 72 * * 73 ********************************************************************************** 74 0000A41D 75 MOVETOUSER LABEL 0A41D 60978801 2 6 BASE 76 LD R2 SP,UBUFSIZE copy current remaining space 0A41E B0578801 1 6 BASE 77 RSBM R1 SP,UBUFSIZE remove space from users buffer 0A41F 50528000 1 2 REG 78 MIN R1 R2 get amount that we can move 0A420 FA48A429 1 79 JLTZ R1 MTUPOB jump if no buffer at all 0A421 60978802 2 6 BASE 80 LD R2 SP,UBUFAD get requesters buffer address 0A422 59840080 IMM 81 CLBMSR MSRSRELOC relocate stores 0A423 FE400000 82 CMOVE 0A424 59C40080 IMM 83 IORMSR MSRSRELOC restore monitor storing 0A425 E4978802 2 6 BASE 84 ST R2 SP,UBUFAD save advanced buffer pointer 0A426 5C178801 6 BASE 85 CMZ SP,UBUFSIZE check to see if this transfer stopped early 0A427 FE08A429 86 JLT MTUPOB if so, indicate end of user buffer 0A428 5C96D001 3 REG 87 LDPC R3+1 return 88 * --- 89 0000A429 90 MTUPOB LABEL 0A429 60040082 0 IMM 91 LD R0 XREQERPOB load error code 'parameter out of bounds' 0A42A 5C92C000 3 REG 92 LDPC R3 error return 93 * --- 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2299 (XRQOPRBKUP) F 142 OPREQs for backup 95 96 ********************************************************************************** 97 * * 98 * FIXREGS * 99 * * 100 * This routine will update the users registers, so he * 101 * will know what we have done. * 102 * * 103 ********************************************************************************** 104 0A42B DD578800 6 BASE 105 FIXREGS ENTRNP SP,BKRETAD use this temp 0A42C 60C00412 3 106 LD R3 CPPSA get the current PSA pointer 0A42D 60C8DF11 3 3 ZBM 107 LD R3 R3,PSCACHNP1 get ptr to requesters registers 0A42E 62178801 016 BASE 108 LD2 R0 SP,UBUFSIZE get the advanced registers 0A42F E616C803 013 BASE 109 ST2 R0 R3,CAR1 store back to user 0A430 5D178800 6 BASE 110 LEAVE SP,BKRETAD return 111 * --- 112 113 114 ********************************************************************************** 115 * * 116 * GETAUTHLEN * 117 * * 118 * This routine will find the length of data in the * 119 * accounts auth list. We call this so we won't have to * 120 * pass the whole block in backup. * 121 * Call: * 122 * <authlist in WNDO2> * 123 * JSR R3 GETAUTHLEN * 124 * R1 = length of authlist * 125 * * 126 ********************************************************************************** 127 0000A431 128 GETAUTHLEN LABEL 0A431 60440C04 1 IMM 129 LD R1 ADR (WNDO2(AUTHENTBG)) beginning of authlist 130 * \ / 0000A432 131 KPONTRUKIN LABEL 0A432 5E164800 1 BASE 132 CMZ2 R1,AUTHVNAME is there a volume name here? 0A433 FE02A437 133 JEQ FOUNDEND jump if end of list 0A434 1844000C 1 IMM 134 ADD R1 AUTHLELEN adjust base address 0A435 64440FF4 1 IMM 135 CPR R1 ADR (WNDO2(WPP-AUTHLELEN)) are we at end of page? 0A436 FE0AA432 136 JLE KPONTRUKIN if not, keep on truckin' 137 * \ / 0000A437 138 FOUNDEND LABEL 0A437 10440C00 1 IMM 139 SUB R1 ADR (WNDO2) calculate word displacement 0A438 604A4400 1 1 CBM 140 LD R1 R1/BITS 2:1 make into a character length 0A439 5C92C000 3 REG 141 LDPC R3 back to caller 142 * --- 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2300 (XRQOPRBKUP) F 142 OPREQs for backup 144 145 ********************************************************************************** 146 * * 147 * GETSHLLEN * 148 * * 149 * This routine will find the length of data in the shared list. * 150 * We call this so we won't have to pass the whole block in backup. * 151 * Call: * 152 * <shared list in WNDO2> * 153 * JSR R3 GETSHLLEN * 154 * R1 = length in chars. * 155 * Sets R1, Eats R2 * 156 * * 157 ********************************************************************************** 158 0000A43A 159 SHLTAB LABEL 0A43A 00000004 160 VFD SHLENTLEN length of simple entry 0A43B 00000007 161 VFD SHLENTSLEN length if system specified 0A43C 00000006 162 VFD SHLENTPLEN length if password specified 0A43D 00000007 163 VFD SHLENTSLEN length if system and password specified 164 0000A43E 165 GETSHLLEN LABEL 0A43E 60440000 1 IMM 166 LD R1 0 set starting index 0000A43F 167 KEEPON LABEL 0A43F 60A20C00 2 1 168 LD R2 WNDO2(R1) first word of entry 0A440 5C128000 2 REG 169 CMZ R2 if zero no more entries 0A441 FE02A447 170 JEQ FNDEND jump if no more entries 171 * \ / 0A442 608A8220 2 2 CBM 172 LD R2 R2/SHLACTOPT get option bits 0A443 1864A43A 1 2 173 ADD R1 SHLTAB(R2) adjust for size of entry 0A444 644403FC 1 IMM 174 CPR R1 WPP-SHLENTLEN are we at end of page 0A445 FE0AA43F 175 JLE KEEPON jump if not at end yet 176 * \ / 177 0A446 60440400 1 IMM 178 LD R1 WPP say whole page 0000A447 179 FNDEND LABEL 0A447 1C440004 1 IMM 180 MUL R1 CPW adjust to characters 0A448 5C92C000 3 REG 181 LDPC R3 return 182 * --- 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2301 (XRQOPRBKUP) F 142 OPREQs for backup 184 185 ********************************************************************************** 186 * * 187 * Backup Requests * 188 * The backup requests: * 189 * ORBKUPVOL * 190 * ORBKUPACT * 191 * ORBKUPFIL * 192 * ORGETFP * 193 * ORBKUPDONE * 194 * ORMAPFP * 195 * all come here to so that the common setup may be done. * 196 * We come here with: * 197 * SP set up * 198 * R4 => users CA * 199 * R3 = operand of trapped instruction * 200 * R2 = sub-operation code * 201 * * 202 * Stack required = 19 * 203 * 8 + max ( BLKREADIN (1), CLRMEMTRAP (1), DMOTEWNDOx (7), * 204 * DOREWINDA (3), DUALWRITE (5), FERRORFAU (3), * 205 * FNDNONHOLE (8), FREEDIR (5), GRUBWNDOx (7), * 206 * LUNSEARCH (2), MAPOUTFBI (2), MSREADREQ (1), * 207 * SETERRPG (1), SETMEMTRAP (1), SETPAGEX (4), * 208 * SETUPVOL (3), SETWNDOx (4), SFREEMEM (0), * 209 * SGETMEM (0), SRCHDIRSN (11), ULKPAGE (1) ) * 210 * * 211 ********************************************************************************** 212 0000A449 213 OPRQBACKUP LABEL 0A449 EC1F8008 6 STAK 214 STZ PUSH allocate stack 0A44A 62170803 014 BASE 215 LD2 R0 R4,CAR1 get buffer size to R0, address to R1 216 * Ensure that we have room for the header field, then 217 * advance the buffer address over the header, which 218 * is filled in last. 0A44B 10040008 0 IMM 219 SUB R0 BKUPHDRLEN*CPW take off length of header 0A44C FA0859DA 0 220 JLTZ R0 UERRORPOB jump if not even enough room for header 0A44D E4578803 1 6 BASE 221 ST R1 SP,HDRADR save header address for filler inner 0A44E 18440002 1 IMM 222 ADD R1 BKUPHDRLEN and advance address over header 0A44F E6178801 016 BASE 223 ST2 R0 SP,UBUFSIZE save length and address of buffer after header 0A450 EC178806 6 BASE 224 STZ SP,VARLENS clear out second word of header 0A451 64840006 2 IMM 225 CPR R2 ORBACKMAX check sub-op for within range 0A452 FE0659D8 226 JGE ILLREQ go to illegal request if out of bounds 0A453 5CA4A454 2 227 LDPC ORBACKJMP(R2) off via jump table 228 * --- 229 0000A454 230 ORBACKJMP LABEL 0A454 0000A45A 231 ADR OPRQBKUPVL backup volume 0A455 0000A4B0 232 ADR OPRQBKUPAC backup account 0A456 0000A4F1 233 ADR OPRQBKUPFL backup file 0A457 0000A537 234 ADR OPRQGETFP get file page 0A458 0000A611 235 ADR OPRQBKUPDON volume backup is all done 0A459 0000A597 236 ADR OPRQMAPFP map file page 00000006 ABS 237 ORBACKMAX EQU DISPW ORBACKJMP this code and larger not allowed 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2302 (XRQOPRBKUP) F 142 OPREQs for backup 239 240 ********************************************************************************** 241 * * 242 * BACKUP VOLUME * 243 * This request fills the users buffer with the * 244 * information that he must return with an initialize * 245 * volume request. * 246 * User call: * 247 * LD R0 ORBKUPVOL * 248 * LD R1 <buffer size in characters> * 249 * LD R2 <buffer pointer> * 250 * OPREQ <lun> a .VOL * 251 * <return, R0 = error code, R1 = buffer remaining> * 252 * * 253 * The user buffer gets: * 254 * Two word header: first word contains the version # and * 255 * type of info. The second word is zero. * 256 * BOOTSTRAP code, belongs on block 2 of every volume * 257 * FBI for the bootstrap * 258 * VOLUME LABEL up through VOLBKUPE * 259 * SECURITY block starting from SECTZONE * 260 * * 261 ********************************************************************************** 262 0000A45A 263 OPRQBKUPVL LABEL 0A45A DC40A29F 264 CALLNP SETUPVOL ensure that we have a .VOL 0A45B 60040002 0 IMM 265 LD R0 BOOTDA get the MS address of the boot block 0A45C E4095181 0 5 ZBM 266 ST R0 FCB,FCMSBLK save in the FCB 0A45D DC003205 267 CALL SETWNDO1 call to map in the BOOTSTRAP 0A45E 41440003 IMM 268 PARV VPCNTLRO+VPCNTLLK read only but locked (for FBI) 0A45F 41534000 5 REG 269 PARV FCB indicate which lun associated 0A460 4100A49A 270 PAR BVOLERRUM where to go if MS error 0A461 41574801 5 BASE 271 PARV FCB,FCBLOCK indicate MS address 0A462 40440003 IMM 272 PARVL FBITBOOT indicate block type expected 273 * \ / 0A463 DC002ED0 274 CALL SGETMEM get a temp FBI 0A464 40440004 IMM 275 PARVL FBILOG pass log size 0A465 E4178807 0 6 BASE 276 ST R0 SP,FBITEMP save the FBI address until needed 0A466 E0128000 0 2 REG 277 EXCH R0 R2 R0 => FBI, R0 => temp 0A467 6044002C 1 IMM 278 LD R1 FBILNTH*CPW length 0A468 FE400000 279 CMOVE copy the FBI 0A469 DC40261B 280 CALLNP MAPOUTFBI unmap FBI, ION 281 * \ / 0A46A DC005BCF 282 CALL SETMEMTRAP call to set up memory error handling 0A46B 4000A4A8 283 PARL BVOLMEMERR where to go 0A46C 60040800 0 IMM 284 LD R0 ADR WNDO1 get the window address 0A46D 60441000 1 IMM 285 LD R1 CPP get the block size 0A46E FAE8A41D 3 286 JSR R3 MOVETOUSER move to the requesters buffer 0A46F FE0EA49C 287 JMP BVOLERR give parameter out of bounds 288 * \ / 0A470 60178807 0 6 BASE 289 LD R0 SP,FBITEMP get the FBI address 0A471 6044002C 1 IMM 290 LD R1 FBILNTH*CPW get the FBI size 0A472 FAE8A41D 3 291 JSR R3 MOVETOUSER and copy to requesters buffer 0A473 FE0EA49C 292 JMP BVOLERR give parameter out of bounds 293 * \ / 0A474 60578807 1 6 BASE 294 LD R1 SP,FBITEMP R1 => temp FBI 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2303 (XRQOPRBKUP) F 142 OPREQs for backup 0A475 DC002F5D 295 CALL SFREEMEM free the temp 0A476 41440004 IMM 296 PARV FBILOG pass log size 0A477 40524000 1 REG 297 PARVL R1 pass address 0A478 EC178807 6 BASE 298 STZ SP,FBITEMP indicate temp FBI no longer around 0A479 DC403150 299 CALLNP GRUBWNDO1 release the bootstrap block 300 * \ / 0A47A 60040001 0 IMM 301 LD R0 VOLLABELDA get the MS address of the volume label 0A47B E4095181 0 5 ZBM 302 ST R0 FCB,FCMSBLK save in the FCB 0A47C DC003205 303 CALL SETWNDO1 map into window 1 0A47D 41440001 IMM 304 PARV VPCNTLRO we need this block just read only 0A47E 41534000 5 REG 305 PARV FCB indicate the lun associated 0A47F 4100A49C 306 PAR BVOLERR where to go on MS errors 0A480 41574801 5 BASE 307 PARV FCB,FCBLOCK indicate the MS address 0A481 40440004 IMM 308 PARVL FBITVL indicate volume label expected 309 * \ / 0A482 60040800 0 IMM 310 LD R0 ADR WNDO1 get the address where it came in 0A483 60440100 1 IMM 311 LD R1 VLBKUPE*CPW get the size of the area to move 0A484 E44980F6 1 6 ZBM 312 ST R1 SP,VARLENS/FSTBKUPLEN save length of volume label info 0A485 FAE8A41D 3 313 JSR R3 MOVETOUSER copy volume label info to requester 0A486 FE0EA49C 314 JMP BVOLERR give parameter out of bounds 0A487 DC403150 315 CALLNP GRUBWNDO1 release the volume label 316 * \ / 0A488 60492182 1 4 ZBM 317 LD R1 VLN,VOLNSECBK1 get primary security block address 0000A489 318 TRYSECAGN LABEL 0A489 E4491187 1 4 ZBM 319 ST R1 VLN,VOLNSMSBLK try this security block address 0A48A DC003205 320 CALL SETWNDO1 map in the security block 0A48B 41440001 IMM 321 PARV VPCNTLRO map in read-only 0A48C 41534000 5 REG 322 PARV FCB indicate the lun associated 0A48D 4100A4A4 323 PAR SECBLKERR indicate error address 0A48E 41570807 4 BASE 324 PARV VLN,VOLNSECAD ms address 0A48F 40440006 IMM 325 PARVL FBITSEC FBI type expected 326 * \ / 0A490 60040A26 0 IMM 327 LD R0 ADR WNDO1(SECTZONE) get the source address for move 0A491 60440068 1 IMM 328 LD R1 (SECBKUPE DISPW SECTZONE)*CPW up through config. info. 0A492 E4499F16 1 6 ZBM 329 ST R1 SP,VARLENS/SNDBKUPLEN save length of security block info 0A493 FAE8A41D 3 330 JSR R3 MOVETOUSER copy to the requester 0A494 FE0EA49C 331 JMP BVOLERR give parameter out of bounds 0A495 DC403150 332 CALLNP GRUBWNDO1 release the security block 333 * \ / 0A496 60840000 2 IMM 334 LD R2 FILEINFOTV code for volume info. 0A497 FAE8A412 3 335 JSR R3 MAKEHDR make the header 0A498 DC40A42B 336 CALLNP FIXREGS fix up the callers registers 0A499 FE0E5982 337 JMP FNOERROR return, completed 338 * --- 339 0000A49A 340 BVOLERRUM LABEL 0A49A EC178807 6 BASE 341 STZ SP,FBITEMP no temporary FBI 0A49B DC40261B 342 CALLNP MAPOUTFBI unmap FBI, ION (restores R0) 343 * \ / 344 0000A49C 345 BVOLERR LABEL 0A49C 61D20000 7 0 REG 346 LD R7 R0 copy error code 0A49D DC403150 347 CALLNP GRUBWNDO1 release the window 0A49E 60578807 1 6 BASE 348 LD R1 SP,FBITEMP get temporary FBI pointer 0A49F FA705997 1 349 JZA R1 FERROR7 jump if no pointer 0A4A0 DC002F5D 350 CALL SFREEMEM free system storage 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2304 (XRQOPRBKUP) F 142 OPREQs for backup 0A4A1 41440004 IMM 351 PARV FBILOG block size 0A4A2 40524000 1 REG 352 PARVL R1 block address 0A4A3 FE0E5997 353 JMP FERROR7 return error to user 354 * --- 355 0000A4A4 356 SECBLKERR LABEL 0A4A4 60491183 1 4 ZBM 357 LD R1 VLN,VOLNSECBK2 get secondary address 0A4A5 64491187 1 4 ZBM 358 CPR R1 VLN,VOLNSMSBLK have we tried this block? 0A4A6 FE0CA489 359 JNE TRYSECAGN jump to try next, if not 0A4A7 FE0EA49C 360 JMP BVOLERR go give error 361 * --- 362 0000A4A8 363 BVOLMEMERR LABEL 0A4A8 E2178806 016 BASE 364 EXCH2 R0 SP,ERRCODES save codes get temp FBI pointer 0A4A9 FA70A4AD 1 365 JZA R1 NOTMPFBI jump if no pointer 0A4AA DC002F5D 366 CALL SFREEMEM free system storage 0A4AB 41440004 IMM 367 PARV FBILOG block size 0A4AC 40524000 1 REG 368 PARVL R1 block address 369 * \ / 0000A4AD 370 NOTMPFBI LABEL 0A4AD DC403150 371 CALLNP GRUBWNDO1 zap window if mapped 0A4AE 62178806 016 BASE 372 LD2 R0 SP,ERRCODES restore error codes 0A4AF FE0E5B5F 373 JMP PASSERRUP pass error to overprocess 374 * --- 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2305 (XRQOPRBKUP) F 142 OPREQs for backup 376 377 ********************************************************************************** 378 * * 379 * ORBKUPACT * 380 * This OPREQ produces a record containing the * 381 * information that must be returned with a ORRCVRACT. * 382 * User call: * 383 * LD R0 ORBKUPACT * 384 * LD R1 <buffer size in characters> * 385 * LD R2 <buffer address> * 386 * OPREQ <lun> .DIR to be backed up * 387 * JLTZ R0 <error> * 388 * ST R1 <characters remaining> * 389 * * 390 * The user buffer gets: * 391 * Two word header: first word contains the version # and type of info.* 392 * The second word contains the lengths of the SHARE and AUTH lists * 393 * (if present). * 394 * UDIR1 to file directory part * 395 * SHARE LIST if present * 396 * AUTH LIST if present * 397 * * 398 ********************************************************************************** 399 0000A4B0 400 OPRQBKUPAC LABEL 0A4B0 DC405B39 401 CALLNP LUNSEARCH look for the FCB 0A4B1 FB7059B8 5 402 JZA FCB FERRORLNE3 jump if lun not equipped 0A4B2 60096665 0 5 ZBM 403 LD R0 FCB,FCHTYPE get the type of device 0A4B3 64040005 0 IMM 404 CPR R0 HTYPEDIR does this FCB represent a .DIR? 0A4B4 FE0C59A5 405 JNE FERRORILOP illegal operation if not 0A4B5 61095114 4 5 ZBM 406 LD ULB FCB,FCLIMITPTR get ptr to ULB 0A4B6 FB3059D0 4 407 JZA ULB FERRORIAUT jump if no account associated 408 * \ / 0A4B7 DC003205 409 CALL SETWNDO1 set up window 1 0A4B8 41440001 IMM 410 PARV VPCNTLRO get this page RO 0A4B9 41534000 5 REG 411 PARV FCB indicate what lun associated 0A4BA 4100A4E8 412 PAR OPBACERR where to go for MS error 0A4BB 41570801 4 BASE 413 PARV ULB,ULBLOCK pass MS address of UDIR1 0A4BC 40440009 IMM 414 PARVL FBITUDIR1 indicate type expected 0A4BD DC005BCF 415 CALL SETMEMTRAP set up memory error handling 0A4BE 4000A4EC 416 PARL BACTMEMERR indicate where to go 0A4BF 60040800 0 IMM 417 LD R0 ADR WNDO1 pass address of mapped in UDIR1 0A4C0 60440180 1 IMM 418 LD R1 CPW*(UDFDLIST DISP UD) size of fixed part of UDIR1 0A4C1 FAE8A41D 3 419 JSR R3 MOVETOUSER copy stuff to requesters buffer 0A4C2 FE0EA4E8 420 JMP OPBACERR give parameter out of bounds 421 * \ / 0A4C3 61C0083C 7 422 LD R7 WNDO1(UDSHLLIST) get share list flag word 0A4C4 F3C0A4D3 7 423 JBF R7/SHLDSKFLG CKAUTHLIST jump if no MS share list 0A4C5 60090081 0 4 ZBM 424 LD R0 ULB,ULDRIVE get the volume number 0A4C6 E40BC080 0 7 CBM 425 ST R0 R7/VOLFIELD make a complete MS address 0A4C7 DC0031FF 426 CALL SETWNDO2 call to map in the share list 0A4C8 41440001 IMM 427 PARV VPCNTLRO read only 0A4C9 41534000 5 REG 428 PARV FCB indicate what lun associated 0A4CA 4100A4E8 429 PAR OPBACERR where to go on MS error 0A4CB 41578800 6 BASE 430 PARV SP,0 pass the MS address out of hiding 0A4CC 40440011 IMM 431 PARVL FBITASLB indicate account share list expected 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2306 (XRQOPRBKUP) F 142 OPREQs for backup 0A4CD FAE8A43E 3 432 JSR R3 GETSHLLEN get length of share list entries 0A4CE E44980F6 1 6 ZBM 433 ST R1 SP,VARLENS/FSTBKUPLEN and remember length for header 0A4CF 60040C00 0 IMM 434 LD R0 ADR WNDO2 pass address where mapped in 0A4D0 FAE8A41D 3 435 JSR R3 MOVETOUSER copy to users buffer 0A4D1 FE0EA4E8 436 JMP OPBACERR give parameter out of bounds 0A4D2 DC403153 437 CALLNP GRUBWNDO2 get rid of account share list block 438 * \ / 439 0000A4D3 440 CKAUTHLIST LABEL 0A4D3 60000840 0 441 LD R0 WNDO1(UDAUTHLIST) address of auth list 0A4D4 FA02A4E3 0 442 JEQZ R0 OPBACDN jump if no auth list 0A4D5 61170801 4 4 BASE 443 LD R4 ULB,ULBLOCK get complete disk address 0A4D6 E40B1180 0 4 CBM 444 ST R0 R4/MSBLKFIELD replace the block number part 0A4D7 DC0031FF 445 CALL SETWNDO2 map in auth list 0A4D8 41440001 IMM 446 PARV VPCNTLRO read only 0A4D9 41534000 5 REG 447 PARV FCB lun associated 0A4DA 4100A4E8 448 PAR OPBACERR where to go on error 0A4DB 41530000 4 REG 449 PARV R4 address 0A4DC 40440015 IMM 450 PARVL FBITAUTLB FBI type expected 0A4DD FAE8A431 3 451 JSR R3 GETAUTHLEN get length of authlist 0A4DE E4499F16 1 6 ZBM 452 ST R1 SP,VARLENS/SNDBKUPLEN and remember length for header 0A4DF 60040C00 0 IMM 453 LD R0 ADR WNDO2 source of move 0A4E0 FAE8A41D 3 454 JSR R3 MOVETOUSER and move to user 0A4E1 FE0EA4E8 455 JMP OPBACERR jump if we exhausted his length 0A4E2 DC403153 456 CALLNP GRUBWNDO2 get rid of auth list block 457 * \ / 458 0000A4E3 459 OPBACDN LABEL 0A4E3 DC40315C 460 CALLNP DMOTEWNDO1 release the UDIR1 block 0A4E4 60840001 2 IMM 461 LD R2 FILEINFOTA code for account info 0A4E5 FAE8A412 3 462 JSR R3 MAKEHDR make the header 0A4E6 DC40A42B 463 CALLNP FIXREGS fixup the callers registers 0A4E7 FE0E5982 464 JMP FNOERROR indicate successful completion 465 * --- 466 0000A4E8 467 OPBACERR LABEL MS error 0A4E8 61D20000 7 0 REG 468 LD R7 R0 copy error code 0A4E9 DC403150 469 CALLNP GRUBWNDO1 free up the window 0A4EA DC403153 470 CALLNP GRUBWNDO2 free up the window 0A4EB FE0E5997 471 JMP FERROR7 return to requester with error 472 * --- 473 0000A4EC 474 BACTMEMERR LABEL Memory Protect Violation 0A4EC E6178806 016 BASE 475 ST2 R0 SP,ERRCODES copy error codes 0A4ED DC403150 476 CALLNP GRUBWNDO1 free up the window 0A4EE DC403153 477 CALLNP GRUBWNDO2 free up the window 0A4EF 60178806 0 6 BASE 478 LD R0 SP,ERRCODES restore error codes 0A4F0 FE0E5B5F 479 JMP PASSERRUP pass error to overprocess 480 * --- 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2307 (XRQOPRBKUP) F 142 OPREQs for backup 482 483 ********************************************************************************** 484 * * 485 * ORBKUPFIL * 486 * This request provides the requester with the data * 487 * that must be returned with an ORRCVRFIL. * 488 * User call: * 489 * * 490 * LD R0 ORBKUPFIL * 491 * LD R1 <buffer size in characters> * 492 * LD R2 <buffer ptr> * 493 * OPREQ <lun> the file to be backed up * 494 * JLTZ R0 <error> * 495 * ST R1 <characters left in buffer> * 496 * * 497 * The user buffer gets: * 498 * Two word header: first word is revision # and info type. * 499 * Second word is length of share list, and/or CCB if present. * 500 * FDE * 501 * Share list, if present * 502 * CCB info part, if code file * 503 * * 504 ********************************************************************************** 505 0000A4F1 506 OPRQBKUPFL LABEL 0A4F1 DC405B39 507 CALLNP LUNSEARCH look for the FCB 0A4F2 FB7059B8 5 508 JZA FCB FERRORLNE3 jump if lun not equipped 0A4F3 5C096415 5 ZBM 509 CMZ FCB,FCSAVED ensure that the unit is saved 0A4F4 FE0259A5 510 JEQ FERRORILOP illegal operation if not 0A4F5 DC4073AF 511 CALLNP DOREWINDA rewind the unit 0A4F6 DC0082BB 512 CALL SRCHDIRSN look in the dir for this file 0A4F7 40005983 513 PARL FERROR error address 0A4F8 FE0CA529 514 JNE BFSRCHERR jump if file not found 515 * \ / 0A4F9 DC005BCF 516 CALL SETMEMTRAP set up memory error handling 0A4FA 4000A530 517 PARL BFILMEMERR indicate where to go on error 0A4FB E4D30000 3 4 REG 518 ST R3 R4 save the entry pointer 0A4FC DC40315F 519 CALLNP DMOTEWNDO2 do not need UDIR1 block of big dir 0A4FD 60130000 0 4 REG 520 LD R0 R4 get source for move 0A4FE 60440060 1 IMM 521 LD R1 FDLNTH*CPW get the size of an entry 0A4FF FAE8A41D 3 522 JSR R3 MOVETOUSER make copy in users memory 0A500 FE0EA52A 523 JMP BFILERR give parameter out of bounds on count exhaustion 524 * \ / 0A501 61170814 4 4 BASE 525 LD R4 R4,FDSHL/SHLFLAGW get the share list pointer 0A502 F300A511 4 526 JBF R4/SHLDSKFLGB DONEBFL jump if no big share list 0A503 60094081 0 5 ZBM 527 LD R0 FCB,FCDRIVE get drive we are on 0A504 E40B0080 0 4 CBM 528 ST R0 R4/VOLFIELD and put in right place 0A505 DC0031FF 529 CALL SETWNDO2 map in the share list 0A506 41440001 IMM 530 PARV VPCNTLRO we only need read-only access 0A507 41534000 5 REG 531 PARV FCB indicate lun associated 0A508 4100A52A 532 PAR BFILERR where to go on error 0A509 41530000 4 REG 533 PARV R4 indicate the complete MS address 0A50A 40440012 IMM 534 PARVL FBITFSLB indicate type expected 0A50B FAE8A43E 3 535 JSR R3 GETSHLLEN get length of list entries 0A50C E44980F6 1 6 ZBM 536 ST R1 SP,VARLENS/FSTBKUPLEN length for header 0A50D 60040C00 0 IMM 537 LD R0 ADR WNDO2 get address of share list 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2308 (XRQOPRBKUP) F 142 OPREQs for backup 0A50E FAE8A41D 3 538 JSR R3 MOVETOUSER make copy in users memory 0A50F FE0EA52A 539 JMP BFILERR give out of bounds error if not big enough buffer 0A510 DC403153 540 CALLNP GRUBWNDO2 release this window (SLB) 541 * \ / 542 0000A511 543 DONEBFL LABEL 0A511 DC40315C 544 CALLNP DMOTEWNDO1 release this window (dir block with entry) 0A512 60096665 0 5 ZBM 545 LD R0 FCB,FCHTYPE get type of file 0A513 64040003 0 IMM 546 CPR R0 HTYPECODE is it a code file? 0A514 FE0CA523 547 JNE NOCCB if not, we are done 548 * \ / 0A515 60097182 0 5 ZBM 549 LD R0 FCB,FCLPBLK address of CCB 0A516 E4095181 0 5 ZBM 550 ST R0 FCB,FCMSBLK make current block 0A517 DC003205 551 CALL SETWNDO1 map in CCB 0A518 41440001 IMM 552 PARV VPCNTLRO read only 0A519 41534000 5 REG 553 PARV FCB lun associated 0A51A 4100A52A 554 PAR BFILERR where to go on error 0A51B 41574801 5 BASE 555 PARV FCB,FCBLOCK address 0A51C 40440013 IMM 556 PARVL FBITCCB FBI type expected 557 * \ / 0A51D 60040BE8 0 IMM 558 LD R0 ADR WNDO1(CCBINFO) place to start move 0A51E 60440060 1 IMM 559 LD R1 CCBINFOL*CPW length of move 0A51F E4499F16 1 6 ZBM 560 ST R1 SP,VARLENS/SNDBKUPLEN length of CCB for header 0A520 FAE8A41D 3 561 JSR R3 MOVETOUSER move the CCB 0A521 FE0EA52A 562 JMP BFILERR give parameter out of bounds 0A522 DC40315C 563 CALLNP DMOTEWNDO1 save the CCB, we'll need it later 564 * \ / 565 0000A523 566 NOCCB LABEL 0A523 61095114 4 5 ZBM 567 LD ULB FCB,FCLIMITPTR point to the guys limits 0A524 DC405685 568 CALLNP FREEDIR release the directory 0A525 60840002 2 IMM 569 LD R2 FILEINFOTF code for file info 0A526 FAE8A412 3 570 JSR R3 MAKEHDR give the user the header 0A527 DC40A42B 571 CALLNP FIXREGS fix up the callers registers 0A528 FE0E5982 572 JMP FNOERROR give good return 573 * --- 574 0000A529 575 BFSRCHERR LABEL 0A529 6004008C 0 IMM 576 LD R0 XREQERLNS unit not saved in directory 577 * \ / 0000A52A 578 BFILERR LABEL 0A52A 61D20000 7 0 REG 579 LD R7 R0 copy error code 0A52B DC403150 580 CALLNP GRUBWNDO1 release this window (UDIR1 or CCB) 0A52C DC403153 581 CALLNP GRUBWNDO2 release this window (UDIR2 or share list) 0A52D 61095114 4 5 ZBM 582 LD ULB FCB,FCLIMITPTR point to the guys limits 0A52E DC405685 583 CALLNP FREEDIR release the directory 0A52F FE0E5997 584 JMP FERROR7 go give error 585 * --- 586 0000A530 587 BFILMEMERR LABEL 0A530 E6178806 016 BASE 588 ST2 R0 SP,ERRCODES copy error codes 0A531 DC403150 589 CALLNP GRUBWNDO1 release this window (UDIR1 or CCB) 0A532 DC403153 590 CALLNP GRUBWNDO2 release this window (UDIR2 or share list) 0A533 61095114 4 5 ZBM 591 LD ULB FCB,FCLIMITPTR point to the guys limits 0A534 DC405685 592 CALLNP FREEDIR release the directory 0A535 62178806 016 BASE 593 LD2 R0 SP,ERRCODES restore error codes 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2309 (XRQOPRBKUP) F 142 OPREQs for backup 0A536 FE0E5B5F 594 JMP PASSERRUP give error to overprocess 595 * --- 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2310 (XRQOPRBKUP) F 142 OPREQs for backup 597 598 ********************************************************************************** 599 * * 600 * This request returns file pages to the caller and advances * 601 * the current position to the next file page. * 602 * * 603 * LD R0 ORGETFP * 604 * LD R1 <buffer size in characters> * 605 * LD R2 <buffer ptr> * 606 * OPREQ <lun> the file to be backed up * 607 * JLTZ R0 <error> * 608 * ST R1 <characters left in buffer> * 609 * * 610 * The user buffer gets: * 611 * Two word header: first word is revision # and info type. * 612 * Second word is current position pointer for this block. * 613 * data page * 614 * FBI * 615 * * 616 ********************************************************************************** 617 0000A537 618 OPRQGETFP LABEL 0A537 DC405B39 619 CALLNP LUNSEARCH find the associated lun 0A538 FB7059B8 5 620 JZA FCB FERRORLNE3 jump if lun not found 621 * \ / 0A539 60096665 0 5 ZBM 622 LD R0 FCB,FCHTYPE get the hardware type 623 624 ********************************************************************************** 625 * * 626 * Note that only files that consume MS space need to be * 627 * handled. The others were completely backed up in response * 628 * to a ORBKUPFIL. * 629 * * 630 ********************************************************************************** 631 632 * \ / 0A53A 64040004 0 IMM 633 CPR R0 TYPEMAX check for allowable type 0A53B FE0659A5 634 JGE FERRORILOP indicate illegal operation 635 * \ / 0A53C 5C094A15 5 ZBM 636 CMZ FCB,FCLASTREAD/FILEODB are we at end of data? 0A53D FE0C59CC 637 JNE FERRORREOD if so, indicate error 638 * \ / 0A53E 5CA0A53F 0 639 LDPC TYPEJTAB(R0) go to appropriate processor 640 * --- 641 0000A53F 642 TYPEJTAB LABEL 0A53F 000059AA 643 ADR FERRORFAU bad type 0A540 0000A543 644 ADR GETFPSAF SAF 0A541 0000A578 645 ADR GETFPRAF RAF 0A542 0000A578 646 ADR GETFPRAF CODE 00000004 ABS 647 TYPEMAX EQU DISPW TYPEJTAB 648 0000A543 649 GETFPSAF LABEL 0A543 5C095181 5 ZBM 650 CMZ FCB,FCMSBLK are we pointing to a block? 0A544 FE0CA548 651 JNE GOGETIT jump if we are 652 * \ / 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2311 (XRQOPRBKUP) F 142 OPREQs for backup 0A545 60040009 0 IMM 653 LD R0 FILNEOD code for normal EOD 0A546 E4094445 0 5 ZBM 654 ST R0 FCB,FCLASTREAD and put in status 0A547 FE0E5982 655 JMP FNOERROR go give status 656 * --- 657 0000A548 658 GOGETIT LABEL 0A548 DC003205 659 CALL SETWNDO1 map in window 1 0A549 41440003 IMM 660 PARV VPCNTLRO+VPCNTLLK indicate read only and locked 0A54A 41534000 5 REG 661 PARV FCB indicate which lun associated 0A54B 4100A585 662 PAR GPSERR indicate where to go on MS error 0A54C 41574801 5 BASE 663 PARV FCB,FCBLOCK indicate MS address 0A54D 4044000C IMM 664 PARVL FBITSAF and expect a SAF block 0A54E 60089180 0 2 ZBM 665 LD R0 R2,FBIFLINK get forward link 0A54F E4095181 0 5 ZBM 666 ST R0 FCB,FCMSBLK make current position 0A550 E4178805 0 6 BASE 667 ST R0 SP,UPREFETCH save next block address for pre-fetch 668 * \ / 669 0000A551 670 SHAREMOVE LABEL 0A551 DC005BCF 671 CALL SETMEMTRAP catch user memory errors 0A552 4000A590 672 PARL GPSMEMERR 0A553 DC002ED0 673 CALL SGETMEM get a temp FBI 0A554 40440004 IMM 674 PARVL FBILOG pass log size 0A555 E4178807 0 6 BASE 675 ST R0 SP,FBITEMP save the FBI address 0A556 6044002C 1 IMM 676 LD R1 FBILNTH*CPW char length for copy 0A557 DA088800 0 21 677 MOVE R0 R2 R1 copy FBI to temp 0A558 DC40261B 678 CALLNP MAPOUTFBI unmap FBI, ION 679 680 * Give user the Page 0A559 60040800 0 IMM 681 LD R0 ADR WNDO1 get the data address 0A55A 60441000 1 IMM 682 LD R1 CPP and count 0A55B FAE8A41D 3 683 JSR R3 MOVETOUSER move data to users buffer 0A55C FE0EA589 684 JMP GPSERRFR error if count exhaustion 685 686 * Give user the FBI 0A55D 60178807 0 6 BASE 687 LD R0 SP,FBITEMP get address of temp 0A55E 6044002C 1 IMM 688 LD R1 FBILNTH*CPW and size 0A55F FAE8A41D 3 689 JSR R3 MOVETOUSER and move it to the guy 0A560 FE0EA589 690 JMP GPSERRFR error if count exhaustion 691 692 * Finish up and clean up 0A561 60578807 1 6 BASE 693 LD R1 SP,FBITEMP R1 => temp FBI 0A562 DC002F5D 694 CALL SFREEMEM free the temp 0A563 41440004 IMM 695 PARV FBILOG pass log size 0A564 40524000 1 REG 696 PARVL R1 pass address 0A565 DC403150 697 CALLNP GRUBWNDO1 release the window 698 * \ / 0A566 60174808 0 5 BASE 699 LD R0 FCB,FCCPP get current position 0A567 FC178806 0 6 BASE 700 IORM R0 SP,VARLENS remember for header 0A568 D0094148 5 ZBM 701 INC FCB,FCCPP/(RAFMAJINDX+RAFMININDX) point to next block 0A569 60840003 2 IMM 702 LD R2 FILEINFOTD code for file data 0A56A FAE8A412 3 703 JSR R3 MAKEHDR make the header 0A56B DC40A42B 704 CALLNP FIXREGS fix up the callers registers 705 706 * Code to start an early disk read on the next block of this file 0A56C 61178805 4 6 BASE 707 LD R4 SP,UPREFETCH pick up block number 0A56D FB025982 4 708 JEQZ R4 FNOERROR if no block, no pre-fetch 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2312 (XRQOPRBKUP) F 142 OPREQs for backup 709 * \ / 0A56E 60094081 0 5 ZBM 710 LD R0 FCB,FCDRIVE pick up the drive number 0A56F E40B0080 0 4 CBM 711 ST R0 R4/VOLFIELD and build real disk address 0A570 DC4026A5 712 CALLNP BLKREADIN check if block is already resident 0A571 FE0E5982 713 JMP FNOERROR block is resident, lets just leave 714 * \ / 0A572 60930000 2 4 REG 715 LD R2 R4 make ultimate read address (same) 0A573 DC003936 716 CALL MSREADREQ call for a MS read 0A574 40440000 IMM 717 PARVL 0 indicate straight read 718 PUNLOCK MSQINLOCK release the list 0A575 EC001F16 718 STZ MSQINLOCK 0A576 0C800000 718 ION 0A577 FE0E5982 719 JMP FNOERROR 720 * --- 721 0000A578 722 GETFPRAF LABEL 0A578 DC40A5FD 723 CALLNP FINDNXTDAT find next data block in RAF or CODE 0A579 DC003205 724 CALL SETWNDO1 map into window 1 the current data block 0A57A 41440003 IMM 725 PARV VPCNTLRO+VPCNTLLK indicate read only and locked 0A57B 41534000 5 REG 726 PARV FCB indicate which lun associated 0A57C 4100A585 727 PAR GPSERR indicate where to go on MS error 0A57D 41574801 5 BASE 728 PARV FCB,FCBLOCK indicate MS address 0A57E 6004000F 0 IMM 729 LD R0 FBITRAFD get type for raf 0A57F 60496665 1 5 ZBM 730 LD R1 FCB,FCHTYPE get the type of the unit 0A580 64440003 1 IMM 731 CPR R1 HTYPECODE is it a code? 0A581 FE0CA583 732 JNE LEAVRAF jump if not 0A582 60040014 0 IMM 733 LD R0 FBITCODED get type for code file data block 0000A583 734 LEAVRAF LABEL 0A583 40520000 0 REG 735 PARVL R0 pass expected FBI type 0A584 FE0EA551 736 JMP SHAREMOVE go share code 737 * --- 738 0000A585 739 GPSERR LABEL 0A585 61D20000 7 0 REG 740 LD R7 R0 copy the error code 0A586 DC40261B 741 CALLNP MAPOUTFBI unmap FBI, ION 0A587 DC403150 742 CALLNP GRUBWNDO1 zap window if mapped 0A588 FE0E5997 743 JMP FERROR7 return error to caller 744 * --- 745 0000A589 746 GPSERRFR LABEL 0A589 61D20000 7 0 REG 747 LD R7 R0 copy the error code 0A58A DC403150 748 CALLNP GRUBWNDO1 release the page 0A58B 60578807 1 6 BASE 749 LD R1 SP,FBITEMP get pointer to temporary FBI 0A58C DC002F5D 750 CALL SFREEMEM return system memory 0A58D 41440004 IMM 751 PARV FBILOG block size 0A58E 40524000 1 REG 752 PARVL R1 address of the block 0A58F FE0E5997 753 JMP FERROR7 return error to caller 754 * --- 755 0000A590 756 GPSMEMERR LABEL 0A590 E2178806 016 BASE 757 EXCH2 R0 SP,ERRCODES save codes get FBI pointer 0A591 DC002F5D 758 CALL SFREEMEM return system memory 0A592 41440004 IMM 759 PARV FBILOG block size 0A593 40524000 1 REG 760 PARVL R1 address of the block 0A594 DC403150 761 CALLNP GRUBWNDO1 release the page 0A595 62178806 016 BASE 762 LD2 R0 SP,ERRCODES retrieve the parameters 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2313 (XRQOPRBKUP) F 142 OPREQs for backup 0A596 FE0E5B5F 763 JMP PASSERRUP and pass error up the program level stack 764 * --- 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2314 (XRQOPRBKUP) F 142 OPREQs for backup 766 767 ********************************************************************************** 768 * * 769 * This request has basicly the same purpose as the GETFP * 770 * request except that the data block is mapped in rather than * 771 * being copied. * 772 * * 773 * LD R0 ORMAPFP * 774 * LD R1 <buffer size in characters> * 775 * LD R2 <buffer ptr> * 776 * LD R3 <user page number> * 777 * OPREQ <lun> the file to be backed up * 778 * JLTZ R0 <error> * 779 * ST R1 <characters left in buffer> * 780 * * 781 * The user buffer gets: * 782 * Two word header: first word is revision # and info type. * 783 * Second word is current position pointer for this block. * 784 * FBI * 785 * The specified page gets: * 786 * file data * 787 * * 788 * * 789 ********************************************************************************** 790 0000A597 791 OPRQMAPFP LABEL 0A597 60170805 0 4 BASE 792 LD R0 R4,CAR3 pick up callers R3 0A598 68040080 0 IMM 793 UCPR R0 MONPF check for out of range page number 0A599 FE0659DA 794 JGE UERRORPOB jump for illegal page number 0A59A E4178804 0 6 BASE 795 ST R0 SP,UPAGENUM and save for request 0A59B DC405B39 796 CALLNP LUNSEARCH find the associated lun 0A59C FB7059B8 5 797 JZA FCB FERRORLNE3 jump if lun not found 798 * \ / 799 800 ********************************************************************************** 801 * * 802 * Note that only files that consume MS space need to be * 803 * handled. The others were completely backed up in response * 804 * to a ORBKUPFIL. * 805 * * 806 ********************************************************************************** 807 808 * \ / 0A59D 60096665 0 5 ZBM 809 LD R0 FCB,FCHTYPE get the hardware type 0A59E 64040004 0 IMM 810 CPR R0 MAPTYPEMAX check for allowable type 0A59F FE0659A5 811 JGE FERRORILOP indicate illegal operation 0A5A0 5C094A15 5 ZBM 812 CMZ FCB,FCLASTREAD/FILEODB are we at end of data? 0A5A1 FE0C59CC 813 JNE FERRORREOD if so, indicate error 0A5A2 5CA0A5A3 0 814 LDPC MAPTYPEJTB(R0) go to appropriate processor 815 * --- 816 0000A5A3 817 MAPTYPEJTB LABEL 0A5A3 000059AA 818 ADR FERRORFAU bad type 0A5A4 0000A5A7 819 ADR MAPFPSAF SAF 0A5A5 0000A5DD 820 ADR MAPFPRAF RAF 0A5A6 0000A5DD 821 ADR MAPFPRAF CODE 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2315 (XRQOPRBKUP) F 142 OPREQs for backup 00000004 ABS 822 MAPTYPEMAX EQU DISPW MAPTYPEJTB 823 0000A5A7 824 MAPFPSAF LABEL 0A5A7 5C095181 5 ZBM 825 CMZ FCB,FCMSBLK are we pointing to a block? 0A5A8 FE0CA5AC 826 JNE MAPSAFBLK jump if we are 827 * \ / 0A5A9 60040009 0 IMM 828 LD R0 FILNEOD code for normal EOD 0A5AA E4094445 0 5 ZBM 829 ST R0 FCB,FCLASTREAD and put in status 0A5AB FE0E5982 830 JMP FNOERROR go give status 831 * --- 832 0000A5AC 833 MAPSAFBLK LABEL 0A5AC 60178804 0 6 BASE 834 LD R0 SP,UPAGENUM get user page number for mapin 0A5AD DC0031F6 835 CALL SETPAGEX map in page 0A5AE 41440003 IMM 836 PARV VPCNTLRO+VPCNTLLK indicate read only and locked 0A5AF 41534000 5 REG 837 PARV FCB indicate which lun associated 0A5B0 4100A5EB 838 PAR MAPFPERRAD indicate where to go on MS error 0A5B1 41574801 5 BASE 839 PARV FCB,FCBLOCK indicate MS address 0A5B2 4044000C IMM 840 PARVL FBITSAF and expect a SAF block 0A5B3 60089180 0 2 ZBM 841 LD R0 R2,FBIFLINK get forward link 0A5B4 E4095181 0 5 ZBM 842 ST R0 FCB,FCMSBLK make current position 0A5B5 E4178805 0 6 BASE 843 ST R0 SP,UPREFETCH save pre-fetchable block number 844 * \ / 845 0000A5B6 846 MAPSHARE LABEL 0A5B6 DC002ED0 847 CALL SGETMEM get a temp FBI 0A5B7 40440004 IMM 848 PARVL FBILOG pass log size 0A5B8 E4178807 0 6 BASE 849 ST R0 SP,FBITEMP save the FBI address 0A5B9 6044002C 1 IMM 850 LD R1 FBILNTH*CPW char length for copy 0A5BA DA088800 0 21 851 MOVE R0 R2 R1 copy FBI to temp 852 853 * We are done with the FBI and page at this point 854 * (the page stays mapped into user space) 0A5BB DC40261B 855 CALLNP MAPOUTFBI unmap FBI, ION 0A5BC 60178804 0 6 BASE 856 LD R0 SP,UPAGENUM pick up page number 0A5BD DC403279 857 CALLNP ULKPAGE release the page 0A5BE 60040000 0 IMM 858 LD R0 0 zap the error address so it doesn't haunt us later 0A5BF 60578804 1 6 BASE 859 LD R1 SP,UPAGENUM pick up the page number again 0A5C0 DC403193 860 CALLNP SETERRPG set error address for the page 861 862 * Give user the FBI 0A5C1 DC005BCF 863 CALL SETMEMTRAP catch user memory errors 0A5C2 4000A5F7 864 PARL MAPFPMEMERR 0A5C3 60178807 0 6 BASE 865 LD R0 SP,FBITEMP get address of temp 0A5C4 6044002C 1 IMM 866 LD R1 FBILNTH*CPW and size 0A5C5 FAE8A41D 3 867 JSR R3 MOVETOUSER and move it to the guy 0A5C6 FE0EA5F1 868 JMP MAPFPERR error if count exhaustion 869 870 * Finish up and clean up 0A5C7 60578807 1 6 BASE 871 LD R1 SP,FBITEMP R1 => temp FBI 0A5C8 DC002F5D 872 CALL SFREEMEM free the temp 0A5C9 41440004 IMM 873 PARV FBILOG pass log size 0A5CA 40524000 1 REG 874 PARVL R1 pass address 0A5CB 60174808 0 5 BASE 875 LD R0 FCB,FCCPP get current position 0A5CC FC178806 0 6 BASE 876 IORM R0 SP,VARLENS remember for header 0A5CD D0094148 5 ZBM 877 INC FCB,FCCPP/(RAFMAJINDX+RAFMININDX) point to next block 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2316 (XRQOPRBKUP) F 142 OPREQs for backup 0A5CE 60840004 2 IMM 878 LD R2 FILEINFOTM code for mapped file data 0A5CF FAE8A412 3 879 JSR R3 MAKEHDR make the header 0A5D0 DC40A42B 880 CALLNP FIXREGS fix up the callers registers 881 882 * Code to start an early disk read on the next block of this file 0A5D1 61178805 4 6 BASE 883 LD R4 SP,UPREFETCH pick up block number 0A5D2 FB025982 4 884 JEQZ R4 FNOERROR if no block, no pre-fetch 885 * \ / 0A5D3 60094081 0 5 ZBM 886 LD R0 FCB,FCDRIVE pick up the drive number 0A5D4 E40B0080 0 4 CBM 887 ST R0 R4/VOLFIELD and build real disk address 0A5D5 DC4026A5 888 CALLNP BLKREADIN check if block is already resident 0A5D6 FE0E5982 889 JMP FNOERROR block is resident, lets just leave 890 * \ / 0A5D7 60930000 2 4 REG 891 LD R2 R4 make ultimate read address (same) 0A5D8 DC003936 892 CALL MSREADREQ call for a MS read 0A5D9 40440000 IMM 893 PARVL 0 indicate straight read 894 PUNLOCK MSQINLOCK release the list 0A5DA EC001F16 894 STZ MSQINLOCK 0A5DB 0C800000 894 ION 0A5DC FE0E5982 895 JMP FNOERROR 896 * --- 897 0000A5DD 898 MAPFPRAF LABEL 0A5DD DC40A5FD 899 CALLNP FINDNXTDAT find next data block in RAF or CODE 0A5DE 60178804 0 6 BASE 900 LD R0 SP,UPAGENUM pick up users page number 0A5DF DC0031F6 901 CALL SETPAGEX map in the current data block 0A5E0 41440003 IMM 902 PARV VPCNTLRO+VPCNTLLK indicate read only and locked 0A5E1 41534000 5 REG 903 PARV FCB indicate which lun associated 0A5E2 4100A5EB 904 PAR MAPFPERRAD indicate where to go on MS error 0A5E3 41574801 5 BASE 905 PARV FCB,FCBLOCK indicate MS address 0A5E4 6004000F 0 IMM 906 LD R0 FBITRAFD get type for raf 0A5E5 60496665 1 5 ZBM 907 LD R1 FCB,FCHTYPE get the type of the unit 0A5E6 64440003 1 IMM 908 CPR R1 HTYPECODE is it a code? 0A5E7 FE0CA5E9 909 JNE LEAVERAF jump if not 0A5E8 60040014 0 IMM 910 LD R0 FBITCODED get type for code file data block 0000A5E9 911 LEAVERAF LABEL 0A5E9 40520000 0 REG 912 PARVL R0 pass expected FBI type 0A5EA FE0EA5B6 913 JMP MAPSHARE go share code 914 * --- 915 0000A5EB 916 MAPFPERRAD LABEL 0A5EB 61D20000 7 0 REG 917 LD R7 R0 copy the error code 0A5EC DC40261B 918 CALLNP MAPOUTFBI unmap FBI, ION 0A5ED 60040000 0 IMM 919 LD R0 0 zap the error address so it doesn't haunt us later 0A5EE 60578804 1 6 BASE 920 LD R1 SP,UPAGENUM pick up the page number again 0A5EF DC403193 921 CALLNP SETERRPG set error address for the page 0A5F0 FE0E5997 922 JMP FERROR7 923 * --- 924 0000A5F1 925 MAPFPERR LABEL 0A5F1 61D20000 7 0 REG 926 LD R7 R0 copy the error code 0A5F2 60578807 1 6 BASE 927 LD R1 SP,FBITEMP address of the temporary FBI 0A5F3 DC002F5D 928 CALL SFREEMEM free the temp 0A5F4 41440004 IMM 929 PARV FBILOG log of the block size 0A5F5 40524000 1 REG 930 PARVL R1 address of the block to free 0A5F6 FE0E5997 931 JMP FERROR7 give error to user 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2317 (XRQOPRBKUP) F 142 OPREQs for backup 932 * --- 933 0000A5F7 934 MAPFPMEMERR LABEL memory error 0A5F7 E2178806 016 BASE 935 EXCH2 R0 SP,ERRCODES save the parameters get FBI pointer 0A5F8 DC002F5D 936 CALL SFREEMEM free the temp 0A5F9 41440004 IMM 937 PARV FBILOG log of the block size 0A5FA 40524000 1 REG 938 PARVL R1 address of the block to free 0A5FB 62178806 016 BASE 939 LD2 R0 SP,ERRCODES retrieve the parameters 0A5FC FE0E5B5F 940 JMP PASSERRUP and pass error up the program level stack 941 * --- 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2318 (XRQOPRBKUP) F 142 OPREQs for backup 943 944 ********************************************************************************** 945 * * 946 * FINDNXTDAT * 947 * This routine will get the next non-hole data page * 948 * in a RAF/CODE file. The address of the data page is * 949 * put into FCB,FCBLOCK. If we hit EOD or get an error * 950 * mapping in a block we clean up and exit directly to * 951 * give the error. Stack location UPREFETCH location * 952 * gets next block to prefetch, only within the current * 953 * minor access block, zero if none. Note that the load * 954 * point bit is kept up to date, in order to catch wrap * 955 * around on the current position pointer. * 956 * Call: * 957 * FCB,FCCPP * 958 * CALLNP FINDNXTDAT * 959 * returns, EOD if no more pages * 960 * UPREFETCH next block to fetch * 961 * Eats R0:R1. * 962 * Stack required = 7 * 963 * 0 + max ( FNDNONHOLE (7)) * 964 * * 965 ********************************************************************************** 966 0A5FD DD578800 6 BASE 967 FINDNXTDAT ENTRNP SP,BKRETAD keep old stack 0A5FE DC405D33 968 CALLNP FNDNONHOLE advance to next non-hole page 0A5FF FE0E59CA 969 JMP FERRORDSE jump on disk error 0A600 FE0E5982 970 JMP FNOERROR just return EOD 971 * \ / 972 * R0 <= index into MIN access block, R1 <= disk address, if any 0A601 FA42A60D 1 973 JEQZ R1 NOPREFETCH jump if file is small RAF 0A602 E4495181 1 5 ZBM 974 ST R1 FCB,FCMSBLK set up for next read 0A603 78430000 1 IMM 975 AND R1 1*CCBPROTECT isolate protect bit 0A604 E4578806 1 6 BASE 976 ST R1 SP,VARLENS and save for later use 0A605 5C174808 5 BASE 977 CMZ FCB,FCCPP are we still at load point (unlikely) 0A606 EC494C15 5 ZBM 978 STLEQ FCB,FCLOADPT set flag accordingly 0A607 60440000 1 IMM 979 LD R1 0 this indicates no pre-fetch 980 * \ / 981 0000A608 982 PREBLKFND LABEL 0A608 18040001 0 IMM 983 ADD R0 1 advance to next potential block 0A609 640403E8 0 IMM 984 CPR R0 CCBMAXPAGE check to see if out of this minor access block 0A60A FE06A60D 985 JGE NOPREFETCH jump if out of pre-fetchables in this MAB 0A60B 60600800 1 0 986 LD R1 WNDO1(R0) get potential block number 0A60C FA42A608 1 987 JEQZ R1 PREBLKFND continue with the search if hole 988 * \ / 989 0000A60D 990 NOPREFETCH LABEL 0A60D E4578805 1 6 BASE 991 ST R1 SP,UPREFETCH save prefetchable block number 0A60E DC40315C 992 CALLNP DMOTEWNDO1 clean up minor access block 0A60F DC40315F 993 CALLNP DMOTEWNDO2 clean up major access block 0A610 5D178800 6 BASE 994 LEAVE SP,BKRETAD return with same stack 995 * --- 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2319 (XRQOPRBKUP) F 142 OPREQs for backup 997 998 ********************************************************************************** 999 * * 1000 * When a volume has been all backed up, a call to this XREQ * 1001 * is made with a "time stamp". This "time stamp" will be placed * 1002 * in the "last-backed-up" field of the security blocks. * 1003 * User Call: * 1004 * LD R0 ORBKUPDONE * 1005 * LD R1 <time stamp> * 1006 * OPREQ <lun> (a .VOL) * 1007 * JLTZ R0 error * 1008 * * 1009 ********************************************************************************** 1010 0000A611 1011 OPRQBKUPDON LABEL 0A611 DC40A29F 1012 CALLNP SETUPVOL get the volume ready 0A612 60092182 0 4 ZBM 1013 LD R0 VLN,VOLNSECBK1 get the primary security block address 1014 * \ / 1015 0000A613 1016 DOREAD2 LABEL 0A613 FA0259A5 0 1017 JEQZ R0 FERRORILOP exit if no security block 0A614 E4095181 0 5 ZBM 1018 ST R0 FCB,FCMSBLK make current address 0A615 DC003205 1019 CALL SETWNDO1 map in security block 0A616 41440000 IMM 1020 PARV VPCNTLW writeable 0A617 41534000 5 REG 1021 PARV FCB lun associated 0A618 4100A627 1022 PAR MSERROR where to go on error 0A619 41574801 5 BASE 1023 PARV FCB,FCBLOCK disk address 0A61A 40440006 IMM 1024 PARVL FBITSEC type expected 1025 * \ / 0A61B 60C00412 3 1026 LD R3 CPPSA 0A61C 60C8DF11 3 3 ZBM 1027 LD R3 R3,PSCACHNP1 point to the guys CA 0A61D 6016C803 0 3 BASE 1028 LD R0 R3,CAR1 get his R1 0A61E E4000801 0 1029 ST R0 WNDO1(SECBUDATE) put in "time stamp" 1030 * \ / 0A61F 60C40082 3 IMM 1031 LD R3 PNWNDO1 page number 0A620 DC0031A6 1032 CALL DUALWRITE update both security blocks 0A621 60092182 0 4 ZBM 1033 LD R0 VLN,VOLNSECBK1 get primary address 0A622 74091183 0 4 ZBM 1034 XOR R0 VLN,VOLNSECBK2 combine with second 0A623 74174801 0 5 BASE 1035 XOR R0 FCB,FCBLOCK and remove number of one we got 0A624 40520000 0 REG 1036 PARVL R0 indicate place of second block 0A625 DC403150 1037 CALLNP GRUBWNDO1 get rid of security block 0A626 FE0E5982 1038 JMP FNOERROR everything ok 1039 * --- 1040 0000A627 1041 MSERROR LABEL 0A627 60091183 0 4 ZBM 1042 LD R0 VLN,VOLNSECBK2 get secondary address 0A628 64095181 0 5 ZBM 1043 CPR R0 FCB,FCMSBLK have we already tried it? 0A629 FE0CA613 1044 JNE DOREAD2 jump if not 1045 ***** probably should not halt for error on dest pack. 0A62A 00041281 1046 HALT HALTD1281 could read neither security block 1047 * --- 1048 1049 END OPRQBACKUP routines 210 INPUT XRQOPRRCVR opreqs for recover 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2320 (XRQOPRRCVR) F 143 OPREQs for recover 3 4 ********************************************************************************** 5 * * 6 * Recover Requests * 7 * The recover requests: * 8 * ORINITVOL * 9 * ORRCVRACT * 10 * ORRCVRFIL * 11 * ORPUTFP * 12 * ORINITEND * 13 * ORPUTPFP * 14 * all come here so that the common setup may be done. * 15 * * 16 * Stack required = 30 * 17 * 9 + max ( ADJMGRCPU (0), ADJMGRDSKL (0), ADJMGRSDSK (0), * 18 * ALLOCPAGE (6), DISMTSUBS (1), * 19 * DMOTEWNDOx (7), DUALWRITE (5), EXCHANGEPG (7), * 20 * FERRORFAU (3), FETCHDIR (4), FINDVP (4), * 21 * FORCEWRWx (5), FREEDIR (5), FREEULB (11) * 22 * GETFREEBLK (15), GETFSEQN (1), GRUBWNDOx (7), * 23 * LEVELBIT (3), LOCKLIST (1), LOCKWAIT (0), * 24 * LUNSEARCH (2), MAKETRAF (13), MAPINFBI (2), * 25 * MAPOUTFBI (2), PRESETAUTH (21), PRODBLOCK (15), * 26 * PRODUCEFBI (15), RCVRUDIR (7), RECOVERFDE (7), * 27 * RFIXFBI (1), SETMEMTRAP (1), SETUPDIR (7), * 28 * SETWNDOx (4), SFREEMEM (0), SGETMEM (0), * 29 * SRCHDIRLKS (11), SRCHDIRSN (11), TRAFDIR (12), * 30 * ULKWNDO2 (1), UNIQVOLNM (13), UNLOCKLIST (1), * 31 * XPANDTRAF (15), ZEROIT (1) ) * 32 * * 33 * The following are the stack definitions for the * 34 * recovery routines. * 35 * * 36 ********************************************************************************** 37 38 BLOCK OPRQRECOVR routine 39 ENTRY OPRQRECOVR 40 41 BEGFRAME2 00178800 6 BASE 42 RRETAD BSS 1 return link for certain subroutines 00178801 6 BASE 43 UBUFSIZE BSS 1 user buffer size 00178802 6 BASE 44 UBUFAD BSS 1 user buffer address 00178803 6 BASE 45 HDRLENS BSS 1 second word of header 00178804 6 BASE 46 UPAGENUM BSS 1 page number for user supplied page 00178805 6 BASE 47 OTEMPTR BSS 1 temporary pointer 00178806 6 BASE 48 OTEM1 BSS 2 temp stack location 00178808 6 BASE 49 OTEM3 BSS 1 temp stack location 00178806 6 BASE 50 ERRCODES EQU OTEM1 error codes on memory protect 00178808 6 BASE 51 FBITEMP EQU OTEM3 pointer to temporary FBI 00178807 6 BASE 52 RPREVBLOCK EQU OTEM1(1) used in SAF recovery for next back pointer 00178806 6 BASE 53 TMPTIMLIM EQU OTEM1(0) CPU limit to set 00178807 6 BASE 54 TMPDSKS EQU OTEM1(1) saved limit to set 00178808 6 BASE 55 TMPDSKL EQU OTEM3 disk limit to set 56 ENDFRAME 57 58 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2321 (XRQOPRRCVR) F 143 OPREQs for recover 0000A62B 59 OPRQRECOVR LABEL 0A62B EC1F8009 6 STAK 60 STZ PUSH allocate stack 0A62C 62170803 014 BASE 61 LD2 R0 R4,CAR1 get params. 0A62D E6178801 016 BASE 62 ST2 R0 SP,UBUFSIZE put on our stack 0A62E 64840007 2 IMM 63 CPR R2 ORRCVRMAX check sub-op for within range 0A62F FE0659D8 64 JGE ILLREQ go to illegal request if out of bounds 0A630 DC405B39 65 CALLNP LUNSEARCH find file control block for unit 0A631 FB7059B8 5 66 JZA FCB FERRORLNE3 jump if unit not equipped 0A632 5C093211 4 ZBM 67 CMZ R4,CAMSR/MSRFRELOCB check for user or monitor request 0A633 ED895A10 5 ZBM 68 STLNE FCB,FCRELOC save relocation information 0A634 5CA4A635 2 69 LDPC ORRCVRJMP(R2) off via jump table 70 * --- 71 0000A635 72 ORRCVRJMP LABEL 0A635 0000A63C 73 ADR OPRQINITVL initialize volume 0A636 0000A75A 74 ADR OPRQRCVRAC recover account 0A637 0000A80F 75 ADR OPRQRCVRFL recover file 0A638 0000A873 76 ADR OPRQPUTFP place a file page 0A639 0000A719 77 ADR OPRQINITND end of recovery 0A63A 0000A91B 78 ADR OPRQPUTPFP place a file page, mapped form 0A63B 0000A795 79 ADR OPRQRCVACL recover account/authorization adjustments 00000007 ABS 80 ORRCVRMAX EQU DISPW ORRCVRJMP this code and larger not allowed 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2322 (XRQOPRRCVR) F 143 OPREQs for recover 82 83 ********************************************************************************** 84 * * 85 * Initialize Volume * 86 * Given a formatted pack that is maintenance mounted, * 87 * this request takes the information provided by the * 88 * requester and initializes the volume for recovery. The * 89 * information in the users buffer must be that created by * 90 * OPRQBKUPVL. After all recovery operations are completed, * 91 * the special initialization process must be terminated by * 92 * an ORINITND. * 93 * This request: * 94 * 1) Reads in the pack label and bad trax lists and * 95 * sets up GETFREEBLK for special fetching. * 96 * 2) Ensures that the most recent BOOTSTRAP * 97 * is on the pack. * 98 * 3) Writes out a new volume label * 99 * 4) Creates both security blocks. * 100 * * 101 ********************************************************************************** 102 0000A63C 103 OPRQINITVL LABEL 0A63C 60096665 0 5 ZBM 104 LD R0 FCB,FCHTYPE get type of unit we were given 0A63D 6404000E 0 IMM 105 CPR R0 HTYPEVOL ensure that it is a .VOL 0A63E FE0C59A5 106 JNE FERRORILOP illegal operation if not 0A63F FAE8AA3D 3 107 JSR R3 GETHEADER get the header from the buffer info 0A640 64040000 0 IMM 108 CPR R0 FILEINFOTV do we have volume information? 0A641 FE0C59A5 109 JNE FERRORILOP if not, illegal operation 110 * \ / 0A642 FAE8AA15 3 111 JSR R3 CHECKBUFF did the guy give enough buffer? 0A643 FE0E59B0 112 JMP FERRORPOB go give error if not 0A644 61095F16 4 5 ZBM 113 LD VLN FCB,FCDCBPTR pointer to VOLN element 0A645 5C090E10 4 ZBM 114 CMZ VLN,VOLNMAIM is it strictly maintenance mounted? 0A646 FE0259E6 115 JEQ UERRORVIU jump if other users, volume in use error 116 * \ / 117 118 ********************************************************************************** 119 * * 120 * Set up the volume so that GETFREEBLK returns sequential * 121 * block numbers. This will cause the volume to be "packed" * 122 * toward the lower block addresses. * 123 * VOLN,VOLNINLIST is an ordered list of blocks that * 124 * GETFREEBLK must not allocate. It includes the bad tracks * 125 * block, all entries from the bad tracks, AND the first address * 126 * beyond the volume end (that is, the volume size). Elements * 127 * are removed as the counter reaches their block number. * 128 * Because the list is ordered, when we free the funny element we * 129 * know we've reached the end of the disk and must resume normal * 130 * fetching. * 131 * The counter, VOLNBCNTR, is INCd before it is used and * 132 * starts at BOOTDA since this is the highest fixed block * 133 * location. * 134 * * 135 ********************************************************************************** 136 * \ / 137 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2323 (XRQOPRRCVR) F 143 OPREQs for recover 138 * get a VIN for the "special" terminating element 0A647 DC002ED0 139 CALL SGETMEM call for a piece of free memory 0A648 40440001 IMM 140 PARVL VINLOG indicate its length 0A649 EC160800 0 BASE 141 STZ R0,VINLINK say end of linked list 0A64A 6097081D 2 4 BASE 142 LD R2 VLN,VOLNSIZE biggest possible block + 1 0A64B E4960801 2 0 BASE 143 ST R2 R0,VINBLOCK set into the temp element 0A64C E4170818 0 4 BASE 144 ST R0 VLN,VOLNINLIST this starts the special init list 145 146 * map in bad tracks block for next operation ... 0A64D 60090181 0 4 ZBM 147 LD R0 VLN,VOLNBTRXBK get the address of the bad trax block 0A64E E4095181 0 5 ZBM 148 ST R0 FCB,FCMSBLK save in the FCB 0A64F DC003205 149 CALL SETWNDO1 call for map in of bad trax list 0A650 41440001 IMM 150 PARV VPCNTLRO read only 0A651 41534000 5 REG 151 PARV FCB indicate the associated logical unit 0A652 4100A704 152 PAR BTRXBAD where to go on MS error 0A653 41574801 5 BASE 153 PARV FCB,FCBLOCK indicate the MS address 0A654 40440002 IMM 154 PARVL FBITBTRX indicate type expected 0A655 61C7FDFF 7 IMM 155 LD R7 -BTRXECNT-1 get count of entries 0A656 60090181 0 4 ZBM 156 LD R0 VLN,VOLNBTRXBK get the MS address of the BTRX block 0A657 FE0EA659 157 JMP BTRBILD go make entry for this block 158 * --- 159 160 * ... add all bad tracks to the VOLNINLIST in order 0000A658 161 BTRXBIGLP LABEL 0A658 622E0C00 01 7 162 LD2 R0 WNDO1(BTRXECNT)(R7) get the next entry 0000A659 163 BTRBILD LABEL 0A659 FA02A668 0 164 JEQZ R0 BTRXLISEND jump out at list end 0A65A 7800254F 0 165 AND R0 MSBLKMASK chop MS address down to size 0A65B 38970818 2 4 BASE 166 LEA R2 VLN,VOLNINLIST get pointer to list 0000A65C 167 MOVINLIST LABEL 0A65C FAB8A667 23 168 RLJZA R2 BTRPASTEND move to next element 0A65D 64168801 0 2 BASE 169 CPR R0 R2,VINBLOCK check new blocks location 0A65E FE04A65C 170 JGT MOVINLIST jump back if sort order is farther 0A65F FE02A667 171 JEQ BTRPASTEND duplicate, ignore 172 * We now have found the position for the new element 173 * R3 points to the link that will point to us 0A660 60920000 2 0 REG 174 LD R2 R0 copy the bad block number 0A661 DC002ED0 175 CALL SGETMEM and get another list element 0A662 40440001 IMM 176 PARVL VINLOG indicate its length 177 0A663 E4960801 2 0 BASE 178 ST R2 R0,VINBLOCK store bad block number into element 0A664 6096C800 2 3 BASE 179 LD R2 R3,VINLINK get the link to the tail of the list 0A665 E4960800 2 0 BASE 180 ST R2 R0,VINLINK link it behind us 0A666 E416C800 0 3 BASE 181 ST R0 R3,VINLINK insinuate us into the list 0000A667 182 BTRPASTEND LABEL 0A667 FBE0A658 7 183 IRJ R7 BTRXBIGLP go around the loop for the remaining entries 184 * \ / 185 186 * The VINLIST has now been built. Flag VOLN for special fetching. 187 * VOLNBCNTR is the counter for GETFREEBLK. Start it above the 188 * fixed blocks. 0000A668 189 BTRXLISEND LABEL 0A668 60040002 0 IMM 190 LD R0 BOOTDA get the volume label MS address 0A669 E4170819 0 4 BASE 191 ST R0 VLN,VOLNBCNTR set the initial address 192 * The VOLN element is now set up for the special 193 * GETFREEBLK space getting. 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2324 (XRQOPRRCVR) F 143 OPREQs for recover 194 * \ / 195 196 ********************************************************************************** 197 * * 198 * Look at the BOOTSTRAP in the incoming record and the * 199 * BOOTSTRAP from the new pack and ensure that the newest * 200 * one is used. Words 1 and 2 contains the revision date of * 201 * the BOOTSTRAP. * 202 * We look at the words 1 and 2 in users memory and * 203 * completely skip moving the BOOTSTRAP and FBI if we * 204 * don't want it * 205 * * 206 ********************************************************************************** 207 208 * \ / 0A66A 60040002 0 IMM 209 LD R0 BOOTDA get the bootstrap MS address 0A66B E4095181 0 5 ZBM 210 ST R0 FCB,FCMSBLK set up in FCB 0A66C DC003205 211 CALL SETWNDO1 get bootstrap from the new pack 0A66D 41440002 IMM 212 PARV VPCNTLW+VPCNTLLK read-write and locked 0A66E 41534000 5 REG 213 PARV FCB indicate which lun associated 0A66F 4100A707 214 PAR OLDBOOTBAD MS error address 0A670 41574801 5 BASE 215 PARV FCB,FCBLOCK indicate the MS address 0A671 40440003 IMM 216 PARVL FBITBOOT indicate type expected 0A672 E4D78806 3 6 BASE 217 ST R3 SP,OTEM1 save the PPL address 0A673 DC40261B 218 CALLNP MAPOUTFBI unmap FBI, ION 0A674 DC005BCF 219 CALL SETMEMTRAP catch user memory errors 0A675 4000A70F 220 PARL RCVRMEMBAD recovery address 0A676 EC178808 6 BASE 221 STZ SP,FBITEMP no temporary FBI exists yet 0A677 60D78802 3 6 BASE 222 LD R3 SP,UBUFAD get the users buffer address 0A678 5C095A10 5 ZBM 223 CMZ FCB,FCRELOC user or monitor relocation 0A679 FE0CA67B 224 JNE MONSTATE jump if request came from within monitor 0A67A 59840040 IMM 225 CLBMSR MSRFRELOC relocate to user space 226 * \ / 227 0000A67B 228 MONSTATE LABEL 0A67B 6216C801 013 BASE 229 LD2 R0 R3,BOOTREV fetch the incoming revision number 0A67C 59C40040 IMM 230 IORMSR MSRFRELOC restore monitor fetching 0A67D 66000801 01 231 CPR2 R0 WNDO1(BOOTREV) check against what's already on MS 0A67E FE0AA697 232 JLE FAKEADVANC jump if newest boot already on MS 0000A67F 233 PUTBOOT LABEL 0A67F DC002ED0 234 CALL SGETMEM get a temp FBI 0A680 40440004 IMM 235 PARVL FBILOG pass log size 0A681 E4178808 0 6 BASE 236 ST R0 SP,FBITEMP save address for later 0A682 60441000 1 IMM 237 LD R1 CPP get the boot size 0A683 60840800 2 IMM 238 LD R2 ADR WNDO1 address where to put it 0A684 FAE8AA50 3 239 JSR R3 MOVETOUS copy users buffer in 240 * \ / 0A685 60978808 2 6 BASE 241 LD R2 SP,FBITEMP get address of temp FBI 0A686 6044002C 1 IMM 242 LD R1 FBILNTH*CPW get the FBI length 0A687 FAE8AA50 3 243 JSR R3 MOVETOUS copy in the FBI 244 * \ / 0A688 60578806 1 6 BASE 245 LD R1 SP,OTEM1 get PPL address 0A689 DC002606 246 CALL MAPINFBI map FBI, IOFF 0A68A 40524000 1 REG 247 PARVL R1 pass PPL address 0A68B 60178808 0 6 BASE 248 LD R0 SP,FBITEMP R0 => temp FBI 0A68C 60924000 2 1 REG 249 LD R2 R1 R1 => FBI in PPLWINDOW 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2325 (XRQOPRRCVR) F 143 OPREQs for recover 0A68D 6044002C 1 IMM 250 LD R1 FBILNTH*CPW R1 = length of FBI 0A68E DA880800 2 01 251 MOVE R2 R0 R1 copy temp into real FBI 0A68F DC40261B 252 CALLNP MAPOUTFBI unmap FBI, ION 0A690 60978808 2 6 BASE 253 LD R2 SP,FBITEMP get back temp storage 0A691 DC002F5D 254 CALL SFREEMEM give it back to the system 0A692 41440004 IMM 255 PARV FBILOG log of the block size 0A693 40528000 2 REG 256 PARVL R2 address of the block 0A694 EC178808 6 BASE 257 STZ SP,FBITEMP FBI temporary no longer exists 258 * \ / 0A695 DC40319D 259 CALLNP FORCEWRW1 force out the new boot block 0A696 FE0EA69B 260 JMP DOVOLABEL done here 261 * --- 262 0000A697 263 FAKEADVANC LABEL 0A697 DC403150 264 CALLNP GRUBWNDO1 not using this anymore 0A698 6004040B 0 IMM 265 LD R0 WPP+FBILNTH get length of part of record containing bootstrap 0A699 98178802 0 6 BASE 266 ADDM R0 SP,UBUFAD skip over it in address 0A69A B00981E1 0 6 ZBM 267 RSBM R0 SP,UBUFSIZE/BITS 0:29 and remove from char count 268 * \ / 269 270 ********************************************************************************** 271 * * 272 * Here we do a 'fake' map in of the volume label from * 273 * the victim pack (no-read, zeropage). We fix up a few * 274 * things, then read the new stuff in on top. * 275 * * 276 ********************************************************************************** 277 278 * \ / 0000A69B 279 DOVOLABEL LABEL 0A69B 60040001 0 IMM 280 LD R0 VOLLABELDA get the MS address for the volume label 0A69C E4095181 0 5 ZBM 281 ST R0 FCB,FCMSBLK set into FCB 0A69D DC003205 282 CALL SETWNDO1 get in the volume label 0A69E 4144001A IMM 283 PARV VPCNTLW+VPCNTLLK+VPCNTLNR no read zero-page, read-write 0A69F 41534000 5 REG 284 PARV FCB indicate what lun associated 0A6A0 4100A70A 285 PAR BDERR MS error address 0A6A1 41574801 5 BASE 286 PARV FCB,FCBLOCK pass the MS address 0A6A2 40440000 IMM 287 PARVL 0 no type checking 0A6A3 60040004 0 IMM 288 LD R0 FBITVL get the FBI type for volume label 0A6A4 E4088080 0 2 ZBM 289 ST R0 R2,FBITYPE set into new FBI 0A6A5 EDC88411 2 ZBM 290 STW R2,FBINOSUB indicate substitution not possible 0A6A6 EDC88211 2 ZBM 291 STW R2,FBIWCHK set write check bit 0A6A7 DC40261B 292 CALLNP MAPOUTFBI map out unneeded FBI, ION 0A6A8 604980F3 1 6 ZBM 293 LD R1 SP,HDRLENS/FSTBKUPLEN size of volume label info 0A6A9 60840800 2 IMM 294 LD R2 ADR WNDO1 get the beginning address 0A6AA FAE8AA50 3 295 JSR R3 MOVETOUS copy in the new volume label 0A6AB 60028000 0 IMM 296 LD R0 1*VLFLAGINV get the invalid volume flag 0A6AC FC00080B 0 297 IORM R0 WNDO1/VLFLAGS set into the new label 0A6AD DC40A016 298 CALLNP DISMTSUBS get rid of resident subs list 0A6AE 62000804 01 299 LD2 R0 WNDO1(VLVNAME) get the name of the volume 0A6AF E617080F 014 BASE 300 ST2 R0 VLN,VOLNRNAME put in place for real name 0A6B0 DC003096 301 CALL LOCKLIST lock a list 0A6B1 40001F22 302 PARL VOLNLOCK list to lock 0A6B2 DC009F48 303 CALL UNIQVOLNM make a unique volume name 0A6B3 42400804 304 PARV2L WNDO1(VLVNAME) name of volume 0A6B4 E6170811 014 BASE 305 ST2 R0 VLN,VOLNNAME and place unique name in place 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2326 (XRQOPRRCVR) F 143 OPREQs for recover 0A6B5 DC0030A4 306 CALL UNLOCKLIST unlock a list 0A6B6 40001F22 307 PARL VOLNLOCK list to unlock 308 309 * Get block for new subs list and hook it into new structures. 310 0A6B7 DC003654 311 CALL GETFREEBLK get a free block 0A6B8 4144000B IMM 312 PARV FBITSYS type to become 0A6B9 40494081 5 ZBM 313 PARVL FCB,FCDRIVE drive we are on 0A6BA E4174801 0 5 BASE 314 ST R0 FCB,FCBLOCK remember for later 0A6BB E4000810 0 315 ST R0 WNDO1(VLSUBSDA) put in volume label 0A6BC E4093181 0 4 ZBM 316 ST R0 VLN,VOLNSUBBLK and put into VOLN element 0A6BD 60491F15 1 4 ZBM 317 LD R1 VLN,VOLNHCB MDV element 0A6BE E4164818 0 1 BASE 318 ST R0 R1,MDVSUBSDA remember for later use 0A6BF DC0031FF 319 CALL SETWNDO2 map in subs block 0A6C0 4144001A IMM 320 PARV VPCNTLW+VPCNTLLK+VPCNTLNR no read zero-page, read-write 0A6C1 41534000 5 REG 321 PARV FCB lun associated 0A6C2 4100A70A 322 PAR BDERR 0A6C3 41574801 5 BASE 323 PARV FCB,FCBLOCK disk address 0A6C4 40440000 IMM 324 PARVL 0 no type checking 0A6C5 60040005 0 IMM 325 LD R0 FBITSUBS FBI type of subs 0A6C6 E4088080 0 2 ZBM 326 ST R0 R2,FBITYPE and put in FBI 0A6C7 EDC88411 2 ZBM 327 STW R2,FBINOSUB cannot substitute this 0A6C8 EDC88211 2 ZBM 328 STW R2,FBIWCHK important enough to write check 0A6C9 DC40261B 329 CALLNP MAPOUTFBI map out FBI, ION 0A6CA DC4031A0 330 CALLNP FORCEWRW2 force out the list 331 332 * Get a block for the new security block and hook into structures. 333 0A6CB DC003654 334 CALL GETFREEBLK get next block 0A6CC 4144000B IMM 335 PARV FBITSYS "swapping" so we get all 0A6CD 40494081 5 ZBM 336 PARVL FCB,FCDRIVE drive we are on 0A6CE E4174801 0 5 BASE 337 ST R0 FCB,FCBLOCK and make current address 0A6CF E4000812 0 338 ST R0 WNDO1(VLSECBDA) save in volume label 0A6D0 DC0031FF 339 CALL SETWNDO2 set up a new block in this window 0A6D1 4144001A IMM 340 PARV VPCNTLLK+VPCNTLW+VPCNTLNR a read-write zero page 0A6D2 41534000 5 REG 341 PARV FCB indicate associated with this lun 0A6D3 4100A70A 342 PAR BDERR where to go on MS error 0A6D4 41574801 5 BASE 343 PARV FCB,FCBLOCK just to indicate which volume 0A6D5 40440000 IMM 344 PARVL 0 indicate no type checking 0A6D6 60040006 0 IMM 345 LD R0 FBITSEC FBI type code for security block 0A6D7 E4088080 0 2 ZBM 346 ST R0 R2,FBITYPE and store into FBI 0A6D8 EDC88411 2 ZBM 347 STW R2,FBINOSUB cannot substitute this 0A6D9 EDC88211 2 ZBM 348 STW R2,FBIWCHK important enough to write check 0A6DA 60489181 1 2 ZBM 349 LD R1 R2,FBIDA get the block address 0A6DB DC40261B 350 CALLNP MAPOUTFBI map out unneeded FBI, ION 0A6DC E4400812 1 351 ST R1 WNDO1(VLSECBDA) save in volume label 0A6DD E4492182 1 4 ZBM 352 ST R1 VLN,VOLNSECBK1 save address in volume name list 353 354 * Get a secondary security block and hook into structures. 355 0A6DE DC003654 356 CALL GETFREEBLK get another free block 0A6DF 4144000B IMM 357 PARV FBITSYS indicate type it will become 0A6E0 40494081 5 ZBM 358 PARVL FCB,FCDRIVE and the volume it should be on 0A6E1 7800254F 0 359 AND R0 MSBLKMASK mask to have just block address 0A6E2 E4091183 0 4 ZBM 360 ST R0 VLN,VOLNSECBK2 save secondary sec block address 0A6E3 E4000813 0 361 ST R0 WNDO1/VLSECB2DA and in the MS volume label 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2327 (XRQOPRRCVR) F 143 OPREQs for recover 362 363 ********************************************************************************** 364 * * 365 * Initialize the security blocks and write them out. * 366 * * 367 * N.B. We take special steps to ensure that the volume is always * 368 * remountable (see comments at SECMNTDAT definition and REMOUNT). * 369 * * 370 * N.B. #2 The volume label (w/the "invalid" flag set) is not * 371 * written until three other blocks are (subs, and the two security * 372 * blocks). This is a crashproofing no-no. See comments in DiskDefs. * 373 * * 374 ********************************************************************************** 375 0A6E4 60499F13 1 6 ZBM 376 LD R1 SP,HDRLENS/SNDBKUPLEN size of security block info 0A6E5 60840E26 2 IMM 377 LD R2 ADR WNDO2(SECTZONE) destination address 0A6E6 FAE8AA50 3 378 JSR R3 MOVETOUS copy the configuration information 0A6E7 DC404555 379 CALLNP GETFSEQN get the current date time 0A6E8 E6000E29 01 380 ST2 R0 WNDO2/SECLASTDT initialize the last known time 0A6E9 E6000C02 01 381 ST2 R0 WNDO2/SECMNTDAT initialize the mount date 0A6EA 60001EEF 0 382 LD R0 TIMEZONE get the timezone information 0A6EB E4000E26 0 383 ST R0 WNDO2/SECTZONE and save in new sec block 0A6EC 60091F15 0 4 ZBM 384 LD R0 VLN,VOLNHCB get MDV address 0A6ED 62160810 010 BASE 385 LD2 R0 R0,MDVFMTDAT known value 0A6EE E6170813 014 BASE 386 ST2 R0 VLN,VOLNMNTDAT place in volume element 0A6EF 60C40083 3 IMM 387 LD R3 PNWNDO2 get the page number 0A6F0 DC0031A6 388 CALL DUALWRITE write out two copies of the security block 0A6F1 40491183 4 ZBM 389 PARVL VLN,VOLNSECBK2 indicate secondary address 0A6F2 62000C02 01 390 LD2 R0 WNDO2/SECMNTDAT pass mount date 0A6F3 E6170813 014 BASE 391 ST2 R0 VLN,VOLNMNTDAT place in the VOLN 0A6F4 DC403153 392 CALLNP GRUBWNDO2 now free up the window 393 394 * Force volume label out, and build an empty IDXT for this volume. 395 0A6F5 DC40319D 396 CALLNP FORCEWRW1 force out the volume label 0A6F6 DC403150 397 CALLNP GRUBWNDO1 and release the window 0A6F7 DC002ED0 398 CALL SGETMEM get space for an IDXT 0A6F8 40440003 IMM 399 PARVL ((IDXTPWR2+1) LOG 2) 0A6F9 E4091F19 0 4 ZBM 400 ST R0 VLN,VOLNIDXPTR and make the VOLN point to it 0A6FA DC003090 401 CALL ZEROIT zero out the table 0A6FB 41160800 0 BASE 402 PAR R0,0 starting address 0A6FC 40440005 IMM 403 PARVL IDXTPWR2+1 length to zero 0A6FD 60091F19 0 4 ZBM 404 LD R0 VLN,VOLNIDXPTR get address of IDXT 0A6FE 60490086 1 4 ZBM 405 LD R1 VLN,VOLNNUM volume number 0A6FF E4480080 1 0 ZBM 406 ST R1 R0,IDXTVOL and put in IDXT 0A700 60440008 1 IMM 407 LD R1 FBITIDX type of table 0A701 E4560004 1 0 CACH 408 ST R1 R0,IDXTFBIT and put in table 0A702 EDD60005 0 CACH 409 STW R0,IDXTBNUM say only one bucket 0A703 FE0E5982 410 JMP FNOERROR return indicating successful conclusion 411 * --- 412 413 ********************************************************************************** 414 * * 415 * Various error routines, including recovery from bad * 416 * volume label, disk structure errors and memory protect * 417 * problems. * 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2328 (XRQOPRRCVR) F 143 OPREQs for recover 418 * * 419 ********************************************************************************** 420 0000A704 421 BTRXBAD LABEL error on bad trax list 0A704 61D20000 7 0 REG 422 LD R7 R0 save error code 0A705 DC403150 423 CALLNP GRUBWNDO1 free up this window 0A706 FE0E5997 424 JMP FERROR7 return error to caller 425 * --- 426 0000A707 427 OLDBOOTBAD LABEL couldn't read the bootstrap from the victim pack 0A707 E4D78806 3 6 BASE 428 ST R3 SP,OTEM1 save the FBI address 0A708 DC40261B 429 CALLNP MAPOUTFBI unmap FBI window, ION 0A709 FE0EA67F 430 JMP PUTBOOT unconditionally put out new boot 431 * --- 432 0000A70A 433 BDERR LABEL error on a block being no-read zeroed - bad start! 0A70A 61D20000 7 0 REG 434 LD R7 R0 copy error code 0A70B DC40261B 435 CALLNP MAPOUTFBI unmap FBI, ION 0A70C DC403150 436 CALLNP GRUBWNDO1 get rid of this left over 0A70D DC403153 437 CALLNP GRUBWNDO2 get rid of this junk 0A70E FE0E5997 438 JMP FERROR7 return error to caller 439 * --- 440 0000A70F 441 RCVRMEMBAD LABEL 0A70F E6178806 016 BASE 442 ST2 R0 SP,ERRCODES save error codes 0A710 DC403153 443 CALLNP GRUBWNDO2 remove association with this window 0A711 DC403150 444 CALLNP GRUBWNDO1 same with this window 0A712 60978808 2 6 BASE 445 LD R2 SP,FBITEMP get temporary FBI, if any 0A713 FAB0A717 2 446 JZA R2 NOTMPFBI jump if temporary FBI already free 0A714 DC002F5D 447 CALL SFREEMEM return temporary storage 0A715 41440004 IMM 448 PARV FBILOG block size 0A716 40528000 2 REG 449 PARVL R2 block address 450 * \ / 0000A717 451 NOTMPFBI LABEL 0A717 62178806 016 BASE 452 LD2 R0 SP,ERRCODES restore error codes 0A718 FE0E5B5F 453 JMP PASSERRUP pass errors to overprocess 454 * --- 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2329 (XRQOPRRCVR) F 143 OPREQs for recover 456 457 ********************************************************************************** 458 * * 459 * This routine is called when a volume has been * 460 * completely recovered onto. This routine will then write * 461 * free space on all blocks that haven't been used yet. It * 462 * will finally mark the volume as valid. * 463 * Call: * 464 * LD R0 ORINITEND * 465 * OPREQ <lun> (a .VOL) * 466 * JLTZ R0 error * 467 * * 468 ********************************************************************************** 469 0000A719 470 OPRQINITND LABEL 0A719 60096665 0 5 ZBM 471 LD R0 FCB,FCHTYPE get file type 0A71A 6404000E 0 IMM 472 CPR R0 HTYPEVOL ensure we have a .VOL 0A71B FE0C59A5 473 JNE FERRORILOP operation not legal if not 0A71C 61095F16 4 5 ZBM 474 LD VLN FCB,FCDCBPTR pointer to device control block 475 * \ / 0A71D 60040001 0 IMM 476 LD R0 VOLLABELDA ms address of volume label 0A71E E4095181 0 5 ZBM 477 ST R0 FCB,FCMSBLK current block is volume label 0A71F DC003205 478 CALL SETWNDO1 map in the volume label 0A720 41440001 IMM 479 PARV VPCNTLRO read only 0A721 41534000 5 REG 480 PARV FCB indicate which lun associated 0A722 4100A755 481 PAR INITVLBADQ where to go on error 0A723 41574801 5 BASE 482 PARV FCB,FCBLOCK disk address 0A724 40440004 IMM 483 PARVL FBITVL volume label expected 484 0A725 6000080B 0 485 LD R0 WNDO1(VLFLAGS) get volume label flags 0A726 F202A758 0 486 JBF R0/VLFLAGINV GINITNDILOP can't do a valid volume 487 * \ / 0000A727 488 FREELOOP LABEL 0A727 5C170819 4 BASE 489 CMZ VLN,VOLNBCNTR check for still using special free list 0A728 FE02A747 490 JEQ ALLFREE jump when it's been used up 0A729 DC003654 491 CALL GETFREEBLK get next sequential block number 0A72A 4144000B IMM 492 PARV FBITSYS "swapping" so we get all 0A72B 40494081 5 ZBM 493 PARVL FCB,FCDRIVE indicate volume 494 * We had to have gotten a block 495 * \ / 0A72C E4095181 0 5 ZBM 496 ST R0 FCB,FCMSBLK make it current address 0A72D DC0031FF 497 CALL SETWNDO2 map in the block 0A72E 4144001A IMM 498 PARV VPCNTLW+VPCNTLLK+VPCNTLNR pass VPCNTL field 0A72F 41534000 5 REG 499 PARV FCB lun associated 0A730 4100A745 500 PAR INITNDFBAD where to go on error 0A731 41574801 5 BASE 501 PARV FCB,FCBLOCK pass the volume number 0A732 40440000 IMM 502 PARVL 0 don't check FBI type 503 0A733 60128000 0 2 REG 504 LD R0 R2 save addr of FBI 0A734 38968802 2 2 BASE 505 LEA R2 R2,2 R2 => word 2 0A735 60440024 1 IMM 506 LD R1 (FBILNTH-2)*CPW to clear FBI, except first two words 0A736 FE580000 507 CFILL 000 which must be treated specially 0A737 6042FE00 1 IMM 508 LD R1 FBITFREE*BITS 0:7 value for FBI word 0 0A738 6088D181 2 3 ZBM 509 LD R2 R3,PPBLOCK/MSBLKFIELD value for FBI word 1 0A739 E6560800 120 BASE 510 ST2 R1 R0,0 set first two words of FBI 0A73A DC40261B 511 CALLNP MAPOUTFBI unmap FBI, ION 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2330 (XRQOPRRCVR) F 143 OPREQs for recover 512 0A73B 60441000 1 IMM 513 LD R1 CPP number of chars in a page 0A73C 60840C00 2 IMM 514 LD R2 ADR WNDO2 address of page 0A73D FE5800FF 515 CFILL 0FF fill it with ones 516 517 SETTBIT R3,PPPUTADT cause the block number to... 0A73E 60024000 0 IMM 517 LD R0 1*BIT(((R3,PPPUTADT) DISP (R3,0))/BITS 0:4) 0A73F FC16C802 0 3 BASE 517 IORM R0 R3,(((R3,PPPUTADT) DISP (R3,0))/BITS 15:31) 518 * ...be put in ADT after writing 0A740 6008C081 0 3 ZBM 519 LD R0 R3,PPBLOCK/VOLFIELD volume number for this element 0A741 60201F22 0 0 520 LD R0 VOLNTABLE(R0) get access to the VOLN element 0A742 D0160815 0 BASE 521 INC R0,VOLNBUSY busy volume for ADT to be created later 0000A743 522 FREELOOPBT LABEL 0A743 DC403153 523 CALLNP GRUBWNDO2 unmap the block 0A744 FE0EA727 524 JMP FREELOOP free next one 525 * --- 526 0000A745 527 INITNDFBAD LABEL block being freed was bad 0A745 DC40261B 528 CALLNP MAPOUTFBI unmap FBI, ION 0A746 FE0EA743 529 JMP FREELOOPBT move on 530 * --- 531 532 * All unused blocks are free, now mark the volume as valid!!! 0000A747 533 ALLFREE LABEL 0A747 60040001 0 IMM 534 LD R0 VOLLABELDA ms address of volume label 0A748 E4095181 0 5 ZBM 535 ST R0 FCB,FCMSBLK put in block number 0A749 DC003205 536 CALL SETWNDO1 remap volume label 0A74A 41440002 IMM 537 PARV VPCNTLW+VPCNTLLK read-write and locked 0A74B 41534000 5 REG 538 PARV FCB indicate which lun associated 0A74C 4100A754 539 PAR INITVLBAD where to go on ms error 0A74D 41574801 5 BASE 540 PARV FCB,FCBLOCK disk address 0A74E 40440004 IMM 541 PARVL FBITVL volume label expected 0A74F DC40261B 542 CALLNP MAPOUTFBI unmap unneeded FBI, ION 543 0A750 3800080B 0 544 LEA R0 WNDO1(VLFLAGS) pointer to flags 0A751 EC080210 0 ZBM 545 STZ R0,0/VLFLAGINV mark volume label as valid 0A752 DC403150 546 CALLNP GRUBWNDO1 and release the window 0A753 FE0E59D6 547 JMP NOERROR return with no error 548 * --- 549 0000A754 550 INITVLBAD LABEL volume label was bad 0A754 DC40261B 551 CALLNP MAPOUTFBI unmap FBI, ION 0000A755 552 INITVLBADQ LABEL 0A755 61D20000 7 0 REG 553 LD R7 R0 save away error code 0A756 DC403150 554 CALLNP GRUBWNDO1 release this window 0A757 FE0E5997 555 JMP FERROR7 return error to caller 556 * --- 557 0000A758 558 GINITNDILOP LABEL 0A758 DC403150 559 CALLNP GRUBWNDO1 release the volume label 0A759 FE0E59A5 560 JMP FERRORILOP give illegal operation error 561 * --- 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2331 (XRQOPRRCVR) F 143 OPREQs for recover 563 564 ********************************************************************************** 565 * * 566 * This routine will recover an account on a volume. The * 567 * account must already exist and have no saved files in it. * 568 * Call: * 569 * LD R0 ORRCVRACT * 570 * LD R1 <buffer size> * 571 * LD R2 <buffer ptr> * 572 * OPREQ <LUN> (a .DIR) * 573 * JLTZ R0 error * 574 * * 575 ********************************************************************************** 576 0000A75A 577 OPRQRCVRAC LABEL 0A75A 61095114 4 5 ZBM 578 LD ULB FCB,FCLIMITPTR account of file owner (DIR) 0A75B FB3059A5 4 579 JZA ULB FERRORILOP jump if not real 0A75C DC40AAF4 580 CALLNP SETUPDIR call to setup directory 0A75D FE0E5983 581 JMP FERROR error return, R0 <= error code 582 * R4 <= PPL address, WNDO1 locked, DIR locked 583 * \ / 0A75E DC40AABF 584 CALLNP RCVRUDIR recover the directory 0A75F FE0EA788 585 JMP RCVRACERR jump if error, R0 <= error code 586 * \ / 0A760 61095114 4 5 ZBM 587 LD ULB FCB,FCLIMITPTR pointer to his ULB 588 PLOCK ULLIMLOCK hold critical region lock 0A761 0CC00000 588 IOFF 0A762 D1C01EAF 588 SETT ULLIMLOCK 0A763 FE0CA765 588 JNE MA(2+DISPW MA 0) 0A764 DC40308B 588 CALLNP LOCKWAIT 0A765 6004082B 0 IMM 589 LD R0 ADR WNDO1(UDLIMITS) source of move 0A766 EDC81188 0 ZBM 590 STW R0,DSKUSD account for directory block itself 0A767 60440024 1 IMM 591 LD R1 CPW*LIMITSIZE size of move 0A768 38970806 2 4 BASE 592 LEA R2 ULB,ULLIMITS destination 0A769 DA880800 2 01 593 MOVE R2 R0 R1 perform the update 594 PUNLOCK ULLIMLOCK release lock 0A76A EC001EAF 594 STZ ULLIMLOCK 0A76B 0C800000 594 ION 595 * \ / 596 597 ********************************************************************************** 598 * * 599 * If this account had a share list on it, recover it * 600 * * 601 ********************************************************************************** 602 603 * \ / 0A76C DC005BCF 604 CALL SETMEMTRAP catch memory errors 0A76D 4000A78E 605 PARL RCVACMBAD recovery address 0A76E 5C0980F3 6 ZBM 606 CMZ SP,HDRLENS/FSTBKUPLEN is there a large SL? 0A76F FE02A779 607 JEQ NOACCTSHARE jump if not 0A770 DC00AB1A 608 CALL ALLOCPAGE get a page for us 0A771 40440011 IMM 609 PARVL FBITASLB type of page 0A772 FE0EA788 610 JMP RCVRACERR jump if ran out of space 611 * \ / 0A773 604980F3 1 6 ZBM 612 LD R1 SP,HDRLENS/FSTBKUPLEN length of move 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2332 (XRQOPRRCVR) F 143 OPREQs for recover 0A774 60840C00 2 IMM 613 LD R2 ADR WNDO2 place to move 0A775 FAE8AA50 3 614 JSR R3 MOVETOUS do the move 0A776 DC403153 615 CALLNP GRUBWNDO2 write out the SLB 0A777 7D030000 4 IMM 616 IOR R4 1*SHLDSKFLGB say it's a ms address 0A778 E500083C 4 617 ST R4 WNDO1(UDSHLLIST) and place DA in DIR 618 * \ / 619 620 ********************************************************************************** 621 * * 622 * If this account had an auth list, recover it * 623 * * 624 ********************************************************************************** 625 626 * \ / 0000A779 627 NOACCTSHARE LABEL 0A779 5C099F13 6 ZBM 628 CMZ SP,HDRLENS/SNDBKUPLEN length of second record 0A77A FE02A783 629 JEQ NOAUTHLIST jump if no authlist 0A77B DC00AB1A 630 CALL ALLOCPAGE get a page for us 0A77C 40440015 IMM 631 PARVL FBITAUTLB type of page 0A77D FE0EA788 632 JMP RCVRACERR jump if ran out of space 633 * \ / 0A77E 60499F13 1 6 ZBM 634 LD R1 SP,HDRLENS/SNDBKUPLEN length of authlist 0A77F 60840C00 2 IMM 635 LD R2 ADR WNDO2 place to move to 0A780 FAE8AA50 3 636 JSR R3 MOVETOUS move authlist 0A781 DC403153 637 CALLNP GRUBWNDO2 write out authlist 0A782 E5000840 4 638 ST R4 WNDO1(UDAUTHLIST) and put in directory 639 * \ / 640 0000A783 641 NOAUTHLIST LABEL 0A783 DC40315C 642 CALLNP DMOTEWNDO1 put directory in WSX 0A784 61095114 4 5 ZBM 643 LD ULB FCB,FCLIMITPTR ULB for directory 0A785 DC405685 644 CALLNP FREEDIR release access to directory 0A786 FE0E5982 645 JMP FNOERROR all done with no errors 646 * --- 647 0000A787 648 RCVACDSE LABEL 0A787 DC40261B 649 CALLNP MAPOUTFBI unmap FBI window, ION 650 * \ / 651 0000A788 652 RCVRACERR LABEL 0A788 61D20000 7 0 REG 653 LD R7 R0 save away error code 0A789 DC403150 654 CALLNP GRUBWNDO1 and unmap the window 0A78A DC403153 655 CALLNP GRUBWNDO2 do the whole nine yards 0A78B 61095114 4 5 ZBM 656 LD ULB FCB,FCLIMITPTR ULB for directory 0A78C DC405685 657 CALLNP FREEDIR release access to directory 0A78D FE0E5997 658 JMP FERROR7 go give error 659 * --- 660 0000A78E 661 RCVACMBAD LABEL 0A78E E6178806 016 BASE 662 ST2 R0 SP,ERRCODES save error codes 0A78F DC403150 663 CALLNP GRUBWNDO1 unmap window 1 0A790 DC403153 664 CALLNP GRUBWNDO2 and unmap window 2 0A791 61095114 4 5 ZBM 665 LD ULB FCB,FCLIMITPTR ULB for directory 0A792 DC405685 666 CALLNP FREEDIR release access to directory 0A793 62178806 016 BASE 667 LD2 R0 SP,ERRCODES restore error codes 0A794 FE0E5B5F 668 JMP PASSERRUP pass error to over process 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2333 (XRQOPRRCVR) F 143 OPREQs for recover 669 * --- 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2334 (XRQOPRRCVR) F 143 OPREQs for recover 671 672 ********************************************************************************** 673 * * 674 * This request will recover an account onto a volume. * 675 * It has some similarities with the other recover account but * 676 * it also has some major differences. First a manager with * 677 * proper authorization must exist, note that his authlist * 678 * must have the resources granted to recover the account. * 679 * Additional complexities occur when trying to recover the * 680 * authlist, please see the code for details. * 681 * Call: * 682 * * 683 * LD R0 ORRCVRACTL * 684 * LD R1 <buffer size> * 685 * LD R2 <buffer address> * 686 * OPREQ <unit, a DIR> * 687 * JLTZ R0 error * 688 * * 689 ********************************************************************************** 690 0000A795 691 OPRQRCVACL LABEL 0A795 61095114 4 5 ZBM 692 LD ULB FCB,FCLIMITPTR get ULB of file owner (DIR) 0A796 FB3059A5 4 693 JZA ULB FERRORILOP jump if not a real DIR 0A797 60000412 0 694 LD R0 CPPSA pointer to current process status 695 * We use the logon ULB, since backup must run with owndir 0A798 DC005B84 696 CALL LEVELBIT check if proper manager 0A799 41481F13 0 ZBM 697 PARV R0,PSUSERLIMP requester ULB 0A79A 40530000 4 REG 698 PARVL ULB ULB of victim 0A79B FA0259C8 0 699 JEQZ R0 FERRORPNS error if requester is NOT manager 0A79C E4178805 0 6 BASE 700 ST R0 SP,OTEMPTR save manager power bits 701 * \ / 0A79D DC40AAF4 702 CALLNP SETUPDIR setup directory 0A79E FE0E5983 703 JMP FERROR error return, R0 = error code 704 * R4 <= PPL address, DIR locked, WNDO1 locked 705 * \ / 0A79F DC40AABF 706 CALLNP RCVRUDIR recover the directory 0A7A0 FE0EA788 707 JMP RCVRACERR jump if error, R0 <= error code 708 * \ / 709 710 ********************************************************************************** 711 * * 712 * Here we must give the account some limits so that we * 713 * may recover files, share list, authlists properly. The way * 714 * we accomplish this is by setting the limits to zero, then * 715 * calling certain xreqs to perform the sets. This way the * 716 * correct manager is charged with the disk space and CPU time * 717 * given away. * 718 * * 719 ********************************************************************************** 720 721 * \ / 0A7A1 3840082B 1 722 LEA R1 WNDO1(UDLIMITS) pointer to directory limits 0A7A2 60164802 0 1 BASE 723 LD R0 R1,TIMLIM get the CPU time limit 0A7A3 E4178806 0 6 BASE 724 ST R0 SP,TMPTIMLIM save for later use 0A7A4 EC164802 1 BASE 725 STZ R1,TIMLIM indicate no time at all 0A7A5 60084186 0 1 ZBM 726 LD R0 R1,DSKSAVL get save space limit 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2335 (XRQOPRRCVR) F 143 OPREQs for recover 0A7A6 E4178807 0 6 BASE 727 ST R0 SP,TMPDSKS and save this for later 0A7A7 EC084186 1 ZBM 728 STZ R1,DSKSAVL set limit to zero 0A7A8 60086187 0 1 ZBM 729 LD R0 R1,DSKLIM get overall disk limit 0A7A9 E4178808 0 6 BASE 730 ST R0 SP,TMPDSKL also save this for later 0A7AA EC086187 1 ZBM 731 STZ R1,DSKLIM set this limit to zero 0A7AB EDC85188 1 ZBM 732 STW R1,DSKUSD set initial account space used 733 * \ / 734 * Update resident copy, the ULB 0A7AC 61095114 4 5 ZBM 735 LD ULB FCB,FCLIMITPTR restore ULB pointer 736 PLOCK ULLIMLOCK critical region for ULB limit updating 0A7AD 0CC00000 736 IOFF 0A7AE D1C01EAF 736 SETT ULLIMLOCK 0A7AF FE0CA7B1 736 JNE MA(2+DISPW MA 0) 0A7B0 DC40308B 736 CALLNP LOCKWAIT 0A7B1 60040024 0 IMM 737 LD R0 CPW*LIMITSIZE character length of move 0A7B2 38970806 2 4 BASE 738 LEA R2 ULB,ULLIMITS destination address 0A7B3 DA884000 2 10 739 MOVE R2 R1 R0 do the update 740 PUNLOCK ULLIMLOCK release hold of lock 0A7B4 EC001EAF 740 STZ ULLIMLOCK 0A7B5 0C800000 740 ION 0A7B6 DC405685 741 CALLNP FREEDIR allow other access to directory 0A7B7 DC40315C 742 CALLNP DMOTEWNDO1 directory will be needed later 743 * \ / 744 * Set the account limits, updating the proper managers 745 * authlist 0A7B8 81528000 2 REG 746 STCAR R2 point R0 at the current console area 0A7B9 600401E0 0 IMM 747 LD R0 FRASCPUL request to set CPU limit 0A7BA 60578806 1 6 BASE 748 LD R1 SP,TMPTIMLIM value to set it to 0A7BB 0896880E 2 BASE 749 FREQ R2,CAXOPERAND unit number of DIR 0A7BC FA085983 0 750 JLTZ R0 FERROR jump if error occurred 751 * \ / 0A7BD 600401E7 0 IMM 752 LD R0 FRASSAVL request to set saved disk limit 0A7BE 60578807 1 6 BASE 753 LD R1 SP,TMPDSKS value to set 0A7BF 0896880E 2 BASE 754 FREQ R2,CAXOPERAND unit number of .DIR 0A7C0 FA085983 0 755 JLTZ R0 FERROR jump if error occurred 756 * \ / 0A7C1 600401E4 0 IMM 757 LD R0 FRASDSKL request to set disk limit 0A7C2 60578808 1 6 BASE 758 LD R1 SP,TMPDSKL value to set 0A7C3 0896880E 2 BASE 759 FREQ R2,CAXOPERAND unit number of .DIR 0A7C4 FA085983 0 760 JLTZ R0 FERROR jump if error occurred 761 * \ / 0A7C5 DC405667 762 CALLNP FETCHDIR gain exclusive access to directory 0A7C6 DC003205 763 CALL SETWNDO1 read in directory block 0A7C7 41440002 IMM 764 PARV VPCNTLW+VPCNTLLK writable and locked 0A7C8 41534000 5 REG 765 PARV FCB associated file 0A7C9 4100A787 766 PAR RCVACDSE disk error recovery address 0A7CA 41570801 4 BASE 767 PARV ULB,ULBLOCK disk address 0A7CB 40440009 IMM 768 PARVL FBITUDIR1 type of block to expect 0A7CC DC40261B 769 CALLNP MAPOUTFBI unmap FBI, ION 770 * \ / 771 772 ********************************************************************************** 773 * * 774 * Recover the account share list. Since there are no * 775 * limits associated with share entries the entire block is * 776 * just copied. Note that we may exceed our our limits by * 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2336 (XRQOPRRCVR) F 143 OPREQs for recover 777 * getting a block for the share list, but this is very * 778 * doubtful. * 779 * * 780 ********************************************************************************** 781 782 * \ / 0A7CD DC005BCF 783 CALL SETMEMTRAP catch memory errors 0A7CE 4000A78E 784 PARL RCVACMBAD recovery address 0A7CF 5C0980F3 6 ZBM 785 CMZ SP,HDRLENS/FSTBKUPLEN is there a large SL? 0A7D0 FE02A7DA 786 JEQ NOSHARLIST jump if not 0A7D1 DC00AB1A 787 CALL ALLOCPAGE get a page for us 0A7D2 40440011 IMM 788 PARVL FBITASLB type of page 0A7D3 FE0EA788 789 JMP RCVRACERR jump if ran out of space 790 * \ / 0A7D4 604980F3 1 6 ZBM 791 LD R1 SP,HDRLENS/FSTBKUPLEN length of move 0A7D5 60840C00 2 IMM 792 LD R2 ADR WNDO2 place to move 0A7D6 FAE8AA50 3 793 JSR R3 MOVETOUS do the move 0A7D7 DC403153 794 CALLNP GRUBWNDO2 write out the SLB 0A7D8 7D030000 4 IMM 795 IOR R4 1*SHLDSKFLGB say it's a ms address 0A7D9 E500083C 4 796 ST R4 WNDO1(UDSHLLIST) and place DA in DIR 797 * \ / 798 799 ********************************************************************************** 800 * * 801 * Recover the authorization list. This is definitely * 802 * not an easy matter. First we get a free block on the disk, * 803 * initialize it to be an empty authlist block. Since the * 804 * directory is locked in memory we don't worry about writing it * 805 * out. Disk integrity should be preserved we guarantee either * 806 * the old structure or the new one but never an intermediate * 807 * structure. If an insufficient authorization error occurs * 808 * the rest of the authlist block is zeroed. If the system * 809 * crashes the account will not have an authlist. * 810 * * 811 ********************************************************************************** 812 813 * \ / 0000A7DA 814 NOSHARLIST LABEL 0A7DA EC13C000 7 REG 815 STZ R7 assume no errors to start with 0A7DB 5C099F13 6 ZBM 816 CMZ SP,HDRLENS/SNDBKUPLEN length of second record 0A7DC FE02A783 817 JEQ NOAUTHLIST jump if no authlist 0A7DD DC00AB1A 818 CALL ALLOCPAGE get a page for authlist 0A7DE 40440015 IMM 819 PARVL FBITAUTLB type block is to become 0A7DF FE0EA788 820 JMP RCVRACERR jump if not more disk space 821 * \ / 0A7E0 60499F13 1 6 ZBM 822 LD R1 SP,HDRLENS/SNDBKUPLEN length of new authlist block 0A7E1 60840C00 2 IMM 823 LD R2 ADR WNDO2 destination address 0A7E2 FAE8AA50 3 824 JSR R3 MOVETOUS copy entire authlist 0A7E3 DC4031A0 825 CALLNP FORCEWRW2 write out the authlist/leave WNDO2 mapped 0A7E4 E5000840 4 826 ST R4 WNDO1(UDAUTHLIST) set authlist address in directory 827 * \ / 0A7E5 60178805 0 6 BASE 828 LD R0 SP,OTEMPTR restore manager power bits 0A7E6 61095114 4 5 ZBM 829 LD ULB FCB,FCLIMITPTR restore ULB address 0A7E7 DC005D0A 830 CALL PRESETAUTH get managers authlist 0A7E8 41520000 0 REG 831 PARV R0 pass callers authority 0A7E9 42440000 IMM 832 PARV2L 0 no specific volume name 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2337 (XRQOPRRCVR) F 143 OPREQs for recover 0A7EA FE0EA808 833 JMP AUTHRCVDSE jump if disk error 0A7EB FE0EA80A 834 JMP AUTHRCVIAU authlist disappeared on us 0A7EC FE0EA7FC 835 JMP SUPERMGR no authlist needed here 836 * \ / 837 * WNDO1 <= manager authlist, WNDO2 <= victim authlist 0A7ED 60C40C00 3 IMM 838 LD R3 ADR WNDO2 set scan address 0A7EE DC40A9D8 839 CALLNP ADJMGRCPU update managers authlist 0A7EF FA08A802 0 840 JLTZ R0 SPACEOUT jump if insufficient authorization 0A7F0 38D6C804 3 3 BASE 841 LEA R3 R3,AUTHENTBG now point to disk limits 842 * \ / 0000A7F1 843 DSKAUTHLP LABEL 0A7F1 5E16C800 3 BASE 844 CMZ2 R3,AUTHVNAME any entries left to examine 0A7F2 FE02A7FA 845 JEQ FOUNDEND put a wrap on this show 0A7F3 DC40A9DC 846 CALLNP ADJMGRDSKL update managers authlist 0A7F4 FA08A802 0 847 JLTZ R0 SPACEOUT jump if insufficient authorization 0A7F5 DC40A9DF 848 CALLNP ADJMGRSDSK update managers authlist totals 0A7F6 FA08A801 0 849 JLTZ R0 SPACEOUTX jump if update not allowed 0A7F7 18C4000C 3 IMM 850 ADD R3 AUTHLELEN advance to the next entry 0A7F8 64C40FF4 3 IMM 851 CPR R3 ADR (WNDO2(WPP-AUTHLELEN)) check if at end of window 0A7F9 FE0AA7F1 852 JLE DSKAUTHLP round again if not 853 * \ / 0000A7FA 854 FOUNDEND LABEL 0A7FA DC405685 855 CALLNP FREEDIR release hold of managers directory 0A7FB DC405526 856 CALLNP FREEULB matches call to FINDULB (PRESETAUTH) 857 * \ / 0000A7FC 858 SUPERMGR LABEL 0A7FC DC403153 859 CALLNP GRUBWNDO2 grub recovered account authlist 0A7FD DC403150 860 CALLNP GRUBWNDO1 grub managers authlist 0A7FE 61095114 4 5 ZBM 861 LD ULB FCB,FCLIMITPTR ULB of victim account 0A7FF DC405685 862 CALLNP FREEDIR free this directory 0A800 FE0E5997 863 JMP FERROR7 return to caller 864 * --- 865 0000A801 866 SPACEOUTX LABEL 0A801 18C40005 3 IMM 867 ADD R3 (AUTHDSKA DISPW AUTHVNAME) keep only the disk limits 868 * \ / 0000A802 869 SPACEOUT LABEL 0A802 60441000 1 IMM 870 LD R1 ADR WNDO2(WPP) last word address of window 0A803 1052C000 1 3 REG 871 SUB R1 R3 calculate word count to end of block 0A804 1C440004 1 IMM 872 MUL R1 CPW convert to characters 0A805 DAC00800 3 1 873 FILLI R3 R1 000 zap the rest of the authlist 0A806 61C400A7 7 IMM 874 LD R7 XREQERIAUT insufficient authorization error 0A807 FE0EA7FA 875 JMP FOUNDEND merge with rest of the code 876 * --- 877 0000A808 878 AUTHRCVDSE LABEL 0A808 61C4009F 7 IMM 879 LD R7 XREQERDSE disk structure error 0A809 FE0EA80B 880 JMP AUTHRCVERR share clean up code 881 * --- 882 0000A80A 883 AUTHRCVIAU LABEL 0A80A 61C400A7 7 IMM 884 LD R7 XREQERIAUT no authlist to be found 885 * \ / 0000A80B 886 AUTHRCVERR LABEL 0A80B 60C40C00 3 IMM 887 LD R3 ADR WNDO2 generate address of authlist 0A80C 60441000 1 IMM 888 LD R1 WPP*CPW number of characters per page 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2338 (XRQOPRRCVR) F 143 OPREQs for recover 0A80D DAC00800 3 1 889 FILLI R3 R1 000 zap the entire block 0A80E FE0EA7FC 890 JMP SUPERMGR go finish up 891 * --- 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2339 (XRQOPRRCVR) F 143 OPREQs for recover 893 894 ********************************************************************************** 895 * * 896 * This XREQ will recover a file that has been opened, is * 897 * saved and is empty. We copy over the current directory * 898 * entry, set a few fields, and presto, the file now exists. * 899 * Note the special check on hardware devices. We can't have * 900 * duplicate serial numbers, nor can we give it an arbitary * 901 * one, hardware serial numbers have particular importance. * 902 * * 903 * LD R0 ORRCVRFIL * 904 * LD R1 <buffer size> * 905 * LD R2 <buffer ptr> * 906 * OPREQ <lun> * 907 * JLTZ R0 error * 908 * * 909 ********************************************************************************** 910 0000A80F 911 OPRQRCVRFL LABEL 0A80F 60096665 0 5 ZBM 912 LD R0 FCB,FCHTYPE get unit type 0A810 64040006 0 IMM 913 CPR R0 HTYPENULL is unit generic? 0A811 FE0C59A5 914 JNE FERRORILOP jump if not, can't work with it 0A812 FAE8AA3D 3 915 JSR R3 GETHEADER get the information header 0A813 64040002 0 IMM 916 CPR R0 FILEINFOTF is it file information? 0A814 FE0C59A5 917 JNE FERRORILOP error if not file info. 918 * \ / 0A815 FAE8AA15 3 919 JSR R3 CHECKBUFF check for enough buffer 0A816 FE0E59B0 920 JMP FERRORPOB jump if not enough 921 * \ / 0A817 DC0082BB 922 CALL SRCHDIRSN look for the file in the directory 0A818 40005983 923 PARL FERROR give disk structure error 0A819 FE0CA86B 924 JNE WESAYLNS lun not saved 0A81A E4D78805 3 6 BASE 925 ST R3 SP,OTEMPTR remember the entry pointer 926 * \ / 927 928 ********************************************************************************** 929 * * 930 * Srchdirsn has left the FDE in window 1. If the directory * 931 * was two level, window 2 contains the UDIR1 so we flush it. * 932 * * 933 ********************************************************************************** 934 935 * \ / 0A81B DC40315F 936 CALLNP DMOTEWNDO2 flush possible UDIR1 0A81C 60D78805 3 6 BASE 937 LD R3 SP,OTEMPTR retrieve the file directory entry ptr 0A81D 5C08D186 3 ZBM 938 CMZ R3,FDLEN is file length zero? 0A81E FE0CA869 939 JNE WESAYILOP illegal if not empty 940 * \ / 0A81F 3896C814 2 3 BASE 941 LEA R2 R3,FDSHL beginning of share list 0A820 5C088010 2 ZBM 942 CMZ R2,0/SHLDSKFLGB is there a big share list? 0A821 FE0CA869 943 JNE WESAYILOP if so error 944 * \ / 0A822 DC005BCF 945 CALL SETMEMTRAP catch user memory errors 0A823 4000A78E 946 PARL RCVACMBAD recovery address 0A824 60578802 1 6 BASE 947 LD R1 SP,UBUFAD address of users buffer 0A825 59840040 IMM 948 CLBMSR MSRFRELOC relocation to user space 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2340 (XRQOPRRCVR) F 143 OPREQs for recover 0A826 60086A60 0 1 ZBM 949 LD R0 R1,FDET get the file type 0A827 6256480A 121 BASE 950 LD2 R1 R1,FDSERNO get the serial number also 0A828 59C40040 IMM 951 IORMSR MSRFRELOC restore monitor fetch relocation 0A829 68040010 0 IMM 952 UCPR R0 MAXFDET compare to maximum value 0A82A FE06A869 953 JGE WESAYILOP error if not in range 0A82B 5CA0A82C 0 954 LDPC RCVRFLJTAB(R0) go to process location 955 * --- 956 957 * R3 = file's FDE address in WNDO1, 958 * ULB = ULB for file's DIR (FCB,FCLIMITPTR) 959 * FCB = unit for file 0000A82C 960 RCVRFLJTAB LABEL 0A82C 0000A869 961 ADR WESAYILOP illegal type 0A82D 0000A849 962 ADR SAFRCVR SAF 0A82E 0000A844 963 ADR RAFRCVR RAF 0A82F 0000A853 964 ADR CODERCVR CODE 0A830 0000A841 965 ADR EASYRCVR PATH 0A831 0000A869 966 ADR WESAYILOP DIR 0A832 0000A841 967 ADR EASYRCVR NULL 0A833 0000A83C 968 ADR HARDRCVR TERM 0A834 0000A869 969 ADR WESAYILOP unused 0A835 0000A869 970 ADR WESAYILOP BATCH 0A836 0000A83C 971 ADR HARDRCVR CDR 0A837 0000A83C 972 ADR HARDRCVR LP 0A838 0000A83C 973 ADR HARDRCVR MT 0A839 0000A83C 974 ADR HARDRCVR CT 0A83A 0000A869 975 ADR WESAYILOP VOL 0A83B 0000A83C 976 ADR HARDRCVR VT 00000010 ABS 977 MAXFDET EQU DISPW RCVRFLJTAB 978 0000A83C 979 HARDRCVR LABEL 0A83C E6574809 125 BASE 980 ST2 R1 FCB,FCSERIAL put here for search DIR routine 0A83D DC0082B6 981 CALL SRCHDIRLKS search directory for entry (DIR already locked) 0A83E 40005983 982 PARL FERROR error address on disk error 0A83F FE02A867 983 JEQ WESAYNAE duplicate serial number exists 0A840 DC40315F 984 CALLNP DMOTEWNDO2 flush possible UDIR1 985 * \ / 986 0000A841 987 EASYRCVR LABEL 0A841 DC40AA7A 988 CALLNP RECOVERFDE recover file directory 0A842 FE0EA86D 989 JMP RCVRFLERR error, ran out of disk space 0A843 FE0EA863 990 JMP DONEWFIL finished here 991 * --- 992 0000A844 993 RAFRCVR LABEL 0A844 60095835 0 5 ZBM 994 LD R0 FCB,FCACCESS get the open access 0A845 F63EA869 0 995 JBT R0/FSACSNWB WESAYILOP error if write not allowed 996 * \ / 0A846 DC40AA7A 997 CALLNP RECOVERFDE recover file directory 0A847 FE0EA86D 998 JMP RCVRFLERR error, ran out of disk space 0A848 FE0EA863 999 JMP DONEWFIL finish up 1000 * --- 1001 0000A849 1002 SAFRCVR LABEL 0A849 60095835 0 5 ZBM 1003 LD R0 FCB,FCACCESS get the open access 0A84A F63EA869 0 1004 JBT R0/FSACSNWB WESAYILOP error if write not allowed 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2341 (XRQOPRRCVR) F 143 OPREQs for recover 1005 * \ / 0A84B DC40AA7A 1006 CALLNP RECOVERFDE recover file directory 0A84C FE0EA86D 1007 JMP RCVRFLERR error, ran out of disk space 1008 * \ / 0A84D DC40AA59 1009 CALLNP PRODBLOCK get an available disk address 0A84E FE0EA86D 1010 JMP RCVRFLERR jump if none left 0A84F 61174801 4 5 BASE 1011 LD R4 FCB,FCBLOCK pick up block gotten 0A850 E5096183 4 5 ZBM 1012 ST R4 FCB,FCMABLK save as 'next' block 0A851 EC095181 5 ZBM 1013 STZ FCB,FCMSBLK indicate no current block 1014 * (becomes first back pointer) 0A852 FE0EA860 1015 JMP SAFSHRENTR go finish off 1016 * --- 1017 0000A853 1018 CODERCVR LABEL 0A853 60095835 0 5 ZBM 1019 LD R0 FCB,FCACCESS get the open access 0A854 F63EA869 0 1020 JBT R0/FSACSNWB WESAYILOP error if write not allowed 1021 * \ / 0A855 DC40AA7A 1022 CALLNP RECOVERFDE recover file directory 0A856 FE0EA86D 1023 JMP RCVRFLERR error, ran out of disk space 1024 * \ / 0A857 DC00AB1A 1025 CALL ALLOCPAGE get us a page 0A858 40440013 IMM 1026 PARVL FBITCCB type we want (code control block) 0A859 FE0EA86D 1027 JMP RCVRFLERR jump if no more space 1028 * \ / 0A85A DC005BCF 1029 CALL SETMEMTRAP catch memory problems 0A85B 4000A78E 1030 PARL RCVACMBAD recovery address 0A85C 60440060 1 IMM 1031 LD R1 CCBINFOL*CPW get CCB length 0A85D 60840FE8 2 IMM 1032 LD R2 ADR WNDO2(CCBINFO) destination address 0A85E FAE8AA50 3 1033 JSR R3 MOVETOUS move CCB to window 0A85F DC403153 1034 CALLNP GRUBWNDO2 and write it to the disk 1035 * \ / 1036 1037 ********************************************************************************** 1038 * * 1039 * We now do the following... * 1040 * 1) Release the load-point block. We must unlock it, and remove * 1041 * it from the VASP list, but we demote it into the WSX list * 1042 * since we will be using it for the next recover request in * 1043 * a normal recover. We will allow the file data blocks * 1044 * or index blocks to point to un-initialized areas, but we * 1045 * presume that we will get FBI mis-matches when these blocks * 1046 * are read. * 1047 * 2) Put the block address into the FCB and the Directory entry. * 1048 * 3) Note that the FCB indicates that exactly one block has been * 1049 * allocated to this file. * 1050 * 4) Note that we DO NOT do a FORCEWRITE on the directory. This * 1051 * is strictly for recovery. If another user of the directory * 1052 * does a forcewrite, our changes will make it to the disk then. * 1053 * In any event, the completion of the file recovery will involve * 1054 * an UNEQUIP and that will ensure that the forcewrite gets done. * 1055 * * 1056 ********************************************************************************** 1057 1058 * \ / 0000A860 1059 SAFSHRENTR LABEL 0A860 E5097182 4 5 ZBM 1060 ST R4 FCB,FCLPBLK and make it the load point 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2342 (XRQOPRRCVR) F 143 OPREQs for recover 0A861 60D78805 3 6 BASE 1061 LD R3 SP,OTEMPTR retrieve pointer to FDE 0A862 E508D185 4 3 ZBM 1062 ST R4 R3,FDDA save MS address in FDE 1063 * \ / 0000A863 1064 DONEWFIL LABEL 0A863 DC40315C 1065 CALLNP DMOTEWNDO1 clear up window holding UDIR block 0A864 61095114 4 5 ZBM 1066 LD ULB FCB,FCLIMITPTR point to the ULB 0A865 DC405685 1067 CALLNP FREEDIR release the directory 0A866 FE0E5982 1068 JMP FNOERROR all done 1069 * --- 1070 0000A867 1071 WESAYNAE LABEL 0A867 61C4008E 7 IMM 1072 LD R7 XREQERNAE entry already exists 0A868 FE0EA86E 1073 JMP ERROR go do clean up and give error 1074 * --- 1075 0000A869 1076 WESAYILOP LABEL 0A869 61C40091 7 IMM 1077 LD R7 XREQERILOP illegal operation 0A86A FE0EA86E 1078 JMP ERROR go do clean up and give error 1079 * --- 1080 0000A86B 1081 WESAYLNS LABEL 0A86B 61C4008C 7 IMM 1082 LD R7 XREQERLNS file not saved 0A86C FE0EA86E 1083 JMP ERROR go clean up 1084 * --- 1085 0000A86D 1086 RCVRFLERR LABEL 0A86D 61D20000 7 0 REG 1087 LD R7 R0 save error code 1088 * \ / 1089 0000A86E 1090 ERROR LABEL 0A86E 61095114 4 5 ZBM 1091 LD ULB FCB,FCLIMITPTR point to the ULB 0A86F DC405685 1092 CALLNP FREEDIR unlock the directory 1093 * \ / 0000A870 1094 GIVEERROR LABEL 0A870 DC403153 1095 CALLNP GRUBWNDO2 release window 2 0A871 DC403150 1096 CALLNP GRUBWNDO1 release window 1 0A872 FE0E5997 1097 JMP FERROR7 1098 * --- 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2343 (XRQOPRRCVR) F 143 OPREQs for recover 1100 1101 ********************************************************************************** 1102 * * 1103 * This routine will recover a file data page onto the file. * 1104 * The calling sequence is: * 1105 * * 1106 * LD R0 ORPUTFP * 1107 * LD R1 <buffer size> * 1108 * LD R2 <buffer ptr> * 1109 * OPREQ lun * 1110 * JLTZ R0 error * 1111 * * 1112 ********************************************************************************** 1113 0000A873 1114 OPRQPUTFP LABEL 0A873 FAE8AA3D 3 1115 JSR R3 GETHEADER get header info. about file 0A874 64040003 0 IMM 1116 CPR R0 FILEINFOTD is it file data information? 0A875 FE0C59A5 1117 JNE FERRORILOP if not give error 1118 * \ / 0A876 FAE8AA15 3 1119 JSR R3 CHECKBUFF do we have enough buffer? 0A877 FE0E59B0 1120 JMP FERRORPOB jump if not 0A878 DC005BCF 1121 CALL SETMEMTRAP catch user memory errors 0A879 4000A70F 1122 PARL RCVRMEMBAD recovery address 0A87A 60096665 0 5 ZBM 1123 LD R0 FCB,FCHTYPE get type of file 0A87B 64040004 0 IMM 1124 CPR R0 TYPEMAX is it an ok type? 0A87C FE0659A5 1125 JGE FERRORILOP jump if we can't do this type 1126 * \ / 0A87D 5CA0A87E 0 1127 LDPC TYPEJTAB(R0) go do it 1128 * --- 1129 0A87E 000059AA 1130 TYPEJTAB ADR FERRORFAU no type of zero 0A87F 0000A882 1131 ADR PUTFPSAF SAF 0A880 0000A8BB 1132 ADR PUTFPRAF RAF 0A881 0000A8A4 1133 ADR PUTFPCODE CODE 00000004 ABS 1134 TYPEMAX EQU DISPW TYPEJTAB 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2344 (XRQOPRRCVR) F 143 OPREQs for recover 1136 1137 ********************************************************************************** 1138 * * 1139 * This code will take care of recovering .SAF type pages. * 1140 * * 1141 ********************************************************************************** 1142 0000A882 1143 PUTFPSAF LABEL 0A882 60095181 0 5 ZBM 1144 LD R0 FCB,FCMSBLK get pointer to previous block 0A883 E4178807 0 6 BASE 1145 ST R0 SP,RPREVBLOCK and save for a while 1146 * \ / 0A884 60178802 0 6 BASE 1147 LD R0 SP,UBUFAD pickup address of user buffer 0A885 18040400 0 IMM 1148 ADD R0 WPP skip over file data part (to FBI) 0A886 5C095A10 5 ZBM 1149 CMZ FCB,FCRELOC user or monitor relocation 0A887 FE0CA889 1150 JNE MONSTATE2 jump if call from within monitor 0A888 59840040 IMM 1151 CLBMSR MSRFRELOC setup for user fetch 1152 * \ / 1153 0000A889 1154 MONSTATE2 LABEL 0A889 60081180 0 0 ZBM 1155 LD R0 R0,FBIFLINK pick up FLINK from FBI 0A88A 59C40040 IMM 1156 IORMSR MSRFRELOC restore normal relocation 0A88B E4095181 0 5 ZBM 1157 ST R0 FCB,FCMSBLK save the FLINK in common space 0A88C FA02A88F 0 1158 JEQZ R0 NOFORWARDM jump if no forward link (this is last block) 0A88D DC40AA59 1159 CALLNP PRODBLOCK pick up next block 0A88E FE0EA917 1160 JMP GIVEDSKL give error if out of space 0000A88F 1161 NOFORWARDM LABEL 0A88F 60095181 0 5 ZBM 1162 LD R0 FCB,FCMSBLK get 'next' block 0A890 E0096183 0 5 ZBM 1163 EXCH R0 FCB,FCMABLK save next block, get current 0A891 E4095181 0 5 ZBM 1164 ST R0 FCB,FCMSBLK and save 1165 0A892 DC0031FF 1166 CALL SETWNDO2 call to set up this window 0A893 4144001A IMM 1167 PARV VPCNTLW+VPCNTLNR+VPCNTLLK no read and locked 0A894 41534000 5 REG 1168 PARV FCB indicate which file 0A895 4100A916 1169 PAR GIVEDSKLUM pass error address (unmap the FBI) 0A896 41574801 5 BASE 1170 PARV FCB,FCBLOCK pass block number 0A897 40443F8C IMM 1171 PARVL FBITFREE*VPFBIOLDB+FBITSAF indicate type expected 1172 0A898 DC40AB35 1173 CALLNP RFIXFBI fix majority of FBI 1174 0A899 60178807 0 6 BASE 1175 LD R0 SP,RPREVBLOCK pick up old previous pointer 0A89A E4089182 0 2 ZBM 1176 ST R0 R2,FBIBLINK save as back pointer 0A89B 60096183 0 5 ZBM 1177 LD R0 FCB,FCMABLK get pointer to 'next' block 0A89C E4089180 0 2 ZBM 1178 ST R0 R2,FBIFLINK save as forward pointer 0A89D DC40261B 1179 CALLNP MAPOUTFBI unmap the FBI 0A89E DC403270 1180 CALLNP ULKWNDO2 unlock the window 0A89F 60441000 1 IMM 1181 LD R1 CPP indicate whole page move 0A8A0 60840C00 2 IMM 1182 LD R2 ADR WNDO2 indicate destination 0A8A1 FAE8AA50 3 1183 JSR R3 MOVETOUS and move the file data home 0A8A2 DC403153 1184 CALLNP GRUBWNDO2 completely done with page 0A8A3 FE0EA959 1185 JMP ENDSAFPUT share exit code 1186 * --- 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2345 (XRQOPRRCVR) F 143 OPREQs for recover 1188 1189 ********************************************************************************** 1190 * * 1191 * This will recover .CODE pages. * 1192 * * 1193 ********************************************************************************** 1194 0000A8A4 1195 PUTFPCODE LABEL 0A8A4 60098143 0 6 ZBM 1196 LD R0 SP,HDRLENS/(RAFMAJINDX+RAFMININDX) current block number 0A8A5 640403E8 0 IMM 1197 CPR R0 CCBMAXPAGE is it too big for code file? 0A8A6 FE0659A5 1198 JGE FERRORILOP 1199 * \ / 0A8A7 60097182 0 5 ZBM 1200 LD R0 FCB,FCLPBLK start of file 0A8A8 E4095181 0 5 ZBM 1201 ST R0 FCB,FCMSBLK make current position 0A8A9 DC003205 1202 CALL SETWNDO1 map in CCB 0A8AA 41440000 IMM 1203 PARV VPCNTLW writeable 0A8AB 41534000 5 REG 1204 PARV FCB lun associated 0A8AC 4100A917 1205 PAR GIVEDSKL error address 0A8AD 41574801 5 BASE 1206 PARV FCB,FCBLOCK address 0A8AE 40440013 IMM 1207 PARVL FBITCCB type we expect 1208 * \ / 1209 0A8AF 600994A3 0 6 ZBM 1210 LD R0 SP,HDRLENS/RAFMININDX block number 0A8B0 5C200800 0 1211 CMZ WNDO1(R0) is there a block already? 0A8B1 FE0CA919 1212 JNE GIVEILOP if so, error 0A8B2 E4094148 0 5 ZBM 1213 ST R0 FCB,FCCBLK update current block pointer 0A8B3 DC00AB1A 1214 CALL ALLOCPAGE get us a page 0A8B4 40440014 IMM 1215 PARVL FBITCODED type we want 0A8B5 FE0EA917 1216 JMP GIVEDSKL jump if no space 1217 * \ / 1218 0000A8B6 1219 SHRCODERAF LABEL 0A8B6 60441000 1 IMM 1220 LD R1 CPP length to move 0A8B7 60840C00 2 IMM 1221 LD R2 ADR WNDO2 destination 0A8B8 FAE8AA50 3 1222 JSR R3 MOVETOUS copy data to window 2 0A8B9 DC403153 1223 CALLNP GRUBWNDO2 write out new block 0A8BA FE0EA977 1224 JMP SHBCODERAF go fix up pointer 1225 * --- 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2346 (XRQOPRRCVR) F 143 OPREQs for recover 1227 1228 ********************************************************************************** 1229 * * 1230 * This will recover .RAF file pages * 1231 * * 1232 ********************************************************************************** 1233 0000A8BB 1234 PUTFPRAF LABEL 0A8BB 60095826 0 5 ZBM 1235 LD R0 FCB,FCRAFTYPE get the type of RAF 0A8BC 5CA0A8BD 0 1236 LDPC PUTRAFTAB(R0) go to the correct place 1237 * --- 1238 0000A8BD 1239 PUTRAFTAB LABEL 0A8BD 0000A8C1 1240 VFD ADR NORAFDATA empty RAF 0A8BE 0000A8D3 1241 VFD ADR MAKEAMIN tiny RAF 0A8BF 0000A8DA 1242 VFD ADR HAVESRAF small RAF 0A8C0 0000A8F5 1243 VFD ADR BIGRAF large RAF 1244 0000A8C1 1245 NORAFDATA LABEL 0A8C1 5C0980A3 6 ZBM 1246 CMZ SP,HDRLENS/(RAFMAJINDX) is the page within the first minor access block? 0A8C2 FE0CA8DC 1247 JNE MAKEAMAJ if not then make a major access block 0A8C3 5C0994A3 6 ZBM 1248 CMZ SP,HDRLENS/(RAFMININDX) is the page in location zero? 0A8C4 FE0CA8D5 1249 JNE MAKEAMINX if not then make a minor access block 1250 * \ / 1251 0A8C5 61095114 4 5 ZBM 1252 LD ULB FCB,FCLIMITPTR pick up ULB for this file 0A8C6 DC406C2D 1253 CALLNP MAKETRAF get a data block and update dir 0A8C7 FE0E5983 1254 JMP FERROR error return 1255 0A8C8 DC003205 1256 CALL SETWNDO1 get our data page 0A8C9 41440000 IMM 1257 PARV VPCNTLW writeable 0A8CA 41534000 5 REG 1258 PARV FCB unit associated 0A8CB 4100A917 1259 PAR GIVEDSKL error address 0A8CC 41574801 5 BASE 1260 PARV FCB,FCBLOCK block to fetch 0A8CD 4044000F IMM 1261 PARVL FBITRAFD RAF data page 1262 0A8CE 60441000 1 IMM 1263 LD R1 CPP number of chars we want 0A8CF 60840800 2 IMM 1264 LD R2 ADR WNDO1 where the page is 0A8D0 FAE8AA50 3 1265 JSR R3 MOVETOUS get us the page 0A8D1 DC403150 1266 CALLNP GRUBWNDO1 release the page 0A8D2 FE0E5982 1267 JMP FNOERROR done here 1268 * --- 1269 0000A8D3 1270 MAKEAMIN LABEL 0A8D3 5C0980A3 6 ZBM 1271 CMZ SP,HDRLENS/(RAFMAJINDX) is the page within the first minor access block? 0A8D4 FE0CA8DC 1272 JNE MAKEAMAJ if not then make a major access block 1273 * \ / 0000A8D5 1274 MAKEAMINX LABEL 0A8D5 61095114 4 5 ZBM 1275 LD ULB FCB,FCLIMITPTR who to charge for needed space 0A8D6 60C40000 3 IMM 1276 LD R3 0 no directory pointer 0A8D7 DC406BE1 1277 CALLNP XPANDTRAF make our tiny RAF into a small RAF 0A8D8 FE0EA917 1278 JMP GIVEDSKL limits exceeded 0A8D9 FE0EA917 1279 JMP GIVEDSKL disk structure error 1280 * \ / 1281 0000A8DA 1282 HAVESRAF LABEL 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2347 (XRQOPRRCVR) F 143 OPREQs for recover 0A8DA 5C0980A3 6 ZBM 1283 CMZ SP,HDRLENS/RAFMAJINDX fetch block number of new page 0A8DB FE02A8F3 1284 JEQ NOCONVERT jump if conversion to large raf not needed 1285 * \ / to convert small to large RAF 1286 0000A8DC 1287 MAKEAMAJ LABEL 0A8DC EC094148 5 ZBM 1288 STZ FCB,FCCBLK indicate major rel block number is zero 0A8DD DC00AB1A 1289 CALL ALLOCPAGE get us a block 0A8DE 4044000D IMM 1290 PARVL FBITLRAF type we want 0A8DF FE0EA917 1291 JMP GIVEDSKL jump if out of space 0A8E0 E5096183 4 5 ZBM 1292 ST R4 FCB,FCMABLK store new pointer 0A8E1 60097182 0 5 ZBM 1293 LD R0 FCB,FCLPBLK load old load point 0A8E2 E4000C00 0 1294 ST R0 WNDO2 and put into control block 0A8E3 EC097182 5 ZBM 1295 STZ FCB,FCLPBLK finish making it large 0A8E4 DC4031A0 1296 CALLNP FORCEWRW2 force out the new block 0A8E5 DC403153 1297 CALLNP GRUBWNDO2 and release the window 0A8E6 DC0082BB 1298 CALL SRCHDIRSN look for file by serial number 0A8E7 40005983 1299 PARL FERROR where to go on dir error 0A8E8 FE02A8EA 1300 JEQ FOUND jump if we found it 1301 * \ / 0A8E9 00131280 1302 HALT HALTS1280 really bad if we didn't find it 1303 * --- 1304 0000A8EA 1305 FOUND LABEL 0A8EA 60096183 0 5 ZBM 1306 LD R0 FCB,FCMABLK address of major-access block 0A8EB E408D185 0 3 ZBM 1307 ST R0 R3,FDDA and make beginning of file 0A8EC 60040003 0 IMM 1308 LD R0 RAFTLARGE 0A8ED E4095826 0 5 ZBM 1309 ST R0 FCB,FCRAFTYPE keep FCB current 0A8EE E408FC20 0 3 ZBM 1310 ST R0 R3,FDRAFTYPE say it's a large RAF 0A8EF DC40319D 1311 CALLNP FORCEWRW1 force out new FDE 0A8F0 61095114 4 5 ZBM 1312 LD ULB FCB,FCLIMITPTR point to his limits 0A8F1 DC405685 1313 CALLNP FREEDIR let go of dir 0A8F2 FE0EA8BB 1314 JMP PUTFPRAF go try again 1315 * --- 1316 1317 * to add block to small RAF without expansion 0000A8F3 1318 NOCONVERT LABEL 0A8F3 61097182 4 5 ZBM 1319 LD R4 FCB,FCLPBLK beginning of file 0A8F4 FE0EA906 1320 JMP ITSHERE add block to minor access block 1321 * --- 1322 1323 * to add block to large RAF 0000A8F5 1324 BIGRAF LABEL 0A8F5 60096183 0 5 ZBM 1325 LD R0 FCB,FCMABLK pick up the root block 0A8F6 E4095181 0 5 ZBM 1326 ST R0 FCB,FCMSBLK make current block 0A8F7 DC003205 1327 CALL SETWNDO1 map in major access block 0A8F8 41440000 IMM 1328 PARV VPCNTLW writeable 0A8F9 41534000 5 REG 1329 PARV FCB lun associated 0A8FA 4100A917 1330 PAR GIVEDSKL error address 0A8FB 41574801 5 BASE 1331 PARV FCB,FCBLOCK address 0A8FC 4044000D IMM 1332 PARVL FBITLRAF type expected 1333 0A8FD 600980A3 0 6 ZBM 1334 LD R0 SP,HDRLENS/RAFMAJINDX get current block position pointer 0A8FE 61200800 4 0 1335 LD R4 WNDO1(R0) minor block pointer 0A8FF FB32A906 4 1336 JNZA R4 ITSHERE jump if one exists 1337 * \ / 0A900 E4094148 0 5 ZBM 1338 ST R0 FCB,FCCBLK set desired rel block number 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2348 (XRQOPRRCVR) F 143 OPREQs for recover 0A901 DC00AB1A 1339 CALL ALLOCPAGE get us a block 0A902 4044000E IMM 1340 PARVL FBITSRAF type expected 0A903 FE0EA917 1341 JMP GIVEDSKL jump if out of space 0A904 600980A3 0 6 ZBM 1342 LD R0 SP,HDRLENS/RAFMAJINDX block number 0A905 E5200800 4 0 1343 ST R4 WNDO1(R0) put address in access block 1344 * CALLNP DMOTEWNDO1 release major access block (done by SETWNDO) 1345 0000A906 1346 ITSHERE LABEL 0A906 E5095181 4 5 ZBM 1347 ST R4 FCB,FCMSBLK make current address 0A907 DC003205 1348 CALL SETWNDO1 map in minor access block 0A908 41440000 IMM 1349 PARV VPCNTLW writeable 0A909 41534000 5 REG 1350 PARV FCB lun associated 0A90A 4100A917 1351 PAR GIVEDSKL error address 0A90B 41574801 5 BASE 1352 PARV FCB,FCBLOCK address 0A90C 4044000E IMM 1353 PARVL FBITSRAF type expected 1354 0A90D 600994A3 0 6 ZBM 1355 LD R0 SP,HDRLENS/RAFMININDX block number 0A90E 5C200800 0 1356 CMZ WNDO1(R0) is there one here? 0A90F FE0CA919 1357 JNE GIVEILOP error if so, jump 1358 * \ / 0A910 60098143 0 6 ZBM 1359 LD R0 SP,HDRLENS/(RAFMAJINDX+RAFMININDX) current block position pointer 0A911 E4094148 0 5 ZBM 1360 ST R0 FCB,FCCBLK update FCB copy for rel block 0A912 DC00AB1A 1361 CALL ALLOCPAGE get us a block 0A913 4044000F IMM 1362 PARVL FBITRAFD type expected 0A914 FE0EA917 1363 JMP GIVEDSKL jump if out of space 0A915 FE0EA8B6 1364 JMP SHRCODERAF go share rest 1365 * --- 1366 0000A916 1367 GIVEDSKLUM LABEL 0A916 DC40261B 1368 CALLNP MAPOUTFBI unmap FBI, ION 1369 * \ / 0000A917 1370 GIVEDSKL LABEL 0A917 61D20000 7 0 REG 1371 LD R7 R0 save away error code 0A918 FE0EA870 1372 JMP GIVEERROR 1373 * --- 1374 0000A919 1375 GIVEILOP LABEL 0A919 61C40091 7 IMM 1376 LD R7 XREQERILOP 'illegal operation' 0A91A FE0EA870 1377 JMP GIVEERROR 1378 * --- 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2349 (XRQOPRRCVR) F 143 OPREQs for recover 1380 1381 ********************************************************************************** 1382 * * 1383 * This routine will recover a file data page onto the file * 1384 * using the mapped form. * 1385 * Call: * 1386 * * 1387 * LD R0 ORPUTPFP * 1388 * LD R1 <buffer size> * 1389 * LD R2 <buffer ptr> * 1390 * LD R3 <page number of data> * 1391 * OPREQ lun * 1392 * JLTZ R0 error * 1393 * * 1394 ********************************************************************************** 1395 0000A91B 1396 OPRQPUTPFP LABEL 0A91B 60170805 0 4 BASE 1397 LD R0 R4,CAR3 pick up callers R3 0A91C 68040080 0 IMM 1398 UCPR R0 MONPF see if legal page number 0A91D FE0659B0 1399 JGE FERRORPOB jump out if not 0A91E E4178804 0 6 BASE 1400 ST R0 SP,UPAGENUM save page number 0A91F E5578806 5 6 BASE 1401 ST FCB SP,OTEM1 save pointer to file control block 1402 * \ / 0A920 0CC00000 1403 IOFF 0A921 60400412 1 1404 LD R1 CPPSA get PSA pointer 0A922 DC40265F 1405 CALLNP FINDVP find the corresponding VP element 0A923 FE0E59B0 1406 JMP FERRORPOB jump if no such VP at all 0A924 0C800000 1407 ION 0A925 60174803 0 5 BASE 1408 LD R0 VPP,VPBLOCK get old block number 0A926 E4178805 0 6 BASE 1409 ST R0 SP,OTEMPTR and save for later work 0A927 600942E2 0 5 ZBM 1410 LD R0 VPP,VPFBITYPE pick up type field 0A928 6404000B 0 IMM 1411 CPR R0 FBITSYS is this page swapping? 0A929 EC4BC010 7 CBM 1412 STLEQ R7/BIT 0 save answer (1 iff swapping) 0A92A 5C095420 5 ZBM 1413 CMZ VPP,VPCNTL/VPCNTLSRF check exclude and zeropage bits 0A92B FE0CA93C 1414 JNE RCVRERRMPV protest on attempt to access excluded page 1415 * \ / 0A92C 61578806 5 6 BASE 1416 LD FCB SP,OTEM1 restore pointer to file control block 0A92D FAE8AA3D 3 1417 JSR R3 GETHEADER get header info. about file 0A92E 64040004 0 IMM 1418 CPR R0 FILEINFOTM is it file data information? 0A92F FE0C59A5 1419 JNE FERRORILOP if not, give error 1420 * \ / 0A930 FAE8AA15 3 1421 JSR R3 CHECKBUFF do we have enough buffer? 0A931 FE0E59B0 1422 JMP FERRORPOB jump if not 0A932 DC005BCF 1423 CALL SETMEMTRAP catch user memory errors 0A933 4000A70F 1424 PARL RCVRMEMBAD recovery address 0A934 60096665 0 5 ZBM 1425 LD R0 FCB,FCHTYPE get type of file 0A935 64040004 0 IMM 1426 CPR R0 TYPEMMAX is it an ok type? 0A936 FE0659A5 1427 JGE FERRORILOP jump if we can't do this type 1428 * \ / 0A937 5CA0A938 0 1429 LDPC TYPEMJTAB(R0) go do it 1430 * --- 1431 0A938 000059AA 1432 TYPEMJTAB ADR FERRORFAU no type of zero 0A939 0000A93F 1433 ADR PUTPFPSAF SAF 0A93A 0000A97E 1434 ADR PUTPFPRAF RAF 0A93B 0000A962 1435 ADR PUTPFPCODE CODE 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2350 (XRQOPRRCVR) F 143 OPREQs for recover 00000004 ABS 1436 TYPEMMAX EQU DISPW TYPEMJTAB 1437 1438 0000A93C 1439 RCVRERRMPV LABEL memory protect error 0A93C 60040074 0 IMM 1440 LD R0 UINTMPV 0A93D 60578804 1 6 BASE 1441 LD R1 SP,UPAGENUM parameter is page number 0A93E FE0E5B5F 1442 JMP PASSERRUP pass error to over program 1443 * --- 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2351 (XRQOPRRCVR) F 143 OPREQs for recover 1445 1446 ********************************************************************************** 1447 * * 1448 * This code will take care of recovering .SAF type pages. * 1449 * * 1450 ********************************************************************************** 1451 0000A93F 1452 PUTPFPSAF LABEL 0A93F 60095181 0 5 ZBM 1453 LD R0 FCB,FCMSBLK get pointer to previous block 0A940 E4178807 0 6 BASE 1454 ST R0 SP,RPREVBLOCK and save for a while 0A941 5C096183 5 ZBM 1455 CMZ FCB,FCMABLK do we have a current block? 0A942 FE0CA945 1456 JNE GOTNXTBLK jump if block specified 0A943 60097182 0 5 ZBM 1457 LD R0 FCB,FCLPBLK otherwise get the first block 0A944 E4096183 0 5 ZBM 1458 ST R0 FCB,FCMABLK and make it the current one 1459 * \ / 1460 0000A945 1461 GOTNXTBLK LABEL 0A945 60178802 0 6 BASE 1462 LD R0 SP,UBUFAD pickup address of user buffer 0A946 5C095A10 5 ZBM 1463 CMZ FCB,FCRELOC user or monitor relocation 0A947 FE0CA949 1464 JNE MONSTATE3 jump if call from within monitor 0A948 59840040 IMM 1465 CLBMSR MSRFRELOC setup for user fetch 1466 * \ / 1467 0000A949 1468 MONSTATE3 LABEL 0A949 60081180 0 0 ZBM 1469 LD R0 R0,FBIFLINK pick up FLINK from FBI 0A94A 59C40040 IMM 1470 IORMSR MSRFRELOC restore normal relocation 0A94B E4095181 0 5 ZBM 1471 ST R0 FCB,FCMSBLK save the FLINK in common space 0A94C FA02A94F 0 1472 JEQZ R0 NOFORWARD jump if no forward link (this is last block) 0A94D DC40AA59 1473 CALLNP PRODBLOCK pick up next block 0A94E FE0EA917 1474 JMP GIVEDSKL give error if out of space 0000A94F 1475 NOFORWARD LABEL 0A94F 60095181 0 5 ZBM 1476 LD R0 FCB,FCMSBLK get 'next' block 0A950 E0096183 0 5 ZBM 1477 EXCH R0 FCB,FCMABLK save next block, get current 0A951 E4095181 0 5 ZBM 1478 ST R0 FCB,FCMSBLK and save 1479 0A952 DC00AA68 1480 CALL PRODUCEFBI build FBI for this block 0A953 4044000C IMM 1481 PARVL FBITSAF indicate type 0A954 60096183 0 5 ZBM 1482 LD R0 FCB,FCMABLK pick up pointer to 'next' block 0A955 E408D184 0 3 ZBM 1483 ST R0 R3,PPFBFBI/FBIFLINK and set as forward pointer 0A956 60178807 0 6 BASE 1484 LD R0 SP,RPREVBLOCK pick up previous block number 0A957 E408D186 0 3 ZBM 1485 ST R0 R3,PPFBFBI/FBIBLINK and set backward pointer 0A958 DC40AA1D 1486 CALLNP EXCHANGEPG and queue the disk operation 1487 * \ / 1488 1489 * shared exit code for the two SAF block recover XREQs 0000A959 1490 ENDSAFPUT LABEL 0A959 60094148 0 5 ZBM 1491 LD R0 FCB,FCCBLK pick up current relative block number 0A95A 64094147 0 5 ZBM 1492 CPR R0 FCB,FCEPP/PGNUMFLD was this the original EOD block? 0A95B FE0CA960 1493 JNE NOTENDYET jump if not 0A95C 5C174807 5 BASE 1494 CMZ FCB,FCEPP were original fields set? 0A95D FE02A960 1495 JEQ NOTENDYET assume not 0A95E 60174801 0 5 BASE 1496 LD R0 FCB,FCBLOCK pick up current block number 0A95F E4095186 0 5 ZBM 1497 ST R0 FCB,FCEND and also as prospective file end 1498 * \ / 0000A960 1499 NOTENDYET LABEL 0A960 D0094148 5 ZBM 1500 INC FCB,FCCBLK advance current block position 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2352 (XRQOPRRCVR) F 143 OPREQs for recover 0A961 FE0E5982 1501 JMP FNOERROR all done 1502 * --- 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2353 (XRQOPRRCVR) F 143 OPREQs for recover 1504 1505 ********************************************************************************** 1506 * * 1507 * This will recover .CODE pages. * 1508 * * 1509 ********************************************************************************** 1510 0000A962 1511 PUTPFPCODE LABEL 0A962 600994A3 0 6 ZBM 1512 LD R0 SP,HDRLENS/RAFMININDX block number 0A963 640403E8 0 IMM 1513 CPR R0 CCBMAXPAGE is it too big for code file? 0A964 FE0659A5 1514 JGE FERRORILOP 1515 * \ / 0A965 60097182 0 5 ZBM 1516 LD R0 FCB,FCLPBLK start of file 0A966 E4095181 0 5 ZBM 1517 ST R0 FCB,FCMSBLK make current position 0A967 DC003205 1518 CALL SETWNDO1 map in CCB 0A968 41440000 IMM 1519 PARV VPCNTLW writeable 0A969 41534000 5 REG 1520 PARV FCB lun associated 0A96A 4100A917 1521 PAR GIVEDSKL error address 0A96B 41574801 5 BASE 1522 PARV FCB,FCBLOCK address 0A96C 40440013 IMM 1523 PARVL FBITCCB type we expect 1524 * \ / 0A96D 600994A3 0 6 ZBM 1525 LD R0 SP,HDRLENS/RAFMININDX block number 0A96E 5C200800 0 1526 CMZ WNDO1(R0) is there a block already? 0A96F FE0CA919 1527 JNE GIVEILOP if so, error 0A970 E4094148 0 5 ZBM 1528 ST R0 FCB,FCCBLK update current block pointer 0A971 DC40AA59 1529 CALLNP PRODBLOCK fetch disk block number 0A972 FE0EA917 1530 JMP GIVEDSKL jump if no space 0A973 DC00AA68 1531 CALL PRODUCEFBI make an FBI for it 0A974 40440014 IMM 1532 PARVL FBITCODED type we want 1533 * \ / 1534 0000A975 1535 SHACODERAF LABEL 0A975 DC40AA1D 1536 CALLNP EXCHANGEPG do the switch 0A976 61095181 4 5 ZBM 1537 LD R4 FCB,FCMSBLK get new disk address 0000A977 1538 SHBCODERAF LABEL 0A977 600994A3 0 6 ZBM 1539 LD R0 SP,HDRLENS/RAFMININDX block number 0A978 60578803 1 6 BASE 1540 LD R1 SP,HDRLENS get the header length word 0A979 78430000 1 IMM 1541 AND R1 1*CCBPROTECT isolate the protect bit 0A97A 7D124000 4 1 REG 1542 IOR R4 R1 and copy to CCB data 0A97B E5200800 4 0 1543 ST R4 WNDO1(R0) and put in control block 0A97C DC40315C 1544 CALLNP DMOTEWNDO1 release control block, we may need it later 0A97D FE0E5982 1545 JMP FNOERROR all done 1546 * --- 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2354 (XRQOPRRCVR) F 143 OPREQs for recover 1548 1549 ********************************************************************************** 1550 * * 1551 * This will recover .RAF file pages * 1552 * * 1553 ********************************************************************************** 1554 0000A97E 1555 PUTPFPRAF LABEL 0A97E 60095826 0 5 ZBM 1556 LD R0 FCB,FCRAFTYPE get raf type 0A97F 5CA0A980 0 1557 LDPC PUTPFRAFJT(R0) jump according to RAF type 1558 * --- 1559 0000A980 1560 PUTPFRAFJT LABEL 0A980 0000A984 1561 VFD ADR ITSEMPTY empty RAF 0A981 0000A992 1562 VFD ADR MAKEASRAF tiny RAF 0A982 0000A999 1563 VFD ADR PUTPFPSRAF small RAF 0A983 0000A9B5 1564 VFD ADR LARGERAF large RAF 1565 0000A984 1566 ITSEMPTY LABEL 0A984 5C0980A3 6 ZBM 1567 CMZ SP,HDRLENS/(RAFMAJINDX) is the page within the first minor AB? 0A985 FE0CA99B 1568 JNE MAKEALRAF if not then make a major access block 0A986 5C0994A3 6 ZBM 1569 CMZ SP,HDRLENS/(RAFMININDX) is the page in location zero? 0A987 FE0CA994 1570 JNE MAKEASRAFX if not then make a minor access block 1571 * \ / 1572 0A988 DC40AA59 1573 CALLNP PRODBLOCK get us a block to use 0A989 FE0EA917 1574 JMP GIVEDSKL error return 0A98A 60040001 0 IMM 1575 LD R0 RAFTTINY 0A98B E4095826 0 5 ZBM 1576 ST R0 FCB,FCRAFTYPE keep FCB current 0A98C DC406C4B 1577 CALLNP TRAFDIR update dir 0A98D FE0E5983 1578 JMP FERROR error return 0A98E DC00AA68 1579 CALL PRODUCEFBI make the FBI 0A98F 4044000F IMM 1580 PARVL FBITRAFD RAF data page 0A990 DC40AA1D 1581 CALLNP EXCHANGEPG swap pages 0A991 FE0E5982 1582 JMP FNOERROR done here 1583 * --- 1584 0000A992 1585 MAKEASRAF LABEL 0A992 5C0980A3 6 ZBM 1586 CMZ SP,HDRLENS/(RAFMAJINDX) is the page within the first minor AB? 0A993 FE0CA99B 1587 JNE MAKEALRAF if not then make a major access block 1588 * \ / 0000A994 1589 MAKEASRAFX LABEL 0A994 61095114 4 5 ZBM 1590 LD ULB FCB,FCLIMITPTR who to charge for needed space 0A995 60C40000 3 IMM 1591 LD R3 0 no directory pointer 0A996 DC406BE1 1592 CALLNP XPANDTRAF make our tiny RAF small 0A997 FE0EA917 1593 JMP GIVEDSKL limits exceeded 0A998 FE0EA917 1594 JMP GIVEDSKL disk structure error 1595 * \ / 1596 0000A999 1597 PUTPFPSRAF LABEL 0A999 5C0980A3 6 ZBM 1598 CMZ SP,HDRLENS/RAFMAJINDX fetch block number of new page 0A99A FE02A9B3 1599 JEQ NORCONVERT jump if conversion to large raf not needed 1600 * \ / to convert small to large RAF 1601 0000A99B 1602 MAKEALRAF LABEL 0A99B EC094148 5 ZBM 1603 STZ FCB,FCCBLK set desired rel block number 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2355 (XRQOPRRCVR) F 143 OPREQs for recover 0A99C DC00AB1A 1604 CALL ALLOCPAGE get us a block 0A99D 4044000D IMM 1605 PARVL FBITLRAF type we want 0A99E FE0EA917 1606 JMP GIVEDSKL jump if out of space 0A99F E5096183 4 5 ZBM 1607 ST R4 FCB,FCMABLK store new pointer 0A9A0 60097182 0 5 ZBM 1608 LD R0 FCB,FCLPBLK load old load point 0A9A1 E4000C00 0 1609 ST R0 WNDO2 and put into control block 0A9A2 EC097182 5 ZBM 1610 STZ FCB,FCLPBLK finish making it large 0A9A3 DC4031A0 1611 CALLNP FORCEWRW2 force out the new block 0A9A4 DC403153 1612 CALLNP GRUBWNDO2 and release the window 0A9A5 DC0082BB 1613 CALL SRCHDIRSN look for file by serial number 0A9A6 40005983 1614 PARL FERROR where to go on dir error 0A9A7 FE02A9A9 1615 JEQ RFOUND jump if we found it 1616 * \ / 0A9A8 00131282 1617 HALT HALTS1282 really bad if we didn't find it 1618 * --- 1619 0000A9A9 1620 RFOUND LABEL 0A9A9 60096183 0 5 ZBM 1621 LD R0 FCB,FCMABLK address of major-access block 0A9AA E408D185 0 3 ZBM 1622 ST R0 R3,FDDA and make beginning of file 0A9AB 60040003 0 IMM 1623 LD R0 RAFTLARGE 0A9AC E4095826 0 5 ZBM 1624 ST R0 FCB,FCRAFTYPE keep FCB current 0A9AD E408FC20 0 3 ZBM 1625 ST R0 R3,FDRAFTYPE say it's a large RAF 0A9AE DC40319D 1626 CALLNP FORCEWRW1 force out new FDE 0A9AF DC40315F 1627 CALLNP DMOTEWNDO2 release UDIR1, if held 0A9B0 61095114 4 5 ZBM 1628 LD ULB FCB,FCLIMITPTR point to his limits 0A9B1 DC405685 1629 CALLNP FREEDIR let go of dir 0A9B2 FE0EA97E 1630 JMP PUTPFPRAF go try again 1631 * --- 1632 1633 * to add block to small RAF without expansion 0000A9B3 1634 NORCONVERT LABEL 0A9B3 61097182 4 5 ZBM 1635 LD R4 FCB,FCLPBLK beginning of file 0A9B4 FE0EA9C7 1636 JMP FOUNDINDX share code 1637 * --- 1638 1639 * to add block to large RAF 0000A9B5 1640 LARGERAF LABEL 0A9B5 60096183 0 5 ZBM 1641 LD R0 FCB,FCMABLK pick up the root block 0A9B6 E4095181 0 5 ZBM 1642 ST R0 FCB,FCMSBLK make current block 0A9B7 DC003205 1643 CALL SETWNDO1 map in major access block 0A9B8 41440000 IMM 1644 PARV VPCNTLW writeable 0A9B9 41534000 5 REG 1645 PARV FCB lun associated 0A9BA 4100A917 1646 PAR GIVEDSKL error address 0A9BB 41574801 5 BASE 1647 PARV FCB,FCBLOCK address 0A9BC 4044000D IMM 1648 PARVL FBITLRAF type expected 1649 0A9BD 600980A3 0 6 ZBM 1650 LD R0 SP,HDRLENS/RAFMAJINDX get relative block number 0A9BE 61200800 4 0 1651 LD R4 WNDO1(R0) minor block pointer 0A9BF FB32A9C7 4 1652 JNZA R4 FOUNDINDX jump if one exists 1653 * \ / 0A9C0 E4094148 0 5 ZBM 1654 ST R0 FCB,FCCBLK set proper relative block number 0A9C1 DC00AB1A 1655 CALL ALLOCPAGE get us a block 0A9C2 4044000E IMM 1656 PARVL FBITSRAF type expected 0A9C3 FE0EA917 1657 JMP GIVEDSKL jump if out of space 0A9C4 600980A3 0 6 ZBM 1658 LD R0 SP,HDRLENS/RAFMAJINDX block number 0A9C5 E5200800 4 0 1659 ST R4 WNDO1(R0) put address in access block 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2356 (XRQOPRRCVR) F 143 OPREQs for recover 0A9C6 DC40315F 1660 CALLNP DMOTEWNDO2 release new minor access block 1661 * CALLNP DMOTEWNDO1 release major access block (done by SETWNDO) 1662 0000A9C7 1663 FOUNDINDX LABEL 0A9C7 E5095181 4 5 ZBM 1664 ST R4 FCB,FCMSBLK make current address 0A9C8 DC003205 1665 CALL SETWNDO1 map in minor access block 0A9C9 41440000 IMM 1666 PARV VPCNTLW writeable 0A9CA 41534000 5 REG 1667 PARV FCB lun associated 0A9CB 4100A917 1668 PAR GIVEDSKL error address 0A9CC 41574801 5 BASE 1669 PARV FCB,FCBLOCK address 0A9CD 4044000E IMM 1670 PARVL FBITSRAF type expected 1671 0A9CE 600994A3 0 6 ZBM 1672 LD R0 SP,HDRLENS/RAFMININDX fetch index into minor access block 0A9CF 5C200800 0 1673 CMZ WNDO1(R0) is there one here? 0A9D0 FE0CA919 1674 JNE GIVEILOP error if so, jump 1675 * \ / 0A9D1 60098143 0 6 ZBM 1676 LD R0 SP,HDRLENS/(RAFMAJINDX+RAFMININDX) current block relative position 0A9D2 E4094148 0 5 ZBM 1677 ST R0 FCB,FCCBLK set relative block number 0A9D3 DC40AA59 1678 CALLNP PRODBLOCK get a disk block address for us to use 0A9D4 FE0EA917 1679 JMP GIVEDSKL jump if out of space 0A9D5 DC00AA68 1680 CALL PRODUCEFBI and make an FBI for it 0A9D6 4044000F IMM 1681 PARVL FBITRAFD type expected 0A9D7 FE0EA975 1682 JMP SHACODERAF go share rest 1683 * --- 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2357 (XRQOPRRCVR) F 143 OPREQs for recover 1685 1686 ********************************************************************************** 1687 * * 1688 * ADJUST MANAGERS LIMITS * 1689 * These routines will update the managers authlist entry * 1690 * and return an error if the proper authorization does not * 1691 * exist. Note that we try to share as much code as possible. * 1692 * Call: * 1693 * WNDO1 <= managers authlist * 1694 * R3 <= current authlist entry * 1695 * CALLNP ADJMGR[CPU|DSKL|SDSK] * 1696 * JLTZ R0 <error, insufficient authorization> * 1697 * * 1698 * Register Usage: R0-R2 * 1699 * Stack Required: 0 * 1700 * * 1701 ********************************************************************************** 1702 1703 BLOCK ADJMGR[CPU|DSKL|SDSK] subroutines 1704 ENTRY ADJMGRCPU 1705 ENTRY ADJMGRDSKL 1706 ENTRY ADJMGRSDSK 1707 00000000 ABS 1708 RESALLOC EQU 0 offset to allocatable amount 00000001 ABS 1709 RESALLOCD EQU 1 offset to allocated amount 1710 0A9D8 DD578800 6 BASE 1711 ADJMGRCPU ENTRNP SP,RRETAD 0A9D9 6216C800 013 BASE 1712 LD2 R0 R3,AUTHTIME get CPU time amounts 0A9DA 38800800 2 1713 LEA R2 WNDO1(0) pointer to manager limits 0A9DB FE0EA9F5 1714 JMP SHRADJMGR share resource deallocation code 1715 * --- 1716 0A9DC DD578800 6 BASE 1717 ADJMGRDSKL ENTRNP SP,RRETAD 0A9DD EC0BC010 7 CBM 1718 STZ R7/BIT 0 fooling with account limits 0A9DE FE0EA9E1 1719 JMP SRCHVOLNM search for proper volume name 1720 * --- 1721 0A9DF DD578800 6 BASE 1722 ADJMGRSDSK ENTRNP SP,RRETAD 0A9E0 EDCBC010 7 CBM 1723 STW R7/BIT 0 farting with saved limits 1724 * \ / 1725 0000A9E1 1726 SRCHVOLNM LABEL 0A9E1 EC178808 6 BASE 1727 STZ SP,OTEM3 indicate ALL! entry not found 0A9E2 38800804 2 1728 LEA R2 WNDO1(AUTHENTBG) address of disk entries 1729 * \ / 1730 0000A9E3 1731 SRCHVOLLP LABEL 0A9E3 5E168800 2 BASE 1732 CMZ2 R2,AUTHVNAME any entries left to check? 0A9E4 FE02A9EE 1733 JEQ BADSHOW couldn't find proper entry 0A9E5 62168800 012 BASE 1734 LD2 R0 R2,AUTHVNAME get the volume name 0A9E6 6616C800 013 BASE 1735 CPR2 R0 R3,AUTHVNAME is this the entry we seek? 0A9E7 FE02A9F2 1736 JEQ FNDVOLNM jump if it is 0A9E8 66002558 01 1737 CPR2 R0 ALLVOLUMES is this the magic volume name? 0A9E9 FE0CA9EB 1738 JNE NOTALL! jump if not 0A9EA E4978808 2 6 BASE 1739 ST R2 SP,OTEM3 remember in case we need it later 1740 * \ / 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2358 (XRQOPRRCVR) F 143 OPREQs for recover 1741 0000A9EB 1742 NOTALL! LABEL 0A9EB 1884000C 2 IMM 1743 ADD R2 AUTHLELEN advance to next entry 0A9EC 64840BF4 2 IMM 1744 CPR R2 ADR (WNDO1(WPP-AUTHLELEN)) at end of the block? 0A9ED FE0AA9E3 1745 JLE SRCHVOLLP jump if not, continue search 1746 * \ / 0000A9EE 1747 BADSHOW LABEL 0A9EE 60978808 2 6 BASE 1748 LD R2 SP,OTEM3 check if ALL! entry was found 0A9EF FA8CA9F2 2 1749 JNEZ R2 FNDVOLNM looks like we are in luck 0A9F0 D1520000 0 REG 1750 STMW R0 indicate our limits are exceeded 0A9F1 5D178800 6 BASE 1751 LEAVE SP,RRETAD and return 1752 * --- 1753 0000A9F2 1754 FNDVOLNM LABEL 0A9F2 600BC010 0 7 CBM 1755 LD R0 R7/BIT 0 remember which limit we want 0A9F3 5D60AA07 0 1756 XCT SETMGRPTR(R0) set pointer to managers limits 0A9F4 5D60AA09 0 1757 XCT GETLIMITS(R0) get limits of victims authlist 1758 * \ / 1759 1760 * R0 <= amount allocatable, R1 <= amount allocated, R2 <= managers limits, 1761 * R3 <= victim authorization entry (CPU or DISK) 0000A9F5 1762 SHRADJMGR LABEL 0A9F5 FA2CA9F9 0 1763 JEQMW R0 NOADJUST if huge allocatable, no adjustment required 0A9F6 FA6CA9F9 1 1764 JEQMW R1 NOADJUST if huge allocated, same as above 0A9F7 10124000 0 1 REG 1765 SUB R0 R1 find the difference between the two 0A9F8 FA0AAA02 0 1766 JLEZ R0 GOODRTN don't bother with negative amounts 1767 * \ / 1768 0000A9F9 1769 NOADJUST LABEL 0A9F9 60568800 1 2 BASE 1770 LD R1 R2,RESALLOC get managers allocatable 0A9FA FA6CAA04 1 1771 JEQMW R1 INFINLIM manager has infinite limits 0A9FB FA2CA9EE 0 1772 JEQMW R0 BADSHOW can't give away huge at this point 0A9FC 60568801 1 2 BASE 1773 LD R1 R2,RESALLOCD get amount allocated so far 0A9FD FA6CA9EE 1 1774 JEQMW R1 BADSHOW already over the limit 1775 * \ / 1776 0000A9FE 1777 DOUPDATE LABEL 0A9FE 18124000 0 1 REG 1778 ADD R0 R1 combine with changing amount 0A9FF 68168800 0 2 BASE 1779 UCPR R0 R2,RESALLOC over the limit 0AA00 FE04A9EE 1780 JGT BADSHOW jump if this is the case 0AA01 E4168801 0 2 BASE 1781 ST R0 R2,RESALLOCD else, update allocated amount 1782 * \ / 1783 0000AA02 1784 GOODRTN LABEL 0AA02 EC120000 0 REG 1785 STZ R0 indicate all went well 0AA03 5D178800 6 BASE 1786 LEAVE SP,RRETAD return to caller 1787 * --- 1788 0000AA04 1789 INFINLIM LABEL 0AA04 60568801 1 2 BASE 1790 LD R1 R2,RESALLOCD get amount allocated 0AA05 FA6CAA02 1 1791 JEQMW R1 GOODRTN just exit if no update needed 0AA06 FE0EA9FE 1792 JMP DOUPDATE change allocated amount 1793 * --- 1794 0000AA07 1795 SETMGRPTR LABEL 0AA07 38968804 2 2 BASE 1796 LEA R2 R2,AUTHDSK pointer to account limits 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2359 (XRQOPRRCVR) F 143 OPREQs for recover 0AA08 38968806 2 2 BASE 1797 LEA R2 R2,AUTHSDSK pointer to saved limits 1798 0000AA09 1799 GETLIMITS LABEL 0AA09 6216C804 013 BASE 1800 LD2 R0 R3,AUTHDSK get account limits 0AA0A 6216C806 013 BASE 1801 LD2 R0 R3,AUTHSDSK get saved limits 1802 1803 END ADJMGR[CPU|DSKL|SDSK] subroutines 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2360 (XRQOPRRCVR) F 143 OPREQs for recover 1805 1806 ********************************************************************************** 1807 * * 1808 * CHECKBUFF * 1809 * This will check if the user has given us enough buffer space * 1810 * to do the recovery. * 1811 * Call: * 1812 * R0 <= type of backup info. * 1813 * JSR R3 CHECKBUFF * 1814 * JMP <not enough space> * 1815 * * 1816 * Eats: R0:R1,R3. * 1817 * * 1818 ********************************************************************************** 1819 1820 BLOCK CHECKBUFF routine 1821 ENTRY CHECKBUFF 1822 0000AA0B 1823 CHECKTAB LABEL 0AA0B 0000AA17 1824 ADR HARDER FILEINFOTV, volume info 0AA0C 0000AA17 1825 ADR HARDER FILEINFOTA, account info 0AA0D 0000AA17 1826 ADR HARDER FILEINFOTF, file info 0AA0E 0000AA19 1827 ADR SIMPLE FILEINFOTD, file data info (moved) 0AA0F 0000AA19 1828 ADR SIMPLE FILEINFOTM, file data info (mapped) 1829 0000AA10 1830 CHECKTABLS LABEL 0AA10 0000102C 1831 VFD CPW*(WPP+FBILNTH) 0AA11 00000180 1832 VFD CPW*(UDFDLIST DISP UD) 0AA12 00000060 1833 VFD CPW*FDLNTH 0AA13 00001004 1834 VFD CPW*(WPP+1) 0AA14 00000004 1835 VFD CPW*1 1836 0000AA15 1837 CHECKBUFF LABEL 0AA15 6060AA10 1 0 1838 LD R1 CHECKTABLS(R0) fixed length to move 0AA16 5CA0AA0B 0 1839 LDPC CHECKTAB(R0) routine to execute 1840 * --- 1841 0000AA17 1842 HARDER LABEL 0AA17 184980F3 1 6 ZBM 1843 ADD R1 SP,HDRLENS/FSTBKUPLEN length of first variable record 0AA18 18499F13 1 6 ZBM 1844 ADD R1 SP,HDRLENS/SNDBKUPLEN length of second variable record 1845 * \ / 1846 0000AA19 1847 SIMPLE LABEL 0AA19 64578801 1 6 BASE 1848 CPR R1 SP,UBUFSIZE check aginst size 0AA1A FE04AA1C 1849 JGT BADRETURN jump if not enough 0AA1B 18C40001 3 IMM 1850 ADD R3 1 go to P+2 1851 * \ / 1852 0000AA1C 1853 BADRETURN LABEL 0AA1C 5C92C000 3 REG 1854 LDPC R3 return to caller 1855 * --- 1856 1857 END CHECKBUFF routine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2361 (XRQOPRRCVR) F 143 OPREQs for recover 1859 1860 ********************************************************************************** 1861 * * 1862 * EXCHANGEPG * 1863 * This routine puts in a call to the MS driver for an * 1864 * address switch on our block. * 1865 * Note that there cannot be a PPL made yet for the destination * 1866 * disk block. * 1867 * Call: * 1868 * FCB <= file control block * 1869 * FCB,FCBLOCK <= DA of destination block * 1870 * CALLNP EXCHANGEPG * 1871 * * 1872 * Eats R0:R4 * 1873 * Stack required = 7. Special stack usage. * 1874 * 0 + max ( DISCARDPAL (4), FINDPAL (1), GRUBPAGE (7), * 1875 * LOCKWAIT (0), MSREADREQ (1), SUSPENDME (0), * 1876 * UNLOPAL (0) ) * 1877 * * 1878 ********************************************************************************** 1879 0AA1D DD578800 6 BASE 1880 EXCHANGEPG ENTRNP SP,RRETAD 0AA1E 60D78804 3 6 BASE 1881 LD R3 SP,UPAGENUM get users page number 0AA1F DC40330C 1882 CALLNP FINDPAL find any PAL corresponding 0AA20 FE0EAA29 1883 JMP EXCNOPAL jump if no PAL matching 0AA21 DC402623 1884 CALLNP UNLOPAL unload the page file 0AA22 5C098010 6 ZBM 1885 CMZ SP,RRETAD/BIT 0 check sign in callers R7 0AA23 FE02AA25 1886 JEQ LEVEDBIT jump if not swapping 0AA24 EC091C12 4 ZBM 1887 STZ PAL,PAMODIFIED no sense writing out this page 0000AA25 1888 LEVEDBIT LABEL 0AA25 DC402E15 1889 CALLNP DISCARDPAL throw away the PAL, moving page to idle list 0AA26 60C00412 3 1890 LD R3 CPPSA get users PSA pointer 0AA27 D048C0F2 3 ZBM 1891 DEC R3,PSWSSIZE indicate working set shrunk 0AA28 0C800000 1892 ION matches FINDPAL 0000AA29 1893 EXCNOPAL LABEL 1894 1895 * Do our exchange 1896 PLOCK MSQINLOCK lock mass storage input queues 0AA29 0CC00000 1896 IOFF 0AA2A D1C01F16 1896 SETT MSQINLOCK 0AA2B FE0CAA2D 1896 JNE MA(2+DISPW MA 0) 0AA2C DC40308B 1896 CALLNP LOCKWAIT 0AA2D 60974801 2 5 BASE 1897 LD R2 FCB,FCBLOCK pick up new disk address 0AA2E 61178805 4 6 BASE 1898 LD R4 SP,OTEMPTR and original disk address 0AA2F DC003936 1899 CALL MSREADREQ go start the pseudo-disk operation 0AA30 40440001 IMM 1900 PARVL 1*MSQSNEWAD indicating address switch 0AA31 60178808 0 6 BASE 1901 LD R0 SP,OTEM3 pick up pointer to extra PPL-FBI 0AA32 E4168803 0 2 BASE 1902 ST R0 R2,MSQXPTR and hook to MSQ element 1903 1904 * Suspend waiting for address switch to complete 0AA33 608400FF 2 IMM 1905 LD R2 NOSUCHVPN pick up secondary shutdown parameter (page num) 0AA34 60D74801 3 5 BASE 1906 LD R3 FCB,FCBLOCK pick up new disk address 0AA35 DC00351C 1907 CALL SUSPENDME call to await disk operation 0AA36 4100AA3A 1908 PAR EXCRSTRT indicate restart point 0AA37 4152C000 3 REG 1909 PARV R3 shutdown parameter (new disk address) 0AA38 41001DAB 1910 PAR SQMSWAIT where to suspend 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2362 (XRQOPRRCVR) F 143 OPREQs for recover 0AA39 40001F16 1911 PARL MSQINLOCK what to unlock after suspend 1912 * \ / 1913 0000AA3A 1914 EXCRSTRT LABEL restart after suspend 0AA3A 60178804 0 6 BASE 1915 LD R0 SP,UPAGENUM pick up user page number 0AA3B DC4030E4 1916 CALLNP GRUBPAGE and remove page from user 0AA3C 5D178800 6 BASE 1917 LEAVE SP,RRETAD return 1918 * --- 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2363 (XRQOPRRCVR) F 143 OPREQs for recover 1920 1921 ********************************************************************************** 1922 * * 1923 * This routine gets the 2 word header that I make in the * 1924 * backup information. We return in R0 the code for the type * 1925 * of information. * 1926 * Call: * 1927 * JSR R3 GETHEADER * 1928 * <return, R0 <= type> * 1929 * * 1930 * Eats R1:R3 * 1931 * Sets R0 * 1932 * Stack required = 1 * 1933 * 0 + max ( CLRMEMTRAP (1), SETMEMTRAP (1) ) * 1934 * * 1935 ********************************************************************************** 1936 1937 BLOCK GETHEADER routine 1938 ENTRY GETHEADER 1939 0000AA3D 1940 GETHEADER LABEL 0AA3D DC005BCF 1941 CALL SETMEMTRAP set up for user memory errors 0AA3E 40005B5F 1942 PARL PASSERRUP error recovery address 0AA3F 60040008 0 IMM 1943 LD R0 BKUPHDRLEN*CPW length of header in chars 0AA40 B0178801 0 6 BASE 1944 RSBM R0 SP,UBUFSIZE adjust size 0AA41 FE0859B0 1945 JLT FERRORPOB jump if not even enough for a header 0AA42 5C095A10 5 ZBM 1946 CMZ FCB,FCRELOC user or monitor relocation 0AA43 FE0CAA45 1947 JNE MONRELOC jump if call from within monitor 0AA44 59840040 IMM 1948 CLBMSR MSRFRELOC fetch from users memory 1949 * \ / 1950 0000AA45 1951 MONRELOC LABEL 0AA45 62578C02 126 FPVR 1952 LD2 R1 @(SP,UBUFAD) get two word header 0AA46 59C40040 IMM 1953 IORMSR MSRFRELOC restore fetch 0AA47 DC405BD4 1954 CALLNP CLRMEMTRAP release responsibility for user memory errors 0AA48 60040002 0 IMM 1955 LD R0 BKUPHDRLEN length of header 0AA49 98178802 0 6 BASE 1956 ADDM R0 SP,UBUFAD bump past header 0AA4A 60040000 0 IMM 1957 LD R0 REVBACKUP get the proper revision 0AA4B 640A5F10 0 1 CBM 1958 CPR R0 R1/BKUPREV is this incoming record okay? 0AA4C FE0C59A5 1959 JNE FERRORILOP illegal operation 1960 * \ / 0AA4D 600A40F0 0 1 CBM 1961 LD R0 R1/FILEINFOT get type of information 0AA4E E4978803 2 6 BASE 1962 ST R2 SP,HDRLENS and remember lengths of variable records 0AA4F 5C92C000 3 REG 1963 LDPC R3 exit this routine 1964 * --- 1965 1966 END GETHEADER routine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2364 (XRQOPRRCVR) F 143 OPREQs for recover 1968 1969 ********************************************************************************** 1970 * * 1971 * MOVETOUS * 1972 * Moves a block of data from the caller into our * 1973 * address space. We have already ensured that the callers * 1974 * buffer is long enough. * 1975 * Call: * 1976 * * 1977 * R1 = size in characters * 1978 * R2 = buffer address in monitor space * 1979 * JSR R3 MOVETOUS * 1980 * * 1981 * Eats R0,R2:R3. * 1982 * * 1983 ********************************************************************************** 1984 1985 BLOCK MOVETOUS routine 1986 ENTRY MOVETOUS 1987 0000AA50 1988 MOVETOUS LABEL 0AA50 B0578801 1 6 BASE 1989 RSBM R1 SP,UBUFSIZE remove space from buffer remaining 0AA51 60178802 0 6 BASE 1990 LD R0 SP,UBUFAD get requesters buffer address 0AA52 5C095A10 5 ZBM 1991 CMZ FCB,FCRELOC user or monitor relocation 0AA53 FE0CAA55 1992 JNE MONRELOC jump if call from within monitor 0AA54 59840040 IMM 1993 CLBMSR MSRFRELOC change relocation 1994 * \ / 1995 0000AA55 1996 MONRELOC LABEL 0AA55 DA880800 2 01 1997 MOVE R2 R0 R1 fetch the data 0AA56 59C40040 IMM 1998 IORMSR MSRFRELOC restore to monitor 0AA57 E4178802 0 6 BASE 1999 ST R0 SP,UBUFAD save advanced buffer address 0AA58 5C92C000 3 REG 2000 LDPC R3 return 2001 * --- 2002 2003 END MOVETOUS routine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2365 (XRQOPRRCVR) F 143 OPREQs for recover 2005 2006 ********************************************************************************** 2007 * * 2008 * PRODBLOCK * 2009 * This routine just calls for a new disk block. * 2010 * Call: * 2011 * FCB <= FCB of recovered account/file * 2012 * CALLNP PRODBLOCK * 2013 * <error return, R0 <= error code> * 2014 * FCB,FCMSBLK <= DA * 2015 * ULB <= account of file owner * 2016 * * 2017 * Eats R0:R1 * 2018 * Sets R4 * 2019 * Stack required = 15. Special stack usage. * 2020 * 0 + max ( GETFREEBLK (15), LIMITCHECK (1), RFIXFBI (1), * 2021 * SGETMEM (0) ) * 2022 * * 2023 ********************************************************************************** 2024 0AA59 DD578800 6 BASE 2025 PRODBLOCK ENTRNP SP,RRETAD 0AA5A 61095114 4 5 ZBM 2026 LD ULB FCB,FCLIMITPTR ULB for recovered account 0AA5B 60440001 1 IMM 2027 LD R1 1 adding one more block 0AA5C DC405C7B 2028 CALLNP LIMITCHECK do account limit checking 0AA5D FE0EAA65 2029 JMP PRODPGEXIT jump if limits exceeded 2030 * \ / 0AA5E DC003654 2031 CALL GETFREEBLK pick up a free block 0AA5F 4144000B IMM 2032 PARV FBITSYS indicate what type 0AA60 40494081 5 ZBM 2033 PARVL FCB,FCDRIVE and which volume 0AA61 FE04AA66 2034 JGT PRODPGOOS jump out if no room 0AA62 E4095181 0 5 ZBM 2035 ST R0 FCB,FCMSBLK save the address fetched 0AA63 D0094182 5 ZBM 2036 INC FCB,FCTFL add to file length 0AA64 19C40001 7 IMM 2037 ADD R7 1 advance to happy return 2038 * \ / 2039 0000AA65 2040 PRODPGEXIT LABEL 0AA65 5D178800 6 BASE 2041 LEAVE SP,RRETAD and return 2042 * --- 2043 0000AA66 2044 PRODPGOOS LABEL 0AA66 6004009D 0 IMM 2045 LD R0 XREQERNFSV no free storage on volume 0AA67 FE0EAA65 2046 JMP PRODPGEXIT return to caller 2047 * --- 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2366 (XRQOPRRCVR) F 143 OPREQs for recover 2049 2050 ********************************************************************************** 2051 * * 2052 * PRODUCEFBI * 2053 * This routine builds an FBI for the new block and * 2054 * returns it. * 2055 * Call: * 2056 * FCB * 2057 * FCB,FCMSBLK=DA * 2058 * CALL PRODUCEFBI * 2059 * PARVL <FBI type> * 2060 * <return> * 2061 * R3 <= PPL-FBI * 2062 * SP,OTEM1 <= new FBI type * 2063 * SP,OTEM3 <= pointer to PPL-FBI * 2064 * * 2065 * Eats R0:R3 * 2066 * Stack required = 1. Special stack usage. * 2067 * 0 + max ( RFIXFBI (1), SGETMEM (0) ) * 2068 * * 2069 ********************************************************************************** 2070 0AA68 DD178800 6 BASE 2071 PRODUCEFBI ENTR SP,RRETAD 0AA69 C0578806 6 BASE 2072 STPVL SP,OTEM1 save FBI type 0AA6A DC002ED0 2073 CALL SGETMEM pick up free space for the FBI 0AA6B 40440004 IMM 2074 PARVL PPFBLOG indicate its size 0AA6C E4178808 0 6 BASE 2075 ST R0 SP,OTEM3 save address 0AA6D 60D20000 3 0 REG 2076 LD R3 R0 copy pointer 0AA6E 60920000 2 0 REG 2077 LD R2 R0 copy pointer for fill and move 0AA6F 6044003C 1 IMM 2078 LD R1 PPFBLNTH*CPW length of fill 0AA70 FE580000 2079 CFILL 000 clear out the block 0AA71 EDC8D810 3 ZBM 2080 STW R3,DUALWPPL mark PPL as special 0AA72 3896C804 2 3 BASE 2081 LEA R2 R3,PPFBFBI make pointer to FBI part 0AA73 60178806 0 6 BASE 2082 LD R0 SP,OTEM1 retrieve FBI type 0AA74 E4088080 0 2 ZBM 2083 ST R0 R2,FBITYPE and place into FBI 0AA75 60174801 0 5 BASE 2084 LD R0 FCB,FCBLOCK pickup brand new DA 0AA76 E4089181 0 2 ZBM 2085 ST R0 R2,FBIDA set into FBI 0AA77 E416C801 0 3 BASE 2086 ST R0 R3,PPBLOCK and save in PPL part 0AA78 DC40AB35 2087 CALLNP RFIXFBI fix up other fields 0AA79 5D178800 6 BASE 2088 LEAVE SP,RRETAD 2089 * --- 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2367 (XRQOPRRCVR) F 143 OPREQs for recover 2091 2092 ********************************************************************************** 2093 * * 2094 * This is the RECOVERFDE routine. It basically sets or * 2095 * initializes certain fields in the FDE and FCB. Also if a * 2096 * large share list exists it is recovered. Upon entering * 2097 * here the directory has been locked and if we get a memory * 2098 * protect violation we will never return. * 2099 * Call: * 2100 * FCB <= FCB of recovered file * 2101 * CALLNP RECOVERFDE * 2102 * JMP <error, R0 = error code> * 2103 * * 2104 * Eats R0:R4 * 2105 * Stack required = 7. Special stack usage. * 2106 * 0 + max ( ALLOCPAGE (6), FREEDIR (5), GRUBWNDOx (7), * 2107 * SETMEMTRAP (1), SFREEMEM (0), SGETMEM (0) ) * 2108 * * 2109 ********************************************************************************** 2110 2111 BLOCK RECOVERFDE routine 2112 ENTRY RECOVERFDE 2113 0AA7A DD578800 6 BASE 2114 RECOVERFDE ENTRNP SP,RRETAD 0AA7B DC005BCF 2115 CALL SETMEMTRAP catch memory protect 0AA7C 4000AAB5 2116 PARL RCVRFDEMBD recovery address 0AA7D DC002ED0 2117 CALL SGETMEM get temporary FDE 0AA7E 40440005 IMM 2118 PARVL FDLNTH LOG 2 block size 0AA7F E4130000 0 4 REG 2119 ST R0 R4 make the address safe 0AA80 60920000 2 0 REG 2120 LD R2 R0 R2 <= source address 0AA81 60440060 1 IMM 2121 LD R1 CPW*FDLNTH FDE length in characters 0AA82 FAE8AA50 3 2122 JSR R3 MOVETOUS copy the FDE to us 2123 * \ / 0AA83 60D78805 3 6 BASE 2124 LD R3 SP,OTEMPTR pointer to current FDE 2125 * LEA R0 R4,FDNAME pointer to name from caller 2126 * LD R1 3*CPW name/extension length 2127 * LEA R2 R3,FDNAME original filename 2128 * CMS compare if they are equal 2129 * JNE RCVRERILOP jump if names not the same 2130 * \ / 2131 * Here we reset the fields in the FDE to represent the current 2132 * state of the file. 0AA84 6008C101 0 3 ZBM 2133 LD R0 R3,FDCUSE this is the current use count 0AA85 E4090101 0 4 ZBM 2134 ST R0 R4,FDCUSE critical when unequiping the file 0AA86 6217480B 015 BASE 2135 LD2 R0 FCB,FCNAME new filename 0AA87 E6170802 014 BASE 2136 ST2 R0 R4,FDNAME 0AA88 6017480D 0 5 BASE 2137 LD R0 FCB,FCNAMEEXT filename extension 0AA89 E4170804 0 4 BASE 2138 ST R0 R4,FDEXTEN 0AA8A 62174809 015 BASE 2139 LD2 R0 FCB,FCSERIAL new file serial number 0AA8B E617080A 014 BASE 2140 ST2 R0 R4,FDSERNO 0AA8C EDC93610 4 ZBM 2141 STW R4,FDGHOST mark this file as ghost 0AA8D EC091185 4 ZBM 2142 STZ R4,FDDA no root block set yet 0AA8E EC17080C 4 BASE 2143 STZ R4,FDACCESSES clear out use counts 0AA8F EC092810 4 ZBM 2144 STZ R4,FDLRAF indicate not a large RAF 0AA90 EC091186 4 ZBM 2145 STZ R4,FDLEN set file length at zero 0AA91 EC093C20 4 ZBM 2146 STZ R4,FDRAFTYPE indicate empty RAF 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2368 (XRQOPRRCVR) F 143 OPREQs for recover 0AA92 EC170811 4 BASE 2147 STZ R4,FDEND no end block yet 0AA93 60101EFD 0 @ 2148 LD R0 FILESUN get the current start up number 0AA94 E4170000 0 4 CACH 2149 ST R0 R4,FDSUN so counts don't get reset on next open 0AA95 38170814 0 4 BASE 2150 LEA R0 R4,FDSHL pointer to share list entry 0AA96 EC080010 0 ZBM 2151 STZ R0,0/SHLDSKFLGB indicate no share list on the disk 2152 * \ / 0AA97 60130000 0 4 REG 2153 LD R0 R4 this is the source address 0AA98 60440060 1 IMM 2154 LD R1 FDLNTH*CPW length of a FDE 0AA99 DAC80800 3 01 2155 MOVE R3 R0 R1 the file has just been recovered 2156 * \ / 2157 * Now we must fixup some fields in the FCB to reflect what 2158 * now exists in the FDE 0AA9A 60092A60 0 4 ZBM 2159 LD R0 R4,FDET reset the file type 0AA9B E4096665 0 5 ZBM 2160 ST R0 FCB,FCHTYPE 0AA9C 60170810 0 4 BASE 2161 LD R0 R4,FDEPP ending byte position 0AA9D E4174807 0 5 BASE 2162 ST R0 FCB,FCEPP 0AA9E EC094182 5 ZBM 2163 STZ FCB,FCTFL file length is zero 0AA9F EC095186 5 ZBM 2164 STZ FCB,FCEND no end block yet 2165 * \ / 0AAA0 DC002F5D 2166 CALL SFREEMEM return temporary FDE 0AAA1 41440005 IMM 2167 PARV FDLNTH LOG 2 block size 0AAA2 40530000 4 REG 2168 PARVL R4 block address 2169 * \ / 0AAA3 5C0980F3 6 ZBM 2170 CMZ SP,HDRLENS/FSTBKUPLEN is there a large share list? 0AAA4 FE02AAB1 2171 JEQ NOBIGSHARE jump if not 2172 * \ / 0AAA5 DC00AB1A 2173 CALL ALLOCPAGE get a page for us 0AAA6 40440012 IMM 2174 PARVL FBITFSLB type we want 0AAA7 FE0EAAB2 2175 JMP RECOVERXIT jump if no blocks available 2176 * \ / 0AAA8 DC005BCF 2177 CALL SETMEMTRAP catch memory errors 0AAA9 4000AAB3 2178 PARL RCVRSLBMBD recovery address 0AAAA 604980F3 1 6 ZBM 2179 LD R1 SP,HDRLENS/FSTBKUPLEN length of SLB 0AAAB 60840C00 2 IMM 2180 LD R2 ADR WNDO2 destination address 0AAAC FAE8AA50 3 2181 JSR R3 MOVETOUS move share list to us 0AAAD DC403153 2182 CALLNP GRUBWNDO2 write SLB to the disk 0AAAE 60D78805 3 6 BASE 2183 LD R3 SP,OTEMPTR pointer to new FDE 0AAAF 7D030000 4 IMM 2184 IOR R4 1*SHLDSKFLGB say it's a MS address 0AAB0 E516C814 4 3 BASE 2185 ST R4 R3,FDSHL set into directory 2186 * \ / 2187 0000AAB1 2188 NOBIGSHARE LABEL 0AAB1 19C40001 7 IMM 2189 ADD R7 1 advance return address 2190 * \ / 0000AAB2 2191 RECOVERXIT LABEL 0AAB2 5D178800 6 BASE 2192 LEAVE SP,RRETAD exit to caller 2193 * --- 2194 2195 *RCVRERILOP LABEL 2196 * LD R0 XREQERILOP illegal operation occurred 2197 * JMP RECOVERXIT return error to caller 2198 * --- 2199 0000AAB3 2200 RCVRSLBMBD LABEL 0AAB3 E6178806 016 BASE 2201 ST2 R0 SP,ERRCODES save away the error code 0AAB4 FE0EAAB9 2202 JMP MEMBDSHARE share code 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2369 (XRQOPRRCVR) F 143 OPREQs for recover 2203 * --- 2204 0000AAB5 2205 RCVRFDEMBD LABEL 0AAB5 E6178806 016 BASE 2206 ST2 R0 SP,ERRCODES save away the error code 0AAB6 DC002F5D 2207 CALL SFREEMEM return temporary FDE 0AAB7 41440005 IMM 2208 PARV FDLNTH LOG 2 block size 0AAB8 40530000 4 REG 2209 PARVL R4 block address 2210 * \ / 2211 0000AAB9 2212 MEMBDSHARE LABEL 0AAB9 DC403153 2213 CALLNP GRUBWNDO2 zap window 2 if mapped 0AABA DC403150 2214 CALLNP GRUBWNDO1 zap window 1 if mapped 0AABB 61095114 4 5 ZBM 2215 LD ULB FCB,FCLIMITPTR account owner of the file 0AABC DC405685 2216 CALLNP FREEDIR unlock directory 0AABD 62178806 016 BASE 2217 LD2 R0 SP,ERRCODES restore error codes 0AABE FE0E5B5F 2218 JMP PASSERRUP pass error to higher level 2219 * --- 2220 2221 END RECOVERFDE routine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2370 (XRQOPRRCVR) F 143 OPREQs for recover 2223 2224 ********************************************************************************** 2225 * * 2226 * This is the RCVRUDIR routine. It basically recovers * 2227 * a user directory from information obtained by the * 2228 * account backup request (its not quite that simple). * 2229 * In addition, if a share list or authlist exists these * 2230 * are recovered as well. The main goal is to keep the * 2231 * directory in a consistent state at ALL times. Note * 2232 * that if we get a memory protect violation we will * 2233 * never return. * 2234 * Call: * 2235 * R4 <= PPL for resident directory * 2236 * FCB <= FCB for a empty .DIR * 2237 * WNDO1 <= destination UDIR, locked * 2238 * CALLNP RCVRUDIR * 2239 * JMP <error, R0 = error code> * 2240 * * 2241 * Eats R0:R4 * 2242 * Stack required = 7. Special stack usage. * 2243 * 0 + max ( FREEDIR (5), GETFSEQN (1), GRUBWNDOx (1), * 2244 * MAPINFBI (2), MAPOUTFBI (2), SETMEMTRAP (1), * 2245 * SFREEMEM (0), SGETMEM (0) ) * 2246 * * 2247 ********************************************************************************** 2248 2249 BLOCK RCVRUDIR routine 2250 ENTRY RCVRUDIR 2251 0AABF DD578800 6 BASE 2252 RCVRUDIR ENTRNP SP,RRETAD 0AAC0 DC005BCF 2253 CALL SETMEMTRAP catch memory protect 0AAC1 4000AAEA 2254 PARL RCVUDIRMBD recovery address 0AAC2 DC002ED0 2255 CALL SGETMEM get temporary UDIR 0AAC3 40440007 IMM 2256 PARVL (UDFDLIST DISPW UD) LOG 2 block size 0AAC4 E4178808 0 6 BASE 2257 ST R0 SP,OTEM3 make the address safe 0AAC5 60920000 2 0 REG 2258 LD R2 R0 R2 <= source address 0AAC6 60440180 1 IMM 2259 LD R1 (UDFDLIST DISPW UD)*CPW UDIR size in characters 0AAC7 FAE8AA50 3 2260 JSR R3 MOVETOUS copy the UDIR to us 2261 * \ / 0AAC8 60D78808 3 6 BASE 2262 LD R3 SP,OTEM3 restore temporary UDIR address 0AAC9 3816C800 0 3 BASE 2263 LEA R0 R3,UDACCT point to account name from caller 0AACA 6044000C 1 IMM 2264 LD R1 3*CPW account/project length 0AACB 38800800 2 2265 LEA R2 WNDO1(UDACCT) original account name 0AACC FE540000 2266 CMS check if they are the same 0AACD FE0CAAE5 2267 JNE RCVRERILOP jump if names not the same 2268 * \ / 0AACE 5E16C820 3 BASE 2269 CMZ2 R3,UDSERNO see if serial number exists 0AACF FE0CAAD2 2270 JNE SNNOTZERO jump if serial number already set 0AAD0 DC404555 2271 CALLNP GETFSEQN get a new unique serial number 0AAD1 E616C820 013 BASE 2272 ST2 R0 R3,UDSERNO place into temporary directory 2273 * \ / 2274 0000AAD2 2275 SNNOTZERO LABEL 0AAD2 3816C83C 0 3 BASE 2276 LEA R0 R3,UDSHLLIST pointer to share list entry 0AAD3 EC080010 0 ZBM 2277 STZ R0,0/SHLDSKFLGB indicate not on the disk 0AAD4 EC16C840 3 BASE 2278 STZ R3,UDAUTHLIST say there is no auth list 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2371 (XRQOPRRCVR) F 143 OPREQs for recover 0AAD5 EC16C80A 3 BASE 2279 STZ R3,UDWORDB not a large directory 2280 * \ / 0AAD6 6012C000 0 3 REG 2281 LD R0 R3 this is the source address 0AAD7 60440180 1 IMM 2282 LD R1 (UDFDLIST DISPW UD)*CPW UDIR size 0AAD8 60840800 2 IMM 2283 LD R2 ADR (WNDO1) where to put the new directory info 0AAD9 DA880800 2 01 2284 MOVE R2 R0 R1 the account has just been recovered 2285 * \ / 0AADA DC002F5D 2286 CALL SFREEMEM return temporary UDIR 0AADB 41440007 IMM 2287 PARV (UDFDLIST DISPW UD) LOG 2 block size 0AADC 4052C000 3 REG 2288 PARVL R3 block address 2289 * \ / 0AADD DC002606 2290 CALL MAPINFBI gain access to the FBI 0AADE 40530000 4 REG 2291 PARVL R4 PPL address 0AADF 62800820 23 2292 LD2 R2 WNDO1(UDSERNO) get the account serial number 0AAE0 E6964808 231 BASE 2293 ST2 R2 R1,FBISERNO make sure FBI matches 0AAE1 DC40261B 2294 CALLNP MAPOUTFBI unmap FBI page 0AAE2 E6974809 235 BASE 2295 ST2 R2 FCB,FCSERIAL update the FCB as well 0AAE3 19C40001 7 IMM 2296 ADD R7 1 advance to good return 0AAE4 5D178800 6 BASE 2297 LEAVE SP,RRETAD return to caller 2298 * --- 2299 0000AAE5 2300 RCVRERILOP LABEL 0AAE5 DC002F5D 2301 CALL SFREEMEM return temporary UDIR 0AAE6 41440007 IMM 2302 PARV (UDFDLIST DISPW UD) LOG 2 block size 0AAE7 4052C000 3 REG 2303 PARVL R3 block address 0AAE8 60040091 0 IMM 2304 LD R0 XREQERILOP illegal operation code 0AAE9 5D178800 6 BASE 2305 LEAVE SP,RRETAD return to caller 2306 * --- 2307 0000AAEA 2308 RCVUDIRMBD LABEL 0AAEA E6178806 016 BASE 2309 ST2 R0 SP,ERRCODES save away the error code 0AAEB 60D78808 3 6 BASE 2310 LD R3 SP,OTEM3 restore temp UDIR address 0AAEC DC002F5D 2311 CALL SFREEMEM return temporary UDIR 0AAED 41440007 IMM 2312 PARV (UDFDLIST DISPW UD) LOG 2 block size 0AAEE 4052C000 3 REG 2313 PARVL R3 block address 0AAEF DC403150 2314 CALLNP GRUBWNDO1 zap window 1 if mapped 0AAF0 61095114 4 5 ZBM 2315 LD ULB FCB,FCLIMITPTR account owner of the file 0AAF1 DC405685 2316 CALLNP FREEDIR unlock directory 0AAF2 62178806 016 BASE 2317 LD2 R0 SP,ERRCODES restore error codes 0AAF3 FE0E5B5F 2318 JMP PASSERRUP pass error to higher level 2319 * --- 2320 2321 END RCVRUDIR routine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2372 (XRQOPRRCVR) F 143 OPREQs for recover 2323 2324 ********************************************************************************** 2325 * * 2326 * SETUPDIR subroutine. This routine is specifically designed * 2327 * for the backup recover account requests. There are currently two * 2328 * flavors of recover account and both requests use this routine. * 2329 * Call: * 2330 * LD FCB <= FCB of target account * 2331 * LD ULB <= ULB of target account * 2332 * CALLNP SETUPDIR * 2333 * JMP <error, R0 <= error code> * 2334 * <return, WNDO1 locked, R4 <= PPL address> * 2335 * * 2336 * Eats R0:R3. * 2337 * Sets R4. * 2338 * Stack required = 7. Special stack usage. * 2339 * 0 + max ( FETCHDIR (4), FREEDIR (5), GRUBWNDO1 (7), * 2340 * MAPOUTFBI (2), SETWNDO1 (4) ) * 2341 * * 2342 ********************************************************************************** 2343 2344 BLOCK SETUPDIR subroutine 2345 ENTRY SETUPDIR 2346 0AAF4 DD578800 6 BASE 2347 SETUPDIR ENTRNP SP,RRETAD 0AAF5 60096665 0 5 ZBM 2348 LD R0 FCB,FCHTYPE get the file type 0AAF6 64040005 0 IMM 2349 CPR R0 HTYPEDIR is this a DIR? 0AAF7 FE0CAB16 2350 JNE SUDIRILOP illegal operation if not 2351 * \ / 0AAF8 FAE8AA3D 3 2352 JSR R3 GETHEADER get header made by backup request 0AAF9 64040001 0 IMM 2353 CPR R0 FILEINFOTA is this account information? 0AAFA FE0CAB16 2354 JNE SUDIRILOP illegal operation if not 2355 * \ / 0AAFB FAE8AA15 3 2356 JSR R3 CHECKBUFF does caller have enough resource 0AAFC FE0EAB18 2357 JMP SUDIRPOB give parameter out of bounds if not 2358 * \ / 0AAFD 6009118E 0 4 ZBM 2359 LD R0 ULB,ULDSKUSD make sure account is completly empty 0AAFE 64040001 0 IMM 2360 CPR R0 1 this covers the directory block itself 0AAFF FE0CAB16 2361 JNE SUDIRILOP jump if account not empty 2362 * \ / 0AB00 DC405667 2363 CALLNP FETCHDIR gain exclusive access to directory 0AB01 DC003205 2364 CALL SETWNDO1 map in the directory 0AB02 41440002 IMM 2365 PARV VPCNTLW+VPCNTLLK writable and locked 0AB03 41534000 5 REG 2366 PARV FCB associated FCB 0AB04 4100AB0F 2367 PAR SUDIRDSE disk error recovery address 0AB05 41570801 4 BASE 2368 PARV ULB,ULBLOCK MS address of directory 0AB06 40440009 IMM 2369 PARVL FBITUDIR1 type of block expected 0AB07 6112C000 4 3 REG 2370 LD R4 R3 copy PPL address 0AB08 DC40261B 2371 CALLNP MAPOUTFBI FBI is unneeded right now 2372 * \ / 0AB09 6000083C 0 2373 LD R0 WNDO1(UDSHLLIST) is there already a share list? 0AB0A F600AB14 0 2374 JBT R0/SHLDSKFLG RCVACILOP jump if so 0AB0B 5C000840 2375 CMZ WNDO1(UDAUTHLIST) is there an authlist present? 0AB0C FE0CAB14 2376 JNE RCVACILOP error if so 0AB0D 19C40001 7 IMM 2377 ADD R7 1 advance to good return 2378 * \ / 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2373 (XRQOPRRCVR) F 143 OPREQs for recover 2379 0000AB0E 2380 SUDIREXIT LABEL 0AB0E 5D178800 6 BASE 2381 LEAVE SP,RRETAD return to caller 2382 * --- 2383 0000AB0F 2384 SUDIRDSE LABEL 0AB0F DC40261B 2385 CALLNP MAPOUTFBI unmap FBI window 0AB10 DC403150 2386 CALLNP GRUBWNDO1 unmap window containing directory 0AB11 DC405685 2387 CALLNP FREEDIR release access to directory 0AB12 6004009F 0 IMM 2388 LD R0 XREQERDSE disk structure error 0AB13 FE0EAB0E 2389 JMP SUDIREXIT return error to caller 2390 * --- 2391 0000AB14 2392 RCVACILOP LABEL 0AB14 DC403150 2393 CALLNP GRUBWNDO1 unmap window containing directory 0AB15 DC405685 2394 CALLNP FREEDIR release access to directory 0000AB16 2395 SUDIRILOP LABEL 0AB16 60040091 0 IMM 2396 LD R0 XREQERILOP illegal operation on device 0AB17 FE0EAB0E 2397 JMP SUDIREXIT return error to caller 2398 * --- 2399 0000AB18 2400 SUDIRPOB LABEL 0AB18 60040082 0 IMM 2401 LD R0 XREQERPOB parameter is out of bounds 0AB19 FE0EAB0E 2402 JMP SUDIREXIT return error to caller 2403 * --- 2404 2405 END SETUPDIR subroutine 2406 2407 2408 END OPRECOVER routines 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2374 (XRQOPRRCVR) F 143 OPREQs for recover 2410 2411 ********************************************************************************** 2412 * * 2413 * ALLOCPAGE * 2414 * * 2415 * This routine calls SETWNDO to get us a brand new zero * 2416 * page in window 2. The FBI is fixed up to indicate that it * 2417 * belongs to us and the limits are adjusted and checked for * 2418 * exceeding session and account lmits. This does not apply to * 2419 * whole volume recover, since each account is supposed to be * 2420 * recovered perfectly. However, with selective backup this is * 2421 * another can of worms entirely. * 2422 * Call: * 2423 * FCB => FCB * 2424 * CALL ALLOCPAGE eats R0:R4 before taking parameters * 2425 * PARVL <FBI type we want for page> * 2426 * <error return, R0 <= error code, no block mapped> * 2427 * <return, page mapped into wndo2> * 2428 * <R4 <= MS address> * 2429 * <R3 <= PPL> * 2430 * * 2431 * Eats R0:R2. * 2432 * Sets R3,R4. * 2433 * Stack required = 6 * 2434 * 2 + max ( LIMITCHECK (1), MAPOUTFBI (2), RFIXFBI (1), * 2435 * SETWNDO2 (4) ) * 2436 * * 2437 ********************************************************************************** 2438 2439 BLOCK ALLOCPAGE routine 2440 ENTRY ALLOCPAGE 2441 2442 BEGFRAME 00178801 6 BASE 2443 ERRCODE BSS 1 error code temp 2444 ENDFRAME 2445 0AB1A DD9F8002 6 STAK 2446 ALLOCPAGE ENTRS PUSH 0AB1B 61095114 4 5 ZBM 2447 LD ULB FCB,FCLIMITPTR ULB for recovered account 0AB1C 60440001 1 IMM 2448 LD R1 1 trying to add one block 0AB1D DC405C7B 2449 CALLNP LIMITCHECK check for limit overflow 0AB1E FE0EAB31 2450 JMP ALLOCOVER jump if limit reached 2451 * \ / 0AB1F DCD3C000 7 REG 2452 EXPCS R7 go get parameter 0AB20 C0530000 4 REG 2453 STPVL R4 get FBI block type 0AB21 DC0031FF 2454 CALL SETWNDO2 map in the block 0AB22 4144000A IMM 2455 PARV VPCNTLW+VPCNTLLK+VPZEROPG pass VPCNTL field 0AB23 41534000 5 REG 2456 PARV FCB lun associated 0AB24 4100AB2D 2457 PAR NOBLKRTN where to go on error 0AB25 41574801 5 BASE 2458 PARV FCB,FCBLOCK only needs volume number 0AB26 6004007F 0 IMM 2459 LD R0 FBITFREE type we had before 0AB27 E40B2470 0 4 CBM 2460 ST R0 R4/VPFBIOLDB put old expected 0AB28 40530000 4 REG 2461 PARVL R4 pass the field 2462 * \ / 0AB29 DC40AB35 2463 CALLNP RFIXFBI fixup FBI 0AB2A 61089181 4 2 ZBM 2464 LD R4 R2,FBIDA get the address 0AB2B D0094182 5 ZBM 2465 INC FCB,FCTFL add to file length 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2375 (XRQOPRRCVR) F 143 OPREQs for recover 0AB2C 19C40001 7 IMM 2466 ADD R7 1 advance to good return 2467 * \ / 2468 0000AB2D 2469 NOBLKRTN LABEL 0AB2D E4178801 0 6 BASE 2470 ST R0 SP,ERRCODE save error code, if any 0AB2E DC40261B 2471 CALLNP MAPOUTFBI unmap FBI 2472 * \ / 2473 0000AB2F 2474 ALLOCEXIT LABEL 0AB2F 60178801 0 6 BASE 2475 LD R0 SP,ERRCODE restore error code, if any 0AB30 5D1F8002 6 STAK 2476 LEAVE POP return 2477 * --- 2478 0000AB31 2479 ALLOCOVER LABEL 0AB31 E4178801 0 6 BASE 2480 ST R0 SP,ERRCODE save real error code 0AB32 DCD3C000 7 REG 2481 EXPCS R7 return to get parameter 0AB33 C0520000 0 REG 2482 STPVL R0 useless information at this point 0AB34 FE0EAB2F 2483 JMP ALLOCEXIT return to caller 2484 * --- 2485 2486 END ALLOCPAGE routine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2376 (XRQOPRRCVR) F 143 OPREQs for recover 2488 2489 ********************************************************************************** 2490 * * 2491 * RFIXFBI * 2492 * * 2493 * This routine fixes up the FBI currently pointed to by R2. * 2494 * Call: * 2495 * R2 <= FBI * 2496 * FCB <= FCB * 2497 * CALLNP RFIXFBI * 2498 * <return> * 2499 * * 2500 * Eats R0:R1 * 2501 * Stack required = 1 * 2502 * * 2503 ********************************************************************************** 2504 2505 BLOCK RFIXFBI routine 2506 ENTRY RFIXFBI 2507 2508 BEGFRAME 2509 ENDFRAME 2510 0AB35 DD5F8001 6 STAK 2511 RFIXFBI ENTRNP PUSH 0AB36 60495114 1 5 ZBM 2512 LD R1 FCB,FCLIMITPTR get pointer to limits 0AB37 60164804 0 1 BASE 2513 LD R0 R1,ULACCPROJ division-project of this guy 0AB38 E4168807 0 2 BASE 2514 ST R0 R2,FBIPROJ and put in FBI 0AB39 62164802 011 BASE 2515 LD2 R0 R1,ULACCNM get account name of this guy 0AB3A E6168805 012 BASE 2516 ST2 R0 R2,FBIACCT and put in FBI 0AB3B 62174809 015 BASE 2517 LD2 R0 FCB,FCSERIAL serial number of lun 0AB3C E6168808 012 BASE 2518 ST2 R0 R2,FBISERNO and put in FBI 0AB3D 60094148 0 5 ZBM 2519 LD R0 FCB,FCCBLK current position 0AB3E E4089184 0 2 ZBM 2520 ST R0 R2,FBIRELBLK and put in FBI 0AB3F 5D1F8001 6 STAK 2521 LEAVE POP 2522 * --- 2523 2524 END RFIXFBI routine 2525 2526 END maintenance and backup requests 211 INPUT OPRMONITOR system monitors and information 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2377 (OPRMONITOR) F 144 OPREQ - Start and Stop Various Monitors 3 4 ********************************************************************************** 5 * * 6 * OPREQs to Start/Stop Various System Monitors. * 7 * Each of these monitors works by allocating a large * 8 * block of monitor memory. This block is used to receive * 9 * input from the various monitors. XREQs are provided to * 10 * read this block, generally with the option of stopping * 11 * the montoring activity or not. * 12 * The monitors are: * 13 * Trace. * 14 * Trace records the execution of pre-assembled macros * 15 * according to their class. Generally, a separate * 16 * class is provided for each I/O driver, etc. * 17 * Monitor. * 18 * Monitor is a statistical histogram of instruction * 19 * execution. One CPU is dedicated to sampling the * 20 * other CPUs. It periodicly samples each other CPU * 21 * and records its current instruction relocation and * 22 * PC in the corresponding bucket. Bucket sizes and * 23 * base are determined by the caller. * 24 * Dynamic Monitor. * 25 * Dynamic Monitoring provides a statistical histogram * 26 * (as Monitor) of calls to PLOCK that find the lock * 27 * busy. * 28 * XMON. * 29 * The XREQ monitor increments the appropriate bucket * 30 * once for each XREQ executed. * 31 * * 32 * * 33 * Stack required = 3 * 34 * 0 + max ( STRTDTNW (2), STRTMON (2), STRTTRACE (3), * 35 * STRTXMON (2) ) * 36 * * 37 ********************************************************************************** 38 39 BLOCK Start/Stop Monitor OPREQs 40 ENTRY OPRSTRTMON 41 ENTRY OPRSTOPMON 42 43 44 BLOCK OPRSTRTMON routine 45 ENTRY OPRSTRTMON 46 0000AB40 47 OPRSTRTMON LABEL 0AB40 68840004 2 IMM 48 UCPR R2 STRTFUNMAX request within range? 0AB41 FE0659D8 49 JGE ILLREQ jump if not 0AB42 5CA4AB43 2 50 LDPC STRTFUNJMP(R2) go do it 51 * --- 52 0000AB43 53 STRTFUNJMP LABEL 0AB43 0000AB47 54 ADR STRTTRACE start system trace 0AB44 0000AB5A 55 ADR STRTMON start system monitor 0AB45 0000ABB2 56 ADR STRTDYNW start dynamic trace monitor 0AB46 0000AB74 57 ADR STRTXMON start XREQ call monitor 00000004 ABS 58 STRTFUNMAX EQU DISPW STRTFUNJMP 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2378 (OPRMONITOR) F 144 OPREQ - Start and Stop Various Monitors 59 60 END OPRSTRTMON routine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2379 (OPRMONITOR) F 144 OPREQ - Start and Stop Various Monitors 62 63 ********************************************************************************** 64 * * 65 * START TRACE. This operator request enables the system * 66 * trace routine. User call: * 67 * LD R0 ORSTRTTRC * 68 * LD R1 bits for events to be traced * 69 * OPREQ 0 * 70 * JLTZ R0 error * 71 * * 72 * Stack required = 3 * 73 * 0 + max ( GETPAGE (2), TRACEPROC (3), ZEROIT (1) ) * 74 * * 75 ********************************************************************************** 76 77 BLOCK STRTTRACE routine 78 ENTRY STRTTRACE 79 0000AB47 80 STRTTRACE LABEL 0AB47 5C001D29 81 CMZ TRACEADDR is tracing active? 0AB48 FE0CAB51 82 JNE TRACEON if yes, don't allocate another block 0AB49 D1401D2A 83 STMW TRACEINDEX index of last entry used 0AB4A D1401D2B 84 STMW TRACEGIVEN index of last entry returned to user 0AB4B DC40ABA5 85 CALLNP GETPAGE get a page for trace 0AB4C 60920000 2 0 REG 86 LD R2 R0 hold pointer to it 0AB4D DC003090 87 CALL ZEROIT clean it out 0AB4E 41168800 2 BASE 88 PAR R2,0 0AB4F 40440400 IMM 89 PARVL WPP 0AB50 E4801D29 2 90 ST R2 TRACEADDR set the pointer to it 91 * \ / 0000AB51 92 TRACEON LABEL 0AB51 6004001F 0 IMM 93 LD R0 31 highest bit number 0AB52 6040AB59 1 94 LD R1 TRACEINST pick up " CALLNP TRACEPROC " instruction 0AB53 38890013 2 4 ZBM 95 LEA R2 R4,CAR1/BIT 0 make bit address of caller's R1 0000AB54 96 TRACELOOP LABEL 0AB54 5C1A8400 20 @R 97 CMZ @R2(R0) is he requesting this class? 0AB55 FE02AB57 98 JEQ TRACENEXT jump if not 0AB56 E4601D2C 1 0 99 ST R1 TRACECALL(R0) else store instruction to turn it on 0000AB57 100 TRACENEXT LABEL 0AB57 FA26AB54 0 101 JDR R0 TRACELOOP loop through all classes 0AB58 FE0E59D6 102 JMP NOERROR all done! 103 * --- 104 0AB59 DC4038AA 105 TRACEINST CALLNP TRACEPROC instruction to enable tracing 106 107 END STRTTRACE routine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2380 (OPRMONITOR) F 144 OPREQ - Start and Stop Various Monitors 109 110 ********************************************************************************** 111 * * 112 * START INSTRUCTION MONITOR. This operator request will steal * 113 * one CPU from the system and cause it to start accumulating * 114 * statistics on where the system spends its CPU time. * 115 * User call: * 116 * LD R0 ORSTRTMON * 117 * LD R1 lowest PC to monitor * 118 * LD R2 bucket size * 119 * OPREQ 0 * 120 * JLTZ R0 error * 121 * * 122 * Stack required = 2 * 123 * 0 + max ( GETPAGE (2), ZEROIT (1) ) * 124 * * 125 ********************************************************************************** 126 127 BLOCK STRTMON routine 128 ENTRY STRTMON 129 0000AB5A 130 STRTMON LABEL 131 * check whether system can even do it 0AB5A D1C01D15 132 SETT IHBUSY are we already monitoring? 0AB5B FE0259EA 133 JEQ UERRORSIU jump if so - can't start again 0AB5C 60040093 0 IMM 134 LD R0 XREQERISYR next possible error (insufficient system resources) 0AB5D 60401CF7 1 135 LD R1 CPUCOUNT number of CPU's in system 0AB5E 64440001 1 IMM 136 CPR R1 1 are we the only one? 0AB5F FE0AAB72 137 JLE SMONEXIT jump if not enough CPU's 138 * \ / 139 140 * check user's parameters 0AB60 60040082 0 IMM 141 LD R0 XREQERPOB possible error (parameter out of bounds) 0AB61 60570803 1 4 BASE 142 LD R1 R4,CAR1 get low PC from users register 0AB62 FA48AB72 1 143 JLTZ R1 SMONEXIT jump if funny parameter 0AB63 E4401D16 1 144 ST R1 IHBASE remember lowest PC to monitor 0AB64 60570804 1 4 BASE 145 LD R1 R4,CAR2 get bucket size 0AB65 FA4AAB72 1 146 JLEZ R1 SMONEXIT really bad if bucket size is 0 0AB66 E4401D17 1 147 ST R1 IHBUKSIZE save bucket size for later 148 * \ / 149 150 ********************************************************************************** 151 * * 152 * Allocate space for data. Since we are allocating several whole * 153 * pages, we check to see whether there is a page available before * 154 * calling GETMEM. If not, we take a trip through the dispatcher * 155 * to give it a chance to replenish the supply. * 156 * * 157 ********************************************************************************** 158 * \ / 159 0AB67 60840001 2 IMM 160 LD R2 IHBLOCKN-1 max block number 0000AB68 161 STORLOOP LABEL 0AB68 DC40ABA5 162 CALLNP GETPAGE get a page 0AB69 60D20000 3 0 REG 163 LD R3 R0 keep pointer to it 0AB6A DC003090 164 CALL ZEROIT clean it out 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2381 (OPRMONITOR) F 144 OPREQ - Start and Stop Various Monitors 0AB6B 4116C800 3 BASE 165 PAR R3,0 0AB6C 40440400 IMM 166 PARVL WPP 0AB6D E4E41D18 3 2 167 ST R3 IHBLOCKS(R2) save pointer to it 0AB6E FAA6AB68 2 168 JDR R2 STORLOOP and get another 169 * \ / 170 0AB6F 60040010 0 IMM 171 LD R0 1*BIT FLMONITOR 0AB70 FC001CF6 0 172 IORM R0 FLAGS set flag requesting monitor 0AB71 FE0E59D6 173 JMP NOERROR all done! 174 * --- 175 176 * error return 0000AB72 177 SMONEXIT LABEL 0AB72 EC001D15 178 STZ IHBUSY we're not doing it after all 0AB73 FE0E5988 179 JMP UERROR go give the error 180 * --- 181 182 END STRTMON routine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2382 (OPRMONITOR) F 144 OPREQ - Start and Stop Various Monitors 184 185 ********************************************************************************** 186 * * 187 * START XREQ CALL MONITOR. This operator request enables * 188 * the routine in the XREQ interrupt processor to accumulate * 189 * in a histogram form the number of times each request is made. * 190 * * 191 * User call: * 192 * LD R0 ORSTRTXMON * 193 * OPREQ 0 * 194 * JLTZ R0 <error> * 195 * * 196 * Stack required = 2 * 197 * 0 + max ( GETPAGE (2), LOGXREQ (1), ZEROIT (1) ) * 198 * * 199 ********************************************************************************** 200 201 BLOCK STRTXMON routine 202 ENTRY STRTXMON 203 0000AB74 204 STRTXMON LABEL 0AB74 D1C01D1A 205 SETT XHBUSY are we already doing it? 0AB75 FE0259EA 206 JEQ UERRORSIU jump if so - can't start again 207 * \ / 208 209 ********************************************************************************** 210 * * 211 * Allocate space for data. Since we are allocating * 212 * several whole pages, we check to see whether there * 213 * is a page available before calling GETMEM. If not, * 214 * we take a trip through the dispatcher to give it a * 215 * chance to replenish the supply. * 216 * * 217 ********************************************************************************** 218 * \ / 219 0AB76 60840001 2 IMM 220 LD R2 XHBLOCKN-1 max block number 0000AB77 221 STORLOOP LABEL 0AB77 DC40ABA5 222 CALLNP GETPAGE get a page 0AB78 60D20000 3 0 REG 223 LD R3 R0 keep pointer to it 0AB79 DC003090 224 CALL ZEROIT clean it out 0AB7A 4116C800 3 BASE 225 PAR R3,0 0AB7B 40440400 IMM 226 PARVL WPP 0AB7C E4E41D1C 3 2 227 ST R3 XHBLOCKS(R2) save pointer to it 0AB7D FAA6AB77 2 228 JDR R2 STORLOOP and get another 0AB7E 60001D1C 0 229 LD R0 XHBLOCKS(0) get first block 0AB7F E4001D23 0 230 ST R0 FREQTAB use it for FREQs 0AB80 60001D1D 0 231 LD R0 XHBLOCKS(1) get second block 0AB81 E4001D25 0 232 ST R0 UREQTAB use half for UREQs 0AB82 38160A00 0 0 BASE 233 LEA R0 R0,(WPP/2) get other half 0AB83 E4001D26 0 234 ST R0 OPREQTAB use it for OPREQs, except ... 0AB84 381609FF 0 0 BASE 235 LEA R0 R0,((WPP/2)-1) use last word 0AB85 E4001D28 0 236 ST R0 BREAKTAB for BREAK 0AB86 6000AB89 0 237 LD R0 XREQINST get call instruction 0AB87 E4001D1B 0 238 ST R0 XHCHECK let XREQ proc log calls 0AB88 FE0E59D6 239 JMP NOERROR all done! 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2383 (OPRMONITOR) F 144 OPREQ - Start and Stop Various Monitors 240 * --- 241 0AB89 DC40AB8A 242 XREQINST CALLNP LOGXREQ routine to log XREQ calls 243 244 END STRTXMON routine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2384 (OPRMONITOR) F 144 OPREQ - Start and Stop Various Monitors 246 247 ********************************************************************************** 248 * * 249 * LOGXREQ. Subroutine to record the occurrence of an XREQ. * 250 * On entry, R2 should contain the XREQ instruction that * 251 * was executed, and R4 should point to the console area of * 252 * the requester. Since we have only two blocks in which to * 253 * record a total of three XREQ types, the UREQs and OPREQs * 254 * are combined in the second block, while the first block * 255 * is dedicated to FREQs. No other XREQ types are recorded. * 256 * N.B. It is slightly possible that someone could be stopping * 257 * the monitor while we are in this routine. To ensure that * 258 * we get a valid pointer from XHTABTAB, we use a list-type * 259 * lock (i.e. many readers OK, but exclusive writer). Made * 260 * easier because we needn't spin if writer present ... * 261 * because it only means the table is going away. Must still * 262 * check for nil pointer since stopper could finish by the * 263 * time we try to lock. * 264 * Call: * 265 * R2 = <XREQ instruction that trapped> * 266 * R4 = <user's console area> * 267 * CALLNP LOGXREQ * 268 * * 269 * Eats R0:R1 * 270 * Stack required = 1 * 271 * * 272 ********************************************************************************** 273 274 BLOCK LOGXREQ subroutine 275 ENTRY LOGXREQ 276 277 BEGFRAME 278 ENDFRAME 279 0AB8A DD5F8001 6 STAK 280 LOGXREQ ENTRNP PUSH 0AB8B 600A8E30 0 2 CBM 281 LD R0 R2/BITS 7:9 get the sub-op 0AB8C 68040008 0 IMM 282 UCPR R0 XREQCOUNT normal? 0AB8D FE04AB9C 283 JGT LXEXIT1 jump if not 0AB8E 60492CA2 1 4 ZBM 284 LD R1 R4,CAR0/XRFLDCODE get request code 0AB8F 64040007 0 IMM 285 CPR R0 BREAKOP is XREQ a breakpoint instruction? 0AB90 FE0CAB92 286 JNE R1OK jump if not 0AB91 60440000 1 IMM 287 LD R1 0 else, fake the request code 0000AB92 288 R1OK LABEL 0AB92 6860AB9D 1 0 289 UCPR R1 XREQMAXTAB(R0) is it in range? 0AB93 FE04AB9C 290 JGT LXEXIT1 ignore it if not 291 * \ / 292 293 * lock the table to get pointer 0AB94 0CC00000 294 IOFF interrupts off 0AB95 D0001D20 295 INC XHTABLCK account our use 0AB96 FE08AB9A 296 JLT LXEXIT forget it if table being zapped 0AB97 60201D21 0 0 297 LD R0 XHTABTAB(R0) get start of correct table 0AB98 FA30AB9A 0 298 JZA R0 LXEXIT jump if table already gone 0AB99 D01C0800 01 BASE 299 INC R0,0(R1) increment the counter 0000AB9A 300 LXEXIT LABEL 0AB9A D0401D20 301 DEC XHTABLCK say we're done 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2385 (OPRMONITOR) F 144 OPREQ - Start and Stop Various Monitors 0AB9B 0C800000 302 ION ints on 303 * \ / 304 0000AB9C 305 LXEXIT1 LABEL 0AB9C 5D1F8001 6 STAK 306 LEAVE POP return 307 * --- 308 309 ********************************************************************************** 310 * * 311 * This is a table of the current maximum values for the request * 312 * codes, indexed by XREQ type. Most types are unimplemented. * 313 * The FREQ entry is used as an index into a whole page, so it * 314 * should be no greater than 03FF. The UREQ and OPREQ entries * 315 * are indices into half-pages, so neither should be greater * 316 * than 01FF. Additionally, the BREAK XREQ is tucked into the * 317 * last word of the OPREQ half-page, so the max OPREQ should * 318 * be less than 01FE. * 319 * * 320 ********************************************************************************** 321 0000AB9D 322 XREQMAXTAB BASE 0AB9D 00000000 323 VFD 0 0AB9E 00000000 324 VFD 0 0AB9F 000002B0 325 VFD 02B0 FREQs 0ABA0 00000000 326 VFD 0 0ABA1 000001A0 327 VFD 01A0 UREQs 0ABA2 000001E0 328 VFD 01E0 OPREQs 0ABA3 00000000 329 VFD 0 0ABA4 00000000 330 VFD 0 BREAK instruction 331 DRCT 00000008 ABS 332 XREQCOUNT EQU DISPW XREQMAXTAB 333 334 END LOGXREQ subroutine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2386 (OPRMONITOR) F 144 OPREQ - Start and Stop Various Monitors 336 337 ********************************************************************************** 338 * * 339 * Routine to allocate a whole page without crashing * 340 * the system. * 341 * * 342 * Eats R0:R1. * 343 * Stack required = 2 * 344 * 2 + max ( SGETMEM (0), SUSPENDME (0) ) * 345 * * 346 ********************************************************************************** 347 348 BLOCK GETPAGE subroutine 349 ENTRY GETPAGE 350 351 BEGFRAME 00178801 6 BASE 352 JUNK BSS 1 something for SUSPENDME to decrement 353 ENDFRAME 354 0ABA5 DD5F8002 6 STAK 355 GETPAGE ENTRNP PUSH 0000ABA6 356 TRYAGAIN LABEL 0ABA6 5C001C79 357 CMZ WHOLEPAGE are there any pages? 0ABA7 FE0CABAF 358 JNE TRYGET jump if yes 0ABA8 60D38000 3 6 REG 359 LD R3 SP copy stack ptr for call 0ABA9 0CC00000 360 IOFF for SUSPENDME 0ABAA DC00351C 361 CALL SUSPENDME ride through the dispatcher 0ABAB 4100ABA6 362 PAR TRYAGAIN restart address 0ABAC 41440000 IMM 363 PARV 0 parameter 0ABAD 41001DAA 364 PAR SQRUNNABLE queue 0ABAE 4016C801 3 BASE 365 PARL R3,JUNK something to decrement 366 * --- 367 0000ABAF 368 TRYGET LABEL 0ABAF DC002ED0 369 CALL SGETMEM get a page 0ABB0 4044000A IMM 370 PARVL (WPP LOG 2) 0ABB1 5D1F8002 6 STAK 371 LEAVE POP R0 => page gotten 372 * --- 373 374 END GETPAGE subroutine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2387 (OPRMONITOR) F 144 OPREQ - Start and Stop Various Monitors 376 377 ********************************************************************************** 378 * * 379 * START DYNAMIC WAIT MONITOR. This operator request enables * 380 * the dynamic wait monitor (to find out where we spend time spinning * 381 * on locks). User call: * 382 * LD R0 ORSTRTDYNW * 383 * OPREQ 0 * 384 * JLTZ R0 error * 385 * * 386 * Stack required = 2 * 387 * 0 + max ( GETPAGE (2), ZEROIT (1) ) * 388 * * 389 ********************************************************************************** 390 391 BLOCK STRTDYNW routine 392 ENTRY STRTDYNW 393 0000ABB2 394 STRTDYNW LABEL 0ABB2 5C001D14 395 CMZ DYNBLOCK is it already going? 0ABB3 FE0C59EA 396 JNE UERRORSIU jump if yes 0ABB4 DC40ABA5 397 CALLNP GETPAGE get a page 0ABB5 60920000 2 0 REG 398 LD R2 R0 hold pointer to it 0ABB6 DC003090 399 CALL ZEROIT clean it out 0ABB7 41168800 2 BASE 400 PAR R2,0 0ABB8 40440400 IMM 401 PARVL DYNMAX 0ABB9 E4801D14 2 402 ST R2 DYNBLOCK save pointer to it 0ABBA FE0E59D6 403 JMP NOERROR and all done 404 * --- 405 406 END STRTDYNW routine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2388 (OPRMONITOR) F 144 OPREQ - Start and Stop Various Monitors 408 409 ********************************************************************************** 410 * * 411 * STOP MONITOR. Common entry point for OPREQ's to stop various * 412 * system monitors. Here we set up to stuff info into user's buffer. * 413 * * 414 * Stack required = 12 * 415 * 5 + max ( SETMEMTRAP (1), STOPDYNW (2), STOPMON (3), * 416 * STOPTRACE (7), STOPXMON (2) ) * 417 * * 418 ********************************************************************************** 419 420 BLOCK OPRSTOPMON routine 421 ENTRY OPRSTOPMON stop monitor routines 422 ENTRY USERERRS 423 ENTRY USERCORE 424 ENTRY USERLEN 425 ENTRY USERRELOC 426 427 BEGFRAME2 00178800 6 BASE 428 USERERRS BSS 2 error parameters if user memory error 00178802 6 BASE 429 USERCORE BSS 1 user buffer address 00178803 6 BASE 430 USERLEN BSS 1 size remaining in user buffer 00178804 6 BASE 431 USERRELOC BSS 1 relocation bit to change 432 ENDFRAME 433 0000ABBB 434 OPRSTOPMON LABEL 0ABBB EC1F8005 6 STAK 435 STZ PUSH allocate stack frame 0ABBC EE178800 6 BASE 436 STZ2 SP,USERERRS initialize error codes 0ABBD 61538000 5 6 REG 437 LD R5 SP R5 -> our frame hereinafter 0ABBE 600903F3 0 4 ZBM 438 LD R0 R4,CAR1/BITS 1:31 0ABBF E4178803 0 6 BASE 439 ST R0 SP,USERLEN save buffer size 0ABC0 60170804 0 4 BASE 440 LD R0 R4,CAR2 0ABC1 E4178802 0 6 BASE 441 ST R0 SP,USERCORE save core address 0ABC2 60170801 0 4 BASE 442 LD R0 R4,CAMSR 0ABC3 78040080 0 IMM 443 AND R0 MSRSRELOC 0ABC4 74040080 0 IMM 444 XOR R0 MSRSRELOC 0ABC5 E4178804 0 6 BASE 445 ST R0 SP,USERRELOC save relocation bit 0ABC6 DC005BCF 446 CALL SETMEMTRAP set user memory trap 0ABC7 4000ABE4 447 PARL MEMBAD 0ABC8 600ABA30 0 2 CBM 448 LD R0 R2/BITS 29:31 omit 08 bit of subfuction 0ABC9 68040004 0 IMM 449 UCPR R0 STOPFUNMAX is function code good? 0ABCA FE0659D8 450 JGE ILLREQ jump if not 0ABCB 6020ABD4 0 0 451 LD R0 STOPFUNTAB(R0) get processing routine address 0ABCC DC560400 0 @R 452 CALLNP @R0 call appropriate routine 0ABCD 62178800 016 BASE 453 LD2 R0 SP,USERERRS did we get an error? 0ABCE FA1C5B5F 01 454 JNEZ2 R0 PASSERRUP if yes, pass it up 0ABCF 60578803 1 6 BASE 455 LD R1 SP,USERLEN get buffer remaining 0ABD0 61000412 4 456 LD R4 CPPSA 0ABD1 61091F11 4 4 ZBM 457 LD R4 R4,PSCACHNP1 R4 -> caller's console area 0ABD2 E4570803 1 4 BASE 458 ST R1 R4,CAR1 pass back buffer remaining 0ABD3 FE0E59D6 459 JMP NOERROR all done 460 * --- 461 0000ABD4 462 STOPFUNTAB LABEL 0ABD4 0000ABE6 463 ADR STOPTRACE stop system trace 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2389 (OPRMONITOR) F 144 OPREQ - Start and Stop Various Monitors 0ABD5 0000AC27 464 ADR STOPMON stop instruction monitor 0ABD6 0000AC63 465 ADR STOPDYNW stop dynamic wait monitor 0ABD7 0000AC46 466 ADR STOPXMON stop XREQ call monitor 00000004 ABS 467 STOPFUNMAX EQU DISPW STOPFUNTAB 468 469 END OPRSTOPMON routine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2390 (OPRMONITOR) F 144 OPREQ - Start and Stop Various Monitors 471 472 ********************************************************************************** 473 * * 474 * Routine to move data to user buffer. * 475 * Call: * 476 * R0 = address of data * 477 * R1 = length, in characters * 478 * R5 = global stack frame * 479 * CALLNP MOVEDATA * 480 * * 481 * Eats R0:R2. * 482 * Stack required = 1 * 483 * * 484 ********************************************************************************** 485 486 BLOCK MOVEDATA subroutine 487 ENTRY MOVEDATA 488 ENTRY MEMBAD 489 490 BEGFRAME 491 ENDFRAME 492 0ABD8 DD5F8001 6 STAK 493 MOVEDATA ENTRNP PUSH 0ABD9 B0574803 1 5 BASE 494 RSBM R1 R5,USERLEN set buffer remaining 0ABDA 60974803 2 5 BASE 495 LD R2 R5,USERLEN get buffer remaining 0ABDB 50840000 2 IMM 496 MIN R2 0 0 or amount of overflow 0ABDC 18528000 1 2 REG 497 ADD R1 R2 corrected amount to move 0ABDD FA4AABE5 1 498 JLEZ R1 MOVERET jump if nothing to move 0ABDE 60974802 2 5 BASE 499 LD R2 R5,USERCORE get buffer address 0ABDF 59974804 5 BASE 500 CLBMSR R5,USERRELOC clear the relocation bit 0ABE0 FE400000 501 CMOVE move the data 0ABE1 59D74804 5 BASE 502 IORMSR R5,USERRELOC restore the relocation bit 0ABE2 E4974802 2 5 BASE 503 ST R2 R5,USERCORE save new address for data 0ABE3 FE0EABE5 504 JMP MOVERET and return 505 * --- 506 0000ABE4 507 MEMBAD LABEL here if user memory flaked out 0ABE4 E6174800 015 BASE 508 ST2 R0 R5,USERERRS save error parameters 509 * \ / 0000ABE5 510 MOVERET LABEL 0ABE5 5D1F8001 6 STAK 511 LEAVE POP return to caller 512 * --- 513 514 END MOVEDATA subroutine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2391 (OPRMONITOR) F 144 OPREQ - Start and Stop Various Monitors 516 517 ********************************************************************************** 518 * * 519 * STOP TRACE. This operator request stops the system trace * 520 * routine and returns any accumulated trace information. User call: * 521 * LD R0 ORSTOPTRC or ORGETTRC * 522 * LD R1 buffer size * 523 * LD R2 buffer address * 524 * OPREQ 0 * 525 * JLTZ R0 error * 526 * ST R1 buffer remaining * 527 * We get here by: * 528 * R2/BIT 28 on if ORGETTRC * 529 * SP = stack pointer * 530 * R5 = stack frame containing poop on user buffer * 531 * CALLNP STOPTRACE * 532 * * 533 * Eats R0:R4. * 534 * Stack required = 7 * 535 * 6 + max ( MOVEDATA (1), SFREEMEM (0) ) * 536 * * 537 ********************************************************************************** 538 539 BLOCK STOPTRACE subroutine 540 ENTRY STOPTRACE 541 542 BEGFRAME 00178801 6 BASE 543 TRBUFPTR BSS 1 area to free when done, if any 00178802 6 BASE 544 LOSTWORD1 BSS 1 fake trace entry for lost data 00178803 6 BASE 545 LOSTENTRIES BSS 1 fake trace entry for lost data 00178804 6 BASE 546 LOSTWORD3 BSS 1 fake trace entry for lost data 00178805 6 BASE 547 LOSTWORD4 BSS 1 fake trace entry for lost data 548 ENDFRAME 549 550 TRINFORD LIST 550 ********************************************************************************** 550 * * 550 * Information returned by the stop trace request. * 550 * * 550 ********************************************************************************** 550 0000ABE6 550 TIPROTO BASE R0 00080040 0 ZBM 550 TISLOT BSSB 4 slot number of CPU creating this entry 000808A0 0 ZBM 550 TIEVENT BSSB 10 class and event number 00081D20 0 ZBM 550 TITIME BSSB 18 right bits of clock 00160801 0 BASE 550 TIR0 BSS 1 contents of R0 at time of event 00160802 0 BASE 550 TIR1 BSS 1 contents of R1 at time of event 00160803 0 BASE 550 TIR2 BSS 1 contents of R2 at time of event 550 DRCT 00000004 ABS 550 TILENGTH EQU DISPW TIPROTO entry length 550 ORG TIPROTO 551 00000002 ABS 552 TILOG EQU TILENGTH LOG 2 00000100 ABS 553 TRENTNUM EQU WPP/TILENGTH max number of entries in buffer 00003080 BYTE 554 TRLOWPART EQU BITS (32-(TRENTNUM LOG 2)):31 portion of TRACEINDEX used 00000010 ABS 555 TRENTSLOP EQU 010 pad (for trace entries generated while 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2392 (OPRMONITOR) F 144 OPREQ - Start and Stop Various Monitors 556 * we are returning info to user) 557 0ABE6 DD5F8006 6 STAK 558 STOPTRACE ENTRNP PUSH 0ABE7 F6B8ABF0 2 559 JBT R2/BIT 28 NOSTOP jump if get info request 560 561 * Turn off all trace calls. 0ABE8 6004001F 0 IMM 562 LD R0 31 max bit number 0ABE9 6040AC26 1 563 LD R1 NOPZERO " NOP 0 " 0000ABEA 564 TRLOOP LABEL 0ABEA E4601D2C 1 0 565 ST R1 TRACECALL(R0) NOP out a trace call 0ABEB FA26ABEA 0 566 JDR R0 TRLOOP do all of them 567 0ABEC 61040000 4 IMM 568 LD R4 0 0ABED E1001D29 4 569 EXCH R4 TRACEADDR get and zero trace buffer pointer 0ABEE E5178801 4 6 BASE 570 ST R4 SP,TRBUFPTR save address for freeing 0ABEF FE0EABF2 571 JMP GIVEINFO go give info to user 572 * --- 573 0000ABF0 574 NOSTOP LABEL 0ABF0 EC178801 6 BASE 575 STZ SP,TRBUFPTR say we shouldn't free area 0ABF1 61001D29 4 576 LD R4 TRACEADDR get address of trace buffer 577 * \ / 578 0000ABF2 579 GIVEINFO LABEL 0ABF2 FB0259E4 4 580 JEQZ R4 UERRORNSE jump if tracing is not active 0ABF3 60C01D2A 3 581 LD R3 TRACEINDEX index of last entry used 0ABF4 60001D2B 0 582 LD R0 TRACEGIVEN index of last entry given to user 0ABF5 3012C000 0 3 REG 583 RSB R0 R3 number of entries in buffer 0ABF6 640400F0 0 IMM 584 CPR R0 TRENTNUM-TRENTSLOP have we (or are we about to) overflow? 0ABF7 FE0AAC02 585 JLE NOOVFL jump if no overflow 586 * \ / 587 * We have overflowed the trace buffer, or we are about to. The slop 588 * factor (TRENTSLOP) is due to the fact that more trace entries may 589 * be created between when we looked at the counters above and when 590 * we copy the info from the buffer to the user's area. We don't want 591 * any entries to get overlaid without the user knowing about it. 592 * \ / 593 0ABF8 100400F0 0 IMM 594 SUB R0 TRENTNUM-TRENTSLOP number of lost entries 0ABF9 E4178803 0 6 BASE 595 ST R0 SP,LOSTENTRIES save number 0ABFA D1578802 6 BASE 596 STMW SP,LOSTWORD1 build a fake entry (signifying lost data) 0ABFB D1578804 6 BASE 597 STMW SP,LOSTWORD3 0ABFC D1578805 6 BASE 598 STMW SP,LOSTWORD4 0ABFD 38178802 0 6 BASE 599 LEA R0 SP,LOSTWORD1 address of data to move 0ABFE 60440010 1 IMM 600 LD R1 TILENGTH*CPW length of data to move 0ABFF DC40ABD8 601 CALLNP MOVEDATA move fake entry to user area 0AC00 60178803 0 6 BASE 602 LD R0 SP,LOSTENTRIES 0AC01 98001D2B 0 603 ADDM R0 TRACEGIVEN say we gave those lost entries to user 0000AC02 604 NOOVFL LABEL 605 0AC02 64C01D2B 3 606 CPR R3 TRACEGIVEN have we given all there is? 0AC03 FE0AAC20 607 JLE DATAMOVED jump if yes 608 * \ / 609 610 * Time to give some trace info to the user. If the lower bits of 611 * TRACEGIVEN are less than the lower bits of R3 (TRACEINDEX), then 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2393 (OPRMONITOR) F 144 OPREQ - Start and Stop Various Monitors 612 * the trace entries do not wrap around the end of the trace buffer. 613 * Otherwise, they do. 614 615 * \ / 0AC04 E0C01D2B 3 616 EXCH R3 TRACEGIVEN say we got this stuff 0AC05 60CAF080 3 3 CBM 617 LD R3 R3/TRLOWPART isolate low bits 0AC06 60001D2B 0 618 LD R0 TRACEGIVEN 0AC07 64CA3080 3 0 CBM 619 CPR R3 R0/TRLOWPART did we wrap around? 0AC08 FE08AC17 620 JLT NOWRAP jump if wrapping did not occur 621 622 * Move data from entry number (R3+1) thru end of buffer 0AC09 60130000 0 4 REG 623 LD R0 R4 R0 -> start of buffer 0AC0A 6096D001 2 3 REG 624 LD R2 R3+1 index of first entry to move 0AC0B 988A1EF0 2 0 CBM 625 ADDM R2 R0/BITS 15:(31-TILOG) address of first entry 0AC0C 60441000 1 IMM 626 LD R1 CPP 0AC0D B08A41C0 2 1 CBM 627 RSBM R2 R1/BITS 0:(31-TILOG-(CPW LOG 2)) number of chars to move 0AC0E DC40ABD8 628 CALLNP MOVEDATA move the data to user area 629 630 * Move data from beginning of buffer through entry number (TRACEGIVEN) 0AC0F 60801D2B 2 631 LD R2 TRACEGIVEN 0AC10 608AB080 2 2 CBM 632 LD R2 R2/TRLOWPART isolate index part 0AC11 60969001 2 2 REG 633 LD R2 R2+1 index of last entry to move 0AC12 60130000 0 4 REG 634 LD R0 R4 address of first entry to move 0AC13 60440000 1 IMM 635 LD R1 0 0AC14 E48A41C0 2 1 CBM 636 ST R2 R1/BITS 0:(31-TILOG-(CPW LOG 2)) number of chars to move 0AC15 DC40ABD8 637 CALLNP MOVEDATA copy data to user area 0AC16 FE0EAC20 638 JMP DATAMOVED done moving data 639 * --- 640 0000AC17 641 NOWRAP LABEL 642 * Move data from entry (R3+1) thru entry (TRACEGIVEN). 0AC17 6096D001 2 3 REG 643 LD R2 R3+1 0AC18 608AB080 2 2 CBM 644 LD R2 R2/TRLOWPART R2 = index of first entry to move 0AC19 30C01D2B 3 645 RSB R3 TRACEGIVEN 0AC1A 60CAF080 3 3 CBM 646 LD R3 R3/TRLOWPART R3 = number of entries 0AC1B 60130000 0 4 REG 647 LD R0 R4 start of buffer 0AC1C 988A1EF0 2 0 CBM 648 ADDM R2 R0/BITS 15:(31-TILOG) address of first entry to move 0AC1D 60440000 1 IMM 649 LD R1 0 0AC1E E4CA41C0 3 1 CBM 650 ST R3 R1/BITS 0:(31-TILOG-(CPW LOG 2)) number of chars to move 0AC1F DC40ABD8 651 CALLNP MOVEDATA copy it to user area 652 * \ / 653 0000AC20 654 DATAMOVED LABEL 0AC20 61178801 4 6 BASE 655 LD R4 SP,TRBUFPTR ptr to area to free 0AC21 FB02AC25 4 656 JEQZ R4 TRDONE jump if we shouldn't free anything 0AC22 DC002F5D 657 CALL SFREEMEM free the trace page 0AC23 4144000A IMM 658 PARV (WPP LOG 2) 0AC24 40530000 4 REG 659 PARVL R4 660 0000AC25 661 TRDONE LABEL 0AC25 5D1F8006 6 STAK 662 LEAVE POP all done 663 * --- 664 0AC26 FEC00000 665 NOPZERO NOP 0 instruction to turn off tracing 666 667 END STOPTRACE subroutine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2394 (OPRMONITOR) F 144 OPREQ - Start and Stop Various Monitors 669 670 ********************************************************************************** 671 * * 672 * STOP INSTRUCTION MONITOR. This operator request stops * 673 * the system monitor routine and returns the accumulated information * 674 * to the user. * 675 * * 676 * User call: * 677 * LD R0 ORSTOPMON * 678 * LD R1 buffer size * 679 * LD R2 buffer address * 680 * OPREQ 0 * 681 * JLTZ R0 error * 682 * ST R1 buffer remaining * 683 * We get here by: * 684 * SP = stack pointer * 685 * R5 = frame containing poop on user buffer * 686 * CALLNP STOPMON * 687 * * 688 * Eats R0:R4. * 689 * Stack required = 3 * 690 * 2 + max ( MOVEDATA (1), SFREEMEM (0), SUSPENDME (0) ) * 691 * * 692 ********************************************************************************** 693 694 BLOCK STOPMON subroutine 695 ENTRY STOPMON 696 697 BEGFRAME 00178801 6 BASE 698 JUNK BSS 1 something for SUSPENDME to decrement 699 ENDFRAME 700 0AC27 DD5F8002 6 STAK 701 STOPMON ENTRNP PUSH 0AC28 6007FFFF 0 IMM 702 LD R0 -1 0AC29 E0001D15 0 703 EXCH R0 IHBUSY tell monitor CPU to stop 0AC2A FA04AC2D 0 704 JGTZ R0 STOPMON1 jump if it was active 0AC2B E4001D15 0 705 ST R0 IHBUSY restore busy word if not active 0AC2C FE0E59E4 706 JMP UERRORNSE and give error return 707 * --- 708 709 * Wait for the monitor CPU to go away. 0000AC2D 710 STOPMON1 LABEL 0AC2D 60D38000 3 6 REG 711 LD R3 SP 0AC2E 0CC00000 712 IOFF turn off interrupts to match SUSPENDME 0AC2F DC00351C 713 CALL SUSPENDME take a ride through the dispatcher 0AC30 4100AC34 714 PAR STOPMON2 restart address 0AC31 41440000 IMM 715 PARV 0 parameter 0AC32 41001DAA 716 PAR SQRUNNABLE queue 0AC33 4016C801 3 BASE 717 PARL R3,JUNK something to decrement 718 * --- 719 0000AC34 720 STOPMON2 LABEL 0AC34 5C001D15 721 CMZ IHBUSY has the other CPU responded? 0AC35 FE08AC2D 722 JLT STOPMON1 jump if noT 723 * \ / 724 * Copy data to user buffer 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2395 (OPRMONITOR) F 144 OPREQ - Start and Stop Various Monitors 725 * \ / 0AC36 60041D16 0 IMM 726 LD R0 ADR MONHDR get ptr to header info 0AC37 60440008 1 IMM 727 LD R1 MONHDRLEN and its length 0AC38 DC40ABD8 728 CALLNP MOVEDATA move to user 0AC39 61040000 4 IMM 729 LD R4 0 index into IHBLOCKS table 0000AC3A 730 STOPMON3 LABEL 0AC3A 60281D18 0 4 731 LD R0 IHBLOCKS(R4) 0AC3B 60441000 1 IMM 732 LD R1 CPP 0AC3C DC40ABD8 733 CALLNP MOVEDATA move a page to user area 0AC3D DC002F5D 734 CALL SFREEMEM free the page 0AC3E 4144000A IMM 735 PARV (WPP LOG 2) 0AC3F 40681D18 4 736 PARVL IHBLOCKS(R4) 0AC40 EC281D18 4 737 STZ IHBLOCKS(R4) destroy pointer to this page 0AC41 19040001 4 IMM 738 ADD R4 1 do next page 0AC42 65040002 4 IMM 739 CPR R4 IHBLOCKN at end? 0AC43 FE08AC3A 740 JLT STOPMON3 jump if not 0AC44 EC001D15 741 STZ IHBUSY say instruction monitor no longer busy 0AC45 5D1F8002 6 STAK 742 LEAVE POP return to caller 743 * --- 744 745 END STOPMON subroutine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2396 (OPRMONITOR) F 144 OPREQ - Start and Stop Various Monitors 747 ********************************************************************************** 748 * * 749 * STOP XREQ CALL MONITOR. This operator request disables * 750 * the XREQ monitor routine and returns the accumulated information * 751 * to the user. * 752 * An internal note: since another CPU could be already in * 753 * the LOGXREQ subroutine, we must interlock the clearing of the * 754 * XHTABTAB. Also, we must not free the blocks until after the * 755 * table is clear. This ensures that a non-zero pointer in the * 756 * XHTABTAB points to a valid (non-free!) table. * 757 * * 758 * User call: * 759 * LD R0 ORSTOPXMON * 760 * LD R1 buffer size * 761 * LD R2 buffer address * 762 * OPREQ 0 * 763 * JLTZ R0 error * 764 * ST R1 buffer remaining * 765 * * 766 * We get here by: * 767 * SP = stack pointer * 768 * R5 = frame containing poop on user buffer * 769 * CALLNP STOPXMON * 770 * * 771 * Eats R0:R2. * 772 * Stack required = 2 * 773 * 1 + max ( LOCKLIST (1), MOVEDATA (1), SFREEMEM (0), * 774 * UNLOCKLIST (1) ) * 775 * * 776 ********************************************************************************** 777 778 BLOCK STOPXMON subroutine 779 ENTRY STOPXMON 780 781 BEGFRAME 782 ENDFRAME 783 0AC46 DD5F8001 6 STAK 784 STOPXMON ENTRNP PUSH 0AC47 6000AC62 0 785 LD R0 NOPINST get weak instruction 0AC48 64001D1B 0 786 CPR R0 XHCHECK monitoring enabled? 0AC49 FE0259E4 787 JEQ UERRORNSE give error return if not 0AC4A E4001D1B 0 788 ST R0 XHCHECK disable logging 789 0AC4B DC003096 790 CALL LOCKLIST get a grip on the table 0AC4C 40001D20 791 PARL XHTABLCK lock word 0AC4D 38801D21 2 792 LEA R2 XHTABTAB get address of pointer table 0AC4E 60440020 1 IMM 793 LD R1 XHTABLEN length of table 0AC4F FE580000 794 CFILL 00 zero-fill the table 0AC50 DC0030A4 795 CALL UNLOCKLIST release grip on the table 0AC51 40001D20 796 PARL XHTABLCK lock word 797 * \ / 798 799 * Copy data to user buffer 800 * \ / 0AC52 60041D1E 0 IMM 801 LD R0 ADR XMONHDR get ptr to header info 0AC53 60440008 1 IMM 802 LD R1 XMONHDRLEN and its length 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2397 (OPRMONITOR) F 144 OPREQ - Start and Stop Various Monitors 0AC54 DC40ABD8 803 CALLNP MOVEDATA move to user 0AC55 61040000 4 IMM 804 LD R4 0 index into XHBLOCKS table 0000AC56 805 MOVEIT LABEL 0AC56 60281D1C 0 4 806 LD R0 XHBLOCKS(R4) address of data 0AC57 60441000 1 IMM 807 LD R1 CPP bytes per page 0AC58 DC40ABD8 808 CALLNP MOVEDATA move a page to user area 0AC59 DC002F5D 809 CALL SFREEMEM free the page 0AC5A 4144000A IMM 810 PARV (WPP LOG 2) full size 0AC5B 40681D1C 4 811 PARVL XHBLOCKS(R4) address 0AC5C EC281D1C 4 812 STZ XHBLOCKS(R4) destroy pointer to this page 0AC5D 19040001 4 IMM 813 ADD R4 1 do next page 0AC5E 65040002 4 IMM 814 CPR R4 XHBLOCKN at end? 0AC5F FE08AC56 815 JLT MOVEIT jump if not 816 * \ / 817 0AC60 EC001D1A 818 STZ XHBUSY say instruction monitor no longer busy 0AC61 5D1F8001 6 STAK 819 LEAVE POP return to caller 820 * --- 821 0AC62 FEC00000 822 NOPINST NOP 0 feable instruction 823 824 END STOPXMON subroutine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2398 (OPRMONITOR) F 144 OPREQ - Start and Stop Various Monitors 826 827 ********************************************************************************** 828 * * 829 * STOP DYNAMIC WAIT MONITOR. This operator request will stop * 830 * the dynamic wait monitor and return its accumulated information * 831 * to the user. User call: * 832 * LD R0 ORSTOPDYNW * 833 * LD R1 buffer size * 834 * LD R2 buffer address * 835 * OPREQ 0 * 836 * JLTZ R0 error * 837 * ST R1 buffer remaining * 838 * We get here by: * 839 * SP = stack pointer * 840 * R5 = frame containing poop on user buffer * 841 * CALLNP STOPDYNW * 842 * * 843 * Eats R0:R4. * 844 * Stack required = 2 * 845 * 1 + max ( MOVEDATA (1), SFREEMEM (0) ) * 846 * * 847 ********************************************************************************** 848 849 BLOCK STOPDYNW subroutine 850 ENTRY STOPDYNW 851 852 BEGFRAME 853 ENDFRAME 854 0AC63 DD5F8001 6 STAK 855 STOPDYNW ENTRNP PUSH 0AC64 61040000 4 IMM 856 LD R4 0 0AC65 E1001D14 4 857 EXCH R4 DYNBLOCK get and zero block pointer 0AC66 FB0259E4 4 858 JEQZ R4 UERRORNSE jump if not active 0AC67 6004AC71 0 IMM 859 LD R0 ADR DYNWHDR get ptr to header info 0AC68 60440008 1 IMM 860 LD R1 DYNWHDRLEN get its length 0AC69 DC40ABD8 861 CALLNP MOVEDATA more to user 0AC6A 60130000 0 4 REG 862 LD R0 R4 R0 -> the info 0AC6B 60441000 1 IMM 863 LD R1 DYNMAX*CPW 0AC6C DC40ABD8 864 CALLNP MOVEDATA move it to the user area 0AC6D DC002F5D 865 CALL SFREEMEM free the block 0AC6E 4144000A IMM 866 PARV (DYNMAX LOG 2) 0AC6F 40530000 4 REG 867 PARVL R4 0AC70 5D1F8001 6 STAK 868 LEAVE POP that's all, folks! 869 * --- 870 871 * Header for returned information 0000AC71 872 DYNWHDR LABEL 0AC71 00002000 873 VFD DYNBASE*DYNBITS 0AC72 00000020 874 VFD 1*DYNBITS 00000008 ABS 875 DYNWHDRLEN EQU DISPC DYNWHDR 876 877 END STOPDYNW subroutine 878 879 880 END Start/Stop Monitor OPREQs 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2399 (OPRMONITOR) F 144 OPREQ - Start and Stop Various Monitors 882 883 ********************************************************************************** 884 * * 885 * These requests will manipulate the CPU usage of the * 886 * system. They allow assigning a session to a particular * 887 * CPU and the removal and restoration of a CPU from active * 888 * work within the system. * 889 * * 890 * Stack required = 1. * 891 * 0 + max ( OPRCPUSTOP (0), OPRCPUSTRT (0), OPRSETCPU (1) ) * 892 * * 893 ********************************************************************************** 894 895 BLOCK OPREQCPU routines 896 ENTRY OPREQCPU 897 0000AC73 898 OPREQCPU LABEL 0AC73 68840003 2 IMM 899 UCPR R2 CPUFUNMAX is this within reason? 0AC74 FE0659D8 900 JGE ILLREQ if not then slap user's wrist 0AC75 5CA4AC76 2 901 LDPC CPUFUNJMP(R2) perform proper function 902 * --- 903 0000AC76 904 CPUFUNJMP LABEL 0AC76 0000AC79 905 VFD ADR OPRSETCPU assign a session to a CPU 0AC77 0000AC93 906 VFD ADR OPRCPUSTOP remove a CPU from the system 0AC78 0000ACBE 907 VFD ADR OPRCPUSTRT restore a removed CPU to the system 00000003 ABS 908 CPUFUNMAX EQU DISPW CPUFUNJMP all the CPU fun we can have 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2400 (OPRMONITOR) F 144 OPREQ - Start and Stop Various Monitors 910 911 ********************************************************************************** 912 * * 913 * Assign a session to a particular CPU. * 914 * * 915 * LD R0 ORSETCPU * 916 * LD R1 CPU slot number * 917 * OPREQ session number (0 => myself) * 918 * JLTZ R0 request error * 919 * R1 = original CPU slot number (0 => none) * 920 * * 921 * Stack required = 1 * 922 * 0 + max ( SRCHLIST (1), UNSRCHLIST (1) ) * 923 * * 924 ********************************************************************************** 925 926 BLOCK OPRSETCPU routine 927 ENTRY OPRSETCPU 928 0000AC79 929 OPRSETCPU LABEL 0AC79 60970803 2 4 BASE 930 LD R2 R4,CAR1 pick up the CPU slot number 0AC7A FA82AC80 2 931 JEQZ R2 CPUOK 0 => clearing CPU selected 932 933 * Verify there is a CPU in the specified slot. 0AC7B 60001CF7 0 934 LD R0 CPUCOUNT how many CPUs are on the system 0000AC7C 935 CPULOOP LABEL 0AC7C 64A01CFA 2 0 936 CPR R2 CPUSLOTS(R0-1) does this one match? 0AC7D FE02AC80 937 JEQ CPUOK if so, then the CPU number is valid 0AC7E FA22AC7C 0 938 DRJ R0 CPULOOP check them all 939 * \ / 0AC7F FE0E59E4 940 JMP UERRORNSE no such entry 941 * --- 942 943 * The CPU number is ok. Find the session. 0000AC80 944 CPUOK LABEL 0AC80 DC0030AA 945 CALL SRCHLIST get the list locked 0AC81 40001EB2 946 PARL PCNTLLOCK desired list 0AC82 FAC2AC8B 3 947 JEQZ R3 DOITTOME wants to do this to himself 948 0AC83 60001EB1 0 949 LD R0 PCONTROL R0 -> head of list 0000AC84 950 PROCLOOP LABEL 0AC84 64C800C3 3 0 ZBM 951 CPR R3 R0,PCPROCNUM is this the desired session? 0AC85 FE02AC8D 952 JEQ HAVEPROC if so, then we have our session 0AC86 60081F14 0 0 ZBM 953 LD R0 R0,PCNXTCB get the next session in the list 0AC87 FA32AC84 0 954 JNZA R0 PROCLOOP keep on going until the end 955 * \ / 956 0AC88 DC0030B7 957 CALL UNSRCHLIST free up the list 0AC89 40001EB2 958 PARL PCNTLLOCK which list 0AC8A FE0E59E2 959 JMP UERRORNSPP no such process/session 960 * --- 961 0000AC8B 962 DOITTOME LABEL 0AC8B 60000412 0 963 LD R0 CPPSA R0 -> my PSA 0AC8C FE0EAC8E 964 JMP HAVEPSA 965 * --- 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2401 (OPRMONITOR) F 144 OPREQ - Start and Stop Various Monitors 966 0000AC8D 967 HAVEPROC LABEL 0AC8D 60081F13 0 0 ZBM 968 LD R0 R0,PCPSADRS R0 -> PSA 0000AC8E 969 HAVEPSA LABEL 0AC8E E0880043 2 0 ZBM 970 EXCH R2 R0,PSOURCPU put in the desired CPU 0AC8F E4970803 2 4 BASE 971 ST R2 R4,CAR1 tell user which CPU was selected 0AC90 DC0030B7 972 CALL UNSRCHLIST free the list 0AC91 40001EB2 973 PARL PCNTLLOCK the PCB list 0AC92 FE0E59D6 974 JMP NOERROR 975 * --- 976 977 END OPRSETCPU routine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2402 (OPRMONITOR) F 144 OPREQ - Start and Stop Various Monitors 979 980 ********************************************************************************** 981 * * 982 * Request to remove a CPU from doing useful * 983 * system work. This request will cause a CPU to * 984 * go into an idle loop until an OPRCPUSTRT request * 985 * is issued. A specific CPU slot number may be * 986 * specified. A slot number of zero indicates any * 987 * CPU will do. * 988 * LD R0 ORCPUSTOP * 989 * LD R1 <slot number> * 990 * OPREQ <junk> * 991 * JLTZ R0 <error> * 992 * R1 = CPU taken out of service * 993 * * 994 * Stack required = 0 * 995 * * 996 ********************************************************************************** 997 998 BLOCK OPRCPUSTOP routine 999 ENTRY OPRCPUSTOP 1000 0000AC93 1001 OPRCPUSTOP LABEL 0AC93 BC001DA6 0 1002 INCL R0 IDLECPUCNT say one more CPU is going idle 0AC94 30001CF7 0 1003 RSB R0 CPUCOUNT R0 = number of active CPUs left 0AC95 FA0AACAE 0 1004 JLEZ R0 NOTENOUGH jump if not enough CPUs 1005 0AC96 60970803 2 4 BASE 1006 LD R2 R4,CAR1 pick up the CPU slot number 1007 PLOCK IDLECPULCK 0AC97 0CC00000 1007 IOFF 0AC98 D1C01DA4 1007 SETT IDLECPULCK 0AC99 FE0CAC9B 1007 JNE MA(2+DISPW MA 0) 0AC9A DC40308B 1007 CALLNP LOCKWAIT 0AC9B FA82ACA4 2 1008 JEQZ R2 ANYCPU 0 => any CPU will do 1009 1010 * Verify there is a CPU in the specified slot. 0AC9C 60241ECE 0 2 1011 LD R0 SLOTTABLE(R2) see what is in this slot 0AC9D 600A0030 0 0 CBM 1012 LD R0 R0/SLOTTYPE pick out the type code 0AC9E 64040002 0 IMM 1013 CPR R0 SLTTCPU is it a CPU? 0AC9F FE02ACA6 1014 JEQ CPUOK if so, then the CPU number is valid 1015 * \ / 1016 0000ACA0 1017 NOTFOUND LABEL 1018 PUNLOCK IDLECPULCK 0ACA0 EC001DA4 1018 STZ IDLECPULCK 0ACA1 0C800000 1018 ION 0ACA2 D0401DA6 1019 DEC IDLECPUCNT we ended up not taking a CPU 0ACA3 FE0E59E4 1020 JMP UERRORNSE no such entry 1021 * --- 1022 0000ACA4 1023 ANYCPU LABEL 0ACA4 60401CF7 1 1024 LD R1 CPUCOUNT how many CPUs are on the system 0000ACA5 1025 ANYCPULOOP LABEL 0ACA5 60A21CFA 2 1 1026 LD R2 CPUSLOTS(R1-1) pick up a CPU number 0000ACA6 1027 CPUOK LABEL 0ACA6 60001DA5 0 1028 LD R0 IDLECPULST R0 -> idle CPU list 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2403 (OPRMONITOR) F 144 OPREQ - Start and Stop Various Monitors 0ACA7 3C880840 2 0 ZBM 1029 LSRCH R2 R0,ICSLOT look for us in the list 0ACA8 FE0CACB0 1030 JNE HAVECPU take this CPU if it is not already taken 0ACA9 5C170803 4 BASE 1031 CMZ R4,CAR1 are we looking for a particular CPU? 0ACAA FE0CACA0 1032 JNE NOTFOUND if not, then return an error 0ACAB FA62ACA5 1 1033 DRJ R1 ANYCPULOOP keep on looking 1034 * \ / 1035 1036 PUNLOCK IDLECPULCK 0ACAC EC001DA4 1036 STZ IDLECPULCK 0ACAD 0C800000 1036 ION 0000ACAE 1037 NOTENOUGH LABEL 0ACAE D0401DA6 1038 DEC IDLECPUCNT we aren't going to take one away 0ACAF FE0E59F2 1039 JMP UERRORISYR insufficient resources 1040 * --- 1041 1042 1043 * R2 = CPU number 0000ACB0 1044 HAVECPU LABEL 0ACB0 E4970803 2 4 BASE 1045 ST R2 R4,CAR1 say what CPU we are taking 1046 1047 * Create an idle element for us. 0ACB1 DC002ED0 1048 CALL SGETMEM get a chunk of memory 0ACB2 40440000 IMM 1049 PARVL ICBLKLOG how much we want 0ACB3 EC160800 0 BASE 1050 STZ R0,0 make a clean chunk 0ACB4 E4880840 2 0 ZBM 1051 ST R2 R0,ICSLOT put in the requested slot number 0ACB5 EDC81010 0 ZBM 1052 STW R0,ICNOTBUILT say we have not built the process yet 0ACB6 60401DA5 1 1053 LD R1 IDLECPULST R0 -> list of idle CPUs 0ACB7 E4481F10 1 0 ZBM 1054 ST R1 R0,ICLINK put us on the head 0ACB8 E4001DA5 0 1055 ST R0 IDLECPULST 1056 PUNLOCK IDLECPULCK 0ACB9 EC001DA4 1056 STZ IDLECPULCK 0ACBA 0C800000 1056 ION 1057 * \ / 1058 0ACBB 60041000 0 IMM 1059 LD R0 1* BIT FLSTOPCPU bit indicating CPU needs to stop 0ACBC FC001CF6 0 1060 IORM R0 FLAGS 0ACBD FE0E59D6 1061 JMP NOERROR 1062 * --- 1063 1064 END of OPRCPUSTOP request 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2404 (OPRMONITOR) F 144 OPREQ - Start and Stop Various Monitors 1066 1067 ********************************************************************************** 1068 * * 1069 * OPRCPUSTRT * 1070 * * 1071 * Request to return an idle CPU to the working world. * 1072 * If a specific CPU is not requested then we put the first * 1073 * CPU in the idle list back into service. * 1074 * Call: * 1075 * LD R0 ORCPUSTRT * 1076 * LD R1 <slot number> (0 -> don't care) * 1077 * OPREQ <junk> * 1078 * JLTZ R0 error * 1079 * R1 = restarted CPU's number * 1080 * * 1081 * Stack required = 0 * 1082 * * 1083 ********************************************************************************** 1084 1085 BLOCK OPRCPUSTRT request 1086 ENTRY OPRCPUSTRT 1087 0000ACBE 1088 OPRCPUSTRT LABEL 0ACBE 60570803 1 4 BASE 1089 LD R1 R4,CAR1 desired CPU slot number 1090 PLOCK IDLECPULCK 0ACBF 0CC00000 1090 IOFF 0ACC0 D1C01DA4 1090 SETT IDLECPULCK 0ACC1 FE0CACC3 1090 JNE MA(2+DISPW MA 0) 0ACC2 DC40308B 1090 CALLNP LOCKWAIT 0ACC3 60001DA5 0 1091 LD R0 IDLECPULST R0 -> list of idle CPUs 0ACC4 FA02ACC8 0 1092 JEQZ R0 NONEHERE jump if none here 0ACC5 FA42ACCB 1 1093 JEQZ R1 THISONE use this CPU if no specific one requested 0ACC6 3C480840 1 0 ZBM 1094 LSRCH R1 R0,ICSLOT look for the requested CPU 0ACC7 FE02ACCB 1095 JEQ THISONE jump if it was there 0000ACC8 1096 NONEHERE LABEL 1097 PUNLOCK IDLECPULCK 0ACC8 EC001DA4 1097 STZ IDLECPULCK 0ACC9 0C800000 1097 ION 0ACCA FE0E59E4 1098 JMP UERRORNSE no such entry 1099 * --- 1100 1101 * R1 -> CPU we will put back into service. 0000ACCB 1102 THISONE LABEL 0ACCB EDC81210 0 ZBM 1103 STW R0,ICSTART restart this CPU 0ACCC 60480840 1 0 ZBM 1104 LD R1 R0,ICSLOT get the slot number 1105 PUNLOCK IDLECPULCK 0ACCD EC001DA4 1105 STZ IDLECPULCK 0ACCE 0C800000 1105 ION 0ACCF E4570803 1 4 BASE 1106 ST R1 R4,CAR1 tell user which one is being restarted 0ACD0 FE0E59D6 1107 JMP NOERROR 1108 * --- 1109 1110 END of OPRCPUSTRT request 1111 1112 1113 END OPREQCPU routines 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2405 (OPRMONITOR) F 144 OPREQ - Start and Stop Various Monitors 1115 1116 ********************************************************************************** 1117 * * 1118 * Request to set the number of pages to be removed * 1119 * from system use. We are given a number that indicates * 1120 * how many pages are desired to be on removed from the system. * 1121 * The following checks are done to see if this is a reasonble * 1122 * amount of pages to take: * 1123 * 1. If less than or equal to the current number out * 1124 * of service then ok. (This is in effect adding * 1125 * pages back into the system so no problem.) * 1126 * Note that zero is always valid. * 1127 * 2. If more than the number currently out of service * 1128 * we add the idle count to this, then subtract 4 * 1129 * pages for each session and a fudge factor. If the * 1130 * requested amount is less than this then we honor it. * 1131 * 3. If there still are not enough pages we go through * 1132 * the PPAGE lists counting every page in them. This * 1133 * gets added to the above total. If the requested * 1134 * amount is less than or equal then we take that many * 1135 * pages. Otherwise we return an error. * 1136 * Call: * 1137 * LD R0 ORTAKEPAGS * 1138 * LD R1 <number of pages> * 1139 * OPREQ <junk> * 1140 * JLTZ R0 error * 1141 * * 1142 ********************************************************************************** 1143 1144 BLOCK ORTAKEPAGS request 1145 ENTRY OPRTAKEPAG 1146 0000ACD1 1147 OPRTAKEPAG LABEL 0ACD1 FA8C59D8 2 1148 JNEZ R2 ILLREQ no sub-op please 0ACD2 60D70803 3 4 BASE 1149 LD R3 R4,CAR1 how many pages are being requested 0ACD3 64C01EA3 3 1150 CPR R3 TAKENUM less than how many are currently gone? 0ACD4 FE04ACD9 1151 JGT COUNTPAGES if not, then better count the pages 1152 * \ / 1153 0000ACD5 1154 COUNTOK LABEL 0ACD5 E4C01EA3 3 1155 ST R3 TAKENUM set the new number to take 0ACD6 60040004 0 IMM 1156 LD R0 1*BIT FLFSX bit to indicate time to adjust pages 0ACD7 FC001CF6 0 1157 IORM R0 FLAGS set the flags word 0ACD8 FE0E59D6 1158 JMP NOERROR 1159 * --- 1160 1161 * R3 = number of pages we want to remove. 0000ACD9 1162 COUNTPAGES LABEL 0ACD9 60801DDA 2 1163 LD R2 PPIDLCOUNT number of idle pages 0ACDA 18801EA4 2 1164 ADD R2 TAKECOUNT number of pages already taken 0ACDB 60001EB0 0 1165 LD R0 PCCOUNT number of sessions 0ACDC 1C040004 0 IMM 1166 MUL R0 4 allow 4 pages per session 0ACDD 18040014 0 IMM 1167 ADD R0 TAKEFUDGE add in the fudge factor 0ACDE 10920000 2 0 REG 1168 SUB R2 R0 we can remove this many pages 0ACDF 64D28000 3 2 REG 1169 CPR R3 R2 see if there are enough pages, now 0ACE0 FE0AACD5 1170 JLE COUNTOK if so then use it 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2406 (OPRMONITOR) F 144 OPREQ - Start and Stop Various Monitors 1171 * \ / 1172 1173 * Count number of pages in PPAGE lists. 0ACE1 6044003F 1 IMM 1174 LD R1 HASHTSIZ-1 inde2 to last list in array 0000ACE2 1175 PAGECOUNT LABEL 0ACE2 60221E61 0 1 1176 LD R0 PPAGELIST(R1) R0 -> head of a PPAGE list 0ACE3 FA02ACE6 0 1177 JEQZ R0 EMPTYPAGE jump if this is an empty list 0000ACE4 1178 PAGELOOP LABEL 0ACE4 18840001 2 IMM 1179 ADD R2 1 count this page 0ACE5 FA36ACE4 0 1180 LJNA R0 PAGELOOP do the whole list 0000ACE6 1181 EMPTYPAGE LABEL 0ACE6 FA66ACE2 1 1182 JDR R1 PAGECOUNT do all idle lists 1183 * \ / 1184 1185 * R2 = number of pages in various page lists. 0ACE7 64D28000 3 2 REG 1186 CPR R3 R2 within range 0ACE8 FE0AACD5 1187 JLE COUNTOK if so then use it 0ACE9 FE0E59F2 1188 JMP UERRORISYR insufficient system resources 1189 * --- 1190 1191 END of ORTAKEPAGS request 212 INPUT OPREQOPMSG control operator messages 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2407 (OPREQOPMSG) F 145 OPREQ - Operator Message Control 3 4 BLOCK OPREQs to Control Operator Messages 5 6 ENTRY OPROPMSG 7 8 ********************************************************************************** 9 * * 10 * These OPREQ's will generate, retrieve and cancel operator * 11 * messages. They require operator privileges. * 12 * * 13 * Stack required = 4 * 14 * 0 + max ( OPRCANMSG (1), OPRGENMSG (1), OPRGETMSG (4) ) * 15 * * 16 ********************************************************************************** 17 0000ACEA 18 OPROPMSG LABEL 0ACEA 64840003 2 IMM 19 CPR R2 OPMSGFUNMX is the sub-op code OK? 0ACEB FE0659D8 20 JGE UERRORILR jump if not 0ACEC 5CA4ACED 2 21 LDPC OPMSGJMP(R2) else go to routine 22 * --- 23 0000ACED 24 OPMSGJMP LABEL 0ACED 0000ACF0 25 ADR OPRGENMSG 0 - generate a message 0ACEE 0000AD0C 26 ADR OPRGETMSG 1 - get all messages 0ACEF 0000AD4E 27 ADR OPRCANMSG 2 - cancel a message 00000003 ABS 28 OPMSGFUNMX EQU DISPW OPMSGJMP 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2408 (OPREQOPMSG) F 145 OPREQ - Operator Message Control 30 31 BLOCK Generate an Operator Message 32 33 ENTRY OPRGENMSG 34 35 ********************************************************************************** 36 * * 37 * Generate a message to the operator. * 38 * LD R0 ORGENOPMSG * 39 * LD R1 message size * 40 * LD R2 address of message * 41 * OPREQ 0 * 42 * <return, R0 = message serial number> * 43 * The first 10 characters of the message will be displayed in the lights. * 44 * * 45 * Stack required = 1 * 46 * 0 + max ( CLRMEMTRAP (1), GENOPMSG (1), SETMEMTRAP (1), * 47 * SFREEMEM (0), SGETMEM (0) ) * 48 * * 49 ********************************************************************************** 50 0000ACF0 51 OPRGENMSG LABEL 0ACF0 DC002ED0 52 CALL SGETMEM get an OPMSG block 0ACF1 40440005 IMM 53 PARVL OPMSGLOG size 0ACF2 61520000 5 0 REG 54 LD R5 R0 R5 -> OPMSG block 55 0ACF3 DC005BCF 56 CALL SETMEMTRAP trap user's funky memory 0ACF4 4000AD06 57 PARL USERMEMBAD where to go 58 0ACF5 60570803 1 4 BASE 59 LD R1 R4,CAR1 R1 = message length 0ACF6 54440000 1 IMM 60 MAX R1 0 0ACF7 50440077 1 IMM 61 MIN R1 OPMSGMAXLN make it within bounds 0ACF8 E4574007 1 5 CACH 62 ST R1 R5,OPMSGLEN save it in block 0ACF9 FA42AD01 1 63 JEQZ R1 NOMOVE jump if no data to move 64 0ACFA 60170804 0 4 BASE 65 LD R0 R4,CAR2 R0 = where to move data from 0ACFB 38974802 2 5 BASE 66 LEA R2 R5,OPMSGTEXT R2 = where to move data to 0ACFC 60D70801 3 4 BASE 67 LD R3 R4,CAMSR R3 = caller's MSR 0ACFD F6F2ACFF 3 68 JBT R3/MSRFRELOCB FROMSYS jump if caller is monitor 0ACFE 59840040 IMM 69 CLBMSR MSRFRELOC else fetch from user 0000ACFF 70 FROMSYS LABEL 0ACFF FE400000 71 CMOVE copy the message to our block 0AD00 59C40040 IMM 72 IORMSR MSRFRELOC restore fetch from monitor 0000AD01 73 NOMOVE LABEL 74 0AD01 DC405BD4 75 CALLNP CLRMEMTRAP release memory trap 76 0AD02 EC0942E0 5 ZBM 77 STZ R5,OPMSGPROC not associated with any process 0AD03 DC0046F3 78 CALL GENOPMSG generate the message 0AD04 40534000 5 REG 79 PARVL R5 address of OPMSG block 80 0AD05 FE0E5999 81 JMP STOREINR0 return, R0 = message serial number 82 * --- 83 0000AD06 84 USERMEMBAD LABEL 0AD06 62940000 2301 PAIR 85 LD2 R2 PAIR R0 save registers 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2409 (OPREQOPMSG) F 145 OPREQ - Operator Message Control 0AD07 DC002F5D 86 CALL SFREEMEM free the OPMSG block 0AD08 41440005 IMM 87 PARV OPMSGLOG size 0AD09 40534000 5 REG 88 PARVL R5 address 0AD0A 62148000 0123 PAIR 89 LD2 R0 PAIR R2 restore registers 0AD0B FE0E5B5F 90 JMP PASSERRUP and pass error up to caller 91 * --- 92 93 END Generate an Operator Message 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2410 (OPREQOPMSG) F 145 OPREQ - Operator Message Control 95 96 BLOCK Fetch Operator Messages 97 98 ENTRY OPRGETMSG 99 100 ********************************************************************************** 101 * * 102 * OPREQ to get all operator messages. * 103 * LD R0 ORGETOPMSG * 104 * LD R1 buffer length * 105 * LD R2 buffer address * 106 * OPREQ anything * 107 * <return, R0 = 0 or error code, * 108 * R1 = remaining buffer length> * 109 * Stack required = 4 * 110 * 3 + max ( CLRMEMTRAP (1), LOCKWAIT (0), SETMEMTRAP (1), * 111 * UFREEMEM (0), UGETMEM (0) ) * 112 * * 113 ********************************************************************************** 114 115 BEGFRAME2 00178800 6 BASE 116 USERLEN BSS 1 remaining length in buffer 00178801 6 BASE 117 USERADR BSS 1 address of user buffer 00178802 6 BASE 118 USERRELOC BSS 1 bit to clear in MSR to move stuff 119 ENDFRAME 120 121 OPMSGINFO LIST 121 ********************************************************************************** 121 * * 121 * Format of data returned by ORGETOPMSG. * 121 * * 121 ********************************************************************************** 121 0000AD0C 121 OMIPROTO BASE R0 00160800 0 BASE 121 OMISTART LABEL 000800F0 0 ZBM 121 OMIPROCNUM BSSB 15 session number originating message (or 0) 00081F10 0 ZBM 121 OMIENTLEN BSSB 17 length of this entry, in words 00080181 0 ZBM 121 OMISERIAL BSSB 24 message serial number 00160007 0 CACH 121 OMILENGTH BSSB 8 length of this message, in characters 00160008 0 CACH 121 OMIMESSAGE BSSC 0 beginning of message text 121 DRCT 121 ORG OMIPROTO 122 0000AD0C 123 OPRGETMSG LABEL 0AD0C EC1F8003 6 STAK 124 STZ PUSH allocate stack frame 0AD0D 62570803 124 BASE 125 LD2 R1 R4,CAR1 get user parms 0AD0E E6578800 126 BASE 126 ST2 R1 SP,USERLEN save them 0AD0F 60040080 0 IMM 127 LD R0 MSRSRELOC MSR store relocation bit 0AD10 28170801 0 4 BASE 128 BSUB R0 R4,CAMSR R0 = bit to clear before CMOVE 0AD11 E4178802 0 6 BASE 129 ST R0 SP,USERRELOC save it 0AD12 DC005BCF 130 CALL SETMEMTRAP trap funky memory 0AD13 4000AD48 131 PARL USERMEMBAD where to go 132 0AD14 DC002ED0 133 CALL UGETMEM get a block to hold OMI entry 0AD15 40440005 IMM 134 PARVL OPMSGLOG 0AD16 61520000 5 0 REG 135 LD R5 R0 R5 -> our holding area 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2411 (OPREQOPMSG) F 145 OPREQ - Operator Message Control 136 0AD17 61C40001 7 IMM 137 LD R7 1 first message id to look for 138 0000AD18 139 LOOP LABEL 140 PLOCK OPMSGLOCK lock the list 0AD18 0CC00000 140 IOFF 0AD19 D1C01EA7 140 SETT OPMSGLOCK 0AD1A FE0CAD1C 140 JNE MA(2+DISPW MA 0) 0AD1B DC40308B 140 CALLNP LOCKWAIT 0AD1C 60801EA8 2 141 LD R2 OPMSGLIST R2 -> first OPMSG element 0AD1D 4DC88181 7 2 ZBM 142 RLSHLE R7 R2,OPMSGID find next message 0AD1E FE04AD3F 143 JGT DONE jump if no more 144 0AD1F 600882E0 0 2 ZBM 145 LD R0 R2,OPMSGPROC 0AD20 E40940F0 0 5 ZBM 146 ST R0 R5,OMIPROCNUM save process number 0AD21 60088181 0 2 ZBM 147 LD R0 R2,OPMSGID 0AD22 E4094181 0 5 ZBM 148 ST R0 R5,OMISERIAL save message serial number 0AD23 60568007 1 2 CACH 149 LD R1 R2,OPMSGLEN 0AD24 1044000A 1 IMM 150 SUB R1 10 adjust length for header 0AD25 54440000 1 IMM 151 MAX R1 0 but not negative 0AD26 E4574007 1 5 CACH 152 ST R1 R5,OMILENGTH 0AD27 6016500C 0 1 REG 153 LD R0 R1+CPW+(OMIMESSAGE DISPC OMISTART) 0AD28 600A01E0 0 0 CBM 154 LD R0 R0/BITS 0:29 convert characters to words 0AD29 E4095F10 0 5 ZBM 155 ST R0 R5,OMIENTLEN save length of this entry 0AD2A 38168012 0 2 CACH 156 LEA R0 R2,OPMSGTEXTC(10) point to message text (after header) 0AD2B 38974008 2 5 CACH 157 LEA R2 R5,OMIMESSAGE 0AD2C 60565001 1 1 REG 158 LD R1 R1+1 to move final NUL, too 0AD2D FE400000 159 CMOVE move the message 160 161 PUNLOCK OPMSGLOCK release the lock 0AD2E EC001EA7 161 STZ OPMSGLOCK 0AD2F 0C800000 161 ION 162 0AD30 60495F10 1 5 ZBM 163 LD R1 R5,OMIENTLEN R1 = number of words 0AD31 604A5F30 1 1 CBM 164 LD R1 R1/FLDCHARS R1 = number of characters 0AD32 B0578800 1 6 BASE 165 RSBM R1 SP,USERLEN update chars remaining in buffer 0AD33 60978800 2 6 BASE 166 LD R2 SP,USERLEN get number of chars remaining 0AD34 50840000 2 IMM 167 MIN R2 0 R2 = 0 or amount of overflow 0AD35 18528000 1 2 REG 168 ADD R1 R2 R1 = number of chars to really move 0AD36 FA4AAD3D 1 169 JLEZ R1 NOMOVE jump if nothing to move 0AD37 60978801 2 6 BASE 170 LD R2 SP,USERADR where to move to 0AD38 60134000 0 5 REG 171 LD R0 R5 where to move from 0AD39 59978802 6 BASE 172 CLBMSR SP,USERRELOC change relocation as necessary 0AD3A FE400000 173 CMOVE move data to caller's buffer 0AD3B 59C40080 IMM 174 IORMSR MSRSRELOC restore the relocation 0AD3C E4978801 2 6 BASE 175 ST R2 SP,USERADR save address for next message 0000AD3D 176 NOMOVE LABEL 177 0AD3D 61C94181 7 5 ZBM 178 LD R7 R5,OPMSGID get id of message just given 0AD3E FBE0AD18 7 179 IRJ R7 LOOP and do next message 180 * --- 181 0000AD3F 182 DONE LABEL 183 PUNLOCK OPMSGLOCK unlock the list 0AD3F EC001EA7 183 STZ OPMSGLOCK 0AD40 0C800000 183 ION 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2412 (OPREQOPMSG) F 145 OPREQ - Operator Message Control 184 0AD41 DC405BD4 185 CALLNP CLRMEMTRAP clear the memory trap 186 0AD42 DC002F5D 187 CALL UFREEMEM free our holding area 0AD43 41440005 IMM 188 PARV OPMSGLOG size 0AD44 40534000 5 REG 189 PARVL R5 address 190 0AD45 60578800 1 6 BASE 191 LD R1 SP,USERLEN get remaining length 0AD46 E4570803 1 4 BASE 192 ST R1 R4,CAR1 give it back to caller 0AD47 FE0E59D6 193 JMP NOERROR and that's all 194 * --- 195 0000AD48 196 USERMEMBAD LABEL 0AD48 60940000 2 01 PAIR 197 LD R2 PAIR R0 save registers 0AD49 DC002F5D 198 CALL UFREEMEM free our fake block 0AD4A 41440005 IMM 199 PARV OPMSGLOG size 0AD4B 40534000 5 REG 200 PARVL R5 address 0AD4C 62148000 0123 PAIR 201 LD2 R0 PAIR R2 restore registers 0AD4D FE0E5B5F 202 JMP PASSERRUP and pass error up to caller 203 * --- 204 205 END Fetch Operator Messages 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2413 (OPREQOPMSG) F 145 OPREQ - Operator Message Control 207 208 BLOCK Cancel Operator Message 209 ENTRY OPRCANMSG 210 211 ********************************************************************************** 212 * * 213 * Cancel an Operator Message. * 214 * LD R0 ORCANOPMSG * 215 * LD R1 message serial number * 216 * OPREQ 0 * 217 * <return, R0 = 0 or error (XREQERNSE if message doesn't exist)> * 218 * * 219 * Stack required = 1 * 220 * 0 + max ( CANOPMSG (1) ) * 221 * * 222 ********************************************************************************** 223 0000AD4E 224 OPRCANMSG LABEL 0AD4E DC004713 225 CALL CANOPMSG cancel a message 0AD4F 40570803 4 BASE 226 PARVL R4,CAR1 message serial number 0AD50 FE0E5988 227 JMP UERROR return, R0 = 0 or error code 228 * --- 229 230 END Cancel Operator Message 231 232 233 END OPREQs to Control Operator Messages 213 INPUT OPREQEND end of OPREQ's 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2414 (OPREQEND) F 146 CREF of OPREQ processor 3 4 END OPREQPROC Operator and Control Mode Requests 214 INPUT XREQEND END for block for XREQ processor 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2415 (XREQEND) F 147 CREF of XREQ processor 3 4 END XREQPROC Executive Request Processor 215 0000AD51 ABS 216 ENDOFRES EQU DISPW MA 0 end of the resident system 217 BSS MAXMEMCKS-(ENDOFRES/WPP+1) this will generate an assembler 218 * error if we did not allow enough space to 219 * keep our resident system page's checksums 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2416 F 0 CREF of XREQ processor 221 222 ********************************************************************************** 223 * * 224 * Place to break the listing. * 225 * * 226 ********************************************************************************** 227 228 ORG ((ENDOFRES+WPP-1)AND(-WPP)) start us on a new page 000000AC ABS 229 PNINITPROC EQU (DISPW MA 0)/WPP+MONPF 230 231 INPUT INITPROC process that initializes system 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2417 (INITPROC) F 148 System Initialization Process 3 4 BLOCK Initialization Process 5 ENTRY INITPROC 6 7 ********************************************************************************** 8 * * 9 * This is the initial process that: * 10 * - mounts the system volume * 11 * - validates the SSU clock setting * 12 * - checks for system death date and proper * 13 * configuration (according to NVM) * 14 * - creates a new AFT and copies the system * 15 * volume IDX into it (frees old AFT) * 16 * - creates the entries for control mode * 17 * - check for, and if needed, creates HARDWARE.SYS, * 18 * TERMINAL.CONFIG and the various entries in * 19 * HARDWARE.SYS needed to reflect the system * 20 * configuration * 21 * - sets all terminals to initial configuration * 22 * - creates the file freeing process and sets it running * 23 * - creates error logging process * 24 * - creates accounting process * 25 * * 26 * Stack required = 19 * 27 * 0 + max ( ACCOUNT (2), ACCTQUE (3), CLOCKCHECK(14), * 28 * CPUPFLOAD (0), DEATHCHECK (1), DUALWRITE (5), * 29 * ERRORLOG (3), FIGCHKALL (11), FREEAFTACS (5), * 30 * FREESTACK (0), GETAFTACS (1), GETDATE (1), * 31 * GETPATCH (7), GETSSN (10), GETSTACK (0), * 32 * GRUBWNDOx (7), INITTERM (6), LOADAFTIDX (9), * 33 * LOCKWAIT (0), LUNSEARCH (2), MAKEBATCH (18), * 34 * MAKEHWSYS (16), MOUNTIDX (18), MOUNTNAME (14), * 35 * MOUNTPACKL (1), OUTTSETX (8), PUTIDLE (1), * 36 * SETWNDO1 (4), SGETMEM (0), STARTSPLR (19), * 37 * TIMEADJUST (2), TIMEDRIFT (2), TIMESET (2), * 38 * ZAPAFT (5), ZEROIT (1) ) * 39 * * 40 ********************************************************************************** 41 00000075 ABS 42 SULUN EQU 117 lun used by this process 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2418 (INITPROC) F 148 System Initialization Process 44 45 INITPROC BLOCK 46 ENTRY INITPROC 47 0000001F ABS 48 STACKSIZE EQU 31 49 50 ********************************************************************************** 51 * * 52 * The first thing on this page is the code to free our * 53 * pages. This code is executed at the very end of this process. * 54 * It is here to guarantee that we will not free the page that * 55 * it resides on before we are done with it. INITIAL makes * 56 * sure that the first page used by us (INITPROC) is on the * 57 * bottom of the list of PPLs that are in the PPLINIT list. * 58 * Thus we can start at the top of the list and give PPLs to * 59 * the idle list until the end is reached without wiping ourself * 60 * out. * 61 * * 62 ********************************************************************************** 63 0000B000 64 WIPEUSOUT LABEL 0B000 60C40080 3 IMM 65 LD PFPTR MONPF+0 get page number for monitor page zero 0B001 80930000 4 REG 66 PFRD R4 get what is there 0B002 00C01CC7 67 LDPF PAGEZERO map in power fail stuff 0B003 60C400AD 3 IMM 68 LD PFPTR ENDOFSYS/WPP+MONPF last page number of INITPROC 0000B004 69 WIPELOOP LABEL 0B004 EC260300 3 70 STZ PFMAP(-MONPF)(PFPTR) take this page out of page map 0B005 64C400AC 3 IMM 71 CPR PFPTR PNINITPROC is it our final page? 0B006 FE02B00E 72 JEQ DONTUNLOAD if so then don't unload us 0B007 0CC00000 73 IOFF for call 0B008 DC002FCB 74 CALL CPUPFLOAD unload for all CPUs 0B009 41440000 IMM 75 PARV 0 sez to exclude page 0B00A 4052C000 3 REG 76 PARVL PFPTR pass PF location 0B00B 0C800000 77 ION after call 0B00C EDF61CC6 3 @ 78 STW @PAVPAGES(PFPTR) give the page to free storage 0B00D FAE2B004 3 79 DRJ PFPTR WIPELOOP keep going 80 * --- 81 0000B00E 82 DONTUNLOAD LABEL 0B00E 60C40080 3 IMM 83 LD PFPTR MONPF+0 get page number for monitor page zero 0B00F 00D30000 4 REG 84 LDPF R4 restore this page mapping 0B010 61001E1D 4 85 LD PPL PPLINIT PPL -> list of PPLs for initialization 0000B011 86 PPLFREE LABEL 0B011 EC170801 4 BASE 87 STZ PPL,PPBLOCK make sure there is no block associated 0B012 60891F10 2 4 ZBM 88 LD R2 PPL,PPLINK R2 -> next element in list 0B013 FAB0B017 2 89 JZA R2 ALMOSTDONE don't free the last one (us) 0B014 DC402D51 90 CALLNP PUTIDLE give the PPL to the idle list 0B015 61128000 4 2 REG 91 LD PPL R2 PPL -> next PPL to do 0B016 FE0EB011 92 JMP PPLFREE 93 * --- 94 95 ********************************************************************************** 96 * * 97 * It is now time to start the system. * 98 * As to myself -- this process must now disappear and give * 99 * up its CPU to do some useful work. Good luck, system. May * 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2419 (INITPROC) F 148 System Initialization Process 100 * all your computations be happy ones. * 101 * * 102 ********************************************************************************** 103 0000B017 104 ALMOSTDONE LABEL 0B017 DC002875 105 CALL FREESTACK free our stack 0B018 4044001F IMM 106 PARVL STACKSIZE stack size 0B019 60C400AC 3 IMM 107 LD PFPTR PNINITPROC make this indicate our page 0B01A FE0E2DA5 108 JMP LIQUIDINIT destroy me 109 * --- 110 111 ********************************************************************************** 112 * * 113 * INITPROC - Main Entry Point. * 114 * This code is the PROCESS that the system runs as soon * 115 * as the scheduler/dispatcher and disk driver are together * 116 * enough to handle page faults. This process puts together * 117 * some final items that must be properly initialized. * 118 * * 119 ********************************************************************************** 120 0000B01B 121 INITPROC LABEL 0B01B 60000412 0 122 LD R0 CPPSA get the current PSA pointer 0B01C D1560813 0 BASE 123 STMW R0,PSSESLIM set up the session limit 0B01D DC00286A 124 CALL GETSTACK allocate us a stack 0B01E 4044001F IMM 125 PARVL STACKSIZE 126 0B01F DC005048 127 CALL ERRORLOG say we were booted 0B020 41440C16 IMM 128 PARV ERLCBOOT 0B021 41402400 129 PARV VERSION(0) 0B022 41402401 130 PARV VERSION(1) 0B023 40401EE0 131 PARVL FPSWITCHB 132 133 ********************************************************************************** 134 * Go get the system serial number so that we can validate * 135 * the load of the system volume. * 136 ********************************************************************************** 137 0B024 DC40B1F2 138 CALLNP GETSSN get the system serial number 139 0B025 61001F23 4 140 LD VLN VOLNTABLE(1) get pointer to system volume 0B026 60C91F15 3 4 ZBM 141 LD R3 VLN,VOLNHCB get its hardware control block 0000B027 142 WAIT4PACKL LABEL 0B027 6016C804 0 3 BASE 143 LD R0 R3,MDVMAXSEEK find its maximum seek address 0B028 FA2CB027 0 144 JEQMW R0 WAIT4PACKL if still at initial value, wait for initialization 0B029 DC40A085 145 CALLNP MOUNTPACKL get the pack label info in 0B02A FA02B02C 0 146 JEQZ R0 INIVLOK jump if no error 147 * \ / 148 149 ********************************************************************************** 150 * We arrive at this halt if the pack label was unsatisfactory. * 151 * The error code is in R0. See the MOUNTPACKL routine for the * 152 * contents of windows and the like. * 153 ********************************************************************************** 154 155 * \ / 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2420 (INITPROC) F 148 System Initialization Process 0B02B 00027001 156 HALT HALTB7001 couldn't mount pack label 157 * --- 158 0000B02C 159 INIVLOK LABEL 0B02C DC009EDE 160 CALL MOUNTNAME do the tough work 0B02D 42440000 IMM 161 PARV2L 0 no password 0B02E FA02B030 0 162 JEQZ R0 INIMTD jump if okay 163 * \ / 164 165 ********************************************************************************** 166 * We arrive at this halt if the pack could not be mounted. * 167 * The error code is in R0. See the MOUNTNAME routine for the * 168 * contents of windows and the like. * 169 ********************************************************************************** 170 171 * \ / 0B02F 00027002 172 HALT HALTB7002 system volume could not be mounted 173 * --- 174 175 ********************************************************************************** 176 * * 177 * MOUNTNAME leaves the security block locked into window 3. * 178 * * 179 * Make sure that there is enough free space on the system * 180 * volume to do something useful. If there are fewer than 20 * 181 * blocks, we will die here (rather than later). * 182 * * 183 ********************************************************************************** 184 0000B030 185 INIMTD LABEL 0B030 6017081C 0 4 BASE 186 LD R0 VLN,VOLNFREBLK get count of free blocks 0B031 64040014 0 IMM 187 CPR R0 20 check against this minimum requirement 0B032 FE06B034 188 JGE INIMTD2 jump if okay 0B033 0002700C 189 HALT HALTB700C not enough free space on system volume 190 * --- 191 192 ********************************************************************************** 193 * * 194 * The system volume is now mounted and we are happy with * 195 * it. Continue with the system boot. * 196 * * 197 * Invoke the CLOCKCHECK routine where we: * 198 * 1) Check the NVM dates for reasonableness. * 199 * 2) Check the clock for reasonableness. * 200 * 3) If we correct the clock, we update all timer queue entries. * 201 * * 202 ********************************************************************************** 203 204 * \ / 0000B034 205 INIMTD2 LABEL MOUNTNAME leaves fields locked 0B034 DC40B16D 206 CALLNP CLOCKCHECK take care of the system clock 207 * \ / 208 209 ********************************************************************************** 210 * * 211 * Verify that the system configuration is acceptable to the BTI * 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2421 (INITPROC) F 148 System Initialization Process 212 * accounting department. * 213 * * 214 ********************************************************************************** 215 216 * \ / 0B035 DC40B1EB 217 CALLNP DEATHCHECK see if the system is paid for 0B036 DC40B247 218 CALLNP FIGCHKALL configuration checks for security 219 * \ / 220 221 ********************************************************************************** 222 * Set the "last mount date". Must be careful to ensure that volume is * 223 * always remountable. See comments in REMOUNT (MS driver). * 224 ********************************************************************************** 225 226 * \ / 0B037 DC404549 227 CALLNP GETDATE get the current time 0B038 E6001002 01 228 ST2 R0 WNDO3/SECMNTDAT initialize the mount date 0B039 60C91F15 3 4 ZBM 229 LD R3 VLN,VOLNHCB get pointer to MDV element 0B03A 6216C810 013 BASE 230 LD2 R0 R3,MDVFMTDAT while the pages are writing, use 0B03B E6170813 014 BASE 231 ST2 R0 VLN,VOLNMNTDAT the FMT date as the remount ID 232 * \ / 233 234 * now write the security blocks 0B03C 61570807 5 4 BASE 235 LD R5 VLN,VOLNSECAD get ms address of security block that's in 0B03D 75492182 5 4 ZBM 236 XOR R5 VLN,VOLNSECBK1 exclusive or to produce... 0B03E 75491183 5 4 ZBM 237 XOR R5 VLN,VOLNSECBK2 ...the other copies address 0B03F 60C40084 3 IMM 238 LD R3 PNWNDO3 pass virtual page number 0B040 DC0031A6 239 CALL DUALWRITE call to make two copies 0B041 40534000 5 REG 240 PARVL R5 pass extra address 241 242 * give VOLN and MDV the unique remount ID 0B042 60C91F15 3 4 ZBM 243 LD R3 VLN,VOLNHCB get pointer to MDV element 0B043 62001002 01 244 LD2 R0 WNDO3/SECMNTDAT reload mount date 0B044 E6170813 014 BASE 245 ST2 R0 VLN,VOLNMNTDAT now place in VOLN 0B045 E616C810 013 BASE 246 ST2 R0 R3,MDVFMTDAT and MDV (for tidyness) 247 0B046 DC403156 248 CALLNP GRUBWNDO3 no need for the security block anymore 249 * \ / 250 251 ********************************************************************************** 252 * We load up the resident control block for the AFT. * 253 ********************************************************************************** 254 0B047 DC005840 255 CALL LOADAFTIDX read AFT pointers in 0B048 40440010 IMM 256 PARVL FBITAFT and type 0B049 00027003 257 HALT HALTB7003 account finder table is bad 0B04A E4C01F64 3 258 ST R3 AFTINDEX save the control block pointer 0B04B EC17080C 4 BASE 259 STZ VLN,VOLNFBZY unlock resident lists 260 * (left locked by MOUNTNAME) 261 * \ / 262 263 ********************************************************************************** 264 * * 265 * Destroy the old AFT so that we may build a new one. * 266 * The astute reader will notice that the following operation * 267 * leaves the AFT pointers in the security block wrong until * 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2422 (INITPROC) F 148 System Initialization Process 268 * the first new entry is placed in the AFT. This will only * 269 * be noticed if there is a crash, but in that case, the FREEFILE * 270 * routine will not have been able to destroy any of the * 271 * blocks yet. * 272 * The file freeing process has not been built yet. * 273 * Nevertheless, we may call freefile (for the old AFT) and * 274 * freefile will make a queue entry without attempting to * 275 * start the file freeing process. The old AFT will get * 276 * freed after the freefile process has been built and * 277 * another item freed. * 278 * * 279 ********************************************************************************** 280 281 * \ / 0B04C DC0056E6 282 CALL GETAFTACS get modify access to AFT 0B04D 40440001 IMM 283 PARVL AFTACSMO 0B04E 61530000 5 4 REG 284 LD R5 VLN save volume control pointer 0B04F 61001F64 4 285 LD R4 AFTINDEX get ptr to old AFT index area 0B050 DC4057CD 286 CALLNP ZAPAFT zap the entries therein 0B051 DC002ED0 287 CALL SGETMEM create a new empty AFT 0B052 40440003 IMM 288 PARVL (1+IDXTPWR2) LOG 2 indicate its length 0B053 60494086 1 5 ZBM 289 LD R1 R5,VOLNNUM get the volume number 0B054 E4480080 1 0 ZBM 290 ST R1 R0,IDXTVOL 0B055 60440010 1 IMM 291 LD R1 FBITAFT get the type of table 0B056 E4560004 1 0 CACH 292 ST R1 R0,IDXTFBIT and set into table element 0B057 EDD60005 0 CACH 293 STW R0,IDXTBNUM indicate one bucket 0B058 EC082101 0 ZBM 294 STZ R0,IDXTENTS initialize total entry count 0B059 EC160804 0 BASE 295 STZ R0,IDXTBUCKET(0) clear the initial block pointer 0B05A E4001F64 0 296 ST R0 AFTINDEX save ptr to the index area 0B05B 61134000 4 5 REG 297 LD VLN R5 0B05C DC005701 298 CALL FREEAFTACS free up access to the AFT 0B05D 40440001 IMM 299 PARVL AFTACSMO 300 * \ / 301 302 ********************************************************************************** 303 * * 304 * Place the system volume's IDX into the AFT * 305 * * 306 ********************************************************************************** 307 308 * \ / 0B05E DC409F6D 309 CALLNP MOUNTIDX give us some accounts 0B05F FA02B061 0 310 JEQZ R0 NOCRASH jump if it did work 311 * \ / the system volume IDX would not go into the brand new AFT 0B060 00027004 312 HALT HALTB7004 could not fit IDX into brand new AFT 313 * --- 314 315 ********************************************************************************** 316 * * 317 * The system volume is mounted. Proceed to mount the other * 318 * volumes required by the system. * 319 * * 320 ********************************************************************************** 321 0000B061 322 NOCRASH LABEL 0B061 EC090A10 4 ZBM 323 STZ VLN,VOLNMOUNT mark system volume as mounted 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2423 (INITPROC) F 148 System Initialization Process 0B062 DC005048 324 CALL ERRORLOG log mount of system volume 0B063 41441017 IMM 325 PARV ERLCMOUNT 0B064 41490086 4 ZBM 326 PARV VLN,VOLNNUM 0B065 60091F15 0 4 ZBM 327 LD R0 VLN,VOLNHCB 0B066 41560805 0 BASE 328 PARV R0,MDVNAME 0B067 41570811 4 BASE 329 PARV VLN,VOLNNAME(0) 0B068 40570812 4 BASE 330 PARVL VLN,VOLNNAME(1) 331 * \ / 332 ********************************************************************************** 333 * * 334 * Start up the clock adjuster if necessary, and schedule the * 335 * first one hour interrupt. * 336 * * 337 ********************************************************************************** 338 0B069 0CC00000 339 IOFF turn off interrupts 0B06A DC404573 340 CALLNP TIMEADJUST just call the interrupt routine 0B06B DC404586 341 CALLNP TIMEDRFT and the one for drift, too 0B06C 0C800000 342 ION restore interrupts 343 0B06D DC404549 344 CALLNP GETDATE get current time in R0,R1 0B06E 62940000 2301 PAIR 345 LD2 R2 PAIR R0 time now in R2,R3 0B06F 58C40010 IMM 346 IORPSR PSRMODIF set funny arithmetic 0B070 1480255B 2 347 DIV R2 ONEHOUR R3=amount into current hour 0B071 58840010 IMM 348 CLBPSR PSRMODIF restore normal arithmetic 0B072 30C0255B 3 349 RSB R3 ONEHOUR R3=amount left in current hour 0B073 DC0044F8 350 CALL TIMESET set up the clock 0B074 4352C000 3 REG 351 PARV2 R3 milliseconds left in hour 0B075 41440000 IMM 352 PARV 0 don't care which CPU 0B076 4100459B 353 PAR HOURINT the hour interrupt processor 0B077 40440000 IMM 354 PARVL 0 parameter unused 355 356 * \ / 357 * A customer may use the Boot.Batch file to do any 358 * volume mounts that he wants at system boot. 359 * \ / 360 361 ********************************************************************************** 362 * * 363 * This code equips the system control mode file. We * 364 * then find the LUNLIST element and call SETWNDO to bring * 365 * in the code control block. A short loop builds the * 366 * CMODEVP list. * 367 * The bottom two switches at boot time select * 368 * which system and control mode to use. * 369 * setting system control mode * 370 * ------- ------ ------- ---- * 371 * off off SYSTEM CM * 372 * off on OLDSYSTEM OLDCM * 373 * on off EXPSYSTEM EXPCM * 374 * on on OPL ----- * 375 * * 376 * All of the above files are on the account * 377 * 'SYSTEM.!!!'. DISKBOOT decides which system * 378 * to run and this decides which CM to run. * 379 * * 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2424 (INITPROC) F 148 System Initialization Process 380 ********************************************************************************** 381 382 * \ / 0B078 60001EE0 0 383 LD R0 FPSWITCHB check for experimental CM 0B079 78040003 0 IMM 384 AND R0 03 isolate the bottom two bits 0B07A 6260B11F 12 0 385 LD2 R1 CMFPARMS(R0) => parameters for control mode file equip 0B07B 60040261 0 IMM 386 LD R0 FRNOPENR specify read only equip 0B07C 08840075 IMM 387 FREQ SULUN do the equip 0B07D FA06B080 0 388 JGEZ R0 NOEQERR jump if good equip 389 * \ / 390 391 ********************************************************************************** 392 * We get here for any error on the EQUIP. Generally, * 393 * this a 'File Not Found' error, but all sorts of things * 394 * are possible. The error code is in R0, so you can see * 395 * for yourself. * 396 ********************************************************************************** 397 398 * \ / 0B07E 00027007 399 HALT HALTB7007 no CM corresponding to system 400 * --- 401 402 ********************************************************************************** 403 * We get here for errors that occur while reading * 404 * the CM file. The error code is in R0. I would * 405 * expect to see a 'File Abnormal/Unavailable' error, * 406 * which merely means that we got a disk error while * 407 * reading part of the file. * 408 ********************************************************************************** 409 0B07F 00027009 410 EQERAD HALT HALTB7009 error on control mode file 411 * --- 412 413 ********************************************************************************** 414 * The equip worked - we have the control mode file. * 415 ********************************************************************************** 416 0000B080 417 NOEQERR LABEL 0B080 60C40075 3 IMM 418 LD R3 SULUN get back the unit number 0B081 DC405B39 419 CALLNP LUNSEARCH find the FCB 0B082 FB72B084 5 420 JNZA FCB NOELNF jump if found 0B083 0002700A 421 HALT HALTB700A lun not now in list? 422 * --- 423 0000B084 424 NOELNF LABEL 0B084 60097182 0 5 ZBM 425 LD R0 FCB,FCLPBLK get the CCB address 0B085 E4095181 0 5 ZBM 426 ST R0 FCB,FCMSBLK combine with volume number 0B086 DC003205 427 CALL SETWNDO1 set up window 1 0B087 41440001 IMM 428 PARV VPCNTLRO fetch read only 0B088 41534000 5 REG 429 PARV FCB indicate what lun associated with this block 0B089 4100B07F 430 PAR EQERAD error address 0B08A 41574801 5 BASE 431 PARV FCB,FCBLOCK specify the CCB MS address 0B08B 40440013 IMM 432 PARVL FBITCCB specify type 0B08C EDC95C16 5 ZBM 433 STW FCB,FCRESEEK ensure cleanliness 434 * loop to build the control mode VM list 0B08D 6104007F 4 IMM 435 LD R4 NPS-1 get the first page number to investigate 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2425 (INITPROC) F 148 System Initialization Process 0000B08E 436 IRAVP LABEL 0B08E 60A80800 2 4 437 LD R2 WNDO1(CCBPAGE0)(R4) check the MS address 0B08F FA82B0A3 2 438 JEQZ R2 IENDLP jump if no page corresponding 0B090 DC002ED0 439 CALL SGETMEM get a chunk of memory 0B091 40440002 IMM 440 PARVL VPLOG indicate its length 0B092 61520000 5 0 REG 441 LD VPP R0 copy the pointer 0B093 DC003090 442 CALL ZEROIT call to clear the block 0B094 41174800 5 BASE 443 PAR VPP,0 indicate address 0B095 40440004 IMM 444 PARVL 2 POWER VPLOG and length 0B096 E5174004 4 5 CACH 445 ST R4 VPP,VPVPN set the page number 0B097 60040001 0 IMM 446 LD R0 VPCNTLRO indicate that this page is read only 0B098 FA88B09A 2 447 JLTZ R2 NOTPROT jump if to protect the page 0B099 60040005 0 IMM 448 LD R0 VPCNTLRO+VPCNTLOC allow own copy 0000B09A 449 NOTPROT LABEL 0B09A E4094E80 0 5 ZBM 450 ST R0 VPP,VPCNTL store control bits for this page 0B09B 60040014 0 IMM 451 LD R0 FBITCODED 0B09C E40942E2 0 5 ZBM 452 ST R0 VPP,VPFBITYPE set the page type as code file block 0B09D EDC94083 5 ZBM 453 STW VPP,VPDRIVE indicate on system drive 0B09E EC095F11 5 ZBM 454 STZ VPP,VPFCB say no associated lun 0B09F E4895183 2 5 ZBM 455 ST R2 VPP,VPMSBLK set the block address 0B0A0 60001ECC 0 456 LD R0 CMODEVP get pointer to existing list 0B0A1 E4095F10 0 5 ZBM 457 ST R0 VPP,VPLINK hook it behind this element 0B0A2 E5401ECC 5 458 ST VPP CMODEVP our element is the new list head 0000B0A3 459 IENDLP LABEL 0B0A3 FB26B08E 4 460 JDR R4 IRAVP repeat loop for each possible page 461 * \ / 462 463 * make prototypical CA from CCB registers 0B0A4 DC002ED0 464 CALL SGETMEM get a free chunk 0B0A5 40440004 IMM 465 PARVL CALOG for a console area 0B0A6 61120000 4 0 REG 466 LD R4 R0 copy pointer to safety 0B0A7 DC003090 467 CALL ZEROIT zap it 0B0A8 41170800 4 BASE 468 PAR R4,0 location 0B0A9 40440010 IMM 469 PARVL 2 POWER CALOG and length 0B0AA 60040BF0 0 IMM 470 LD R0 ADR WNDO1/CCBINFO/CCBPREGS get source 0B0AB 60440030 1 IMM 471 LD R1 CANUMREGS*CPW get size for move 0B0AC 60930000 2 4 REG 472 LD R2 R4 get address of CA 0B0AD FE400000 473 CMOVE transfer info to system memory 0B0AE E5001ECD 4 474 ST R4 CMODECA save on head page 475 0B0AF DC403150 476 CALLNP GRUBWNDO1 release grip on CCB 477 * \ / 478 479 * Consider leaving CM.CODE equipped to prevent writing on 480 * the file -- there is a problem with updating. 0B0B0 60040060 0 IMM 481 LD R0 FRUNEQUIP get the code for unequip 0B0B1 08840075 IMM 482 FREQ SULUN unequip the control mode file 0B0B2 FA06B0B4 0 483 JGEZ R0 SIALF jump if okay 0B0B3 0002700B 484 HALT HALTB700B stop if some problem with UNEQUIP 485 * --- 486 487 ********************************************************************************** 488 * This call is to a routine that will: * 489 * 1) Make the account Hardware.Sys if not already present. * 490 * 2) Verify that this directory has in it an entry for * 491 * each .TERM, .LP, .MT, .CT, and .VT found on the system. * 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2426 (INITPROC) F 148 System Initialization Process 492 ********************************************************************************** 493 0000B0B4 494 SIALF LABEL 0B0B4 DC40B3D9 495 CALLNP MAKEHWSYS 496 * \ / 497 498 ********************************************************************************** 499 * * 500 * We herein equip the terminal configuration file and, if * 501 * found we initialize each port. Even if the file is not found, * 502 * we do the configuring so that the tables are set up * 503 * properly. * 504 * * 505 ********************************************************************************** 506 507 * \ / 0B0B5 60040260 0 IMM 508 LD R0 FRNOPENW this is a temporary instruction 509 ****** LD R0 FRNOPENR request read-only open 0B0B6 62409857 12 510 LD2 R1 TERMINITF 0B0B7 08840075 IMM 511 FREQ SULUN try to equip the config file 512 * \ / if the file's not there, default all things 0B0B8 61001F04 4 513 LD TCB TERMBASE 0000B0B9 514 NEXTTERM LABEL 0B0B9 DC009796 515 CALL INITTERM move info from the file to TCB 0B0BA 40440075 IMM 516 PARVL SULUN 0B0BB DC404AE0 517 CALLNP OUTTSETX send TCB info to the CIA 0B0BC FB36B0B9 4 518 LJNA TCB NEXTTERM link and loop if more 519 * \ / 0B0BD 60040060 0 IMM 520 LD R0 FRUNEQUIP 0B0BE 08840075 IMM 521 FREQ SULUN unequip the config file 522 * \ / 523 524 ********************************************************************************** 525 * * 526 * We now read in any CPU patches that exist for CPUs * 527 * on this system. These are kept in memory always and are * 528 * loaded by the CPUs at boot time (now) and after power up. * 529 * * 530 ********************************************************************************** 531 532 * \ / 0B0BF 61401CF7 5 533 LD R5 CPUCOUNT number of CPUs to check for patches 0000B0C0 534 PATCHLOOP LABEL 0B0C0 602A1CFA 0 5 535 LD R0 CPUSLOTS(R5-1) get a CPU slot number 0B0C1 60201ECE 0 0 536 LD R0 SLOTTABLE(R0) pick up its WRU0 info 0B0C2 604A1040 1 0 CBM 537 LD R1 R0/WRU0CPUSUB get the CPU sub code 0B0C3 64440001 1 IMM 538 CPR R1 CPU4 is this a CPU4? 0B0C4 FE0CB0C6 539 JNE PLOOPEND if not, then no patch 0B0C5 DC40B206 540 CALLNP GETPATCH try to get a patch 0000B0C6 541 PLOOPEND LABEL 0B0C6 FB62B0C0 5 542 DRJ R5 PATCHLOOP do all CPUs 543 * \ / 544 0B0C7 5C001DA1 545 CMZ PATCHLIST any patches? 0B0C8 FE02B0CB 546 JEQ NOCPUPATCH nope 0B0C9 60040800 0 IMM 547 LD R0 1*BIT FLPCPU flag to indicate patch CPUs 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2427 (INITPROC) F 148 System Initialization Process 0B0CA FC001CF6 0 548 IORM R0 FLAGS so dispatcher will 0000B0CB 549 NOCPUPATCH LABEL 550 0B0CB DC00505F 551 CALL ACCOUNT call to make accounting file entry 0B0CC 41440001 IMM 552 PARV APTSTARTUP indicate system start up 0B0CD 4144001C IMM 553 PARV AFRSHORT size of record 0B0CE 40440003 IMM 554 PARVL 3 indicate manager log file 0B0CF DC405025 555 CALLNP ACCTQUE send it to be queued 556 * \ / 557 558 ********************************************************************************** 559 * * 560 * At this point the system is together enough to allow users to * 561 * log on. We also indicate to the dispatcher to fire up the system * 562 * processes so that they may do any initialization that they wish * 563 * prior to any actual calls. * 564 * * 565 ********************************************************************************** 566 * \ / 567 0B0D0 EC001C6B 568 STZ BOOTFLAG system is now together 0B0D1 EC001D0D 569 STZ ALLINHIBIT clear the inhibiter 570 0B0D2 60040100 0 IMM 571 LD R0 1*BIT FLFREEFL get bit to set in flags word 0B0D3 FC001CF6 0 572 IORM R0 FLAGS tell dispatcher to start free file process 573 * \ / 574 575 PLOCK PADTLOCK lock the ADT list 0B0D4 0CC00000 575 IOFF 0B0D5 D1C01D83 575 SETT PADTLOCK 0B0D6 FE0CB0D8 575 JNE MA(2+DISPW MA 0) 0B0D7 DC40308B 575 CALLNP LOCKWAIT 0B0D8 D1C01D85 576 SETT PADTBUSY is process already running 0B0D9 FE02B0DC 577 JEQ UNLKADTLIST jump if ADT started 0B0DA 60040080 0 IMM 578 LD R0 1*BIT FLADT get bit to set in flags word 0B0DB FC001CF6 0 579 IORM R0 FLAGS tell dispatcher to start process 580 * \ / 581 0000B0DC 582 UNLKADTLIST LABEL 583 PUNLOCK PADTLOCK release the list 0B0DC EC001D83 583 STZ PADTLOCK 0B0DD 0C800000 583 ION 584 PLOCK ERRLOGLOCK lock the error log list 0B0DE 0CC00000 584 IOFF 0B0DF D1C01D91 584 SETT ERRLOGLOCK 0B0E0 FE0CB0E2 584 JNE MA(2+DISPW MA 0) 0B0E1 DC40308B 584 CALLNP LOCKWAIT 0B0E2 D1C01D93 585 SETT ERRLOGBUSY is process already running 0B0E3 FE02B0E6 586 JEQ UNLKERRLIST jump if error logger started 0B0E4 60040040 0 IMM 587 LD R0 1*BIT FLERRLOG get bit to set in flags word 0B0E5 FC001CF6 0 588 IORM R0 FLAGS tell dispatcher to start process 589 * \ / 590 0000B0E6 591 UNLKERRLIST LABEL 592 PUNLOCK ERRLOGLOCK release the list 0B0E6 EC001D91 592 STZ ERRLOGLOCK 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2428 (INITPROC) F 148 System Initialization Process 0B0E7 0C800000 592 ION 593 PLOCK APLOCK lock the accounting list 0B0E8 0CC00000 593 IOFF 0B0E9 D1C01D99 593 SETT APLOCK 0B0EA FE0CB0EC 593 JNE MA(2+DISPW MA 0) 0B0EB DC40308B 593 CALLNP LOCKWAIT 0B0EC D1C01D9B 594 SETT APBUSY is process already running 0B0ED FE02B0F0 595 JEQ UNLKAPLIST jump if accounting started 0B0EE 60040200 0 IMM 596 LD R0 1*BIT FLACCTNG get bit to set in flags word 0B0EF FC001CF6 0 597 IORM R0 FLAGS tell dispatcher to start process 598 * \ / 599 0000B0F0 600 UNLKAPLIST LABEL 601 PUNLOCK APLOCK release the list 0B0F0 EC001D99 601 STZ APLOCK 0B0F1 0C800000 601 ION 602 * \ / 603 604 ********************************************************************************** 605 * * 606 * Here, we start the following batch jobs: * 607 * Manager.!!!:Boot.Batch -- BTI initialization * 608 * Manager.Sys:Boot.Batch -- Owner initialization * 609 * Spooler.!!!:Spooler.Batch -- The Spooler * 610 * * 611 ********************************************************************************** 612 613 * \ / 614 * Manager.!!! bootstrap job 0B0F2 60040261 0 IMM 615 LD R0 FRNOPENR 0B0F3 6240B127 12 616 LD2 R1 BOOTBATCH0 0B0F4 08840075 IMM 617 FREQ SULUN equip MANAGER.!!!:BOOT.BATCH 0B0F5 FA08B0FC 0 618 JLTZ R0 DIDTASK0 0B0F6 60C40075 3 IMM 619 LD R3 SULUN our unit number 0B0F7 DC405B39 620 CALLNP LUNSEARCH find the FCB for it 0B0F8 DC00945C 621 CALL MAKEBATCH produce 'spooled' batch job 0B0F9 41440075 IMM 622 PARV SULUN pass input unit 0B0FA 4300B12F 623 PAR2 MBANGOUT indicate output file name 0B0FB 4000B137 624 PARL MBANGBLK and supply logon block prototype 0000B0FC 625 DIDTASK0 LABEL 626 627 * Manager.Sys bootstrap job 0B0FC 60040261 0 IMM 628 LD R0 FRNOPENR 0B0FD 6240B14A 12 629 LD2 R1 BOOTBATCH1 0B0FE 08840075 IMM 630 FREQ SULUN equip MANAGER.SYS:BOOT.BATCH 0B0FF FA08B106 0 631 JLTZ R0 DIDTASK1 0B100 60C40075 3 IMM 632 LD R3 SULUN our unit number 0B101 DC405B39 633 CALLNP LUNSEARCH find the FCB for it 0B102 DC00945C 634 CALL MAKEBATCH produce 'spooled' batch job 0B103 41440075 IMM 635 PARV SULUN pass input unit 0B104 4300B152 636 PAR2 MSYSOUT indicate output file name 0B105 4000B15A 637 PARL MSYSBLK and supply logon block prototype 0000B106 638 DIDTASK1 LABEL 639 640 * Spooler 0B106 DC4094B1 641 CALLNP STARTSPLR start up the system Spooler 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2429 (INITPROC) F 148 System Initialization Process 642 * ignore errors 0B107 FE0EB000 643 JMP WIPEUSOUT go clean us up 644 * --- 645 646 * Info block for equip of control mode file 647 0B108 53797374 648 CMFPARM TEXT "System.!!!:CM.Code" 0B10D 53797374 649 CMFPARMO TEXT "System.!!!:OldCM.Code" 0B113 53797374 650 CMFPARME TEXT "System.!!!:ExpCM.Code" 0B119 53797374 651 CMFPARMX TEXT "System.!!!:XXXCM.Code" 652 0000B11F 653 CMFPARMS LABEL 0B11F 00000012 654 VFD 18 0B120 0000B108 655 PTR CMFPARM 0 - current CM 0B121 00000015 656 VFD 21 0B122 0000B10D 657 PTR CMFPARMO 1 - old CM 0B123 00000015 658 VFD 21 0B124 0000B113 659 PTR CMFPARME 2 - experimental CM 0B125 00000015 660 VFD 21 0B126 0000B119 661 PTR CMFPARMX 3 - unknown CM 662 663 * Manager.!!! bootstrap job 0B127 00000016 664 BOOTBATCH0 VFD 22 0B128 0000B129 665 PTR BOOTBTCH0 0B129 4D616E61 666 BOOTBTCH0 TEXT "Manager.!!!:Boot.Batch" 667 0B12F 00000015 668 MBANGOUT VFD 21 0B130 0000B131 669 PTR MBANGOUTN 0B131 4D616E61 670 MBANGOUTN TEXT "Manager.!!!:Boot.List" 671 0000B137 672 MBANGBLK LABEL 0B137 4D616E61 673 ASCII 5,Manager.!!! 0B13D 00000000 674 VFD 0,0 0B13E 4D616E61 675 ASCII 9,Manager.!!!() 0B147 20202020 676 ASCII 3, 677 678 * Manager.Sys bootstrap job 0B14A 00000016 679 BOOTBATCH1 VFD 22 0B14B 0000B14C 680 PTR BOOTBTCH1 0B14C 4D616E61 681 BOOTBTCH1 TEXT "Manager.Sys:Boot.Batch" 682 0B152 00000015 683 MSYSOUT VFD 21 0B153 0000B154 684 PTR MSYSOUTN 0B154 4D616E61 685 MSYSOUTN TEXT "Manager.Sys:Boot.List" 686 0000B15A 687 MSYSBLK LABEL 0B15A 4D616E61 688 ASCII 5,Manager.Sys 0B160 00000000 689 VFD 0,0 0B161 4D616E61 690 ASCII 9,Manager.Sys() 0B16A 20202020 691 ASCII 3, 692 693 END INITPROC 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2430 (INITPROC) F 148 System Initialization Process 695 696 ********************************************************************************** 697 * * 698 * CLOCKCHECK * 699 * We now check the system clock for reasonableness. * 700 * * 701 * If the NVM time is not within 6 years after the system * 702 * assembly time, assume the NVM time is bad and set it to the * 703 * system assembly time. * 704 * * 705 * Calculate a target value = MAX (NVM time, security block time) * 706 * * 707 * If the system clock is not within 36 days past the target value, * 708 * assume the system clock is bad and set it to the target value. * 709 * Call: * 710 * WNDO3 = security block * 711 * CALLNP CLOCKCHECK * 712 * * 713 * Eats R0:R3. * 714 * Stack required = 14 * 715 * 4 + max ( ERRORLOG (3), FLREADNVM (7), GENOPMSG (1), * 716 * GETNVMTIME (10), LOCKWAIT (0), SETNVMTIME (7), * 717 * SGETMEM (0) ) * 718 * * 719 ********************************************************************************** 720 721 BLOCK CLOCKCHECK subroutine 722 ENTRY CLOCKCHECK routine to verify and initialize system clock 723 ENTRY ENDOFASSY last time this assy can be used 724 725 BEGFRAME 00178801 6 BASE 726 TARGETDATE BSS 1 larger of NVM time and security block time 00178802 6 BASE 727 NEWDATE2 BSS2 1 new time to set clock to 728 ENDFRAME 729 0B16D DD5F8004 6 STAK 730 CLOCKCHECK ENTRNP PUSH 731 732 ********************************************************************************** 733 * Advance the last known date in security block by a few * 734 * seconds so that repeated boots (due to hardware problem or * 735 * whatever) will each be using a new base for the file serial * 736 * number should the clock happen to be not working. This * 737 * also provides a different base for the pseudo-random * 738 * generators used by secondary password programs. * 739 ********************************************************************************** 740 0B16E 62041388 01 IMM 741 LD2 R0 5*MSECSS five seconds 0B16F 9A001229 01 742 ADD2M R0 WNDO3(SECLASTDT) fix last known date in security block 743 * \ / 0B170 DC40B1C9 744 CALLNP GETNVMTIME get known last NVM time 745 * R0 = NVM time 0B171 6800B1BD 0 746 UCPR R0 TIMEOFASSY compare against time of assembly 0B172 FE08B175 747 JLT NVMTIMEBAD jump if NVM time before time of assembly 0B173 6800B1BE 0 748 UCPR R0 ENDOFASSY compare against six years later 0B174 FE0AB17F 749 JLE NVMTIMEOK jump if NVM time is reasonable 750 * \ / 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2431 (INITPROC) F 148 System Initialization Process 751 0000B175 752 NVMTIMEBAD LABEL 0B175 DC005517 753 CALL SETNVMTIME set new time into NVM 0B176 4040B1BD 754 PARVL TIMEOFASSY use time of assembly 0B177 6080B1BD 2 755 LD R2 TIMEOFASSY get time of assembly 0B178 D0128000 2 REG 756 INC R2 add in 4.096 seconds 0B179 DC005517 757 CALL SETNVMTIME set this time into NVM 0B17A 40528000 2 REG 758 PARVL R2 time of assembly plus some 0B17B DC005048 759 CALL ERRORLOG log the bad time in NVM 0B17C 4144062B IMM 760 PARV ERLCNVMTIM NVM time is unreasonable 0B17D 40440000 IMM 761 PARVL 0 unused parameter 0B17E 6000B1BD 0 762 LD R0 TIMEOFASSY R0 = NVM time 763 * \ / 764 0000B17F 765 NVMTIMEOK LABEL 0B17F 5410B1BC 0 @ 766 MAX R0 @LASTDTPTR R0 = larger of NVM and security time 0B180 E4178801 0 6 BASE 767 ST R0 SP,TARGETDATE save target date 0B181 68101EE7 0 @ 768 UCPR R0 @FDATEPTR compare against current time 0B182 FE04B186 769 JGT CLOCKBAD 0B183 1800B1BF 0 770 ADD R0 X36DAYS add in a month 0B184 68101EE7 0 @ 771 UCPR R0 @FDATEPTR compare that against current time 0B185 FE06B1AD 772 JGE CLOCKOK jump if clock is OK 773 * \ / 774 0000B186 775 CLOCKBAD LABEL clock is bad 0B186 60D78801 3 6 BASE 776 LD R3 SP,TARGETDATE get target date 0B187 DC005048 777 CALL ERRORLOG log the error 0B188 41440A2A IMM 778 PARV ERLCDATBAD date is bad 0B189 4152C000 3 REG 779 PARV R3 target date 0B18A 40501EE7 @ 780 PARVL @FDATEPTR current date 781 * \ / 0B18B DC002ED0 782 CALL SGETMEM get an operator message block 0B18C 40440005 IMM 783 PARVL OPMSGLOG 0B18D 60D20000 3 0 REG 784 LD R3 R0 R3 -> OPMSG block 0B18E EC08C2E0 3 ZBM 785 STZ R3,OPMSGPROC no process number 0B18F 3896C802 2 3 BASE 786 LEA R2 R3,OPMSGTEXT put text into message 0B190 6004B1C0 0 IMM 787 LD R0 ADR CLOCKMSG 0B191 60440024 1 IMM 788 LD R1 CLMSGLEN 0B192 E456C007 1 3 CACH 789 ST R1 R3,OPMSGLEN save length 0B193 FE400000 790 CMOVE put text into message 0B194 DC0046F3 791 CALL GENOPMSG generate message to operator 0B195 4052C000 3 REG 792 PARVL R3 793 * \ / 0B196 60178801 0 6 BASE 794 LD R0 SP,TARGETDATE get the target date 0B197 EE178802 6 BASE 795 STZ2 SP,NEWDATE2 clear new date 0B198 E409A802 0 6 ZBM 796 ST R0 SP,NEWDATE2/DATEHORD create new date 797 * \ / 798 PLOCK TIMERLOCK reserve the queue for us 0B199 0CC00000 798 IOFF 0B19A D1C01EF1 798 SETT TIMERLOCK 0B19B FE0CB19D 798 JNE MA(2+DISPW MA 0) 0B19C DC40308B 798 CALLNP LOCKWAIT 0B19D 60C40086 3 IMM 799 LD PFPTR PNCIX map the SSU into CIX 0B19E 00C01EDE 800 LDPF CLOCKPF 0B19F 62178802 016 BASE 801 LD2 R0 SP,NEWDATE2 get new date 802 * note that since the low 12 bits of the new target date are 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2432 (INITPROC) F 148 System Initialization Process 803 * zero, we are safe from a rollover when updating the clock 804 * to this new value (as long as we do the low half first). 0B1A0 E4401802 1 805 ST R1 CIX(SSUCLOCKL) set low half of clock 0B1A1 E4001801 0 806 ST R0 CIX(SSUCLOCKU) and now upper 0B1A2 1A040002 01 IMM 807 ADD2 R0 2 create new fence: 2 ms later 0B1A3 E4401809 1 808 ST R1 CIX(SSUFENCE) update the fence register 0B1A4 12001EE5 01 809 SUB2 R0 FDATE get correction to date 810 * \ / 0B1A5 60801EF2 2 811 LD R2 TIMERQ point to the timer queue 0B1A6 FAB0B1AA 2 812 JZA R2 DONETIMEQ jump if none (unlikely) 813 * \ / 814 0000B1A7 815 TIMERLOOP LABEL 0B1A7 9A168801 012 BASE 816 ADD2M R0 R2,TMRTIME update time of a timer queue element 0B1A8 FAB6B1A7 2 817 LJNA R2 TIMERLOOP and do them all 818 * \ / 0B1A9 9A001EE5 01 819 ADD2M R0 FDATE and finally, fix the system time 820 0000B1AA 821 DONETIMEQ LABEL 0B1AA 80D2C000 3 REG 822 PFRC PFPTR unmap the SSU 823 PUNLOCK TIMERLOCK and release the timer lock 0B1AB EC001EF1 823 STZ TIMERLOCK 0B1AC 0C800000 823 ION 824 * \ / 825 0000B1AD 826 CLOCKOK LABEL 0B1AD 60001226 0 827 LD R0 WNDO3(SECTZONE) get the time zone 0B1AE FA02B1B0 0 828 JEQZ R0 NOTZONE don't set if nothing on disk 0B1AF E4001EEF 0 829 ST R0 TIMEZONE tell system local convention 0000B1B0 830 NOTZONE LABEL 0B1B0 6000122D 0 831 LD R0 WNDO3(SECDATERR) get date error in milliseconds 0B1B1 E4001EED 0 832 ST R0 FDATERROR 0B1B2 DC004607 833 CALL FLREADNVM call for clock drift value from NVM 0B1B3 41440002 IMM 834 PARV 2 indicate 2 byte read 0B1B4 40440033 IMM 835 PARVL NVMDATDRFT pass address of clock drift value 0B1B5 600A0100 0 0 CBM 836 LD R0 R0/BITS 0:15 shift to lower two bytes 0B1B6 704A2010 1 0 CBM 837 LDN R1 R0/BIT 16 get sign bit 0B1B7 E44A0100 1 0 CBM 838 ST R1 R0/BITS 0:15 extend the sign 0B1B8 E4001EEE 0 839 ST R0 FDATEDRFT 0B1B9 6200122F 01 840 LD2 R0 WNDO3(SECDATCOR) get date of last time correction 0B1BA E6001EEB 01 841 ST2 R0 LASTCORR 0B1BB 5D1F8004 6 STAK 842 LEAVE POP return 843 * --- 844 0B1BC A0081229 845 LASTDTPTR PTR WNDO3/SECLASTDT/DATEHORD ptr to date (32 bits in sec blk) 846 0B1BD 3DB03E00 847 TIMEOFASSY VFD ASSYTIME => assembly time (32 bits) 0B1BE 40711A06 848 ENDOFASSY VFD ASSYTIME+6*365*FOURSECSD last time this assy can be used 849 * The above constant is six years after the time of assembly 850 0B1BF 000B9634 851 X36DAYS VFD 36*FOURSECSD 36 days (in 32 bit format) 852 0B1C0 44415445 853 CLOCKMSG TEXT "DATE WRONGSystem clock may be wrong." 00000024 ABS 854 CLMSGLEN EQU 36 855 856 END CLOCKCHECK subroutine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2433 (INITPROC) F 148 System Initialization Process 858 859 ********************************************************************************** 860 * * 861 * GETNVMTIME. We store several 32 bit times in the NVM * 862 * that are used to provide a 'floor' (least allowable value) * 863 * for the system clock. This routine will return the latest * 864 * of those times. One note is that there must be one other * 865 * time within one hour and six minutes of the latest time, * 866 * else we deem the whole NVM to be bogus. * 867 * Call: * 868 * CALLNP GETNVMTIME * 869 * returns, R0 = 32 bit time * 870 * * 871 * Eats R0:R3 * 872 * Stack required = 10 * 873 * 4 + max ( READNVM (6) ) * 874 * * 875 ********************************************************************************** 876 877 BLOCK GETNVMTIME subroutine 878 ENTRY GETNVMTIME 879 880 BEGFRAME 00178801 6 BASE 881 REGSAVE BSS 1 place to save R4 00178802 6 BASE 882 NVMLAST BSS 1 second latest NVM time 00178803 6 BASE 883 NVMMAX BSS 1 latest of the NVM times 884 ENDFRAME 885 0B1C9 DD5F8004 6 STAK 886 GETNVMTIME ENTRNP PUSH 0B1CA EE178802 6 BASE 887 STZ2 SP,NVMLAST zero out both stack temps 0B1CB E5178801 4 6 BASE 888 ST R4 SP,REGSAVE save current value 0B1CC 61001EF7 4 889 LD R4 NVMCLKNUM count of clock values in the NVM 0B1CD 11040001 4 IMM 890 SUB R4 1 convert to index 891 * \ / 892 0000B1CE 893 GETNVMLOOP LABEL 0B1CE 60440004 1 IMM 894 LD R1 NVMCLKBYTS number of bytes for each time 0B1CF 1C530000 1 4 REG 895 MUL R1 R4 calculate index 0B1D0 18401EF6 1 896 ADD R1 NVMCLOCKS add in base 0B1D1 DC0045EA 897 CALL READNVM read a clock value 0B1D2 41440004 IMM 898 PARV NVMCLKBYTS number of bytes to read 0B1D3 40524000 1 REG 899 PARVL R1 and byte address 900 * \ / 0B1D4 6800B1BE 0 901 UCPR R0 ENDOFASSY allow up to 6 years after system assembly 0B1D5 FE0AB1D7 902 JLE TIMEOK jump if NVM time is reasonable 0B1D6 60040000 0 IMM 903 LD R0 0 use 0 for any bad value 0000B1D7 904 TIMEOK LABEL 905 * \ / 0B1D7 68178803 0 6 BASE 906 UCPR R0 SP,NVMMAX is this the greatest time? 0B1D8 FE08B1DD 907 JLT NOTBIGYET jump if not 0B1D9 E0178803 0 6 BASE 908 EXCH R0 SP,NVMMAX save largest one 0B1DA E4178802 0 6 BASE 909 ST R0 SP,NVMLAST this becomes next largest 0B1DB E5001EF9 4 910 ST R4 NVMCLKINDX set index marker 0B1DC FE0EB1E0 911 JMP GETNVMNEXT onward to next value, if any 912 * --- 913 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2434 (INITPROC) F 148 System Initialization Process 0000B1DD 914 NOTBIGYET LABEL 0B1DD 68178802 0 6 BASE 915 UCPR R0 SP,NVMLAST could this one be second largest? 0B1DE FE0AB1E0 916 JLE GETNVMNEXT jump if it is definitely not 0B1DF E4178802 0 6 BASE 917 ST R0 SP,NVMLAST save this dude away 918 * \ / 919 0000B1E0 920 GETNVMNEXT LABEL 0B1E0 FB26B1CE 4 921 JDR R4 GETNVMLOOP decrement index and continue 922 * \ / 0B1E1 60178803 0 6 BASE 923 LD R0 SP,NVMMAX get maximum we found 0B1E2 60520000 1 0 REG 924 LD R1 R0 put in safe register 0B1E3 10578802 1 6 BASE 925 SUB R1 SP,NVMLAST find difference between latest times 0B1E4 6840B1EA 1 926 UCPR R1 MAXTIMEDIF greater than an hour plus 0B1E5 FE0AB1E8 927 JLE NVMISGOOD ok, NVM appears to be good 928 929 ********************************************************************************** 930 * The presumption is that the greatest value that we * 931 * found is bogus because it was being written when the power * 932 * failed and one of the bytes is stored improperly. We will * 933 * just use the next highest value. We presume that the * 934 * address of the next highest value will be one less than the * 935 * bogus one, since that is the order in which we store them. * 936 * Note that if we have broken bits in the NVM, strange * 937 * results can be expected. * 938 ********************************************************************************** 939 0B1E6 60178802 0 6 BASE 940 LD R0 SP,NVMLAST otherwise, use previous 0B1E7 D0401EF9 941 DEC NVMCLKINDX and presume in proper place 942 * \ / 943 0000B1E8 944 NVMISGOOD LABEL 0B1E8 61178801 4 6 BASE 945 LD R4 SP,REGSAVE restore contents of this register 0B1E9 5D1F8004 6 STAK 946 LEAVE POP exit this mess 947 * --- 948 0B1EA 000003C2 949 MAXTIMEDIF VFD 1*FOURSECSH+6*FOURSECSM one hour and six minutes 950 951 END GETNVMTIME subroutine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2435 (INITPROC) F 148 System Initialization Process 953 954 ********************************************************************************** 955 * * 956 * DEATHCHECK. Routine to verify that the death flag for the * 957 * system is not triggered. We compare the current time against the * 958 * date saved in the NVM saying when the system is supposed to die. * 959 * Call: * 960 * CALLNP DEATHCHECK * 961 * * 962 * If the system is supposed to be dead this routine never returns. * 963 * * 964 * Eats R0:R1. * 965 * Stack required = 1 * 966 * * 967 ********************************************************************************** 968 969 BLOCK DEATHCHECK routine 970 ENTRY DEATHCHECK verify system lifetime is true 971 972 BEGFRAME 973 ENDFRAME 974 0B1EB DD5F8001 6 STAK 975 DEATHCHECK ENTRNP PUSH 0B1EC 60040055 0 IMM 976 LD R0 URMAYIRUN check the proprietary clock 0B1ED 60440000 1 IMM 977 LD R1 0 the code for the system 0B1EE 09040000 IMM 978 UREQ 0 0B1EF FA0CB1F1 0 979 JNEZ R0 DEATHHALT jump if we may not run 0B1F0 5D1F8001 6 STAK 980 LEAVE POP 981 * --- 982 0000B1F1 983 DEATHHALT LABEL 0B1F1 002A7000 984 HALT HLTSV7000 the system death date has passed 985 * --- 986 987 END DEATHCHECK 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2436 (INITPROC) F 148 System Initialization Process 989 990 ********************************************************************************** 991 * * 992 * Routine to fetch the system serial number out of the * 993 * NVM. We also convert it into a PAK6 form for use as the * 994 * system name in case the system doesn't otherwise specify * 995 * one. We do this by using the right 16 bits as the system number. * 996 * * 997 * Eats R0:R3 * 998 * Stack required = 10 * 999 * 4 + max ( CHARTOP6 (1), INTTOCHAR (6), READNVM (6) ) * 1000 * * 1001 ********************************************************************************** 1002 1003 BLOCK GETSSN subroutine 1004 ENTRY GETSSN gets system serial number 1005 1006 BEGFRAME 00178801 6 BASE 1007 DTEMP BSS 3 work area 1008 ENDFRAME 1009 0B1F2 DD5F8004 6 STAK 1010 GETSSN ENTRNP PUSH 0B1F3 DC0045EA 1011 CALL READNVM get system serial number 0B1F4 41440004 IMM 1012 PARV CPW 0B1F5 4044003C IMM 1013 PARVL NVMSSN indicate where in NVM 0B1F6 E4001EFA 0 1014 ST R0 SYSTEMSN save it 1015 * \ / now unpack the two parts of the SSN 0B1F7 60538000 1 6 REG 1016 LD R1 SP make a copy of the stack pointer 0B1F8 DC005903 1017 CALL INTTOCHAR convert SSN to a decimal number 0B1F9 414A2100 0 CBM 1018 PARV R0/BITS 16:31 pass the customer number part 0B1FA 40164801 1 BASE 1019 PARL R1,DTEMP indicate where to put it 0B1FB 60538000 1 6 REG 1020 LD R1 SP make a copy of the stack pointer 0B1FC DC005898 1021 CALL CHARTOP6 convert the compressed string to PAK6 0B1FD 40164801 1 BASE 1022 PARL R1,DTEMP indicate its address 0B1FE E4401EFB 1 1023 ST R1 SYSTEMNM and store it into the system name location 0B1FF 5D1F8004 6 STAK 1024 LEAVE POP and return 1025 * ---- 1026 1027 END GETSSN subroutine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2437 (INITPROC) F 148 System Initialization Process 1029 1030 ********************************************************************************** 1031 * * 1032 * GETPATCH * 1033 * * 1034 * Builds a file name for a CPU microcode patch and * 1035 * trys to open the patch file. If successful the patch * 1036 * is read in and linked onto the PATCHLIST. * 1037 * The CPU must be a CPU4 (or perhaps higher some day). * 1038 * The patch file name constructed is System.!!!:CPUPatch.RevX, * 1039 * where X is the rev number of the CPU microcode. * 1040 * Call: * 1041 * LD R0 WRU0 for CPU4 * 1042 * CALLNP GETPATCH * 1043 * * 1044 * Eats R0:R3 * 1045 * Stack required = 7 * 1046 * 3 + max ( HEXTOCHAR (4), SGETMEM (0), SFREEMEM (0), * 1047 * ZEROIT (1) ) * 1048 * * 1049 ********************************************************************************** 1050 1051 BLOCK GETPATCH subroutine 1052 ENTRY GETPATCH 1053 1054 BEGFRAME 00178801 6 BASE 1055 CPUWRU0 BSS 1 WRU0 response for this CPU 00178802 6 BASE 1056 NAMEPLACE BSS 1 pointer to block used to build filename 1057 ENDFRAME 1058 0B200 53797374 1059 PATCHSTR TEXT "System.!!!:CPUPatch.Rev" 00000017 ABS 1060 PATCHSTRL EQU 23 00000003 ABS 1061 PATCHLOG EQU (DISPW PATCHSTR) LOG 2 1062 0B206 DD5F8003 6 STAK 1063 GETPATCH ENTRNP PUSH 0B207 600A3080 0 0 CBM 1064 LD R0 R0/WRU0MREV pick up the micro code rev level 0B208 E4178801 0 6 BASE 1065 ST R0 SP,CPUWRU0 save the rev number of this CPU 1066 0B209 60401DA1 1 1067 LD R1 PATCHLIST R1 -> list of patches 0B20A 3C164000 0 1 CACH 1068 LSRCH R0 R1,CPUPREV is this rev already there? 0B20B FE02B246 1069 JEQ NOPATCH if so, then don't get it again 1070 * \ / 1071 0B20C DC002ED0 1072 CALL SGETMEM get chunk of mem to build file name 0B20D 40440003 IMM 1073 PARVL PATCHLOG how much we need 0B20E E4178802 0 6 BASE 1074 ST R0 SP,NAMEPLACE save where our name is 0B20F DC003090 1075 CALL ZEROIT make it clean 0B210 41160800 0 BASE 1076 PAR R0,0 what to clean 0B211 40440008 IMM 1077 PARVL 2 POWER PATCHLOG how much is there 1078 0B212 6004B200 0 IMM 1079 LD R0 ADR PATCHSTR R0 -> start of patch file name string 0B213 60440017 1 IMM 1080 LD R1 PATCHSTRL size of string 0B214 60978802 2 6 BASE 1081 LD R2 SP,NAMEPLACE R2 -> where we want it 0B215 FE400000 1082 CMOVE 1083 0B216 60178801 0 6 BASE 1084 LD R0 SP,CPUWRU0 pick up the micro code rev level 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2438 (INITPROC) F 148 System Initialization Process 0B217 60C40001 3 IMM 1085 LD R3 1 assume one hex digit in length 0B218 6404000F 0 IMM 1086 CPR R0 0F is it? 0B219 FE0AB21B 1087 JLE HAVESIZE good guess 0B21A 60C40002 3 IMM 1088 LD R3 2 must be 2 hex digits 0000B21B 1089 HAVESIZE LABEL 0B21B 38968000 2 2 CACH 1090 LEA R2 CACH R2,0 make sure we have a character pointer 0B21C DC0058D1 1091 CALL HEXTOCHAR add rev number to the file name 0B21D 41520000 0 REG 1092 PARV R0 the number 0B21E 4152C000 3 REG 1093 PARV R3 how many digits 0B21F 40168400 2 @R 1094 PARL @R2 where we want it 1095 0B220 60040261 0 IMM 1096 LD R0 FRNOPENR lets see if the file is out there 0B221 60440017 1 IMM 1097 LD R1 PATCHSTRL get the name size 0B222 1852C000 1 3 REG 1098 ADD R1 R3 add on rev number length 0B223 60978802 2 6 BASE 1099 LD R2 SP,NAMEPLACE R2 -> file name 0B224 08840075 IMM 1100 FREQ SULUN try to open the file 0B225 FA08B246 0 1101 JLTZ R0 NOPATCH no patch for the CPU revision 1102 * \ / 1103 0B226 60040030 0 IMM 1104 LD R0 FRREAD time to read what we have 0B227 60440008 1 IMM 1105 LD R1 2*CPW need the first 2 words 0B228 60978802 2 6 BASE 1106 LD R2 SP,NAMEPLACE done with the file name, reuse the space 0B229 EE168800 2 BASE 1107 STZ2 R2,0 zero out words to be read over 0B22A 08840075 IMM 1108 FREQ SULUN slurp 0B22B FA08B244 0 1109 JLTZ R0 BADPATCH oops 1110 * \ / 1111 0B22C 60578802 1 6 BASE 1112 LD R1 SP,NAMEPLACE 0B22D 60D64801 3 1 BASE 1113 LD R3 R1,1 second word read is size of patch 0B22E DC002F5D 1114 CALL SFREEMEM return this chunk of memory 0B22F 41440003 IMM 1115 PARV PATCHLOG amount to return 0B230 40524000 1 REG 1116 PARVL R1 where it is 1117 0B231 FAC2B244 3 1118 JEQZ R3 BADPATCH zero length patch is not good 0B232 5C56D001 3 REG 1119 HIB R3+CPUPSIZE need log size 0B233 70920000 2 0 REG 1120 LDN R2 R0 copy result of HIB 0B234 DC002ED0 1121 CALL SGETMEM get the right size block 0B235 40569020 2 REG 1122 PARVL R2+WORDLNTH size we need 1123 0B236 6052C000 1 3 REG 1124 LD R1 R3 R1 = count 0B237 60D20000 3 0 REG 1125 LD R3 R0 R3 -> beginning of chunk for CPUPATCH 0B238 E456C801 1 3 BASE 1126 ST R1 R3,CPUPLNTH put the length in 0B239 10440001 1 IMM 1127 SUB R1 1 count included this word 0B23A 1C440004 1 IMM 1128 MUL R1 CPW turn into a char count 0B23B 3896C802 2 3 BASE 1129 LEA R2 R3,CPUPSTRT R2 -> where the patch should start 0B23C 60040030 0 IMM 1130 LD R0 FRREAD read in the rest of the patch 0B23D 08840075 IMM 1131 FREQ SULUN slurp 0B23E FA08B244 0 1132 JLTZ R0 BADPATCH oops 1133 0B23F 60178801 0 6 BASE 1134 LD R0 SP,CPUWRU0 pick up the micro code rev level 0B240 E416C000 0 3 CACH 1135 ST R0 R3,CPUPREV put rev number into element 0B241 60001DA1 0 1136 LD R0 PATCHLIST R0 -> head of CPU patch list 0B242 E408DF10 0 3 ZBM 1137 ST R0 R3,CPUPLINK link onto ours 0B243 E4C01DA1 3 1138 ST R3 PATCHLIST our is now start of list 1139 * \ / 1140 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2439 (INITPROC) F 148 System Initialization Process 0000B244 1141 BADPATCH LABEL 0B244 60040060 0 IMM 1142 LD R0 FRCLOSE close the patch file 0B245 08840075 IMM 1143 FREQ SULUN 1144 * \ / 1145 0000B246 1146 NOPATCH LABEL 0B246 5D1F8003 6 STAK 1147 LEAVE POP 1148 * --- 1149 1150 END of GETPATCH subroutine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2440 (INITPROC) F 148 System Initialization Process 1152 1153 ********************************************************************************** 1154 * * 1155 * FIGCHKALL - Do all configuration checks. This routine will * 1156 * count all of the various types of resources, and verify that the * 1157 * user has paid for them all, and that there are at least as many * 1158 * as there were last time the system was booted. If he has more * 1159 * than he paid for, we HALT. If he has fewer than he did last time, * 1160 * we warn him. * 1161 * * 1162 * WNDO3 = security block * 1163 * CALLNP FIGCHKALL * 1164 * * 1165 * Eats R0:R3. * 1166 * Stack required = 11 * 1167 * 3 + max ( CONFIGCHECK (8), COUNTLIST (1), COUNTSLOT (1), * 1168 * LOCKWAIT (0) ) * 1169 * * 1170 ********************************************************************************** 1171 1172 BLOCK FIGCHKALL subroutine 1173 1174 ENTRY FIGCHKALL 1175 1176 BEGFRAME 00178801 6 BASE 1177 SAVER4R5 BSS2 1 to save registers 1178 ENDFRAME 1179 0B247 DD5F8003 6 STAK 1180 FIGCHKALL ENTRNP PUSH 0B248 E7178801 456 BASE 1181 ST2 R4 SP,SAVER4R5 save these troublesome registers 1182 1183 * Memory Control Units ... 1184 0B249 DC00B361 1185 CALL COUNTSLOT get number of MCU's 0B24A 40440001 IMM 1186 PARVL SLTTMEM 0B24B DC00B372 1187 CALL CONFIGCHECK do the checking 0B24C 41520000 0 REG 1188 PARV R0 number of units 0B24D 41440040 IMM 1189 PARV NVMMAXMCU NVM location for max allowed 0B24E 41440001 IMM 1190 PARV NVMFACMCU factor to apply to above number 0B24F 41001231 1191 PAR WNDO3/SECNUMMCU location for number had last time 0B250 4000B2E4 1192 PARL MSGMCU name block for resource 0B251 002A7100 1193 HALT HLTSV7100 too many MCUs present 1194 1195 * Pages of memory ... 1196 0B252 DC00B372 1197 CALL CONFIGCHECK check number of pages for reasonable 0B253 41401CC8 1198 PARV TOTALPAGES number of pages 0B254 41440041 IMM 1199 PARV NVMMAXPAGE location in NVM for max 0B255 41440020 IMM 1200 PARV NVMFACPAGE factor to apply to above 0B256 41001232 1201 PAR WNDO3/SECNUMPAGE location in security block for previous 0B257 4000B2EC 1202 PARL MSGPAGE name of resource 0B258 002A7101 1203 HALT HLTSV7101 too much memory present 1204 1205 * Number of CPU's in system ... 1206 0B259 DC00B372 1207 CALL CONFIGCHECK check the number 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2441 (INITPROC) F 148 System Initialization Process 0B25A 41401CF7 1208 PARV CPUCOUNT number of CPU's 0B25B 41440042 IMM 1209 PARV NVMMAXCPU location in NVM 0B25C 41440001 IMM 1210 PARV NVMFACCPU factor for number in NVM 0B25D 41001233 1211 PAR WNDO3/SECNUMCPU location in security block 0B25E 4000B2F3 1212 PARL MSGCPU long name 0B25F 002A7200 1213 HALT HLTSV7200 too many CPUs present 1214 1215 * Number of PPU's in system ... 1216 0B260 DC00B361 1217 CALL COUNTSLOT how many are there? 0B261 40440003 IMM 1218 PARVL SLTTPPU type of module 0B262 DC00B372 1219 CALL CONFIGCHECK check the number 0B263 41520000 0 REG 1220 PARV R0 number of PPU's 0B264 41440043 IMM 1221 PARV NVMMAXPPU location in NVM 0B265 41440001 IMM 1222 PARV NVMFACPPU factor for number in NVM 0B266 41001234 1223 PAR WNDO3/SECNUMPPU location in security block 0B267 4000B2FE 1224 PARL MSGPPU long name 0B268 002A7300 1225 HALT HLTSV7300 too many PPUs present 1226 1227 * Number of Comm Controllers in system ... 1228 0B269 DC00B36C 1229 CALL COUNTLIST how many are there? 0B26A 40001F01 1230 PARL COMLIST list to count 0B26B DC00B372 1231 CALL CONFIGCHECK check the number 0B26C 41520000 0 REG 1232 PARV R0 number of ACC's 0B26D 41440044 IMM 1233 PARV NVMMAXACC location in NVM 0B26E 41440001 IMM 1234 PARV NVMFACACC factor for number in NVM 0B26F 41001235 1235 PAR WNDO3/SECNUMACC location in security block 0B270 4000B308 1236 PARL MSGACC long name 0B271 002A7380 1237 HALT HLTSV7380 too many Comms present 1238 1239 * Number of Terminal Ports in system ... 1240 0B272 DC00B36C 1241 CALL COUNTLIST how many are there? 0B273 40001F04 1242 PARL TERMBASE list to count 0B274 10040001 0 IMM 1243 SUB R0 1 remove count for SSU terminal 0B275 DC00B372 1244 CALL CONFIGCHECK check the number 0B276 41520000 0 REG 1245 PARV R0 number of PORT's 0B277 41440045 IMM 1246 PARV NVMMAXPORT location in NVM 0B278 41440008 IMM 1247 PARV NVMFACPORT factor for number in NVM 0B279 41001236 1248 PAR WNDO3/SECNUMPORT location in security block 0B27A 4000B312 1249 PARL MSGPORT long name 0B27B 002A7381 1250 HALT HLTSV7381 too many ports on system 1251 1252 * Number of Disk Controllers in system ... 1253 0B27C DC00B36C 1254 CALL COUNTLIST how many are there? 0B27D 40001F13 1255 PARL MCTLIST list to count 0B27E DC00B372 1256 CALL CONFIGCHECK check the number 0B27F 41520000 0 REG 1257 PARV R0 number of MSC's 0B280 41440046 IMM 1258 PARV NVMMAXMSC location in NVM 0B281 41440001 IMM 1259 PARV NVMFACMSC factor for number in NVM 0B282 41001237 1260 PAR WNDO3/SECNUMMSC location in security block 0B283 4000B317 1261 PARL MSGMSC long name 0B284 002A7310 1262 HALT HLTSV7310 too many disk controllers present 1263 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2442 (INITPROC) F 148 System Initialization Process 1264 * Number of Disk Drives in system ... 1265 1266 PLOCK MDVLOCK 0B285 0CC00000 1266 IOFF 0B286 D1C01F14 1266 SETT MDVLOCK 0B287 FE0CB289 1266 JNE MA(2+DISPW MA 0) 0B288 DC40308B 1266 CALLNP LOCKWAIT 0B289 DC00B36C 1267 CALL COUNTLIST how many are there? 0B28A 40001F15 1268 PARL MDVLIST list to count 1269 PUNLOCK MDVLOCK 0B28B EC001F14 1269 STZ MDVLOCK 0B28C 0C800000 1269 ION 0B28D DC00B372 1270 CALL CONFIGCHECK check the number 0B28E 41520000 0 REG 1271 PARV R0 number of DISK's 0B28F 41440047 IMM 1272 PARV NVMMAXDISK location in NVM 0B290 41440001 IMM 1273 PARV NVMFACDISK factor for number in NVM 0B291 41001238 1274 PAR WNDO3/SECNUMDISK location in security block 0B292 4000B31E 1275 PARL MSGDISK long name 0B293 002A7311 1276 HALT HLTSV7311 too many disk drives present 1277 1278 * Number of Line Printers in system ... 1279 0B294 DC00B36C 1280 CALL COUNTLIST how many are there? 0B295 40001F21 1281 PARL LPCLIST list to count 0B296 DC00B372 1282 CALL CONFIGCHECK check the number 0B297 41520000 0 REG 1283 PARV R0 number of LPC's 0B298 41440048 IMM 1284 PARV NVMMAXLPC location in NVM 0B299 41440001 IMM 1285 PARV NVMFACLPC factor for number in NVM 0B29A 41001239 1286 PAR WNDO3/SECNUMLPC location in security block 0B29B 4000B324 1287 PARL MSGLPC long name 0B29C 002A7320 1288 HALT HLTSV7320 too many line printer controllers present 1289 1290 * Number of Cartridge Tape Controllers in system ... 1291 0B29D 60040000 0 IMM 1292 LD R0 0 counter of CTC's 0B29E 60401F1C 1 1293 LD R1 MTCLIST ptr to next controller 0B29F 60840000 2 IMM 1294 LD R2 0 value to compare against 0000B2A0 1295 CTCLOOP LABEL 0B2A0 3C884426 2 1 ZBM 1296 LSRCH R2 R1,MTCTYPE find a CT controller 0B2A1 FE0CB2A4 1297 JNE GOTCTCS jump if no more 0B2A2 60161001 0 0 REG 1298 LD R0 R0+1 count it 0B2A3 FA76B2A0 1 1299 LJNA R1 CTCLOOP and try again 1300 * \ / 0000B2A4 1301 GOTCTCS LABEL 0B2A4 DC00B372 1302 CALL CONFIGCHECK check the number 0B2A5 41520000 0 REG 1303 PARV R0 number of CTC's 0B2A6 41440049 IMM 1304 PARV NVMMAXCTC location in NVM 0B2A7 41440001 IMM 1305 PARV NVMFACCTC factor for number in NVM 0B2A8 4100123A 1306 PAR WNDO3/SECNUMCTC location in security block 0B2A9 4000B32D 1307 PARL MSGCTC long name 0B2AA 002A73A0 1308 HALT HLTSV73A0 too many cartridge tape controllers present 1309 1310 * Number of Cartridge Tape Units in system ... 1311 0B2AB DC00B36C 1312 CALL COUNTLIST how many are there? 0B2AC 40001F1E 1313 PARL CTULIST list to count 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2443 (INITPROC) F 148 System Initialization Process 0B2AD DC00B372 1314 CALL CONFIGCHECK check the number 0B2AE 41520000 0 REG 1315 PARV R0 number of CTU's 0B2AF 4144004A IMM 1316 PARV NVMMAXCTU location in NVM 0B2B0 41440001 IMM 1317 PARV NVMFACCTU factor for number in NVM 0B2B1 4100123B 1318 PAR WNDO3/SECNUMCTU location in security block 0B2B2 4000B337 1319 PARL MSGCTU long name 0B2B3 002A73A1 1320 HALT HLTSV73A1 too many cartridge tape drives present 1321 1322 * Number of Magnetic Tape Controllers in system ... 1323 0B2B4 60040000 0 IMM 1324 LD R0 0 counter of MTC's 0B2B5 60401F1C 1 1325 LD R1 MTCLIST ptr to next controller 0B2B6 60840001 2 IMM 1326 LD R2 1 value to compare against 0000B2B7 1327 MTCLOOP LABEL 0B2B7 3C884426 2 1 ZBM 1328 LSRCH R2 R1,MTCTYPE find a MT controller 0B2B8 FE0CB2BB 1329 JNE GOTMTCS jump if no more 0B2B9 60161001 0 0 REG 1330 LD R0 R0+1 count it 0B2BA FA76B2B7 1 1331 LJNA R1 MTCLOOP and try again 1332 * \ / 0000B2BB 1333 GOTMTCS LABEL 0B2BB DC00B372 1334 CALL CONFIGCHECK check the number 0B2BC 41520000 0 REG 1335 PARV R0 number of MTC's 0B2BD 4144004B IMM 1336 PARV NVMMAXMTC location in NVM 0B2BE 41440001 IMM 1337 PARV NVMFACMTC factor for number in NVM 0B2BF 4100123C 1338 PAR WNDO3/SECNUMMTC location in security block 0B2C0 4000B33F 1339 PARL MSGMTC long name 0B2C1 002A7390 1340 HALT HLTSV7390 too many mag tape controllers (9 track) 1341 1342 * Number of Magnetic Tape Units in system ... 1343 0B2C2 DC00B36C 1344 CALL COUNTLIST how many are there? 0B2C3 40001F1D 1345 PARL MTULIST list to count 0B2C4 DC00B372 1346 CALL CONFIGCHECK check the number 0B2C5 41520000 0 REG 1347 PARV R0 number of MTU's 0B2C6 4144004C IMM 1348 PARV NVMMAXMTU location in NVM 0B2C7 41440001 IMM 1349 PARV NVMFACMTU factor for number in NVM 0B2C8 4100123D 1350 PAR WNDO3/SECNUMMTU location in security block 0B2C9 4000B349 1351 PARL MSGMTU long name 0B2CA 002A7391 1352 HALT HLTSV7391 too many tape units present (9 track) 1353 1354 * Number of Video Tape Controllers in system ... 1355 0B2CB 60040000 0 IMM 1356 LD R0 0 counter of VTC's 0B2CC 60401F1C 1 1357 LD R1 MTCLIST ptr to next controller 0B2CD 60840002 2 IMM 1358 LD R2 2 value to compare against 0000B2CE 1359 VTCLOOP LABEL 0B2CE 3C884426 2 1 ZBM 1360 LSRCH R2 R1,MTCTYPE find a VT controller 0B2CF FE0CB2D2 1361 JNE GOTVTCS jump if no more 0B2D0 60161001 0 0 REG 1362 LD R0 R0+1 count it 0B2D1 FA76B2CE 1 1363 LJNA R1 VTCLOOP and try again 1364 * \ / 0000B2D2 1365 GOTVTCS LABEL 0B2D2 DC00B372 1366 CALL CONFIGCHECK check the number 0B2D3 41520000 0 REG 1367 PARV R0 number of VTC's 0B2D4 4144004D IMM 1368 PARV NVMMAXVTC location in NVM 0B2D5 41440001 IMM 1369 PARV NVMFACVTC factor for number in NVM 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2444 (INITPROC) F 148 System Initialization Process 0B2D6 4100123E 1370 PAR WNDO3/SECNUMVTC location in security block 0B2D7 4000B351 1371 PARL MSGVTC long name 0B2D8 002A73B0 1372 HALT HLTSV73B0 too many video tape controllers 1373 1374 * Number of Video Tape Units in system ... 1375 0B2D9 DC00B36C 1376 CALL COUNTLIST how many are there? 0B2DA 40001F1F 1377 PARL VTULIST list to count 0B2DB DC00B372 1378 CALL CONFIGCHECK check the number 0B2DC 41520000 0 REG 1379 PARV R0 number of VTU's 0B2DD 4144004E IMM 1380 PARV NVMMAXVTU location in NVM 0B2DE 41440001 IMM 1381 PARV NVMFACVTU factor for number in NVM 0B2DF 4100123F 1382 PAR WNDO3/SECNUMVTU location in security block 0B2E0 4000B35A 1383 PARL MSGVTU long name 0B2E1 002A73B1 1384 HALT HLTSV73B1 too many video tape units present 1385 1386 * All done! (How boring) 1387 0B2E2 63178801 456 BASE 1388 LD2 R4 SP,SAVER4R5 restore these registers 0B2E3 5D1F8003 6 STAK 1389 LEAVE POP 1390 * --- 1391 0B2E4 4D435527 1392 MSGMCU TEXT "MCU'S" 0B2E6 00000014 1393 VFD 20 0B2E7 4D656D6F 1394 TEXT "Memory Control Units" 1395 0B2EC 50414745 1396 MSGPAGE TEXT "PAGES" 0B2EE 0000000F 1397 VFD 15 0B2EF 70616765 1398 TEXT "pages of memory" 1399 0B2F3 43505527 1400 MSGCPU TEXT "CPU'S" 0B2F5 0000001E 1401 VFD 30 0B2F6 436F6D70 1402 TEXT "Computational Processing Units" 1403 0B2FE 50505527 1404 MSGPPU TEXT "PPU'S" 0B300 0000001B 1405 VFD 27 0B301 50657269 1406 TEXT "Peripheral Processing Units" 1407 0B308 41434327 1408 MSGACC TEXT "ACC'S" 0B30A 00000019 1409 VFD 25 0B30B 436F6D6D 1410 TEXT "Communication Controllers" 1411 0B312 504F5254 1412 MSGPORT TEXT "PORTS" 0B314 00000005 1413 VFD 5 0B315 706F7274 1414 TEXT "ports" 1415 0B317 4D534327 1416 MSGMSC TEXT "MSC'S" 0B319 00000010 1417 VFD 16 0B31A 4469736B 1418 TEXT "Disk Controllers" 1419 0B31E 4449534B 1420 MSGDISK TEXT "DISKS" 0B320 0000000B 1421 VFD 11 0B321 4469736B 1422 TEXT "Disk Drives" 1423 0B324 4C504327 1424 MSGLPC TEXT "LPC'S" 0B326 00000018 1425 VFD 24 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2445 (INITPROC) F 148 System Initialization Process 0B327 4C696E65 1426 TEXT "Line Printer Controllers" 1427 0B32D 43544327 1428 MSGCTC TEXT "CTC'S" 0B32F 0000001A 1429 VFD 26 0B330 43617274 1430 TEXT "Cartridge Tape Controllers" 1431 0B337 43545527 1432 MSGCTU TEXT "CTU'S" 0B339 00000014 1433 VFD 20 0B33A 43617274 1434 TEXT "Cartridge Tape Units" 1435 0B33F 4D544327 1436 MSGMTC TEXT "MTC'S" 0B341 00000019 1437 VFD 25 0B342 4D61676E 1438 TEXT "Magnetic Tape Controllers" 1439 0B349 4D545527 1440 MSGMTU TEXT "MTU'S" 0B34B 00000013 1441 VFD 19 0B34C 4D61676E 1442 TEXT "Magnetic Tape Units" 1443 0B351 56544327 1444 MSGVTC TEXT "VTC'S" 0B353 00000016 1445 VFD 22 0B354 56696465 1446 TEXT "Video Tape Controllers" 1447 0B35A 56545527 1448 MSGVTU TEXT "VTU'S" 0B35C 00000010 1449 VFD 16 0B35D 56696465 1450 TEXT "Video Tape Units" 1451 1452 END FIGCHKALL subroutine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2446 (INITPROC) F 148 System Initialization Process 1454 1455 ********************************************************************************** 1456 * * 1457 * COUNTSLOT - Count the number of bus slots containing a * 1458 * particular type of board. * 1459 * * 1460 * CALL COUNTSLOT * 1461 * PARVL slot type * 1462 * ST R0 number of boards * 1463 * * 1464 * Eats R0:R3. * 1465 * Stack required = 1 * 1466 * * 1467 ********************************************************************************** 1468 1469 BLOCK COUNTSLOT subroutine 1470 ENTRY COUNTSLOT 1471 1472 BEGFRAME 1473 ENDFRAME 1474 0B361 DD1F8001 6 STAK 1475 COUNTSLOT ENTR PUSH 0B362 60840000 2 IMM 1476 LD R2 0 0B363 C04A8030 2 CBM 1477 STPVL R2/SLOTTYPE save slot type we want 0B364 60C3C000 3 IMM 1478 LD R3 ONEBITS/SLOTTYPE*SLOTTYPE mask for compare 0B365 6044000F 1 IMM 1479 LD R1 NUMSLOTS-1 index into SLOTTABLE 0B366 60040000 0 IMM 1480 LD R0 0 number of slots found 1481 * \ / 1482 0000B367 1483 LOOP LABEL 0B367 6CA21ECE 23 1 1484 MCPR R2 SLOTTABLE(R1) is this one of ours? 0B368 FE0CB36A 1485 JNE NEXT jump if not 0B369 60161001 0 0 REG 1486 LD R0 R0+1 else count it 0000B36A 1487 NEXT LABEL 0B36A FA66B367 1 1488 JDR R1 LOOP inspect all slots 0B36B 5D1F8001 6 STAK 1489 LEAVE POP return when all checked 1490 * --- 1491 1492 END COUNTSLOT subroutine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2447 (INITPROC) F 148 System Initialization Process 1494 1495 ********************************************************************************** 1496 * * 1497 * COUNTLIST - Count number of elements on a linked list. * 1498 * * 1499 * CALL COUNTLIST * 1500 * PARL list header * 1501 * ST R0 number of elements * 1502 * * 1503 * Eats R0:R1. * 1504 * Stack required = 1 * 1505 * * 1506 ********************************************************************************** 1507 1508 BLOCK COUNTLIST subroutine 1509 1510 ENTRY COUNTLIST 1511 1512 BEGFRAME 1513 ENDFRAME 1514 0B36C DD1F8001 6 STAK 1515 COUNTLIST ENTR PUSH 0B36D C0124000 1 REG 1516 STPL R1 R1 -> list header 0B36E 60040000 0 IMM 1517 LD R0 0 1518 * \ / 1519 0000B36F 1520 LOOP LABEL 0B36F FA74B371 1 1521 LJZA R1 RETURN point to next element, jump if none 0B370 FA20B36F 0 1522 IRJ R0 LOOP count element, do again 1523 * --- 1524 0000B371 1525 RETURN LABEL 0B371 5D1F8001 6 STAK 1526 LEAVE POP 1527 * --- 1528 1529 END COUNTLIST subroutine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2448 (INITPROC) F 148 System Initialization Process 1531 1532 ********************************************************************************** 1533 * * 1534 * CONFIGCHECK - Check count of one type of module in system. * 1535 * * 1536 * This routine will, for one type of module, verify that there * 1537 * are not more of them than the user has paid for (under penalty of * 1538 * no skip return), and verify that there are not fewer of them than * 1539 * there were when the system was last booted (under penalty of a * 1540 * nasty message to the operator). * 1541 * Call: * 1542 * * 1543 * CALL CONFIGCHECK * 1544 * PARV number of items actually in the system * 1545 * PARV addr of max count in NVM * 1546 * PARV factor to apply to number in NVM, before comparing * 1547 * PAR address of previous count (in security block) * 1548 * PARL => resource name block * 1549 * <return1, if more then purchased> * 1550 * <return2, acceptable number> * 1551 * * 1552 * The format of the resource name block: * 1553 * * 1554 * NAMEBLOCK TEXT "xxxxx" name of device (2 words) * 1555 * VFD length of long name in characters * 1556 * TEXT "long name of resource" * 1557 * * 1558 * Eats R0:R5. * 1559 * Stack required = 8 * 1560 * 2 + max ( GENOPMSG (1), INTTOCHAR (6), NVMREAD (3), * 1561 * SGETMEM (0) ) * 1562 * * 1563 ********************************************************************************** 1564 1565 BLOCK CONFIGCHECK subroutine 1566 1567 ENTRY CONFIGCHECK 1568 1569 BEGFRAME 00178801 6 BASE 1570 NAMEPTR BSS 1 pointer to the name info 1571 ENDFRAME 1572 0B372 DD1F8002 6 STAK 1573 CONFIGCHECK ENTR PUSH 0B373 C1534000 5 REG 1574 STPV R5 save actual count 0B374 C1524000 1 REG 1575 STPV R1 save NVM address 0B375 C1528000 2 REG 1576 STPV R2 save multiplier 0B376 C112C000 3 REG 1577 STP R3 save addr in security block of last known count 0B377 C0178801 6 BASE 1578 STPL SP,NAMEPTR save resource name block pointer 1579 * \ / 1580 0B378 DC0045B6 1581 CALL NVMREAD get limit from NVM 0B379 40524000 1 REG 1582 PARVL R1 pass NVM address 0B37A 60565001 1 1 REG 1583 LD R1 R1+1 change test from LT to LE 0B37B 1C528000 1 2 REG 1584 MUL R1 R2 R1 = max allowed modules, plus 1 0B37C 64534000 1 5 REG 1585 CPR R1 R5 compare against actual number 0B37D FE0AB3CD 1586 JLE HALT jump if user stole something 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2449 (INITPROC) F 148 System Initialization Process 1587 0B37E 60534000 1 5 REG 1588 LD R1 R5 R1 = current count 0B37F E056C400 1 3 @R 1589 EXCH R1 @R3 update old count, get previous value 0B380 64534000 1 5 REG 1590 CPR R1 R5 compare against current value 0B381 FE0AB3CC 1591 JLE NOMESSAGE jump if no message needed 1592 * \ / 1593 1594 * Here, we generate a message to the operator. 0B382 DC002ED0 1595 CALL SGETMEM get an OPMSG block 0B383 40440005 IMM 1596 PARVL OPMSGLOG 0B384 61120000 4 0 REG 1597 LD R4 R0 R4 -> OPMSG block 0B385 DC005903 1598 CALL INTTOCHAR put in number of resources 0B386 41534000 5 REG 1599 PARV R5 number 0B387 41440004 IMM 1600 PARV 4 field width 0B388 40170008 4 CACH 1601 PARL R4,OPMSGTEXTC where to put it 1602 * \ / R2 => null at end of string 1603 0B389 60040020 0 IMM 1604 LD R0 " " 0B38A E4168000 0 2 CACH 1605 ST R0 CACH R2,0 put blank after number 0B38B 38968001 2 2 CACH 1606 LEA R2 CACH R2,1 R2 -> next character in message 0B38C 60178801 0 6 BASE 1607 LD R0 SP,NAMEPTR get block pointer(=> short name) 0B38D 60440005 1 IMM 1608 LD R1 5 length of name 0B38E FE400000 1609 CMOVE copy it to message 0B38F 65440001 5 IMM 1610 CPR R5 1 is number singular? 0B390 FE0CB39E 1611 JNE AFTERSING0 jump if not 1612 * \ / 1613 * Number is one, remove trailing "S" or "'S", if any. 1614 * \ / 0B391 6047FFFE 1 IMM 1615 LD R1 -2 to look two chars previous to end 0B392 60C40020 3 IMM 1616 LD R3 " " to blank out character 0000B393 1617 LOOP1 LABEL 0B393 64DA8801 3 21 CACH 1618 CPR R3 CACH R2,1(R1) trailing blank? 0B394 FE0CB396 1619 JNE NOTBLANK jump if not 0B395 FA62B393 1 1620 DRJ R1 LOOP1 else move back one more 1621 * --- 1622 0000B396 1623 NOTBLANK LABEL 0B396 601A8801 0 21 CACH 1624 LD R0 CACH R2,1(R1) get last character 0B397 64040053 0 IMM 1625 CPR R0 "S" is it an "S"? 0B398 FE0CB39E 1626 JNE AFTERSING0 if not, can't singularize 0B399 E4DA8801 3 21 CACH 1627 ST R3 CACH R2,1(R1) else blank it out 0B39A 601A8800 0 21 CACH 1628 LD R0 CACH R2,0(R1) get previous character 0B39B 64040027 0 IMM 1629 CPR R0 "'" is it an apostrophe? 0B39C FE0CB39E 1630 JNE AFTERSING0 if not, don't mess with it 0B39D E4DA8800 3 21 CACH 1631 ST R3 CACH R2,0(R1) else blank it out, too 0000B39E 1632 AFTERSING0 LABEL 1633 0B39E 6004B3CE 0 IMM 1634 LD R0 ADR MSGPART1 put "There " into message 0B39F 60440006 1 IMM 1635 LD R1 MSG1LEN 0B3A0 FE400000 1636 CMOVE 1637 0B3A1 65440001 5 IMM 1638 CPR R5 1 are we singular again? 0B3A2 FE02B3A6 1639 JEQ SING1 jump if so 0B3A3 6004B3D0 0 IMM 1640 LD R0 ADR MSGPART2A else set up for "are " 0B3A4 60440004 1 IMM 1641 LD R1 MSG2ALEN 0B3A5 FE0EB3A8 1642 JMP AFTERSING1 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2450 (INITPROC) F 148 System Initialization Process 1643 * --- 1644 0000B3A6 1645 SING1 LABEL 0B3A6 6004B3D1 0 IMM 1646 LD R0 ADR MSGPART2B set up for "is " 0B3A7 60440003 1 IMM 1647 LD R1 MSG2BLEN 1648 * \ / 1649 0000B3A8 1650 AFTERSING1 LABEL 0B3A8 FE400000 1651 CMOVE put "is " or "are " into message 1652 0B3A9 FB4CB3AE 5 1653 JNEZ R5 NOTZERO jump if not telling user 'zero' 0B3AA 6004B3D4 0 IMM 1654 LD R0 ADR MSGPART3B => "no" 0B3AB 60440003 1 IMM 1655 LD R1 MSG3BLEN and its length 0B3AC FE400000 1656 CMOVE 0B3AD FE0EB3B7 1657 JMP AFTERCOUNT this takes care of the count 1658 * --- 1659 0000B3AE 1660 NOTZERO LABEL 1661 0B3AE 6004B3D2 0 IMM 1662 LD R0 ADR MSGPART3 put "only " into message 0B3AF 60440005 1 IMM 1663 LD R1 MSG3LEN 0B3B0 FE400000 1664 CMOVE 1665 0B3B1 DC005903 1666 CALL INTTOCHAR put count into message 0B3B2 41534000 5 REG 1667 PARV R5 number 0B3B3 40168000 2 CACH 1668 PARL CACH R2,0 where to put it 1669 * \ / R2 => null at end of string 0B3B4 60040020 0 IMM 1670 LD R0 " " get a single blank 0B3B5 E4168000 0 2 CACH 1671 ST R0 CACH R2,0 stuff into message after number 0B3B6 38968001 2 2 CACH 1672 LEA R2 CACH R2,1 put running message address back into R2 1673 0000B3B7 1674 AFTERCOUNT LABEL 0B3B7 60178801 0 6 BASE 1675 LD R0 SP,NAMEPTR get pointer to the name block 0B3B8 60560802 1 0 BASE 1676 LD R1 R0,2 get the length of the message 0B3B9 38160803 0 0 BASE 1677 LEA R0 R0,3 point at the long message 0B3BA FE400000 1678 CMOVE copy long name to message 0B3BB 65440001 5 IMM 1679 CPR R5 1 are we singular? 0B3BC FE0CB3C2 1680 JNE AFTERSING2 jump if not 1681 * \ / 1682 * The word should be singular, so we will here remove a 1683 * trailing "s", if any. 1684 * \ / 0B3BD 6047FFFF 1 IMM 1685 LD R1 -1 to look at previous character 0B3BE 601A8800 0 21 CACH 1686 LD R0 CACH R2,0(R1) get last character 0B3BF 64040073 0 IMM 1687 CPR R0 "s" it it plural? 0B3C0 FE0CB3C2 1688 JNE AFTERSING2 jump if not 0B3C1 389A8800 2 21 CACH 1689 LEA R2 CACH R2,0(R1) else back up the character pointer 0000B3C2 1690 AFTERSING2 LABEL 1691 0B3C2 6004B3D5 0 IMM 1692 LD R0 ADR MSGPART4 0B3C3 6044000F 1 IMM 1693 LD R1 MSG4LEN 0B3C4 FE400000 1694 CMOVE put " in the system." into message 1695 0B3C5 38170008 0 4 CACH 1696 LEA R0 R4,OPMSGTEXTC R0 -> beginning of message 0B3C6 608A9F30 2 2 CBM 1697 LD R2 R2/FLDCHARS 0B3C7 108A1F30 2 0 CBM 1698 SUB R2 R0/FLDCHARS R2 = length of message 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2451 (INITPROC) F 148 System Initialization Process 0B3C8 E4970007 2 4 CACH 1699 ST R2 R4,OPMSGLEN save length of message 0B3C9 EC0902E0 4 ZBM 1700 STZ R4,OPMSGPROC not process-related 0B3CA DC0046F3 1701 CALL GENOPMSG generate the message 0B3CB 40530000 4 REG 1702 PARVL R4 1703 * \ / 1704 0000B3CC 1705 NOMESSAGE LABEL no message needed 0B3CC 19C40001 7 IMM 1706 ADD R7 1 success -- skip return 0000B3CD 1707 HALT LABEL failure -- no skip return 0B3CD 5D1F8002 6 STAK 1708 LEAVE POP return 1709 * --- 1710 0B3CE 54686572 1711 MSGPART1 TEXT "There " 00000006 ABS 1712 MSG1LEN EQU 6 0B3D0 61726520 1713 MSGPART2A TEXT "are " 00000004 ABS 1714 MSG2ALEN EQU 4 0B3D1 69732020 1715 MSGPART2B TEXT "is " 00000003 ABS 1716 MSG2BLEN EQU 3 0B3D2 6F6E6C79 1717 MSGPART3 TEXT "only " 00000005 ABS 1718 MSG3LEN EQU 5 0B3D4 6E6F2020 1719 MSGPART3B TEXT "no " 00000003 ABS 1720 MSG3BLEN EQU 3 0B3D5 20696E20 1721 MSGPART4 TEXT " in the system." 0000000F ABS 1722 MSG4LEN EQU 15 1723 1724 END CONFIGCHECK subroutine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2452 (INITPROC) F 148 System Initialization Process 1726 1727 BLOCK Build Hardware.Sys Utilities 1728 1729 ENTRY MAKEHSENTRY create an entry in HARDWARE.SYS 1730 ENTRY HSERROR process an error 1731 ENTRY MAKEHWSYS create hardware.sys and its entries 1732 1733 ********************************************************************************** 1734 * * 1735 * Routines used to create HARDWARE.SYS * 1736 * * 1737 ********************************************************************************** 1738 1739 1740 1741 1742 ********************************************************************************** 1743 * * 1744 * Check that HARDWARE.SYS, TERMINAL.CONFIG and the various * 1745 * entries in HARDWARE.SYS exist. Create any or all of these items * 1746 * as needed. * 1747 * Call: * 1748 * CALLNP MAKEHWSYS * 1749 * * 1750 * Eats R0:R5 * 1751 * Stack required = 16 * 1752 * 2 + max ( FCFREEMEM (0), FCGETMEM (0), FINDULB (14), * 1753 * FREEULB (11), GRUBWNDOx (7), HSERROR (2), * 1754 * MAKEHSENTRY (14), ZEROIT (1) ) * 1755 * * 1756 ********************************************************************************** 1757 1758 BLOCK MAKEHWSYS subroutine 1759 1760 ENTRY MAKEHWSYS create hardware.sys and its entries 1761 1762 BEGFRAME 00178801 6 BASE 1763 FAKEFCB BSS 1 1764 ENDFRAME 1765 0B3D9 DD5F8002 6 STAK 1766 MAKEHWSYS ENTRNP PUSH 1767 1768 * Try to create HARDWARE.SYS 1769 0B3DA 60040051 0 IMM 1770 LD R0 ORBKCACCT create the acccount 0B3DB 6044B51D 1 IMM 1771 LD R1 ADR MAGICBLOCK 0B3DC 09440000 IMM 1772 OPREQ 0 0B3DD FE0EB3E3 1773 JMP HSEXISTS create "successful". REMOVE when ORCREACCT works down here 1774 * JGEZ R0 HSEXISTS create successful 1775 1776 ********************************************************************************** 1777 * * 1778 * HARDWARE.SYS already exists or some nasty error. See which is * 1779 * the case and generate an error if deemed appropriate. * 1780 * * 1781 ********************************************************************************** 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2453 (INITPROC) F 148 System Initialization Process 1782 0B3DE 6400B57B 0 1783 CPR R0 ALREXERR does it already exist? 0B3DF FE02B3E3 1784 JEQ HSEXISTS skip out if it does 1785 1786 * some sort of problem. Send a message to the operator. 1787 0B3E0 DC00B4AC 1788 CALL HSERROR Give error 0B3E1 40440000 IMM 1789 PARVL 0 0B3E2 FE0EB43C 1790 JMP MAKEHWSLV and leave 1791 * --- 1792 1793 ********************************************************************************** 1794 * * 1795 * HARDWARE.SYS exists. Create TERMINAL.CONFIG as an empty .RAF * 1796 * * 1797 ********************************************************************************** 1798 0000B3E3 1799 HSEXISTS LABEL 0B3E3 60040050 0 IMM 1800 LD R0 FREQUIPW 0B3E4 6044B51D 1 IMM 1801 LD R1 ADR MAGICBLOCK 0B3E5 08840075 IMM 1802 FREQ SULUN open it 0B3E6 FA06B3FD 0 1803 JGEZ R0 TCEXISTS It opened, it must exist 1804 1805 * TERMINAL.CONFIG doesn't seem to exist. Create it. 1806 0B3E7 60040050 0 IMM 1807 LD R0 FREQUIPW 0B3E8 6044B53D 1 IMM 1808 LD R1 ADR RAFDESC create a scratch RAF 0B3E9 08840075 IMM 1809 FREQ SULUN 1810 1811 * Initialize the header 1812 0B3EA 60040090 0 IMM 1813 LD R0 FRPOSITION request for a position into the .SAF 0B3EB 60440004 1 IMM 1814 LD R1 TCHDRPOS place to position to 0B3EC 08840075 IMM 1815 FREQ SULUN ask the system to do it 0B3ED FA08B3FB 0 1816 JLTZ R0 TCINITERR jump if problems arise 1817 1818 * Write out the default header 1819 0B3EE 60040040 0 IMM 1820 LD R0 FRWRITE request for a write 0B3EF 60440008 1 IMM 1821 LD R1 TCHDRLEN length in characters to write 0B3F0 3880B57C 2 1822 LEA R2 TCHEADR the default header to write out 0B3F1 08840075 IMM 1823 FREQ SULUN that should do it 0B3F2 FA08B3FB 0 1824 JLTZ R0 TCINITERR jump to share file just initialized 1825 1826 * Save it 0B3F3 60040070 0 IMM 1827 LD R0 FRSAVE 0B3F4 6040B529 1 1828 LD R1 MAGICEXT 0B3F5 6280B527 23 1829 LD2 R2 MAGICNAME save as TERMINAL.CONFIG 0B3F6 08840075 IMM 1830 FREQ SULUN 0B3F7 FA06B3FD 0 1831 JGEZ R0 TCEXISTS couln't even save the file 1832 1833 * Couldn't save the RAF. Generate a message. 1834 0B3F8 DC00B4AC 1835 CALL HSERROR 0B3F9 40440001 IMM 1836 PARVL 1 0B3FA FE0EB403 1837 JMP TCCLOSE close the .RAF 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2454 (INITPROC) F 148 System Initialization Process 1838 * --- 1839 1840 * Problems initializing the TERMINAL.CONFIG header 1841 0000B3FB 1842 TCINITERR LABEL 0B3FB DC00B4AC 1843 CALL HSERROR send out an operator message 0B3FC 40440005 IMM 1844 PARVL 5 error code of message to display 1845 * \ / 1846 1847 ********************************************************************************** 1848 * * 1849 * TERMINAL.CONFIG exists. Share it around. * 1850 * * 1851 ********************************************************************************** 1852 0000B3FD 1853 TCEXISTS LABEL 0B3FD 600400A1 0 IMM 1854 LD R0 FRSHARE+1 share RO 0B3FE 6044B567 1 IMM 1855 LD R1 ADR SHAREWSYSRO 0B3FF 08840075 IMM 1856 FREQ SULUN 1857 1858 * Ignore errors... 1859 0B400 600400A0 0 IMM 1860 LD R0 FRSHARE+FDACSRW share RW W/password 0B401 6044B571 1 IMM 1861 LD R1 ADR SHAREWSYSRW 0B402 08840075 IMM 1862 FREQ SULUN 1863 1864 * Done with TERMINAL.CONFIG. Close it. 1865 0000B403 1866 TCCLOSE LABEL 0B403 60040060 0 IMM 1867 LD R0 FRUNEQUIP 0B404 08840075 IMM 1868 FREQ SULUN Zap! Its gone! 1869 * \ / 1870 1871 ********************************************************************************** 1872 * * 1873 * For each device of the type .MT, .CT, .VT, .LP or .TERM, * 1874 * see if a directory entry exists, and if not, create one. * 1875 * * 1876 ********************************************************************************** 1877 1878 * Build a fake FCB 1879 0B405 DC002F0A 1880 CALL FCGETMEM 0B406 40440004 IMM 1881 PARVL FCLOG 0B407 E4178801 0 6 BASE 1882 ST R0 SP,FAKEFCB save pointer to fake FCB 0B408 61520000 5 0 REG 1883 LD FCB R0 copy pointer around 0B409 DC003090 1884 CALL ZEROIT zap it to zeros 0B40A 41174400 5 @R 1885 PAR @FCB FWA 0B40B 40440010 IMM 1886 PARVL 2 POWER FCLOG length 1887 1888 * Find ULB and copy the ULB pointer into the fake FCB 1889 0B40C 6144B51C 5 IMM 1890 LD R5 ADR MAGICBLOCK(-(EQVOLUME DISPW EQWORDA)) 0B40D DC405574 1891 CALLNP FINDULB 0B40E 61578801 5 6 BASE 1892 LD FCB SP,FAKEFCB make things right 0B40F E5095114 4 5 ZBM 1893 ST ULB FCB,FCLIMITPTR save the ULB pointer 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2455 (INITPROC) F 148 System Initialization Process 0B410 60090081 0 4 ZBM 1894 LD R0 ULB,ULDRIVE remember the volume... 0B411 E4094081 0 5 ZBM 1895 ST R0 FCB,FCDRIVE 1896 1897 * Run the lists 1898 1899 * Terminals 1900 0B412 61001F04 4 1901 LD R4 TERMBASE 0B413 FB02B419 4 1902 JEQZ R4 RUNLIST2 skip if no terminals 1903 * \ / 1904 0000B414 1905 RUNLIST1 LABEL 0B414 DC00B43D 1906 CALL MAKEHSENTRY build an entry 0B415 41440007 IMM 1907 PARV HTYPETERM 0B416 40490890 4 ZBM 1908 PARVL R4,TCTNUM 0B417 FA02B435 0 1909 JEQZ R0 HSDONE quit if error occured 0B418 FB36B414 4 1910 LJNA R4 RUNLIST1 1911 * \ / 1912 1913 * MagTapes 1914 1915 * \ / 0000B419 1916 RUNLIST2 LABEL 0B419 61001F1D 4 1917 LD R4 MTULIST 0B41A FB02B420 4 1918 JEQZ R4 RUNLIST4 1919 * \ / 1920 0000B41B 1921 RUNLIST3 LABEL 0B41B DC00B43D 1922 CALL MAKEHSENTRY 0B41C 4144000C IMM 1923 PARV HTYPEMT 0B41D 40490460 4 ZBM 1924 PARVL R4,MTUDNUM use system wide unit number 0B41E FA02B435 0 1925 JEQZ R0 HSDONE leave on error 0B41F FB36B41B 4 1926 LJNA R4 RUNLIST3 1927 * \ / 1928 1929 * Cartridge Tapes 1930 1931 * \ / 0000B420 1932 RUNLIST4 LABEL 0B420 61001F1E 4 1933 LD R4 CTULIST 0B421 FB02B427 4 1934 JEQZ R4 RUNLIST6 1935 1936 * \ / 0000B422 1937 RUNLIST5 LABEL 0B422 DC00B43D 1938 CALL MAKEHSENTRY 0B423 4144000D IMM 1939 PARV HTYPECT 0B424 40490460 4 ZBM 1940 PARVL R4,MTUDNUM use system wide unit number 0B425 FA02B435 0 1941 JEQZ R0 HSDONE quit if error 0B426 FB36B422 4 1942 LJNA R4 RUNLIST5 1943 1944 * Video Tapes 1945 1946 * \ / 0000B427 1947 RUNLIST6 LABEL 0B427 61001F1F 4 1948 LD R4 VTULIST 0B428 FB02B42E 4 1949 JEQZ R4 RUNLIST8 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2456 (INITPROC) F 148 System Initialization Process 1950 1951 * \ / 0000B429 1952 RUNLIST7 LABEL 0B429 DC00B43D 1953 CALL MAKEHSENTRY 0B42A 4144000F IMM 1954 PARV HTYPEVT 0B42B 40490460 4 ZBM 1955 PARVL R4,MTUDNUM use system wide unit number 0B42C FA02B435 0 1956 JEQZ R0 HSDONE quit if error 0B42D FB36B429 4 1957 LJNA R4 RUNLIST7 1958 1959 * LinePrinters 1960 1961 * \ / 0000B42E 1962 RUNLIST8 LABEL 0B42E 61001F21 4 1963 LD R4 LPCLIST 0B42F FB02B435 4 1964 JEQZ R4 HSDONE 1965 1966 * \ / 0000B430 1967 RUNLIST9 LABEL 0B430 DC00B43D 1968 CALL MAKEHSENTRY 0B431 4144000B IMM 1969 PARV HTYPELP 0B432 40490847 4 ZBM 1970 PARVL R4,LPCUNIT 0B433 FA02B435 0 1971 JEQZ R0 HSDONE give up on error 0B434 FB36B430 4 1972 LJNA R4 RUNLIST9 1973 * \ / 1974 1975 ********************************************************************************** 1976 * * 1977 * Done. Release ULB and storage, then continue with initialization. * 1978 * * 1979 ********************************************************************************** 1980 1981 * \ / 0000B435 1982 HSDONE LABEL 0B435 61095114 4 5 ZBM 1983 LD ULB FCB,FCLIMITPTR get ULB pointer 0B436 DC405526 1984 CALLNP FREEULB free it 0B437 DC002F8F 1985 CALL FCFREEMEM free the storage 0B438 41440004 IMM 1986 PARV FCLOG this many words 0B439 40534000 5 REG 1987 PARVL FCB starting with the thing pointed to by FAKEFCB 0B43A DC403150 1988 CALLNP GRUBWNDO1 clean up after ourselves 0B43B DC403153 1989 CALLNP GRUBWNDO2 1990 * \ / 1991 0000B43C 1992 MAKEHWSLV LABEL leave here 0B43C 5D1F8002 6 STAK 1993 LEAVE POP 1994 * --- 1995 1996 END MAKEHWSYS subroutine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2457 (INITPROC) F 148 System Initialization Process 1998 1999 ********************************************************************************** 2000 * * 2001 * MAKEHSENTRY -- Create an entry in HARDWARE.SYS. * 2002 * * 2003 * LD FCB pointer to fake FCB * 2004 * CALL MAKEHSENTRY * 2005 * PARV device hardware type * 2006 * PARVL device unit number * 2007 * <return, R0=0 on error, else non-zero> * 2008 * leaves windows mapped. caller must de-clutter.* 2009 * * 2010 * Eats R0:R3. * 2011 * Stack required = 14 * 2012 * 2 + max ( BUILDNAME (12), FREEDIR (5), HSERROR (2), * 2013 * SRCHDIR (11), SRCHDIRSN (11) ) * 2014 * * 2015 ********************************************************************************** 2016 2017 BLOCK MAKEHSENTRY subroutine 2018 2019 ENTRY MAKEHSENTRY 2020 2021 BEGFRAME 00178801 6 BASE 2022 R4SAVE BSS 1 2023 ENDFRAME 2024 0B43D DD1F8002 6 STAK 2025 MAKEHSENTRY ENTR PUSH 0B43E E5178801 4 6 BASE 2026 ST R4 SP,R4SAVE save caller's R4 - just for grins 0B43F C1574809 5 BASE 2027 STPV FCB,FCSERIAL(0) device type 0B440 C057480A 5 BASE 2028 STPVL FCB,FCSERIAL(1) unit number 2029 2030 * See if entry already exists 2031 0B441 DC0082BB 2032 CALL SRCHDIRSN search by serial number 0B442 4000B44D 2033 PARL HSSRERR1 error address 0B443 FE0CB448 2034 JNE MAKEENTRY jump if entry not already there 2035 * \ / 2036 2037 * Entry found, clear "Writing When Crashed" bit. 2038 0B444 EC08E610 3 ZBM 2039 STZ R3,FDFWWSC clear writing when crashed bit 0B445 EC08E01C 3 ZBM 2040 STZ R3,FDWACS clear number of writers (from last boot) 0B446 DC405685 2041 CALLNP FREEDIR free the directory 0B447 FE0EB467 2042 JMP MAKEHSEXIT and all done with this one 2043 * --- 2044 2045 * Not found, create the entry 2046 0000B448 2047 MAKEENTRY LABEL 0B448 DC405685 2048 CALLNP FREEDIR free the directory 0B449 60040050 0 IMM 2049 LD R0 FREQUIPW 0B44A 6044B52D 1 IMM 2050 LD R1 ADR NULLBLOCK open a .NULL 0B44B 08840075 IMM 2051 FREQ SULUN 0B44C FA06B450 0 2052 JGEZ R0 MAKEHS1 successful 2053 * \ / 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2458 (INITPROC) F 148 System Initialization Process 2054 2055 * Couldn't open the .NULL. Quit. 2056 2057 * \ / 0000B44D 2058 HSSRERR1 LABEL 0B44D DC00B4AC 2059 CALL HSERROR 0B44E 40440002 IMM 2060 PARVL 2 generate error 0B44F FE0EB469 2061 JMP QUIT and leave 2062 * --- 2063 2064 * Generate the appropriate name and save the .NULL 2065 0000B450 2066 MAKEHS1 LABEL 0B450 DC40B46C 2067 CALLNP BUILDNAME create the new entry's name 0B451 E457480D 1 5 BASE 2068 ST R1 FCB,FCNAMEEXT save name extension 0B452 E697480B 235 BASE 2069 ST2 R2 FCB,FCNAME and the name 0B453 60040070 0 IMM 2070 LD R0 FRSAVE 0B454 08840075 IMM 2071 FREQ SULUN save it 0B455 FA06B45B 0 2072 JGEZ R0 MAKEHS2 successful, continue 2073 * \ / 2074 2075 * Couldn't save it. I wonder why. 2076 0B456 60040060 0 IMM 2077 LD R0 FRUNEQUIP 0B457 08840075 IMM 2078 FREQ SULUN close the thing 0B458 DC00B4AC 2079 CALL HSERROR 0B459 40440003 IMM 2080 PARVL 3 generate error 0B45A FE0EB469 2081 JMP QUIT and leave 2082 * --- 2083 2084 * File is saved. Close it. 2085 0000B45B 2086 MAKEHS2 LABEL 0B45B 60040060 0 IMM 2087 LD R0 FRUNEQUIP 0B45C 08840075 IMM 2088 FREQ SULUN 2089 2090 * Find the newly-created directory entry 2091 0B45D DC0082BF 2092 CALL SRCHDIR search by name 0B45E 4000B460 2093 PARL HSSRERR2 error address 0B45F FE02B463 2094 JEQ MAKEHSMOD found it, continue along 2095 * \ / 2096 2097 * We just created it, yet we couldn't find it. Abandon all hope. 2098 2099 * \ / 0000B460 2100 HSSRERR2 LABEL 0B460 DC00B4AC 2101 CALL HSERROR 0B461 40440004 IMM 2102 PARVL 4 generate error 0B462 FE0EB469 2103 JMP QUIT and leave 2104 * --- 2105 2106 ********************************************************************************** 2107 * * 2108 * Dink with the directory entry to make things correct. * 2109 * R3 => base of entry * 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2459 (INITPROC) F 148 System Initialization Process 2110 * * 2111 ********************************************************************************** 2112 0000B463 2113 MAKEHSMOD LABEL 0B463 62174809 015 BASE 2114 LD2 R0 FCB,FCSERIAL(0) get device type and unit number 0B464 E408EA60 0 3 ZBM 2115 ST R0 R3,FDET save device type 0B465 E616C80A 013 BASE 2116 ST2 R0 R3,FDSERNO save new serial number 0B466 DC405685 2117 CALLNP FREEDIR free the directory 2118 * \ / 2119 2120 * return successful 2121 2122 * \ / 0000B467 2123 MAKEHSEXIT LABEL 0B467 60040001 0 IMM 2124 LD R0 1 return nonzero in R0 if successful 0B468 FE0EB46A 2125 JMP RETURN and leave 2126 * --- 2127 2128 * Quit on error 2129 0000B469 2130 QUIT LABEL 0B469 60040000 0 IMM 2131 LD R0 0 return zero in R0 on error 2132 * \ / 0000B46A 2133 RETURN LABEL return to caller 0B46A 61178801 4 6 BASE 2134 LD R4 SP,R4SAVE 0B46B 5D1F8002 6 STAK 2135 LEAVE POP 2136 * --- 2137 2138 END MAKEHSENTRY subroutine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2460 (INITPROC) F 148 System Initialization Process 2140 2141 ********************************************************************************** 2142 * * 2143 * BUILDNAME -- Create the name for a new directory entry * 2144 * * 2145 * Create the name for a new entry based on the serial number in * 2146 * the FCB. First word = device hardware type, Second word = device unit * 2147 * number. The resulting name will normally contain the device unit * 2148 * number in the last half. This number is replaced by an alphanumeric * 2149 * "port specifier" (see the CIADRIVER) if the device is a terminal. * 2150 * * 2151 * Calling sequence: * 2152 * * 2153 * LD FCB fake FCB for device * 2154 * CALLNP BUILDNAME * 2155 * * 2156 * Returns: * 2157 * * 2158 * R1 = Extension, R2,R3 = file name * 2159 * * 2160 * Eats R0. * 2161 * Stack required = 12 * 2162 * 6 + max ( CHARTOP12 (3), INTTOCHAR (6), INTTOPORT (2), * 2163 * P12TOCHAR (6) ) * 2164 * * 2165 ********************************************************************************** 2166 2167 BLOCK BUILDNAME subroutine 2168 2169 ENTRY BUILDNAME 2170 2171 BEGFRAME 00178801 6 BASE 2172 NEWEXT BSS 1 00178802 6 BASE 2173 HSUNPAKBUF BSS 4 2174 ENDFRAME 2175 0B46C DD5F8006 6 STAK 2176 BUILDNAME ENTRNP PUSH 0B46D 60174809 0 5 BASE 2177 LD R0 FCB,FCSERIAL(0) fetch device type and unit number 2178 2179 * Run down the list 2180 0B46E 6080B54D 2 2181 LD R2 HSDEVHEAD get pointer to head of list 0B46F 3C168801 0 2 BASE 2182 LSRCH R0 R2,1 find our entry 0B470 FE02B472 2183 JEQ BUILD2 jump if found 0B471 0013700D 2184 HALT HALTS700D entry for device not found 2185 * --- 2186 2187 ********************************************************************************** 2188 * * 2189 * Create and save the new name and extension * 2190 * * 2191 ********************************************************************************** 2192 0000B472 2193 BUILD2 LABEL 0B472 60D68802 3 2 BASE 2194 LD R3 R2,2 0B473 E4D78801 3 6 BASE 2195 ST R3 SP,NEWEXT save extension 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2461 (INITPROC) F 148 System Initialization Process 0B474 38D78802 3 6 BASE 2196 LEA R3 SP,HSUNPAKBUF pointer to buffer for unpacking 2197 0B475 DC005926 2198 CALL P12TOCHAR convert prototype to text 0B476 43568803 2 BASE 2199 PARV2 R2,3 0B477 4016C000 3 CACH 2200 PARL CACH R3,0 2201 0B478 60174809 0 5 BASE 2202 LD R0 FCB,FCSERIAL(0) get type of device 0B479 64040007 0 IMM 2203 CPR R0 HTYPETERM do we see a terminal? 0B47A FE0CB47D 2204 JNE NOTTERM jump if unit number OK for name 2205 * \ / 2206 0B47B DC00B48C 2207 CALL INTTOPORT convert unit number to port specifier 0B47C FE0EB47E 2208 JMP DOPARMS finish identical call sequence 2209 * --- 2210 0000B47D 2211 NOTTERM LABEL 0B47D DC005903 2212 CALL INTTOCHAR convert unit number to text string 0000B47E 2213 DOPARMS LABEL 0B47E 4157480A 5 BASE 2214 PARV FCB,FCSERIAL(1) 0B47F 40168000 2 CACH 2215 PARL CACH R2,0 append to unpacked prototype 2216 0B480 38178802 0 6 BASE 2217 LEA R0 SP,HSUNPAKBUF 0B481 DC00588C 2218 CALL CHARTOP12 pack the mess back up 0B482 40160000 0 CACH 2219 PARL CACH R0,0 0B483 62944000 2312 PAIR 2220 LD2 R2 PAIR R1 get name in R2/3 0B484 60578801 1 6 BASE 2221 LD R1 NEWEXT fetch extention 2222 2223 * Return to caller 2224 0B485 5D1F8006 6 STAK 2225 LEAVE POP go home 2226 * --- 2227 2228 END BUILDNAME subroutine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2462 (INITPROC) F 148 System Initialization Process 2230 2231 ********************************************************************************** 2232 * * 2233 * INTTOPORT. This subroutine converts an integer port number to * 2234 * a three-character alphanumeric "port code". The first character * 2235 * specifies the ACC, the second the slot on that ACC, and the third * 2236 * the port on that slot. See the comments at the beginning of the * 2237 * CIADRIVER. Port numbers range from 0:512, port 0 is reserved for * 2238 * the Remote Front Panel. * 2239 * * 2240 * Call: CALL INTTOPORT * 2241 * PARV <port number> * 2242 * PARL <address to place string> * 2243 * * 2244 * Eats R0:R2. * 2245 * Stack required = 2 * 2246 * * 2247 ********************************************************************************** 2248 2249 BLOCK INTTOPORT subroutine 2250 2251 ENTRY INTTOPORT 2252 2253 BEGFRAME 00178801 6 BASE 2254 PORTNUM BSS 1 2255 ENDFRAME 2256 0B486 C20CB489 2257 LETETABPTR PTR LETTAB(7) 0B487 020CB488 2258 LETTABPTR PTR LETTAB(0) 0B488 00000044 2259 LETTAB VFDC "A","B","C","D" 0B489 0000004A 2260 VFDC "E","F","H","J" 00000040 ABS 2261 ACCINC EQU 64 00000008 ABS 2262 SLOTINC EQU 8 0B48A 020CB48B 2263 RFPPTR PTR RFPSYMBOL(0) 0B48A 00000050 2264 RFPSYMBOL VFDC "R","F","P" 2265 0B48C DD1F8002 6 STAK 2266 INTTOPORT ENTR PUSH 0B48D C1578801 6 BASE 2267 STPV SP,PORTNUM get the number to convert 0B48E C0128000 2 REG 2268 STPL R2 and address to fill 2269 0B48F 60578801 1 6 BASE 2270 LD R1 SP,PORTNUM should be 0:512 0B490 FA42B4A5 1 2271 JEQZ R1 ITSRFP jump if its a special port 0B491 68440200 1 IMM 2272 UCPR R1 512 is it really in range? 0B492 FE04B4AA 2273 JGT BADONE jump if out of bounds 0B493 10440001 1 IMM 2274 SUB R1 1 make it 0:511 0B494 60040000 0 IMM 2275 LD R0 0 clear this to do divide 0B495 58C40010 IMM 2276 IORPSR PSRMODIF set funny arithmetic 0B496 14040040 0 IMM 2277 DIV R0 ACCINC set R0 to ACC number 0B497 6030B487 0 0 @ 2278 LD R0 @LETTABPTR(R0) get corresponding character 0B498 E4168000 0 2 CACH 2279 ST R0 CACH R2,0 save it in string 2280 0B499 60040000 0 IMM 2281 LD R0 0 clear R0 for divide 0B49A 14040008 0 IMM 2282 DIV R0 SLOTINC find slot number in R0 0B49B 70120000 0 0 REG 2283 LDN R0 R0 make neg offset 0B49C 6030B486 0 0 @ 2284 LD R0 @LETETABPTR(R0) from end of char group 0B49D 58840010 IMM 2285 CLBPSR PSRMODIF restore to normal math 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2463 (INITPROC) F 148 System Initialization Process 0B49E E4168001 0 2 CACH 2286 ST R0 CACH R2,1 save character we found 2287 0B49F 60165031 0 1 REG 2288 LD R0 R1+"1" port number was left in R1 0B4A0 E4168002 0 2 CACH 2289 ST R0 CACH R2,2 store corresponding character 0000B4A1 2290 OUTTHEDOOR LABEL 0B4A1 60040000 0 IMM 2291 LD R0 0 say normally done 0B4A2 38568003 1 2 CACH 2292 LEA R1 CACH R2,3 set position after last char 0B4A3 EC164000 1 CACH 2293 STZ CACH R1,0 and null terminate the string 0000B4A4 2294 BADEXIT LABEL 0B4A4 5D1F8002 6 STAK 2295 LEAVE POP bye now! 2296 * --- 2297 2298 * Port 0 is the Remote Front Panal port, return special symbol 2299 * not based on above system. 0000B4A5 2300 ITSRFP LABEL 0B4A5 60440002 1 IMM 2301 LD R1 3-1 offset of third character 0000B4A6 2302 LOOP LABEL 0B4A6 6032B48A 0 1 @ 2303 LD R0 @RFPPTR(R1) get current char 0B4A7 E41A8800 0 21 CACH 2304 ST R0 CACH R2,0(R1) store it in the string 0B4A8 FA66B4A6 1 2305 JDR R1 LOOP do previous character 0B4A9 FE0EB4A1 2306 JMP OUTTHEDOOR all done 2307 * --- 2308 0000B4AA 2309 BADONE LABEL 0B4AA 60040001 0 IMM 2310 LD R0 1 flag to say we couldn't do it 0B4AB FE0EB4A4 2311 JMP BADEXIT return 2312 * --- 2313 2314 END INTTOPORT subroutine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2464 (INITPROC) F 148 System Initialization Process 2316 2317 ********************************************************************************** 2318 * * 2319 * HSERROR. * 2320 * Process an error. Accept a pointer to a message descriptor * 2321 * and use it to send a message to the operator. * 2322 * * 2323 * Calling sequence: * 2324 * * 2325 * CALL HSERROR * 2326 * PARVL error code * 2327 * * 2328 * Eats R0:R3 * 2329 * Stack required = 2 * 2330 * 1 + max ( GENOPMSG (1), SGETMEM (0) ) * 2331 * * 2332 ********************************************************************************** 2333 2334 BLOCK HSERROR subroutine 2335 2336 ENTRY HSERROR 2337 2338 BEGFRAME 2339 ENDFRAME 2340 0B4AC DD1F8001 6 STAK 2341 HSERROR ENTR PUSH 0B4AD C0528000 2 REG 2342 STPVL R2 get error number 2343 0B4AE DC002ED0 2344 CALL SGETMEM get some memory 0B4AF 40440005 IMM 2345 PARVL OPMSGLOG 0B4B0 60D20000 3 0 REG 2346 LD R3 R0 move things around 0B4B1 6024B4BA 0 2 2347 LD R0 HSERRTEXTP(R2) get text pointer 0B4B2 6064B4C0 1 2 2348 LD R1 HSERRTEXTL(R2) and its length 0B4B3 3896C802 2 3 BASE 2349 LEA R2 R3,OPMSGTEXT 0B4B4 E456C007 1 3 CACH 2350 ST R1 R3,OPMSGLEN 0B4B5 FE400000 2351 CMOVE 2352 2353 * Zap the process number 2354 0B4B6 EC08C2E0 3 ZBM 2355 STZ R3,OPMSGPROC 2356 2357 * Send the message 2358 0B4B7 DC0046F3 2359 CALL GENOPMSG 0B4B8 4052C000 3 REG 2360 PARVL R3 2361 2362 * Go home 2363 0B4B9 5D1F8001 6 STAK 2364 LEAVE POP 2365 * --- 2366 2367 * HSERRTEXTP - pointers to error message text 2368 0000B4BA 2369 HSERRTEXTP LABEL 0B4BA 0000B4C6 2370 PTR HSERTEXT0 0B4BB 0000B4D2 2371 PTR HSERTEXT1 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2465 (INITPROC) F 148 System Initialization Process 0B4BC 0000B4E1 2372 PTR HSERTEXT2 0B4BD 0000B4EF 2373 PTR HSERTEXT3 0B4BE 0000B501 2374 PTR HSERTEXT4 0B4BF 0000B510 2375 PTR HSERTEXT5 2376 2377 * HSERRTEXTL - matching lengths for above listed messages 2378 0000B4C0 2379 HSERRTEXTL LABEL 0B4C0 0000002E 2380 VFD 46 0B4C1 00000039 2381 VFD 57 0B4C2 00000038 2382 VFD 56 0B4C3 00000045 2383 VFD 69 0B4C4 0000003C 2384 VFD 60 0B4C5 00000034 2385 VFD 52 2386 2387 * Error message text 2388 0B4C6 434F4E46 2389 HSERTEXT0 TEXT "CONFIG ERRCouldn't create account HARDWARE.SYS" 0B4D2 434F4E46 2390 HSERTEXT1 TEXT "CONFIG ERRCouldn't save file HARDWARE.SYS:TERMINAL.CONFIG" 0B4E1 434F4E46 2391 HSERTEXT2 TEXT "CONFIG ERRCouldn't save HARDWARE.SYS:.NULL for new entry" 0B4EF 434F4E46 2392 HSERTEXT3 TEXT "CONFIG ERRCouldn't save HARDWARE.SYS:<new entry> for new device entry" 0B501 434F4E46 2393 HSERTEXT4 TEXT "CONFIG ERRCouldn't find new HARDWARE.SYS entry just created" 0B510 434F4E46 2394 HSERTEXT5 TEXT "CONFIG ERRCouldn't initialize TERMINAL.CONFIG header" 2395 2396 2397 END HSERROR subroutine 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2466 (INITPROC) F 148 System Initialization Process 2399 2400 ********************************************************************************** 2401 * * 2402 * Tables, blocks and misc. values used by the creation of HARDWARE.SYS * 2403 * routines. * 2404 * * 2405 ********************************************************************************** 2406 0B521 00000000 2407 MAGICBLOCK VFD 0,0,0,0,0 volume name, sysname, password 0B522 6FA664B3 2408 PAK12 HARDWARE account 0B524 B6740200 2409 PAK6 SYS project 0B526 00000000 2410 VFD 0,0 0B527 B980DAD0 2411 MAGICNAME PAK12 TERMINAL filename 0B529 5340E709 2412 MAGICEXT PAK6 CONFIG ext 0B52C 00000000 2413 VFD 0,0,0 password, modifiers 2414 0B531 00000000 2415 NULLBLOCK VFD 0,0,0,0,0 0B532 6FA664B3 2416 PAK12 HARDWARE 0B534 B6740200 2417 PAK6 SYS 0B538 00000000 2418 VFD 0,0,0,0 0B539 974CF580 2419 PAK6 NULL 0B53C 00000000 2420 VFD 0,0,0 2421 0B541 00000000 2422 RAFDESC VFD 0,0,0,0,0 0B542 6FA664B3 2423 PAK12 HARDWARE 0B544 B6740200 2424 PAK6 SYS 0B548 00000000 2425 VFD 0,0,0,0 0B549 ACA35000 2426 PAK6 RAF 0B54C 00000000 2427 VFD 0,0,0 2428 2429 * Device list 2430 0B54D 0000B54E 2431 HSDEVHEAD PTR HSTERMDEV 2432 0B54E 0000B553 2433 HSTERMDEV PTR HSLPDEV 0B54F 00000007 2434 VFD HTYPETERM 0B550 B980D7C0 2435 PAK6 TERM file ext 0B551 A29DA380 2436 PAK12 PORT prototype name 2437 0B553 0000B558 2438 HSLPDEV PTR HSMTDEV 0B554 0000000B 2439 VFD HTYPELP 0B555 8A3EA000 2440 PAK6 LP 0B556 8A3EA000 2441 PAK12 LP 2442 0B558 0000B55D 2443 HSMTDEV PTR HSCTDEV 0B559 0000000C 2444 VFD HTYPEMT 0B55A 90F56000 2445 PAK6 MT 0B55B 90F56000 2446 PAK12 MT 2447 0B55D 0000B562 2448 HSCTDEV PTR HSVTDEV 0B55E 0000000D 2449 VFD HTYPECT 0B55F 53EC6000 2450 PAK6 CT 0B560 53EC6000 2451 PAK12 CT 2452 0B562 00000000 2453 HSVTDEV VFD 0 0B563 0000000F 2454 VFD HTYPEVT 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2467 (INITPROC) F 148 System Initialization Process 0B564 C7E3E000 2455 PAK6 VT 0B565 C7E3E000 2456 PAK12 VT 2457 2458 * Share info 2459 0B56D 00000000 2460 SHAREWSYSRO VFD 0,0,0,0,0,0,0 0B56E B6740200 2461 PAK6 SYS 0B570 00000000 2462 VFD 0,0 2463 0B577 00000000 2464 SHAREWSYSRW VFD 0,0,0,0,0,0,0 0B578 B6740200 2465 PAK6 SYS 0B579 554E4B4E 2466 TEXT "UNKNOWN " what a crock! 2467 0B57B 8000008E 2468 ALREXERR VFD 08000008E error result from create account 0000B57C 2469 TCHEADR LABEL 0B57C 000000F0 2470 VFD 0F0 default base address for TERMINAL.CONFIG 0B57D 00000014 2471 VFD 014 default entry length for TERMINAL.CONFIG 00000004 ABS 2472 TCHDRPOS EQU 04 position of the TERMINAL.CONFIG header 00000008 ABS 2473 TCHDRLEN EQU 02*CPW current length of the TERMINAL.CONFIG header 2474 2475 2476 END Build Hardware.Sys Utilities 2477 2478 2479 END Initialization Process 232 0000B7FF ABS 233 ENDOFSYS EQU (DISPW MA 0) OR (WPP-1) last address in virtual system 234 1 Assembler C9208 VRM, System C9303 (18 Mar 93) 12-May-93 12:30 PAGE2468 F 0 System wide CREF 237 END GLOBAL Global Block 238 * even if Block/Ends match, the assembler will read this 239 * will continue reading for an end/eof 1 Jimbo's CREF Extractor 2.0 VRM, System C9303 (18 Mar 93) 12-May-93 12:56 PAGE 1 ACCOUNT 0000505F F 26 136 153 F 28 1145 1170 F 54 6 387 392= F 67 854 916 F 118 66 F 130 217 234 338 689 F 131 264 319 592 F 133 1292 F 137 287 507 F 148 551 ACCTALIAS 00005C2A F 28 1160 F 67 7 844 849= F 118 56 60 F 130 323 ACCTCONC 00002AA4 F 28 1143j 1169= ACCTFILE MACRO F 11 65= F 16 700 ACCTOVER 00002594 F 24 38j 59= ACCTPSA 00005C0D F 28 1153 F 67 9 760 765= 859 921 F 118 72 F 130 222 243 343 694 F 131 269 325 597 F 133 1298 F 137 292 512 ACCTQUE 00005025 F 26 141 157 F 28 1155 F 54 38 202= F 67 868 932 F 118 95 F 130 224 244 345 695 F 131 274 341 602 F 133 1324 F 137 299 520 F 148 555 ACCTRESTRT 00005316 F 16 695a F 56 20 51= ACCTULB 00005C1E F 28 1154 F 67 10 805 810= 860 922 F 130 223 344 F 133 1299 F 137 294 515 ADDRESS 00000011 F 6 26= 35e 36e 37e 38e 134e 232 233 F 16 728 757 1044 1154 F 17 135 147 150 249 253 256 260 268 271 273 274 276 364 413 414 535 538 539 605 F 18 70 72 74 76 78 80 133 177 270 277 368 375 F 19 200 293 419 451 455 459 515 516 517 518 519 520 568 703 1001 1131 1146 F 24 698 F 74 606 F 135 85x 85x 86x 86x 93x 93x 94x 94x ADDSWAP 0000257E F 22 411 555 F 24 21 26= ADJUSTFSX 00002B0F F 28 1527= 1551j 1576j ADJUSTTAKE 00002B2E F 28 1529j 1543j 1581= 1606j 1628j ADTBLKOK 00003864 F 38 1486j 1538= ADTECNT 000000C8 F 8 1505= 1511 F 38 782 869 870s ADTFNDLOOP 00003837 F 38 1424= 1431j ADTGETEND 00003849 F 38 1428j 1463= ADTHAVEND 0000383E F 38 1426j 1434= 1516j ADTLASTBLK 0000386C F 38 1503j 1556= *ADTLIST 00000000 F 8 1511= ADTSETCNT 0000384D F 38 1470= 1545j *AFBEGIN 00000000 F 16 700= AFEND 00000004 F 16 700= F 56 209 AFRACCT 00160802 F 16 700= F 56 98 F 67 812s F 118 92s F 130 239s F 131 271s 339s 599s AFRACCT2 00160807 F 16 700= F 67 925s F 133 1321s F 137 297s 518s AFRCPUTIME 00160807 F 16 700= 700e F 67 781s AFRFILEXT 0016080C F 16 700= F 67 867s 931s F 118 77s AFRFILLEN 00000034 F 16 700= 700e F 67 856 918 F 118 68 *AFRFILLER 00081D21 F 16 700= AFRFILNAM 0016080A F 16 700= F 67 865s 929s F 118 75s AFRFOREIGN 00081A11 F 16 700= F 67 818s AFRLEN 00081F10 F 16 700= F 54 402s F 56 202 AFRLONG 0000002C F 16 700= F 133 1294 AFRMAXLEN 00000034 F 16 700= 706 F 56 191 AFRPORT2 000800AA F 16 700= F 133 1307s 1312s AFRPORTNUM 00080AA0 F 16 700= F 54 405s F 67 766s 771s AFRPROC2 000814CA F 16 700= F 133 1318s AFRPROCN 000800C1 F 16 700= F 67 777s AFRPROJ 00160804 F 16 700= F 56 100 F 67 814s F 118 93s F 130 241s F 131 273s 340s 601s AFRPROJ2 00160809 F 16 700= F 67 927s F 133 1323s F 137 298s 519s AFRPROTO 00001DA1 F 16 700a 700= AFRSESMAX 00160809 F 16 700e 700= F 67 783s 1 Jimbo's CREF Extractor 2.0 VRM, System C9303 (18 Mar 93) 12-May-93 12:56 PAGE 2 AFRSHADOW 00081811 F 16 700= F 67 816s AFRSHORT 0000001C F 16 700= F 26 139 155 F 28 1172 F 130 236 691 F 131 266 321 594 F 148 553 AFRSIZE 00000028 F 16 700= F 28 1147 F 130 219 340 F 137 289 509 AFRSVDUSD 00160808 F 16 700= F 67 820s *AFRSZLONG 2B000000 F 16 700= AFRTIME 00160805 F 16 700= F 54 407s AFRTYPE 00080050 F 16 700e 700e 700e 700e 700= F 54 401s F 56 270 AFRWORDA 0016080A F 16 700= 700e 700e 700e AFTACSMO 00000001 F 19 1310= F 134 272 303 322 503 507 833 848 854 F 136 437 463 496 F 138 435 574 F 148 283 299 AFTACSRO 00000000 F 19 1309= F 59 577 695 705 F 136 84 110 334 379 AFTERCK 00002AD2 F 28 1321j 1327= 1354j AFTERDEV 000021CF F 21 1188j 1195= AFTERMASK 0000347B F 36 1048j 1059= AFTINDEX 00001F64 F 19 1304= F 59 696 F 61 530s F 134 306 836 F 136 85 438 F 138 470 571 F 148 258s 285 296s AFTINFORD MACRO F 11 169= F 136 70 AFTLOCK 00001F65 F 19 1305= F 60 238s 255a 266a 273s 309s 337s AFTLOOKERS 00001F66 F 19 1306= F 60 243 271s 325s AFTMODIFY 00001F67 F 19 1307= F 60 241s 260 311s 327 ALLBUILT 00002968 F 28 449j 464= ALLDONE 000023B7 F 21 2422j 2438j 2448= ALLINHIBIT 00001D0D F 16 288= F 48 875 F 50 616 F 130 174 813s 848s 855s F 148 569s ALLOVER 00003426 F 36 782j 784j 801= ALLOVER 0000343B F 36 839j 841j 853j 860= ALLPORTSC 00002271 F 21 1451j 1529= ALLVOLUMES 00002558 F 23 353= F 135 1219 F 143 1737 ALREADYERR 000035AE F 36 1827j 1851= APBUSY 00001D9B F 16 693= F 56 290s F 148 594s APLINK 00091F10 F 16 705= F 56 64 APLIST 00001D9A F 16 692= F 28 87 F 56 62 65s 274 F 130 739 APLNTH 0000000E F 16 708= 709e F 54 398 APLOCK 00001D99 F 16 691= F 28 1469a F 54 203a 223a F 56 61s 66s 282s 291s F 148 593s 601s APLOG 00000004 F 16 709= F 54 394 F 56 278 APPROT 00001DA1 F 16 702= 708e 710a APRECORD 00170801 F 16 706= F 54 401s 402s 405s 407s F 56 98 100 202 205a 270 F 67 766s 771s 777s 781s 783s 812s 814s 816s 818s 820s 865s 867s 925s 927s 929s 931s F 118 75s 77s 92s 93s F 130 239s 241s F 131 271s 273s 339s 340s 599s 601s F 133 1307s 1312s 1318s 1321s 1323s F 137 297s 298s 518s 519s APREQUE 00001DA0 F 16 698= F 54 224s F 56 254s 272 *APROGB5S 0000032E F 20 226= *APROGBC 0000032D F 20 225= APTABORT 0000000B F 16 700= F 133 1128 APTALIAS 00000004 F 16 700e 700= F 28 1161 F 118 61 APTALIER 00000005 F 16 700= F 118 67 F 131 320 APTALOFF 00000007 F 16 700= 700e F 118 57 F 130 324 APTCONCP 0000000A F 16 700= F 28 1171 APTEVICT 0000000D F 16 700= F 133 1086 APTFBC 00000010 F 16 700= F 111 65 F 112 253 APTFILCL 0000000F F 16 700= F 112 225 APTFILOP 0000000E F 16 700= F 79 708 1 Jimbo's CREF Extractor 2.0 VRM, System C9303 (18 Mar 93) 12-May-93 12:56 PAGE 3 APTGO 00000014 F 16 700= F 133 1241 APTLOAD 00000011 F 16 700= F 137 288 *APTMAX 00000015 F 16 700= APTOFF 00000006 F 16 700= 700e F 130 339 APTON 00000002 F 16 700e 700= F 28 1146 F 130 218 APTPWRFAIL 00000008 F 16 700= F 26 138 APTPWRUP 00000009 F 16 700= F 26 154 APTPWW 00000003 F 16 700= F 130 235 F 131 265 593 APTSLEEP 00000000 F 16 700= F 130 690 APTSTARTUP 00000001 F 16 700= F 148 552 APTSTOP 00000013 F 16 700= F 133 1196 APTTERMIN 0000000C F 16 700= F 133 1037 APTUNLOAD 00000012 F 16 700= F 137 508 APTXSAVE 00000015 F 16 700= F 110 495 APWHOGETS 00090050 F 16 704= F 54 403s F 56 130 131s 132s 136a 148 149s 150s 154a 161 162s 163s 167a 171a APWORDA 00170800 F 16 703= 704e 705e ASSERTEQ MACRO F 5 221= F 16 66 928 F 74 649 F 100 341 454 F 123 1132 ASSYTIME 3DB03E00 F 3 1594= F 148 847x 848x AUTHDSK 0016C804 F 8 1756= F 121 599a F 134 176 F 135 85x 93x 683s 756 F 143 1796a 1800 AUTHDSKA 0016C805 F 8 1757= F 121 628 632s F 134 170 178s 537 539s F 135 795 799 804s F 143 867 AUTHENTBG 00000004 F 8 1749= F 135 450 662a 1096 1099 1104a 1210a F 142 129a F 143 841a 1728a *AUTHINFORD MACRO F 11 187= AUTHLELEN 0000000C F 8 1762= F 135 670 671a 772 778 1098 1099 1225 F 142 134 135a F 143 850 851a 1743 1744a AUTHLENTRY 000007B0 F 8 1752= 1762e AUTHSDSK 0016C806 F 8 1758= F 121 698a F 135 86x 94x 684s 764 F 143 1797a 1801 AUTHSDSKA 0016C807 F 8 1759= F 121 727 731s F 135 808 812 817s AUTHTIME 00000000 F 8 1746= F 121 441 448 505a F 135 172 185 220s 319 333 350 370s 491 594 F 143 1712 AUTHTIMEA 00000001 F 8 1747= F 121 439 450s 531 535s F 135 184 187s 250s 347 355s 371 407s 492 515 519 524s 595 AUTHVNAME 0016C800 F 8 1753= F 135 85x 86x 93x 94x 450 666 682s 1215 F 142 132 F 143 844 867 1732 1734 1735 AVPAGES 00401CC2 F 16 185= 189a BADBLOKP 00002E55 F 32 488j 491j 505j 519= BADPAGE 00002721 F 25 266j 270j 357= BADPAGE 00002E59 F 32 443j 551= BADPAGE1 00002727 F 25 362j 366= BADSIZEHALT 00002F5C F 33 239j 394= BADSIZFREED 00002FC1 F 33 617j 701= BADSLOT 000027CE F 26 230j 235= BADSTACK 00002869 F 27 183j 195= BEGFRAME2 MACRO F 5 122= F 21 36 F 22 518 F 25 84 F 46 49 F 100 417 734 1303 1490 F 101 161 331 623 784 F 104 323 F 108 28 384 F 110 37 F 113 36 F 119 54 F 121 1095 F 124 496 F 125 565 946 F 126 476 F 127 677 F 131 145 504 1033 F 132 40 97 F 136 60 F 139 34 383 F 140 46 F 141 651 F 142 17 F 143 41 F 144 427 F 145 115 BFDCHKSEG 0000000A F 7 665= F 43 2681 4545 BFDEF18 00000230 F 7 733= F 43 4568 BFDEF9A 00000240 F 7 739= F 43 702 4569 1 Jimbo's CREF Extractor 2.0 VRM, System C9303 (18 Mar 93) 12-May-93 12:56 PAGE 4 BFDFNCLFLT 00000011 F 7 748= F 43 1949 *BFDFNCLOFS 00000044 F 7 759= BFDFNDSE 00000081 F 7 761= F 43 4867x 4870x 4873x BFDFNDSINT 00000028 F 7 756= F 43 361 496 BFDFNDSL 00000082 F 7 762= F 43 4868x 4871x 4874x BFDFNENINT 00000024 F 7 755= F 43 1026 BFDFNOFSB 00000042 F 7 758= F 43 4872x 4873x 4874x BFDFNOFSF 00000041 F 7 757= F 43 4869x 4870x 4871x *BFDFNRDS 00000084 F 7 763= *BFDFNRESET 00000048 F 7 760= BFDFNSAFE 00000020 F 7 752= F 43 1888 1951 BFDFNSISE 00000021 F 7 753= F 43 498 BFDFNSOLNT 00000014 F 7 750= F 43 500 *BFDFNUISE 00000022 F 7 754= *BFDFNUOLNT 00000018 F 7 751= BFDFNZERO 00000012 F 7 749= F 43 4159 BFDFORMAT 00000260 F 7 774= F 43 2854s BFDFORMATW F0783C1E F 7 775= F 43 2850 2851 BFDFUNC 00000220 F 7 746= F 43 362s 497s 499s 501s 1027s 1889s 1950s 1952s 4160s 4816s BFDIDSTEST 00002080 F 7 669= F 43 219x 219x 220x BFDINTBIT 00003010 F 7 787= F 43 2018s 2292s 2709s 2854s 3758s *BFDINTERNS 00000250 F 7 742= BFDMAGICHD 000000FF F 7 809= F 43 3139 4919x BFDNUMSEGS 0000000A F 7 664= F 43 4533 BFDPRESENT 00002080 F 7 741= F 43 703 BFDREAD 00000230 F 7 765= F 43 2709s 3758s *BFDREADY 00001080 F 7 740= BFDSACYL 00000100 F 7 681= F 43 1442 1538s 2956s 3143s 4919x BFDSAHEAD 00002080 F 7 682= F 43 1537s 3139 4919x BFDSASEC 00003080 F 7 683= F 43 1534s BFDSEEK 00000210 F 7 679= F 43 1946s 2209s 3144s 4910s BFDSEGSIZE 00000073 F 7 663= F 43 2688 2691 2706 2746 2750 2757 2759 2790 BFDSELECT 00000200 F 7 744= F 43 4801s BFDSELECTB 00000008 F 7 777= F 43 529 629 763 1803 1946s 2018s 2209s 2292s 2709s 2854s 3144s 4160s 4345 4910s BFDSS 00000220 F 7 685= F 43 529 629 763 1803 3145 4345 4826 BFDSSCEOV 00003610 F 7 717= F 43 230e 4536j 4609 4638j BFDSSDNUM 00002030 F 7 699= F 43 627 1805 *BFDSSEBITS 00001080 F 7 694= BFDSSERRCD 00003840 F 7 720= F 43 230e 4471 4523 4532 4609 4641 BFDSSFAULT 00000E10 F 7 693= F 43 222x 228e 4297j 4463j BFDSSHDECD 00003030 F 7 707= F 43 230e 4505 4601 4626 BFDSSIFPE 00002C10 F 7 704= F 43 229e 4500j 4637j BFDSSLOSTD 00002A10 F 7 703= F 43 229e 4499j 4636j BFDSSNSAFE 00000410 F 7 688= F 43 1815j 4466j BFDSSOLINT 00000010 F 7 686= F 43 662j BFDSSONCYL 00000A10 F 7 691= F 43 222x 224x 228e 233x 4465j BFDSSRDY 00000810 F 7 690= F 43 222x 223x 224x 228e 233x 1810j 3486j 4299j 4467j BFDSSRSPER 00002E10 F 7 705= F 43 222x 229e 1804j 3146j 3485j 4296j 4462j BFDSSSKERR 00000C10 F 7 692= F 43 222x 228e 530 2206s 2207s 4298j 4464j BFDSSWCERR 00002810 F 7 702= F 43 229e 4498j 4635j BFDSSWPROT 00000610 F 7 689= F 43 1811 3147 4599j *BFDUNITS 00000008 F 7 666= 1 Jimbo's CREF Extractor 2.0 VRM, System C9303 (18 Mar 93) 12-May-93 12:56 PAGE 5 BFDUNLDCYL 000003FF F 7 810= F 43 4919x BFDWRCH 00000250 F 7 772= F 43 2018s BFDWRITE 00000240 F 7 770= F 43 2292s BHALT 00020000 F 13 331= 363e 366e 372e 375e 376e 379e 380e 383e 384e 385e 386e 387e 388e 389e 390e 391e 392e 393e 394e 395e 396e 397e 398e 399e 400e 401e 404e 405e 408e 409e 410e 411e 412e 413e 414e 415e 416e 417e 418e 419e 420e 421e 422e 423e 426e 429e 430e 431e 432e 433e 434e 435e 436e 465e 466e 467e 782e 783e 784e 785e 786e 788e 789e 790e 791e 792e *BIT00 0000257D F 23 391= *BIT01 0000257C F 23 390= *BIT02 0000257B F 23 389= *BIT03 0000257A F 23 388= *BIT04 00002579 F 23 387= *BIT05 00002578 F 23 386= *BIT06 00002577 F 23 385= BIT07 00002576 F 23 384= F 37 96 121 *BIT08 00002575 F 23 383= *BIT09 00002574 F 23 382= *BIT10 00002573 F 23 381= *BIT11 00002572 F 23 380= *BIT12 00002571 F 23 379= *BIT13 00002570 F 23 378= *BIT14 0000256F F 23 377= *BIT15 0000256E F 23 376= *BIT16 0000256D F 23 375= *BIT17 0000256C F 23 374= *BIT18 0000256B F 23 373= *BIT19 0000256A F 23 372= *BIT20 00002569 F 23 371= *BIT21 00002568 F 23 370= *BIT22 00002567 F 23 369= *BIT23 00002566 F 23 368= *BIT24 00002565 F 23 367= *BIT25 00002564 F 23 366= *BIT26 00002563 F 23 365= *BIT27 00002562 F 23 364= *BIT28 00002561 F 23 363= *BIT29 00002560 F 23 362= *BIT30 0000255F F 23 361= *BIT31 0000255E F 23 360= BITTAB 0000255E F 21 1931 1936 F 23 359= F 27 229 267 F 28 261 F 33 134 138 323 327 482 525 531 641 684 690 1078 F 37 105 F 84 64 248 F 94 276 F 100 34 F 107 585 F 127 219 225 BKUPHDRLEN 00000002 F 12 15= F 142 219 222 F 143 1943 1955 *BKUPHDRW1 00160800 F 12 15= *BKUPHDRW2 00160801 F 12 15= BKUPINFORD MACRO F 11 668= F 12 15 BKUPREV 00001F10 F 12 15= F 142 51s F 143 1958 BLCEXIT 00003653 F 37 320j 322= BLDPROCESS 000035D2 F 21 584 F 28 411 452 1489 F 37 6 54 59= F 46 811 F 50 631 F 54 529 F 131 222 574 756 1070 BLKLIMCHK 0000364A F 37 8 308 313= F 50 701 F 131 774 1888 BLKREADIN 000026A5 F 24 1025 1030= F 142 712 888 BLKWRNMAX 00000118 F 19 1210= F 38 489 BLKWRNMIN 00000100 F 19 1209= F 38 258 1 Jimbo's CREF Extractor 2.0 VRM, System C9303 (18 Mar 93) 12-May-93 12:56 PAGE 6 BLOCKSIZE 00000400 F 8 6= 933e 1233e 1572e 2210e 2223e *BOOTCLOC 00000331 F 20 240= BOOTDA 00000002 F 8 981= F 137 402 416 F 142 265 F 143 190 209 *BOOTDEVCB 00000316 F 20 151= BOOTDEVPF 00000316 F 20 152= F 21 1286 BOOTFBIBF 0000031F F 20 172= 193e BOOTFLAG 00001C6B F 16 26= F 25 308 F 54 149 523 F 133 529 F 148 568s BOOTLOC 00001000 F 6 154= 155e BOOTREV 00000001 F 8 985= F 137 425 426 F 143 229 231 BOOTRKPCYL 00000319 F 20 156= F 21 1295 BOOTSCPTRK 00000318 F 20 155= F 21 1293 BOOTUNIT 00000317 F 20 153= F 21 1290 *BOOTYPE 00000330 F 20 239= BRDDONE 0000226E F 21 1504j 1518= BREAK 00000000 F 36 1267x 1270= BREAKMARK 00000100 F 19 621= F 48 910 F 50 127 624 BREAKTAB 00001D28 F 16 441= F 144 236s BS 00000008 F 4 43= F 133 641 *BTRXACDE 00000030 F 8 928= BTRXDATE 00000001 F 8 930= F 57 313s BTRXECNT 00000200 F 8 933= F 143 155 162 BTRXEL 00000000 F 8 922= 931e F 43 3595 3597 F 57 295 297 309s 311s *BTRXFSDE 00000040 F 8 929= *BTRXLCDE 00000010 F 8 926= BTRXLNTH 00000002 F 8 931= 933e F 43 3599a 3600a F 57 299 300a BTRXREASON 00000080 F 8 923= F 57 295 311s BTRXRTDE 00000020 F 8 927= F 57 310 BUILDBLOCK 0000214E F 21 887= 913j BUILDCA 00002833 F 21 1974 1979 1984 1989 1994 1999 2004 2009 F 27 5 36 42= 132 BUILDIVT 00002336 F 21 481 784 1963 1968= BUILDPAGE 00002154 F 21 889j 899= 909j BUILDPPL 00002374 F 21 254 265 2086 2164 2169= BUMADTBLK 00003862 F 38 1475a 1526= *BUSCIP 60000000 F 7 39= BUSCREAD 20000000 F 7 35= F 25 151 247 F 53 236x 685 *BUSCREAD2 30000000 F 7 36= *BUSCRMW 10000000 F 7 34= *BUSCST 50000000 F 7 38= BUSCWRITE 00000000 F 7 33= F 31 47x F 33 807e F 46 156x F 55 1163x BUSCWRU 40000000 F 7 37= F 53 131 BUSYCPUS 00001D0B F 16 266= F 28 235s F 29 878s 1111 F 46 1306a BYE 00003401 F 36 686= 694j 701j 708j 715j 722j BYTEDISP 000028C0 F 8 55= 2365e 2470e F 18 213e F 81 114 F 91 140 F 100 755 757 829 830 CAIMABORT 0000000D F 6 261= F 28 1402x CAIMALLXR 00000007 F 6 255= F 64 49 F 75 555 F 100 527 CAIMARITH 00000003 F 6 251= F 28 1388x 1390x 1391x 1392x 1393x 1394x 1395x 1396x 1397x 1398x 1399x CAIMBREAK 00000006 F 6 254= F 28 1401x F 50 300 CAIMCALL 00000002 F 6 250= F 28 1383x 1384x CAIMCKBDS 00000004 F 6 252= F 28 1387x CAIMGUNIT 0000000E F 6 262= F 28 1403x F 36 652j 721 921j F 127 850 CAIMINST 00000001 F 6 249= F 28 1376x 1377x 1378x 1379x 1380x 1381x 1382x 1 Jimbo's CREF Extractor 2.0 VRM, System C9303 (18 Mar 93) 12-May-93 12:56 PAGE 7 1386x 1389x F 125 1001s CAIMMPV 00000005 F 6 253= F 28 1413x CAIMMSG 0000000B F 6 259= F 28 1402x F 36 633j 714 914j F 70 327 F 127 235 CAIMNEPATH 00000009 F 6 257= F 28 1401x F 36 600j 700 900j F 76 236 F 84 131 F 104 134 CAIMNETERM 00000008 F 6 256= F 28 1401x F 36 267 555j 693 907j 1090 F 47 58 F 50 208 555 F 104 134 F 124 326j 413j F 125 847j 881j F 126 487 CAIMTIME 0000000A F 6 258= F 28 1402x F 36 671j 707 928j 1392 CAIMVMF 0000000C F 6 260= F 28 1412x 1412x 1412x CAINTADR 0016080A F 6 244= F 27 138s F 28 563 710 1315 F 36 265 F 40 188 F 67 551s 580s F 101 1059a F 125 787 872 875 905s 1003s CAINTENABL 0008001B F 6 247= F 28 669s 679s 864 F 124 406s CAINTMASK 0016080B F 6 245= 247e F 28 681 1317a F 36 77 136 267 288 F 40 185a F 64 49 F 75 556s F 100 528s F 101 1058a F 104 133 F 124 307 309 333 336 344s 345s 412 F 125 786 845 854 857 880 904s 1001s CALCTERMC 00004CA6 F 36 359 F 50 6 865 870= F 97 243 381 F 103 367 565 F 133 509 CALINK 0016080C F 6 266= F 27 137s 178 F 32 193 F 36 223s *CALLNAME 00000314 F 20 137= CALNTH 0000000F F 6 274= 275e F 15 135 CALOG 00000004 F 6 275= F 27 49 86 F 32 214 F 36 496 F 37 129 133 F 107 301 306 F 148 465 469 CAMSR 00160801 F 6 234= F 26 93 93s F 28 509 531s 532s 533s 713 736 919s F 36 1454s 1455s F 37 147s F 40 73 83 146 192s 193s 194s 221s F 48 1368s F 65 185 F 67 911 F 78 56 F 79 185 317 F 80 166 F 85 55 F 87 73 F 90 95 F 97 47 F 98 91 F 103 102 337 351 F 105 94 F 107 312s F 119 122 F 120 28 F 121 226 252 1003 1059 1108 F 123 684 F 124 387 397s F 125 399 401s 727s 1018 1184 F 127 117 133 385 F 128 95 F 130 193 394 F 131 185 237 439s 550 692s 797s 1163s F 132 303 F 133 259 F 134 618 F 135 1112 F 136 119 F 139 75 279 423 598 675 F 140 59 F 143 67 F 144 442 F 145 67 128 CAN 00000018 F 4 51= F 133 642 CANOPMSG 00004713 F 38 492 F 43 4088 F 45 1809 1862 F 46 6 1519 1524= F 51 477 F 53 624 706 809 F 128 142 F 130 349 633 F 138 917 924 F 145 225 CANTTOUCH 00002A22 F 28 511j 875= CANUMREGS 0000000C F 6 265= F 107 308 F 148 471 CANUMUREGS 0000000A F 6 264= F 28 1133 CAPC 00081F10 F 6 233= 265e F 8 2538e F 26 96s F 28 566s 726s 958s 1128 1130s F 36 1098s 1456s F 37 149s F 40 82s 191s 220 F 47 60s F 48 1367s F 101 1056a F 124 219s 393s F 125 784 902s F 131 437s 690s 795s 1161s CAPSR 000800F0 F 6 232= F 28 735 744s F 101 1057a F 124 399s F 125 785 903s CAR0 00160802 F 6 235= 264e F 8 2539e F 28 537s 740a 950s 1132a 1134a F 36 1093s 1569 F 40 190s F 47 63s F 64 72s F 71 32 35 F 74 752 F 85 252s F 100 375 F 101 1048a F 102 69 102 F 123 45 48 F 124 64e 68e 70e 178a 187s 403a 510s F 125 155s 377s 721s 769s 776 894s 1022 1119s F 130 45 48 F 131 402s 1151s F 133 967s F 137 199s F 141 363s 465 673 726 F 144 284 CAR1 00160803 F 6 236= F 28 539s 560 745s 955s F 47 55s F 78 48 F 79 182 309 F 80 161 F 82 76s 205 F 84 52 154s F 85 225s 250s F 87 71 F 90 79 F 91 183 185 198s F 92 240 262s F 93 87s 1 Jimbo's CREF Extractor 2.0 VRM, System C9303 (18 Mar 93) 12-May-93 12:56 PAGE 8 F 94 52 85s F 95 161 168s F 97 270 276s F 98 88 101s F 100 126s 144s 220s 231s 1503 1577s F 101 54 67s 120 124s 189 401s 455s 492 512 537 628 806s 877 926s 980 1006a 1049a 1202 F 102 104 283 393 398s 415s 441s F 103 46s 107 157s 213 219s 320 345 373 1007 1045 F 104 43 60s 149s 186 334 F 105 85 F 106 35s F 107 125s 178s 229s F 108 61 406 596 611s F 110 71 311 F 113 71 F 119 119 F 120 24 100s F 121 67s 159s 218 220 224s 258 277s 1001 1053 1174 1538 F 123 549s 583s 680 983s 1314 1352s 1408s 1521s 1597 1645s 1765 F 124 71e 167 306 310s 372 511 700 725s 745s 754s 765s 820 832s 846s F 125 113 156s 768s 777 824 826s 895s 996 1045s 1076 1118s 1183s F 126 46 49 233s 270s 297 334 483 619 640s F 127 92 106 114 382 393s 445s 479 481s 522 524s 688 832 1014s F 128 87 F 130 190 305s 393 506 F 131 166 546 1049 F 132 63s 293 F 133 255 363s 836 877 F 134 615 F 135 114 374s 535s 598s 946s 1052s 1109 1121s F 136 117 347s F 137 194s 632 F 139 71 180s 286 326 420s 452s 557 576 591 634s 647s 669 671 673s F 140 55 227s F 141 249 462 576 662 780 816 872 912 914s F 142 109s 215 1028 F 143 61 F 144 95a 142 438 458s 930 971s 1006 1031 1045s 1089 1106s 1149 F 145 59 125 192s 226 CAR2 00160804 F 6 237= F 28 747s 957s F 36 1089s 1103 F 47 58 64s F 80 156 F 82 78s F 84 91 151 153s F 87 70 F 90 92 F 91 186 201s F 92 242 267s F 93 90s F 94 55 104s 110s 236s F 95 170s F 96 21s F 97 265s F 98 89 104s F 100 230s F 101 191 514s 540 1050a 1097s F 102 417s F 103 221s F 105 92 F 106 37s F 110 76 F 113 75 F 120 26 F 121 232 1058 F 123 551s 682 1337 1353s 1458 1464s 1523s 1552s 1709 1711s F 124 72e 77s 85s 106 130 179 728s 740s 756s 767s 834s 848s F 125 379s 778 896s 1023 1117s 1181 F 126 54 325 335 487 505 508 522s 536s 543 F 127 113 383 718 1016s F 128 94 F 131 189 545 1058 F 132 301 F 133 257 970s F 135 635 642 668 681 728 735 750 789 874 880 898 934 988 1033 1039 1110 F 136 115 349s F 137 74 127 196s 483 634 F 139 73 294s 348s 422 431s 506a 513 544 597 622s 674 F 140 57 F 141 359s 578s 777 F 144 145 440 F 145 65 CAR3 00160805 F 6 238= F 28 749s F 36 1104s F 101 1051a F 106 39s F 124 73e 169 170 180 181 182 836s 850s F 125 779 897s F 126 544s F 131 181 528 F 141 464 667 F 142 792 F 143 1397 CAR4 00160806 F 6 239= F 54 536s F 101 1052a F 125 780 898s 1016a CAR5 00160807 F 6 240= F 101 1053a F 125 781 899s CAR6 00160808 F 6 241= F 101 1054a F 125 782 900s 1024 CAR7 00160809 F 6 242= F 36 1451s F 101 1055a F 125 783 901s CASTACKPTR 0016080D F 6 268= F 22 145 F 25 110 F 26 36 F 27 51s 83 181 F 28 706 F 40 29 78 106 145 162 F 41 16 CAXOPERAND 0016080E F 6 272= F 40 28s F 50 942 F 64 37 F 82 52 F 92 151 F 134 891 896 900 906 F 135 458 F 139 511 F 143 749 754 759 CAZOTLOOP 00002DEA F 32 191= 198j CCB2TRANS 0016080A F 8 2539= F 101 934 965s CCBALWFRC 00003E10 F 8 2530= F 67 275 281 296 309 315 429s F 107 494 496 F 121 880j 1275j F 134 792j CCBBACKUP 00080421 F 8 2529= F 74 833s F 101 901a 945 1076a F 107 496 CCBDIVFRC 00003A10 F 8 2532= F 67 275 281 296 415s F 68 572 *CCBFLD2TRN 00000000 F 9 578= *CCBFLDBKUP 0000001A F 9 576= *CCBFLDIAR 0000000B F 9 565= *CCBFLDIMR 0000000A F 9 564= *CCBFLDMGR 00000019 F 9 575= *CCBFLDMNTR 00000016 F 9 572= *CCBFLDMNTW 00000017 F 9 573= 1 Jimbo's CREF Extractor 2.0 VRM, System C9303 (18 Mar 93) 12-May-93 12:56 PAGE 9 *CCBFLDOPR 00000018 F 9 574= *CCBFLDOWND 00000010 F 9 566= CCBFLDPC 00000008 F 9 562= 577e *CCBFLDPSR 00000009 F 9 563= *CCBFLDPTRN 00000008 F 9 577= CCBFLDR0 00000000 F 9 554= 578e *CCBFLDR1 00000001 F 9 555= *CCBFLDR2 00000002 F 9 556= *CCBFLDR3 00000003 F 9 557= *CCBFLDR4 00000004 F 9 558= *CCBFLDR5 00000005 F 9 559= *CCBFLDR6 00000006 F 9 560= *CCBFLDR7 00000007 F 9 561= *CCBFLDRG1 00000011 F 9 567= *CCBFLDRG2 00000012 F 9 568= *CCBFLDRG3 00000013 F 9 569= *CCBFLDRG4 00000014 F 9 570= *CCBFLDRG5 00000015 F 9 571= CCBINFO 000003E8 F 8 2552= F 74 806a F 75 556s F 100 528s F 101 878a 1048a 1049a 1050a 1051a 1052a 1053a 1054a 1055a 1056a 1057a 1058a 1059a 1065a 1067a 1068a 1069a 1070a 1071a 1072a 1073a 1074a 1075a 1076a F 107 307a 435a 458a F 142 558a F 143 1032a F 148 470a CCBINFOL 00000018 F 8 2541= 2545e F 142 559 F 143 1031 CCBINFPROT 00000839 F 8 2517= 2541e 2542a CCBMAINTR 00083210 F 8 2524= F 74 829s F 101 899a 943 1072a F 107 490 CCBMAINTW 00083410 F 8 2525= F 74 830s F 101 900a 944 1073a F 107 492 CCBMANAGR 00083A40 F 8 2527= F 74 832s F 101 898a 942 1075a F 107 480 CCBMAXPAGE 000003E8 F 8 2545= 2547 F 23 345x F 55 688 F 68 654 F 101 411 493 709 F 142 984 F 143 1197 1513 CCBOPREQ 00083620 F 8 2526= F 74 831s F 101 897a 941 1074a F 107 494 506 CCBOWNDIR 00080211 F 8 2528= F 74 822s F 101 935 982s 1065a F 107 436 CCBOWNFRC 00003C10 F 8 2531= F 67 275 281 296 309 422s 433s F 121 1274j F 134 791j CCBPAGE0 00000000 F 8 2546= F 21 128 F 148 437 CCBPERMIT 00160800 F 8 2518= 2536 CCBPREGS 00160808 F 8 2537= 2538e 2539e F 75 556s F 100 528s F 101 1048a 1049a 1050a 1051a 1052a 1053a 1054a 1055a 1056a 1057a 1058a 1059a F 107 307a F 148 470a CCBPRJFRC 00003810 F 8 2533= F 67 275 281 406s F 68 550 CCBPROTECT 00000010 F 8 2551= F 21 131j F 101 541s F 107 374j F 142 975 F 143 1541 CCBPTRANS 00081F18 F 8 2538= F 101 933 954s CCBRSTCTG1 00080050 F 8 2519= F 74 824s F 101 892a 936 1067a F 107 527 CCBRSTCTG2 00080A50 F 8 2520= F 74 825s F 101 893a 937 1068a F 107 526 CCBRSTCTG3 00081450 F 8 2521= F 74 826s F 101 894a 938 1069a F 107 525 CCBRSTCTG4 00081E50 F 8 2522= F 74 827s F 101 895a 939 1070a F 107 524 CCBRSTCTG5 00082850 F 8 2523= F 74 828s F 101 896a 940 1071a F 107 523 CCBUSRFRC 00003610 F 8 2534= F 67 275 380s 453s 499 F 73 78j F 121 894j 1273j 1332j F 134 113j 790j F 135 159j 312j 438j 632j 725j 871j CCPUPLD 00002048 F 21 180= 192j CH0 00000080 F 6 43= F 19 312e 580e 1263e F 28 737s F 37 230e F 46 1105e 1250s 1276 1276 F 49 280 401 402 F 86 46 F 124 396 398s F 128 82 F 141 577 CH1 00001080 F 6 44= F 19 581e F 43 4842 F 46 1245s 1276 1276 F 49 294 309s 401 F 82 358 F 92 393s F 128 82 1 Jimbo's CREF Extractor 2.0 VRM, System C9303 (18 Mar 93) 12-May-93 12:56 PAGE 10 CH2 00002080 F 6 45= F 19 581e F 43 4842 F 46 1263s F 49 402 F 82 357 F 92 392s CH3 00003080 F 6 46= F 19 581e F 43 4815 F 46 1258s F 49 297s 308s 401 402 F 82 356 F 85 353 F 92 391s F 133 837s CHAIN 0000001B F 36 1269x 1274= CHALT 00030000 F 13 332= 738e 739e 740e 743e 748e 749e CHALTPROTO 000026E7 F 25 201 207= CHANGETI 000021BA F 21 1169= 1198j CHANLOOP 000027D2 F 26 247= 267j CHANNUM 00178005 F 26 214= 258s 262 CHARTOP6 00005898 F 21 1891 F 63 9 52 57 89 94= F 148 1021 CHECKEVENT 00003411 F 36 6 515 543 744= F 126 504 CHECKNOINT 0000343C F 28 682 F 36 7 183 516 887 892= F 104 135 F 124 334 F 125 855 884 CHECKUINT 000033C2 F 36 8 78 137 514 542 551= F 104 136 F 124 338 416 F 125 859 885 CHEKRESBLK 000036E0 F 38 462= 490j 498j CHKADTBLK 00003858 F 38 1484= 1487j CHKINTCODE 000034EA F 28 700 952 F 36 9 1101 1263 1281= F 126 541 CHKINTF 00178801 F 36 546= 554s 598 631 641 660 CHKUINTSHR 000033C4 F 36 553= 748j CHKUSDPPL 00002D26 F 30 97j 103= CHKWNDOS 0000317A F 35 5 530 535= F 40 75 CIAAEOP 00003810 F 7 894= F 48 185j 311 1012 CIABOARDS 00000008 F 7 884= F 21 1457 1470a 1520s 1546 F 48 1483 1485 1488 1524 1526 CIABRDF 00003430 F 7 886= F 48 388 1489 *CIACHARS 00000100 F 7 896= CIAEOP 00003A10 F 7 893= F 48 181j 311 1012 CIAERR 00003610 F 7 895= F 21 1540 F 48 184j 311 1012 1506 CIAERROR 00000203 F 7 903= F 48 216 CIAFULL 00003C10 F 7 892= F 21 1540 F 48 183j 1506 CIAINTACK 00000201 F 7 898= F 21 1387s F 48 1464s CIAINTMASK 00000202 F 7 900= F 21 1386s 1541s F 48 1463s 1507s CIAMODE 00000209 F 7 940= F 21 1385s F 48 1468s *CIAMODEM 00000002 F 7 943= CIAMODEN 00000000 F 7 941= F 21 1384 F 48 1467 *CIAMODET 00000001 F 7 942= *CIAPBAUD 00002100 F 7 990= *CIAPECHO 00001410 F 7 984= *CIAPFI 00001810 F 7 986= *CIAPFO 00001A10 F 7 987= *CIAPICH 00002080 F 7 949= CIAPMODM 00003E10 F 7 951= F 21 1496 F 48 1494 *CIAPOCH 00001080 F 7 948= CIAPORT 00000280 F 7 945= F 21 1495 F 48 1493 CIAPPBRD 00000008 F 7 885= F 21 1461 1468 1469 1503 1546 F 48 389 970 1054 1499 1529 *CIAPSIB 00001C10 F 7 988= *CIAPSOB 00001E10 F 7 989= *CIAPSTAT 00000080 F 7 947= *CIAPSTS 00001610 F 7 985= *CIAPWAIT 00003C10 F 7 950= *CIASDREAD 00000207 F 7 932= CIASETTICK 00000206 F 7 926= F 21 1389s F 48 1466s CIASREAD 00000204 F 7 922= F 48 313s 1 Jimbo's CREF Extractor 2.0 VRM, System C9303 (18 Mar 93) 12-May-93 12:56 PAGE 11 CIASRWACK 00000080 F 7 934= F 48 310s 1017s *CIASRWCNT 00002100 F 7 936= CIASRWMSK 00001080 F 7 935= F 48 311 1012 CIASWRITE 00000205 F 7 924= F 48 1018s CIATICK 00003E10 F 7 891= F 21 1540 F 48 182j 1506 CIATICKPSEC 000001C6 F 7 929= 930e CIATICKTIME 0000002D F 7 930= F 21 1388 F 48 1465 CIATPS 0000000A F 7 928= 930e F 48 625e 626e 627e 628e F 49 792 F 103 449 CIATRACE 00000001 F 16 459= F 48 162 162 321 321 370 370 446 446 663 663 796 796 1026 1026 1119 1119 1223 1223 1459 1459 CIATRMBUFL 00000100 F 7 887= F 48 1076 F 49 794 F 103 451 *CIAVERSION 00000208 F 7 938= *CIAWHYINT 00000201 F 7 889= CIA_RESET 0000494C F 26 405 F 48 7 1446 1454= F 53 302 CIX 00001800 F 14 234= 235e F 21 1176s 1178s 1180 1385s 1386s 1387s 1389s 1495 1541s 1543s 1590 1597s 1599s 1796 F 28 94s 95s 97s F 39 88 89 F 41 46 F 43 354 362s 363 371 423 494s 497s 499s 501s 529 629 702 763 1027s 1035s 1316a 1803 1889s 1946s 1950s 1952s 2013s 2018s 2209s 2286s 2292s 2704s 2705s 2707s 2709s 2854s 3144s 3145 3661s 3664s 3670s 3672s 3755s 3758s 4160s 4345 4568 4569 4686s 4801s 4816s 4826 4910s F 45 196 204s 205 207 262 275s 341s 344s 345s 358s 363s 366 424 579s 589s 591s 638s 640s 645s 947s 1035s 1043s 1051 1076s 1158s 1469s 1477s 1501s 1585s 1587s 1597s 1599s 1693s F 46 82 91 114s 221 222 225 233 235 259s 267s 268 270s 500 503 652s 658 691s 706s 743s 759s 863 921s 1203s 1204s 1239s 1252s 1267s 1274s 1275s 1277s 1368s 1379s 1384s 1407s 1408s 1409s F 48 157 216 249s 298s 303s 308s 313s 323s 1003s 1008s 1015s 1018s 1460s 1463s 1464s 1466s 1468s 1493 1507s 1509s F 51 62 110 117s 119 121 123 173 272s 321s 324s 327s 328s 339s 369s 389s 417s 424s 427s 429s F 53 497s 725s F 148 805s 806s 808s CKSUMLOOP 00002718 F 25 335= 337j CKSUMLOOP1 0000291E F 28 330= 342j CKSUMLOOP2 00002920 F 28 335= 337j CLEARLOOP 00000004 F 21 648= 653j CLEARVPAGE 00002FC2 F 33 636 726 728= 854 CLKPARMLEN 00000003 F 21 1022 1065= CLOCKPF 00001EDE F 19 35= F 21 1014s F 28 92 381 F 46 58 219 498 647 689 741 860 917 1179 F 148 800 CLPEND 00002051 F 21 182j 191= CLRERRPROC 00002A6B F 28 1057j 1064= CLRMEMTRAP 00005BD4 F 28 743 797 F 67 12 572 577= F 78 131 139 148 F 79 200 325 F 85 210 245 F 87 85 F 101 244 F 103 110 374 F 105 99 F 119 138 F 127 122 391 F 128 102 F 130 199 F 131 196 554 F 132 307 F 134 626 F 139 292 F 142 56 F 143 1954 F 145 75 185 CLRTBIT MACRO F 5 66= F 26 93 F 32 765 812 F 43 420 894 1017 1172 1178 1183 1697 1873 2500 2610 5048 F 51 172 195 245 267 269 280 290 381 F 75 397 F 105 66 72 CLRVPLOOP 00002FC5 F 33 733= 736j CMAPPSA 00000413 F 15 105= F 22 126 F 24 414s 479s F 28 1348 F 33 230 302 365 597 729 855s 888s 901 987 F 36 1812 CMBATCHJOB 00000210 F 18 430= F 50 722x F 131 472x 612s 721x 803x 1173x CMCHAR 0000003E F 18 417= F 92 127 144 CMCONCP 00000004 F 18 438= F 28 1142 F 131 1173x CMENTRYCD 000009C0 F 18 433= F 28 1141 F 50 722x F 131 472x 721x 803x 1173x CMERR 00001000 F 17 574= F 28 821 F 48 1320 F 123 477 F 125 475 1 Jimbo's CREF Extractor 2.0 VRM, System C9303 (18 Mar 93) 12-May-93 12:56 PAGE 12 F 130 508 840 F 131 1211 F 133 118 1047 CMERRB 00002610 F 17 573= 574e F 28 914 CMERRIDS 00000410 F 18 431= F 50 705s 722x F 131 472x 721x 803x 1173x CMERRINH 00000610 F 18 432= F 50 707s CMLOGI 00000003 F 18 437= F 131 472x CMLOGIO 00000002 F 18 436= F 131 721x CMNLOGI 00000001 F 18 435= F 131 803x CMNLOGIO 00000000 F 18 434= F 50 722x CMODECA 00001ECD F 18 416= F 28 1127 F 148 474s CMODEVP 00001ECC F 18 415= F 28 1095 F 148 456 458s CMSKAPPL 00000010 F 18 429= F 50 722x F 131 472x 721x 803x 1173x CNTLPKFLG 00094010 F 17 331= F 65 192 432s 449s CODEOK 000026D0 F 25 119j 123= CODEPART 00002CA0 F 17 578= 581e F 36 1824 1824 F 124 512 512 COMBRDBLK 00178806 F 21 1361= 1464s 1484 COMFRSTTRM 0016080B F 19 350= F 21 1538s F 48 1281 COMINBUF 00160806 F 19 345= F 21 1414s F 48 299 362 COMINBUFS 00160807 F 19 346= F 21 1417s F 48 304 COMLASTST 00160804 F 19 336= F 48 160s 309 1016 COMLINK 00160800 F 19 332= F 21 1381s COMLIST 00001F01 F 19 329= F 21 1380 1382s F 148 1230a COMLOG 00000005 F 19 353= F 21 1368 1373 COMMDEV 00002217 F 21 1225a 1354 1364= COMMON 00002647 F 24 720j 729= COMOPMSGID 00160803 F 19 335= F 53 294a COMOUTBUF 00160808 F 19 347= F 21 1408s F 48 957 982 1004 1009 1023 COMOUTBUFS 00160809 F 19 348= F 21 1410s F 48 958 COMPF 00160802 F 19 334= F 21 1376s F 48 161 319 1457 F 53 298 COMPNTR 00178801 F 26 397= 401s 403 408 COMPROT 00001F02 F 19 331= 353e 354a COMSTATE 00083085 F 19 339= F 21 1391s F 48 250 273 296s 312 320 1001s 1458 1470s COMSTDREAD 00000004 F 19 344= F 48 199 COMSTIDLE 00000000 F 19 340= F 21 1390 F 48 1469 COMSTKBITS 00178804 F 21 1359= 1443s 1450 1452a COMSTKBLK 00178803 F 21 1358= 1369s 1405 1441 1455 1492 1537 COMSTKTRM 00178805 F 21 1360= 1459s 1487 1501s COMSTREAD 00000001 F 19 341= F 48 294 313s COMSTWRIT2 00000003 F 19 343= F 48 1249 COMSTWRITE 00000002 F 19 342= F 48 999 COMTERMS 0016080C F 19 351= F 21 1456a F 48 390 972 1485 1526 COMTIMEOUT 00080215 F 19 338= F 26 409s 409 F 48 163s F 53 289s 289 COMTRMTMNG 0016080A F 19 349= F 48 802s 821s 961 1291s F 50 401s COMWORDC 00160805 F 19 337= 338e 339e COMWRU 00160801 F 19 333= F 21 1374s 1442 F 53 293 CONAREA 00000000 F 6 231= 274e 276a CONFIGCIA 00002819 F 26 290a 394 400= CONFIGDISK 000027F9 F 26 283a 294a 316 322= CONFIGLPC 00002809 F 26 284a 355 361= CONFIGMTC 00002823 F 26 291a 292a 293a 431 437= *CONFINFORD MACRO F 11 210= CONTINUE 00003186 F 35 545j 550= CPCUPC 00000414 F 15 108= F 21 1970s F 22 602 867 F 24 28 152 173 319 331 361 376 F 25 359 F 28 233s 251 506 551 643 667 932 973 989 1056 1065 1113 1165 F 29 877s F 35 190 252 290 483 537 604 610 826 829 835 922 947 963 1133 1140 1197 1201 1209 1 Jimbo's CREF Extractor 2.0 VRM, System C9303 (18 Mar 93) 12-May-93 12:56 PAGE 13 1273 1585 1635 F 36 59 217s 261 302 308 577 611 672 1334 F 38 184 F 55 1242s F 59 342 560 F 67 69 87 156 496 682 913 F 69 309 F 72 120 F 73 123 323 334 342 F 74 811 F 75 611 931 935 F 78 104 F 79 743 872 1189 1200 1461 1879 F 84 36 55 323 F 90 73 F 91 71 F 92 44 129 F 95 48 396 F 97 367 F 101 230 277 F 103 90 125 335 550 F 104 122 131 347 421 428 F 107 107 116 154 160 210 335 F 108 145 241 F 112 311 F 118 35 F 120 54 F 121 51 367 881 1119 F 123 152 174 190 197 200 355 413 696 1210 1637 1767 F 124 311 409 446 514 536 590 631 697 814 F 125 202 453 470 507 714 827 1006 1039 F 126 59 139 203 229 262 631 F 127 44 129 141 957 F 130 49 308 614 F 131 305 F 133 1042 1119 1155 F 134 204 250 630 699 786 F 135 122 F 136 134 185 F 141 355 CPP 00001000 F 6 34= F 7 1154e 1159e 1168e F 21 725 F 23 345x F 33 118 307 907 F 43 1315 3671 5197 F 55 608 F 80 162 F 81 79 F 82 130 206 289 467 586 F 83 54 219 227 F 90 80 83 F 91 101 142 166 F 92 95 332 457 F 93 59 178 F 100 756 781 848 F 101 670 F 137 437 F 141 514 685 F 142 285 682 F 143 237 513 1181 1220 1263 F 144 626 732 807 CPPSA 00000412 F 15 103= F 21 1969s F 22 102 185 276 613 639 888 1034 1087 F 24 27 86 F 25 422 F 26 39 F 27 128 133 139 176 184 F 28 198 234s 433 467 528 570 581 661 701 708 787 876 909 947 953 964 970 992 1051 1122 1152 1158 1497 1656 F 29 637 740 876s 1013 1070 1130 1514 F 31 63 160 F 32 61 818 F 35 234 742 1478 1522 1577 F 36 69 129 392 488 567 603 634 653 747 834 893 934 1106 1158 1177 1330 1400 1449 1567 1798 F 38 599 839 F 40 71 80 F 46 818 F 50 713 F 52 18 F 54 540 F 55 953 1200 1243s F 56 52 F 59 322 752 816 F 64 47 70 F 65 183 503 F 67 79 549 578 851 858 907 920 F 68 153 F 69 38 147 238 290 F 70 224 234 244 400 F 72 112 F 73 122 132 340 348 F 74 468 488 750 F 75 92 121 215 293 F 76 148 720 F 78 46 F 79 373 744 754 769 873 974 1600 1946 F 82 74 203 F 84 28 F 85 50 221 246 F 87 68 F 91 176 F 92 223 F 93 85 F 94 36 233 F 95 157 F 97 263 F 98 86 98 F 100 372 1501 F 101 398 510 535 803 F 102 109 133 180 435 F 103 217 F 104 198 203 359 370 378 422 429 F 105 83 F 107 123 176 227 447 459 564 F 108 59 805 F 118 30 71 F 119 141 F 120 97 F 121 65 157 216 250 273 372 1536 F 123 181 340 661 690 873 938 980 1743 1793 F 124 507 559 842 856 F 125 247 259 397 725 999 1014 1042 1115 1179 F 126 149 172 219 253 490 502 523 542 572 638 654 F 127 149 187 336 443 478 521 559 564 611 730 765 924 958 1006 1011 1067 1100 F 128 57 72 106 141 F 130 170 177 203 221 242 289 312 330 342 350 395 493 496 618 622 634 637 693 838 F 131 233 235 268 324 400 428 582 596 662 768 1081 1086 1098 1149 1201 1287 1371 1634 1900 F 132 143 180 234 F 133 181 253 360 1125 1305 1309 1315 F 134 633 F 135 372 532 596 633 660 726 746 786 872 893 931 944 985 1031 1050 1107 F 136 344 F 137 192 291 511 F 139 177 391 717 778 F 140 224 F 141 352 870 910 F 142 106 1026 F 143 694 1404 1890 F 144 456 963 F 148 122 CPU4 00000001 F 7 75= F 28 403 F 148 538 *CPUA 00000002 F 7 224= *CPUCCA 0000000A F 7 216= CPUCOFFSET 00030000 F 7 229= F 31 47x F 39 85 F 46 156x F 55 1163x CPUCOMLOCK 00001CF5 F 16 247= F 31 82s 84s F 33 792s 795s F 39 86s 91s F 46 147s 149s F 55 1150s 1159s CPUCOUNT 00001CF7 F 16 259= F 21 60s 422 701s F 26 167 F 28 398 F 31 77 F 39 43s 54 77 116 118s F 55 1202s 1213 1271 1273s F 144 1 Jimbo's CREF Extractor 2.0 VRM, System C9303 (18 Mar 93) 12-May-93 12:56 PAGE 14 135 934 1003 1024 F 148 533 1208 CPUCOUNT1 00001CF8 F 16 260= F 21 62s 703s F 31 97 165s 171s F 39 44s 119s F 55 1203s 1274s CPUCOUNT2 00001CF9 F 16 261= F 26 129s 166 170s 180 *CPUI 00000001 F 7 223= CPUIAPR 00000004 F 7 235= F 31 47x F 46 156x CPUINIT 00001CFA F 16 262= F 21 61s 702s F 28 51s CPULNTH 0000006B F 15 205= F 16 17a F 21 188 CPULOOP 00003880 F 39 78= 103j CPUMSR 00000009 F 7 215= F 39 88 *CPUOOFFSET 00020000 F 7 221= CPUPAGE 00000400 F 14 217= 218e 260a F 15 40a 205e F 21 726a CPUPC 00000008 F 7 214= F 39 89 CPUPFLOAD 00002FCB F 32 50 F 33 113 474 766 768= F 148 74 CPUPFOFSET 00010000 F 7 219= F 33 807e CPUPLINK 0008DF10 F 16 728= F 148 1137s CPUPLNTH 0016C801 F 16 730= F 55 1147a F 148 1126s *CPUPMS 00000004 F 7 226= CPUPPROTO 00001DA4 F 16 725= 733a CPUPREV 0016C000 F 16 726= 729e F 28 407 F 55 1141 F 148 1068 1135s CPUPROCNAM 00001DA2 F 16 723= F 28 413 CPUPSIZE 00000001 F 16 729= F 148 1119 *CPUPSR 00000000 F 7 222= CPUPSTRT 0016C802 F 16 731= F 148 1129a CPUPT 00000360 F 20 289= F 21 181 206s 672 724s CPUPTCHCMD 00000703 F 7 238= F 55 1163x *CPUQ 00000003 F 7 225= *CPUREG 00000000 F 7 213= CPUREGOFST 00000000 F 7 212= F 39 80 85 CPURUN 00000000 F 7 231= F 39 90s *CPUSCYCLE 00000002 F 7 233= CPUSLOTS 00001CFB F 16 264= F 21 66s 707s F 28 400 419 F 31 79 F 39 48 55 56s 57s 79 117s F 55 1207 1214 1215s 1216s 1272s F 144 936 1026 F 148 535 *CPUSSTEP 00000003 F 7 234= CPUSTOP 00000001 F 7 232= F 39 87s *CPUUCODELD 00000700 F 7 237= *CPUUS 00000005 F 7 227= CPW 00000004 F 6 31= 34e F 7 1159e F 8 1174 2205 2206 F 16 706 F 17 444e 619e F 19 595x 596x 597x 598x 600x F 21 217 498 518 521 1022 1409 1416 2124 2489 2511 F 24 432 F 28 739 1133 F 35 772 777 1282 F 36 324 F 43 1333 1341 1380 2706 3663 5180 F 48 1205 F 49 126 F 50 161 478 1276 F 55 88 611 980 987 989 992 1082 F 56 186 193 196 213 F 59 117 396 F 60 90 F 61 132 209 F 68 468 F 70 194e 427 485 F 75 32 912 F 78 120 F 79 47e 183 504 550 1194 F 84 63 276 276 281 281 283 283 F 86 41 F 95 73 109 F 97 378 F 103 106 321 346 F 107 308 F 110 377 558 560 F 113 120 162 243 282 F 115 143 324 350 443 456 656 F 119 120 479 F 120 59 72 230 F 121 249 1002 F 123 876 950 1313 1336 1351 1407 1459 F 124 402 F 125 991 F 127 99 713 938 1079 F 130 191 410 414 F 131 547 1656 1684 F 133 336 438 452 505 539 572 F 134 616 F 135 775 778 1105 F 136 272 286 F 137 411 432 F 139 142 288 413 419 451 F 141 507 521 696 706 F 142 180 219 278 290 311 328 418 521 559 676 688 850 866 F 143 242 250 506 591 737 872 888 1031 1831x 1832x 1833x 1834x 1835x 1943 2078 2121 2154 2259 2264 2282 F 144 600 627s 636s 650s 863 F 145 153 F 148 471 1012 1105 1128 2473e 1 Jimbo's CREF Extractor 2.0 VRM, System C9303 (18 Mar 93) 12-May-93 12:56 PAGE 15 CPXTRACA 0000044D F 15 140= F 21 1971s F 27 130s 185s CR 0000000D F 4 47= F 49 163 219x 223x F 50 271 320 819x 823x 830x 834x 1017 1170 F 85 143 540x 541x 544x 545x F 92 266 F 93 89 F 94 109 235 F 95 169 F 96 20 F 97 281 F 98 103 CRANDALL 00000000 F 8 5= 2642a CRAPADTBLK 0000385B F 38 1499= 1528j CRAVP 00002030 F 21 127= 163j CREATEUCE 00003635 F 37 9 226 234= F 50 672 691 F 75 926 F 79 738 867 F 104 416 423 F 107 661 F 126 166 F 127 952 F 131 653 F 141 349 CREATEVP 000030C9 F 35 6 73 78= F 101 218 F 107 367 F 125 196 F 126 48 CRUNCH 0000289D F 28 69j 89= CRUTEMP 00178801 F 37 229= 230e 231e CTCDEV 0000229D F 21 1227a 1623 1629= CTDIOSIZE 000047F8 F 7 1159= F 87 99x F 98 117x CTNAME 000022B2 F 21 1649 1655= CTULIST 00001F1E F 19 905= F 21 1648a F 75 279 F 140 107 F 148 1313a 1933 CURRPAGE 00178802 F 21 2410= 2434s 2436s CUSTNUM 00000100 F 8 1145= F 19 1156e F 134 99 130 F 138 120 122 F 139 560 562 CYCLE 000023B6 F 21 2441j 2444= DATEHORD 00082800 F 8 164= F 19 107a F 110 440 F 148 796s 845a DEADMAN 00004E5E F 21 1038a F 26 172 F 53 5 60 69= 74a DEADMANTMR 00001EF3 F 19 208= F 21 1040s F 26 145 F 53 76s DECIDLCNT 00002D38 F 30 100j 127j 132= DEL 0000007F F 4 52= F 50 259 1159 DELINKUERR 00002AA9 F 28 527 660 908 1196 1201= DELSWAP 00002596 F 22 469 F 24 80 85= F 35 365 *DEVBIT 00000200 F 7 599= DEVERPFE 000000E0 F 9 210= F 48 650 DEVERPIBO 000000E2 F 9 212= F 50 387 DEVERPPE 000000E1 F 9 211= F 48 653 DEVERTRE 000000E3 F 9 214= F 45 1095 DEVINFORD MACRO F 11 237= F 140 7 DEVJMPMAX 0000000C F 21 1183 1229= DEVJMPTAB 000021D5 F 21 1185 1216= 1229e DEVPTR 00001F10 F 19 313= F 26 261 F 41 52 F 53 159 DEVTYPE 00000080 F 19 312= F 21 1265 1378 1579 1634 1686 1738 F 26 250 F 41 50 F 53 157 DHALT 00040000 F 13 333= 573e 768e 769e 773e 778e DHALTPROTO 000026ED F 25 227 233= DIRACCESS 0008104C F 12 11= F 95 411s DIRACCOUNT 00160805 F 12 11= F 95 296s 320s DIRCREATD 00160804 F 12 11= F 95 358s DIRCUSE 0008050D F 12 11= F 95 370s 382s DIREINFO 00000000 F 12 11= 11e 11a DIRENTLEN 00160800 F 12 11= F 95 437s DIRENTWIDE 00000011 F 12 11= F 90 7 F 95 6 109 219 436 F 120 72 DIREXT 00160803 F 12 11= F 95 356s F 115 379s 383 DIRFBC 0008381C F 12 11= F 95 417s DIRFLAGS 00160801 F 12 11= 11e 11e 11e F 95 281s DIRFLOG 00083E1C F 12 11= F 95 409s DIRFOREIGN 00080211 F 12 11= F 95 287s 311s 1 Jimbo's CREF Extractor 2.0 VRM, System C9303 (18 Mar 93) 12-May-93 12:56 PAGE 16 DIRFWWSC 0008361C F 12 11= F 95 378s 389s DIRGHOST 00083A1C F 12 11= F 95 405s DIRHINFO 00000000 F 12 11a 11e 11= DIRHLNTH 00160800 F 12 11= F 95 300s DIRHWIDE 00000008 F 12 11= F 90 8 F 95 7 73 299 F 120 59 DIRINFORD MACRO F 10 60= F 12 11 DIRLACSD 00160805 F 12 11= F 95 360s DIRLBKUPD 00160807 F 12 11= F 95 364s DIRLMODD 00160806 F 12 11= F 95 362s DIRLOCKING 00001EAD F 17 37= F 59 748s 760s 770a 804s 819s *DIRLRAF 0008021D F 12 11= DIRMWACS 0008010A F 12 11= F 95 376s 385s DIRNAME 00160801 F 12 11= F 95 354s *DIRNETWORK 00080411 F 12 11= DIRNOBKUP 0008321C F 12 11= F 95 419s DIRPRGFLG 0008301C F 12 11= F 95 415s DIRPRGINT 00160032 F 12 11= F 95 413s DIRPROJECT 00160807 F 12 11= F 95 297s 321s DIRRACS 00080109 F 12 11= F 95 372s 383s DIRRAFTYPE 0008182C F 12 11= F 95 433s DIRRCVRD 0008341C F 12 11= F 95 421s DIRROOTBLK 0008118B F 12 11= F 95 403s DIRSERNO 0016080F F 12 11= 11e F 95 435s DIRSHADOW 00080011 F 12 11= F 95 289s DIRSYSTEM 00160804 F 12 11= F 95 263s DIRTFL 0008218A F 12 11= F 95 394s DIRTOTRACS 00080108 F 12 11= F 95 366s DIRTOTWACS 00082108 F 12 11= F 95 368s DIRTRANS 00083C1C F 12 11= F 95 407s DIRTYPE 00160030 F 12 11= F 95 425s *DIRUNITNM 00160810 F 12 11= DIRUSRFLD 0016080E F 12 11= F 95 423s DIRVOLUME 00160802 F 12 11= F 95 284s 319s DIRWACS 00082109 F 12 11= F 95 374s 384s DISC 00000004 F 36 1267x 1273= DISCARDPAL 00002E15 F 22 612 638 F 25 542 F 29 1253 F 32 6 116 131 328 334= F 35 233 1477 F 36 487 F 125 258 F 143 1889 DISCNTOK 00002E34 F 32 407j 411= DISKCOUNT 00001F1A F 19 851= F 42 50s 68s DISKDEV 000021E1 F 21 1218a 1253 1260= DISKDONE 00002214 F 21 1287j 1313= DISKLOW 0000368C F 38 259j 318= DISKRBUSY 00001F18 F 19 835= F 28 83 F 29 1020 1040 1586 F 42 76s F 43 2443s F 46 1303a F 141 163s DISKREND 00001F1B F 19 852= F 42 51 DISKWBUSY 00001F19 F 19 836= F 28 84 F 29 1222 F 32 635s F 43 2621s F 46 1315a F 55 637 DISMOUNT 00005034 F 32 489 F 54 8 35 276= F 55 466 822 F 57 180 F 59 159 449 476 F 61 703 F 75 888 DISPATCH 000028B7 F 22 458j 475j 675j 684j 717j 751j 773j 809j 832j F 25 486j F 26 188j F 28 6 52j 58j 185= 263j 270a 271a 272a 273a 274a 275a 276a 277a 278a 279a 280a 281a 282a 283a 284a 285a 286a 287a 316j 343j 354j 368j 383j 395j 434j 468j 486j 613j 1498j F 29 1091j 1134j F 32 297j F 36 1473j 1484j F 40 84j 108j 169j 195j F 43 385j 432j F 45 231j 292j F 46 163j 192j 192a F 48 324j 403j 931j 981j 1248j F 51 72j F 52 19j 23j 1 Jimbo's CREF Extractor 2.0 VRM, System C9303 (18 Mar 93) 12-May-93 12:56 PAGE 17 DISPATCHER F 28 4= 1669 DISPFIELD 00002CA0 F 6 150= F 25 250 251s 323 F 39 100 F 51 422 517s F 55 1155s F 75 229s F 78 114 119 F 110 556 DISPLIT 000028EF F 28 199j 247= 583j DISPMVP 00002993 F 28 553j 555= DISPPC 00000008 F 28 734s F 123 6 F 124 392 F 125 752 784= DISPPSR 00000009 F 28 738s F 123 7 F 124 395 F 125 753 785= DLOCKLIST 00001EC9 F 17 480= F 76 378 380s 416 603 612a DLOCKLOCK 00001EC8 F 17 479= F 76 354a 361a 481a 486a 518a 594a 624a F 102 287a 292a 319a 397a 403a 429a DMNTBUSY 00001D8C F 16 623= F 55 909s DMNTLINK 00081F10 F 16 630= F 55 886 DMNTLIST 00001D8B F 16 622= F 55 884 887s DMNTLOCK 00001D8A F 16 621= F 28 1464a F 54 291a F 55 883s 888s 910s DMNTLOG 00000001 F 16 633= F 54 287 F 55 892 DMNTPROTO 00001D91 F 16 628= 633e 634a DMNTSTRT 00005221 F 16 625a F 55 6 873 877= DMNTVOLN 00160801 F 16 631= F 54 290s F 55 889 DMNTWORDA 00160800 F 16 629= 630e DMOTEENTR 000030E7 F 35 188= 438j DMOTEFLAG 00000010 F 35 167= 187s 229s 232j 249j 437s DMOTEPAGE 00003159 F 35 7 157 435= F 101 201 210 F 126 47 DMOTESHARE 0000315A F 35 436= 444j 449j 454j DMOTEWNDO1 0000315C F 35 8 158 442= 551 F 59 400 F 70 417 F 75 514 557 F 79 1882 F 81 142 F 82 67 222 F 83 88 495 658 767 961 F 89 61 76 F 91 203 F 92 222 F 93 83 230 F 95 152 F 100 645 802 1341 F 101 396 515 554 799 928 1098 1143 F 108 68 507 554 F 110 243 F 112 314 F 115 464 F 120 91 F 121 188 282 F 130 419 F 131 217 1842 F 142 460 544 563 992 F 143 642 742 1065 1544 DMOTEWNDO2 0000315F F 35 9 159 447= 552 F 79 516 633 831 1036 F 83 496 645 950 F 95 153 F 100 546 F 101 798 F 108 69 508 555 F 110 212 F 112 315 F 120 92 F 131 218 F 142 519 993 F 143 936 984 1627 1660 DMOTEWNDO3 00003162 F 35 10 160 452= DMOTINDPAL 00003165 F 22 642 F 35 11 475 481= F 36 180 505 F 72 108 DNOERRADR 000029A6 F 28 561j 564j 594= DNOPG 00002999 F 28 557j 562= DOACCTNG 00002AFD F 28 291a 1468= DOADD 0000258B F 24 30j 41= DOADT 00002B02 F 28 293a 1479= DOANYWAY 000032DC F 35 1467j 1470= DOANYWAY 000035A3 F 36 1823j 1832= DOCHKSUM 0000291D F 28 299a 326= DOCPULEND 0000294F F 28 404j 408j 429= DOCPULOOP 00002934 F 28 399= 430j DOCPUPATCH 00002931 F 28 289a 393= DODISMNT 00002AFB F 28 290a 1463= DODUPCHECK 00002E81 F 32 622j 629= DOERRLOG 00002B04 F 28 294a 1484= DOFREEFL 00002AFF F 28 292a 1473= DOFREEZE 0000292A F 28 259j 269a 366= DOFSX 0000291B F 28 298a 314= DOLASTCA 00002DF1 F 32 194j 212= DOMEM 00002084 F 21 312j 325= DOMONITOR 00002928 F 28 296a 352= 1 Jimbo's CREF Extractor 2.0 VRM, System C9303 (18 Mar 93) 12-May-93 12:56 PAGE 18 DOMTUNIT 000022E2 F 21 1647 1699 1752 1782 1790= DONECHECK 00003370 F 36 313j 319= DONEPPL 00002E1E F 32 329 369= 813 DONEPPLE 00002E37 F 32 406j 432= DONEPPLJ 00002E1F F 32 345j 370= DONESLOTS 0000209F F 21 370j 395= DOPSAERR 00002970 F 28 249j 495= DOSHUTRUN 00003538 F 36 1467j 1481= DOSSURST 0000292C F 28 297a 378= DOSTOPCPU 00002953 F 28 288a 444= 461j DOTAMPER 00002552 F 23 349= F 134 801 DOTBTI 00002551 F 23 348= F 59 332 F 65 488 F 67 428 431 688 F 73 57 F 107 487 F 123 433 F 131 1767 F 134 127 138 799 F 135 1180 F 139 720 DOTSYS 00002555 F 23 351= F 56 158 F 59 334 F 65 520 F 67 421 690 F 73 55 220 F 107 503 F 123 431 F 134 125 F 135 1182 DOUBLGOT 0000352B F 36 1462= 1478j DOUBLSTP 00003536 F 36 1459j 1476= DOUERR 00002974 F 28 498j 505= DOUPCERR 00002973 F 28 253j 501= DOVASPLIST 00002DC4 F 32 111= 117j DOVMLIST 00002DB1 F 32 73= 78j 87j DOWSXLIST 00002DCA F 32 126= 132j DOWVMLIST 00002DB6 F 32 75j 82= DPRUER 000029AF F 28 510j 623= DQUEONE 0000354F F 36 10 1622 1628= F 38 845 F 45 1903 F 46 72 277 F 51 197 383 F 59 810 F 60 314 333 F 61 696 F 76 155 258 F 84 191 208 F 94 111 208 F 100 923 F 127 615 1004 1098 DQUEONEL 00003559 F 36 1635= 1638j DQUEONENF 00003565 F 36 1636j 1657= DQUEONET 00178801 F 36 1625= 1631s 1650 DQUEONEXIT 00003563 F 36 1649= 1660j DQUETHIS 00003573 F 36 11 1694 1727 1732= F 48 1168 F 49 343 DROPCA 0000285A F 22 434 470 586 679 F 27 8 170 175= F 28 963 F 36 1521 F 40 79 107 DSETINTAD 0000299B F 28 559j 565= DSKLIM 00092187 F 8 1614= F 17 87e F 143 729 731s DSKSAVL 00090186 F 8 1612= F 17 85e F 143 726 728s DSKSPAM 000036A6 F 38 328a 351= DSKSPAML 00000028 F 38 329 352= DSKUSD 00091188 F 8 1615= F 17 88e F 134 249s F 143 590s 732s DSKWARN 00093186 F 8 1613= F 17 86e *DTYPECDR 0000000A F 12 13= *DTYPECODE 00000003 F 12 13= *DTYPECT 0000000D F 12 13= *DTYPEDIR 00000005 F 12 13= *DTYPELAST 00000010 F 12 13= *DTYPELP 0000000B F 12 13= *DTYPEMT 0000000C F 12 13= *DTYPENULL 00000006 F 12 13= *DTYPEPATH 00000004 F 12 13= *DTYPERAF 00000002 F 12 13= *DTYPESAF 00000001 F 12 13= *DTYPETASK 00000009 F 12 13= *DTYPETERM 00000007 F 12 13= *DTYPEUNDEF 00000000 F 12 13= 1 Jimbo's CREF Extractor 2.0 VRM, System C9303 (18 Mar 93) 12-May-93 12:56 PAGE 19 *DTYPEVOL 0000000E F 12 13= *DTYPEVT 0000000F F 12 13= DUALWPPL 00091810 F 16 1042= F 24 527 F 35 783s F 143 2080s DUALWRITE 000031A6 F 35 12 672 715= F 38 1361 F 58 98 F 61 549 F 142 1032 F 143 388 F 148 239 DVCTBFD 00000001 F 7 613= F 21 1265 F 43 220x DVCTCOMM 00000008 F 7 615= F 21 1378 DVCTCTC 0000000A F 7 617= F 21 1634 F 53 460x DVCTLPC 00000002 F 7 614= F 21 1579 F 53 406x DVCTMTC 00000009 F 7 616= F 21 1686 F 53 461x *DVCTSDC 0000000C F 7 619= DVCTVTC 0000000B F 7 618= F 21 1738 F 53 462x DVSNDISP 0000FA00 F 8 93= 95e F 56 143 144 F 107 488 504 F 131 1768 DVSNPART1 00000170 F 8 94= F 59 324 327 331 F 65 511 514 F 67 287 289 410 413 684 687 F 68 459 462 F 73 61 64 224 227 F 123 423 426 854 857 862 F 136 244 246 DVSNPART2 0000007D F 8 95= F 59 329 330 F 65 512 513 F 67 288 290 411 412 685 686 F 68 460 461 F 73 62 63 225 226 F 123 424 425 855 858 863 F 136 245 247 DWRUDD 00002080 F 7 623= F 21 1442 *DWRUMREV 00001080 F 7 621= DWRUTYPE 00000080 F 7 611= F 21 1182 F 43 219x 219x 220x F 53 405x 405x 406x 458x 458x 460x 461x 462x DYNBASE 00000100 F 16 377= F 34 257 F 144 873x DYNBITS 00001EC0 F 16 376= 377e F 34 266a F 144 873x 874x DYNBLOCK 00001D14 F 16 375= F 34 253 260s F 144 395 402s 857s DYNLINK 00000463 F 15 195= F 34 251s 263 266a DYNLINKPTR 000030C8 F 34 256 266= DYNMAX 00000400 F 16 378= F 34 258 F 144 401 863 866 DYNMON 000030BC F 34 6 31 113 121 191 249 251= DYNRET 000030C7 F 34 254j 262= DYNTEMP 00000464 F 15 196= F 34 255s 261 DYNWAIT 00001D0E F 16 297= F 34 252s F 46 1321a ECHOMCIA 00000001 F 19 425= F 49 823 F 103 608 *ECHOMOFF 00000000 F 19 424= ECHOMREAD 00000003 F 19 427= F 97 114 307 F 103 616 ECHOMSOFT 00000002 F 19 426= F 48 453 F 103 610 ECODE 00178801 F 28 1263= 1268s 1270 *EFBEGIN 00000000 F 16 675= EFCODE 00002E90 F 16 664e 675e 675e 675e 675= 675e 675e 675e 675e 675e 675e 675e 675e 675e 675e 675e 675e 675e 675e 675e 675e 675e 675e 675e 675e 675e 675e 675e 675e 675e 675e 675e 675e 675e 675e 675e 675e 675e 675e 675e 675e 675e 675e 675e 675e 675e 675e 675e 675e *EFDATE 00160801 F 16 675= EFEND 00000004 F 16 675= F 55 1078 EFERROR 00002C10 F 16 663e 675= 675e 675e 675e 675e 675e 675e 675e 675e 675e 675e 675e 675e 675e 675e 675e 675e 675e 675e 675e 675e 675e 675e 675e 675e 675e 675e 675e 675e 675e 675e 675e 675e 675e 675e 675e 675e 675e 675e 675e 675e 675e 675e 675e 675e 675e 675e 675e EFLEN 00002250 F 16 661e 675e 675e 675e 675e 675e 675e 675e 675e 675e 675e 675e 675e 675e 675e 675e 675e 675e 675e 675e 675e 675e 675e 675e 675e 675e 675e 675e 675e 675e 675e 675= 675e 675e 675e 675e 675e 675e 675e 675e 675e 675e 675e 675e 675e 675e 675e 675e 675e *EFLENGTH 00081F10 F 16 675= *EFPARAMS 00160803 F 16 675= 1 Jimbo's CREF Extractor 2.0 VRM, System C9303 (18 Mar 93) 12-May-93 12:56 PAGE 20 EFPROTO 00001D99 F 16 675a 675= *EFTYPE 000800F0 F 16 675= EFWORDA 00160800 F 16 675e 675= 675e ELPRESTART 00005241 F 16 653a F 55 7 938 952= ELSRCHER 000034F6 F 36 12 902 909 916 923 930 1324 1329= F 126 538 EMPTYERLIS 00003454 F 36 896j 935= EMPTYSLOTX 0000209B F 21 349j 359j 366= ENDCHECK 00002332 F 21 1932j 1937= ENDCPUSC 00002D0D F 29 1659j 1680= ENDLOOP 00002042 F 21 129j 131j 160= ENDOFLIST 00002BB8 F 29 822j 825= ENDOFRES 0000AD51 F 0 216= 217 228a F 25 273 F 28 341 ENDOFSYS 0000B7FF F 0 233= F 21 258 F 148 68 ENTRYFND 000026A0 F 24 848j 965= EQACCT 00174806 F 17 336= F 59 269 358 412 508 581a 698a F 65 100s F 68 456s 469a F 79 938 1526 1587 F 119 156 164a 247 435 600 F 130 192a 238 F 131 201a 270 567a 598 F 134 90 230 240a 278a 308a 514a 662 669a EQACCTPROJ 00174808 F 17 337= F 59 270 327 360 413 509 F 65 72s 103s 144 146s F 68 465s F 79 940 1534 1589 1598 1603s F 119 139 144s 167 250 437 602 F 130 240 F 131 272 600 1766 F 134 92 234 655 658s 673 EQACCTPW 00174809 F 17 338= F 65 106s F 79 409a 1524 F 119 182a 183s 395 610 F 131 206s 1794 1809 F 134 241a 243s EQELSIZE 00000005 F 17 335= F 79 183 F 119 120 F 121 1002 F 130 191 F 134 616 EQFILEEXT 0017480D F 17 340= F 65 73s 102 110s 148 150s 471s 490s F 79 400 931 987 1020 1580 1582s F 134 48e EQFILENM 0017480B F 17 339= F 65 99 108s 435s F 79 398 788 929 1540 F 125 1149a F 134 49e 50e EQFILEPW 0017480E F 17 341= F 65 105 109s 452s F 79 404a 1525 F 134 51e 52e EQSYSTEM 00174803 F 17 333= F 59 262 F 65 71s 104s 140 142s F 68 457s F 79 1528 1569 1574s F 119 150 171 393 604 F 134 651s EQTEMPLOG 00000004 F 17 343= F 65 66 70 F 68 476 F 79 1864 F 119 288 309 F 125 1121 1193 1202 F 130 183 187 212 246 255 F 131 139 559 564 674 700 F 134 325 569 728 737 EQTEMPPROT 00001EC4 F 17 329= 343e 344a EQVOLPW 00174804 F 17 334= F 65 107s F 79 1523 F 119 152 EQVOLUME 00174801 F 17 332= 335e F 59 265 552 F 65 101s F 79 184a 338a 853 1007 1522 F 119 121a 148 F 125 1176a F 134 164 533a 617a 644 649s 692 F 148 1890a EQWORDA 00174800 F 17 330= 331e F 119 196s 253 444 598 F 148 1890a ERERROR 00002C10 F 16 663= F 54 336j ERLCBFBI 00001236 F 16 675= F 44 67 ERLCBKFBI 00000E38 F 16 675= F 44 179 ERLCBLNK 00000E09 F 16 675= F 55 176 ERLCBOOT 00000C16 F 16 675= F 148 128 ERLCCIAE 00000A0E F 16 675= F 48 214 406 ERLCCIATO 0000060F F 16 675= F 53 297 ERLCCKFBI 00001237 F 16 675= F 44 164 ERLCCTLBAD 00000A28 F 16 675= F 53 732 ERLCCTLOK 00000829 F 16 675= F 53 711 ERLCDATBAD 00000A2A F 16 675= F 148 778 ERLCDCNT 00001021 F 16 675= F 43 3539 1 Jimbo's CREF Extractor 2.0 VRM, System C9303 (18 Mar 93) 12-May-93 12:56 PAGE 21 ERLCDE 00001A32 F 16 675= F 43 2727 4281 4444 ERLCDMOUNT 00000418 F 16 675= F 55 895 F 137 503 ERLCDNRDY 00000A3D F 16 675= F 43 4952 ERLCDSKID 00002830 F 16 675= F 43 3036 ERLCDSKRD 00000E3E F 16 675= F 43 3875 ERLCDSKRW 00000C3F F 16 675= F 43 3819 ERLCDSKTO 00000A10 F 16 675= F 53 348 ERLCEND 00000401 F 16 675= F 130 710 ERLCFSAF 0000060A F 16 675= F 55 163 ERLCFUD1 0000060B F 16 675= F 55 370 ERLCFUD2 0000060C F 16 675= F 55 439 ERLCLPERR 00000A23 F 16 675= F 51 253 ERLCLPTO 00000625 F 16 675= F 53 395 ERLCMOUNT 00001017 F 16 675= F 137 280 F 141 309 F 148 325 ERLCMPE 00000E19 F 16 675= F 25 470 ERLCMPED 00000A1A F 16 675= F 43 5080 ERLCMTCERR 0000122F F 16 675= F 45 956 1064 1489 1705 ERLCMTCTO 0000062E F 16 675= F 53 449 ERLCNOSUB 00000E3B F 16 675= F 57 463 ERLCNVMTIM 0000062B F 16 675= F 148 760 *ERLCODE 00002E90 F 16 664= ERLCPPUBAD 00000626 F 16 675= F 53 536 ERLCPPUBT 00000A0D F 16 675= F 48 232 ERLCPPUOK 00000427 F 16 675= F 53 621 ERLCPWFAIL 00000633 F 16 675= F 26 133 ERLCPWRUP 00000434 F 16 675= F 26 150 ERLCRDGCS 00000C39 F 16 675= F 43 2674 ERLCRMNT 0000081C F 16 675= F 43 4091 *ERLCSCSIDE 00001A41 F 16 675= *ERLCSCSIID 00003442 F 16 675= *ERLCSCSIRS 00002240 F 16 675= ERLCSMU 00000A35 F 16 675= F 53 251 ERLCSSUTO 00000611 F 16 675= F 28 380 ERLCSUB 00000E3A F 16 675= F 57 477 *ERLCTEXT 00000603 F 16 675= ERLCUNLOAD 00000631 F 16 675= F 43 4914 ERLCUNSUB 00000C3C F 16 675= F 57 616 ERLDATE 00160801 F 16 666= F 54 355s ERLFUNK 00000002 F 16 673= F 54 340 348s 350s 352 F 55 1000 1025 ERLLEN 00002250 F 16 661= F 54 339 346 F 55 999 1024 ERLLINK 00081F10 F 16 665= F 55 964 1001s ERLMAXLEN 0000000D F 16 675= F 55 987 ERLPARAMS 00160803 F 16 667= 673e ERLPROT 00001D99 F 16 658= 671a ERLTYPE 000800F0 F 16 660= F 54 353s F 55 999 1024 ERLWORDA 00160800 F 16 659= 660e 665e 673e ERRLOGBUSY 00001D93 F 16 651= F 55 1107s F 148 585s ERRLOGCNT 00001D98 F 16 656= F 46 1324a F 54 337s ERRLOGLIST 00001D92 F 16 650= F 28 86 F 55 962 965s 1105 F 130 741 ERRLOGLOCK 00001D91 F 16 649= F 28 1485a F 54 356a F 55 961s 966s 1075s 1104s 1108s 1116s F 148 584s 592s ERRORFILE MACRO F 11 295= F 16 675 ERRORLOG 00005048 F 25 469 F 26 132 149 F 28 379 F 43 2673 2726 3035 3538 3818 3874 4090 4280 4443 4913 4951 5079 F 44 66 163 178 F 45 955 1063 1488 1704 F 48 213 231 405 F 51 252 F 53 250 296 347 394 448 535 620 710 731 F 54 9 41 334= F 55 162 175 1 Jimbo's CREF Extractor 2.0 VRM, System C9303 (18 Mar 93) 12-May-93 12:56 PAGE 22 369 438 894 F 57 480 615 F 130 709 F 137 279 502 F 141 308 F 148 127 324 759 777 ETB 00000017 F 4 50= F 50 819x 823x F 97 268 *EVARCLEAR 00000360 F 20 271= EVENTLOCK 00168808 F 17 278= F 36 998s 1084s 1156s 1182s 1194s F 126 503s 510a 512s 539s *EWRUINFO 00000300 F 20 64= EXIT 00002385 F 21 2202j 2205= EXIT2 0000236B F 21 2106= 2127j FAKEMAPIN 00002618 F 24 528j 542= FBIACCT 00168805 F 8 780= F 38 639s 921s F 68 79s F 112 382s F 114 78s F 134 232s F 143 2516s FBIBLINK 00089182 F 8 749= F 38 638s 920s 967s 1097 F 55 149 171 F 68 72s F 82 447s 493 F 92 476 F 112 388s F 114 74s F 143 1176s 1485s FBICHECK 0000413F F 24 746 F 44 7 45 51= FBICKSUM 0016880A F 8 784= F 43 3814s 5058s 5189s F 44 162 FBICSMASK FFE00000 F 8 788= F 43 4515 F 44 147 FBIDA 00089181 F 8 747= F 35 784s F 43 1390s 3882 4518 5059 5185s F 44 152 F 61 85 F 68 82 F 114 84 F 134 221 F 141 670 F 143 349 2085s 2464 *FBIDEFFLAGS 00088221 F 8 746= FBIFLAGS 00088041 F 8 740= 741e 742e 744e 745e 746e FBIFLINK 00089180 F 8 738= F 38 637s 878s 918s 950s 1121s 1478 F 55 152 F 68 71s F 82 218 219s 428 457s 610 611s F 92 449 F 114 73s F 142 665 841 F 143 1155 1178s 1469 1483s FBIGMASK FFC00000 F 8 787= F 43 3811 5055 5186 FBILCD 00168803 F 8 777= F 43 5054s FBILNTH 0000000B F 8 7= 783 786e 787e 788e F 16 163e 163e 1081 F 20 172 192e F 21 2200 F 32 658 F 35 777 F 43 1333 1341 1380 3663 5180 F 55 611 F 137 411 432 F 141 507 521 696 706 F 142 278 290 676 688 850 866 F 143 242 250 265 506 1831x FBILOG 00000004 F 8 786= F 43 1326 1346 F 137 408 447 F 141 504 528 541 693 710 F 142 275 296 351 367 674 695 751 759 848 873 929 937 F 143 235 255 448 FBIMEMERR 00088611 F 8 745= F 43 5052s F 44 106 FBINOREWRIT 00088011 F 8 741= F 43 3808s FBINOSUB 00088411 F 8 744= F 43 5123 F 57 341 F 143 290s 327s 347s FBINOTMAP 0000260E F 24 521j 525= FBIPOINTRS 00001C80 F 14 239= F 16 159a FBIPROJ 00168807 F 8 781= F 68 77s F 112 380s F 114 80s F 134 236s F 143 2514s FBIRELBLK 00089184 F 8 779= F 61 88s F 68 81s F 112 386s F 114 83s F 143 2520s FBISERNO 00168808 F 8 782= F 68 74s F 110 521s F 112 384s F 114 75s 82s F 134 229s F 143 2293s 2518s FBITADT 00000007 F 8 759= F 38 632 684 915 1119 1477 FBITAFT 00000010 F 8 768= F 60 122 F 61 528 769 F 148 256 291 FBITASLB 00000011 F 8 769= F 55 352 F 79 525 F 119 414 654 F 120 183 F 142 431 F 143 609 788 FBITAUTLB 00000015 F 8 773= F 55 358 F 135 214 488 504 1203 F 142 450 F 143 631 819 FBITBOOT 00000003 F 8 755= F 137 405 423 F 142 272 F 143 216 FBITBTRX 00000002 F 8 754= F 43 1645 F 57 88 F 143 154 FBITCCB 00000013 F 8 771= F 55 206 545 690 F 68 646 F 74 805 F 75 548 845 F 83 408 F 93 222 F 100 498 F 101 378 508 532 711 873 1199 F 107 282 F 142 556 F 143 1026 1207 1523 F 148 432 1 Jimbo's CREF Extractor 2.0 VRM, System C9303 (18 Mar 93) 12-May-93 12:56 PAGE 23 FBITCODED 00000014 F 8 772= F 21 154 F 55 699 F 83 50 427 F 93 52 F 101 225 F 107 370 F 125 143 F 142 733 910 F 143 1215 1532 F 148 451 *FBITESTB 0000007E F 8 774= FBITFREE 0000007F F 8 775= F 22 400 F 38 632 F 43 5182 F 55 145 247 299 614 752 F 57 345 F 61 82 F 68 67 F 112 377 F 114 43 64 F 134 220 F 141 493 F 143 508 1171 2459 FBITFSLB 00000012 F 8 770= F 55 517 F 79 558 F 110 518 F 119 417 658 F 120 186 F 142 534 F 143 2174 FBITIDX 00000008 F 8 760= F 138 181 460 501 F 143 407 FBITLRAF 0000000D F 8 765= F 55 226 247 F 68 709 F 75 826x F 83 305 913 F 93 205 F 101 351 646 F 143 1290 1332 1605 1648 FBITPL 00000001 F 8 753= F 43 2937 FBITRAFD 0000000F F 8 767= F 55 702 F 75 824x F 81 77 129 F 83 46 423 757 F 91 273 F 93 48 F 101 221 700 F 125 146 F 142 729 906 F 143 1261 1362 1580 1681 FBITSAF 0000000C F 8 764= F 55 145 533 F 75 504 793 F 82 120 217 229 426 438 492 609 621 F 89 48 F 92 61 446 468 F 100 503 627 1335 F 112 377 F 142 664 840 F 143 1171 1481 FBITSEC 00000006 F 8 758= F 38 1295 F 43 3018 F 58 85 F 61 523 765 F 142 325 1024 F 143 345 FBITSRAF 0000000E F 8 766= F 55 192 235 700 F 68 679 723 F 75 825x F 83 317 404 603 F 93 218 F 101 375 652 659 F 143 1340 1353 1656 1670 FBITSUBS 00000005 F 8 757= F 43 1654 F 57 99 F 138 647 F 143 325 FBITSYS 0000000B F 8 763= F 22 400 409 569 579 F 35 226 316 F 125 132 F 141 495 F 143 312 335 357 492 1411 2032 FBITUDIR1 00000009 F 8 761= F 55 342 362 F 59 114 377 F 70 409 F 75 581 F 115 74 F 117 94 195 F 119 208 F 120 161 F 121 118 1391 F 130 403 F 131 1786 F 134 220 551 915 F 135 203 470 1191 F 142 414 F 143 768 2369 FBITUDIR2 0000000A F 8 762= F 55 392 425 431 F 95 138 F 113 226 263 268 F 115 316 435 449 598 609 623 748 F 117 233 FBITVL 00000004 F 8 756= F 43 2994 F 138 63 245 F 139 777 F 142 308 F 143 288 483 541 FBITYPE 00088080 F 8 734= F 38 916s F 43 3467 3792 5091 5124 5183s F 44 57 61 64 101s F 57 342 F 141 492 F 143 289s 326s 346s 2083s FBIWCHK 00088211 F 8 742= F 43 5094 F 143 291s 328s 348s FBIWORDA 00168800 F 8 731= 734e 738e 783 FBIWORDB 00168801 F 8 732= 740e 747e F 43 3727s 3744s FBIWORDC 00168802 F 8 733= 749e FBIWORDE 00168804 F 8 778= 779e FCABSIO 00096015 F 18 191= F 28 1298 F 36 575 1147 1959 F 50 764s F 79 1467s F 97 239 F 103 93 123 323 537 F 104 118 228 229s 230s F 108 97 404 F 123 762 F 127 946s F 131 1692s FCACCESS 00095835 F 18 190= F 36 786 848 F 50 762s F 69 65s F 74 336 618 1113s 1148 1151s F 75 107 154 341 1051s F 76 133 210 F 79 955s F 80 143 F 82 43 F 89 33 F 90 68 F 93 257 266 F 94 22 F 100 32 216 901 1323 F 101 30 169 274 594 630 858 1118 1186 F 103 197 866 F 104 106 390s 391s F 107 27 314 F 108 197s 252 257s 430s 556 816 F 110 62 306 423 433 F 115 132 F 123 764 F 127 723 F 131 1529 1555 F 141 341s F 143 994 1003 1019 FCANAME 00174807 F 18 224= F 79 939s F 95 312 F 118 87 F 123 1479 F 131 334 FCAPROJ 0017480D F 18 225= F 79 941s F 95 313 F 118 88 F 123 1481 F 131 335 1 Jimbo's CREF Extractor 2.0 VRM, System C9303 (18 Mar 93) 12-May-93 12:56 PAGE 24 FCBADDR 00099F11 F 37 231= 236s 242 FCBLOCK 00174801 F 18 170= 171e 172e F 68 66 645 678 708 722 F 72 115 F 73 201 F 74 804 F 75 659s 792 814 844 F 79 372s 983s F 80 170 F 81 76 128 F 82 119 199s 216 419 425 491 608 F 83 45 304 347 403 465 1055 1150 F 89 47 55s 90s F 91 81 220s 272 F 92 54 60 445 467 F 93 47 204 217 F 95 137 F 100 464 509 620 626 1328 1334 F 101 220 350 374 497 645 699 721 736 872 1198 F 104 384s 385s F 107 281 369 F 112 376 F 114 42 63 F 117 224 F 119 660 667s F 135 487 503 F 139 776 F 141 475 679 F 142 271 307 555 663 728 839 905 1023 1035 F 143 153 215 286 314s 323 337s 343 482 501 540 1011 1170 1206 1260 1331 1352 1496 1522 1647 1669 1897 1906 2084 2458 F 148 431 FCBPROT 00001ECB F 18 159= 236e 239a FCBUSYCNT 00094080 F 18 162= F 50 767s F 69 106s 115s 143 F 75 629s 915s F 79 730s 863s F 104 223 224s 225s 408s 409s F 107 318s 660s 701 F 112 143s F 123 1429 F 131 656s 1276 F 141 342s FCCBLK 00094148 F 18 212= F 82 63 405 435 601 622 F 92 439 F 112 385 F 143 1213s 1288s 1338s 1360s 1491 1500s 1528s 1603s 1654s 1677s 2519 FCCBYTE 000968C8 F 18 213= F 81 78 82 F 82 129 134 288 313 468 662 F 83 53 57 F 91 100 105 F 92 94 100 331 358 458 482 F 93 58 62 FCCMUNIT 00097A15 F 18 201= F 67 154 F 79 1464s F 92 121 F 104 233 234s 235s F 127 944s F 131 1689s FCCPP 00174808 F 18 211= 212e 213e F 68 647 653s 661 680 686s 696 710 724 731s 738s F 80 169 F 81 67 95 130 147 F 82 198s 295s 403 469s 518s 585 669 F 83 38 70 92 281 382 493s F 89 54s 89s F 91 80 91 116 133 165 219s F 92 53 81s 147s 287s 341s 437 460s 489s F 93 40 77 181s 194 233s 251 F 100 345s 366s 618 647 675s 701 744 754 767 779 798s 819 828 845 867s 1051 1060 1177 1238s 1248 1256s 1276s 1327 1387s F 101 121 454 791 801 805 812s F 142 699 701s 875 877s 977 FCCRT 00095615 F 18 189= F 79 880s FCDCBPTR 00095F16 F 18 215= F 36 788 842 1964 F 50 666s 687s 934 F 74 748 889s 908 932s 956s 1011 F 75 124s 143s 234s 296s 339 395 425 626s 867 F 76 266s F 83 322 440 1058 1119 1187 F 84 30 270 F 85 51 F 86 20 F 87 28 F 94 38 F 97 51 F 98 31 F 100 134 211 380 909 977 1037 1099 1163 1367 1499 1538 F 101 45 F 103 42 194 863 F 104 98 402s 405s F 105 51 F 123 775 F 127 975 F 131 615 1406 F 136 106 F 139 58 F 141 43 339s F 143 113 474 *FCDIRINUSE 00095C10 F 18 166= FCDRIVE 00094081 F 18 171= F 74 472 857 878 F 75 628s F 76 49 105 375 413 F 82 225 617 F 95 276 F 100 1445 F 108 500 813 F 110 511 F 115 723 F 119 412 499 F 120 181 F 123 1432 F 136 111 340 385 F 141 141 344s F 142 527 710 886 F 143 313 336 358 493 2033 F 148 1895s FCDSTATPLC 00002050 F 18 185= F 50 933s F 64 40s F 80 146 FCDYNSTAT 00094455 F 18 182= 183e 184e F 50 932 F 64 39 F 80 145 FCECHOLUN 00097484 F 18 180= F 91 178 F 92 236 F 104 47s 53s 59 FCEND 00095186 F 18 208= 215e 216e 217e F 74 1361 1363s 1395s 1415s F 75 509s F 82 668s F 100 1216 1234 1236s 1247s 1272 1274s F 143 1497s 2164s FCEPP 00174807 F 18 209= 224e F 74 1365 1367s 1378 1383s 1399s 1418s F 81 145 149s F 82 670s F 83 90 94s F 91 83 117 157 F 100 489s 746 764 766 775 793 1229 1237 1239s 1249s 1255 1275 1277s 1576 F 143 1492 1494 2162s FCFBD 00097815 F 18 199= F 112 85s 198 FCFEWSC 00096215 F 18 192= F 79 638s 1 Jimbo's CREF Extractor 2.0 VRM, System C9303 (18 Mar 93) 12-May-93 12:56 PAGE 25 FCFREEMEM 00002F8F F 33 6 576 582= F 75 967 F 79 1474 1854 F 112 188 289 F 127 840 1022 F 131 1658 F 141 383 F 148 1985 FCGETMEM 00002F0A F 33 7 209 216= F 50 753 F 69 56 F 75 908 F 127 1074 F 131 1679 F 148 1880 FCHTYPE 00096665 F 18 194= F 28 1301 F 36 783 840 1962 F 50 760s F 68 179 633 F 74 38 58 332 619 745 1356 1389 1409 F 75 280 464 753 919s 945s 1027 F 79 579s 847s 944s 997s 1051s F 80 58 F 81 54 F 83 47 258 405 424 F 89 27 F 90 85 108 F 91 59 F 93 49 219 F 95 273 290 307 F 100 100 207 263 317 430 519 961 1024 1085 1151 1208 1310 1433 1494 1534 1568 F 101 33 222 412 489 634 855 1183 F 103 36 190 859 F 104 25 99 387s 388s F 105 48 F 106 29 F 107 31 F 108 192 F 110 59 303 392 F 112 202 F 118 27 F 119 84 200 F 120 138 F 121 44 356 F 123 773 1013 1433 F 127 814 974 F 131 610 1407 1499 F 134 780 F 135 111 F 136 102 430 F 139 55 F 141 40 336s F 142 403 545 622 730 809 907 F 143 104 471 912 1123 1425 2160s 2348 FCJCDE 0017480F F 18 233= F 110 99s F 111 58s F 112 197s 219 226 F 113 88s 137 141 147 155 276 F 115 131 575s 582s 608 678 747 F 127 736s 1015 FCJCXH 0017480E F 18 232= F 36 657 F 110 98s 204 F 111 57s F 112 196s F 113 87s 132 174 213 319 F 115 236 472 487s 509s 512 576s 592s 622 672 F 127 733s 853 1013 FCLASTREAD 00094445 F 18 183= F 68 746s 752s F 81 165s F 82 72s 191s F 83 110s F 84 123s F 85 230s F 87 49s 51s F 89 63s F 91 68 75s 199s 209s 217s F 92 41 48s 73s 265s 285s F 93 88s 107s F 94 225 231s 270s F 95 167s F 96 18s F 97 275s F 98 51s F 100 167s 348s 367s 386s 571s 650s 797s 903 982s 984s 1043s 1103s 1119 1128s 1168s 1279s 1346s 1371s 1373s 1543s F 101 125s F 123 1423 F 142 636 654s 812 829s FCLIMITPTR 00095114 F 18 177= F 67 498 933 F 68 75 F 73 45 47 77 79 260 F 74 813 F 75 26 467 663s 756 955 F 79 369s 461 706 942s 976s 1288 1828 F 80 168 F 82 208 589 F 95 52 F 100 558 F 101 193 742 F 104 375s 376s F 106 32 F 107 440 456 F 108 466 476 F 110 83 318 332 F 111 47 F 112 170 285 F 113 265 F 114 76 94 F 115 626 F 117 68 83 236 341 F 118 31 51 79 F 119 177 198 333 467 504 517 F 120 30 119 197 F 121 47 54 363 503 519 552 597 613 616 649 696 712 715 748 1399 1497 1530 F 123 1440 F 131 326 347 F 134 783 852 859 870 910s F 135 116 196 361 654 748 930 F 136 433 465 F 142 406 567 582 591 F 143 578 587 643 656 665 692 735 829 861 1066 1091 1252 1275 1312 1590 1628 2026 2215 2315 2447 2512 F 148 1893s 1983 FCLINK 00095F10 F 18 168= F 50 769s F 69 149s 239 248 254s F 127 785 787 788 794s 795s 930 1083 F 131 1700s FCLOADPT 00094C15 F 18 184= F 50 765s F 68 663 F 75 630s F 77 79s 84s F 82 73s F 84 124s F 89 64s F 91 202s F 92 268s F 93 91s F 94 232s 274s F 95 59 171s F 96 19s F 97 289s F 100 137s 352s 387s 648s 791s 1347s 1544s F 101 122s 802s F 104 397s 398s F 123 1421 F 141 345s F 142 978s FCLOG 00000004 F 18 236= F 50 754 758 F 69 57 61 F 75 909 912 968 F 79 1475 1855 F 112 189 290 F 127 710 713 759 841 938 999 1023 1075 1079 1086 F 131 1651 1656 1659 1680 1684 1708 F 141 384 F 148 1881 1886 1986 FCLPBLK 00097182 F 18 175= F 68 639 671 F 74 795 F 75 508s 552s 645s 786 836 F 79 617s F 83 310s 362s 379 397 434 588 606s 652 679 681s 708s 922 986 1206 1213s F 93 208s 210 254 F 100 346 487s 508 517s 540 F 101 408 498 660 712 865 1190 F 107 275 F 110 408 F 142 549 F 143 1060s 1200 1293 1295s 1319 1457 1516 1608 1610s 1635 F 148 1 Jimbo's CREF Extractor 2.0 VRM, System C9303 (18 Mar 93) 12-May-93 12:56 PAGE 26 425 FCMABLK 00096183 F 18 176= F 68 668 F 79 612s F 83 297 916s 955 982 984s 1007s 1207 1214s F 93 197 F 100 488s 518s F 101 343 638 F 112 205 390s F 143 1012s 1163s 1177 1292s 1306 1325 1455 1458s 1477s 1482 1607s 1621 1641 FCMSBLK 00095181 F 18 172= F 68 49s 56s 68s 69 83s 640s 673s 694 703s 717s F 73 196s F 74 796s F 75 528s 644s 787s 812s 837s 947s F 79 575s F 82 456 486s 667 F 83 299s 321 384 398s 415s 439 524s 600 612s 680s 836 983s 1057s 1131 1205 1211s 1212s F 92 82s 148s 288s 453s 480s F 93 199s 211s 228s 234 242s 263 278s F 95 132s F 100 347s 486s 676s 743 818 866s 1235s 1246 1273s 1388s F 101 345s 369s 419 640s 650s 674 701s 715s 730s 866s 875s 1191s 1201s F 107 276s 366s F 112 368s F 135 223 476s F 139 771s F 141 467s 668s F 142 266s 302s 550s 650 666s 825 842s 974s 1018s 1043 F 143 148s 210s 281s 477s 496s 535s 1013s 1144 1157s 1162 1164s 1201s 1326s 1347s 1453 1471s 1476 1478s 1517s 1537 1642s 1664s 2035s F 148 426s FCNAME 0017480B F 18 220= 228e F 67 928 F 79 399s 528 877 F 95 80s 226s F 107 319 F 110 77s 81a 356s 427 632s F 113 61 76s 80a 102s 126s 409s F 115 174s 195s 226s 237 F 117 105 159 197 207 240 262 291 F 123 1436 F 143 2135 F 148 2069s FCNAMEEXT 0017480D F 18 221= 225e F 50 766s F 67 930 F 79 401s 855s 876 1009s 1040 F 95 81s 228s F 110 75s 358s 429 633s F 113 63 73s 127 411s F 115 175s 196s 228s 239 F 117 125 204 266 279 F 123 1438 F 143 2137 F 148 2068s FCOPWRITE 00097215 F 18 196= F 77 125s F 80 57s F 87 26s F 89 26s F 90 78s F 100 271s 429s 960s 1050s 1059s 1084s 1175s 1207s 1309s 1542s FCPRIV 00094E45 F 18 188= F 50 763s F 69 63s F 73 28 69s 89s 180 244 245s 327s F 74 35 808 1152 F 75 1032 F 79 385s 561 980s F 95 214 268 F 101 978 1124 F 104 380s 381s F 108 40 F 111 35 F 112 83 F 113 58 F 118 37 54 F 119 90 99 F 120 151 F 121 56 359 1348 F 127 693 726s F 131 315 351 F 141 338s FCPWORD 0017480E F 18 231= 232e 233e F 73 240 F 79 410s 463s 546s FCQUEUEID 00097CA5 F 18 202= F 70 385 F 79 1227s FCRAFTYPE 00095826 F 18 217= F 74 872 F 75 530s 554s 809 815 841 F 79 588s F 83 208 615s 763s 888 919s 1189 1194s F 93 165 F 100 460 491s F 110 401 F 143 1235 1309s 1556 1576s 1624s FCRELOC 00095A10 F 18 165= F 80 167s F 81 86 F 82 138 F 83 61 F 84 93 F 86 57 F 90 96s F 91 124 187 F 92 167 243 F 93 65 F 94 56 F 95 258 349 F 120 29s 233 F 143 68s 223 1149 1463 1946 1991 FCREQUEST 00095040 F 18 163= F 79 167s 289s 660 662s 688 725 813 835 860 947 949s 952 954 1014 1197 1296 F 90 77s F 91 63s F 119 102s 195 FCRESEEK 00095C16 F 18 216= F 74 794s F 75 529s 559s F 81 163s F 83 108s 278 494s 527s 592s 905s 1197s F 91 226s F 93 105s 114s 183s 191 235s 277s F 100 365s 458s 1257s F 101 338s 633s 800s 813s 912s 1207s F 107 274s 365s F 148 433s FCSAVED 00096415 F 18 193= F 68 182 F 74 45 330 F 79 643s F 83 631 768 938 1136 F 100 469 492 531 F 101 678 F 102 39 F 108 42 408 F 110 57 301 327 437s 563s F 111 30 F 112 173 F 113 53 F 115 173s 197s F 119 92 F 120 70 141 F 142 509 FCSERIAL 00174809 F 18 219= F 50 668s 670s 683s 686s F 68 73 F 70 397a F 74 473a 856 876 F 75 84 209 288 499s 526s 543s 584s 610s 643s 661s 662s 1041s F 76 42 52 103 373 412 F 79 640s 1286 F 104 394s 395s F 108 499 562 568 810 F 110 425 440 520 F 112 216 271 327 383 F 117 168 304 F 131 253 866a F 143 980s 2139 2295s 2517 F 148 1 Jimbo's CREF Extractor 2.0 VRM, System C9303 (18 Mar 93) 12-May-93 12:56 PAGE 27 2027s 2028s 2114 2177 2202 2214 FCSPOOLED 00097415 F 18 197= F 70 379 F 79 1217s F 111 34 F 112 82 F 113 57 F 119 89 FCSRCHSN 00097214 F 18 178= F 117 67s 74s 80s 98 238 FCSTATSTAT 00094F25 F 18 187= 188e 189e 190e 191e 192e 193e 194e F 79 755 F 100 125 143 F 123 1425 FCTFL 00094182 F 18 174= F 74 1338s 1339s 1342s 1348s 1354 1375 1377s 1408s F 75 511s 527s 558s 788 806 838 946s F 79 465s F 82 65s 202s 463s 587 600 624s F 83 327s 363s 445s 479s 607s 764s 917s 1050s 1138s F 100 555 563s F 101 702s 741s F 110 84 319 412 F 115 176 F 143 2036s 2163s 2465s FCTRANS 00097615 F 18 198= F 79 642s F 108 597s 610 F 112 200 F 123 1427 FCVNAME 0017480B F 18 228= F 75 617 F 79 854s 1008s FCWORDA 00174800 F 18 161= 162e 163e 165e 166e 168e FDACCESSES 0016C80C F 8 1847= F 108 501 F 112 218 F 143 2143s *FDACSAO 00000002 F 8 1789= *FDACSLK 0008D040 F 8 1780= FDACSMW 00000004 F 8 1791= F 117 141 *FDACSNWB 00003E10 F 8 1792= *FDACSRO 00000001 F 8 1788= FDACSRW 00000000 F 8 1787= F 108 271 F 110 431 F 117 143 F 148 1860 *FDACSXO 00000003 F 8 1790= FDATE 00001EE5 F 19 106= 107a F 25 450 F 36 675 F 39 159 F 43 2291 F 46 229 231s 253a 499 501 506 508s 515 538 541 596 601s 794 1344 F 126 644 F 148 809 819s FDATEDRFT 00001EEE F 19 156= F 38 1356 F 46 738 F 58 93 F 133 923 928s 935 969 F 148 839s FDATELOCK 00001EE8 F 19 108= F 46 496s 510s 595s 603s FDATEPTR 00001EE7 F 19 107= F 43 5053 F 46 556 559 F 57 312 F 110 385 F 123 1612 F 139 338 F 148 768 771 780 FDATERROR 00001EED F 19 155= F 38 1354 F 46 686 692s 707s 1382 F 58 91 F 133 883s 887 896 968 F 148 832s FDCREDAT 0016C80F F 8 1854= F 95 357 F 110 441s 484 485s FDCUSE 0008C101 F 8 1830= F 79 492s 726s F 95 369 F 108 238 F 110 436s F 111 59 F 112 230s F 143 2133 2134s FDDA 0008D185 F 8 1835= F 55 548 F 79 574 F 83 653s 837s 956s F 95 399 429 F 100 479s 541s F 101 689s F 110 410s F 143 1062s 1307s 1622s 2142s FDEND 0016C811 F 8 1856= F 74 1362s 1394 1396s 1414 F 143 2147s FDEPP 0016C810 F 8 1855= F 74 1366s 1380 1382s 1398 1400s 1417 F 143 2161 FDEPROT 000007BC F 8 1775= 1860e FDET 0008EA60 F 8 1801= F 55 519 F 79 578 F 95 424 F 110 393s F 143 949 2159 F 148 2115s FDEXTEN 0016C804 F 8 1833= F 95 227 355 F 110 186 357 430s F 113 128s 167 247 291 F 115 227 328 462 640 F 117 126 280 F 143 2138s FDFBD 0008DE10 F 8 1793= F 79 456 F 95 416 F 110 359 489s F 112 199s 237 F 117 130 283 FDFLOG 0008FA10 F 8 1823= F 79 704 F 95 408 F 108 85s F 110 490s 492s F 111 62 F 112 220 250 FDFWWSC 0008E610 F 8 1799= F 79 484s 637 F 95 377 F 108 78s F 148 2039s FDGHOST 0008F610 F 8 1821= F 95 404 F 108 81s F 143 2141s FDLACC 0016C808 F 8 1842= F 74 1283s 1285s F 95 359 F 108 162a F 110 387s 1 Jimbo's CREF Extractor 2.0 VRM, System C9303 (18 Mar 93) 12-May-93 12:56 PAGE 28 FDLBU 0016C809 F 8 1843= F 95 363 F 108 143a F 110 388s 486 487s FDLCD 0016C807 F 8 1841= F 74 1282s 1284s 1286s F 95 361 F 108 157a F 110 386s F 112 213 F 131 214 861 FDLEN 0008D186 F 8 1838= F 74 1347 1355s 1376s F 79 464 F 83 654s 840s 957s F 95 393 F 100 480s 542s F 101 690s F 110 224 F 143 938 2145s FDLNTH 00000018 F 8 1860= 2211e 2212e 2223e 2234e 2238e F 55 561 F 95 105 F 110 115 151 170a 178 377 469 471 478 479s 484 486 488 509 555 560 F 113 116 120 142 153 162 184 238 243 282 296 349 F 115 137 143 220 324 443 455a 456 636 805 F 117 113 174 248 310 F 142 521 F 143 1833x 2118 2121 2154 2167 2208 FDLRAF 0008E810 F 8 1800= F 79 601s F 143 2144s FDMWACS 0008E2FC F 8 1850= F 74 400 412 421 1236s 1253s F 79 482 491s F 95 375 387 F 108 264s F 110 451s FDNAME 0016C802 F 8 1832= F 95 225 353 F 110 184 355 428s F 113 125s 164 245 289 F 115 225 326 460 638 F 117 109 244 F 143 2136s FDNBU 0008E010 F 8 1794= F 95 418 F 108 77s FDPRIV 0008D830 F 8 1786= F 74 47 F 95 410 F 108 242 273s F 110 432s F 117 140 144s FDPURG 0008E410 F 8 1796= F 79 635 F 95 414 FDPURGE 0016C018 F 8 1836= F 95 412 F 108 124s F 110 390s FDRACS 0008C10C F 8 1848= F 74 384 408 428 437 454 1233s 1235s 1250s 1252s F 79 489s F 95 371 F 108 262s F 110 448s 450s FDRAFTYPE 0008FC20 F 8 1824= F 55 538 F 79 587 607s F 83 651s 839s 954s F 95 427 F 100 482s F 110 402s F 143 1310s 1625s 2146s FDRFB 0008E210 F 8 1795= F 95 420 *FDRTYPAEOD 0000000B F 12 13= *FDRTYPBIN 00000002 F 12 13= *FDRTYPCOMM 00000005 F 12 13= *FDRTYPEOD 00000009 F 12 13= *FDRTYPEODB 00003E10 F 12 13= *FDRTYPFM 00000008 F 12 13= *FDRTYPLBL 00000004 F 12 13= *FDRTYPSYSB 00003810 F 12 13= *FDRTYPTEXT 00000000 F 12 13= *FDRTYPTXTF 00000001 F 12 13= FDRUSE 0008C10D F 8 1851= F 74 1267s 1269s F 95 365 FDSERNO 0016C80A F 8 1844= F 79 639 F 95 434 F 110 426s F 117 172 308 F 143 950 2140s F 148 2116s FDSHL 0016C814 F 8 1858= F 55 514 F 79 549a F 110 471 478 479s 480s 509 F 115 135 F 119 221a F 120 167a F 142 525 F 143 941a 2150a 2185s FDSTART 0016C800 F 8 1776= 1857 *FDSTATAERR 00000010 F 12 13= FDSTATERR 00002AB0 F 12 13= F 55 1045 F 56 249 F 64 44 51 F 79 909 1241 1370 FDSTATLP 00002810 F 12 13= F 18 185e F 50 937s FDSTATLUN 00000880 F 12 13= F 50 943s F 64 42s FDSTATRTYP 00002040 F 12 13= F 18 185e F 82 46j 47j F 85 229s F 89 38j 39j FDSUN 0016C000 F 8 1779= F 79 451 480s F 95 380 F 110 383s F 117 132 285 F 143 2149s FDTRANS 0008F810 F 8 1822= F 79 641 F 95 406 F 108 84s F 112 201s FDUSRFLD 0016C80E F 8 1853= F 95 422 F 108 79s F 110 469 470s FDWACS 0008E01C F 8 1849= F 74 392 410 419 430 439 447 1232s 1234s 1249s 1251s F 79 481 490s F 95 373 386 F 108 263s F 110 447s 449s F 148 2040s FDWUSE 0008E10D F 8 1852= F 74 1266s 1268s 1270s F 95 367 1 Jimbo's CREF Extractor 2.0 VRM, System C9303 (18 Mar 93) 12-May-93 12:56 PAGE 29 FF 0000000C F 4 46= F 49 219x 223x F 50 1027 F 85 153 542x 544x FFBLOCK 00160801 F 16 565= 566e 567e F 54 82s F 55 102 144 164 177 225 234 246 276 296 341 371 391 424 440 558 686 758 FFCPCBUSY 00170802 F 16 526= F 54 153s FFCPCLIST 00170801 F 16 525= F 54 117 119s 143a FFCPCLOCK 00170800 F 16 524= F 54 116s 141s 163s FFCPCNAME 00170803 F 16 527= F 28 1491 FFCPCPC 00170805 F 16 528= F 28 1492 FFCPCPROC 00170806 F 16 529= F 54 158 FFCPCPROT 00001D7A F 16 523= 531a FFDRIVE 00080081 F 16 566= F 54 94 FFLINK 00081F10 F 16 564= F 54 118s F 55 68 FFLIST 00001D7B F 16 552= F 55 66 69s F 130 836 FFLISTSIZ 00001D81 F 16 558= F 54 109s 177 F 55 70s FFLNTH 00000003 F 16 570= 571e F 55 29 88 FFLOCK 00001D7A F 16 551= F 28 1475a F 54 110a 151a F 55 65s 71s 485s FFLOG 00000002 F 16 571= F 54 79 F 55 92 FFMSBLK 00081181 F 16 567= F 55 138 146 153s 193 207 219 232s 241s 389s 549s 680s 753s FFPRESTART 000050B5 F 16 555a F 55 8 16 54 58= FFPROCS 00001D82 F 16 559= F 28 1474s F 54 180 182 F 55 484s FFPROT 00001D83 F 16 561= 570e 572a FFTUNKNOWN 00000000 F 16 576= F 38 1104 F 57 613 F 61 466 F 83 348 466 1056 1151 F 101 737 F 113 336 341 F 115 167 513 673 679 727 F 119 503 FFTYPE 00080080 F 16 563= F 54 83s F 55 95 297 FFVOLBPTR 00160802 F 16 568= F 54 98s F 55 464s 467 FFWORDA 00160800 F 16 562= 563e 564e FGTHVNUM 00003022 F 33 938j 942= FGTPNLP 0000301F F 33 936= 939j FHALT 00060000 F 13 334= 619e 622e 765e FILAEOD 0000000B F 8 2362= F 81 164 F 82 190 F 83 109 F 91 216 F 92 284 F 93 106 F 100 570 1127 1278 FILAEODB 00003C10 F 8 2356= 2362e FILEINFOT 000000F0 F 12 15= F 142 49s F 143 1961 FILEINFOTA 00000001 F 12 15= F 142 461 F 143 2353 FILEINFOTD 00000003 F 12 15= F 142 702 F 143 1116 FILEINFOTF 00000002 F 12 15= F 142 569 F 143 916 FILEINFOTM 00000004 F 12 15= F 142 878 F 143 1418 FILEINFOTV 00000000 F 12 15= F 142 334 F 143 108 FILEODB 00003E10 F 8 2355= 2361e 2362e F 82 47j F 89 39j F 91 70j F 92 43j 69j 338j 367j F 94 228j F 100 905j 1224j F 142 636 812 FILEOF 00000008 F 8 2360= F 84 285 F 92 153 F 94 48 F 97 273 F 98 50 F 100 981 1042 1102 1167 1336 1370 FILESTAT MACRO F 10 143= F 12 13 FILESUN 00101EFD F 19 272= F 79 450 F 95 379 F 117 133 286 F 143 2148 FILESUNP 00001EFD F 19 271= 272e FILEWAITL 00001D0F F 16 311= F 74 479s 521s 535s F 79 1295s 1315a 1326s F 108 552s 573a 578s 702s 762s FILNEOD 00000009 F 8 2361= F 68 745 F 75 512 F 77 86 F 82 71 665 F 85 228 F 91 208 F 92 160 F 94 230 F 95 163 F 96 17 F 100 795 1345 F 142 653 828 FILREODB 00003A10 F 8 2357= F 91 74j 75s F 92 47j 48s 1 Jimbo's CREF Extractor 2.0 VRM, System C9303 (18 Mar 93) 12-May-93 12:56 PAGE 30 FILRLEN 00001B30 F 8 2350= F 72 14e F 89 56 F 100 657 FILSFLAGB 00003810 F 8 2359= 2360e 2361e 2362e F 82 46j F 89 38j F 91 69j F 92 42j 68j 337j 366j F 94 226j F 100 638j 904j 1112j 1120j 1181j 1223j FILTYPE 00001040 F 8 2343= F 72 13e F 75 512 F 82 665 F 92 68j 69j 71 337j 338j 366j 367j F 100 638j 649 1112j 1181j 1223j 1224j 1336 FINDPAL 0000330C F 35 13 204 726 958 1626 1631= F 125 256 F 143 1882 FINDPATH 00003427 F 36 606 828 833= FINDPCB 00002DD5 F 32 145= 154j FINDPCBX 00002DD9 F 32 142j 148j 152= FINDPEXIT 00003319 F 35 1640j 1650= FINDPPAGE 00002D0E F 30 14 42 47= F 43 1291 FINDRESPAG 000024ED F 22 750 808 936 942= FINDSESSNM 00003627 F 37 182= 185j FINDTERM 00003416 F 36 570 774 779= FINDTERMCB 000035C5 F 36 13 391 1950 1955= F 67 767 F 126 489 571 F 130 176 F 133 180 1308 FINDTRAP 000029BA F 28 637j 642= 870j FINDUCE 000035BB F 36 14 1291 1917 1919= F 125 135 F 126 127 F 131 1633 FINDUS 00003876 F 39 47= 50j FINDVP 0000265F F 22 186 277 F 24 815 822= F 32 745 F 125 249 F 143 1405 FINDVPPSA 00178801 F 24 818= 824s 901 922 FINISH 000027BD F 26 173j 184= FIRSTERROR 000029B6 F 28 627j 634= 828j FIRSTMT 000022F7 F 21 1809j 1812= FIRSTPART 4C000000 F 16 875= 879x FIXRES 00002701 F 25 274j 307= FIXRES1 00002704 F 25 309j 314= FIXRES2 00002715 F 25 327j 331= FIXSKVARS 00002CFD F 29 1553 1558 1653 1658= FLACCTNG 00000016 F 16 696x F 28 7 291= F 148 596 FLADT 00000018 F 16 596x F 28 8 293= F 148 578 FLAGJTB 000028FB F 28 264 267= FLAGOK 000026CD F 25 113j 117= FLAGS 00001CF6 F 16 256= F 21 165s 427s F 25 315 F 26 161s F 28 133s 196 262s F 30 256s F 31 55s 129s 166a F 32 616s F 33 1042s 1237s F 42 80s F 43 3248s 3399s F 54 159s F 58 156s F 77 38s F 141 152s F 144 172s 1060s 1157s F 148 548s 572s 579s 588s 597s FLCHKSUM 0000001E F 21 164 F 25 316j F 28 9 299= FLDABSPG 000014C0 F 6 151= F 21 1009 F 25 249s F 39 80 85 85 F 43 2701s 3659s 3668s F 46 257s F 48 300 1005 1415s F 51 516s F 55 1154s F 75 228s F 78 115s FLDADRS 00001F10 F 6 36= 40e F 16 564e 600e 630e 665e 705e 797x 801x 805x 810x 814x 818x 822x 826x 832x 837x 841x 846x 851x 855x 859x 863x 866x F 17 35x 38x 54e 68e 113x 298e 403e 411e 582e F 18 33e 131e 168e 383e 400x F 19 26e 313e 403x 532e 669x 683e 816e 1264e 1304x F 21 1152 F 28 524 626 724 824 826s 1206 F 30 232 F 32 219 222s 262 265s 344 F 33 117 306 442 604 906 F 35 980 1059 1084s F 36 895 995 F 37 231e 280s F 43 949 1286s 1303s 3195s 3723s F 46 1106e F 54 138s 144 145s F 67 62 121 F 78 132 F 79 182 1327 F 87 35 F 95 49 F 101 1059a F 103 107 320 345 F 108 750 F 119 119 F 120 26 F 123 682 F 124 391 F 125 905s 994s 995s 1017s 1021s 1181 F 127 848 F 134 615 F 136 115 F 141 498 1 Jimbo's CREF Extractor 2.0 VRM, System C9303 (18 Mar 93) 12-May-93 12:56 PAGE 31 *FLDBITS 00001F60 F 6 42= FLDCHARS 00001F30 F 6 41= F 38 339 340 F 43 2132 2133 4992 4993 F 48 484s 1010 1011 1123s 1220s 1225s F 53 569 570 790 791 891 892 F 65 279s 302s 352s 448s 455s 469s 475s 507s 516s 566s F 70 254 255 262 263 F 79 1093 1094 1674s 1733s 1734s F 81 83 F 82 135 291 314 663 F 83 58 F 84 152s F 91 106 F 92 101 134s 334 359 F 93 63 F 97 90s F 100 758 831 F 113 157 236 241 278 287 F 115 140 612 629 654 760 F 119 476 F 127 164 165 F 131 292 293 F 136 287s F 140 250 F 145 164 F 148 1697 1698 *FLDDEFS MACRO F 10 225= FLDISMNT 00000015 F 16 626x F 28 10 290= FLDMODE 00001450 F 6 39= 40e F 65 201s FLDMODEADR 00001560 F 6 40= F 125 996 FLDPAGE 00001E70 F 6 37= F 21 2443 2488 F 25 271 273 332 333 F 28 338 339s F 39 99 F 43 2698 *FLDRELOCB 00001C10 F 6 35= FLERRLOG 00000019 F 16 654x F 28 11 294= F 148 587 FLFREEFL 00000017 F 16 556x F 28 12 292= F 148 571 FLFREEZE 00000000 F 28 13 269= F 31 54 128 168 FLFSX 0000001D F 21 426 F 28 14 298= F 30 255 F 33 1041 1236 F 144 1156 FLMONITOR 0000001B F 28 15 296= F 144 171 FLMSPROC 0000001F F 28 16 300= F 30 255 F 32 615 F 42 79 F 43 3247 3398 F 58 155 F 141 151 FLMTPROC 0000001A F 28 17 295= F 77 37 FLPCPU 00000014 F 26 160 F 28 18 289= F 148 547 FLSSURST 0000001C F 28 132 297= FLSTOPCPU 00000013 F 28 19 288= F 144 1059 FLUKE 0000274F F 25 166j 204j 230j 254j 432= FLUKE1 00002751 F 25 343j 446= FLUSHUERRS 00002E05 F 32 257j 261= 269j FNDEXIT 0000269F F 24 955= 966j FNDINDPROC 000026A1 F 24 876j 978= FNDPCBFRST 00002DDF F 32 156j 161= FNDPCBNFST 00002DE0 F 32 158j 163= FNDRMSWL 00002686 F 24 908j 910= FNDSWL 00002669 F 24 840j 842= FNDVPBRO 00002679 F 24 881= 885j FNDVPFPN 0000045E F 15 184= F 22 244s 426 430s 473 561 572s 603 682 715 887 1033 1092 F 24 825s 899 FNDVPLOOP 00002674 F 24 873= 878j 883j FNDVPLPSA 0000045D F 15 183= F 22 396 562 573s F 24 823s 868 902s FNDVPPN 0000045F F 15 185= F 22 392 F 24 826s 867s 900s 925 980 FNDVPSRCH 00002666 F 24 838= 981j FNDVPUPC 00000461 F 15 187= F 22 564 577s 628 886 1032 F 24 827s 903s 979s F 32 747 FNDVPVMR 00000460 F 15 186= F 22 402 404s F 24 843s FORCEDNTRY 000031AA F 35 717j 723= FORCEN 000031A9 F 35 682j 687j 692j 720= FORCEWRB 00178801 F 35 675= 725s 793 FORCEWRW1 0000319D F 35 14 669 680= F 57 314 F 59 120 F 83 616 657 841 924 960 F 100 530 544 F 113 169 F 115 156 229 371 642 F 119 278 498 F 135 225 478 F 141 725 F 143 259 396 1311 1626 FORCEWRW2 000031A0 F 35 15 670 685= F 57 473 606 F 113 249 293 329 F 115 330 445 467 504 668 775 782 F 119 353 F 135 221 F 143 330 825 1296 1611 1 Jimbo's CREF Extractor 2.0 VRM, System C9303 (18 Mar 93) 12-May-93 12:56 PAGE 32 FORCEWRW3 000031A3 F 35 16 671 690= F 38 642 810 828 885 F 57 435 FORCEWRX 00099182 F 35 677= 716s 721s 751 780 798 FORCEXIT 000031D8 F 35 791= 799j FORCNEXIT 000031DB F 35 727j 797= FORGETDEV 000021CD F 21 1184j 1186j 1191= FORNODUAL 000031D6 F 35 752j 787= FOUND 00002771 F 25 531j 536= FOUND 00002BC4 F 29 864j 868= FOUND 00002D1B F 30 53j 60= FOUND 00002FC9 F 33 735j 740= FOUND 00002FF8 F 33 843j 847= FOUND 0000302E F 33 991j 1001= FOUND 0000307E F 33 1222j 1226= FOUNDRES 000026B6 F 24 1042= 1055j FOUNDUS 00003879 F 39 49j 53= FOUNDWSX 00002527 F 22 986j 1035= FOURSECSD 00005265 F 8 184= F 58 209x F 123 1617x F 148 848x 851x FOURSECSH 0000036E F 8 183= F 58 208x F 148 949x FOURSECSM 0000000E F 8 182= F 58 210x F 148 949x FPCHARINLK 00001EE3 F 19 63= F 46 90s 98s FPSWITCH 00001EDF F 19 37= F 46 83s 236s 1231 F 131 1770 FPSWITCHB 00001EE0 F 19 38= F 21 284s F 46 234s F 148 131 383 FPSWITCHX 00000313 F 20 130= F 21 283 FPTCB 00001EE1 F 19 61= F 21 462s F 46 93 102 FPTERMBZY 00001EE2 F 19 62= F 46 108s 169s 271s *FRAGACCT 000001CD F 9 625= *FRAGACCTT 000001CF F 9 630= *FRAGBUSY 000001C9 F 9 622= *FRAGCPUL 000001C0 F 9 613= *FRAGCPUU 000001C1 F 9 614= *FRAGDFLTR 000001D2 F 9 632= *FRAGDSKL 000001C4 F 9 617= *FRAGDSKU 000001C5 F 9 618= *FRAGENCF 000001D3 F 9 638= *FRAGFAC 000001CA F 9 623= *FRAGINITP 000001CE F 9 627= *FRAGPWAC 000001CB F 9 624= *FRAGSAVL 000001C7 F 9 620= *FRAGSERNO 000001D0 F 9 635= *FRAGSHAD 000001D1 F 9 631= *FRAGSSCF 000001C8 F 9 621= *FRAGWARN 000001C6 F 9 619= *FRAGWLCKL 000001C2 F 9 615= *FRAGWLCKU 000001C3 F 9 616= *FRALIAS 000001A0 F 9 598= *FRASACCT 000001ED F 9 651= *FRASACCTT 000001EF F 9 656= FRASCPUL 000001E0 F 9 641= F 134 889 F 143 747 *FRASCPUU 000001E1 F 9 642= *FRASDFLTR 000001F2 F 9 660= FRASDSKL 000001E4 F 9 645= F 134 894 F 143 757 *FRASENCF 000001F3 F 9 663= *FRASFAC 000001EA F 9 649= *FRASINITP 000001EE F 9 653= *FRASPASS 000001F0 F 9 658= 1 Jimbo's CREF Extractor 2.0 VRM, System C9303 (18 Mar 93) 12-May-93 12:56 PAGE 33 *FRASPWAC 000001EB F 9 650= FRASSAVL 000001E7 F 9 647= F 134 898 F 143 752 *FRASSSCF 000001E8 F 9 648= *FRASWARN 000001E6 F 9 646= *FRASWLCKL 000001E2 F 9 643= *FRASWLCKU 000001E3 F 9 644= *FRBKSP 00000016 F 9 297= *FRBLKLIM 00000150 F 9 529= *FRBLKUSED 00000151 F 9 532= *FRCACCESS 000000C0 F 9 432= *FRCATALOG 000000E0 F 9 454= *FRCG2TRANS 00000181 F 9 539= *FRCGBCKUP 0000018C F 9 550= *FRCGMANAGR 00000189 F 9 547= *FRCGMANTR 0000018A F 9 548= *FRCGMANTW 0000018B F 9 549= *FRCGOPREQ 00000188 F 9 546= *FRCGOWND 00000182 F 9 540= *FRCGPTRANS 00000180 F 9 538= *FRCGRG1 00000183 F 9 541= *FRCGRG2 00000184 F 9 542= *FRCGRG3 00000185 F 9 543= *FRCGRG4 00000186 F 9 544= *FRCGRG5 00000187 F 9 545= *FRCHAIN 00000130 F 9 515= *FRCHGTRANS 000000C1 F 9 433= *FRCLEAR 00000011 F 9 292= FRCLOSE 00000060 F 9 388= F 131 896 F 148 1142 *FRCLRVVFU 00000251 F 9 697= *FRCONCP 00000133 F 9 521= *FRCREATP 00000134 F 9 518= *FRCS2TRANS 00000191 F 9 581= *FRCSBCKUP 0000019C F 9 592= *FRCSMANAGR 00000199 F 9 589= *FRCSMANTR 0000019A F 9 590= *FRCSMANTW 0000019B F 9 591= *FRCSOPREQ 00000198 F 9 588= *FRCSOWND 00000192 F 9 582= *FRCSPTRANS 00000190 F 9 580= *FRCSRG1 00000193 F 9 583= *FRCSRG2 00000194 F 9 584= *FRCSRG3 00000195 F 9 585= *FRCSRG4 00000196 F 9 586= *FRCSRG5 00000197 F 9 587= *FRCYCLE 0000001D F 9 303= *FRDELPAGE 00000098 F 9 419= *FRDESTROY 00000170 F 9 535= *FRDEVSTAT 0000001F F 9 305= *FRECHOGET 00000242 F 9 692= *FRECHOOFF 00000241 F 9 690= *FRECHOUNIT 00000240 F 9 688= FREEAFTER 00002328 F 21 102 190 461 1471 1917 1926= FREECA 0000283E F 27 6 75 81= 187 F 32 196 FREECHECK 00002387 F 21 398 905 1170 1404 1418 1472 2237 2242= FREEFILE 00004FEA F 38 1102 F 54 10 37 75= F 55 233 390 F 57 611 F 61 464 F 75 791 813 843 F 82 227 619 F 83 346 464 1054 1 Jimbo's CREF Extractor 2.0 VRM, System C9303 (18 Mar 93) 12-May-93 12:56 PAGE 34 1149 F 100 551 F 101 698 735 F 113 334 339 F 115 165 511 671 677 725 F 119 501 F 134 549 913 F 135 502 FREEM00 00002F6D F 33 444j 450= 532j FREEM05 00002F7D F 33 481= 527j FREEM10 00002F87 F 33 454j 524= FREEMEMPAGE 00002FEA F 32 289 F 33 22 832 834= FREENEXT 0000232B F 21 1929= 1940j FREESTACK 00002875 F 27 10 260 262= F 43 1233 F 55 486 842 911 1109 1276 F 56 292 F 57 183 F 58 43 F 148 105 FREESWAPPG 00003149 F 35 330j 364= FREEULB 00005526 F 36 500 F 59 10 69 83= F 68 545 589 F 75 954 F 79 471 1202 1830 1847 F 112 287 F 118 58 F 121 457 514 544 608 641 707 740 1219 F 123 956 958 1792 F 130 310 316 F 131 353 417 420 429 1110 1847 F 134 328 572 912 F 135 179 230 283 340 379 530 650 823 832 840 951 969 1002 F 143 856 F 148 1984 FREEUPC 00002E0D F 32 263j 272= FREEZE 00002D79 F 25 380 F 31 6 41 49= F 39 42 F 55 1201 FREEZELOOP 00002D7C F 31 53= 59j FREEZER F 31 4= 179 FREEZER4 00178801 F 31 44= 50s 101 FREEZEWAIT 00002D9A F 28 367 F 31 8 57 154 159= F 39 120 FREM105 0000304E F 33 1096= 1100j FREM110 00003053 F 33 1112= 1119j FREM120 0000305A F 33 1114j 1122= FREMDONE 00002F81 F 33 478j 488= FREMHALT1 0000305C F 33 1081j 1134= FREMHALT2 0000305D F 33 1099j 1118j 1146= FREMLDTAB 0000305E F 33 1082 1158= FREMLSTAB 00003069 F 33 1098 1117 1179= FREMR2 00000453 F 15 164= F 33 438s 441s 490 592s 603s 649 FREMR3 00000454 F 15 165= F 33 437s 591s FREMR4 00000455 F 15 166= F 33 1076s 1123 FREMR7 00000457 F 15 167= F 33 435s 489 589s 648 *FREPP 0000001E F 9 304= FREQTAB 00001D23 F 16 436= F 144 230s *FREQUIP 00000050 F 9 347= *FREQUIPMW 00000054 F 9 350= *FREQUIPNA 00000057 F 9 351= *FREQUIPR 00000051 F 9 349= FREQUIPW 00000050 F 9 348= F 55 974 F 56 180 F 148 1800 1807 2049 *FRFILELOCK 00000200 F 9 666= *FRFILELOKT 00000202 F 9 674= *FRFILEULOK 00000201 F 9 667= *FRFORCE 0000001A F 9 301= FRFWSP 00000015 F 9 296= F 92 149 *FRGETCCB 0000018F F 9 553= *FRGETTRANS 000000C2 F 9 436= *FRINSRTP 00000132 F 9 517= *FRMAKEPATH 00000270 F 9 700= *FRMAPIN 00000091 F 9 404= *FRMAPINOC 00000094 F 9 406= *FRMAPINR 00000092 F 9 405= FRMODACS 000000D0 F 9 439= F 108 95 *FRMODFLOG 000000DB F 9 450= *FRMODFWWSC 000000D4 F 9 443= *FRMODGHOST 000000D7 F 9 446= 1 Jimbo's CREF Extractor 2.0 VRM, System C9303 (18 Mar 93) 12-May-93 12:56 PAGE 35 *FRMODLBKU 000000D6 F 9 445= *FRMODLRD 000000D9 F 9 448= *FRMODLWD 000000D8 F 9 447= *FRMODNBKUP 000000D3 F 9 442= *FRMODPRGI 000000D2 F 9 441= *FRMODTRANS 000000DA F 9 449= *FRMODUSRN 000000D5 F 9 444= FRNOPEN 00000260 F 9 361= F 79 62e 63e 64e 65e 66e 67e 68e 69e 1195 *FRNOPENC 00000268 F 9 366= FRNOPENCMW 0000026C F 9 369= F 79 68e FRNOPENCNA 0000026F F 9 370= F 79 69e FRNOPENCR 00000269 F 9 368= F 79 66e FRNOPENCW 00000268 F 9 367= F 79 67e FRNOPENMW 00000264 F 9 364= F 79 64e FRNOPENNA 00000267 F 9 365= F 79 65e FRNOPENR 00000261 F 9 363= F 79 62e F 131 307 954 F 133 710 F 148 386 615 628 1096 FRNOPENW 00000260 F 9 362= F 79 63e F 148 508 *FROPEN 00000050 F 9 353= *FROPENMW 00000054 F 9 356= *FROPENNA 00000057 F 9 357= *FROPENR 00000051 F 9 355= *FROPENW 00000050 F 9 354= *FRPGPROTG 00000096 F 9 413= *FRPGPROTS 00000097 F 9 416= FRPOSITION 00000090 F 9 400= F 55 995 1077 F 56 199 208 F 133 433 448 534 F 148 1813 *FRRAFCPOS 00000095 F 9 410= *FRRAFLAST 00000093 F 9 408= *FRRAFNEXT 00000099 F 9 421= FRREAD 00000030 F 9 323= F 56 185 F 148 1104 1130 FRREADB 00000031 F 9 324= F 55 979 F 133 437 451 *FRREADSHL 000000E1 F 9 455= *FRRELEASE 00000013 F 9 294= *FRRENAMER 00000100 F 9 461= *FRRESLOCKR 00000203 F 9 669= *FRRESLOCKT 00000206 F 9 679= *FRRESLOCKW 00000204 F 9 670= *FRRESLOKT 00000206 F 9 678= *FRRESSWTCH 00000290 F 9 703= *FRRESULOCK 00000205 F 9 671= *FRREWIND 00000012 F 9 293= *FRRWRITE 00000020 F 9 313= *FRRWRITEB 00000022 F 9 316= *FRRWRITEC 00000025 F 9 319= *FRRWRITEF 00000023 F 9 317= *FRRWRITEL 00000024 F 9 318= *FRRWRITET 00000020 F 9 314= *FRRWRITETF 00000021 F 9 315= FRSAVE 00000070 F 9 392= F 79 875 F 148 1827 2070 *FRSEFB 00000018 F 9 299= *FRSEFF 00000017 F 9 298= FRSEOD 00000014 F 9 295= F 82 50 *FRSETCCB 0000019F F 9 595= *FRSETUPP 00000131 F 9 516= 1 Jimbo's CREF Extractor 2.0 VRM, System C9303 (18 Mar 93) 12-May-93 12:56 PAGE 36 *FRSETVVFU 00000250 F 9 695= FRSHARE 000000A0 F 9 425= F 148 1854 1860 *FRSREAD 00000032 F 9 325= *FRSREADB 00000033 F 9 326= *FRSTATUS 00000010 F 9 291= FRSWRITE 000002A0 F 9 339= F 91 182 F 92 238 *FRSWRITEB 000002A2 F 9 342= *FRSWRITEF 000002A3 F 9 343= *FRSWRITET 000002A0 F 9 340= *FRSWRITETF 000002A1 F 9 341= *FRTBREAK 000001B5 F 9 608= *FRTCLRXOFF 000001B6 F 9 610= *FRTDELAY 000001B4 F 9 606= *FRTFLSHI 000001B1 F 9 602= *FRTFLSHIO 000001B2 F 9 603= *FRTFLSHO 000001B0 F 9 601= *FRTGETBKSP 00000124 F 9 493= *FRTGETBRCH 00000233 F 9 506= *FRTGETCRD 00000121 F 9 490= *FRTGETCW 00000126 F 9 495= *FRTGETECHO 00000128 F 9 497= *FRTGETFFD 00000123 F 9 492= *FRTGETHTD 00000232 F 9 505= *FRTGETINFO 00000234 F 9 510= *FRTGETIRAT 0000012C F 9 500= *FRTGETKILL 00000125 F 9 494= *FRTGETLFD 00000122 F 9 491= *FRTGETMODE 00000230 F 9 503= *FRTGETOPT 00000231 F 9 504= *FRTGETPORT 0000012E F 9 501= *FRTGETRATE 00000129 F 9 498= *FRTGETRCVR 0000012F F 9 502= *FRTGETSH 00000127 F 9 496= *FRTGETTCG 0000012A F 9 499= *FRTGETTCS 0000012B F 9 512= *FRTGETTYPE 00000120 F 9 488= *FRTGETXOIQ 00000235 F 9 507= *FRTRESET 000001B3 F 9 604= *FRTSETBKSP 00000114 F 9 469= *FRTSETBRCH 00000223 F 9 482= *FRTSETCRD 00000111 F 9 466= *FRTSETCW 00000116 F 9 471= *FRTSETECHO 00000118 F 9 473= *FRTSETFFD 00000113 F 9 468= *FRTSETHTD 00000222 F 9 481= *FRTSETIRAT 0000011C F 9 476= *FRTSETKILL 00000115 F 9 470= *FRTSETLFD 00000112 F 9 467= *FRTSETMODE 00000220 F 9 479= *FRTSETOPT 00000221 F 9 480= *FRTSETORAT 0000011D F 9 477= *FRTSETRATE 00000119 F 9 474= *FRTSETSH 00000117 F 9 472= *FRTSETTCG 0000011A F 9 475= *FRTSETTCS 0000011B F 9 485= *FRTSETTRNS 0000011F F 9 478= 1 Jimbo's CREF Extractor 2.0 VRM, System C9303 (18 Mar 93) 12-May-93 12:56 PAGE 37 *FRTSETTYPE 00000110 F 9 464= *FRTSETXOIQ 00000224 F 9 483= FRUNEQUIP 00000060 F 9 386= F 55 1091 F 56 232 F 131 356 409 F 133 719 F 148 481 520 1867 2077 2087 *FRUNITID 00000210 F 9 682= *FRUNITIE 00000211 F 9 683= *FRUNITIGET 00000212 F 9 685= *FRUNSAVE 00000080 F 9 396= *FRUNSHARE 000000B0 F 9 429= *FRUOPEN 00000280 F 9 374= *FRUOPENC 00000288 F 9 379= *FRUOPENCMW 0000028C F 9 382= *FRUOPENCNA 0000028F F 9 383= *FRUOPENCR 00000289 F 9 381= *FRUOPENCW 00000288 F 9 380= *FRUOPENMW 00000284 F 9 377= *FRUOPENNA 00000287 F 9 378= *FRUOPENR 00000281 F 9 376= *FRUOPENW 00000280 F 9 375= *FRWFM 00000019 F 9 300= FRWRITE 00000040 F 9 329= F 85 251 F 148 1820 FRWRITEB 00000042 F 9 332= F 55 1005 1081 F 56 204 212 F 133 538 *FRWRITEC 00000045 F 9 335= *FRWRITEF 00000043 F 9 333= *FRWRITEL 00000044 F 9 334= *FRWRITEMOD 0000001C F 9 302= *FRWRITET 00000040 F 9 330= *FRWRITETF 00000041 F 9 331= *FRXSAVE 00000140 F 9 525= FSACSAO 00000002 F 12 13= F 74 112x 1199e F 82 44 F 89 34 F 90 60x F 100 51e FSACSDR 00000005 F 12 13= F 100 54e F 108 187 F 110 63 309 FSACSMW 00000004 F 12 13= 13e F 74 122x 126x 211x 215x 1201e F 93 256 265 F 100 53e F 108 269 FSACSNDA 00000007 F 12 13= F 36 785 F 69 64 F 74 128x 129x 130x 131x 132x 134x 157x 158x 159x 160x 161x 163x 188x 189x 190x 191x 192x 194x 217x 218x 219x 220x 221x 223x 1202e F 75 86 138 F 76 134 211 F 79 902 F 90 60x F 100 55e 217 F 101 31 859 1187 F 103 196 865 F 104 105 F 107 29 F 108 185 456 460 557 817 F 110 307 F 112 168 212 FSACSNWB 00003E10 F 12 13= F 36 848 F 76 136j 213j F 79 816j F 80 143 F 94 23j F 100 902j 1323 F 101 169 595j 862j 1119j F 107 28j F 143 995j 1004j 1020j FSACSRO 00000001 F 12 13= F 74 116x 117x 120x 145x 146x 149x 205x 206x 207x 208x 209x 1197e F 75 98 106 344 F 100 50e F 123 760 F 131 1530 1556 FSACSRW 00000000 F 12 13= F 74 110x 114x 199x 200x 201x 202x 203x 1198e F 75 100 155 342 F 100 49e F 101 631 F 131 1558 F 141 340 FSACSXO 00000003 F 12 13= F 74 119x 148x 176x 177x 179x 180x 1200e F 90 60x 71 F 100 52e F 101 275 F 107 315 FSNDATE 00001EE9 F 19 109= F 46 608 610 613s FSPPLIST 00001C77 F 16 87= F 21 2267 2269s F 33 840 841a 896 898s 1036 1038s 1219 1220a FSPRIVBKUP 00000008 F 12 13= F 67 625e 702x 736x F 73 326 F 74 1153 FSPRIVMOD 00000002 F 12 13= F 67 623e 702x 736x F 73 29 181 246 F 79 383 F 127 694 F 131 1905 1 Jimbo's CREF Extractor 2.0 VRM, System C9303 (18 Mar 93) 12-May-93 12:56 PAGE 38 FSPRIVNOT 0000000F F 12 13= F 37 156 F 67 626e F 69 62 F 79 562 F 95 215 269 F 118 38 F 120 152 F 121 57 360 F 131 316 *FSPRIVNWB 00003E10 F 12 13= FSPRIVRO 00000001 F 12 13= F 50 681 F 67 621e F 73 68 F 74 41 FSPRIVRW 00000000 F 12 13= F 50 665 F 67 622e 702x F 141 337 FSPRIVXO 00000003 F 12 13= F 67 624e FSSTATABS 00002E10 F 12 13= F 18 191e FSSTATACS 00002630 F 12 13= F 18 190e FSSTATCRT 00002410 F 12 13= F 18 189e FSSTATDTYP 00003460 F 12 13= F 18 194e FSSTATPRIV 00001C40 F 12 13= F 18 188e FSSTATSAV 00003210 F 12 13= F 18 193e FSSTATWSC 00003010 F 12 13= F 18 192e FSTBKUPLEN 000000F0 F 12 15= F 142 312s 433s 536s F 143 293 606 612 785 791 1843 2170 2179 FSXCOUNT 00001C7A F 16 135= F 21 425s F 28 1528 1549s 1575s F 32 773 F 33 1040s 1235s FSXDONE 00002B32 F 28 1568j 1586= FSXGETIDLE 00002B20 F 28 1530j 1566= FSXNOTLOW 00002EC3 F 32 774j 778= FSXPAND 00002B0E F 28 20 315 1519 1524= F 32 775 FTCBEXIT 000035CF F 36 1965= 1971j GBSWL 000030ED F 35 193j 196= GENINITPPL 0000205D F 21 252= 259j GENOPMSG 000046F3 F 38 344 F 43 2136 4996 F 46 11 1444 1449= F 53 573 795 896 F 128 104 F 145 78 F 148 791 1701 2359 GENPPL 0000235E F 21 248 272 276 280 904 2071 2076= GETBLKLIM 00178803 F 38 173= 191s 248 GETBLKTMP 00178802 F 38 172= 322s 333 346 811s 969s 1000 GETDATE 00004549 F 29 796 954 F 36 1384 F 37 162 F 46 12 532 537= F 54 354 406 F 58 87 F 123 704 F 124 96 101 737 F 130 299 F 131 1908 F 133 909 F 139 293 F 148 227 344 GETFRADT 000036F7 F 38 283j 541= GETFREBLKT 00178801 F 38 171= 332s 337 423s 424s 426 431 439 601s 850 GETFREEBLK 00003654 F 22 427 568 F 38 6 167 178= F 57 356 F 143 311 334 356 491 2031 GETFREEMEM F 33 4= 1243 GETFRFREW 00003660 F 38 203= 524a 852j GETFRPLNTY 00003682 F 38 266j 297= 559j GETFRQUE 000036F2 F 38 284j 522= GETFRRTN 0000368A F 38 253j 313= GETIDLE 00002D1C F 21 399 2286 F 28 1567 1619 F 30 15 89 94= F 33 892 F 43 1298 3193 3721 GETIDLEPG 00002D3B F 30 16 161 167= F 43 1283 GETMAD 0000301D F 21 184 F 33 23 112 932 934= GETMEMPAGE 00003002 F 33 21 885 887= F 37 81 GETMR2 00000453 F 15 159= 160e 164e F 33 56s 78 223s 254 GETMR3 00000454 F 15 160= 165e GETMR7 00000457 F 15 162= 167e F 33 55s 77 222s 253 GETMREGS 00000455 F 15 161= 166e F 33 109s 120 289s 309 372 GETNOPAGE 00002EFC F 33 96j 125= GETNOTCM 0000365E F 38 183j 186j 190= GETNUMRES 0000367C F 38 263= 320j 348j GETPLISTX 00003728 F 38 605j 671= GETPNEWBAD 00003726 F 38 630a 666= 1 Jimbo's CREF Extractor 2.0 VRM, System C9303 (18 Mar 93) 12-May-93 12:56 PAGE 39 GETPNOK 00003721 F 38 645j 648= GETPUTADT 00003701 F 38 557j 598= GETPUTADTB F 38 4= 1565 GETPVMAP 00003729 F 38 653j 678= 1013j GETREQOK 0000367A F 38 249j 257= GETSPAGAIN 00003667 F 38 230= 240j GETSTACK 0000286A F 27 9 223 225= F 43 1160 F 55 59 805 878 955 1196 F 56 54 F 57 75 F 58 32 F 148 124 GETTRAPPER 00002AB3 F 28 21 644 1258 1267= F 36 578 612 1136 GETVIRTUAL 000029DA F 28 699j 704= GETVPAGE 00003027 F 33 290 890 984 986= GETVPLOOP 0000302A F 33 989= 992j GETWHOLEPG 00003031 F 33 110 292 1028 1030= GFBDECP 000036B8 F 38 181 378= GFBITDEC 018036B0 F 38 368= 378a GFBLOCK 0016C802 F 17 373= 374e 375e GFBSWP 0000003F F 38 182 365= 366e 370x GFBSYS 00000002 F 38 187 362= 368x 368x 368x 368x 369x 369x 369x 369x 370x 370x 370x 372x 373x 373x 373x 374x 374x 374x 374x 375x 375x 375x 375x 376x 376x 376x 376x 377x 377x 377x 377x GFBUFC 0000000C F 38 363= 371x 371x 372x 372x 372x GFBUSR 00000018 F 38 364= 371x 371x 373x GFCLIST 00001EC4 F 17 359= F 74 860 881 883s 919a GFCLOCK 00001EC5 F 17 360= F 74 859s 888s 911s 928s 937s GFCLOG 00000003 F 17 383= F 74 867 871 930 GFCPROT 00001EC6 F 17 362= 383e 384a GFFSN 0016C803 F 17 377= 378e F 74 861 877s GFFSNVOL 0008C083 F 17 378= F 74 879s GFL 00000006 F 38 366= 368x 369x 370x 371x 372x 373x 374x 375x 376x 377x GFLINK 0008DF10 F 17 364= F 74 882s 920 926 927s GFMSBLK 0008D182 F 17 375= F 74 875s F 83 1067s 1132s 1191 1195 GFRAFTYPE 0008C021 F 17 366= F 74 873s F 83 1065s 1126 1130s 1193 GFUSECNT 0008C0F0 F 17 363= F 74 887s 912s GFVOL 0008C082 F 17 374= F 74 880s GFXPNDLOCK 0016C805 F 17 380= F 83 339s 342s 364s 457s 460s 480s 1063s 1068s 1125s 1133s 1144s GIVEBACK 00002B33 F 28 1584j 1598= GIVEBLOCK 00003685 F 38 233j 301= GIVEINT 000029D4 F 28 673j 697= GIVEUINT 00003457 F 36 15 984 994= 1387 F 50 203 295 550 F 76 231 F 84 126 F 127 230 845 GIVEXREQER 00002A3D F 28 946= 978j 1061j 1166j GMBYEBYE 00002EE2 F 33 75= 121j 140j GMNDPAGE 00002EEE F 33 65j 108= GMSHUFDN 00002F00 F 33 122j 132= 139j GMSHUFFL 00002EE9 F 33 70j 90= GMSHUFUP 00002EEA F 33 92= 127j GOAWAY 000029FD F 28 750= 799j GOODLINK 00002E3B F 32 435j 439= GOODPN 000035E2 F 37 88j 92= GOROUND 000023A3 F 21 2356j 2368= GOTEND 0000231F F 21 1881j 1886= GOTPREV 000034D8 F 36 1201j 1205= GOTQUEUE 0000346E F 36 1008j 1040= GOTROOT 0000359D F 36 1821= 1847j 1 Jimbo's CREF Extractor 2.0 VRM, System C9303 (18 Mar 93) 12-May-93 12:56 PAGE 40 GOTUNIT 000035C4 F 36 1924j 1928= GOTUPC 00003368 F 36 289j 307= GPADTADD 00003773 F 38 783j 868= GPADTADDIT 000037BE F 38 701j 1056= GPADTADDX 0000377E F 38 876j 882= GPADTANXT 0000373A F 38 714= 790j 808j GPADTBAD 000037F8 F 38 682a 1117a 1184= GPADTCLN 0000375D F 38 699j 807= GPADTDN 00003767 F 38 621j 668j 837= GPADTDNX 00003758 F 38 744j 787= GPADTDNY 00003763 F 38 792j 826= 1075j GPADTDNZ 00003766 F 38 832= 1034j 1173j GPADTDUPA 00003745 F 38 741= 759j GPADTFND0 000037BF F 38 1060= 1063j GPADTFREW 00003731 F 38 695= 928j 1124j GPADTGSB 000037A4 F 38 812j 974= GPADTNEWL 0000379F F 38 926j 965= GPADTNFND 000037AA F 38 981j 995= GPADTNLP 000037A6 F 38 979= 982j GPADTNSEC 00003810 F 38 1288= 1312j GPADTOOS 000037F6 F 38 1152j 1171= GPADTPLCE 0000374B F 38 729j 758= GPADTPLLP 0000374C F 38 762= 765j GPADTSBOT 000037CA F 38 1062j 1076= GPADTSECE 00003819 F 38 1293a 1308= GPADTSGN 000037BA F 38 1001j 1030= GPADTSNXT 000037C2 F 38 1067= 1077j GPADTSRCH 00003741 F 38 726= 730j GPADTSSEC 000037E5 F 38 1112j 1136= GPADTSSECF 000037EB F 38 1143j 1148= GPADTSSECL 000037E7 F 38 1141= 1144j GPADTSUBY 000037D8 F 38 952j 1110= 1159j 1189j GPADTTML 000037B9 F 38 1002j 1016= GPADTXTENB 00003796 F 38 912a 943= GPDQMOR 0000376B F 38 844= 848j GPREADSEC 0000380E F 38 8 643 975 1137 1186 1279 1284= F 138 193 GPSOOS 00003676 F 38 250= 563j GPWRITSEC 0000381E F 38 9 652 1009 1033 1158 1172 1188 1344 1349= F 137 266 GRABCA 0000284A F 22 423 558 F 27 7 120 126= F 28 664 912 F 40 31 GRUBBYEVP 0000311A F 35 249j 314= GRUBDOMORE 00003108 F 35 259= 263j GRUBDOVP 0000314A F 35 295j 317j 368= GRUBDUMP 000030F6 F 35 181j 224= 270j GRUBELFND 0000310D F 35 262j 266= GRUBNOPAL 00003101 F 35 205j 248= GRUBPAGE 000030E4 F 32 77 86 F 35 17 153 184= F 72 144 F 125 60 195 F 130 675 F 143 1916 GRUBPAGET 00178801 F 35 163= 170s 199s 373 GRUBPAGPTR 00178802 F 35 164= 171s 202s 236 369 GRUBPENTER 000030E6 F 35 186= 396j 401j 406j GRUBPGDMOT 00003111 F 35 232j 285= GRUBPNFR 0000314F F 35 198j 374= GRUBRISHAR 00003119 F 35 237j 256j 264j 312= GRUBVPEL 000030D7 F 35 18 152 169= F 36 461 470 F 72 179 1 Jimbo's CREF Extractor 2.0 VRM, System C9303 (18 Mar 93) 12-May-93 12:56 PAGE 41 GRUBVPWSX 00003104 F 35 177j 254= GRUBWNDO1 00003150 F 35 19 154 394= F 55 161 174 257 452 623 715 770 F 57 176 F 58 103 F 59 122 431 588 603 702 F 60 106 164 F 61 107 146 159 198 554 806 F 67 213 F 68 584 656 689 734 761 F 74 834 841 F 75 585 590 F 79 469 1887 F 81 161 178 F 82 246 505 632 F 83 106 123 529 617 842 925 1000 1145 F 89 91 F 91 210 215 F 92 74 278 456 481 497 F 93 103 113 276 F 95 184 F 100 548 576 673 864 1390 F 101 429 543 569 651 691 732 750 756 913 987 1103 1148 1208 F 107 388 397 F 110 232 647 F 111 84 F 112 320 F 113 170 298 433 F 115 157 191 230 372 380 520 643 696 728 F 117 339 F 119 282 534 F 120 107 117 F 121 297 311 540 637 736 1147 1214 1228 1401 1431 1463 F 130 427 F 131 453 885 F 134 286 316 340 517 555 842 865 F 135 178 227 240 278 339 376 453 501 529 559 600 649 676 686 692 781 822 948 968 1001 1054 1123 1130 1250 F 136 311 331 460 493 F 137 450 F 138 81 167 250 263 276 F 139 531 546 565 579 610 623 635 648 683 689 727 785 F 141 535 544 741 747 F 142 299 315 332 347 371 469 476 580 589 697 742 748 761 1037 F 143 264 397 423 436 444 546 554 559 654 663 860 1096 1266 2214 2314 2386 2393 F 148 476 1988 GRUBWNDO2 00003153 F 35 20 155 399= F 38 1500 1541 F 55 363 368 432 437 709 716 F 57 177 F 61 338 373 F 68 741 757 F 73 252 267 F 79 470 F 82 461 497 532 549 F 83 530 843 F 95 185 F 101 692 F 110 648 F 111 85 F 112 321 394 F 113 179 434 F 115 192 262 331 381 505 521 669 697 729 776 784 F 117 340 F 119 283 F 120 108 118 F 131 454 886 F 134 270 459 F 135 222 F 137 451 F 138 523 575 678 686 F 142 437 456 470 477 540 581 590 F 143 392 437 443 523 615 637 655 664 794 859 1034 1095 1184 1223 1297 1612 2182 2213 F 148 1989 GRUBWNDO3 00003156 F 35 21 156 404= F 38 838 945 1101 F 57 436 462 F 110 525 565 F 137 269 307 F 148 248 HALT 00002884 F 27 272j 279= HALTB1001 00021001 F 13 363= F 26 89 *HALTB1002 00021002 F 13 372= HALTB1004 00021004 F 13 366= F 26 235 *HALTB3010 00023010 F 13 379= *HALTB3011 00023011 F 13 380= *HALTB3100 00023100 F 13 383= *HALTB3101 00023101 F 13 384= *HALTB3102 00023102 F 13 385= *HALTB3103 00023103 F 13 386= *HALTB3104 00023104 F 13 387= *HALTB3106 00023106 F 13 388= *HALTB3107 00023107 F 13 389= *HALTB3108 00023108 F 13 390= *HALTB3109 00023109 F 13 391= *HALTB310A 0002310A F 13 392= *HALTB310B 0002310B F 13 393= *HALTB310C 0002310C F 13 394= *HALTB310D 0002310D F 13 395= *HALTB310E 0002310E F 13 396= *HALTB310F 0002310F F 13 397= *HALTB3110 00023110 F 13 398= *HALTB3111 00023111 F 13 399= *HALTB3112 00023112 F 13 400= *HALTB3113 00023113 F 13 401= 1 Jimbo's CREF Extractor 2.0 VRM, System C9303 (18 Mar 93) 12-May-93 12:56 PAGE 42 *HALTB3200 00023200 F 13 404= *HALTB3201 00023201 F 13 405= *HALTB4004 00024004 F 13 408= *HALTB4011 00024011 F 13 409= *HALTB4012 00024012 F 13 410= *HALTB4013 00024013 F 13 411= *HALTB4014 00024014 F 13 412= *HALTB4015 00024015 F 13 413= *HALTB4016 00024016 F 13 414= *HALTB4017 00024017 F 13 415= *HALTB4018 00024018 F 13 416= *HALTB4019 00024019 F 13 417= *HALTB4021 00024021 F 13 418= *HALTB4022 00024022 F 13 419= *HALTB4023 00024023 F 13 420= *HALTB4024 00024024 F 13 421= *HALTB4100 00024100 F 13 423= *HALTB5000 00025000 F 13 429= *HALTB5001 00025001 F 13 430= *HALTB5002 00025002 F 13 431= *HALTB5003 00025003 F 13 432= *HALTB5004 00025004 F 13 433= *HALTB5005 00025005 F 13 434= *HALTB5006 00025006 F 13 435= *HALTB5007 00025007 F 13 436= HALTB6040 00026040 F 13 466= F 21 2080 HALTB6044 00026044 F 13 467= F 21 400 HALTB7001 00027001 F 13 782= F 148 156 HALTB7002 00027002 F 13 783= F 148 172 HALTB7003 00027003 F 13 784= F 148 257 HALTB7004 00027004 F 13 785= F 148 312 HALTB7007 00027007 F 13 786= F 148 399 HALTB7009 00027009 F 13 789= F 148 410 HALTB700A 0002700A F 13 790= F 148 421 HALTB700B 0002700B F 13 791= F 148 484 HALTB700C 0002700C F 13 792= F 148 189 HALTC1200 00031200 F 13 738= F 28 1021 HALTC1201 00031201 F 13 739= F 28 1035 HALTC1202 00031202 F 13 740= F 28 791 HALTC1210 00031210 F 13 743= F 130 361 HALTC1215 00031215 F 13 748= F 130 435 HALTC1216 00031216 F 13 749= F 130 366 HALTD00A5 000400A5 F 13 573= F 38 1326 HALTD1254 00041254 F 13 769= F 61 570 HALTD1261 00041261 F 13 773= F 58 115 HALTD1281 00041281 F 13 778= F 142 1046 HALTF1250 00061250 F 13 765= F 61 172 HALTH0021 00080021 F 13 508= F 28 595 HALTH0050 00080050 F 13 583= F 40 150 HALTH0051 00080051 F 13 584= F 40 200 HALTH00C1 000800C1 F 13 495= F 25 120 HALTH00C3 000800C3 F 13 497= F 25 457 HALTH0CSC 00080C00 F 13 498= F 25 207 HALTH0DSC 00080D00 F 13 496= F 25 233 HALTI0800 00090800 F 13 577= F 41 32 HALTI0801 00090801 F 13 579= F 41 80 1 Jimbo's CREF Extractor 2.0 VRM, System C9303 (18 Mar 93) 12-May-93 12:56 PAGE 43 HALTM00C0 000D00C0 F 13 494= F 25 114 HALTM00C5 000D00C5 F 13 502= F 25 295 HALTM00C6 000D00C6 F 13 503= F 25 328 HALTM00C7 000D00C7 F 13 504= F 25 311 HALTP0103 00100103 F 13 589= F 43 5146 HALTP10D2 001010D2 F 13 617= F 57 198 HALTP10D3 001010D3 F 13 618= F 57 201 HALTS0000 00130000 F 13 478= F 22 119 HALTS0001 00130001 F 13 479= F 22 180 HALTS0002 00130002 F 13 480= F 22 187 HALTS0004 00130004 F 13 481= F 22 240 HALTS0005 00130005 F 13 482= F 22 263 HALTS0007 00130007 F 13 483= F 22 346 HALTS0008 00130008 F 13 484= F 22 140 HALTS0010 00130010 F 13 491= F 24 997 HALTS0022 00130022 F 13 509= F 33 1223 HALTS0023 00130023 F 13 510= F 33 956 HALTS0030 00130030 F 13 516= F 32 149 HALTS0031 00130031 F 13 517= F 32 246 HALTS0032 00130032 F 13 518= F 32 252 HALTS0033 00130033 F 13 519= F 32 258 HALTS0035 00130035 F 13 520= F 32 408 HALTS0037 00130037 F 13 521= F 32 436 HALTS0040 00130040 F 13 513= F 29 865 HALTS0062 00130062 F 13 529= F 35 800 HALTS0063 00130063 F 13 530= F 35 1049 HALTS0070 00130070 F 13 540= F 37 189 HALTS0071 00130071 F 13 541= F 37 89 HALTS0072 00130072 F 13 542= F 37 117 HALTS0080 00130080 F 13 545= F 33 154 HALTS0081 00130081 F 13 546= F 33 1135 HALTS0082 00130082 F 13 547= F 33 1147 HALTS0083 00130083 F 13 548= F 33 165 HALTS0084 00130084 F 13 549= F 33 543 HALTS0086 00130086 F 13 552= F 33 232 HALTS0087 00130087 F 13 553= F 33 599 HALTS0088 00130088 F 13 554= F 33 395 HALTS0089 00130089 F 13 555= F 33 702 HALTS008A 0013008A F 13 556= F 33 737 HALTS008B 0013008B F 13 557= F 33 353 HALTS008C 0013008C F 13 558= F 33 383 HALTS008D 0013008D F 13 559= F 33 891 HALTS008E 0013008E F 13 560= F 33 893 HALTS008F 0013008F F 13 561= F 33 844 HALTS0090 00130090 F 13 564= F 27 195 HALTS0091 00130091 F 13 565= F 27 279 HALTS00A0 001300A0 F 13 568= F 38 646 HALTS00A1 001300A1 F 13 569= F 38 742 HALTS00A3 001300A3 F 13 571= F 38 983 HALTS00A4 001300A4 F 13 572= F 38 1145 HALTS00A6 001300A6 F 13 574= F 38 1017 HALTS00C8 001300C8 F 13 505= F 25 363 HALTS00D0 001300D0 F 13 535= F 36 1202 HALTS00D1 001300D1 F 13 536= F 36 477 HALTS00D2 001300D2 F 13 537= F 36 1814 HALTS00E0 001300E0 F 13 524= F 59 773 1 Jimbo's CREF Extractor 2.0 VRM, System C9303 (18 Mar 93) 12-May-93 12:56 PAGE 44 HALTS00E1 001300E1 F 13 525= F 59 824 HALTS00E2 001300E2 F 13 526= F 59 827 HALTS0101 00130101 F 13 587= F 43 5065 HALTS0102 00130102 F 13 588= F 43 4085 HALTS0104 00130104 F 13 590= F 43 944 HALTS0105 00130105 F 13 591= F 43 2798 HALTS0210 00130210 F 13 600= F 50 64 HALTS0213 00130213 F 13 601= F 49 399 HALTS0214 00130214 F 13 602= F 50 659 HALTS10A0 001310A0 F 13 605= F 55 1143 HALTS10B0 001310B0 F 13 608= F 55 98 HALTS10B1 001310B1 F 13 609= F 55 1094 HALTS10B2 001310B2 F 13 610= F 55 321 HALTS10C0 001310C0 F 13 613= F 56 235 HALTS10D5 001310D5 F 13 620= F 57 333 HALTS10D6 001310D6 F 13 621= F 57 371 HALTS10D8 001310D8 F 13 623= F 57 555 HALTS10E0 001310E0 F 13 626= F 59 88 HALTS10E1 001310E1 F 13 627= F 59 214 HALTS10E2 001310E2 F 13 628= F 59 80 HALTS1108 00131108 F 13 648= F 82 210 HALTS1110 00131110 F 13 651= F 83 945 HALTS1111 00131111 F 13 652= F 83 521 HALTS1112 00131112 F 13 653= F 83 1053 HALTS1113 00131113 F 13 654= F 83 1003 HALTS1114 00131114 F 13 655= F 83 345 HALTS1115 00131115 F 13 656= F 83 463 HALTS1116 00131116 F 13 657= F 83 1148 HALTS1118 00131118 F 13 659= F 83 640 HALTS111A 0013111A F 13 660= F 83 704 HALTS111B 0013111B F 13 661= F 83 787 HALTS111C 0013111C F 13 662= F 83 832 HALTS1120 00131120 F 13 665= F 97 191 HALTS1128 00131128 F 13 637= F 74 915 HALTS1129 00131129 F 13 638= F 74 922 HALTS1131 00131131 F 13 641= F 74 227 HALTS1132 00131132 F 13 642= F 75 702 HALTS1133 00131133 F 13 643= F 75 790 HALTS1134 00131134 F 13 644= F 75 808 HALTS1135 00131135 F 13 645= F 75 840 HALTS1140 00131140 F 13 668= F 100 536 HALTS1141 00131141 F 13 669= F 100 560 HALTS1142 00131142 F 13 670= F 100 475 HALTS1148 00131148 F 13 673= F 101 745 HALTS1149 00131149 F 13 674= F 101 685 HALTS1150 00131150 F 13 677= F 76 608 HALTS1151 00131151 F 13 678= F 76 716 HALTS1160 00131160 F 13 681= F 108 50 HALTS1161 00131161 F 13 682= F 74 1237 HALTS1162 00131162 F 13 683= F 74 1238 HALTS1163 00131163 F 13 684= F 108 517 HALTS1164 00131164 F 13 685= F 74 1254 HALTS1165 00131165 F 13 686= F 74 1255 HALTS1166 00131166 F 13 687= F 74 1287 HALTS1167 00131167 F 13 688= F 74 1288 HALTS1168 00131168 F 13 689= F 74 1271 1 Jimbo's CREF Extractor 2.0 VRM, System C9303 (18 Mar 93) 12-May-93 12:56 PAGE 45 HALTS1169 00131169 F 13 690= F 74 1272 HALTS116A 0013116A F 13 691= F 74 1330 HALTS116B 0013116B F 13 692= F 74 1331 HALTS116C 0013116C F 13 693= F 74 1340 HALTS116D 0013116D F 13 694= F 74 1341 HALTS1170 00131170 F 13 697= F 110 342 HALTS1171 00131171 F 13 698= F 110 452 HALTS1172 00131172 F 13 699= F 110 453 HALTS1180 00131180 F 13 702= F 111 53 HALTS1181 00131181 F 13 703= F 115 170 HALTS1191 00131191 F 13 706= F 112 146 HALTS1192 00131192 F 13 707= F 112 183 HALTS1193 00131193 F 13 708= F 112 429 HALTS1198 00131198 F 13 709= F 69 304 HALTS1199 00131199 F 13 710= F 69 250 HALTS119A 0013119A F 13 711= F 76 203 HALTS119C 0013119C F 13 712= F 112 233 HALTS11A0 001311A0 F 13 715= F 113 108 HALTS11B0 001311B0 F 13 718= F 119 299 HALTS11B1 001311B1 F 13 719= F 119 494 HALTS11B2 001311B2 F 13 720= F 119 715 HALTS11C0 001311C0 F 13 723= F 120 78 HALTS11C1 001311C1 F 13 724= F 120 146 HALTS11C2 001311C2 F 13 725= F 120 212 HALTS11D0 001311D0 F 13 728= F 121 145 HALTS11E0 001311E0 F 13 731= F 125 417 HALTS11E1 001311E1 F 13 732= F 125 1011 HALTS11E2 001311E2 F 13 733= F 125 1038 HALTS11E3 001311E3 F 13 734= F 124 540 HALTS11E5 001311E5 F 13 735= F 126 125 HALTS11F0 001311F0 F 13 634= F 69 145 HALTS1211 00131211 F 13 744= F 130 625 HALTS1214 00131214 F 13 747= F 137 552 HALTS1218 00131218 F 13 750= F 131 1636 HALTS1224 00131224 F 13 753= F 135 264 HALTS1225 00131225 F 13 754= F 135 365 HALTS1226 00131226 F 13 755= F 135 936 HALTS1227 00131227 F 13 756= F 135 482 HALTS1228 00131228 F 13 757= F 135 791 HALTS1229 00131229 F 13 758= F 135 990 HALTS1230 00131230 F 13 761= F 131 1433 HALTS1231 00131231 F 13 762= F 131 1525 HALTS1251 00131251 F 13 766= F 61 389 HALTS1252 00131252 F 13 767= F 61 403 HALTS1255 00131255 F 13 770= F 61 328 HALTS1280 00131280 F 13 777= F 143 1302 HALTS1282 00131282 F 13 779= F 143 1617 HALTS1300 00131300 F 13 631= F 78 108 HALTS700D 0013700D F 13 793= F 148 2184 HALTS700E 0013700E F 13 794= F 131 909 *HALTW3210 00173210 F 13 440= *HALTW3211 00173211 F 13 441= *HALTW3212 00173212 F 13 442= *HALTW3213 00173213 F 13 444= *HALTW3220 00173220 F 13 447= *HALTW3221 00173221 F 13 448= 1 Jimbo's CREF Extractor 2.0 VRM, System C9303 (18 Mar 93) 12-May-93 12:56 PAGE 46 *HALTW3230 00173230 F 13 451= *HALTW3231 00173231 F 13 452= *HALTW3232 00173232 F 13 453= *HALTW3233 00173233 F 13 454= *HALTW3234 00173234 F 13 455= *HALTW3300 00173300 F 13 460= *HALTW3301 00173301 F 13 461= HALTZ1212 001A1212 F 13 745= F 130 765 HALTZ1213 001A1213 F 13 746= F 130 809 HAPPYEXIT 0000252C F 22 980j 1042= 1053j HARDSYS 00002553 F 23 350= F 75 33a HASBEEN 00178801 F 21 2479= 2483s 2495 2503 HASHTSIZ 00000040 F 16 1006= 1032 1033 F 144 1174 HAVECA 00002852 F 27 131j 134= HAVEDATA 00002D5E F 30 235j 242= HAVEIT 00002ADD F 28 1347j 1352= HAVEMEMORY 00002133 F 21 327 829 841= HAVEPAGE 00002523 F 22 987j 1030= HAVEPPL 00002D33 F 30 111j 124= HAVEPPU 000021A4 F 21 362 1098 1105= HAVEPPU 000027D1 F 26 232j 243= HAVEROOT 000034FD F 36 1333j 1336= HAVESSU 00002172 F 21 319 998 1003= HAVEVP 00002EB6 F 32 748j 759= HAVEVPP 00002442 F 22 384j 405= HAVEXA 00002F4A F 33 352j 357= HAVEXMEM 000035F2 F 37 114j 120= HDRPROTO 00000000 F 12 15= 15a 15e HEADPAGE 00001C00 F 14 237= 238e 239e F 16 17a HEADPAGEND 00001FB9 F 19 1346= F 21 101a HEADPMV 00000387 F 20 312= F 21 69 205 HHALT 00080000 F 13 335= 495e 496e 497e 498e 508e 583e 584e 594e HIDEOUT 00178802 F 24 819= 921s 941 HIUSERPAGE 00000085 F 18 398= F 22 163 216 F 130 672 HLTSV1270 002A1270 F 13 774= F 58 48 HLTSV7000 002A7000 F 13 799= F 148 984 HLTSV7100 002A7100 F 13 800= F 148 1193 HLTSV7101 002A7101 F 13 801= F 148 1203 HLTSV7200 002A7200 F 13 802= F 148 1213 HLTSV7300 002A7300 F 13 803= F 148 1225 HLTSV7310 002A7310 F 13 804= F 148 1262 HLTSV7311 002A7311 F 13 805= F 148 1276 HLTSV7320 002A7320 F 13 806= F 148 1288 HLTSV7380 002A7380 F 13 807= F 148 1237 HLTSV7381 002A7381 F 13 808= F 148 1250 HLTSV7390 002A7390 F 13 809= F 148 1340 HLTSV7391 002A7391 F 13 810= F 148 1352 HLTSV73A0 002A73A0 F 13 811= F 148 1308 HLTSV73A1 002A73A1 F 13 812= F 148 1320 HLTSV73B0 002A73B0 F 13 813= F 148 1372 HLTSV73B1 002A73B1 F 13 814= F 148 1384 HOLDOFF 00002A21 F 28 867j 869= HOWBAD 00002C2A F 29 1030 1051 1158 1163= HOWBGOK 00002BF8 F 29 1015j 1017= HT 00000009 F 4 44= F 49 177 219x 223x F 50 1032 F 85 158 HTYPECDR 0000000A F 8 1813= F 100 208 276e F 104 31x F 106 50e 1 Jimbo's CREF Extractor 2.0 VRM, System C9303 (18 Mar 93) 12-May-93 12:56 PAGE 47 HTYPECODE 00000003 F 8 1806= F 68 634 F 75 1135x F 79 582 F 81 55 F 83 48 257 406 425 F 91 60 F 93 50 220 F 100 275e 1469x F 101 36 223 413 490 856 1184 F 106 49e F 107 65 105 152 205 F 110 47e 396 F 142 546 731 908 HTYPECT 0000000D F 8 1816= F 74 746 F 75 281 F 100 277e 972 1033 1094 1158 1315 1495 1535 F 101 38 F 148 1939 2449x HTYPEDIR 00000005 F 8 1808= F 68 180 F 74 39 F 75 1022x 1139x F 79 943 F 95 308 F 100 276e F 118 28 F 119 85 201 F 120 139 F 121 45 357 F 134 781 F 135 112 F 136 431 F 142 404 F 143 2349 HTYPELAST 00000010 F 8 1819= F 74 649 649 F 80 59 F 90 109 F 100 101 318 341 341 431 454 454 HTYPELP 0000000B F 8 1814= F 75 660 1141x F 105 49 F 148 1969 2439x HTYPEMT 0000000C F 8 1815= F 75 284 F 100 277e 966 1029 1088 1154 1311 F 148 1923 2444x HTYPENULL 00000006 F 8 1809= F 75 944 1137x F 100 276e 1317 F 110 48e F 123 1014 F 143 913 HTYPEPATH 00000004 F 8 1807= F 36 837 F 74 337 F 75 1136x F 90 86 F 100 970 1092 1319 F 104 100 386 F 110 48e F 127 822 987 HTYPERAF 00000002 F 8 1805= F 74 1357 1390 1410 F 75 1134x F 79 580 F 81 57 F 91 64 F 100 275e 964 1027 1209 1469x 1569 F 101 34 635 F 104 31x F 106 49e F 110 47e 394 HTYPESAF 00000001 F 8 1804= F 74 1359 1392 1412 F 75 918 1133x F 89 28 F 100 275e 520 962 1025 1086 1152 1211 1357x 1469x 1571 F 104 31x F 106 49e F 107 67 F 110 47e F 112 203 HTYPETASK 00000009 F 8 1812= F 75 1142x F 89 30 F 100 1357x F 106 50e HTYPETERM 00000007 F 8 1810= F 28 1302 F 36 780 1961 F 50 664 667 680 682 F 74 333 F 75 1022x 1138x F 79 848 1002 F 103 37 191 860 F 104 102 120 F 123 772 F 127 815 976 F 131 611 F 148 1907 2203 2434x HTYPEVOL 0000000E F 8 1817= F 75 1022x 1140x F 79 850 1004 F 95 274 291 F 123 1434 F 136 103 F 139 56 F 141 41 335 F 143 105 472 HTYPEVT 0000000F F 8 1818= F 100 277e 968 1031 1090 1156 1313 F 148 1954 2454x IAPRPROTO 00002D78 F 31 47= 83 IBIT 00000010 F 28 1261= 1294s 1303s 1321j *IBLKPATCH 00000332 F 20 242= *IBLOCK 00000200 F 20 41= IBSLOTS 00000370 F 20 298= F 21 308 348 F 33 788 *IBSTACK 00000360 F 20 260= ICBLKLOG 00000000 F 16 759= F 55 1267 F 144 1049 ICLINK 00089F10 F 16 757= F 55 1262 1263s F 144 1054s ICNOTBUILT 00089010 F 16 754= F 28 448 450s F 144 1052s ICPROTO 00001DA9 F 16 751= 759e 760a ICSLOT 00088840 F 16 753= F 28 458 F 55 1248 1261 F 144 1029 1051s 1094 1104 ICSTART 00089210 F 16 755= F 55 1254 F 144 1103s IDLECPUCNT 00001DA6 F 16 746= F 55 1265s F 144 1002s 1019s 1038s IDLECPULCK 00001DA4 F 16 744= F 28 445s 451s 465s F 55 1259s 1264s F 144 1007s 1018s 1036s 1056s 1090s 1097s 1105s IDLECPULST 00001DA5 F 16 745= F 28 446 F 55 1247 1258a 1260 F 144 1028 1053 1055s 1091 IDLENAME 00001DA7 F 16 747= F 28 454 IDLETBSZ 00000020 F 16 1014= 1018 1019 F 21 439 F 35 1384 IDLETIME 00002710 F 16 748= F 55 1253 IDLHASHFLD 00003650 F 16 1015= F 22 1001 F 24 1052 F 30 105 113 169 244 F 35 336 IDXACNO 00178800 F 8 1566= 1571e F 60 84 91a 140s F 61 125 133a 1 Jimbo's CREF Extractor 2.0 VRM, System C9303 (18 Mar 93) 12-May-93 12:56 PAGE 48 210a 315 323a F 136 180 192 217 281 F 138 463 473a 514a IDXACNOP 00178802 F 8 1567= F 60 86 141s F 61 127 317 F 136 177 198 283 F 138 466 IDXDIRDA 00178803 F 8 1569= F 60 118 F 61 213s 324a F 136 268 F 138 474 511 *IDXDIRDA2 00178804 F 8 1570= IDXECNT 000000CC F 8 1572= F 60 96a F 61 62 141a 222 332a F 136 299a F 138 520a IDXHASH MACRO F 8 1335= F 60 65 F 61 67 IDXLNTH 00000005 F 8 1571= 1572e F 60 95 96a F 61 140 141a 331 332a F 136 298 299a F 138 519 520a IDXTABPROT 00001F68 F 19 1325= 1342a IDXTBLOCK 00170800 F 19 1326= 1327e 1328e F 61 81 89 120 186 195 197s 203 311 465 F 136 170 IDXTBNUM 00170005 F 19 1330= F 60 65 108 F 61 67 149 219 274 289s 341 455 527 798s F 136 315 F 138 447 736 F 143 409s F 148 293s IDXTBUCKET 00170804 F 19 1336= F 60 71 F 61 74 90s 303 460 543 802s F 136 161 F 138 450 F 148 295s IDXTENTS 00092101 F 19 1331= F 60 142s F 61 61 214s 223 526 796s F 137 198 F 139 123 F 148 294s IDXTFBIT 00170004 F 19 1329= F 60 81 123 F 61 83 121 204 287 288s 312 525 794s F 136 171 F 143 408s F 148 292s IDXTMSBLK 00091180 F 19 1328= F 61 86s 115s 305s 462s F 136 163s IDXTPWR2 00000004 F 19 1334= F 61 277 284 473 786 F 138 737 F 143 399 403 F 148 288 IDXTTEMP3 00170802 F 19 1332= F 61 64s 183 187s 193 IDXTTEMP4 00170803 F 19 1333= F 61 185s 206 IDXTVOL 00090080 F 19 1327= 1334e F 59 585 590 606 F 60 74 F 61 285 286s 509 792s F 136 263 F 138 452 F 143 406s F 148 290s IHALT 00090000 F 13 336= 577e 579e IHBASE 00001D16 F 16 397= F 39 95 F 144 144s IHBLOCKN 00000002 F 16 402= 403 F 144 160 739 IHBLOCKS 00001D18 F 16 403= F 39 101 F 144 167s 731 736 737s IHBUKSIZE 00001D17 F 16 398= F 39 97 F 144 147s IHBUSY 00001D15 F 16 391= F 39 105 121s F 144 132s 178s 703s 705s 721 741s IHMAX 00000800 F 16 401= 402e F 39 98 ILLTOREF 0000261A F 24 520 547= ILSIZEHALT 00002F09 F 33 63j 164= ILSIZFREED 00002F8E F 33 455j 542= IMEMLOOP 000035EA F 37 104= 109j INCPC 00003498 F 36 1091j 1097= INDEXOK 00002363 F 21 2079j 2083= INDPALLOOP 0000316B F 35 489= 501j INITIAL 00002002 F 0 6a F 21 7 34 41= INITIDLE 000020AE F 21 440= 443j INITLOOP 000035E6 F 37 97= 99j INITPAGE 00002000 F 14 241= 242e F 21 4a INITPROC 0000B01B F 21 587a F 148 5 45= 46 121= INSERTIT 00002B85 F 29 678j 694= INTABLSLOT 00000401 F 15 41= F 21 2027s INTASSOCB 00002AFA F 28 23 1448= F 36 1332 1810 INTASSOCBT 00402AF6 F 28 1432= 1448a INTCODE 00178005 F 36 989= 1067s 1088 1133 1144 1153 1169 INTDEVICES 00000312 F 20 118= F 21 12a 285s 1059a 2026 INTENABLE 00098211 F 36 988= 1066s 1125 1 Jimbo's CREF Extractor 2.0 VRM, System C9303 (18 Mar 93) 12-May-93 12:56 PAGE 49 INTMASK 00178803 F 36 991= 1065s 1076 1129s 1160 1179 1209s 1212 INTMASKB 00002AF5 F 28 22 1273 1418= F 40 148 INTMASKBT 01402AE1 F 28 1375= 1418a INTPOLL 0000274E F 25 129j 428= INTSOFF 0000E000 F 6 82= 86e INTSON 0000F000 F 6 81= 83e 85e F 28 113 705 INTSUBCODE 00178802 F 36 990= 1068s 1100 1134 INTTOCHAR 00005903 F 21 1887 F 63 11 295 303= F 70 384 F 128 78 F 138 364 F 148 1017 1598 1666 2212 INVISPROC 00002A38 F 28 921j 929= 934j 1067j IOINTPROC 00003908 F 21 1991a F 41 13 15= IPRPPUCHAN 00001080 F 7 56= F 41 41 IPRPPUSTAT 00002100 F 7 57= F 41 47 IPRSSUSTAT 00003080 F 7 403= F 46 59j 81j 89j 103j 119j ISSAME 000027CF F 26 228j 238= ITSWINDOW2 00003185 F 35 543j 548= IVTIAPR 0000040A F 15 84= F 21 1985s 1987s IVTIOINT 00000408 F 15 80= F 21 1990s 1992s IVTLOC 00178801 F 27 123= 127s 135s IVTMEMPAR 00000404 F 15 62= F 21 1980s 1982s IVTPAGE 00000406 F 15 73= F 21 1995s 1997s F 22 424a 559a IVTPWFL 00000402 F 15 57= F 21 1975s 1977s IVTUERR 0000040E F 15 92= F 21 2005s 2007s IVTXCALL 00000410 F 15 96= F 21 2010s 2012s IVTXREQ 0000040C F 15 88= F 21 2000s 2002s F 28 663 665a 911 913a F 40 32a *IZONEWORD 0000032F F 20 238= JB1 F 21 33= 681 JOINLOGON 00002A9A F 28 1151= 1174j JUSTGO 0000337D F 36 358j 360= KEEPPFPTR 00178801 F 24 570= 574s 579 *KEYH 0400032A F 20 222= *KEYIND 0000032A F 20 223= *KEYPWDATE 0000032B F 20 224= *L 00001000 F 20 204= LASTCORR 00001EEB F 19 154= F 38 1352 F 58 95 F 133 910s 911 966 F 148 841s LASTINTC 00000080 F 28 24 1271 1416= LASTSYS 00178804 F 21 837= 845s 851s 902 LCKFIP 000031EF F 35 839j 846= LCKMMEM 000031F3 F 35 850j 852= LCKPNH 000031EE F 35 833j 842= LEAVEDIRT 000030FB F 35 227j 230= LETTERSPOT 00001460 F 13 330= 331e 332e 333e 334e 335e 336e 337e 338e 339e 340e 341e 355e LF 0000000A F 4 45= F 49 170 219x 223x F 50 273 322 1022 1173 F 81 136 F 85 148 537x 538x 538x 539x 539x 539x 540x 541x 541x F 91 109 149 200 F 100 770 835 LFDONE 00002CC4 F 29 1526j 1532= LFLOOP 00002CC0 F 29 1527= 1531j LFNVS 00002CF8 F 29 1535 1623= LFOVS 00002CF6 F 29 1538 1622= LFWEIGHTAB 01002CF9 F 29 1624= 1627a LFWEIGHTS 00002CFC F 29 1529 1627= LIDFCB 00081F11 F 17 539= F 102 179s LIDLHASHSZ 00000005 F 16 1013= 1014e 1015e 1 Jimbo's CREF Extractor 2.0 VRM, System C9303 (18 Mar 93) 12-May-93 12:56 PAGE 50 LIDLINK 00081F10 F 17 535= F 76 732 733s F 102 187s LIDLOG 00000001 F 17 541= F 76 736 F 102 177 LIDPROT 00001ECA F 17 532= 541e 542a LIDREADING 00080010 F 17 533= F 102 147 185s 413 LIDSESSION 000800C1 F 17 537= F 102 136 183s 416 438 LIDTAG 00160801 F 17 536= F 76 726 *LIMACSALW 00003E10 F 8 1602= LIMACSDIV 00003A10 F 8 1604= F 56 150s 161 162s 167a LIMACSPROJ 00003810 F 8 1605= F 56 132s 148 149s 154a LIMACSSYS 00003C10 F 8 1603= F 56 163s 171a LIMACSUSR 00003610 F 8 1606= F 56 130 131s 136a LIMEXCEED 00002467 F 22 412j 478= LIMEXCEED 000024BA F 22 556j 686= LIMFACCESS 00000040 F 8 1596= F 17 78e F 134 253s LIMITS 0000079C F 8 1592= 1618e LIMITSIZE 00000009 F 8 1618= 2199 2200 F 17 70 F 59 117 396 F 143 591 737 LIMLOGSPOT 00001A50 F 8 1599= F 17 80e LIMPACCESS 00000840 F 8 1597= F 17 79e F 134 254s LIQUID F 32 4= 825 LIQUIDATE 00002DAC F 32 7 34 57= F 55 488j 844j 913j 1111j 1160j 1278j F 56 294j F 57 185j F 58 45j F 130 640j 759j F 131 436a 689a 794a 1160a LIQUIDINIT 00002DA5 F 32 8 35 48= F 148 108j LIST 00178803 F 36 1441= 1463s 1465 LISTEND 00002CF3 F 29 1590j 1616= LISTHEAD 00178803 F 21 1786= 1791s 1807 1814s LISTNOTMT 00002E7D F 32 613j 620= LKSWL 000031E4 F 35 828j 831= LOADDONE 0000000F F 21 659j 667= LOADEND 0000000E F 21 661j 663= LOADFACT 00001DD7 F 16 946= F 29 1543s F 46 1327a F 123 582 LOADLOOP 00000009 F 21 657= 664j LOCKBIT 80000000 F 6 17= F 34 109 154 LOCKBITB 00000010 F 6 16= 17e LOCKLIST 00003096 F 29 1522 F 32 138 F 34 7 101 106= F 37 176 F 43 739 939 F 54 280 F 59 127 401 F 76 109 272 353 593 F 115 365 767 F 131 761 1083 F 132 112 237 F 134 807 F 138 152 724 899 1002 F 143 301 F 144 790 LOCKLIST1 00003098 F 34 108= 115j LOCKLIST2 0000309F F 34 112j 118= 122j LOCKLIST3 000030A3 F 34 120j 125= LOCKPAGE 000031DE F 35 22 820 825= F 57 316 475 608 F 78 96 F 115 347 LOCKQUEUE 0000345F F 36 1003= 1035j LOCKRESFLD 000010C0 F 17 481= F 76 781s 838s F 102 217s LOCKWAIT 0000308B F 21 1278 1834 F 22 451 668 948 949 950 F 24 1032 1033 1034 F 25 317 F 26 41 326 365 441 F 28 53 128 203 226 424 445 507 1544 1569 1599 1621 1658 F 29 634 673 738 818 872 1046 1365 1385 1552 1557 1583 F 30 50 95 170 228 307 F 31 82 F 32 104 403 444 553 559 609 717 F 33 60 236 366 443 605 792 839 894 1031 1218 F 34 8 28 30= F 35 321 334 1044 1385 F 36 395 894 998 1005 1037 1633 1735 1808 F 38 204 425 451 696 743 779 F 39 86 F 43 346 414 1519 2435 2609 2613 F 45 188 260 717 1795 1901 F 46 68 90 129 147 273 360 427 496 595 856 913 1189 1482 1526 F 47 45 114 F 48 1099 1315 F 49 51 264 1 Jimbo's CREF Extractor 2.0 VRM, System C9303 (18 Mar 93) 12-May-93 12:56 PAGE 51 454 524 756 896 F 50 43 146 264 347 380 515 1121 1354 F 51 59 F 52 20 F 53 334 384 434 F 54 116 141 467 516 F 55 65 808 883 961 1104 1150 1223 1234 1259 F 56 61 282 F 57 114 138 274 329 362 550 F 59 748 804 F 60 238 309 F 61 627 688 F 68 186 199 F 74 521 522 756 859 911 F 75 89 214 396 F 76 129 207 280 357 484 599 782 844 F 77 33 F 79 1295 F 83 339 457 1063 1125 F 84 31 101 246 271 F 86 21 65 F 94 77 163 F 97 107 204 F 100 1443 1444 1504 F 101 56 F 102 290 401 F 103 95 199 366 535 618 F 104 125 F 105 52 101 118 F 108 552 702 703 F 110 413 F 115 177 310 500 680 F 121 1611 F 125 255 264 F 126 495 503 580 F 127 201 335 410 520 558 781 925 F 128 58 F 130 548 572 F 131 1437 1443 1448 1453 F 133 508 1193 1234 F 136 466 F 138 650 795 F 139 396 435 F 141 147 724 F 143 588 736 1896 F 144 1007 1090 F 145 140 F 148 575 584 593 798 1266 LOGERR 0000275C F 25 425j 453j 456j 467= LOGHASHTSZ 00000006 F 16 1005= 1006e 1007e LOGMAX 00178801 F 21 1920= 1927s 1939 *LOGSLOTS 00000004 F 6 48= LOGUPC 00000003 F 19 632= 633e 645 647 682e 701 F 43 476e 477e 477e LOKLINK 00160800 F 17 484= F 76 379s 602 606 614s LOKLNTH 00000008 F 17 493= 494e LOKLOCK 00160801 F 17 485= F 76 357s 377s 484s 511s 592s 599s 629s F 102 190s 222a 227s 234s 240s 290s 313s 341s 401s 423s LOKLOG 00000003 F 17 494= F 76 369a 616 LOKPROT 00001ECA F 17 483= 493e 495a LOKRCECNT 00160803 F 17 487= F 76 547s F 102 197s 233s 338s LOKRCELIST 00160802 F 17 486= F 76 370s 491a 493 509 600 F 102 124 205 207s 297a 298 336 407 LOKSERIAL 00160806 F 17 489= 490e F 76 374s 418 420 780 837 F 102 216 LOKVOL 00080086 F 17 490= F 76 376s LOOKHERE 00002AC8 F 28 1296j 1300j 1304j 1313= LOOKHERE 0000335B F 36 263= 273j LOOKLOOP 00002AC6 F 28 1308= 1316j 1319j 1323j 1351j LOOKSGOOD 00003364 F 36 269j 287= LOOP 0000231B F 21 1879= 1883j LOOP 00002769 F 25 524= 543j LOOPEND 00002FE4 F 33 791j 796= LOPFLP 000025CB F 24 285= 288j LOPFNOPA 000025CE F 24 281j 284j 289= LOPFPAL 0000262D F 22 1039 F 24 104 649 651= LOSTVPP 000026A4 F 24 913j 996= LPBFIRSTLN 00160802 F 19 1055= F 51 300s 303s 418 LPBLINECNT 00160801 F 19 1054= F 51 299s 343 378 462 F 86 23 71s F 105 58 LPBLINES 00160804 F 19 1059= F 51 420a F 86 45s 47s 53s 54a LPBLINESZ 00000024 F 19 1058= 1059 F 51 419 F 86 39 41 LPBLOG 00000008 F 19 1064= F 51 362 F 75 221 LPBMAXCNT 00000007 F 19 1057= 1059 F 51 301 F 86 24 67 LPBNEXTLN 00160803 F 19 1056= F 86 38 66s 69s LPBPHYSADR 00160800 F 19 1053= F 51 423 F 75 230s LPBPROT 00001F22 F 19 1052= 1064e 1065a LPC 0012C000 F 19 1016= 1018 F 21 1578 1586s 1588s 1589s 1592s 1595 1596s F 51 59s 60 63 69s 101 103 106 109 112s 112 112s 112s 112 126 133 136 170 172 172 172s 172s 172s 179 185 192 192s 1 Jimbo's CREF Extractor 2.0 VRM, System C9303 (18 Mar 93) 12-May-93 12:56 PAGE 52 192s 192 192s 195 195s 195s 195 195s 199 245s 245s 245 245 245s 251 256 267s 267s 267 267 267s 269s 269s 269s 269 269 274 280 280 280s 280s 280s 284 290s 290s 290s 290 290 312 318 323a 325 330s 336 345 348 348s 348s 348s 348 353 365s 381s 381s 381s 381 381 385 460 464 468 470s 475 478 479s F 86 20 21s 22 26s 26s 26 26s 26 28 30a 32s 37s 65s 73s F 105 51 52s 57 60s 60s 60 60s 60 62 64a 66 66s 66s 66 66s 67s 72 72s 72s 72 72s 74s 91s 96a 101s 102s 102s 102 102 102s 107 109s 109 109 109s 109s 112 114a 118s 128 129s LPCBUFPTR 0016C806 F 19 1025= F 51 284 365s 460 F 75 218 232s F 86 22 F 105 57 LPCBUSY 0008C217 F 19 1028= F 51 101 185 269 269s 290 290s 329 348s 348 LPCDEAD 0008D417 F 19 1034= F 51 60 103 112s 112 172 172s 192s 192 LPCDEV 00002282 F 21 1219a 1570 1575= LPCELOCK 0016C805 F 19 1024= F 26 365s 372s F 51 59s 69s F 53 384s 401s F 75 214s 235s 396s 398s F 86 21s 30a 32s 37s 65s 73s F 105 52s 64a 67s 74s 101s 114a 118s 129s F 131 1448s 1547s LPCFLAGS 0016C807 F 19 1026= 1027e 1028e 1029e 1030e 1031e 1032e 1033e 1034e F 51 329 329 330s LPCLDVVFU 0008D017 F 19 1032= F 51 267s 267 329 F 105 107 LPCLINK 0016C800 F 19 1019= F 21 1588s LPCLIST 00001F21 F 19 1017= F 21 1587 1589s F 75 208 F 140 194 F 148 1281a 1963 LPCLNTH 00000037 F 19 1040= 1041e F 21 1583 LPCLOG 00000006 F 19 1041= F 21 1577 LPCLRCTL 00000201 F 7 1444= F 51 339s LPCMSGID1 0016C802 F 19 1021= F 53 391a LPCMSGID2 0016C803 F 19 1022= F 51 464 470s 475 478 479s LPCNAME 0016C804 F 19 1023= F 21 1596s F 51 254 468 F 53 396 F 140 203 LPCOPEN 0008C417 F 19 1029= F 51 353 F 75 212 212s 397s 397 F 140 210 LPCPCADRS 0016C808 F 19 1035= F 75 217s F 131 1546s F 140 212 LPCPMVALUE 0016C801 F 19 1020= F 21 1586s F 51 63 108 126 179 274 318 336 345 F 140 206 LPCPNTR 00178801 F 26 358= 362s 364 370 LPCPROT 00001F22 F 19 1018= 1040e 1042a LPCRESET 00004DA8 F 26 367 F 51 30 164 169= F 53 392 LPCTIMEOUT 0008C017 F 19 1027= F 26 371s 371 F 51 245s 245 F 53 385 385s LPCUNIT 0008C847 F 19 1031= F 21 1592s 1595 F 75 210 F 148 1970 LPCVVFUDAT 0016C80A F 19 1038= F 51 323a F 105 96a LPCVVFULNS 0016C809 F 19 1036= F 51 325 F 105 91s LPCVVFUMAX 0000005A F 19 1037= 1038 F 105 86 LPCVVFUON 0008D217 F 19 1033= F 51 280 280s 312 F 105 72s 72 102 102s 128 LPCWAITING 0008C617 F 19 1030= F 51 195 195s 381s 381 F 86 26 26s F 105 60 60s 66 66s 109s 109 LPINT 00000080 F 7 1435= F 21 1597s F 51 328s 369s 429s LPLOADVFU 0000020C F 7 1447= F 51 328s LPNOP 00000200 F 7 1442= F 21 1597s F 51 117s 369s LPSETCTL 00000202 F 7 1445= F 51 272s *LPSKIP 00000210 F 7 1450= LPSTATUS 00000220 F 7 1452= F 21 1590 F 51 123 173 1 Jimbo's CREF Extractor 2.0 VRM, System C9303 (18 Mar 93) 12-May-93 12:56 PAGE 53 LPSTBADWRT 00003610 F 7 1476= F 51 181 270j 292j *LPSTBUFE 00000610 F 7 1455= LPSTBUFRDY 00002E10 F 7 1473= F 51 174j 289j LPSTERROR 00000840 F 7 1456= F 51 249 *LPSTFAULT 00000010 F 7 1453= *LPSTILINE 00003410 F 7 1475= *LPSTIPRE 00003010 F 7 1474= LPSTIRDY 00003E10 F 7 1478= F 51 181 LPSTIVFU 00003C10 F 7 1477= F 51 181 259j *LPSTOOP 00000210 F 7 1454= *LPSTPSKP 00001610 F 7 1470= LPSTREADY 00002410 F 7 1472= F 51 175j 459j LPSTUNIT 00001840 F 7 1471= F 21 1591 LPSTVFU 00001410 F 7 1469= F 51 271 314j 335j 338 LPTNAME 0000229C F 21 1594 1603= LPTRACE 00000005 F 16 463= F 51 64 64 127 127 180 180 275 275 319 319 337 337 346 346 LPWRFORM 00001E10 F 7 1481= F 86 44 52s 55 *LPWRHDR 00002C20 F 7 1482= LPWRITE 00000240 F 7 1480= F 51 429s LPWRLNTH 00003080 F 7 1483= F 51 425 *LPWRUITYP 00003460 F 7 1440= *LPWRUOPT 00002080 F 7 1438= *LPWRUPPUE 00003010 F 7 1439= LUACCPROJ 00160807 F 12 19= F 123 1415s 1445s 1482s LUACCT 00160805 F 12 19= F 123 1443s 1480s *LUACS 00081A31 F 12 19= *LUCRT 00081811 F 12 19= LUELEN 00081F10 F 12 19= F 123 1417s LUEQUIVS 00160000 F 12 19= F 123 1430s LUEXT 0016080A F 12 19= F 123 1439s LUFILENM 00160808 F 12 19= F 123 1437s LUINFORD MACRO F 10 459= F 12 19 LULASTREC 00081040 F 12 19= F 123 1424s LULOADPT 00081810 F 12 19= F 123 1422s LULOG 00000004 F 12 19= F 123 1402 1471 1490 LULONG 0000000B F 12 19= 19e F 123 1407 1416 1459 LUNAIN 000000C9 F 9 232= F 50 692 F 79 817 F 112 55 F 131 364 624 777 1132 1688 LUNAOUT 000000CA F 9 233= F 50 673 F 79 815 1465 F 112 53 F 127 945 F 131 632 654 1125 1691 LUNCMCNTL 000000D2 F 9 236= F 67 64 F 126 227 LUNCMLOW 000000C9 F 9 235= F 67 123 F 79 1459 F 104 350 352 F 126 151 298 F 127 698 942 F 131 297 950 1171e 1271 F 133 707 LUNSERR 00000003 F 9 230= F 107 337 612 LUNSIN 00000001 F 9 228= F 75 927 960 F 107 347 602 F 126 143 265 LUNSOUT 00000002 F 9 229= F 107 342 607 *LUPRIV 00081041 F 12 19= LUPROTO 00000000 F 12 19a 19e 19= *LUSAVE 00082611 F 12 19= LUSSTAT 00081121 F 12 19e 19e 19e 19e 19e 19e 19= F 123 1426s LUSYSNM 00160804 F 12 19= F 123 1414s 1454s LUTRANS 00081A10 F 12 19= F 123 1428s *LUTYPE 00082861 F 12 19= LUUNIT 00160004 F 12 19= F 123 1419s 1 Jimbo's CREF Extractor 2.0 VRM, System C9303 (18 Mar 93) 12-May-93 12:56 PAGE 54 LUVOLNM 00160802 F 12 19= F 123 1452s *LUWWC 00082411 F 12 19= LWPP 0000000A F 6 33= 37e 134e F 21 100 189 MAINLOOP 0000387E F 39 73= 106j MAKEDEVNAME 00002316 F 21 1593 1824 1865 1872= MAKEPAL 00002631 F 22 1031 F 24 105 692 701= F 32 760 MAKERUN 000034D2 F 36 1107j 1163j 1196= MAPINFBI 00002606 F 24 106 509 515= F 35 774 F 43 1330 1337 1374 2740 3463 3654 3725 3742 3790 3806 3880 4513 5049 5089 5121 5176 F 44 55 F 57 339 F 82 444 454 F 141 701 F 143 246 2290 MAPINLOOP 000025F1 F 24 420= 426j MAPINMEM 000025EB F 24 107 272 406 412= F 25 387 421 F 28 432 466 1496 F 29 652 742 1391 1513 F 32 106 739 817 F 36 1085 1105 1131 1157 1176 1379 1399 F 46 817 F 50 712 F 54 539 F 55 1244 F 79 1940 1945 F 123 754 872 937 F 131 232 423 427 581 650 661 767 1080 1370 1662 1895 1899 F 133 1290 1304 MAPOUTFBI 0000261B F 24 108 567 573= F 35 779 1342 F 38 640 667 690 879 922 944 951 968 1098 1123 1185 1296 1309 1479 1527 F 43 1335 1343 1392 2784 3469 3491 3662 3728 3745 3797 3815 3883 4521 4697 5060 5095 5125 5190 F 44 65 112 F 55 160 172 255 451 622 769 F 57 89 100 343 426 F 59 115 174 389 430 F 61 91 100 524 562 766 813 F 68 89 F 70 410 435 F 82 220 245 429 448 458 494 530 612 631 F 92 450 477 495 F 101 533 565 F 110 522 552 F 112 393 F 114 85 93 F 115 75 83 F 117 95 234 336 F 119 425 555 F 121 1392 1398 F 131 1787 1801 F 134 238 458 F 135 471 546 F 137 413 443 F 138 648 685 F 141 509 683 708 F 142 280 342 678 741 855 918 F 143 218 252 292 329 350 429 435 511 528 542 551 649 769 1179 1368 2294 2371 2385 2471 MAPOUTLOOP 00002600 F 24 473= 476j MAPOUTMEM 000025FC F 21 618 F 24 109 462 467= F 25 420 F 29 671 750 875 1401 F 32 794 F 79 1944 F 131 422 580 F 133 1289 1303 MAPVOLNFBI 00003803 F 38 877 949 966 1096 1243 1249= *MATEDATE1 80000005 F 8 871= *MATEDATE2 80000006 F 8 872= *MATERUNNUM 04000004 F 8 869= *MATEVOLSIZ 80000004 F 8 870= MAXAFTSIZE 000000FD F 8 1321= 1362 MAXFBITYPE 00000016 F 16 503= 504x 505 506x 507 F 43 3793 5092 F 139 288 MAXIDXSIZE 000000FD F 8 1320= 1321e 1361 F 61 62 220 276 MAXINQUE 000007BA F 19 406= 407e F 48 455 F 50 141 MAXIXOFF 000003DD F 19 407= F 48 458 1071 F 50 136 MAXLOCAL 00000064 F 9 231= F 67 75 F 69 197 285 F 126 141 153 201 251 256 326 MAXMAPVALS 00000004 F 6 166= F 14 244a 248a F 15 130 F 16 188x 188x F 17 312 F 24 419 432 469 F 33 730 988 990 1002 F 69 39 F 107 565 MAXMEMCKS 00000028 F 0 217 F 16 220= 222 MAXPATHCORE 00000200 F 17 410= F 76 107 MAXPROCNUM 00001000 F 17 142= F 123 673 723 1741 MAXQIV 00000100 F 29 790= 803 810 MAXRECWR 000000FB F 17 444= F 84 53 58 MAXRESRCE 0000255D F 23 357= F 102 198 MAXSRAF 00002550 F 23 345= F 83 233 244 F 93 188 MAXTERMNUM 00000200 F 19 405= 416 F 133 192 279 MAXUNIT 000000FF F 18 130= 180 F 79 1453 1542 F 104 341 345 F 126 1 Jimbo's CREF Extractor 2.0 VRM, System C9303 (18 Mar 93) 12-May-93 12:56 PAGE 55 197e MAXVOLNUM 00000040 F 19 1097= 1098 F 21 217 F 43 4054 F 59 650 652 F 130 730 F 137 346 348 F 138 1009 F 139 67 MAYBESMU 00002161 F 21 842 942 948= MCT 0013C000 F 19 636= 638 F 21 1264 1272s 1274s 1275s 1278s 1280 1283s 1285 1291 F 43 340 341j 346s 347 351 352 356s 364 378s 379j 413 414s 415 417 420s 420s 420 420 420s 431s 483 488s 493s 505 507 525 547 602 604 637 643s 700 709 730s 732 734 741s 748 749s 761 820 825 864 894 894 894s 894s 894s 921s 926 932s 933 935s 969 975 992 1017 1017s 1017s 1017s 1017 1018s 1023s 1024 1032 1037 MCTBUSY 0009C014 F 19 644= F 43 347 1018s 1023s MCTDEAD 0009D014 F 19 648= F 43 352 356s 415 488s 493s 525 700 761 864 992 1024 1032 1800 2200 4156 MCTDRIVE 0017C805 F 19 650= F 21 1291 F 43 507 604 709 741s 825 921s 926 MCTELOCK 0017C803 F 19 642= F 21 1278s 1283s F 26 326s 333s F 43 346s 378s 414s 431s F 53 334s 354s MCTLINK 0017C800 F 19 639= F 21 1274s MCTLIST 00001F13 F 19 635= F 21 1273 1275s F 43 340 F 148 1255a MCTLNTH 0000000D F 19 652= 653e F 21 1269 MCTLOG 00000004 F 19 653= F 21 1263 MCTMAXUNIT 0009CA34 F 19 647= F 43 505 602 637 748 749s 932s 969 MCTOPMSGID 0017C802 F 19 641= F 53 341a MCTPMVALUE 0017C801 F 19 640= F 21 1272s 1285 F 43 351 364 417 732 734 1037 1322 1478 2108 2110 F 53 349 F 140 81 MCTPNTR 00178801 F 26 319= 323s 325 331 MCTPROT 00001F14 F 19 638= 652e 654a MCTTIMEOUT 0009C814 F 19 646= F 26 332 332s F 43 420s 420 894 894s 1017s 1017 F 53 335s 335 MCTUNIT 0009C234 F 19 645= F 43 643s 820 933 935s 975 MDV 00134000 F 19 670= 672 F 21 1291 1294s 1296s 1297s 1311s F 43 507 508j 509 532s 534s 537s 563a 604 605j 606 621 645s 647s 652s 654s 709 710j 726 728a 730s 731s 738s 741s 743s 744s 751s 756s 756s 756 756 756s 757 768s 770s 825 826j 828 851s 863 865s 866s 870s 871s 872s 908s 920 942 948 949 957 988 989j 991 993s 994s 1002s 1003s 1004s 1163s 1164s 1165s 1166 1166s 1166s 1166s 1166 1172s 1172 1172s 1172 1172s 1178 1178s 1178s 1178 1178s 1183s 1183s 1183 1183s 1183 1189s 1190 1211 1217s 1222 1237s 1321 1406s 1436 1442 1447s 1477 1479 1517 1530s 1533 1534s 1536 1537s 1538s 1628a 1630s 1631s 1632 1635 1642s 1644 1649s 1653 1658s 1661s 1663 1681 1686 1691s 1693s 1696s 1697 1697s 1697s 1697 1697s 1799 1802 1806s 1807 1808 1812 1813s 1816 1862a 1863 1871a 1873s 1873s 1873 1873s 1873 1877s 1883a 1884 1896s 1896s 1896 1896 1896s 1898 1945 1997s 2009s 2016 2017 2021s 2035 2037s 2107 2112 2124 2199 2203 2204 2205 2206s 2207s 2214 2215s 2229s 2230 2271s 2282s 2289s 2290 2294s 2297s 2311 2313s 2389s 2398 2399s 2436 2499s 2499s 2499 2499s 2499 2500s 2500 2500s 2500s 2500 2537 2541s 2591s 2592 2593s 2614 2675 2708 2713s 2717 2728 2730 2732 2733 2833s 2847s 2853 2858s 2873s 2874s 2930s 2931s 2932s 2933s 2949s 2951s 2953s 2957s 2962s 2964s 3002s 3004s 3037 3043 3044 3045 3046 3067s 3136 3239 3243 3245s 3245s 3245s 3245 3245 3246s 3294 3295s 3345 3346s 3353s 3389 3393 3396s 3397s 3479s 3484 3535 3540 3541 3542 3543 3544s 3589 3604 3730s 3747s 3759 3761s 3763s 3799 3820 3822 3828 3837 3837s 3837s 3837s 3837 3871 3876 3878 3945s 3946 3953 3955 3972 3973 4067 4082s 4087s 4092 4093 4105s 4146 4155 4158 4172s 4174s 4186s 4189s 4189s 4189s 4189 4189 4232s 4235 4236s 4273 4277 4282 4288 4290 4295 4344 4349s 4356s 4425s 4430 4440 4445 4451 4453 4454 4459 4507 4510 4525 4527s 4564 4571s 4573a 4575 4581s 4584 4586s 4603 4611 4628 4643 4664s 4665 4676s 4677 4687s 4688 4699s 4700 4800 4803 4834s 4908 4912s 4912s 4912s 4912 4912 4915 1 Jimbo's CREF Extractor 2.0 VRM, System C9303 (18 Mar 93) 12-May-93 12:56 PAGE 56 4953 4954 4955 4960s 5063 5087 5097 5109 5115 5120s 5120s 5120 5120 5120s 5143 5207s F 58 143 144j 148s 148s 148s 148 148 149j F 140 68 69j 77 79 80 84 86 88 97 99j F 141 942s 945s 949s MDVBADDISK 00094012 F 19 705= F 43 1808 4912s 4912 MDVBADSKS 00094212 F 19 706= F 43 1222 1807 4189s 4189 MDVBFDSTAT 00174809 F 19 747= 748e F 43 532s 652s 768s 2206s 2214 2717 2732 3484 4273 4290 4295 4349s 4430 4453 4459 4571s 4573a 4575 4834s MDVBTRXDA 00174816 F 19 758= F 43 1644 2964s F 138 1101 1106 MDVBTRXPPL 00174817 F 19 759= F 43 1630s 1649s 1681 3589 MDVCABLE 00095231 F 19 701= F 43 621 1479 1806s 3541 F 140 84 MDVCHERLIM 00000032 F 19 729= F 43 4690 MDVCHERRS 00096083 F 19 728= F 43 4687s MDVCHKCYL 00174814 F 19 756= F 43 1436 1447s 3946 MDVCHKHEAD 00095610 F 19 681= F 43 1183 1183s 1697 1697s 3245 3245s 3837 3837s 5120s 5120 MDVCHKSTAT 00095210 F 19 679= F 43 756s 756 1166s 1166 1172s 1172 2499s 2499 MDVCNTL 00095F11 F 19 703= F 43 730s 1321 1477 1799 2107 2199 4155 F 140 80 MDVCOUNTS 00174806 F 19 740= 741e 742e F 43 3535 3544s MDVDIDXFER 00094011 F 19 685= F 43 1189s 1211 4236s MDVDKERLIM 00000014 F 19 731= F 43 4582 4702 MDVDKERRS 00097083 F 19 730= F 43 3973 4507 4564 4581s 4611 4643 4699s 4803 MDVERRFLDS 000949C3 F 19 732= F 43 1997s 2271s 3730s 3945s MDVERRWORD 00174803 F 19 710= 712e 714e 716e 717e 718e 720e 721e 722e 724e 726e 728e 730e 732e F 43 1642s 2833s MDVFLERLIM 00000005 F 19 725= F 43 4667 MDVFLTERRS 00095043 F 19 724= F 43 4664s MDVFMTDAT 00174810 F 19 753= F 43 2949s 3043 3044 3067s 4067 F 138 1030 F 141 945s F 143 385 F 148 230 246s MDVIDLESER 00174813 F 19 755= F 43 563a 3346s 3397s MDVLINK 00095F10 F 19 683= F 43 743s 942 948 3243 3393 F 140 97 MDVLIST 00001F15 F 19 669= F 43 742 744s 941a 3242a 3392a F 58 143 F 137 65 130 573 F 140 68 96a F 141 248 F 148 1268a MDVLNTH 00000020 F 19 768= 769e MDVLOCK 00001F14 F 19 668= F 43 740a 746a 940a 954a 3241a 3253a 3391a 3404a F 58 142a 154a F 137 64a 71a 91a 129a 145a 156a 572a 583a 592a 599a F 139 523a 530a F 140 67a 91a 95a 103a F 141 81a 92a 247a 255a 330a 369a 376a 882a 948a F 148 1266s 1269s MDVLOG 00000005 F 19 769= F 43 725 729 956 MDVLOGCNT 00095410 F 19 680= F 43 1178s 1178 F 58 148s 148 MDVLOPSTAT 0017480B F 19 749= F 43 647s 2207s 2215s F 100 229 MDVMAIFLD 00094033 F 19 718= F 43 2389s 2591s MDVMAXSEEK 00174804 F 19 737= F 43 1165s 1442 1632 2205 2933s 2957s F 148 143 MDVNAME 00174805 F 19 738= F 43 738s 2124 2675 2728 3037 3540 3820 3876 4093 4282 4445 4915 4953 F 44 180 215 F 137 66 282 574 F 139 132 F 140 77 F 141 250 311 F 148 328 MDVNOERRS 00094213 F 19 714= F 43 1661s 1696s 2230 2398 2592 2873s 3871 4584 4665 4677 4688 4700 5109 MDVNOERRSB 00000210 F 19 713= 714e 717e 718e F 43 2832 MDVNOLOG 00094613 F 19 720= F 43 2399s 2593s 2874s 4277 4440 MDVNOLOGB 00000610 F 19 719= 720e F 43 2832 MDVNOSUB 00094013 F 19 712= F 43 1517 2035 2311 4525 MDVNOSUBB 00000010 F 19 711= 712e 717e 718e 1 Jimbo's CREF Extractor 2.0 VRM, System C9303 (18 Mar 93) 12-May-93 12:56 PAGE 57 MDVPC 0017481B F 19 764= F 43 851s 866s 994s 1217s 1237s 1406s 2009s 2021s 2282s 2297s 2713s 2847s 2858s 3353s 3479s 3747s 3763s 4356s 5207s MDVPPUSTAT 0017480A F 19 748= F 43 534s 645s 2733 4425s 4454 MDVPROT 00001F16 F 19 672= 768e 770a MDVREADCNT 00174806 F 19 741= F 43 3542 3761s MDVREADY 00095010 F 19 678= F 43 1816 1873s 1873 1896 1896s 2500 2500s F 138 1027 F 141 84 MDVREWRITE 00094813 F 19 721= F 43 3799 4586s MDVRZERLIM 00000005 F 19 735= F 43 4187 MDVRZPROBS 00174815 F 19 757= F 43 1691s 1693s 4146 4172s 4174s 4186s MDVRZRTLIM 00000005 F 19 734= F 43 4151 MDVSAVER34 0017481C F 19 765= F 43 863 871s 991 1003s MDVSAVER67 0017481E F 19 766= F 43 865s 870s 993s 1002s MDVSECPTRK 0017400B F 19 709= F 21 1294s F 43 1163s 1533 2931s 2951s 3955 F 140 86 F 141 877s MDVSEEKADR 00174808 F 19 744= F 43 1530s 1534s 1537s 1538s 2204 2730 3822 3878 4288 4451 MDVSIZE 0017481A F 19 762= F 43 2962s F 138 1104 MDVSKERLIM 00000005 F 19 727= F 43 2232 4679 MDVSKERRS 00095843 F 19 726= F 43 2229s 3972 4510 4603 4628 4676s MDVSPECDA 00094023 F 19 717= F 43 5063 MDVSTATE 00094231 F 19 686= F 43 509 537s 606 654s 751s 757 770s 828 872s 1004s 3396s MDVSTDT 00000004 F 19 694= F 43 1005 2020 2296 2712 2857 3762 MDVSTIDLE 00000007 F 19 697= F 43 3352 MDVSTINIT 00000000 F 19 690= F 43 750 MDVSTKILL 00000005 F 19 695= F 43 1236 MDVSTONCYL 00000003 F 19 693= F 43 2008 2281 2846 3746 MDVSTPFAIL 00000006 F 19 696= F 43 1405 5206 MDVSTRUN 00000001 F 19 691= F 43 536 653 769 1216 3395 3478 MDVSTSEEK 00000002 F 19 692= F 43 758 4355 MDVSUB 00094A13 F 19 722= F 43 2037s 2313s 2537 2541s 3828 4527s 5087 5115 MDVSUBSDA 00174818 F 19 760= F 43 1653 3004s F 143 318s MDVSUBSPPL 00174819 F 19 761= F 43 1631s 1658s 1686 3604 MDVTIMCODE 0017480D F 19 751= F 43 2017 2294s MDVTIMESER 00174812 F 19 754= F 43 1628a 1862a 1871a 1883a 3246s 3295s MDVTRKPCYL 0017400A F 19 708= F 21 1296s F 43 1164s 1536 1663 2932s 2953s 3953 F 140 88 F 141 878s MDVUNIT 00095830 F 19 682= F 43 731s 920 1802 1945 2016 2112 2203 2290 2708 2853 3136 3759 4158 4344 4800 4908 F 140 79 MDVVOLFLD 00000080 F 19 676= 677e F 43 4081 4104 4104 4959 4959 F 138 905 905 1033 MDVVOLNAME 0017480E F 19 752= F 43 1877s 2930s 3002s 3045 3046 F 137 134 F 139 527s MDVVOLUME 00094080 F 19 677= F 21 1297s F 43 1190 1635 1863 1884 1898 2436 2614 4092 4954 4955 5143 F 137 68 136 578 F 138 1025 F 141 252 MDVWORDA 00174800 F 19 673= 677e 678e 679e 680e 681e 682e 683e F 43 950s 4082s 4105s 4960s F 138 906s 1034s MDVWPROT 00094811 F 19 699= F 43 1812 1813s MDVWRITCNT 00174807 F 19 742= F 43 2289s 3543 MDVWWCHK 00094413 F 19 716= F 43 5097 MDVWWCHKB 00000410 F 19 715= 716e 718e MEMBITS 00178802 F 21 834= 888s 912 MEMCHKLOCK 00001CC9 F 16 221= F 25 317s 340s MEMCKSUM 00001CCA F 16 222= F 25 333 F 28 339s 1 Jimbo's CREF Extractor 2.0 VRM, System C9303 (18 Mar 93) 12-May-93 12:56 PAGE 58 MEMDOUBLE 00002140 F 21 857= 859j MEMERRFLAG 00000462 F 15 191= F 21 75s 729s F 25 112s 484s MEMLIST 00001C6D F 16 54= 64e F 33 69 72s 126 129s 135 137s 447a 452a MEMLISTMAX 0000000A F 16 64= 66 66 F 33 61 95 237 271 371 453 615 1113 F 37 95 F 130 554 MEMLOCK 00001C6C F 16 52= F 28 53s 55s F 33 60s 79s 443s 491s MEMMASK 00178801 F 21 832= 865s 893 908 MEMORYGONE 00003026 F 33 944j 955= MEMPFILE 00178803 F 21 836= 844s 846s 895s 901 907s MEMSLOT 000026EE F 25 171j 246= MEMVAR1 00000458 F 15 175= F 33 776s 801 F 37 80s 93 126 MEMVAREG1 0000045B F 15 178= F 33 771s 802 835s 856 889s 909 1227s 1233 MEMVAREG2 0000045C F 15 179= F 33 769s MEMVARPC 00000459 F 15 176= F 33 728s 742 768s 803 934s 946 986s 997 1030s 1048 1075s 1124 1217s 1238 MEMVARPC2 0000045A F 15 177= F 33 834s 857 887s 910 MERGEPPLS 00002396 F 21 396 2343 2348= MERRABDATA 00098610 F 25 94= 165 *MERRABIF 00000001 F 25 88= *MERRABIP 00000005 F 25 92= *MERRABOF 00000003 F 25 90= MERRACTION 00098840 F 25 95= 342s 424s 434s MERRBLOCK 00178802 F 25 101= 126s 376s 473 MERRCAR 00178804 F 25 103= 127s 358s 485 487 MERRCODE 00098040 F 25 86= 94e 124s MERRCODEMAX 00000005 F 25 93= 118 MERRFIX 00000001 F 25 97= 341 MERRFLUKE 00000000 F 25 96= 433 *MERRNRIF 00000000 F 25 87= MERRNRIP 00000004 F 25 91= 128 *MERRNROF 00000002 F 25 89= MERRPAGE 00000002 F 25 98= 423 MERRPFILE 00178801 F 25 100= 131s 132 200 226 248 320 429s 447 472 MERRPPL 00178803 F 25 102= 374s 389 MERRVADR 00099180 F 25 99= 125s 250 323 332 MERRWORDA 00178800 F 25 85= 86e 95e 99e 471 MFBILAST 00000465 F 15 200= F 24 538s F 35 1065s F 38 1258s MHALT 000D0000 F 13 337= 494e 502e 503e 504e MINBLKLIM 00000064 F 37 319 326= MINVERSION 0000000D F 19 75= F 21 1006 *MIRRORSECT 00000380 F 8 861= MMAGE 0000253F F 23 63= F 29 1227 MMAGEINC 00002540 F 23 104= F 29 1225 MMAGEINCD 00002541 F 23 105= F 29 1226 MMAXWSX 00002542 F 23 109= F 29 1233 MMHYSPARM 00002548 F 23 225= F 29 1031 MMIDLABSMIN 00002544 F 23 146= F 29 1041 MMIDLETTMIN 00002543 F 23 126= F 29 1019 1585 MMIDLSPEED 00002545 F 23 194= F 29 1393 MMLOCKPARM 00002547 F 23 221= F 29 1165 MMPRRATIO 00002546 F 23 207= F 29 1072 1167 MOFBILAST 00000466 F 15 201= F 24 577s MONBIT 00003010 F 6 148= F 22 330j F 24 840j 908j F 28 553j 561j 1 Jimbo's CREF Extractor 2.0 VRM, System C9303 (18 Mar 93) 12-May-93 12:56 PAGE 59 F 35 193j 606j 828j 850j 1199j F 48 300 1005 F 55 1149 F 78 59s MONHDR 00001D16 F 16 396= 399e F 144 726a MONHDRLEN 00000008 F 16 399= F 144 727 MONITRPROC 00003870 F 28 353 F 39 35 40= MONMSR 0000F1F0 F 6 85= F 21 585 F 28 412 453 1490 F 46 812 F 54 530 F 131 438 691 796 1162 *MONMSRIOFF 0000E1F0 F 6 86= MONPF 00000080 F 0 229e F 6 136= 153e 155e F 14 218e 221e 225e 229e 232e 235e 238e 242e 246e 250e F 16 189a F 20 312e F 21 87 128 162 186s 258 535 656 660 772 786 2496 F 25 265 271 273 318 F 33 469 631 775 778s 800 943 F 37 86 F 43 2699 3657 F 46 255 F 51 513 F 75 226 F 142 793 F 143 1398 F 148 65 68 70s 83 MONREAD 0000241D F 22 229j 243= MONSIDE 00003233 F 35 1028j 1030= MONSPREAD 0000253E F 21 2437 F 23 20= MONTVERNIN 000029ED F 28 728j 730= MONVM 00001ECB F 18 400= F 21 148 150s F 22 245 F 32 752 MONZA 000029E7 F 28 714j 716= MORELOAD 00002127 F 21 769= 776j MOVEON 00002BB5 F 29 821= 824j MOVETRMGP 00003379 F 36 16 351 356= 396 F 104 126 F 126 581 MOVETRMGX 0000337E F 28 684 F 36 17 225 383 389= F 124 328 414 F 125 849 882 MPEBROLP 00002740 F 25 405= 411j MPEDATE 00001CF3 F 16 228= F 25 451s 454 MPEPFILE 00001CF2 F 16 227= F 25 449s 452 MPEUPCLP 00002739 F 25 393= 402j 407j MPLOOP 0000239B F 21 2354= 2369j MQEACCT 0016000C F 17 614= F 127 136a 154a 163a MQEACCTLEN 00000014 F 17 613= 614 618e F 127 107 163a MQEBUF 00160801 F 17 607= 611e 618e F 127 126a 387a MQECLASS 00082101 F 17 609= F 36 638 F 127 204 238 343 MQEHEADLEN 00000008 F 17 611= F 127 93 115a 124a 125 MQELENGTH 000808B0 F 17 604= F 127 108s 381 392 MQELINK 00081F10 F 17 605= F 127 228s 370 371s 411 412s 413s 568 MQELOGSIZ 00080040 F 17 603= F 127 105s 218 224 248 275 292 396 571 MQEMAXCORE 00000200 F 17 617= 619e F 127 226 MQEMAXLEN 000007E8 F 17 619= F 127 95 MQEOVHDLEN 00000018 F 17 618= 619e F 127 98 MQEPRIVS 00160802 F 17 610= F 127 132s 134s 137 139 147 MQEPROC 00080101 F 17 608= F 127 171 190s MQEPROT 00001ECB F 17 601= 622a MQESTART 00160800 F 17 602= 618e MQETEXT 00160020 F 17 615= F 127 115a 124a MSBLKFIELD 00001180 F 8 38= 738e 747e 749e 779e 1694e F 16 567e 603e F 17 57e 375e F 18 172e 387e F 19 1135e 1139e 1328e F 23 344x F 35 782s F 38 439 F 43 3597 3612 3884 4519 5061 F 44 153 F 55 615 F 57 85s 96s 117 121 297 F 82 495 F 83 1043e F 100 466s 510s F 101 499s F 113 215s 229s 271s 316s 326s F 115 582s 592s F 117 226s F 119 355 F 134 222s F 135 1197s F 138 475s 512s 644s F 141 464 667 F 142 444s F 143 509 MSBLKLOG 00000018 F 6 30= F 8 38e 39e 1612 1613 1614 1615 1834 1835 1838 2247 F 18 174 175 176 208 F 19 1118 1119 1120 1121 1123 F 35 677 F 55 30 31 32 MSBLKMASK 0000254F F 23 344= F 38 456 720 F 43 1529 3587 F 55 230 695 F 57 292 449 471 579 F 60 72 125 F 83 309 414 F 143 165 1 Jimbo's CREF Extractor 2.0 VRM, System C9303 (18 Mar 93) 12-May-93 12:56 PAGE 60 359 MSECSD 05265C00 F 8 177= 184e F 23 356x MSECSH 0036EE80 F 8 176= 177e 183e F 23 354x F 46 1413x 1414x MSECSM 0000EA60 F 8 175= 176e 182e F 46 799 F 123 909 F 124 739 F 130 301 734 MSECSS 000003E8 F 8 174= 175e F 21 1030 1036 1043 1049 F 25 455 F 29 945 949 1443 F 43 3289 F 46 223 539 659 1414x F 47 28 130 F 53 72 F 56 256 F 67 779 780 F 123 912 915 F 124 711 724 727 F 126 636 637 643 F 130 297 F 131 1913 F 133 882 F 148 741 *MSGACCT 00160008 F 17 625= MSGCLASS 00082100 F 17 625= F 70 215s *MSGCLSOPR 00000002 F 17 625= MSGCLSRESP 00000000 F 17 625= F 70 334 MSGCLSSPLR 00000003 F 17 625= F 70 214 *MSGCLSTERM 00000004 F 17 625= *MSGCLSVERB 00000001 F 17 625= MSGDEFS MACRO F 10 251= F 17 625 MSGLOCK 00001ECA F 17 599= F 127 201s 240s 255a 258s 269s 335s 358a 365s 375s 410s 414s 520s 527s 558s 562s MSGPOST 0000340B F 36 639j 712= *MSGPRIVBKP 00002E10 F 17 625= *MSGPRIVCM 00002810 F 17 625= *MSGPRIVG1 00003E10 F 17 625= *MSGPRIVG2 00003C10 F 17 625= *MSGPRIVG3 00003A10 F 17 625= *MSGPRIVG4 00003810 F 17 625= *MSGPRIVG5 00003610 F 17 625= MSGPRIVID 00000010 F 17 625= F 70 439x 490x F 79 1153x MSGPRIVLID 00000410 F 17 625= F 127 139 147 *MSGPRIVMGR 00002C10 F 17 625= *MSGPRIVMR 00003210 F 17 625= *MSGPRIVMW 00003010 F 17 625= *MSGPRIVNXO 00002A10 F 17 625= *MSGPRIVOPR 00003410 F 17 625= MSGPRIVOS 00000210 F 17 625= F 70 439x 490x F 79 1153x F 131 386 MSGPRIVS 00160801 F 17 625= F 70 205s F 131 387s MSGPROC 00080100 F 17 625= F 70 204s F 79 1126 1194 F 131 135 385s MSGPROTO 00001ECB F 17 625= 625a MSGRTEXT 00160807 F 17 625= F 79 1130 1133 1165 1183 1191a 1194 MSGSTEXT 00160802 F 17 625= F 70 206s 213s 216a 217 F 131 135 MSPROC 0000396B F 28 300a F 43 6 291 337 339= MSQ 0012C000 F 19 803= 805 F 43 1194 1195j 1200 1201j 1205 1206j 1284 1292 1365 1376 1385 1388 2388 2392 2394 2400 2408 2427 2438 2439 2590 2594 2598s 2605 2616 2617 2836 4228 4231 F 141 134 140s 144s 150s 158s 159s 831 MSQACTAD 0016C802 F 19 819= 820e F 42 45s F 43 1284 1292 1365 2408 MSQBLOCK 0016C801 F 19 818= F 32 389s F 35 738s F 42 38 44s F 43 1388 2427 2836 4228 F 125 269 F 141 144s 831 MSQFORMAT 00003210 F 19 809= F 43 2392 F 141 825 MSQINLOCK 00001F16 F 19 800= F 22 451s 457s 668s 674s 772s 831s 948s 979s 984s 1009s F 24 1032s 1045s F 32 559s 565s F 43 2435s 2441s 2609s 2611s F 100 1443s 1459a 1463s F 125 255s 278a 282s F 141 147s 724s 733a 737s 833a 998s F 142 718s 894s F 143 1896s 1911a MSQLINK 0008DF10 F 19 816= F 32 621 625s 632s F 42 61 62s 63s 71 72s F 43 2439 2617 F 100 1449 F 141 157 158s 159s MSQLNTH 00000004 F 19 823= 824e 1 Jimbo's CREF Extractor 2.0 VRM, System C9303 (18 Mar 93) 12-May-93 12:56 PAGE 61 MSQLOG 00000002 F 19 824= F 32 383 662 F 35 729 F 42 42 F 43 4230 F 141 133 137 MSQMAIFLD 00003430 F 19 810= F 22 454s 671s 769s 828s F 35 734s F 43 2388 2590 MSQOUTLOCK 00001F17 F 19 801= F 32 609s 636s 654s F 43 2613s 2619s F 100 1444s 1453s 1464s F 125 264s 270s MSQPPPTR 0016C802 F 19 820= F 32 386s 630 F 35 736s F 43 2605 F 100 1451 MSQPROT 00001F18 F 19 805= 823e 825a MSQREINIT 00003010 F 19 808= F 43 2394 F 141 997 MSQSNEWAD 00003E10 F 19 814= F 22 453 670 827 F 143 1900 MSQTYPE 0008C0F0 F 19 807= F 35 734s F 42 49s F 43 2388 2392 2394 2400 2590 F 141 140s MSQTYPFLD 00003C20 F 19 815= F 43 2400 MSQWORDA 0016C800 F 19 806= 807e 816e F 32 384s F 35 731s F 42 43s MSQXPTR 0016C803 F 19 821= F 32 385s 655 659 F 35 732s 769s 781 F 42 46s F 43 1376 1385 2594 2598s F 143 1902s MSQZPAGE 00003C10 F 19 811= F 22 453 827 MSREADREQ 00003936 F 22 455 672 770 829 F 32 562 F 42 29 34= F 142 716 892 F 143 1899 MSRFORMON 000001F0 F 6 84= 85e 86e MSRFRELOC 00000040 F 6 77= 84e F 28 715 725 F 35 851 854 1029 1032 1083 F 65 187 190 F 78 94 F 79 187 190 319 322 F 81 88 91 F 82 140 145 F 83 63 66 F 84 95 100 F 85 56 57 85 165 310 F 86 59 62 F 87 72 84 F 91 189 193 F 92 245 250 F 101 241 243 F 103 339 342 353 356 F 105 93 98 F 119 124 127 F 121 1005 1011 1061 1066 1110 1118 F 124 389 405 F 125 958 1020 F 127 116 F 128 97 100 F 130 195 198 F 131 184 188 194 549 553 F 132 302 306 F 134 620 625 F 139 600 604 F 141 669 672 687 689 697 699 F 143 225 230 948 951 1151 1156 1465 1470 1948 1953 1993 1998 F 145 69 72 MSRFRELOCB 00003210 F 6 68= 77e F 28 532s F 40 193s F 65 185 F 78 54s F 79 185 317 F 80 166 F 103 337 351 F 119 122 F 121 1003 1059 1108 F 128 96j F 130 193 F 134 618 F 139 598 675 F 143 67 F 145 68j MSRIAPRB 00002A10 F 6 61= F 31 172 MSRINTCNT 00002040 F 6 56= 81e 81e 82e 82e F 28 187 187 F 36 1454s 1455s MSRIRELOC 00000010 F 6 79= 84e MSRIRELOCB 00003610 F 6 70= 79e F 28 509 713 F 39 93 F 40 73 146 F 124 387 F 127 133 F 131 237 F 139 279 423 MSRMON 00000100 F 6 74= 84e MSRMONB 00002E10 F 6 63= 74e F 67 911 *MSRMPEPRCB 00001E10 F 6 54= MSRPFINTE 00000800 F 6 75= F 43 345 345 827 827 990 990 1308 1319 5194 5201 F 45 187 187 503 503 555 555 F 46 192 192 F 48 361 401 929 969 979 1246 MSRPFINTEB 00002810 F 6 58= 75e F 26 93s 93 F 48 1368s MSRPRELOC 00000020 F 6 78= 84e F 125 958 1020 MSRPRELOCB 00003410 F 6 69= 78e F 28 533s F 40 194s MSRRSTRT 00000080 F 6 52= F 28 736 F 124 397s MSRSLOT 00003840 F 6 72= F 21 65 670 706 MSRSRELOC 00000080 F 6 76= 84e F 28 729 742 F 78 94 F 91 126 129 F 92 169 171 F 93 67 73 F 94 58 63 F 95 260 301 351 439 F 97 49 184 F 98 90 94 F 103 104 109 F 120 235 258 F 121 228 234 254 260 F 123 685 686 969 1338 1340 1461 1463 F 125 958 1020 1186 1191 F 127 384 389 F 130 408 418 F 133 260 261 346 F 135 1 Jimbo's CREF Extractor 2.0 VRM, System C9303 (18 Mar 93) 12-May-93 12:56 PAGE 62 1114 1119 F 136 120 121 285 F 139 76 77 150 283 291 425 430 677 681 F 140 60 61 F 141 516 518 523 525 F 142 53 55 81 83 F 144 443 444 F 145 127 174 MSRSRELOCB 00003010 F 6 67= 76e F 28 531s F 40 192s F 78 55s F 90 95 F 103 102 F 120 28 F 121 226 252 F 125 1184 F 130 407j F 135 1112 MSRTRACEIB 00002C10 F 6 62= F 28 919s F 40 83 221s F 125 399 401s 727s MSSHUTDOWN 00002533 F 22 439 664 766 825 978 1079 1085= MSTRACE 00000000 F 16 458= F 43 365 365 418 418 486 486 631 631 648 648 1038 1038 2019 2019 2210 2210 2293 2293 2710 2710 2855 2855 3137 3137 3760 3760 4161 4161 4911 4911 MS_RESET 000039A9 F 21 1281 F 26 328 F 43 8 293 469 479= F 53 342 MTC 0013C000 F 19 863= 866 F 21 1633 1641s 1644s 1645s 1685 1693s 1694s 1696s 1697s 1737 1745s 1747s 1749s 1750s 1803s 1816s 1817 1834s 1835 1839s F 45 180 181j 185s 188s 189 193 194 198s 206 221s 225j 259 260s 261 265 269 290s 329 331 334s 340s 347 354 376 422 430 444 446s 455s 495s 496 501 516 538 540s 546 553 557 575s 576 585s 586 595 MTCBUSY 0009DF16 F 19 884= F 45 189 269 347 444 446s 495s 538 540s 553 MTCDEAD 0009C816 F 19 881= F 45 194 198s 265 334s 340s 422 516 557 576 586 1148 1846 MTCDEV 000022B3 F 21 1226a 1675 1681= MTCDRIVE 0017C807 F 19 888= F 21 1803s F 45 354 430 501 MTCELOCK 0017C803 F 19 870= F 21 1834s 1839s F 26 441s 448s F 45 188s 221s 260s 290s F 53 434s 454s F 74 756s 758s F 100 1504s 1506s F 101 56s 58s MTCLINK 0017C800 F 19 867= F 21 1644s 1696s 1749s MTCLIST 00001F1C F 19 864= F 21 1643 1645s 1695 1697s 1748 1750s F 45 180 F 148 1293 1325 1357 MTCLOG 00000004 F 19 890= F 21 1632 1638 1684 1690 1736 1742 MTCMERASE 00000260 F 7 1421= F 45 943 947s 958 MTCMFUNC 00000230 F 7 1403= F 45 204s 344s 358s 363s 589s 1155 1158s 1690 1693s MTCMREAD 00000240 F 7 1417= F 45 1039 1043s 1066 *MTCMRESET 00000200 F 7 1401= MTCMWRITE 00000250 F 7 1419= F 45 1473 1477s 1491 MTCOPMSGID 0017C802 F 19 869= F 53 442a MTCPMVALUE 0017C801 F 19 868= F 21 1641s 1693s 1745s F 45 193 206 261 331 595 F 53 450 F 140 120 149 178 MTCPNTR 00178801 F 26 434= 438s 440 446 MTCPROT 00001F1D F 19 866= 890e 891a MTCREQUEST 0017C805 F 19 877= F 45 185s F 77 36s MTCTIMEOUT 0017C804 F 19 876= F 26 447s F 45 575s 585s F 53 435s MTCTYPE 0009C426 F 19 880= F 21 1694s 1747s 1817 F 53 440 F 148 1296 1328 1360 MTCUNIT 0009CA36 F 19 882= F 45 455s 496 546 MTCUPC 00000004 F 19 886= 887e 888 F 21 1831 F 45 352 427 MTDIOSIZE 0000C000 F 7 1154= F 87 99x F 98 117x MTDRIVE 0000426E F 21 1819a F 45 10 661 706 708= *MTDST9 00003010 F 7 1369= MTDSTBOT 00003610 F 7 1373= F 45 787j 836j 1177j 1235j F 77 78j MTDSTBREW 00003A10 F 7 1376= F 45 1166j *MTDSTDEN 00003E10 F 7 1379= MTDSTEOT 00003210 F 7 1371= F 77 85j 1 Jimbo's CREF Extractor 2.0 VRM, System C9303 (18 Mar 93) 12-May-93 12:56 PAGE 63 MTDSTPRS 00003C10 F 7 1378= F 21 1799j MTDSTRDY 00003410 F 7 1372= F 45 736j 835j 965j 1077j 1176j 1502j 1714j 1849j *MTDSTTPK 00003A10 F 7 1377= MTDSTWPRT 00003810 F 7 1375= F 45 966j 1403j 1503j F 74 1012 1029 MTFNBKSP 00000006 F 7 1408= F 45 782 MTFNCYCLE 00000001 F 7 1404= F 45 832 MTFNDENSEL 0000000C F 7 1413= F 45 356 1339 1345 MTFNDSCIOF 00000008 F 7 1410= F 45 203 343 MTFNDSCION 00000009 F 7 1411= F 45 588 MTFNFWSP 00000007 F 7 1409= F 45 893 *MTFNOFFL 0000000A F 7 1412= MTFNREWIND 00000002 F 7 1405= F 45 1156 1172 MTFNSEFB 00000004 F 7 1406= F 45 1230 MTFNSEFF 00000005 F 7 1407= F 45 1285 MTFNTRSEL 00000010 F 7 1414= F 45 361 1352 1358 MTFNWFM 00000018 F 7 1415= F 45 1397 MTIDSTEST 00002080 F 7 1174= F 53 458x 458x 460x 461x 462x MTINTREQ 00000080 F 7 1399= F 45 947s 1043s 1477s 1693s *MTLD2STAT 00000220 F 7 1381= MTLDDRVST 00000240 F 7 1386= F 21 1796 F 45 424 MTLDSTAT 00000210 F 7 1204= F 45 366 MTNAME 000022C9 F 21 1701 1707= MTPROC 00004184 F 28 295a F 45 6 124 177 179= MTREQLOCK 00001F20 F 19 985= F 45 717s 720s 1795s 1798s 1901s 1906s F 77 33s 43a F 131 1453s 1541s MTSELECT 00000008 F 7 1397= F 45 358s 363s 947s 1043s 1158s 1477s 1693s MTSTANER 00000410 F 7 1207= F 45 335 367 964j 992x 1073j 1116x 1234j 1289j 1341j 1354j 1402j 1498j 1553x 1737x *MTSTDPPE 00002010 F 7 1342= MTSTDRVST 00003080 F 7 1366= F 45 433s MTSTDSC 00000010 F 7 1205= F 45 367 421j MTSTEOF 00001010 F 7 1218= F 45 795 905 1054 MTSTERSTAT 00001650 F 7 1226= F 45 992x 992x 1116x 1116x 1553x 1553x 1737x 1737x *MTSTSCIEN 00000210 F 7 1206= *MTSTTMBK 00000002 F 7 1222= MTSTTMBKB 00001210 F 7 1224= F 45 786j 1238j MTSTTMD 00001220 F 7 1219= F 45 335 367 1080 1507 1716 MTSTTMFW 00000001 F 7 1221= F 45 1082 1509 MTSTTMFWB 00001410 F 7 1225= F 45 897j 1292j 1407j 1519j MTSTTMLOST 00000003 F 7 1223= F 45 335 367 1717 MTTRACE 00000004 F 16 462= F 45 208 208 263 263 332 332 596 596 945 945 1041 1041 1157 1157 1475 1475 1692 1692 MTU 00134000 F 19 907= 909 F 21 1802 1808s 1813s 1814s 1815s 1816s 1818s 1820s 1822s 1826 1827s F 45 269 354 355j 357 359 362 430 431j 433s 444 445j 449s 451s 452 501 502j 504 515 517s 518s 523s 524s 525s 540s 553 554j 556 558s 559s 567s 568s 569s 634 642s 709a 718 719s 731s 735 778 783 795 796s 826 888 894 905 906s 936 940s 942 950s 952 957 959 960 963 1025 1031s 1038 1040 1045 1048s 1052s 1054 1055s 1057s 1060 1065 1067 1068 1070 1142s 1143 1147 1154 1163s 1165 1224 1231 1248s 1279 1286 1303s 1337 1343s 1348 1350 1356s 1391 1398 1459 1465s 1472 1474 1479 1482s 1485 1490 1492 1493 1495 1545s 1582 1584s 1593s 1595 1686s 1689 1697s 1700 1706 1708 1709 1713 1784 1789 1792 1793s 1796 1797s 1807 1810 1811s 1823s 1845 1848 1860 1863 1864s 1902s 1905 MTUCNTL 00095F11 F 19 927= F 21 1816s F 45 1147 1845 F 74 755 F 77 1 Jimbo's CREF Extractor 2.0 VRM, System C9303 (18 Mar 93) 12-May-93 12:56 PAGE 64 35 F 100 1500 F 101 55 F 140 119 148 177 MTUDENSITY 00095A20 F 19 921= F 45 357 1337 1343s F 100 1505s MTUDNUM 00094460 F 19 918= F 21 1810 1813s 1826 F 75 289 F 148 1924 1940 1955 MTUEOF 00095810 F 19 920= F 45 796s 906s 1055s 1142s 1248s 1303s 1545s F 98 49 F 100 980 1041 MTUERRCODE 000944A1 F 19 925= F 45 1902s F 77 47 MTULINK 00095F10 F 19 922= F 21 1808s MTULIST 00001F1D F 19 904= F 21 1700a F 75 283 F 140 136 F 148 1345a 1917 MTULOG 00000005 F 19 973= F 21 1801 1806 MTUMSGID 00174805 F 19 953= F 45 1789 1793s 1807 1810 1811s 1860 1863 1864s MTUMTCSTAT 0017480B F 19 963= F 45 433s 735 795 905 952 959 963 1054 1067 1165 1492 1700 1708 1713 1848 F 74 1012 1029 F 77 77 MTUNAME 00174804 F 19 952= F 21 1827s F 45 957 1065 1490 1706 1792 F 140 116 145 174 MTUNITMASK 00000003 F 19 887= F 45 454 545 MTUNUBS 00174809 F 19 959= F 45 634 642s 1584s 1593s MTUPC 00174810 F 19 967= F 21 1820s F 45 518s 559s 731s 940s 950s 1031s 1048s 1163s 1465s 1482s 1686s 1697s 1823s MTUPCADRS 00174803 F 19 948= F 45 1784 F 75 291 295s 426s F 131 1540s F 140 123 152 181 MTUPPUSTAT 0017480A F 19 962= F 45 449s 960 1060 1068 1070 1485 1493 1495 1709 F 100 219 MTUPROT 00001F20 F 19 909= 973e 974a MTURECLEN 00174806 F 19 954= F 45 1052s 1057s 1474 F 87 39s F 98 77 100 MTUREQLEN 00174807 F 19 957= F 45 1040 F 98 39s MTUREQUEST 00174008 F 19 932= F 45 718 719s 1796 1797s F 77 34s MTURQBKSP 00000005 F 19 937= F 77 134 137 F 100 1040 MTURQCYCLE 0000000B F 19 943= F 100 1540 MTURQFWSP 00000004 F 19 936= F 100 979 *MTURQGAP 00000009 F 19 941= MTURQREAD 00000006 F 19 938= F 98 42 MTURQREW 00000001 F 19 933= F 100 384 MTURQSEFB 00000003 F 19 935= F 100 1166 MTURQSEFF 00000002 F 19 934= F 100 1101 MTURQSET 0000000A F 19 942= F 74 760 F 100 1508 F 101 60 MTURQWFM 00000008 F 19 940= F 77 128 131 F 100 1369 MTURQWRITE 00000007 F 19 939= F 87 42 MTUSAVER34 0017480C F 19 965= F 45 515 524s 556 568s MTUSAVER67 0017480E F 19 966= F 45 517s 523s 558s 567s MTUSTACK 00174820 F 19 971= F 45 709a MTUSTART 00174800 F 19 910= 970 MTUSTATE 00094020 F 19 913= F 21 1822s F 45 451s 504 525s 569s MTUSTBUSY 00000002 F 19 916= F 45 570 948 1047 1481 1695 *MTUSTPFAIL 00000003 F 19 917= MTUSTRUN 00000000 F 19 914= F 21 1821 F 45 450 730 1162 1822 MTUSTWAIT 00000001 F 19 915= F 45 939 1030 1464 1685 MTUTRACK 00095831 F 19 926= F 45 362 1350 1356s F 74 757s F 101 57s 66 MTUTYPE 00094021 F 19 924= F 21 1818s F 45 359 778 783 826 888 894 936 1025 1045 1143 1224 1231 1279 1286 1348 1391 1398 1459 1479 F 87 29 F 98 33 76 MTUUBS 00174808 F 19 958= F 45 1582 1595 F 87 38s 46 47s F 98 1 Jimbo's CREF Extractor 2.0 VRM, System C9303 (18 Mar 93) 12-May-93 12:56 PAGE 65 38s 46 47s MTUUNIT 00095040 F 19 919= F 21 1815s F 45 452 942 1038 1154 1472 1689 F 140 118 147 176 MT_RESET 000041CB F 21 1837 F 26 443 F 45 8 126 320 326= F 53 444 MUSTHAVEIT 00002AD5 F 28 1320j 1343= MYTURN 00002D81 F 31 56j 62= NAMEBUF 00178802 F 21 1869= 1873s 1876a 1890a NAMEPROTO 00178804 F 21 1787= 1792s 1823 NCLKPARAMS 000021A1 F 21 1020a 1067= NEEDPAGE 00002F2C F 33 241j 288= NEPATH 00000003 F 36 1267x 1272= NETERM 00000002 F 36 1267x 1271= NEXTBLOCK 0000215D F 21 896j 911= NEXTBOARD 00002243 F 21 1449= 1521j NEXTCHAN 000027E2 F 26 252j 266= NEXTDEVICE 0000208C F 21 347= 369j NEXTFCB 00003418 F 36 781= 787j 792j 794j 796j 798j NEXTFCB 0000342B F 36 838= 847j 849j 851j 855j 857j NEXTGUY 00002CE9 F 29 1589= 1592j NEXTMEM 00002079 F 21 307= 335j NEXTMTUNIT 000022E9 F 21 1797= 1832j NEXTONE 00002088 F 21 309j 314j 321j 332= NEXTPORT 0000225A F 21 1486= 1506j NEXTSLOT 000027E7 F 26 240j 270j 274= *NMTPUNITS 00000004 F 7 1152= NNVMCLOCKS 00000300 F 8 340= F 21 1068x NOAGEMS 00002CB7 F 29 1504j 1511= NODISKERR 00002E57 F 32 518j 522= NODISKSPC 00002461 F 22 431j 468= NODISKSPC 000024B5 F 22 574j 678= NOERROR 0000265E F 24 747j 757= NOFIXRES 00002703 F 25 310= 316j NOFREE 00002390 F 21 2268j 2285= NOHALTCODE 003FFFFF F 13 357= F 28 98 NOHOPE 00002700 F 25 268j 272j 295= NOINCPC 00003499 F 36 1094j 1099= NOINDPAL 00003177 F 35 492j 504= NOINT 000034C8 F 36 1126j 1180= NOINTUM 000034C4 F 36 1148j 1175= NOLIMACCT 00002BEE F 29 942j 948= NOLOAD 0000212C F 21 773j 775= NOMEMPAGE 00002F08 F 33 111j 153= NOMEMPAGE 00002F5B F 33 293j 382= NOMOREERR 00002DFC F 32 220j 229= NOMOVE 0000338B F 36 394j 398= NOMTUNIT 00002306 F 21 1799j 1829= NONELEFT 00003845 F 38 1436j 1444= 1560j NONEVB 000029A1 F 28 526j 579= 630j NOONE2Q 00003585 F 36 1738j 1750= NOPAGEYET 00002F3B F 33 272j 314= NOPCB 000034E2 F 36 996j 1221= 1223j NOPORTSC 0000227E F 21 1530j 1545= NOPOST 00000010 F 36 549= 552s 572j 608j 639j 658j 680j 746s NOREADPAGE 000024CF F 22 317a 803 805= NOREGENSYS 0000215A F 21 903j 906= 1 Jimbo's CREF Extractor 2.0 VRM, System C9303 (18 Mar 93) 12-May-93 12:56 PAGE 66 NORMALGET 00003672 F 38 225j 245= NORMALPAGE 000024C1 F 22 314a 746 748= NOSCHLMNT 00003505 F 36 1339j 1345= NOSHUTDOWN 00002D9E F 31 161j 164= NOSUCHVPN 000000FF F 18 371= F 100 1454 F 125 273 F 143 1905 NOSUSPEND 0000354A F 36 1575a 1576a 1577a 1589= NOTACPU 00002094 F 21 354j 356= NOTACTIVE 0000219C F 21 1012j 1055= NOTADT 00002E53 F 32 471j 516= NOTBOOTMEM 0000213E F 21 849j 852= NOTDONEYET 0000239A F 21 2352= 2373j NOTDONEYET 000026BD F 24 1037j 1051= NOTDUBL 00002B65 F 29 639j 644= NOTDUBL 00003476 F 36 1042j 1051= NOTFNDRTN 0000269E F 24 846j 953= NOTHERE 000035D0 F 36 1960j 1963j 1969= NOTINCORE1 0000312E F 35 324j 333= NOTINCORE2 00003142 F 35 340j 355= NOTINDIRCT 000024A6 F 22 629j 643= NOTLAST 00002D4B F 30 178j 182= NOTLOCKED 0000272B F 25 368j 372= NOTLOGGED 00002AA2 F 28 1140j 1164= NOTMAPPED 0000269D F 24 927j 940= NOTMSG 000033EC F 36 633j 636j 651= NOTMSG 0000344D F 36 914j 917= NOTNEG 0000259B F 24 88j 90= NOTNEGA 0000259F F 24 93j 95= NOTNEPATH1 000033E2 F 36 607j 630= NOTNEPATH2 000033E3 F 36 600j 632= NOTNETERM1 000033D4 F 36 571j 597= NOTNETERM2 000033D5 F 36 555j 599= NOTPATH 00003447 F 36 900j 903= NOTRAPS 00002A16 F 28 647j 857= NOTRIPLES 000021B8 F 21 1146j 1149j 1156= NOTRP 000034C1 F 36 1139j 1168= NOTSMU 00002170 F 21 951j 967= NOTSUBD 000036D0 F 38 429j 437= NOTSUBD1 000036D3 F 38 422j 440= NOTSWAP 00002447 F 22 410j 414= NOTTERM 0000344A F 36 907j 910= NOTTIME 00003400 F 36 671j 674j 676j 684= NOTTIME 00003453 F 36 928j 931= NOTTIMEWT 000034A1 F 36 1074j 1077j 1124= NOTUNIT 000033F5 F 36 652j 655j 670= NOTUNIT 00003450 F 36 921j 924= NOTUNLOAD 00002FD5 F 33 779j 781= NOUNLOAD 000032E1 F 35 1474j 1476= NOUPCTIME 00003393 F 36 438j 441= NOUSER 00002787 F 26 40j 45= NOWHERE 000026BC F 24 1046= 1058j NOWNDO 0000329F F 35 1276j 1286= NOWNDO 000032B4 F 35 1330j 1349= NOWNDOS 00003188 F 35 541j 553= NOWSHUTHIM 00002B66 F 29 641j 646= NPS 00000080 F 6 134= 135e 136e 148e F 14 244a 248a F 20 259a 311 F 21 162 268s 656 F 33 943 F 80 162 F 90 80 83 F 101 191 1 Jimbo's CREF Extractor 2.0 VRM, System C9303 (18 Mar 93) 12-May-93 12:56 PAGE 67 F 107 361 F 125 57 113 191 244 F 126 46 49 54 F 148 435 NQADTWAIT 00000005 F 16 817= 875e *NQDIOWAIT 00000003 F 16 809= NQDIRWAIT 00000004 F 16 813= 875e NQFILEWAIT 00000008 F 16 831= 876e F 36 1702e F 47 114s 117s F 74 522s 537s F 108 703s 749s NQIDXWAIT 00000006 F 16 821= 876e NQLOCKWAIT 00000007 F 16 825= 876e F 36 1701e F 76 782s 788s 844s 861s 881s NQMSGWAIT 0000000A F 16 840= 877e F 36 1701e F 127 234 NQMSWAIT 00000002 F 16 804= F 32 717s 735s 795s NQPATHWAIT 00000009 F 16 836= 877e F 36 1701e F 76 235 F 84 130 NQRUNNABLE 00000001 F 16 800= 875e F 28 66s 203s 219s 424s 428s F 29 793 818s 828s 1046s 1055s 1095s 1108s 1557s 1559s F 55 1223s 1228s NQRUNNING 00000000 F 16 796= F 26 41s F 28 223 226s 230s F 29 634s 738s 871s 1552s 1554s F 32 104s F 55 1232 1234s 1238s NQSTOPWAIT 0000000F F 16 862= F 133 1234s 1239s 1248s NQTERMWAIT 0000000C F 16 850= F 36 1703e F 50 207 554 NQTIMEWAIT 0000000E F 16 858= F 36 1073 1702e F 47 45s 74s NQTRMOWAIT 0000000D F 16 854= F 36 1703e F 48 1166 F 49 340 NQTROUBLE 00000010 F 16 865= F 29 1583s 1610s 1617s F 36 1702e NQUEUES 00000011 F 16 869= 871 928 928 F 29 673s 688s 1365s 1378s 1385s 1406s F 36 1632a 1734a F 123 1132 1132 NQUNITWAIT 0000000B F 16 845= 877e F 36 1701e F 127 849 NUMSLOTS 00000010 F 6 47= 48e F 16 264 F 19 24 F 20 63 259a 289 298 F 21 179 181 334 368 2353 F 26 218 F 33 784 F 53 99 F 148 1479 *NVMBASE 00000002 F 8 208= NVMBSYFLAG 00001EF5 F 19 237= F 46 69s 274s 857 914s NVMBSYLOCK 00001EF4 F 19 236= F 46 68s 70s 74a 273s 275s 279a 856s 866s 877a 879a 913s 923s 931a 933a NVMCLKBYTS 00000004 F 8 300= 301 340 F 58 184 187 243 246 F 148 894 898 NVMCLKINDX 00001EF9 F 19 243= F 58 182 241s F 148 910s 941s NVMCLKMASK 00001EF8 F 19 242= F 58 183 242 NVMCLKNUM 00001EF7 F 19 241= F 148 889 NVMCLOCKS 00001EF6 F 19 240= F 21 1023a F 58 185 244 F 148 896 NVMDATDRFT 00000033 F 8 237= F 133 939 F 148 835 NVMDEADCNT 00000010 F 8 303= 305 F 123 1598 NVMDEATH 00000080 F 8 307= F 123 1601 1605 *NVMDEATHE 00000060 F 8 304= NVMFACACC 00000001 F 8 257= F 148 1234 NVMFACCPU 00000001 F 8 251= F 148 1210 NVMFACCTC 00000001 F 8 272= F 148 1305 NVMFACCTU 00000001 F 8 275= F 148 1317 NVMFACDISK 00000001 F 8 266= F 148 1273 NVMFACLPC 00000001 F 8 269= F 148 1285 NVMFACMCU 00000001 F 8 245= F 148 1190 NVMFACMSC 00000001 F 8 263= F 148 1259 NVMFACMTC 00000001 F 8 278= F 148 1337 NVMFACMTU 00000001 F 8 281= F 148 1349 NVMFACPAGE 00000020 F 8 248= F 148 1200 NVMFACPORT 00000008 F 8 260= F 148 1247 NVMFACPPU 00000001 F 8 254= F 148 1222 NVMFACVTC 00000001 F 8 284= F 148 1369 NVMFACVTU 00000001 F 8 287= F 148 1381 1 Jimbo's CREF Extractor 2.0 VRM, System C9303 (18 Mar 93) 12-May-93 12:56 PAGE 68 *NVMLFPPW 00000011 F 8 214= *NVMLFPPW1 00000012 F 8 215= *NVMLFPPW2 0000001A F 8 216= NVMMAXACC 00000044 F 8 256= F 148 1233 NVMMAXCPU 00000042 F 8 250= F 148 1209 NVMMAXCTC 00000049 F 8 271= F 148 1304 NVMMAXCTU 0000004A F 8 274= F 148 1316 NVMMAXDISK 00000047 F 8 265= F 148 1272 NVMMAXLPC 00000048 F 8 268= F 148 1284 NVMMAXMCU 00000040 F 8 244= F 148 1189 NVMMAXMSC 00000046 F 8 262= F 148 1258 NVMMAXMTC 0000004B F 8 277= F 148 1336 NVMMAXMTU 0000004C F 8 280= F 148 1348 NVMMAXPAGE 00000041 F 8 247= F 148 1199 NVMMAXPORT 00000045 F 8 259= F 148 1246 NVMMAXPPU 00000043 F 8 253= F 148 1221 NVMMAXVTC 0000004D F 8 283= F 148 1368 NVMMAXVTU 0000004E F 8 286= F 148 1380 *NVMRFPPW 00000000 F 8 210= *NVMRFPPW1 00000001 F 8 211= *NVMRFPPW2 00000009 F 8 212= *NVMSIZE 00000080 F 8 207= NVMSSN 0000003C F 8 242= F 148 1013 *NVMSSUSN 00000038 F 8 240= *NVMTAPEPW 00000022 F 8 233= NVMVERSION 0000000F F 19 76= F 21 1018 OCLKPARAMS 0000219E F 21 1017a 1061= 1065e *ODDFBI 00002380 F 21 2199= OK 00002792 F 26 88j 92= OKAYTOFREE 00002E50 F 32 484j 502= OKDOKE 000034F5 F 36 1286j 1294j 1298= OKTOLINK 00002D0C F 29 1675j 1677= ONCEASEC 0000472B F 21 1032a F 47 21 26= 30a ONEBITS FFFFFFFF F 6 15= 81e 82e F 19 1345x F 21 11x 11x 1152 F 23 344x F 28 187 F 30 105 113 232 F 33 442 604 F 36 1824 F 41 19 52 F 43 219x 219x 524 760 4104 4959 F 45 992x 1116x 1553x 1737x F 46 1276 F 50 206 553 F 53 129 159 292 405x 458x 458x F 67 62 121 509 F 76 234 F 84 129 F 87 35 F 103 33 185 F 108 663e 664e 665e F 121 39 350 897 898 F 123 414 F 124 391 512 F 125 1019 F 127 233 848 F 134 112 F 138 732 905 F 148 1478 ONEDAY 0000255C F 23 356= F 46 1347 ONEHOUR 0000255B F 23 355= F 46 796 798 801 1343 F 148 347 349 ONEHOUR2 0000255A F 23 354= 355e F 124 111 186 ONVMCLOCKS 00000050 F 8 301= F 21 1062x OPMSGDISP 00001EAA F 16 1167= F 46 1190s 1195s 1210s OPMSGHORN 00080010 F 16 1152= F 46 1198 1200s 1486s OPMSGID 00080181 F 16 1155= F 46 1192 1194 1492s 1529 F 128 61 F 145 142 147 178 OPMSGINFO MACRO F 11 481= F 145 121 OPMSGLEN 00160007 F 16 1156= F 38 341s F 43 2134s 4994s F 46 1483 F 53 571s 792s 893s F 128 91s F 145 62s 149 F 148 789s 1699s 2350s OPMSGLINK 00081F10 F 16 1154= F 46 1485s 1489 1490s 1531 1532s OPMSGLIST 00001EA8 F 16 1148= F 46 1191 1488a 1527 1528a F 128 60 F 145 141 OPMSGLOCK 00001EA7 F 16 1147= F 46 1189s 1205s 1211s 1482s 1493s 1526s 1534s 1543s F 128 58s 63s 68s F 145 140s 161s 183s 1 Jimbo's CREF Extractor 2.0 VRM, System C9303 (18 Mar 93) 12-May-93 12:56 PAGE 69 OPMSGLOG 00000005 F 16 1163= F 38 324 F 43 2097 4966 F 46 1536 F 53 540 738 861 F 128 70 114 F 145 53 87 134 188 199 F 148 783 1596 2345 OPMSGMAXLN 00000077 F 16 1160= F 128 89 F 145 61 OPMSGPROC 000802E0 F 16 1153= F 38 343s F 43 2135s 4995s F 53 572s 794s 895s F 128 75s F 145 77s 145 F 148 785s 1700s 2355s OPMSGPROTO 00001EA9 F 16 1150= 1163e 1164a OPMSGSER 00001EA9 F 16 1166= F 46 1491s OPMSGTEXT 00160802 F 16 1157= 1160e F 38 327a 338a F 43 2100a 2131a 4969a 4991a F 46 1196 1202 F 53 543a 568a 741a 789a 864a 890a F 128 77s 83s F 145 66a F 148 786a 2349a OPMSGTEXTC 00160008 F 16 1158= F 46 1464 1477s 1484s F 128 81a 93a F 145 156a F 148 1601a 1696a OPMSGWORDA 00160800 F 16 1151= 1159 OPREQTAB 00001D26 F 16 439= F 144 234s *ORADDAFT 000000A2 F 9 1079= *ORATTACH 00000013 F 9 1001= ORBKCACCT 00000051 F 9 1039= F 148 1770 *ORBKUPACT 000000C1 F 9 1090= *ORBKUPDONE 000000C4 F 9 1096= *ORBKUPFIL 000000C2 F 9 1091= *ORBKUPVOL 000000C0 F 9 1089= *ORBUSYVOL 00000047 F 9 1034= *ORCANOPMSG 00000162 F 9 1201= *ORCAUTHDL 000000F2 F 9 1133= *ORCAUTHSL 000000F3 F 9 1134= *ORCHGAUTHL 000000E1 F 9 1121= *ORCLRPNUM 00000171 F 9 1205= *ORCPUSTOP 000001B1 F 9 1256= *ORCPUSTRT 000001B2 F 9 1257= *ORCREACCT 00000050 F 9 1038= *ORCREAUTHE 000000F0 F 9 1128= *ORCREAUTHL 000000E0 F 9 1118= *ORCVOLNAME 00000190 F 9 1222= *ORCVOLNEWO 00000193 F 9 1231= *ORCVOLPWD 00000191 F 9 1225= *ORCVOLSSN 00000192 F 9 1228= *ORCVOLTITLE 00000194 F 9 1234= *ORDELAFT 000000A3 F 9 1080= *ORDESACCT 00000060 F 9 1042= ORDESAUTHE 000000F8 F 9 1129= F 135 457 ORDESAUTHL 000000E8 F 9 1124= F 134 905 *ORDEVINFO 00000110 F 9 1150= *ORDISMOUNT 00000041 F 9 1016= *ORDISMTDRV 00000045 F 9 1027= *ORFORMAT 00000152 F 9 1186= *ORGAUTENS 000000FF F 9 1141= *ORGAUTHDL 000000FA F 9 1137= *ORGAUTHSL 000000FB F 9 1138= *ORGENOPMSG 00000160 F 9 1196= *ORGETAUTHL 000000E9 F 9 1125= *ORGETFP 000000C3 F 9 1092= *ORGETOPMSG 00000161 F 9 1199= *ORGETTRC 00000138 F 9 1165= *ORGOODBYE 00000011 F 9 997= *ORGSYSINFO 000001A0 F 9 1249= 1 Jimbo's CREF Extractor 2.0 VRM, System C9303 (18 Mar 93) 12-May-93 12:56 PAGE 70 *ORGVOLNAME 00000198 F 9 1237= *ORGVOLNEWO 0000019B F 9 1243= *ORGVOLSSN 0000019A F 9 1240= *ORGVOLTITLE 0000019C F 9 1246= *ORHEADCHK 00000154 F 9 1190= *ORHELLO 00000010 F 9 995= *ORINHIBVOL 00000042 F 9 1019= *ORINITEND 000000D4 F 9 1111= *ORINITFMT 00000155 F 9 1192= *ORINITVOL 000000D0 F 9 1104= *ORLOGONP 00000012 F 9 999= *ORMAINTR 00000140 F 9 1175= *ORMAINTRSUB 00000142 F 9 1176= *ORMAINTW 00000150 F 9 1181= *ORMAPFP 000000C5 F 9 1100= *ORMOUNT 00000040 F 9 1014= *ORMOUNTMAI 000000B0 F 9 1084= *ORMOUNTVOL 00000046 F 9 1031= *ORPABORT 00000093 F 9 1070= *ORPALLOW 00000071 F 9 1046= *ORPEVICT 00000091 F 9 1067= *ORPGO 000001D1 F 9 1262= *ORPINFO 00000072 F 9 1049= *ORPINHIB 00000070 F 9 1045= *ORPRESET 00000074 F 9 1053= *ORPROCINFO 00000092 F 9 1069= *ORPSTOP 000001D0 F 9 1261= *ORPTERMIN 00000090 F 9 1066= *ORPUTFP 000000D3 F 9 1107= *ORPUTPFP 000000D5 F 9 1115= *ORPWARN 00000073 F 9 1051= *ORRCVRACT 000000D1 F 9 1105= *ORRCVRACTL 000000D6 F 9 1108= *ORRCVRFIL 000000D2 F 9 1106= *ORREADAFT 000000A0 F 9 1074= *ORREADCNT 00000101 F 9 1144= *ORREADIDX 000000A1 F 9 1077= *ORREADNVM 00000141 F 9 1178= *ORRESETDRV 00000156 F 9 1193= *ORRESETVM 00000014 F 9 1003= *ORRWCOUNTS 00000103 F 9 1146= *ORSECTRK 00000153 F 9 1188= *ORSESSINFO 00000092 F 9 1068= *ORSETCPU 000001B0 F 9 1253= *ORSETPNUM 00000170 F 9 1204= *ORSLEEP 00000030 F 9 1009= *ORSTOPDYNW 00000132 F 9 1163= *ORSTOPMON 00000131 F 9 1162= *ORSTOPTRC 00000130 F 9 1161= *ORSTOPXMON 00000133 F 9 1164= ORSTRTBAT 00000180 F 9 1210= F 131 888 *ORSTRTDYNW 00000122 F 9 1156= ORSTRTJOB 00000182 F 9 1216= F 75 938 *ORSTRTMON 00000121 F 9 1155= *ORSTRTSPLR 00000183 F 9 1218= *ORSTRTTERM 00000181 F 9 1214= 1 Jimbo's CREF Extractor 2.0 VRM, System C9303 (18 Mar 93) 12-May-93 12:56 PAGE 71 *ORSTRTTRC 00000120 F 9 1153= *ORSTRTXMON 00000123 F 9 1157= *ORTADJUST 00000081 F 9 1058= *ORTAKEPAGS 000001C0 F 9 1259= *ORTIMPAR 00000082 F 9 1063= *ORTZONE 00000080 F 9 1056= *ORVANISH 00000020 F 9 1006= *ORVINFO 00000043 F 9 1022= *ORVOLHANDLE 000000B1 F 9 1085= *ORVOLINFO 00000044 F 9 1025= *ORWRITECNT 00000102 F 9 1145= *ORWRITENVM 00000151 F 9 1183= OTHERTALK 00004E54 F 21 1986a F 52 14 17= OTHERWAY 000027BB F 26 130j 179= 181j OURSLOT 00000415 F 15 110= F 21 70s 204 728s F 28 210 221 242 F 31 80 F 39 46 115 163 F 46 144 F 55 1137 1205 OUTOFVA 00002A0B F 28 625j 817= OVERLAPCK 00003045 F 33 446 608 1073 1075= OVERVERSN 0000201C F 21 42j 59= OVPDESTROY 0000338D F 36 18 428 435= F 125 671 OVPDNONEX 00003343 F 36 120j 143= OVPDNTMP 00178803 F 36 115= 121s 128 OVPDOWNONE 00003330 F 28 670 975 1058 F 36 19 110 118= F 124 538 F 125 392 722 1009 OVPDRUERLP 00003394 F 36 445= 453j OVPDRVMDN 000033A8 F 36 467j 474= OVPDRVMLP 0000339C F 36 447j 456= 462j OVPDRWVMLP 000033A2 F 36 458j 465= 471j OVPDSTRYPT 00178801 F 36 431= 432e 436s 442 482 494 498 501 OVPDSTRYSV 00178802 F 36 432= 506 OVPPICKUP 00003344 F 36 68 127 166 171= OVPPUTDOWN 0000334B F 36 71 130 209 215= OVPUPLAST 00178801 F 36 53= 64s 70 OVPUPONE 0000331B F 28 930 F 36 20 50 58= F 125 1037 OVPUPONEX 0000332F F 36 61j 84= OVVASPDN 000033AB F 36 476j 480= OVWSXDN 000033B4 F 36 484j 493= OVWSXLIST 000033AB F 36 481= 490j OWNCOPY 0000246A F 22 195j 516 524= P12TOCHAR 00005926 F 38 334 F 43 4983 F 63 12 366 372= F 70 233 F 79 1056 F 127 152 F 138 350 F 148 2198 PADTBLOCK 00160801 F 16 601= 602e 603e F 54 251s F 55 814 PADTBUSY 00001D85 F 16 593= F 55 840s F 148 576s PADTDRIVE 00080081 F 16 602= F 55 817 818 PADTLINK 00081F10 F 16 600= F 55 811 PADTLIST 00001D84 F 16 592= F 55 809 812s PADTLNTH 00000002 F 16 605= 606e PADTLOCK 00001D83 F 16 591= F 28 1480a F 54 253a F 55 808s 813s 841s F 148 575s 583s PADTLOG 00000001 F 16 606= F 54 250 F 55 828 PADTMSBLK 00081181 F 16 603= F 55 816 PADTPROT 00001D8A F 16 598= 605e 607a PADTRSTRT 00005201 F 16 595a F 55 9 800 804= PADTWORDA 00160800 F 16 599= 600e PAFCB 00091F12 F 18 277= F 24 731s F 35 1468 PAGEAGAIN 00002E99 F 32 711j 716= 780j 1 Jimbo's CREF Extractor 2.0 VRM, System C9303 (18 Mar 93) 12-May-93 12:56 PAGE 72 PAGEAGE 000900E2 F 18 275= F 24 192s 326s 327 370s 371 620s 625s F 29 1246 PAGEANDISP 00001560 F 6 145= F 43 2702s 3660s 3669s F 46 258s F 48 1416s F 78 116s PAGEDONE 00002EBE F 32 738j 755j 766j 770= PAGEFIELD 00001C80 F 6 147= F 25 130 F 33 116 305 468 630 905 F 35 849s F 37 85 F 43 3656 F 46 254 F 48 1413 F 51 512 F 55 1148 F 75 225 F 78 59s 95 102 F 101 240s PAGENUM 00178008 F 24 697= 703s 718 PAGENUM 00178802 F 32 706= 710s 718 PAGEREADY 00002E94 F 32 9 702 709= F 43 4233 PAGEUPC 00099112 F 24 698= 702s 724s 732 750s 755 PAGEXIT 00002ECD F 32 799j 816= PAGEZERO 00001CC7 F 16 199= F 21 88s F 33 777 F 148 67 PAINDVP 00091010 F 18 265= F 24 733s F 35 491 PALINK 00091F10 F 18 270= F 22 608 609s 635 636s 877 878s F 24 743s 930 931s 932s 936 937s F 25 538 539 540s F 29 1251 1252s 1256 F 32 114 129 F 35 179 180s 268 269s 292s 495 496s 498s 500 965s 1471 1472s 1644 1645s F 36 485 PALMNT 00001ECB F 18 262= 281e 283a PALNTH 00000004 F 18 281= 282e PALOCK 00091210 F 18 266= F 24 735s F 25 367 530 F 29 1248 F 35 288s 840s 961s 1145s 1213s PALOG 00000002 F 18 282= F 24 711 F 32 342 F 35 740 PALRTLOG 0000000E F 18 256= 275 PAMAIFLD 00091430 F 18 268= F 24 739s F 35 733 PAMODIFIED 00091C12 F 18 276= F 24 190s 618s F 32 339 767s F 35 228s 1144s F 143 1887s PAPMVALUE 00170801 F 18 272= F 24 287 653 717s 737s F 78 113 PAPPLPTR 00170803 F 18 278= F 22 870 F 24 715s F 25 373 528 F 32 335 F 35 260 735 PARITYERR 000026C6 F 21 1981a F 25 6 80 109= PARM 00178801 F 36 1440= 1460s 1461s 1471a 1477s PASIGBITS 00003070 F 14 224= 226e F 35 540 PASS2CM 00002A4F F 28 915j 969= PASS2PROC 00002A60 F 28 923j 1050= PASSON 00002A06 F 28 789j 794= PASSUP 00002A29 F 28 860j 862j 868j 907= *PATCHAREA 00001F68 F 19 1344= PATCHLIST 00001DA1 F 16 722= F 28 394 406 F 55 1140 F 148 545 1067 1136 1138s PATCHPROC 000052B5 F 28 414a F 55 10 1134 1136= PATHLIST 00001EC7 F 17 399= F 76 43 113 115s 283a PATHLOCK 00001EC6 F 17 398= F 76 92a 96a 110a 117a 131a 200a 209a 273a 289a 317a PATHPOST 00003405 F 36 608j 698= PATHSCAN 000033D8 F 36 605= 615j PAVPAGES 00001CC6 F 16 189= F 21 130s F 28 54s F 32 55s F 33 473s 937 945s F 148 78s PAVPN 00170000 F 18 264= F 22 606 633 F 24 186 286 614 652 719s 725s 751 926 F 25 361 F 35 176 838 1142 1211 1639 F 78 106 PAWORDA 00170800 F 18 263= F 24 713s PAWORDC 00170802 F 18 274= F 24 714s *PCAUTOLOG 0016081D F 12 9= PCB 00130000 F 17 130= 131 F 25 381 385s 386 414 415 415 416j F 29 794s 795 817s 819 826s 827s 1524 1526j 1528 1530 1530 1531j 1 Jimbo's CREF Extractor 2.0 VRM, System C9303 (18 Mar 93) 12-May-93 12:56 PAGE 73 1611 F 32 140 146 147 148j 153 155 165 171 F 36 1209s 1210 1212 1646 F 37 168s 170a 172s 173s 174s 196s 198s 199s F 76 862 F 123 722 733 738j 742 743 1068 1072 1074 1074 1075j 1080 PCBKSPC 00160808 F 12 9= F 133 594 PCBLNTH 00000007 F 17 154= 155e PCBLOG 00000003 F 17 155= F 32 170 F 37 167 171 PCBPROT 00001EC4 F 17 131= 154e 156a PCBPTR 00178801 F 32 705= 737s 771s 779 PCBRCH 0016082B F 12 9= F 133 596 PCBSITE 00170805 F 17 151= F 50 640s F 123 933 F 131 246s 619s 1095 1096s PCCARW 00160803 F 12 9= F 133 588 *PCCHKIP 00003810 F 12 9= PCCOUNT 00001EB0 F 17 112= F 28 82 F 32 164s F 37 200s F 46 1300a F 123 550 F 130 743 F 144 1165 PCCRD 00160805 F 12 9= F 133 590 PCECHOM 0016080A F 12 9= F 133 597 PCFBRKOUT 00003410 F 12 9= F 133 632 *PCFCTSP 00003010 F 12 9= PCFFD 00160807 F 12 9= F 133 592 PCFPROTO 00160828 F 12 9= F 133 587 PCFRDE 00003610 F 12 9= F 133 632 *PCFSTOPB 00003E10 F 12 9= PCFUNCT 00160802 F 12 9= F 133 585 *PCFXOFF 00003210 F 12 9= PCHEIGHT 00160804 F 12 9= F 133 589 PCHTD 0016082A F 12 9= F 133 593 PCIBAUD 00160800 F 12 9= F 133 582 PCIXOFF 00160827 F 12 9= F 133 584 PCLENGTH 0000003C F 12 9= F 133 428 452 517 539 572 PCLFD 00160806 F 12 9= F 133 591 PCLKILLC 00160809 F 12 9= F 133 595 *PCLOCATION 00160054 F 12 9= PCNTLLOCK 00001EB2 F 17 115= F 29 1523a 1534a F 32 139a 168a F 37 177a 202a F 48 1313a 1333a F 79 1927a 1954a F 123 320a 334a 718a 875a 940a 1056a 1094a F 125 479a F 127 169a 180a 193a 740a 755a 783a F 130 474a 486a 513a 519a 820a 831a F 131 762a 765a 1084a 1093a 1205a 1223a F 133 115a 125a 1056a 1199a 1232a F 144 946a 958a 973a PCNUMARRAY 00001EB4 F 17 118a 119= 128e F 37 183 PCNUMARRSZ 00000010 F 17 128= F 37 181 183 194s PCNXTCB 00091F14 F 17 150= F 25 415 F 29 1530 F 32 147 155 157s F 37 198s F 79 1932 F 123 328 735 1074 F 127 176 749 F 130 481 828 F 131 1220 F 144 953 PCOBAUD 00160801 F 12 9= F 133 583 PCONSOLE 0000041E F 15 135= F 26 125a F 28 186a F 32 59a F 36 1447a PCONTROL 00001EB1 F 17 113= F 25 381 F 29 1524 F 32 140 162s F 37 197 199s F 79 1928 F 123 322 724 1068 F 127 170 743 F 130 475 821 F 131 1206 F 144 949 PCP103H 00000002 F 12 9= F 133 563 PCPARENT 000900C4 F 17 148= F 123 931 1011 F 130 501 F 131 1089s 1208 *PCPBASE 00000008 F 12 9= *PCPDISC 00000001 F 12 9= *PCPGEN 00003A20 F 12 9= PCPLENGTH 00000004 F 12 9= F 133 434 PCPNONE 00000000 F 12 9= F 133 560 634 PCPROCNUM 000900C3 F 17 143= F 32 165 F 37 196s F 67 776 F 76 722 1 Jimbo's CREF Extractor 2.0 VRM, System C9303 (18 Mar 93) 12-May-93 12:56 PAGE 74 F 79 1930 F 102 135 182 437 F 123 326 663 692 728 730 732 1072 F 127 174 189 732 747 F 128 74 F 130 479 500 F 131 239 680 786 1088 1147 1203 F 132 145 182 236 F 133 299 1127 1317 F 140 125 154 183 213 F 144 951 PCPROTO 00000000 F 12 9= 9e 9a PCPSADRS 00091F13 F 17 147= F 25 386 F 28 207 F 29 795 1050 1390 1661 F 32 153 740 742 763 F 36 997 1083 1102 1130 1181 1193 F 37 172s F 47 51 F 48 1318 F 50 306 F 55 1225 1240 F 76 863 F 79 1938 F 108 753 F 123 348 743 1080 F 127 186 780 847 F 130 492 F 131 1210 1663 1698 F 133 116 F 144 968 PCQCLNMARK 00091010 F 17 133= F 29 1371s 1386 1388s PCQLINK 00091F10 F 17 135= F 28 217 218s 228s 426s F 29 681s 683 687s 695 696s 826s 827s 863 869 870s 1608 1609s F 32 733 734s F 36 1007 1200 1206 1207s 1643 1644s 1737 1739 1740s F 47 65 66s 122 F 55 1226 1227s 1236s F 76 859 860s F 108 727s 729 730s 748s 755 F 133 1235 1237 1238s PCQPARM 00170801 F 17 136= F 28 222s 417s F 29 640s 645s 817s 819 823 1591s 1674s 1676s F 32 721 F 36 1044 1053 1075 1637 F 55 1231s F 74 527 529 F 76 784 848 F 108 716 733 PCQPARM2 00170000 F 17 132= F 29 647s F 32 743 753 762 F 76 853 F 108 718 724 735 PCQUEUE 00091260 F 17 134= F 28 224s F 29 650s 654 675 794s 1528 F 36 1004 1060 1072 1161 1184 1198 1691 F 48 1165 F 49 339 F 55 1233s F 123 742 PCSITE 0016082C F 12 9= F 133 600 PCSPECPROC 00091A13 F 17 145= F 28 418s 457s F 123 900 F 131 238s 763s 1090 1091s PCSYSPROC 00091813 F 17 144= F 29 920 F 37 174s F 123 346 902 1022 F 130 824 PCTCARD 00003210 F 12 9= F 133 633 PCTDTR 00003410 F 12 9= F 133 633 PCTERMA 0016080D F 12 9= F 133 504a PCTERMG 0016080C F 12 9= F 133 599 PCTERMT 0016080B F 12 9= F 133 532 PCTERMTYPE 0016082E F 12 9= F 133 533s 543 598 *PCTRI 00003010 F 12 9= PCTRTS 00003810 F 12 9= F 133 633 PCTSMTR 00160829 F 12 9= F 133 586 PFAGEVASP 000025CF F 24 274 316 318= PFAGEWSX 000025DD F 24 110 358 360= F 35 289 962 PFAILCHK MACRO F 5 203= F 43 345 827 990 F 45 187 503 555 F 46 192 PFAILDS MACRO F 5 185= F 43 345 827 990 1319 5201 F 45 187 503 555 F 46 192 F 48 401 929 979 1246 PFAILEN MACRO F 5 170= F 43 345 827 990 1308 5194 F 45 187 503 555 F 46 192 F 48 361 969 PFALTBIT 00001C10 F 6 129= 131e F 21 2179s F 24 189j 617j F 25 448 F 33 472s 634s 806x 838s PFANVP 000025D9 F 24 324j 330= PFAVLP 000025D6 F 24 325= 328j PFCLNMASK 00002000 F 21 11= 264 850 PFCNTL 00001A30 F 6 127= F 21 2498 2499s 2501s PFCODE 000020F6 F 21 497a 501 631= 679e PFCODELEN 00000014 F 21 498 679= PFEMNOALT 000025B3 F 24 189j 191= PFEMNOPA 000025B5 F 24 181j 184j 196= 1 Jimbo's CREF Extractor 2.0 VRM, System C9303 (18 Mar 93) 12-May-93 12:56 PAGE 75 PFEMNOREF 000025B4 F 24 188j 193= PFEMNXTP 000025AE F 24 185= 194j PFEMPTY 000025A6 F 24 111 143 172= F 36 181 PFEXCLUDED 00002419 F 22 147j 212= PFHVPSA 00002406 F 22 103j 124= PFIDJE 0000251A F 22 1012j 1016= PFILLREF 00002FE9 F 33 780 806= PFLAGE 000025DC F 24 321j 334= PFLOAD 000025C2 F 24 112 269 271= F 28 236 F 36 72 131 PFMAKENEW 0000242C F 22 278j 329= PFMAP 00000380 F 20 311= 312e F 21 186s 268s 537s 660 772 2504s F 33 778s F 148 70s PFMAPOK 0000240A F 22 127j 143= PFNFW 0000250A F 22 976j 983= PFNIDLE 0000252D F 22 1005j 1049= PFNISHARD 0000250F F 22 953j 1000= PFNOREFVAL 00060000 F 6 131= F 24 547x PFNOTWSX 000024EC F 22 871j 895= PFPAGENUM 000028C0 F 6 133= F 21 11x 11x F 25 248 F 51 515 F 55 1153 PFPROC 00002402 F 21 1996a F 22 5 99 101= PFPROCESS F 22 4= 1102 PFPTR 0012C000 F 6 124= F 21 68 87 186s 187 246 250 257 258 262 270 274 278 535 646 649 653j 656 658 660 664j 671 721 742 744 746 748 768 770 772 776j 786 788 1172 1375 2414 2486 2495 2496 2509 F 24 186 187s 188j 189j 286 423 470 475 517s 518 537 574s 575 576s 579 614 615s 616j 617j 652 F 25 130 265 267 269 271 273 318 361 F 26 186 256 F 28 49 54s 91 534 F 32 52 55s F 33 115 470 632 775 800 836 935 937 939j 943 945s F 35 1054s 1056 F 38 1250s 1253 1257 F 39 82 84 111 112s 113 114s F 41 44 F 43 350 383 384s 429 430s 484 1304s 1309 1311 1320 1349 1577 1581 2698 2699 2743 2782 2783s 2942 2965s 2999 3008s 3024 3028s 3286 3296 3338 3347 3588 3621s 3656 3657 5195 5200s F 45 192 229 230s 288 289s F 46 57 218 254 255 260 282s 497 505s 646 653s 688 694s 740 746s 854s 859 865s 867 911s 916 922s 924 1178 F 48 211 228 1413 F 51 70 71s 107 134 135s 512 513 F 53 155 495 498s 682 F 55 1148 1149 F 75 224s 225 226 227s 228s 228s 229s 230s 231 F 148 65 68 70s 71 76 78s 79j 83 107 799 822s PFREEMEM 00002F8F F 32 341 F 33 8 577 583= F 35 739 PFREFBIT 00001E10 F 6 130= F 21 2179s 2502 F 24 188j 616j F 25 448 F 33 472s 634s 838s PFROBIT 00001A10 F 6 128= 131e F 21 2179s F 24 737s F 25 321 448 F 33 806x PFSIZE 00000100 F 6 135= F 21 646 770 PFSLOT 00000840 F 6 126= F 21 11x 11x 846s 848 1010s 1115 2099 2416 2439 F 25 132 F 26 254s F 39 81s F 43 732 1482 2108 F 53 132 537 549 559 622 689 712 733 746 767 F 140 294 PFUNLOAD 000025A0 F 24 113 144 149= F 29 859 PFUNLOSHR 000025A8 F 24 154j 174= PFUPAGE 00002422 F 22 217j 274= PFUPCABIGL 000025B8 F 24 231= 236j 241j PFUPCABRO 000025BD F 24 239= 243j PFUPCAGE 000025B6 F 24 114 151 222 227= F 29 657 1132 1394 PFUVIRT 00002426 F 22 247j 305= PFWSXIT 000025EA F 24 363j 381= PFWSXLP 000025E4 F 24 369= 372j 1 Jimbo's CREF Extractor 2.0 VRM, System C9303 (18 Mar 93) 12-May-93 12:56 PAGE 76 PFWSXNOPAL 000025E7 F 24 366j 375= PFWTTX 000024A5 F 22 607j 634j 641= PGETMEM 00002F0A F 24 710 F 33 9 210 217= PGNUMFLD 00000140 F 8 52= 2364e F 18 212e F 83 429 F 143 1492 PGNUMFLDMAJ 000000A0 F 8 53= 2466e PGNUMFLDMIN 000014A0 F 8 54= 2468e PHALT 00100000 F 13 338= 589e 597e 616e 617e 618e PHPNAV 00000311 F 20 108= F 21 722s 847 PINT 00000001 F 28 1430= 1432x 1432x 1432x 1432x 1432x 1432x 1433x 1433x 1433x 1433x 1433x 1433x 1433x 1433x 1434x 1434x 1434x 1434x 1434x 1434x 1434x 1434x 1435x 1435x 1435x 1435x 1435x 1435x 1435x 1435x 1437x 1437x 1437x 1437x 1437x 1437x 1437x 1438x 1438x 1438x 1438x 1438x 1438x 1438x 1438x 1439x 1439x 1439x 1439x 1439x 1439x 1439x 1439x 1440x 1440x 1440x 1440x 1440x 1440x 1440x 1440x 1441x 1441x 1441x 1441x 1441x 1441x 1441x 1441x 1442x 1442x 1442x 1442x 1442x 1442x 1442x 1442x 1443x 1443x 1443x 1443x 1443x 1443x 1443x 1443x 1444x 1444x 1444x 1444x 1444x 1444x 1444x 1444x 1445x 1445x 1445x 1445x 1445x 1445x 1445x 1445x 1446x 1446x 1446x 1446x 1446x 1446x 1446x 1447x 1447x 1447x 1447x 1447x PLBDTRXDA 00000018 F 8 838= F 43 2963 PLCYLPPCK 00000012 F 8 835= F 43 2954 PLDA 00000000 F 8 814= F 43 2936 PLFLAGS 00000004 F 8 822= F 43 2959 *PLFORMNEW 00002E10 F 8 824= *PLFORMRFRB 00002C10 F 8 825= *PLFRMTRID 00000005 F 8 827= PLINIDATE 00000007 F 8 828= F 43 2948 *PLINITSCANS 00000009 F 8 829= PLMAKER 00000000 F 8 818= F 43 2944 PLMODESN 00000021 F 8 844= 845e *PLMODESNL 0000004C F 8 845= PLNODRVID 00003010 F 8 823= F 43 2959 PLOADED 0000212D F 21 771j 780= PLOCK MACRO F 5 17= F 21 1278 1834 F 22 451 668 948 949 950 F 24 1032 1033 1034 F 25 317 F 26 41 326 365 441 F 28 53 128 203 226 424 445 507 1544 1569 1599 1621 1658 F 29 634 673 738 818 872 1046 1365 1385 1552 1557 1583 F 30 50 95 170 228 307 F 31 82 F 32 104 403 444 553 559 609 717 F 33 60 236 366 443 605 792 839 894 1031 1218 F 35 321 334 1044 1385 F 36 395 894 998 1005 1633 1735 1808 F 38 204 425 451 696 743 779 F 39 86 F 43 346 414 1519 2435 2609 2613 F 45 188 260 717 1795 1901 F 46 68 90 129 147 273 360 427 496 595 856 913 1189 1482 1526 F 47 45 114 F 48 1099 1315 F 49 51 264 454 524 756 896 F 50 43 146 264 347 380 515 1121 1354 F 51 59 F 52 20 F 53 334 384 434 F 54 116 141 467 516 F 55 65 808 883 961 1104 1150 1223 1234 1259 F 56 61 282 F 57 114 138 274 329 362 550 F 59 748 804 F 60 238 309 F 61 627 688 F 68 186 199 F 74 521 522 756 859 911 F 75 89 214 396 F 76 129 207 280 357 484 599 782 844 F 77 33 F 79 1295 F 83 339 457 1063 1125 F 84 31 101 246 271 F 86 21 65 F 94 77 163 F 97 107 204 F 100 1443 1444 1504 F 101 56 F 102 290 401 F 103 95 199 366 535 618 F 104 125 F 105 52 101 118 F 108 552 702 703 F 110 413 F 115 177 310 500 680 F 121 1611 F 125 255 264 F 126 495 503 580 F 127 201 335 410 520 558 781 925 F 128 58 F 130 548 572 F 131 1437 1443 1448 1453 F 133 508 1193 1234 F 136 466 F 138 650 795 F 139 396 435 F 141 147 724 F 143 588 736 1896 F 144 1007 1090 F 145 140 F 148 575 584 593 798 1266 *PLSDFREV 0000001F F 8 842= 1 Jimbo's CREF Extractor 2.0 VRM, System C9303 (18 Mar 93) 12-May-93 12:56 PAGE 77 *PLSDPID 0000001B F 8 841= *PLSDVID 00000019 F 8 840= PLSECPTRK 00000010 F 8 833= F 43 2950 *PLSERIAL 00000000 F 8 817= PLSERNO 00000001 F 8 819= F 43 2946 PLSIZE 00000013 F 8 836= F 43 2961 PLTRKPCYL 00000011 F 8 834= F 43 2952 PNAMELEN 00160802 F 16 1124= F 132 148s 354 PNAMELINK 00160800 F 16 1122= F 132 142s 152s 186 187s 246 247s 252 PNAMELIST 00001EA6 F 16 1119= F 132 240 241a 348 349a PNAMELOCK 00001EA5 F 16 1118= F 132 55a 65a 71a 113a 155a 162a 189a 198a 204a 238a 258a PNAMELOG 00000004 F 16 1128= F 132 140 191 250 PNAMEMAXLN 00000028 F 16 1125= 1126 F 132 42 99 294 PNAMENAME 0016000C F 16 1126= F 132 150a 357a PNAMEPROC 00160801 F 16 1123= F 132 61 146s 183 244 PNAMEPROT 00001EA7 F 16 1121= 1128e 1129a PNBOOTLOC 00000084 F 6 155= F 21 788 PNCIX 00000086 F 14 235= F 21 1172 1375 F 26 256 F 28 91 F 39 82 111 F 41 44 F 43 350 383 429 484 1309 1320 1577 1581 3286 3296 3338 3347 F 45 192 229 288 F 46 57 218 260 497 646 688 740 859 916 1178 F 48 211 228 F 51 70 107 134 F 53 155 495 682 F 148 799 PNCPUPAGE 00000081 F 14 218= F 21 68 671 721 PNHEADPAGE 00000087 F 14 238= F 20 312e F 21 768 PNINITPAGE 00000088 F 14 242= F 21 126 262 268s 2414 F 28 49 F 33 935 PNINITPROC 000000AC F 0 229= F 21 250 F 148 71 107 PNPAGEZERO 00000080 F 6 153= F 21 649 658 F 26 186 PNPPLWNDO 000000FB F 14 246= F 21 2121 F 24 518 575 F 28 534 F 35 1056 F 38 1253 PNTRPLACE 00178801 F 35 1253= 1271s 1272s 1279s PNTRPLACE 00178801 F 35 1322= 1327s 1329 1331s 1332s PNUSERMEM 000000FC F 14 250= F 24 423 470 F 33 836 1003 F 37 87 PNWNDO1 00000082 F 14 221= F 21 246 742 2486 2509 F 25 267 F 35 395 443 599 681 945 1131 1192 1257 F 57 315 F 58 97 F 61 548 F 115 346 F 141 728 828 F 142 1031 PNWNDO12 00000041 F 14 226= F 35 539 PNWNDO2 00000083 F 14 225= 226e F 21 270 744 F 35 400 448 594 686 934 1121 1182 1262 F 39 84 113 F 57 474 607 F 143 387 PNWNDO3 00000084 F 14 229= F 21 274 746 F 35 405 453 589 691 939 1126 1187 1267 F 38 1360 F 148 238 PNWNDO4 00000085 F 14 232= F 18 398e F 21 278 748 F 25 269 F 43 1311 2743 2782 2942 2999 3024 3588 5195 *PORTALWRIT 0000008B F 7 1076= *PORTBOF 00003010 F 7 1017= PORTBREAK 00000087 F 7 1068= F 49 283 F 103 1049 *PORTBRK 00003610 F 7 1020= PORTCD 00003A10 F 7 1022= F 48 664 844j 865j 891j PORTCHKPAR 00003810 F 7 1085= F 48 651 PORTCIRATE 00000081 F 7 1052= F 49 783 F 103 496 *PORTCLRAIN 0000008C F 7 1078= PORTCORATE 00000082 F 7 1053= F 49 801 F 103 456 PORTCRALL 0000001F F 7 1103= F 49 749 PORTCRCXON 00003A10 F 7 1100= 1103e F 50 294 F 103 1079 PORTCRESET 0000008E F 7 1097= F 49 770 1 Jimbo's CREF Extractor 2.0 VRM, System C9303 (18 Mar 93) 12-May-93 12:56 PAGE 78 PORTCRFBR 00003610 F 7 1098= 1103e 1104e PORTCRFI 00003E10 F 7 1102= 1103e F 103 940 972 PORTCRFO 00003C10 F 7 1101= 1103e F 103 909 972 PORTCRFS 00003810 F 7 1099= 1103e 1104e PORTCRINIT 00000018 F 7 1104= F 49 771 PORTCS 00003E10 F 7 1024= F 48 664 PORTCSTAT 00000083 F 7 1056= F 49 650 815 F 103 685 PORTCSTAT2 0000008D F 7 1080= F 49 683 808 F 103 722 PORTCZAP 0000008F F 7 1106= F 48 1211 1230 F 49 748 F 50 293 F 103 908 939 971 1078 PORTDSR 00003C10 F 7 1023= F 48 664 776j 789j 813j 843j 864j 892j PORTDWELL 00000086 F 7 1066= F 49 197 281 F 103 1014 PORTECHOOF 00000089 F 7 1072= F 49 825 F 103 639 PORTECHOON 00000088 F 7 1070= F 49 821 F 103 648 *PORTEVENP 00000002 F 7 1093= PORTFBRK 00003410 F 7 1019= F 48 893s 908 PORTFFE 00003210 F 7 1018= F 48 647j PORTFILE MACRO F 11 502= F 12 9 *PORTFLUSHI 00000085 F 7 1064= *PORTFLUSHO 00000084 F 7 1062= *PORTHIBIT 00000001 F 7 1092= PORTIERR 00000091 F 7 1114= F 50 1351 1366 PORTINFORD MACRO F 11 573= F 133 240 PORTLAST 00003010 F 7 1013= F 48 375j *PORTNOPAR 00000000 F 7 1091= *PORTODDP 00000003 F 7 1094= PORTPARITY 00003A20 F 7 1087= F 103 718 PORTPCINIT 00000090 F 7 1111= F 48 1196 F 49 737 PORTRI 00003810 F 7 1021= F 48 664 874j PORTSBRK 00003410 F 7 1083= F 103 718 PORTSCD 00003210 F 7 1058= F 103 681 PORTSCTS 00003010 F 7 1081= F 103 718 PORTSDTR 00003410 F 7 1059= F 48 880 1335 F 103 681 PORTSRDE 00003610 F 7 1084= F 50 405s F 103 718 PORTSRI 00003010 F 7 1057= F 103 681 PORTSRTS 00003810 F 7 1060= F 48 880 1335 F 103 681 PORTSSTOP2 00003E10 F 7 1095= F 103 718 PORTSTAT 00003210 F 7 1014= F 48 418j PORTSXOF 00003210 F 7 1082= F 103 718 *PORTWRITIN 0000008A F 7 1074= POSTNETERM 000033D2 F 36 576j 585= POWERFAIL 0000277A F 21 1976a F 26 5 33 35= POWERFLAG 0000044E F 15 144= F 21 1972s F 26 46s 87 185s F 28 193 F 43 345 827 990 F 45 187 503 555 F 46 192 F 48 402 930 980 1247 POWERRTNPC 00000450 F 15 149= F 26 97s F 48 1366 POWERUP 0000278F F 21 675j F 26 6 84 86= POWERUP2 00002799 F 26 7 94j 122 124= F 28 194j POWERUPLOC 0000044F F 15 148= F 26 95 128s F 43 345s 345s 827s 827s 990s 990s 1308s 1319s 5194s 5201s F 45 187s 187s 503s 503s 555s 555s F 46 192s 192s F 48 361s 401s 929s 969s 979s 1246s PPAGELIST 00001E61 F 16 1033= F 22 951 1021a F 24 1035 F 30 51 308 310s F 32 433a F 35 322 1046 F 57 330 F 144 1176 PPAGELOCK 00001E21 F 16 1032= F 22 949s 977s 1037s 1051s F 24 1033s 1044s 1057s F 30 50s 54s 307s 311s F 32 403s 412s 445s 552s F 35 321s 329s 335s 1044s 1063s F 43 1352s 1359s F 54 467s 469s F 57 329s 338s 1 Jimbo's CREF Extractor 2.0 VRM, System C9303 (18 Mar 93) 12-May-93 12:56 PAGE 79 PPAGEPROT 00001EA1 F 16 1039= 1066e 1068a PPBLOCK 00170801 F 16 1046= F 22 952 1004 1036 F 24 1036 1054 F 25 375 F 28 1570s 1622s F 30 52 174 234 306 F 32 388 402 485 504 520s 560 561 610 F 33 895s F 35 261 323 326 339 349s 737 782s 790 1047 1394 1403s F 43 1351 1358 1389s 2676 2729 3198s 3460s 3724s 3732 3801 3821 3877 3884 3899s 4285 4448 4519 5061 5070 5082 5184 F 44 69 71 153 166 168 181 F 54 459 466 470 F 55 615 619 F 57 331 F 100 1452 F 143 509 519 2086s F 148 87s PPBSYHIBIT 00001E10 F 16 1058= F 32 407j PPBUSYWORD 00170802 F 16 1048= 1049e 1057e F 24 708s F 30 233s F 32 405s 653s F 43 1286s 1303s 3195s 3723s F 54 468s F 57 431s F 141 498 PPCLNIDLE 00001DDC F 16 1017= F 21 2350a 2421 F 30 96 99s 236 238s F 35 350 352s 1404 1406s PPCNTL 00090052 F 16 1049= 1050e 1051e 1052e 1055e 1056e F 30 134s F 32 521s PPCNUMARR 00001EB3 F 17 118= F 32 166s F 37 195s PPDISKERR 00090212 F 16 1051= F 32 483 517 F 43 3461 3796s 3873s F 44 53 F 141 500s PPENDIDLE 00001DFD F 16 1019= F 21 442s F 22 1013s F 30 129s 179s 245 247s F 35 345s 1399s PPERRCOUNT 00001E20 F 16 1030= F 32 557s PPERRLIST 00001E1F F 16 1028= F 32 554 556s PPERRLOCK 00001E1E F 16 1027= F 32 553s 558s PPFBFBI 00170804 F 16 1081= F 24 543a F 35 784s F 43 1381a F 143 1483s 1485s 2081a PPFBIBLK 00090C62 F 16 1057= F 21 2181s F 24 530 F 35 1055 F 38 1217 PPFBIDISP 000904A0 F 16 1041= F 21 2183s F 24 529 F 35 1060 F 38 1219 PPFBLNTH 0000000F F 16 1083= 1084e F 143 2078 PPFBLOG 00000004 F 16 1084= F 35 768 F 43 1384 2600 F 143 2074 PPFBPROTO 00001EA1 F 16 1079= 1083e 1085a PPFWIP 00090612 F 16 1055= F 22 974 F 35 747s 747 F 43 2610 2610s PPHASHFLD 00003460 F 16 1007= F 22 944 1020 1036 1050 F 24 1031 F 30 49 306 F 32 402 F 35 320 1042 1054s 1062 F 43 1351 1358 F 54 466 F 57 328 PPIDLCOUNT 00001DDA F 16 1010= F 21 2104s F 22 1018s F 29 1021 1039 1224 1584 F 30 116s 133s 183s 251s F 46 1312a F 144 1163 PPIDLOCK 00001DD9 F 16 1009= F 22 950s 954s 1019s 1052s F 24 1034s 1043s 1056s F 30 95s 120s 170s 189s 228s 252s F 32 444s F 35 334s 356s 1385s 1415s PPLASTL 00001DDB F 16 1011= F 30 104s 106s 114 PPLINIT 00001E1D F 16 1023= F 21 267s F 148 85 PPLINK 00091F10 F 16 1044= F 21 255s 266s 403s 2101s 2289s 2351 2361 2363s 2364s F 22 1010 1011s 1022 1023s 1024s F 28 1546 1572s 1601 1624s F 30 98 125 176 177s 237s 243s 246s 309s F 32 434 440 441s 555s F 33 848 849s 897s 1034 1037s 1228 1229s 1231s F 35 342 343s 351s 1396 1397s 1405s 1407 F 148 88 PPLMAPSIZE 00000042 F 16 164= 165 F 19 1125 F 21 2078 PPLMAXDISP 000003F4 F 16 163= F 21 2201 PPLNTH 00000004 F 16 1066= 1067e 1080 F 32 658 F 35 772 PPLOG 00000002 F 16 1067= F 21 2171 2271 PPLOOP 00002D29 F 30 109= 115j PPLPFMAP 00001C80 F 16 165= F 21 2084 2120s F 24 532 F 35 1058 F 38 1254 PPLPMDISP 00001C7F F 16 162= F 21 2182 2206s PPLPMINDX 00001C7E F 16 161= F 21 2077 2180 2203s PPLWINDOW 0001EC00 F 14 245= 246e F 21 2123a F 24 533a F 35 1061a F 38 1 Jimbo's CREF Extractor 2.0 VRM, System C9303 (18 Mar 93) 12-May-93 12:56 PAGE 80 1256a PPMEMERR 00090812 F 16 1056= F 22 975 F 25 377s 377 F 32 442 712 F 43 4424 5051 5078s 5078 PPMODIFIED 00090012 F 16 1050= F 32 765s 765 811 812s 812 F 43 1391s 3196s 5048s 5048 PPPMVALUE 00170803 F 16 1061= F 21 2178s 2179s 2439 2487 2500s 2510 F 24 716 F 33 842 900 1039 1221 F 43 1310 1313 2744 2943 3000 3025 3591 3606 3666 5081 5196 PPPUTADT 00090412 F 16 1052= F 32 470 F 35 325s 325 F 55 617s 617 F 143 517 517s PPU3WORD 00174803 F 19 310= F 21 1153s F 53 491 PPU3WRD 00000008 F 7 589= F 53 497s PPUABORT 00000001 F 7 572= F 21 1176s F 43 494s 4686s F 45 341s 1076s 1501s F 48 249s 1460s PPUADDR1 00000005 F 7 582= F 43 2705s 3670s F 45 1585s 1597s F 48 303s 1008s F 51 324s 424s PPUADDR2 00000007 F 7 587= F 43 3661s F 45 638s *PPUAMEMA 00001560 F 7 584= *PPUASLOT 00000840 F 7 583= PPUBADSTAT 00001F00 F 19 318= F 48 165 PPUCABLED 00000000 F 7 542= F 21 1180 F 43 354 F 45 196 F 51 110 F 53 688 *PPUCCOUNT 000022F0 F 7 580= PPUCHAN 00003020 F 7 539= F 21 1174 1271 1585s 1640 1692 1744 F 25 200 226 F 26 255s F 41 42 F 43 734 1480 2110 F 53 153 686 713 734 756 778 F 140 292 PPUCHANS 00000004 F 7 540= F 19 311 F 21 1197 F 26 244 F 53 147 PPUCHANS1 00000002 F 7 573= F 43 371 423 F 45 207 262 F 48 157 F 51 62 121 PPUCHANS2 00000003 F 7 574= F 45 1051 PPUCLAST 00002010 F 7 579= F 43 2706 3663 F 45 1586 F 48 307 1014 F 51 426 F 78 127s PPUCNT1 00000004 F 7 578= F 43 2707s 3672s F 45 1587s 1599s F 48 308s 1015s F 51 327s 427s PPUCNT2 00000006 F 7 586= F 43 3664s F 45 640s PPUCNTLPTR 00174804 F 19 311= F 21 1181s 1193s 1266s 1379s 1580s 1635s 1687s 1739s F 26 249 F 41 49 F 53 149 PPUELEMENT 00178801 F 21 1102= 1158s 1171 PPUIBCNR 00003210 F 7 552= F 19 318x F 43 226e 4496j F 45 1115x 1552x *PPUIBTR 00002010 F 7 564= PPUICIA 00002810 F 7 559= F 21 1542 1598 F 43 367j 1034 F 45 210j 274 578 590 F 48 322 1508 F 51 120j 388 PPUICONF 00002A10 F 7 558= F 19 318x F 43 226e 4461j F 45 1115x 1552x PPUIDMAD 00003E10 F 7 545= F 43 2012 2285 2703 3754 F 45 1034 1468 F 48 297 1002 F 51 320 416 *PPUIDMAE 00003A10 F 7 547= *PPUIDMANB 00003010 F 7 553= PPUIDPPE 00002410 F 7 562= F 19 318x F 43 226e 4495j F 45 1115x 1552x PPUIINTC 00003810 F 7 548= F 43 368j F 45 211j 267j F 51 122j *PPUIINTP 00003C10 F 7 546= PPUIINTR 00002C10 F 7 556= F 45 644 *PPUILAST 00003410 F 7 551= PPUIMPE 00002E10 F 7 555= F 19 318x F 43 226e 4425s 4600j 4634j F 45 1115x 1504j 1552x PPUINTSTAT 00000001 F 7 544= F 41 46 F 43 363 F 45 205 F 51 119 PPUIPIA 00002610 F 7 561= F 45 644 1 Jimbo's CREF Extractor 2.0 VRM, System C9303 (18 Mar 93) 12-May-93 12:56 PAGE 81 PPUIROLL 00003610 F 7 550= F 45 268j PPUITOUT 00001E10 F 7 569= F 43 226e 533 4460j F 45 371 1115x 1552x PPUIXTRA 00002210 F 7 563= F 19 318x F 43 226e 4497j PPULASTST 00174802 F 19 309= F 41 48s PPULOG 00000003 F 19 315= F 21 1110 1114 PPUOPMSGID 00174801 F 19 308= F 26 269 271s F 53 532 575s 616 625 626s PPUPF 00174800 F 19 307= F 21 1116s 1173 1270 1584 1639 1691 1743 F 41 43 F 53 132 154 496 537 549 559 622 PPUPROT 00001F00 F 19 306= 315e 316a PPURESET 00000000 F 7 571= F 53 725s PPUREV3MP 000021D4 F 21 1148 1203= PPUREV3MSK 000021D3 F 21 1202= 1203a PPUSCSTAT 00000003 F 7 576= F 21 1178s F 43 2704s 3755s F 45 345s 1035s F 48 298s PPUSDIDLE 00001DDD F 16 1018= F 21 441a 2100 2102s 2355 2362s F 22 1002 1003a F 24 1053 F 30 110 126s 128a 172 173a F 35 337 338a 1389 1390a PPUSSSTAT 00000002 F 7 575= F 21 1543s 1599s F 43 1035s 2013s 2286s F 45 275s 579s 591s 645s 1469s F 48 323s 1003s 1509s F 51 321s 389s 417s PRIMESLOT 00178801 F 21 2409= 2417s 2440 PRIVWORD 00170801 F 8 1595= F 17 77e F 134 255s PROCFL 000028F5 F 28 197j 258= PROCINFORD MACRO F 10 336= F 123 657 PROCLOOP 00002733 F 25 384= 416j PROCNEXT 00002CFF F 29 1660= 1678j PROCNUMSIZ 0000000C F 17 140= 142e 143 148 537 538 F 76 724s PROCOK 000028D0 F 28 209j 211j 216= PROCSERNM 00001D12 F 16 338= F 37 160s F 107 296s PROTECTED 000024BD F 22 194j 316a 711 713= PRRATIO 00000014 F 23 206= 207x 221x PSACOMEGO F 37 4= 331 PSADR 00178801 F 36 1914= 1920s 1925 PSAOK 0000359B F 36 1813j 1815= PSAPROT 00001EC4 F 17 241= 315e 316a PSAPTR 00178801 F 24 696= 704s 706 726s 740 752s 754s PSCACHN 00089F10 F 17 249= F 27 136 140s 180s F 28 255 508 530 790 F 32 192 195s 215 F 36 220 1087 1450 F 37 130s 145 F 40 81 F 47 53 F 54 534 F 67 550 579 F 125 1000 F 131 435 688 793 1159 PSCACHNP1 00089F11 F 17 253= F 27 141s 177 179s F 28 709 948 993 1126 F 36 76 135 222s 1568 F 40 72 F 64 48 71 F 65 184 F 67 910 F 74 751 F 78 47 F 82 75 204 F 84 29 F 85 54 222 247 F 87 69 F 91 177 F 92 224 F 93 86 F 94 37 234 F 95 158 F 97 264 F 98 87 99 F 100 373 1502 F 101 399 511 536 804 F 103 218 F 105 84 F 107 124 177 228 F 108 60 F 120 98 F 121 66 158 217 251 274 1537 F 123 981 F 124 508 F 125 398 726 1015 1043 1116 1180 F 126 639 F 127 1012 F 130 304 F 131 236 401 1150 F 133 254 361 F 135 373 533 597 634 661 727 747 787 873 894 932 945 986 1032 1051 1108 F 136 345 F 137 193 F 139 178 392 779 F 140 225 F 141 357 871 911 F 142 107 1027 F 144 457 PSCNTLMODE 00089214 F 17 265= F 21 603s F 28 788 1123s F 36 219s F 50 307 PSCURRPROC 00088116 F 17 273= F 21 602 F 24 275 741 828 906 923 F 28 232 F 29 916 F 32 62 109 244 275 F 36 216s 1135 1381 1816 1921 F 37 137s F 55 1241 F 79 1942 F 121 1260 1320 F 123 904 F 125 107 F 127 734 F 130 629 F 131 425 1897 PSDDIRPRIV 00088044 F 17 262= F 37 157s F 79 378 979 F 104 360 379 1 Jimbo's CREF Extractor 2.0 VRM, System C9303 (18 Mar 93) 12-May-93 12:56 PAGE 82 F 118 55s F 123 378 F 131 352s 1108 1109s 1906s PSDFLTDIR 00089F14 F 17 268= F 28 1159 F 37 154s F 65 504 F 70 235 245 F 79 376 770 975 1601 F 104 371 F 118 53s 59 F 119 142 F 123 375 802 F 124 843 857 F 130 313s F 131 350s 419s 1105 1107s 1904s PSDPARM 00001DD6 F 16 929= F 29 655 PSENDRUN 00089414 F 17 266= F 29 804s F 126 524s PSFCBLIST 00089F17 F 17 276= F 36 568a 604a 1957 F 50 768 770s F 69 148 150s 240 243s F 108 806 F 123 759 F 130 623 F 131 1699 1701s PSGIFTUNIT 00168809 F 17 280= F 36 654 F 127 784a 926 931s 1068 1072s PSGRACE 00168004 F 17 251= F 29 1014 1016s 1078s 1170 F 131 1911s PSHELDATE 00168815 F 17 307= F 37 163s F 123 908 F 124 738 F 130 300 F 131 1909s PSLASTQUAN 0008810B F 17 285= F 28 239s 241a F 29 911 PSLGFSESS 000888B3 F 17 259= F 123 935 1744s PSLOCK 0016880C F 17 286= F 28 507s 529s 582s 608s 662s 877s 910s 1658s 1660s F 29 872s 874s F 32 182 F 33 366s 368s F 36 894s 936s 1808s 1839s 1853s F 52 20s 22s F 127 781s 796s 864a 867s 925s 932s 1031a 1034s F 133 1193s 1195s PSLOCKCNTR 00088230 F 17 245= F 29 1164 F 38 600s 840s F 59 753s 817s PSLOG 00000005 F 17 315= F 32 295 F 37 61 78 PSMAPVALS 0016881B F 17 312= F 24 421 424 430a F 33 303s 734 741s 903s 990 F 69 43 F 107 569 PSMSGALLOW 00168818 F 17 309= F 127 202 350 444 480 482s 523 525s 560s F 131 371s *PSMSGINT 00168819 F 17 310= PSMSGLIST 0016881A F 17 311= F 36 635 F 127 213a 337a 566 569s PSNFLDLN 00000017 F 16 337= F 17 416 F 18 68 82 391e PSOPMSGID 00168817 F 17 308= F 128 59 107s 143 F 130 351 635 PSOURCPU 00088043 F 17 258= F 28 208 420s 459s F 144 970s PSPFFREQ 00089071 F 17 252= F 29 1074 1169 PSPRIORITY 00089830 F 17 247= F 29 812 1018 1071 1166 F 131 1119 1120s 1835s PSPRIVMASK 00088854 F 17 263= F 107 460 F 131 1113 1114s 1833s PSPROCCB 00089F12 F 17 256= F 26 43 F 29 638 674 751 861 919 F 36 835 1159 1178 1388 F 37 173s F 50 710 F 67 775 F 75 93 122 216 294 F 76 149 721 F 102 134 181 436 F 123 662 691 885 F 125 480 F 127 188 231 731 766 F 128 73 F 130 499 510 F 131 377 440 618 670 693 784 798 1087 1145 1164 1202 1214 1216 1364 1367 F 132 144 181 235 F 133 1057 1126 1200 1230 1316 PSPROCLIST 00089F15 F 17 271= F 24 228 869 F 25 390 F 28 971 1054 F 29 1300 1316 F 32 250 F 35 1523 1578 F 36 1142 F 37 138s F 50 657 F 72 113 F 104 204 F 130 293 F 131 228 1076 1288 1704 PSQUANTPTR 0016880F F 17 301= F 28 245s F 29 908 *PSRBCDOTRP 00002C10 F 6 90= PSRCARRY 00000004 F 6 100= F 66 186 PSRCARRYB 00003A10 F 6 96= 100e PSRCONDB 00003C20 F 6 97= F 65 201s *PSRDEFS MACRO F 10 305= *PSRFIXATRP 00003010 F 6 91= *PSRFLTATRP 00003210 F 6 92= PSRMODIF 00000010 F 6 99= F 43 1531 1539 4806 4808 F 46 795 797 1242 1266 1346 1385 1394 1403 F 56 142 145 F 60 65 65 F 61 67 67 F 62 57 62 F 63 317 327 432 440 F 65 361 365 F 66 60 67 80 83 86 89 166 168 173 175 184 189 F 68 342 344 F 74 1379 1381 F 81 146 148 F 83 91 93 F 148 346 348 2276 2285 PSRMODIFB 00003610 F 6 94= 99e 1 Jimbo's CREF Extractor 2.0 VRM, System C9303 (18 Mar 93) 12-May-93 12:56 PAGE 83 PSROVERFB 00003810 F 6 95= 101e *PSROVERFLOW 00000008 F 6 101= *PSRUNDETRP 00003410 F 6 93= PSSESLIM 00168813 F 17 305= F 24 32 F 55 954s F 56 53s F 68 159 F 123 927 F 124 821s 830 F 131 1117 1118s 1920s F 148 123s PSSESMAX 00168814 F 17 306= F 24 43 44s F 67 782 F 68 176 177s F 124 835 F 131 1921s PSSESUSD 00168812 F 17 304= F 24 31 42s 87s 89s F 68 157 172 175s F 123 925 F 124 833 F 131 1915s PSSHUTTIME 0016880E F 17 300= F 29 797 955s PSSUMCPU 0008810A F 17 282= F 22 1089s F 29 806 912s 1663 1666s PSSUMMAX 0000FFFF F 17 284= F 29 801 PSSUMSDT 0008A10A F 17 283= F 29 800 802s 1668 1671s PSTIMEUSED 00168810 F 17 302= F 29 913s F 67 778 F 123 911 F 124 726 F 130 296 F 131 1912s PSTIMLIM 00168811 F 17 303= F 29 914 944 950s F 37 165s F 123 914 F 124 713s 720 F 131 1115 1116s 1914s PSUERROR 0016880D F 17 288= F 28 248 497a 607s 818s 824 826s 878a 1659s F 29 873s F 32 219 222s F 33 367s F 36 895 1331a 1846a F 37 280s F 52 21s F 133 1194s PSUNITS 0008A316 F 17 274= F 28 1349 F 36 1926 F 50 676s 694 696s F 67 80 F 69 211 213s 291 299s F 104 199 F 126 150 220 254 F 130 619 620s PSUSERLIMP 00089F13 F 17 260= F 22 397 566 F 24 34 45 91 F 28 1138 F 29 940 F 37 153s F 50 700 F 59 323 F 67 852 863 908 923 F 70 225 401 F 73 124 133 341 349 F 79 374 F 107 448 F 118 33 73 F 121 1287 1339 1345 F 123 349 363 786 917 1794 F 124 702 741 752 763 F 127 150 F 130 171 290 314 333s 396 495 497 F 131 304 416s 773 1099 1891s F 133 1295 1319 F 134 634 F 137 293 514 F 139 718 F 143 697 PSWAITED 00088010 F 17 242= F 74 469 489s F 76 864s F 102 110s F 108 754s PSWSSIZE 000880F2 F 17 255= F 22 614s 640s F 24 707s F 25 541s F 28 238 F 29 1073 1168 1234 1255s F 35 235s 743s 1479s F 36 489s F 123 929 F 125 260s F 143 1891s PTHBUSY 000810C4 F 17 420= F 76 132s 267s 281 PTHECHARB 00160004 F 17 436= 437e 438e F 84 90s PTHECHARS 00160005 F 17 440= F 84 92a F 94 54a PTHECONTN 00080011 F 17 437= F 84 156s F 94 86 F 100 916 PTHEHDR 00000005 F 17 439= 444e F 84 61 276 281 283 PTHELINK 00081F10 F 17 435= F 76 293 F 84 107 108s 109s PTHELOGL 00081640 F 17 434= F 76 296 F 84 85s 247 253 284s F 94 88 275 F 100 918 PTHENCHARS 000800B0 F 17 433= F 84 86s 150 F 94 51 84 PTHEPROT 00001EC8 F 17 431= 442a PTHERTYPE 00080271 F 17 438= F 84 122 286s F 94 47 269 PTHEWORDA 00160800 F 17 432= 433e 434e 435e 439e PTHEXCWR 00081373 F 17 416= F 84 34 57s 136 161s 250s 274 321 326s PTHID 00160804 F 17 418= 419e 420e 421e F 76 45 104s PTHIDTOP 000828C4 F 17 421= F 76 47 PTHINTE 00080411 F 17 408= F 36 850 F 76 147s 237 257s F 84 132 F 104 142a F 127 824s 994s PTHLINK 00081F10 F 17 403= F 76 114s 284 285 286s F 94 271 PTHLNTH 00000008 F 17 426= 427e PTHLOCK 00160807 F 17 424= F 76 129s 162s 207s 268s 280s 314s F 84 1 Jimbo's CREF Extractor 2.0 VRM, System C9303 (18 Mar 93) 12-May-93 12:56 PAGE 84 31s 68s 101s 165s 190s 227a 231s 246s 251s 271s F 94 50s 77s 83s 163s 192a 195s 224s F 100 915s F 131 1437s 1535s PTHLOG 00000003 F 17 427= F 76 98 102 302 PTHPROT 00001EC8 F 17 401= 426e 428a PTHQUE 00081F11 F 17 411= F 36 852 F 76 290 294s 298 F 84 105a F 94 164 272s F 100 136 PTHRDR 00080011 F 17 406= F 76 138 145s 254s F 84 32 272 PTHREADER 00080112 F 17 413= F 36 846 F 76 150s 232 255s F 84 127 F 131 1532s PTHREADFCB 00082312 F 17 414= F 76 146s 239 256s F 84 134 F 127 991 993s F 131 1533s PTHSIZE 000808B1 F 17 409= F 76 108s F 84 65 67s 249s 277 279s F 94 277s PTHUSED 00080211 F 17 407= F 36 854 F 76 140s 153s F 84 178 F 94 184 PTHVOL 00080084 F 17 419= F 76 50 106s PTHWORDA 00160800 F 17 402= 403e PTHWORDB 00160801 F 17 405= 406e 407e 408e 409e 411e PTHWRTRS 00160806 F 17 423= F 36 856 F 76 137s 151 228s F 94 182 PTRINTDEV 00002001 F 21 12= 1004s 1106s PTRSSUCONT 0000219D F 21 1015s 1059= PUNLOCK MACRO F 5 24= F 21 1283 1839 F 22 457 674 772 831 954 977 979 984 1009 1019 1037 1051 1052 F 24 1043 1044 1045 1056 1057 F 25 340 F 26 333 372 448 F 28 55 66 135 219 230 428 451 465 529 582 608 662 877 910 1548 1574 1603 1626 1660 F 29 688 828 871 874 1055 1095 1108 1378 1406 1554 1559 1610 1617 F 30 54 120 189 252 311 F 31 84 F 32 412 445 552 558 565 636 654 735 795 F 33 79 255 362 368 491 650 795 850 899 1047 1234 F 35 329 335 356 1063 1415 F 36 397 936 1009 1084 1156 1182 1185 1194 1208 1645 1658 1741 1751 1839 1853 F 38 251 308 430 438 603 719 809 827 884 1105 F 39 91 F 43 378 431 1352 1359 1526 2441 2611 2619 F 45 221 290 720 1798 1906 F 46 70 98 138 149 160 275 387 454 510 603 866 923 1205 1211 1493 1534 1543 F 47 74 117 F 48 1089 1159 1331 F 49 62 349 578 619 758 842 904 F 50 81 216 266 349 361 383 403 562 1099 1374 1382 F 51 69 F 52 22 F 53 354 401 454 F 54 163 469 521 F 55 71 485 813 841 888 910 966 1075 1108 1116 1159 1228 1238 1264 F 56 66 291 F 57 127 143 175 281 338 393 558 567 F 59 760 819 F 60 273 337 F 61 656 701 F 68 193 F 74 479 535 537 758 888 928 937 F 75 129 235 398 F 76 162 268 314 511 592 629 788 861 881 F 79 1326 F 83 342 364 460 480 1068 1133 1144 F 84 68 165 190 231 251 F 85 218 F 86 32 37 73 F 94 50 83 195 224 F 97 124 244 319 F 100 915 1453 1463 1464 1506 F 101 58 F 102 190 227 234 240 313 341 423 F 103 97 212 368 571 620 F 104 127 F 105 67 74 129 F 108 578 749 762 F 110 421 F 115 183 312 502 685 F 121 1613 F 125 270 282 F 126 498 512 539 582 F 127 240 258 269 365 375 414 527 562 796 867 932 1034 F 128 63 68 F 130 568 579 F 131 1535 1541 1547 1570 F 133 510 1195 1239 1248 F 136 469 F 138 677 811 F 139 415 446 F 141 737 998 F 142 718 894 F 143 594 740 F 144 1018 1036 1056 1097 1105 F 145 161 183 F 148 583 592 601 823 1269 PURGESDV 0000005A F 8 1837= F 110 389 PUTADT 0000502C F 32 503 F 35 360 F 54 12 40 247= PUTDONE 00002D63 F 30 239j 250= PUTERROR 00002464 F 22 472= 481j PUTERROR 000024B7 F 22 681= 689j 1 Jimbo's CREF Extractor 2.0 VRM, System C9303 (18 Mar 93) 12-May-93 12:56 PAGE 85 PUTFRADTE 00003700 F 38 477j 594= PUTFRCLN 000036FD F 38 455j 578= PUTFREEBLK 000036B9 F 38 7 168 408= F 55 815 F 138 731 PUTFRFREW 000036D3 F 38 450= 510a PUTFRQUE 000036ED F 38 454j 508= 580j PUTFRRTN 00003687 F 38 307= 464j 476j PUTIDLE 00002D51 F 28 1550 1605 F 30 18 221 227= F 32 54 F 33 852 F 43 1683 1688 2966 3009 3029 3473 3900 3968 F 148 90 PUTIDLNL 00002D6A F 30 19 222 276= F 32 537 PUTPPAGE 00002D6C F 30 17 300 305= F 43 2432 PUTRTN1 00003689 F 38 311= 435j 851j PUTWHOLEPG 00003074 F 33 477 635 1215 1217= PWRUPADDR 00000000 F 6 12= F 21 499a 502s 631 QDISK 00002E70 F 32 10 390 603 608= F 35 789 R4SAVE 00178802 F 35 1323= 1328s 1350 RADCM 00002A6E F 28 1084= 1117 RADMANAGER 00002556 F 23 352= F 56 127 F 67 390 F 68 455 F 107 477 F 134 903 F 135 119 RAFCHARIDX 000028C0 F 8 2470= F 101 393s 421s RAFMAJINDX 000000A0 F 8 2466= F 68 710 738s F 83 280 281 307 315 320 F 93 193 194 206 F 101 190 394s 647 708 F 142 701s 877s F 143 1196 1246 1271 1283 1334 1342 1359 1567 1586 1598 1650 1658 1676 RAFMININDX 000014A0 F 8 2468= F 68 647 653s 680 686s 696 724 731s F 83 381 382 412 438 F 93 226 250 251 F 101 190 392s 708 724 F 142 701s 877s F 143 1196 1210 1248 1355 1359 1512 1525 1539 1569 1672 1676 RAFTEMPTY 00000000 F 8 1825= F 83 685 795 F 100 481 490 RAFTLARGE 00000003 F 8 1828= F 79 603 F 83 918 953 F 143 1308 1623 RAFTSMALL 00000002 F 8 1827= F 75 553 F 79 600 F 83 608 614 650 987 F 95 431 RAFTTINY 00000001 F 8 1826= F 83 683 762 838 F 143 1575 RBLDBLKTMP 00178802 F 38 1411= 1480s 1544 RBLDSECIND 00178801 F 38 1410= 1464s 1501 1546 RBLDWNDO2 00178803 F 38 1412= 1418a 1447a RCELIDLIST 00160803 F 17 512= F 76 531 714 725a F 102 131 146 186 188s 329 410 RCELINK 00160800 F 17 509= F 76 667 668s F 102 206s RCELOG 00000002 F 17 514= F 76 671 F 102 201 RCEPROT 00001ECA F 17 508= 514e 515a RCERESRCE 00160801 F 17 510= F 76 665 F 102 125 204s 299 408 READCOUNTS 00001D4C F 16 504= F 43 3794s F 139 257a 270a REALSTART 00000003 F 21 633j 645= REBUILDADT 00003830 F 38 10 1187 1407 1415= F 138 236 RECONFIG 000027C1 F 26 159 210 217= REDISP 000028F4 F 28 254= 571j 881j 965j REGSAVE 00178801 F 21 1785= 1793s 1842 RELESEFLAG 0000031E F 20 165= F 21 534s 753 RELGO 00002E88 F 32 631j 652= RELNOXTRA 00002E90 F 32 656j 660= RELQUEUE 000034CB F 36 1164j 1183= REMLIST 00178801 F 25 515= 521s 526 537 REMOVEALL 00002766 F 25 395 397 512 520= REMOVECPU 000052CC F 28 455a F 55 11 1191 1195= REMOVEMES 000036E5 F 38 460j 487= REMPPL 00178803 F 25 517= 525 REMR3R4 00178802 F 25 516= 517e 522s 547 1 Jimbo's CREF Extractor 2.0 VRM, System C9303 (18 Mar 93) 12-May-93 12:56 PAGE 86 RESETTAB 000027E9 F 26 251 281= RESETTCG 00003358 F 36 21 255 260= 357 F 97 241 RESIDENT 00002400 F 0 41= F 21 2443 F 25 271 333 F 28 327 339s RESSTAK 0000044D F 15 138= F 21 73a 732a F 26 126a F 28 195a F 32 53a 60a F 36 1458a RESSTAKTOP 0000042D F 15 137= F 21 72s 731s RESTRWORD 00170800 F 8 1593= F 17 71e F 131 1831 RETURN 0000215F F 21 869j 876j 916= RETURN 000025FB F 24 415j 437= RETURN 00002778 F 25 529j 533j 546= RETURN 00002868 F 27 186j 191= RETURN 00002AE0 F 28 1310j 1329j 1332j 1359= RETURN 00002D1A F 30 56= 61j RETURN 00002D4D F 30 175j 187= RETURN 00002D69 F 30 254j 259= RETURN 0000302D F 33 996= 1004j RETURN 00003042 F 33 1033j 1046= RETURN 000034E4 F 36 1186j 1214j 1226= RETURN 00003519 F 36 1383j 1386j 1398= RETURN 000035AB F 36 1840= 1857j RETURN0 00002D30 F 30 119= 135j REUSEPAL 00002643 F 22 885 F 24 115 693 723= REVBACKUP 00000000 F 8 13= F 142 50 F 143 1957 REVMNTVOL 18000000 F 8 10= F 138 86x REVNAMEH 43393330 F 0 44x F 3 1600= F 21 55x REVNAMEL 33202020 F 0 45x F 3 1601= F 21 56x *REVVOLLRAF 10000000 F 8 11= REVVOLUME 08000000 F 8 9= F 138 90 246 REWAIT 00002788 F 26 47= 49j RIGHTGUY 00002F13 F 33 231j 235= RIGHTGUY 00002F9A F 33 598j 602= *ROUNDS 00000003 F 20 205= ROUST 00003569 F 36 22 1683 1689= F 48 1324 F 50 327 F 125 481 F 130 511 F 131 1215 F 133 122 1058 1201 ROUSTAGAIN 0000356A F 36 1690= 1696j ROUSTLEAVE 00003570 F 36 1693j 1697= ROUSTQUE1 01700000 F 36 1701= 1704x ROUSTQUE2 00828000 F 36 1702= 1704x ROUSTQUE3 000C0000 F 36 1703= 1704x ROUSTQUES 00003572 F 36 1162 1684 1692 1705= ROUSTQUET 00003571 F 36 1704= 1705a RSTRNOMAP 000032B1 F 35 1341j 1345= RSTRWNDO 000032A0 F 35 23 1319 1326= F 38 1446 F 74 769 F 83 619 706 927 1005 RTSTOPB 00001810 F 17 295= 298e F 28 607s 624j F 133 1194s RTSWITCHB 00001A10 F 17 296= 298e F 28 496j 1659s F 29 873s F 52 21s RTUERRORZ 00001750 F 17 298= F 28 248 252 RTVERYBADB 00001C10 F 17 297= 298e F 28 511j 580s 627j 1209s F 36 1834s RTVMFISRB 00001610 F 17 294= 298e F 28 625j 818s F 33 367s RTYPEBIN 00000002 F 8 2346= F 95 160 *RTYPECOMM 00000005 F 8 2349= *RTYPEFORM 00000003 F 8 2347= *RTYPELABEL 00000004 F 8 2348= RTYPETEXT 00000000 F 8 2344= F 92 124 F 97 267 *RTYPETEXTF 00000001 F 8 2345= SAFBLKNUM 00000140 F 8 2364= F 82 200 207 404 588 1 Jimbo's CREF Extractor 2.0 VRM, System C9303 (18 Mar 93) 12-May-93 12:56 PAGE 87 *SAFCHARNUM 000028C0 F 8 2365= SAVEAREA 00178800 F 22 519= 563s 571 SAVEOBLK 00178803 F 22 521= 544s 669 SAVEPFPTR 00178801 F 24 512= 517s 537 SAVER0 00178801 F 21 945= 954s 962 SAVER0 00178801 F 39 147= 154s 168 SAVER1 00178802 F 39 148= 166 170 SAVER2 00178801 F 22 1082= 1086s 1095 SAVER3 00178801 F 21 1868= 1875s 1894 SAVER3 00178801 F 36 386= 390s 399 SAVER3 00178801 F 38 1246= 1250s 1257 SAVER4 00178801 F 35 478= 482s 506 SAVER4 00178801 F 36 212= 224s 226 SAVER45 00178802 F 21 1257= 1276s 1314 SAVER45 00178801 F 21 1357= 1365s 1548 SAVER7 00178801 F 21 1256= 1261s 1315 SAVER7 00178801 F 21 1626= 1630s 1651 SAVER7 00178801 F 21 1678= 1682s 1703 SAVER7 00178801 F 21 1730= 1734s 1756 SAVEREG 00178801 F 30 164= 171s 188 SAVEREGS 00178801 F 24 409= 416s 434 SAVEREGS 00178801 F 35 1378= 1383s 1416 SAVEUPC 00178802 F 22 520= 565s 576 SAVEVLNFBI 000037FD F 38 636 689 917 1120 1211 1216= SAVEWNDO1 0000328A F 35 24 1248 1256= F 74 798 F 83 598 910 SAVEWNDO2 0000328D F 35 25 1249 1261= F 38 1417 SAVEWNDO3 00003290 F 35 26 1250 1266= SAVWNDOSHR 00003292 F 35 1258j 1263j 1270= SCALEDLF 00001DD8 F 16 947= F 29 1536 1540s SCCONPTR 000034E9 F 28 1295 F 36 23 1264 1275= 1285 F 124 520 SCCONTYP 000034E5 F 36 1266= 1275a SCODE 00178802 F 28 1264= 1269s 1297 1344s 1353 SDPARM 04001DCD F 16 917= 927e 929a SDPARMNUM 00000011 F 16 927= 928 928 SDTIMEOK 00002BF0 F 29 915j 918j 921j 947j 953= SEARCH 0000276B F 25 527= 532j SECADTBTM 00000010 F 8 1354= F 38 980 997s 1004s 1142 1153 1157s 1427 1437 1439s SECADTCNT 00000018 F 8 1355= F 38 999s 1005s 1150s 1155 1429 1440 1515s 1558s SECADTNUM 00000008 F 8 1322= 1353 1354 1355 F 38 872 873 976 980 997s 999s 1003s 1004s 1005s 1138 1142 1149s 1150s 1151 1153 1155 1157s 1421 1425 1427 1429 1435 1437 1439s 1440 1469 1514s 1515s 1558s SECADTTOP 00000008 F 8 1353= F 38 644 650s 1003s 1149s 1425 1469 1514s SECAFTENTS 0000002B F 8 1360= F 61 531s 773 SECAFTPTR 00000129 F 8 1362= F 61 532a 771a SECAFTSIZ 00000029 F 8 1358= F 61 533s 772 SECBKUPE 00000240 F 8 1396= F 142 328 SECBUDATE 00000001 F 8 1348= F 142 1029s SECDATCOR 0000022F F 8 1372= F 38 1353s F 58 96s F 148 840 SECDATDRFT 0000022E F 8 1370= F 38 1357s F 58 94s SECDATERR 0000022D F 8 1369= F 38 1355s F 58 92s F 148 831 SECIDXENTS 0000002A F 8 1359= F 61 539s 780 SECIDXPTR 0000002C F 8 1361= F 61 540a 778a SECIDXSIZ 00000028 F 8 1357= F 61 541s 779 SECLASTDT 00000229 F 8 1367= F 38 1351s F 58 88s F 143 380s F 148 742s 1 Jimbo's CREF Extractor 2.0 VRM, System C9303 (18 Mar 93) 12-May-93 12:56 PAGE 88 845a SECLASTSL 0000022B F 8 1368= F 38 1032s SECMNTDAT 00000002 F 8 1350= F 43 3026 F 137 263s 267 F 143 381s 390 F 148 228s 244 SECNUMACC 00000235 F 8 1385= F 148 1235a SECNUMCPU 00000233 F 8 1383= F 148 1211a SECNUMCTC 0000023A F 8 1390= F 148 1306a SECNUMCTU 0000023B F 8 1391= F 148 1318a SECNUMDISK 00000238 F 8 1388= F 148 1274a SECNUMLPC 00000239 F 8 1389= F 148 1286a SECNUMMCU 00000231 F 8 1381= F 148 1191a SECNUMMSC 00000237 F 8 1387= F 148 1260a SECNUMMTC 0000023C F 8 1392= F 148 1338a SECNUMMTU 0000023D F 8 1393= F 148 1350a SECNUMPAGE 00000232 F 8 1382= F 148 1201a SECNUMPORT 00000236 F 8 1386= F 148 1248a SECNUMPPU 00000234 F 8 1384= F 148 1223a SECNUMVTC 0000023E F 8 1394= F 148 1370a SECNUMVTU 0000023F F 8 1395= F 148 1382a SECONDPART 03800000 F 16 876= 879x SECSUN 00000000 F 8 1347= F 138 213 220s SECTZONE 00000226 F 8 1364= F 38 1359s F 58 90s F 142 327a 328 F 143 377a 383s F 148 827 *SELFDATE1 80000001 F 8 866= *SELFDATE2 80000002 F 8 867= *SELFRUNNUM 04000000 F 8 864= *SELFVOLSIZ 80000000 F 8 865= SENDIT 000034B6 F 36 1146j 1154= 1171j SENDITX 000034B5 F 36 1143j 1152= SERRSNL 00003199 F 35 606j 614= SERRWEN 00003197 F 35 590j 595j 600j 609= SESSOVER 00002592 F 24 33j 54= SETCLKPARMS 00002181 F 21 1019j 1021= SETERRPG 00003193 F 35 27 580 603= F 142 860 921 SETERRW1 00003190 F 35 28 581 598= F 82 327 472 F 92 380 F 113 114 F 114 49 F 115 130 309 430 F 117 151 F 135 1240 SETERRW2 0000318D F 35 29 582 593= F 114 70 F 115 78 235 572 F 117 152 SETERRW3 0000318A F 35 30 583 588= F 57 428 SETERRWXIT 0000319C F 35 616j 620= SETINITRUN 00003640 F 37 7 267 272= F 50 708 F 131 375 668 782 1143 SETMEMTRAP 00005BCF F 28 711 F 64 15 F 67 22 543 548= F 78 61 F 79 171 295 F 81 63 F 82 41 F 83 34 F 84 81 F 85 81 128 F 86 18 F 87 65 F 89 36 F 91 88 F 92 88 F 93 36 F 94 39 F 95 71 95 F 97 125 F 101 236 F 103 87 318 F 105 80 F 119 108 F 120 62 82 136 F 121 203 246 999 1051 1106 F 123 711 1208 1398 F 124 385 F 125 1079 F 127 110 377 F 128 85 F 130 188 405 F 131 178 543 F 132 297 F 133 269 F 134 612 F 135 1090 F 136 123 F 139 87 281 394 589 658 F 140 63 F 141 511 660 F 142 47 282 415 516 671 863 F 143 219 604 783 945 1029 1121 1423 1941 2115 2177 2253 F 144 446 F 145 56 130 SETMODIFW1 00003260 F 35 31 1113 1130= F 82 449 614 SETMODIFW2 0000325A F 35 32 1114 1120= F 82 460 SETMODIFW3 0000325D F 35 33 1115 1125= F 110 524 SETMODSHR 00003262 F 35 1122j 1127j 1132= 1 Jimbo's CREF Extractor 2.0 VRM, System C9303 (18 Mar 93) 12-May-93 12:56 PAGE 89 SETNEWVP 00003219 F 35 956j 971= SETPAGEX 000031F6 F 35 38 913 920= F 142 835 901 SETPPU3WRD 00004F0B F 21 1154 F 53 485 490= 627 SETRUNNING 00002B99 F 21 617 F 26 44 F 28 460 1494 F 29 6 752 785 792= 1612 F 32 772 F 36 1211 1647 1743 F 46 816 F 47 67 123 F 50 711 F 54 538 F 76 865 F 108 756 F 131 378 441 671 694 785 799 1146 1165 F 133 1240 SETSP MACRO F 5 36= F 22 145 F 25 110 F 26 36 F 28 706 F 40 78 106 145 162 F 41 16 SETSWITCH 00002B4D F 28 243a 1650 1655= SETSWXIT 00002B57 F 28 1657j 1663= SETTBIT MACRO F 5 52= F 25 377 F 26 332 371 409 F 35 325 747 F 43 756 1166 1896 2499 3245 3837 4189 4912 5078 5120 F 51 112 192 348 F 53 289 335 385 F 54 525 F 55 617 F 58 148 F 75 212 F 86 26 F 105 60 102 109 F 143 517 SETUPBLOCK 0000214D F 21 870j 881= SETWINDEN 00003207 F 35 930j 935j 940j 946= SETWINDEX 0000320A F 35 925j 950= SETWNDO1 00003205 F 35 34 909 944= F 55 140 221 242 272 292 754 F 57 80 F 58 80 F 59 109 372 F 60 76 F 61 77 116 199 518 760 F 68 51 641 674 718 F 70 404 F 74 800 F 75 576 F 81 72 124 F 82 115 212 487 604 F 83 41 300 F 89 43 F 91 268 F 92 56 441 463 F 93 43 200 213 F 95 133 F 100 622 1330 F 101 346 370 503 527 641 717 868 1194 F 107 277 F 113 258 F 114 35 F 117 89 228 F 119 203 F 120 156 F 121 113 1386 F 130 398 F 131 1781 F 135 198 465 483 1186 1198 F 136 166 F 137 398 F 138 58 240 F 139 772 F 141 471 675 F 142 267 303 320 409 551 659 724 1019 F 143 149 211 282 478 536 763 1202 1256 1327 1348 1518 1643 1665 2364 F 148 427 SETWNDO2 000031FF F 35 35 910 933= F 38 1472 F 55 337 420 682 F 57 91 F 61 307 F 68 58 704 F 73 197 F 82 421 F 83 399 F 112 372 F 114 56 F 115 69 604 618 743 F 117 190 F 119 419 F 120 190 F 134 215 F 137 418 F 138 455 496 639 F 142 426 445 529 F 143 319 339 497 1166 2454 SETWNDO3 00003202 F 35 36 911 938= F 38 627 679 909 1114 1290 F 57 417 F 110 513 SETWNDODE 00003252 F 35 1024a 1082= SETWNDOLV 00003251 F 35 997j 1069= SETWNDOT 00178801 F 35 916= 952s 988 1037s 1064 SETWNDOX 000031FC F 35 37 912 928= 1334 SETWNNO 00003222 F 35 959j 968j 986= SFREEMEM 00002F5D F 21 1933 2270 F 27 85 89 273 F 32 169 213 657 661 F 33 10 428 432= F 36 495 F 38 236 F 43 955 1345 1383 2599 2789 4229 F 46 150 188 446 1535 F 48 1142 F 49 329 908 F 50 85 1383 F 51 361 F 55 91 827 891 1027 1266 F 56 277 F 57 146 573 F 59 140 433 469 F 61 475 F 68 475 F 74 929 F 75 879 F 76 295 301 615 670 735 F 78 195 F 84 252 F 85 273 F 94 87 F 97 226 F 100 917 F 127 247 274 291 395 570 758 998 1085 F 128 113 F 131 902 1707 F 132 190 249 F 134 185 324 561 727 736 F 137 446 F 138 739 805 931 1066 F 141 527 540 709 F 142 295 350 366 694 750 758 872 928 936 F 143 254 447 2166 2207 2286 2301 2311 F 144 657 734 809 865 F 145 86 F 148 1114 SGETMEM 00002ED0 F 21 145 453 551 955 1109 1262 1298 1367 1406 1411 1460 1576 1631 1683 1735 1800 2170 F 27 43 48 230 F 32 382 F 33 11 48 53= F 35 728 767 F 37 60 128 166 274 F 38 323 F 42 41 F 43 724 1325 2096 2690 4965 F 46 349 F 49 120 379 F 50 1 Jimbo's CREF Extractor 2.0 VRM, System C9303 (18 Mar 93) 12-May-93 12:56 PAGE 90 156 479 1277 F 53 539 737 860 F 54 78 249 286 342 393 504 F 57 381 F 59 353 F 61 279 789 F 74 866 F 75 220 F 76 97 368 F 78 97 F 79 158 229 279 F 84 83 280 F 102 176 200 F 127 101 709 F 128 69 F 131 852 1650 F 132 139 F 134 86 F 137 407 F 138 658 982 F 141 132 503 692 F 142 274 673 847 F 143 139 175 234 398 2073 2117 2255 F 144 369 1048 F 145 52 F 148 287 439 464 782 1072 1121 1595 2344 SHACCT 00002BD4 F 29 7 661 748 901 906= F 32 108 SHALT 00130000 F 13 339= 478e 479e 480e 481e 482e 483e 484e 487e 491e 505e 509e 510e 513e 516e 517e 518e 519e 520e 521e 524e 525e 526e 529e 530e 531e 532e 535e 536e 537e 540e 541e 542e 545e 546e 547e 548e 549e 552e 553e 554e 555e 556e 557e 558e 559e 560e 561e 564e 565e 568e 569e 571e 572e 574e 587e 588e 590e 591e 600e 601e 602e 605e 608e 609e 610e 613e 620e 621e 623e 626e 627e 628e 631e 634e 637e 638e 641e 642e 643e 644e 645e 648e 651e 652e 653e 654e 655e 656e 657e 659e 660e 661e 662e 665e 668e 669e 670e 673e 674e 677e 678e 681e 682e 683e 684e 685e 686e 687e 688e 689e 690e 691e 692e 693e 694e 697e 698e 699e 702e 703e 706e 707e 708e 709e 710e 711e 712e 715e 718e 719e 720e 723e 724e 725e 728e 731e 732e 733e 734e 735e 744e 747e 750e 753e 754e 755e 756e 757e 758e 761e 762e 766e 767e 770e 777e 779e 793e 794e SHAREIDLE 00002D56 F 30 231= 277j SHAREMFBI 00002615 F 24 536= 544j SHARESUSP 00003527 F 36 1437 1457= 1523j SHDEQUE 00002BBD F 26 42 F 29 9 651 741 853 858= F 32 105 SHLACCT 0016C801 F 8 1704= F 73 210 217 F 119 248 268s 440 601s 675 676s F 120 254 SHLACCTP 0016C803 F 8 1705= F 73 213 219 F 119 251 269s 442 603s 677 678s F 120 256 SHLACCTSYS 0016C806 F 8 1709= F 119 607s F 120 249 SHLACTOPT 0008C220 F 8 1697= F 73 274 F 119 448 472 F 120 205 F 142 172 SHLACTPRIV 0008C630 F 8 1698= F 73 243 F 119 254 445 599s F 120 242 SHLACTPRVM 00000002 F 8 1701= F 73 88 F 119 66e SHLACTPRVR 00000001 F 8 1700= F 119 65e SHLACTPRVW 00000000 F 8 1699= F 119 65e SHLACTPRVX 00000003 F 8 1702= F 119 66e SHLACTPW 0008C210 F 8 1695= F 73 234 F 119 613s F 120 244 SHLACTSYS 0008C410 F 8 1696= F 119 608s F 120 247 SHLDISK 0008D180 F 8 1694= F 73 195 SHLDSKFLG 0008C010 F 8 1693= F 142 423j F 143 2374j SHLDSKFLGB 00000010 F 8 1691= 1693e F 55 350j 515j F 115 162j F 119 356 F 142 526j F 143 616 795 942 2151s 2184 2277s SHLENTLEN 00000004 F 8 1706= F 119 454x 479 520a 687 F 142 160x 174 SHLENTPLEN 00000006 F 8 1708= F 119 456x 520a F 142 162x SHLENTRYF 0008CC10 F 8 1703= F 119 597s SHLENTSLEN 00000007 F 8 1710= F 119 455x 457x F 142 161x 163x SHLFLAGW 0016C800 F 8 1688= 1693e 1694e 1695e 1696e 1697e 1698e 1703e 1706e 1708e 1710e F 55 349 514 F 115 135 F 119 267s 357s 596s 671 673s F 142 525 SHLINFORD MACRO F 10 396= F 120 227 SHLPWORD 0016C804 F 8 1707= F 73 236 F 119 606s 612s SHRUNR5 00178801 F 29 734= 739s 753 SHUTDONE 00002B80 F 29 686= 697j SHUTDOWN 00002B58 F 22 1093 F 28 611 F 29 8 625 632= 1088 F 36 1470 SHUTQSAV 00178802 F 29 629= 648s 672 1 Jimbo's CREF Extractor 2.0 VRM, System C9303 (18 Mar 93) 12-May-93 12:56 PAGE 91 SHUTR5SAV 00178801 F 29 628= 633s 635 636s 689 SHUTRUN 00002B88 F 28 485 F 29 10 731 737= 1133 F 31 65 162 F 36 1482 SINT 00000000 F 28 1429= 1432x 1432x 1436x 1436x 1436x 1436x 1436x 1436x 1436x 1436x 1437x 1446x 1447x 1447x 1447x SIZELOG2 0000000C F 20 203= 204e SIZEOK 00002EDE F 33 62j 68= SIZEOK 00002F1C F 33 238j 244= SKIPCLEAR 00000007 F 21 650j 652= SKIPDEBUGB 00002A10 F 17 577= 580e F 124 516s SKIPENDFIX 0000313E F 35 344j 348= SKIPMAPIN 000025F5 F 24 422j 425= SKIPSSURST 000028B5 F 28 130j 134= SLEEPFLAG 00001D0C F 16 277= F 28 67 F 130 638 807 839s SLEEPMES 000028A6 F 28 93 96 101= SLOTCPUI 00000DA0 F 19 27= F 21 355s SLOTDEAD 000026E8 F 25 152j 153j 224= 253j SLOTLOOP 000027C3 F 26 221= 275j SLOTNUM 00178800 F 21 37= 318s 320 326s 329 360s 363 SLOTNUM 00178004 F 26 213= 259s 263 SLOTPTR 00001F10 F 19 26= F 41 19 F 53 129 SLOTTABLE 00001ECE F 19 24= F 21 357s 1118s F 25 168 F 26 225 248 268 F 28 401 F 41 17 F 53 101 F 55 1138 F 144 1011 F 148 536 1484 SLOTTYPE 00000030 F 19 25= F 21 352s 1117 F 26 226 F 41 18 F 53 102 F 144 1012 F 148 1477s 1478 1478 SLTTCPU 00000002 F 7 69= F 21 353 F 33 790 F 144 1013 SLTTMEM 00000001 F 7 68= F 21 311 F 25 170 F 148 1186 SLTTPPU 00000003 F 7 70= F 21 358 1117 F 26 229 239 F 148 1218 SLTTSSU 00000004 F 7 71= F 21 313 *SLTTUNK 00000000 F 7 67= SMDNH 0000326E F 35 1143j 1146= SMDNLV 0000326F F 35 1136j 1148= SMUBLKLOG 00000000 F 19 295= F 21 956 SMUCHKCNT 00001EFF F 19 286= F 53 91s 95s SMUCHKINTV 00000006 F 19 284= 286x F 53 94 SMUFLAG 00178805 F 21 838= 843s 917 SMULINK 0008DF10 F 19 293= F 21 960s SMULIST 00001EFE F 19 282= F 21 959 961s F 53 240 SMUPCC 00001840 F 7 127= F 53 236x SMUPCMND 00000C10 F 7 126= F 53 236x SMUPCRCEL 00000002 F 7 135= F 53 236x SMUPROT 00001F00 F 19 290= 295e 296a SMUSLOT 0008C040 F 19 291= F 21 958s F 53 245 252 SNDBKUPLEN 00001F10 F 12 15= F 142 329s 452s 560s F 143 376 628 634 816 822 1844 SOCKHIM 00002BAE F 29 805j 816= SPGOKAY 00003243 F 35 1048j 1052= SPLRMSGID 00001D10 F 16 323= F 70 211s SPLRTIME 00001D11 F 16 324= F 70 326 SPNDFRQTAB 00003546 F 36 1570 1573= SPREADLOOP 000023AE F 21 2435= 2445j SPREADSYS 000023A6 F 21 397 2406 2413= SQADTWAIT 00001DAE F 16 818= F 29 1501a F 38 512a 526a 846a SQAPPENDIT 00001DCB F 16 878= F 29 677 SQBEGIN 00001DA9 F 16 794= 796e 800e 804e 809e 813e 817e 821e 825e 831e 836e 840e 845e 850e 854e 858e 862e 865e 869e F 29 649a F 36 1006a 1 Jimbo's CREF Extractor 2.0 VRM, System C9303 (18 Mar 93) 12-May-93 12:56 PAGE 92 1199a 1695a SQDIOWAIT 00001DAC F 16 810= F 29 1486a F 45 1904a F 46 73a 278a 878a 932a F 51 198a 384a F 77 42a F 86 29a F 105 63a 113a SQDIRWAIT 00001DAD F 16 814= F 29 1495a F 59 769a 811a SQENDARRAY 00001DCC F 16 878a 879= SQFILEWAIT 00001DB1 F 16 832= F 29 1471a F 47 115 116s F 74 525 F 79 1314a F 108 572a 713 714a SQIDXWAIT 00001DAF F 16 822= F 29 1498a F 60 254a 265a 315a 334a F 61 637a 697a SQLOCKS 00001DBA F 16 871= F 26 41s F 28 66s 203s 219s 226s 230s 424s 428s F 29 634s 738s 818s 828s 871s 1046s 1055s 1095s 1108s 1552s 1554s 1557s 1559s 1583s 1610s 1617s F 32 104s 717s 735s 795s F 36 1005s 1009s 1185s 1208s F 47 45s 74s 114s 117s F 55 1223s 1228s 1234s 1238s F 74 522s 537s F 76 782s 788s 844s 861s 881s F 108 703s 749s F 133 1234s 1239s 1248s SQLOCKWAIT 00001DB0 F 16 826= F 29 1474a F 76 783 845 846a F 102 221a SQMSGWAIT 00001DB3 F 16 841= F 29 1480a F 127 254a 357a 616a SQMSWAIT 00001DAB F 16 805= F 22 1091a F 29 1109 1506a F 32 719 720a F 100 1458a F 125 277a F 141 732a 832a F 143 1910a SQPATHWAIT 00001DB2 F 16 837= F 29 1483a F 76 156a 259a F 84 192a 209a 226a F 94 112a 191a 209a F 100 924a SQRUNNABLE 00001DAA F 16 801= F 28 202a 204 425 427s F 29 820a 1047a 1556a F 36 1466a F 55 1222a 1224 F 126 530a F 130 774a F 138 859a F 144 364a 716a SQRUNNING 00001DA9 F 16 797= F 28 227 229s F 29 862a 1551a F 55 1235 1237s SQSTOPWAIT 00001DB8 F 16 863= F 28 610a F 29 1465a F 133 1233a SQTERMWAIT 00001DB5 F 16 851= F 29 1489a F 97 317a SQTIMEWAIT 00001DB7 F 16 859= F 29 1468a F 47 46a F 126 509a SQTRMOWAIT 00001DB6 F 16 855= F 29 1492a F 48 1169a F 49 344a F 85 260a F 103 207a SQTROUBLE 00001DB9 F 16 866= F 29 1087a 1582a SQUNITWAIT 00001DB4 F 16 846= F 29 1477a F 127 863a 1005a 1030a 1099a SRCHFML 00002EC5 F 32 722j 793= SRCHFML1 00002EC8 F 32 713j 798= SRCHLIST 000030AA F 34 9 178 183= F 43 3240 3390 4046 F 48 1312 F 58 141 F 59 267 312 549 F 61 616 F 76 91 199 480 F 79 1926 F 102 286 396 F 123 319 717 F 127 168 739 F 130 473 819 F 131 1204 F 132 54 F 133 114 F 137 63 128 344 571 576 F 138 750 F 139 92 155 515 522 F 140 66 94 F 141 80 246 F 144 945 SRCHLIST1 000030AD F 34 186= 195j SRCHLIST2 000030B0 F 34 190= 196j SRCHLIST3 000030B6 F 34 188j 199= SRCHPSNM 00008805 F 28 1052 F 123 13 195 232 239= SRCHWSX 000024DE F 22 861 866= 985 SSUALARM 00003610 F 7 447= F 46 1201s SSUBOOTFP 00000010 F 7 469= F 46 233 SSUBREAKB 00002E10 F 7 426= F 49 287 SSUCHARIN 0000000D F 7 451= F 46 91 SSUCHAROUT 00000008 F 7 425= F 46 114s SSUCLOCKL 00000002 F 7 415= F 46 222 268 500 658 F 148 805s SSUCLOCKU 00000001 F 7 414= F 46 221 225 503 F 148 806s SSUCLOKAD 00000017 F 7 505= F 46 259s SSUCOFFSET 00001400 F 7 409= F 21 1009 F 46 861 918 *SSUCPUBUSE 00000007 F 7 422= *SSUCPUERR 00000006 F 7 421= *SSUCPUHALT 00000005 F 7 420= 1 Jimbo's CREF Extractor 2.0 VRM, System C9303 (18 Mar 93) 12-May-93 12:56 PAGE 93 SSUDECCLK 00000004 F 7 417= F 46 706s 743s SSUDISP03 0000000A F 7 443= F 28 94s F 46 1203s 1239s 1274s 1368s 1407s SSUDISP47 0000000B F 7 444= F 28 95s F 46 1267s 1275s 1379s 1408s SSUDISP89 0000000C F 7 445= F 28 97s F 46 1204s 1252s 1277s 1384s 1409s SSUDWELLB 00002C10 F 7 427= F 49 292 *SSUERRLOG 00000012 F 7 485= SSUFENCE 00000009 F 7 433= F 46 270s 652s F 148 808s SSUFPSWCH 00000011 F 7 472= F 46 82 235 SSUHORN 00003410 F 7 446= F 46 1199s SSUIMCI 00003010 F 7 460= F 46 89j 237 261 SSUIMCLKSTR 00003610 F 7 463= F 46 261 SSUIMCO 00003210 F 7 461= F 46 103j 237 261 *SSUIMERR 00003810 F 7 464= SSUIMFPS 00003C10 F 7 466= F 46 81j 237 261 SSUIMNVM 00003A10 F 7 465= F 46 59j 237 261 SSUIMTICK 00003E10 F 7 467= F 46 119j 237 261 SSUINCCLK 00000003 F 7 416= F 46 691s 759s SSUINTMASK 0000000F F 7 458= F 46 267s SSUMAXCC 000000FF F 7 428= F 49 295 307 *SSUMISCST 0000000E F 7 453= *SSUMSBC 00003C10 F 7 455= *SSUMSLFP 00003E10 F 7 454= *SSUMSNVM 00003A10 F 7 456= SSUNVM 00001800 F 7 509= F 46 861 918 SSUPF 00000310 F 20 107= F 21 1011 *SSURFP 00000010 F 7 474= *SSUROFFSET 00001000 F 7 407= SSUSW1 00003810 F 7 479= 483e SSUSW2 00003A10 F 7 480= 483e SSUSW3 00003C10 F 7 481= 483e SSUSW4 00003E10 F 7 482= 483e *SSUSWITCH 00003840 F 7 483= SSUSWMAINT 00003410 F 7 477= F 131 1771j SSUVER 00001EE4 F 19 74= F 21 1007s F 46 240 492 597 F 49 273 SSU_RESET 000044C9 F 21 1026 F 26 143 F 28 382 F 46 20 212 217= STACKIDENT 00002832 F 21 71 730 F 27 12 16= 45 182 232 271 STACKPTR 00178801 F 27 39= 47s 50 STACKPTR 00178801 F 27 78= 84s 88 STAKLOG 00000005 F 22 145 F 25 110 F 26 36 F 27 11 14= 44 90 F 28 706 F 40 30 78 106 145 162 F 41 16 STARTPROC 00002B05 F 28 1465j 1470j 1476j 1481j 1488= STARTUP 00002885 F 21 620j 792j F 28 25 48= STFINDPPL 00003235 F 35 1035= 1086j STILPAGS 00002395 F 21 2244j 2287j 2292= *STOPB1003 00021003 F 13 375= *STOPB2XXX 00022000 F 13 376= *STOPB4025 00024025 F 13 422= *STOPB4031 00024031 F 13 426= STOPB600X 00026000 F 13 465= F 21 879 STOPB7008 00027008 F 13 788= F 133 568 STOPD1253 00041253 F 13 768= F 61 420 STOPF10D4 000610D4 F 13 619= F 57 303 STOPF10D7 000610D7 F 13 622= F 57 459 STOPH0700 00080700 F 13 594= F 46 300 STOPINST 0000214C F 21 874 879= STOPP0200 00100200 F 13 597= F 48 404 1 Jimbo's CREF Extractor 2.0 VRM, System C9303 (18 Mar 93) 12-May-93 12:56 PAGE 94 STOPP10D1 001010D1 F 13 616= F 57 124 STOPS001A 0013001A F 13 487= F 24 522 STOPS0064 00130064 F 13 531= F 35 544 STOPS0065 00130065 F 13 532= F 35 549 STOPSESS 000029A7 F 28 606= 624j STORE 00000000 F 6 14= F 16 26x 52x 87x 106x 107x 135x 199x 200x 221x 227x 228x 228x 247x 256x 259x 260x 261x 262x 266x 277x 288x 297x 311x 338x 375x 391x 417x 453x 454x 455x 551x 552x 553x 558x 559x 591x 592x 593x 621x 622x 623x 649x 650x 651x 656x 691x 692x 693x 698x 722x 744x 745x 746x 797x 801x 805x 810x 814x 818x 822x 826x 832x 837x 841x 846x 851x 855x 859x 863x 866x 946x 947x 1009x 1010x 1011x 1017x 1023x 1027x 1028x 1030x 1100x 1101x 1102x 1103x 1118x 1119x 1147x 1148x 1166x 1167x F 17 35x 36x 37x 38x 39x 112x 113x 115x 359x 360x 479x 480x 599x F 18 400x 415x 416x F 19 35x 62x 63x 155x 156x 188x 189x 190x 236x 237x 240x 241x 242x 243x 400x 403x 404x 635x 668x 669x 800x 801x 835x 836x 864x 904x 905x 906x 985x 1017x 1282x 1283x 1304x 1305x 1306x 1307x STOREPF 00010000 F 33 782 807= STPDUBL 00000C10 F 6 29= F 29 639j F 36 1042j 1459j STPNLAST 00000810 F 6 27= F 36 1223j STPVALUE 00000A10 F 6 28= F 63 306j 424j SUBLBAD 00160801 F 19 1287= F 38 428 F 43 1521 F 57 276 369 384s 553 F 138 665s 799 SUBLGOOD 00160802 F 19 1288= F 43 1523 F 57 278 376s 386s 568 F 138 668s SUBLIST 00001F64 F 19 1285= 1290e 1291a SUBLLINK 00160800 F 19 1286= F 57 388s 565 566s F 138 653 660s 669 670s 671s 802 803 804s SUBLLOG 00000002 F 19 1290= F 57 382 574 F 138 659 806 SUBQBLOCK 00160801 F 19 1265= F 54 511s 514 F 57 117 121 145 SUBQLINK 00081F10 F 19 1264= F 54 519 520s F 57 141 SUBQLOG 00000001 F 19 1268= F 54 505 F 57 147 SUBQREQ 00080080 F 19 1263= F 54 508s F 57 144 SUBQUEUE 00001F62 F 19 1261= 1268e 1269a SUBQWORDA 00160800 F 19 1262= 1263e 1264e F 54 506s SUBSBADDY 00000000 F 8 1229= 1232e F 43 3610 F 57 452 454 469s 582 584 598 F 138 656 663 *SUBSECNT 00000200 F 8 1233= SUBSLIST 00001F63 F 19 1283= F 38 427 F 43 1520 F 57 275 368 387 389s 551 552a F 138 651a 798 801a SUBSLNTH 00000002 F 8 1232= 1233e F 43 3614a 3615a F 57 456 457a 586 587a 595 596a 602 F 138 672 SUBSLOCK 00001F62 F 19 1282= F 38 425s 430s 438s F 43 1519s 1526s F 57 274s 281s 362s 393s 550s 558s 567s F 138 650s 677s 795s 811s SUBSSUB 00000001 F 8 1231= F 43 3612 F 57 472s F 138 666 SUBSTRACE 00000006 F 16 464= F 38 432 432 F 43 3834 3834 5128 5128 F 54 512 512 537 537 F 57 73 73 150 150 560 560 571 571 SUBTCALLU 00000001 F 38 432 F 57 9 43= SUCKERS 0000210A F 0 7a F 21 8 698 700= SUSPCALSH 0000353C F 36 1515 1518= 1574a SUSPENDCAL 0000353B F 36 24 1514 1517= F 85 258 F 102 219 F 103 205 SUSPENDFRQ 00003541 F 36 25 1561 1566= F 79 1312 F 84 222 F 86 27 F 94 189 F 97 315 F 105 61 F 108 567 F 126 507 F 127 252 355 861 1028 SUSPENDME 0000351C F 36 26 1436 1444= F 38 509 523 F 46 875 929 F 59 766 F 60 251 262 F 61 634 F 77 39 F 100 1455 F 105 110 F 125 274 F 126 527 F 130 771 F 138 856 F 141 729 829 F 143 1907 F 144 361 1 Jimbo's CREF Extractor 2.0 VRM, System C9303 (18 Mar 93) 12-May-93 12:56 PAGE 95 713 SVHLT 002A0000 F 13 355= 774e 799e 800e 801e 802e 803e 804e 805e 806e 807e 808e 809e 810e 811e 812e 813e 814e SWAPPMVS 000023B8 F 21 2442 2476 2482= SWITCH 0000296D F 28 483= 496j SYSACTNAM 000023D2 F 21 558 2529= SYSACTPROJ 000023D4 F 21 560 2530= SYSTEMNM 00001EFB F 19 258= F 59 617 F 79 1573 F 95 262 F 123 1161 1453 1522 F 134 650 F 148 1023s SYSTEMSN 00001EFA F 19 257= F 123 1520 F 134 98 129 F 138 112 137 F 139 561 F 148 1014s SYSTEMSUN 00001EFC F 19 270= 271a F 46 1309a F 110 382 F 138 208 218s SYSTEMULB 00001EAE F 17 38= F 21 553s 557 F 28 1139 F 37 152 F 59 325 F 70 402 F 73 43 F 79 771 F 130 172 206 291 307 311 331 F 131 415 418 421 F 139 404 *SYSTNUM 00002100 F 8 1146= SYSVOLNUM 00000001 F 19 1096= F 59 320 TADVANCE 00002C46 F 29 1243= 1247j 1249j TAKEAGE 00178802 F 29 1215= 1239s 1257 TAKECOUNT 00001EA4 F 16 1103= F 28 1583 1604s 1627s F 144 1164 TAKEDONE 00002B32 F 28 1587= 1620j TAKEDONE 00002C55 F 29 1237j 1264= TAKEEXIT 00002C53 F 29 1244j 1260= TAKEFUDGE 00000014 F 16 1105= F 144 1167 TAKELIST 00001EA2 F 16 1101= F 28 1600 1602s 1623 1625s TAKELOCK 00001EA1 F 16 1100= F 28 1599s 1603s 1621s 1626s TAKEMORE 00002B3F F 28 1585j 1618= TAKENUM 00001EA3 F 16 1102= F 28 1582 F 144 1150 1155s TAKEOFF 000024EB F 22 891= 896j TAKEOLD 00002C34 F 29 1211 1219= 1305 1321 TAKEPAGES 00002C56 F 29 659 746 1294 1299= 1396 TAKEPSA 00178801 F 29 1214= 1241s 1254 1262 TAKER3 00178803 F 29 1216= 1240s 1261 TAKEVASPLP 00002C64 F 29 1317= 1324j 1327j TAKEWSXLP 00002C58 F 29 1301= 1308j 1311j TALOOK 00002C47 F 29 1245= 1258j TCACS 00091225 F 19 445= 446e 447e F 75 350 TCACSRO 00091215 F 19 446= F 50 690s F 75 109 118s 149s 346s F 131 1560 TCACSRW 00091415 F 19 447= F 50 671s F 75 104s 157s 367s TCB 00130000 F 19 412= 414 F 36 224s 226 262s 303s 309s 312 320s 322s 325a 393 394j 395s 397s F 46 93 102 106 F 48 390 391j 413 415s 452 456 460 646s 651 657 661 742s 755 773 774 790 798s 799s 818s 877 893s 906s 908 972 973j 1069 1072 1077 1088s 1089s 1095 1099s 1101 1110 1111 1114 1124s 1125s 1137s 1139s 1146 1159s 1160 1161 1163 1179 1200s 1214 1217 1229s 1232s 1281 1284 1286 1288s 1290s 1292 1315s 1316 1321 1323 1330s 1331s 1352j 1485 1486j 1492 1495s 1497 1526 1527j 1534 F 49 51s 52 55s 56s 57 59s 62s 165 172 179 184 187 264s 267 302s 317s 324s 326s 334 335 337 349s 454s 466 468s 476s 479s 524s 527 530s 534s 537s 578s 619s 731 746 750 756s 757s 758s 780 791 796s 798 809 816 822 842s 896s 897 898s 899s 900s 904s F 50 43s 44 45 47s 48s 49s 50s 59 69 74s 77s 81s 130 135 138 146s 147 149 166s 168s 191s 193 198s 201s 202s 204 205 209 210 213 216s 217 236 264s 266s 296 303 304 325 347s 348s 349s 361s 362 380s 381s 383s 394s 397s 398s 400 403s 404 515s 517s 518 526s 528s 529 548s 549s 551 552 556 557 560 562s 609 618 622 1 Jimbo's CREF Extractor 2.0 VRM, System C9303 (18 Mar 93) 12-May-93 12:56 PAGE 96 629s 804 813a 871s 872 895s 897s 934 935j 936 987 1000 1002 1015 1020 1025 1030 1035 1063 1083 1099s 1121s 1354s 1355 1357s 1373s 1374s 1382s F 75 339 340j 346s 350 354s 355 357s 358s 359s 367s F 85 51 52j 105s 108 109 134 135 141 146 151 156 216s 217s 218s 219 259 261a 347 380s F 97 51 52j 71s 107s 110 112s 113 116 120s 123s 124s 129 142 144 155 166 185 204s 216s 218s 220 224s 231s 232s 235s 236 238 244s 288 306 309 311s 312s 316 318a 319s 362 364s 365s 366s 369 376s 379a F 103 42 43j 56 57 58 59 60 61 62 63 64 67 69 71 72 73 74 76 95s 97s 122 135 136 156 194 195j 199s 200 201 206 208a 212s 266s 267s 268s 269s 270s 271s 272s 273s 284s 285s 286s 322 343 350a 357 360 366s 368s 443s 448 453s 493s 535s 552 557s 571s 606 612s 614 618s 619s 620s 621s 622 626 682s 686 719s 723 756s 863 864j 1010 1046 1153 1156s 1157 1160s F 104 124 125s 127s F 126 492 493 494s 495s 497s 498s 499 578 579j 580s 582s F 133 48 49 51s 75 76 78s 108 109 111s 112 121 150 151 187 194 195 275j 278 287 292j 295 297 304 306 308 310 312 314 318 320 322 324 326 328 330 332 443 506a 508s 510s 561 651s 652s 653s 654s 655s 656s 657s 658s 659s 660s 661s 662s 663s 664s 665s 666s 667s 668s 669s F 148 513 518j TCBAUDROOM 00170014 F 19 442= F 48 1111 F 49 796s F 103 453s TCBKSPC 00091077 F 19 458= F 97 155 F 103 59 270s F 133 663s TCBLNTH 0000001D F 19 553= F 21 454 458 459 460 1461 1468 1469 1470a 1489 1505 1520s F 48 1179 1379x 1380x 1381x 1382x 1383x 1384x 1385x 1386x 1497 1534 TCBPROT 00001F06 F 19 414= 553e 554a TCBRCH 00170018 F 19 453= F 50 130 622 F 103 74 285s F 133 665s TCCIABLOCK 00091F16 F 19 455= F 21 1493s F 48 1286 F 49 746 F 50 400 TCCIAPORT 0017000F F 19 435= F 21 1494s F 48 1114 1217 1492 F 133 328 TCCMNDBURD 00000004 F 19 408= F 48 1228 F 49 199 301 575 616 763 837 850 TCCONTROL 00093C78 F 19 484= 485e 489e 490e F 48 661 TCCRDELAY 000928C2 F 19 431= F 49 165 F 50 1015 F 85 141 F 103 56 267s F 133 659s TCCRWIDTH 00170010 F 19 437= F 103 61 272s F 133 657s TCECHO 00093C21 F 19 423= F 48 452 F 49 822 F 50 217 F 97 113 306 F 103 63 612s 614 622 626 F 133 666s TCFCB 00091F15 F 19 451= F 48 1321 F 50 213 303 560 688s F 75 111s 151s 355 359s F 97 238 F 103 322 F 127 979 981s F 131 1565s TCFFDELAY 000918C3 F 19 434= F 49 184 F 50 1025 F 85 151 F 103 58 269s F 133 661s TCHTDELAY 000900C8 F 19 462= F 49 179 F 50 1030 F 85 156 F 103 73 284s F 133 662s TCINECHO 00090E1D F 19 528= F 50 147 202s F 85 216s F 97 311s F 103 619s TCINECHOD 00092018 F 19 465= F 85 217s F 97 116 120s 309 312s F 103 621s TCINHIB 00091C10 F 19 418= F 48 877 F 50 706 F 123 893 F 130 179 F 133 51s 78s 111s 306 TCINQFILL 0009061D F 19 522= F 50 381s F 97 123s TCINTE 00091E18 F 19 464= F 36 322s 795 F 50 210 557 689s F 75 125s F 97 364s F 104 111a F 127 817s 982s TCINTPROTO 00093C28 F 19 485= F 103 71 756s F 133 656s TCINTSNORM 00000002 F 19 493= F 21 465 F 50 619 TCINTSTATE 00090249 F 19 490= F 21 466s F 48 742s 906s 1200s 1330s F 50 394s 618 F 133 322 TCINTTCG 00091615 F 19 448= F 36 262s 303s 797 F 50 209 556 F 75 1 Jimbo's CREF Extractor 2.0 VRM, System C9303 (18 Mar 93) 12-May-93 12:56 PAGE 97 112s 152s 357s F 97 366s F 126 497s TCIQXOFFED 0009101D F 19 529= F 48 1069 1088s F 49 750 757s F 50 348s TCIRATE 000900F1 F 19 421= F 21 1499s F 49 780 F 103 67 493s F 133 310 651s TCLASTCOM 00170012 F 19 439= F 48 755 773 F 49 816 F 103 682s 686 F 133 326 655s TCLASTCOM2 00170013 F 19 440= F 48 651 F 49 809 F 50 404 F 103 72 719s 723 F 133 654s TCLASTST 00092289 F 19 498= F 48 646s 657 774 893s 908 F 103 135 F 133 324 TCLFDELAY 000900C3 F 19 433= F 49 172 F 50 1020 F 85 146 F 103 57 268s F 133 660s TCLINK 00091F10 F 19 419= F 21 468s 1490s 1519s 1533 1535s TCLKILLC 00091076 F 19 454= F 50 236 1035 1063 F 97 166 F 103 60 271s F 133 664s TCLOCK 00170818 F 19 549= F 36 395s 397s F 48 1089s 1099s 1159s 1315s 1331s F 49 51s 62s 264s 349s 454s 524s 578s 619s 756s 758s 842s 896s 904s F 50 43s 81s 146s 216s 264s 266s 347s 349s 361s 380s 383s 403s 515s 562s 1099s 1121s 1354s 1374s 1382s F 75 89s 129s F 85 218s 261a F 97 107s 124s 204s 244s 318a 319s F 103 95s 97s 199s 208a 212s 366s 368s 535s 571s 618s 620s F 104 125s 127s F 126 495s 498s 580s 582s F 131 1443s 1570s F 133 508s 510s TCMAXCHAR 000900A2 F 19 429= F 85 109 135 F 103 201 1156s TCMODEM 00090019 F 19 489= F 21 1497s F 48 1495s F 103 136 F 123 891 F 133 304 561 TCORATE 00091EF1 F 19 422= F 21 1500s F 49 187 791 798 F 103 64 443s 448 1010 1046 1153 1157 F 133 312 652s TCOUTSPACE 00091289 F 19 497= F 48 415s 1077 1110 1124s 1146 1214 1232s TCPCADRS 00091F17 F 19 459= F 48 790 1163 1316 1323 F 49 337 F 50 204 296 304 325 551 609 638s F 75 90 94 123s 354s F 131 1566s F 133 112 121 297 TCPVC 00091838 F 19 463= F 85 347 380s F 97 71s TCQ 0012C000 F 19 562= 563 F 48 1082 1086a 1087a 1101 1102j 1103 1107 1108 1117 1118 1126 1127s 1128a 1130 1131 1136 1143 1144 1195 1213 1221 1224 F 49 52 56s 116j 117 128j 129s 131 135s 136 138s 152s 201s 202 205s 267 268j 269 277 280 294 309s 315s 316 318 323 330 331 453s 461s 465s 476s 523s 528s 530s 741 754s 755 775s 776 785s 786 803s 804 810s 811 817s 818 830s 897 901j 905j 907 909 910 911 912j F 50 44 59 61 62 63j 71s 72 75 76s 77s 78 82j 84 86 87 88 89j 149 150j 151 163j 164s 167j 170 173s 174 176s 190s 198s 199 354 358a 359a 470 485j 486s 493 494s 496a 528s 531 532j 536 537 539a 542j 547 549s 872 873j 879 881 882 884a 890j 895s 896 987 988j 995 997 998 1000 1009a 1039s 1047s 1051 1052 1055s 1071s 1083 1086j 1270j 1271 1283j 1286s 1288 1289a 1296 1298 1301a 1306s F 85 125 172s 187 188 191s 215a 257a 267 268j 272 274 275 276 277j F 97 129 131 135 141 142 147 153 185 190j 199 205 207 207 214s 215 218s 220 222 223 225 227 228 229 230j TCQCCODE 0008C081 F 19 580= F 48 1195 F 49 386s 389 F 50 1365 TCQCHARS 0016C005 F 19 573= F 48 1118 1128a F 49 152s 316 F 50 190s 496a 539a 884a 1009a 1052 1289a 1301a F 85 188 F 97 153 199 TCQCLEN 00001F12 F 19 613= F 49 390 TCQCLENS 02001F0C F 19 610= 613a TCQCLNTH 0016C000 F 19 583= F 48 1213 1224 F 49 277 391s TCQCOMND 0008DC10 F 19 566= F 48 1103 F 49 117 269 383s F 50 151 879 995 1271 1363 F 97 131 TCQCPARMS 0008D181 F 19 581= F 48 1221 F 49 393s F 97 135 1 Jimbo's CREF Extractor 2.0 VRM, System C9303 (18 Mar 93) 12-May-93 12:56 PAGE 98 TCQFIRST 0016C000 F 19 564= 572e 583e F 48 1108 1117 1126 1127s 1130 F 49 315s F 50 62 72 537 881 998 F 97 147 214s 215 223 TCQLAST 0016C004 F 19 570= F 48 1107 1131 F 49 135s 138s 318 F 50 61 71s 173s 176s 199 494s 536 547 882 896 997 1051 1055s 1296 1306s F 85 187 191s F 97 141 205 222 TCQLINK 0008DF10 F 19 568= F 48 1136 F 49 129s 201s 323 465s 474s 528s 754s 775s 785s 803s 810s 817s 830s 907 F 50 75 76s 84 164s 486s 521s 1286s 1369s F 85 272 F 97 207 225 TCQLOG 0008D060 F 19 565= F 48 1143 F 49 125s 330 382s 909 F 50 86 160s 482s 1280s 1384 F 85 274 F 97 227 TCQMAXSIZE 00001F0B F 19 599= F 50 475 F 85 138 TCQMXDELAY 000000FF F 19 584= F 49 193 F 103 1118 TCQPROT 00001F06 F 19 563= 576a TCQSIZE 0016C005 F 19 571= 573e F 49 127s 136 F 50 162s 174 484s 1282s 1298 TCQSIZES 00001F06 F 19 593= 595x 596x 597x 598x 600x F 50 483 1281 TCQUSED 00000006 F 19 572= 595x 596x 597x 598x 600x F 49 126 F 50 161 476 1274 TCQWORDB 0016C801 F 19 569= 580e 581e F 49 280 294 309s TCRDRTCG 00091815 F 19 449= F 36 309s F 75 113s 153s 358s F 97 362 365s F 103 343 360 552 TCREADIP 0009041D F 19 521= F 50 45 F 97 112s 235s TCRFP 00091A10 F 19 417= F 21 464s F 49 731 F 103 606 F 123 895 F 133 308 TCRT 00090040 F 19 415= F 85 105s 219 TCSCRNHTH 00170011 F 19 438= F 103 62 273s F 133 658s TCSITE 0017081B F 19 551= F 50 639 F 131 617 F 133 332 669s TCTERMA 0017080F F 19 544= F 36 325a F 50 813a F 97 379a F 103 350a F 133 506a TCTERMCHLC 000900FE F 19 533= F 50 69 201s 548s 897s 1002 F 97 144 TCTERMGRP 0009083D F 19 523= F 36 312 320s F 50 804 F 97 236 369 376s F 103 122 357 557s F 133 668s *TCTERMGRP0 00000000 F 19 524= TCTERMGRP1 00000001 F 19 525= F 36 314 F 97 371 *TCTERMGRP2 00000002 F 19 526= TCTERMGRPU 00000003 F 19 527= F 103 358 TCTERMLOC 0017080E F 19 531= 532e 533e F 36 793 F 50 50s 193 529 871s 936 F 97 110 288 TCTERMTCQ 00091F1E F 19 532= F 50 59 198s 549s 895s 1000 1083 F 97 142 185 TCTERMTYPE 00170819 F 19 550= F 103 156 266s F 133 314 667s TCTIMECNT 00170817 F 19 548= F 48 799s 818s 1288s 1290s F 50 398s F 133 330 TCTIMEFLAG 0017005C F 19 546= F 48 1284 TCTIMERTN 00090A39 F 19 495= F 48 798s 1292 F 50 397s TCTNUM 00090890 F 19 416= F 21 463s 1488s F 50 669 685 F 67 770 F 75 85 F 103 69 F 123 781 F 133 49 76 109 151 183 195 282 284 286 295 443 1311 F 148 1908 TCTTIBP 0009231C F 19 520= F 50 44 47s 168s 526s 872 987 1357s F 97 129 218s 220 TCTTICNT 000922FB F 19 518= F 48 460 1072 F 50 49s 74s 135 191s 362 517s F 97 216s 224s 231s F 133 318 TCTTIEP 0009011C F 19 519= F 50 48s 77s 149 166s 518 528s 1355 1373s F 97 232s TCTTOBP 00091F1A F 19 516= F 46 106 F 48 1095 1101 1137s F 49 57 59s 267 324s 468s 527 534s 897 898s 1 Jimbo's CREF Extractor 2.0 VRM, System C9303 (18 Mar 93) 12-May-93 12:56 PAGE 99 TCTTOCNT 000900FA F 19 515= F 48 1125s 1160 1229s F 49 55s 302s 317s 334 479s 537s 900s F 85 108 134 F 103 200 F 133 320 TCTTOEP 0009011B F 19 517= F 48 1139s F 49 52 56s 326s 466 476s 530s 899s TCUNSUSP 000914A2 F 19 430= F 48 1161 F 49 335 F 103 1160s TCXOFFIQ 00091015 F 19 444= F 48 456 F 50 138 F 103 76 286s F 133 653s TELLNEXT 00002D8F F 31 81j 85= TELLONE 00002D85 F 31 78= 86j TELLOTHERS 00002D84 F 31 64j 76= TEMP 00178805 F 25 104= 319s 339 385s 414 TEMPR3 00178802 F 36 54= 62s 80 TEMPR3 00178801 F 36 113= 122s 139 TEMPR5 00178803 F 36 55= 63s 81 TEMPR5 00178802 F 36 114= 123s 140 TEMPWRU0 00178801 F 21 1101= 1102e 1107s 1147 TERMBASE 00001F04 F 19 403= F 21 467 469s 1534 1536s F 75 83 F 133 48 75 108 150 194 280 F 148 513 1242a 1901 TERMCOUNT 00001F02 F 19 400= F 46 1297a F 123 548 F 130 329s 814 F 131 430s 1922s TERMNUM 00001F03 F 19 401= F 21 1458 1491 1502 1547s TERMPOST 00003402 F 36 572j 691= TERMSCAN 000033C8 F 36 569= 581j TERMWBUSY 00001F05 F 19 404= F 28 85 F 46 1318a F 48 964 1090s 1140s 1174 F 49 60s 327s 469s 531s 762s 902s F 50 360s TESTAEXIT 00002C1B F 29 1053j 1094= TESTTEXIT 00002C1D F 29 1022j 1096= TESTTRUBL 00002BF3 F 22 383 542 749 806 F 28 484 F 29 12 1007 1012= THEPFLOOP 00002FD8 F 33 787= 797j THEPSA 00178801 F 36 1278= 1282s 1290 THINKIDLE 00002891 F 28 65= 205j 213j THIRDPART 00700000 F 16 877= 879x THISWORD 0000362B F 37 184j 193= TICK 00002C91 F 21 1045a F 29 11 1436 1441= 1445a TIEVENT 000808A0 F 39 151= 162s *TILENGTH 00000004 F 39 151= TIMEKILL 00004517 F 26 146 F 29 909 F 36 439 F 43 1579 F 46 25 421 426= F 126 634 F 130 631 TIMENOW 00004532 F 38 1031 1350 F 46 23 132 358 438 486 491= F 124 76 TIMEPOST 00003408 F 36 680j 705= TIMERLOCK 00001EF1 F 19 189= F 28 128s 135s F 46 129s 138s 160s 360s 387s 427s 454s F 148 798s 823s TIMERQ 00001EF2 F 19 190= F 46 130 137s 366a 367 372a 428 429a 436a 648 F 148 811 TIMESERIAL 00001EF0 F 19 188= F 28 114 129 131s F 46 362s TIMESET 000044F8 F 21 1029 1035 1042 1048 F 28 240 F 29 1442 F 43 3290 3341 F 46 24 343 348= 696 747 803 F 47 27 129 F 53 71 F 56 255 F 126 650 F 148 350 TIMEZONE 00001EEF F 19 169= F 38 1358 F 46 1340 F 58 89 F 124 78 86 108 141 162 F 133 838s F 143 382 F 148 829s TIMLIM 00170802 F 8 1608= F 17 81e F 143 723 725s TIMUSD 00170803 F 8 1609= F 17 82e TIPROTO 000038AA F 39 151a 151= 151e TIR0 00160801 F 39 151= 169s 1 Jimbo's CREF Extractor 2.0 VRM, System C9303 (18 Mar 93) 12-May-93 12:56 PAGE 100 TIR1 00160802 F 39 151= 167s TIR2 00160803 F 39 151= 165s TISLOT 00080040 F 39 151= 164s TITIME 00081D20 F 39 151= 160s TMR 00130000 F 19 191= 193 F 21 1040s F 26 145 F 28 245s F 29 908 F 43 1575 1576j 3295s 3346s F 46 130 131j 133 136 142 152 186 187 190 357 359s 363s 365 370s 371s 386 386 430 432 439 448 F 53 76s F 130 630 TMRCPU 00090043 F 19 196= F 46 142 354s TMRLINK 00170800 F 19 194= F 46 136 370s 371s 433 434s TMRLNTH 00000006 F 19 204= 205e TMRLOG 00000003 F 19 205= F 46 151 189 350 447 TMRPARAM 00170805 F 19 202= F 46 187 356s TMRPC 00091F13 F 19 200= F 46 186 355s TMRPROT 00001EF3 F 19 193= 204e 206a TMRSERIAL 00170804 F 19 201= F 46 363s 386 430 TMRTIME 00170801 F 19 195= F 46 133 353s 359s 365 368 439 650 F 148 816s TOCURR 000029CE F 28 668j 678= 974j TOTALPAGES 00001CC8 F 16 200= F 21 900s F 148 1198 TPHDR 0000032A F 20 194= 202a *TPHDRBF 0000031F F 20 193= *TPHDRDATE 00000003 F 20 197= *TPHDRDCKS 00000009 F 20 199= *TPHDRHCKS 0000000A F 20 200= *TPHDRIND 00000002 F 20 196= *TPHDRLNTH 0000000B F 20 192= *TPHDRTAG 00000000 F 20 195= TRACE MACRO F 5 87= F 38 432 F 43 365 418 486 631 648 1038 2019 2210 2293 2710 2855 3137 3760 3834 4161 4911 5128 F 45 208 263 332 596 945 1041 1157 1475 1692 F 48 162 321 370 446 663 796 1026 1119 1223 1459 F 51 64 127 180 275 319 337 346 F 54 512 537 F 57 73 150 560 571 F 59 98 138 221 414 417 486 510 524 757 808 TRACEADDR 00001D29 F 16 453= F 39 157 F 144 81 90s 569s 576 TRACECALL 00001D2C F 16 457= F 38 432 F 43 365 418 486 631 648 1038 2019 2210 2293 2710 2855 3137 3760 3834 4161 4911 5128 F 45 208 263 332 596 945 1041 1157 1475 1692 F 48 162 321 370 446 663 796 1026 1119 1223 1459 F 51 64 127 180 275 319 337 346 F 54 512 537 F 57 73 150 560 571 F 59 98 138 221 414 417 486 510 524 757 808 F 144 99s 565s TRACEGIVEN 00001D2B F 16 455= F 144 84s 582 603s 606 616s 618 631 645 TRACEINDEX 00001D2A F 16 454= F 39 155s F 144 83s 581 TRACEPROC 000038AA F 39 144 153= F 144 105 TRINFORD MACRO F 11 611= F 39 151 F 144 550 TRYAGAIN 000028C9 F 28 206= 212j TRYMONVP 00002EB1 F 32 746j 751= TRYUPC 000028F1 F 28 250= 880j TSAGEVAL 00002549 F 23 259= F 29 1673 TSBASEVAL 0000254C F 23 314= F 29 815 TSHISTLOSS 0000254A F 23 290= F 29 1664 1669 TSMSAGE 00001D13 F 16 361= F 29 1503s 1508s TSMSEQUIV 0000254D F 22 1088 F 23 326= TSMSTIME 0000000F F 16 360= 361x F 29 1507 TSPRIORVAL 0000254B F 23 303= F 29 813 1 Jimbo's CREF Extractor 2.0 VRM, System C9303 (18 Mar 93) 12-May-93 12:56 PAGE 101 TSQUANMIN 0000254E F 23 335= F 28 237 TTRLOCKUP 00002C11 F 29 1042j 1069= 1110j 1113j TTRODD 00002C1E F 29 1048j 1107= TTXAMLOP 00002C0A F 29 1049= 1054j TVASPBROLP 00002C6B F 29 1325= 1329j TWSXBROLP 00002C5F F 29 1309= 1313j UBIT 00000210 F 28 1262= 1294s 1299s 1320j UBSBCW 00160802 F 19 1003= F 45 639 1598 F 78 122s 127s UBSLINK 00081F10 F 19 1001= F 45 641 1592 F 78 100s 130s 194 UBSLOG 00000002 F 19 1005= F 78 98 196 UBSMAW 00160801 F 19 1002= F 45 637 1596 F 78 117s UBSPROT 00001F21 F 19 998= 1005e 1006a UBSVPN 00160000 F 19 999= F 78 103s 191 UCEFCB 00081F11 F 18 133= F 28 1346 1350 F 36 1923 1927 F 37 243s F 67 92 F 75 961 F 79 894 F 104 266 268 281s 286s F 107 659 F 112 136 F 123 1420 1478 F 131 1696s UCELINK 00081F10 F 18 131= F 50 675s 695s F 69 204s 212s 295 314 322s F 107 664s F 112 426 UCELOG 00000001 F 18 135= F 37 238 F 75 964 F 79 897 F 112 138 F 127 837 F 131 1648 1677 UCEPROT 00001ECB F 18 127= 135e 137a UCEUNIT 00080080 F 18 129= F 36 1295 F 37 241s F 67 81 89 F 69 196 293 312 F 107 657 F 123 1418 F 125 139 F 126 179 208 210 213 330 336s 377 F 131 1645 1687s UCFREEMEM 00002F8F F 33 12 578 584= F 75 963 F 79 896 F 112 137 F 127 836 F 131 1647 UCGETMEM 00002F0A F 33 13 211 218= F 37 237 F 131 1676 UCWORDA 00160800 F 18 128= 129e 131e UD 00000000 F 8 2162= 2205 2210e 2238e F 142 418 F 143 1832x 2256 2259 2282 2287 2302 2312 UD1LFDE 000003D8 F 8 2234= F 110 112 117a UD1LINDX 000003F8 F 8 2256= F 55 394a F 95 126a F 110 258 F 113 93 F 115 475a 585a 653a 759a F 117 211a 258a 320a UD2FDECNT 0000002A F 8 2212= 2238e F 115 443 455a 456 488 493 590 UD2LFDE 000003D8 F 8 2238= F 110 148 153a F 113 91 239a 285a UDACCT 00000000 F 8 2163= F 59 383 F 134 231s F 143 2263a 2265a UDAUTHLIST 00000040 F 8 2203= F 55 354 F 135 204 224s 474 477s 1194 F 142 441 F 143 638s 826s 2278s 2375 *UDBYE 0000001A F 8 2180= *UDBYEAC 00000015 F 8 2177= *UDBYEACP 00000017 F 8 2178= *UDBYEACPW 00000018 F 8 2179= *UDBYEEXT 0000001C F 8 2181= *UDBYEPW 0000001D F 8 2182= UDENCRFLG 00000010 F 8 2186= F 121 276 1175s UDFDECNT 00000026 F 8 2211= 2234e F 115 324 356 UDFDLIST 00000060 F 8 2207= 2210e 2234e 2256e F 55 344a F 115 322a 349a 353a 578a 762 F 117 97a 196a 219a 328a F 142 418 F 143 1832x 2256 2259 2282 2287 2302 2312 UDFDSIZE 000003A0 F 8 2210= 2211e 2252e F 115 350 UDHPR 00000010 F 8 2174= F 134 245s UDHPRAC 0000000B F 8 2171= F 121 248a 1009a 1012 1021s F 130 413a F 134 233s UDHPRACP 0000000D F 8 2172= F 121 1014 1023s F 134 237s *UDHPRACPW 0000000E F 8 2173= UDHPREXT 00000012 F 8 2175= F 134 247s 1 Jimbo's CREF Extractor 2.0 VRM, System C9303 (18 Mar 93) 12-May-93 12:56 PAGE 102 *UDHPRPW 00000013 F 8 2176= UDINDCNT 000000B9 F 8 2252= 2256e UDINDXADR 0008D183 F 8 2247= F 55 387 F 95 131 F 113 214 315s 325s F 115 355s 485s 492s 579 587 F 117 199 225 260 322 *UDINDXDA2 0016C804 F 8 2248= UDINDXDAW 0016C803 F 8 2245= F 115 661s UDINDXEXT 0016C802 F 8 2244= F 110 206s F 113 178s 313s 323s F 115 240s 361s 498s 666s F 117 205 267 UDINDXLEN 00000005 F 8 2251= 2252e 2256e F 55 393 F 95 125 F 115 473 584 593 651 656 757 F 117 210 221 257 319 UDINDXNAM 0016C800 F 8 2243= F 110 208s F 113 176s 311s 321s F 115 238s 359s 496s 664s F 117 201 263 UDINDXNUM 0016C00C F 8 2246= F 110 210s F 113 317s 327s F 115 242s 357s 489s 494s 581 589 781s UDINDXPROT 00000834 F 8 2242= 2251e UDLFDE 000003E8 F 8 2223= F 55 562a F 95 115a F 110 179a F 115 139a 221a 806 F 117 114a 175a 249a 311a UDLIMITS 0000002B F 8 2198= F 59 118a 395a F 131 1831 F 134 248a F 143 589a 722a UDPASS 00000003 F 8 2165= F 70 414 F 121 1128 1137s F 131 870 873 1795 1808 F 134 242s UDPRIORITY 00000029 F 8 2189= F 131 1834 *UDPRIVS 0000002A F 8 2190= UDPROJ 00000002 F 8 2164= F 59 386 F 134 235s UDSERNO 00000020 F 8 2187= F 75 583 F 113 216 F 115 317 432 599 F 121 156 F 134 228s F 143 2269 2272s 2292 UDSFLAGS 0000001F F 8 2183= F 121 184 275 850s 1173 1176s UDSHLLIST 0000003C F 8 2202= F 55 349 F 79 508a 514a F 119 209a 415a 655a F 120 162a 184a F 142 422 F 143 617s 796s 2276a 2373 UDSHLSIZE 00000004 F 8 1713= 1857 1858 2202 F 73 189 F 79 504 550 F 110 476 UDTITLE 0000004E F 8 2206= F 121 205a 225a 1063a UDTITLEL 00000048 F 8 2204= 2205 2206 F 121 206 214 1054 1056 1069 UDTYPE 0008001A F 8 2169= F 55 345 F 59 391 F 115 363s 765s UDWORDB 0000000A F 8 2168= 2169e F 143 2279s UERCODE 000806A0 F 17 581= F 28 536 635 645 702 746 858 949 954 1087 F 36 1338 1809 1826 F 37 278s UERCODEZ 000800D0 F 17 572= 579e 580e 581e F 28 822s 914 F 36 1797s 1822 1882s UERCSKIPDB 00080410 F 17 580= F 28 920 UERECOVER 00002A49 F 28 959= 1023j 1089j UERLINK 00081F10 F 17 582= F 28 825s 1203 1204 1205s F 32 221 264 F 36 448 1337 1340 1341s 1804s 1825 1836 1837s 1838s 1852 UERLOG 00000001 F 17 585= F 28 568 752 820 961 F 32 224 267 F 36 451 1343 1796 1855 1881 F 37 275 UERPARAM 00160801 F 17 583= F 28 538 646 698 703s 748 823s 951 1141 F 36 1803s F 37 279s UERPROT 00001ECA F 17 570= 585e 586a UERRBMEM 00002A01 F 28 712a 786= UERRCMMK 00002A70 F 28 931j 1086= UERRCMVP 00002A7A F 28 1102= 1105j UERRCMVPP 00002A77 F 28 1097= 1110j UERRNCM 00002A5F F 28 991j 1034= UERRNINIT 00002A58 F 28 988= 1091j UERRSET 00003589 F 22 474 683 716 F 25 371 F 28 798 F 36 27 587 620 640 659 681 1788 1794= F 40 168 222 F 64 55 307 F 67 1 Jimbo's CREF Extractor 2.0 VRM, System C9303 (18 Mar 93) 12-May-93 12:56 PAGE 103 207 F 107 76 F 123 478 F 124 225 634 F 125 405 F 130 842 UERRSETY 000035B5 F 24 753 F 29 924 F 36 28 1155 1789 1879= F 48 1322 F 124 560 F 125 477 F 130 509 F 131 1213 F 133 120 1053 UERRSRTSHR 0000358E F 36 1802= 1884j UERRTRAP 000038E8 F 21 2006a F 40 7 128j 141 144= UERVERYBAD 00080210 F 17 579= F 28 525 629 861 1208 F 36 1833 UERWORDA 00160800 F 17 571= 572e 582e UEXCDLIM 00002F47 F 33 291j 350= UFREEMEM 00002F5D F 28 567 751 960 F 32 223 266 294 F 33 14 429 431= F 36 450 1342 1854 F 55 480 1100 F 56 286 F 70 272 F 79 751 1265 1301 1353 1863 1872 F 113 183 295 348 F 119 287 308 F 123 977 985 1037 1041 1095 1099 1260 1276 1470 1489 F 125 1031 1120 1192 1201 F 130 211 245 254 F 131 396 446 462 673 677 699 703 713 F 133 357 380 516 F 134 568 F 139 174 194 F 145 187 198 UGETMEM 00002ED0 F 28 819 F 33 15 49 52= F 36 1795 1880 F 55 83 969 F 56 68 F 65 65 F 70 200 F 79 201 297 F 107 300 F 113 115 F 123 676 708 1202 1401 F 125 986 F 130 182 F 131 170 540 558 F 133 266 427 F 139 81 F 145 133 *UINTARTHOV 00000010 F 9 67= UINTATTACH 00000075 F 9 94= F 130 508 *UINTBCDO 0000000F F 9 66= UINTBREAK 00000020 F 9 79= F 28 1088 F 36 1145 1170 1270e F 50 302 UINTBRKINS 00000079 F 9 95= F 40 219 *UINTCEM 00000008 F 9 59= UINTCHAIN 0000007B F 9 97= F 36 1274e F 107 74 *UINTCKB 0000000C F 9 63= *UINTDIV0 00000011 F 9 68= *UINTFIXOVN 00000013 F 9 70= *UINTFIXOVP 00000012 F 9 69= *UINTFLTOVN 00000014 F 9 71= *UINTFLTOVP 00000016 F 9 73= *UINTFLTUFN 00000015 F 9 72= *UINTFLTUFP 00000017 F 9 74= UINTGUNIT 00000028 F 9 87= F 36 656 720 922 F 127 852 *UINTIMI 00000006 F 9 57= *UINTIMS 00000003 F 9 54= UINTINST 00000018 F 9 76= F 28 859 *UINTIONOV 0000000A F 9 61= UINTLOGIN 0000007F F 9 107= F 28 1090 F 37 277 UINTLOGOFF 0000007A F 9 96= F 124 633 UINTMPV 00000074 F 9 93= F 22 714 F 125 287 F 143 1440 UINTMSG 00000026 F 9 85= F 36 637 713 915 F 127 237 UINTNEPATH 00000023 F 9 82= F 36 613 619 699 901 1272e F 76 238 F 84 133 UINTNETERM 00000022 F 9 81= F 36 579 586 692 908 1271e F 50 212 559 UINTOPRQ 0000007D F 9 99= F 125 475 F 130 840 F 131 1211 F 133 118 1047 UINTOPRQA 00000027 F 9 86= F 133 1124 UINTOPRQL 00000001 F 9 100= F 125 476 F 130 841 F 133 1085 UINTOPRQP 00000005 F 9 104= F 131 1212 UINTOPRQT 00000002 F 9 101= F 133 1036 *UINTOPRQUL 00000004 F 9 103= UINTOPRQW 00000003 F 9 102= F 133 119 *UINTPARL 00000009 F 9 60= UINTPTERM 0000007E F 9 105= F 124 224 1 Jimbo's CREF Extractor 2.0 VRM, System C9303 (18 Mar 93) 12-May-93 12:56 PAGE 104 *UINTSTKO 0000000E F 9 65= *UINTSTNG 0000000D F 9 64= UINTTDISC 00000024 F 9 83= F 36 1273e F 48 1320 UINTTIMCUT 00000021 F 9 80= F 29 922 F 131 1814 UINTTIMINT 00000025 F 9 84= F 28 636 F 36 678 706 929 1394 UINTTRACEI 0000001F F 9 77= F 40 163 F 125 403 *UINTUMODE 00000002 F 9 53= *UINTUMP 00000004 F 9 55= *UINTUNDEF 00000018 F 9 75= UINTUOP 00000001 F 9 52= F 40 127 *UINTUOP2 0000000B F 9 62= UINTVAR 0000007C F 9 98= F 123 477 UINTVMFDE 00000071 F 9 90= F 44 76 UINTVMFIDS 00000072 F 9 91= F 22 471 680 F 35 1085 F 82 547 F 130 436 UINTVMFISR 00000073 F 9 92= F 28 821 UINTVMFPE 00000070 F 9 89= F 25 369 F 44 108 F 45 1522 F 87 62 *UINTXTI 00000007 F 9 58= ULACCNM 00170802 F 17 58= F 21 559s F 59 273 275 359s 384 F 67 269 270 372 373 391 811 864 924 F 68 78 466a F 70 226a 246a F 73 49 211 F 75 31a F 79 403a 408a F 95 293 F 107 476 F 112 381 F 114 77 F 118 74 81 F 119 181a F 121 1020 1126a 1135a F 123 823 828 1163 1442 F 127 153 F 131 328 1793 F 133 1320 F 134 91s 839a 862a 902 F 135 118 F 136 218 442a 454a F 139 408a F 143 2515 ULACCPROJ 00170804 F 17 59= F 21 561s F 59 277 324 361s 387 F 65 505 F 67 263 264 289 378 379 404 405 414 420 430 454 684 813 866 926 F 68 76 452 F 73 54 59 61 214 222 224 F 79 1602 F 95 294 F 107 486 502 F 112 379 F 114 79 F 118 76 82 F 119 143 F 121 1022 F 123 423 428 808 830 844 847 857 862 1165 1444 F 127 159 F 131 329 F 133 1322 F 134 93s 108 135 657 798 F 135 1179 F 136 215 231 246 F 139 719 F 143 2513 ULBLOCK 00170801 F 17 55= 56e 57e F 59 113 357s 376 405 407 F 70 408 F 75 580 F 79 371 982 F 104 383 F 113 210 F 115 73 574 F 117 93 194 F 119 207 F 120 160 F 121 117 1390 F 130 402 F 131 1785 F 134 838 861 911 F 135 202 469 1190 1196 F 136 443a 453 F 139 406 437 F 142 413 443 F 143 767 2368 ULBLOCKING 80000000 F 17 65= F 59 749 813 ULBTRACE 00000002 F 16 460= F 59 98 98 138 138 221 221 414 414 417 417 486 486 510 510 524 524 757 757 808 808 ULBUSYCTR 00091F15 F 17 68= F 59 132 F 121 91 F 134 812 ULBUSYWORD 00170805 F 17 64= 68e F 21 569s F 59 95s 218s 366s 416 483s 521s 746s 750s 814s 818s ULDRIVE 00090081 F 17 56= F 21 570s F 22 398 567 F 37 314 F 59 139 432 468 F 67 446 449 F 70 236 F 75 28 F 79 1290 F 95 271 F 108 561 569 F 112 217 272 F 115 163 508 F 121 584 617 683 716 F 123 1157 1446 F 134 95s 646 855 872 F 138 753 F 139 402 F 142 424 F 148 1894 ULDSKLIM 0009218D F 17 87= F 21 567s F 24 37 F 68 168 F 106 44 F 121 86 600a 650s F 123 918 F 124 844 F 131 1916 F 134 893s ULDSKSAVL 0009018C F 17 85= F 21 566s F 68 165 F 106 38 F 110 86 321 F 121 89 699a 749s F 124 849 ULDSKUSD 0009118E F 17 88= F 24 35 F 67 819 F 68 163 187s 189s F 106 64 F 110 85 320 414s F 115 179s 181s 311s 501s 681s 683s F 121 87 F 123 922 F 124 858 F 131 1917 F 143 2359 ULDSKWARN 0009318C F 17 86= F 21 565s F 106 36 F 121 88 775s F 123 920 F 124 847 1 Jimbo's CREF Extractor 2.0 VRM, System C9303 (18 Mar 93) 12-May-93 12:56 PAGE 105 ULFACCESS 00090047 F 17 78= F 73 80 F 121 92 873a ULFOREIGN 00090210 F 17 47= F 59 365s F 67 396 398 817 F 95 286 F 123 353 F 134 100s ULIDENT 000908B0 F 17 52= F 21 572s F 59 77 85 136s 211 410s 743 801 ULIDVAL 00000765 F 17 53= F 21 571 F 59 78 86 212 409 744 802 ULKPAGE 00003279 F 35 39 1176 1196= F 78 192 F 142 857 ULKSNL 0000327F F 35 1199j 1203= ULKWEN 0000327D F 35 1183j 1188j 1193j 1200= ULKWNDO1 00003276 F 35 40 1173 1191= F 61 92 F 79 644 832 1037 F 82 498 F 95 100 F 108 55 F 110 156 F 112 309 F 113 205 F 115 209 313 428 602 ULKWNDO2 00003270 F 35 41 1174 1181= F 113 230 272 F 115 320 439 453 F 143 1180 ULKWNDO3 00003273 F 35 42 1175 1186= ULLIMITS 00170806 F 17 70= 71e 77e 81e 82e 83e 84e 85e 86e 87e 88e F 59 116a 397a F 143 592a 738a ULLIMLOCK 00001EAF F 17 39= F 68 186s 193s 199s F 110 413s 421s F 115 177s 183s 310s 312s 500s 502s 680s 685s F 121 1611s 1613s F 143 588s 594s 736s 740s ULLINK 00091F10 F 17 54= F 59 130 134 135s 419s ULLIST 00001EAB F 17 35= F 59 129a 271 406 418 420s F 138 752 F 139 397 436 ULLOCK 00001EAC F 17 36= F 59 128a 155a 166a 268a 287a 402a 422a 488a 494a 502a 526a F 115 366a 369a 768a 771a F 134 808a 820a 827a F 136 466s 469s F 138 751a 755a F 139 396s 415s 435s 446s ULLOG 00000004 F 17 92= F 21 552 556 F 59 141 354 434 470 F 134 87 186 562 ULLOGSPOT 00091A57 F 17 80= F 28 1148 1173 F 67 857 919 F 121 95 948a F 130 220 341 F 133 1296 *ULMSBLK 00091181 F 17 57= ULNOTHERE 00090610 F 17 49= F 59 481 519 ULNOTHING 10000000 F 17 51= F 134 809 ULPACCESS 00090847 F 17 79= F 121 93 923a 1333 ULPNH 00003288 F 35 1212j 1214= ULPNLV 00003289 F 35 1205j 1216= ULPWORD 00170807 F 17 77= 78e 79e 80e F 134 252 ULRAFDIR 00090410 F 17 48= F 59 392s F 79 506 F 95 122 F 110 100 F 113 89 129 172 F 115 146 367s 769s F 117 86 F 131 871 *ULRSTRG1 00090816 F 17 72= ULRSTRG2 00090616 F 17 73= F 95 54 F 120 52 ULRSTRG3 00090416 F 17 74= F 121 365 *ULRSTRG4 00090216 F 17 75= *ULRSTRG5 00090016 F 17 76= ULRWORD 00170806 F 17 71= 72e 73e 74e 75e 76e F 121 100 171 972s ULSCRDSK 0017080F F 17 90= F 24 36 46s 92s 94s F 59 399s F 68 167 200s 202s F 106 65 F 110 415s 417s F 115 178s F 123 923 F 124 859 F 130 205s 207s 209s 332s 334s 336s ULSHADOW 00090010 F 17 46= F 59 279 363s F 67 385 815 F 95 288 F 107 441 F 121 99 F 123 1167 F 131 1777 F 134 828 F 136 468s ULTIMLIM 00170808 F 17 81= F 21 563s F 29 941 F 121 82 506a 553s F 124 703 753 F 131 1816 ULTIMUSD 00170809 F 17 82= F 29 943 F 121 83 437 454s F 124 705 755 F 130 298s F 131 1818 1 Jimbo's CREF Extractor 2.0 VRM, System C9303 (18 Mar 93) 12-May-93 12:56 PAGE 106 ULWLCKLIM 0017080A F 17 83= F 21 564s F 121 84 825s F 124 743 764 F 131 1823 ULWLCKUSD 0017080B F 17 84= F 121 85 798 800s F 124 742 766 F 130 302s F 131 1825 ULWORDA 00170800 F 17 45= 46e 47e 48e 49e 52e 54e F 59 356s F 134 810s 815s UMAPVALS 0000041A F 15 130= F 24 431a UMEMLOCK 0001F00F F 14 257= F 33 236s 255s 362s 605s 650s F 130 548s 568s 572s 579s UMEMPSA 0001F00E F 14 256= F 22 125 F 33 229 596 F 37 94s UMEMSIZE 0000000A F 14 252= F 16 66 66 UMEMXTRA 0001F00D F 14 254= F 33 351 358s F 37 124s F 130 549 573s *UNDRBACKUP 00080C10 F 12 17= *UNDRCNTLM 00080610 F 12 17= UNDRDBG 00082F72 F 12 17= F 123 1326s UNDRDPSN 00080172 F 12 17= F 123 1327s 1331s UNDRELEN 00081F10 F 12 17= F 123 1320s *UNDREXO 00080810 F 12 17= UNDRLEVEL 00080091 F 12 17= F 123 1316s 1354 *UNDRMAINTR 00081010 F 12 17= *UNDRMAINTW 00080E10 F 12 17= *UNDRMANAGR 00080A10 F 12 17= UNDRNAME 00160804 F 12 17= F 123 1318s *UNDROPREQ 00081210 F 12 17= UNDRPINFORDMACRO F 10 419= F 12 17 UNDRPLOG 00000003 F 12 17= F 123 1203 1261 1277 UNDRPLONG 00000006 F 12 17e 17= F 123 1207 1313 1319 1336 1351 UNDRPROTO 00000000 F 12 17e 17a 17= UNDRPSN 00081371 F 12 17= F 123 1322s UNDRRSTR 000800F0 F 12 17e 17e 17e 17e 17e 17e 17e 17e 17e 17e 17e 17e 17= F 123 1324s *UNDRSTCTG1 00081C10 F 12 17= *UNDRSTCTG2 00081A10 F 12 17= *UNDRSTCTG3 00081810 F 12 17= *UNDRSTCTG4 00081610 F 12 17= *UNDRSTCTG5 00081410 F 12 17= UNFILEWAIT 0000474D F 21 1051a F 47 108 113= 132a UNFREEZE 00002D95 F 25 419 F 31 7 122 127= F 39 58 F 55 1218 UNITPOST 0000340E F 36 658j 719= UNLKFIRST 000034CF F 36 1071j 1192= UNLOCKLIST 000030A4 F 29 1533 F 32 167 F 34 10 147 152= F 37 201 F 43 745 953 F 54 284 296 F 59 154 165 421 487 493 F 76 116 288 316 360 623 F 115 368 770 F 131 764 1092 F 132 154 161 188 197 203 257 F 134 819 826 F 138 157 728 747 929 1035 1064 F 143 306 F 144 795 UNLOFLAG 00000010 F 35 1455= 1459s 1474j UNLONOALT 00002629 F 24 617j 619= UNLONOREF 0000262B F 24 616j 624= UNLOPAL 00002623 F 22 611 F 24 116 611 613= 929 F 35 494 1475 1646 F 143 1884 UNO 00098081 F 37 230= 235s 240 UNSRCHLIST 000030B7 F 34 11 221 226= F 43 3252 3403 4097 F 48 1332 F 58 153 F 59 286 349 501 525 533 565 573 F 61 620 F 75 624 693 F 76 95 130 208 485 517 F 79 1953 F 102 291 318 402 428 F 123 333 874 939 1055 1093 F 125 478 F 127 179 192 754 782 F 130 485 512 518 830 F 131 1222 F 132 64 70 F 133 124 1055 1198 1231 1 Jimbo's CREF Extractor 2.0 VRM, System C9303 (18 Mar 93) 12-May-93 12:56 PAGE 107 F 134 702 708 F 137 70 90 144 155 357 497 538 582 589 591 598 642 649 F 138 754 F 139 137 162 520 529 F 140 90 102 F 141 91 254 329 368 375 881 947 F 144 957 972 UNSUBS 00005082 F 38 433 F 54 14 451 497= UPBACKUP 00080C10 F 18 59= F 59 343 561 F 67 914 F 73 324 F 79 1880 F 107 497s F 108 146 F 112 312 F 121 882 1120 1261 1321 F 123 1801s F 134 205 631 700 F 136 135 UPBACKUPB 00002E10 F 18 44= 48e 59e F 21 606s F 75 606e F 130 72e UPC 00000008 F 19 633= 650 F 43 705 922 UPCBROPTR 00081F16 F 18 78= F 24 240 882 F 25 406 F 29 1310 1326 F 35 1536 1593 F 72 189 F 104 214 F 107 165 167 173s 220 F 123 264 1245 1247 F 125 633 635 641 642s 645s 658 659s 664 F 131 1299 UPCCONSOLE 00081F12 F 18 70= F 28 666 863 918 972 1314 F 36 221 264 497 F 37 146s F 104 132 F 107 303s F 124 305 F 125 766 823 UPCDADPTR 00081F17 F 18 80= F 24 242 884 F 25 410 F 28 1309 F 29 1312 1328 F 35 1538 1595 F 36 60 272 F 72 191 F 104 216 F 107 119s 172s 213s 219s F 123 272 1254 1328 1640 F 125 628 632s 651 665 715 F 131 1301 UPCERRPSN 00081378 F 18 82= F 28 922 1066s F 123 1325 F 124 592s 605s F 125 718 UPCFREEMEM 00002F8F F 32 273 F 33 16 579 585= F 36 502 UPCGETMEM 00002F0A F 33 17 212 219= F 37 135 F 107 285 UPCIMDBUG 00080E11 F 18 66= F 28 933 F 124 447s 515 UPCINTTIME 0016080C F 18 92= F 28 638s F 36 673 677s 1382 1385 F 107 292s F 126 632s 648s UPCLNTH 0000001A F 18 110= 111e UPCLOG 00000005 F 18 111= F 32 274 F 36 503 F 37 136 142 F 107 286 290 UPCMAGEV 000800F4 F 18 73= F 24 175s 332s F 29 1322a UPCMAGEW 000800F5 F 18 75= F 24 176s 377s F 29 1306a UPCNETINTE 00081011 F 18 67= F 28 1322 F 36 268 321 F 50 699s F 104 123s F 107 291s UPCNTLMODB 00002810 F 18 47= 62e F 127 131 F 130 51 70e UPCNTLMODE 00080610 F 18 62= F 21 604s F 24 29 F 28 866 990 1119s F 29 917 F 36 218 F 38 185 F 67 70 157 F 79 1462 F 91 72 F 92 45 130 F 104 348 F 123 175 F 126 230 UPCOUNTERS 00002E84 F 32 617j 626j 634= UPCPRIV 000800F0 F 18 34= 51e 52e 53e 54e 55e 56e 57e 58e 59e 60e 61e 62e F 21 606s F 37 159s F 75 612 F 107 462s F 123 415 1323 F 127 130 F 130 50 UPCPRIVULB 00081F13 F 18 72= F 36 499 F 37 155s F 67 497 683 F 73 125 128 335 343 F 74 812 F 79 1190s 1201s 1943 F 107 453s 475 F 118 36 F 121 53 1265 1325 F 123 697 1791 1795s F 125 471 F 127 142 F 130 309s F 131 306s 309s 426s 1898s F 133 1043 1120 1156 F 134 251 639 787 F 135 123 F 136 138 186 UPCPROCNM 00160809 F 18 83= F 28 1118s F 37 148s F 107 320s F 123 905 1317 1710s UPCPROT 00001ECB F 18 31= 110e 112a UPCRUNFCB 00081F14 F 18 74= F 90 74 F 101 278 F 107 317s F 125 621 622s F 126 123 UPCSERNM 00081371 F 18 68= F 24 875 F 28 707 956 F 37 161s F 84 37 56 324 F 107 122 175 226 299s F 123 244 253 1321 1330 F 124 591 632 F 125 378 717 F 126 44 F 127 735 F 131 229 1077 UPCSONPTR 00081F10 F 18 33= F 24 235 877 F 25 401 F 29 1307 1323 F 32 256 F 35 1531 1588 F 72 184 F 104 209 F 107 108 117 118s 120s 155 161 211 212s 214s F 123 156 246 257 1214 1222 1237 F 125 454 1 Jimbo's CREF Extractor 2.0 VRM, System C9303 (18 Mar 93) 12-May-93 12:56 PAGE 108 508 579 626 644 650 652s 666s F 130 294 F 131 1294 UPCSRLFLD 00001370 F 18 391= 392e F 107 297 UPCTERMA 00160812 F 18 108= F 36 323a F 97 377a F 103 91a 336a UPCTERMGRP 00080041 F 18 64= F 36 310 F 97 368 F 103 126 551s UPCTIMESER 00160811 F 18 107= F 36 437 F 126 633 655s F 130 630 UPCUERROR 0016080B F 18 91= F 28 252 502a F 32 262 265s F 36 446 449s 1335a 1817a UPCUNITS 00081F15 F 18 76= F 28 1345 F 36 1922 F 67 88 F 69 203 205s 310 316s F 104 207 F 107 338 343 348 350s F 123 1395 F 125 617 618s F 126 140 204 263 329 F 130 615 616s UPCVASP 0016080F F 18 104= F 22 604 605a 631 632a F 24 177 276 322 742 744s 924 F 25 360 396a F 29 1319a F 32 112 115s F 35 173a 175 484a 486 837 1141 1210 1584a 1636a 1638 F 36 475 F 78 105 UPCVMLIST 0016080D F 18 97= F 24 841a 909a F 28 554 1114s F 32 74 F 35 194a 195 605 830 923a 1198 F 36 457 460s F 72 126 159 160a F 101 231 233s F 107 380 382s F 125 112 203 205s F 126 60 62s F 131 1291 UPCWORDA 00160800 F 18 32= 33e 34e UPCWSX 00160810 F 18 105= F 22 868a 869 F 24 364 934a F 25 398a F 29 1303a F 32 127 130s F 35 255 257a 291 293s 497 499s 964 966s 1529a F 36 483 486s UPCWVMLIST 0016080E F 18 98= F 24 839a 907a F 28 552 F 32 83 F 35 191a 192 538 611 827 948a 1134 1202 1274 F 36 466 469s UPDFLTREST 000003E0 F 18 48= F 37 158 F 107 461 UPEXECUTO 00080810 F 18 61= F 107 316s F 123 172 1235 UPEXECUTOB 00002A10 F 18 46= 61e UPMAINTR 00081010 F 18 57= F 95 397 F 107 491s F 123 1813s UPMAINTRB 00003210 F 18 42= 48e 57e F 130 74e UPMAINTW 00080E10 F 18 58= F 107 493s F 123 1817s UPMAINTWB 00003010 F 18 43= 48e 58e F 130 75e UPMANAGR 00080A10 F 18 60= F 107 482s F 121 884 1122 1263 1323 F 123 356 421 1805s UPMANAGRB 00002C10 F 18 45= 48e 60e F 21 606s F 75 606e F 130 71e UPOPREQ 00081210 F 18 56= F 21 605s F 75 936 937s 940s F 107 495s 507s F 123 351 1809s UPOPREQB 00003410 F 18 41= 48e 56e F 75 606e F 130 73e UPR15 000000F0 F 6 38= F 16 660e F 18 34e 380e 381e 382e F 19 533e 807e F 35 1054s 1062 F 39 94s F 130 69e F 135 886 905 940 994 1045 UPRSTCTG1 00081C10 F 18 51= F 107 520s F 123 1821s F 124 698 815 UPRSTCTG1B 00003E10 F 18 36= 51e UPRSTCTG2 00081A10 F 18 52= F 95 56 F 107 519s F 120 55 F 123 1825s UPRSTCTG2B 00003C10 F 18 37= 52e UPRSTCTG3 00081810 F 18 53= F 107 518s F 121 368 F 123 1829s UPRSTCTG3B 00003A10 F 18 38= 53e UPRSTCTG4 00081610 F 18 54= F 107 517s F 123 1833s F 127 45 UPRSTCTG4B 00003810 F 18 39= 54e UPRSTCTG5 00081410 F 18 55= F 107 516s F 123 1837s UPRSTCTG5B 00003610 F 18 40= 55e UPXAGEVASP 000800F6 F 18 77= F 24 153s 233s 320 333s F 29 1320 UPXAGEWSX 000800F7 F 18 79= F 24 234s 362 378s F 29 1304 *URACCTCPUL 000000A8 F 9 849= *URACCTWCL 000000A9 F 9 852= *URBLKLIM 000000B2 F 9 863= *URBLKUSED 000000B3 F 9 866= *URBYE 00000090 F 9 836= 1 Jimbo's CREF Extractor 2.0 VRM, System C9303 (18 Mar 93) 12-May-93 12:56 PAGE 109 *URCANOPMSG 00000151 F 9 945= *URCERPROC 00000089 F 9 830= *URCLRDEBUG 00000086 F 9 822= *URCLRTIMIN 00000142 F 9 939= *URCNAME 00000180 F 9 964= *URCPTIMEG 000000A1 F 9 843= *URCPTIMES 000000A0 F 9 840= URDELAY 00000140 F 9 933= F 55 640 1048 F 70 325 URDELAYR 00000143 F 9 934= F 36 1092 F 47 57 *URDROPPRIV 00000182 F 9 968= UREQTAB 00001D25 F 16 438= F 144 232s *URERRORGET 00000028 F 9 751= *UREXCLPAGE 000000C2 F 9 874= *URFORCEP 000000C4 F 9 875= URFREELUN 00000122 F 9 922= F 131 296 949 F 133 706 *URFREEPAGE 000000C0 F 9 869= *URFSERNO 00000061 F 9 782= *URGENOPMSG 00000150 F 9 943= URGETMSG 00000161 F 9 951= F 70 331 *URGETMSGA 00000162 F 9 953= URGETPNUM 00000170 F 9 960= F 70 47 F 131 995 *URGETSSN 00000053 F 9 762= *URGETVERS 00000054 F 9 764= *URGIVELUN 00000123 F 9 924= *URGIVEUNIT 00000190 F 9 971= *URGRUNLUN 00000120 F 9 918= *URINTRGO 0000008A F 9 833= *URINTRTN 00000082 F 9 818= *URLEA 00000130 F 9 928= *URLEA2 00000131 F 9 929= *URLOADFACT 00000051 F 9 756= *URLUNITS 00000057 F 9 772= *URMAPINAS 00000110 F 9 915= URMAYIRUN 00000055 F 9 766= F 58 38 F 148 976 *URNEXTLUN 00000121 F 9 920= URPACKFI 00000101 F 9 910= F 131 199 565 URPACKFS 00000102 F 9 911= F 79 335 URPACKI 00000100 F 9 907= F 79 1676 *URPAGETYPE 000000C1 F 9 872= *URPAKTIME 0000006C F 9 799= *URPAKTIML 0000006D F 9 800= *URPDSTRY 000000D2 F 9 884= *URPDSTRYA 000000D3 F 9 887= *URPDSTRYAP 000000D6 F 9 890= *URPDSTRYP 000000D5 F 9 889= *URPGETREG 000000F0 F 9 903= URPGO 000000D0 F 9 881= F 124 509 *URPROCINFO 00000052 F 9 760= *URPROCLVL 00000058 F 9 774= *URPSETREG 000000E0 F 9 899= *URPSTEP 000000D4 F 9 882= *URRAWDATE 00000060 F 9 781= *URRCVUNIT 00000191 F 9 974= *URSCINTARM 00000081 F 9 816= URSCMSGA 00000164 F 9 956= F 70 135 *URSENDERR 00000087 F 9 826= 1 Jimbo's CREF Extractor 2.0 VRM, System C9303 (18 Mar 93) 12-May-93 12:56 PAGE 110 URSENDMSG 00000160 F 9 948= F 70 265 F 131 390 *URSERPROC 00000088 F 9 829= *URSESBLKG 000000B1 F 9 860= *URSESBLKS 000000B0 F 9 856= *URSESSINFO 00000052 F 9 759= *URSESWCLK 000000A7 F 9 846= *URSETDEBUG 00000085 F 9 821= *URSETLGFSES 00000181 F 9 966= *URSETTIMIN 00000141 F 9 937= *URSSINTARM 00000080 F 9 815= URSSMSGA 00000163 F 9 955= F 70 99 *URSTOP 00000070 F 9 803= *URSTOPA 00000078 F 9 808= *URSTOPAR 0000007A F 9 810= *URSTOPAZ 00000079 F 9 809= *URSTOPAZR 0000007B F 9 811= *URSTOPI 00000074 F 9 807= *URSTOPIA 0000007C F 9 812= *URSTOPR 00000072 F 9 805= *URSTOPZ 00000071 F 9 804= *URSTOPZR 00000073 F 9 806= *URTRAFFIC 00000050 F 9 755= *URUDRPINFO 00000056 F 9 769= *URUGDATE 00000064 F 9 793= *URULDATE 00000065 F 9 794= *URUNLDATE 00000063 F 9 788= *URUNRDATE 00000062 F 9 787= *URVARGET 00000020 F 9 742= *URVARGETS 00000021 F 9 747= *URVARSET 00000010 F 9 734= *URVARSETS 00000011 F 9 738= *URWRITEP 000000C5 F 9 876= USECURRENT 00003366 F 36 277j 301= USEPSA 000035AC F 36 1811j 1845= USERGETMEM 00002F0A F 33 18 208 215= F 130 569 USERGM2 00002F0F F 33 228= 373j USERLIMITS 00001EB0 F 17 44= 92e 93a USERMEM 0001F000 F 14 249= 250e 252e F 33 245 248s 315 318s 324 326s 359 361s 609a 614a F 37 98s 106 107s 113 123s F 69 49 50 F 107 580a F 130 556 USERMSR 0000F000 F 6 83= F 50 632 F 107 311 F 131 223 575 757 1071 USERTIMINT 00003506 F 36 29 1372 1377= F 126 653a USERVI 00002412 F 22 164j 183= USETHISONE 0000236C F 21 2085j 2119= *VARAREA 0000032A F 20 216= VASPCLNALL 000032FA F 35 43 1569 1575= F 100 1438 VASPCLNBROS 00003306 F 35 1592= 1596j VASPCLNLP 000032FE F 35 1581= 1589j 1594j VASPCLNT 00178801 F 35 1572= 1576s 1599 VASPLISTDN 00002DCA F 32 113j 125= VBSYINFORD MACRO F 11 695= F 139 381 VERSION 00002400 F 0 43= F 123 1551 F 148 129 130 VERYBAD 00000800 F 17 576= F 22 471 480 680 688 714 F 25 369 F 28 796 F 44 76 108 F 67 206 VERYBADB 00002810 F 17 575= 576e 579e F 36 1823j F 124 558s 1 Jimbo's CREF Extractor 2.0 VRM, System C9303 (18 Mar 93) 12-May-93 12:56 PAGE 111 VFREEM00 00002FA3 F 33 606j 612= 691j VFREEM05 00002FB0 F 33 640= 686j VFREEM10 00002FBA F 33 616j 683= VFREEMEM 00002F8F F 24 917 F 33 19 580 586= F 35 370 1346 VFREMDONE 00002FB4 F 33 637j 647= VGETMEM 00002F0A F 22 386 F 28 1098 F 33 20 213 220= F 35 79 972 1277 VINBLOCK 00160801 F 19 1232= F 38 232 F 143 143s 169 178s VINLEN 00000002 F 19 1237= 1238e VINLINK 00160800 F 19 1231= F 38 234 F 75 877 F 143 141s 179 180s 181s VINLOG 00000001 F 19 1238= F 38 237 F 75 880 F 143 140 176 VINPROT 00001F62 F 19 1230= 1237e 1239a VLAVREV 0000000C F 8 1163= F 138 78 247s VLBKUPE 00000040 F 8 1175= F 142 311 VLCDATE 00000008 F 8 1158= F 138 127 F 139 543 VLFLAGINV 00000210 F 8 1161= F 138 93j F 143 296 486j 545s VLFLAGNEWO 00000410 F 8 1162= F 138 135j 140s F 139 578s 646 VLFLAGS 0000000B F 8 1160= F 138 92 134 140s F 139 578s 646 F 143 297s 485 544a VLN 00130000 F 19 1102= 1104 F 21 1300 1301s 1303a 1305s 1306s 1307s 1308s 1309s 1310s 1311s F 38 602 603s 604 620 622 623s 624s 625s 626s 631 649 651s 672s 683 696s 697 698 716 717s 718s 719s 743s 779s 780s 781s 788 791 809s 827s 841s 847 849 871 874 875s 883s 884s 913 919 924 925 927s 946s 947s 948s 970s 996 998 1006s 1007s 1008s 1070s 1071s 1072s 1073s 1094s 1095s 1099s 1100s 1103 1105s 1111 1113s 1118 1154s 1156s 1218s 1220s 1251 1255 1285 1289s 1294 1310 1311 1362 1363 1364 1419s 1420s 1430s 1438s 1441s 1465s 1466s 1471s 1476 1502 1540s 1542 1543s 1557 1559s F 43 4957 4958s 4975 4984 4998s F 54 515 516s 518a 521s 525s 525 525s 525 525s 527s F 55 890 896 897 F 57 77 84 86 95 97 114s 115 116 119 120 127s 138s 139 142s 143s 173s 174s 175s 178 181 358 F 58 74 75 79s 84 99 100 101 110 111 F 61 756 758s 764 791 814 815 F 75 621 623s 626s 627 867 868 870s 875 878s 886s 889 F 130 732 733j 737 748 750s 753 769s 775a F 134 695 697 F 137 195 197 264s 268s 277s 281 283 284 286s 295 296 348 349j 350 417s 422 488 490 492 494 496s 504 513s 516 517 580 581j 636 638 641s F 138 54s 57s 62 111s 125s 128 156s 160s 162s 164s 166s 183s 205 239s 244 343s 439s 581 637 643 645 662 726 733 734 735s 749 794 844 846 848 854s 860a 897 903 911 915 918 922 925 933 984s 986a 988s 989s 990s 992s 1020s 1021s 1024 1031s 1032s 1068 1100 1105s 1107s F 139 97 98j 100 102 104 106 108 110 112 114 116 117 119 121 126 128 130 401 519s 524 563s 725 F 141 43 78 82 148 150s 281s 282s 306s 307s 310 312 313 325 326 328s 339s 343 358 360 818 908 913s 946s 990 F 142 317 319s 324 357 358 1013 1033 1034 1042 F 143 113 114 142 144s 147 156 166a 191s 300s 305s 316s 317 352s 360s 384 386s 389 391s 400s 404 405 474 489 F 148 140 141 186 229 231s 235 236 237 243 245s 259s 284 297 323s 326 327 329 330 VLSECB2DA 00000013 F 8 1171= F 43 3006 F 138 163 F 143 361s VLSECBDA 00000012 F 8 1170= F 43 3005 F 138 161 F 143 338s 351s VLSSN 00000000 F 8 1140= F 138 113 121 138s 165 F 139 558s 633 VLSUBSDA 00000010 F 8 1168= F 43 3003 F 138 159 F 143 315s VLTITLE 00000020 F 8 1174= F 139 602a 660a 679a VLTITLELEN 00000080 F 8 1173= 1174 F 139 592 594 606 661 667 VLVNAME 00000004 F 8 1149= F 43 3001 F 138 155 F 139 514s 526 621 F 143 299 304 1 Jimbo's CREF Extractor 2.0 VRM, System C9303 (18 Mar 93) 12-May-93 12:56 PAGE 112 VLVPASSW 00000006 F 8 1152= F 138 129 F 139 545s VLVREV 0000000D F 8 1165= F 138 75 89 248s VMBYEBYE 00002F20 F 33 251= 310j 329j VMLISTADR 00178802 F 35 917= 951s 980 1027 VMLISTDN 00002DBB F 32 84j 103= VMSHUFDN 00002F3F F 33 311j 321= 328j VMSHUFFL 00002F27 F 33 246j 266= VMSHUFUP 00002F28 F 33 268= 316j VMTSSLA 00000451 F 15 153= F 24 271s 292 613s 621 626 651s 654 VMTSSLB 00000452 F 15 154= F 24 318s 335 360s 382 VOLFAGAIN 000032BE F 35 1388= 1412j VOLFIELD 00000080 F 8 39= F 16 566e 602e F 17 56e 374e 378e 490e F 18 171e 386e F 19 1134e 1138e 1327e F 32 485 610 F 35 326 357 1394 F 38 303s 424s F 42 35 F 43 3801 F 44 69 166 F 54 459 514 535 F 55 619 F 57 432 483 618 F 59 311 586s F 60 75s F 74 524s 858s F 76 414s F 79 1294s 1306 1308s F 82 226s 618s F 108 570s 698s F 110 512s F 115 164s 509s 637s 724s F 119 413s 500s F 120 182s F 134 94 273 291 431 508 523 F 136 268 F 137 403s F 138 453s 664s 667s 799 F 141 143s F 142 425s 528s 711s 887s F 143 519 VOLFLOOP 000032C0 F 35 1393= 1408j VOLFNLAST 000032C6 F 35 1398j 1402= VOLFNXLST 000032CC F 35 1395j 1411= VOLFORGET 000032B6 F 35 44 1375 1381= F 138 896 VOLINFORD MACRO F 11 633= F 130 20 VOLLABELDA 00000001 F 8 1137= F 43 2993 F 138 56 238 F 139 770 F 142 301 F 143 280 476 534 VOLNADTDSP 000904A5 F 19 1129= F 38 1220s 1255 VOLNADTF 0017080D F 19 1151= F 38 282s 475s 558s 579s 841s F 139 112 VOLNADTFBX 00093274 F 19 1125= F 38 1218s 1251 VOLNADTGT 000BC010 F 38 176= 542s 595s 851j VOLNADTPT 00090184 F 19 1123= F 38 556 604 625s 649 919 927s 996 1007s 1099s 1111 1154s 1420s 1438s 1466s 1502 1543s VOLNAWAY 00090810 F 19 1111= F 54 282s VOLNBCNTR 00170819 F 19 1186= F 38 224 231s 241s F 143 191s 489 VOLNBLOCK 00170806 F 19 1133= 1134e 1135e F 38 631 683 913 1103 1118 1476 F 57 84 95 F 134 695 F 137 422 F 138 62 244 643 VOLNBTRXBK 00090181 F 19 1118= F 57 86 116 F 138 1107s F 143 147 156 VOLNBUSY 00170815 F 19 1160= F 32 487s F 35 328s 359s F 54 96a 527s F 55 621s 820s F 57 174s 178 F 59 157s 348s 447s 474s F 61 619s 700s F 75 623s 870s 886s F 130 769s 775a F 137 494 F 138 726 854s 860a F 139 114 F 141 307s 328s F 143 521s VOLNCLNUP 00090410 F 19 1108= F 38 581s 698 791 VOLNCUST 0009010E F 19 1156= F 67 448 451 F 134 97 VOLNFBZY 0017080C F 19 1150= F 21 1307s F 38 204s 251s 308s 451s 513a 527a 603s 696s 719s 743s 779s 809s 827s 884s 1105s F 137 264s F 138 989s F 141 281s F 148 259s VOLNFOREN 00090215 F 19 1128= F 59 364 F 95 310 F 138 111s 125s F 139 563s 725 VOLNFREBLK 0017081C F 19 1196= F 37 316 F 38 247 488 780s 947s 1072s 1095s 1419s 1430s 1559s F 139 116 F 148 186 VOLNFRECNT 0017081A F 19 1194= F 37 317 F 38 246 264 300s 452 458s 495 620 624s 697 718s 788 1070s F 139 117 VOLNFREDSP 00000008 F 19 1212= F 38 789 1074 VOLNFREE 0017081F F 19 1217= F 38 298 299s 457s 622 623s 716 717s 1071s F 138 54s 128 VOLNFREEN 00000061 F 19 1214= 1217 F 38 453 463 700 789 1074 1 Jimbo's CREF Extractor 2.0 VRM, System C9303 (18 Mar 93) 12-May-93 12:56 PAGE 113 VOLNFRELST 0017081B F 19 1195= F 38 651s 781s 874 946s 970s 998 1008s 1073s 1094s 1156s 1441s 1465s 1540s 1557 VOLNFREMIN 00000005 F 19 1213= F 38 265 463 VOLNHCB 00091F15 F 19 1131= F 21 1311s F 43 4083 4087s 4958s F 44 214 F 100 227 F 138 903 992s 1024 1100 F 139 130 524 F 141 82 F 143 317 384 F 148 141 229 243 327 VOLNHDCK 00090015 F 19 1127= F 43 1638 F 141 913s VOLNIDXLK 00170808 F 19 1141= F 61 627s 638a 656s 688s 701s VOLNIDXLOK 000902D9 F 19 1144= F 61 646 654s 714s VOLNIDXMOD 00090019 F 19 1143= F 61 628 648s 689 691s VOLNIDXPTR 00091F19 F 19 1146= F 55 897 F 59 579 F 61 538s F 134 276 511 858 F 136 107 F 137 197 F 138 183s 446 734 735s F 139 121 F 143 400s 404 VOLNINHIB 00090C10 F 19 1113= F 137 641s F 139 108 VOLNINLIST 00170818 F 19 1185= F 38 229 235s 239 F 75 875 878s F 143 144s 166a VOLNLEN 00000080 F 19 1101= 1214e 1219e F 21 1304 VOLNLOCK 00001F22 F 19 1099= F 43 4047a 4098a F 54 281a 285a 297a F 59 313a 350a 534a 550a 566a 574a F 61 617a 621a F 75 625a 694a F 134 703a 709a F 137 345a 358a 498a 539a 577a 590a 643a 650a F 138 153a 158a 725a 729a 748a 900a 930a 1003a 1036a 1065a F 139 93a 138a 156a 163a 516a 521a F 143 302a 307a VOLNLOG 00000007 F 19 1219= F 21 1299 F 138 932 983 987 1067 VOLNLOMSN 0017081E F 19 1208= F 38 319 347s 459 493 494s F 138 915 918 VOLNMAIM 00090E10 F 19 1115= F 54 278 F 59 340 557 F 75 621 868 F 100 225 F 130 748 F 134 697 F 137 490 638 F 139 110 F 141 78 306s 326 360 818 908 990 F 143 114 VOLNMNTDAT 00170813 F 19 1159= F 43 4058 F 137 268s F 138 1031s F 141 946s F 143 386s 391s F 148 231s 245s VOLNMOUNT 00090A10 F 19 1112= F 21 1305s F 54 462 F 59 318 F 130 750s F 137 277s 488 496s 636 F 138 988s F 139 106 F 141 282s F 148 323s VOLNMSBLK 00091186 F 19 1135= F 38 626s 672s 883s 924 1006s 1100s 1113s 1471s 1542 F 137 417s F 138 57s 239s VOLNMSGID 00091180 F 19 1116= F 43 4089 4998s F 138 922 925 VOLNNAME 00170811 F 19 1158= F 21 1308s F 38 335 F 43 4975 4984 F 59 654 F 70 238 F 95 283 F 121 588 620 687 719 F 123 1159 1451 F 134 648 F 136 279 F 137 195 283 284 296 350 517 F 138 156s 990s F 139 102 519s F 141 312 313 358 F 143 305s F 148 329 330 VOLNNEWLST 00090210 F 19 1107= F 38 875s 925 948s VOLNNOUSE 00090840 F 19 1110= 1111e 1112e 1113e 1115e F 59 316 554 VOLNNUM 00090086 F 19 1134= F 21 1309s F 38 302 511 525 847 F 54 289 F 55 896 F 57 358 F 59 572 F 61 636 698 791 F 75 627 F 137 281 504 F 138 205 662 733 749 794 897 911 1020s F 139 59 401 F 141 310 343 F 143 405 F 148 289 326 VOLNPROT 00001F62 F 19 1104= 1220a VOLNREADQ 00170816 F 19 1171= F 42 37 55 57a 70a 77 F 43 1194 2438 2440s F 138 844 F 139 126 F 141 148 150s VOLNRNAME 0017080F F 19 1157= F 138 343s F 139 100 F 143 300s VOLNSBFLAG 00090610 F 19 1109= F 54 525 525s F 57 173s F 138 848 VOLNSECAD 00170807 F 19 1137= 1138e 1139e F 38 1294 1362 F 58 84 99 F 61 522 550 764 F 142 324 F 148 235 VOLNSECBK1 00092182 F 19 1120= F 38 1285 1363 F 58 75 100 F 61 515 551 756 F 138 162s F 142 317 1013 1033 F 143 352s F 148 236 VOLNSECBK2 00091183 F 19 1121= F 38 1310 1364 F 58 101 110 F 61 552 563 814 F 138 164s F 142 357 1034 1042 F 143 360s 389 F 148 237 1 Jimbo's CREF Extractor 2.0 VRM, System C9303 (18 Mar 93) 12-May-93 12:56 PAGE 114 VOLNSIZE 0017081D F 19 1198= F 38 871 F 138 1105s F 139 119 F 143 142 VOLNSMSBLK 00091187 F 19 1139= F 38 1289s 1311 F 58 79s 111 F 61 517s 564 758s 815 F 142 319s 358 VOLNSNUM 00090087 F 19 1138= F 21 1310s F 138 1021s VOLNSSN 0017080E F 19 1155= 1156e F 138 166s VOLNSTART 00170800 F 19 1105= 1214e VOLNSUBBLK 00093181 F 19 1119= F 54 464 F 57 97 120 F 138 160s 637 645 F 143 316s VOLNSUBQ 0017080A F 19 1148= F 54 518a F 57 115 119 139 142s VOLNSUBQL 0017080B F 19 1149= F 54 516s 521s F 57 114s 127s 138s 143s 175s VOLNSYS 00090010 F 19 1106= F 21 1306s F 130 737 753 F 137 492 F 139 104 VOLNTABLE 00001F22 F 19 1098= 1099e F 21 216a 1301s F 32 486 611 F 35 327 358 F 37 315 F 38 192 411 F 42 36 F 43 1192 1637 2437 2615 4056 4957 F 44 213 F 54 95 461 515 F 55 620 819 890 F 57 77 F 58 74 F 59 156 314 446 473 652 F 61 510 618 687 F 67 447 450 F 70 237 F 95 282 F 100 1446 F 121 585 618 684 717 F 123 1158 1450 F 125 267 F 130 732 F 134 96 647 F 136 277 F 137 348 580 F 138 912s 1006 1032s F 139 97 F 141 325 F 143 520 F 148 140 VOLNWRITEQ 00170817 F 19 1172= F 32 612 614s F 43 1200 1205 2616 2618s F 100 1448 F 125 268 F 138 846 F 139 128 VPAGELNTH 00000004 F 18 394= 395e F 28 1101 F 35 1282 VPAGEPROT 00001ECB F 18 332= 394e 396a VPBLOCK 00174803 F 18 385= 386e 387e 390e 392e F 22 432s 437 543 575s 662 764 823 943 1094 F 35 87s 258 319 993s 1038 1338 F 72 86 91 F 125 118 265 276 F 143 1408 VPCNTL 00094E80 F 18 334= F 21 153s F 22 193 309 395s 436s 438 584s 663 765 807s 824 F 24 734 736 738 F 35 90s 834s 990s 996 1138s 1207s 1335 1340 F 125 124 152 251s 252 F 143 1413 F 148 450s VPCNTLFLD 00003650 F 18 354= F 125 252 VPCNTLLK 00000002 F 18 358= F 38 628 680 910 1115 1291 1473 F 55 141 243 273 293 755 F 57 81 92 418 F 59 110 373 F 61 78 519 761 F 68 60 F 70 405 F 82 213 422 488 605 F 92 442 F 101 528 F 110 514 F 112 373 F 114 36 57 F 115 70 F 117 90 229 F 119 420 F 121 1387 F 131 1782 F 134 216 F 135 466 F 137 399 419 F 138 640 F 141 469 666 F 142 268 660 725 836 902 F 143 212 283 320 340 498 537 764 1167 2365 2455 VPCNTLLKB 00003C10 F 18 352= 358e F 24 734 F 35 834s 996 1138s 1207s 1340 F 125 251s VPCNTLNR 00000018 F 18 363= F 38 628 F 55 273 F 112 373 F 141 666 F 143 283 320 340 498 1167 VPCNTLOC 00000004 F 18 359= F 22 583 F 101 302 F 107 372 F 148 448 VPCNTLOCB 00003A10 F 18 347= 359e F 22 193 VPCNTLRO 00000001 F 18 357= F 21 152 F 22 583 F 38 1473 F 55 222 338 421 683 F 57 418 F 59 373 F 61 308 F 68 642 675 705 719 F 70 405 F 73 198 F 75 577 F 89 44 F 91 269 F 92 57 442 464 F 93 44 201 214 F 95 134 F 100 623 F 101 272 302 347 371 504 642 F 107 278 372 375 F 113 259 F 115 605 619 744 F 120 157 191 F 121 114 F 130 399 F 131 1782 F 135 1187 F 136 167 F 137 399 F 138 456 497 640 F 141 469 F 142 268 304 321 410 427 446 530 552 660 725 836 902 F 143 150 479 F 148 428 446 448 VPCNTLROB 00003E10 F 18 353= 356e 357e F 24 736 F 101 185 194 F 125 152 VPCNTLSRF 00003620 F 18 341= 361e 362e 363e F 22 309 436s 807s F 143 1413 1 Jimbo's CREF Extractor 2.0 VRM, System C9303 (18 Mar 93) 12-May-93 12:56 PAGE 115 VPCNTLW 00000000 F 18 356= F 38 628 680 910 1115 1291 F 55 141 243 293 755 F 57 81 92 F 58 81 F 59 110 F 60 77 F 61 78 117 200 519 761 F 68 60 F 74 801 F 81 73 125 F 82 116 213 422 488 605 F 83 42 301 400 F 100 1331 F 101 528 718 869 1195 F 110 514 F 112 373 F 114 36 57 F 115 70 F 117 90 191 229 F 119 204 420 F 121 1387 F 135 199 466 484 1199 F 137 419 F 138 59 241 F 139 773 F 141 666 F 142 1020 F 143 212 283 320 340 498 537 764 1167 1203 1257 1328 1349 1519 1644 1666 2365 2455 VPDRIVE 00094083 F 18 386= F 21 156s F 22 399s 429 F 125 266 F 148 453s VPERAD 00095F12 F 18 383= F 22 578s F 28 558 F 35 617s 992s 1025s 1036s 1087s 1337a VPEXCLUDE 00000010 F 18 362= F 125 201 VPEXCLUDEB 00003610 F 18 339= 341e F 125 127j VPFBINEW 00095072 F 18 381= F 22 428 580s VPFBINEWB 00003270 F 18 379= 381e 382e F 22 400 408 F 38 632 F 44 100 F 55 145 247 299 752 F 134 220 VPFBIOLD 00094272 F 18 380= F 22 581s F 44 102s VPFBIOLDB 00002470 F 18 378= 380e 382e F 22 400 F 38 632 F 44 60 F 55 145 247 298 751 F 61 82 F 68 68s F 112 377 F 114 44s 65s F 134 220 F 143 1171 2460s VPFBITYPE 000942E2 F 18 382= F 21 155s F 22 401s 408 F 35 88s 225 315 994s 1339 F 44 52 72 F 125 121 130 141 F 143 1410 F 148 452s VPFCB 00095F11 F 18 375= F 21 157s F 22 582s F 24 730 F 35 89s 991s 1336 F 72 85 90 F 125 134 F 131 1292 F 148 454s VPINDPN 00094083 F 18 390= F 24 866 F 126 55s VPINDRCT 00095011 F 18 372= F 24 847 F 35 995s F 72 135 169 F 125 119 F 126 56s VPLINK 00095F10 F 18 368= F 21 149s F 22 403s F 24 915 916s F 28 1108s F 35 200 201s 982s F 36 459 468 F 72 177 178s F 101 232s F 107 381s F 125 204s F 126 61s F 148 457s VPLOG 00000002 F 18 395= F 21 146 F 22 387 F 24 918 F 28 1099 F 35 80 84 371 973 1278 1347 F 148 440 444 VPMAIFLD 00003030 F 18 338= F 22 438 663 765 824 F 24 738 F 141 470s 674s VPMSBLK 00095183 F 18 387= F 21 158s F 148 455s *VPNOERR 00000040 F 18 365= VPNOERRB 00003210 F 18 336= 365e VPNOFCB 00000000 F 18 374= F 38 629 681 911 1116 1292 1474 F 55 142 223 244 274 294 339 422 684 756 F 57 82 93 419 F 58 82 F 59 111 374 F 60 78 F 61 79 118 201 309 520 762 F 70 406 F 73 199 F 113 260 F 114 40 61 F 115 71 606 620 745 F 117 91 192 230 F 125 200 F 126 52 F 130 400 F 131 1783 F 134 217 F 135 1188 1200 F 136 168 F 137 400 420 F 138 60 242 457 498 641 *VPNOSUB 00000080 F 18 366= VPNOSUBB 00003010 F 18 335= 366e F 141 671s VPUPCSERL 00095373 F 18 392= F 24 870 F 126 58s VPUVITAB 00002428 F 22 310 313= VPVPN 00174004 F 18 370= F 21 151s F 22 246 393s 630 F 24 845 912 F 28 556 F 32 76 85 754 F 35 86s 172 197 540 542 615 832 955 974s 1022 1135 1204 1275 1333 F 72 143 F 125 115 F 148 445s VPWORDC 00174802 F 18 377= 380e 381e 382e 383e F 35 975s *VPWWCHK 00000020 F 18 364= VPWWCHKB 00003410 F 18 337= 364e VPZEROPG 00000008 F 18 361= F 22 394 F 61 78 F 68 60 F 114 36 57 F 134 216 F 143 2455 1 Jimbo's CREF Extractor 2.0 VRM, System C9303 (18 Mar 93) 12-May-93 12:56 PAGE 116 VPZEROPGB 00003810 F 18 340= 341e F 125 125j VTCDEV 000022CA F 21 1228a 1727 1733= VTDIOSIZE 0000C000 F 7 1168= F 87 99x F 98 117x VTNAME 000022E1 F 21 1754 1760= VTULIST 00001F1F F 19 906= F 21 1753a F 75 286 F 140 165 F 148 1377a 1948 WAIT1 000027B5 F 26 165= 168j WAIT4LOK 00002DE8 F 32 181= 183j WAIT4OTHER 00002D90 F 31 96= 99j WAIT4WORK 000028A9 F 28 68j 88j 112= WAITCOUNT 00040000 F 6 106= F 26 48 F 28 115 WAITING 00098011 F 36 987= 1046s 1055s 1062s 1070 WAITLOOP 00002DA0 F 31 167= 169j WAITRELESE 00002124 F 21 752= 754j WHALT 00170000 F 13 340= 440e 441e 442e 444e 447e 448e 451e 452e 453e 454e 455e 460e 461e WHCLDONE 00002C8B F 29 1387j 1400= WHICHHUNT 00002C70 F 29 1358 1363= 1464 1467 1470 1473 1476 1479 1482 1485 1488 1491 1494 1497 1500 1505 WHMLTQ 00002C8C F 29 1366j 1404= WHMLXU 00002C77 F 29 1370= 1372j WHNPMOD 00002E2A F 32 371j 401= WHOLEPAGE 00001C79 F 16 107= F 21 402 404s 2243 2288 2290s F 28 1542 1545 1547s 1571 1573s F 33 1032 1035s 1230 1232s F 144 357 WHPNXU 00002C79 F 29 1376= 1397j WLCKLIM 00170804 F 8 1610= F 17 83e WLCKUSD 00170805 F 8 1611= F 17 84e WNDO1 00000800 F 14 220= 221e F 21 128 2490a 2512a F 55 229 609a F 57 293a 300a F 58 88s 90s 92s 94s 96s F 59 118a 383 386 390a 395a F 60 82a 96a F 61 123a 141a 531s 532a 533s 539s 540a 541s 771a 772 773 778a 779 780 F 68 651 684 728 F 70 414 F 74 806a F 75 513s 556s 583 F 79 508a F 81 84a 131a F 82 121 136a 292a 315a 664a F 83 59a 308 326s 340 361s 613s 923s F 89 49 F 91 107a 167a F 92 62 102a 135a 140a 335a 360a F 93 64a 207 227 F 95 115a 139a F 100 528s 628 633 664 759a 780a 832a 849a F 101 355 365 382 513 538 542s 648 725 731s 876 878a 1048a 1049a 1050a 1051a 1052a 1053a 1054a 1055a 1056a 1057a 1058a 1059a 1065a 1067a 1068a 1069a 1070a 1071a 1072a 1073a 1074a 1075a 1076a F 107 283 307a 363 373 435a 458a F 110 112 117a 148 153a 170a 179a 184 186 F 113 91 164 167 232a 235a 274a 277a 285a F 115 139a 215a 221a 225 227 317 322a 349a 353a 362a 441a 455a 614a 631a 635a 638 640 F 117 97a 114a 175a 237a 249a 311a F 119 209a 415a 655a F 120 162a 184a F 121 119a 275 1128 1137s 1173 1176s 1393a F 130 404 413a F 131 870 1795 1808 1831 1834 F 135 172 184 185 187s 204 224s 250s 319 333 347 350 355s 370s 371 407s 450 474 477s 491 492 594 595 662a 671a 773a 1096 1104a 1194 1207a 1210a F 136 173a 299a F 137 425 436a F 138 75 78 89 92 113 121 127 129 134 138s 139a 155 159 161 163 165 247s 248s F 139 514s 526 543 545s 558s 577a 602a 621 633 645a 660a 679a F 141 513a 686a F 142 284a 310a 327a 417a 422 441 558a 681a 986 1029s F 143 162 231 238a 294a 297s 299 304 315s 338s 351s 361s 485 544a 589a 617s 638s 722a 796s 826s 1211 1264a 1335 1343s 1356 1526 1543s 1651 1659s 1673 1713a 1728a 1744a 2265a 2283a 2292 2373 2375 F 148 437 470a WNDO2 00000C00 F 14 223= 225e F 38 1485 F 39 87s 90s F 55 343a 344a 349 354 394a 427a 562a 694 F 57 450a 457a 580a 587a 596a F 61 313a 332a F 68 714 F 73 203a 204a F 79 514a F 83 413 444s 458 478s F 95 126a F 110 258 F 112 389s F 113 93 216 233a 239a 245 247 275a 1 Jimbo's CREF Extractor 2.0 VRM, System C9303 (18 Mar 93) 12-May-93 12:56 PAGE 117 289 291 F 115 323a 326 328 432 442a 458a 460 462 475a 578a 585a 599 613a 633a 653a 749 759a 762 764a 803 F 117 196a 211a 219a 258a 320a 328a F 119 433a 475a 481 520a 669a F 120 196a F 131 873 F 134 228s 231s 233s 235s 237s 242s 245s 247s 248a F 135 220s F 137 426 438a F 138 461a 520a 654a 673a F 142 129a 135a 139a 168 434a 453a 537a F 143 377a 380s 381s 383s 390 514a 613a 635a 792a 823a 838a 851a 870a 887a 1032a 1182a 1221a 1294s 1609s 2180a WNDO3 00001000 F 14 228= 229e F 38 641s 644 650s 727 763s 766s 833 869 870s 923s 980 997s 999s 1003s 1004s 1005s 1032s 1061 1068 1069s 1142 1149s 1150s 1153 1155 1157s 1351s 1353s 1355s 1357s 1359s 1425 1427 1429 1437 1439s 1440 1469 1514s 1515s 1558s F 137 263s 267 F 138 213 220s F 148 228s 244 742s 827 831 840 845a 1191a 1201a 1211a 1223a 1235a 1248a 1260a 1274a 1286a 1306a 1318a 1338a 1350a 1370a 1382a WNDO4 00001400 F 14 231= 232e F 43 1314a 2756 2772s 2944 2946 2948 2950 2952 2954 2958a 2961 2963 3001 3003 3005 3006 3026 3592a 3600a 3607a 3615a 5198a WORDLNTH 00000020 F 6 25= 35e 36e 36e 37e 37e 38e 232 F 16 188x F 17 538 F 18 108 391e 391e F 19 515 518 544 F 36 324 1270e 1271e 1272e 1273e 1274e F 43 3140 F 50 478 1276 F 54 343 F 84 63 F 97 378 F 100 33 F 103 106 321 346 F 127 99 F 133 505 F 135 85x 86x 93x 94x F 148 1122 WPAGELOCK 00001C78 F 16 106= F 28 1544s 1548s 1569s 1574s F 33 839s 850s 894s 899s 1031s 1047s 1218s 1234s WPP 00000400 F 0 40a 40a 217 228a 228a 229e 233e F 6 32= 33e 34e 155e F 8 6e 2212e 2545e F 14 214a 217 218e 220 221e 223 225e 228 229e 231 232e 234 235e 237 238e 241 242e 244a 244a 245 246e 248a 248a 250e 251 F 16 163e 378e 402e 402e 422e 422e 1041 F 17 617e F 19 1129 F 20 40a 259a F 21 258 2124 2489 2511 F 25 334 F 28 332 340 F 37 102 103 F 38 1483 1485 1539 F 43 2752 2756 2759 2765 2772s 3600a 3615a F 46 861 918 F 55 227 692 F 57 300a 457a 587a 596a F 68 687 732 739 F 73 204a F 78 118 F 92 135a F 100 849a F 101 341 367 376 F 110 557 F 115 631a F 119 475a 520a F 135 671a 773a 1099 F 138 673a F 142 135a 174 178 F 143 265 851a 870a 888 1148 1744a 1831x 1834x F 144 89 166 226 233a 235a 370 553e 658 735 810 F 148 68 WRITCOUNTS 00001D63 F 16 506= F 43 5093s F 139 264a 275a WRU0 00000000 F 20 43= F 26 224 WRU0CPUSUB 00001040 F 7 74= F 28 402 F 148 537 *WRU0DD 00000D20 F 7 73= *WRU0INT 00000A10 F 7 72= WRU0MREV 00003080 F 7 76= F 21 1005 1147 F 28 405 F 55 1139 F 148 1064 WRU0SMUDEV 00000001 F 7 85= F 21 950 WRU0TYPE 00000040 F 7 66= F 21 310 350 F 26 227 231 F 33 789 *WRU1 00000001 F 20 44= *WRU10 0000000A F 20 53= *WRU11 0000000B F 20 54= *WRU12 0000000C F 20 55= *WRU13 0000000D F 20 56= *WRU14 0000000E F 20 57= *WRU15 0000000F F 20 58= *WRU2 00000002 F 20 45= *WRU3 00000003 F 20 46= WRU4 00000004 F 20 47= F 21 868 *WRU5 00000005 F 20 48= *WRU6 00000006 F 20 49= *WRU7 00000007 F 20 50= 1 Jimbo's CREF Extractor 2.0 VRM, System C9303 (18 Mar 93) 12-May-93 12:56 PAGE 118 *WRU8 00000008 F 20 51= *WRU9 00000009 F 20 52= WRUIMAX 00000010 F 20 60= 63 F 21 867 F 26 223 WRUINFO 00000200 F 20 63= F 26 224 WRUIPROTO 00000200 F 20 42= 60e 61a F 21 868 WRUMEMBAD 00002E10 F 7 99= F 21 870j WRUMEMDEVT 00001040 F 7 83= F 21 949 WRUMEMHERE 00003080 F 7 100= F 21 882 WRUMEMINC 00002040 F 7 86= F 21 854 *WRUMEMNO0 00002E10 F 7 90= WRUMEMNONE 00002C10 F 7 98= F 21 869j WSXCAGAIN 000032D6 F 35 1462= 1482j WSXCLEAN 000032D1 F 35 1448 1457= 1528 1583 WSXCLEANA 00178803 F 35 1453= 1458s 1463 WSXCLEANF 00178802 F 35 1452= 1461s 1481 WSXCLEANT 00178801 F 35 1451= 1460s 1487 WSXCLNALL 000032EA F 35 45 1514 1520= F 59 125 F 72 111 F 75 866 F 82 224 616 F 100 427 1437 F 110 79 317 F 112 163 F 130 348 670 F 131 1359 F 138 577 WSXCLNBROS 000032F4 F 35 1535= 1539j WSXCLNLP 000032EE F 35 1526= 1532j 1537j WSXCLNT 00178801 F 35 1517= 1521s 1542 WSXCLOOP 000032D8 F 35 1465= 1469j WSXCXIT 000032E7 F 35 1466j 1485= WSXLISTDN 00002DD0 F 32 128j 137= XALOG 00000007 F 14 255= F 33 359 361s F 37 113 123s F 130 554 556 570 XCALLTRAP 000038E5 F 21 2011a F 40 8 123 125= XHBLOCKN 00000002 F 16 422= 423 F 144 220 814 XHBLOCKS 00001D1C F 16 423= F 144 227s 229 231 806 811 812s XHBUSY 00001D1A F 16 417= F 144 205s 818s XHCHECK 00001D1B F 16 420= F 40 34 F 144 238s 786 788s XHMAX 00000800 F 16 421= 422e XHTABLCK 00001D20 F 16 432= F 144 295s 301s 791a 796a XHTABLEN 00000020 F 16 442= F 144 793 XHTABTAB 00001D21 F 16 433= 442e F 144 297 792a XITSWAP 00002591 F 24 50= 56j 61j XMONHDR 00001D1E F 16 427= 429e F 144 801a XMONHDRLEN 00000008 F 16 429= F 144 802 XOFF 00000013 F 4 49= F 50 353 XON 00000011 F 4 48= F 48 1081 F 49 760 *XREQERAIR 000000BA F 9 183= XREQERBFN 0000008F F 9 129= F 64 144 F 65 317 553 F 79 1138 1412 1713 F 119 320 F 134 718 XREQERBSBL 0000009E F 9 149= F 138 301 *XREQERBVAR 00000097 F 9 142= *XREQERDAA 000000B0 F 9 173= *XREQERDCM 000000C3 F 9 192= *XREQERDIO 000000C4 F 9 194= *XREQERDNA 000000AF F 9 172= *XREQERDNC 000000B1 F 9 174= XREQERDNR 000000AE F 9 171= F 45 850 980 1100 1186 1537 1726 1800 F 100 236 F 138 1048 F 141 93 XREQERDSE 0000009F F 9 150= F 64 194 F 75 591 F 79 1384 F 82 247 F 83 1072 F 108 111 528 F 119 564 F 121 1193 F 134 352 461 F 135 273 384 979 F 136 362 F 138 290 1113 F 143 879 2388 1 Jimbo's CREF Extractor 2.0 VRM, System C9303 (18 Mar 93) 12-May-93 12:56 PAGE 119 XREQERDSKL 00000087 F 9 117= F 24 60 F 68 208 XREQERESDL 000000C5 F 9 196= F 24 55 F 68 214 XREQERFAU 00000089 F 9 119= F 45 791 840 901 970 1090 1181 1245 1299 1416 1532 1721 F 64 114 F 75 175 242 303 F 82 192 F 100 1384 F 107 398 XREQERFBZ 0000008A F 9 121= F 55 1046 F 56 250 F 64 134 F 75 163 247 308 F 79 1328 1342 F 108 284 F 131 1316 F 134 821 XREQERFHBD 00000090 F 9 130= F 64 159 XREQERFIP 000000A8 F 9 163= F 130 849 F 138 765 XREQERFNF 0000008D F 9 124= F 74 81 F 75 678 1071 F 79 1149 1405 XREQERFPRG 00000092 F 9 132= F 79 1391 XREQERIAUT 000000A7 F 9 162= F 64 209 285 F 121 1207 1592 F 134 365 389 F 143 874 884 XREQERILOP 00000091 F 9 131= F 45 845 F 64 102 F 67 166 F 74 88x 89x 91x 92x 93x F 75 169 F 100 936 F 143 1077 1376 2304 2396 XREQERILR 00000080 F 9 109= F 64 230 305 F 87 93 F 98 111 F 108 210 XREQERINHI 000000A9 F 9 164= F 64 290 XREQERISAV 00000088 F 9 118= F 68 220 F 110 547 XREQERISYR 00000093 F 9 133= F 64 214 295 F 69 74 116 F 107 623 F 130 562 F 134 414 489 F 136 479 F 138 1014 F 144 134 *XREQERITK 000000C9 F 9 200= *XREQERITM 000000CA F 9 201= XREQERLAE 00000083 F 9 113= F 64 169 XREQERLAS 0000008B F 9 122= F 64 174 XREQERLBZ 000000C6 F 9 197= F 64 139 XREQERLNE 00000081 F 9 111= F 64 149 F 79 1398 XREQERLNS 0000008C F 9 123= F 64 164 F 131 210 F 142 576 F 143 1082 XREQERLPE 00000095 F 9 137= F 64 107 XREQERMNRP 000000A2 F 9 157= F 64 250 F 127 209 XREQERMWNA 00000086 F 9 116= F 74 90x 123x 124x 125x 151x 152x 153x 154x 155x 182x 183x 184x 185x 186x 212x 213x 214x XREQERNAE 0000008E F 9 128= F 64 179 240 F 119 367 F 134 444 F 135 235 F 136 484 F 137 81 F 138 1059 F 143 1072 *XREQERNDS 000000B6 F 9 179= *XREQERNDT 000000B7 F 9 180= XREQERNFSV 0000009D F 9 148= F 37 321 F 64 245 F 75 703 F 82 239 F 83 709 1008 F 100 1402 F 138 565 F 143 2045 XREQERNR 000000AC F 9 169= F 119 546 XREQERNSE 000000AB F 9 168= F 46 1544 F 64 184 260 F 75 688 F 119 376 F 135 390 551 974 F 136 489 F 137 86 F 141 370 XREQERNSL 000000AA F 9 167= F 64 154 280 XREQERNSPP 000000A3 F 9 158= F 64 255 F 127 181 753 *XREQERNSS 000000B5 F 9 178= XREQERNSV 000000A6 F 9 161= F 64 270 F 134 723 XREQEROFC 000000A0 F 9 155= F 83 543 *XREQEROIO 000000B9 F 9 182= XREQERPFM 00000084 F 9 114= F 45 975 1421 1527 F 64 119 F 74 86x 111x 113x 139x 140x 141x 142x 143x 170x 171x 172x 173x 174x 1014 1032 XREQERPNS 00000094 F 9 136= F 64 189 300 F 75 683 F 108 167 F 127 875 F 131 342 F 134 377 XREQERPOB 00000082 F 9 112= F 45 1362 F 64 129 235 F 74 69 F 78 140 F 79 1363 1479 F 98 81 F 108 131 F 121 1200 1619 F 127 205 264 282 352 F 131 1311 F 132 314 F 141 869 F 142 91 F 143 2401 F 144 141 XREQERPWW 00000096 F 9 138= F 121 1148 F 131 1763 F 138 277 XREQERREOD 000000A4 F 9 159= F 64 199 F 94 227 F 100 940 1 Jimbo's CREF Extractor 2.0 VRM, System C9303 (18 Mar 93) 12-May-93 12:56 PAGE 120 *XREQERRIB 000000B8 F 9 181= XREQERRNA 00000085 F 9 115= F 64 124 F 74 87x 118x 147x 178x XREQERSCU 000000C7 F 9 198= F 70 329 F 79 1419 *XREQERSDE 000000C0 F 9 189= *XREQERSIB 000000BD F 9 186= *XREQERSIO 000000BB F 9 184= XREQERSIU 00000099 F 9 144= F 64 275 *XREQERSPB 000000BF F 9 188= XREQERSUSP 000000AD F 9 170= F 64 219 F 94 196 F 126 513 F 127 259 361 868 1035 *XREQERTMD 000000C2 F 9 191= *XREQERUAM 0000009A F 9 145= *XREQERUIB 000000BE F 9 187= *XREQERUKC 000000B3 F 9 176= *XREQERUKF 000000B4 F 9 177= *XREQERUKP 000000BC F 9 185= *XREQERUKS 000000B2 F 9 175= *XREQERULT 000000C1 F 9 190= *XREQERVBB 000000C8 F 9 199= XREQERVIU 000000A1 F 9 156= F 64 265 F 75 695 F 138 758 F 141 377 XREQERVLB 0000009B F 9 146= F 138 264 XREQERVNMR 0000009C F 9 147= F 138 82 XREQERWANA 000000A5 F 9 160= F 64 204 XREQERWPT 00000098 F 9 143= F 65 545 XREQRSTR 00000050 F 8 1594= F 17 72e 73e 74e 75e 76e F 121 100 172 972s F 131 1832 XREQRTNX 000038DF F 28 754j F 40 10 102 104= 223j F 64 56j F 67 208j F 107 77j F 123 479j F 124 226j 417j 561j 635j F 125 400j 406j 728j XREQTRAP 000038BD F 21 2001a F 40 11 23 26= XRFLDCODE 00002CA0 F 9 266= F 144 284 XRFLDNRWD 00002210 F 9 270= 271e F 74 752 F 100 375 XRFLDREQ 00002C60 F 9 268= F 71 32 F 123 45 F 130 45 XRFLDSUBOP 00003840 F 9 267= F 71 35 F 103 33 185 F 108 95 F 121 39 350 F 123 48 F 130 48 XRFLDSUSP 00001E20 F 9 272= 273e 274e F 36 1569 F 102 69 102 XRMAIFLD 00002630 F 9 1168= 1169e 1170e 1171e F 141 465 673 726 *XRNOERRS 00000800 F 9 1170= *XRNOREWND 00004000 F 9 271= *XRNOSUB 00001000 F 9 1169= XRSUSPERR 00008000 F 9 274= F 56 180 *XRSUSPNORM 00000000 F 9 273= *XRWWCHK 00000400 F 9 1171= YESCURR 00002DFF F 32 245j 249= YESONTOP 00002E02 F 32 251j 255= ZAP 00000000 F 28 1374= 1375x 1385x 1400x 1400x 1400x 1400x 1400x 1400x 1400x 1401x 1402x 1403x 1403x 1403x 1403x 1403x 1403x 1403x 1404x 1404x 1404x 1404x 1404x 1404x 1404x 1404x 1405x 1405x 1405x 1405x 1405x 1405x 1405x 1405x 1406x 1406x 1406x 1406x 1406x 1406x 1406x 1406x 1407x 1407x 1407x 1407x 1407x 1407x 1407x 1407x 1408x 1408x 1408x 1408x 1408x 1408x 1408x 1408x 1409x 1409x 1409x 1409x 1409x 1409x 1409x 1409x 1410x 1410x 1410x 1410x 1410x 1410x 1410x 1410x 1411x 1411x 1411x 1411x 1411x 1411x 1411x 1411x 1412x 1413x 1413x 1413x 1414x 1414x 1414x 1414x 1414x 1414x 1414x 1414x ZERO 00000000 F 6 11= 12e 155e F 14 214a 218e 221e 225e 229e 232e 235e 238e 242e 246e 250e F 46 1294a ZEROIT 00003090 F 21 456 554 1112 1267 1302 1371 1466 1581 1636 1688 1740 1804 F 34 12 56 61= F 35 82 F 37 76 131 140 169 1 Jimbo's CREF Extractor 2.0 VRM, System C9303 (18 Mar 93) 12-May-93 12:56 PAGE 121 F 43 727 F 50 756 F 54 396 F 61 282 F 65 68 F 69 59 F 74 869 F 76 100 F 79 161 204 232 282 F 107 288 304 F 123 1205 F 130 185 F 131 173 562 F 138 985 F 139 84 F 141 135 F 143 401 F 144 87 164 224 399 F 148 442 467 1075 1884 ZEROITLP 00003093 F 34 64= 66j ZEROPAGE 0000242E F 22 315a 330j 380 382= ZHALT 001A0000 F 13 341= 745e 746e ZOTUERROR 00002DF4 F 32 218= 226j ZRETURN 00002ADF F 28 1272j 1274j 1357=